From 5608ca9575149edb204b50e4fcf5b7e4ff67f89d Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 17 Apr 2026 10:51:05 -0700 Subject: [PATCH 1/6] Refresh elasticsearch-openapi.json that has tag groups (#3139) --- docs/elasticsearch-openapi.json | 241469 ++++++++++++++++++----------- 1 file changed, 151013 insertions(+), 90456 deletions(-) diff --git a/docs/elasticsearch-openapi.json b/docs/elasticsearch-openapi.json index d83c9ecebc..5ae777d1af 100644 --- a/docs/elasticsearch-openapi.json +++ b/docs/elasticsearch-openapi.json @@ -1,7 +1,8 @@ { "openapi": "3.0.3", "info": { - "title": "Elasticsearch Request & Response Specification", + "title": "Elasticsearch API", + "description": "Elasticsearch provides REST APIs that are used by the UI components and can be called directly to configure and access Elasticsearch features.\n## Documentation source and versions\nThis documentation is derived from the main branch of the [elasticsearch-specification](https://github.com/elastic/elasticsearch-specification) repository. It is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).\nThis documentation contains work-in-progress information for future Elastic Stack releases.", "license": { "name": "Apache 2.0", "url": "https://github.com/elastic/elasticsearch-specification/blob/main/LICENSE" @@ -78,9 +79,18 @@ } } }, - "x-state": "Added in 7.7.0", - "x-api-name" : "get", - "x-namespace": "async_search" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_async_search/{id}\n
\n " + ], + "x-api": "get.async_search", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -114,9 +124,18 @@ } } }, - "x-state": "Added in 7.7.0", - "x-api-name" : "delete", - "x-namespace": "async_search" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n DELETE\n /_async_search/{id}\n
\n " + ], + "x-api": "delete.async_search", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_async_search/status/{id}": { @@ -179,1364 +198,2114 @@ } } }, - "x-state": "Added in 7.11.0", - "x-api-name" : "status", - "x-namespace": "async_search" - } - }, - "/_async_search": { - "post": { - "tags": [ - "search" + "x-state": "Generally available; Added in 7.11.0", + "x-variations": [ + "
\n GET\n /_async_search/status/{id}\n
\n " ], - "summary": "Run an async search", - "description": "When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.\n\nWarning: Asynchronous search does not support scroll or search requests that include only the suggest section.\n\nBy default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.\nThe maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.", - "operationId": "async-search-submit", - "parameters": [ - { - "$ref": "#/components/parameters/async_search.submit-wait_for_completion_timeout" - }, - { - "$ref": "#/components/parameters/async_search.submit-keep_alive" - }, - { - "$ref": "#/components/parameters/async_search.submit-keep_on_completion" - }, - { - "$ref": "#/components/parameters/async_search.submit-allow_no_indices" - }, - { - "$ref": "#/components/parameters/async_search.submit-allow_partial_search_results" - }, - { - "$ref": "#/components/parameters/async_search.submit-analyzer" - }, - { - "$ref": "#/components/parameters/async_search.submit-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/async_search.submit-batched_reduce_size" - }, - { - "$ref": "#/components/parameters/async_search.submit-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/async_search.submit-default_operator" - }, - { - "$ref": "#/components/parameters/async_search.submit-df" - }, - { - "$ref": "#/components/parameters/async_search.submit-docvalue_fields" - }, - { - "$ref": "#/components/parameters/async_search.submit-expand_wildcards" - }, - { - "$ref": "#/components/parameters/async_search.submit-explain" - }, - { - "$ref": "#/components/parameters/async_search.submit-ignore_throttled" - }, - { - "$ref": "#/components/parameters/async_search.submit-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/async_search.submit-lenient" - }, - { - "$ref": "#/components/parameters/async_search.submit-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/async_search.submit-preference" - }, - { - "$ref": "#/components/parameters/async_search.submit-request_cache" - }, - { - "$ref": "#/components/parameters/async_search.submit-routing" - }, - { - "$ref": "#/components/parameters/async_search.submit-search_type" - }, - { - "$ref": "#/components/parameters/async_search.submit-stats" - }, - { - "$ref": "#/components/parameters/async_search.submit-stored_fields" - }, - { - "$ref": "#/components/parameters/async_search.submit-suggest_field" - }, - { - "$ref": "#/components/parameters/async_search.submit-suggest_mode" - }, - { - "$ref": "#/components/parameters/async_search.submit-suggest_size" - }, - { - "$ref": "#/components/parameters/async_search.submit-suggest_text" - }, - { - "$ref": "#/components/parameters/async_search.submit-terminate_after" - }, - { - "$ref": "#/components/parameters/async_search.submit-timeout" - }, - { - "$ref": "#/components/parameters/async_search.submit-track_total_hits" - }, - { - "$ref": "#/components/parameters/async_search.submit-track_scores" - }, - { - "$ref": "#/components/parameters/async_search.submit-typed_keys" - }, - { - "$ref": "#/components/parameters/async_search.submit-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/async_search.submit-version" - }, - { - "$ref": "#/components/parameters/async_search.submit-_source" - }, - { - "$ref": "#/components/parameters/async_search.submit-_source_excludes" - }, - { - "$ref": "#/components/parameters/async_search.submit-_source_includes" - }, - { - "$ref": "#/components/parameters/async_search.submit-seq_no_primary_term" - }, - { - "$ref": "#/components/parameters/async_search.submit-q" - }, - { - "$ref": "#/components/parameters/async_search.submit-size" - }, - { - "$ref": "#/components/parameters/async_search.submit-from" - }, - { - "$ref": "#/components/parameters/async_search.submit-sort" - } + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/async_search.submit" - }, - "responses": { - "200": { - "$ref": "#/components/responses/async_search.submit-200" + "x-api": "status.async_search", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "submit", - "x-namespace": "async_search" + ] } }, - "/{index}/_async_search": { + "/_async_search": { "post": { "tags": [ "search" ], "summary": "Run an async search", "description": "When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.\n\nWarning: Asynchronous search does not support scroll or search requests that include only the suggest section.\n\nBy default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.\nThe maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.", - "operationId": "async-search-submit-1", + "operationId": "async-search-submit", "parameters": [ { - "$ref": "#/components/parameters/async_search.submit-index" - }, - { - "$ref": "#/components/parameters/async_search.submit-wait_for_completion_timeout" - }, - { - "$ref": "#/components/parameters/async_search.submit-keep_alive" - }, - { - "$ref": "#/components/parameters/async_search.submit-keep_on_completion" - }, - { - "$ref": "#/components/parameters/async_search.submit-allow_no_indices" - }, - { - "$ref": "#/components/parameters/async_search.submit-allow_partial_search_results" - }, - { - "$ref": "#/components/parameters/async_search.submit-analyzer" - }, - { - "$ref": "#/components/parameters/async_search.submit-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/async_search.submit-batched_reduce_size" + "in": "query", + "name": "wait_for_completion_timeout", + "description": "Blocks and waits until the search is completed up to a certain timeout.\nWhen the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-ccs_minimize_roundtrips" + "in": "query", + "name": "keep_alive", + "description": "Specifies how long the async search needs to be available.\nOngoing async searches and any saved search results are deleted after this period.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-default_operator" + "in": "query", + "name": "keep_on_completion", + "description": "If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-df" + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-docvalue_fields" + "in": "query", + "name": "allow_partial_search_results", + "description": "Indicate if an error should be returned if there is a partial search failure or timeout", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-expand_wildcards" + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-explain" + "in": "query", + "name": "analyze_wildcard", + "description": "Specify whether wildcard and prefix queries should be analyzed", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-ignore_throttled" + "in": "query", + "name": "batched_reduce_size", + "description": "Affects how often partial results become available, which happens whenever shard results are reduced.\nA partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-ignore_unavailable" + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "The default value is the only supported value.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-lenient" + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query (AND or OR)", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-max_concurrent_shard_requests" + "in": "query", + "name": "df", + "description": "The field to use as default where no field prefix is given in the query string", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-preference" + "in": "query", + "name": "docvalue_fields", + "description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-request_cache" + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-routing" + "in": "query", + "name": "explain", + "description": "Specify whether to return detailed information about score computation as part of a hit", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-search_type" + "in": "query", + "name": "ignore_throttled", + "description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-stats" + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-stored_fields" + "in": "query", + "name": "lenient", + "description": "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-suggest_field" + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "The number of concurrent shard requests per node this search executes concurrently.\nThis value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-suggest_mode" + "in": "query", + "name": "preference", + "description": "Specify the node or shard the operation should be performed on", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-suggest_size" + "in": "query", + "name": "request_cache", + "description": "Specify if request cache should be used for this request or not, defaults to true", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-suggest_text" + "in": "query", + "name": "routing", + "description": "A comma-separated list of specific routing values", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-terminate_after" + "in": "query", + "name": "search_type", + "description": "Search operation type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-timeout" + "in": "query", + "name": "stats", + "description": "Specific 'tag' of the request for logging and statistical purposes", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-track_total_hits" + "in": "query", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return as part of a hit", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-track_scores" + "in": "query", + "name": "suggest_field", + "description": "Specifies which field to use for suggestions.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-typed_keys" + "in": "query", + "name": "suggest_mode", + "description": "Specify suggest mode", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SuggestMode" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-rest_total_hits_as_int" + "in": "query", + "name": "suggest_size", + "description": "How many suggestions to return in response", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-version" + "in": "query", + "name": "suggest_text", + "description": "The source text for which the suggestions should be returned.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-_source" + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-_source_excludes" + "in": "query", + "name": "timeout", + "description": "Explicit operation timeout", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-_source_includes" + "in": "query", + "name": "track_total_hits", + "description": "Indicate if the number of documents that match the query should be tracked.\nA number can also be specified, to accurately track the total hit count up to the number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-seq_no_primary_term" + "in": "query", + "name": "track_scores", + "description": "Whether to calculate and return scores even if they are not used for sorting", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-q" + "in": "query", + "name": "typed_keys", + "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-size" + "in": "query", + "name": "rest_total_hits_as_int", + "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-from" + "in": "query", + "name": "version", + "description": "Specify whether to return document version as part of a hit", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/async_search.submit-sort" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/async_search.submit" - }, - "responses": { - "200": { - "$ref": "#/components/responses/async_search.submit-200" - } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "submit", - "x-namespace": "async_search" - } - }, - "/_autoscaling/policy/{name}": { - "get": { - "tags": [ - "autoscaling" - ], - "summary": "Get an autoscaling policy", - "description": "NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/autoscaling" - }, - "operationId": "autoscaling-get-autoscaling-policy", - "parameters": [ - { - "in": "path", - "name": "name", - "description": "the name of the autoscaling policy", - "required": true, + "in": "query", + "name": "_source", + "description": "True or false to return the _source field or not, or a list of fields to return", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "_source_excludes", + "description": "A list of fields to exclude from the returned _source field", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/autoscaling._types.AutoscalingPolicy" - }, - "examples": { - "GetAutoscalingPolicyResponseExample1": { - "summary": "A successful response for retrieving an autoscaling policy.", - "description": "This may be a response to `GET /_autoscaling/policy/my_autoscaling_policy`.", - "value": "{\n \"roles\": ,\n \"deciders\": \n}" - } - } - } - } - } - }, - "x-state": "Added in 7.11.0", - "x-api-name" : "get_autoscaling_policy", - "x-namespace": "autoscaling" - }, - "put": { - "tags": [ - "autoscaling" - ], - "summary": "Create or update an autoscaling policy", - "description": "NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/autoscaling" - }, - "operationId": "autoscaling-put-autoscaling-policy", - "parameters": [ + }, { - "in": "path", - "name": "name", - "description": "the name of the autoscaling policy", - "required": true, + "in": "query", + "name": "_source_includes", + "description": "A list of fields to extract and return from the _source field", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Fields" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "seq_no_primary_term", + "description": "Specify whether to return sequence number and primary term of the last modification of each hit", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "q", + "description": "Query in the Lucene query string syntax", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/autoscaling._types.AutoscalingPolicy" - }, - "examples": { - "PutAutoscalingPolicyRequestExample1": { - "summary": "Creates or updates an autoscaling policy.", - "value": "{\n \"roles\": [],\n \"deciders\": {\n \"fixed\": {\n }\n }\n}" - }, - "PutAutoscalingPolicyRequestExample2": { - "summary": "Creates an autoscaling policy.", - "description": "The API method and path for this request: `PUT /_autoscaling/policy/my_autoscaling_policy`. It creates `my_autoscaling_policy` using the fixed autoscaling decider, applying to the set of nodes having (only) the `data_hot` role.", - "value": "{\n \"roles\" : [ \"data_hot\" ],\n \"deciders\": {\n \"fixed\": {\n }\n }\n}" - } - } - } }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "PutAutoscalingPolicyResponseExample1": { - "summary": "A successful response when creating an autoscaling policy.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 7.11.0", - "x-api-name" : "put_autoscaling_policy", - "x-namespace": "autoscaling" - }, - "delete": { - "tags": [ - "autoscaling" - ], - "summary": "Delete an autoscaling policy", - "description": "NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/autoscaling" - }, - "operationId": "autoscaling-delete-autoscaling-policy", - "parameters": [ { - "in": "path", - "name": "name", - "description": "the name of the autoscaling policy", - "required": true, + "in": "query", + "name": "size", + "description": "Number of hits to return", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "type": "number" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "from", + "description": "Starting offset", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "sort", + "description": "A comma-separated list of : pairs", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "DeleteAutoscalingPolicyResponseExample1": { - "summary": "A successful response of deleting one or more autoscaling policy.", - "description": "This may be a response to either `DELETE /_autoscaling/policy/my_autoscaling_policy` or `DELETE /_autoscaling/policy/*`.\n", - "value": "{\n \"acknowledged\": true\n}" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "collapse": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "explain": { + "description": "If true, returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "description": "Boosts the _score of documents from specified indices.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "knn": { + "description": "Defines the approximate kNN search to run.", + "x-state": "Generally available; Added in 8.4.0", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.KnnSearch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.KnnSearch" + } + } + ] + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in search results and results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "type": "boolean" + }, + "query": { + "description": "Defines the search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "default": 10.0, + "type": "number" + }, + "slice": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "description": "Indicates which source fields are returned for matching documents. These\nfields are returned in the hits._source property of the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "suggest": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If true, returns document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", + "type": "boolean" + }, + "stored_fields": { + "description": "List of stored fields to return as part of a hit. If no fields are specified,\nno stored fields are included in the response. If this field is specified, the _source\nparameter defaults to false. You can pass _source: true to return both source fields\nand stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limits the search to a point in time (PIT). If you provide a PIT, you\ncannot specify an in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "description": "Defines one or more runtime fields in the search request. These fields take\nprecedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", + "type": "array", + "items": { + "type": "string" + } } } + }, + "examples": { + "AsyncSearchSubmitRequestExample1": { + "description": "Perform a search request asynchronously with `POST /sales*/_async_search?size=0`. It accepts the same parameters and request body as the search API.\n", + "value": "{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}" + } } } } }, - "x-state": "Added in 7.11.0", - "x-api-name" : "delete_autoscaling_policy", - "x-namespace": "autoscaling" - } - }, - "/_autoscaling/capacity": { - "get": { - "tags": [ - "autoscaling" - ], - "summary": "Get the autoscaling capacity", - "description": "NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.\n\nThis API gets the current autoscaling capacity based on the configured autoscaling policy.\nIt will return information to size the cluster appropriately to the current workload.\n\nThe `required_capacity` is calculated as the maximum of the `required_capacity` result of all individual deciders that are enabled for the policy.\n\nThe operator should verify that the `current_nodes` match the operator’s knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information.\n\nThe response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required.\nThis information is provided for diagnosis only.\nDo not use this information to make autoscaling decisions.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/autoscaling" - }, - "operationId": "autoscaling-get-autoscaling-capacity", - "parameters": [ - { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "policies": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/autoscaling.get_autoscaling_capacity.AutoscalingDeciders" - } - } - }, - "required": [ - "policies" - ] + "$ref": "#/components/schemas/async_search._types.AsyncSearchDocumentResponseBase" }, "examples": { - "GetAutoscalingCapacityResponseExample1": { - "summary": "A successful response for retrieving the current autoscaling capacity.", - "description": "This may be a response to `GET /_autoscaling/capacity`.", - "value": "{\n policies: {}\n}" + "AsyncSearchSubmitResponseExample1": { + "description": "A successful response when performing search asynchronously.", + "value": "{\n \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n \"is_partial\" : true,\n \"is_running\" : true,\n \"start_time_in_millis\" : 1583945890986,\n \"expiration_time_in_millis\" : 1584377890986,\n \"response\" : {\n \"took\" : 1122,\n \"timed_out\" : false,\n \"num_reduce_phases\" : 0,\n \"_shards\" : {\n \"total\" : 562,\n \"successful\" : 3,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 157483,\n \"relation\" : \"gte\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n }\n }\n}" } } } } } }, - "x-state": "Added in 7.11.0", - "x-api-name" : "get_autoscaling_capacity", - "x-namespace": "autoscaling" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n POST\n /_async_search\n
\n " + ], + "x-api": "submit.async_search", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_bulk": { - "put": { + "/{index}/_async_search": { + "post": { "tags": [ - "document" + "search" ], - "summary": "Bulk index or delete documents", - "description": "Perform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.", - "operationId": "bulk-1", + "summary": "Run an async search", + "description": "When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.\n\nWarning: Asynchronous search does not support scroll or search requests that include only the suggest section.\n\nBy default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.\nThe maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.", + "operationId": "async-search-submit-1", "parameters": [ { - "$ref": "#/components/parameters/bulk-include_source_on_error" - }, - { - "$ref": "#/components/parameters/bulk-list_executed_pipelines" + "in": "path", + "name": "index", + "description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/bulk-pipeline" + "in": "query", + "name": "wait_for_completion_timeout", + "description": "Blocks and waits until the search is completed up to a certain timeout.\nWhen the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-refresh" + "in": "query", + "name": "keep_alive", + "description": "Specifies how long the async search needs to be available.\nOngoing async searches and any saved search results are deleted after this period.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-routing" + "in": "query", + "name": "keep_on_completion", + "description": "If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source" + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source_excludes" + "in": "query", + "name": "allow_partial_search_results", + "description": "Indicate if an error should be returned if there is a partial search failure or timeout", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source_includes" + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-timeout" + "in": "query", + "name": "analyze_wildcard", + "description": "Specify whether wildcard and prefix queries should be analyzed", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-wait_for_active_shards" + "in": "query", + "name": "batched_reduce_size", + "description": "Affects how often partial results become available, which happens whenever shard results are reduced.\nA partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-require_alias" + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "The default value is the only supported value.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-require_data_stream" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/bulk" - }, - "responses": { - "200": { - "$ref": "#/components/responses/bulk-200" - } - }, - "x-api-name": "bulk" - }, - "post": { - "tags": [ - "document" - ], - "summary": "Bulk index or delete documents", - "description": "Perform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.", - "operationId": "bulk", - "parameters": [ - { - "$ref": "#/components/parameters/bulk-include_source_on_error" + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query (AND or OR)", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-list_executed_pipelines" + "in": "query", + "name": "df", + "description": "The field to use as default where no field prefix is given in the query string", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-pipeline" + "in": "query", + "name": "docvalue_fields", + "description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-refresh" + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-routing" + "in": "query", + "name": "explain", + "description": "Specify whether to return detailed information about score computation as part of a hit", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source" + "in": "query", + "name": "ignore_throttled", + "description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source_excludes" + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source_includes" + "in": "query", + "name": "lenient", + "description": "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-timeout" + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "The number of concurrent shard requests per node this search executes concurrently.\nThis value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-wait_for_active_shards" + "in": "query", + "name": "preference", + "description": "Specify the node or shard the operation should be performed on", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-require_alias" + "in": "query", + "name": "request_cache", + "description": "Specify if request cache should be used for this request or not, defaults to true", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-require_data_stream" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/bulk" - }, - "responses": { - "200": { - "$ref": "#/components/responses/bulk-200" - } - }, - "x-api-name": "bulk" - } - }, - "/{index}/_bulk": { - "put": { - "tags": [ - "document" - ], - "summary": "Bulk index or delete documents", - "description": "Perform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.", - "operationId": "bulk-3", - "parameters": [ - { - "$ref": "#/components/parameters/bulk-index" + "in": "query", + "name": "routing", + "description": "A comma-separated list of specific routing values", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-include_source_on_error" + "in": "query", + "name": "search_type", + "description": "Search operation type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-list_executed_pipelines" + "in": "query", + "name": "stats", + "description": "Specific 'tag' of the request for logging and statistical purposes", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-pipeline" + "in": "query", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return as part of a hit", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-refresh" + "in": "query", + "name": "suggest_field", + "description": "Specifies which field to use for suggestions.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-routing" + "in": "query", + "name": "suggest_mode", + "description": "Specify suggest mode", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SuggestMode" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source" + "in": "query", + "name": "suggest_size", + "description": "How many suggestions to return in response", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source_excludes" + "in": "query", + "name": "suggest_text", + "description": "The source text for which the suggestions should be returned.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source_includes" + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-timeout" + "in": "query", + "name": "timeout", + "description": "Explicit operation timeout", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-wait_for_active_shards" + "in": "query", + "name": "track_total_hits", + "description": "Indicate if the number of documents that match the query should be tracked.\nA number can also be specified, to accurately track the total hit count up to the number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-require_alias" + "in": "query", + "name": "track_scores", + "description": "Whether to calculate and return scores even if they are not used for sorting", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-require_data_stream" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/bulk" - }, - "responses": { - "200": { - "$ref": "#/components/responses/bulk-200" - } - }, - "x-api-name": "bulk" - }, - "post": { - "tags": [ - "document" - ], - "summary": "Bulk index or delete documents", - "description": "Perform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.", - "operationId": "bulk-2", - "parameters": [ - { - "$ref": "#/components/parameters/bulk-index" + "in": "query", + "name": "typed_keys", + "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-include_source_on_error" + "in": "query", + "name": "rest_total_hits_as_int", + "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-list_executed_pipelines" + "in": "query", + "name": "version", + "description": "Specify whether to return document version as part of a hit", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-pipeline" + "in": "query", + "name": "_source", + "description": "True or false to return the _source field or not, or a list of fields to return", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-refresh" - }, - { - "$ref": "#/components/parameters/bulk-routing" - }, - { - "$ref": "#/components/parameters/bulk-_source" + "in": "query", + "name": "_source_excludes", + "description": "A list of fields to exclude from the returned _source field", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source_excludes" + "in": "query", + "name": "_source_includes", + "description": "A list of fields to extract and return from the _source field", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-_source_includes" + "in": "query", + "name": "seq_no_primary_term", + "description": "Specify whether to return sequence number and primary term of the last modification of each hit", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-timeout" + "in": "query", + "name": "q", + "description": "Query in the Lucene query string syntax", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-wait_for_active_shards" + "in": "query", + "name": "size", + "description": "Number of hits to return", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-require_alias" + "in": "query", + "name": "from", + "description": "Starting offset", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/bulk-require_data_stream" + "in": "query", + "name": "sort", + "description": "A comma-separated list of : pairs", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/bulk" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "collapse": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "explain": { + "description": "If true, returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "description": "Boosts the _score of documents from specified indices.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "knn": { + "description": "Defines the approximate kNN search to run.", + "x-state": "Generally available; Added in 8.4.0", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.KnnSearch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.KnnSearch" + } + } + ] + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in search results and results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "type": "boolean" + }, + "query": { + "description": "Defines the search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "default": 10.0, + "type": "number" + }, + "slice": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "description": "Indicates which source fields are returned for matching documents. These\nfields are returned in the hits._source property of the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "suggest": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If true, returns document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", + "type": "boolean" + }, + "stored_fields": { + "description": "List of stored fields to return as part of a hit. If no fields are specified,\nno stored fields are included in the response. If this field is specified, the _source\nparameter defaults to false. You can pass _source: true to return both source fields\nand stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limits the search to a point in time (PIT). If you provide a PIT, you\ncannot specify an in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "description": "Defines one or more runtime fields in the search request. These fields take\nprecedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "AsyncSearchSubmitRequestExample1": { + "description": "Perform a search request asynchronously with `POST /sales*/_async_search?size=0`. It accepts the same parameters and request body as the search API.\n", + "value": "{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}" + } + } + } + } }, "responses": { "200": { - "$ref": "#/components/responses/bulk-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/async_search._types.AsyncSearchDocumentResponseBase" + }, + "examples": { + "AsyncSearchSubmitResponseExample1": { + "description": "A successful response when performing search asynchronously.", + "value": "{\n \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n \"is_partial\" : true,\n \"is_running\" : true,\n \"start_time_in_millis\" : 1583945890986,\n \"expiration_time_in_millis\" : 1584377890986,\n \"response\" : {\n \"took\" : 1122,\n \"timed_out\" : false,\n \"num_reduce_phases\" : 0,\n \"_shards\" : {\n \"total\" : 562,\n \"successful\" : 3,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 157483,\n \"relation\" : \"gte\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n }\n }\n}" + } + } + } + } } }, - "x-api-name": "bulk" - } - }, - "/_cat/aliases": { - "get": { - "tags": [ - "cat" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n POST\n /{index}/_async_search\n
\n " ], - "summary": "Get aliases", - "description": "Get the cluster's index aliases, including filter and routing information.\nThis API does not return data stream aliases.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.", - "operationId": "cat-aliases", - "parameters": [ - { - "$ref": "#/components/parameters/cat.aliases-h" - }, - { - "$ref": "#/components/parameters/cat.aliases-s" - }, - { - "$ref": "#/components/parameters/cat.aliases-expand_wildcards" - }, + "x-api": "submit.async_search", + "x-category": "search", + "x-metaTags": [ { - "$ref": "#/components/parameters/cat.aliases-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.aliases-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "aliases", - "x-namespace": "cat" + ] } }, - "/_cat/aliases/{name}": { - "get": { + "/_bulk": { + "put": { "tags": [ - "cat" + "document" ], - "summary": "Get aliases", - "description": "Get the cluster's index aliases, including filter and routing information.\nThis API does not return data stream aliases.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.", - "operationId": "cat-aliases-1", + "summary": "Bulk index or delete documents", + "description": "Perform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* Java: Check out `co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n* Ruby: Check out `Elasticsearch::Helpers::BulkHelper`\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.\n\nYou might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.\nRefer to the linked documentation for step-by-step instructions using the index settings API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-bulk.html" + }, + "operationId": "bulk-1", "parameters": [ { - "$ref": "#/components/parameters/cat.aliases-name" - }, - { - "$ref": "#/components/parameters/cat.aliases-h" - }, - { - "$ref": "#/components/parameters/cat.aliases-s" + "in": "query", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.aliases-expand_wildcards" + "in": "query", + "name": "list_executed_pipelines", + "description": "If `true`, the response will include the ingest pipelines that were run for each index or create.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.aliases-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.aliases-200" - } - }, - "x-api-name" : "aliases", - "x-namespace": "cat" - } - }, - "/_cat/allocation": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get shard allocation information", - "description": "Get a snapshot of the number of shards allocated to each data node and their disk space.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", - "operationId": "cat-allocation", - "parameters": [ - { - "$ref": "#/components/parameters/cat.allocation-bytes" + "in": "query", + "name": "pipeline", + "description": "The pipeline identifier to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-h" + "in": "query", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, wait for a refresh to make this operation visible to search.\nIf `false`, do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-s" + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-local" + "in": "query", + "name": "_source", + "description": "Indicates whether to return the `_source` field (`true` or `false`) or contains a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.allocation-200" - } - }, - "x-api-name" : "allocation", - "x-namespace": "cat" - } - }, - "/_cat/allocation/{node_id}": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get shard allocation information", - "description": "Get a snapshot of the number of shards allocated to each data node and their disk space.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", - "operationId": "cat-allocation-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.allocation-node_id" + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-bytes" + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-h" + "in": "query", + "name": "timeout", + "description": "The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.\nThe default is `1m` (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-s" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default is `1`, which waits for each primary shard to be active.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-local" + "in": "query", + "name": "require_alias", + "description": "If `true`, the request's actions must target an index alias.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.allocation-master_timeout" + "in": "query", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.bulk.OperationContainer" + }, + { + "$ref": "#/components/schemas/_global.bulk.UpdateAction" + }, + { + "type": "object" + } + ] + } + }, + "examples": { + "BulkRequestExample1": { + "summary": "Multiple operations", + "description": "Run `POST _bulk` to perform multiple operations.", + "value": "{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" + }, + "BulkRequestExample2": { + "summary": "Bulk updates", + "description": "When you run `POST _bulk` and use the `update` action, you can use `retry_on_conflict` as a field in the action itself (not in the extra payload line) to specify how many times an update should be retried in the case of a version conflict.\n", + "value": "{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : { \"_id\" : \"0\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"script\" : { \"source\": \"ctx._source.counter += params.param1\", \"lang\" : \"painless\", \"params\" : {\"param1\" : 1}}, \"upsert\" : {\"counter\" : 1}}\n{ \"update\" : {\"_id\" : \"2\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"}, \"doc_as_upsert\" : true }\n{ \"update\" : {\"_id\" : \"3\", \"_index\" : \"index1\", \"_source\" : true} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : {\"_id\" : \"4\", \"_index\" : \"index1\"} }\n{ \"doc\" : {\"field\" : \"value\"}, \"_source\": true}" + }, + "BulkRequestExample3": { + "summary": "Filter for failed operations", + "description": "To return only information about failed operations, run `POST /_bulk?filter_path=items.*.error`.\n", + "value": "{ \"update\": {\"_id\": \"5\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"update\": {\"_id\": \"6\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"create\": {\"_id\": \"7\", \"_index\": \"index1\"} }\n{ \"my_field\": \"foo\" }" + }, + "BulkRequestExample4": { + "summary": "Dynamic templates", + "description": "Run `POST /_bulk` to perform a bulk request that consists of index and create actions with the `dynamic_templates` parameter. The bulk request creates two new fields `work_location` and `home_location` with type `geo_point` according to the `dynamic_templates` parameter. However, the `raw_location` field is created using default dynamic mapping rules, as a text field in that case since it is supplied as a string in the JSON document.\n", + "value": "{ \"index\" : { \"_index\" : \"my_index\", \"_id\" : \"1\", \"dynamic_templates\": {\"work_location\": \"geo_point\"}} }\n{ \"field\" : \"value1\", \"work_location\": \"41.12,-71.34\", \"raw_location\": \"41.12,-71.34\"}\n{ \"create\" : { \"_index\" : \"my_index\", \"_id\" : \"2\", \"dynamic_templates\": {\"home_location\": \"geo_point\"}} }\n{ \"field\" : \"value2\", \"home_location\": \"41.12,-71.34\"}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/cat.allocation-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "description": "If `true`, one or more of the operations in the bulk request did not complete successfully.", + "type": "boolean" + }, + "items": { + "description": "The result of each operation in the bulk request, in the order they were submitted.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.bulk.ResponseItem" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "took": { + "description": "The length of time, in milliseconds, it took to process the bulk request.", + "type": "number" + }, + "ingest_took": { + "type": "number" + } + }, + "required": [ + "errors", + "items", + "took" + ] + }, + "examples": { + "BulkResponseExample1": { + "summary": "Multiple successful operations", + "value": "{\n \"took\": 30,\n \"errors\": false,\n \"items\": [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 0,\n \"_primary_term\": 1\n }\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"result\": \"not_found\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 404,\n \"_seq_no\" : 1,\n \"_primary_term\" : 2\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 2,\n \"_primary_term\" : 3\n }\n },\n {\n \"update\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"result\": \"updated\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 200,\n \"_seq_no\" : 3,\n \"_primary_term\" : 4\n }\n }\n ]\n}" + }, + "BulkResponseExample2": { + "summary": "Failed actions", + "description": "If you run `POST /_bulk` with operations that update non-existent documents, the operations cannot complete successfully. The API returns a response with an `errors` property value `true`. The response also includes an error object for any failed operations. The error object contains additional information about the failure, such as the error type and reason.\n", + "value": "{\n \"took\": 486,\n \"errors\": true,\n \"items\": [\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"5\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"6\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"create\": {\n \"_index\": \"index1\",\n \"_id\": \"7\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"status\": 201\n }\n }\n ]\n}" + }, + "BulkResponseExample3": { + "summary": "Filter for failed operations", + "description": "An example response from `POST /_bulk?filter_path=items.*.error`, which returns only information about failed operations.\n", + "value": "{\n \"items\": [\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n }\n ]\n}" + } + } + } + } } }, - "x-api-name" : "allocation", - "x-namespace": "cat" - } - }, - "/_cat/component_templates": { - "get": { - "tags": [ - "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_bulk\n
\n ", + "
\n PUT\n /_bulk\n
\n " ], - "summary": "Get component templates", - "description": "Get information about component templates in a cluster.\nComponent templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the get component template API.", - "operationId": "cat-component-templates", - "parameters": [ + "x-api": "bulk", + "x-category": "document management", + "x-metaTags": [ { - "$ref": "#/components/parameters/cat.component_templates-h" - }, - { - "$ref": "#/components/parameters/cat.component_templates-s" - }, - { - "$ref": "#/components/parameters/cat.component_templates-local" - }, - { - "$ref": "#/components/parameters/cat.component_templates-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.component_templates-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.1.0", - "x-api-name" : "component_templates", - "x-namespace": "cat" - } - }, - "/_cat/component_templates/{name}": { - "get": { + ] + }, + "post": { "tags": [ - "cat" + "document" ], - "summary": "Get component templates", - "description": "Get information about component templates in a cluster.\nComponent templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the get component template API.", - "operationId": "cat-component-templates-1", + "summary": "Bulk index or delete documents", + "description": "Perform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* Java: Check out `co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n* Ruby: Check out `Elasticsearch::Helpers::BulkHelper`\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.\n\nYou might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.\nRefer to the linked documentation for step-by-step instructions using the index settings API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-bulk.html" + }, + "operationId": "bulk", "parameters": [ { - "$ref": "#/components/parameters/cat.component_templates-name" + "in": "query", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.component_templates-h" + "in": "query", + "name": "list_executed_pipelines", + "description": "If `true`, the response will include the ingest pipelines that were run for each index or create.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.component_templates-s" + "in": "query", + "name": "pipeline", + "description": "The pipeline identifier to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.component_templates-local" + "in": "query", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, wait for a refresh to make this operation visible to search.\nIf `false`, do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.component_templates-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.component_templates-200" - } - }, - "x-state": "Added in 5.1.0", - "x-api-name" : "component_templates", - "x-namespace": "cat" - } - }, - "/_cat/count": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get a document count", - "description": "Get quick access to a document count for a data stream, an index, or an entire cluster.\nThe document count only includes live documents, not deleted documents which have not yet been removed by the merge process.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the count API.", - "operationId": "cat-count", - "parameters": [ - { - "$ref": "#/components/parameters/cat.count-h" - }, - { - "$ref": "#/components/parameters/cat.count-s" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.count-200" - } - }, - "x-api-name" : "count", - "x-namespace": "cat" - } - }, - "/_cat/count/{index}": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get a document count", - "description": "Get quick access to a document count for a data stream, an index, or an entire cluster.\nThe document count only includes live documents, not deleted documents which have not yet been removed by the merge process.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the count API.", - "operationId": "cat-count-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.count-index" - }, - { - "$ref": "#/components/parameters/cat.count-h" - }, - { - "$ref": "#/components/parameters/cat.count-s" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.count-200" - } - }, - "x-api-name" : "count", - "x-namespace": "cat" - } - }, - "/_cat/fielddata": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get field data cache information", - "description": "Get the amount of heap memory currently used by the field data cache on every data node in the cluster.\n\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the nodes stats API.", - "operationId": "cat-fielddata", - "parameters": [ - { - "$ref": "#/components/parameters/cat.fielddata-bytes" - }, - { - "$ref": "#/components/parameters/cat.fielddata-fields_" - }, - { - "$ref": "#/components/parameters/cat.fielddata-h" - }, - { - "$ref": "#/components/parameters/cat.fielddata-s" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.fielddata-200" - } - }, - "x-api-name" : "fielddata", - "x-namespace": "cat" - } - }, - "/_cat/fielddata/{fields}": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get field data cache information", - "description": "Get the amount of heap memory currently used by the field data cache on every data node in the cluster.\n\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the nodes stats API.", - "operationId": "cat-fielddata-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.fielddata-fields" + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.fielddata-bytes" + "in": "query", + "name": "_source", + "description": "Indicates whether to return the `_source` field (`true` or `false`) or contains a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.fielddata-fields_" + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.fielddata-h" + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - { - "$ref": "#/components/parameters/cat.fielddata-s" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.fielddata-200" - } - }, - "x-api-name" : "fielddata", - "x-namespace": "cat" - } - }, - "/_cat/health": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get the cluster health status", - "description": "IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the cluster health API.\nThis API is often used to check malfunctioning clusters.\nTo help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats:\n`HH:MM:SS`, which is human-readable but includes no date information;\n`Unix epoch time`, which is machine-sortable and includes date information.\nThe latter format is useful for cluster recoveries that take multiple days.\nYou can use the cat health API to verify cluster health across multiple nodes.\nYou also can use the API to track the recovery of a large cluster over a longer period of time.", - "operationId": "cat-health", - "parameters": [ { "in": "query", - "name": "time", - "description": "The unit used to display time values.", + "name": "timeout", + "description": "The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.\nThe default is `1m` (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "ts", - "description": "If true, returns `HH:MM:SS` and Unix epoch timestamps.", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default is `1`, which waits for each primary shard to be active.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.WaitForActiveShards" }, "style": "form" }, { "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "name": "require_alias", + "description": "If `true`, the request's actions must target an index alias.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "type": "boolean" }, "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.health.HealthRecord" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.bulk.OperationContainer" + }, + { + "$ref": "#/components/schemas/_global.bulk.UpdateAction" + }, + { + "type": "object" + } + ] + } + }, + "examples": { + "BulkRequestExample1": { + "summary": "Multiple operations", + "description": "Run `POST _bulk` to perform multiple operations.", + "value": "{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" }, - "examples": { - "CatHealthResponseExample1": { - "description": "A successful response from `GET /_cat/health?v=true&format=json`. By default, it returns `HH:MM:SS` and Unix epoch timestamps.\n", - "value": "[\n {\n \"epoch\": \"1475871424\",\n \"timestamp\": \"16:17:04\",\n \"cluster\": \"elasticsearch\",\n \"status\": \"green\",\n \"node.total\": \"1\",\n \"node.data\": \"1\",\n \"shards\": \"1\",\n \"pri\": \"1\",\n \"relo\": \"0\",\n \"init\": \"0\",\n \"unassign\": \"0\",\n \"unassign.pri\": \"0\",\n \"pending_tasks\": \"0\",\n \"max_task_wait_time\": \"-\",\n \"active_shards_percent\": \"100.0%\"\n }\n]" - } + "BulkRequestExample2": { + "summary": "Bulk updates", + "description": "When you run `POST _bulk` and use the `update` action, you can use `retry_on_conflict` as a field in the action itself (not in the extra payload line) to specify how many times an update should be retried in the case of a version conflict.\n", + "value": "{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : { \"_id\" : \"0\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"script\" : { \"source\": \"ctx._source.counter += params.param1\", \"lang\" : \"painless\", \"params\" : {\"param1\" : 1}}, \"upsert\" : {\"counter\" : 1}}\n{ \"update\" : {\"_id\" : \"2\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"}, \"doc_as_upsert\" : true }\n{ \"update\" : {\"_id\" : \"3\", \"_index\" : \"index1\", \"_source\" : true} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : {\"_id\" : \"4\", \"_index\" : \"index1\"} }\n{ \"doc\" : {\"field\" : \"value\"}, \"_source\": true}" + }, + "BulkRequestExample3": { + "summary": "Filter for failed operations", + "description": "To return only information about failed operations, run `POST /_bulk?filter_path=items.*.error`.\n", + "value": "{ \"update\": {\"_id\": \"5\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"update\": {\"_id\": \"6\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"create\": {\"_id\": \"7\", \"_index\": \"index1\"} }\n{ \"my_field\": \"foo\" }" + }, + "BulkRequestExample4": { + "summary": "Dynamic templates", + "description": "Run `POST /_bulk` to perform a bulk request that consists of index and create actions with the `dynamic_templates` parameter. The bulk request creates two new fields `work_location` and `home_location` with type `geo_point` according to the `dynamic_templates` parameter. However, the `raw_location` field is created using default dynamic mapping rules, as a text field in that case since it is supplied as a string in the JSON document.\n", + "value": "{ \"index\" : { \"_index\" : \"my_index\", \"_id\" : \"1\", \"dynamic_templates\": {\"work_location\": \"geo_point\"}} }\n{ \"field\" : \"value1\", \"work_location\": \"41.12,-71.34\", \"raw_location\": \"41.12,-71.34\"}\n{ \"create\" : { \"_index\" : \"my_index\", \"_id\" : \"2\", \"dynamic_templates\": {\"home_location\": \"geo_point\"}} }\n{ \"field\" : \"value2\", \"home_location\": \"41.12,-71.34\"}" } } } - } + }, + "required": true }, - "x-api-name" : "health", - "x-namespace": "cat" - } - }, - "/_cat": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get CAT help", - "description": "Get help for the CAT APIs.", - "operationId": "cat-help", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "errors": { + "description": "If `true`, one or more of the operations in the bulk request did not complete successfully.", + "type": "boolean" + }, + "items": { + "description": "The result of each operation in the bulk request, in the order they were submitted.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.bulk.ResponseItem" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "took": { + "description": "The length of time, in milliseconds, it took to process the bulk request.", + "type": "number" + }, + "ingest_took": { + "type": "number" + } + }, + "required": [ + "errors", + "items", + "took" + ] + }, + "examples": { + "BulkResponseExample1": { + "summary": "Multiple successful operations", + "value": "{\n \"took\": 30,\n \"errors\": false,\n \"items\": [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 0,\n \"_primary_term\": 1\n }\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"result\": \"not_found\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 404,\n \"_seq_no\" : 1,\n \"_primary_term\" : 2\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 2,\n \"_primary_term\" : 3\n }\n },\n {\n \"update\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"result\": \"updated\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 200,\n \"_seq_no\" : 3,\n \"_primary_term\" : 4\n }\n }\n ]\n}" + }, + "BulkResponseExample2": { + "summary": "Failed actions", + "description": "If you run `POST /_bulk` with operations that update non-existent documents, the operations cannot complete successfully. The API returns a response with an `errors` property value `true`. The response also includes an error object for any failed operations. The error object contains additional information about the failure, such as the error type and reason.\n", + "value": "{\n \"took\": 486,\n \"errors\": true,\n \"items\": [\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"5\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"6\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"create\": {\n \"_index\": \"index1\",\n \"_id\": \"7\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"status\": 201\n }\n }\n ]\n}" + }, + "BulkResponseExample3": { + "summary": "Filter for failed operations", + "description": "An example response from `POST /_bulk?filter_path=items.*.error`, which returns only information about failed operations.\n", + "value": "{\n \"items\": [\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n }\n ]\n}" + } } } } } }, - "x-api-name" : "help", - "x-namespace": "cat" - } - }, - "/_cat/indices": { - "get": { - "tags": [ - "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_bulk\n
\n ", + "
\n PUT\n /_bulk\n
\n " ], - "summary": "Get index information", - "description": "Get high-level information about indices in a cluster, including backing indices for data streams.\n\nUse this request to get the following information for each index in a cluster:\n- shard count\n- document count\n- deleted document count\n- primary store size\n- total store size of all shards, including shard replicas\n\nThese metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents.\nTo get an accurate count of Elasticsearch documents, use the cat count or count APIs.\n\nCAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use an index endpoint.", - "operationId": "cat-indices", - "parameters": [ - { - "$ref": "#/components/parameters/cat.indices-bytes" - }, - { - "$ref": "#/components/parameters/cat.indices-expand_wildcards" - }, - { - "$ref": "#/components/parameters/cat.indices-health" - }, - { - "$ref": "#/components/parameters/cat.indices-include_unloaded_segments" - }, - { - "$ref": "#/components/parameters/cat.indices-pri" - }, - { - "$ref": "#/components/parameters/cat.indices-time" - }, - { - "$ref": "#/components/parameters/cat.indices-master_timeout" - }, - { - "$ref": "#/components/parameters/cat.indices-h" - }, + "x-api": "bulk", + "x-category": "document management", + "x-metaTags": [ { - "$ref": "#/components/parameters/cat.indices-s" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.indices-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "indices", - "x-namespace": "cat" + ] } }, - "/_cat/indices/{index}": { - "get": { + "/{index}/_bulk": { + "put": { "tags": [ - "cat" + "document" ], - "summary": "Get index information", - "description": "Get high-level information about indices in a cluster, including backing indices for data streams.\n\nUse this request to get the following information for each index in a cluster:\n- shard count\n- document count\n- deleted document count\n- primary store size\n- total store size of all shards, including shard replicas\n\nThese metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents.\nTo get an accurate count of Elasticsearch documents, use the cat count or count APIs.\n\nCAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use an index endpoint.", - "operationId": "cat-indices-1", + "summary": "Bulk index or delete documents", + "description": "Perform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* Java: Check out `co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n* Ruby: Check out `Elasticsearch::Helpers::BulkHelper`\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.\n\nYou might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.\nRefer to the linked documentation for step-by-step instructions using the index settings API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-bulk.html" + }, + "operationId": "bulk-3", "parameters": [ { - "$ref": "#/components/parameters/cat.indices-index" + "in": "path", + "name": "index", + "description": "The name of the data stream, index, or index alias to perform bulk actions on.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/cat.indices-bytes" + "in": "query", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.indices-expand_wildcards" + "in": "query", + "name": "list_executed_pipelines", + "description": "If `true`, the response will include the ingest pipelines that were run for each index or create.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.indices-health" + "in": "query", + "name": "pipeline", + "description": "The pipeline identifier to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.indices-include_unloaded_segments" + "in": "query", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, wait for a refresh to make this operation visible to search.\nIf `false`, do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.indices-pri" + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.indices-time" + "in": "query", + "name": "_source", + "description": "Indicates whether to return the `_source` field (`true` or `false`) or contains a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.indices-master_timeout" + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.indices-h" + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - { - "$ref": "#/components/parameters/cat.indices-s" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.indices-200" - } - }, - "x-api-name" : "indices", - "x-namespace": "cat" - } - }, - "/_cat/master": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get master node information", - "description": "Get information about the master node, including the ID, bound IP address, and name.\n\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", - "operationId": "cat-master", - "parameters": [ { "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "name": "timeout", + "description": "The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.\nThe default is `1m` (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default is `1`, which waits for each primary shard to be active.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.WaitForActiveShards" }, "style": "form" }, { "in": "query", - "name": "local", - "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "name": "require_alias", + "description": "If `true`, the request's actions must target an index alias.", "deprecated": false, "schema": { "type": "boolean" @@ -1545,354 +2314,410 @@ }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.bulk.OperationContainer" + }, + { + "$ref": "#/components/schemas/_global.bulk.UpdateAction" + }, + { + "type": "object" + } + ] + } + }, + "examples": { + "BulkRequestExample1": { + "summary": "Multiple operations", + "description": "Run `POST _bulk` to perform multiple operations.", + "value": "{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" + }, + "BulkRequestExample2": { + "summary": "Bulk updates", + "description": "When you run `POST _bulk` and use the `update` action, you can use `retry_on_conflict` as a field in the action itself (not in the extra payload line) to specify how many times an update should be retried in the case of a version conflict.\n", + "value": "{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : { \"_id\" : \"0\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"script\" : { \"source\": \"ctx._source.counter += params.param1\", \"lang\" : \"painless\", \"params\" : {\"param1\" : 1}}, \"upsert\" : {\"counter\" : 1}}\n{ \"update\" : {\"_id\" : \"2\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"}, \"doc_as_upsert\" : true }\n{ \"update\" : {\"_id\" : \"3\", \"_index\" : \"index1\", \"_source\" : true} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : {\"_id\" : \"4\", \"_index\" : \"index1\"} }\n{ \"doc\" : {\"field\" : \"value\"}, \"_source\": true}" + }, + "BulkRequestExample3": { + "summary": "Filter for failed operations", + "description": "To return only information about failed operations, run `POST /_bulk?filter_path=items.*.error`.\n", + "value": "{ \"update\": {\"_id\": \"5\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"update\": {\"_id\": \"6\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"create\": {\"_id\": \"7\", \"_index\": \"index1\"} }\n{ \"my_field\": \"foo\" }" + }, + "BulkRequestExample4": { + "summary": "Dynamic templates", + "description": "Run `POST /_bulk` to perform a bulk request that consists of index and create actions with the `dynamic_templates` parameter. The bulk request creates two new fields `work_location` and `home_location` with type `geo_point` according to the `dynamic_templates` parameter. However, the `raw_location` field is created using default dynamic mapping rules, as a text field in that case since it is supplied as a string in the JSON document.\n", + "value": "{ \"index\" : { \"_index\" : \"my_index\", \"_id\" : \"1\", \"dynamic_templates\": {\"work_location\": \"geo_point\"}} }\n{ \"field\" : \"value1\", \"work_location\": \"41.12,-71.34\", \"raw_location\": \"41.12,-71.34\"}\n{ \"create\" : { \"_index\" : \"my_index\", \"_id\" : \"2\", \"dynamic_templates\": {\"home_location\": \"geo_point\"}} }\n{ \"field\" : \"value2\", \"home_location\": \"41.12,-71.34\"}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.master.MasterRecord" - } + "type": "object", + "properties": { + "errors": { + "description": "If `true`, one or more of the operations in the bulk request did not complete successfully.", + "type": "boolean" + }, + "items": { + "description": "The result of each operation in the bulk request, in the order they were submitted.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.bulk.ResponseItem" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "took": { + "description": "The length of time, in milliseconds, it took to process the bulk request.", + "type": "number" + }, + "ingest_took": { + "type": "number" + } + }, + "required": [ + "errors", + "items", + "took" + ] }, "examples": { - "CatMasterResponseExample1": { - "description": "A successful response from `GET /_cat/master?v=true&format=json`.\n", - "value": "[\n {\n \"id\": \"YzWoH_2BT-6UjVGDyPdqYg\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"YzWoH_2\"\n }\n]" + "BulkResponseExample1": { + "summary": "Multiple successful operations", + "value": "{\n \"took\": 30,\n \"errors\": false,\n \"items\": [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 0,\n \"_primary_term\": 1\n }\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"result\": \"not_found\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 404,\n \"_seq_no\" : 1,\n \"_primary_term\" : 2\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 2,\n \"_primary_term\" : 3\n }\n },\n {\n \"update\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"result\": \"updated\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 200,\n \"_seq_no\" : 3,\n \"_primary_term\" : 4\n }\n }\n ]\n}" + }, + "BulkResponseExample2": { + "summary": "Failed actions", + "description": "If you run `POST /_bulk` with operations that update non-existent documents, the operations cannot complete successfully. The API returns a response with an `errors` property value `true`. The response also includes an error object for any failed operations. The error object contains additional information about the failure, such as the error type and reason.\n", + "value": "{\n \"took\": 486,\n \"errors\": true,\n \"items\": [\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"5\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"6\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"create\": {\n \"_index\": \"index1\",\n \"_id\": \"7\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"status\": 201\n }\n }\n ]\n}" + }, + "BulkResponseExample3": { + "summary": "Filter for failed operations", + "description": "An example response from `POST /_bulk?filter_path=items.*.error`, which returns only information about failed operations.\n", + "value": "{\n \"items\": [\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n }\n ]\n}" } } } } } }, - "x-api-name" : "master", - "x-namespace": "cat" - } - }, - "/_cat/ml/data_frame/analytics": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_bulk\n
\n ", + "
\n PUT\n /{index}/_bulk\n
\n " + ], + "x-api": "bulk", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "cat" + "document" ], - "summary": "Get data frame analytics jobs", - "description": "Get configuration and usage information about data frame analytics jobs.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get data frame analytics jobs statistics API.", - "operationId": "cat-ml-data-frame-analytics", + "summary": "Bulk index or delete documents", + "description": "Perform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* Java: Check out `co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n* Ruby: Check out `Elasticsearch::Helpers::BulkHelper`\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.\n\nYou might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.\nRefer to the linked documentation for step-by-step instructions using the index settings API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-bulk.html" + }, + "operationId": "bulk-2", "parameters": [ { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-allow_no_match" + "in": "path", + "name": "index", + "description": "The name of the data stream, index, or index alias to perform bulk actions on.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-bytes" + "in": "query", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-h" + "in": "query", + "name": "list_executed_pipelines", + "description": "If `true`, the response will include the ingest pipelines that were run for each index or create.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-s" + "in": "query", + "name": "pipeline", + "description": "The pipeline identifier to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-time" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.ml_data_frame_analytics-200" - } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "ml_data_frame_analytics", - "x-namespace": "cat" - } - }, - "/_cat/ml/data_frame/analytics/{id}": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get data frame analytics jobs", - "description": "Get configuration and usage information about data frame analytics jobs.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get data frame analytics jobs statistics API.", - "operationId": "cat-ml-data-frame-analytics-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-id" + "in": "query", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, wait for a refresh to make this operation visible to search.\nIf `false`, do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-allow_no_match" + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-bytes" + "in": "query", + "name": "_source", + "description": "Indicates whether to return the `_source` field (`true` or `false`) or contains a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-h" - }, - { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-s" - }, - { - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-time" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.ml_data_frame_analytics-200" - } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "ml_data_frame_analytics", - "x-namespace": "cat" - } - }, - "/_cat/ml/datafeeds": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get datafeeds", - "description": "Get configuration and usage information about datafeeds.\nThis API returns a maximum of 10,000 datafeeds.\nIf the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`\ncluster privileges to use this API.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get datafeed statistics API.", - "operationId": "cat-ml-datafeeds", - "parameters": [ - { - "$ref": "#/components/parameters/cat.ml_datafeeds-allow_no_match" - }, - { - "$ref": "#/components/parameters/cat.ml_datafeeds-h" - }, - { - "$ref": "#/components/parameters/cat.ml_datafeeds-s" - }, - { - "$ref": "#/components/parameters/cat.ml_datafeeds-time" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.ml_datafeeds-200" - } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "ml_datafeeds", - "x-namespace": "cat" - } - }, - "/_cat/ml/datafeeds/{datafeed_id}": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get datafeeds", - "description": "Get configuration and usage information about datafeeds.\nThis API returns a maximum of 10,000 datafeeds.\nIf the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`\ncluster privileges to use this API.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get datafeed statistics API.", - "operationId": "cat-ml-datafeeds-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.ml_datafeeds-datafeed_id" - }, - { - "$ref": "#/components/parameters/cat.ml_datafeeds-allow_no_match" - }, - { - "$ref": "#/components/parameters/cat.ml_datafeeds-h" - }, - { - "$ref": "#/components/parameters/cat.ml_datafeeds-s" + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_datafeeds-time" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.ml_datafeeds-200" - } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "ml_datafeeds", - "x-namespace": "cat" - } - }, - "/_cat/ml/anomaly_detectors": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get anomaly detection jobs", - "description": "Get configuration and usage information for anomaly detection jobs.\nThis API returns a maximum of 10,000 jobs.\nIf the Elasticsearch security features are enabled, you must have `monitor_ml`,\n`monitor`, `manage_ml`, or `manage` cluster privileges to use this API.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get anomaly detection job statistics API.", - "operationId": "cat-ml-jobs", - "parameters": [ - { - "$ref": "#/components/parameters/cat.ml_jobs-allow_no_match" + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_jobs-bytes" + "in": "query", + "name": "timeout", + "description": "The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.\nThe default is `1m` (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_jobs-h" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default is `1`, which waits for each primary shard to be active.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_jobs-s" + "in": "query", + "name": "require_alias", + "description": "If `true`, the request's actions must target an index alias.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.ml_jobs-time" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.ml_jobs-200" + "in": "query", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "ml_jobs", - "x-namespace": "cat" - } - }, - "/_cat/ml/anomaly_detectors/{job_id}": { - "get": { - "tags": [ - "cat" ], - "summary": "Get anomaly detection jobs", - "description": "Get configuration and usage information for anomaly detection jobs.\nThis API returns a maximum of 10,000 jobs.\nIf the Elasticsearch security features are enabled, you must have `monitor_ml`,\n`monitor`, `manage_ml`, or `manage` cluster privileges to use this API.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get anomaly detection job statistics API.", - "operationId": "cat-ml-jobs-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.ml_jobs-job_id" - }, - { - "$ref": "#/components/parameters/cat.ml_jobs-allow_no_match" - }, - { - "$ref": "#/components/parameters/cat.ml_jobs-bytes" - }, - { - "$ref": "#/components/parameters/cat.ml_jobs-h" - }, - { - "$ref": "#/components/parameters/cat.ml_jobs-s" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.bulk.OperationContainer" + }, + { + "$ref": "#/components/schemas/_global.bulk.UpdateAction" + }, + { + "type": "object" + } + ] + } + }, + "examples": { + "BulkRequestExample1": { + "summary": "Multiple operations", + "description": "Run `POST _bulk` to perform multiple operations.", + "value": "{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" + }, + "BulkRequestExample2": { + "summary": "Bulk updates", + "description": "When you run `POST _bulk` and use the `update` action, you can use `retry_on_conflict` as a field in the action itself (not in the extra payload line) to specify how many times an update should be retried in the case of a version conflict.\n", + "value": "{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : { \"_id\" : \"0\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"script\" : { \"source\": \"ctx._source.counter += params.param1\", \"lang\" : \"painless\", \"params\" : {\"param1\" : 1}}, \"upsert\" : {\"counter\" : 1}}\n{ \"update\" : {\"_id\" : \"2\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"}, \"doc_as_upsert\" : true }\n{ \"update\" : {\"_id\" : \"3\", \"_index\" : \"index1\", \"_source\" : true} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : {\"_id\" : \"4\", \"_index\" : \"index1\"} }\n{ \"doc\" : {\"field\" : \"value\"}, \"_source\": true}" + }, + "BulkRequestExample3": { + "summary": "Filter for failed operations", + "description": "To return only information about failed operations, run `POST /_bulk?filter_path=items.*.error`.\n", + "value": "{ \"update\": {\"_id\": \"5\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"update\": {\"_id\": \"6\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"create\": {\"_id\": \"7\", \"_index\": \"index1\"} }\n{ \"my_field\": \"foo\" }" + }, + "BulkRequestExample4": { + "summary": "Dynamic templates", + "description": "Run `POST /_bulk` to perform a bulk request that consists of index and create actions with the `dynamic_templates` parameter. The bulk request creates two new fields `work_location` and `home_location` with type `geo_point` according to the `dynamic_templates` parameter. However, the `raw_location` field is created using default dynamic mapping rules, as a text field in that case since it is supplied as a string in the JSON document.\n", + "value": "{ \"index\" : { \"_index\" : \"my_index\", \"_id\" : \"1\", \"dynamic_templates\": {\"work_location\": \"geo_point\"}} }\n{ \"field\" : \"value1\", \"work_location\": \"41.12,-71.34\", \"raw_location\": \"41.12,-71.34\"}\n{ \"create\" : { \"_index\" : \"my_index\", \"_id\" : \"2\", \"dynamic_templates\": {\"home_location\": \"geo_point\"}} }\n{ \"field\" : \"value2\", \"home_location\": \"41.12,-71.34\"}" + } + } + } }, - { - "$ref": "#/components/parameters/cat.ml_jobs-time" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.ml_jobs-200" - } + "required": true }, - "x-state": "Added in 7.7.0", - "x-api-name" : "ml_jobs", - "x-namespace": "cat" - } - }, - "/_cat/ml/trained_models": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get trained models", - "description": "Get configuration and usage information about inference trained models.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get trained models statistics API.", - "operationId": "cat-ml-trained-models", - "parameters": [ - { - "$ref": "#/components/parameters/cat.ml_trained_models-allow_no_match" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-bytes" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-h" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-s" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-from" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-size" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-time" - } - ], "responses": { "200": { - "$ref": "#/components/responses/cat.ml_trained_models-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "description": "If `true`, one or more of the operations in the bulk request did not complete successfully.", + "type": "boolean" + }, + "items": { + "description": "The result of each operation in the bulk request, in the order they were submitted.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.bulk.ResponseItem" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "took": { + "description": "The length of time, in milliseconds, it took to process the bulk request.", + "type": "number" + }, + "ingest_took": { + "type": "number" + } + }, + "required": [ + "errors", + "items", + "took" + ] + }, + "examples": { + "BulkResponseExample1": { + "summary": "Multiple successful operations", + "value": "{\n \"took\": 30,\n \"errors\": false,\n \"items\": [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 0,\n \"_primary_term\": 1\n }\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"result\": \"not_found\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 404,\n \"_seq_no\" : 1,\n \"_primary_term\" : 2\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 2,\n \"_primary_term\" : 3\n }\n },\n {\n \"update\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"result\": \"updated\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 200,\n \"_seq_no\" : 3,\n \"_primary_term\" : 4\n }\n }\n ]\n}" + }, + "BulkResponseExample2": { + "summary": "Failed actions", + "description": "If you run `POST /_bulk` with operations that update non-existent documents, the operations cannot complete successfully. The API returns a response with an `errors` property value `true`. The response also includes an error object for any failed operations. The error object contains additional information about the failure, such as the error type and reason.\n", + "value": "{\n \"took\": 486,\n \"errors\": true,\n \"items\": [\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"5\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"6\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"create\": {\n \"_index\": \"index1\",\n \"_id\": \"7\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"status\": 201\n }\n }\n ]\n}" + }, + "BulkResponseExample3": { + "summary": "Filter for failed operations", + "description": "An example response from `POST /_bulk?filter_path=items.*.error`, which returns only information about failed operations.\n", + "value": "{\n \"items\": [\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 7.7.0", - "x-api-name" : "ml_trained_models", - "x-namespace": "cat" - } - }, - "/_cat/ml/trained_models/{model_id}": { - "get": { - "tags": [ - "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_bulk\n
\n ", + "
\n PUT\n /{index}/_bulk\n
\n " ], - "summary": "Get trained models", - "description": "Get configuration and usage information about inference trained models.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get trained models statistics API.", - "operationId": "cat-ml-trained-models-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.ml_trained_models-model_id" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-allow_no_match" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-bytes" - }, + "x-api": "bulk", + "x-category": "document management", + "x-metaTags": [ { - "$ref": "#/components/parameters/cat.ml_trained_models-h" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-s" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-from" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-size" - }, - { - "$ref": "#/components/parameters/cat.ml_trained_models-time" + "content": "Elasticsearch", + "name": "product_name" } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.ml_trained_models-200" - } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "ml_trained_models", - "x-namespace": "cat" + ] } }, - "/_cat/nodeattrs": { + "/_cat/aliases": { "get": { "tags": [ "cat" ], - "summary": "Get node attribute information", - "description": "Get information about custom node attributes.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", - "operationId": "cat-nodeattrs", + "summary": "Get aliases", + "description": "Get the cluster's index aliases, including filter and routing information.\nThis API does not return data stream aliases.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.", + "operationId": "cat-aliases", "parameters": [ { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatAliasesColumns" }, "style": "form" }, @@ -1908,18 +2733,18 @@ }, { "in": "query", - "name": "local", - "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicated that the request should never timeout, you can set it to `-1`.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -1935,89 +2760,70 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/cat.nodeattrs.NodeAttributesRecord" + "$ref": "#/components/schemas/cat.aliases.AliasesRecord" } }, "examples": { - "CatNodeAttributesResponseExample1": { - "summary": "Default columns", - "description": "A successful response from `GET /_cat/nodeattrs?v=true&format=json`. The `node`, `host`, and `ip` columns provide basic information about each node. The `attr` and `value` columns return custom node attributes, one per line.\n", - "value": "[\n {\n \"node\": \"node-0\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"attr\": \"testattr\",\n \"value\": \"test\"\n }\n]" - }, - "CatNodeAttributesResponseExample2": { - "summary": "Explicit columns", - "description": "A successful response from `GET /_cat/nodeattrs?v=true&h=name,pid,attr,value`. It returns the `name`, `pid`, `attr`, and `value` columns.\n", - "value": "[\n {\n \"name\": \"node-0\",\n \"pid\": \"19566\",\n \"attr\": \"testattr\",\n \"value\": \"test\"\n }\n]" + "CatAliasesResponseExample1": { + "description": "A successful response from `GET _cat/aliases?format=json&v=true`. This response shows that `alias2` has configured a filter and `alias3` and `alias4` have routing configurations.\n", + "value": "[\n {\n \"alias\": \"alias1\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"-\",\n \"routing.search\": \"-\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias1\",\n \"index\": \"test1\",\n \"filter\": \"*\",\n \"routing.index\": \"-\",\n \"routing.search\": \"-\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias3\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"1\",\n \"routing.search\": \"1\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias4\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"2\",\n \"routing.search\": \"1,2\",\n \"is_write_index\": \"true\"\n }\n]" } } } } } }, - "x-api-name" : "nodeattrs", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/aliases\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "aliases.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/nodes": { + "/_cat/aliases/{name}": { "get": { "tags": [ "cat" ], - "summary": "Get node information", - "description": "Get information about the nodes in a cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", - "operationId": "cat-nodes", + "summary": "Get aliases", + "description": "Get the cluster's index aliases, including filter and routing information.\nThis API does not return data stream aliases.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.", + "operationId": "cat-aliases-1", "parameters": [ { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - { - "in": "query", - "name": "full_id", - "description": "If `true`, return the full node ID. If `false`, return the shortened node ID.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - }, - "style": "form" - }, - { - "in": "query", - "name": "include_unloaded_segments", - "description": "If true, the response includes information from segments that are not loaded into memory.", + "in": "path", + "name": "name", + "description": "A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.", + "required": true, "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Names" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.\n\nSupported values include:\n - `build` (or `b`): The Elasticsearch build hash. For example: `5c03844`.\n - `completion.size` (or `cs`, `completionSize`): The size of completion. For example: `0b`.\n - `cpu`: The percentage of recent system CPU used.\n - `disk.avail` (or `d`, `disk`, `diskAvail`): The available disk space. For example: `198.4gb`.\n - `disk.total` (or `dt`, `diskTotal`): The total disk space. For example: `458.3gb`.\n - `disk.used` (or `du`, `diskUsed`): The used disk space. For example: `259.8gb`.\n - `disk.used_percent` (or `dup`, `diskUsedPercent`): The percentage of disk space used.\n - `fielddata.evictions` (or `fe`, `fielddataEvictions`): The number of fielddata cache evictions.\n - `fielddata.memory_size` (or `fm`, `fielddataMemory`): The fielddata cache memory used. For example: `0b`.\n - `file_desc.current` (or `fdc`, `fileDescriptorCurrent`): The number of file descriptors used.\n - `file_desc.max` (or `fdm`, `fileDescriptorMax`): The maximum number of file descriptors.\n - `file_desc.percent` (or `fdp`, `fileDescriptorPercent`): The percentage of file descriptors used.\n - `flush.total` (or `ft`, `flushTotal`): The number of flushes.\n - `flush.total_time` (or `ftt`, `flushTotalTime`): The amount of time spent in flush.\n - `get.current` (or `gc`, `getCurrent`): The number of current get operations.\n - `get.exists_time` (or `geti`, `getExistsTime`): The time spent in successful get operations. For example: `14ms`.\n - `get.exists_total` (or `geto`, `getExistsTotal`): The number of successful get operations.\n - `get.missing_time` (or `gmti`, `getMissingTime`): The time spent in failed get operations. For example: `0s`.\n - `get.missing_total` (or `gmto`, `getMissingTotal`): The number of failed get operations.\n - `get.time` (or `gti`, `getTime`): The amount of time spent in get operations. For example: `14ms`.\n - `get.total` (or `gto`, `getTotal`): The number of get operations.\n - `heap.current` (or `hc`, `heapCurrent`): The used heap size. For example: `311.2mb`.\n - `heap.max` (or `hm`, `heapMax`): The total heap size. For example: `4gb`.\n - `heap.percent` (or `hp`, `heapPercent`): The used percentage of total allocated Elasticsearch JVM heap.\nThis value reflects only the Elasticsearch process running within the operating system and is the most direct indicator of its JVM, heap, or memory resource performance.\n - `http_address` (or `http`): The bound HTTP address.\n - `id` (or `nodeId`): The identifier for the node.\n - `indexing.delete_current` (or `idc`, `indexingDeleteCurrent`): The number of current deletion operations.\n - `indexing.delete_time` (or `idti`, `indexingDeleteTime`): The time spent in deletion operations. For example: `2ms`.\n - `indexing.delete_total` (or `idto`, `indexingDeleteTotal`): The number of deletion operations.\n - `indexing.index_current` (or `iic`, `indexingIndexCurrent`): The number of current indexing operations.\n - `indexing.index_failed` (or `iif`, `indexingIndexFailed`): The number of failed indexing operations.\n - `indexing.index_failed_due_to_version_conflict` (or `iifvc`, `indexingIndexFailedDueToVersionConflict`): The number of indexing operations that failed due to version conflict.\n - `indexing.index_time` (or `iiti`, `indexingIndexTime`): The time spent in indexing operations. For example: `134ms`.\n - `indexing.index_total` (or `iito`, `indexingIndexTotal`): The number of indexing operations.\n - `ip` (or `i`): The IP address.\n - `jdk` (or `j`): The Java version. For example: `1.8.0`.\n - `load_1m` (or `l`): The most recent load average. For example: `0.22`.\n - `load_5m` (or `l`): The load average for the last five minutes. For example: `0.78`.\n - `load_15m` (or `l`): The load average for the last fifteen minutes. For example: `1.24`.\n - `mappings.total_count` (or `mtc`, `mappingsTotalCount`): The number of mappings, including runtime and object fields.\n - `mappings.total_estimated_overhead_in_bytes` (or `mteo`, `mappingsTotalEstimatedOverheadInBytes`): The estimated heap overhead, in bytes, of mappings on this node, which allows for 1KiB of heap for every mapped field.\n - `master` (or `m`): Indicates whether the node is the elected master node.\nReturned values include `*` (elected master) and `-` (not elected master).\n - `merges.current` (or `mc`, `mergesCurrent`): The number of current merge operations.\n - `merges.current_docs` (or `mcd`, `mergesCurrentDocs`): The number of current merging documents.\n - `merges.current_size` (or `mcs`, `mergesCurrentSize`): The size of current merges. For example: `0b`.\n - `merges.total` (or `mt`, `mergesTotal`): The number of completed merge operations.\n - `merges.total_docs` (or `mtd`, `mergesTotalDocs`): The number of merged documents.\n - `merges.total_size` (or `mts`, `mergesTotalSize`): The total size of merges. For example: `0b`.\n - `merges.total_time` (or `mtt`, `mergesTotalTime`): The time spent merging documents. For example: `0s`.\n - `name` (or `n`): The node name.\n - `node.role` (or `r`, `role`, `nodeRole`): The roles of the node.\nReturned values include `c` (cold node), `d` (data node), `f` (frozen node), `h` (hot node), `i` (ingest node), `l` (machine learning node), `m` (master-eligible node), `r` (remote cluster client node), `s` (content node), `t` (transform node), `v` (voting-only node), `w` (warm node), and `-` (coordinating node only).\nFor example, `dim` indicates a master-eligible data and ingest node.\n - `pid` (or `p`): The process identifier.\n - `port` (or `po`): The bound transport port number.\n - `query_cache.memory_size` (or `qcm`, `queryCacheMemory`): The used query cache memory. For example: `0b`.\n - `query_cache.evictions` (or `qce`, `queryCacheEvictions`): The number of query cache evictions.\n - `query_cache.hit_count` (or `qchc`, `queryCacheHitCount`): The query cache hit count.\n - `query_cache.miss_count` (or `qcmc`, `queryCacheMissCount`): The query cache miss count.\n - `ram.current` (or `rc`, `ramCurrent`): The used total memory. For example: `513.4mb`.\n - `ram.max` (or `rm`, `ramMax`): The total memory. For example: `2.9gb`.\n - `ram.percent` (or `rp`, `ramPercent`): The used percentage of the total operating system memory.\nThis reflects all processes running on the operating system instead of only Elasticsearch and is not guaranteed to correlate to its performance.\n - `refresh.total` (or `rto`, `refreshTotal`): The number of refresh operations.\n - `refresh.time` (or `rti`, `refreshTime`): The time spent in refresh operations. For example: `91ms`.\n - `request_cache.memory_size` (or `rcm`, `requestCacheMemory`): The used request cache memory. For example: `0b`.\n - `request_cache.evictions` (or `rce`, `requestCacheEvictions`): The number of request cache evictions.\n - `request_cache.hit_count` (or `rchc`, `requestCacheHitCount`): The request cache hit count.\n - `request_cache.miss_count` (or `rcmc`, `requestCacheMissCount`): The request cache miss count.\n - `script.compilations` (or `scrcc`, `scriptCompilations`): The number of total script compilations.\n - `script.cache_evictions` (or `scrce`, `scriptCacheEvictions`): The number of total compiled scripts evicted from cache.\n - `search.fetch_current` (or `sfc`, `searchFetchCurrent`): The number of current fetch phase operations.\n - `search.fetch_time` (or `sfti`, `searchFetchTime`): The time spent in fetch phase. For example: `37ms`.\n - `search.fetch_total` (or `sfto`, `searchFetchTotal`): The number of fetch operations.\n - `search.open_contexts` (or `so`, `searchOpenContexts`): The number of open search contexts.\n - `search.query_current` (or `sqc`, `searchQueryCurrent`): The number of current query phase operations.\n - `search.query_time` (or `sqti`, `searchQueryTime`): The time spent in query phase. For example: `43ms`.\n - `search.query_total` (or `sqto`, `searchQueryTotal`): The number of query operations.\n - `search.scroll_current` (or `scc`, `searchScrollCurrent`): The number of open scroll contexts.\n - `search.scroll_time` (or `scti`, `searchScrollTime`): The amount of time scroll contexts were held open. For example: `2m`.\n - `search.scroll_total` (or `scto`, `searchScrollTotal`): The number of completed scroll contexts.\n - `segments.count` (or `sc`, `segmentsCount`): The number of segments.\n - `segments.fixed_bitset_memory` (or `sfbm`, `fixedBitsetMemory`): The memory used by fixed bit sets for nested object field types and type filters for types referred in join fields.\nFor example: `1.0kb`.\n - `segments.index_writer_memory` (or `siwm`, `segmentsIndexWriterMemory`): The memory used by the index writer. For example: `18mb`.\n - `segments.memory` (or `sm`, `segmentsMemory`): The memory used by segments. For example: `1.4kb`.\n - `segments.version_map_memory` (or `svmm`, `segmentsVersionMapMemory`): The memory used by the version map. For example: `1.0kb`.\n - `shard_stats.total_count` (or `sstc`, `shards`, `shardStatsTotalCount`): The number of shards assigned.\n - `suggest.current` (or `suc`, `suggestCurrent`): The number of current suggest operations.\n - `suggest.time` (or `suti`, `suggestTime`): The time spent in suggest operations.\n - `suggest.total` (or `suto`, `suggestTotal`): The number of suggest operations.\n - `uptime` (or `u`): The amount of node uptime. For example: `17.3m`.\n - `version` (or `v`): The Elasticsearch version. For example: `9.0.0`.\n\n", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/cat._types.CatNodeColumns" + "$ref": "#/components/schemas/cat._types.CatAliasesColumns" }, "style": "form" }, { "in": "query", "name": "s", - "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Names" @@ -2026,21 +2832,21 @@ }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "time", - "description": "The unit used to display time values.", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicated that the request should never timeout, you can set it to `-1`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -2053,45 +2859,52 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/cat.nodes.NodesRecord" + "$ref": "#/components/schemas/cat.aliases.AliasesRecord" } }, "examples": { - "CatNodesResponseExample1": { - "summary": "Default columns", - "description": "A successful response from `GET /_cat/nodes?v=true&format=json`. The `ip`, `heap.percent`, `ram.percent`, `cpu`, and `load_*` columns provide the IP addresses and performance information of each node. The `node.role`, `master`, and `name` columns provide information useful for monitoring an entire cluster, particularly large ones.\n", - "value": "[\n {\n \"ip\": \"127.0.0.1\",\n \"heap.percent\": \"65\",\n \"ram.percent\": \"99\",\n \"cpu\": \"42\",\n \"load_1m\": \"3.07\",\n \"load_5m\": null,\n \"load_15m\": null,\n \"node.role\": \"cdfhilmrstw\",\n \"master\": \"*\",\n \"name\": \"mJw06l1\"\n }\n]" - }, - "CatNodesResponseExample2": { - "summary": "Explicit columns", - "description": "A successful response from `GET /_cat/nodes?v=true&h=id,ip,port,v,m&format=json`. It returns the `id`, `ip`, `port`, `v` (version), and `m` (master) columns.\n", - "value": "[\n {\n \"id\": \"veJR\",\n \"ip\": \"127.0.0.1\",\n \"port\": \"59938\",\n \"v\": \"9.0.0\",\n \"m\": \"*\"\n }\n]" + "CatAliasesResponseExample1": { + "description": "A successful response from `GET _cat/aliases?format=json&v=true`. This response shows that `alias2` has configured a filter and `alias3` and `alias4` have routing configurations.\n", + "value": "[\n {\n \"alias\": \"alias1\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"-\",\n \"routing.search\": \"-\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias1\",\n \"index\": \"test1\",\n \"filter\": \"*\",\n \"routing.index\": \"-\",\n \"routing.search\": \"-\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias3\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"1\",\n \"routing.search\": \"1\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias4\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"2\",\n \"routing.search\": \"1,2\",\n \"is_write_index\": \"true\"\n }\n]" } } } } } }, - "x-api-name" : "nodes", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/aliases/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "aliases.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/pending_tasks": { + "/_cat/allocation": { "get": { "tags": [ "cat" ], - "summary": "Get pending task information", - "description": "Get information about cluster-level changes that have not yet taken effect.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API.", - "operationId": "cat-pending-tasks", + "summary": "Get shard allocation information", + "description": "Get a snapshot of the number of shards allocated to each data node and their disk space.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", + "operationId": "cat-allocation", "parameters": [ { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatAllocationColumns" }, "style": "form" }, @@ -2124,16 +2937,6 @@ "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, - { - "in": "query", - "name": "time", - "description": "Unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" } ], "responses": { @@ -2144,59 +2947,73 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/cat.pending_tasks.PendingTasksRecord" + "$ref": "#/components/schemas/cat.allocation.AllocationRecord" } }, "examples": { - "CatPendingTasksResponseExample1": { - "description": "A successful response from `GET /_cat/pending_tasks?v=trueh=insertOrder,timeInQueue,priority,source&format=json`.\n", - "value": "[\n { \"insertOrder\": \"1685\", \"timeInQueue\": \"855ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1686\", \"timeInQueue\": \"843ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1693\", \"timeInQueue\": \"753ms\", \"priority\": \"HIGH\", \"source\": \"refresh-mapping [foo][[t]]\"},\n { \"insertOrder\": \"1688\", \"timeInQueue\": \"816ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1689\", \"timeInQueue\": \"802ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1690\", \"timeInQueue\": \"787ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1691\", \"timeInQueue\": \"773ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"}\n]" + "CatAllocationResponseExample1": { + "description": "A successful response from `GET /_cat/allocation?v=true&format=json`. It shows a single shard is allocated to the one node available.\n", + "value": "[\n {\n \"shards\": \"1\",\n \"shards.undesired\": \"0\",\n \"write_load.forecast\": \"0.0\",\n \"disk.indices.forecast\": \"260b\",\n \"disk.indices\": \"260b\",\n \"disk.used\": \"47.3gb\",\n \"disk.avail\": \"43.4gb\",\n \"disk.total\": \"100.7gb\",\n \"disk.percent\": \"46\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"CSUXak2\",\n \"node.role\": \"himrst\"\n }\n]" } } } } } }, - "x-api-name" : "pending_tasks", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/allocation\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "allocation.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/plugins": { + "/_cat/allocation/{node_id}": { "get": { "tags": [ "cat" ], - "summary": "Get plugin information", - "description": "Get a list of plugins running on each node of a cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", - "operationId": "cat-plugins", + "summary": "Get shard allocation information", + "description": "Get a snapshot of the number of shards allocated to each data node and their disk space.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", + "operationId": "cat-allocation-1", "parameters": [ { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "in": "path", + "name": "node_id", + "description": "A comma-separated list of node identifiers or names used to limit the returned information.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.NodeIds" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatAllocationColumns" }, "style": "form" }, { "in": "query", - "name": "include_bootstrap", - "description": "Include bootstrap plugins in the response", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Names" }, "style": "form" }, @@ -2229,122 +3046,52 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/cat.plugins.PluginsRecord" + "$ref": "#/components/schemas/cat.allocation.AllocationRecord" } }, "examples": { - "CatPluginsResponseExample1": { - "description": "A successful response from `GET /_cat/plugins?v=true&s=component&h=name,component,version,description&format=json`.\n", - "value": "[\n { \"name\": \"U7321H6\", \"component\": \"analysis-icu\", \"version\": \"8.17.0\", \"description\": \"The ICU Analysis plugin integrates the Lucene ICU module into Elasticsearch, adding ICU-related analysis components.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-kuromoji\", \"verison\": \"8.17.0\", description: \"The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch.\"},\n {\"name\" \"U7321H6\", \"component\": \"analysis-nori\", \"version\": \"8.17.0\", \"description\": \"The Korean (nori) Analysis plugin integrates Lucene nori analysis module into elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-phonetic\", \"verison\": \"8.17.0\", \"description\": \"The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-smartcn\", \"verison\": \"8.17.0\", \"description\": \"Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-stempel\", \"verison\": \"8.17.0\", \"description\": \"The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-ukrainian\", \"verison\": \"8.17.0\", \"description\": \"The Ukrainian Analysis plugin integrates the Lucene UkrainianMorfologikAnalyzer into elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"discovery-azure-classic\", \"verison\": \"8.17.0\", \"description\": \"The Azure Classic Discovery plugin allows to use Azure Classic API for the unicast discovery mechanism\"},\n {\"name\": \"U7321H6\", \"component\": \"discovery-ec2\", \"verison\": \"8.17.0\", \"description\": \"The EC2 discovery plugin allows to use AWS API for the unicast discovery mechanism.\"},\n {\"name\": \"U7321H6\", \"component\": \"discovery-gce\", \"verison\": \"8.17.0\", \"description\": \"The Google Compute Engine (GCE) Discovery plugin allows to use GCE API for the unicast discovery mechanism.\"},\n {\"name\": \"U7321H6\", \"component\": \"mapper-annotated-text\", \"verison\": \"8.17.0\", \"description\": \"The Mapper Annotated_text plugin adds support for text fields with markup used to inject annotation tokens into the index.\"},\n {\"name\": \"U7321H6\", \"component\": \"mapper-murmur3\", \"verison\": \"8.17.0\", \"description\": \"The Mapper Murmur3 plugin allows to compute hashes of a field's values at index-time and to store them in the index.\"},\n {\"name\": \"U7321H6\", \"component\": \"mapper-size\", \"verison\": \"8.17.0\", \"description\": \"The Mapper Size plugin allows document to record their uncompressed size at index time.\"},\n {\"name\": \"U7321H6\", \"component\": \"store-smb\", \"verison\": \"8.17.0\", \"description\": \"The Store SMB plugin adds support for SMB stores.\"}\n]" + "CatAllocationResponseExample1": { + "description": "A successful response from `GET /_cat/allocation?v=true&format=json`. It shows a single shard is allocated to the one node available.\n", + "value": "[\n {\n \"shards\": \"1\",\n \"shards.undesired\": \"0\",\n \"write_load.forecast\": \"0.0\",\n \"disk.indices.forecast\": \"260b\",\n \"disk.indices\": \"260b\",\n \"disk.used\": \"47.3gb\",\n \"disk.avail\": \"43.4gb\",\n \"disk.total\": \"100.7gb\",\n \"disk.percent\": \"46\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"CSUXak2\",\n \"node.role\": \"himrst\"\n }\n]" } } } } } }, - "x-api-name" : "plugins", - "x-namespace": "cat" - } - }, - "/_cat/recovery": { - "get": { - "tags": [ - "cat" - ], - "summary": "Get shard recovery information", - "description": "Get information about ongoing and completed shard recoveries.\nShard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing.\nFor data streams, the API returns information about the stream’s backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.", - "operationId": "cat-recovery", - "parameters": [ - { - "$ref": "#/components/parameters/cat.recovery-active_only" - }, - { - "$ref": "#/components/parameters/cat.recovery-bytes" - }, - { - "$ref": "#/components/parameters/cat.recovery-detailed" - }, - { - "$ref": "#/components/parameters/cat.recovery-index_" - }, - { - "$ref": "#/components/parameters/cat.recovery-h" - }, - { - "$ref": "#/components/parameters/cat.recovery-s" - }, - { - "$ref": "#/components/parameters/cat.recovery-time" - } + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/allocation/{node_id}\n
\n " ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.recovery-200" - } - }, - "x-api-name" : "recovery", - "x-namespace": "cat" - } - }, - "/_cat/recovery/{index}": { - "get": { - "tags": [ - "cat" + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "summary": "Get shard recovery information", - "description": "Get information about ongoing and completed shard recoveries.\nShard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing.\nFor data streams, the API returns information about the stream’s backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.", - "operationId": "cat-recovery-1", - "parameters": [ + "x-api": "allocation.cat", + "x-category": "info", + "x-metaTags": [ { - "$ref": "#/components/parameters/cat.recovery-index" - }, - { - "$ref": "#/components/parameters/cat.recovery-active_only" - }, - { - "$ref": "#/components/parameters/cat.recovery-bytes" - }, - { - "$ref": "#/components/parameters/cat.recovery-detailed" - }, - { - "$ref": "#/components/parameters/cat.recovery-index_" - }, - { - "$ref": "#/components/parameters/cat.recovery-h" - }, - { - "$ref": "#/components/parameters/cat.recovery-s" - }, - { - "$ref": "#/components/parameters/cat.recovery-time" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.recovery-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "recovery", - "x-namespace": "cat" + ] } }, - "/_cat/repositories": { + "/_cat/circuit_breaker": { "get": { "tags": [ "cat" ], - "summary": "Get snapshot repository information", - "description": "Get a list of snapshot repositories for a cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.", - "operationId": "cat-repositories", + "summary": "Get circuit breakers statistics", + "description": "IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", + "operationId": "cat-circuit-breaker", "parameters": [ { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatCircuitBreakerColumns" }, "style": "form" }, @@ -2387,301 +3134,712 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/cat.repositories.RepositoriesRecord" + "$ref": "#/components/schemas/cat.circuit_breaker.CircuitBreakerRecord" } }, "examples": { - "CatRepositoriesResponseExample1": { - "description": "A successful response from `GET /_cat/repositories?v=true&format=json`.\n", - "value": "[\n {\n \"id\": \"repo1\",\n \"type\": \"fs\"\n },\n {\n \"id\": \"repo2\",\n \"type\": \"s3\"\n }\n]" + "CatCircuitBreakerResponseExample1": { + "description": "A successful response from `GET /_cat/circuit_breaker?v=true&format=json`. It shows two circuit breakers are active on one node.\n", + "value": "[\n {\n \"breaker\": \"request\",\n \"estimated\": \"0b\",\n \"limit\": \"614.3mb\",\n \"node_id\": \"ozKxpP9oS3SL0Sp-Mfxc6w\",\n \"tripped\": \"0\"\n },\n {\n \"breaker\": \"fielddata\",\n \"estimated\": \"0b\",\n \"limit\": \"409.5mb\",\n \"node_id\": \"ozKxpP9oS3SL0Sp-Mfxc6w\",\n \"tripped\": \"0\"\n }\n]" } } } } } }, - "x-state": "Added in 2.1.0", - "x-api-name" : "repositories", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/circuit_breaker\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "circuit_breaker.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/segments": { + "/_cat/circuit_breaker/{circuit_breaker_patterns}": { "get": { "tags": [ "cat" ], - "summary": "Get segment information", - "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.", - "operationId": "cat-segments", + "summary": "Get circuit breakers statistics", + "description": "IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", + "operationId": "cat-circuit-breaker-1", "parameters": [ { - "$ref": "#/components/parameters/cat.segments-bytes" - }, - { - "$ref": "#/components/parameters/cat.segments-h" + "in": "path", + "name": "circuit_breaker_patterns", + "description": "A comma-separated list of regular-expressions to filter the circuit breakers in the output", + "required": true, + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "simple" }, { - "$ref": "#/components/parameters/cat.segments-s" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatCircuitBreakerColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.segments-local" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.segments-master_timeout" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/cat.segments-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.circuit_breaker.CircuitBreakerRecord" + } + }, + "examples": { + "CatCircuitBreakerResponseExample1": { + "description": "A successful response from `GET /_cat/circuit_breaker?v=true&format=json`. It shows two circuit breakers are active on one node.\n", + "value": "[\n {\n \"breaker\": \"request\",\n \"estimated\": \"0b\",\n \"limit\": \"614.3mb\",\n \"node_id\": \"ozKxpP9oS3SL0Sp-Mfxc6w\",\n \"tripped\": \"0\"\n },\n {\n \"breaker\": \"fielddata\",\n \"estimated\": \"0b\",\n \"limit\": \"409.5mb\",\n \"node_id\": \"ozKxpP9oS3SL0Sp-Mfxc6w\",\n \"tripped\": \"0\"\n }\n]" + } + } + } + } } }, - "x-api-name" : "segments", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/circuit_breaker/{circuit_breaker_patterns}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "circuit_breaker.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/segments/{index}": { + "/_cat/component_templates": { "get": { "tags": [ "cat" ], - "summary": "Get segment information", - "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.", - "operationId": "cat-segments-1", + "summary": "Get component templates", + "description": "Get information about component templates in a cluster.\nComponent templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the get component template API.", + "operationId": "cat-component-templates", "parameters": [ { - "$ref": "#/components/parameters/cat.segments-index" - }, - { - "$ref": "#/components/parameters/cat.segments-bytes" - }, - { - "$ref": "#/components/parameters/cat.segments-h" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatComponentColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.segments-s" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.segments-local" + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.segments-master_timeout" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/cat.segments-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.component_templates.ComponentTemplate" + } + }, + "examples": { + "CatComponentTemplatesResponseExample1": { + "description": "A successful response from `GET _cat/component_templates/my-template-*?v=true&s=name&format=json`.\n", + "value": "[\n {\n \"name\": \"my-template-1\",\n \"version\": \"null\",\n \"alias_count\": \"0\",\n \"mapping_count\": \"0\",\n \"settings_count\": \"1\",\n \"metadata_count\": \"0\",\n \"included_in\": \"[my-index-template]\"\n },\n {\n \"name\": \"my-template-2\",\n \"version\": null,\n \"alias_count\": \"0\",\n \"mapping_count\": \"3\",\n \"settings_count\": \"0\",\n \"metadata_count\": \"0\",\n \"included_in\": \"[my-index-template]\"\n }\n]" + } + } + } + } } }, - "x-api-name" : "segments", - "x-namespace": "cat" + "x-state": "Generally available; Added in 5.1.0", + "x-variations": [ + "
\n GET\n /_cat/component_templates\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "component_templates.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/shards": { + "/_cat/component_templates/{name}": { "get": { "tags": [ "cat" ], - "summary": "Get shard information", - "description": "Get information about the shards in a cluster.\nFor data streams, the API returns information about the backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", - "operationId": "cat-shards", + "summary": "Get component templates", + "description": "Get information about component templates in a cluster.\nComponent templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the get component template API.", + "operationId": "cat-component-templates-1", "parameters": [ { - "$ref": "#/components/parameters/cat.shards-bytes" + "in": "path", + "name": "name", + "description": "The name of the component template.\nIt accepts wildcard expressions.\nIf it is omitted, all component templates are returned.", + "required": true, + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/cat.shards-h" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatComponentColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.shards-s" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.shards-master_timeout" + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.shards-time" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/cat.shards-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.component_templates.ComponentTemplate" + } + }, + "examples": { + "CatComponentTemplatesResponseExample1": { + "description": "A successful response from `GET _cat/component_templates/my-template-*?v=true&s=name&format=json`.\n", + "value": "[\n {\n \"name\": \"my-template-1\",\n \"version\": \"null\",\n \"alias_count\": \"0\",\n \"mapping_count\": \"0\",\n \"settings_count\": \"1\",\n \"metadata_count\": \"0\",\n \"included_in\": \"[my-index-template]\"\n },\n {\n \"name\": \"my-template-2\",\n \"version\": null,\n \"alias_count\": \"0\",\n \"mapping_count\": \"3\",\n \"settings_count\": \"0\",\n \"metadata_count\": \"0\",\n \"included_in\": \"[my-index-template]\"\n }\n]" + } + } + } + } } }, - "x-api-name" : "shards", - "x-namespace": "cat" + "x-state": "Generally available; Added in 5.1.0", + "x-variations": [ + "
\n GET\n /_cat/component_templates/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "component_templates.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/shards/{index}": { + "/_cat/count": { "get": { "tags": [ "cat" ], - "summary": "Get shard information", - "description": "Get information about the shards in a cluster.\nFor data streams, the API returns information about the backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", - "operationId": "cat-shards-1", + "summary": "Get a document count", + "description": "Get quick access to a document count for a data stream, an index, or an entire cluster.\nThe document count only includes live documents, not deleted documents which have not yet been removed by the merge process.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the count API.", + "operationId": "cat-count", "parameters": [ { - "$ref": "#/components/parameters/cat.shards-index" - }, - { - "$ref": "#/components/parameters/cat.shards-bytes" - }, - { - "$ref": "#/components/parameters/cat.shards-h" - }, - { - "$ref": "#/components/parameters/cat.shards-s" - }, - { - "$ref": "#/components/parameters/cat.shards-master_timeout" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatCountColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.shards-time" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/cat.shards-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.count.CountRecord" + } + }, + "examples": { + "CatCountResponseExample1": { + "summary": "Single data stream or index count", + "description": "A successful response from `GET /_cat/count/my-index-000001?v=true&format=json`. It retrieves the document count for the `my-index-000001` data stream or index.\n", + "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"120\"\n }\n]" + }, + "CatCountResponseExample2": { + "summary": "All data streams and indices count", + "description": "A successful response from `GET /_cat/count?v=true&format=json`. It retrieves the document count for all data streams and indices in the cluster.\n", + "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"121\"\n }\n]" + } + } + } + } } }, - "x-api-name" : "shards", - "x-namespace": "cat" - } - }, - "/_cat/snapshots": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/count\n
\n ", + "
\n POST\n /_cat/count\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "count.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ "cat" ], - "summary": "Get snapshot information", - "description": "Get information about the snapshots stored in one or more repositories.\nA snapshot is a backup of an index or running Elasticsearch cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.", - "operationId": "cat-snapshots", + "summary": "Get a document count", + "description": "Get quick access to a document count for a data stream, an index, or an entire cluster.\nThe document count only includes live documents, not deleted documents which have not yet been removed by the merge process.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the count API.", + "operationId": "cat-count-1", "parameters": [ { - "$ref": "#/components/parameters/cat.snapshots-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/cat.snapshots-h" - }, - { - "$ref": "#/components/parameters/cat.snapshots-s" - }, - { - "$ref": "#/components/parameters/cat.snapshots-master_timeout" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatCountColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.snapshots-time" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/cat.snapshots-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.count.CountRecord" + } + }, + "examples": { + "CatCountResponseExample1": { + "summary": "Single data stream or index count", + "description": "A successful response from `GET /_cat/count/my-index-000001?v=true&format=json`. It retrieves the document count for the `my-index-000001` data stream or index.\n", + "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"120\"\n }\n]" + }, + "CatCountResponseExample2": { + "summary": "All data streams and indices count", + "description": "A successful response from `GET /_cat/count?v=true&format=json`. It retrieves the document count for all data streams and indices in the cluster.\n", + "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"121\"\n }\n]" + } + } + } + } } }, - "x-state": "Added in 2.1.0", - "x-api-name" : "snapshots", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/count\n
\n ", + "
\n POST\n /_cat/count\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "count.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/snapshots/{repository}": { + "/_cat/count/{index}": { "get": { "tags": [ "cat" ], - "summary": "Get snapshot information", - "description": "Get information about the snapshots stored in one or more repositories.\nA snapshot is a backup of an index or running Elasticsearch cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.", - "operationId": "cat-snapshots-1", + "summary": "Get a document count", + "description": "Get quick access to a document count for a data stream, an index, or an entire cluster.\nThe document count only includes live documents, not deleted documents which have not yet been removed by the merge process.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the count API.", + "operationId": "cat-count-2", "parameters": [ { - "$ref": "#/components/parameters/cat.snapshots-repository" - }, - { - "$ref": "#/components/parameters/cat.snapshots-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/cat.snapshots-h" - }, - { - "$ref": "#/components/parameters/cat.snapshots-s" + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nIt supports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/cat.snapshots-master_timeout" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatCountColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.snapshots-time" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/cat.snapshots-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.count.CountRecord" + } + }, + "examples": { + "CatCountResponseExample1": { + "summary": "Single data stream or index count", + "description": "A successful response from `GET /_cat/count/my-index-000001?v=true&format=json`. It retrieves the document count for the `my-index-000001` data stream or index.\n", + "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"120\"\n }\n]" + }, + "CatCountResponseExample2": { + "summary": "All data streams and indices count", + "description": "A successful response from `GET /_cat/count?v=true&format=json`. It retrieves the document count for all data streams and indices in the cluster.\n", + "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"121\"\n }\n]" + } + } + } + } } }, - "x-state": "Added in 2.1.0", - "x-api-name" : "snapshots", - "x-namespace": "cat" - } - }, - "/_cat/tasks": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/count/{index}\n
\n ", + "
\n POST\n /_cat/count/{index}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "count.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ "cat" ], - "summary": "Get task information", - "description": "Get information about tasks currently running in the cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.", - "operationId": "cat-tasks", + "summary": "Get a document count", + "description": "Get quick access to a document count for a data stream, an index, or an entire cluster.\nThe document count only includes live documents, not deleted documents which have not yet been removed by the merge process.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the count API.", + "operationId": "cat-count-3", "parameters": [ { - "in": "query", - "name": "actions", - "description": "The task action names, which are used to limit the response.", + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nIt supports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, "deprecated": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.Indices" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "detailed", - "description": "If `true`, the response includes detailed information about shard recoveries.", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/cat._types.CatCountColumns" }, "style": "form" }, { "in": "query", - "name": "nodes", - "description": "Unique node identifiers, which are used to limit the response.", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.Names" }, "style": "form" - }, + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.count.CountRecord" + } + }, + "examples": { + "CatCountResponseExample1": { + "summary": "Single data stream or index count", + "description": "A successful response from `GET /_cat/count/my-index-000001?v=true&format=json`. It retrieves the document count for the `my-index-000001` data stream or index.\n", + "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"120\"\n }\n]" + }, + "CatCountResponseExample2": { + "summary": "All data streams and indices count", + "description": "A successful response from `GET /_cat/count?v=true&format=json`. It retrieves the document count for all data streams and indices in the cluster.\n", + "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"121\"\n }\n]" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/count/{index}\n
\n ", + "
\n POST\n /_cat/count/{index}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "count.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cat/fielddata": { + "get": { + "tags": [ + "cat" + ], + "summary": "Get field data cache information", + "description": "Get the amount of heap memory currently used by the field data cache on every data node in the cluster.\n\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the nodes stats API.", + "operationId": "cat-fielddata", + "parameters": [ { "in": "query", - "name": "parent_task_id", - "description": "The parent task identifier, which is used to limit the response.", + "name": "fields", + "description": "Comma-separated list of fields used to limit returned information.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatFieldDataColumns" }, "style": "form" }, @@ -2694,34 +3852,99 @@ "$ref": "#/components/schemas/_types.Names" }, "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.fielddata.FielddataRecord" + } + }, + "examples": { + "CatFielddataResponseExample1": { + "summary": "Single field data", + "description": "A successful response from `GET /_cat/fielddata?v=true&fields=body&format=json`. You can specify an individual field in the request body or URL path. This example retrieves heap memory size information for the `body` field.\n", + "value": "[\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"body\",\n \"size\": \"544b\"\n }\n]" + }, + "CatFielddataResponseExample2": { + "summary": "Multiple fields data", + "description": "A successful response from `GET /_cat/fielddata/body,soul?v=true&format=json`. You can specify a comma-separated list of fields in the request body or URL path. This example retrieves heap memory size information for the `body` and `soul` fields. To get information for all fields, run `GET /_cat/fielddata?v=true`.\n", + "value": "[\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"1127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"body\",\n \"size\": \"544b\"\n },\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"soul\",\n \"size\": \"480b\"\n }\n]" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/fielddata\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "fielddata.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cat/fielddata/{fields}": { + "get": { + "tags": [ + "cat" + ], + "summary": "Get field data cache information", + "description": "Get the amount of heap memory currently used by the field data cache on every data node in the cluster.\n\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the nodes stats API.", + "operationId": "cat-fielddata-1", + "parameters": [ + { + "in": "path", + "name": "fields", + "description": "Comma-separated list of fields used to limit returned information.\nTo retrieve all fields, omit this parameter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "simple" }, { "in": "query", - "name": "time", - "description": "Unit used to display time values.", + "name": "fields", + "description": "Comma-separated list of fields used to limit returned information.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/cat._types.CatFieldDataColumns" }, "style": "form" }, { "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request blocks until the task has completed.", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Names" }, "style": "form" } @@ -2734,290 +3957,441 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/cat.tasks.TasksRecord" + "$ref": "#/components/schemas/cat.fielddata.FielddataRecord" } }, "examples": { - "CatTasksResponseExample1": { - "description": "A successful response from `GET _cat/tasks?v=true&format=json`.", - "value": "[\n {\n \"action\": \"cluster:monitor/tasks/lists[n]\",\n \"task_id\": \"oTUltX4IQMOUUVeiohTt8A:124\",\n \"parent_task_id\": \"oTUltX4IQMOUUVeiohTt8A:123\",\n \"type\": \"direct\",\n \"start_time\": \"1458585884904\",\n \"timestamp\": \"01:48:24\",\n \"running_time\": \"44.1micros\",\n \"ip\": \"127.0.0.1:9300\",\n \"node\": \"oTUltX4IQMOUUVeiohTt8A\"\n },\n {\n \"action\": \"cluster:monitor/tasks/lists\",\n \"task_id\": \"oTUltX4IQMOUUVeiohTt8A:123\",\n \"parent_task_id\": \"-\",\n \"type\": \"transport\",\n \"start_time\": \"1458585884904\",\n \"timestamp\": \"01:48:24\",\n \"running_time\": \"186.2micros\",\n \"ip\": \"127.0.0.1:9300\",\n \"node\": \"oTUltX4IQMOUUVeiohTt8A\"\n }\n]" + "CatFielddataResponseExample1": { + "summary": "Single field data", + "description": "A successful response from `GET /_cat/fielddata?v=true&fields=body&format=json`. You can specify an individual field in the request body or URL path. This example retrieves heap memory size information for the `body` field.\n", + "value": "[\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"body\",\n \"size\": \"544b\"\n }\n]" + }, + "CatFielddataResponseExample2": { + "summary": "Multiple fields data", + "description": "A successful response from `GET /_cat/fielddata/body,soul?v=true&format=json`. You can specify a comma-separated list of fields in the request body or URL path. This example retrieves heap memory size information for the `body` and `soul` fields. To get information for all fields, run `GET /_cat/fielddata?v=true`.\n", + "value": "[\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"1127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"body\",\n \"size\": \"544b\"\n },\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"soul\",\n \"size\": \"480b\"\n }\n]" } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "tasks", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/fielddata/{fields}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "fielddata.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/templates": { + "/_cat/health": { "get": { "tags": [ "cat" ], - "summary": "Get index template information", - "description": "Get information about the index templates in a cluster.\nYou can use index templates to apply index settings and field mappings to new indices at creation.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.", - "operationId": "cat-templates", + "summary": "Get the cluster health status", + "description": "IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use the cluster health API.\nThis API is often used to check malfunctioning clusters.\nTo help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats:\n`HH:MM:SS`, which is human-readable but includes no date information;\n`Unix epoch time`, which is machine-sortable and includes date information.\nThe latter format is useful for cluster recoveries that take multiple days.\nYou can use the cat health API to verify cluster health across multiple nodes.\nYou also can use the API to track the recovery of a large cluster over a longer period of time.", + "operationId": "cat-health", "parameters": [ { - "$ref": "#/components/parameters/cat.templates-h" - }, - { - "$ref": "#/components/parameters/cat.templates-s" + "in": "query", + "name": "ts", + "description": "If true, returns `HH:MM:SS` and Unix epoch timestamps.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.templates-local" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatHealthColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.templates-master_timeout" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/cat.templates-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.health.HealthRecord" + } + }, + "examples": { + "CatHealthResponseExample1": { + "description": "A successful response from `GET /_cat/health?v=true&format=json`. By default, it returns `HH:MM:SS` and Unix epoch timestamps.\n", + "value": "[\n {\n \"epoch\": \"1475871424\",\n \"timestamp\": \"16:17:04\",\n \"cluster\": \"elasticsearch\",\n \"status\": \"green\",\n \"node.total\": \"1\",\n \"node.data\": \"1\",\n \"shards\": \"1\",\n \"pri\": \"1\",\n \"relo\": \"0\",\n \"init\": \"0\",\n \"unassign\": \"0\",\n \"unassign.pri\": \"0\",\n \"pending_tasks\": \"0\",\n \"max_task_wait_time\": \"-\",\n \"active_shards_percent\": \"100.0%\"\n }\n]" + } + } + } + } } }, - "x-state": "Added in 5.2.0", - "x-api-name" : "templates", - "x-namespace": "cat" - } - }, - "/_cat/templates/{name}": { - "get": { - "tags": [ - "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/health\n
\n " ], - "summary": "Get index template information", - "description": "Get information about the index templates in a cluster.\nYou can use index templates to apply index settings and field mappings to new indices at creation.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.", - "operationId": "cat-templates-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.templates-name" - }, - { - "$ref": "#/components/parameters/cat.templates-h" - }, - { - "$ref": "#/components/parameters/cat.templates-s" - }, - { - "$ref": "#/components/parameters/cat.templates-local" - }, - { - "$ref": "#/components/parameters/cat.templates-master_timeout" - } + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.templates-200" + "x-api": "health.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.2.0", - "x-api-name" : "templates", - "x-namespace": "cat" + ] } }, - "/_cat/thread_pool": { + "/_cat": { "get": { "tags": [ "cat" ], - "summary": "Get thread pool statistics", - "description": "Get thread pool statistics for each node in a cluster.\nReturned information includes all built-in thread pools and custom thread pools.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", - "operationId": "cat-thread-pool", - "parameters": [ - { - "$ref": "#/components/parameters/cat.thread_pool-h" - }, - { - "$ref": "#/components/parameters/cat.thread_pool-s" - }, - { - "$ref": "#/components/parameters/cat.thread_pool-time" - }, - { - "$ref": "#/components/parameters/cat.thread_pool-local" - }, - { - "$ref": "#/components/parameters/cat.thread_pool-master_timeout" - } - ], + "summary": "Get CAT help", + "description": "Get help for the CAT APIs.", + "operationId": "cat-help", "responses": { "200": { - "$ref": "#/components/responses/cat.thread_pool-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } } }, - "x-api-name" : "thread_pool", - "x-namespace": "cat" - } - }, - "/_cat/thread_pool/{thread_pool_patterns}": { - "get": { - "tags": [ - "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat\n
\n " ], - "summary": "Get thread pool statistics", - "description": "Get thread pool statistics for each node in a cluster.\nReturned information includes all built-in thread pools and custom thread pools.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", - "operationId": "cat-thread-pool-1", - "parameters": [ - { - "$ref": "#/components/parameters/cat.thread_pool-thread_pool_patterns" - }, - { - "$ref": "#/components/parameters/cat.thread_pool-h" - }, - { - "$ref": "#/components/parameters/cat.thread_pool-s" - }, - { - "$ref": "#/components/parameters/cat.thread_pool-time" - }, - { - "$ref": "#/components/parameters/cat.thread_pool-local" - }, + "x-api": "help.cat", + "x-category": "info", + "x-metaTags": [ { - "$ref": "#/components/parameters/cat.thread_pool-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cat.thread_pool-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "thread_pool", - "x-namespace": "cat" + ] } }, - "/_cat/transforms": { + "/_cat/indices": { "get": { "tags": [ "cat" ], - "summary": "Get transform information", - "description": "Get configuration and usage information about transforms.\n\nCAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get transform statistics API.", - "operationId": "cat-transforms", + "summary": "Get index information", + "description": "Get high-level information about indices in a cluster, including backing indices for data streams.\n\nUse this request to get the following information for each index in a cluster:\n- shard count\n- document count\n- deleted document count\n- primary store size\n- total store size of all shards, including shard replicas\n\nThese metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents.\nTo get an accurate count of Elasticsearch documents, use the cat count or count APIs.\n\nCAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use an index endpoint.", + "operationId": "cat-indices", "parameters": [ { - "$ref": "#/components/parameters/cat.transforms-allow_no_match" + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "health", + "description": "The health status used to limit returned indices. By default, the response includes indices of any health status.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.HealthStatus" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-from" + "in": "query", + "name": "include_unloaded_segments", + "description": "If true, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-h" + "in": "query", + "name": "pri", + "description": "If true, the response only includes information from primary shards.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-s" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-time" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatIndicesColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-size" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/cat.transforms-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.indices.IndicesRecord" + } + }, + "examples": { + "CatIndicesResponseExample1": { + "description": "A successful response from `GET /_cat/indices/my-index-*?v=true&s=index&format=json`.\n", + "value": "[\n {\n \"health\": \"yellow\",\n \"status\": \"open\",\n \"index\": \"my-index-000001\",\n \"uuid\": \"u8FNjxh8Rfy_awN11oDKYQ\",\n \"pri\": \"1\",\n \"rep\": \"1\",\n \"docs.count\": \"1200\",\n \"docs.deleted\": \"0\",\n \"store.size\": \"88.1kb\",\n \"pri.store.size\": \"88.1kb\",\n \"dataset.size\": \"88.1kb\"\n },\n {\n \"health\": \"green\",\n \"status\": \"open\",\n \"index\": \"my-index-000002\",\n \"uuid\": \"nYFWZEO7TUiOjLQXBaYJpA \",\n \"pri\": \"1\",\n \"rep\": \"0\",\n \"docs.count\": \"0\",\n \"docs.deleted\": \"0\",\n \"store.size\": \"260b\",\n \"pri.store.size\": \"260b\",\n \"dataset.size\": \"260b\"\n }\n]" + } + } + } + } } }, - "x-state": "Added in 7.7.0", - "x-api-name" : "transforms", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/indices\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" + ], + "x-api": "indices.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cat/transforms/{transform_id}": { + "/_cat/indices/{index}": { "get": { "tags": [ "cat" ], - "summary": "Get transform information", - "description": "Get configuration and usage information about transforms.\n\nCAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get transform statistics API.", - "operationId": "cat-transforms-1", + "summary": "Get index information", + "description": "Get high-level information about indices in a cluster, including backing indices for data streams.\n\nUse this request to get the following information for each index in a cluster:\n- shard count\n- document count\n- deleted document count\n- primary store size\n- total store size of all shards, including shard replicas\n\nThese metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents.\nTo get an accurate count of Elasticsearch documents, use the cat count or count APIs.\n\nCAT APIs are only intended for human consumption using the command line or Kibana console.\nThey are not intended for use by applications. For application consumption, use an index endpoint.", + "operationId": "cat-indices-1", "parameters": [ { - "$ref": "#/components/parameters/cat.transforms-transform_id" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-allow_no_match" + "in": "query", + "name": "health", + "description": "The health status used to limit returned indices. By default, the response includes indices of any health status.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.HealthStatus" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-from" + "in": "query", + "name": "include_unloaded_segments", + "description": "If true, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-h" + "in": "query", + "name": "pri", + "description": "If true, the response only includes information from primary shards.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-s" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-time" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatIndicesColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cat.transforms-size" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/cat.transforms-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.indices.IndicesRecord" + } + }, + "examples": { + "CatIndicesResponseExample1": { + "description": "A successful response from `GET /_cat/indices/my-index-*?v=true&s=index&format=json`.\n", + "value": "[\n {\n \"health\": \"yellow\",\n \"status\": \"open\",\n \"index\": \"my-index-000001\",\n \"uuid\": \"u8FNjxh8Rfy_awN11oDKYQ\",\n \"pri\": \"1\",\n \"rep\": \"1\",\n \"docs.count\": \"1200\",\n \"docs.deleted\": \"0\",\n \"store.size\": \"88.1kb\",\n \"pri.store.size\": \"88.1kb\",\n \"dataset.size\": \"88.1kb\"\n },\n {\n \"health\": \"green\",\n \"status\": \"open\",\n \"index\": \"my-index-000002\",\n \"uuid\": \"nYFWZEO7TUiOjLQXBaYJpA \",\n \"pri\": \"1\",\n \"rep\": \"0\",\n \"docs.count\": \"0\",\n \"docs.deleted\": \"0\",\n \"store.size\": \"260b\",\n \"pri.store.size\": \"260b\",\n \"dataset.size\": \"260b\"\n }\n]" + } + } + } + } } }, - "x-state": "Added in 7.7.0", - "x-api-name" : "transforms", - "x-namespace": "cat" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/indices/{index}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" + ], + "x-api": "indices.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ccr/auto_follow/{name}": { + "/_cat/master": { "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Get auto-follow patterns", - "description": "Get cross-cluster replication auto-follow patterns.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns" - }, - "operationId": "ccr-get-auto-follow-pattern-1", + "summary": "Get master node information", + "description": "Get information about the master node, including the ID, bound IP address, and name.\n\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", + "operationId": "cat-master", "parameters": [ { - "$ref": "#/components/parameters/ccr.get_auto_follow_pattern-name" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatMasterColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ccr.get_auto_follow_pattern-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ccr.get_auto_follow_pattern-200" - } - }, - "x-state": "Added in 6.5.0", - "x-api-name" : "get_auto_follow_pattern", - "x-namespace": "ccr" - }, - "put": { - "tags": [ - "ccr" - ], - "summary": "Create or update auto-follow patterns", - "description": "Create a collection of cross-cluster replication auto-follow patterns for a remote cluster.\nNewly created indices on the remote cluster that match any of the patterns are automatically configured as follower indices.\nIndices on the remote cluster that were created before the auto-follow pattern was created will not be auto-followed even if they match the pattern.\n\nThis API can also be used to update auto-follow patterns.\nNOTE: Follower indices that were configured automatically before updating an auto-follow pattern will remain unchanged even if they do not match against the new patterns.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns" - }, - "operationId": "ccr-put-auto-follow-pattern", - "parameters": [ + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, { - "in": "path", - "name": "name", - "description": "The name of the collection of auto-follow patterns.", - "required": true, + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", @@ -3030,133 +4404,80 @@ "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "remote_cluster": { - "description": "The remote cluster containing the leader indices to match against.", - "type": "string" - }, - "follow_index_pattern": { - "$ref": "#/components/schemas/_types.IndexPattern" - }, - "leader_index_patterns": { - "$ref": "#/components/schemas/_types.IndexPatterns" - }, - "leader_index_exclusion_patterns": { - "$ref": "#/components/schemas/_types.IndexPatterns" - }, - "max_outstanding_read_requests": { - "description": "The maximum number of outstanding reads requests from the remote cluster.", - "type": "number" - }, - "settings": { - "description": "Settings to override from the leader index. Note that certain settings can not be overrode (e.g., index.number_of_shards).", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "max_outstanding_write_requests": { - "description": "The maximum number of outstanding reads requests from the remote cluster.", - "type": "number" - }, - "read_poll_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_read_request_operation_count": { - "description": "The maximum number of operations to pull per read from the remote cluster.", - "type": "number" - }, - "max_read_request_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_retry_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_write_buffer_count": { - "description": "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.", - "type": "number" - }, - "max_write_buffer_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_write_request_operation_count": { - "description": "The maximum number of operations per bulk write request executed on the follower.", - "type": "number" - }, - "max_write_request_size": { - "$ref": "#/components/schemas/_types.ByteSize" - } - }, - "required": [ - "remote_cluster" - ] - }, - "examples": { - "PutAutoFollowPatternRequestExample1": { - "description": "Run `PUT /_ccr/auto_follow/my_auto_follow_pattern` to creates an auto-follow pattern.\n", - "value": "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.master.MasterRecord" + } }, "examples": { - "PutAutoFollowPatternResponseExample1": { - "description": "A successful response for creating an auto-follow pattern.", - "value": "{\n \"acknowledged\": true\n}" + "CatMasterResponseExample1": { + "description": "A successful response from `GET /_cat/master?v=true&format=json`.\n", + "value": "[\n {\n \"id\": \"YzWoH_2BT-6UjVGDyPdqYg\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"YzWoH_2\"\n }\n]" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "put_auto_follow_pattern", - "x-namespace": "ccr" - }, - "delete": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/master\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "master.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cat/ml/data_frame/analytics": { + "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Delete auto-follow patterns", - "description": "Delete a collection of cross-cluster replication auto-follow patterns.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns" - }, - "operationId": "ccr-delete-auto-follow-pattern", + "summary": "Get data frame analytics jobs", + "description": "Get configuration and usage information about data frame analytics jobs.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get data frame analytics jobs statistics API.", + "operationId": "cat-ml-data-frame-analytics", "parameters": [ { - "in": "path", - "name": "name", - "description": "The auto-follow pattern collection to delete.", - "required": true, + "in": "query", + "name": "allow_no_match", + "description": "Whether to ignore if a wildcard expression matches no configs.\n(This includes `_all` string or when no configs have been specified.)", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "h", + "description": "Comma-separated list of column names to display.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/cat._types.CatDfaColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "Comma-separated list of column names or column aliases used to sort the\nresponse.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatDfaColumns" }, "style": "form" } @@ -3167,204 +4488,163 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.ml_data_frame_analytics.DataFrameAnalyticsRecord" + } }, "examples": { - "DeleteAutoFollowPatternResponseExample1": { - "description": "A successful response from `DELETE /_ccr/auto_follow/my_auto_follow_pattern`, which deletes an auto-follow pattern.", - "value": "{\n \"acknowledged\" : true\n}" + "CatDataframeanalyticsResponseExample1": { + "description": "A successful response from `GET _cat/ml/data_frame/analytics?v=true&format=json`.", + "value": "[\n {\n \"id\": \"classifier_job_1\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:09.594Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_2\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:14.479Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_3\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:16.928Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_4\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:19.127Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_5\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:21.349Z\",\n \"state\": \"stopped\"\n }\n]" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "delete_auto_follow_pattern", - "x-namespace": "ccr" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/ml/data_frame/analytics\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "ml_data_frame_analytics.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_ccr/follow": { - "put": { + "/_cat/ml/data_frame/analytics/{id}": { + "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Create a follower", - "description": "Create a cross-cluster replication follower index that follows a specific leader index.\nWhen the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.", - "operationId": "ccr-follow", + "summary": "Get data frame analytics jobs", + "description": "Get configuration and usage information about data frame analytics jobs.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get data frame analytics jobs statistics API.", + "operationId": "cat-ml-data-frame-analytics-1", "parameters": [ { "in": "path", - "name": "index", - "description": "The name of the follower index.", + "name": "id", + "description": "The ID of the data frame analytics to fetch", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "name": "allow_no_match", + "description": "Whether to ignore if a wildcard expression matches no configs.\n(This includes `_all` string or when no configs have been specified.)", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "wait_for_active_shards", - "description": "Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be\nactive.\nA shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the\nremote Lucene segment files to the follower index.", + "name": "h", + "description": "Comma-separated list of column names to display.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" + "$ref": "#/components/schemas/cat._types.CatDfaColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "Comma-separated list of column names or column aliases used to sort the\nresponse.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatDfaColumns" }, "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data_stream_name": { - "description": "If the leader index is part of a data stream, the name to which the local data stream for the followed index should be renamed.", - "type": "string" - }, - "leader_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "max_outstanding_read_requests": { - "description": "The maximum number of outstanding reads requests from the remote cluster.", - "type": "number" - }, - "max_outstanding_write_requests": { - "description": "The maximum number of outstanding write requests on the follower.", - "type": "number" - }, - "max_read_request_operation_count": { - "description": "The maximum number of operations to pull per read from the remote cluster.", - "type": "number" - }, - "max_read_request_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_retry_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_write_buffer_count": { - "description": "The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be\ndeferred until the number of queued operations goes below the limit.", - "type": "number" - }, - "max_write_buffer_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_write_request_operation_count": { - "description": "The maximum number of operations per bulk write request executed on the follower.", - "type": "number" - }, - "max_write_request_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "read_poll_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "remote_cluster": { - "description": "The remote cluster containing the leader index.", - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - } - }, - "required": [ - "leader_index", - "remote_cluster" - ] - }, - "examples": { - "CreateFollowIndexRequestExample1": { - "description": "Run `PUT /follower_index/_ccr/follow?wait_for_active_shards=1` to create a follower index named `follower_index`.", - "value": "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "follow_index_created": { - "type": "boolean" - }, - "follow_index_shards_acked": { - "type": "boolean" - }, - "index_following_started": { - "type": "boolean" - } - }, - "required": [ - "follow_index_created", - "follow_index_shards_acked", - "index_following_started" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.ml_data_frame_analytics.DataFrameAnalyticsRecord" + } }, "examples": { - "CreateFollowIndexResponseExample1": { - "description": "A successful response from `PUT /follower_index/_ccr/follow?wait_for_active_shards=1`.", - "value": "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}" + "CatDataframeanalyticsResponseExample1": { + "description": "A successful response from `GET _cat/ml/data_frame/analytics?v=true&format=json`.", + "value": "[\n {\n \"id\": \"classifier_job_1\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:09.594Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_2\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:14.479Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_3\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:16.928Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_4\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:19.127Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_5\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:21.349Z\",\n \"state\": \"stopped\"\n }\n]" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "follow", - "x-namespace": "ccr" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/ml/data_frame/analytics/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "ml_data_frame_analytics.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_ccr/info": { + "/_cat/ml/datafeeds": { "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Get follower information", - "description": "Get information about all cross-cluster replication follower indices.\nFor example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication" - }, - "operationId": "ccr-follow-info", + "summary": "Get datafeeds", + "description": "Get configuration and usage information about datafeeds.\nThis API returns a maximum of 10,000 datafeeds.\nIf the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`\ncluster privileges to use this API.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get datafeed statistics API.", + "operationId": "cat-ml-datafeeds", "parameters": [ { - "in": "path", - "name": "index", - "description": "A comma-delimited list of follower index patterns.", - "required": true, + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n* Contains wildcard expressions and there are no datafeeds that match.\n* Contains the `_all` string or no identifiers and there are no matches.\n* Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty datafeeds array when there are no matches and the subset of results when\nthere are partial matches. If `false`, the API returns a 404 status code when there are no matches or only\npartial matches.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "h", + "description": "Comma-separated list of column names to display.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "Comma-separated list of column names or column aliases used to sort the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" }, "style": "form" } @@ -3375,70 +4655,85 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "follower_indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ccr.follow_info.FollowerIndex" - } - } - }, - "required": [ - "follower_indices" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.ml_datafeeds.DatafeedsRecord" + } }, "examples": { - "FollowInfoResponseExample1": { - "summary": "An active follower index", - "description": "A successful response from `GET /follower_index/_ccr/info` when the follower index is active.", - "value": "{\n \"follower_indices\": [\n {\n \"follower_index\": \"follower_index\",\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index\": \"leader_index\",\n \"status\": \"active\",\n \"parameters\": {\n \"max_read_request_operation_count\": 5120,\n \"max_read_request_size\": \"32mb\",\n \"max_outstanding_read_requests\": 12,\n \"max_write_request_operation_count\": 5120,\n \"max_write_request_size\": \"9223372036854775807b\",\n \"max_outstanding_write_requests\": 9,\n \"max_write_buffer_count\": 2147483647,\n \"max_write_buffer_size\": \"512mb\",\n \"max_retry_delay\": \"500ms\",\n \"read_poll_timeout\": \"1m\"\n }\n }\n ]\n}" - }, - "FollowInfoResponseExample2": { - "summary": "A paused follower index", - "description": "A successful response from `GET /follower_index/_ccr/info` when the follower index is paused.", - "value": "{\n \"follower_indices\": [\n {\n \"follower_index\": \"follower_index\",\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index\": \"leader_index\",\n \"status\": \"paused\"\n }\n ]\n}" + "CatDatafeedsResponseExample1": { + "description": "A successful response from `GET _cat/ml/datafeeds?v=true&format=json`.", + "value": "[\n {\n \"id\": \"datafeed-high_sum_total_sales\",\n \"state\": \"stopped\",\n \"buckets.count\": \"743\",\n \"search.count\": \"7\"\n },\n {\n \"id\": \"datafeed-low_request_rate\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1457\",\n \"search.count\": \"3\"\n },\n {\n \"id\": \"datafeed-response_code_rates\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1460\",\n \"search.count\": \"18\"\n },\n {\n \"id\": \"datafeed-url_scanning\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1460\",\n \"search.count\": \"18\"\n }\n]" } } } } } }, - "x-state": "Added in 6.7.0", - "x-api-name" : "follow_info", - "x-namespace": "ccr" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/ml/datafeeds\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "ml_datafeeds.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_ccr/stats": { + "/_cat/ml/datafeeds/{datafeed_id}": { "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Get follower stats", - "description": "Get cross-cluster replication follower stats.\nThe API returns shard-level stats about the \"following tasks\" associated with each shard for the specified indices.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication" - }, - "operationId": "ccr-follow-stats", + "summary": "Get datafeeds", + "description": "Get configuration and usage information about datafeeds.\nThis API returns a maximum of 10,000 datafeeds.\nIf the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`\ncluster privileges to use this API.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get datafeed statistics API.", + "operationId": "cat-ml-datafeeds-1", "parameters": [ { "in": "path", - "name": "index", - "description": "A comma-delimited list of index patterns.", + "name": "datafeed_id", + "description": "A numerical character string that uniquely identifies the datafeed.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n* Contains wildcard expressions and there are no datafeeds that match.\n* Contains the `_all` string or no identifiers and there are no matches.\n* Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty datafeeds array when there are no matches and the subset of results when\nthere are partial matches. If `false`, the API returns a 404 status code when there are no matches or only\npartial matches.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "h", + "description": "Comma-separated list of column names to display.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "Comma-separated list of column names or column aliases used to sort the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" }, "style": "form" } @@ -3449,186 +4744,163 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "indices": { - "description": "An array of follower index statistics.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ccr._types.FollowIndexStats" - } - } - }, - "required": [ - "indices" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.ml_datafeeds.DatafeedsRecord" + } }, "examples": { - "FollowIndexStatsResponseExample1": { - "description": "A successful response from `GET /follower_index/_ccr/stats`, which retrieves follower stats.", - "value": "{\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"total_global_checkpoint_lag\" : 256,\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n}" + "CatDatafeedsResponseExample1": { + "description": "A successful response from `GET _cat/ml/datafeeds?v=true&format=json`.", + "value": "[\n {\n \"id\": \"datafeed-high_sum_total_sales\",\n \"state\": \"stopped\",\n \"buckets.count\": \"743\",\n \"search.count\": \"7\"\n },\n {\n \"id\": \"datafeed-low_request_rate\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1457\",\n \"search.count\": \"3\"\n },\n {\n \"id\": \"datafeed-response_code_rates\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1460\",\n \"search.count\": \"18\"\n },\n {\n \"id\": \"datafeed-url_scanning\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1460\",\n \"search.count\": \"18\"\n }\n]" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "follow_stats", - "x-namespace": "ccr" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/ml/datafeeds/{datafeed_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "ml_datafeeds.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_ccr/forget_follower": { - "post": { + "/_cat/ml/anomaly_detectors": { + "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Forget a follower", - "description": "Remove the cross-cluster replication follower retention leases from the leader.\n\nA following index takes out retention leases on its leader index.\nThese leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication.\nWhen a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed.\nHowever, removal of the leases can fail, for example when the remote cluster containing the leader index is unavailable.\nWhile the leases will eventually expire on their own, their extended existence can cause the leader index to hold more history than necessary and prevent index lifecycle management from performing some operations on the leader index.\nThis API exists to enable manually removing the leases when the unfollow API is unable to do so.\n\nNOTE: This API does not stop replication by a following index. If you use this API with a follower index that is still actively following, the following index will add back retention leases on the leader.\nThe only purpose of this API is to handle the case of failure to remove the following retention leases after the unfollow API is invoked.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication" - }, - "operationId": "ccr-forget-follower", + "summary": "Get anomaly detection jobs", + "description": "Get configuration and usage information for anomaly detection jobs.\nThis API returns a maximum of 10,000 jobs.\nIf the Elasticsearch security features are enabled, you must have `monitor_ml`,\n`monitor`, `manage_ml`, or `manage` cluster privileges to use this API.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get anomaly detection job statistics API.", + "operationId": "cat-ml-jobs", "parameters": [ { - "in": "path", - "name": "index", - "description": "the name of the leader index for which specified follower retention leases should be removed", - "required": true, + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n* Contains wildcard expressions and there are no jobs that match.\n* Contains the `_all` string or no identifiers and there are no matches.\n* Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty jobs array when there are no matches and the subset of results when there\nare partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial\nmatches.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "h", + "description": "Comma-separated list of column names to display.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "Comma-separated list of column names or column aliases used to sort the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns" }, "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "follower_cluster": { - "type": "string" - }, - "follower_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "follower_index_uuid": { - "$ref": "#/components/schemas/_types.Uuid" - }, - "leader_remote_cluster": { - "type": "string" - } - } - }, - "examples": { - "ForgetFollowerIndexRequestExample1": { - "description": "Run `POST //_ccr/forget_follower`.", - "value": "{\n \"follower_cluster\" : \"\",\n \"follower_index\" : \"\",\n \"follower_index_uuid\" : \"\",\n \"leader_remote_cluster\" : \"\"\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - } - }, - "required": [ - "_shards" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.ml_jobs.JobsRecord" + } }, "examples": { - "ForgetFollowerIndexResponseExample1": { - "description": "A successful response for removing the follower retention leases from the leader index.\n", - "value": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}" + "CatJobsResponseExample1": { + "description": "A successful response from `GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json`.", + "value": "[\n {\n \"id\": \"high_sum_total_sales\",\n \"s\": \"closed\",\n \"dpr\": \"14022\",\n \"mb\": \"1.5mb\"\n },\n {\n \"id\": \"low_request_rate\",\n \"s\": \"closed\",\n \"dpr\": \"1216\",\n \"mb\": \"40.5kb\"\n },\n {\n \"id\": \"response_code_rates\",\n \"s\": \"closed\",\n \"dpr\": \"28146\",\n \"mb\": \"132.7kb\"\n },\n {\n \"id\": \"url_scanning\",\n \"s\": \"closed\",\n \"dpr\": \"28146\",\n \"mb\": \"501.6kb\"\n }\n]" } } } } } }, - "x-state": "Added in 6.7.0", - "x-api-name" : "forget_follower", - "x-namespace": "ccr" - } - }, - "/_ccr/auto_follow": { - "get": { - "tags": [ - "ccr" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/ml/anomaly_detectors\n
\n " ], - "summary": "Get auto-follow patterns", - "description": "Get cross-cluster replication auto-follow patterns.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns" - }, - "operationId": "ccr-get-auto-follow-pattern", - "parameters": [ - { - "$ref": "#/components/parameters/ccr.get_auto_follow_pattern-master_timeout" - } + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/ccr.get_auto_follow_pattern-200" + "x-api": "ml_jobs.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.5.0", - "x-api-name" : "get_auto_follow_pattern", - "x-namespace": "ccr" + ] } }, - "/_ccr/auto_follow/{name}/pause": { - "post": { + "/_cat/ml/anomaly_detectors/{job_id}": { + "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Pause an auto-follow pattern", - "description": "Pause a cross-cluster replication auto-follow pattern.\nWhen the API returns, the auto-follow pattern is inactive.\nNew indices that are created on the remote cluster and match the auto-follow patterns are ignored.\n\nYou can resume auto-following with the resume auto-follow pattern API.\nWhen it resumes, the auto-follow pattern is active again and automatically configures follower indices for newly created indices on the remote cluster that match its patterns.\nRemote indices that were created while the pattern was paused will also be followed, unless they have been deleted or closed in the interim.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns" - }, - "operationId": "ccr-pause-auto-follow-pattern", + "summary": "Get anomaly detection jobs", + "description": "Get configuration and usage information for anomaly detection jobs.\nThis API returns a maximum of 10,000 jobs.\nIf the Elasticsearch security features are enabled, you must have `monitor_ml`,\n`monitor`, `manage_ml`, or `manage` cluster privileges to use this API.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get anomaly detection job statistics API.", + "operationId": "cat-ml-jobs-1", "parameters": [ { "in": "path", - "name": "name", - "description": "The name of the auto-follow pattern to pause.", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n* Contains wildcard expressions and there are no jobs that match.\n* Contains the `_all` string or no identifiers and there are no matches.\n* Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty jobs array when there are no matches and the subset of results when there\nare partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial\nmatches.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "h", + "description": "Comma-separated list of column names to display.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "Comma-separated list of column names or column aliases used to sort the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns" }, "style": "form" } @@ -3639,50 +4911,94 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.ml_jobs.JobsRecord" + } }, "examples": { - "PauseAutoFollowPatternResponseExample1": { - "description": "A successful response from `POST /_ccr/auto_follow/my_auto_follow_pattern/pause`, which pauses an auto-follow pattern.", - "value": "{\n \"acknowledged\" : true\n}" + "CatJobsResponseExample1": { + "description": "A successful response from `GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json`.", + "value": "[\n {\n \"id\": \"high_sum_total_sales\",\n \"s\": \"closed\",\n \"dpr\": \"14022\",\n \"mb\": \"1.5mb\"\n },\n {\n \"id\": \"low_request_rate\",\n \"s\": \"closed\",\n \"dpr\": \"1216\",\n \"mb\": \"40.5kb\"\n },\n {\n \"id\": \"response_code_rates\",\n \"s\": \"closed\",\n \"dpr\": \"28146\",\n \"mb\": \"132.7kb\"\n },\n {\n \"id\": \"url_scanning\",\n \"s\": \"closed\",\n \"dpr\": \"28146\",\n \"mb\": \"501.6kb\"\n }\n]" } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "pause_auto_follow_pattern", - "x-namespace": "ccr" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/ml/anomaly_detectors/{job_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "ml_jobs.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_ccr/pause_follow": { - "post": { + "/_cat/ml/trained_models": { + "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Pause a follower", - "description": "Pause a cross-cluster replication follower index.\nThe follower index will not fetch any additional operations from the leader index.\nYou can resume following with the resume follower API.\nYou can pause and resume a follower index to change the configuration of the following task.", - "operationId": "ccr-pause-follow", + "summary": "Get trained models", + "description": "Get configuration and usage information about inference trained models.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get trained models statistics API.", + "operationId": "cat-ml-trained-models", "parameters": [ { - "in": "path", - "name": "index", - "description": "The name of the follower index.", - "required": true, + "in": "query", + "name": "allow_no_match", + "description": "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.\nIf `true`, the API returns an empty array when there are no matches and the subset of results when there are partial matches.\nIf `false`, the API returns a 404 status code when there are no matches or only partial matches.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "h", + "description": "A comma-separated list of column names to display.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases used to sort the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "Skips the specified number of transforms.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "The maximum number of transforms to display.", + "deprecated": false, + "schema": { + "type": "number" }, "style": "form" } @@ -3693,53 +5009,105 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.ml_trained_models.TrainedModelsRecord" + } }, "examples": { - "PauseFollowIndexResponseExample1": { - "description": "A successful response from `POST /follower_index/_ccr/pause_follow`, which pauses a follower index.", - "value": "{\n \"acknowledged\" : true\n}" + "CatTrainedModelsResponseExample1": { + "description": "A successful response from `GET _cat/ml/trained_models?v=true&format=json`.", + "value": "[\n {\n \"id\": \"ddddd-1580216177138\",\n \"heap_size\": \"0b\",\n \"operations\": \"196\",\n \"create_time\": \"2025-03-25T00:01:38.662Z\",\n \"type\": \"pytorch\",\n \"ingest.pipelines\": \"0\",\n \"data_frame.id\": \"__none__\"\n },\n {\n \"id\": \"lang_ident_model_1\",\n \"heap_size\": \"1mb\",\n \"operations\": \"39629\",\n \"create_time\": \"2019-12-05T12:28:34.594Z\",\n \"type\": \"lang_ident\",\n \"ingest.pipelines\": \"0\",\n \"data_frame.id\": \"__none__\"\n }\n]" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "pause_follow", - "x-namespace": "ccr" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/ml/trained_models\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "ml_trained_models.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ccr/auto_follow/{name}/resume": { - "post": { + "/_cat/ml/trained_models/{model_id}": { + "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Resume an auto-follow pattern", - "description": "Resume a cross-cluster replication auto-follow pattern that was paused.\nThe auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster.\nRemote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns" - }, - "operationId": "ccr-resume-auto-follow-pattern", + "summary": "Get trained models", + "description": "Get configuration and usage information about inference trained models.\n\nIMPORTANT: CAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get trained models statistics API.", + "operationId": "cat-ml-trained-models-1", "parameters": [ { "in": "path", - "name": "name", - "description": "The name of the auto-follow pattern to resume.", + "name": "model_id", + "description": "A unique identifier for the trained model.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "allow_no_match", + "description": "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.\nIf `true`, the API returns an empty array when there are no matches and the subset of results when there are partial matches.\nIf `false`, the API returns a 404 status code when there are no matches or only partial matches.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "h", + "description": "A comma-separated list of column names to display.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases used to sort the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "Skips the specified number of transforms.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "The maximum number of transforms to display.", + "deprecated": false, + "schema": { + "type": "number" }, "style": "form" } @@ -3750,45 +5118,76 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.ml_trained_models.TrainedModelsRecord" + } }, "examples": { - "ResumeAutoFollowPatternResponseExample1": { - "description": "A successful response `POST /_ccr/auto_follow/my_auto_follow_pattern/resume`, which resumes an auto-follow pattern.\n", - "value": "{\n \"acknowledged\" : true\n}" + "CatTrainedModelsResponseExample1": { + "description": "A successful response from `GET _cat/ml/trained_models?v=true&format=json`.", + "value": "[\n {\n \"id\": \"ddddd-1580216177138\",\n \"heap_size\": \"0b\",\n \"operations\": \"196\",\n \"create_time\": \"2025-03-25T00:01:38.662Z\",\n \"type\": \"pytorch\",\n \"ingest.pipelines\": \"0\",\n \"data_frame.id\": \"__none__\"\n },\n {\n \"id\": \"lang_ident_model_1\",\n \"heap_size\": \"1mb\",\n \"operations\": \"39629\",\n \"create_time\": \"2019-12-05T12:28:34.594Z\",\n \"type\": \"lang_ident\",\n \"ingest.pipelines\": \"0\",\n \"data_frame.id\": \"__none__\"\n }\n]" } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "resume_auto_follow_pattern", - "x-namespace": "ccr" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/ml/trained_models/{model_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "ml_trained_models.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_ccr/resume_follow": { - "post": { + "/_cat/nodeattrs": { + "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Resume a follower", - "description": "Resume a cross-cluster replication follower index that was paused.\nThe follower index could have been paused with the pause follower API.\nAlternatively it could be paused due to replication that cannot be retried due to failures during following tasks.\nWhen this API returns, the follower index will resume fetching operations from the leader index.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication" - }, - "operationId": "ccr-resume-follow", + "summary": "Get node attribute information", + "description": "Get information about custom node attributes.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", + "operationId": "cat-nodeattrs", "parameters": [ { - "in": "path", - "name": "index", - "description": "The name of the follow index to resume following.", - "required": true, + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/cat._types.CatNodeattrsColumns" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { "in": "query", @@ -3801,99 +5200,103 @@ "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "max_outstanding_read_requests": { - "type": "number" - }, - "max_outstanding_write_requests": { - "type": "number" - }, - "max_read_request_operation_count": { - "type": "number" - }, - "max_read_request_size": { - "type": "string" - }, - "max_retry_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_write_buffer_count": { - "type": "number" - }, - "max_write_buffer_size": { - "type": "string" - }, - "max_write_request_operation_count": { - "type": "number" - }, - "max_write_request_size": { - "type": "string" - }, - "read_poll_timeout": { - "$ref": "#/components/schemas/_types.Duration" - } - } - }, - "examples": { - "ResumeFollowIndexRequestExample1": { - "description": "Run `POST /follower_index/_ccr/resume_follow` to resume the follower index.", - "value": "{\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" - } - } - } - } - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.nodeattrs.NodeAttributesRecord" + } }, "examples": { - "ResumeFollowIndexResponseExample1": { - "description": "A successful response from resuming a folower index.", - "value": "{\n \"acknowledged\" : true\n}" + "CatNodeAttributesResponseExample1": { + "summary": "Default columns", + "description": "A successful response from `GET /_cat/nodeattrs?v=true&format=json`. The `node`, `host`, and `ip` columns provide basic information about each node. The `attr` and `value` columns return custom node attributes, one per line.\n", + "value": "[\n {\n \"node\": \"node-0\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"attr\": \"testattr\",\n \"value\": \"test\"\n }\n]" + }, + "CatNodeAttributesResponseExample2": { + "summary": "Explicit columns", + "description": "A successful response from `GET /_cat/nodeattrs?v=true&h=name,pid,attr,value`. It returns the `name`, `pid`, `attr`, and `value` columns.\n", + "value": "[\n {\n \"name\": \"node-0\",\n \"pid\": \"19566\",\n \"attr\": \"testattr\",\n \"value\": \"test\"\n }\n]" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "resume_follow", - "x-namespace": "ccr" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/nodeattrs\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "nodeattrs.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ccr/stats": { + "/_cat/nodes": { "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Get cross-cluster replication stats", - "description": "This API returns stats about auto-following and the same shard-level stats as the get follower stats API.", - "operationId": "ccr-stats", + "summary": "Get node information", + "description": "Get information about the nodes in a cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", + "operationId": "cat-nodes", "parameters": [ { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "full_id", + "description": "If `true`, return the full node ID. If `false`, return the shortened node ID.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "include_unloaded_segments", + "description": "If true, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatNodeColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -3907,62 +5310,87 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "auto_follow_stats": { - "$ref": "#/components/schemas/ccr.stats.AutoFollowStats" - }, - "follow_stats": { - "$ref": "#/components/schemas/ccr.stats.FollowStats" - } - }, - "required": [ - "auto_follow_stats", - "follow_stats" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.nodes.NodesRecord" + } }, "examples": { - "CcrStatsResponseExample1": { - "description": "A successful response from `GET /_ccr/stats` that returns cross-cluster replication stats.", - "value": "{\n \"auto_follow_stats\" : {\n \"number_of_failed_follow_indices\" : 0,\n \"number_of_failed_remote_cluster_state_requests\" : 0,\n \"number_of_successful_follow_indices\" : 1,\n \"recent_auto_follow_errors\" : [],\n \"auto_followed_clusters\" : []\n },\n \"follow_stats\" : {\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"total_global_checkpoint_lag\" : 256,\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n }\n}" + "CatNodesResponseExample1": { + "summary": "Default columns", + "description": "A successful response from `GET /_cat/nodes?v=true&format=json`. The `ip`, `heap.percent`, `ram.percent`, `cpu`, and `load_*` columns provide the IP addresses and performance information of each node. The `node.role`, `master`, and `name` columns provide information useful for monitoring an entire cluster, particularly large ones.\n", + "value": "[\n {\n \"ip\": \"127.0.0.1\",\n \"heap.percent\": \"65\",\n \"ram.percent\": \"99\",\n \"cpu\": \"42\",\n \"load_1m\": \"3.07\",\n \"load_5m\": null,\n \"load_15m\": null,\n \"node.role\": \"cdfhilmrstw\",\n \"master\": \"*\",\n \"name\": \"mJw06l1\"\n }\n]" + }, + "CatNodesResponseExample2": { + "summary": "Explicit columns", + "description": "A successful response from `GET /_cat/nodes?v=true&h=id,ip,port,v,m&format=json`. It returns the `id`, `ip`, `port`, `v` (version), and `m` (master) columns.\n", + "value": "[\n {\n \"id\": \"veJR\",\n \"ip\": \"127.0.0.1\",\n \"port\": \"59938\",\n \"v\": \"9.0.0\",\n \"m\": \"*\"\n }\n]" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "stats", - "x-namespace": "ccr" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/nodes\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "nodes.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_ccr/unfollow": { - "post": { + "/_cat/pending_tasks": { + "get": { "tags": [ - "ccr" + "cat" ], - "summary": "Unfollow an index", - "description": "Convert a cross-cluster replication follower index to a regular index.\nThe API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.\nThe follower index must be paused and closed before you call the unfollow API.\n\n> info\n> Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication" - }, - "operationId": "ccr-unfollow", + "summary": "Get pending task information", + "description": "Get information about cluster-level changes that have not yet taken effect.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API.", + "operationId": "cat-pending-tasks", "parameters": [ { - "in": "path", - "name": "index", - "description": "The name of the follower index.", - "required": true, + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/cat._types.CatPendingTasksColumns" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { "in": "query", "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -3976,461 +5404,551 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.pending_tasks.PendingTasksRecord" + } }, "examples": { - "UnfollowIndexResponseExample1": { - "description": "A successful response from `POST /follower_index/_ccr/unfollow`.", - "value": "{\n \"acknowledged\" : true\n}" + "CatPendingTasksResponseExample1": { + "description": "A successful response from `GET /_cat/pending_tasks?v=true&h=insertOrder,timeInQueue,priority,source&format=json`.\n", + "value": "[\n { \"insertOrder\": \"1685\", \"timeInQueue\": \"855ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1686\", \"timeInQueue\": \"843ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1693\", \"timeInQueue\": \"753ms\", \"priority\": \"HIGH\", \"source\": \"refresh-mapping [foo][[t]]\"},\n { \"insertOrder\": \"1688\", \"timeInQueue\": \"816ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1689\", \"timeInQueue\": \"802ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1690\", \"timeInQueue\": \"787ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"},\n { \"insertOrder\": \"1691\", \"timeInQueue\": \"773ms\", \"priority\": \"HIGH\", \"source\": \"update-mapping [foo][t]\"}\n]" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "unfollow", - "x-namespace": "ccr" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/pending_tasks\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "pending_tasks.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_search/scroll": { + "/_cat/plugins": { "get": { "tags": [ - "search" + "cat" ], - "summary": "Run a scrolling search", - "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results" - }, - "operationId": "scroll", + "summary": "Get plugin information", + "description": "Get a list of plugins running on each node of a cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", + "operationId": "cat-plugins", "parameters": [ { - "$ref": "#/components/parameters/scroll-scroll" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatPluginsColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-scroll_id_" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-rest_total_hits_as_int" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/scroll" - }, - "responses": { - "200": { - "$ref": "#/components/responses/scroll-200" - } - }, - "x-api-name": "scroll" - }, - "post": { - "tags": [ - "search" - ], - "summary": "Run a scrolling search", - "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results" - }, - "operationId": "scroll-1", - "parameters": [ - { - "$ref": "#/components/parameters/scroll-scroll" + "in": "query", + "name": "include_bootstrap", + "description": "Include bootstrap plugins in the response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-scroll_id_" + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-rest_total_hits_as_int" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/scroll" - }, "responses": { "200": { - "$ref": "#/components/responses/scroll-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.plugins.PluginsRecord" + } + }, + "examples": { + "CatPluginsResponseExample1": { + "description": "A successful response from `GET /_cat/plugins?v=true&s=component&h=name,component,version,description&format=json`.\n", + "value": "[\n { \"name\": \"U7321H6\", \"component\": \"analysis-icu\", \"version\": \"8.17.0\", \"description\": \"The ICU Analysis plugin integrates the Lucene ICU module into Elasticsearch, adding ICU-related analysis components.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-kuromoji\", \"verison\": \"8.17.0\", description: \"The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch.\"},\n {\"name\" \"U7321H6\", \"component\": \"analysis-nori\", \"version\": \"8.17.0\", \"description\": \"The Korean (nori) Analysis plugin integrates Lucene nori analysis module into elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-phonetic\", \"verison\": \"8.17.0\", \"description\": \"The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-smartcn\", \"verison\": \"8.17.0\", \"description\": \"Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-stempel\", \"verison\": \"8.17.0\", \"description\": \"The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"analysis-ukrainian\", \"verison\": \"8.17.0\", \"description\": \"The Ukrainian Analysis plugin integrates the Lucene UkrainianMorfologikAnalyzer into elasticsearch.\"},\n {\"name\": \"U7321H6\", \"component\": \"discovery-azure-classic\", \"verison\": \"8.17.0\", \"description\": \"The Azure Classic Discovery plugin allows to use Azure Classic API for the unicast discovery mechanism\"},\n {\"name\": \"U7321H6\", \"component\": \"discovery-ec2\", \"verison\": \"8.17.0\", \"description\": \"The EC2 discovery plugin allows to use AWS API for the unicast discovery mechanism.\"},\n {\"name\": \"U7321H6\", \"component\": \"discovery-gce\", \"verison\": \"8.17.0\", \"description\": \"The Google Compute Engine (GCE) Discovery plugin allows to use GCE API for the unicast discovery mechanism.\"},\n {\"name\": \"U7321H6\", \"component\": \"mapper-annotated-text\", \"verison\": \"8.17.0\", \"description\": \"The Mapper Annotated_text plugin adds support for text fields with markup used to inject annotation tokens into the index.\"},\n {\"name\": \"U7321H6\", \"component\": \"mapper-murmur3\", \"verison\": \"8.17.0\", \"description\": \"The Mapper Murmur3 plugin allows to compute hashes of a field's values at index-time and to store them in the index.\"},\n {\"name\": \"U7321H6\", \"component\": \"mapper-size\", \"verison\": \"8.17.0\", \"description\": \"The Mapper Size plugin allows document to record their uncompressed size at index time.\"},\n {\"name\": \"U7321H6\", \"component\": \"store-smb\", \"verison\": \"8.17.0\", \"description\": \"The Store SMB plugin adds support for SMB stores.\"}\n]" + } + } + } + } } }, - "x-api-name": "scroll" - }, - "delete": { - "tags": [ - "search" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/plugins\n
\n " ], - "summary": "Clear a scrolling search", - "description": "Clear the search context and results for a scrolling search.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results" - }, - "operationId": "clear-scroll", - "requestBody": { - "$ref": "#/components/requestBodies/clear_scroll" - }, - "responses": { - "200": { - "$ref": "#/components/responses/clear_scroll-200" + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "plugins.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "clear_scroll" + ] } }, - "/_search/scroll/{scroll_id}": { + "/_cat/recovery": { "get": { "tags": [ - "search" + "cat" ], - "summary": "Run a scrolling search", - "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results" - }, - "operationId": "scroll-2", + "summary": "Get shard recovery information", + "description": "Get information about ongoing and completed shard recoveries.\nShard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing.\nFor data streams, the API returns information about the stream’s backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.", + "operationId": "cat-recovery", "parameters": [ { - "$ref": "#/components/parameters/scroll-scroll_id" + "in": "query", + "name": "active_only", + "description": "If `true`, the response only includes ongoing shard recoveries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "detailed", + "description": "If `true`, the response includes detailed information about shard recoveries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-scroll" + "in": "query", + "name": "index", + "description": "Comma-separated list or wildcard expression of index names to limit the returned information", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-scroll_id_" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatRecoveryColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-rest_total_hits_as_int" + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/scroll" - }, "responses": { "200": { - "$ref": "#/components/responses/scroll-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.recovery.RecoveryRecord" + } + }, + "examples": { + "CatRecoveryResponseExample1": { + "summary": "No ongoing recoveries", + "description": "A successful response from `GET _cat/recovery?v=true&format=json`. In this example, the source and target nodes are the same because the recovery type is `store`, meaning they were read from local storage on node start.\n", + "value": "[\n {\n \"index\": \"my-index-000001 \",\n \"shard\": \"0\",\n \"time\": \"13ms\",\n \"type\": \"store\",\n \"stage\": \"done\",\n \"source_host\": \"n/a\",\n \"source_node\": \"n/a\",\n \"target_host\": \"127.0.0.1\",\n \"target_node\": \"node-0\",\n \"repository\": \"n/a\",\n \"snapshot\": \"n/a\",\n \"files\": \"0\",\n \"files_recovered\": \"0\",\n \"files_percent\": \"100.0%\",\n \"files_total\": \"13\",\n \"bytes\": \"0b\",\n \"bytes_recovered\": \"0b\",\n \"bytes_percent\": \"100.0%\",\n \"bytes_total\": \"9928b\",\n \"translog_ops\": \"0\",\n \"translog_ops_recovered\": \"0\",\n \"translog_ops_percent\": \"100.0%\"\n }\n]" + }, + "CatRecoveryResponseExample2": { + "summary": "A live shard recovery", + "description": "A successful response from `GET _cat/recovery?v=true&h=i,s,t,ty,st,shost,thost,f,fp,b,bp&format=json`. You can retrieve information about an ongoing recovery for example when you increase the replica count of an index and bring another node online to host the replicas. In this example, the recovery type is `peer`, meaning the shard recovered from another node. The `files` and `bytes` are real-time measurements.\n", + "value": "[\n {\n \"i\": \"my-index-000001\",\n \"s\": \"0\",\n \"t\": \"1252ms\",\n \"ty\": \"peer\",\n \"st\": \"done\",\n \"shost\": \"192.168.1.1\",\n \"thost\": \"192.168.1.1\",\n \"f\": \"0\",\n \"fp\": \"100.0%\",\n \"b\": \"0b\",\n \"bp\": \"100.0%\",\n }\n]" + }, + "CatRecoveryResponseExample3": { + "summary": "A snapshot recovery", + "description": "A successful response from `GET _cat/recovery?v=true&h=i,s,t,ty,st,rep,snap,f,fp,b,bp&format=json`. You can restore backups of an index using the snapshot and restore API. You can use the cat recovery API to get information about a snapshot recovery.\n", + "value": "[\n {\n \"i\": \"my-index-000001\",\n \"s\": \"0\",\n \"t\": \"1978ms\",\n \"ty\": \"snapshot\",\n \"st\": \"done\",\n \"rep\": \"my-repo\",\n \"snap\": \"snap-1\",\n \"f\": \"79\",\n \"fp\": \"8.0%\",\n \"b\": \"12086\",\n \"bp\": \"9.0%\"\n }\n]" + } + } + } + } } }, - "x-api-name": "scroll" - }, - "post": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/recovery\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" + ], + "x-api": "recovery.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cat/recovery/{index}": { + "get": { "tags": [ - "search" + "cat" ], - "summary": "Run a scrolling search", - "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results" - }, - "operationId": "scroll-3", + "summary": "Get shard recovery information", + "description": "Get information about ongoing and completed shard recoveries.\nShard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing.\nFor data streams, the API returns information about the stream’s backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.", + "operationId": "cat-recovery-1", "parameters": [ { - "$ref": "#/components/parameters/scroll-scroll_id" + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "active_only", + "description": "If `true`, the response only includes ongoing shard recoveries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "detailed", + "description": "If `true`, the response includes detailed information about shard recoveries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-scroll" + "in": "query", + "name": "index", + "description": "Comma-separated list or wildcard expression of index names to limit the returned information", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-scroll_id_" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatRecoveryColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/scroll-rest_total_hits_as_int" + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/scroll" - }, "responses": { "200": { - "$ref": "#/components/responses/scroll-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.recovery.RecoveryRecord" + } + }, + "examples": { + "CatRecoveryResponseExample1": { + "summary": "No ongoing recoveries", + "description": "A successful response from `GET _cat/recovery?v=true&format=json`. In this example, the source and target nodes are the same because the recovery type is `store`, meaning they were read from local storage on node start.\n", + "value": "[\n {\n \"index\": \"my-index-000001 \",\n \"shard\": \"0\",\n \"time\": \"13ms\",\n \"type\": \"store\",\n \"stage\": \"done\",\n \"source_host\": \"n/a\",\n \"source_node\": \"n/a\",\n \"target_host\": \"127.0.0.1\",\n \"target_node\": \"node-0\",\n \"repository\": \"n/a\",\n \"snapshot\": \"n/a\",\n \"files\": \"0\",\n \"files_recovered\": \"0\",\n \"files_percent\": \"100.0%\",\n \"files_total\": \"13\",\n \"bytes\": \"0b\",\n \"bytes_recovered\": \"0b\",\n \"bytes_percent\": \"100.0%\",\n \"bytes_total\": \"9928b\",\n \"translog_ops\": \"0\",\n \"translog_ops_recovered\": \"0\",\n \"translog_ops_percent\": \"100.0%\"\n }\n]" + }, + "CatRecoveryResponseExample2": { + "summary": "A live shard recovery", + "description": "A successful response from `GET _cat/recovery?v=true&h=i,s,t,ty,st,shost,thost,f,fp,b,bp&format=json`. You can retrieve information about an ongoing recovery for example when you increase the replica count of an index and bring another node online to host the replicas. In this example, the recovery type is `peer`, meaning the shard recovered from another node. The `files` and `bytes` are real-time measurements.\n", + "value": "[\n {\n \"i\": \"my-index-000001\",\n \"s\": \"0\",\n \"t\": \"1252ms\",\n \"ty\": \"peer\",\n \"st\": \"done\",\n \"shost\": \"192.168.1.1\",\n \"thost\": \"192.168.1.1\",\n \"f\": \"0\",\n \"fp\": \"100.0%\",\n \"b\": \"0b\",\n \"bp\": \"100.0%\",\n }\n]" + }, + "CatRecoveryResponseExample3": { + "summary": "A snapshot recovery", + "description": "A successful response from `GET _cat/recovery?v=true&h=i,s,t,ty,st,rep,snap,f,fp,b,bp&format=json`. You can restore backups of an index using the snapshot and restore API. You can use the cat recovery API to get information about a snapshot recovery.\n", + "value": "[\n {\n \"i\": \"my-index-000001\",\n \"s\": \"0\",\n \"t\": \"1978ms\",\n \"ty\": \"snapshot\",\n \"st\": \"done\",\n \"rep\": \"my-repo\",\n \"snap\": \"snap-1\",\n \"f\": \"79\",\n \"fp\": \"8.0%\",\n \"b\": \"12086\",\n \"bp\": \"9.0%\"\n }\n]" + } + } + } + } } }, - "x-api-name": "scroll" - }, - "delete": { - "tags": [ - "search" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/recovery/{index}\n
\n " ], - "summary": "Clear a scrolling search", - "description": "Clear the search context and results for a scrolling search.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results" - }, - "operationId": "clear-scroll-1", - "parameters": [ - { - "$ref": "#/components/parameters/clear_scroll-scroll_id" - } + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/clear_scroll" - }, - "responses": { - "200": { - "$ref": "#/components/responses/clear_scroll-200" + "x-api": "recovery.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "clear_scroll" + ] } }, - "/_pit": { - "delete": { + "/_cat/repositories": { + "get": { "tags": [ - "search" + "cat" ], - "summary": "Close a point in time", - "description": "A point in time must be opened explicitly before being used in search requests.\nThe `keep_alive` parameter tells Elasticsearch how long it should persist.\nA point in time is automatically closed when the `keep_alive` period has elapsed.\nHowever, keeping points in time has a cost; close them as soon as they are no longer required for search requests.", - "operationId": "close-point-in-time", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "required": [ - "id" - ] - }, - "examples": { - "ClosePointInTimeRequestExample1": { - "description": "Run `DELETE /_pit` to close a point-in-time.", - "value": "{\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n}" - } - } - } + "summary": "Get snapshot repository information", + "description": "Get a list of snapshot repositories for a cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.", + "operationId": "cat-repositories", + "parameters": [ + { + "in": "query", + "name": "h", + "description": "List of columns to appear in the response. Supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - }, + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "succeeded": { - "description": "If `true`, all search contexts associated with the point-in-time ID were successfully closed.", - "type": "boolean" - }, - "num_freed": { - "description": "The number of search contexts that were successfully closed.", - "type": "number" - } - }, - "required": [ - "succeeded", - "num_freed" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.repositories.RepositoriesRecord" + } }, "examples": { - "ClosePointInTimeResponseExample1": { - "description": "A successful response from `DELETE /_pit`.", - "value": "{\n \"succeeded\": true, \n \"num_freed\": 3 \n}" + "CatRepositoriesResponseExample1": { + "description": "A successful response from `GET /_cat/repositories?v=true&format=json`.\n", + "value": "[\n {\n \"id\": \"repo1\",\n \"type\": \"fs\"\n },\n {\n \"id\": \"repo2\",\n \"type\": \"s3\"\n }\n]" } } } } } }, - "x-state": "Added in 7.10.0", - "x-api-name": "close_point_in_time" - } - }, - "/_cluster/allocation/explain": { - "get": { - "tags": [ - "cluster" - ], - "summary": "Explain the shard allocations", - "description": "Get explanations for shard allocations in the cluster.\nFor unassigned shards, it provides an explanation for why the shard is unassigned.\nFor assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.\nThis API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.", - "operationId": "cluster-allocation-explain", - "parameters": [ - { - "$ref": "#/components/parameters/cluster.allocation_explain-include_disk_info" - }, - { - "$ref": "#/components/parameters/cluster.allocation_explain-include_yes_decisions" - }, - { - "$ref": "#/components/parameters/cluster.allocation_explain-master_timeout" - } + "x-state": "Generally available; Added in 2.1.0", + "x-variations": [ + "
\n GET\n /_cat/repositories\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/cluster.allocation_explain" - }, - "responses": { - "200": { - "$ref": "#/components/responses/cluster.allocation_explain-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "allocation_explain", - "x-namespace": "cluster" - }, - "post": { - "tags": [ - "cluster" + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" ], - "summary": "Explain the shard allocations", - "description": "Get explanations for shard allocations in the cluster.\nFor unassigned shards, it provides an explanation for why the shard is unassigned.\nFor assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.\nThis API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.", - "operationId": "cluster-allocation-explain-1", - "parameters": [ - { - "$ref": "#/components/parameters/cluster.allocation_explain-include_disk_info" - }, + "x-api": "repositories.cat", + "x-category": "info", + "x-metaTags": [ { - "$ref": "#/components/parameters/cluster.allocation_explain-include_yes_decisions" - }, - { - "$ref": "#/components/parameters/cluster.allocation_explain-master_timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/cluster.allocation_explain" - }, - "responses": { - "200": { - "$ref": "#/components/responses/cluster.allocation_explain-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "allocation_explain", - "x-namespace": "cluster" + ] } }, - "/_component_template/{name}": { + "/_cat/segments": { "get": { "tags": [ - "indices" + "cat" ], - "summary": "Get component templates", - "description": "Get information about component templates.", - "operationId": "cluster-get-component-template-1", + "summary": "Get segment information", + "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.", + "operationId": "cat-segments", "parameters": [ { - "$ref": "#/components/parameters/cluster.get_component_template-name" - }, - { - "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" - }, - { - "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatSegmentsColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.get_component_template-local" + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.get_component_template-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cluster.get_component_template-200" - } - }, - "x-state": "Added in 7.8.0", - "x-api-name" : "get_component_template", - "x-namespace": "cluster" - }, - "put": { - "tags": [ - "indices" - ], - "summary": "Create or update a component template", - "description": "Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.\n\nAn index template can be composed of multiple component templates.\nTo use a component template, specify it in an index template’s `composed_of` list.\nComponent templates are only applied to new data streams and indices as part of a matching index template.\n\nSettings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.\n\nComponent templates are only used during index creation.\nFor data streams, this includes data stream creation and the creation of a stream’s backing indices.\nChanges to component templates do not affect existing indices, including a stream’s backing indices.\n\nYou can use C-style `/* *\\/` block comments in component templates.\nYou can include comments anywhere in the request body except before the opening curly bracket.\n\n**Applying component templates**\n\nYou cannot directly apply a component template to a data stream or index.\nTo be applied, a component template must be included in an index template's `composed_of` list.", - "operationId": "cluster-put-component-template", - "parameters": [ - { - "$ref": "#/components/parameters/cluster.put_component_template-name" + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.put_component_template-create" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.put_component_template-master_timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/cluster.put_component_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/cluster.put_component_template-200" - } - }, - "x-state": "Added in 7.8.0", - "x-api-name" : "put_component_template", - "x-namespace": "cluster" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Create or update a component template", - "description": "Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.\n\nAn index template can be composed of multiple component templates.\nTo use a component template, specify it in an index template’s `composed_of` list.\nComponent templates are only applied to new data streams and indices as part of a matching index template.\n\nSettings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.\n\nComponent templates are only used during index creation.\nFor data streams, this includes data stream creation and the creation of a stream’s backing indices.\nChanges to component templates do not affect existing indices, including a stream’s backing indices.\n\nYou can use C-style `/* *\\/` block comments in component templates.\nYou can include comments anywhere in the request body except before the opening curly bracket.\n\n**Applying component templates**\n\nYou cannot directly apply a component template to a data stream or index.\nTo be applied, a component template must be included in an index template's `composed_of` list.", - "operationId": "cluster-put-component-template-1", - "parameters": [ - { - "$ref": "#/components/parameters/cluster.put_component_template-name" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.put_component_template-create" + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias, or _all value targets only\nmissing or closed indices. This behavior applies even if the request targets other open indices. For example,\na request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.put_component_template-master_timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/cluster.put_component_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/cluster.put_component_template-200" - } - }, - "x-state": "Added in 7.8.0", - "x-api-name" : "put_component_template", - "x-namespace": "cluster" - }, - "delete": { - "tags": [ - "indices" - ], - "summary": "Delete component templates", - "description": "Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.", - "operationId": "cluster-delete-component-template", - "parameters": [ - { - "in": "path", - "name": "name", - "description": "Comma-separated list or wildcard expression of component template names used to limit the request.", - "required": true, + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "allow_closed", + "description": "If true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour\nof throwing an exception if index pattern matches closed indices", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } @@ -4441,159 +5959,143 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.segments.SegmentsRecord" + } + }, + "examples": { + "CatSegmentsResponseExample1": { + "description": "A successful response from `GET /_cat/segments?v=true&format=json`.\n", + "value": "[\n {\n \"index\": \"test\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"ip\": \"127.0.0.1\",\n \"segment\": \"_0\",\n \"generation\": \"0\",\n \"docs.count\": \"1\",\n \"docs.deleted\": \"0\",\n \"size\": \"3kb\",\n \"size.memory\": \"0\",\n \"committed\": \"false\",\n \"searchable\": \"true\",\n \"version\": \"9.12.0\",\n \"compound\": \"true\"\n },\n {\n \"index\": \"test1\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"ip\": \"127.0.0.1\",\n \"segment\": \"_0\",\n \"generation\": \"0\",\n \"docs.count\": \"1\",\n \"docs.deleted\": \"0\",\n \"size\": \"3kb\",\n \"size.memory\": \"0\",\n \"committed\": \"false\",\n \"searchable\": \"true\",\n \"version\": \"9.12.0\",\n \"compound\": \"true\"\n }\n]" + } } } } } }, - "x-state": "Added in 7.8.0", - "x-api-name" : "delete_component_template", - "x-namespace": "cluster" - }, - "head": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/segments\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" + ], + "x-api": "segments.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cat/segments/{index}": { + "get": { "tags": [ - "indices" + "cat" ], - "summary": "Check component templates", - "description": "Returns information about whether a particular component template exists.", - "operationId": "cluster-exists-component-template", + "summary": "Get segment information", + "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.", + "operationId": "cat-segments-1", "parameters": [ { "in": "path", - "name": "name", - "description": "Comma-separated list of component template names used to limit the request.\nWildcard (*) expressions are supported.", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "name": "h", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/cat._types.CatSegmentsColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" }, "style": "form" }, { "in": "query", "name": "local", - "description": "If true, the request retrieves information from the local node only.\nDefaults to false, which means information is retrieved from the master node.", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "x-state": "Added in 7.8.0", - "x-api-name" : "exists_component_template", - "x-namespace": "cluster" - } - }, - "/_cluster/voting_config_exclusions": { - "post": { - "tags": [ - "cluster" - ], - "summary": "Update voting configuration exclusions", - "description": "Update the cluster voting config exclusions by node IDs or node names.\nBy default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks.\nIf you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually.\nThe API adds an entry for each specified node to the cluster’s voting configuration exclusions list.\nIt then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes.\n\nClusters should have no voting configuration exclusions in normal operation.\nOnce the excluded nodes have stopped, clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`.\nThis API waits for the nodes to be fully removed from the cluster before it returns.\nIf your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false` to clear the voting configuration exclusions without waiting for the nodes to leave the cluster.\n\nA response to `POST /_cluster/voting_config_exclusions` with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`.\nIf the call to `POST /_cluster/voting_config_exclusions` fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration.\nIn that case, you may safely retry the call.\n\nNOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period.\nThey are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/maintenance/add-and-remove-elasticsearch-nodes" - }, - "operationId": "cluster-post-voting-config-exclusions", - "parameters": [ + }, { "in": "query", - "name": "node_names", - "description": "A comma-separated list of the names of the nodes to exclude from the\nvoting configuration. If specified, you may not also specify node_ids.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "node_ids", - "description": "A comma-separated list of the persistent ids of the nodes to exclude\nfrom the voting configuration. If specified, you may not also specify node_names.", + "name": "expand_wildcards", + "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Ids" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias, or _all value targets only\nmissing or closed indices. This behavior applies even if the request targets other open indices. For example,\na request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "When adding a voting configuration exclusion, the API waits for the\nspecified nodes to be excluded from the voting configuration before\nreturning. If the timeout expires before the appropriate condition\nis satisfied, the request fails and returns an error.", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "x-state": "Added in 7.0.0", - "x-api-name" : "post_voting_config_exclusions", - "x-namespace": "cluster" - }, - "delete": { - "tags": [ - "cluster" - ], - "summary": "Clear cluster voting config exclusions", - "description": "Remove master-eligible nodes from the voting configuration exclusion list.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/maintenance/add-and-remove-elasticsearch-nodes" - }, - "operationId": "cluster-delete-voting-config-exclusions", - "parameters": [ + }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "wait_for_removal", - "description": "Specifies whether to wait for all excluded nodes to be removed from the\ncluster before clearing the voting configuration exclusions list.\nDefaults to true, meaning that all excluded nodes must be removed from\nthe cluster before this API takes any action. If set to false then the\nvoting configuration exclusions list is cleared even if some excluded\nnodes are still in the cluster.", + "name": "allow_closed", + "description": "If true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour\nof throwing an exception if index pattern matches closed indices", "deprecated": false, "schema": { "type": "boolean" @@ -4605,90 +6107,74 @@ "200": { "description": "", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.segments.SegmentsRecord" + } + }, + "examples": { + "CatSegmentsResponseExample1": { + "description": "A successful response from `GET /_cat/segments?v=true&format=json`.\n", + "value": "[\n {\n \"index\": \"test\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"ip\": \"127.0.0.1\",\n \"segment\": \"_0\",\n \"generation\": \"0\",\n \"docs.count\": \"1\",\n \"docs.deleted\": \"0\",\n \"size\": \"3kb\",\n \"size.memory\": \"0\",\n \"committed\": \"false\",\n \"searchable\": \"true\",\n \"version\": \"9.12.0\",\n \"compound\": \"true\"\n },\n {\n \"index\": \"test1\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"ip\": \"127.0.0.1\",\n \"segment\": \"_0\",\n \"generation\": \"0\",\n \"docs.count\": \"1\",\n \"docs.deleted\": \"0\",\n \"size\": \"3kb\",\n \"size.memory\": \"0\",\n \"committed\": \"false\",\n \"searchable\": \"true\",\n \"version\": \"9.12.0\",\n \"compound\": \"true\"\n }\n]" + } + } + } } } }, - "x-state": "Added in 7.0.0", - "x-api-name" : "delete_voting_config_exclusions", - "x-namespace": "cluster" - } - }, - "/_component_template": { - "get": { - "tags": [ - "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/segments/{index}\n
\n " ], - "summary": "Get component templates", - "description": "Get information about component templates.", - "operationId": "cluster-get-component-template", - "parameters": [ - { - "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" - }, - { - "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" - }, - { - "$ref": "#/components/parameters/cluster.get_component_template-local" - }, - { - "$ref": "#/components/parameters/cluster.get_component_template-master_timeout" - } + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/cluster.get_component_template-200" + "x-api": "segments.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.8.0", - "x-api-name" : "get_component_template", - "x-namespace": "cluster" + ] } }, - "/_cluster/settings": { + "/_cat/shards": { "get": { "tags": [ - "cluster" + "cat" ], - "summary": "Get cluster-wide settings", - "description": "By default, it returns only settings that have been explicitly defined.", - "operationId": "cluster-get-settings", + "summary": "Get shard information", + "description": "Get information about the shards in a cluster.\nFor data streams, the API returns information about the backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", + "operationId": "cat-shards", "parameters": [ { "in": "query", - "name": "flat_settings", - "description": "If `true`, returns settings in flat format.", + "name": "h", + "description": "List of columns to appear in the response. Supports simple wildcards.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/cat._types.CatShardColumns" }, "style": "form" }, { "in": "query", - "name": "include_defaults", - "description": "If `true`, returns default cluster settings from the local node.", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Names" }, "style": "form" }, { "in": "query", "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -4702,71 +6188,104 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "persistent": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "transient": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "defaults": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.shards.ShardsRecord" + } + }, + "examples": { + "CatShardsResponseExample1": { + "summary": "A single data stream or index", + "description": "A successful response from `GET _cat/shards?format=json`.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n }\n]" }, - "required": [ - "persistent", - "transient" - ] - } - } - } + "CatShardsResponseExample2": { + "summary": "A wildcard pattern", + "description": "A successful response from `GET _cat/shards/my-index-*?format=json`. It returns information for any data streams or indices beginning with `my-index-`.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n }\n]" + }, + "CatShardsResponseExample3": { + "summary": "A relocating shard", + "description": "A successful response from `GET _cat/shards?format=json`. The `RELOCATING` value in the `state` column indicates the index shard is relocating.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"RELOCATING\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA -> -> 192.168.56.30 bGG90GE\"\n }\n]" + }, + "CatShardsResponseExample4": { + "summary": "Shard states", + "description": "A successful response from `GET _cat/shards?format=json`. Before a shard is available for use, it goes through an `INITIALIZING` state. You can use the cat shards API to see which shards are initializing.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"INITIALIZING\",\n \"docs\": \"0\",\n \"store\": \"14.3mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.30\",\n \"node\": \"bGG90GE\"\n }\n]" + }, + "CatShardsResponseExample5": { + "summary": "Reasons for unassigned shards", + "description": "A successful response from `GET _cat/shards?h=index,shard,prirep,state,unassigned.reason&format=json`. It includes the `unassigned.reason` column, which indicates why a shard is unassigned.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.10 H5dfFeA\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.30 bGG90GE\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.20 I8hydUG\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"UNASSIGNED\",\n \"unassigned.reason\": \"ALLOCATION_FAILED\"\n }\n]" + } + } + } + } } }, - "x-api-name" : "get_settings", - "x-namespace": "cluster" - }, - "put": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/shards\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" + ], + "x-api": "shards.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cat/shards/{index}": { + "get": { "tags": [ - "cluster" + "cat" ], - "summary": "Update the cluster settings", - "description": "Configure and update dynamic settings on a running cluster.\nYou can also configure dynamic settings locally on an unstarted or shut down node in `elasticsearch.yml`.\n\nUpdates made with this API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart.\nYou can also reset transient or persistent settings by assigning them a null value.\n\nIf you configure the same setting using multiple methods, Elasticsearch applies the settings in following order of precedence: 1) Transient setting; 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting value.\nFor example, you can apply a transient setting to override a persistent setting or `elasticsearch.yml` setting.\nHowever, a change to an `elasticsearch.yml` setting will not override a defined transient or persistent setting.\n\nTIP: In Elastic Cloud, use the user settings feature to configure all cluster settings. This method automatically rejects unsafe settings that could break your cluster.\nIf you run Elasticsearch on your own hardware, use this API to configure dynamic cluster settings.\nOnly use `elasticsearch.yml` for static cluster settings and node settings.\nThe API doesn’t require a restart and ensures a setting’s value is the same on all nodes.\n\nWARNING: Transient cluster settings are no longer recommended. Use persistent cluster settings instead.\nIf a cluster becomes unstable, transient settings can clear unexpectedly, resulting in a potentially undesired cluster configuration.", - "operationId": "cluster-put-settings", + "summary": "Get shard information", + "description": "Get information about the shards in a cluster.\nFor data streams, the API returns information about the backing indices.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.", + "operationId": "cat-shards-1", "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, { "in": "query", - "name": "flat_settings", - "description": "Return settings in flat format (default: false)", + "name": "h", + "description": "List of columns to appear in the response. Supports simple wildcards.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/cat._types.CatShardColumns" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Explicit operation timeout for connection to master node", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Names" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Explicit operation timeout", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -4774,208 +6293,114 @@ "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "persistent": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "transient": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - }, - "examples": { - "ClusterPutSettingsRequestExample1": { - "summary": "A simple setting", - "description": "An example of a persistent update.", - "value": "{\n \"persistent\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"50mb\"\n }\n}" - }, - "ClusterPutSettingsRequestExample2": { - "summary": "A setting with multiple patterns", - "description": "PUT `/_cluster/settings` to update the `action.auto_create_index` setting. The setting accepts a comma-separated list of patterns that you want to allow or you can prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked. In this example, the auto-creation of indices called `my-index-000001` or `index10` is allowed, the creation of indices that match the pattern `index1*` is blocked, and the creation of any other indices that match the `ind*` pattern is allowed. Patterns are matched in the order specified.\n", - "value": "{\n \"persistent\": {\n \"action.auto_create_index\": \"my-index-000001,index10,-index1*,+ind*\" \n }\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "persistent": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "transient": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.shards.ShardsRecord" + } + }, + "examples": { + "CatShardsResponseExample1": { + "summary": "A single data stream or index", + "description": "A successful response from `GET _cat/shards?format=json`.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n }\n]" }, - "required": [ - "acknowledged", - "persistent", - "transient" - ] + "CatShardsResponseExample2": { + "summary": "A wildcard pattern", + "description": "A successful response from `GET _cat/shards/my-index-*?format=json`. It returns information for any data streams or indices beginning with `my-index-`.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n }\n]" + }, + "CatShardsResponseExample3": { + "summary": "A relocating shard", + "description": "A successful response from `GET _cat/shards?format=json`. The `RELOCATING` value in the `state` column indicates the index shard is relocating.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"RELOCATING\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA -> -> 192.168.56.30 bGG90GE\"\n }\n]" + }, + "CatShardsResponseExample4": { + "summary": "Shard states", + "description": "A successful response from `GET _cat/shards?format=json`. Before a shard is available for use, it goes through an `INITIALIZING` state. You can use the cat shards API to see which shards are initializing.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"INITIALIZING\",\n \"docs\": \"0\",\n \"store\": \"14.3mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.30\",\n \"node\": \"bGG90GE\"\n }\n]" + }, + "CatShardsResponseExample5": { + "summary": "Reasons for unassigned shards", + "description": "A successful response from `GET _cat/shards?h=index,shard,prirep,state,unassigned.reason&format=json`. It includes the `unassigned.reason` column, which indicates why a shard is unassigned.\n", + "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.10 H5dfFeA\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.30 bGG90GE\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.20 I8hydUG\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"UNASSIGNED\",\n \"unassigned.reason\": \"ALLOCATION_FAILED\"\n }\n]" + } } } } } }, - "x-api-name" : "put_settings", - "x-namespace": "cluster" - } - }, - "/_cluster/health": { - "get": { - "tags": [ - "cluster" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/shards/{index}\n
\n " ], - "summary": "Get the cluster health status", - "description": "You can also use the API to get the health status of only specified data streams and indices.\nFor data streams, the API retrieves the health status of the stream’s backing indices.\n\nThe cluster health status is: green, yellow or red.\nOn the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated.\nThe index level status is controlled by the worst shard status.\n\nOne of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level.\nThe cluster status is controlled by the worst index status.", - "operationId": "cluster-health", - "parameters": [ - { - "$ref": "#/components/parameters/cluster.health-expand_wildcards" - }, - { - "$ref": "#/components/parameters/cluster.health-level" - }, - { - "$ref": "#/components/parameters/cluster.health-local" - }, - { - "$ref": "#/components/parameters/cluster.health-master_timeout" - }, - { - "$ref": "#/components/parameters/cluster.health-timeout" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_active_shards" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_events" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_nodes" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_no_initializing_shards" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_no_relocating_shards" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_status" - } + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/cluster.health-200" + "x-api": "shards.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "health", - "x-namespace": "cluster" + ] } }, - "/_cluster/health/{index}": { + "/_cat/snapshots": { "get": { "tags": [ - "cluster" + "cat" ], - "summary": "Get the cluster health status", - "description": "You can also use the API to get the health status of only specified data streams and indices.\nFor data streams, the API retrieves the health status of the stream’s backing indices.\n\nThe cluster health status is: green, yellow or red.\nOn the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated.\nThe index level status is controlled by the worst shard status.\n\nOne of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level.\nThe cluster status is controlled by the worst index status.", - "operationId": "cluster-health-1", + "summary": "Get snapshot information", + "description": "Get information about the snapshots stored in one or more repositories.\nA snapshot is a backup of an index or running Elasticsearch cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.", + "operationId": "cat-snapshots", "parameters": [ { - "$ref": "#/components/parameters/cluster.health-index" - }, - { - "$ref": "#/components/parameters/cluster.health-expand_wildcards" - }, - { - "$ref": "#/components/parameters/cluster.health-level" - }, - { - "$ref": "#/components/parameters/cluster.health-local" - }, - { - "$ref": "#/components/parameters/cluster.health-master_timeout" - }, - { - "$ref": "#/components/parameters/cluster.health-timeout" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_active_shards" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_events" - }, - { - "$ref": "#/components/parameters/cluster.health-wait_for_nodes" + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, the response does not include information from unavailable snapshots.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.health-wait_for_no_initializing_shards" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.health-wait_for_no_relocating_shards" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.health-wait_for_status" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cluster.health-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "health", - "x-namespace": "cluster" - } - }, - "/_info/{target}": { - "get": { - "tags": [ - "cluster" - ], - "summary": "Get cluster info", - "description": "Returns basic information about the cluster.", - "operationId": "cluster-info", - "parameters": [ - { - "in": "path", - "name": "target", - "description": "Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest.\n\nSupported values include: `_all`, `http`, `ingest`, `thread_pool`, `script`\n\n", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ClusterInfoTargets" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" } ], "responses": { @@ -4984,63 +6409,92 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "http": { - "$ref": "#/components/schemas/nodes._types.Http" - }, - "ingest": { - "$ref": "#/components/schemas/nodes._types.Ingest" - }, - "thread_pool": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.ThreadCount" - } - }, - "script": { - "$ref": "#/components/schemas/nodes._types.Scripting" - } - }, - "required": [ - "cluster_name" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.snapshots.SnapshotsRecord" + } + }, + "examples": { + "CatSnapshotsResponseExample1": { + "description": "A successful response from `GET /_cat/snapshots/repo1?v=true&s=id&format=json`.\n", + "value": "[\n {\n \"id\": \"snap1\",\n \"repository\": \"repo1\",\n \"status\": \"FAILED\",\n \"start_epoch\": \"1445616705\",\n \"start_time\": \"18:11:45\",\n \"end_epoch\": \"1445616978\",\n \"end_time\": \"18:16:18\",\n \"duration\": \"4.6m\",\n \"indices\": \"1\",\n \"successful_shards\": \"4\",\n \"failed_shards\": \"1\",\n \"total_shards\": \"5\"\n },\n {\n \"id\": \"snap2\",\n \"repository\": \"repo1\",\n \"status\": \"SUCCESS\",\n \"start_epoch\": \"1445634298\",\n \"start_time\": \"23:04:58\",\n \"end_epoch\": \"1445634672\",\n \"end_time\": \"23:11:12\",\n \"duration\": \"6.2m\",\n \"indices\": \"2\",\n \"successful_shards\": \"10\",\n \"failed_shards\": \"0\",\n \"total_shards\": \"10\"\n }\n]" + } } } } } }, - "x-state": "Added in 8.9.0", - "x-api-name" : "info", - "x-namespace": "cluster" + "x-state": "Generally available; Added in 2.1.0", + "x-variations": [ + "
\n GET\n /_cat/snapshots\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" + ], + "x-api": "snapshots.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cluster/pending_tasks": { + "/_cat/snapshots/{repository}": { "get": { "tags": [ - "cluster" + "cat" ], - "summary": "Get the pending cluster tasks", - "description": "Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect.\n\nNOTE: This API returns a list of any pending updates to the cluster state.\nThese are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests.\nHowever, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.", - "operationId": "cluster-pending-tasks", + "summary": "Get snapshot information", + "description": "Get information about the snapshots stored in one or more repositories.\nA snapshot is a backup of an index or running Elasticsearch cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.", + "operationId": "cat-snapshots-1", "parameters": [ + { + "in": "path", + "name": "repository", + "description": "A comma-separated list of snapshot repositories used to limit the request.\nAccepts wildcard expressions.\n`_all` returns all repositories.\nIf any repository fails during the request, Elasticsearch returns an error.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, { "in": "query", - "name": "local", - "description": "If `true`, the request retrieves information from the local node only.\nIf `false`, information is retrieved from the master node.", + "name": "ignore_unavailable", + "description": "If `true`, the response does not include information from unavailable snapshots.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" }, + { + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, { "in": "query", "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -5054,81 +6508,64 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "tasks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.pending_tasks.PendingTask" - } - } - }, - "required": [ - "tasks" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.snapshots.SnapshotsRecord" + } + }, + "examples": { + "CatSnapshotsResponseExample1": { + "description": "A successful response from `GET /_cat/snapshots/repo1?v=true&s=id&format=json`.\n", + "value": "[\n {\n \"id\": \"snap1\",\n \"repository\": \"repo1\",\n \"status\": \"FAILED\",\n \"start_epoch\": \"1445616705\",\n \"start_time\": \"18:11:45\",\n \"end_epoch\": \"1445616978\",\n \"end_time\": \"18:16:18\",\n \"duration\": \"4.6m\",\n \"indices\": \"1\",\n \"successful_shards\": \"4\",\n \"failed_shards\": \"1\",\n \"total_shards\": \"5\"\n },\n {\n \"id\": \"snap2\",\n \"repository\": \"repo1\",\n \"status\": \"SUCCESS\",\n \"start_epoch\": \"1445634298\",\n \"start_time\": \"23:04:58\",\n \"end_epoch\": \"1445634672\",\n \"end_time\": \"23:11:12\",\n \"duration\": \"6.2m\",\n \"indices\": \"2\",\n \"successful_shards\": \"10\",\n \"failed_shards\": \"0\",\n \"total_shards\": \"10\"\n }\n]" + } } } } } }, - "x-api-name" : "pending_tasks", - "x-namespace": "cluster" - } - }, - "/_remote/info": { - "get": { - "tags": [ - "cluster" + "x-state": "Generally available; Added in 2.1.0", + "x-variations": [ + "
\n GET\n /_cat/snapshots/{repository}\n
\n " ], - "summary": "Get remote cluster information", - "description": "Get information about configured remote clusters.\nThe API returns connection and endpoint information keyed by the configured remote cluster alias.\n\n> info\n> This API returns information that reflects current state on the local cluster.\n> The `connected` field does not necessarily reflect whether a remote cluster is down or unavailable, only whether there is currently an open connection to it.\n> Elasticsearch does not spontaneously try to reconnect to a disconnected remote cluster.\n> To trigger a reconnection, attempt a cross-cluster search, ES|QL cross-cluster search, or try the [resolve cluster endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster).", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/cross-cluster-search" - }, - "operationId": "cluster-remote-info", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/cluster.remote_info.ClusterRemoteInfo" - } - } - } - } + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" + ], + "x-api": "snapshots.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "remote_info", - "x-namespace": "cluster" + ] } }, - "/_cluster/reroute": { - "post": { + "/_cat/tasks": { + "get": { "tags": [ - "cluster" + "cat" ], - "summary": "Reroute the cluster", - "description": "Manually change the allocation of individual shards in the cluster.\nFor example, a shard can be moved from one node to another explicitly, an allocation can be canceled, and an unassigned shard can be explicitly allocated to a specific node.\n\nIt is important to note that after processing any reroute commands Elasticsearch will perform rebalancing as normal (respecting the values of settings such as `cluster.routing.rebalance.enable`) in order to remain in a balanced state.\nFor example, if the requested allocation includes moving a shard from node1 to node2 then this may cause a shard to be moved from node2 back to node1 to even things out.\n\nThe cluster can be set to disable allocations using the `cluster.routing.allocation.enable` setting.\nIf allocations are disabled then the only allocations that will be performed are explicit ones given using the reroute command, and consequent allocations due to rebalancing.\n\nThe cluster will attempt to allocate a shard a maximum of `index.allocation.max_retries` times in a row (defaults to `5`), before giving up and leaving the shard unallocated.\nThis scenario can be caused by structural problems such as having an analyzer which refers to a stopwords file which doesn’t exist on all nodes.\n\nOnce the problem has been corrected, allocation can be manually retried by calling the reroute API with the `?retry_failed` URI query parameter, which will attempt a single retry round for these shards.", - "operationId": "cluster-reroute", + "summary": "Get task information", + "description": "Get information about tasks currently running in the cluster.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.", + "operationId": "cat-tasks", "parameters": [ { "in": "query", - "name": "dry_run", - "description": "If true, then the request simulates the operation.\nIt will calculate the result of applying the commands to the current cluster state and return the resulting cluster state after the commands (and rebalancing) have been applied; it will not actually perform the requested changes.", + "name": "actions", + "description": "The task action names, which are used to limit the response.", "deprecated": false, "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } }, "style": "form" }, { "in": "query", - "name": "explain", - "description": "If true, then the response contains an explanation of why the commands can or cannot run.", + "name": "detailed", + "description": "If `true`, the response includes detailed information about shard recoveries.", "deprecated": false, "schema": { "type": "boolean" @@ -5137,319 +6574,341 @@ }, { "in": "query", - "name": "metric", - "description": "Limits the information returned to the specified metrics.", + "name": "nodes", + "description": "Unique node identifiers, which are used to limit the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Metrics" + "type": "array", + "items": { + "type": "string" + } }, "style": "form" }, { "in": "query", - "name": "retry_failed", - "description": "If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.", + "name": "parent_task_id", + "description": "The parent task identifier, which is used to limit the response.", "deprecated": false, "schema": { - "type": "boolean" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/cat._types.CatTasksColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" }, "style": "form" }, { "in": "query", "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request blocks until the task has completed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "commands": { - "description": "Defines the commands to perform.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.reroute.Command" - } - } - } - }, - "examples": { - "ClusterRerouteRequestExample1": { - "description": "Run `POST /_cluster/reroute?metric=none` to changes the allocation of shards in a cluster.", - "value": "{\n \"commands\": [\n {\n \"move\": {\n \"index\": \"test\", \"shard\": 0,\n \"from_node\": \"node1\", \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\", \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ]\n}" - } - } - } - } - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "explanations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.reroute.RerouteExplanation" - } - }, - "state": { - "description": "There aren't any guarantees on the output/structure of the raw cluster state.\nHere you will find the internal representation of the cluster, which can\ndiffer from the external representation.", - "type": "object" - } - }, - "required": [ - "acknowledged" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.tasks.TasksRecord" + } + }, + "examples": { + "CatTasksResponseExample1": { + "description": "A successful response from `GET _cat/tasks?v=true&format=json`.", + "value": "[\n {\n \"action\": \"cluster:monitor/tasks/lists[n]\",\n \"task_id\": \"oTUltX4IQMOUUVeiohTt8A:124\",\n \"parent_task_id\": \"oTUltX4IQMOUUVeiohTt8A:123\",\n \"type\": \"direct\",\n \"start_time\": \"1458585884904\",\n \"timestamp\": \"01:48:24\",\n \"running_time\": \"44.1micros\",\n \"ip\": \"127.0.0.1:9300\",\n \"node\": \"oTUltX4IQMOUUVeiohTt8A\"\n },\n {\n \"action\": \"cluster:monitor/tasks/lists\",\n \"task_id\": \"oTUltX4IQMOUUVeiohTt8A:123\",\n \"parent_task_id\": \"-\",\n \"type\": \"transport\",\n \"start_time\": \"1458585884904\",\n \"timestamp\": \"01:48:24\",\n \"running_time\": \"186.2micros\",\n \"ip\": \"127.0.0.1:9300\",\n \"node\": \"oTUltX4IQMOUUVeiohTt8A\"\n }\n]" + } } } } } }, - "x-state": "Added in 5.0.0", - "x-api-name" : "reroute", - "x-namespace": "cluster" + "x-state": "Technical preview; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_cat/tasks\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "tasks.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_cluster/state": { + "/_cat/templates": { "get": { "tags": [ - "cluster" + "cat" ], - "summary": "Get the cluster state", - "description": "Get comprehensive information about the state of the cluster.\n\nThe cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster.\n\nThe elected master node ensures that every node in the cluster has a copy of the same cluster state.\nThis API lets you retrieve a representation of this internal state for debugging or diagnostic purposes.\nYou may need to consult the Elasticsearch source code to determine the precise meaning of the response.\n\nBy default the API will route requests to the elected master node since this node is the authoritative source of cluster states.\nYou can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter.\n\nElasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data.\nIf you use this API repeatedly, your cluster may become unstable.\n\nWARNING: The response is a representation of an internal data structure.\nIts format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version.\nDo not query this API using external monitoring tools.\nInstead, obtain the information you require using other more stable cluster APIs.", - "operationId": "cluster-state", + "summary": "Get index template information", + "description": "Get information about the index templates in a cluster.\nYou can use index templates to apply index settings and field mappings to new indices at creation.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.", + "operationId": "cat-templates", "parameters": [ { - "$ref": "#/components/parameters/cluster.state-allow_no_indices" - }, - { - "$ref": "#/components/parameters/cluster.state-expand_wildcards" - }, - { - "$ref": "#/components/parameters/cluster.state-flat_settings" - }, - { - "$ref": "#/components/parameters/cluster.state-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/cluster.state-local" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatTemplatesColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.state-master_timeout" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.state-wait_for_metadata_version" + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.state-wait_for_timeout" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/cluster.state-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.templates.TemplatesRecord" + } + }, + "examples": { + "CatTemplatesResponseExample1": { + "description": "A successful response from `GET _cat/templates/my-template-*?v=true&s=name&format=json`.\n", + "value": "[\n {\n \"name\": \"my-template-0\",\n \"index_patterns\": \"[te*]\",\n \"order\": \"500\",\n \"version\": null,\n \"composed_of\": \"[]\"\n },\n {\n \"name\": \"my-template-1\",\n \"index_patterns\": \"[tea*]\",\n \"order\": \"501\",\n \"version\": null,\n \"composed_of\": \"[]\"\n },\n {\n \"name\": \"my-template-2\",\n \"index_patterns\": \"[teak*]\",\n \"order\": \"502\",\n \"version\": \"7\",\n \"composed_of\": \"[]\"\n }\n]" + } + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "state", - "x-namespace": "cluster" - } - }, - "/_cluster/state/{metric}": { - "get": { - "tags": [ - "cluster" + "x-state": "Generally available; Added in 5.2.0", + "x-variations": [ + "
\n GET\n /_cat/templates\n
\n " ], - "summary": "Get the cluster state", - "description": "Get comprehensive information about the state of the cluster.\n\nThe cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster.\n\nThe elected master node ensures that every node in the cluster has a copy of the same cluster state.\nThis API lets you retrieve a representation of this internal state for debugging or diagnostic purposes.\nYou may need to consult the Elasticsearch source code to determine the precise meaning of the response.\n\nBy default the API will route requests to the elected master node since this node is the authoritative source of cluster states.\nYou can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter.\n\nElasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data.\nIf you use this API repeatedly, your cluster may become unstable.\n\nWARNING: The response is a representation of an internal data structure.\nIts format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version.\nDo not query this API using external monitoring tools.\nInstead, obtain the information you require using other more stable cluster APIs.", - "operationId": "cluster-state-1", - "parameters": [ - { - "$ref": "#/components/parameters/cluster.state-metric" - }, - { - "$ref": "#/components/parameters/cluster.state-allow_no_indices" - }, - { - "$ref": "#/components/parameters/cluster.state-expand_wildcards" - }, - { - "$ref": "#/components/parameters/cluster.state-flat_settings" - }, - { - "$ref": "#/components/parameters/cluster.state-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/cluster.state-local" - }, - { - "$ref": "#/components/parameters/cluster.state-master_timeout" - }, - { - "$ref": "#/components/parameters/cluster.state-wait_for_metadata_version" - }, - { - "$ref": "#/components/parameters/cluster.state-wait_for_timeout" - } + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/cluster.state-200" + "x-api": "templates.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "state", - "x-namespace": "cluster" + ] } }, - "/_cluster/state/{metric}/{index}": { + "/_cat/templates/{name}": { "get": { "tags": [ - "cluster" + "cat" ], - "summary": "Get the cluster state", - "description": "Get comprehensive information about the state of the cluster.\n\nThe cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster.\n\nThe elected master node ensures that every node in the cluster has a copy of the same cluster state.\nThis API lets you retrieve a representation of this internal state for debugging or diagnostic purposes.\nYou may need to consult the Elasticsearch source code to determine the precise meaning of the response.\n\nBy default the API will route requests to the elected master node since this node is the authoritative source of cluster states.\nYou can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter.\n\nElasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data.\nIf you use this API repeatedly, your cluster may become unstable.\n\nWARNING: The response is a representation of an internal data structure.\nIts format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version.\nDo not query this API using external monitoring tools.\nInstead, obtain the information you require using other more stable cluster APIs.", - "operationId": "cluster-state-2", + "summary": "Get index template information", + "description": "Get information about the index templates in a cluster.\nYou can use index templates to apply index settings and field mappings to new indices at creation.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.", + "operationId": "cat-templates-1", "parameters": [ { - "$ref": "#/components/parameters/cluster.state-metric" - }, - { - "$ref": "#/components/parameters/cluster.state-index" - }, - { - "$ref": "#/components/parameters/cluster.state-allow_no_indices" - }, - { - "$ref": "#/components/parameters/cluster.state-expand_wildcards" - }, - { - "$ref": "#/components/parameters/cluster.state-flat_settings" - }, - { - "$ref": "#/components/parameters/cluster.state-ignore_unavailable" + "in": "path", + "name": "name", + "description": "The name of the template to return.\nAccepts wildcard expressions. If omitted, all templates are returned.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/cluster.state-local" + "in": "query", + "name": "h", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatTemplatesColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.state-master_timeout" + "in": "query", + "name": "s", + "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.state-wait_for_metadata_version" + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.state-wait_for_timeout" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/cluster.state-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.templates.TemplatesRecord" + } + }, + "examples": { + "CatTemplatesResponseExample1": { + "description": "A successful response from `GET _cat/templates/my-template-*?v=true&s=name&format=json`.\n", + "value": "[\n {\n \"name\": \"my-template-0\",\n \"index_patterns\": \"[te*]\",\n \"order\": \"500\",\n \"version\": null,\n \"composed_of\": \"[]\"\n },\n {\n \"name\": \"my-template-1\",\n \"index_patterns\": \"[tea*]\",\n \"order\": \"501\",\n \"version\": null,\n \"composed_of\": \"[]\"\n },\n {\n \"name\": \"my-template-2\",\n \"index_patterns\": \"[teak*]\",\n \"order\": \"502\",\n \"version\": \"7\",\n \"composed_of\": \"[]\"\n }\n]" + } + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "state", - "x-namespace": "cluster" - } - }, - "/_cluster/stats": { - "get": { - "tags": [ - "cluster" + "x-state": "Generally available; Added in 5.2.0", + "x-variations": [ + "
\n GET\n /_cat/templates/{name}\n
\n " ], - "summary": "Get cluster statistics", - "description": "Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).", - "operationId": "cluster-stats", - "parameters": [ - { - "$ref": "#/components/parameters/cluster.stats-include_remotes" - }, - { - "$ref": "#/components/parameters/cluster.stats-timeout" - } + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/cluster.stats-200" + "x-api": "templates.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "stats", - "x-namespace": "cluster" + ] } }, - "/_cluster/stats/nodes/{node_id}": { + "/_cat/thread_pool": { "get": { "tags": [ - "cluster" + "cat" ], - "summary": "Get cluster statistics", - "description": "Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).", - "operationId": "cluster-stats-1", + "summary": "Get thread pool statistics", + "description": "Get thread pool statistics for each node in a cluster.\nReturned information includes all built-in thread pools and custom thread pools.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", + "operationId": "cat-thread-pool", "parameters": [ { - "$ref": "#/components/parameters/cluster.stats-node_id" + "in": "query", + "name": "h", + "description": "List of columns to appear in the response. Supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatThreadPoolColumns" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.stats-include_remotes" + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" }, { - "$ref": "#/components/parameters/cluster.stats-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/cluster.stats-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "stats", - "x-namespace": "cluster" - } - }, - "/_connector/{connector_id}/_check_in": { - "put": { - "tags": [ - "connector" - ], - "summary": "Check in a connector", - "description": "Update the `last_seen` field in the connector and set it to the current timestamp.", - "operationId": "connector-check-in", - "parameters": [ + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be checked in", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" } ], "responses": { @@ -5458,59 +6917,103 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.thread_pool.ThreadPoolRecord" + } }, "examples": { - "ConnectorCheckInResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" + "CatThreadPoolResponseExample1": { + "summary": "Default columns", + "description": "A successful response from `GET /_cat/thread_pool?format=json`.\n", + "value": "[\n {\n \"node_name\": \"node-0\",\n \"name\": \"analyze\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"fetch_shard_started\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"fetch_shard_store\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"flush\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"write\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n }\n]" + }, + "CatThreadPoolResponseExample2": { + "summary": "Explicit columns", + "description": "A successful response from `GET /_cat/thread_pool/generic?v=true&h=id,name,active,rejected,completed&format=json`. It returns the `id`, `name`, `active`, `rejected`, and `completed` columns. It also limits returned information to the generic thread pool.\n", + "value": "[\n {\n \"id\": \"0EWUhXeBQtaVGlexUeVwMg\",\n \"name\": \"generic\",\n \"active\": \"0\",\n \"rejected\": \"0\",\n \"completed\": \"70\"\n }\n]" } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "check_in", - "x-namespace": "connector" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/thread_pool\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "thread_pool.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/{connector_id}": { + "/_cat/thread_pool/{thread_pool_patterns}": { "get": { "tags": [ - "connector" + "cat" ], - "summary": "Get a connector", - "description": "Get the details about a connector.", - "operationId": "connector-get", + "summary": "Get thread pool statistics", + "description": "Get thread pool statistics for each node in a cluster.\nReturned information includes all built-in thread pools and custom thread pools.\nIMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.", + "operationId": "cat-thread-pool-1", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector", + "name": "thread_pool_patterns", + "description": "A comma-separated list of thread pool names used to limit the request.\nAccepts wildcard expressions.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, { "in": "query", - "name": "include_deleted", - "description": "A flag to indicate if the desired connector should be fetched, even if it was soft-deleted.", + "name": "h", + "description": "List of columns to appear in the response. Supports simple wildcards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatThreadPoolColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -5519,75 +7022,100 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/connector._types.Connector" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.thread_pool.ThreadPoolRecord" + } + }, + "examples": { + "CatThreadPoolResponseExample1": { + "summary": "Default columns", + "description": "A successful response from `GET /_cat/thread_pool?format=json`.\n", + "value": "[\n {\n \"node_name\": \"node-0\",\n \"name\": \"analyze\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"fetch_shard_started\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"fetch_shard_store\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"flush\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"write\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n }\n]" + }, + "CatThreadPoolResponseExample2": { + "summary": "Explicit columns", + "description": "A successful response from `GET /_cat/thread_pool/generic?v=true&h=id,name,active,rejected,completed&format=json`. It returns the `id`, `name`, `active`, `rejected`, and `completed` columns. It also limits returned information to the generic thread pool.\n", + "value": "[\n {\n \"id\": \"0EWUhXeBQtaVGlexUeVwMg\",\n \"name\": \"generic\",\n \"active\": \"0\",\n \"rejected\": \"0\",\n \"completed\": \"70\"\n }\n]" + } } } } } }, - "x-beta": true, - "x-api-name" : "get", - "x-namespace": "connector" - }, - "put": { - "tags": [ - "connector" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cat/thread_pool/{thread_pool_patterns}\n
\n " ], - "summary": "Create or update a connector", - "operationId": "connector-put", - "parameters": [ - { - "$ref": "#/components/parameters/connector.put-connector_id" - } + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/connector.put" - }, - "responses": { - "200": { - "$ref": "#/components/responses/connector.put-200" + "x-api": "thread_pool.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-beta": true, - "x-api-name" : "put", - "x-namespace": "connector" - }, - "delete": { + ] + } + }, + "/_cat/transforms": { + "get": { "tags": [ - "connector" + "cat" ], - "summary": "Delete a connector", - "description": "Removes a connector and associated sync jobs.\nThis is a destructive action that is not recoverable.\nNOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector.\nThese need to be removed manually.", - "operationId": "connector-delete", + "summary": "Get transform information", + "description": "Get configuration and usage information about transforms.\n\nCAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get transform statistics API.", + "operationId": "cat-transforms", "parameters": [ { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be deleted", - "required": true, + "in": "query", + "name": "allow_no_match", + "description": "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.\nIf `true`, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches.\nIf `false`, the request returns a 404 status code when there are no matches or only partial matches.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "delete_sync_jobs", - "description": "A flag indicating if associated sync jobs should be also removed. Defaults to false.", + "name": "from", + "description": "Skips the specified number of transforms.", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "hard", - "description": "A flag indicating if the connector should be hard deleted.", + "name": "h", + "description": "Comma-separated list of column names to display.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/cat._types.CatTransformColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "s", + "description": "Comma-separated list of column names or column aliases used to sort the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/cat._types.CatTransformColumns" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "The maximum number of transforms to obtain.", + "deprecated": false, + "schema": { + "type": "number" }, "style": "form" } @@ -5598,98 +7126,178 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.transforms.TransformsRecord" + } }, "examples": { - "ConnectorDeleteResponseExample1": { - "value": "{\n \"acknowledged\": true\n}" + "CatTransformsResponseExample1": { + "description": "A successful response from `GET /_cat/transforms?v=true&format=json`.", + "value": "[\n {\n \"id\" : \"ecommerce_transform\",\n \"state\" : \"started\",\n \"checkpoint\" : \"1\",\n \"documents_processed\" : \"705\",\n \"checkpoint_progress\" : \"100.00\",\n \"changes_last_detection_time\" : null\n }\n]" } } } } } }, - "x-beta": true, - "x-api-name" : "delete", - "x-namespace": "connector" + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/transforms\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_transform`\n" + ], + "x-api": "transforms.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector": { + "/_cat/transforms/{transform_id}": { "get": { "tags": [ - "connector" + "cat" ], - "summary": "Get all connectors", - "description": "Get information about all connectors.", - "operationId": "connector-list", + "summary": "Get transform information", + "description": "Get configuration and usage information about transforms.\n\nCAT APIs are only intended for human consumption using the Kibana\nconsole or command line. They are not intended for use by applications. For\napplication consumption, use the get transform statistics API.", + "operationId": "cat-transforms-1", "parameters": [ { - "in": "query", - "name": "from", - "description": "Starting offset (default: 0)", + "in": "path", + "name": "transform_id", + "description": "A transform identifier or a wildcard expression.\nIf you do not specify one of these options, the API returns information for all transforms.", + "required": true, "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "size", - "description": "Specifies a max number of results to get", + "name": "allow_no_match", + "description": "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.\nIf `true`, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches.\nIf `false`, the request returns a 404 status code when there are no matches or only partial matches.", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "index_name", - "description": "A comma-separated list of connector index names to fetch connector documents for", + "name": "from", + "description": "Skips the specified number of transforms.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "connector_name", - "description": "A comma-separated list of connector names to fetch connector documents for", + "name": "h", + "description": "Comma-separated list of column names to display.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatTransformColumns" }, "style": "form" }, { "in": "query", - "name": "service_type", - "description": "A comma-separated list of connector service types to fetch connector documents for", + "name": "s", + "description": "Comma-separated list of column names or column aliases used to sort the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatTransformColumns" }, "style": "form" }, { "in": "query", - "name": "include_deleted", - "description": "A flag to indicate if the desired connector should be fetched, even if it was soft-deleted.", + "name": "size", + "description": "The maximum number of transforms to obtain.", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat.transforms.TransformsRecord" + } + }, + "examples": { + "CatTransformsResponseExample1": { + "description": "A successful response from `GET /_cat/transforms?v=true&format=json`.", + "value": "[\n {\n \"id\" : \"ecommerce_transform\",\n \"state\" : \"started\",\n \"checkpoint\" : \"1\",\n \"documents_processed\" : \"705\",\n \"checkpoint_progress\" : \"100.00\",\n \"changes_last_detection_time\" : null\n }\n]" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n GET\n /_cat/transforms/{transform_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_transform`\n" + ], + "x-api": "transforms.cat", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ccr/auto_follow/{name}": { + "get": { + "tags": [ + "ccr" + ], + "summary": "Get auto-follow patterns", + "description": "Get cross-cluster replication auto-follow patterns.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-get-auto-follow-pattern.html" + }, + "operationId": "ccr-get-auto-follow-pattern-1", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The auto-follow pattern collection that you want to retrieve.\nIf you do not specify a name, the API returns information for all collections.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { "in": "query", - "name": "query", - "description": "A wildcard query string that filters connectors with matching name, description or index name", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -5702,82 +7310,202 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "results": { + "patterns": { "type": "array", "items": { - "$ref": "#/components/schemas/connector._types.Connector" + "$ref": "#/components/schemas/ccr.get_auto_follow_pattern.AutoFollowPattern" } } }, "required": [ - "count", - "results" + "patterns" ] + }, + "examples": { + "GetAutoFollowPatternResponseExample1": { + "description": "A successful response from `GET /_ccr/auto_follow/my_auto_follow_pattern`, which gets auto-follow patterns.", + "value": "{\n \"patterns\": [\n {\n \"name\": \"my_auto_follow_pattern\",\n \"pattern\": {\n \"active\": true,\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"leader_index_exclusion_patterns\":\n [\n \"leader_index_001\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\"\n }\n }\n ]\n}" + } } } } } }, - "x-beta": true, - "x-api-name" : "list", - "x-namespace": "connector" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n GET\n /_ccr/auto_follow/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ccr`\n" + ], + "x-api": "get_auto_follow_pattern.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ - "connector" + "ccr" ], - "summary": "Create or update a connector", - "operationId": "connector-put-1", - "requestBody": { - "$ref": "#/components/requestBodies/connector.put" + "summary": "Create or update auto-follow patterns", + "description": "Create a collection of cross-cluster replication auto-follow patterns for a remote cluster.\nNewly created indices on the remote cluster that match any of the patterns are automatically configured as follower indices.\nIndices on the remote cluster that were created before the auto-follow pattern was created will not be auto-followed even if they match the pattern.\n\nThis API can also be used to update auto-follow patterns.\nNOTE: Follower indices that were configured automatically before updating an auto-follow pattern will remain unchanged even if they do not match against the new patterns.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-put-auto-follow-pattern.html" }, - "responses": { - "200": { - "$ref": "#/components/responses/connector.put-200" + "operationId": "ccr-put-auto-follow-pattern", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the collection of auto-follow patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - }, - "x-beta": true, - "x-api-name" : "put", - "x-namespace": "connector" - }, - "post": { - "tags": [ - "connector" ], - "summary": "Create a connector", - "description": "Connectors are Elasticsearch integrations that bring content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure.\nElastic managed connectors (Native connectors) are a managed service on Elastic Cloud.\nSelf-managed connectors (Connector clients) are self-managed on your infrastructure.", - "operationId": "connector-post", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "description": { + "remote_cluster": { + "description": "The remote cluster containing the leader indices to match against.", "type": "string" }, - "index_name": { - "$ref": "#/components/schemas/_types.IndexName" + "follow_index_pattern": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexPattern" + } + ] }, - "is_native": { - "type": "boolean" + "leader_index_patterns": { + "description": "An array of simple index patterns to match against indices in the remote cluster specified by the remote_cluster field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexPatterns" + } + ] }, - "language": { - "type": "string" + "leader_index_exclusion_patterns": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexPatterns" + } + ] }, - "name": { - "type": "string" + "max_outstanding_read_requests": { + "description": "The maximum number of outstanding reads requests from the remote cluster.", + "default": 12.0, + "type": "number" }, - "service_type": { - "type": "string" + "settings": { + "description": "Settings to override from the leader index. Note that certain settings can not be overrode (e.g., index.number_of_shards).", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "max_outstanding_write_requests": { + "description": "The maximum number of outstanding reads requests from the remote cluster.", + "default": 9.0, + "type": "number" + }, + "read_poll_timeout": { + "description": "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.", + "default": "1m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max_read_request_operation_count": { + "description": "The maximum number of operations to pull per read from the remote cluster.", + "default": 5120.0, + "type": "number" + }, + "max_read_request_size": { + "description": "The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.", + "default": "32mb", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "max_retry_delay": { + "description": "The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when retrying.", + "default": "500ms", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max_write_buffer_count": { + "description": "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.", + "default": 2147483647.0, + "type": "number" + }, + "max_write_buffer_size": { + "description": "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.", + "default": "512mb", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "max_write_request_operation_count": { + "description": "The maximum number of operations per bulk write request executed on the follower.", + "default": 5120.0, + "type": "number" + }, + "max_write_request_size": { + "description": "The maximum total bytes of operations per bulk write request executed on the follower.", + "default": "9223372036854775807b", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] } + }, + "required": [ + "remote_cluster" + ] + }, + "examples": { + "PutAutoFollowPatternRequestExample1": { + "description": "Run `PUT /_ccr/auto_follow/my_auto_follow_pattern` to creates an auto-follow pattern.\n", + "value": "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" } } } - } + }, + "required": true }, "responses": { "200": { @@ -5785,94 +7513,63 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "required": [ - "result", - "id" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "PutAutoFollowPatternResponseExample1": { + "description": "A successful response for creating an auto-follow pattern.", + "value": "{\n \"acknowledged\": true\n}" + } } } } } }, - "x-beta": true, - "x-api-name" : "post", - "x-namespace": "connector" - } - }, - "/_connector/_sync_job/{connector_sync_job_id}/_cancel": { - "put": { + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n PUT\n /_ccr/auto_follow/{name}\n
\n " + ], + "x-api": "put_auto_follow_pattern.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "connector" + "ccr" ], - "summary": "Cancel a connector sync job", - "description": "Cancel a connector sync job, which sets the status to cancelling and updates `cancellation_requested_at` to the current time.\nThe connector service is then responsible for setting the status of connector sync jobs to cancelled.", - "operationId": "connector-sync-job-cancel", + "summary": "Delete auto-follow patterns", + "description": "Delete a collection of cross-cluster replication auto-follow patterns.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-delete-auto-follow-pattern.html" + }, + "operationId": "ccr-delete-auto-follow-pattern", "parameters": [ { "in": "path", - "name": "connector_sync_job_id", - "description": "The unique identifier of the connector sync job", + "name": "name", + "description": "The auto-follow pattern collection to delete.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] - } - } - } - } - }, - "x-beta": true, - "x-api-name" : "sync_job_cancel", - "x-namespace": "connector" - } - }, - "/_connector/_sync_job/{connector_sync_job_id}/_check_in": { - "put": { - "tags": [ - "connector" - ], - "summary": "Check in a connector sync job", - "description": "Check in a connector sync job and set the `last_seen` field to the current time before updating it in the internal index.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", - "operationId": "connector-sync-job-check-in", - "parameters": [ + }, { - "in": "path", - "name": "connector_sync_job_id", - "description": "The unique identifier of the connector sync job to be checked in.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" } ], "responses": { @@ -5881,36 +7578,74 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "DeleteAutoFollowPatternResponseExample1": { + "description": "A successful response from `DELETE /_ccr/auto_follow/my_auto_follow_pattern`, which deletes an auto-follow pattern.", + "value": "{\n \"acknowledged\" : true\n}" + } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "sync_job_check_in", - "x-namespace": "connector" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n DELETE\n /_ccr/auto_follow/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ccr`\n" + ], + "x-api": "delete_auto_follow_pattern.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/_sync_job/{connector_sync_job_id}/_claim": { + "/{index}/_ccr/follow": { "put": { "tags": [ - "connector" + "ccr" ], - "summary": "Claim a connector sync job", - "description": "This action updates the job status to `in_progress` and sets the `last_seen` and `started_at` timestamps to the current time.\nAdditionally, it can set the `sync_cursor` property for the sync job.\n\nThis API is not intended for direct connector management by users.\nIt supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", - "operationId": "connector-sync-job-claim", + "summary": "Create a follower", + "description": "Create a cross-cluster replication follower index that follows a specific leader index.\nWhen the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.", + "operationId": "ccr-follow", "parameters": [ { "in": "path", - "name": "connector_sync_job_id", - "description": "The unique identifier of the connector sync job.", + "name": "index", + "description": "The name of the follower index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be\nactive.\nA shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the\nremote Lucene segment files to the follower index.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], "requestBody": { @@ -5919,18 +7654,101 @@ "schema": { "type": "object", "properties": { - "sync_cursor": { - "description": "The cursor object from the last incremental sync job.\nThis should reference the `sync_cursor` field in the connector state for which the job runs.", - "type": "object" + "data_stream_name": { + "description": "If the leader index is part of a data stream, the name to which the local data stream for the followed index should be renamed.", + "type": "string" }, - "worker_hostname": { - "description": "The host name of the current system that will run the job.", + "leader_index": { + "description": "The name of the index in the leader cluster to follow.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "max_outstanding_read_requests": { + "description": "The maximum number of outstanding reads requests from the remote cluster.", + "type": "number" + }, + "max_outstanding_write_requests": { + "description": "The maximum number of outstanding write requests on the follower.", + "type": "number" + }, + "max_read_request_operation_count": { + "description": "The maximum number of operations to pull per read from the remote cluster.", + "type": "number" + }, + "max_read_request_size": { + "description": "The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "max_retry_delay": { + "description": "The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when\nretrying.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max_write_buffer_count": { + "description": "The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be\ndeferred until the number of queued operations goes below the limit.", + "type": "number" + }, + "max_write_buffer_size": { + "description": "The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will\nbe deferred until the total bytes of queued operations goes below the limit.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "max_write_request_operation_count": { + "description": "The maximum number of operations per bulk write request executed on the follower.", + "type": "number" + }, + "max_write_request_size": { + "description": "The maximum total bytes of operations per bulk write request executed on the follower.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "read_poll_timeout": { + "description": "The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.\nWhen the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.\nThen the follower will immediately attempt to read from the leader again.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "remote_cluster": { + "description": "The remote cluster containing the leader index.", "type": "string" + }, + "settings": { + "description": "Settings to override from the leader index.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] } }, "required": [ - "worker_hostname" + "leader_index", + "remote_cluster" ] + }, + "examples": { + "CreateFollowIndexRequestExample1": { + "description": "Run `PUT /follower_index/_ccr/follow?wait_for_active_shards=1` to create a follower index named `follower_index`.", + "value": "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" + } } } }, @@ -5942,35 +7760,82 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "follow_index_created": { + "type": "boolean" + }, + "follow_index_shards_acked": { + "type": "boolean" + }, + "index_following_started": { + "type": "boolean" + } + }, + "required": [ + "follow_index_created", + "follow_index_shards_acked", + "index_following_started" + ] + }, + "examples": { + "CreateFollowIndexResponseExample1": { + "description": "A successful response from `PUT /follower_index/_ccr/follow?wait_for_active_shards=1`.", + "value": "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}" + } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "sync_job_claim", - "x-namespace": "connector" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n PUT\n /{index}/_ccr/follow\n
\n " + ], + "x-api": "follow.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/_sync_job/{connector_sync_job_id}": { + "/{index}/_ccr/info": { "get": { "tags": [ - "connector" + "ccr" ], - "summary": "Get a connector sync job", - "operationId": "connector-sync-job-get", + "summary": "Get follower information", + "description": "Get information about all cross-cluster replication follower indices.\nFor example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.", + "externalDocs": { + "description": "Cross-cluster replication", + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-get-follow-info.html" + }, + "operationId": "ccr-follow-info", "parameters": [ { "in": "path", - "name": "connector_sync_job_id", - "description": "The unique identifier of the connector sync job", + "name": "index", + "description": "A comma-delimited list of follower index patterns.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -5979,34 +7844,86 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/connector._types.ConnectorSyncJob" + "type": "object", + "properties": { + "follower_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ccr.follow_info.FollowerIndex" + } + } + }, + "required": [ + "follower_indices" + ] + }, + "examples": { + "FollowInfoResponseExample1": { + "summary": "An active follower index", + "description": "A successful response from `GET /follower_index/_ccr/info` when the follower index is active.", + "value": "{\n \"follower_indices\": [\n {\n \"follower_index\": \"follower_index\",\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index\": \"leader_index\",\n \"status\": \"active\",\n \"parameters\": {\n \"max_read_request_operation_count\": 5120,\n \"max_read_request_size\": \"32mb\",\n \"max_outstanding_read_requests\": 12,\n \"max_write_request_operation_count\": 5120,\n \"max_write_request_size\": \"9223372036854775807b\",\n \"max_outstanding_write_requests\": 9,\n \"max_write_buffer_count\": 2147483647,\n \"max_write_buffer_size\": \"512mb\",\n \"max_retry_delay\": \"500ms\",\n \"read_poll_timeout\": \"1m\"\n }\n }\n ]\n}" + }, + "FollowInfoResponseExample2": { + "summary": "A paused follower index", + "description": "A successful response from `GET /follower_index/_ccr/info` when the follower index is paused.", + "value": "{\n \"follower_indices\": [\n {\n \"follower_index\": \"follower_index\",\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index\": \"leader_index\",\n \"status\": \"paused\"\n }\n ]\n}" + } } } } } }, - "x-beta": true, - "x-api-name" : "sync_job_get", - "x-namespace": "connector" - }, - "delete": { + "x-state": "Generally available; Added in 6.7.0", + "x-variations": [ + "
\n GET\n /{index}/_ccr/info\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "follow_info.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_ccr/stats": { + "get": { "tags": [ - "connector" + "ccr" ], - "summary": "Delete a connector sync job", - "description": "Remove a connector sync job and its associated data.\nThis is a destructive action that is not recoverable.", - "operationId": "connector-sync-job-delete", + "summary": "Get follower stats", + "description": "Get cross-cluster replication follower stats.\nThe API returns shard-level stats about the \"following tasks\" associated with each shard for the specified indices.", + "externalDocs": { + "description": "Cross-cluster replication", + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-get-follow-stats.html" + }, + "operationId": "ccr-follow-stats", "parameters": [ { "in": "path", - "name": "connector_sync_job_id", - "description": "The unique identifier of the connector sync job to be deleted", + "name": "index", + "description": "A comma-delimited list of index patterns.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -6015,41 +7932,81 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "indices": { + "description": "An array of follower index statistics.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ccr._types.FollowIndexStats" + } + } + }, + "required": [ + "indices" + ] }, "examples": { - "SyncJobDeleteResponseExample1": { - "value": "{\n \"acknowledged\": true\n}" + "FollowIndexStatsResponseExample1": { + "description": "A successful response from `GET /follower_index/_ccr/stats`, which retrieves follower stats.", + "value": "{\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"total_global_checkpoint_lag\" : 256,\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n}" } } } } } }, - "x-beta": true, - "x-api-name" : "sync_job_delete", - "x-namespace": "connector" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n GET\n /{index}/_ccr/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "follow_stats.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/_sync_job/{connector_sync_job_id}/_error": { - "put": { + "/{index}/_ccr/forget_follower": { + "post": { "tags": [ - "connector" + "ccr" ], - "summary": "Set a connector sync job error", - "description": "Set the `error` field for a connector sync job and set its `status` to `error`.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", - "operationId": "connector-sync-job-error", + "summary": "Forget a follower", + "description": "Remove the cross-cluster replication follower retention leases from the leader.\n\nA following index takes out retention leases on its leader index.\nThese leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication.\nWhen a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed.\nHowever, removal of the leases can fail, for example when the remote cluster containing the leader index is unavailable.\nWhile the leases will eventually expire on their own, their extended existence can cause the leader index to hold more history than necessary and prevent index lifecycle management from performing some operations on the leader index.\nThis API exists to enable manually removing the leases when the unfollow API is unable to do so.\n\nNOTE: This API does not stop replication by a following index. If you use this API with a follower index that is still actively following, the following index will add back retention leases on the leader.\nThe only purpose of this API is to handle the case of failure to remove the following retention leases after the unfollow API is invoked.", + "externalDocs": { + "description": "Cross-cluster replication", + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-post-forget-follower.html" + }, + "operationId": "ccr-forget-follower", "parameters": [ { "in": "path", - "name": "connector_sync_job_id", - "description": "The unique identifier for the connector sync job.", + "name": "index", + "description": "Name of the leader index for which specified follower retention leases should be removed", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -6058,18 +8015,32 @@ "schema": { "type": "object", "properties": { - "error": { - "description": "The error for the connector sync job error field.", + "follower_cluster": { + "type": "string" + }, + "follower_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "follower_index_uuid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" + } + ] + }, + "leader_remote_cluster": { "type": "string" } - }, - "required": [ - "error" - ] + } }, "examples": { - "SyncJobErrorRequestExample1": { - "value": "{\n \"error\": \"some-error\"\n}" + "ForgetFollowerIndexRequestExample1": { + "description": "Run `POST //_ccr/forget_follower`.", + "value": "{\n \"follower_cluster\" : \"\",\n \"follower_index\" : \"\",\n \"follower_index_uuid\" : \"\",\n \"leader_remote_cluster\" : \"\"\n}" } } } @@ -6082,83 +8053,64 @@ "content": { "application/json": { "schema": { - "type": "object" - } - } - } - } - }, - "x-state": "Technical preview", - "x-api-name" : "sync_job_error", - "x-namespace": "connector" - } - }, - "/_connector/_sync_job": { - "get": { + "type": "object", + "properties": { + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + } + }, + "required": [ + "_shards" + ] + }, + "examples": { + "ForgetFollowerIndexResponseExample1": { + "description": "A successful response for removing the follower retention leases from the leader index.\n", + "value": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.7.0", + "x-variations": [ + "
\n POST\n /{index}/_ccr/forget_follower\n
\n " + ], + "x-api": "forget_follower.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ccr/auto_follow": { + "get": { "tags": [ - "connector" + "ccr" ], - "summary": "Get all connector sync jobs", - "description": "Get information about all stored connector sync jobs listed by their creation date in ascending order.", - "operationId": "connector-sync-job-list", + "summary": "Get auto-follow patterns", + "description": "Get cross-cluster replication auto-follow patterns.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-get-auto-follow-pattern.html" + }, + "operationId": "ccr-get-auto-follow-pattern", "parameters": [ { "in": "query", - "name": "from", - "description": "Starting offset (default: 0)", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "size", - "description": "Specifies a max number of results to get", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "status", - "description": "A sync job status to fetch connector sync jobs for", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/connector._types.SyncStatus" - }, - "style": "form" - }, - { - "in": "query", - "name": "connector_id", - "description": "A connector id to fetch connector sync jobs for", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "form" - }, - { - "in": "query", - "name": "job_type", - "description": "A comma-separated list of job types to fetch the sync jobs for\n\nSupported values include: `full`, `incremental`, `access_control`\n\n", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", "deprecated": false, "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types.SyncJobType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types.SyncJobType" - } - } - ] + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -6171,186 +8123,213 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "results": { + "patterns": { "type": "array", "items": { - "$ref": "#/components/schemas/connector._types.ConnectorSyncJob" + "$ref": "#/components/schemas/ccr.get_auto_follow_pattern.AutoFollowPattern" } } }, "required": [ - "count", - "results" + "patterns" ] + }, + "examples": { + "GetAutoFollowPatternResponseExample1": { + "description": "A successful response from `GET /_ccr/auto_follow/my_auto_follow_pattern`, which gets auto-follow patterns.", + "value": "{\n \"patterns\": [\n {\n \"name\": \"my_auto_follow_pattern\",\n \"pattern\": {\n \"active\": true,\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"leader_index_exclusion_patterns\":\n [\n \"leader_index_001\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\"\n }\n }\n ]\n}" + } } } } } }, - "x-beta": true, - "x-api-name" : "sync_job_list", - "x-namespace": "connector" - }, + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n GET\n /_ccr/auto_follow\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ccr`\n" + ], + "x-api": "get_auto_follow_pattern.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ccr/auto_follow/{name}/pause": { "post": { "tags": [ - "connector" + "ccr" ], - "summary": "Create a connector sync job", - "description": "Create a connector sync job document in the internal index and initialize its counters and timestamps with default values.", - "operationId": "connector-sync-job-post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "job_type": { - "$ref": "#/components/schemas/connector._types.SyncJobType" - }, - "trigger_method": { - "$ref": "#/components/schemas/connector._types.SyncJobTriggerMethod" - } - }, - "required": [ - "id" - ] - }, - "examples": { - "SyncJobPostRequestExample1": { - "value": "{\n \"id\": \"connector-id\",\n \"job_type\": \"full\",\n \"trigger_method\": \"on_demand\"\n}" - } - } - } - }, - "required": true + "summary": "Pause an auto-follow pattern", + "description": "Pause a cross-cluster replication auto-follow pattern.\nWhen the API returns, the auto-follow pattern is inactive.\nNew indices that are created on the remote cluster and match the auto-follow patterns are ignored.\n\nYou can resume auto-following with the resume auto-follow pattern API.\nWhen it resumes, the auto-follow pattern is active again and automatically configures follower indices for newly created indices on the remote cluster that match its patterns.\nRemote indices that were created while the pattern was paused will also be followed, unless they have been deleted or closed in the interim.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-pause-auto-follow-pattern.html" }, + "operationId": "ccr-pause-auto-follow-pattern", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the auto-follow pattern to pause.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "required": [ - "id" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "PauseAutoFollowPatternResponseExample1": { + "description": "A successful response from `POST /_ccr/auto_follow/my_auto_follow_pattern/pause`, which pauses an auto-follow pattern.", + "value": "{\n \"acknowledged\" : true\n}" + } } } } } }, - "x-beta": true, - "x-api-name" : "sync_job_post", - "x-namespace": "connector" + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_ccr/auto_follow/{name}/pause\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ccr`\n" + ], + "x-api": "pause_auto_follow_pattern.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/_sync_job/{connector_sync_job_id}/_stats": { - "put": { + "/{index}/_ccr/pause_follow": { + "post": { "tags": [ - "connector" + "ccr" ], - "summary": "Set the connector sync job stats", - "description": "Stats include: `deleted_document_count`, `indexed_document_count`, `indexed_document_volume`, and `total_document_count`.\nYou can also update `last_seen`.\nThis API is mainly used by the connector service for updating sync job information.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", - "operationId": "connector-sync-job-update-stats", + "summary": "Pause a follower", + "description": "Pause a cross-cluster replication follower index.\nThe follower index will not fetch any additional operations from the leader index.\nYou can resume following with the resume follower API.\nYou can pause and resume a follower index to change the configuration of the following task.", + "operationId": "ccr-pause-follow", "parameters": [ { "in": "path", - "name": "connector_sync_job_id", - "description": "The unique identifier of the connector sync job.", + "name": "index", + "description": "The name of the follower index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "deleted_document_count": { - "description": "The number of documents the sync job deleted.", - "type": "number" - }, - "indexed_document_count": { - "description": "The number of documents the sync job indexed.", - "type": "number" - }, - "indexed_document_volume": { - "description": "The total size of the data (in MiB) the sync job indexed.", - "type": "number" - }, - "last_seen": { - "$ref": "#/components/schemas/_types.Duration" - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "total_document_count": { - "description": "The total number of documents in the target index after the sync job finished.", - "type": "number" - } - }, - "required": [ - "deleted_document_count", - "indexed_document_count", - "indexed_document_volume" - ] - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "PauseFollowIndexResponseExample1": { + "description": "A successful response from `POST /follower_index/_ccr/pause_follow`, which pauses a follower index.", + "value": "{\n \"acknowledged\" : true\n}" + } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "sync_job_update_stats", - "x-namespace": "connector" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n POST\n /{index}/_ccr/pause_follow\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ccr`\n" + ], + "x-api": "pause_follow.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/{connector_id}/_filtering/_activate": { - "put": { + "/_ccr/auto_follow/{name}/resume": { + "post": { "tags": [ - "connector" + "ccr" ], - "summary": "Activate the connector draft filter", - "description": "Activates the valid draft filtering for a connector.", - "operationId": "connector-update-active-filtering", + "summary": "Resume an auto-follow pattern", + "description": "Resume a cross-cluster replication auto-follow pattern that was paused.\nThe auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster.\nRemote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-resume-auto-follow-pattern.html" + }, + "operationId": "ccr-resume-auto-follow-pattern", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", + "name": "name", + "description": "The name of the auto-follow pattern to resume.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -6359,44 +8338,69 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "ResumeAutoFollowPatternResponseExample1": { + "description": "A successful response `POST /_ccr/auto_follow/my_auto_follow_pattern/resume`, which resumes an auto-follow pattern.\n", + "value": "{\n \"acknowledged\" : true\n}" + } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "update_active_filtering", - "x-namespace": "connector" + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_ccr/auto_follow/{name}/resume\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ccr`\n" + ], + "x-api": "resume_auto_follow_pattern.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/{connector_id}/_api_key_id": { - "put": { + "/{index}/_ccr/resume_follow": { + "post": { "tags": [ - "connector" + "ccr" ], - "summary": "Update the connector API key ID", - "description": "Update the `api_key_id` and `api_key_secret_id` fields of a connector.\nYou can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored.\nThe connector secret ID is required only for Elastic managed (native) connectors.\nSelf-managed connectors (connector clients) do not use this field.", - "operationId": "connector-update-api-key-id", + "summary": "Resume a follower", + "description": "Resume a cross-cluster replication follower index that was paused.\nThe follower index could have been paused with the pause follower API.\nAlternatively it could be paused due to replication that cannot be retried due to failures during following tasks.\nWhen this API returns, the follower index will resume fetching operations from the leader index.", + "externalDocs": { + "description": "Cross-cluster replication", + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-post-resume-follow.html" + }, + "operationId": "ccr-resume-follow", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", + "name": "index", + "description": "Name of the follow index to resume following", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -6405,22 +8409,54 @@ "schema": { "type": "object", "properties": { - "api_key_id": { + "max_outstanding_read_requests": { + "type": "number" + }, + "max_outstanding_write_requests": { + "type": "number" + }, + "max_read_request_operation_count": { + "type": "number" + }, + "max_read_request_size": { "type": "string" }, - "api_key_secret_id": { + "max_retry_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max_write_buffer_count": { + "type": "number" + }, + "max_write_buffer_size": { + "type": "string" + }, + "max_write_request_operation_count": { + "type": "number" + }, + "max_write_request_size": { "type": "string" + }, + "read_poll_timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] } } }, "examples": { - "ConnectorUpdateApiKeyIDRequestExample1": { - "value": "{\n \"api_key_id\": \"my-api-key-id\",\n \"api_key_secret_id\": \"my-connector-secret-id\"\n}" + "ResumeFollowIndexRequestExample1": { + "description": "Run `POST /follower_index/_ccr/resume_follow` to resume the follower index.", + "value": "{\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -6428,80 +8464,62 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, "examples": { - "ConnectorUpdateAPIKeyIDResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" + "ResumeFollowIndexResponseExample1": { + "description": "A successful response from resuming a folower index.", + "value": "{\n \"acknowledged\" : true\n}" } } } } } }, - "x-beta": true, - "x-api-name" : "update_api_key_id", - "x-namespace": "connector" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n POST\n /{index}/_ccr/resume_follow\n
\n " + ], + "x-api": "resume_follow.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/{connector_id}/_configuration": { - "put": { + "/_ccr/stats": { + "get": { "tags": [ - "connector" + "ccr" ], - "summary": "Update the connector configuration", - "description": "Update the configuration field in the connector document.", - "operationId": "connector-update-configuration", + "summary": "Get cross-cluster replication stats", + "description": "This API returns stats about auto-following and the same shard-level stats as the get follower stats API.", + "operationId": "ccr-stats", "parameters": [ { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "configuration": { - "$ref": "#/components/schemas/connector._types.ConnectorConfiguration" - }, - "values": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - }, - "examples": { - "ConnectorUpdateConfigurationRequestExample1": { - "value": "{\n \"values\": {\n \"tenant_id\": \"my-tenant-id\",\n \"tenant_name\": \"my-sharepoint-site\",\n \"client_id\": \"foo\",\n \"secret_value\": \"bar\",\n \"site_collections\": \"*\"\n }\n}" - }, - "ConnectorUpdateConfigurationRequestExample2": { - "value": "{\n \"values\": {\n \"secret_value\": \"foo-bar\"\n }\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", @@ -6510,47 +8528,168 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "auto_follow_stats": { + "description": "Statistics for the auto-follow coordinator.", + "allOf": [ + { + "$ref": "#/components/schemas/ccr.stats.AutoFollowStats" + } + ] + }, + "follow_stats": { + "description": "Shard-level statistics for follower indices.", + "allOf": [ + { + "$ref": "#/components/schemas/ccr.stats.FollowStats" + } + ] } }, "required": [ - "result" + "auto_follow_stats", + "follow_stats" ] }, "examples": { - "ConnectorUpdateConfigurationResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" + "CcrStatsResponseExample1": { + "description": "A successful response from `GET /_ccr/stats` that returns cross-cluster replication stats.", + "value": "{\n \"auto_follow_stats\" : {\n \"number_of_failed_follow_indices\" : 0,\n \"number_of_failed_remote_cluster_state_requests\" : 0,\n \"number_of_successful_follow_indices\" : 1,\n \"recent_auto_follow_errors\" : [],\n \"auto_followed_clusters\" : []\n },\n \"follow_stats\" : {\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"total_global_checkpoint_lag\" : 256,\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n }\n}" } } } } } }, - "x-beta": true, - "x-api-name" : "update_configuration", - "x-namespace": "connector" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n GET\n /_ccr/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "stats.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/{connector_id}/_error": { - "put": { + "/{index}/_ccr/unfollow": { + "post": { "tags": [ - "connector" + "ccr" ], - "summary": "Update the connector error field", - "description": "Set the error field for the connector.\nIf the error provided in the request body is non-null, the connector’s status is updated to error.\nOtherwise, if the error is reset to null, the connector status is updated to connected.", - "operationId": "connector-update-error", + "summary": "Unfollow an index", + "description": "Convert a cross-cluster replication follower index to a regular index.\nThe API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.\nThe follower index must be paused and closed before you call the unfollow API.\n\n> info\n> Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.", + "externalDocs": { + "description": "Cross-cluster replication", + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-post-unfollow.html" + }, + "operationId": "ccr-unfollow", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", + "name": "index", + "description": "The name of the follower index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "UnfollowIndexResponseExample1": { + "description": "A successful response from `POST /follower_index/_ccr/unfollow`.", + "value": "{\n \"acknowledged\" : true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n POST\n /{index}/_ccr/unfollow\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage_follow_index`\n" + ], + "x-api": "unfollow.ccr", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_search/scroll": { + "get": { + "tags": [ + "search" + ], + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/scroll-api.html" + }, + "operationId": "scroll", + "parameters": [ + { + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll_id", + "description": "The scroll ID", + "deprecated": true, + "schema": { + "$ref": "#/components/schemas/_types.ScrollId" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { @@ -6559,29 +8698,36 @@ "schema": { "type": "object", "properties": { - "error": { - "oneOf": [ + "scroll": { + "description": "The period to retain the search context for scrolling.", + "default": "1d", + "allOf": [ { - "type": "string" - }, + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "scroll_id": { + "description": "The scroll ID of the search.", + "allOf": [ { - "$ref": "#/components/schemas/_spec_utils.NullValue" + "$ref": "#/components/schemas/_types.ScrollId" } ] } }, "required": [ - "error" + "scroll_id" ] }, "examples": { - "ConnectorUpdateErrorRequestExample1": { - "value": "{\n \"error\": \"Houston, we have a problem!\"\n}" + "ScrollRequestExample1": { + "description": "Run `GET /_search/scroll` to get the next batch of results for a scrolling search.", + "value": "{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -6589,49 +8735,70 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] - }, - "examples": { - "ConnectorUpdateErrorResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" - } + "$ref": "#/components/schemas/_global.search.ResponseBody" } } } } }, - "x-state": "Technical preview", - "x-api-name" : "update_error", - "x-namespace": "connector" - } - }, - "/_connector/{connector_id}/_features": { - "put": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_search/scroll\n
\n ", + "
\n POST\n /_search/scroll\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "scroll", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "connector" + "search" ], - "summary": "Update the connector features", - "description": "Update the connector features in the connector document.\nThis API can be used to control the following aspects of a connector:\n\n* document-level security\n* incremental syncs\n* advanced sync rules\n* basic sync rules\n\nNormally, the running connector service automatically manages these features.\nHowever, you can use this API to override the default behavior.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", - "operationId": "connector-update-features", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/scroll-api.html" + }, + "operationId": "scroll-1", "parameters": [ { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated.", - "required": true, + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "scroll_id", + "description": "The scroll ID", + "deprecated": true, + "schema": { + "$ref": "#/components/schemas/_types.ScrollId" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { @@ -6640,25 +8807,36 @@ "schema": { "type": "object", "properties": { - "features": { - "$ref": "#/components/schemas/connector._types.ConnectorFeatures" + "scroll": { + "description": "The period to retain the search context for scrolling.", + "default": "1d", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "scroll_id": { + "description": "The scroll ID of the search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] } }, "required": [ - "features" + "scroll_id" ] }, "examples": { - "ConnectorUpdateFeaturesRequestExample1": { - "value": "{\n \"features\": {\n \"document_level_security\": {\n \"enabled\": true\n },\n \"incremental_sync\": {\n \"enabled\": true\n },\n \"sync_rules\": {\n \"advanced\": {\n \"enabled\": false\n },\n \"basic\": {\n \"enabled\": true\n }\n }\n }\n}" - }, - "ConnectorUpdateFeaturesRequestExample2": { - "value": "{\n \"features\": {\n \"document_level_security\": {\n \"enabled\": true\n }\n }\n}" + "ScrollRequestExample1": { + "description": "Run `GET /_search/scroll` to get the next batch of results for a scrolling search.", + "value": "{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -6666,85 +8844,64 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] - }, - "examples": { - "ConnectorUpdateFeaturesResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" - } + "$ref": "#/components/schemas/_global.search.ResponseBody" } } } } }, - "x-state": "Technical preview", - "x-api-name" : "update_features", - "x-namespace": "connector" - } - }, - "/_connector/{connector_id}/_filtering": { - "put": { - "tags": [ - "connector" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_search/scroll\n
\n ", + "
\n POST\n /_search/scroll\n
\n " ], - "summary": "Update the connector filtering", - "description": "Update the draft filtering configuration of a connector and marks the draft validation state as edited.\nThe filtering draft is activated once validated by the running Elastic connector service.\nThe filtering property is used to configure sync rules (both basic and advanced) for a connector.", - "operationId": "connector-update-filtering", - "parameters": [ + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "scroll", + "x-category": "search", + "x-metaTags": [ { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" + "content": "Elasticsearch", + "name": "product_name" } + ] + }, + "delete": { + "tags": [ + "search" ], + "summary": "Clear a scrolling search", + "description": "Clear the search context and results for a scrolling search.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clear-scroll-api.html" + }, + "operationId": "clear-scroll", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "filtering": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types.FilteringConfig" - } - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types.FilteringRule" - } - }, - "advanced_snippet": { - "$ref": "#/components/schemas/connector._types.FilteringAdvancedSnippet" + "scroll_id": { + "description": "The scroll IDs to clear.\nTo clear all scroll IDs, use `_all`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollIds" + } + ] } } }, "examples": { - "ConnectorUpdateFilteringRequestExample1": { - "value": "{\n \"rules\": [\n {\n \"field\": \"file_extension\",\n \"id\": \"exclude-txt-files\",\n \"order\": 0,\n \"policy\": \"exclude\",\n \"rule\": \"equals\",\n \"value\": \"txt\"\n },\n {\n \"field\": \"_\",\n \"id\": \"DEFAULT\",\n \"order\": 1,\n \"policy\": \"include\",\n \"rule\": \"regex\",\n \"value\": \".*\"\n }\n ]\n}" - }, - "ConnectorUpdateFilteringRequestExample2": { - "value": "{\n \"advanced_snippet\": {\n \"value\": [{\n \"tables\": [\n \"users\",\n \"orders\"\n ],\n \"query\": \"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\"\n }]\n }\n}" + "ClearScrollRequestExample1": { + "description": "Run `DELETE /_search/scroll` to clear the search context and results for a scrolling search.", + "value": "{\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -6754,47 +8911,91 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "succeeded": { + "description": "If `true`, the request succeeded.\nThis does not indicate whether any scrolling search requests were cleared.", + "type": "boolean" + }, + "num_freed": { + "description": "The number of scrolling search requests cleared.", + "type": "number" } }, "required": [ - "result" + "succeeded", + "num_freed" ] - }, - "examples": { - "ConnectorUpdateFilteringResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" - } } } } } }, - "x-beta": true, - "x-api-name" : "update_filtering", - "x-namespace": "connector" + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_search/scroll\n
\n " + ], + "x-api": "clear_scroll", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/{connector_id}/_filtering/_validation": { - "put": { + "/_search/scroll/{scroll_id}": { + "get": { "tags": [ - "connector" + "search" ], - "summary": "Update the connector draft filtering validation", - "description": "Update the draft filtering validation info for a connector.", - "operationId": "connector-update-filtering-validation", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/scroll-api.html" + }, + "operationId": "scroll-2", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", + "name": "scroll_id", + "description": "The scroll ID", "required": true, - "deprecated": false, + "deprecated": true, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.ScrollId" }, "style": "simple" + }, + { + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll_id", + "description": "The scroll ID", + "deprecated": true, + "schema": { + "$ref": "#/components/schemas/_types.ScrollId" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { @@ -6803,17 +9004,36 @@ "schema": { "type": "object", "properties": { - "validation": { - "$ref": "#/components/schemas/connector._types.FilteringRulesValidation" + "scroll": { + "description": "The period to retain the search context for scrolling.", + "default": "1d", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "scroll_id": { + "description": "The scroll ID of the search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] } }, "required": [ - "validation" + "scroll_id" ] + }, + "examples": { + "ScrollRequestExample1": { + "description": "Run `GET /_search/scroll` to get the next batch of results for a scrolling search.", + "value": "{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" + } } } - }, - "required": true + } }, "responses": { "200": { @@ -6821,44 +9041,81 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] + "$ref": "#/components/schemas/_global.search.ResponseBody" } } } } }, - "x-state": "Technical preview", - "x-api-name" : "update_filtering_validation", - "x-namespace": "connector" - } - }, - "/_connector/{connector_id}/_index_name": { - "put": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_search/scroll/{scroll_id}\n
\n ", + "
\n POST\n /_search/scroll/{scroll_id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "scroll", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "connector" + "search" ], - "summary": "Update the connector index name", - "description": "Update the `index_name` field of a connector, specifying the index where the data ingested by the connector is stored.", - "operationId": "connector-update-index-name", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/scroll-api.html" + }, + "operationId": "scroll-3", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", + "name": "scroll_id", + "description": "The scroll ID", "required": true, - "deprecated": false, + "deprecated": true, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.ScrollId" }, "style": "simple" + }, + { + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll_id", + "description": "The scroll ID", + "deprecated": true, + "schema": { + "$ref": "#/components/schemas/_types.ScrollId" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { @@ -6867,29 +9124,36 @@ "schema": { "type": "object", "properties": { - "index_name": { - "oneOf": [ + "scroll": { + "description": "The period to retain the search context for scrolling.", + "default": "1d", + "allOf": [ { - "$ref": "#/components/schemas/_types.IndexName" - }, + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "scroll_id": { + "description": "The scroll ID of the search.", + "allOf": [ { - "$ref": "#/components/schemas/_spec_utils.NullValue" + "$ref": "#/components/schemas/_types.ScrollId" } ] } }, "required": [ - "index_name" + "scroll_id" ] }, "examples": { - "ConnectorUpdateIndexNameRequestExample1": { - "value": "{\n \"index_name\": \"data-from-my-google-drive\"\n}" + "ScrollRequestExample1": { + "description": "Run `GET /_search/scroll` to get the next batch of results for a scrolling search.", + "value": "{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -6897,46 +9161,49 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] - }, - "examples": { - "ConnectorUpdateIndexNameResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" - } + "$ref": "#/components/schemas/_global.search.ResponseBody" } } } } }, - "x-beta": true, - "x-api-name" : "update_index_name", - "x-namespace": "connector" - } - }, - "/_connector/{connector_id}/_name": { - "put": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_search/scroll/{scroll_id}\n
\n ", + "
\n POST\n /_search/scroll/{scroll_id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "scroll", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "connector" + "search" ], - "summary": "Update the connector name and description", - "operationId": "connector-update-name", + "summary": "Clear a scrolling search", + "description": "Clear the search context and results for a scrolling search.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clear-scroll-api.html" + }, + "operationId": "clear-scroll-1", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", + "name": "scroll_id", + "description": "A comma-separated list of scroll IDs to clear.\nTo clear all scroll IDs, use `_all`.\nIMPORTANT: Scroll IDs can be long. It is recommended to specify scroll IDs in the request body parameter.", "required": true, - "deprecated": false, + "deprecated": true, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.ScrollIds" }, "style": "simple" } @@ -6947,22 +9214,24 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" + "scroll_id": { + "description": "The scroll IDs to clear.\nTo clear all scroll IDs, use `_all`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollIds" + } + ] } } }, "examples": { - "ConnectorUpdateNameRequestExample1": { - "value": "{\n \"name\": \"Custom connector\",\n \"description\": \"This is my customized connector\"\n}" + "ClearScrollRequestExample1": { + "description": "Run `DELETE /_search/scroll` to clear the search context and results for a scrolling search.", + "value": "{\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -6972,61 +9241,70 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "succeeded": { + "description": "If `true`, the request succeeded.\nThis does not indicate whether any scrolling search requests were cleared.", + "type": "boolean" + }, + "num_freed": { + "description": "The number of scrolling search requests cleared.", + "type": "number" } }, "required": [ - "result" + "succeeded", + "num_freed" ] - }, - "examples": { - "ConnectorUpdateNameResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" - } } } } } }, - "x-beta": true, - "x-api-name" : "update_name", - "x-namespace": "connector" - } - }, - "/_connector/{connector_id}/_native": { - "put": { - "tags": [ - "connector" + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_search/scroll/{scroll_id}\n
\n " ], - "summary": "Update the connector is_native flag", - "operationId": "connector-update-native", - "parameters": [ + "x-api": "clear_scroll", + "x-category": "search", + "x-metaTags": [ { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" + "content": "Elasticsearch", + "name": "product_name" } + ] + } + }, + "/_pit": { + "delete": { + "tags": [ + "search" ], + "summary": "Close a point in time", + "description": "A point in time must be opened explicitly before being used in search requests.\nThe `keep_alive` parameter tells Elasticsearch how long it should persist.\nA point in time is automatically closed when the `keep_alive` period has elapsed.\nHowever, keeping points in time has a cost; close them as soon as they are no longer required for search requests.", + "operationId": "close-point-in-time", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "is_native": { - "type": "boolean" + "id": { + "description": "The ID of the point-in-time.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] } }, "required": [ - "is_native" + "id" ] + }, + "examples": { + "ClosePointInTimeRequestExample1": { + "description": "Run `DELETE /_pit` to close a point-in-time.", + "value": "{\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n}" + } } } }, @@ -7040,42 +9318,126 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "succeeded": { + "description": "If `true`, all search contexts associated with the point-in-time ID were successfully closed.", + "type": "boolean" + }, + "num_freed": { + "description": "The number of search contexts that were successfully closed.", + "type": "number" } }, "required": [ - "result" - ] + "succeeded", + "num_freed" + ] + }, + "examples": { + "ClosePointInTimeResponseExample1": { + "description": "A successful response from `DELETE /_pit`.", + "value": "{\n \"succeeded\": true, \n \"num_freed\": 3 \n}" + } } } } } }, - "x-beta": true, - "x-api-name" : "update_native", - "x-namespace": "connector" + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n DELETE\n /_pit\n
\n " + ], + "x-api": "close_point_in_time", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/{connector_id}/_pipeline": { - "put": { + "/_cluster/allocation/explain": { + "get": { "tags": [ - "connector" + "cluster" ], - "summary": "Update the connector pipeline", - "description": "When you create a new connector, the configuration of an ingest pipeline is populated with default settings.", - "operationId": "connector-update-pipeline", + "summary": "Explain the shard allocations", + "description": "Get explanations for shard allocations in the cluster.\nThis API accepts the current_node, index, primary and shard parameters in the request body or in query parameters, but not in both at the same time.\nFor unassigned shards, it provides an explanation for why the shard is unassigned.\nFor assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.\nThis API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.\nRefer to the linked documentation for examples of how to troubleshoot allocation issues using this API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/troubleshoot/elasticsearch/cluster-allocation-api-examples", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-allocation-explain.html" + }, + "operationId": "cluster-allocation-explain", "parameters": [ { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", - "required": true, + "in": "query", + "name": "index", + "description": "The name of the index that you would like an explanation for.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "shard", + "description": "An identifier for the shard that you would like an explanation for.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "primary", + "description": "If true, returns an explanation for the primary shard for the specified shard ID.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "current_node", + "description": "Explain a shard only if it is currently located on the specified node name or node ID.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeId" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_disk_info", + "description": "If true, returns information about disk usage and shard sizes.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_yes_decisions", + "description": "If true, returns YES decisions in explanation.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -7084,22 +9446,46 @@ "schema": { "type": "object", "properties": { - "pipeline": { - "$ref": "#/components/schemas/connector._types.IngestPipelineParams" + "index": { + "description": "The name of the index that you would like an explanation for.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "shard": { + "description": "An identifier for the shard that you would like an explanation for.", + "type": "number" + }, + "primary": { + "description": "If true, returns an explanation for the primary shard for the specified shard ID.", + "type": "boolean" + }, + "current_node": { + "description": "Explain a shard only if it is currently located on the specified node name or node ID.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] } - }, - "required": [ - "pipeline" - ] + } }, "examples": { - "ConnectorUpdatePipelineRequestExample1": { - "value": "{\n \"pipeline\": {\n \"extract_binary_content\": true,\n \"name\": \"my-connector-pipeline\",\n \"reduce_whitespace\": true,\n \"run_ml_inference\": true\n }\n}" + "ClusterAllocationExplainRequestExample1": { + "summary": "All parameters in the request body", + "description": "Run `GET _cluster/allocation/explain` to get an explanation for a shard's current allocation.", + "value": "{\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n}" + }, + "ClusterAllocationExplainRequestExample2": { + "summary": "Query Parameters", + "description": "Run `GET _cluster/allocation/explain?index=my-index-000001&shard=0&primary=false¤t_node=my-node` to get an explanation for a shard's current allocation. No parameters are required in the request body\n", + "value": "{}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -7109,46 +9495,270 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "allocate_explanation": { + "type": "string" + }, + "allocation_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "allocation_delay_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "can_allocate": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "can_move_to_other_node": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "can_rebalance_cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "can_rebalance_cluster_decisions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.allocation_explain.AllocationDecision" + } + }, + "can_rebalance_to_other_node": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "can_remain_decisions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.allocation_explain.AllocationDecision" + } + }, + "can_remain_on_current_node": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "cluster_info": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.ClusterInfo" + } + ] + }, + "configured_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "configured_delay_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "current_node": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.CurrentNode" + } + ] + }, + "current_state": { + "type": "string" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "move_explanation": { + "type": "string" + }, + "node_allocation_decisions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.allocation_explain.NodeAllocationExplanation" + } + }, + "primary": { + "type": "boolean" + }, + "rebalance_explanation": { + "type": "string" + }, + "remaining_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "remaining_delay_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "shard": { + "type": "number" + }, + "unassigned_info": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.UnassignedInformation" + } + ] + }, + "note": { + "x-state": "Generally available; Added in 7.14.0", + "type": "string" } }, "required": [ - "result" + "current_state", + "index", + "primary", + "shard" ] }, "examples": { - "ConnectorUpdatePipelineResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" + "ClusterAllocationExplainResponseExample1": { + "summary": "Conflicting settings", + "description": "An example of an allocation explanation for an unassigned primary shard. In this example, a newly created index has an index setting that requires that it only be allocated to a node named `nonexistent_node`, which does not exist, so the index is unable to allocate.\n", + "value": "{\n \"index\" : \"my-index-000001\",\n \"shard\" : 0,\n \"primary\" : true,\n \"current_state\" : \"unassigned\",\n \"unassigned_info\" : {\n \"reason\" : \"INDEX_CREATED\",\n \"at\" : \"2017-01-04T18:08:16.600Z\",\n \"last_allocation_status\" : \"no\"\n },\n \"can_allocate\" : \"no\",\n \"allocate_explanation\" : \"Elasticsearch isn't allowed to allocate this shard to any of the nodes in the cluster. Choose a node to which you expect this shard to be allocated, find this node in the node-by-node explanation, and address the reasons which prevent Elasticsearch from allocating this shard there.\",\n \"node_allocation_decisions\" : [\n {\n \"node_id\" : \"8qt2rY-pT6KNZB3-hGfLnw\",\n \"node_name\" : \"node-0\",\n \"transport_address\" : \"127.0.0.1:9401\",\n \"roles\" : [\"data\", \"data_cold\", \"data_content\", \"data_frozen\", \"data_hot\", \"data_warm\", \"ingest\", \"master\", \"ml\", \"remote_cluster_client\", \"transform\"],\n \"node_attributes\" : {},\n \"node_decision\" : \"no\",\n \"weight_ranking\" : 1,\n \"deciders\" : [\n {\n \"decider\" : \"filter\",\n \"decision\" : \"NO\",\n \"explanation\" : \"node does not match index setting [index.routing.allocation.include] filters [_name:\\\"nonexistent_node\\\"]\"\n }\n ]\n }\n ]\n}" + }, + "ClusterAllocationExplainResponseExample2": { + "summary": "Maximum retries", + "description": "An example of an allocation explanation for an unassigned primary shard that has reached the maximum number of allocation retry attempts. After the maximum number of retries is reached, Elasticsearch stops attempting to allocate the shard in order to prevent infinite retries which may impact cluster performance.\n", + "value": "{\n \"index\" : \"my-index-000001\",\n \"shard\" : 0,\n \"primary\" : true,\n \"current_state\" : \"unassigned\",\n \"unassigned_info\" : {\n \"at\" : \"2017-01-04T18:03:28.464Z\",\n \"failed shard on node [mEKjwwzLT1yJVb8UxT6anw]: failed recovery, failure RecoveryFailedException\",\n \"reason\": \"ALLOCATION_FAILED\",\n \"failed_allocation_attempts\": 5,\n \"last_allocation_status\": \"no\",\n },\n \"can_allocate\": \"no\",\n \"allocate_explanation\": \"cannot allocate because allocation is not permitted to any of the nodes\",\n \"node_allocation_decisions\" : [\n {\n \"node_id\" : \"3sULLVJrRneSg0EfBB-2Ew\",\n \"node_name\" : \"node_t0\",\n \"transport_address\" : \"127.0.0.1:9400\",\n \"roles\" : [\"data_content\", \"data_hot\"],\n \"node_decision\" : \"no\",\n \"store\" : {\n \"matching_size\" : \"4.2kb\",\n \"matching_size_in_bytes\" : 4325\n },\n \"deciders\" : [\n {\n \"decider\": \"max_retry\",\n \"decision\" : \"NO\",\n \"explanation\": \"shard has exceeded the maximum number of retries [5] on failed allocation attempts - manually call [POST /_cluster/reroute?retry_failed] to retry, [unassigned_info[[reason=ALLOCATION_FAILED], at[2024-07-30T21:04:12.166Z], failed_attempts[5], failed_nodes[[mEKjwwzLT1yJVb8UxT6anw]], delayed=false, details[failed shard on node [mEKjwwzLT1yJVb8UxT6anw]: failed recovery, failure RecoveryFailedException], allocation_status[deciders_no]]]\"\n }\n ]\n }\n ]\n}" } } } } } }, - "x-beta": true, - "x-api-name" : "update_pipeline", - "x-namespace": "connector" - } - }, - "/_connector/{connector_id}/_scheduling": { - "put": { + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_cluster/allocation/explain\n
\n ", + "
\n POST\n /_cluster/allocation/explain\n
\n " + ], + "x-api": "allocation_explain.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "connector" + "cluster" ], - "summary": "Update the connector scheduling", - "operationId": "connector-update-scheduling", + "summary": "Explain the shard allocations", + "description": "Get explanations for shard allocations in the cluster.\nThis API accepts the current_node, index, primary and shard parameters in the request body or in query parameters, but not in both at the same time.\nFor unassigned shards, it provides an explanation for why the shard is unassigned.\nFor assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.\nThis API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.\nRefer to the linked documentation for examples of how to troubleshoot allocation issues using this API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/troubleshoot/elasticsearch/cluster-allocation-api-examples", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-allocation-explain.html" + }, + "operationId": "cluster-allocation-explain-1", "parameters": [ { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", - "required": true, + "in": "query", + "name": "index", + "description": "The name of the index that you would like an explanation for.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "shard", + "description": "An identifier for the shard that you would like an explanation for.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "primary", + "description": "If true, returns an explanation for the primary shard for the specified shard ID.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "current_node", + "description": "Explain a shard only if it is currently located on the specified node name or node ID.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeId" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_disk_info", + "description": "If true, returns information about disk usage and shard sizes.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_yes_decisions", + "description": "If true, returns YES decisions in explanation.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -7157,25 +9767,46 @@ "schema": { "type": "object", "properties": { - "scheduling": { - "$ref": "#/components/schemas/connector._types.SchedulingConfiguration" + "index": { + "description": "The name of the index that you would like an explanation for.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "shard": { + "description": "An identifier for the shard that you would like an explanation for.", + "type": "number" + }, + "primary": { + "description": "If true, returns an explanation for the primary shard for the specified shard ID.", + "type": "boolean" + }, + "current_node": { + "description": "Explain a shard only if it is currently located on the specified node name or node ID.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] } - }, - "required": [ - "scheduling" - ] + } }, "examples": { - "ConnectorUpdateSchedulingRequestExample1": { - "value": "{\n \"scheduling\": {\n \"access_control\": {\n \"enabled\": true,\n \"interval\": \"0 10 0 * * ?\"\n },\n \"full\": {\n \"enabled\": true,\n \"interval\": \"0 20 0 * * ?\"\n },\n \"incremental\": {\n \"enabled\": false,\n \"interval\": \"0 30 0 * * ?\"\n }\n }\n}" + "ClusterAllocationExplainRequestExample1": { + "summary": "All parameters in the request body", + "description": "Run `GET _cluster/allocation/explain` to get an explanation for a shard's current allocation.", + "value": "{\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n}" }, - "ConnectorUpdateSchedulingRequestExample2": { - "value": "{\n \"scheduling\": {\n \"full\": {\n \"enabled\": true,\n \"interval\": \"0 10 0 * * ?\"\n }\n }\n}" + "ClusterAllocationExplainRequestExample2": { + "summary": "Query Parameters", + "description": "Run `GET _cluster/allocation/explain?index=my-index-000001&shard=0&primary=false¤t_node=my-node` to get an explanation for a shard's current allocation. No parameters are required in the request body\n", + "value": "{}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -7185,71 +9816,272 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "allocate_explanation": { + "type": "string" + }, + "allocation_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "allocation_delay_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "can_allocate": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "can_move_to_other_node": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "can_rebalance_cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "can_rebalance_cluster_decisions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.allocation_explain.AllocationDecision" + } + }, + "can_rebalance_to_other_node": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "can_remain_decisions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.allocation_explain.AllocationDecision" + } + }, + "can_remain_on_current_node": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] + }, + "cluster_info": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.ClusterInfo" + } + ] + }, + "configured_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "configured_delay_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "current_node": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.CurrentNode" + } + ] + }, + "current_state": { + "type": "string" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "move_explanation": { + "type": "string" + }, + "node_allocation_decisions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.allocation_explain.NodeAllocationExplanation" + } + }, + "primary": { + "type": "boolean" + }, + "rebalance_explanation": { + "type": "string" + }, + "remaining_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "remaining_delay_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "shard": { + "type": "number" + }, + "unassigned_info": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.UnassignedInformation" + } + ] + }, + "note": { + "x-state": "Generally available; Added in 7.14.0", + "type": "string" } }, "required": [ - "result" + "current_state", + "index", + "primary", + "shard" ] }, "examples": { - "ConnectorUpdateSchedulingResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" + "ClusterAllocationExplainResponseExample1": { + "summary": "Conflicting settings", + "description": "An example of an allocation explanation for an unassigned primary shard. In this example, a newly created index has an index setting that requires that it only be allocated to a node named `nonexistent_node`, which does not exist, so the index is unable to allocate.\n", + "value": "{\n \"index\" : \"my-index-000001\",\n \"shard\" : 0,\n \"primary\" : true,\n \"current_state\" : \"unassigned\",\n \"unassigned_info\" : {\n \"reason\" : \"INDEX_CREATED\",\n \"at\" : \"2017-01-04T18:08:16.600Z\",\n \"last_allocation_status\" : \"no\"\n },\n \"can_allocate\" : \"no\",\n \"allocate_explanation\" : \"Elasticsearch isn't allowed to allocate this shard to any of the nodes in the cluster. Choose a node to which you expect this shard to be allocated, find this node in the node-by-node explanation, and address the reasons which prevent Elasticsearch from allocating this shard there.\",\n \"node_allocation_decisions\" : [\n {\n \"node_id\" : \"8qt2rY-pT6KNZB3-hGfLnw\",\n \"node_name\" : \"node-0\",\n \"transport_address\" : \"127.0.0.1:9401\",\n \"roles\" : [\"data\", \"data_cold\", \"data_content\", \"data_frozen\", \"data_hot\", \"data_warm\", \"ingest\", \"master\", \"ml\", \"remote_cluster_client\", \"transform\"],\n \"node_attributes\" : {},\n \"node_decision\" : \"no\",\n \"weight_ranking\" : 1,\n \"deciders\" : [\n {\n \"decider\" : \"filter\",\n \"decision\" : \"NO\",\n \"explanation\" : \"node does not match index setting [index.routing.allocation.include] filters [_name:\\\"nonexistent_node\\\"]\"\n }\n ]\n }\n ]\n}" + }, + "ClusterAllocationExplainResponseExample2": { + "summary": "Maximum retries", + "description": "An example of an allocation explanation for an unassigned primary shard that has reached the maximum number of allocation retry attempts. After the maximum number of retries is reached, Elasticsearch stops attempting to allocate the shard in order to prevent infinite retries which may impact cluster performance.\n", + "value": "{\n \"index\" : \"my-index-000001\",\n \"shard\" : 0,\n \"primary\" : true,\n \"current_state\" : \"unassigned\",\n \"unassigned_info\" : {\n \"at\" : \"2017-01-04T18:03:28.464Z\",\n \"failed shard on node [mEKjwwzLT1yJVb8UxT6anw]: failed recovery, failure RecoveryFailedException\",\n \"reason\": \"ALLOCATION_FAILED\",\n \"failed_allocation_attempts\": 5,\n \"last_allocation_status\": \"no\",\n },\n \"can_allocate\": \"no\",\n \"allocate_explanation\": \"cannot allocate because allocation is not permitted to any of the nodes\",\n \"node_allocation_decisions\" : [\n {\n \"node_id\" : \"3sULLVJrRneSg0EfBB-2Ew\",\n \"node_name\" : \"node_t0\",\n \"transport_address\" : \"127.0.0.1:9400\",\n \"roles\" : [\"data_content\", \"data_hot\"],\n \"node_decision\" : \"no\",\n \"store\" : {\n \"matching_size\" : \"4.2kb\",\n \"matching_size_in_bytes\" : 4325\n },\n \"deciders\" : [\n {\n \"decider\": \"max_retry\",\n \"decision\" : \"NO\",\n \"explanation\": \"shard has exceeded the maximum number of retries [5] on failed allocation attempts - manually call [POST /_cluster/reroute?retry_failed] to retry, [unassigned_info[[reason=ALLOCATION_FAILED], at[2024-07-30T21:04:12.166Z], failed_attempts[5], failed_nodes[[mEKjwwzLT1yJVb8UxT6anw]], delayed=false, details[failed shard on node [mEKjwwzLT1yJVb8UxT6anw]: failed recovery, failure RecoveryFailedException], allocation_status[deciders_no]]]\"\n }\n ]\n }\n ]\n}" } } } } } }, - "x-beta": true, - "x-api-name" : "update_scheduling", - "x-namespace": "connector" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_cluster/allocation/explain\n
\n ", + "
\n POST\n /_cluster/allocation/explain\n
\n " + ], + "x-api": "allocation_explain.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_connector/{connector_id}/_service_type": { - "put": { + "/_component_template/{name}": { + "get": { "tags": [ - "connector" + "indices" ], - "summary": "Update the connector service type", - "operationId": "connector-update-service-type", + "summary": "Get component templates", + "description": "Get information about component templates.", + "operationId": "cluster-get-component-template-1", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", + "name": "name", + "description": "Name of component template to retrieve. Wildcard (`*`) expressions are supported.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "service_type": { + }, + { + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "settings_filter", + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { "type": "string" } - }, - "required": [ - "service_type" - ] - }, - "examples": { - "ConnectorUpdateServiceTypeRequestExample1": { - "value": "{\n \"service_type\": \"sharepoint_online\"\n}" } - } - } + ] + }, + "style": "form" }, - "required": true - }, + { + "in": "query", + "name": "include_defaults", + "description": "Return all default configurations for the component template", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.11.0", + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.\nIf `false`, information is retrieved from the master node.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], "responses": { "200": { "description": "", @@ -7258,46 +10090,91 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "component_templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster._types.ComponentTemplate" + } } }, "required": [ - "result" + "component_templates" ] }, "examples": { - "ConnectorUpdateServiceTypeResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" + "GetComponentTemplateResponseExample1": { + "description": "A successful response for retrieving information about a component template.", + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" } } } } } }, - "x-beta": true, - "x-api-name" : "update_service_type", - "x-namespace": "connector" - } - }, - "/_connector/{connector_id}/_status": { - "put": { - "tags": [ - "connector" + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n GET\n /_component_template/{name}\n
\n " ], - "summary": "Update the connector status", - "operationId": "connector-update-status", + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "get_component_template.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "indices" + ], + "summary": "Create or update a component template", + "description": "Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.\n\nAn index template can be composed of multiple component templates.\nTo use a component template, specify it in an index template’s `composed_of` list.\nComponent templates are only applied to new data streams and indices as part of a matching index template.\n\nSettings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.\n\nComponent templates are only used during index creation.\nFor data streams, this includes data stream creation and the creation of a stream’s backing indices.\nChanges to component templates do not affect existing indices, including a stream’s backing indices.\n\nYou can use C-style `/* *\\/` block comments in component templates.\nYou can include comments anywhere in the request body except before the opening curly bracket.\n\n**Applying component templates**\n\nYou cannot directly apply a component template to a data stream or index.\nTo be applied, a component template must be included in an index template's `composed_of` list.", + "operationId": "cluster-put-component-template", "parameters": [ { "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be updated", + "name": "name", + "description": "Name of the component template to create.\nElasticsearch includes the following built-in component templates: `logs-mappings`; `logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`.\nElastic Agent uses these templates to configure backing indices for its data streams.\nIf you use Elastic Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version.\nIf you don’t use Elastic Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" + }, + { + "in": "query", + "name": "create", + "description": "If `true`, this request cannot replace or update existing component templates.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "cause", + "description": "User defined reason for create the component template.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -7306,17 +10183,48 @@ "schema": { "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/connector._types.ConnectorStatus" + "template": { + "description": "The template to be applied which includes mappings, settings, or aliases configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.put_index_template.IndexTemplateMapping" + } + ] + }, + "version": { + "description": "Version number used to manage component templates externally.\nThis number isn't automatically generated or incremented by Elasticsearch.\nTo unset a version, replace the template without specifying a version.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "_meta": { + "description": "Optional user metadata about the component template.\nIt may have any contents. This map is not automatically generated by Elasticsearch.\nThis information is stored in the cluster state, so keeping it short is preferable.\nTo unset `_meta`, replace the template without specifying this information.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "deprecated": { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "type": "boolean" } }, "required": [ - "status" + "template" ] }, "examples": { - "ConnectorUpdateStatusRequestExample1": { - "value": "{\n \"status\": \"needs_configuration\"\n}" + "ClusterPutComponentTemplateRequestExample1": { + "summary": "Create a template", + "value": "{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n}" + }, + "ClusterPutComponentTemplateRequestExample2": { + "summary": "Create a template with aliases", + "description": "You can include index aliases in a component template. During index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", + "value": "{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n }\n}" } } } @@ -7329,457 +10237,185 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] - }, - "examples": { - "ConnectorUpdateStatusResponseExample1": { - "value": "{\n \"result\": \"updated\"\n}" - } + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Technical preview", - "x-api-name" : "update_status", - "x-namespace": "connector" - } - }, - "/_count": { - "get": { - "tags": [ - "search" + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n PUT\n /_component_template/{name}\n
\n ", + "
\n POST\n /_component_template/{name}\n
\n " ], - "summary": "Count search results", - "description": "Get the number of documents matching a query.\n\nThe query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.\nThe query is optional. When no query is provided, the API uses `match_all` to count all the documents.\n\nThe count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.\n\nThe operation is broadcast across all shards.\nFor each shard ID group, a replica is chosen and the search is run against it.\nThis means that replicas increase the scalability of the count.", - "operationId": "count-1", - "parameters": [ - { - "$ref": "#/components/parameters/count-allow_no_indices" - }, - { - "$ref": "#/components/parameters/count-analyzer" - }, - { - "$ref": "#/components/parameters/count-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/count-default_operator" - }, - { - "$ref": "#/components/parameters/count-df" - }, - { - "$ref": "#/components/parameters/count-expand_wildcards" - }, - { - "$ref": "#/components/parameters/count-ignore_throttled" - }, - { - "$ref": "#/components/parameters/count-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/count-lenient" - }, - { - "$ref": "#/components/parameters/count-min_score" - }, - { - "$ref": "#/components/parameters/count-preference" - }, - { - "$ref": "#/components/parameters/count-routing" - }, - { - "$ref": "#/components/parameters/count-terminate_after" - }, - { - "$ref": "#/components/parameters/count-q" - } + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/count" - }, - "responses": { - "200": { - "$ref": "#/components/responses/count-200" + "x-api": "put_component_template.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "count" + ] }, "post": { "tags": [ - "search" + "indices" ], - "summary": "Count search results", - "description": "Get the number of documents matching a query.\n\nThe query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.\nThe query is optional. When no query is provided, the API uses `match_all` to count all the documents.\n\nThe count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.\n\nThe operation is broadcast across all shards.\nFor each shard ID group, a replica is chosen and the search is run against it.\nThis means that replicas increase the scalability of the count.", - "operationId": "count", + "summary": "Create or update a component template", + "description": "Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.\n\nAn index template can be composed of multiple component templates.\nTo use a component template, specify it in an index template’s `composed_of` list.\nComponent templates are only applied to new data streams and indices as part of a matching index template.\n\nSettings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.\n\nComponent templates are only used during index creation.\nFor data streams, this includes data stream creation and the creation of a stream’s backing indices.\nChanges to component templates do not affect existing indices, including a stream’s backing indices.\n\nYou can use C-style `/* *\\/` block comments in component templates.\nYou can include comments anywhere in the request body except before the opening curly bracket.\n\n**Applying component templates**\n\nYou cannot directly apply a component template to a data stream or index.\nTo be applied, a component template must be included in an index template's `composed_of` list.", + "operationId": "cluster-put-component-template-1", "parameters": [ { - "$ref": "#/components/parameters/count-allow_no_indices" - }, - { - "$ref": "#/components/parameters/count-analyzer" - }, - { - "$ref": "#/components/parameters/count-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/count-default_operator" - }, - { - "$ref": "#/components/parameters/count-df" - }, - { - "$ref": "#/components/parameters/count-expand_wildcards" - }, - { - "$ref": "#/components/parameters/count-ignore_throttled" - }, - { - "$ref": "#/components/parameters/count-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/count-lenient" - }, - { - "$ref": "#/components/parameters/count-min_score" - }, - { - "$ref": "#/components/parameters/count-preference" + "in": "path", + "name": "name", + "description": "Name of the component template to create.\nElasticsearch includes the following built-in component templates: `logs-mappings`; `logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`.\nElastic Agent uses these templates to configure backing indices for its data streams.\nIf you use Elastic Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version.\nIf you don’t use Elastic Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/count-routing" + "in": "query", + "name": "create", + "description": "If `true`, this request cannot replace or update existing component templates.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/count-terminate_after" + "in": "query", + "name": "cause", + "description": "User defined reason for create the component template.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/count-q" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/count" - }, - "responses": { - "200": { - "$ref": "#/components/responses/count-200" - } - }, - "x-api-name": "count" - } - }, - "/{index}/_count": { - "get": { - "tags": [ - "search" - ], - "summary": "Count search results", - "description": "Get the number of documents matching a query.\n\nThe query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.\nThe query is optional. When no query is provided, the API uses `match_all` to count all the documents.\n\nThe count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.\n\nThe operation is broadcast across all shards.\nFor each shard ID group, a replica is chosen and the search is run against it.\nThis means that replicas increase the scalability of the count.", - "operationId": "count-3", - "parameters": [ - { - "$ref": "#/components/parameters/count-index" - }, - { - "$ref": "#/components/parameters/count-allow_no_indices" - }, - { - "$ref": "#/components/parameters/count-analyzer" - }, - { - "$ref": "#/components/parameters/count-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/count-default_operator" - }, - { - "$ref": "#/components/parameters/count-df" - }, - { - "$ref": "#/components/parameters/count-expand_wildcards" - }, - { - "$ref": "#/components/parameters/count-ignore_throttled" - }, - { - "$ref": "#/components/parameters/count-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/count-lenient" - }, - { - "$ref": "#/components/parameters/count-min_score" - }, - { - "$ref": "#/components/parameters/count-preference" - }, - { - "$ref": "#/components/parameters/count-routing" - }, - { - "$ref": "#/components/parameters/count-terminate_after" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template": { + "description": "The template to be applied which includes mappings, settings, or aliases configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.put_index_template.IndexTemplateMapping" + } + ] + }, + "version": { + "description": "Version number used to manage component templates externally.\nThis number isn't automatically generated or incremented by Elasticsearch.\nTo unset a version, replace the template without specifying a version.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "_meta": { + "description": "Optional user metadata about the component template.\nIt may have any contents. This map is not automatically generated by Elasticsearch.\nThis information is stored in the cluster state, so keeping it short is preferable.\nTo unset `_meta`, replace the template without specifying this information.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "deprecated": { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "type": "boolean" + } + }, + "required": [ + "template" + ] + }, + "examples": { + "ClusterPutComponentTemplateRequestExample1": { + "summary": "Create a template", + "value": "{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n}" + }, + "ClusterPutComponentTemplateRequestExample2": { + "summary": "Create a template with aliases", + "description": "You can include index aliases in a component template. During index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", + "value": "{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n }\n}" + } + } + } }, - { - "$ref": "#/components/parameters/count-q" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/count" + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/count-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-api-name": "count" - }, - "post": { - "tags": [ - "search" - ], - "summary": "Count search results", - "description": "Get the number of documents matching a query.\n\nThe query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.\nThe query is optional. When no query is provided, the API uses `match_all` to count all the documents.\n\nThe count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.\n\nThe operation is broadcast across all shards.\nFor each shard ID group, a replica is chosen and the search is run against it.\nThis means that replicas increase the scalability of the count.", - "operationId": "count-2", - "parameters": [ - { - "$ref": "#/components/parameters/count-index" - }, - { - "$ref": "#/components/parameters/count-allow_no_indices" - }, - { - "$ref": "#/components/parameters/count-analyzer" - }, - { - "$ref": "#/components/parameters/count-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/count-default_operator" - }, - { - "$ref": "#/components/parameters/count-df" - }, - { - "$ref": "#/components/parameters/count-expand_wildcards" - }, - { - "$ref": "#/components/parameters/count-ignore_throttled" - }, - { - "$ref": "#/components/parameters/count-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/count-lenient" - }, - { - "$ref": "#/components/parameters/count-min_score" - }, - { - "$ref": "#/components/parameters/count-preference" - }, - { - "$ref": "#/components/parameters/count-routing" - }, - { - "$ref": "#/components/parameters/count-terminate_after" - }, - { - "$ref": "#/components/parameters/count-q" - } + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n PUT\n /_component_template/{name}\n
\n ", + "
\n POST\n /_component_template/{name}\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/count" - }, - "responses": { - "200": { - "$ref": "#/components/responses/count-200" - } - }, - "x-api-name": "count" - } - }, - "/{index}/_create/{id}": { - "put": { - "tags": [ - "document" + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" ], - "summary": "Create a new document in the index", - "description": "You can index a new JSON document with the `//_doc/` or `//_create/<_id>` APIs\nUsing `_create` guarantees that the document is indexed only if it does not already exist.\nIt returns a 409 response when a document with a same ID already exists in the index.\nTo update an existing document, you must use the `//_doc/` API.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add a document using the `PUT //_create/<_id>` or `POST //_create/<_id>` request formats, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams" - }, - "operationId": "create", - "parameters": [ - { - "$ref": "#/components/parameters/create-index" - }, - { - "$ref": "#/components/parameters/create-id" - }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, - { - "$ref": "#/components/parameters/create-include_source_on_error" - }, - { - "$ref": "#/components/parameters/create-op_type" - }, - { - "$ref": "#/components/parameters/create-pipeline" - }, - { - "$ref": "#/components/parameters/create-refresh" - }, - { - "$ref": "#/components/parameters/create-require_alias" - }, - { - "$ref": "#/components/parameters/create-require_data_stream" - }, - { - "$ref": "#/components/parameters/create-routing" - }, - { - "$ref": "#/components/parameters/create-timeout" - }, - { - "$ref": "#/components/parameters/create-version" - }, - { - "$ref": "#/components/parameters/create-version_type" - }, + "x-api": "put_component_template.cluster", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/create-wait_for_active_shards" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/create" - }, - "responses": { - "200": { - "$ref": "#/components/responses/create-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.0.0", - "x-api-name": "create" + ] }, - "post": { - "tags": [ - "document" - ], - "summary": "Create a new document in the index", - "description": "You can index a new JSON document with the `//_doc/` or `//_create/<_id>` APIs\nUsing `_create` guarantees that the document is indexed only if it does not already exist.\nIt returns a 409 response when a document with a same ID already exists in the index.\nTo update an existing document, you must use the `//_doc/` API.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add a document using the `PUT //_create/<_id>` or `POST //_create/<_id>` request formats, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams" - }, - "operationId": "create-1", - "parameters": [ - { - "$ref": "#/components/parameters/create-index" - }, - { - "$ref": "#/components/parameters/create-id" - }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, - { - "$ref": "#/components/parameters/create-include_source_on_error" - }, - { - "$ref": "#/components/parameters/create-op_type" - }, - { - "$ref": "#/components/parameters/create-pipeline" - }, - { - "$ref": "#/components/parameters/create-refresh" - }, - { - "$ref": "#/components/parameters/create-require_alias" - }, - { - "$ref": "#/components/parameters/create-require_data_stream" - }, - { - "$ref": "#/components/parameters/create-routing" - }, - { - "$ref": "#/components/parameters/create-timeout" - }, - { - "$ref": "#/components/parameters/create-version" - }, - { - "$ref": "#/components/parameters/create-version_type" - }, - { - "$ref": "#/components/parameters/create-wait_for_active_shards" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/create" - }, - "responses": { - "200": { - "$ref": "#/components/responses/create-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name": "create" - } - }, - "/_dangling/{index_uuid}": { - "post": { + "delete": { "tags": [ "indices" ], - "summary": "Import a dangling index", - "description": "If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.\nFor example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.", - "operationId": "dangling-indices-import-dangling-index", + "summary": "Delete component templates", + "description": "Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.", + "operationId": "cluster-delete-component-template", "parameters": [ { "in": "path", - "name": "index_uuid", - "description": "The UUID of the index to import. Use the get dangling indices API to locate the UUID.", + "name": "name", + "description": "Comma-separated list or wildcard expression of component template names used to limit the request.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Uuid" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, - { - "in": "query", - "name": "accept_data_loss", - "description": "This parameter must be set to true to import a dangling index.\nBecause Elasticsearch cannot know where the dangling index data came from or determine which shard copies are fresh and which are stale, it cannot guarantee that the imported data represents the latest state of the index when it was last in the cluster.", - "required": true, - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, { "in": "query", "name": "master_timeout", - "description": "Specify timeout for connection to master", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -7789,7 +10425,7 @@ { "in": "query", "name": "timeout", - "description": "Explicit operation timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -7804,55 +10440,50 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "ImportDanglingIndexResponseExample1": { - "description": "A successful response from `POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true`.\n", - "value": "{\n \"acknowledged\": true\n}" - } } } } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "import_dangling_index", - "x-namespace": "dangling_indices" + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n DELETE\n /_component_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "delete_component_template.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "delete": { + "head": { "tags": [ "indices" ], - "summary": "Delete a dangling index", - "description": "If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.\nFor example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.", - "operationId": "dangling-indices-delete-dangling-index", + "summary": "Check component templates", + "description": "Returns information about whether a particular component template exists.", + "operationId": "cluster-exists-component-template", "parameters": [ { "in": "path", - "name": "index_uuid", - "description": "The UUID of the index to delete. Use the get dangling indices API to find the UUID.", + "name": "name", + "description": "Comma-separated list of component template names used to limit the request.\nWildcard (*) expressions are supported.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Uuid" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, - { - "in": "query", - "name": "accept_data_loss", - "description": "This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index.", - "required": true, - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, { "in": "query", "name": "master_timeout", - "description": "Specify timeout for connection to master", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -7861,11 +10492,11 @@ }, { "in": "query", - "name": "timeout", - "description": "Explicit operation timeout", - "deprecated": false, + "name": "local", + "description": "If true, the request retrieves information from the local node only.\nDefaults to false, which means information is retrieved from the master node.", + "deprecated": true, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } @@ -7874,188 +10505,221 @@ "200": { "description": "", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } + "application/json": {} } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "delete_dangling_index", - "x-namespace": "dangling_indices" + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n HEAD\n /_component_template/{name}\n
\n " + ], + "x-api": "exists_component_template.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_dangling": { - "get": { + "/_cluster/voting_config_exclusions": { + "post": { "tags": [ - "indices" + "cluster" ], - "summary": "Get the dangling indices", - "description": "If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.\nFor example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.\n\nUse this API to list dangling indices, which you can then import or delete.", - "operationId": "dangling-indices-list-dangling-indices", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "dangling_indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/dangling_indices.list_dangling_indices.DanglingIndex" - } - } - }, - "required": [ - "dangling_indices" - ] - }, - "examples": { - "ListDanglingIndicesResponseExample1": { - "value": "{\n \"dangling_indices\": [\n {\n \"index_name\": \"my-index-000001\",\n \"index_uuid\": \"zmM4e0JtBkeUjiHD-MihPQ\",\n \"creation_date_millis\": 1589414451372,\n \"node_ids\": [\n \"pL47UN3dAb2d5RCWP6lQ3e\"\n ]\n }\n ]\n}" - } - } - } - } - } + "summary": "Update voting configuration exclusions", + "description": "Update the cluster voting config exclusions by node IDs or node names.\nBy default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks.\nIf you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually.\nThe API adds an entry for each specified node to the cluster’s voting configuration exclusions list.\nIt then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes.\n\nClusters should have no voting configuration exclusions in normal operation.\nOnce the excluded nodes have stopped, clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`.\nThis API waits for the nodes to be fully removed from the cluster before it returns.\nIf your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false` to clear the voting configuration exclusions without waiting for the nodes to leave the cluster.\n\nA response to `POST /_cluster/voting_config_exclusions` with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`.\nIf the call to `POST /_cluster/voting_config_exclusions` fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration.\nIn that case, you may safely retry the call.\n\nNOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period.\nThey are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/maintenance/add-and-remove-elasticsearch-nodes", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/voting-config-exclusions.html" }, - "x-state": "Added in 7.9.0", - "x-api-name" : "list_dangling_indices", - "x-namespace": "dangling_indices" - } - }, - "/{index}/_doc/{id}": { - "get": { - "tags": [ - "document" - ], - "summary": "Get a document by its ID", - "description": "Get a document and its source or stored fields from an index.\n\nBy default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).\nIn the case where stored fields are requested with the `stored_fields` parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields.\nTo turn off realtime behavior, set the `realtime` parameter to false.\n\n**Source filtering**\n\nBy default, the API returns the contents of the `_source` field unless you have used the `stored_fields` parameter or the `_source` field is turned off.\nYou can turn off `_source` retrieval by using the `_source` parameter:\n\n```\nGET my-index-000001/_doc/0?_source=false\n```\n\nIf you only need one or two fields from the `_source`, use the `_source_includes` or `_source_excludes` parameters to include or filter out particular fields.\nThis can be helpful with large documents where partial retrieval can save on network overhead\nBoth parameters take a comma separated list of fields or wildcard expressions.\nFor example:\n\n```\nGET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities\n```\n\nIf you only want to specify includes, you can use a shorter notation:\n\n```\nGET my-index-000001/_doc/0?_source=*.id\n```\n\n**Routing**\n\nIf routing is used during indexing, the routing value also needs to be specified to retrieve a document.\nFor example:\n\n```\nGET my-index-000001/_doc/2?routing=user1\n```\n\nThis request gets the document with ID 2, but it is routed based on the user.\nThe document is not fetched if the correct routing is not specified.\n\n**Distributed**\n\nThe GET operation is hashed into a specific shard ID.\nIt is then redirected to one of the replicas within that shard ID and returns the result.\nThe replicas are the primary shard and its replicas within that shard ID group.\nThis means that the more replicas you have, the better your GET scaling will be.\n\n**Versioning support**\n\nYou can use the `version` parameter to retrieve the document only if its current version is equal to the specified one.\n\nInternally, Elasticsearch has marked the old document as deleted and added an entirely new document.\nThe old version of the document doesn't disappear immediately, although you won't be able to access it.\nElasticsearch cleans up deleted documents in the background as you continue to index more data.", - "operationId": "get", + "operationId": "cluster-post-voting-config-exclusions", "parameters": [ { - "in": "path", - "name": "index", - "description": "The name of the index that contains the document.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - { - "in": "path", - "name": "id", - "description": "A unique document identifier.", - "required": true, + "in": "query", + "name": "node_names", + "description": "A comma-separated list of the names of the nodes to exclude from the\nvoting configuration. If specified, you may not also specify node_ids.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Names" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nBy default, the operation is randomized between the shard replicas.\n\nIf it is set to `_local`, the operation will prefer to be run on a local allocated shard when possible.\nIf it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.\nThis can help with \"jumping values\" when hitting different shards in different refresh states.\nA sample value can be something like the web session ID or the user name.", + "name": "node_ids", + "description": "A comma-separated list of the persistent ids of the nodes to exclude\nfrom the voting configuration. If specified, you may not also specify node_names.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Ids" }, "style": "form" }, { "in": "query", - "name": "realtime", - "description": "If `true`, the request is real-time as opposed to near-real-time.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "refresh", - "description": "If `true`, the request refreshes the relevant shards before retrieving the document.\nSetting it to `true` should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).", + "name": "timeout", + "description": "When adding a voting configuration exclusion, the API waits for the\nspecified nodes to be excluded from the voting configuration before\nreturning. If the timeout expires before the appropriate condition\nis satisfied, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": {} + } + } + }, + "x-state": "Generally available; Added in 7.0.0", + "x-variations": [ + "
\n POST\n /_cluster/voting_config_exclusions\n
\n " + ], + "x-api": "post_voting_config_exclusions.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "cluster" + ], + "summary": "Clear cluster voting config exclusions", + "description": "Remove master-eligible nodes from the voting configuration exclusion list.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/maintenance/add-and-remove-elasticsearch-nodes", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/voting-config-exclusions.html" + }, + "operationId": "cluster-delete-voting-config-exclusions", + "parameters": [ { "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Routing" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "_source", - "description": "Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return.", + "name": "wait_for_removal", + "description": "Specifies whether to wait for all excluded nodes to be removed from the\ncluster before clearing the voting configuration exclusions list.\nDefaults to true, meaning that all excluded nodes must be removed from\nthe cluster before this API takes any action. If set to false then the\nvoting configuration exclusions list is cleared even if some excluded\nnodes are still in the cluster.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + "type": "boolean" }, "style": "form" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": {} + } + } + }, + "x-state": "Generally available; Added in 7.0.0", + "x-variations": [ + "
\n DELETE\n /_cluster/voting_config_exclusions\n
\n " + ], + "x-api": "delete_voting_config_exclusions.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_component_template": { + "get": { + "tags": [ + "indices" + ], + "summary": "Get component templates", + "description": "Get information about component templates.", + "operationId": "cluster-get-component-template", + "parameters": [ { "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Fields" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "name": "settings_filter", + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Fields" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "style": "form" }, { "in": "query", - "name": "stored_fields", - "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to `false`.\nOnly leaf fields can be retrieved with the `stored_field` option.\nObject fields can't be returned; if specified, the request fails.", + "name": "include_defaults", + "description": "Return all default configurations for the component template", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Fields" + "type": "boolean" }, + "x-state": "Generally available; Added in 8.11.0", "style": "form" }, { "in": "query", - "name": "version", - "description": "The version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", - "deprecated": false, + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.\nIf `false`, information is retrieved from the master node.", + "deprecated": true, "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "version_type", - "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n - `force`: This option is deprecated because it can cause primary and replica shards to diverge.\n\n", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.VersionType" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -8066,266 +10730,400 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_global.get.GetResult" + "type": "object", + "properties": { + "component_templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster._types.ComponentTemplate" + } + } + }, + "required": [ + "component_templates" + ] }, "examples": { - "GetResponseExample1": { - "summary": "Get a document", - "description": "A successful response from `GET my-index-000001/_doc/0`. It retrieves the JSON document with the `_id` 0 from the `my-index-000001` index.\n", - "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"0\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"found\": true,\n \"_source\": {\n \"@timestamp\": \"2099-11-15T14:12:12\",\n \"http\": {\n \"request\": {\n \"method\": \"get\"\n },\n \"response\": {\n \"status_code\": 200,\n \"bytes\": 1070000\n },\n \"version\": \"1.1\"\n },\n \"source\": {\n \"ip\": \"127.0.0.1\"\n },\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n}" - }, - "GetResponseExample2": { - "summary": "Get stored fields", - "description": "A successful response from `GET my-index-000001/_doc/1?stored_fields=tags,counter`, which retrieves a set of stored fields. Field values fetched from the document itself are always returned as an array. Any requested fields that are not stored (such as the counter field in this example) are ignored.\n", - "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\" : 22,\n \"_primary_term\" : 1,\n \"found\": true,\n \"fields\": {\n \"tags\": [\n \"production\"\n ]\n }\n}" - }, - "GetResponseExample3": { - "summary": "Get metadata fields", - "description": "A successful response from `GET my-index-000001/_doc/2?routing=user1&stored_fields=tags,counter`, which retrieves the `_routing` metadata field.\n", - "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"_seq_no\" : 13,\n \"_primary_term\" : 1,\n \"_routing\": \"user1\",\n \"found\": true,\n \"fields\": {\n \"tags\": [\n \"env2\"\n ]\n }\n}" + "GetComponentTemplateResponseExample1": { + "description": "A successful response for retrieving information about a component template.", + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" } } } } } }, - "x-api-name": "get" - }, - "put": { + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n GET\n /_component_template\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "get_component_template.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cluster/settings": { + "get": { "tags": [ - "document" + "cluster" ], - "summary": "Create or update a document in an index", - "description": "Add a JSON document to the specified data stream or index and make it searchable.\nIf the target is an index and the document already exists, the request updates the document and increments its version.\n\nNOTE: You cannot use this API to send update requests for existing documents in a data stream.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add or overwrite a document using the `PUT //_doc/<_id>` request format, you must have the `create`, `index`, or `write` index privilege.\n* To add a document using the `POST //_doc/` request format, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nNOTE: Replica shards might not all be started when an indexing operation returns successfully.\nBy default, only the primary is required. Set `wait_for_active_shards` to change this default behavior.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Optimistic concurrency control**\n\nIndex operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.\n\n**No operation (noop) updates**\n\nWhen updating a document by using this API, a new version of the document is always created even if the document hasn't changed.\nIf this isn't acceptable use the `_update` API with `detect_noop` set to `true`.\nThe `detect_noop` option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.\n\nThere isn't a definitive rule for when noop updates aren't acceptable.\nIt's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.\n\n**Versioning**\n\nEach indexed document is given a version number.\nBy default, internal versioning is used that starts at 1 and increments with each update, deletes included.\nOptionally, the version number can be set to an external value (for example, if maintained in a database).\nTo enable this functionality, `version_type` should be set to `external`.\nThe value provided must be a numeric, long value greater than or equal to 0, and less than around `9.2e+18`.\n\nNOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.\nIf no version is provided, the operation runs without any version checks.\n\nWhen using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.\nIf true, the document will be indexed and the new version number used.\nIf the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:\n\n```\nPUT my-index-000001/_doc/1?version=2&version_type=external\n{\n \"user\": {\n \"id\": \"elkbee\"\n }\n}\n\nIn this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.\nIf the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).\n\nA nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.\nEven the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.", + "summary": "Get cluster-wide settings", + "description": "By default, it returns only settings that have been explicitly defined.", "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams" + "url": "https://www.elastic.co/docs/deploy-manage/stack-settings", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-get-settings.html" }, - "operationId": "index", + "operationId": "cluster-get-settings", "parameters": [ { - "$ref": "#/components/parameters/index-index" - }, - { - "$ref": "#/components/parameters/index-id" - }, - { - "$ref": "#/components/parameters/index-if_primary_term" - }, - { - "$ref": "#/components/parameters/index-if_seq_no" - }, - { - "$ref": "#/components/parameters/index-include_source_on_error" - }, - { - "$ref": "#/components/parameters/index-op_type" - }, - { - "$ref": "#/components/parameters/index-pipeline" - }, - { - "$ref": "#/components/parameters/index-refresh" - }, - { - "$ref": "#/components/parameters/index-routing" - }, - { - "$ref": "#/components/parameters/index-timeout" - }, - { - "$ref": "#/components/parameters/index-version" + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-version_type" + "in": "query", + "name": "include_defaults", + "description": "If `true`, also returns default values for all other cluster settings, reflecting the values\nin the `elasticsearch.yml` file of one of the nodes in the cluster. If the nodes in your\ncluster do not all have the same values in their `elasticsearch.yml` config files then the\nvalues returned by this API may vary from invocation to invocation and may not reflect the\nvalues that Elasticsearch uses in all situations. Use the `GET _nodes/settings` API to\nfetch the settings for each individual node in your cluster.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-wait_for_active_shards" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-require_alias" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/index" - }, "responses": { "200": { - "$ref": "#/components/responses/index-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "persistent": { + "description": "The settings that persist after the cluster restarts.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "transient": { + "description": "The settings that do not persist after the cluster restarts.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "defaults": { + "description": "The default setting values.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "persistent", + "transient" + ] + } + } + } } }, - "x-api-name": "index" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cluster/settings\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "get_settings.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "post": { + "put": { "tags": [ - "document" + "cluster" ], - "summary": "Create or update a document in an index", - "description": "Add a JSON document to the specified data stream or index and make it searchable.\nIf the target is an index and the document already exists, the request updates the document and increments its version.\n\nNOTE: You cannot use this API to send update requests for existing documents in a data stream.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add or overwrite a document using the `PUT //_doc/<_id>` request format, you must have the `create`, `index`, or `write` index privilege.\n* To add a document using the `POST //_doc/` request format, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nNOTE: Replica shards might not all be started when an indexing operation returns successfully.\nBy default, only the primary is required. Set `wait_for_active_shards` to change this default behavior.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Optimistic concurrency control**\n\nIndex operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.\n\n**No operation (noop) updates**\n\nWhen updating a document by using this API, a new version of the document is always created even if the document hasn't changed.\nIf this isn't acceptable use the `_update` API with `detect_noop` set to `true`.\nThe `detect_noop` option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.\n\nThere isn't a definitive rule for when noop updates aren't acceptable.\nIt's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.\n\n**Versioning**\n\nEach indexed document is given a version number.\nBy default, internal versioning is used that starts at 1 and increments with each update, deletes included.\nOptionally, the version number can be set to an external value (for example, if maintained in a database).\nTo enable this functionality, `version_type` should be set to `external`.\nThe value provided must be a numeric, long value greater than or equal to 0, and less than around `9.2e+18`.\n\nNOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.\nIf no version is provided, the operation runs without any version checks.\n\nWhen using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.\nIf true, the document will be indexed and the new version number used.\nIf the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:\n\n```\nPUT my-index-000001/_doc/1?version=2&version_type=external\n{\n \"user\": {\n \"id\": \"elkbee\"\n }\n}\n\nIn this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.\nIf the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).\n\nA nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.\nEven the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.", + "summary": "Update the cluster settings", + "description": "Configure and update dynamic settings on a running cluster.\nYou can also configure dynamic settings locally on an unstarted or shut down node in `elasticsearch.yml`.\n\nUpdates made with this API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart.\nYou can also reset transient or persistent settings by assigning them a null value.\n\nIf you configure the same setting using multiple methods, Elasticsearch applies the settings in following order of precedence: 1) Transient setting; 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting value.\nFor example, you can apply a transient setting to override a persistent setting or `elasticsearch.yml` setting.\nHowever, a change to an `elasticsearch.yml` setting will not override a defined transient or persistent setting.\n\nTIP: In Elastic Cloud, use the user settings feature to configure all cluster settings. This method automatically rejects unsafe settings that could break your cluster.\nIf you run Elasticsearch on your own hardware, use this API to configure dynamic cluster settings.\nOnly use `elasticsearch.yml` for static cluster settings and node settings.\nThe API doesn’t require a restart and ensures a setting’s value is the same on all nodes.\n\nWARNING: Transient cluster settings are no longer recommended. Use persistent cluster settings instead.\nIf a cluster becomes unstable, transient settings can clear unexpectedly, resulting in a potentially undesired cluster configuration.", "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams" + "url": "https://www.elastic.co/docs/deploy-manage/stack-settings", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-update-settings.html" }, - "operationId": "index-1", + "operationId": "cluster-put-settings", "parameters": [ { - "$ref": "#/components/parameters/index-index" - }, - { - "$ref": "#/components/parameters/index-id" - }, - { - "$ref": "#/components/parameters/index-if_primary_term" - }, - { - "$ref": "#/components/parameters/index-if_seq_no" - }, - { - "$ref": "#/components/parameters/index-include_source_on_error" - }, - { - "$ref": "#/components/parameters/index-op_type" - }, - { - "$ref": "#/components/parameters/index-pipeline" - }, - { - "$ref": "#/components/parameters/index-refresh" - }, - { - "$ref": "#/components/parameters/index-routing" - }, - { - "$ref": "#/components/parameters/index-timeout" - }, - { - "$ref": "#/components/parameters/index-version" - }, - { - "$ref": "#/components/parameters/index-version_type" + "in": "query", + "name": "flat_settings", + "description": "Return settings in flat format", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-wait_for_active_shards" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-require_alias" + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/index" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "persistent": { + "description": "The settings that persist after the cluster restarts.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "transient": { + "description": "The settings that do not persist after the cluster restarts.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "ClusterPutSettingsRequestExample1": { + "summary": "A simple setting", + "description": "An example of a persistent update.", + "value": "{\n \"persistent\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"50mb\"\n }\n}" + }, + "ClusterPutSettingsRequestExample2": { + "summary": "A setting with multiple patterns", + "description": "PUT `/_cluster/settings` to update the `action.auto_create_index` setting. The setting accepts a comma-separated list of patterns that you want to allow or you can prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked. In this example, the auto-creation of indices called `my-index-000001` or `index10` is allowed, the creation of indices that match the pattern `index1*` is blocked, and the creation of any other indices that match the `ind*` pattern is allowed. Patterns are matched in the order specified.\n", + "value": "{\n \"persistent\": {\n \"action.auto_create_index\": \"my-index-000001,index10,-index1*,+ind*\" \n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/index-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "persistent": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "transient": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "acknowledged", + "persistent", + "transient" + ] + } + } + } } }, - "x-api-name": "index" - }, - "delete": { + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_cluster/settings\n
\n " + ], + "x-api": "put_settings.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cluster/health": { + "get": { "tags": [ - "document" + "cluster" ], - "summary": "Delete a document", - "description": "Remove a JSON document from the specified index.\n\nNOTE: You cannot send deletion requests directly to a data stream.\nTo delete a document in a data stream, you must target the backing index containing the document.\n\n**Optimistic concurrency control**\n\nDelete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Versioning**\n\nEach document indexed is versioned.\nWhen deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.\nEvery write operation run on a document, deletes included, causes its version to be incremented.\nThe version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.\nThe length of time for which a deleted document's version remains available is determined by the `index.gc_deletes` index setting.\n\n**Routing**\n\nIf routing is used during indexing, the routing value also needs to be specified to delete a document.\n\nIf the `_routing` mapping is set to `required` and no routing value is specified, the delete API throws a `RoutingMissingException` and rejects the request.\n\nFor example:\n\n```\nDELETE /my-index-000001/_doc/1?routing=shard-1\n```\n\nThis request deletes the document with ID 1, but it is routed based on the user.\nThe document is not deleted if the correct routing is not specified.\n\n**Distributed**\n\nThe delete operation gets hashed into a specific shard ID.\nIt then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.", - "operationId": "delete", + "summary": "Get the cluster health status", + "description": "You can also use the API to get the health status of only specified data streams and indices.\nFor data streams, the API retrieves the health status of the stream’s backing indices.\n\nThe cluster health status is: green, yellow or red.\nOn the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated.\nThe index level status is controlled by the worst shard status.\n\nOne of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level.\nThe cluster status is controlled by the worst index status.", + "operationId": "cluster-health", "parameters": [ { - "in": "path", - "name": "index", - "description": "The name of the target index.", - "required": true, + "in": "query", + "name": "expand_wildcards", + "description": "Expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "id", - "description": "A unique identifier for the document.", - "required": true, + "in": "query", + "name": "level", + "description": "Return health information at a specific level of detail.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Level" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", + "name": "local", + "description": "If true, retrieve information from the local node only.\nIf false, retrieve information from the master node.", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "refresh", - "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", + "name": "wait_for_active_shards", + "description": "Wait for the specified number of active shards.\nUse `all` to wait for all shards in the cluster to be active.\nUse `0` to not wait.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Routing" + "$ref": "#/components/schemas/_types.WaitForActiveShards" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for active shards.\n\nThis parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation.\nBy default, the delete operation will wait on the primary shard to become available for up to 1 minute before failing and responding with an error.", + "name": "wait_for_events", + "description": "Wait until all currently queued events with the given priority are processed.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.WaitForEvents" }, "style": "form" }, { "in": "query", - "name": "version", - "description": "An explicit version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", + "name": "wait_for_nodes", + "description": "Wait until the specified number (N) of nodes is available.\nIt also accepts `>=N`, `<=N`, `>N` and `\n GET\n /_cluster/health\n \n " ], - "summary": "Check a document", - "description": "Verify that a document exists.\nFor example, check to see if a document with the `_id` 0 exists:\n\n```\nHEAD my-index-000001/_doc/0\n```\n\nIf the document exists, the API returns a status code of `200 - OK`.\nIf the document doesn’t exist, the API returns `404 - Not Found`.\n\n**Versioning support**\n\nYou can use the `version` parameter to check the document only if its current version is equal to the specified one.\n\nInternally, Elasticsearch has marked the old document as deleted and added an entirely new document.\nThe old version of the document doesn't disappear immediately, although you won't be able to access it.\nElasticsearch cleans up deleted documents in the background as you continue to index more data.", - "operationId": "exists", + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "health.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cluster/health/{index}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get the cluster health status", + "description": "You can also use the API to get the health status of only specified data streams and indices.\nFor data streams, the API retrieves the health status of the stream’s backing indices.\n\nThe cluster health status is: green, yellow or red.\nOn the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated.\nThe index level status is controlled by the worst shard status.\n\nOne of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level.\nThe cluster status is controlled by the worst index status.", + "operationId": "cluster-health-1", "parameters": [ { "in": "path", "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases.\nIt supports wildcards (`*`).", + "description": "A comma-separated list of data streams, indices, and index aliases that limit the request.\nWildcard expressions (`*`) are supported.\nTo target all data streams and indices in a cluster, omit this parameter or use _all or `*`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { - "in": "path", - "name": "id", - "description": "A unique document identifier.", - "required": true, + "in": "query", + "name": "expand_wildcards", + "description": "Expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nBy default, the operation is randomized between the shard replicas.\n\nIf it is set to `_local`, the operation will prefer to be run on a local allocated shard when possible.\nIf it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.\nThis can help with \"jumping values\" when hitting different shards in different refresh states.\nA sample value can be something like the web session ID or the user name.", + "name": "level", + "description": "Return health information at a specific level of detail.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Level" }, "style": "form" }, { "in": "query", - "name": "realtime", - "description": "If `true`, the request is real-time as opposed to near-real-time.", + "name": "local", + "description": "If true, retrieve information from the local node only.\nIf false, retrieve information from the master node.", "deprecated": false, "schema": { "type": "boolean" @@ -8402,81 +11215,81 @@ }, { "in": "query", - "name": "refresh", - "description": "If `true`, the request refreshes the relevant shards before retrieving the document.\nSetting it to `true` should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Routing" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "_source", - "description": "Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return.", + "name": "wait_for_active_shards", + "description": "Wait for the specified number of active shards.\nUse `all` to wait for all shards in the cluster to be active.\nUse `0` to not wait.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + "$ref": "#/components/schemas/_types.WaitForActiveShards" }, "style": "form" }, { "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "name": "wait_for_events", + "description": "Wait until all currently queued events with the given priority are processed.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Fields" + "$ref": "#/components/schemas/_types.WaitForEvents" }, "style": "form" }, { "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "name": "wait_for_nodes", + "description": "Wait until the specified number (N) of nodes is available.\nIt also accepts `>=N`, `<=N`, `>N` and `\n GET\n /_cluster/health/{index}\n \n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "health.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_delete_by_query": { - "post": { + "/_info/{target}": { + "get": { "tags": [ - "document" + "cluster" ], - "summary": "Delete documents", - "description": "Deletes documents that match the specified query.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `delete` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\nWhen you submit a delete by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and deletes matching documents using internal versioning.\nIf a document changes between the time that the snapshot is taken and the delete operation is processed, it results in a version conflict and the delete operation fails.\n\nNOTE: Documents with a version equal to 0 cannot be deleted using delete by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete.\nA bulk delete request is performed for each batch of matching documents.\nIf a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off.\nIf the maximum retry limit is reached, processing halts and all failed requests are returned in the response.\nAny delete requests that completed successfully still stick, they are not rolled back.\n\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts the operation could attempt to delete more documents from the source than `max_docs` until it has successfully deleted `max_docs documents`, or it has gone through every document in the source query.\n\n**Throttling delete requests**\n\nTo control the rate at which delete by query issues batches of delete operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to disable throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is `1000`, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single `_bulk` request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nDelete by query supports sliced scroll to parallelize the delete process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` lets Elasticsearch choose the number of slices to use.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\nAdding slices to the delete by query operation creates sub-requests which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with slices only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with `slices` will cancel each sub-request.\n* Due to the nature of `slices` each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with `slices` are distributed proportionally to each sub-request. Combine that with the earlier point about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being deleted.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many `slices` hurts performance. Setting `slices` higher than the number of shards generally does not improve efficiency and adds overhead.\n* Delete performance scales linearly across available resources with the number of slices.\n\nWhether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources.\n\n**Cancel a delete by query operation**\n\nAny delete by query can be canceled using the task cancel API. For example:\n\n```\nPOST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel\n```\n\nThe task ID can be found by using the get tasks API.\n\nCancellation should happen quickly but might take a few seconds.\nThe get task status API will continue to list the delete by query task until this task checks that it has been cancelled and terminates itself.", - "operationId": "delete-by-query", + "summary": "Get cluster info", + "description": "Returns basic information about the cluster.", + "operationId": "cluster-info", "parameters": [ { "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", + "name": "target", + "description": "Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "$ref": "#/components/schemas/_types.ClusterInfoTargets" }, "style": "simple" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "http": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Http" + } + ] + }, + "ingest": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Ingest" + } + ] + }, + "thread_pool": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.ThreadCount" + } + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Scripting" + } + ] + } + }, + "required": [ + "cluster_name" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 8.9.0", + "x-variations": [ + "
\n GET\n /_info/{target}\n
\n " + ], + "x-api": "info.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cluster/pending_tasks": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get the pending cluster tasks", + "description": "Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect.\n\nNOTE: This API returns a list of any pending updates to the cluster state.\nThese are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests.\nHowever, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.", + "operationId": "cluster-pending-tasks", + "parameters": [ { "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.\nIf `false`, information is retrieved from the master node.", "deprecated": false, "schema": { "type": "boolean" @@ -8524,18 +11436,112 @@ }, { "in": "query", - "name": "analyzer", - "description": "Analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.pending_tasks.PendingTask" + } + } + }, + "required": [ + "tasks" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_cluster/pending_tasks\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "pending_tasks.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_remote/info": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get remote cluster information", + "description": "Get information about configured remote clusters.\nThe API returns connection and endpoint information keyed by the configured remote cluster alias.\n\n> info\n> This API returns information that reflects current state on the local cluster.\n> The `connected` field does not necessarily reflect whether a remote cluster is down or unavailable, only whether there is currently an open connection to it.\n> Elasticsearch does not spontaneously try to reconnect to a disconnected remote cluster.\n> To trigger a reconnection, attempt a cross-cluster search, ES|QL cross-cluster search, or try the [resolve cluster endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster).", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/cross-cluster-search", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-remote-info.html" + }, + "operationId": "cluster-remote-info", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.remote_info.ClusterRemoteInfo" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n GET\n /_remote/info\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "remote_info.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cluster/reroute": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Reroute the cluster", + "description": "Manually change the allocation of individual shards in the cluster.\nFor example, a shard can be moved from one node to another explicitly, an allocation can be canceled, and an unassigned shard can be explicitly allocated to a specific node.\n\nIt is important to note that after processing any reroute commands Elasticsearch will perform rebalancing as normal (respecting the values of settings such as `cluster.routing.rebalance.enable`) in order to remain in a balanced state.\nFor example, if the requested allocation includes moving a shard from node1 to node2 then this may cause a shard to be moved from node2 back to node1 to even things out.\n\nThe cluster can be set to disable allocations using the `cluster.routing.allocation.enable` setting.\nIf allocations are disabled then the only allocations that will be performed are explicit ones given using the reroute command, and consequent allocations due to rebalancing.\n\nThe cluster will attempt to allocate a shard a maximum of `index.allocation.max_retries` times in a row (defaults to `5`), before giving up and leaving the shard unallocated.\nThis scenario can be caused by structural problems such as having an analyzer which refers to a stopwords file which doesn’t exist on all nodes.\n\nOnce the problem has been corrected, allocation can be manually retried by calling the reroute API with the `?retry_failed` URI query parameter, which will attempt a single retry round for these shards.", + "operationId": "cluster-reroute", + "parameters": [ { "in": "query", - "name": "analyze_wildcard", - "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "name": "dry_run", + "description": "If true, then the request simulates the operation.\nIt will calculate the result of applying the commands to the current cluster state and return the resulting cluster state after the commands (and rebalancing) have been applied; it will not actually perform the requested changes.", "deprecated": false, "schema": { "type": "boolean" @@ -8544,68 +11550,146 @@ }, { "in": "query", - "name": "conflicts", - "description": "What to do if delete by query hits version conflicts: `abort` or `proceed`.\n\nSupported values include:\n - `abort`: Stop reindexing if there are conflicts.\n - `proceed`: Continue reindexing even if there are conflicts.\n\n", + "name": "explain", + "description": "If true, then the response contains an explanation of why the commands can or cannot run.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Conflicts" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "default_operator", - "description": "The default operator for query string query: `AND` or `OR`.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, + "name": "metric", + "description": "Limits the information returned to the specified metrics.", + "deprecated": true, "schema": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "style": "form" }, { "in": "query", - "name": "df", - "description": "The field to use as default where no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "name": "retry_failed", + "description": "If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.", "deprecated": false, "schema": { - "type": "string" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "from", - "description": "Skips the specified number of documents.", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "commands": { + "description": "Defines the commands to perform.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.reroute.Command" + } + } + } + }, + "examples": { + "ClusterRerouteRequestExample1": { + "description": "Run `POST /_cluster/reroute?metric=none` to changes the allocation of shards in a cluster.", + "value": "{\n \"commands\": [\n {\n \"move\": {\n \"index\": \"test\", \"shard\": 0,\n \"from_node\": \"node1\", \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\", \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ]\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "explanations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.reroute.RerouteExplanation" + } + }, + "state": { + "description": "There aren't any guarantees on the output/structure of the raw cluster state.\nHere you will find the internal representation of the cluster, which can\ndiffer from the external representation.", + "type": "object" + } + }, + "required": [ + "acknowledged" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n POST\n /_cluster/reroute\n
\n " + ], + "x-api": "reroute.cluster", + "x-category": "management", + "x-metaTags": [ { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cluster/state": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get the cluster state", + "description": "Get comprehensive information about the state of the cluster.\n\nThe cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster.\n\nThe elected master node ensures that every node in the cluster has a copy of the same cluster state.\nThis API lets you retrieve a representation of this internal state for debugging or diagnostic purposes.\nYou may need to consult the Elasticsearch source code to determine the precise meaning of the response.\n\nBy default the API will route requests to the elected master node since this node is the authoritative source of cluster states.\nYou can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter.\n\nElasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data.\nIf you use this API repeatedly, your cluster may become unstable.\n\nWARNING: The response is a representation of an internal data structure.\nIts format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version.\nDo not query this API using external monitoring tools.\nInstead, obtain the information you require using other more stable cluster APIs.", + "operationId": "cluster-state", + "parameters": [ { "in": "query", - "name": "lenient", - "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { "type": "boolean" @@ -8614,28 +11698,18 @@ }, { "in": "query", - "name": "max_docs", - "description": "The maximum number of documents to process.\nDefaults to all documents.\nWhen set to a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "refresh", - "description": "If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.\nThis is different than the delete API's `refresh` parameter, which causes just the shard that received the delete request to be refreshed.\nUnlike the delete API, it does not support `wait_for`.", + "name": "flat_settings", + "description": "Return settings in flat format", "deprecated": false, "schema": { "type": "boolean" @@ -8644,8 +11718,8 @@ }, { "in": "query", - "name": "request_cache", - "description": "If `true`, the request cache is used for this request.\nDefaults to the index-level setting.", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", "deprecated": false, "schema": { "type": "boolean" @@ -8654,124 +11728,148 @@ }, { "in": "query", - "name": "requests_per_second", - "description": "The throttle for this request in sub-requests per second.", - "deprecated": false, + "name": "local", + "description": "Return local information, do not retrieve the state from master node", + "deprecated": true, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", + "name": "master_timeout", + "description": "Timeout for waiting for new cluster state in case it is blocked", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Routing" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "q", - "description": "A query in the Lucene query string syntax.", + "name": "wait_for_metadata_version", + "description": "Wait for the metadata version to be equal or greater than the specified metadata version", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.VersionNumber" }, "style": "form" }, { "in": "query", - "name": "scroll", - "description": "The period to retain the search context for scrolling.", + "name": "wait_for_timeout", + "description": "The maximum time to wait for wait_for_metadata_version before timing out", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_cluster/state\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "state.cluster", + "x-category": "management", + "x-metaTags": [ { - "in": "query", - "name": "scroll_size", - "description": "The size of the scroll request that powers the operation.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_cluster/state/{metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get the cluster state", + "description": "Get comprehensive information about the state of the cluster.\n\nThe cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster.\n\nThe elected master node ensures that every node in the cluster has a copy of the same cluster state.\nThis API lets you retrieve a representation of this internal state for debugging or diagnostic purposes.\nYou may need to consult the Elasticsearch source code to determine the precise meaning of the response.\n\nBy default the API will route requests to the elected master node since this node is the authoritative source of cluster states.\nYou can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter.\n\nElasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data.\nIf you use this API repeatedly, your cluster may become unstable.\n\nWARNING: The response is a representation of an internal data structure.\nIts format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version.\nDo not query this API using external monitoring tools.\nInstead, obtain the information you require using other more stable cluster APIs.", + "operationId": "cluster-state-1", + "parameters": [ { - "in": "query", - "name": "search_timeout", - "description": "The explicit timeout for each search request.\nIt defaults to no timeout.", + "in": "path", + "name": "metric", + "description": "Limit the information returned to the specified metrics.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/cluster.state.ClusterStateMetrics" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "search_type", - "description": "The type of the search operation.\nAvailable options include `query_then_fetch` and `dfs_query_then_fetch`.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.SearchType" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "slices", - "description": "The number of slices this task should be divided into.", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Slices" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "sort", - "description": "A comma-separated list of `:` pairs.", + "name": "flat_settings", + "description": "Return settings in flat format", "deprecated": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "stats", - "description": "The specific `tag` of the request for logging and statistical purposes.", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", "deprecated": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "terminate_after", - "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nUse with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", - "deprecated": false, + "name": "local", + "description": "Return local information, do not retrieve the state from master node", + "deprecated": true, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period each deletion request waits for active shards.", + "name": "master_timeout", + "description": "Timeout for waiting for new cluster state in case it is blocked", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -8780,189 +11878,162 @@ }, { "in": "query", - "name": "version", - "description": "If `true`, returns the document version as part of a hit.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe `timeout` value controls how long each write request waits for unavailable shards to become available.", + "name": "wait_for_metadata_version", + "description": "Wait for the metadata version to be equal or greater than the specified metadata version", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" + "$ref": "#/components/schemas/_types.VersionNumber" }, "style": "form" }, { "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request blocks until the operation is complete.\nIf `false`, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task. Elasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`. When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.", + "name": "wait_for_timeout", + "description": "The maximum time to wait for wait_for_metadata_version before timing out", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "max_docs": { - "description": "The maximum number of documents to delete.", - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "slice": { - "$ref": "#/components/schemas/_types.SlicedScroll" - } - } - }, - "examples": { - "DeleteByQueryRequestExample1": { - "summary": "Delete all documents", - "description": "Run `POST /my-index-000001,my-index-000002/_delete_by_query` to delete all documents from multiple data streams or indices.", - "value": "{\n \"query\": {\n \"match_all\": {}\n }\n}" - }, - "DeleteByQueryRequestExample2": { - "summary": "Delete a single document", - "description": "Run `POST my-index-000001/_delete_by_query` to delete a document by using a unique attribute.", - "value": "{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"max_docs\": 1\n}" - }, - "DeleteByQueryRequestExample3": { - "summary": "Slice manually", - "description": "Run `POST my-index-000001/_delete_by_query` to slice a delete by query manually. Provide a slice ID and total number of slices.\n", - "value": "{\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"query\": {\n \"range\": {\n \"http.response.bytes\": {\n \"lt\": 2000000\n }\n }\n }\n}" - }, - "DeleteByQueryRequestExample4": { - "summary": "Automatic slicing", - "description": "Run `POST my-index-000001/_delete_by_query?refresh&slices=5` to let delete by query automatically parallelize using sliced scroll to slice on `_id`. The `slices` query parameter value specifies the number of slices to use.\n", - "value": "{\n \"query\": {\n \"range\": {\n \"http.response.bytes\": {\n \"lt\": 2000000\n }\n }\n }\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "batches": { - "description": "The number of scroll responses pulled back by the delete by query.", - "type": "number" - }, - "deleted": { - "description": "The number of documents that were successfully deleted.", - "type": "number" - }, - "failures": { - "description": "An array of failures if there were any unrecoverable errors during the process.\nIf this array is not empty, the request ended abnormally because of those failures.\nDelete by query is implemented using batches and any failures cause the entire process to end but all failures in the current batch are collected into the array.\nYou can use the `conflicts` option to prevent reindex from ending on version conflicts.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.BulkIndexByScrollFailure" - } - }, - "noops": { - "description": "This field is always equal to zero for delete by query.\nIt exists only so that delete by query, update by query, and reindex APIs return responses with the same structure.", - "type": "number" - }, - "requests_per_second": { - "description": "The number of requests per second effectively run during the delete by query.", - "type": "number" - }, - "retries": { - "$ref": "#/components/schemas/_types.Retries" - }, - "slice_id": { - "type": "number" - }, - "task": { - "$ref": "#/components/schemas/_types.TaskId" - }, - "throttled": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttled_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "throttled_until": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttled_until_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "timed_out": { - "description": "If `true`, some requests run during the delete by query operation timed out.", - "type": "boolean" - }, - "took": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total": { - "description": "The number of documents that were successfully processed.", - "type": "number" - }, - "version_conflicts": { - "description": "The number of version conflicts that the delete by query hit.", - "type": "number" - } - } - }, - "examples": { - "DeleteByQueryResponseExample1": { - "description": "A successful response from `POST /my-index-000001/_delete_by_query`.", - "value": "{\n \"took\" : 147,\n \"timed_out\": false,\n \"total\": 119,\n \"deleted\": 119,\n \"batches\": 1,\n \"version_conflicts\": 0,\n \"noops\": 0,\n \"retries\": {\n \"bulk\": 0,\n \"search\": 0\n },\n \"throttled_millis\": 0,\n \"requests_per_second\": -1.0,\n \"throttled_until_millis\": 0,\n \"failures\" : [ ]\n}" - } + "type": "object" } } } } }, - "x-state": "Added in 5.0.0", - "x-api-name": "delete_by_query" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_cluster/state/{metric}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "state.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_delete_by_query/{task_id}/_rethrottle": { - "post": { + "/_cluster/state/{metric}/{index}": { + "get": { "tags": [ - "document" + "cluster" ], - "summary": "Throttle a delete by query operation", - "description": "Change the number of requests per second for a particular delete by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", - "operationId": "delete-by-query-rethrottle", + "summary": "Get the cluster state", + "description": "Get comprehensive information about the state of the cluster.\n\nThe cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster.\n\nThe elected master node ensures that every node in the cluster has a copy of the same cluster state.\nThis API lets you retrieve a representation of this internal state for debugging or diagnostic purposes.\nYou may need to consult the Elasticsearch source code to determine the precise meaning of the response.\n\nBy default the API will route requests to the elected master node since this node is the authoritative source of cluster states.\nYou can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter.\n\nElasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data.\nIf you use this API repeatedly, your cluster may become unstable.\n\nWARNING: The response is a representation of an internal data structure.\nIts format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version.\nDo not query this API using external monitoring tools.\nInstead, obtain the information you require using other more stable cluster APIs.", + "operationId": "cluster-state-2", "parameters": [ { "in": "path", - "name": "task_id", - "description": "The ID for the task.", + "name": "metric", + "description": "Limit the information returned to the specified metrics.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.TaskId" + "$ref": "#/components/schemas/cluster.state.ClusterStateMetrics" + }, + "style": "simple" + }, + { + "in": "path", + "name": "index", + "description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { "in": "query", - "name": "requests_per_second", - "description": "The throttle for this request in sub-requests per second.\nTo disable throttling, set it to `-1`.", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "flat_settings", + "description": "Return settings in flat format", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "Return local information, do not retrieve the state from master node", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Timeout for waiting for new cluster state in case it is blocked", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_metadata_version", + "description": "Wait for the metadata version to be equal or greater than the specified metadata version", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_timeout", + "description": "The maximum time to wait for wait_for_metadata_version before timing out", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -8973,40 +12044,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/tasks._types.TaskListResponseBase" + "type": "object" } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name": "delete_by_query_rethrottle" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_cluster/state/{metric}/{index}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "state.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_scripts/{id}": { + "/_cluster/stats": { "get": { "tags": [ - "script" + "cluster" ], - "summary": "Get a script or search template", - "description": "Retrieves a stored script or search template.", - "operationId": "get-script", + "summary": "Get cluster statistics", + "description": "Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).", + "operationId": "cluster-stats", "parameters": [ { - "in": "path", - "name": "id", - "description": "The identifier for the stored script or search template.", - "required": true, + "in": "query", + "name": "include_remotes", + "description": "Include remote cluster data into the response", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "timeout", + "description": "Period to wait for each node to respond.\nIf a node does not respond before its timeout expires, the response does not include its stats.\nHowever, timed out nodes are included in the response’s `_nodes.failed` property. Defaults to no timeout.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -9020,130 +12103,63 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "found": { - "type": "boolean" - }, - "script": { - "$ref": "#/components/schemas/_types.StoredScript" - } - }, - "required": [ - "_id", - "found" - ] + "$ref": "#/components/schemas/cluster.stats.StatsResponseBase" } } } } }, - "x-api-name": "get_script" - }, - "put": { - "tags": [ - "script" - ], - "summary": "Create or update a script or search template", - "description": "Creates or updates a stored script or search template.", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "put-script", - "parameters": [ - { - "$ref": "#/components/parameters/put_script-id" - }, - { - "$ref": "#/components/parameters/put_script-context_" - }, - { - "$ref": "#/components/parameters/put_script-master_timeout" - }, - { - "$ref": "#/components/parameters/put_script-timeout" - } + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_cluster/stats\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/put_script" - }, - "responses": { - "200": { - "$ref": "#/components/responses/put_script-200" - } - }, - "x-api-name": "put_script" - }, - "post": { - "tags": [ - "script" + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "summary": "Create or update a script or search template", - "description": "Creates or updates a stored script or search template.", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "put-script-1", - "parameters": [ - { - "$ref": "#/components/parameters/put_script-id" - }, - { - "$ref": "#/components/parameters/put_script-context_" - }, - { - "$ref": "#/components/parameters/put_script-master_timeout" - }, + "x-api": "stats.cluster", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/put_script-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/put_script" - }, - "responses": { - "200": { - "$ref": "#/components/responses/put_script-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "put_script" - }, - "delete": { + ] + } + }, + "/_cluster/stats/nodes/{node_id}": { + "get": { "tags": [ - "script" + "cluster" ], - "summary": "Delete a script or search template", - "description": "Deletes a stored script or search template.", - "operationId": "delete-script", + "summary": "Get cluster statistics", + "description": "Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).", + "operationId": "cluster-stats-1", "parameters": [ { "in": "path", - "name": "id", - "description": "The identifier for the stored script or search template.", + "name": "node_id", + "description": "Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.NodeIds" }, "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "include_remotes", + "description": "Include remote cluster data into the response", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "description": "Period to wait for each node to respond.\nIf a node does not respond before its timeout expires, the response does not include its stats.\nHowever, timed out nodes are included in the response’s `_nodes.failed` property. Defaults to no timeout.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -9157,133 +12173,120 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/cluster.stats.StatsResponseBase" } } } } }, - "x-api-name": "delete_script" - } - }, - "/_enrich/policy/{name}": { - "get": { - "tags": [ - "enrich" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_cluster/stats/nodes/{node_id}\n
\n " ], - "summary": "Get an enrich policy", - "description": "Returns information about an enrich policy.", - "operationId": "enrich-get-policy", - "parameters": [ - { - "$ref": "#/components/parameters/enrich.get_policy-name" - }, - { - "$ref": "#/components/parameters/enrich.get_policy-master_timeout" - } + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/enrich.get_policy-200" + "x-api": "stats.cluster", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.5.0", - "x-api-name" : "get_policy", - "x-namespace": "enrich" - }, + ] + } + }, + "/_connector/{connector_id}/_check_in": { "put": { "tags": [ - "enrich" + "connector" ], - "summary": "Create an enrich policy", - "description": "Creates an enrich policy.", - "operationId": "enrich-put-policy", + "summary": "Check in a connector", + "description": "Update the `last_seen` field in the connector and set it to the current timestamp.", + "operationId": "connector-check-in", "parameters": [ { "in": "path", - "name": "name", - "description": "Name of the enrich policy to create or update.", + "name": "connector_id", + "description": "The unique identifier of the connector to be checked in", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "geo_match": { - "$ref": "#/components/schemas/enrich._types.Policy" - }, - "match": { - "$ref": "#/components/schemas/enrich._types.Policy" - }, - "range": { - "$ref": "#/components/schemas/enrich._types.Policy" - } - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + }, + "examples": { + "ConnectorCheckInResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" + } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "put_policy", - "x-namespace": "enrich" - }, - "delete": { + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_check_in\n
\n " + ], + "x-api": "check_in.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_connector/{connector_id}": { + "get": { "tags": [ - "enrich" + "connector" ], - "summary": "Delete an enrich policy", - "description": "Deletes an existing enrich policy and its enrich index.", - "operationId": "enrich-delete-policy", + "summary": "Get a connector", + "description": "Get the details about a connector.", + "operationId": "connector-get", "parameters": [ { "in": "path", - "name": "name", - "description": "Enrich policy to delete.", + "name": "connector_id", + "description": "The unique identifier of the connector", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "name": "include_deleted", + "description": "A flag to indicate if the desired connector should be fetched, even if it was soft-deleted.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } @@ -9294,58 +12297,85 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/connector._types.Connector" } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "delete_policy", - "x-namespace": "enrich" - } - }, - "/_enrich/policy/{name}/_execute": { + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_connector/{connector_id}\n
\n " + ], + "x-api": "get.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, "put": { "tags": [ - "enrich" + "connector" ], - "summary": "Run an enrich policy", - "description": "Create the enrich index for an existing enrich policy.", - "operationId": "enrich-execute-policy", + "summary": "Create or update a connector", + "operationId": "connector-put", "parameters": [ { "in": "path", - "name": "name", - "description": "Enrich policy to execute.", + "name": "connector_id", + "description": "The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request blocks other enrich policy execution requests until complete.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "index_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "is_native": { + "type": "boolean" + }, + "language": { + "type": "string" + }, + "name": { + "type": "string" + }, + "service_type": { + "type": "string" + } + } + }, + "examples": { + "ConnectorPutRequestExample1": { + "value": "{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"service_type\": \"google_drive\"\n}" + }, + "ConnectorPutRequestExample2": { + "value": "{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"description\": \"My Connector to sync data to Elastic index from Google Drive\",\n \"service_type\": \"google_drive\",\n \"language\": \"english\"\n}" + } + } + } + } + }, "responses": { "200": { "description": "", @@ -9354,123 +12384,60 @@ "schema": { "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/enrich.execute_policy.ExecuteEnrichPolicyStatus" - }, - "task": { - "$ref": "#/components/schemas/_types.TaskId" - } - } - } - } - } - } - }, - "x-state": "Added in 7.5.0", - "x-api-name" : "execute_policy", - "x-namespace": "enrich" - } - }, - "/_enrich/policy": { - "get": { - "tags": [ - "enrich" - ], - "summary": "Get an enrich policy", - "description": "Returns information about an enrich policy.", - "operationId": "enrich-get-policy-1", - "parameters": [ - { - "$ref": "#/components/parameters/enrich.get_policy-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/enrich.get_policy-200" - } - }, - "x-state": "Added in 7.5.0", - "x-api-name" : "get_policy", - "x-namespace": "enrich" - } - }, - "/_enrich/_stats": { - "get": { - "tags": [ - "enrich" - ], - "summary": "Get enrich stats", - "description": "Returns enrich coordinator statistics and information about enrich policies that are currently executing.", - "operationId": "enrich-stats", - "parameters": [ - { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "coordinator_stats": { - "description": "Objects containing information about each coordinating ingest node for configured enrich processors.", - "type": "array", - "items": { - "$ref": "#/components/schemas/enrich.stats.CoordinatorStats" - } - }, - "executing_policies": { - "description": "Objects containing information about each enrich policy that is currently executing.", - "type": "array", - "items": { - "$ref": "#/components/schemas/enrich.stats.ExecutingPolicy" - } + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] }, - "cache_stats": { - "description": "Objects containing information about the enrich cache stats on each ingest node.", - "type": "array", - "items": { - "$ref": "#/components/schemas/enrich.stats.CacheStats" - } + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] } }, "required": [ - "coordinator_stats", - "executing_policies" + "result", + "id" ] + }, + "examples": { + "ConnectorPutResponseExample1": { + "value": "{\n \"result\": \"created\",\n \"id\": \"my-connector\"\n}" + } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "stats", - "x-namespace": "enrich" - } - }, - "/_eql/search/{id}": { - "get": { + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}\n
\n " + ], + "x-api": "put.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "eql" + "connector" ], - "summary": "Get async EQL search results", - "description": "Get the current status and available results for an async EQL search or a stored synchronous EQL search.", - "operationId": "eql-get", + "summary": "Delete a connector", + "description": "Removes a connector and associated sync jobs.\nThis is a destructive action that is not recoverable.\nNOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector.\nThese need to be removed manually.", + "operationId": "connector-delete", "parameters": [ { "in": "path", - "name": "id", - "description": "Identifier for the search.", + "name": "connector_id", + "description": "The unique identifier of the connector to be deleted", "required": true, "deprecated": false, "schema": { @@ -9480,61 +12447,25 @@ }, { "in": "query", - "name": "keep_alive", - "description": "Period for which the search and its results are stored on the cluster.\nDefaults to the keep_alive value set by the search’s EQL search API request.", + "name": "delete_sync_jobs", + "description": "A flag indicating if associated sync jobs should be also removed.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "wait_for_completion_timeout", - "description": "Timeout duration to wait for the request to finish.\nDefaults to no timeout, meaning the request waits for complete search results.", + "name": "hard", + "description": "A flag indicating if the connector should be hard deleted.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/eql._types.EqlSearchResponseBase" - } - } - } - } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "get", - "x-namespace": "eql" - }, - "delete": { - "tags": [ - "eql" - ], - "summary": "Delete an async EQL search", - "description": "Delete an async EQL search or a stored synchronous EQL search.\nThe API also deletes results for the search.", - "operationId": "eql-delete", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "Identifier for the search to delete.\nA search ID is provided in the EQL search API's response for an async search.\nA search ID is also provided if the request’s `keep_on_completion` parameter is `true`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - } - ], "responses": { "200": { "description": "", @@ -9542,258 +12473,93 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "delete", - "x-namespace": "eql" - } - }, - "/_eql/search/status/{id}": { - "get": { - "tags": [ - "eql" - ], - "summary": "Get the async EQL status", - "description": "Get the current status for an async EQL search or a stored synchronous EQL search without returning results.", - "operationId": "eql-get-status", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "Identifier for the search.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "is_partial": { - "description": "If true, the search request is still executing. If false, the search is completed.", - "type": "boolean" - }, - "is_running": { - "description": "If true, the response does not contain complete search results. This could be because either the search is still running (is_running status is false), or because it is already completed (is_running status is true) and results are partial due to failures or timeouts.", - "type": "boolean" - }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "expiration_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "completion_status": { - "description": "For a completed search shows the http status code of the completed search.", - "type": "number" - } - }, - "required": [ - "id", - "is_partial", - "is_running" - ] }, "examples": { - "EqlGetStatusResponseExample1": { - "description": "A successful response for getting status information for an async EQL search.", - "value": "{\n \"id\": \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"is_running\" : true,\n \"is_partial\" : true,\n \"start_time_in_millis\" : 1611690235000,\n \"expiration_time_in_millis\" : 1611690295000\n}" + "ConnectorDeleteResponseExample1": { + "value": "{\n \"acknowledged\": true\n}" } } } } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "get_status", - "x-namespace": "eql" - } - }, - "/{index}/_eql/search": { - "get": { - "tags": [ - "eql" - ], - "summary": "Get EQL search results", - "description": "Returns search results for an Event Query Language (EQL) query.\nEQL assumes each document in a data stream or index corresponds to an event.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql" - }, - "operationId": "eql-search", - "parameters": [ - { - "$ref": "#/components/parameters/eql.search-index" - }, - { - "$ref": "#/components/parameters/eql.search-allow_no_indices" - }, - { - "$ref": "#/components/parameters/eql.search-allow_partial_search_results" - }, - { - "$ref": "#/components/parameters/eql.search-allow_partial_sequence_results" - }, - { - "$ref": "#/components/parameters/eql.search-expand_wildcards" - }, - { - "$ref": "#/components/parameters/eql.search-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/eql.search-keep_alive" - }, - { - "$ref": "#/components/parameters/eql.search-keep_on_completion" - }, - { - "$ref": "#/components/parameters/eql.search-wait_for_completion_timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/eql.search" - }, - "responses": { - "200": { - "$ref": "#/components/responses/eql.search-200" - } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "search", - "x-namespace": "eql" - }, - "post": { - "tags": [ - "eql" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n DELETE\n /_connector/{connector_id}\n
\n " ], - "summary": "Get EQL search results", - "description": "Returns search results for an Event Query Language (EQL) query.\nEQL assumes each document in a data stream or index corresponds to an event.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql" - }, - "operationId": "eql-search-1", - "parameters": [ - { - "$ref": "#/components/parameters/eql.search-index" - }, - { - "$ref": "#/components/parameters/eql.search-allow_no_indices" - }, + "x-api": "delete.connector", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/eql.search-allow_partial_search_results" - }, - { - "$ref": "#/components/parameters/eql.search-allow_partial_sequence_results" - }, - { - "$ref": "#/components/parameters/eql.search-expand_wildcards" - }, - { - "$ref": "#/components/parameters/eql.search-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/eql.search-keep_alive" - }, - { - "$ref": "#/components/parameters/eql.search-keep_on_completion" - }, - { - "$ref": "#/components/parameters/eql.search-wait_for_completion_timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/eql.search" - }, - "responses": { - "200": { - "$ref": "#/components/responses/eql.search-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "search", - "x-namespace": "eql" + ] } }, - "/_query/async": { - "post": { + "/_connector": { + "get": { "tags": [ - "esql" + "connector" ], - "summary": "Run an async ES|QL query", - "description": "Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available.\n\nThe API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql" - }, - "operationId": "esql-async-query", + "summary": "Get all connectors", + "description": "Get information about all connectors.", + "operationId": "connector-list", "parameters": [ { "in": "query", - "name": "allow_partial_results", - "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", + "name": "from", + "description": "Starting offset", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "delimiter", - "description": "The character to use between values within a CSV row.\nIt is valid only for the CSV format.", + "name": "size", + "description": "Specifies a max number of results to get", "deprecated": false, "schema": { - "type": "string" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "drop_null_columns", - "description": "Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.\nIf `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.", + "name": "index_name", + "description": "A comma-separated list of connector index names to fetch connector documents for", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Indices" }, "style": "form" }, { "in": "query", - "name": "format", - "description": "A short version of the Accept header, for example `json` or `yaml`.", + "name": "connector_name", + "description": "A comma-separated list of connector names to fetch connector documents for", "deprecated": false, "schema": { - "$ref": "#/components/schemas/esql._types.EsqlFormat" + "$ref": "#/components/schemas/_types.Names" }, "style": "form" }, { "in": "query", - "name": "keep_alive", - "description": "The period for which the query and its results are stored in the cluster.\nThe default period is five days.\nWhen this period expires, the query and its results are deleted, even if the query is still ongoing.\nIf the `keep_on_completion` parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the `wait_for_completion_timeout` parameter, regardless of this value.", + "name": "service_type", + "description": "A comma-separated list of connector service types to fetch connector documents for", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Names" }, "style": "form" }, { "in": "query", - "name": "keep_on_completion", - "description": "Indicates whether the query and its results are stored in the cluster.\nIf false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter.", + "name": "include_deleted", + "description": "A flag to indicate if the desired connector should be fetched, even if it was soft-deleted.", "deprecated": false, "schema": { "type": "boolean" @@ -9802,76 +12568,101 @@ }, { "in": "query", - "name": "wait_for_completion_timeout", - "description": "The period to wait for the request to finish.\nBy default, the request waits for 1 second for the query results.\nIf the query completes during this period, results are returned\nOtherwise, a query ID is returned that can later be used to retrieve the results.", + "name": "query", + "description": "A wildcard query string that filters connectors with matching name, description or index name", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" } ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types.Connector" + } + } + }, + "required": [ + "count", + "results" + ] + } + } + } + } + }, + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_connector\n
\n " + ], + "x-api": "list.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "connector" + ], + "summary": "Create or update a connector", + "operationId": "connector-put-1", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "columnar": { - "description": "By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.", - "type": "boolean" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "locale": { + "description": { "type": "string" }, - "params": { - "description": "To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.FieldValue" - } + "index_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "profile": { - "description": "If provided and `true` the response will include an extra `profile` object\nwith information on how the query was executed. This information is for human debugging\nand its format can change at any time but it can give some insight into the performance\nof each part of the query.", + "is_native": { "type": "boolean" }, - "query": { - "description": "The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.", + "language": { "type": "string" }, - "tables": { - "description": "Tables to use with the LOOKUP operation. The top level key is the table\nname and the next level key is the column name.", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/esql._types.TableValuesContainer" - } - } - }, - "include_ccs_metadata": { - "description": "When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.", - "type": "boolean" + "name": { + "type": "string" }, - "wait_for_completion_timeout": { - "$ref": "#/components/schemas/_types.Duration" + "service_type": { + "type": "string" } - }, - "required": [ - "query" - ] + } }, "examples": { - "AsyncQueryRequestExample1": { - "value": "{\n \"query\": \"\"\"\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \"\"\",\n \"wait_for_completion_timeout\": \"2s\",\n \"include_ccs_metadata\": true\n}" + "ConnectorPutRequestExample1": { + "value": "{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"service_type\": \"google_drive\"\n}" + }, + "ConnectorPutRequestExample2": { + "value": "{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"description\": \"My Connector to sync data to Elastic index from Google Drive\",\n \"service_type\": \"google_drive\",\n \"language\": \"english\"\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -9879,102 +12670,149 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/esql._types.AsyncEsqlResult" + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + } + }, + "required": [ + "result", + "id" + ] + }, + "examples": { + "ConnectorPutResponseExample1": { + "value": "{\n \"result\": \"created\",\n \"id\": \"my-connector\"\n}" + } } } } } }, - "x-state": "Added in 8.13.0", - "x-api-name" : "async_query", - "x-namespace": "esql" - } - }, - "/_query/async/{id}": { - "get": { - "tags": [ - "esql" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector\n
\n " ], - "summary": "Get async ES|QL query results", - "description": "Get the current status and available results or stored results for an ES|QL asynchronous query.\nIf the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql" - }, - "operationId": "esql-async-query-get", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The unique identifier of the query.\nA query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.\nA query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - { - "in": "query", - "name": "drop_null_columns", - "description": "Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.\nIf `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "keep_alive", - "description": "The period for which the query and its results are stored in the cluster.\nWhen this period expires, the query and its results are deleted, even if the query is still ongoing.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, + "x-api": "put.connector", + "x-category": "management", + "x-metaTags": [ { - "in": "query", - "name": "wait_for_completion_timeout", - "description": "The period to wait for the request to finish.\nBy default, the request waits for complete query results.\nIf the request completes during the period specified in this parameter, complete query results are returned.\nOtherwise, the response returns an `is_running` value of `true` and no results.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "content": "Elasticsearch", + "name": "product_name" } - ], - "responses": { - "200": { + ] + }, + "post": { + "tags": [ + "connector" + ], + "summary": "Create a connector", + "description": "Connectors are Elasticsearch integrations that bring content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure.\nElastic managed connectors (Native connectors) are a managed service on Elastic Cloud.\nSelf-managed connectors (Connector clients) are self-managed on your infrastructure.", + "operationId": "connector-post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "index_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "is_native": { + "type": "boolean" + }, + "language": { + "type": "string" + }, + "name": { + "type": "string" + }, + "service_type": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/esql._types.AsyncEsqlResult" + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + } + }, + "required": [ + "result", + "id" + ] } } } } }, - "x-state": "Added in 8.13.0", - "x-api-name" : "async_query_get", - "x-namespace": "esql" - }, - "delete": { + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n POST\n /_connector\n
\n " + ], + "x-api": "post.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_connector/_sync_job/{connector_sync_job_id}/_cancel": { + "put": { "tags": [ - "esql" + "connector" ], - "summary": "Delete an async ES|QL query", - "description": "If the query is still running, it is cancelled.\nOtherwise, the stored results are deleted.\n\nIf the Elasticsearch security features are enabled, only the following users can use this API to delete a query:\n\n* The authenticated user that submitted the original query request\n* Users with the `cancel_task` cluster privilege", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql" - }, - "operationId": "esql-async-query-delete", + "summary": "Cancel a connector sync job", + "description": "Cancel a connector sync job, which sets the status to cancelling and updates `cancellation_requested_at` to the current time.\nThe connector service is then responsible for setting the status of connector sync jobs to cancelled.", + "operationId": "connector-sync-job-cancel", "parameters": [ { "in": "path", - "name": "id", - "description": "The unique identifier of the query.\nA query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.\nA query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job", "required": true, "deprecated": false, "schema": { @@ -9989,49 +12827,57 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] } } } } }, - "x-state": "Added in 8.13.0", - "x-api-name" : "async_query_delete", - "x-namespace": "esql" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/_sync_job/{connector_sync_job_id}/_cancel\n
\n " + ], + "x-api": "sync_job_cancel.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_query/async/{id}/stop": { - "post": { + "/_connector/_sync_job/{connector_sync_job_id}/_check_in": { + "put": { "tags": [ - "esql" + "connector" ], - "summary": "Stop async ES|QL query", - "description": "This API interrupts the query execution and returns the results so far.\nIf the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql" - }, - "operationId": "esql-async-query-stop", + "summary": "Check in a connector sync job", + "description": "Check in a connector sync job and set the `last_seen` field to the current time before updating it in the internal index.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", + "operationId": "connector-sync-job-check-in", "parameters": [ { "in": "path", - "name": "id", - "description": "The unique identifier of the query.\nA query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.\nA query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job to be checked in.", "required": true, "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "drop_null_columns", - "description": "Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.\nIf `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" } ], "responses": { @@ -10040,30 +12886,39 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/esql._types.EsqlResult" + "type": "object" } } } } }, - "x-state": "Added in 8.18.0", - "x-api-name" : "async_query_stop", - "x-namespace": "esql" + "x-state": "Technical preview", + "x-variations": [ + "
\n PUT\n /_connector/_sync_job/{connector_sync_job_id}/_check_in\n
\n " + ], + "x-api": "sync_job_check_in.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_query/queries/{id}": { - "get": { + "/_connector/_sync_job/{connector_sync_job_id}/_claim": { + "put": { "tags": [ - "esql" + "connector" ], - "summary": "Get a specific running ES|QL query information", - "description": "Returns an object extended information about a running ES|QL query.", - "operationId": "esql-get-query", + "summary": "Claim a connector sync job", + "description": "This action updates the job status to `in_progress` and sets the `last_seen` and `started_at` timestamps to the current time.\nAdditionally, it can set the `sync_cursor` property for the sync job.\n\nThis API is not intended for direct connector management by users.\nIt supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", + "operationId": "connector-sync-job-claim", "parameters": [ { "in": "path", - "name": "id", - "description": "The query ID", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job.", "required": true, "deprecated": false, "schema": { @@ -10072,145 +12927,176 @@ "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sync_cursor": { + "description": "The cursor object from the last incremental sync job.\nThis should reference the `sync_cursor` field in the connector state for which the job runs.", + "type": "object" + }, + "worker_hostname": { + "description": "The host name of the current system that will run the job.", + "type": "string" + } + }, + "required": [ + "worker_hostname" + ] + }, + "examples": { + "ConnectorSyncJobClaimExample1": { + "description": "An example body for a `PUT _connector/_sync_job/my-connector-sync-job-id/_claim` request.", + "value": "{\n \"worker_hostname\": \"some-machine\"\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "node": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "start_time_millis": { - "type": "number" - }, - "running_time_nanos": { - "type": "number" - }, - "query": { - "type": "string" - }, - "coordinating_node": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "data_nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.NodeId" - } - } - }, - "required": [ - "id", - "node", - "start_time_millis", - "running_time_nanos", - "query", - "coordinating_node", - "data_nodes" - ] + "type": "object" } } } } }, "x-state": "Technical preview", - "x-api-name" : "get_query", - "x-namespace": "esql" + "x-variations": [ + "
\n PUT\n /_connector/_sync_job/{connector_sync_job_id}/_claim\n
\n " + ], + "x-api": "sync_job_claim.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_query/queries": { + "/_connector/_sync_job/{connector_sync_job_id}": { "get": { "tags": [ - "esql" + "connector" + ], + "summary": "Get a connector sync job", + "operationId": "connector-sync-job-get", + "parameters": [ + { + "in": "path", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } ], - "summary": "Get running ES|QL queries information", - "description": "Returns an object containing IDs and other information about the running ES|QL queries.", - "operationId": "esql-list-queries", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "queries": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/esql.list_queries.Body" - } - } - }, - "required": [ - "queries" - ] + "$ref": "#/components/schemas/connector._types.ConnectorSyncJob" } } } } }, - "x-state": "Technical preview", - "x-api-name" : "list_queries", - "x-namespace": "esql" - } - }, - "/_query": { - "post": { + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_connector/_sync_job/{connector_sync_job_id}\n
\n " + ], + "x-api": "sync_job_get.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "esql" + "connector" ], - "summary": "Run an ES|QL query", - "description": "Get search results for an ES|QL (Elasticsearch query language) query.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql" - }, - "operationId": "esql-query", + "summary": "Delete a connector sync job", + "description": "Remove a connector sync job and its associated data.\nThis is a destructive action that is not recoverable.", + "operationId": "connector-sync-job-delete", "parameters": [ { - "in": "query", - "name": "format", - "description": "A short version of the Accept header, e.g. json, yaml.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/esql._types.EsqlFormat" - }, - "style": "form" - }, - { - "in": "query", - "name": "delimiter", - "description": "The character to use between values within a CSV row. Only valid for the CSV format.", + "in": "path", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job to be deleted", + "required": true, "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" - }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "SyncJobDeleteResponseExample1": { + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n DELETE\n /_connector/_sync_job/{connector_sync_job_id}\n
\n " + ], + "x-api": "sync_job_delete.connector", + "x-category": "management", + "x-metaTags": [ { - "in": "query", - "name": "drop_null_columns", - "description": "Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results?\nDefaults to `false`. If `true` then the response will include an extra section under the name `all_columns` which has the name of all columns.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_connector/_sync_job/{connector_sync_job_id}/_error": { + "put": { + "tags": [ + "connector" + ], + "summary": "Set a connector sync job error", + "description": "Set the `error` field for a connector sync job and set its `status` to `error`.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", + "operationId": "connector-sync-job-error", + "parameters": [ { - "in": "query", - "name": "allow_partial_results", - "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", + "in": "path", + "name": "connector_sync_job_id", + "description": "The unique identifier for the connector sync job.", + "required": true, "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" } ], "requestBody": { @@ -10219,54 +13105,18 @@ "schema": { "type": "object", "properties": { - "columnar": { - "description": "By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.", - "type": "boolean" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "locale": { - "type": "string" - }, - "params": { - "description": "To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.FieldValue" - } - }, - "profile": { - "description": "If provided and `true` the response will include an extra `profile` object\nwith information on how the query was executed. This information is for human debugging\nand its format can change at any time but it can give some insight into the performance\nof each part of the query.", - "type": "boolean" - }, - "query": { - "description": "The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.", + "error": { + "description": "The error for the connector sync job error field.", "type": "string" - }, - "tables": { - "description": "Tables to use with the LOOKUP operation. The top level key is the table\nname and the next level key is the column name.", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/esql._types.TableValuesContainer" - } - } - }, - "include_ccs_metadata": { - "description": "When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.", - "type": "boolean" } }, "required": [ - "query" + "error" ] }, "examples": { - "QueryRequestExample1": { - "description": "Run `POST /_query` to get results for an ES|QL query.", - "value": "{\n \"query\": \"\"\"\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \"\"\",\n \"include_ccs_metadata\": true\n}" + "SyncJobErrorRequestExample1": { + "value": "{\n \"error\": \"some-error\"\n}" } } } @@ -10279,446 +13129,344 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/esql._types.EsqlResult" + "type": "object" } } } } }, - "x-api-name" : "query", - "x-namespace": "esql" + "x-state": "Technical preview", + "x-variations": [ + "
\n PUT\n /_connector/_sync_job/{connector_sync_job_id}/_error\n
\n " + ], + "x-api": "sync_job_error.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_source/{id}": { + "/_connector/_sync_job": { "get": { "tags": [ - "document" + "connector" ], - "summary": "Get a document's source", - "description": "Get the source of a document.\nFor example:\n\n```\nGET my-index-000001/_source/1\n```\n\nYou can use the source filtering parameters to control which parts of the `_source` are returned:\n\n```\nGET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities\n```", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-source-field" - }, - "operationId": "get-source", + "summary": "Get all connector sync jobs", + "description": "Get information about all stored connector sync jobs listed by their creation date in ascending order.", + "operationId": "connector-sync-job-list", "parameters": [ - { - "in": "path", - "name": "index", - "description": "The name of the index that contains the document.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - { - "in": "path", - "name": "id", - "description": "A unique document identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, { "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nBy default, the operation is randomized between the shard replicas.", + "name": "from", + "description": "Starting offset", "deprecated": false, "schema": { - "type": "string" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "realtime", - "description": "If `true`, the request is real-time as opposed to near-real-time.", + "name": "size", + "description": "Specifies a max number of results to get", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "refresh", - "description": "If `true`, the request refreshes the relevant shards before retrieving the document.\nSetting it to `true` should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).", + "name": "status", + "description": "A sync job status to fetch connector sync jobs for", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/connector._types.SyncStatus" }, "style": "form" }, { "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", + "name": "connector_id", + "description": "A connector id to fetch connector sync jobs for", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Routing" + "$ref": "#/components/schemas/_types.Id" }, "style": "form" }, { "in": "query", - "name": "_source", - "description": "Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return.", + "name": "job_type", + "description": "A comma-separated list of job types to fetch the sync jobs for", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncJobType" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types.SyncJobType" + } + } + ] }, "style": "form" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types.ConnectorSyncJob" + } + } + }, + "required": [ + "count", + "results" + ] + } + } + } + } + }, + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_connector/_sync_job\n
\n " + ], + "x-api": "sync_job_list.connector", + "x-category": "management", + "x-metaTags": [ { - "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude in the response.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - { - "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - { - "in": "query", - "name": "stored_fields", - "description": "A comma-separated list of stored fields to return as part of a hit.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - { - "in": "query", - "name": "version", - "description": "The version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "style": "form" - }, - { - "in": "query", - "name": "version_type", - "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n - `force`: This option is deprecated because it can cause primary and replica shards to diverge.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionType" - }, - "style": "form" + "content": "Elasticsearch", + "name": "product_name" } + ] + }, + "post": { + "tags": [ + "connector" ], + "summary": "Create a connector sync job", + "description": "Create a connector sync job document in the internal index and initialize its counters and timestamps with default values.", + "operationId": "connector-sync-job-post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "The id of the associated connector", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "job_type": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncJobType" + } + ] + }, + "trigger_method": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncJobTriggerMethod" + } + ] + } + }, + "required": [ + "id" + ] + }, + "examples": { + "SyncJobPostRequestExample1": { + "value": "{\n \"id\": \"connector-id\",\n \"job_type\": \"full\",\n \"trigger_method\": \"on_demand\"\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + } + }, + "required": [ + "id" + ] } } } } }, - "x-api-name": "get_source" - }, - "head": { + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n POST\n /_connector/_sync_job\n
\n " + ], + "x-api": "sync_job_post.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_connector/_sync_job/{connector_sync_job_id}/_stats": { + "put": { "tags": [ - "document" + "connector" ], - "summary": "Check for a document source", - "description": "Check whether a document source exists in an index.\nFor example:\n\n```\nHEAD my-index-000001/_source/1\n```\n\nA document's source is not available if it is disabled in the mapping.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-source-field" - }, - "operationId": "exists-source", + "summary": "Set the connector sync job stats", + "description": "Stats include: `deleted_document_count`, `indexed_document_count`, `indexed_document_volume`, and `total_document_count`.\nYou can also update `last_seen`.\nThis API is mainly used by the connector service for updating sync job information.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", + "operationId": "connector-sync-job-update-stats", "parameters": [ { "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases.\nIt supports wildcards (`*`).", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - { - "in": "path", - "name": "id", - "description": "A unique identifier for the document.", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job.", "required": true, "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nBy default, the operation is randomized between the shard replicas.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "realtime", - "description": "If `true`, the request is real-time as opposed to near-real-time.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "refresh", - "description": "If `true`, the request refreshes the relevant shards before retrieving the document.\nSetting it to `true` should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - { - "in": "query", - "name": "_source", - "description": "Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" - }, - "style": "form" - }, - { - "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude in the response.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - { - "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - { - "in": "query", - "name": "version", - "description": "The version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "style": "form" - }, - { - "in": "query", - "name": "version_type", - "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n - `force`: This option is deprecated because it can cause primary and replica shards to diverge.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionType" - }, - "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleted_document_count": { + "description": "The number of documents the sync job deleted.", + "type": "number" + }, + "indexed_document_count": { + "description": "The number of documents the sync job indexed.", + "type": "number" + }, + "indexed_document_volume": { + "description": "The total size of the data (in MiB) the sync job indexed.", + "type": "number" + }, + "last_seen": { + "description": "The timestamp to use in the `last_seen` property for the connector sync job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "metadata": { + "description": "The connector-specific metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "total_document_count": { + "description": "The total number of documents in the target index after the sync job finished.", + "type": "number" + } + }, + "required": [ + "deleted_document_count", + "indexed_document_count", + "indexed_document_volume" + ] + }, + "examples": { + "ConnectorSyncJobUpdateStatsExample1": { + "description": "An example body for a `PUT _connector/_sync_job/my-connector-sync-job/_stats` request.", + "value": "{\n \"deleted_document_count\": 10,\n \"indexed_document_count\": 20,\n \"indexed_document_volume\": 1000,\n \"total_document_count\": 2000,\n \"last_seen\": \"2023-01-02T10:00:00Z\"\n}" + } + } } - } - }, - "x-state": "Added in 5.4.0", - "x-api-name": "exists_source" - } - }, - "/{index}/_explain/{id}": { - "get": { - "tags": [ - "search" - ], - "summary": "Explain a document match result", - "description": "Get information about why a specific document matches, or doesn't match, a query.\nIt computes a score explanation for a query and a specific document.", - "operationId": "explain", - "parameters": [ - { - "$ref": "#/components/parameters/explain-index" - }, - { - "$ref": "#/components/parameters/explain-id" - }, - { - "$ref": "#/components/parameters/explain-analyzer" - }, - { - "$ref": "#/components/parameters/explain-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/explain-default_operator" }, - { - "$ref": "#/components/parameters/explain-df" - }, - { - "$ref": "#/components/parameters/explain-lenient" - }, - { - "$ref": "#/components/parameters/explain-preference" - }, - { - "$ref": "#/components/parameters/explain-routing" - }, - { - "$ref": "#/components/parameters/explain-_source" - }, - { - "$ref": "#/components/parameters/explain-_source_excludes" - }, - { - "$ref": "#/components/parameters/explain-_source_includes" - }, - { - "$ref": "#/components/parameters/explain-stored_fields" - }, - { - "$ref": "#/components/parameters/explain-q" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/explain" + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/explain-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } } }, - "x-api-name": "explain" - }, - "post": { - "tags": [ - "search" + "x-state": "Technical preview", + "x-variations": [ + "
\n PUT\n /_connector/_sync_job/{connector_sync_job_id}/_stats\n
\n " ], - "summary": "Explain a document match result", - "description": "Get information about why a specific document matches, or doesn't match, a query.\nIt computes a score explanation for a query and a specific document.", - "operationId": "explain-1", - "parameters": [ - { - "$ref": "#/components/parameters/explain-index" - }, - { - "$ref": "#/components/parameters/explain-id" - }, - { - "$ref": "#/components/parameters/explain-analyzer" - }, - { - "$ref": "#/components/parameters/explain-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/explain-default_operator" - }, - { - "$ref": "#/components/parameters/explain-df" - }, - { - "$ref": "#/components/parameters/explain-lenient" - }, - { - "$ref": "#/components/parameters/explain-preference" - }, - { - "$ref": "#/components/parameters/explain-routing" - }, - { - "$ref": "#/components/parameters/explain-_source" - }, - { - "$ref": "#/components/parameters/explain-_source_excludes" - }, - { - "$ref": "#/components/parameters/explain-_source_includes" - }, - { - "$ref": "#/components/parameters/explain-stored_fields" - }, + "x-api": "sync_job_update_stats.connector", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/explain-q" + "content": "Elasticsearch", + "name": "product_name" } - ], - "requestBody": { - "$ref": "#/components/requestBodies/explain" - }, - "responses": { - "200": { - "$ref": "#/components/responses/explain-200" - } - }, - "x-api-name": "explain" + ] } }, - "/_features": { - "get": { + "/_connector/{connector_id}/_filtering/_activate": { + "put": { "tags": [ - "features" + "connector" ], - "summary": "Get the features", - "description": "Get a list of features that can be included in snapshots using the `feature_states` field when creating a snapshot.\nYou can use this API to determine which feature states to include when taking a snapshot.\nBy default, all feature states are included in a snapshot if that snapshot includes the global state, or none if it does not.\n\nA feature state includes one or more system indices necessary for a given feature to function.\nIn order to ensure data integrity, all system indices that comprise a feature state are snapshotted and restored together.\n\nThe features listed by this API are a combination of built-in features and features defined by plugins.\nIn order for a feature state to be listed in this API and recognized as a valid feature state by the create snapshot API, the plugin that defines that feature must be installed on the master node.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots" - }, - "operationId": "features-get-features", + "summary": "Activate the connector draft filter", + "description": "Activates the valid draft filtering for a connector.", + "operationId": "connector-update-active-filtering", "parameters": [ { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" } ], "responses": { @@ -10729,52 +13477,80 @@ "schema": { "type": "object", "properties": { - "features": { - "type": "array", - "items": { - "$ref": "#/components/schemas/features._types.Feature" - } + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] } }, "required": [ - "features" + "result" ] - }, - "examples": { - "GetFeaturesResponseExample1": { - "description": "A successful response for retrieving a list of feature states that can be included when taking a snapshot.", - "value": "{\n \"features\": [\n {\n \"name\": \"tasks\",\n \"description\": \"Manages task results\"\n },\n {\n \"name\": \"kibana\",\n \"description\": \"Manages Kibana configuration and reports\"\n }\n ]\n}" - } } } } } }, - "x-state": "Added in 7.12.0", - "x-api-name" : "get_features", - "x-namespace": "features" + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_filtering/_activate\n
\n " + ], + "x-api": "update_active_filtering.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_features/_reset": { - "post": { + "/_connector/{connector_id}/_api_key_id": { + "put": { "tags": [ - "features" + "connector" ], - "summary": "Reset the features", - "description": "Clear all of the state information stored in system indices by Elasticsearch features, including the security and machine learning indices.\n\nWARNING: Intended for development and testing use only. Do not reset features on a production cluster.\n\nReturn a cluster to the same state as a new installation by resetting the feature state for all Elasticsearch features.\nThis deletes all state information stored in system indices.\n\nThe response code is HTTP 200 if the state is successfully reset for all features.\nIt is HTTP 500 if the reset operation failed for any feature.\n\nNote that select features might provide a way to reset particular system indices.\nUsing this API resets all features, both those that are built-in and implemented as plugins.\n\nTo list the features that will be affected, use the get features API.\n\nIMPORTANT: The features installed on the node you submit this request to are the features that will be reset. Run on the master node if you have any doubts about which plugins are installed on individual nodes.", - "operationId": "features-reset-features", + "summary": "Update the connector API key ID", + "description": "Update the `api_key_id` and `api_key_secret_id` fields of a connector.\nYou can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored.\nThe connector secret ID is required only for Elastic managed (native) connectors.\nSelf-managed connectors (connector clients) do not use this field.", + "operationId": "connector-update-api-key-id", "parameters": [ { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_key_id": { + "type": "string" + }, + "api_key_secret_id": { + "type": "string" + } + } + }, + "examples": { + "ConnectorUpdateApiKeyIDRequestExample1": { + "value": "{\n \"api_key_id\": \"my-api-key-id\",\n \"api_key_secret_id\": \"my-connector-secret-id\"\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -10783,289 +13559,386 @@ "schema": { "type": "object", "properties": { - "features": { - "type": "array", - "items": { - "$ref": "#/components/schemas/features._types.Feature" - } + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] } }, "required": [ - "features" + "result" ] }, "examples": { - "ResetFeaturesResponseExample1": { - "description": "A successful response for clearing state information stored in system indices by Elasticsearch features.", - "value": "{\n \"features\" : [\n {\n \"feature_name\" : \"security\",\n \"status\" : \"SUCCESS\"\n },\n {\n \"feature_name\" : \"tasks\",\n \"status\" : \"SUCCESS\"\n }\n ]\n}" + "ConnectorUpdateAPIKeyIDResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "reset_features", - "x-namespace": "features" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_api_key_id\n
\n " + ], + "x-api": "update_api_key_id.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_field_caps": { - "get": { + "/_connector/{connector_id}/_configuration": { + "put": { "tags": [ - "search" + "connector" ], - "summary": "Get the field capabilities", - "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", - "operationId": "field-caps", + "summary": "Update the connector configuration", + "description": "Update the configuration field in the connector document.", + "operationId": "connector-update-configuration", "parameters": [ { - "$ref": "#/components/parameters/field_caps-allow_no_indices" - }, - { - "$ref": "#/components/parameters/field_caps-expand_wildcards" - }, - { - "$ref": "#/components/parameters/field_caps-fields" - }, - { - "$ref": "#/components/parameters/field_caps-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/field_caps-include_unmapped" - }, - { - "$ref": "#/components/parameters/field_caps-filters" - }, - { - "$ref": "#/components/parameters/field_caps-types" - }, - { - "$ref": "#/components/parameters/field_caps-include_empty_fields" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "requestBody": { - "$ref": "#/components/requestBodies/field_caps" - }, - "responses": { - "200": { - "$ref": "#/components/responses/field_caps-200" - } - }, - "x-state": "Added in 5.4.0", - "x-api-name": "field_caps" - }, - "post": { - "tags": [ - "search" - ], - "summary": "Get the field capabilities", - "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", - "operationId": "field-caps-1", - "parameters": [ - { - "$ref": "#/components/parameters/field_caps-allow_no_indices" - }, - { - "$ref": "#/components/parameters/field_caps-expand_wildcards" - }, - { - "$ref": "#/components/parameters/field_caps-fields" - }, - { - "$ref": "#/components/parameters/field_caps-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/field_caps-include_unmapped" - }, - { - "$ref": "#/components/parameters/field_caps-filters" - }, - { - "$ref": "#/components/parameters/field_caps-types" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "configuration": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorConfiguration" + } + ] + }, + "values": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "ConnectorUpdateConfigurationRequestExample1": { + "value": "{\n \"values\": {\n \"tenant_id\": \"my-tenant-id\",\n \"tenant_name\": \"my-sharepoint-site\",\n \"client_id\": \"foo\",\n \"secret_value\": \"bar\",\n \"site_collections\": \"*\"\n }\n}" + }, + "ConnectorUpdateConfigurationRequestExample2": { + "value": "{\n \"values\": {\n \"secret_value\": \"foo-bar\"\n }\n}" + } + } + } }, - { - "$ref": "#/components/parameters/field_caps-include_empty_fields" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/field_caps" + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/field_caps-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + }, + "examples": { + "ConnectorUpdateConfigurationResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" + } + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name": "field_caps" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_configuration\n
\n " + ], + "x-api": "update_configuration.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_field_caps": { - "get": { + "/_connector/{connector_id}/_error": { + "put": { "tags": [ - "search" + "connector" ], - "summary": "Get the field capabilities", - "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", - "operationId": "field-caps-2", + "summary": "Update the connector error field", + "description": "Set the error field for the connector.\nIf the error provided in the request body is non-null, the connector’s status is updated to error.\nOtherwise, if the error is reset to null, the connector status is updated to connected.", + "operationId": "connector-update-error", "parameters": [ { - "$ref": "#/components/parameters/field_caps-index" - }, - { - "$ref": "#/components/parameters/field_caps-allow_no_indices" - }, - { - "$ref": "#/components/parameters/field_caps-expand_wildcards" - }, - { - "$ref": "#/components/parameters/field_caps-fields" - }, - { - "$ref": "#/components/parameters/field_caps-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/field_caps-include_unmapped" - }, - { - "$ref": "#/components/parameters/field_caps-filters" - }, - { - "$ref": "#/components/parameters/field_caps-types" - }, - { - "$ref": "#/components/parameters/field_caps-include_empty_fields" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "requestBody": { - "$ref": "#/components/requestBodies/field_caps" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_spec_utils.NullValue" + } + ] + } + }, + "required": [ + "error" + ] + }, + "examples": { + "ConnectorUpdateErrorRequestExample1": { + "value": "{\n \"error\": \"Houston, we have a problem!\"\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/field_caps-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + }, + "examples": { + "ConnectorUpdateErrorResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" + } + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name": "field_caps" - }, - "post": { + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_error\n
\n " + ], + "x-api": "update_error.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_connector/{connector_id}/_features": { + "put": { "tags": [ - "search" + "connector" ], - "summary": "Get the field capabilities", - "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", - "operationId": "field-caps-3", + "summary": "Update the connector features", + "description": "Update the connector features in the connector document.\nThis API can be used to control the following aspects of a connector:\n\n* document-level security\n* incremental syncs\n* advanced sync rules\n* basic sync rules\n\nNormally, the running connector service automatically manages these features.\nHowever, you can use this API to override the default behavior.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", + "operationId": "connector-update-features", "parameters": [ { - "$ref": "#/components/parameters/field_caps-index" - }, - { - "$ref": "#/components/parameters/field_caps-allow_no_indices" - }, - { - "$ref": "#/components/parameters/field_caps-expand_wildcards" - }, - { - "$ref": "#/components/parameters/field_caps-fields" - }, - { - "$ref": "#/components/parameters/field_caps-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/field_caps-include_unmapped" - }, - { - "$ref": "#/components/parameters/field_caps-filters" - }, - { - "$ref": "#/components/parameters/field_caps-types" - }, - { - "$ref": "#/components/parameters/field_caps-include_empty_fields" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "requestBody": { - "$ref": "#/components/requestBodies/field_caps" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "features": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorFeatures" + } + ] + } + }, + "required": [ + "features" + ] + }, + "examples": { + "ConnectorUpdateFeaturesRequestExample1": { + "value": "{\n \"features\": {\n \"document_level_security\": {\n \"enabled\": true\n },\n \"incremental_sync\": {\n \"enabled\": true\n },\n \"sync_rules\": {\n \"advanced\": {\n \"enabled\": false\n },\n \"basic\": {\n \"enabled\": true\n }\n }\n }\n}" + }, + "ConnectorUpdateFeaturesRequestExample2": { + "value": "{\n \"features\": {\n \"document_level_security\": {\n \"enabled\": true\n }\n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/field_caps-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + }, + "examples": { + "ConnectorUpdateFeaturesResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" + } + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name": "field_caps" + "x-state": "Technical preview", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_features\n
\n " + ], + "x-api": "update_features.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_fleet/global_checkpoints": { - "get": { + "/_connector/{connector_id}/_filtering": { + "put": { "tags": [ - "fleet" + "connector" ], - "summary": "Get global checkpoints", - "description": "Get the current global checkpoints for an index.\nThis API is designed for internal use by the Fleet server project.", - "operationId": "fleet-global-checkpoints", + "summary": "Update the connector filtering", + "description": "Update the draft filtering configuration of a connector and marks the draft validation state as edited.\nThe filtering draft is activated once validated by the running Elastic connector service.\nThe filtering property is used to configure sync rules (both basic and advanced) for a connector.", + "operationId": "connector-update-filtering", "parameters": [ { "in": "path", - "name": "index", - "description": "A single index or index alias that resolves to a single index.", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", "required": true, "deprecated": false, "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.IndexName" - }, - { - "$ref": "#/components/schemas/_types.IndexAlias" - } - ] + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "wait_for_advance", - "description": "A boolean value which controls whether to wait (until the timeout) for the global checkpoints\nto advance past the provided `checkpoints`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "wait_for_index", - "description": "A boolean value which controls whether to wait (until the timeout) for the target index to exist\nand all primary shards be active. Can only be true when `wait_for_advance` is true.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "checkpoints", - "description": "A comma separated list of previous global checkpoints. When used in combination with `wait_for_advance`,\nthe API will only return once the global checkpoints advances past the checkpoints. Providing an empty list\nwill cause Elasticsearch to immediately return the current global checkpoints.", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/fleet._types.Checkpoint" - } - }, - "style": "form" - }, - { - "in": "query", - "name": "timeout", - "description": "Period to wait for a global checkpoints to advance past `checkpoints`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filtering": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types.FilteringConfig" + } + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types.FilteringRule" + } + }, + "advanced_snippet": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringAdvancedSnippet" + } + ] + } + } + }, + "examples": { + "ConnectorUpdateFilteringRequestExample1": { + "value": "{\n \"rules\": [\n {\n \"field\": \"file_extension\",\n \"id\": \"exclude-txt-files\",\n \"order\": 0,\n \"policy\": \"exclude\",\n \"rule\": \"equals\",\n \"value\": \"txt\"\n },\n {\n \"field\": \"_\",\n \"id\": \"DEFAULT\",\n \"order\": 1,\n \"policy\": \"include\",\n \"rule\": \"regex\",\n \"value\": \".*\"\n }\n ]\n}" + }, + "ConnectorUpdateFilteringRequestExample2": { + "value": "{\n \"advanced_snippet\": {\n \"value\": [{\n \"tables\": [\n \"users\",\n \"orders\"\n ],\n \"query\": \"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\"\n }]\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -11074,596 +13947,259 @@ "schema": { "type": "object", "properties": { - "global_checkpoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/fleet._types.Checkpoint" - } - }, - "timed_out": { - "type": "boolean" + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] } }, "required": [ - "global_checkpoints", - "timed_out" + "result" ] + }, + "examples": { + "ConnectorUpdateFilteringResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" + } } } } } }, - "x-state": "Added in 7.13.0", - "x-api-name" : "global_checkpoints", - "x-namespace": "fleet" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_filtering\n
\n " + ], + "x-api": "update_filtering.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_fleet/_fleet_msearch": { - "get": { + "/_connector/{connector_id}/_filtering/_validation": { + "put": { "tags": [ - "fleet" + "connector" ], - "summary": "Run multiple Fleet searches", - "description": "Run several Fleet searches with a single API request.\nThe API follows the same structure as the multi search API.\nHowever, similar to the Fleet search API, it supports the `wait_for_checkpoints` parameter.", - "operationId": "fleet-msearch", + "summary": "Update the connector draft filtering validation", + "description": "Update the draft filtering validation info for a connector.", + "operationId": "connector-update-filtering-validation", "parameters": [ { - "$ref": "#/components/parameters/fleet.msearch-allow_no_indices" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/fleet.msearch-expand_wildcards" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ignore_throttled" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/fleet.msearch-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/fleet.msearch-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/fleet.msearch-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/fleet.msearch-search_type" - }, - { - "$ref": "#/components/parameters/fleet.msearch-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/fleet.msearch-typed_keys" - }, - { - "$ref": "#/components/parameters/fleet.msearch-wait_for_checkpoints" - }, - { - "$ref": "#/components/parameters/fleet.msearch-allow_partial_search_results" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "requestBody": { - "$ref": "#/components/requestBodies/fleet.msearch" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "validation": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringRulesValidation" + } + ] + } + }, + "required": [ + "validation" + ] + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/fleet.msearch-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + } + } + } } }, - "x-state": "Technical preview", - "x-api-name" : "msearch", - "x-namespace": "fleet" - }, - "post": { + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_filtering/_validation\n
\n " + ], + "x-api": "update_filtering_validation.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_connector/{connector_id}/_index_name": { + "put": { "tags": [ - "fleet" + "connector" ], - "summary": "Run multiple Fleet searches", - "description": "Run several Fleet searches with a single API request.\nThe API follows the same structure as the multi search API.\nHowever, similar to the Fleet search API, it supports the `wait_for_checkpoints` parameter.", - "operationId": "fleet-msearch-1", + "summary": "Update the connector index name", + "description": "Update the `index_name` field of a connector, specifying the index where the data ingested by the connector is stored.", + "operationId": "connector-update-index-name", "parameters": [ { - "$ref": "#/components/parameters/fleet.msearch-allow_no_indices" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/fleet.msearch-expand_wildcards" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ignore_throttled" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/fleet.msearch-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/fleet.msearch-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/fleet.msearch-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/fleet.msearch-search_type" - }, - { - "$ref": "#/components/parameters/fleet.msearch-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/fleet.msearch-typed_keys" - }, - { - "$ref": "#/components/parameters/fleet.msearch-wait_for_checkpoints" - }, - { - "$ref": "#/components/parameters/fleet.msearch-allow_partial_search_results" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "requestBody": { - "$ref": "#/components/requestBodies/fleet.msearch" - }, - "responses": { - "200": { - "$ref": "#/components/responses/fleet.msearch-200" - } - }, - "x-state": "Technical preview", - "x-api-name" : "msearch", - "x-namespace": "fleet" - } - }, - "/{index}/_fleet/_fleet_msearch": { - "get": { - "tags": [ - "fleet" - ], - "summary": "Run multiple Fleet searches", - "description": "Run several Fleet searches with a single API request.\nThe API follows the same structure as the multi search API.\nHowever, similar to the Fleet search API, it supports the `wait_for_checkpoints` parameter.", - "operationId": "fleet-msearch-2", - "parameters": [ - { - "$ref": "#/components/parameters/fleet.msearch-index" - }, - { - "$ref": "#/components/parameters/fleet.msearch-allow_no_indices" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/fleet.msearch-expand_wildcards" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ignore_throttled" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/fleet.msearch-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/fleet.msearch-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/fleet.msearch-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/fleet.msearch-search_type" - }, - { - "$ref": "#/components/parameters/fleet.msearch-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/fleet.msearch-typed_keys" - }, - { - "$ref": "#/components/parameters/fleet.msearch-wait_for_checkpoints" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index_name": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "$ref": "#/components/schemas/_spec_utils.NullValue" + } + ] + } + }, + "required": [ + "index_name" + ] + }, + "examples": { + "ConnectorUpdateIndexNameRequestExample1": { + "value": "{\n \"index_name\": \"data-from-my-google-drive\"\n}" + } + } + } }, - { - "$ref": "#/components/parameters/fleet.msearch-allow_partial_search_results" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/fleet.msearch" + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/fleet.msearch-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + }, + "examples": { + "ConnectorUpdateIndexNameResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" + } + } + } + } } }, - "x-state": "Technical preview", - "x-api-name" : "msearch", - "x-namespace": "fleet" - }, - "post": { - "tags": [ - "fleet" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_index_name\n
\n " ], - "summary": "Run multiple Fleet searches", - "description": "Run several Fleet searches with a single API request.\nThe API follows the same structure as the multi search API.\nHowever, similar to the Fleet search API, it supports the `wait_for_checkpoints` parameter.", - "operationId": "fleet-msearch-3", - "parameters": [ - { - "$ref": "#/components/parameters/fleet.msearch-index" - }, - { - "$ref": "#/components/parameters/fleet.msearch-allow_no_indices" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ccs_minimize_roundtrips" - }, + "x-api": "update_index_name.connector", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/fleet.msearch-expand_wildcards" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ignore_throttled" - }, - { - "$ref": "#/components/parameters/fleet.msearch-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/fleet.msearch-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/fleet.msearch-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/fleet.msearch-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/fleet.msearch-search_type" - }, - { - "$ref": "#/components/parameters/fleet.msearch-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/fleet.msearch-typed_keys" - }, - { - "$ref": "#/components/parameters/fleet.msearch-wait_for_checkpoints" - }, - { - "$ref": "#/components/parameters/fleet.msearch-allow_partial_search_results" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/fleet.msearch" - }, - "responses": { - "200": { - "$ref": "#/components/responses/fleet.msearch-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Technical preview", - "x-api-name" : "msearch", - "x-namespace": "fleet" + ] } }, - "/{index}/_fleet/_fleet_search": { - "get": { + "/_connector/{connector_id}/_name": { + "put": { "tags": [ - "fleet" + "connector" ], - "summary": "Run a Fleet search", - "description": "The purpose of the Fleet search API is to provide an API where the search will be run only\nafter the provided checkpoint has been processed and is visible for searches inside of Elasticsearch.", - "operationId": "fleet-search", + "summary": "Update the connector name and description", + "operationId": "connector-update-name", "parameters": [ { - "$ref": "#/components/parameters/fleet.search-index" - }, - { - "$ref": "#/components/parameters/fleet.search-allow_no_indices" - }, - { - "$ref": "#/components/parameters/fleet.search-analyzer" - }, - { - "$ref": "#/components/parameters/fleet.search-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/fleet.search-batched_reduce_size" - }, - { - "$ref": "#/components/parameters/fleet.search-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/fleet.search-default_operator" - }, - { - "$ref": "#/components/parameters/fleet.search-df" - }, - { - "$ref": "#/components/parameters/fleet.search-docvalue_fields" - }, - { - "$ref": "#/components/parameters/fleet.search-expand_wildcards" - }, - { - "$ref": "#/components/parameters/fleet.search-explain" - }, - { - "$ref": "#/components/parameters/fleet.search-ignore_throttled" - }, - { - "$ref": "#/components/parameters/fleet.search-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/fleet.search-lenient" - }, - { - "$ref": "#/components/parameters/fleet.search-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/fleet.search-preference" - }, - { - "$ref": "#/components/parameters/fleet.search-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/fleet.search-request_cache" - }, - { - "$ref": "#/components/parameters/fleet.search-routing" - }, - { - "$ref": "#/components/parameters/fleet.search-scroll" - }, - { - "$ref": "#/components/parameters/fleet.search-search_type" - }, - { - "$ref": "#/components/parameters/fleet.search-stats" - }, - { - "$ref": "#/components/parameters/fleet.search-stored_fields" - }, - { - "$ref": "#/components/parameters/fleet.search-suggest_field" - }, - { - "$ref": "#/components/parameters/fleet.search-suggest_mode" - }, - { - "$ref": "#/components/parameters/fleet.search-suggest_size" - }, - { - "$ref": "#/components/parameters/fleet.search-suggest_text" - }, - { - "$ref": "#/components/parameters/fleet.search-terminate_after" - }, - { - "$ref": "#/components/parameters/fleet.search-timeout" - }, - { - "$ref": "#/components/parameters/fleet.search-track_total_hits" - }, - { - "$ref": "#/components/parameters/fleet.search-track_scores" - }, - { - "$ref": "#/components/parameters/fleet.search-typed_keys" - }, - { - "$ref": "#/components/parameters/fleet.search-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/fleet.search-version" - }, - { - "$ref": "#/components/parameters/fleet.search-_source" - }, - { - "$ref": "#/components/parameters/fleet.search-_source_excludes" - }, - { - "$ref": "#/components/parameters/fleet.search-_source_includes" - }, - { - "$ref": "#/components/parameters/fleet.search-seq_no_primary_term" - }, - { - "$ref": "#/components/parameters/fleet.search-q" - }, - { - "$ref": "#/components/parameters/fleet.search-size" - }, - { - "$ref": "#/components/parameters/fleet.search-from" - }, - { - "$ref": "#/components/parameters/fleet.search-sort" - }, - { - "$ref": "#/components/parameters/fleet.search-wait_for_checkpoints" - }, - { - "$ref": "#/components/parameters/fleet.search-allow_partial_search_results" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "requestBody": { - "$ref": "#/components/requestBodies/fleet.search" - }, - "responses": { - "200": { - "$ref": "#/components/responses/fleet.search-200" - } - }, - "x-state": "Technical preview", - "x-api-name" : "search", - "x-namespace": "fleet" - }, - "post": { - "tags": [ - "fleet" - ], - "summary": "Run a Fleet search", - "description": "The purpose of the Fleet search API is to provide an API where the search will be run only\nafter the provided checkpoint has been processed and is visible for searches inside of Elasticsearch.", - "operationId": "fleet-search-1", - "parameters": [ - { - "$ref": "#/components/parameters/fleet.search-index" - }, - { - "$ref": "#/components/parameters/fleet.search-allow_no_indices" - }, - { - "$ref": "#/components/parameters/fleet.search-analyzer" - }, - { - "$ref": "#/components/parameters/fleet.search-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/fleet.search-batched_reduce_size" - }, - { - "$ref": "#/components/parameters/fleet.search-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/fleet.search-default_operator" - }, - { - "$ref": "#/components/parameters/fleet.search-df" - }, - { - "$ref": "#/components/parameters/fleet.search-docvalue_fields" - }, - { - "$ref": "#/components/parameters/fleet.search-expand_wildcards" - }, - { - "$ref": "#/components/parameters/fleet.search-explain" - }, - { - "$ref": "#/components/parameters/fleet.search-ignore_throttled" - }, - { - "$ref": "#/components/parameters/fleet.search-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/fleet.search-lenient" - }, - { - "$ref": "#/components/parameters/fleet.search-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/fleet.search-preference" - }, - { - "$ref": "#/components/parameters/fleet.search-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/fleet.search-request_cache" - }, - { - "$ref": "#/components/parameters/fleet.search-routing" - }, - { - "$ref": "#/components/parameters/fleet.search-scroll" - }, - { - "$ref": "#/components/parameters/fleet.search-search_type" - }, - { - "$ref": "#/components/parameters/fleet.search-stats" - }, - { - "$ref": "#/components/parameters/fleet.search-stored_fields" - }, - { - "$ref": "#/components/parameters/fleet.search-suggest_field" - }, - { - "$ref": "#/components/parameters/fleet.search-suggest_mode" - }, - { - "$ref": "#/components/parameters/fleet.search-suggest_size" - }, - { - "$ref": "#/components/parameters/fleet.search-suggest_text" - }, - { - "$ref": "#/components/parameters/fleet.search-terminate_after" - }, - { - "$ref": "#/components/parameters/fleet.search-timeout" - }, - { - "$ref": "#/components/parameters/fleet.search-track_total_hits" - }, - { - "$ref": "#/components/parameters/fleet.search-track_scores" - }, - { - "$ref": "#/components/parameters/fleet.search-typed_keys" - }, - { - "$ref": "#/components/parameters/fleet.search-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/fleet.search-version" - }, - { - "$ref": "#/components/parameters/fleet.search-_source" - }, - { - "$ref": "#/components/parameters/fleet.search-_source_excludes" - }, - { - "$ref": "#/components/parameters/fleet.search-_source_includes" - }, - { - "$ref": "#/components/parameters/fleet.search-seq_no_primary_term" - }, - { - "$ref": "#/components/parameters/fleet.search-q" - }, - { - "$ref": "#/components/parameters/fleet.search-size" - }, - { - "$ref": "#/components/parameters/fleet.search-from" - }, - { - "$ref": "#/components/parameters/fleet.search-sort" - }, - { - "$ref": "#/components/parameters/fleet.search-wait_for_checkpoints" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "examples": { + "ConnectorUpdateNameRequestExample1": { + "value": "{\n \"name\": \"Custom connector\",\n \"description\": \"This is my customized connector\"\n}" + } + } + } }, - { - "$ref": "#/components/parameters/fleet.search-allow_partial_search_results" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/fleet.search" - }, - "responses": { - "200": { - "$ref": "#/components/responses/fleet.search-200" - } + "required": true }, - "x-state": "Technical preview", - "x-api-name" : "search", - "x-namespace": "fleet" - } - }, - "/_script_context": { - "get": { - "tags": [ - "script" - ], - "summary": "Get script contexts", - "description": "Get a list of supported script contexts and their methods.", - "operationId": "get-script-context", "responses": { "200": { "description": "", @@ -11672,32 +14208,79 @@ "schema": { "type": "object", "properties": { - "contexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.get_script_context.Context" - } + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] } }, "required": [ - "contexts" + "result" ] + }, + "examples": { + "ConnectorUpdateNameResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" + } } } } } }, - "x-api-name": "get_script_context" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_name\n
\n " + ], + "x-api": "update_name.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_script_language": { - "get": { + "/_connector/{connector_id}/_native": { + "put": { "tags": [ - "script" + "connector" ], - "summary": "Get script languages", - "description": "Get a list of available script types, languages, and contexts.", - "operationId": "get-script-languages", + "summary": "Update the connector is_native flag", + "operationId": "connector-update-native", + "parameters": [ + { + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "is_native": { + "type": "boolean" + } + }, + "required": [ + "is_native" + ] + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -11706,224 +14289,55 @@ "schema": { "type": "object", "properties": { - "language_contexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.get_script_languages.LanguageContext" - } - }, - "types_allowed": { - "type": "array", - "items": { - "type": "string" - } + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] } }, "required": [ - "language_contexts", - "types_allowed" + "result" ] } } } } }, - "x-api-name": "get_script_languages" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_native\n
\n " + ], + "x-api": "update_native.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_graph/explore": { - "get": { + "/_connector/{connector_id}/_pipeline": { + "put": { "tags": [ - "graph" + "connector" ], - "summary": "Explore graph analytics", - "description": "Extract and summarize information about the documents and terms in an Elasticsearch data stream or index.\nThe easiest way to understand the behavior of this API is to use the Graph UI to explore connections.\nAn initial request to the `_explore` API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph.\nSubsequent requests enable you to spider out from one more vertices of interest.\nYou can exclude vertices that have already been returned.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/visualize/graph" - }, - "operationId": "graph-explore", - "parameters": [ - { - "$ref": "#/components/parameters/graph.explore-index" - }, - { - "$ref": "#/components/parameters/graph.explore-routing" - }, - { - "$ref": "#/components/parameters/graph.explore-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/graph.explore" - }, - "responses": { - "200": { - "$ref": "#/components/responses/graph.explore-200" - } - }, - "x-api-name" : "explore", - "x-namespace": "graph" - }, - "post": { - "tags": [ - "graph" - ], - "summary": "Explore graph analytics", - "description": "Extract and summarize information about the documents and terms in an Elasticsearch data stream or index.\nThe easiest way to understand the behavior of this API is to use the Graph UI to explore connections.\nAn initial request to the `_explore` API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph.\nSubsequent requests enable you to spider out from one more vertices of interest.\nYou can exclude vertices that have already been returned.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/visualize/graph" - }, - "operationId": "graph-explore-1", - "parameters": [ - { - "$ref": "#/components/parameters/graph.explore-index" - }, - { - "$ref": "#/components/parameters/graph.explore-routing" - }, - { - "$ref": "#/components/parameters/graph.explore-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/graph.explore" - }, - "responses": { - "200": { - "$ref": "#/components/responses/graph.explore-200" - } - }, - "x-api-name" : "explore", - "x-namespace": "graph" - } - }, - "/_health_report": { - "get": { - "tags": [ - "health_report" - ], - "summary": "Get the cluster health", - "description": "Get a report with the health status of an Elasticsearch cluster.\nThe report contains a list of indicators that compose Elasticsearch functionality.\n\nEach indicator has a health status of: green, unknown, yellow or red.\nThe indicator will provide an explanation and metadata describing the reason for its current health status.\n\nThe cluster’s status is controlled by the worst indicator status.\n\nIn the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue.\nEach impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system.\n\nSome health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system.\nThe root cause and remediation steps are encapsulated in a diagnosis.\nA diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem.\n\nNOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently.\nWhen setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.", - "operationId": "health-report", - "parameters": [ - { - "$ref": "#/components/parameters/health_report-timeout" - }, - { - "$ref": "#/components/parameters/health_report-verbose" - }, - { - "$ref": "#/components/parameters/health_report-size" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/health_report-200" - } - }, - "x-state": "Added in 8.7.0", - "x-api-name": "health_report" - } - }, - "/_health_report/{feature}": { - "get": { - "tags": [ - "health_report" - ], - "summary": "Get the cluster health", - "description": "Get a report with the health status of an Elasticsearch cluster.\nThe report contains a list of indicators that compose Elasticsearch functionality.\n\nEach indicator has a health status of: green, unknown, yellow or red.\nThe indicator will provide an explanation and metadata describing the reason for its current health status.\n\nThe cluster’s status is controlled by the worst indicator status.\n\nIn the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue.\nEach impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system.\n\nSome health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system.\nThe root cause and remediation steps are encapsulated in a diagnosis.\nA diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem.\n\nNOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently.\nWhen setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.", - "operationId": "health-report-1", - "parameters": [ - { - "$ref": "#/components/parameters/health_report-feature" - }, - { - "$ref": "#/components/parameters/health_report-timeout" - }, - { - "$ref": "#/components/parameters/health_report-verbose" - }, - { - "$ref": "#/components/parameters/health_report-size" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/health_report-200" - } - }, - "x-state": "Added in 8.7.0", - "x-api-name": "health_report" - } - }, - "/_ilm/policy/{policy}": { - "get": { - "tags": [ - "ilm" - ], - "summary": "Get lifecycle policies", - "operationId": "ilm-get-lifecycle", - "parameters": [ - { - "$ref": "#/components/parameters/ilm.get_lifecycle-policy" - }, - { - "$ref": "#/components/parameters/ilm.get_lifecycle-master_timeout" - }, - { - "$ref": "#/components/parameters/ilm.get_lifecycle-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ilm.get_lifecycle-200" - } - }, - "x-state": "Added in 6.6.0", - "x-api-name" : "get_lifecycle", - "x-namespace": "ilm" - }, - "put": { - "tags": [ - "ilm" - ], - "summary": "Create or update a lifecycle policy", - "description": "If the specified policy exists, it is replaced and the policy version is incremented.\n\nNOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/index-lifecycle" - }, - "operationId": "ilm-put-lifecycle", + "summary": "Update the connector pipeline", + "description": "When you create a new connector, the configuration of an ingest pipeline is populated with default settings.", + "operationId": "connector-update-pipeline", "parameters": [ { "in": "path", - "name": "policy", - "description": "Identifier for the policy.", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" } ], "requestBody": { @@ -11932,19 +14346,26 @@ "schema": { "type": "object", "properties": { - "policy": { - "$ref": "#/components/schemas/ilm._types.Policy" + "pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.IngestPipelineParams" + } + ] } - } + }, + "required": [ + "pipeline" + ] }, "examples": { - "PutLifecycleRequestExample1": { - "description": "Run `PUT _ilm/policy/my_policy` to create a new policy with arbitrary metadata.\n", - "value": "{\n \"policy\": {\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}" + "ConnectorUpdatePipelineRequestExample1": { + "value": "{\n \"pipeline\": {\n \"extract_binary_content\": true,\n \"name\": \"my-connector-pipeline\",\n \"reduce_whitespace\": true,\n \"run_ml_inference\": true\n }\n}" } } } - } + }, + "required": true }, "responses": { "200": { @@ -11952,203 +14373,93 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] }, "examples": { - "PutLifecycleResponseExample1": { - "description": "A successful response when creating a new lifecycle policy.", - "value": "{\n \"acknowledged\": true\n}" + "ConnectorUpdatePipelineResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" } } } } } }, - "x-state": "Added in 6.6.0", - "x-api-name" : "put_lifecycle", - "x-namespace": "ilm" - }, - "delete": { - "tags": [ - "ilm" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_pipeline\n
\n " ], - "summary": "Delete a lifecycle policy", - "description": "You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.", - "operationId": "ilm-delete-lifecycle", - "parameters": [ - { - "in": "path", - "name": "policy", - "description": "Identifier for the policy.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, + "x-api": "update_pipeline.connector", + "x-category": "management", + "x-metaTags": [ { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "DeleteLifecycleResponseExample1": { - "description": "A successful response when deleting a lifecycle policy.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.6.0", - "x-api-name" : "delete_lifecycle", - "x-namespace": "ilm" + ] } }, - "/{index}/_ilm/explain": { - "get": { + "/_connector/{connector_id}/_scheduling": { + "put": { "tags": [ - "ilm" + "connector" ], - "summary": "Explain the lifecycle state", - "description": "Get the current lifecycle status for one or more indices.\nFor data streams, the API retrieves the current lifecycle status for the stream's backing indices.\n\nThe response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.", - "operationId": "ilm-explain-lifecycle", + "summary": "Update the connector scheduling", + "operationId": "connector-update-scheduling", "parameters": [ { "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases to target. Supports wildcards (`*`).\nTo target all data streams and indices, use `*` or `_all`.", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "only_errors", - "description": "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.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "only_managed", - "description": "Filters the returned indices to only indices that are managed by ILM.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplain" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scheduling": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SchedulingConfiguration" } - } - }, - "required": [ - "indices" - ] - }, - "examples": { - "ExplainLifecycleResponseExample1": { - "description": "A successful response when retrieving the current ILM status for an index.", - "value": "{\n \"indices\": {\n \"my-index-000001\": {\n \"index\": \"my-index-000001\",\n \"index_creation_date_millis\": 1538475653281,\n \"index_creation_date\": \"2018-10-15T13:45:21.981Z\",\n \"time_since_index_creation\": \"15s\",\n \"managed\": true,\n \"policy\": \"my_policy\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"15s\",\n \"phase\": \"new\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"complete\"\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"complete\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\"\n }\n }\n}" + ] } + }, + "required": [ + "scheduling" + ] + }, + "examples": { + "ConnectorUpdateSchedulingRequestExample1": { + "value": "{\n \"scheduling\": {\n \"access_control\": {\n \"enabled\": true,\n \"interval\": \"0 10 0 * * ?\"\n },\n \"full\": {\n \"enabled\": true,\n \"interval\": \"0 20 0 * * ?\"\n },\n \"incremental\": {\n \"enabled\": false,\n \"interval\": \"0 30 0 * * ?\"\n }\n }\n}" + }, + "ConnectorUpdateSchedulingRequestExample2": { + "value": "{\n \"scheduling\": {\n \"full\": {\n \"enabled\": true,\n \"interval\": \"0 10 0 * * ?\"\n }\n }\n}" } } } - } - }, - "x-state": "Added in 6.6.0", - "x-api-name" : "explain_lifecycle", - "x-namespace": "ilm" - } - }, - "/_ilm/policy": { - "get": { - "tags": [ - "ilm" - ], - "summary": "Get lifecycle policies", - "operationId": "ilm-get-lifecycle-1", - "parameters": [ - { - "$ref": "#/components/parameters/ilm.get_lifecycle-master_timeout" }, - { - "$ref": "#/components/parameters/ilm.get_lifecycle-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ilm.get_lifecycle-200" - } + "required": true }, - "x-state": "Added in 6.6.0", - "x-api-name" : "get_lifecycle", - "x-namespace": "ilm" - } - }, - "/_ilm/status": { - "get": { - "tags": [ - "ilm" - ], - "summary": "Get the ILM status", - "description": "Get the current index lifecycle management status.", - "operationId": "ilm-get-status", "responses": { "200": { "description": "", @@ -12157,60 +14468,59 @@ "schema": { "type": "object", "properties": { - "operation_mode": { - "$ref": "#/components/schemas/_types.LifecycleOperationMode" + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] } }, "required": [ - "operation_mode" + "result" ] }, "examples": { - "GetILMStatusResponseExample1": { - "description": "A successful response when retrieving the current ILM status.", - "value": "{\n \"operation_mode\": \"RUNNING\"\n}" + "ConnectorUpdateSchedulingResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" } } } } } }, - "x-state": "Added in 6.6.0", - "x-api-name" : "get_status", - "x-namespace": "ilm" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_scheduling\n
\n " + ], + "x-api": "update_scheduling.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ilm/migrate_to_data_tiers": { - "post": { + "/_connector/{connector_id}/_service_type": { + "put": { "tags": [ - "ilm" + "connector" ], - "summary": "Migrate to data tiers routing", - "description": "Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers.\nOptionally, delete one legacy index template.\nUsing node roles enables ILM to automatically move the indices between data tiers.\n\nMigrating away from custom node attributes routing can be manually performed.\nThis API provides an automated way of performing three out of the four manual steps listed in the migration guide:\n\n1. Stop setting the custom hot attribute on new indices.\n1. Remove custom allocation settings from existing ILM policies.\n1. Replace custom allocation settings from existing indices with the corresponding tier preference.\n\nILM must be stopped before performing the migration.\nUse the stop ILM and get ILM status APIs to wait until the reported operation mode is `STOPPED`.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/migrate-index-allocation-filters-to-node-roles" - }, - "operationId": "ilm-migrate-to-data-tiers", + "summary": "Update the connector service type", + "operationId": "connector-update-service-type", "parameters": [ { - "in": "query", - "name": "dry_run", - "description": "If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration.\nThis provides a way to retrieve the indices and ILM policies that need to be migrated.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" } ], "requestBody": { @@ -12219,22 +14529,22 @@ "schema": { "type": "object", "properties": { - "legacy_template_to_delete": { - "type": "string" - }, - "node_attribute": { + "service_type": { "type": "string" } - } + }, + "required": [ + "service_type" + ] }, "examples": { - "MigrateToDataTiersRequestExample1": { - "description": "Run `POST /_ilm/migrate_to_data_tiers` to migrate the indices, ILM policies, legacy templates, composable, and component templates away from defining custom allocation filtering using the `custom_attribute_name` node attribute. It also deletes the legacy template with name `global-template` if it exists in the system.\n", - "value": "{\n \"legacy_template_to_delete\": \"global-template\",\n \"node_attribute\": \"custom_attribute_name\"\n}" + "ConnectorUpdateServiceTypeRequestExample1": { + "value": "{\n \"service_type\": \"sharepoint_online\"\n}" } } } - } + }, + "required": true }, "responses": { "200": { @@ -12244,87 +14554,57 @@ "schema": { "type": "object", "properties": { - "dry_run": { - "type": "boolean" - }, - "removed_legacy_template": { - "description": "The name of the legacy index template that was deleted.\nThis information is missing if no legacy index templates were deleted.", - "type": "string" - }, - "migrated_ilm_policies": { - "description": "The ILM policies that were updated.", - "type": "array", - "items": { - "type": "string" - } - }, - "migrated_indices": { - "$ref": "#/components/schemas/_types.Indices" - }, - "migrated_legacy_templates": { - "description": "The legacy index templates that were updated to not contain custom routing settings for the provided data attribute.", - "type": "array", - "items": { - "type": "string" - } - }, - "migrated_composable_templates": { - "description": "The composable index templates that were updated to not contain custom routing settings for the provided data attribute.", - "type": "array", - "items": { - "type": "string" - } - }, - "migrated_component_templates": { - "description": "The component templates that were updated to not contain custom routing settings for the provided data attribute.", - "type": "array", - "items": { - "type": "string" - } + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] } }, "required": [ - "dry_run", - "removed_legacy_template", - "migrated_ilm_policies", - "migrated_indices", - "migrated_legacy_templates", - "migrated_composable_templates", - "migrated_component_templates" + "result" ] }, "examples": { - "MigrateToDataTiersResponseExample1": { - "description": "A successful response when migrating indices, ILMs, and templates from custom node attributes to data tiers.\n", - "value": "{\n \"dry_run\": false,\n \"removed_legacy_template\":\"global-template\",\n \"migrated_ilm_policies\":[\"policy_with_allocate_action\"],\n \"migrated_indices\":[\"warm-index-to-migrate-000001\"],\n \"migrated_legacy_templates\":[\"a-legacy-template\"],\n \"migrated_composable_templates\":[\"a-composable-template\"],\n \"migrated_component_templates\":[\"a-component-template\"]\n}" + "ConnectorUpdateServiceTypeResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" } } } } } }, - "x-state": "Added in 7.14.0", - "x-api-name" : "migrate_to_data_tiers", - "x-namespace": "ilm" + "x-state": "Beta; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_service_type\n
\n " + ], + "x-api": "update_service_type.connector", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ilm/move/{index}": { - "post": { + "/_connector/{connector_id}/_status": { + "put": { "tags": [ - "ilm" + "connector" ], - "summary": "Move to a lifecycle step", - "description": "Manually move an index into a specific step in the lifecycle policy and run that step.\n\nWARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API.\n\nYou must specify both the current step and the step to be executed in the body of the request.\nThe request will fail if the current step does not match the step currently running for the index\nThis is to prevent the index from being moved from an unexpected step into the next step.\n\nWhen specifying the target (`next_step`) to which the index will be moved, either the name or both the action and name fields are optional.\nIf only the phase is specified, the index will move to the first step of the first action in the target phase.\nIf the phase and action are specified, the index will move to the first step of the specified action in the specified phase.\nOnly actions specified in the ILM policy are considered valid.\nAn index cannot move to a step that is not part of its policy.", - "operationId": "ilm-move-to-step", + "summary": "Update the connector status", + "operationId": "connector-update-status", "parameters": [ { "in": "path", - "name": "index", - "description": "The name of the index whose lifecycle step is to change", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" } @@ -12335,77 +14615,27 @@ "schema": { "type": "object", "properties": { - "current_step": { - "$ref": "#/components/schemas/ilm.move_to_step.StepKey" - }, - "next_step": { - "$ref": "#/components/schemas/ilm.move_to_step.StepKey" + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorStatus" + } + ] } }, "required": [ - "current_step", - "next_step" + "status" ] }, "examples": { - "MoveToStepRequestExample1": { - "summary": "Move to forcemerge step", - "description": "Run `POST _ilm/move/my-index-000001` to move `my-index-000001` from the initial step to the `forcemerge` step.\n", - "value": "{\n \"current_step\": {\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n}" - }, - "MoveToStepRequestExample2": { - "summary": "Move to warm step", - "description": "Run `POST _ilm/move/my-index-000001` to move `my-index-000001` from the end of hot phase into the start of warm.\n", - "value": "{\n \"current_step\": {\n \"phase\": \"hot\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\"\n }\n}" + "ConnectorUpdateStatusRequestExample1": { + "value": "{\n \"status\": \"needs_configuration\"\n}" } } } - } + }, + "required": true }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "MoveToStepResponseExample1": { - "description": "A successful response when running a specific step in a lifecycle policy.\n", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.6.0", - "x-api-name" : "move_to_step", - "x-namespace": "ilm" - } - }, - "/{index}/_ilm/remove": { - "post": { - "tags": [ - "ilm" - ], - "summary": "Remove policies from an index", - "description": "Remove the assigned lifecycle policies from an index or a data stream's backing indices.\nIt also stops managing the indices.", - "operationId": "ilm-remove-policy", - "parameters": [ - { - "in": "path", - "name": "index", - "description": "The name of the index to remove policy on", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - } - ], "responses": { "200": { "description": "", @@ -12414,294 +14644,345 @@ "schema": { "type": "object", "properties": { - "failed_indexes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } - }, - "has_failures": { - "type": "boolean" + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] } }, "required": [ - "failed_indexes", - "has_failures" + "result" ] }, "examples": { - "RemovePolicyResponseExample1": { - "description": "A successful response when removing a lifecycle policy from an index.", - "value": "{\n \"has_failures\" : false,\n \"failed_indexes\" : []\n}" + "ConnectorUpdateStatusResponseExample1": { + "value": "{\n \"result\": \"updated\"\n}" } } } } } }, - "x-state": "Added in 6.6.0", - "x-api-name" : "remove_policy", - "x-namespace": "ilm" - } - }, - "/{index}/_ilm/retry": { - "post": { - "tags": [ - "ilm" + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_connector/{connector_id}/_status\n
\n " ], - "summary": "Retry a policy", - "description": "Retry running the lifecycle policy for an index that is in the ERROR step.\nThe API sets the policy back to the step where the error occurred and runs the step.\nUse the explain lifecycle state API to determine whether an index is in the ERROR step.", - "operationId": "ilm-retry", - "parameters": [ + "x-api": "update_status.connector", + "x-category": "management", + "x-metaTags": [ { - "in": "path", - "name": "index", - "description": "The name of the indices (comma-separated) whose failed lifecycle step is to be retry", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.6.0", - "x-api-name" : "retry", - "x-namespace": "ilm" + ] } }, - "/_ilm/start": { - "post": { + "/_count": { + "get": { "tags": [ - "ilm" + "search" ], - "summary": "Start the ILM plugin", - "description": "Start the index lifecycle management plugin if it is currently stopped.\nILM is started automatically when the cluster is formed.\nRestarting ILM is necessary only when it has been stopped using the stop ILM API.", - "operationId": "ilm-start", + "summary": "Count search results", + "description": "Get the number of documents matching a query.\n\nThe query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.\nThe query is optional. When no query is provided, the API uses `match_all` to count all the documents.\n\nThe count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.\n\nThe operation is broadcast across all shards.\nFor each shard ID group, a replica is chosen and the search is run against it.\nThis means that replicas increase the scalability of the count.", + "operationId": "count-1", "parameters": [ { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "StartILMResponseExample1": { - "description": "A successful response when stating the ILM plugin.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.6.0", - "x-api-name" : "start", - "x-namespace": "ilm" - } - }, - "/_ilm/stop": { - "post": { - "tags": [ - "ilm" - ], - "summary": "Stop the ILM plugin", - "description": "Halt all lifecycle management operations and stop the index lifecycle management plugin.\nThis is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices.\n\nThe API returns as soon as the stop request has been acknowledged, but the plugin might continue to run until in-progress operations complete and the plugin can be safely stopped.\nUse the get ILM status API to check whether ILM is running.", - "operationId": "ilm-stop", - "parameters": [ + }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.query_dsl.Operator" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "StopILMResponseExample1": { - "description": "A successful response when stopping the ILM plugin.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.6.0", - "x-api-name" : "stop", - "x-namespace": "ilm" - } - }, - "/{index}/_doc": { - "post": { - "tags": [ - "document" - ], - "summary": "Create or update a document in an index", - "description": "Add a JSON document to the specified data stream or index and make it searchable.\nIf the target is an index and the document already exists, the request updates the document and increments its version.\n\nNOTE: You cannot use this API to send update requests for existing documents in a data stream.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add or overwrite a document using the `PUT //_doc/<_id>` request format, you must have the `create`, `index`, or `write` index privilege.\n* To add a document using the `POST //_doc/` request format, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nNOTE: Replica shards might not all be started when an indexing operation returns successfully.\nBy default, only the primary is required. Set `wait_for_active_shards` to change this default behavior.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Optimistic concurrency control**\n\nIndex operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.\n\n**No operation (noop) updates**\n\nWhen updating a document by using this API, a new version of the document is always created even if the document hasn't changed.\nIf this isn't acceptable use the `_update` API with `detect_noop` set to `true`.\nThe `detect_noop` option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.\n\nThere isn't a definitive rule for when noop updates aren't acceptable.\nIt's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.\n\n**Versioning**\n\nEach indexed document is given a version number.\nBy default, internal versioning is used that starts at 1 and increments with each update, deletes included.\nOptionally, the version number can be set to an external value (for example, if maintained in a database).\nTo enable this functionality, `version_type` should be set to `external`.\nThe value provided must be a numeric, long value greater than or equal to 0, and less than around `9.2e+18`.\n\nNOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.\nIf no version is provided, the operation runs without any version checks.\n\nWhen using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.\nIf true, the document will be indexed and the new version number used.\nIf the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:\n\n```\nPUT my-index-000001/_doc/1?version=2&version_type=external\n{\n \"user\": {\n \"id\": \"elkbee\"\n }\n}\n\nIn this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.\nIf the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).\n\nA nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.\nEven the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams" - }, - "operationId": "index-2", - "parameters": [ - { - "$ref": "#/components/parameters/index-index" - }, - { - "$ref": "#/components/parameters/index-if_primary_term" - }, - { - "$ref": "#/components/parameters/index-if_seq_no" }, { - "$ref": "#/components/parameters/index-include_source_on_error" + "in": "query", + "name": "df", + "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-op_type" + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-pipeline" + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded, or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-refresh" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-routing" + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-timeout" + "in": "query", + "name": "min_score", + "description": "The minimum `_score` value that documents must have to be included in the result.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-version" + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, it is random.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-version_type" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-wait_for_active_shards" + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/index-require_alias" + "in": "query", + "name": "q", + "description": "The query in Lucene query string syntax. This parameter cannot be used with a request body.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/index" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "Defines the search query using Query DSL. A request body query cannot be used\nwith the `q` query string parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + } + }, + "examples": { + "CountRequestExample1": { + "description": "Run `GET /my-index-000001/_count?q=user:kimchy`. Alternatively, run `GET /my-index-000001/_count` with the same query in the request body. Both requests count the number of documents in `my-index-000001` with a `user.id` of `kimchy`.\n", + "value": "{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" + } + } + } + } }, "responses": { "200": { - "$ref": "#/components/responses/index-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + } + }, + "required": [ + "count", + "_shards" + ] + }, + "examples": { + "CountResponseExample1": { + "description": "A successful response from `GET /my-index-000001/_count?q=user:kimchy`.", + "value": "{\n \"count\": 1,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" + } + } + } + } } }, - "x-api-name": "index" - } - }, - "/{index}/_block/{block}": { - "put": { + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_count\n
\n ", + "
\n GET\n /_count\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "count", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "indices" + "search" ], - "summary": "Add an index block", - "description": "Add an index block to an index.\nIndex blocks limit the operations allowed on an index by blocking specific operation types.", - "operationId": "indices-add-block", + "summary": "Count search results", + "description": "Get the number of documents matching a query.\n\nThe query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.\nThe query is optional. When no query is provided, the API uses `match_all` to count all the documents.\n\nThe count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.\n\nThe operation is broadcast across all shards.\nFor each shard ID group, a replica is chosen and the search is run against it.\nThis means that replicas increase the scalability of the count.", + "operationId": "count", "parameters": [ { - "in": "path", - "name": "index", - "description": "A comma-separated list or wildcard expression of index names used to limit the request.\nBy default, you must explicitly name the indices you are adding blocks to.\nTo allow the adding of blocks to indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.\nYou can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "block", - "description": "The block type to add to the index.\n\nSupported values include:\n - `metadata`: Disable metadata changes, such as closing the index.\n - `read`: Disable read operations.\n - `read_only`: Disable write operations and metadata changes.\n - `write`: Disable write operations. However, metadata changes are still allowed.\n\n", - "required": true, + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/indices.add_block.IndicesBlockOptions" + "type": "string" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" }, + { + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" + }, + { + "in": "query", + "name": "df", + "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded, or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { "in": "query", "name": "ignore_unavailable", @@ -12714,25 +14995,90 @@ }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "min_score", + "description": "The minimum `_score` value that documents must have to be included in the result.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, it is random.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "q", + "description": "The query in Lucene query string syntax. This parameter cannot be used with a request body.", + "deprecated": false, + "schema": { + "type": "string" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "Defines the search query using Query DSL. A request body query cannot be used\nwith the `q` query string parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + } + }, + "examples": { + "CountRequestExample1": { + "description": "Run `GET /my-index-000001/_count?q=user:kimchy`. Alternatively, run `GET /my-index-000001/_count` with the same query in the request body. Both requests count the number of documents in `my-index-000001` with a `user.id` of `kimchy`.\n", + "value": "{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" + } + } + } + } + }, "responses": { "200": { "description": "", @@ -12741,379 +15087,154 @@ "schema": { "type": "object", "properties": { - "acknowledged": { - "type": "boolean" - }, - "shards_acknowledged": { - "type": "boolean" + "count": { + "type": "number" }, - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.add_block.IndicesBlockStatus" - } + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] } }, "required": [ - "acknowledged", - "shards_acknowledged", - "indices" + "count", + "_shards" ] }, "examples": { - "IndicesAddBlockResponseExample1": { - "description": "A successful response from `PUT /my-index-000001/_block/write`, which adds an index block to an index.'", - "value": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\" : [ {\n \"name\" : \"my-index-000001\",\n \"blocked\" : true\n } ]\n}" + "CountResponseExample1": { + "description": "A successful response from `GET /my-index-000001/_count?q=user:kimchy`.", + "value": "{\n \"count\": 1,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" } } } } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "add_block", - "x-namespace": "indices" - } - }, - "/_analyze": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get tokens from text analysis", - "description": "The analyze API performs analysis on a text string and returns the resulting tokens.\n\nGenerating excessive amount of tokens may cause a node to run out of memory.\nThe `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced.\nIf more than this limit of tokens gets generated, an error occurs.\nThe `_analyze` endpoint without a specified index will always use `10000` as its limit.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis" - }, - "operationId": "indices-analyze", - "parameters": [ - { - "$ref": "#/components/parameters/indices.analyze-index_" - } + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_count\n
\n ", + "
\n GET\n /_count\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.analyze" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.analyze-200" - } - }, - "x-api-name" : "analyze", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" + "x-req-auth": [ + "Index privileges: `read`\n" ], - "summary": "Get tokens from text analysis", - "description": "The analyze API performs analysis on a text string and returns the resulting tokens.\n\nGenerating excessive amount of tokens may cause a node to run out of memory.\nThe `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced.\nIf more than this limit of tokens gets generated, an error occurs.\nThe `_analyze` endpoint without a specified index will always use `10000` as its limit.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis" - }, - "operationId": "indices-analyze-1", - "parameters": [ + "x-api": "count", + "x-category": "search", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.analyze-index_" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.analyze" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.analyze-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "analyze", - "x-namespace": "indices" + ] } }, - "/{index}/_analyze": { + "/{index}/_count": { "get": { "tags": [ - "indices" - ], - "summary": "Get tokens from text analysis", - "description": "The analyze API performs analysis on a text string and returns the resulting tokens.\n\nGenerating excessive amount of tokens may cause a node to run out of memory.\nThe `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced.\nIf more than this limit of tokens gets generated, an error occurs.\nThe `_analyze` endpoint without a specified index will always use `10000` as its limit.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis" - }, - "operationId": "indices-analyze-2", - "parameters": [ - { - "$ref": "#/components/parameters/indices.analyze-index" - }, - { - "$ref": "#/components/parameters/indices.analyze-index_" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.analyze" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.analyze-200" - } - }, - "x-api-name" : "analyze", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Get tokens from text analysis", - "description": "The analyze API performs analysis on a text string and returns the resulting tokens.\n\nGenerating excessive amount of tokens may cause a node to run out of memory.\nThe `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced.\nIf more than this limit of tokens gets generated, an error occurs.\nThe `_analyze` endpoint without a specified index will always use `10000` as its limit.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis" - }, - "operationId": "indices-analyze-3", - "parameters": [ - { - "$ref": "#/components/parameters/indices.analyze-index" - }, - { - "$ref": "#/components/parameters/indices.analyze-index_" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.analyze" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.analyze-200" - } - }, - "x-api-name" : "analyze", - "x-namespace": "indices" - } - }, - "/_migration/reindex/{index}/_cancel": { - "post": { - "tags": [ - "migration" + "search" ], - "summary": "Cancel a migration reindex operation", - "description": "Cancel a migration reindex attempt for a data stream or index.", - "operationId": "indices-cancel-migrate-reindex", + "summary": "Count search results", + "description": "Get the number of documents matching a query.\n\nThe query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.\nThe query is optional. When no query is provided, the API uses `match_all` to count all the documents.\n\nThe count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.\n\nThe operation is broadcast across all shards.\nFor each shard ID group, a replica is chosen and the search is run against it.\nThis means that replicas increase the scalability of the count.", + "operationId": "count-3", "parameters": [ { "in": "path", "name": "index", - "description": "The index or data stream name", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Technical preview", - "x-api-name" : "cancel_migrate_reindex", - "x-namespace": "indices" - } - }, - "/_cache/clear": { - "post": { - "tags": [ - "indices" - ], - "summary": "Clear the cache", - "description": "Clear the cache of one or more indices.\nFor data streams, the API clears the caches of the stream's backing indices.\n\nBy default, the clear cache API clears all caches.\nTo clear only specific caches, use the `fielddata`, `query`, or `request` parameters.\nTo clear the cache only of specific fields, use the `fields` parameter.", - "operationId": "indices-clear-cache", - "parameters": [ - { - "$ref": "#/components/parameters/indices.clear_cache-index_" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-fielddata" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-fields" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-query" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-request" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.clear_cache-200" - } - }, - "x-api-name" : "clear_cache", - "x-namespace": "indices" - } - }, - "/{index}/_cache/clear": { - "post": { - "tags": [ - "indices" - ], - "summary": "Clear the cache", - "description": "Clear the cache of one or more indices.\nFor data streams, the API clears the caches of the stream's backing indices.\n\nBy default, the clear cache API clears all caches.\nTo clear only specific caches, use the `fielddata`, `query`, or `request` parameters.\nTo clear the cache only of specific fields, use the `fields` parameter.", - "operationId": "indices-clear-cache-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.clear_cache-index" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-index_" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-fielddata" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-fields" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.clear_cache-query" }, { - "$ref": "#/components/parameters/indices.clear_cache-request" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.clear_cache-200" - } - }, - "x-api-name" : "clear_cache", - "x-namespace": "indices" - } - }, - "/{index}/_clone/{target}": { - "put": { - "tags": [ - "indices" - ], - "summary": "Clone an index", - "description": "Clone an existing index into a new index.\nEach original primary shard is cloned into a new primary shard in the new index.\n\nIMPORTANT: Elasticsearch does not apply index templates to the resulting index.\nThe API also does not copy index metadata from the original index.\nIndex metadata includes aliases, index lifecycle management phase definitions, and cross-cluster replication (CCR) follower information.\nFor example, if you clone a CCR follower index, the resulting clone will not be a follower index.\n\nThe clone API copies most index settings from the source index to the resulting index, with the exception of `index.number_of_replicas` and `index.auto_expand_replicas`.\nTo set the number of replicas in the resulting index, configure these settings in the clone request.\n\nCloning works as follows:\n\n* First, it creates a new target index with the same definition as the source index.\n* Then it hard-links segments from the source index into the target index. If the file system does not support hard-linking, all segments are copied into the new index, which is a much more time consuming process.\n* Finally, it recovers the target index as though it were a closed index which had just been re-opened.\n\nIMPORTANT: Indices can only be cloned if they meet the following requirements:\n\n* The index must be marked as read-only and have a cluster health status of green.\n* The target index must not exist.\n* The source index must have the same number of primary shards as the target index.\n* The node handling the clone process must have sufficient free disk space to accommodate a second copy of the existing index.\n\nThe current write index on a data stream cannot be cloned.\nIn order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned.\n\nNOTE: Mappings cannot be specified in the `_clone` request. The mappings of the source index will be used for the target index.\n\n**Monitor the cloning process**\n\nThe cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the `wait_for_status` parameter to `yellow`.\n\nThe `_clone` API returns as soon as the target index has been added to the cluster state, before any shards have been allocated.\nAt this point, all shards are in the state unassigned.\nIf, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node.\n\nOnce the primary shard is allocated, it moves to state initializing, and the clone process begins.\nWhen the clone operation completes, the shard will become active.\nAt that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node.\n\n**Wait for active shards**\n\nBecause the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.", - "operationId": "indices-clone", - "parameters": [ - { - "$ref": "#/components/parameters/indices.clone-index" - }, - { - "$ref": "#/components/parameters/indices.clone-target" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.clone-master_timeout" + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.clone-timeout" + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.clone-wait_for_active_shards" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.clone" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.clone-200" - } - }, - "x-state": "Added in 7.4.0", - "x-api-name" : "clone", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Clone an index", - "description": "Clone an existing index into a new index.\nEach original primary shard is cloned into a new primary shard in the new index.\n\nIMPORTANT: Elasticsearch does not apply index templates to the resulting index.\nThe API also does not copy index metadata from the original index.\nIndex metadata includes aliases, index lifecycle management phase definitions, and cross-cluster replication (CCR) follower information.\nFor example, if you clone a CCR follower index, the resulting clone will not be a follower index.\n\nThe clone API copies most index settings from the source index to the resulting index, with the exception of `index.number_of_replicas` and `index.auto_expand_replicas`.\nTo set the number of replicas in the resulting index, configure these settings in the clone request.\n\nCloning works as follows:\n\n* First, it creates a new target index with the same definition as the source index.\n* Then it hard-links segments from the source index into the target index. If the file system does not support hard-linking, all segments are copied into the new index, which is a much more time consuming process.\n* Finally, it recovers the target index as though it were a closed index which had just been re-opened.\n\nIMPORTANT: Indices can only be cloned if they meet the following requirements:\n\n* The index must be marked as read-only and have a cluster health status of green.\n* The target index must not exist.\n* The source index must have the same number of primary shards as the target index.\n* The node handling the clone process must have sufficient free disk space to accommodate a second copy of the existing index.\n\nThe current write index on a data stream cannot be cloned.\nIn order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned.\n\nNOTE: Mappings cannot be specified in the `_clone` request. The mappings of the source index will be used for the target index.\n\n**Monitor the cloning process**\n\nThe cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the `wait_for_status` parameter to `yellow`.\n\nThe `_clone` API returns as soon as the target index has been added to the cluster state, before any shards have been allocated.\nAt this point, all shards are in the state unassigned.\nIf, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node.\n\nOnce the primary shard is allocated, it moves to state initializing, and the clone process begins.\nWhen the clone operation completes, the shard will become active.\nAt that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node.\n\n**Wait for active shards**\n\nBecause the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.", - "operationId": "indices-clone-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.clone-index" + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.clone-target" + "in": "query", + "name": "df", + "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.clone-master_timeout" + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.clone-timeout" + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded, or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.clone-wait_for_active_shards" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.clone" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.clone-200" - } - }, - "x-state": "Added in 7.4.0", - "x-api-name" : "clone", - "x-namespace": "indices" - } - }, - "/{index}/_close": { - "post": { - "tags": [ - "indices" - ], - "summary": "Close an index", - "description": "A closed index is blocked for read or write operations and does not allow all operations that opened indices allow.\nIt is not possible to index documents or to search for documents in a closed index.\nClosed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster.\n\nWhen opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index.\nThe shards will then go through the normal recovery process.\nThe data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.\n\nYou can open and close multiple indices.\nAn error is thrown if the request explicitly refers to a missing index.\nThis behaviour can be turned off using the `ignore_unavailable=true` parameter.\n\nBy default, you must explicitly name the indices you are opening or closing.\nTo open or close indices with `_all`, `*`, or other wildcard expressions, change the` action.destructive_requires_name` setting to `false`. This setting can also be changed with the cluster update settings API.\n\nClosed indices consume a significant amount of disk-space which can cause problems in managed environments.\nClosing indices can be turned off with the cluster settings API by setting `cluster.indices.close.enable` to `false`.", - "operationId": "indices-close", - "parameters": [ - { - "in": "path", - "name": "index", - "description": "Comma-separated list or wildcard expression of index names used to limit the request.", - "required": true, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { "type": "boolean" @@ -13122,55 +15243,80 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "min_score", + "description": "The minimum `_score` value that documents must have to be included in the result.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, it is random.", "deprecated": false, "schema": { - "type": "boolean" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "name": "q", + "description": "The query in Lucene query string syntax. This parameter cannot be used with a request body.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" + "type": "string" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "Defines the search query using Query DSL. A request body query cannot be used\nwith the `q` query string parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + } + }, + "examples": { + "CountRequestExample1": { + "description": "Run `GET /my-index-000001/_count?q=user:kimchy`. Alternatively, run `GET /my-index-000001/_count` with the same query in the request body. Both requests count the number of documents in `my-index-000001` with a `user.id` of `kimchy`.\n", + "value": "{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" + } + } + } + } + }, "responses": { "200": { "description": "", @@ -13179,52 +15325,61 @@ "schema": { "type": "object", "properties": { - "acknowledged": { - "type": "boolean" - }, - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.close.CloseIndexResult" - } + "count": { + "type": "number" }, - "shards_acknowledged": { - "type": "boolean" + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] } }, "required": [ - "acknowledged", - "indices", - "shards_acknowledged" + "count", + "_shards" ] }, "examples": { - "CloseIndexResponseExample1": { - "description": "A successful response for closing an index.", - "value": "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"indices\": {\n \"my-index-000001\": {\n \"closed\": true\n }\n }\n}" + "CountResponseExample1": { + "description": "A successful response from `GET /my-index-000001/_count?q=user:kimchy`.", + "value": "{\n \"count\": 1,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" } } } } } }, - "x-api-name" : "close", - "x-namespace": "indices" - } - }, - "/{index}": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_count\n
\n ", + "
\n GET\n /{index}/_count\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "count", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "indices" + "search" ], - "summary": "Get index information", - "description": "Get information about one or more indices. For data streams, the API returns information about the\nstream’s backing indices.", - "operationId": "indices-get", + "summary": "Count search results", + "description": "Get the number of documents matching a query.\n\nThe query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.\nThe query is optional. When no query is provided, the API uses `match_all` to count all the documents.\n\nThe count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.\n\nThe operation is broadcast across all shards.\nFor each shard ID group, a replica is chosen and the search is run against it.\nThis means that replicas increase the scalability of the count.", + "operationId": "count-2", "parameters": [ { "in": "path", "name": "index", - "description": "Comma-separated list of data streams, indices, and index aliases used to limit the request.\nWildcard expressions (*) are supported.", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { @@ -13235,7 +15390,7 @@ { "in": "query", "name": "allow_no_indices", - "description": "If false, the request returns an error if any wildcard expression, index alias, or _all value targets only\nmissing or closed indices. This behavior applies even if the request targets other open indices. For example,\na request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "deprecated": false, "schema": { "type": "boolean" @@ -13244,18 +15399,18 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "flat_settings", - "description": "If true, returns settings in flat format.", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { "type": "boolean" @@ -13264,19 +15419,39 @@ }, { "in": "query", - "name": "ignore_unavailable", - "description": "If false, requests that target a missing index return an error.", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.query_dsl.Operator" }, "style": "form" }, { "in": "query", - "name": "include_defaults", - "description": "If true, return all default settings in the response.", + "name": "df", + "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded, or aliased indices are ignored when frozen.", + "deprecated": true, "schema": { "type": "boolean" }, @@ -13284,8 +15459,8 @@ }, { "in": "query", - "name": "local", - "description": "If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { "type": "boolean" @@ -13294,89 +15469,61 @@ }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "features", - "description": "Return only information on specified index features\n\nSupported values include: `aliases`, `mappings`, `settings`\n\n", + "name": "min_score", + "description": "The minimum `_score` value that documents must have to be included in the result.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/indices.get.Features" + "type": "number" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.IndexState" - } - } - } - } - } - }, - "x-api-name" : "get", - "x-namespace": "indices" - }, - "put": { - "tags": [ - "indices" - ], - "summary": "Create an index", - "description": "You can use the create index API to add a new index to an Elasticsearch cluster.\nWhen creating an index, you can specify the following:\n\n* Settings for the index.\n* Mappings for fields in the index.\n* Index aliases\n\n**Wait for active shards**\n\nBy default, index creation will only return a response to the client when the primary copies of each shard have been started, or the request times out.\nThe index creation response will indicate what happened.\nFor example, `acknowledged` indicates whether the index was successfully created in the cluster, `while shards_acknowledged` indicates whether the requisite number of shard copies were started for each shard in the index before timing out.\nNote that it is still possible for either `acknowledged` or `shards_acknowledged` to be `false`, but for the index creation to be successful.\nThese values simply indicate whether the operation completed before the timeout.\nIf `acknowledged` is false, the request timed out before the cluster state was updated with the newly created index, but it probably will be created sometime soon.\nIf `shards_acknowledged` is false, then the request timed out before the requisite number of shards were started (by default just the primaries), even if the cluster state was successfully updated to reflect the newly created index (that is to say, `acknowledged` is `true`).\n\nYou can change the default of only waiting for the primary shards to start through the index setting `index.write.wait_for_active_shards`.\nNote that changing this setting will also affect the `wait_for_active_shards` value on all subsequent write operations.", - "operationId": "indices-create", - "parameters": [ + }, { - "in": "path", - "name": "index", - "description": "Name of the index you wish to create.\nIndex names must meet the following criteria:\n\n* Lowercase only\n* Cannot include `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`\n* Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions\n* Cannot start with `-`, `_`, or `+`\n* Cannot be `.` or `..`\n* Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster)\n* Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins", - "required": true, + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, it is random.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "type": "string" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "name": "q", + "description": "The query in Lucene query string syntax. This parameter cannot be used with a request body.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" + "type": "string" }, "style": "form" } @@ -13387,36 +15534,20 @@ "schema": { "type": "object", "properties": { - "aliases": { - "description": "Aliases for the index.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" - } - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" - }, - "settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" + "query": { + "description": "Defines the search query using Query DSL. A request body query cannot be used\nwith the `q` query string parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] } } }, "examples": { - "indicesCreateRequestExample1": { - "summary": "Create an index.", - "description": "This request specifies the `number_of_shards` and `number_of_replicas`.", - "value": "{\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\": 2\n }\n}" - }, - "indicesCreateRequestExample2": { - "summary": "Create an index with mappings.", - "description": "You can provide mapping definitions in the create index API requests.", - "value": "{\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"properties\": {\n \"field1\": { \"type\": \"text\" }\n }\n }\n}" - }, - "indicesCreateRequestExample3": { - "summary": "Create an index with aliases.", - "description": "You can provide mapping definitions in the create index API requests. Index alias names also support date math.\n", - "value": "{\n \"aliases\": {\n \"alias_1\": {},\n \"alias_2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n }\n }\n}" + "CountRequestExample1": { + "description": "Run `GET /my-index-000001/_count?q=user:kimchy`. Alternatively, run `GET /my-index-000001/_count` with the same query in the request body. Both requests count the number of documents in `my-index-000001` with a `user.id` of `kimchy`.\n", + "value": "{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" } } } @@ -13430,52 +15561,90 @@ "schema": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "shards_acknowledged": { - "type": "boolean" + "count": { + "type": "number" }, - "acknowledged": { - "type": "boolean" + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] } }, "required": [ - "index", - "shards_acknowledged", - "acknowledged" + "count", + "_shards" ] + }, + "examples": { + "CountResponseExample1": { + "description": "A successful response from `GET /my-index-000001/_count?q=user:kimchy`.", + "value": "{\n \"count\": 1,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" + } } } } } }, - "x-api-name" : "create", - "x-namespace": "indices" - }, - "delete": { - "tags": [ - "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_count\n
\n ", + "
\n GET\n /{index}/_count\n
\n " ], - "summary": "Delete indices", - "description": "Deleting an index deletes its documents, shards, and metadata.\nIt does not delete related Kibana components, such as data views, visualizations, or dashboards.\n\nYou cannot delete the current write index of a data stream.\nTo delete the index, you must roll over the data stream so a new write index is created.\nYou can then use the delete index API to delete the previous write index.", - "operationId": "indices-delete", - "parameters": [ + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "count", + "x-category": "search", + "x-metaTags": [ { - "in": "path", - "name": "index", - "description": "Comma-separated list of indices to delete.\nYou cannot specify index aliases.\nBy default, this parameter does not support wildcards (`*`) or `_all`.\nTo use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_create/{id}": { + "put": { + "tags": [ + "document" + ], + "summary": "Create a new document in the index", + "description": "You can index a new JSON document with the `//_doc/` or `//_create/<_id>` APIs\nUsing `_create` guarantees that the document is indexed only if it does not already exist.\nIt returns a 409 response when a document with a same ID already exists in the index.\nTo update an existing document, you must use the `//_doc/` API.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add a document using the `PUT //_create/<_id>` or `POST //_create/<_id>` request formats, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.", + "externalDocs": { + "description": "Data streams", + "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-index_.html" + }, + "operationId": "create", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The name of the data stream or index to target.\nIf the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn't exist and doesn’t match a data stream template, this request creates the index.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "description": "A unique identifier for the document.\nTo automatically generate a document ID, use the `POST //_doc/` request format.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", "deprecated": false, "schema": { "type": "boolean" @@ -13484,18 +15653,28 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "pipeline", + "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + }, + { + "in": "query", + "name": "require_alias", + "description": "If `true`, the destination must be an index alias.", "deprecated": false, "schema": { "type": "boolean" @@ -13504,63 +15683,155 @@ }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" }, { "in": "query", "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\nElasticsearch waits for at least the specified timeout period before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "The explicit version number for concurrency control.\nIt must be a non-negative long number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "CreateRequestExample1": { + "description": "Run `PUT my-index-000001/_create/1` to index a document into the `my-index-000001` index if no document with that ID exists.\n", + "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.IndicesResponseBase" + "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "CreateResponseExample1": { + "description": "A successful response from `PUT my-index-000001/_create/1` which indexes a document.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}" + } } } } } }, - "x-api-name" : "delete", - "x-namespace": "indices" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n PUT\n /{index}/_create/{id}\n
\n ", + "
\n POST\n /{index}/_create/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `create`\n" + ], + "x-api": "create", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "head": { + "post": { "tags": [ - "indices" + "document" ], - "summary": "Check indices", - "description": "Check if one or more indices, index aliases, or data streams exist.", - "operationId": "indices-exists", + "summary": "Create a new document in the index", + "description": "You can index a new JSON document with the `//_doc/` or `//_create/<_id>` APIs\nUsing `_create` guarantees that the document is indexed only if it does not already exist.\nIt returns a 409 response when a document with a same ID already exists in the index.\nTo update an existing document, you must use the `//_doc/` API.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add a document using the `PUT //_create/<_id>` or `POST //_create/<_id>` request formats, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.", + "externalDocs": { + "description": "Data streams", + "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-index_.html" + }, + "operationId": "create-1", "parameters": [ { "in": "path", "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`).", + "description": "The name of the data stream or index to target.\nIf the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn't exist and doesn’t match a data stream template, this request creates the index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "description": "A unique identifier for the document.\nTo automatically generate a document ID, use the `POST //_doc/` request format.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", "deprecated": false, "schema": { "type": "boolean" @@ -13569,28 +15840,28 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "pipeline", + "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "flat_settings", - "description": "If `true`, returns settings in flat format.", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Refresh" }, "style": "form" }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "require_alias", + "description": "If `true`, the destination must be an index alias.", "deprecated": false, "schema": { "type": "boolean" @@ -13599,8 +15870,8 @@ }, { "in": "query", - "name": "include_defaults", - "description": "If `true`, return all default settings in the response.", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", "deprecated": false, "schema": { "type": "boolean" @@ -13609,84 +15880,141 @@ }, { "in": "query", - "name": "local", - "description": "If `true`, the request retrieves information from the local node only.", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "x-api-name" : "exists", - "x-namespace": "indices" - } - }, - "/_data_stream/{name}": { - "get": { - "tags": [ - "data stream" - ], - "summary": "Get data streams", - "description": "Get information about one or more data streams.", - "operationId": "indices-get-data-stream-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.get_data_stream-name" }, { - "$ref": "#/components/parameters/indices.get_data_stream-expand_wildcards" + "in": "query", + "name": "timeout", + "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\nElasticsearch waits for at least the specified timeout period before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_data_stream-include_defaults" + "in": "query", + "name": "version", + "description": "The explicit version number for concurrency control.\nIt must be a non-negative long number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_data_stream-master_timeout" + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_data_stream-verbose" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "CreateRequestExample1": { + "description": "Run `PUT my-index-000001/_create/1` to index a document into the `my-index-000001` index if no document with that ID exists.\n", + "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/indices.get_data_stream-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "CreateResponseExample1": { + "description": "A successful response from `PUT my-index-000001/_create/1` which indexes a document.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}" + } + } + } + } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "get_data_stream", - "x-namespace": "indices" - }, - "put": { + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n PUT\n /{index}/_create/{id}\n
\n ", + "
\n POST\n /{index}/_create/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `create`\n" + ], + "x-api": "create", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_dangling/{index_uuid}": { + "post": { "tags": [ - "data stream" + "indices" ], - "summary": "Create a data stream", - "description": "You must have a matching index template with data stream enabled.", - "operationId": "indices-create-data-stream", + "summary": "Import a dangling index", + "description": "If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.\nFor example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.", + "operationId": "dangling-indices-import-dangling-index", "parameters": [ { "in": "path", - "name": "name", - "description": "Name of the data stream, which must meet the following criteria:\nLowercase only;\nCannot include `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, `,`, `#`, `:`, or a space character;\nCannot start with `-`, `_`, `+`, or `.ds-`;\nCannot be `.` or `..`;\nCannot be longer than 255 bytes. Multi-byte characters count towards this limit faster.", + "name": "index_uuid", + "description": "The UUID of the index to import. Use the get dangling indices API to locate the UUID.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DataStreamName" + "$ref": "#/components/schemas/_types.Uuid" }, "style": "simple" }, + { + "in": "query", + "name": "accept_data_loss", + "description": "This parameter must be set to true to import a dangling index.\nBecause Elasticsearch cannot know where the dangling index data came from or determine which shard copies are fresh and which are stale, it cannot guarantee that the imported data represents the latest state of the index when it was last in the cluster.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { "in": "query", "name": "master_timeout", - "description": "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.", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -13696,7 +16024,7 @@ { "in": "query", "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "description": "The period to wait for a response.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -13711,38 +16039,66 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "ImportDanglingIndexResponseExample1": { + "description": "A successful response from `POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true`.\n", + "value": "{\n \"acknowledged\": true\n}" + } } } } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "create_data_stream", - "x-namespace": "indices" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n POST\n /_dangling/{index_uuid}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "import_dangling_index.dangling_indices", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ - "data stream" + "indices" ], - "summary": "Delete data streams", - "description": "Deletes one or more data streams and their backing indices.", - "operationId": "indices-delete-data-stream", + "summary": "Delete a dangling index", + "description": "If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.\nFor example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.", + "operationId": "dangling-indices-delete-dangling-index", "parameters": [ { "in": "path", - "name": "name", - "description": "Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported.", + "name": "index_uuid", + "description": "The UUID of the index to delete. Use the get dangling indices API to find the UUID.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DataStreamNames" + "$ref": "#/components/schemas/_types.Uuid" }, "style": "simple" }, + { + "in": "query", + "name": "accept_data_loss", + "description": "This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { "in": "query", "name": "master_timeout", - "description": "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.", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -13751,11 +16107,11 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match. Supports comma-separated values,such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "timeout", + "description": "The period to wait for a response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -13772,423 +16128,215 @@ } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "delete_data_stream", - "x-namespace": "indices" - } - }, - "/_create_from/{source}/{dest}": { - "put": { - "tags": [ - "migration" - ], - "summary": "Create an index from a source index", - "description": "Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.", - "operationId": "indices-create-from", - "parameters": [ - { - "$ref": "#/components/parameters/indices.create_from-source" - }, - { - "$ref": "#/components/parameters/indices.create_from-dest" - } + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n DELETE\n /_dangling/{index_uuid}\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.create_from" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.create_from-200" - } - }, - "x-state": "Technical preview", - "x-api-name" : "create_from", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "migration" + "x-req-auth": [ + "Cluster privileges: `manage`\n" ], - "summary": "Create an index from a source index", - "description": "Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.", - "operationId": "indices-create-from-1", - "parameters": [ + "x-api": "delete_dangling_index.dangling_indices", + "x-category": "unknown", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.create_from-source" - }, - { - "$ref": "#/components/parameters/indices.create_from-dest" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.create_from" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.create_from-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Technical preview", - "x-api-name" : "create_from", - "x-namespace": "indices" + ] } }, - "/_data_stream/_stats": { + "/_dangling": { "get": { "tags": [ - "data stream" - ], - "summary": "Get data stream stats", - "description": "Get statistics for one or more data streams.", - "operationId": "indices-data-streams-stats", - "parameters": [ - { - "$ref": "#/components/parameters/indices.data_streams_stats-expand_wildcards" - } + "indices" ], + "summary": "Get the dangling indices", + "description": "If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.\nFor example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.\n\nUse this API to list dangling indices, which you can then import or delete.", + "operationId": "dangling-indices-list-dangling-indices", "responses": { "200": { - "$ref": "#/components/responses/indices.data_streams_stats-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dangling_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/dangling_indices.list_dangling_indices.DanglingIndex" + } + } + }, + "required": [ + "dangling_indices" + ] + }, + "examples": { + "ListDanglingIndicesResponseExample1": { + "value": "{\n \"dangling_indices\": [\n {\n \"index_name\": \"my-index-000001\",\n \"index_uuid\": \"zmM4e0JtBkeUjiHD-MihPQ\",\n \"creation_date_millis\": 1589414451372,\n \"node_ids\": [\n \"pL47UN3dAb2d5RCWP6lQ3e\"\n ]\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "data_streams_stats", - "x-namespace": "indices" - } - }, - "/_data_stream/{name}/_stats": { - "get": { - "tags": [ - "data stream" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_dangling\n
\n " ], - "summary": "Get data stream stats", - "description": "Get statistics for one or more data streams.", - "operationId": "indices-data-streams-stats-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.data_streams_stats-name" - }, - { - "$ref": "#/components/parameters/indices.data_streams_stats-expand_wildcards" - } + "x-req-auth": [ + "Cluster privileges: `manage`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.data_streams_stats-200" + "x-api": "list_dangling_indices.dangling_indices", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "data_streams_stats", - "x-namespace": "indices" + ] } }, - "/{index}/_alias/{name}": { + "/{index}/_doc/{id}": { "get": { "tags": [ - "indices" + "document" ], - "summary": "Get aliases", - "description": "Retrieves information for one or more data stream or index aliases.", - "operationId": "indices-get-alias-2", + "summary": "Get a document by its ID", + "description": "Get a document and its source or stored fields from an index.\n\nBy default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).\nIn the case where stored fields are requested with the `stored_fields` parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields.\nTo turn off realtime behavior, set the `realtime` parameter to false.\n\n**Source filtering**\n\nBy default, the API returns the contents of the `_source` field unless you have used the `stored_fields` parameter or the `_source` field is turned off.\nYou can turn off `_source` retrieval by using the `_source` parameter:\n\n```\nGET my-index-000001/_doc/0?_source=false\n```\n\nIf you only need one or two fields from the `_source`, use the `_source_includes` or `_source_excludes` parameters to include or filter out particular fields.\nThis can be helpful with large documents where partial retrieval can save on network overhead\nBoth parameters take a comma separated list of fields or wildcard expressions.\nFor example:\n\n```\nGET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities\n```\n\nIf you only want to specify includes, you can use a shorter notation:\n\n```\nGET my-index-000001/_doc/0?_source=*.id\n```\n\n**Routing**\n\nIf routing is used during indexing, the routing value also needs to be specified to retrieve a document.\nFor example:\n\n```\nGET my-index-000001/_doc/2?routing=user1\n```\n\nThis request gets the document with ID 2, but it is routed based on the user.\nThe document is not fetched if the correct routing is not specified.\n\n**Distributed**\n\nThe GET operation is hashed into a specific shard ID.\nIt is then redirected to one of the replicas within that shard ID and returns the result.\nThe replicas are the primary shard and its replicas within that shard ID group.\nThis means that the more replicas you have, the better your GET scaling will be.\n\n**Versioning support**\n\nYou can use the `version` parameter to retrieve the document only if its current version is equal to the specified one.\n\nInternally, Elasticsearch has marked the old document as deleted and added an entirely new document.\nThe old version of the document doesn't disappear immediately, although you won't be able to access it.\nElasticsearch cleans up deleted documents in the background as you continue to index more data.", + "operationId": "get", "parameters": [ { - "$ref": "#/components/parameters/indices.get_alias-index" + "in": "path", + "name": "index", + "description": "The name of the index that contains the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_alias-name" + "in": "path", + "name": "id", + "description": "A unique document identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_alias-allow_no_indices" + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, the operation is randomized between the shard replicas.\n\nIf it is set to `_local`, the operation will prefer to be run on a local allocated shard when possible.\nIf it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.\nThis can help with \"jumping values\" when hitting different shards in different refresh states.\nA sample value can be something like the web session ID or the user name.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_alias-expand_wildcards" + "in": "query", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_alias-ignore_unavailable" + "in": "query", + "name": "refresh", + "description": "If `true`, the request refreshes the relevant shards before retrieving the document.\nSetting it to `true` should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_alias-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_alias-200" - } - }, - "x-api-name" : "get_alias", - "x-namespace": "indices" - }, - "put": { - "tags": [ - "indices" - ], - "summary": "Create or update an alias", - "description": "Adds a data stream or index to an alias.", - "operationId": "indices-put-alias", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_alias-index" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_alias-name" + "in": "query", + "name": "_source", + "description": "Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_alias-master_timeout" + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_alias-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_alias" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_alias-200" - } - }, - "x-api-name" : "put_alias", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Create or update an alias", - "description": "Adds a data stream or index to an alias.", - "operationId": "indices-put-alias-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_alias-index" - }, - { - "$ref": "#/components/parameters/indices.put_alias-name" - }, - { - "$ref": "#/components/parameters/indices.put_alias-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.put_alias-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_alias" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_alias-200" - } - }, - "x-api-name" : "put_alias", - "x-namespace": "indices" - }, - "delete": { - "tags": [ - "indices" - ], - "summary": "Delete an alias", - "description": "Removes a data stream or index from an alias.", - "operationId": "indices-delete-alias", - "parameters": [ - { - "$ref": "#/components/parameters/indices.delete_alias-index" - }, - { - "$ref": "#/components/parameters/indices.delete_alias-name" - }, - { - "$ref": "#/components/parameters/indices.delete_alias-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.delete_alias-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.delete_alias-200" - } - }, - "x-api-name" : "delete_alias", - "x-namespace": "indices" - }, - "head": { - "tags": [ - "indices" - ], - "summary": "Check aliases", - "description": "Check if one or more data stream or index aliases exist.", - "operationId": "indices-exists-alias-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.exists_alias-index" - }, - { - "$ref": "#/components/parameters/indices.exists_alias-name" - }, - { - "$ref": "#/components/parameters/indices.exists_alias-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.exists_alias-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.exists_alias-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.exists_alias-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.exists_alias-200" - } - }, - "x-api-name" : "exists_alias", - "x-namespace": "indices" - } - }, - "/{index}/_aliases/{name}": { - "put": { - "tags": [ - "indices" - ], - "summary": "Create or update an alias", - "description": "Adds a data stream or index to an alias.", - "operationId": "indices-put-alias-2", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_alias-index" - }, - { - "$ref": "#/components/parameters/indices.put_alias-name" - }, - { - "$ref": "#/components/parameters/indices.put_alias-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.put_alias-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_alias" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_alias-200" - } - }, - "x-api-name" : "put_alias", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Create or update an alias", - "description": "Adds a data stream or index to an alias.", - "operationId": "indices-put-alias-3", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_alias-index" - }, - { - "$ref": "#/components/parameters/indices.put_alias-name" - }, - { - "$ref": "#/components/parameters/indices.put_alias-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.put_alias-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_alias" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_alias-200" - } - }, - "x-api-name" : "put_alias", - "x-namespace": "indices" - }, - "delete": { - "tags": [ - "indices" - ], - "summary": "Delete an alias", - "description": "Removes a data stream or index from an alias.", - "operationId": "indices-delete-alias-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.delete_alias-index" - }, - { - "$ref": "#/components/parameters/indices.delete_alias-name" - }, - { - "$ref": "#/components/parameters/indices.delete_alias-master_timeout" + "in": "query", + "name": "_source_exclude_vectors", + "description": "Whether vectors should be excluded from _source", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 9.2.0", + "style": "form" }, { - "$ref": "#/components/parameters/indices.delete_alias-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.delete_alias-200" - } - }, - "x-api-name" : "delete_alias", - "x-namespace": "indices" - } - }, - "/_data_stream/{name}/_lifecycle": { - "get": { - "tags": [ - "data stream" - ], - "summary": "Get data stream lifecycles", - "description": "Get the data stream lifecycle configuration of one or more data streams.", - "operationId": "indices-get-data-lifecycle", - "parameters": [ - { - "in": "path", - "name": "name", - "description": "Comma-separated list of data streams to limit the request.\nSupports wildcards (`*`).\nTo target all data streams, omit this parameter or use `*` or `_all`.", - "required": true, + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DataStreamNames" + "$ref": "#/components/schemas/_types.Fields" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to `false`.\nOnly leaf fields can be retrieved with the `stored_fields` option.\nObject fields can't be returned; if specified, the request fails.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "include_defaults", - "description": "If `true`, return all default settings in the response.", + "name": "version", + "description": "The version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.VersionNumber" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "version_type", + "description": "The version type.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.VersionType" }, "style": "form" } @@ -14199,324 +16347,207 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data_streams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.get_data_lifecycle.DataStreamWithLifecycle" - } - } - }, - "required": [ - "data_streams" - ] + "$ref": "#/components/schemas/_global.get.GetResult" }, "examples": { - "IndicesGetDataLifecycleResponseExample1": { - "description": "A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`.", - "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n },\n {\n \"name\": \"my-data-stream-2\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n }\n ]\n}" + "GetResponseExample1": { + "summary": "Get a document", + "description": "A successful response from `GET my-index-000001/_doc/0`. It retrieves the JSON document with the `_id` 0 from the `my-index-000001` index.\n", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"0\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"found\": true,\n \"_source\": {\n \"@timestamp\": \"2099-11-15T14:12:12\",\n \"http\": {\n \"request\": {\n \"method\": \"get\"\n },\n \"response\": {\n \"status_code\": 200,\n \"bytes\": 1070000\n },\n \"version\": \"1.1\"\n },\n \"source\": {\n \"ip\": \"127.0.0.1\"\n },\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n}" + }, + "GetResponseExample2": { + "summary": "Get stored fields", + "description": "A successful response from `GET my-index-000001/_doc/1?stored_fields=tags,counter`, which retrieves a set of stored fields. Field values fetched from the document itself are always returned as an array. Any requested fields that are not stored (such as the counter field in this example) are ignored.\n", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\" : 22,\n \"_primary_term\" : 1,\n \"found\": true,\n \"fields\": {\n \"tags\": [\n \"production\"\n ]\n }\n}" + }, + "GetResponseExample3": { + "summary": "Get metadata fields", + "description": "A successful response from `GET my-index-000001/_doc/2?routing=user1&stored_fields=tags,counter`, which retrieves the `_routing` metadata field.\n", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"_seq_no\" : 13,\n \"_primary_term\" : 1,\n \"_routing\": \"user1\",\n \"found\": true,\n \"fields\": {\n \"tags\": [\n \"env2\"\n ]\n }\n}" } } } } } }, - "x-state": "Added in 8.11.0", - "x-api-name" : "get_data_lifecycle", - "x-namespace": "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_doc/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "get", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ - "data stream" + "document" ], - "summary": "Update data stream lifecycles", - "description": "Update the data stream lifecycle of the specified data streams.", - "operationId": "indices-put-data-lifecycle", + "summary": "Create or update a document in an index", + "description": "Add a JSON document to the specified data stream or index and make it searchable.\nIf the target is an index and the document already exists, the request updates the document and increments its version.\n\nNOTE: You cannot use this API to send update requests for existing documents in a data stream.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add or overwrite a document using the `PUT //_doc/<_id>` request format, you must have the `create`, `index`, or `write` index privilege.\n* To add a document using the `POST //_doc/` request format, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nNOTE: Replica shards might not all be started when an indexing operation returns successfully.\nBy default, only the primary is required. Set `wait_for_active_shards` to change this default behavior.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Optimistic concurrency control**\n\nIndex operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.\n\n**No operation (noop) updates**\n\nWhen updating a document by using this API, a new version of the document is always created even if the document hasn't changed.\nIf this isn't acceptable use the `_update` API with `detect_noop` set to `true`.\nThe `detect_noop` option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.\n\nThere isn't a definitive rule for when noop updates aren't acceptable.\nIt's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.\n\n**Versioning**\n\nEach indexed document is given a version number.\nBy default, internal versioning is used that starts at 1 and increments with each update, deletes included.\nOptionally, the version number can be set to an external value (for example, if maintained in a database).\nTo enable this functionality, `version_type` should be set to `external`.\nThe value provided must be a numeric, long value greater than or equal to 0, and less than around `9.2e+18`.\n\nNOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.\nIf no version is provided, the operation runs without any version checks.\n\nWhen using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.\nIf true, the document will be indexed and the new version number used.\nIf the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:\n\n```\nPUT my-index-000001/_doc/1?version=2&version_type=external\n{\n \"user\": {\n \"id\": \"elkbee\"\n }\n}\n```\n\nIn this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.\nIf the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).\n\nA nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.\nEven the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.", + "externalDocs": { + "description": "Data streams", + "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-index_.html" + }, + "operationId": "index", "parameters": [ { "in": "path", - "name": "name", - "description": "Comma-separated list of data streams used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams use `*` or `_all`.", + "name": "index", + "description": "The name of the data stream or index to target.\nIf the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn't exist and doesn't match a data stream template, this request creates the index.\nYou can check for existing targets with the resolve index API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DataStreamNames" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" }, { - "in": "query", - "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `hidden`, `open`, `closed`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "in": "path", + "name": "id", + "description": "A unique identifier for the document.\nTo automatically generate a document ID, use the `POST //_doc/` request format and omit this parameter.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "name": "if_primary_term", + "description": "Only perform the operation if the document has this primary term.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "if_seq_no", + "description": "Only perform the operation if the document has this sequence number.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.SequenceNumber" }, "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data_retention": { - "$ref": "#/components/schemas/_types.Duration" - }, - "downsampling": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleDownsampling" - }, - "enabled": { - "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", - "type": "boolean" - } - } - }, - "examples": { - "IndicesPutDataLifecycleRequestExample1": { - "summary": "Set the data stream lifecycle retention", - "value": "{\n \"data_retention\": \"7d\"\n}" - }, - "IndicesPutDataLifecycleRequestExample2": { - "summary": "Set the data stream lifecycle downsampling", - "description": "This example configures two downsampling rounds.", - "value": "{\n \"downsampling\": [\n {\n \"after\": \"1d\",\n \"fixed_interval\": \"10m\"\n },\n {\n \"after\": \"7d\",\n \"fixed_interval\": \"1d\"\n }\n ]\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "IndicesPutDataLifecycleResponseExample1": { - "description": "A successful response for configuring a data stream lifecycle.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "put_data_lifecycle", - "x-namespace": "indices" - }, - "delete": { - "tags": [ - "indices" - ], - "summary": "Delete data stream lifecycles", - "description": "Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.", - "operationId": "indices-delete-data-lifecycle", - "parameters": [ + }, { - "in": "path", - "name": "name", - "description": "A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams", - "required": true, + "in": "query", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DataStreamNames" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "expand_wildcards", - "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "op_type", + "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.OpType" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Specify timeout for connection to master", + "name": "pipeline", + "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Explicit timestamp for the document", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Refresh" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "IndicesDeleteDataLifecycleResponseExample1": { - "description": "A successful response for deleting a data stream lifecycle.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "delete_data_lifecycle", - "x-namespace": "indices" - } - }, - "/_data_stream/{name}/_options": { - "get": { - "tags": [ - "data stream" - ], - "summary": "Get data stream options", - "description": "Get the data stream options configuration of one or more data streams.", - "operationId": "indices-get-data-stream-options", - "parameters": [ + }, { - "in": "path", - "name": "name", - "description": "Comma-separated list of data streams to limit the request.\nSupports wildcards (`*`).\nTo target all data streams, omit this parameter or use `*` or `_all`.", - "required": true, + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DataStreamNames" + "$ref": "#/components/schemas/_types.Routing" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "timeout", + "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "version", + "description": "An explicit version number for concurrency control.\nIt must be a non-negative long number.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.VersionNumber" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data_streams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.get_data_stream_options.DataStreamWithOptions" - } - } - }, - "required": [ - "data_streams" - ] - } - } - } - } - }, - "x-state": "Added in 8.19.0", - "x-api-name" : "get_data_stream_options", - "x-namespace": "indices" - }, - "put": { - "tags": [ - "data stream" - ], - "summary": "Update data stream options", - "description": "Update the data stream options of the specified data streams.", - "operationId": "indices-put-data-stream-options", - "parameters": [ + }, { - "in": "path", - "name": "name", - "description": "Comma-separated list of data streams used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams use `*` or `_all`.", - "required": true, + "in": "query", + "name": "version_type", + "description": "The version type.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DataStreamNames" + "$ref": "#/components/schemas/_types.VersionType" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `hidden`, `open`, `closed`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.WaitForActiveShards" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "name": "require_alias", + "description": "If `true`, the destination must be an index alias.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } @@ -14525,15 +16556,23 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "failure_store": { - "$ref": "#/components/schemas/indices._types.DataStreamFailureStore" - } + "type": "object" + }, + "examples": { + "IndexRequestExample1": { + "summary": "Automate document IDs", + "description": "Run `POST my-index-000001/_doc/` to index a document. When you use the `POST //_doc/` request format, the `op_type` is automatically set to `create` and the index operation generates a unique ID for the document.\n", + "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + }, + "IndexRequestExample2": { + "summary": "Define document IDs", + "description": "Run `PUT my-index-000001/_doc/1` to insert a JSON document into the `my-index-000001` index with an `_id` of 1.\n", + "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" } } } - } + }, + "required": true }, "responses": { "200": { @@ -14541,455 +16580,377 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "IndexResponseExample1": { + "summary": "Automate document IDs", + "description": "A successful response from `POST my-index-000001/_doc/`, which contains an automated document ID.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"W0tpsmIBdwcYyG50zbta\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"result\": \"created\"\n}" + }, + "IndexResponseExample2": { + "summary": "Define document IDs", + "description": "A successful response from `PUT my-index-000001/_doc/1`.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"result\": \"created\"\n}" + } } } } } }, - "x-state": "Added in 8.19.0", - "x-api-name" : "put_data_stream_options", - "x-namespace": "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_doc/{id}\n
\n ", + "
\n POST\n /{index}/_doc/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "index", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "delete": { + "post": { "tags": [ - "indices" + "document" ], - "summary": "Delete data stream options", - "description": "Removes the data stream options from a data stream.", - "operationId": "indices-delete-data-stream-options", + "summary": "Create or update a document in an index", + "description": "Add a JSON document to the specified data stream or index and make it searchable.\nIf the target is an index and the document already exists, the request updates the document and increments its version.\n\nNOTE: You cannot use this API to send update requests for existing documents in a data stream.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add or overwrite a document using the `PUT //_doc/<_id>` request format, you must have the `create`, `index`, or `write` index privilege.\n* To add a document using the `POST //_doc/` request format, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nNOTE: Replica shards might not all be started when an indexing operation returns successfully.\nBy default, only the primary is required. Set `wait_for_active_shards` to change this default behavior.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Optimistic concurrency control**\n\nIndex operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.\n\n**No operation (noop) updates**\n\nWhen updating a document by using this API, a new version of the document is always created even if the document hasn't changed.\nIf this isn't acceptable use the `_update` API with `detect_noop` set to `true`.\nThe `detect_noop` option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.\n\nThere isn't a definitive rule for when noop updates aren't acceptable.\nIt's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.\n\n**Versioning**\n\nEach indexed document is given a version number.\nBy default, internal versioning is used that starts at 1 and increments with each update, deletes included.\nOptionally, the version number can be set to an external value (for example, if maintained in a database).\nTo enable this functionality, `version_type` should be set to `external`.\nThe value provided must be a numeric, long value greater than or equal to 0, and less than around `9.2e+18`.\n\nNOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.\nIf no version is provided, the operation runs without any version checks.\n\nWhen using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.\nIf true, the document will be indexed and the new version number used.\nIf the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:\n\n```\nPUT my-index-000001/_doc/1?version=2&version_type=external\n{\n \"user\": {\n \"id\": \"elkbee\"\n }\n}\n```\n\nIn this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.\nIf the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).\n\nA nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.\nEven the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.", + "externalDocs": { + "description": "Data streams", + "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-index_.html" + }, + "operationId": "index-1", "parameters": [ { "in": "path", - "name": "name", - "description": "A comma-separated list of data streams of which the data stream options will be deleted; use `*` to get all data streams", + "name": "index", + "description": "The name of the data stream or index to target.\nIf the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn't exist and doesn't match a data stream template, this request creates the index.\nYou can check for existing targets with the resolve index API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DataStreamNames" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" }, { - "in": "query", - "name": "expand_wildcards", - "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "in": "path", + "name": "id", + "description": "A unique identifier for the document.\nTo automatically generate a document ID, use the `POST //_doc/` request format and omit this parameter.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "Specify timeout for connection to master", + "name": "if_primary_term", + "description": "Only perform the operation if the document has this primary term.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Explicit timestamp for the document", + "name": "if_seq_no", + "description": "Only perform the operation if the document has this sequence number.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.SequenceNumber" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "IndicesDeleteDataStreamOptionsResponseExample1": { - "description": "A successful response for deleting data stream options.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.19.0", - "x-api-name" : "delete_data_stream_options", - "x-namespace": "indices" - } - }, - "/_index_template/{name}": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get index templates", - "description": "Get information about one or more index templates.", - "operationId": "indices-get-index-template-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.get_index_template-name" - }, - { - "$ref": "#/components/parameters/indices.get_index_template-local" }, { - "$ref": "#/components/parameters/indices.get_index_template-flat_settings" + "in": "query", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_index_template-master_timeout" + "in": "query", + "name": "op_type", + "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.OpType" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_index_template-include_defaults" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_index_template-200" - } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "get_index_template", - "x-namespace": "indices" - }, - "put": { - "tags": [ - "indices" - ], - "summary": "Create or update an index template", - "description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.\n\nElasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.\nIndex templates are applied during data stream or index creation.\nFor data streams, these settings and mappings are applied when the stream's backing indices are created.\nSettings and mappings specified in a create index API request override any settings or mappings specified in an index template.\nChanges to index templates do not affect existing indices, including the existing backing indices of a data stream.\n\nYou can use C-style `/* *\\/` block comments in index templates.\nYou can include comments anywhere in the request body, except before the opening curly bracket.\n\n**Multiple matching templates**\n\nIf multiple index templates match the name of a new index or data stream, the template with the highest priority is used.\n\nMultiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities.\n\n**Composing aliases, mappings, and settings**\n\nWhen multiple component templates are specified in the `composed_of` field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates.\nAny mappings, settings, or aliases from the parent index template are merged in next.\nFinally, any configuration on the index request itself is merged.\nMapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration.\nIf a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one.\nThis recursive merging strategy applies not only to field mappings, but also root options like `dynamic_templates` and `meta`.\nIf an earlier component contains a `dynamic_templates` block, then by default new `dynamic_templates` entries are appended onto the end.\nIf an entry already exists with the same key, then it is overwritten by the new definition.", - "operationId": "indices-put-index-template", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_index_template-name" + "in": "query", + "name": "pipeline", + "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_index_template-create" + "in": "query", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_index_template-master_timeout" + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_index_template-cause" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_index_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_index_template-200" - } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "put_index_template", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Create or update an index template", - "description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.\n\nElasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.\nIndex templates are applied during data stream or index creation.\nFor data streams, these settings and mappings are applied when the stream's backing indices are created.\nSettings and mappings specified in a create index API request override any settings or mappings specified in an index template.\nChanges to index templates do not affect existing indices, including the existing backing indices of a data stream.\n\nYou can use C-style `/* *\\/` block comments in index templates.\nYou can include comments anywhere in the request body, except before the opening curly bracket.\n\n**Multiple matching templates**\n\nIf multiple index templates match the name of a new index or data stream, the template with the highest priority is used.\n\nMultiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities.\n\n**Composing aliases, mappings, and settings**\n\nWhen multiple component templates are specified in the `composed_of` field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates.\nAny mappings, settings, or aliases from the parent index template are merged in next.\nFinally, any configuration on the index request itself is merged.\nMapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration.\nIf a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one.\nThis recursive merging strategy applies not only to field mappings, but also root options like `dynamic_templates` and `meta`.\nIf an earlier component contains a `dynamic_templates` block, then by default new `dynamic_templates` entries are appended onto the end.\nIf an entry already exists with the same key, then it is overwritten by the new definition.", - "operationId": "indices-put-index-template-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_index_template-name" + "in": "query", + "name": "timeout", + "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_index_template-create" + "in": "query", + "name": "version", + "description": "An explicit version number for concurrency control.\nIt must be a non-negative long number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_index_template-master_timeout" + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_index_template-cause" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_index_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_index_template-200" - } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "put_index_template", - "x-namespace": "indices" - }, - "delete": { - "tags": [ - "indices" - ], - "summary": "Delete an index template", - "description": "The provided may contain multiple template names separated by a comma. If multiple template\nnames are specified then there is no wildcard support and the provided names should match completely with\nexisting templates.", - "operationId": "indices-delete-index-template", - "parameters": [ - { - "in": "path", - "name": "name", - "description": "Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.", - "required": true, + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.WaitForActiveShards" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "require_alias", + "description": "If `true`, the destination must be an index alias.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "IndexRequestExample1": { + "summary": "Automate document IDs", + "description": "Run `POST my-index-000001/_doc/` to index a document. When you use the `POST //_doc/` request format, the `op_type` is automatically set to `create` and the index operation generates a unique ID for the document.\n", + "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + }, + "IndexRequestExample2": { + "summary": "Define document IDs", + "description": "Run `PUT my-index-000001/_doc/1` to insert a JSON document into the `my-index-000001` index with an `_id` of 1.\n", + "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "IndexResponseExample1": { + "summary": "Automate document IDs", + "description": "A successful response from `POST my-index-000001/_doc/`, which contains an automated document ID.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"W0tpsmIBdwcYyG50zbta\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"result\": \"created\"\n}" + }, + "IndexResponseExample2": { + "summary": "Define document IDs", + "description": "A successful response from `PUT my-index-000001/_doc/1`.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"result\": \"created\"\n}" + } } } } } }, - "x-state": "Added in 7.8.0", - "x-api-name" : "delete_index_template", - "x-namespace": "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_doc/{id}\n
\n ", + "
\n POST\n /{index}/_doc/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "index", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "head": { + "delete": { "tags": [ - "indices" + "document" ], - "summary": "Check index templates", - "description": "Check whether index templates exist.", - "operationId": "indices-exists-index-template", + "summary": "Delete a document", + "description": "Remove a JSON document from the specified index.\n\nNOTE: You cannot send deletion requests directly to a data stream.\nTo delete a document in a data stream, you must target the backing index containing the document.\n\n**Optimistic concurrency control**\n\nDelete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Versioning**\n\nEach document indexed is versioned.\nWhen deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.\nEvery write operation run on a document, deletes included, causes its version to be incremented.\nThe version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.\nThe length of time for which a deleted document's version remains available is determined by the `index.gc_deletes` index setting.\n\n**Routing**\n\nIf routing is used during indexing, the routing value also needs to be specified to delete a document.\n\nIf the `_routing` mapping is set to `required` and no routing value is specified, the delete API throws a `RoutingMissingException` and rejects the request.\n\nFor example:\n\n```\nDELETE /my-index-000001/_doc/1?routing=shard-1\n```\n\nThis request deletes the document with ID 1, but it is routed based on the user.\nThe document is not deleted if the correct routing is not specified.\n\n**Distributed**\n\nThe delete operation gets hashed into a specific shard ID.\nIt then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.", + "operationId": "delete", "parameters": [ { "in": "path", - "name": "name", - "description": "Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.", + "name": "index", + "description": "The name of the target index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" }, { - "in": "query", - "name": "local", - "description": "If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.", + "in": "path", + "name": "id", + "description": "A unique identifier for the document.", + "required": true, "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "flat_settings", - "description": "If true, returns settings in flat format.", + "name": "if_primary_term", + "description": "Only perform the operation if the document has this primary term.", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "if_seq_no", + "description": "Only perform the operation if the document has this sequence number.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.SequenceNumber" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "x-api-name" : "exists_index_template", - "x-namespace": "indices" - } - }, - "/_template/{name}": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get legacy index templates", - "description": "Get information about one or more index templates.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/templates" - }, - "operationId": "indices-get-template-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.get_template-name" - }, - { - "$ref": "#/components/parameters/indices.get_template-flat_settings" }, { - "$ref": "#/components/parameters/indices.get_template-local" - }, - { - "$ref": "#/components/parameters/indices.get_template-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_template-200" - } - }, - "deprecated": true, - "x-api-name" : "get_template", - "x-namespace": "indices" - }, - "put": { - "tags": [ - "indices" - ], - "summary": "Create or update a legacy index template", - "description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.\nElasticsearch applies templates to new indices based on an index pattern that matches the index name.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.\n\nComposable templates always take precedence over legacy templates.\nIf no composable template matches a new index, matching legacy templates are applied according to their order.\n\nIndex templates are only applied during index creation.\nChanges to index templates do not affect existing indices.\nSettings and mappings specified in create index API requests override any settings or mappings specified in an index template.\n\nYou can use C-style `/* *\\/` block comments in index templates.\nYou can include comments anywhere in the request body, except before the opening curly bracket.\n\n**Indices matching multiple templates**\n\nMultiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index.\nThe order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them.\nNOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/templates" - }, - "operationId": "indices-put-template", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_template-name" - }, - { - "$ref": "#/components/parameters/indices.put_template-create" - }, - { - "$ref": "#/components/parameters/indices.put_template-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.put_template-order" - }, - { - "$ref": "#/components/parameters/indices.put_template-cause" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_template-200" - } - }, - "deprecated": true, - "x-api-name" : "put_template", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Create or update a legacy index template", - "description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.\nElasticsearch applies templates to new indices based on an index pattern that matches the index name.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.\n\nComposable templates always take precedence over legacy templates.\nIf no composable template matches a new index, matching legacy templates are applied according to their order.\n\nIndex templates are only applied during index creation.\nChanges to index templates do not affect existing indices.\nSettings and mappings specified in create index API requests override any settings or mappings specified in an index template.\n\nYou can use C-style `/* *\\/` block comments in index templates.\nYou can include comments anywhere in the request body, except before the opening curly bracket.\n\n**Indices matching multiple templates**\n\nMultiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index.\nThe order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them.\nNOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/templates" - }, - "operationId": "indices-put-template-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_template-name" - }, - { - "$ref": "#/components/parameters/indices.put_template-create" + "in": "query", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_template-master_timeout" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_template-order" + "in": "query", + "name": "timeout", + "description": "The period to wait for active shards.\n\nThis parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation.\nBy default, the delete operation will wait on the primary shard to become available for up to 1 minute before failing and responding with an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_template-cause" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_template-200" - } - }, - "deprecated": true, - "x-api-name" : "put_template", - "x-namespace": "indices" - }, - "delete": { - "tags": [ - "indices" - ], - "summary": "Delete a legacy index template", - "description": "IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.", - "operationId": "indices-delete-template", - "parameters": [ - { - "in": "path", - "name": "name", - "description": "The name of the legacy index template to delete.\nWildcard (`*`) expressions are supported.", - "required": true, + "in": "query", + "name": "version", + "description": "An explicit version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.VersionNumber" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "version_type", + "description": "The version type.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.VersionType" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "wait_for_active_shards", + "description": "The minimum number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.WaitForActiveShards" }, "style": "form" } @@ -15000,42 +16961,78 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "DeleteResponseExample1": { + "description": "A successful response from `DELETE /my-index-000001/_doc/1`, which deletes the JSON document 1 from the `my-index-000001` index.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"_primary_term\": 1,\n \"_seq_no\": 5,\n \"result\": \"deleted\"\n}" + } } } } } }, - "deprecated": true, - "x-api-name" : "delete_template", - "x-namespace": "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /{index}/_doc/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `delete`\n" + ], + "x-api": "delete", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ - "indices" + "document" ], - "summary": "Check existence of index templates", - "description": "Get information about whether index templates exist.\nIndex templates define settings, mappings, and aliases that can be applied automatically to new indices.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/templates" - }, - "operationId": "indices-exists-template", + "summary": "Check a document", + "description": "Verify that a document exists.\nFor example, check to see if a document with the `_id` 0 exists:\n\n```\nHEAD my-index-000001/_doc/0\n```\n\nIf the document exists, the API returns a status code of `200 - OK`.\nIf the document doesn’t exist, the API returns `404 - Not Found`.\n\n**Versioning support**\n\nYou can use the `version` parameter to check the document only if its current version is equal to the specified one.\n\nInternally, Elasticsearch has marked the old document as deleted and added an entirely new document.\nThe old version of the document doesn't disappear immediately, although you won't be able to access it.\nElasticsearch cleans up deleted documents in the background as you continue to index more data.", + "operationId": "exists", "parameters": [ { "in": "path", - "name": "name", - "description": "A comma-separated list of index template names used to limit the request.\nWildcard (`*`) expressions are supported.", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases.\nIt supports wildcards (`*`).", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "description": "A unique document identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "flat_settings", - "description": "Indicates whether to use a flat format for the response.", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, the operation is randomized between the shard replicas.\n\nIf it is set to `_local`, the operation will prefer to be run on a local allocated shard when possible.\nIf it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.\nThis can help with \"jumping values\" when hitting different shards in different refresh states.\nA sample value can be something like the web session ID or the user name.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", "deprecated": false, "schema": { "type": "boolean" @@ -15044,8 +17041,8 @@ }, { "in": "query", - "name": "local", - "description": "Indicates whether to get information from the local node only.", + "name": "refresh", + "description": "If `true`, the request refreshes the relevant shards before retrieving the document.\nSetting it to `true` should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).", "deprecated": false, "schema": { "type": "boolean" @@ -15054,94 +17051,71 @@ }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "x-api-name" : "exists_template", - "x-namespace": "indices" - } - }, - "/{index}/_disk_usage": { - "post": { - "tags": [ - "indices" - ], - "summary": "Analyze the index disk usage", - "description": "Analyze the disk usage of each field of an index or data stream.\nThis API might not support indices created in previous Elasticsearch versions.\nThe result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.\n\nNOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index `store_size` value because some small metadata files are ignored and some parts of data files might not be scanned by the API.\nSince stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.\nThe stored size of the `_id` field is likely underestimated while the `_source` field is overestimated.", - "operationId": "indices-disk-usage", - "parameters": [ + }, { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nIt’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.", - "required": true, + "in": "query", + "name": "_source", + "description": "Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "allow_no_indices", - "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "flush", - "description": "If `true`, the API performs a flush before analysis.\nIf `false`, the response may not include uncommitted data.", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to `false`.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, missing or closed indices are not included in the response.", + "name": "version", + "description": "Explicit version number for concurrency control.\nThe specified version must match the current version of the document for the request to succeed.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.VersionNumber" }, "style": "form" }, { "in": "query", - "name": "run_expensive_tasks", - "description": "Analyzing field disk usage is resource-intensive.\nTo use the API, this parameter must be set to `true`.", + "name": "version_type", + "description": "The version type.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.VersionType" }, "style": "form" } @@ -15150,173 +17124,138 @@ "200": { "description": "", "content": { - "application/json": { - "schema": { - "type": "object" - } - } + "application/json": {} } } }, - "x-state": "Technical preview", - "x-api-name" : "disk_usage", - "x-namespace": "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n HEAD\n /{index}/_doc/{id}\n
\n " + ], + "x-api": "exists", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_downsample/{target_index}": { + "/{index}/_delete_by_query": { "post": { "tags": [ - "data stream" + "document" ], - "summary": "Downsample an index", - "description": "Aggregate a time series (TSDS) index and store pre-computed statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped by a configured time interval.\nFor example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.\nAll documents within an hour interval are summarized and stored as a single document in the downsample index.\n\nNOTE: Only indices in a time series data stream are supported.\nNeither field nor document level security can be defined on the source index.\nThe source index must be read only (`index.blocks.write: true`).", - "operationId": "indices-downsample", + "summary": "Delete documents", + "description": "Deletes documents that match the specified query.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `delete` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\nWhen you submit a delete by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and deletes matching documents using internal versioning.\nIf a document changes between the time that the snapshot is taken and the delete operation is processed, it results in a version conflict and the delete operation fails.\n\nNOTE: Documents with a version equal to 0 cannot be deleted using delete by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete.\nA bulk delete request is performed for each batch of matching documents.\nIf a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off.\nIf the maximum retry limit is reached, processing halts and all failed requests are returned in the response.\nAny delete requests that completed successfully still stick, they are not rolled back.\n\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts the operation could attempt to delete more documents from the source than `max_docs` until it has successfully deleted `max_docs documents`, or it has gone through every document in the source query.\n\n**Throttling delete requests**\n\nTo control the rate at which delete by query issues batches of delete operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to disable throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is `1000`, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single `_bulk` request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nDelete by query supports sliced scroll to parallelize the delete process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` lets Elasticsearch choose the number of slices to use.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\nAdding slices to the delete by query operation creates sub-requests which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with slices only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with `slices` will cancel each sub-request.\n* Due to the nature of `slices` each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with `slices` are distributed proportionally to each sub-request. Combine that with the earlier point about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being deleted.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many `slices` hurts performance. Setting `slices` higher than the number of shards generally does not improve efficiency and adds overhead.\n* Delete performance scales linearly across available resources with the number of slices.\n\nWhether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources.\n\n**Cancel a delete by query operation**\n\nAny delete by query can be canceled using the task cancel API. For example:\n\n```\nPOST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel\n```\n\nThe task ID can be found by using the get tasks API.\n\nCancellation should happen quickly but might take a few seconds.\nThe get task status API will continue to list the delete by query task until this task checks that it has been cancelled and terminates itself.", + "operationId": "delete-by-query", "parameters": [ { "in": "path", "name": "index", - "description": "Name of the time series index to downsample.", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { - "in": "path", - "name": "target_index", - "description": "Name of the index to create.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "type": "boolean" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/indices._types.DownsampleConfig" - }, - "examples": { - "DownsampleRequestExample1": { - "value": "{\n \"fixed_interval\": \"1d\"\n}" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - } - }, - "x-state": "Technical preview", - "x-api-name" : "downsample", - "x-namespace": "indices" - } - }, - "/_alias/{name}": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get aliases", - "description": "Retrieves information for one or more data stream or index aliases.", - "operationId": "indices-get-alias-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.get_alias-name" + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_alias-allow_no_indices" + "in": "query", + "name": "analyzer", + "description": "Analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_alias-expand_wildcards" + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_alias-ignore_unavailable" + "in": "query", + "name": "conflicts", + "description": "What to do if delete by query hits version conflicts: `abort` or `proceed`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Conflicts" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_alias-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_alias-200" - } - }, - "x-api-name" : "get_alias", - "x-namespace": "indices" - }, - "head": { - "tags": [ - "indices" - ], - "summary": "Check aliases", - "description": "Check if one or more data stream or index aliases exist.", - "operationId": "indices-exists-alias", - "parameters": [ - { - "$ref": "#/components/parameters/indices.exists_alias-name" + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.exists_alias-allow_no_indices" + "in": "query", + "name": "df", + "description": "The field to use as default where no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.exists_alias-expand_wildcards" + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.exists_alias-ignore_unavailable" + "in": "query", + "name": "from", + "description": "Skips the specified number of documents.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.exists_alias-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.exists_alias-200" - } - }, - "x-api-name" : "exists_alias", - "x-namespace": "indices" - } - }, - "/{index}/_lifecycle/explain": { - "get": { - "tags": [ - "data stream" - ], - "summary": "Get the status for a data stream lifecycle", - "description": "Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.", - "operationId": "indices-explain-data-lifecycle", - "parameters": [ - { - "in": "path", - "name": "index", - "description": "The name of the index to explain", - "required": true, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "include_defaults", - "description": "indicates if the API should return the default values the system uses for the index's lifecycle", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", "deprecated": false, "schema": { "type": "boolean" @@ -15325,79 +17264,28 @@ }, { "in": "query", - "name": "master_timeout", - "description": "Specify timeout for connection to master", + "name": "max_docs", + "description": "The maximum number of documents to process.\nDefaults to all documents.\nWhen set to a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.explain_data_lifecycle.DataStreamLifecycleExplain" - } - } - }, - "required": [ - "indices" - ] - }, - "examples": { - "IndicesExplainDataLifecycleResponseExample1": { - "summary": "Successful response", - "description": "A successful response from `GET .ds-metrics-2023.03.22-000001/_lifecycle/explain`, which retrieves the lifecycle status for a data stream backing index. If the index is managed by a data stream lifecycle, the API will show the `managed_by_lifecycle` field set to `true` and the rest of the response will contain information about the lifecycle execution status for this index.\n", - "value": "{\n \"indices\": {\n \".ds-metrics-2023.03.22-000001\": {\n \"index\" : \".ds-metrics-2023.03.22-000001\",\n \"managed_by_lifecycle\" : true,\n \"index_creation_date_millis\" : 1679475563571,\n \"time_since_index_creation\" : \"843ms\",\n \"rollover_date_millis\" : 1679475564293,\n \"time_since_rollover\" : \"121ms\",\n \"lifecycle\" : { },\n \"generation_time\" : \"121ms\"\n }\n}" - }, - "IndicesExplainDataLifecycleResponseExample2": { - "summary": "Successful response with error messages", - "description": "The API reports any errors related to the lifecycle execution for the target index.", - "value": "{\n \"indices\": {\n \".ds-metrics-2023.03.22-000001\": {\n \"index\" : \".ds-metrics-2023.03.22-000001\",\n \"managed_by_lifecycle\" : true,\n \"index_creation_date_millis\" : 1679475563571,\n \"time_since_index_creation\" : \"843ms\",\n \"lifecycle\" : {\n \"enabled\": true\n },\n \"error\": \"{\\\"type\\\":\\\"validation_exception\\\",\\\"reason\\\":\\\"Validation Failed: 1: this action would add [2] shards, but this cluster\ncurrently has [4]/[3] maximum normal shards open;\\\"}\"\n }\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "explain_data_lifecycle", - "x-namespace": "indices" - } - }, - "/{index}/_field_usage_stats": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get field usage stats", - "description": "Get field usage information for each shard and field of an index.\nField usage statistics are automatically captured when queries are running on a cluster.\nA shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.\n\nThe response body reports the per-shard usage count of the data structures that back the fields in the index.\nA given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times.", - "operationId": "indices-field-usage-stats", - "parameters": [ + }, { - "in": "path", - "name": "index", - "description": "Comma-separated list or wildcard expression of index names used to limit the request.", - "required": true, + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "type": "string" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.\nThis is different than the delete API's `refresh` parameter, which causes just the shard that received the delete request to be refreshed.\nUnlike the delete API, it does not support `wait_for`.", "deprecated": false, "schema": { "type": "boolean" @@ -15406,360 +17294,457 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "request_cache", + "description": "If `true`, the request cache is used for this request.\nDefaults to the index-level setting.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, missing or closed indices are not included in the response.", + "name": "requests_per_second", + "description": "The throttle for this request in sub-requests per second.", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "fields", - "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Fields" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/indices.field_usage_stats.FieldsUsageBody" - }, - "examples": { - "indicesFieldUsageStatsResponseExample1": { - "description": "An abbreviated response from `GET /my-index-000001/_field_usage_stats`. The `all_fields` object reports the sums of the usage counts for all fields in the index (on the listed shard).\n", - "value": "{\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"my-index-000001\": {\n \"shards\": [\n {\n \"tracking_id\": \"MpOl0QlTQ4SYYhEe6KgJoQ\",\n \"tracking_started_at_millis\": 1625558985010,\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"gA6KeeVzQkGURFCUyV-e8Q\",\n \"relocating_node\": null\n },\n \"stats\": {\n \"all_fields\": {\n \"any\": \"6\",\n \"inverted_index\": {\n \"terms\": 1,\n \"postings\": 1,\n \"proximity\": 1,\n \"positions\": 0,\n \"term_frequencies\": 1,\n \"offsets\": 0,\n \"payloads\": 0\n },\n \"stored_fields\": 2,\n \"doc_values\": 1,\n \"points\": 0,\n \"norms\": 1,\n \"term_vectors\": 0,\n \"knn_vectors\": 0\n },\n \"fields\": {\n \"_id\": {\n \"any\": 1,\n \"inverted_index\": {\n \"terms\": 1,\n \"postings\": 1,\n \"proximity\": 1,\n \"positions\": 0,\n \"term_frequencies\": 1,\n \"offsets\": 0,\n \"payloads\": 0\n },\n \"stored_fields\": 1,\n \"doc_values\": 0,\n \"points\": 0,\n \"norms\": 0,\n \"term_vectors\": 0,\n \"knn_vectors\": 0\n },\n \"_source\": {},\n \"context\": {},\n \"message.keyword\": {}\n }\n }\n }\n ]\n }\n}" - } - } - } - } - } - }, - "x-state": "Technical preview", - "x-api-name" : "field_usage_stats", - "x-namespace": "indices" - } - }, - "/_flush": { - "get": { - "tags": [ - "indices" - ], - "summary": "Flush data streams or indices", - "description": "Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.\nWhen restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.\nElasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.\n\nAfter each operation has been flushed it is permanently stored in the Lucene index.\nThis may mean that there is no need to maintain an additional copy of it in the transaction log.\nThe transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.\n\nIt is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.\nIf you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.", - "operationId": "indices-flush-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.flush-allow_no_indices" }, { - "$ref": "#/components/parameters/indices.flush-expand_wildcards" + "in": "query", + "name": "q", + "description": "A query in the Lucene query string syntax.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-force" + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-ignore_unavailable" + "in": "query", + "name": "scroll_size", + "description": "The size of the scroll request that powers the operation.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-wait_if_ongoing" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.flush-200" - } - }, - "x-api-name" : "flush", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Flush data streams or indices", - "description": "Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.\nWhen restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.\nElasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.\n\nAfter each operation has been flushed it is permanently stored in the Lucene index.\nThis may mean that there is no need to maintain an additional copy of it in the transaction log.\nThe transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.\n\nIt is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.\nIf you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.", - "operationId": "indices-flush", - "parameters": [ - { - "$ref": "#/components/parameters/indices.flush-allow_no_indices" + "in": "query", + "name": "search_timeout", + "description": "The explicit timeout for each search request.\nIt defaults to no timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-expand_wildcards" + "in": "query", + "name": "search_type", + "description": "The type of the search operation.\nAvailable options include `query_then_fetch` and `dfs_query_then_fetch`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-force" + "in": "query", + "name": "slices", + "description": "The number of slices this task should be divided into.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Slices" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-ignore_unavailable" + "in": "query", + "name": "sort", + "description": "A comma-separated list of `:` pairs.", + "deprecated": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-wait_if_ongoing" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.flush-200" - } - }, - "x-api-name" : "flush", - "x-namespace": "indices" - } - }, - "/{index}/_flush": { - "get": { - "tags": [ - "indices" - ], - "summary": "Flush data streams or indices", - "description": "Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.\nWhen restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.\nElasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.\n\nAfter each operation has been flushed it is permanently stored in the Lucene index.\nThis may mean that there is no need to maintain an additional copy of it in the transaction log.\nThe transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.\n\nIt is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.\nIf you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.", - "operationId": "indices-flush-3", - "parameters": [ - { - "$ref": "#/components/parameters/indices.flush-index" + "in": "query", + "name": "stats", + "description": "The specific `tag` of the request for logging and statistical purposes.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-allow_no_indices" + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nUse with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-expand_wildcards" + "in": "query", + "name": "timeout", + "description": "The period each deletion request waits for active shards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-force" + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-ignore_unavailable" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe `timeout` value controls how long each write request waits for unavailable shards to become available.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.flush-wait_if_ongoing" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.flush-200" + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request blocks until the operation is complete.\nIf `false`, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task. Elasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`. When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } - }, - "x-api-name" : "flush", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" ], - "summary": "Flush data streams or indices", - "description": "Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.\nWhen restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.\nElasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.\n\nAfter each operation has been flushed it is permanently stored in the Lucene index.\nThis may mean that there is no need to maintain an additional copy of it in the transaction log.\nThe transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.\n\nIt is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.\nIf you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.", - "operationId": "indices-flush-2", - "parameters": [ - { - "$ref": "#/components/parameters/indices.flush-index" - }, - { - "$ref": "#/components/parameters/indices.flush-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.flush-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.flush-force" - }, - { - "$ref": "#/components/parameters/indices.flush-ignore_unavailable" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "max_docs": { + "description": "The maximum number of documents to delete.", + "type": "number" + }, + "query": { + "description": "The documents to delete specified with Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "slice": { + "description": "Slice the request manually using the provided slice ID and total number of slices.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "description": "A sort object that specifies the order of deleted documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + } + } + }, + "examples": { + "DeleteByQueryRequestExample1": { + "summary": "Delete all documents", + "description": "Run `POST /my-index-000001,my-index-000002/_delete_by_query` to delete all documents from multiple data streams or indices.", + "value": "{\n \"query\": {\n \"match_all\": {}\n }\n}" + }, + "DeleteByQueryRequestExample2": { + "summary": "Delete a single document", + "description": "Run `POST my-index-000001/_delete_by_query` to delete a document by using a unique attribute.", + "value": "{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"max_docs\": 1\n}" + }, + "DeleteByQueryRequestExample3": { + "summary": "Slice manually", + "description": "Run `POST my-index-000001/_delete_by_query` to slice a delete by query manually. Provide a slice ID and total number of slices.\n", + "value": "{\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"query\": {\n \"range\": {\n \"http.response.bytes\": {\n \"lt\": 2000000\n }\n }\n }\n}" + }, + "DeleteByQueryRequestExample4": { + "summary": "Automatic slicing", + "description": "Run `POST my-index-000001/_delete_by_query?refresh&slices=5` to let delete by query automatically parallelize using sliced scroll to slice on `_id`. The `slices` query parameter value specifies the number of slices to use.\n", + "value": "{\n \"query\": {\n \"range\": {\n \"http.response.bytes\": {\n \"lt\": 2000000\n }\n }\n }\n}" + } + } + } }, - { - "$ref": "#/components/parameters/indices.flush-wait_if_ongoing" - } - ], + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/indices.flush-200" - } - }, - "x-api-name" : "flush", - "x-namespace": "indices" - } - }, - "/_forcemerge": { - "post": { - "tags": [ - "indices" - ], - "summary": "Force a merge", - "description": "Perform the force merge operation on the shards of one or more indices.\nFor data streams, the API forces a merge on the shards of the stream's backing indices.\n\nMerging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents.\nMerging normally happens automatically, but sometimes it is useful to trigger a merge manually.\n\nWARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes).\nWhen documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a \"tombstone\".\nThese soft-deleted documents are automatically cleaned up during regular segment merges.\nBut force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges.\nSo the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.\nIf you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.\n\n**Blocks during a force merge**\n\nCalls to this API block until the merge is complete (unless request contains `wait_for_completion=false`).\nIf the client connection is lost before completion then the force merge process will continue in the background.\nAny new requests to force merge the same indices will also block until the ongoing force merge is complete.\n\n**Running force merge asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task.\nHowever, you can not cancel this task as the force merge task is not cancelable.\nElasticsearch creates a record of this task as a document at `_tasks/`.\nWhen you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.\n\n**Force merging multiple indices**\n\nYou can force merge multiple indices with a single request by targeting:\n\n* One or more data streams that contain multiple backing indices\n* Multiple indices\n* One or more aliases\n* All data streams and indices in a cluster\n\nEach targeted shard is force-merged separately using the force_merge threadpool.\nBy default each node only has a single `force_merge` thread which means that the shards on that node are force-merged one at a time.\nIf you expand the `force_merge` threadpool on a node then it will force merge its shards in parallel\n\nForce merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case `max_num_segments parameter` is set to `1`, to rewrite all segments into a new one.\n\n**Data streams and time-based indices**\n\nForce-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover.\nIn these cases, each index only receives indexing traffic for a certain period of time.\nOnce an index receive no more writes, its shards can be force-merged to a single segment.\nThis can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches.\nFor example:\n\n```\nPOST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1\n```", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge" - }, - "operationId": "indices-forcemerge", - "parameters": [ - { - "$ref": "#/components/parameters/indices.forcemerge-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-flush" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-max_num_segments" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-only_expunge_deletes" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-wait_for_completion" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "batches": { + "description": "The number of scroll responses pulled back by the delete by query.", + "type": "number" + }, + "deleted": { + "description": "The number of documents that were successfully deleted.", + "type": "number" + }, + "failures": { + "description": "An array of failures if there were any unrecoverable errors during the process.\nIf this array is not empty, the request ended abnormally because of those failures.\nDelete by query is implemented using batches and any failures cause the entire process to end but all failures in the current batch are collected into the array.\nYou can use the `conflicts` option to prevent reindex from ending on version conflicts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.BulkIndexByScrollFailure" + } + }, + "noops": { + "description": "This field is always equal to zero for delete by query.\nIt exists only so that delete by query, update by query, and reindex APIs return responses with the same structure.", + "type": "number" + }, + "requests_per_second": { + "description": "The number of requests per second effectively run during the delete by query.", + "type": "number" + }, + "retries": { + "description": "The number of retries attempted by delete by query.\n`bulk` is the number of bulk actions retried.\n`search` is the number of search actions retried.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Retries" + } + ] + }, + "slice_id": { + "type": "number" + }, + "slices": { + "description": "Status of each slice if the delete by query was sliced", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ReindexStatus" + } + }, + "task": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TaskId" + } + ] + }, + "throttled": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttled_millis": { + "description": "The number of milliseconds the request slept to conform to `requests_per_second`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "throttled_until": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttled_until_millis": { + "description": "This field should always be equal to zero in a `_delete_by_query` response.\nIt has meaning only when using the task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be run again in order to conform to `requests_per_second`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "timed_out": { + "description": "If `true`, some requests run during the delete by query operation timed out.", + "type": "boolean" + }, + "took": { + "description": "The number of milliseconds from start to end of the whole operation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "total": { + "description": "The number of documents that were successfully processed.", + "type": "number" + }, + "version_conflicts": { + "description": "The number of version conflicts that the delete by query hit.", + "type": "number" + } + } + }, + "examples": { + "DeleteByQueryResponseExample1": { + "description": "A successful response from `POST /my-index-000001/_delete_by_query`.", + "value": "{\n \"took\" : 147,\n \"timed_out\": false,\n \"total\": 119,\n \"deleted\": 119,\n \"batches\": 1,\n \"version_conflicts\": 0,\n \"noops\": 0,\n \"retries\": {\n \"bulk\": 0,\n \"search\": 0\n },\n \"throttled_millis\": 0,\n \"requests_per_second\": -1.0,\n \"throttled_until_millis\": 0,\n \"failures\" : [ ]\n}" + } + } + } + } } + }, + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n POST\n /{index}/_delete_by_query\n
\n " ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.forcemerge-200" + "x-req-auth": [ + "Index privileges: `read`,`delete`\n" + ], + "x-api": "delete_by_query", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 2.1.0", - "x-api-name" : "forcemerge", - "x-namespace": "indices" + ] } }, - "/{index}/_forcemerge": { + "/_delete_by_query/{task_id}/_rethrottle": { "post": { "tags": [ - "indices" + "document" ], - "summary": "Force a merge", - "description": "Perform the force merge operation on the shards of one or more indices.\nFor data streams, the API forces a merge on the shards of the stream's backing indices.\n\nMerging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents.\nMerging normally happens automatically, but sometimes it is useful to trigger a merge manually.\n\nWARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes).\nWhen documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a \"tombstone\".\nThese soft-deleted documents are automatically cleaned up during regular segment merges.\nBut force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges.\nSo the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.\nIf you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.\n\n**Blocks during a force merge**\n\nCalls to this API block until the merge is complete (unless request contains `wait_for_completion=false`).\nIf the client connection is lost before completion then the force merge process will continue in the background.\nAny new requests to force merge the same indices will also block until the ongoing force merge is complete.\n\n**Running force merge asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task.\nHowever, you can not cancel this task as the force merge task is not cancelable.\nElasticsearch creates a record of this task as a document at `_tasks/`.\nWhen you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.\n\n**Force merging multiple indices**\n\nYou can force merge multiple indices with a single request by targeting:\n\n* One or more data streams that contain multiple backing indices\n* Multiple indices\n* One or more aliases\n* All data streams and indices in a cluster\n\nEach targeted shard is force-merged separately using the force_merge threadpool.\nBy default each node only has a single `force_merge` thread which means that the shards on that node are force-merged one at a time.\nIf you expand the `force_merge` threadpool on a node then it will force merge its shards in parallel\n\nForce merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case `max_num_segments parameter` is set to `1`, to rewrite all segments into a new one.\n\n**Data streams and time-based indices**\n\nForce-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover.\nIn these cases, each index only receives indexing traffic for a certain period of time.\nOnce an index receive no more writes, its shards can be force-merged to a single segment.\nThis can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches.\nFor example:\n\n```\nPOST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1\n```", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge" - }, - "operationId": "indices-forcemerge-1", + "summary": "Throttle a delete by query operation", + "description": "Change the number of requests per second for a particular delete by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", + "operationId": "delete-by-query-rethrottle", "parameters": [ { - "$ref": "#/components/parameters/indices.forcemerge-index" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-flush" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-max_num_segments" - }, - { - "$ref": "#/components/parameters/indices.forcemerge-only_expunge_deletes" + "in": "path", + "name": "task_id", + "description": "The ID for the task.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.TaskId" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.forcemerge-wait_for_completion" + "in": "query", + "name": "requests_per_second", + "description": "The throttle for this request in sub-requests per second.\nTo disable throttling, set it to `-1`.", + "required": true, + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.forcemerge-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tasks._types.TaskListResponseBase" + } + } + } } }, - "x-state": "Added in 2.1.0", - "x-api-name" : "forcemerge", - "x-namespace": "indices" - } - }, - "/_alias": { - "get": { - "tags": [ - "indices" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n POST\n /_delete_by_query/{task_id}/_rethrottle\n
\n " ], - "summary": "Get aliases", - "description": "Retrieves information for one or more data stream or index aliases.", - "operationId": "indices-get-alias", - "parameters": [ - { - "$ref": "#/components/parameters/indices.get_alias-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_alias-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.get_alias-ignore_unavailable" - }, + "x-api": "delete_by_query_rethrottle", + "x-category": "document management", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.get_alias-master_timeout" + "content": "Elasticsearch", + "name": "product_name" } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_alias-200" - } - }, - "x-api-name" : "get_alias", - "x-namespace": "indices" + ] } }, - "/{index}/_alias": { + "/_scripts/{id}": { "get": { "tags": [ - "indices" + "script" ], - "summary": "Get aliases", - "description": "Retrieves information for one or more data stream or index aliases.", - "operationId": "indices-get-alias-3", + "summary": "Get a script or search template", + "description": "Retrieves a stored script or search template.", + "operationId": "get-script", "parameters": [ { - "$ref": "#/components/parameters/indices.get_alias-index" - }, - { - "$ref": "#/components/parameters/indices.get_alias-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_alias-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.get_alias-ignore_unavailable" + "in": "path", + "name": "id", + "description": "The identifier for the stored script or search template.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_alias-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_alias-200" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - }, - "x-api-name" : "get_alias", - "x-namespace": "indices" - } - }, - "/_lifecycle/stats": { - "get": { - "tags": [ - "data stream" ], - "summary": "Get data stream lifecycle stats", - "description": "Get statistics about the data streams that are managed by a data stream lifecycle.", - "operationId": "indices-get-data-lifecycle-stats", "responses": { "200": { "description": "", @@ -15768,357 +17753,732 @@ "schema": { "type": "object", "properties": { - "data_stream_count": { - "description": "The count of data streams currently being managed by the data stream lifecycle.", - "type": "number" - }, - "data_streams": { - "description": "Information about the data streams that are managed by the data stream lifecycle.", - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.get_data_lifecycle_stats.DataStreamStats" - } + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "last_run_duration_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "found": { + "type": "boolean" }, - "time_between_starts_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.StoredScript" + } + ] } }, "required": [ - "data_stream_count", - "data_streams" + "_id", + "found" ] - }, - "examples": { - "IndicesGetDataLifecycleStatsResponseExample1": { - "description": "A successful response for `GET _lifecycle/stats?human&pretty`", - "value": "{\n \"last_run_duration_in_millis\": 2,\n \"last_run_duration\": \"2ms\",\n \"time_between_starts_in_millis\": 9998,\n \"time_between_starts\": \"9.99s\",\n \"data_streams_count\": 2,\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"backing_indices_in_total\": 2,\n \"backing_indices_in_error\": 0\n },\n {\n \"name\": \"my-other-stream\",\n \"backing_indices_in_total\": 2,\n \"backing_indices_in_error\": 1\n }\n ]\n}" - } } } } } }, - "x-state": "Added in 8.12.0", - "x-api-name" : "get_data_lifecycle_stats", - "x-namespace": "indices" - } - }, - "/_data_stream": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_scripts/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "get_script", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "data stream" + "script" ], - "summary": "Get data streams", - "description": "Get information about one or more data streams.", - "operationId": "indices-get-data-stream", + "summary": "Create or update a script or search template", + "description": "Creates or updates a stored script or search template.", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-stored-script-api.html" + }, + "operationId": "put-script", "parameters": [ { - "$ref": "#/components/parameters/indices.get_data_stream-expand_wildcards" + "in": "path", + "name": "id", + "description": "The identifier for the stored script or search template.\nIt must be unique within the cluster.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_data_stream-include_defaults" + "in": "query", + "name": "context", + "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.\nIf you specify both this and the `` path parameter, the API uses the request path parameter.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_data_stream-master_timeout" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_data_stream-verbose" + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "script": { + "description": "The script or search template, its parameters, and its language.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.StoredScript" + } + ] + } + }, + "required": [ + "script" + ] + }, + "examples": { + "PutScriptRequestExample1": { + "summary": "Create a search template", + "description": "Run `PUT _scripts/my-search-template` to create a search template.\n", + "value": "{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" + }, + "PutScriptRequestExample2": { + "summary": "Create a stored script", + "description": "Run `PUT _scripts/my-stored-script` to create a stored script.\n", + "value": "{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/indices.get_data_stream-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "get_data_stream", - "x-namespace": "indices" - } - }, - "/_mapping/field/{fields}": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_scripts/{id}\n
\n ", + "
\n POST\n /_scripts/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "put_script", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "indices" + "script" ], - "summary": "Get mapping definitions", - "description": "Retrieves mapping definitions for one or more fields.\nFor data streams, the API retrieves field mappings for the stream’s backing indices.\n\nThis API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.", - "operationId": "indices-get-field-mapping", + "summary": "Create or update a script or search template", + "description": "Creates or updates a stored script or search template.", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-stored-script-api.html" + }, + "operationId": "put-script-1", "parameters": [ { - "$ref": "#/components/parameters/indices.get_field_mapping-fields" - }, - { - "$ref": "#/components/parameters/indices.get_field_mapping-allow_no_indices" + "in": "path", + "name": "id", + "description": "The identifier for the stored script or search template.\nIt must be unique within the cluster.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_field_mapping-expand_wildcards" + "in": "query", + "name": "context", + "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.\nIf you specify both this and the `` path parameter, the API uses the request path parameter.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_field_mapping-ignore_unavailable" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_field_mapping-include_defaults" + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "script": { + "description": "The script or search template, its parameters, and its language.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.StoredScript" + } + ] + } + }, + "required": [ + "script" + ] + }, + "examples": { + "PutScriptRequestExample1": { + "summary": "Create a search template", + "description": "Run `PUT _scripts/my-search-template` to create a search template.\n", + "value": "{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" + }, + "PutScriptRequestExample2": { + "summary": "Create a stored script", + "description": "Run `PUT _scripts/my-stored-script` to create a stored script.\n", + "value": "{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/indices.get_field_mapping-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-api-name" : "get_field_mapping", - "x-namespace": "indices" - } - }, - "/{index}/_mapping/field/{fields}": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_scripts/{id}\n
\n ", + "
\n POST\n /_scripts/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "put_script", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "indices" + "script" ], - "summary": "Get mapping definitions", - "description": "Retrieves mapping definitions for one or more fields.\nFor data streams, the API retrieves field mappings for the stream’s backing indices.\n\nThis API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.", - "operationId": "indices-get-field-mapping-1", + "summary": "Delete a script or search template", + "description": "Deletes a stored script or search template.", + "operationId": "delete-script", "parameters": [ { - "$ref": "#/components/parameters/indices.get_field_mapping-index" - }, - { - "$ref": "#/components/parameters/indices.get_field_mapping-fields" - }, - { - "$ref": "#/components/parameters/indices.get_field_mapping-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_field_mapping-expand_wildcards" + "in": "path", + "name": "id", + "description": "The identifier for the stored script or search template.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_field_mapping-ignore_unavailable" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_field_mapping-include_defaults" + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.get_field_mapping-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-api-name" : "get_field_mapping", - "x-namespace": "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_scripts/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "delete_script", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_index_template": { + "/_enrich/policy/{name}": { "get": { "tags": [ - "indices" + "enrich" ], - "summary": "Get index templates", - "description": "Get information about one or more index templates.", - "operationId": "indices-get-index-template", + "summary": "Get an enrich policy", + "description": "Returns information about an enrich policy.", + "operationId": "enrich-get-policy", "parameters": [ { - "$ref": "#/components/parameters/indices.get_index_template-local" - }, - { - "$ref": "#/components/parameters/indices.get_index_template-flat_settings" - }, - { - "$ref": "#/components/parameters/indices.get_index_template-master_timeout" + "in": "path", + "name": "name", + "description": "Comma-separated list of enrich policy names used to limit the request.\nTo return information for all enrich policies, omit this parameter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_index_template-include_defaults" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.get_index_template-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/enrich._types.Summary" + } + } + }, + "required": [ + "policies" + ] + } + } + } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "get_index_template", - "x-namespace": "indices" - } - }, - "/_mapping": { - "get": { + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n GET\n /_enrich/policy/{name}\n
\n " + ], + "x-api": "get_policy.enrich", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "indices" + "enrich" ], - "summary": "Get mapping definitions", - "description": "For data streams, the API retrieves mappings for the stream’s backing indices.", - "operationId": "indices-get-mapping", + "summary": "Create an enrich policy", + "description": "Creates an enrich policy.", + "operationId": "enrich-put-policy", "parameters": [ { - "$ref": "#/components/parameters/indices.get_mapping-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_mapping-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.get_mapping-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.get_mapping-local" + "in": "path", + "name": "name", + "description": "Name of the enrich policy to create or update.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_mapping-master_timeout" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "geo_match": { + "description": "Matches enrich data to incoming documents based on a `geo_shape` query.", + "allOf": [ + { + "$ref": "#/components/schemas/enrich._types.Policy" + } + ] + }, + "match": { + "description": "Matches enrich data to incoming documents based on a `term` query.", + "allOf": [ + { + "$ref": "#/components/schemas/enrich._types.Policy" + } + ] + }, + "range": { + "description": "Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a `term` query.", + "allOf": [ + { + "$ref": "#/components/schemas/enrich._types.Policy" + } + ] + } + } + }, + "examples": { + "EnrichPutPolicyExample1": { + "description": "An example body for a `PUT /_enrich/policy/postal_policy` request.", + "value": "{\n \"geo_match\": {\n \"indices\": \"postal_codes\",\n \"match_field\": \"location\",\n \"enrich_fields\": [ \"location\", \"postal_code\" ]\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/indices.get_mapping-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-api-name" : "get_mapping", - "x-namespace": "indices" - } - }, - "/{index}/_mapping": { - "get": { + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n PUT\n /_enrich/policy/{name}\n
\n " + ], + "x-api": "put_policy.enrich", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "indices" + "enrich" ], - "summary": "Get mapping definitions", - "description": "For data streams, the API retrieves mappings for the stream’s backing indices.", - "operationId": "indices-get-mapping-1", + "summary": "Delete an enrich policy", + "description": "Deletes an existing enrich policy and its enrich index.", + "operationId": "enrich-delete-policy", "parameters": [ { - "$ref": "#/components/parameters/indices.get_mapping-index" - }, - { - "$ref": "#/components/parameters/indices.get_mapping-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_mapping-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.get_mapping-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.get_mapping-local" + "in": "path", + "name": "name", + "description": "Enrich policy to delete.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_mapping-master_timeout" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.get_mapping-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-api-name" : "get_mapping", - "x-namespace": "indices" - }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n DELETE\n /_enrich/policy/{name}\n
\n " + ], + "x-api": "delete_policy.enrich", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_enrich/policy/{name}/_execute": { "put": { "tags": [ - "indices" + "enrich" ], - "summary": "Update field mappings", - "description": "Add new fields to an existing data stream or index.\nYou can also use this API to change the search settings of existing fields and add new properties to existing object fields.\nFor data streams, these changes are applied to all backing indices by default.\n\n**Add multi-fields to an existing field**\n\nMulti-fields let you index the same field in different ways.\nYou can use this API to update the fields mapping parameter and enable multi-fields for an existing field.\nWARNING: If an index (or data stream) contains documents when you add a multi-field, those documents will not have values for the new multi-field.\nYou can populate the new multi-field with the update by query API.\n\n**Change supported mapping parameters for an existing field**\n\nThe documentation for each mapping parameter indicates whether you can update it for an existing field using this API.\nFor example, you can use the update mapping API to update the `ignore_above` parameter.\n\n**Change the mapping of an existing field**\n\nExcept for supported mapping parameters, you can't change the mapping or field type of an existing field.\nChanging an existing field could invalidate data that's already indexed.\n\nIf you need to change the mapping of a field in a data stream's backing indices, refer to documentation about modifying data streams.\nIf you need to change the mapping of a field in other indices, create a new index with the correct mapping and reindex your data into that index.\n\n**Rename a field**\n\nRenaming a field would invalidate data already indexed under the old field name.\nInstead, add an alias field to create an alternate field name.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-parameters" - }, - "operationId": "indices-put-mapping", + "summary": "Run an enrich policy", + "description": "Create the enrich index for an existing enrich policy.", + "operationId": "enrich-execute-policy", "parameters": [ { - "$ref": "#/components/parameters/indices.put_mapping-index" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-master_timeout" + "in": "path", + "name": "name", + "description": "Enrich policy to execute.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.put_mapping-timeout" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.put_mapping-write_index_only" + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request blocks other enrich policy execution requests until complete.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_mapping" - }, "responses": { "200": { - "$ref": "#/components/responses/indices.put_mapping-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/enrich.execute_policy.ExecuteEnrichPolicyStatus" + } + ] + }, + "task": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TaskId" + } + ] + } + } + } + } + } } }, - "x-api-name" : "put_mapping", - "x-namespace": "indices" - }, - "post": { + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n PUT\n /_enrich/policy/{name}/_execute\n
\n " + ], + "x-api": "execute_policy.enrich", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_enrich/policy": { + "get": { "tags": [ - "indices" + "enrich" ], - "summary": "Update field mappings", - "description": "Add new fields to an existing data stream or index.\nYou can also use this API to change the search settings of existing fields and add new properties to existing object fields.\nFor data streams, these changes are applied to all backing indices by default.\n\n**Add multi-fields to an existing field**\n\nMulti-fields let you index the same field in different ways.\nYou can use this API to update the fields mapping parameter and enable multi-fields for an existing field.\nWARNING: If an index (or data stream) contains documents when you add a multi-field, those documents will not have values for the new multi-field.\nYou can populate the new multi-field with the update by query API.\n\n**Change supported mapping parameters for an existing field**\n\nThe documentation for each mapping parameter indicates whether you can update it for an existing field using this API.\nFor example, you can use the update mapping API to update the `ignore_above` parameter.\n\n**Change the mapping of an existing field**\n\nExcept for supported mapping parameters, you can't change the mapping or field type of an existing field.\nChanging an existing field could invalidate data that's already indexed.\n\nIf you need to change the mapping of a field in a data stream's backing indices, refer to documentation about modifying data streams.\nIf you need to change the mapping of a field in other indices, create a new index with the correct mapping and reindex your data into that index.\n\n**Rename a field**\n\nRenaming a field would invalidate data already indexed under the old field name.\nInstead, add an alias field to create an alternate field name.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-parameters" - }, - "operationId": "indices-put-mapping-1", + "summary": "Get an enrich policy", + "description": "Returns information about an enrich policy.", + "operationId": "enrich-get-policy-1", "parameters": [ { - "$ref": "#/components/parameters/indices.put_mapping-index" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-timeout" - }, - { - "$ref": "#/components/parameters/indices.put_mapping-write_index_only" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_mapping" - }, "responses": { "200": { - "$ref": "#/components/responses/indices.put_mapping-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/enrich._types.Summary" + } + } + }, + "required": [ + "policies" + ] + } + } + } } }, - "x-api-name" : "put_mapping", - "x-namespace": "indices" + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n GET\n /_enrich/policy\n
\n " + ], + "x-api": "get_policy.enrich", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_migration/reindex/{index}/_status": { + "/_enrich/_stats": { "get": { "tags": [ - "migration" + "enrich" ], - "summary": "Get the migration reindexing status", - "description": "Get the status of a migration reindex attempt for a data stream or index.", - "operationId": "indices-get-migrate-reindex-status", + "summary": "Get enrich stats", + "description": "Returns enrich coordinator statistics and information about enrich policies that are currently executing.", + "operationId": "enrich-stats", "parameters": [ { - "in": "path", - "name": "index", - "description": "The index or data stream name.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" } ], "responses": { @@ -16129,433 +18489,369 @@ "schema": { "type": "object", "properties": { - "start_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "start_time_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "complete": { - "type": "boolean" - }, - "total_indices_in_data_stream": { - "type": "number" - }, - "total_indices_requiring_upgrade": { - "type": "number" - }, - "successes": { - "type": "number" - }, - "in_progress": { + "coordinator_stats": { + "description": "Objects containing information about each coordinating ingest node for configured enrich processors.", "type": "array", "items": { - "$ref": "#/components/schemas/indices.get_migrate_reindex_status.StatusInProgress" + "$ref": "#/components/schemas/enrich.stats.CoordinatorStats" } }, - "pending": { - "type": "number" - }, - "errors": { + "executing_policies": { + "description": "Objects containing information about each enrich policy that is currently executing.", "type": "array", "items": { - "$ref": "#/components/schemas/indices.get_migrate_reindex_status.StatusError" + "$ref": "#/components/schemas/enrich.stats.ExecutingPolicy" } }, - "exception": { - "type": "string" + "cache_stats": { + "description": "Objects containing information about the enrich cache stats on each ingest node.", + "x-state": "Generally available; Added in 7.16.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/enrich.stats.CacheStats" + } } }, "required": [ - "start_time_millis", - "complete", - "total_indices_in_data_stream", - "total_indices_requiring_upgrade", - "successes", - "in_progress", - "pending", - "errors" + "coordinator_stats", + "executing_policies" ] } } } } }, - "x-state": "Technical preview", - "x-api-name" : "get_migrate_reindex_status", - "x-namespace": "indices" + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n GET\n /_enrich/_stats\n
\n " + ], + "x-api": "stats.enrich", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_settings": { + "/_eql/search/{id}": { "get": { "tags": [ - "indices" + "eql" ], - "summary": "Get index settings", - "description": "Get setting information for one or more indices.\nFor data streams, it returns setting information for the stream's backing indices.", - "operationId": "indices-get-settings", + "summary": "Get async EQL search results", + "description": "Get the current status and available results for an async EQL search or a stored synchronous EQL search.", + "operationId": "eql-get", "parameters": [ { - "$ref": "#/components/parameters/indices.get_settings-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_settings-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.get_settings-flat_settings" - }, - { - "$ref": "#/components/parameters/indices.get_settings-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.get_settings-include_defaults" + "in": "path", + "name": "id", + "description": "Identifier for the search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_settings-local" + "in": "query", + "name": "keep_alive", + "description": "Period for which the search and its results are stored on the cluster.\nDefaults to the keep_alive value set by the search’s EQL search API request.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_settings-master_timeout" + "in": "query", + "name": "wait_for_completion_timeout", + "description": "Timeout duration to wait for the request to finish.\nDefaults to no timeout, meaning the request waits for complete search results.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.get_settings-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/eql._types.EqlSearchResponseBase" + } + } + } } }, - "x-api-name" : "get_settings", - "x-namespace": "indices" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_eql/search/{id}\n
\n " + ], + "x-api": "get.eql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "put": { + "delete": { "tags": [ - "indices" + "eql" ], - "summary": "Update index settings", - "description": "Changes dynamic index settings in real time.\nFor data streams, index setting changes are applied to all backing indices by default.\n\nTo revert a setting to the default value, use a null value.\nThe list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation.\nTo preserve existing settings from being updated, set the `preserve_existing` parameter to `true`.\n\n There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example:\n\n```\n{\n \"number_of_replicas\": 1\n}\n```\n\nOr you can use an `index` setting object:\n```\n{\n \"index\": {\n \"number_of_replicas\": 1\n }\n}\n```\n\nOr you can use dot annotation:\n```\n{\n \"index.number_of_replicas\": 1\n}\n```\n\nOr you can embed any of the aforementioned options in a `settings` object. For example:\n\n```\n{\n \"settings\": {\n \"index\": {\n \"number_of_replicas\": 1\n }\n }\n}\n```\n\nNOTE: You can only define new analyzers on closed indices.\nTo add an analyzer, you must close the index, define the analyzer, and reopen the index.\nYou cannot close the write index of a data stream.\nTo update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream.\nThen roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.\nThis affects searches and any new data added to the stream after the rollover.\nHowever, it does not affect the data stream's backing indices or their existing data.\nTo change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/index-settings/" - }, - "operationId": "indices-put-settings", + "summary": "Delete an async EQL search", + "description": "Delete an async EQL search or a stored synchronous EQL search.\nThe API also deletes results for the search.", + "operationId": "eql-delete", "parameters": [ { - "$ref": "#/components/parameters/indices.put_settings-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.put_settings-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.put_settings-flat_settings" - }, - { - "$ref": "#/components/parameters/indices.put_settings-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.put_settings-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.put_settings-preserve_existing" - }, - { - "$ref": "#/components/parameters/indices.put_settings-reopen" - }, - { - "$ref": "#/components/parameters/indices.put_settings-timeout" + "in": "path", + "name": "id", + "description": "Identifier for the search to delete.\nA search ID is provided in the EQL search API's response for an async search.\nA search ID is also provided if the request’s `keep_on_completion` parameter is `true`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_settings" - }, "responses": { "200": { - "$ref": "#/components/responses/indices.put_settings-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-api-name" : "put_settings", - "x-namespace": "indices" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n DELETE\n /_eql/search/{id}\n
\n " + ], + "x-api": "delete.eql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_settings": { + "/_eql/search/status/{id}": { "get": { "tags": [ - "indices" + "eql" ], - "summary": "Get index settings", - "description": "Get setting information for one or more indices.\nFor data streams, it returns setting information for the stream's backing indices.", - "operationId": "indices-get-settings-1", + "summary": "Get the async EQL status", + "description": "Get the current status for an async EQL search or a stored synchronous EQL search without returning results.", + "operationId": "eql-get-status", "parameters": [ { - "$ref": "#/components/parameters/indices.get_settings-index" - }, - { - "$ref": "#/components/parameters/indices.get_settings-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_settings-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.get_settings-flat_settings" - }, - { - "$ref": "#/components/parameters/indices.get_settings-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.get_settings-include_defaults" - }, - { - "$ref": "#/components/parameters/indices.get_settings-local" - }, - { - "$ref": "#/components/parameters/indices.get_settings-master_timeout" + "in": "path", + "name": "id", + "description": "Identifier for the search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.get_settings-200" - } - }, - "x-api-name" : "get_settings", - "x-namespace": "indices" - }, - "put": { - "tags": [ - "indices" - ], - "summary": "Update index settings", - "description": "Changes dynamic index settings in real time.\nFor data streams, index setting changes are applied to all backing indices by default.\n\nTo revert a setting to the default value, use a null value.\nThe list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation.\nTo preserve existing settings from being updated, set the `preserve_existing` parameter to `true`.\n\n There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example:\n\n```\n{\n \"number_of_replicas\": 1\n}\n```\n\nOr you can use an `index` setting object:\n```\n{\n \"index\": {\n \"number_of_replicas\": 1\n }\n}\n```\n\nOr you can use dot annotation:\n```\n{\n \"index.number_of_replicas\": 1\n}\n```\n\nOr you can embed any of the aforementioned options in a `settings` object. For example:\n\n```\n{\n \"settings\": {\n \"index\": {\n \"number_of_replicas\": 1\n }\n }\n}\n```\n\nNOTE: You can only define new analyzers on closed indices.\nTo add an analyzer, you must close the index, define the analyzer, and reopen the index.\nYou cannot close the write index of a data stream.\nTo update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream.\nThen roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.\nThis affects searches and any new data added to the stream after the rollover.\nHowever, it does not affect the data stream's backing indices or their existing data.\nTo change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/index-settings/" - }, - "operationId": "indices-put-settings-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.put_settings-index" - }, - { - "$ref": "#/components/parameters/indices.put_settings-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.put_settings-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.put_settings-flat_settings" - }, - { - "$ref": "#/components/parameters/indices.put_settings-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.put_settings-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.put_settings-preserve_existing" - }, - { - "$ref": "#/components/parameters/indices.put_settings-reopen" - }, - { - "$ref": "#/components/parameters/indices.put_settings-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.put_settings" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.put_settings-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Identifier for the search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "is_partial": { + "description": "If true, the search request is still executing. If false, the search is completed.", + "type": "boolean" + }, + "is_running": { + "description": "If true, the response does not contain complete search results. This could be because either the search is still running (is_running status is false), or because it is already completed (is_running status is true) and results are partial due to failures or timeouts.", + "type": "boolean" + }, + "start_time_in_millis": { + "description": "For a running search shows a timestamp when the eql search started, in milliseconds since the Unix epoch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "expiration_time_in_millis": { + "description": "Shows a timestamp when the eql search will be expired, in milliseconds since the Unix epoch. When this time is reached, the search and its results are deleted, even if the search is still ongoing.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "completion_status": { + "description": "For a completed search shows the http status code of the completed search.", + "type": "number" + } + }, + "required": [ + "id", + "is_partial", + "is_running" + ] + }, + "examples": { + "EqlGetStatusResponseExample1": { + "description": "A successful response for getting status information for an async EQL search.", + "value": "{\n \"id\": \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"is_running\" : true,\n \"is_partial\" : true,\n \"start_time_in_millis\" : 1611690235000,\n \"expiration_time_in_millis\" : 1611690295000\n}" + } + } + } + } } }, - "x-api-name" : "put_settings", - "x-namespace": "indices" - } - }, - "/{index}/_settings/{name}": { - "get": { - "tags": [ - "indices" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_eql/search/status/{id}\n
\n " ], - "summary": "Get index settings", - "description": "Get setting information for one or more indices.\nFor data streams, it returns setting information for the stream's backing indices.", - "operationId": "indices-get-settings-2", - "parameters": [ - { - "$ref": "#/components/parameters/indices.get_settings-index" - }, - { - "$ref": "#/components/parameters/indices.get_settings-name" - }, - { - "$ref": "#/components/parameters/indices.get_settings-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_settings-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.get_settings-flat_settings" - }, - { - "$ref": "#/components/parameters/indices.get_settings-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.get_settings-include_defaults" - }, - { - "$ref": "#/components/parameters/indices.get_settings-local" - }, + "x-api": "get_status.eql", + "x-category": "common", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.get_settings-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_settings-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "get_settings", - "x-namespace": "indices" + ] } }, - "/_settings/{name}": { + "/{index}/_eql/search": { "get": { "tags": [ - "indices" + "eql" ], - "summary": "Get index settings", - "description": "Get setting information for one or more indices.\nFor data streams, it returns setting information for the stream's backing indices.", - "operationId": "indices-get-settings-3", + "summary": "Get EQL search results", + "description": "Returns search results for an Event Query Language (EQL) query.\nEQL assumes each document in a data stream or index corresponds to an event.", + "externalDocs": { + "description": "EQL", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/eql-search-api.html" + }, + "operationId": "eql-search", "parameters": [ { - "$ref": "#/components/parameters/indices.get_settings-name" - }, - { - "$ref": "#/components/parameters/indices.get_settings-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.get_settings-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.get_settings-flat_settings" + "in": "path", + "name": "index", + "description": "Comma-separated list of index names to scope the operation", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.get_settings-ignore_unavailable" + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_settings-include_defaults" + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard failures. If false, returns an error with no partial results.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_settings-local" + "in": "query", + "name": "allow_partial_sequence_results", + "description": "If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all.\nThis flag has effect only if allow_partial_search_results is true.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_settings-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_settings-200" - } - }, - "x-api-name" : "get_settings", - "x-namespace": "indices" - } - }, - "/_template": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get legacy index templates", - "description": "Get information about one or more index templates.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/templates" - }, - "operationId": "indices-get-template", - "parameters": [ - { - "$ref": "#/components/parameters/indices.get_template-flat_settings" + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_template-local" + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.get_template-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.get_template-200" - } - }, - "deprecated": true, - "x-api-name" : "get_template", - "x-namespace": "indices" - } - }, - "/_migration/reindex": { - "post": { - "tags": [ - "migration" - ], - "summary": "Reindex legacy backing indices", - "description": "Reindex all legacy backing indices for a data stream.\nThis operation occurs in a persistent task.\nThe persistent task ID is returned immediately and the reindexing work is completed in that task.", - "operationId": "indices-migrate-reindex", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/indices.migrate_reindex.MigrateReindex" - } - } + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Technical preview", - "x-api-name" : "migrate_reindex", - "x-namespace": "indices" - } - }, - "/_data_stream/_migrate/{name}": { - "post": { - "tags": [ - "data stream" - ], - "summary": "Convert an index alias to a data stream", - "description": "Converts an index alias to a data stream.\nYou must have a matching index template that is data stream enabled.\nThe alias must meet the following criteria:\nThe alias must have a write index;\nAll indices for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos` field type;\nThe alias must not have any filters;\nThe alias must not use custom routing.\nIf successful, the request removes the alias and creates a data stream with the same name.\nThe indices for the alias become hidden backing indices for the stream.\nThe write index for the alias becomes the write index for the stream.", - "operationId": "indices-migrate-to-data-stream", - "parameters": [ { - "in": "path", - "name": "name", - "description": "Name of the index alias to convert to a data stream.", - "required": true, + "in": "query", + "name": "keep_alive", + "description": "Period for which the search and its results are stored on the cluster.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "keep_on_completion", + "description": "If true, the search and its results are stored on the cluster.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "wait_for_completion_timeout", + "description": "Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -16563,48 +18859,154 @@ "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "migrate_to_data_stream", - "x-namespace": "indices" - } - }, - "/_data_stream/_modify": { - "post": { - "tags": [ - "data stream" - ], - "summary": "Update data streams", - "description": "Performs one or more data stream modification actions in a single atomic operation.", - "operationId": "indices-modify-data-stream", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "actions": { - "description": "Actions to perform.", - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.modify_data_stream.Action" - } + "query": { + "description": "EQL query you wish to run.", + "type": "string" + }, + "case_sensitive": { + "type": "boolean" + }, + "event_category_field": { + "description": "Field containing the event classification, such as process, file, or network.", + "default": "event.category", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "tiebreaker_field": { + "description": "Field used to sort hits with the same timestamp in ascending order", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "timestamp_field": { + "description": "Field containing event timestamp.", + "default": "@timestamp", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "fetch_size": { + "description": "Maximum number of events to search at a time for sequence queries.", + "default": 1000.0, + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "filter": { + "description": "Query, written in Query DSL, used to filter the events on which the EQL query runs.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "keep_alive": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "keep_on_completion": { + "type": "boolean" + }, + "wait_for_completion_timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "allow_partial_search_results": { + "description": "Allow query execution also in case of shard failures.\nIf true, the query will keep running and will return results based on the available shards.\nFor sequences, the behavior can be further refined using allow_partial_sequence_results", + "default": true, + "type": "boolean" + }, + "allow_partial_sequence_results": { + "description": "This flag applies only to sequences and has effect only if allow_partial_search_results=true.\nIf true, the sequence query will return results based on the available shards, ignoring the others.\nIf false, the sequence query will return successfully, but will always have empty results.", + "default": false, + "type": "boolean" + }, + "size": { + "description": "For basic queries, the maximum number of matching events to return. Defaults to 10", + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "fields": { + "description": "Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + } + ] + }, + "result_position": { + "default": "tail", + "allOf": [ + { + "$ref": "#/components/schemas/eql.search.ResultPosition" + } + ] + }, + "runtime_mappings": { + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "max_samples_per_key": { + "description": "By default, the response of a sample query contains up to `10` samples, with one sample per unique set of join keys. Use the `size`\nparameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the\n`max_samples_per_key` parameter. Pipes are not supported for sample queries.", + "default": 1.0, + "type": "number" } }, "required": [ - "actions" + "query" ] + }, + "examples": { + "EqlSearchRequestExample1": { + "summary": "Basic query", + "description": "Run `GET /my-data-stream/_eql/search` to search for events that have a `process.name` of `cmd.exe` and a `process.pid` other than `2013`.\n", + "value": "{\n \"query\": \"\"\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \"\"\"\n}" + }, + "EqlSearchRequestExample2": { + "summary": "Sequence query", + "description": "Run `GET /my-data-stream/_eql/search` to search for a sequence of events. The sequence starts with an event with an `event.category` of `file`, a `file.name` of `cmd.exe`, and a `process.pid` other than `2013`. It is followed by an event with an `event.category` of `process` and a `process.executable` that contains the substring `regsvr32`. These events must also share the same `process.pid` value.\n", + "value": "{\n \"query\": \"\"\"\n sequence by process.pid\n [ file where file.name == \"cmd.exe\" and process.pid != 2013 ]\n [ process where stringContains(process.executable, \"regsvr32\") ]\n \"\"\"\n}" + } } } }, @@ -16616,30 +19018,50 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/eql._types.EqlSearchResponseBase" + }, + "examples": { + "EqlSearchResponseExample2": { + "summary": "A successful response for performing search with an EQL query.", + "description": "", + "value": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 6,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"sequences\": [\n {\n \"join_keys\": [\n 2012\n ],\n \"events\": [\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"AtOJ4UjUBAAx3XR5kcCM\",\n \"_source\": {\n \"@timestamp\": \"2099-12-06T11:04:07.000Z\",\n \"event\": {\n \"category\": \"file\",\n \"id\": \"dGCHwoeS\",\n \"sequence\": 2\n },\n \"file\": {\n \"accessed\": \"2099-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"cmd.exe\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n }\n },\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"OQmfCaduce8zoHT93o4H\",\n \"_source\": {\n \"@timestamp\": \"2099-12-07T11:07:09.000Z\",\n \"event\": {\n \"category\": \"process\",\n \"id\": \"aR3NWVOs\",\n \"sequence\": 4\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"regsvr32.exe\",\n \"command_line\": \"regsvr32.exe /s /u /i:https://...RegSvr32.sct scrobj.dll\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\"\n }\n }\n }\n ]\n }\n ]\n }\n}" + } } } } } }, - "x-state": "Added in 7.16.0", - "x-api-name" : "modify_data_stream", - "x-namespace": "indices" - } - }, - "/{index}/_open": { + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /{index}/_eql/search\n
\n ", + "
\n POST\n /{index}/_eql/search\n
\n " + ], + "x-api": "search.eql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, "post": { "tags": [ - "indices" + "eql" ], - "summary": "Open a closed index", - "description": "For data streams, the API opens any closed backing indices.\n\nA closed index is blocked for read/write operations and does not allow all operations that opened indices allow.\nIt is not possible to index documents or to search for documents in a closed index.\nThis allows closed indices to not have to maintain internal data structures for indexing or searching documents, resulting in a smaller overhead on the cluster.\n\nWhen opening or closing an index, the master is responsible for restarting the index shards to reflect the new state of the index.\nThe shards will then go through the normal recovery process.\nThe data of opened or closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.\n\nYou can open and close multiple indices.\nAn error is thrown if the request explicitly refers to a missing index.\nThis behavior can be turned off by using the `ignore_unavailable=true` parameter.\n\nBy default, you must explicitly name the indices you are opening or closing.\nTo open or close indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.\nThis setting can also be changed with the cluster update settings API.\n\nClosed indices consume a significant amount of disk-space which can cause problems in managed environments.\nClosing indices can be turned off with the cluster settings API by setting `cluster.indices.close.enable` to `false`.\n\nBecause opening or closing an index allocates its shards, the `wait_for_active_shards` setting on index creation applies to the `_open` and `_close` index actions as well.", - "operationId": "indices-open", + "summary": "Get EQL search results", + "description": "Returns search results for an Event Query Language (EQL) query.\nEQL assumes each document in a data stream or index corresponds to an event.", + "externalDocs": { + "description": "EQL", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/eql-search-api.html" + }, + "operationId": "eql-search-1", "parameters": [ { "in": "path", "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nBy default, you must explicitly name the indices you using to limit the request.\nTo limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false.\nYou can update this setting in the `elasticsearch.yml` file or using the cluster update settings API.", + "description": "Comma-separated list of index names to scope the operation", "required": true, "deprecated": false, "schema": { @@ -16650,7 +19072,7 @@ { "in": "query", "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { "type": "boolean" @@ -16659,18 +19081,18 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard failures. If false, returns an error with no partial results.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "allow_partial_sequence_results", + "description": "If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all.\nThis flag has effect only if allow_partial_search_results is true.", "deprecated": false, "schema": { "type": "boolean" @@ -16679,475 +19101,605 @@ }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "ccs_minimize_roundtrips", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" + "type": "boolean" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "shards_acknowledged": { - "type": "boolean" - } - }, - "required": [ - "acknowledged", - "shards_acknowledged" - ] - }, - "examples": { - "indicesOpenResponseExample1": { - "description": "A successful response for opening an index.", - "value": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true\n}" - } - } - } - } - } - }, - "x-api-name" : "open", - "x-namespace": "indices" - } - }, - "/_data_stream/_promote/{name}": { - "post": { - "tags": [ - "data stream" - ], - "summary": "Promote a data stream", - "description": "Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.\n\nWith CCR auto following, a data stream from a remote cluster can be replicated to the local cluster.\nThese data streams can't be rolled over in the local cluster.\nThese replicated data streams roll over only if the upstream data stream rolls over.\nIn the event that the remote cluster is no longer available, the data stream in the local cluster can be promoted to a regular data stream, which allows these data streams to be rolled over in the local cluster.\n\nNOTE: When promoting a data stream, ensure the local cluster has a data stream enabled index template that matches the data stream.\nIf this is missing, the data stream will not be able to roll over until a matching index template is created.\nThis will affect the lifecycle management of the data stream and interfere with the data stream size and retention.", - "operationId": "indices-promote-data-stream", - "parameters": [ + }, { - "in": "path", - "name": "name", - "description": "The name of the data stream", - "required": true, + "in": "query", + "name": "keep_alive", + "description": "Period for which the search and its results are stored on the cluster.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "keep_on_completion", + "description": "If true, the search and its results are stored on the cluster.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - } - }, - "x-state": "Added in 7.9.0", - "x-api-name" : "promote_data_stream", - "x-namespace": "indices" - } - }, - "/_recovery": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get index recovery information", - "description": "Get information about ongoing and completed shard recoveries for one or more indices.\nFor data streams, the API returns information for the stream's backing indices.\n\nAll recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.\n\nShard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.\nWhen a shard recovery completes, the recovered shard is available for search and indexing.\n\nRecovery automatically occurs during the following processes:\n\n* When creating an index for the first time.\n* When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path.\n* Creation of new replica shard copies from the primary.\n* Relocation of a shard copy to a different node in the same cluster.\n* A snapshot restore operation.\n* A clone, shrink, or split operation.\n\nYou can determine the cause of a shard recovery using the recovery or cat recovery APIs.\n\nThe index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster.\nIt only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist.\nThis means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.", - "operationId": "indices-recovery", - "parameters": [ - { - "$ref": "#/components/parameters/indices.recovery-active_only" }, { - "$ref": "#/components/parameters/indices.recovery-detailed" + "in": "query", + "name": "wait_for_completion_timeout", + "description": "Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.recovery-200" - } - }, - "x-api-name" : "recovery", - "x-namespace": "indices" - } - }, - "/{index}/_recovery": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get index recovery information", - "description": "Get information about ongoing and completed shard recoveries for one or more indices.\nFor data streams, the API returns information for the stream's backing indices.\n\nAll recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.\n\nShard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.\nWhen a shard recovery completes, the recovered shard is available for search and indexing.\n\nRecovery automatically occurs during the following processes:\n\n* When creating an index for the first time.\n* When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path.\n* Creation of new replica shard copies from the primary.\n* Relocation of a shard copy to a different node in the same cluster.\n* A snapshot restore operation.\n* A clone, shrink, or split operation.\n\nYou can determine the cause of a shard recovery using the recovery or cat recovery APIs.\n\nThe index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster.\nIt only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist.\nThis means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.", - "operationId": "indices-recovery-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.recovery-index" - }, - { - "$ref": "#/components/parameters/indices.recovery-active_only" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "EQL query you wish to run.", + "type": "string" + }, + "case_sensitive": { + "type": "boolean" + }, + "event_category_field": { + "description": "Field containing the event classification, such as process, file, or network.", + "default": "event.category", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "tiebreaker_field": { + "description": "Field used to sort hits with the same timestamp in ascending order", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "timestamp_field": { + "description": "Field containing event timestamp.", + "default": "@timestamp", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "fetch_size": { + "description": "Maximum number of events to search at a time for sequence queries.", + "default": 1000.0, + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "filter": { + "description": "Query, written in Query DSL, used to filter the events on which the EQL query runs.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "keep_alive": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "keep_on_completion": { + "type": "boolean" + }, + "wait_for_completion_timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "allow_partial_search_results": { + "description": "Allow query execution also in case of shard failures.\nIf true, the query will keep running and will return results based on the available shards.\nFor sequences, the behavior can be further refined using allow_partial_sequence_results", + "default": true, + "type": "boolean" + }, + "allow_partial_sequence_results": { + "description": "This flag applies only to sequences and has effect only if allow_partial_search_results=true.\nIf true, the sequence query will return results based on the available shards, ignoring the others.\nIf false, the sequence query will return successfully, but will always have empty results.", + "default": false, + "type": "boolean" + }, + "size": { + "description": "For basic queries, the maximum number of matching events to return. Defaults to 10", + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "fields": { + "description": "Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + } + ] + }, + "result_position": { + "default": "tail", + "allOf": [ + { + "$ref": "#/components/schemas/eql.search.ResultPosition" + } + ] + }, + "runtime_mappings": { + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "max_samples_per_key": { + "description": "By default, the response of a sample query contains up to `10` samples, with one sample per unique set of join keys. Use the `size`\nparameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the\n`max_samples_per_key` parameter. Pipes are not supported for sample queries.", + "default": 1.0, + "type": "number" + } + }, + "required": [ + "query" + ] + }, + "examples": { + "EqlSearchRequestExample1": { + "summary": "Basic query", + "description": "Run `GET /my-data-stream/_eql/search` to search for events that have a `process.name` of `cmd.exe` and a `process.pid` other than `2013`.\n", + "value": "{\n \"query\": \"\"\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \"\"\"\n}" + }, + "EqlSearchRequestExample2": { + "summary": "Sequence query", + "description": "Run `GET /my-data-stream/_eql/search` to search for a sequence of events. The sequence starts with an event with an `event.category` of `file`, a `file.name` of `cmd.exe`, and a `process.pid` other than `2013`. It is followed by an event with an `event.category` of `process` and a `process.executable` that contains the substring `regsvr32`. These events must also share the same `process.pid` value.\n", + "value": "{\n \"query\": \"\"\"\n sequence by process.pid\n [ file where file.name == \"cmd.exe\" and process.pid != 2013 ]\n [ process where stringContains(process.executable, \"regsvr32\") ]\n \"\"\"\n}" + } + } + } }, - { - "$ref": "#/components/parameters/indices.recovery-detailed" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.recovery-200" - } + "required": true }, - "x-api-name" : "recovery", - "x-namespace": "indices" - } - }, - "/_refresh": { - "get": { - "tags": [ - "indices" - ], - "summary": "Refresh an index", - "description": "A refresh makes recent operations performed on one or more indices available for search.\nFor data streams, the API runs the refresh operation on the stream’s backing indices.\n\nBy default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.\nYou can change this default interval with the `index.refresh_interval` setting.\n\nRefresh requests are synchronous and do not return a response until the refresh operation completes.\n\nRefreshes are resource-intensive.\nTo ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.\n\nIf your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.\nThis option ensures the indexing operation waits for a periodic refresh before running the search.", - "operationId": "indices-refresh-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.refresh-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.refresh-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.refresh-ignore_unavailable" - } - ], "responses": { "200": { - "$ref": "#/components/responses/indices.refresh-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/eql._types.EqlSearchResponseBase" + }, + "examples": { + "EqlSearchResponseExample2": { + "summary": "A successful response for performing search with an EQL query.", + "description": "", + "value": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 6,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"sequences\": [\n {\n \"join_keys\": [\n 2012\n ],\n \"events\": [\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"AtOJ4UjUBAAx3XR5kcCM\",\n \"_source\": {\n \"@timestamp\": \"2099-12-06T11:04:07.000Z\",\n \"event\": {\n \"category\": \"file\",\n \"id\": \"dGCHwoeS\",\n \"sequence\": 2\n },\n \"file\": {\n \"accessed\": \"2099-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"cmd.exe\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n }\n },\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"OQmfCaduce8zoHT93o4H\",\n \"_source\": {\n \"@timestamp\": \"2099-12-07T11:07:09.000Z\",\n \"event\": {\n \"category\": \"process\",\n \"id\": \"aR3NWVOs\",\n \"sequence\": 4\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"regsvr32.exe\",\n \"command_line\": \"regsvr32.exe /s /u /i:https://...RegSvr32.sct scrobj.dll\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\"\n }\n }\n }\n ]\n }\n ]\n }\n}" + } + } + } + } } }, - "x-api-name" : "refresh", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /{index}/_eql/search\n
\n ", + "
\n POST\n /{index}/_eql/search\n
\n " ], - "summary": "Refresh an index", - "description": "A refresh makes recent operations performed on one or more indices available for search.\nFor data streams, the API runs the refresh operation on the stream’s backing indices.\n\nBy default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.\nYou can change this default interval with the `index.refresh_interval` setting.\n\nRefresh requests are synchronous and do not return a response until the refresh operation completes.\n\nRefreshes are resource-intensive.\nTo ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.\n\nIf your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.\nThis option ensures the indexing operation waits for a periodic refresh before running the search.", - "operationId": "indices-refresh", - "parameters": [ - { - "$ref": "#/components/parameters/indices.refresh-allow_no_indices" - }, + "x-api": "search.eql", + "x-category": "common", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.refresh-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.refresh-ignore_unavailable" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.refresh-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "refresh", - "x-namespace": "indices" + ] } }, - "/{index}/_refresh": { - "get": { + "/_query/async": { + "post": { "tags": [ - "indices" + "esql" ], - "summary": "Refresh an index", - "description": "A refresh makes recent operations performed on one or more indices available for search.\nFor data streams, the API runs the refresh operation on the stream’s backing indices.\n\nBy default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.\nYou can change this default interval with the `index.refresh_interval` setting.\n\nRefresh requests are synchronous and do not return a response until the refresh operation completes.\n\nRefreshes are resource-intensive.\nTo ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.\n\nIf your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.\nThis option ensures the indexing operation waits for a periodic refresh before running the search.", - "operationId": "indices-refresh-3", + "summary": "Run an async ES|QL query", + "description": "Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available.\n\nThe API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.", + "externalDocs": { + "description": "ES|QL reference", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-api.html" + }, + "operationId": "esql-async-query", "parameters": [ { - "$ref": "#/components/parameters/indices.refresh-index" + "in": "query", + "name": "allow_partial_results", + "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.refresh-allow_no_indices" + "in": "query", + "name": "delimiter", + "description": "The character to use between values within a CSV row.\nIt is valid only for the CSV format.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.refresh-expand_wildcards" + "in": "query", + "name": "drop_null_columns", + "description": "Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.\nIf `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.refresh-ignore_unavailable" + "in": "query", + "name": "format", + "description": "A short version of the Accept header, e.g. json, yaml.\n\n`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.\n\nFor async requests, nothing will be returned if the async query doesn't finish within the timeout.\nThe query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/esql._types.EsqlFormat" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "columnar": { + "description": "By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.", + "type": "boolean" + }, + "filter": { + "description": "Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "time_zone": { + "description": "Sets the default timezone of the query.", + "x-state": "Technical preview; Added in 9.4.0", + "type": "string" + }, + "locale": { + "description": "Returns results (especially dates) formatted per the conventions of the locale.", + "type": "string" + }, + "params": { + "description": "To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.FieldValue" + } + }, + "profile": { + "description": "If provided and `true` the response will include an extra `profile` object\nwith information on how the query was executed. This information is for human debugging\nand its format can change at any time but it can give some insight into the performance\nof each part of the query.", + "type": "boolean" + }, + "query": { + "description": "The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.", + "type": "string" + }, + "tables": { + "description": "Tables to use with the LOOKUP operation. The top level key is the table\nname and the next level key is the column name.", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql._types.TableValuesContainer" + } + } + }, + "include_ccs_metadata": { + "description": "When set to `true` and performing a cross-cluster/cross-project query, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.", + "default": false, + "type": "boolean" + }, + "include_execution_metadata": { + "description": "When set to `true`, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.\nThis is similar to `include_ccs_metadata`, but it also returns metadata when the query is not CCS/CPS", + "default": false, + "type": "boolean" + }, + "wait_for_completion_timeout": { + "description": "The period to wait for the request to finish.\nBy default, the request waits for 1 second for the query results.\nIf the query completes during this period, results are returned\nOtherwise, a query ID is returned that can later be used to retrieve the results.", + "default": "1s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "keep_alive": { + "description": "The period for which the query and its results are stored in the cluster.\nThe default period is five days.\nWhen this period expires, the query and its results are deleted, even if the query is still ongoing.\nIf the `keep_on_completion` parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the `wait_for_completion_timeout` parameter, regardless of this value.", + "default": "5d", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "keep_on_completion": { + "description": "Indicates whether the query and its results are stored in the cluster.\nIf false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter.", + "default": false, + "type": "boolean" + } + }, + "required": [ + "query" + ] + }, + "examples": { + "AsyncQueryRequestExample1": { + "value": "{\n \"query\": \"\"\"\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \"\"\",\n \"wait_for_completion_timeout\": \"2s\",\n \"include_ccs_metadata\": true\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/indices.refresh-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/esql._types.AsyncEsqlResult" + } + } + } } }, - "x-api-name" : "refresh", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n POST\n /_query/async\n
\n " ], - "summary": "Refresh an index", - "description": "A refresh makes recent operations performed on one or more indices available for search.\nFor data streams, the API runs the refresh operation on the stream’s backing indices.\n\nBy default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.\nYou can change this default interval with the `index.refresh_interval` setting.\n\nRefresh requests are synchronous and do not return a response until the refresh operation completes.\n\nRefreshes are resource-intensive.\nTo ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.\n\nIf your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.\nThis option ensures the indexing operation waits for a periodic refresh before running the search.", - "operationId": "indices-refresh-2", - "parameters": [ - { - "$ref": "#/components/parameters/indices.refresh-index" - }, - { - "$ref": "#/components/parameters/indices.refresh-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.refresh-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.refresh-ignore_unavailable" - } + "x-req-auth": [ + "Index privileges: `read`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.refresh-200" + "x-api": "async_query.esql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "refresh", - "x-namespace": "indices" + ] } }, - "/{index}/_reload_search_analyzers": { + "/_query/async/{id}": { "get": { "tags": [ - "indices" + "esql" ], - "summary": "Reload search analyzers", - "description": "Reload an index's search analyzers and their resources.\nFor data streams, the API reloads search analyzers and resources for the stream's backing indices.\n\nIMPORTANT: After reloading the search analyzers you should clear the request cache to make sure it doesn't contain responses derived from the previous versions of the analyzer.\n\nYou can use the reload search analyzers API to pick up changes to synonym files used in the `synonym_graph` or `synonym` token filter of a search analyzer.\nTo be eligible, the token filter must have an `updateable` flag of `true` and only be used in search analyzers.\n\nNOTE: This API does not perform a reload for each shard of an index.\nInstead, it performs a reload for each node containing index shards.\nAs a result, the total shard count returned by the API can differ from the number of index shards.\nBecause reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API.\nThis ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.", + "summary": "Get async ES|QL query results", + "description": "Get the current status and available results or stored results for an ES|QL asynchronous query.\nIf the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.", "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/search-analyzer" + "description": "ES|QL reference", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-get-api.html" }, - "operationId": "indices-reload-search-analyzers", + "operationId": "esql-async-query-get", "parameters": [ { - "$ref": "#/components/parameters/indices.reload_search_analyzers-index" + "in": "path", + "name": "id", + "description": "The unique identifier of the query.\nA query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.\nA query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.reload_search_analyzers-allow_no_indices" + "in": "query", + "name": "drop_null_columns", + "description": "Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.\nIf `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.reload_search_analyzers-expand_wildcards" + "in": "query", + "name": "format", + "description": "A short version of the Accept header, for example `json` or `yaml`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/esql._types.EsqlFormat" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.reload_search_analyzers-ignore_unavailable" + "in": "query", + "name": "keep_alive", + "description": "The period for which the query and its results are stored in the cluster.\nWhen this period expires, the query and its results are deleted, even if the query is still ongoing.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.reload_search_analyzers-resource" + "in": "query", + "name": "wait_for_completion_timeout", + "description": "The period to wait for the request to finish.\nBy default, the request waits for complete query results.\nIf the request completes during the period specified in this parameter, complete query results are returned.\nOtherwise, the response returns an `is_running` value of `true` and no results.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.reload_search_analyzers-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/esql._types.AsyncEsqlResult" + } + } + } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "reload_search_analyzers", - "x-namespace": "indices" + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n GET\n /_query/async/{id}\n
\n " + ], + "x-api": "async_query_get.esql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "post": { + "delete": { "tags": [ - "indices" + "esql" ], - "summary": "Reload search analyzers", - "description": "Reload an index's search analyzers and their resources.\nFor data streams, the API reloads search analyzers and resources for the stream's backing indices.\n\nIMPORTANT: After reloading the search analyzers you should clear the request cache to make sure it doesn't contain responses derived from the previous versions of the analyzer.\n\nYou can use the reload search analyzers API to pick up changes to synonym files used in the `synonym_graph` or `synonym` token filter of a search analyzer.\nTo be eligible, the token filter must have an `updateable` flag of `true` and only be used in search analyzers.\n\nNOTE: This API does not perform a reload for each shard of an index.\nInstead, it performs a reload for each node containing index shards.\nAs a result, the total shard count returned by the API can differ from the number of index shards.\nBecause reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API.\nThis ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.", + "summary": "Delete an async ES|QL query", + "description": "If the query is still running, it is cancelled.\nOtherwise, the stored results are deleted.\n\nIf the Elasticsearch security features are enabled, only the following users can use this API to delete a query:\n\n* The authenticated user that submitted the original query request\n* Users with the `cancel_task` cluster privilege", "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/search-analyzer" + "description": "ES|QL reference", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-delete-api.html" }, - "operationId": "indices-reload-search-analyzers-1", + "operationId": "esql-async-query-delete", "parameters": [ { - "$ref": "#/components/parameters/indices.reload_search_analyzers-index" - }, - { - "$ref": "#/components/parameters/indices.reload_search_analyzers-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.reload_search_analyzers-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.reload_search_analyzers-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.reload_search_analyzers-resource" + "in": "path", + "name": "id", + "description": "The unique identifier of the query.\nA query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.\nA query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.reload_search_analyzers-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "reload_search_analyzers", - "x-namespace": "indices" - } - }, - "/_resolve/cluster": { - "get": { - "tags": [ - "indices" + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n DELETE\n /_query/async/{id}\n
\n " ], - "summary": "Resolve the cluster", - "description": "Resolve the specified index expressions to return information about each cluster, including the local \"querying\" cluster, if included.\nIf no index expression is provided, the API will return information about all the remote clusters that are configured on the querying cluster.\n\nThis endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search.\n\nYou use the same index expression with this endpoint as you would for cross-cluster search.\nIndex and cluster exclusions are also supported with this endpoint.\n\nFor each cluster in the index expression, information is returned about:\n\n* Whether the querying (\"local\") cluster is currently connected to each remote cluster specified in the index expression. Note that this endpoint actively attempts to contact the remote clusters, unlike the `remote/info` endpoint.\n* Whether each remote cluster is configured with `skip_unavailable` as `true` or `false`.\n* Whether there are any indices, aliases, or data streams on that cluster that match the index expression.\n* Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index).\n* Cluster version information, including the Elasticsearch server version.\n\nFor example, `GET /_resolve/cluster/my-index-*,cluster*:my-index-*` returns information about the local cluster and all remotely configured clusters that start with the alias `cluster*`.\nEach cluster returns information about whether it has any indices, aliases or data streams that match `my-index-*`.\n\n## Note on backwards compatibility\nThe ability to query without an index expression was added in version 8.18, so when\nquerying remote clusters older than that, the local cluster will send the index\nexpression `dummy*` to those remote clusters. Thus, if an errors occur, you may see a reference\nto that index expression even though you didn't request it. If it causes a problem, you can\ninstead include an index expression like `*:*` to bypass the issue.\n\n## Advantages of using this endpoint before a cross-cluster search\n\nYou may want to exclude a cluster or index from a search when:\n\n* A remote cluster is not currently connected and is configured with `skip_unavailable=false`. Running a cross-cluster search under those conditions will cause the entire search to fail.\n* A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is `logs*,remote1:logs*` and the remote1 cluster has no indices, aliases or data streams that match `logs*`. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search.\n* The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the \"error\" field in the `_resolve/cluster` response will be present. (This is also where security/permission errors will be shown.)\n* A remote cluster is an older version that does not support the feature you want to use in your search.\n\n## Test availability of remote clusters\n\nThe `remote/info` endpoint is commonly used to test whether the \"local\" cluster (the cluster being queried) is connected to its remote clusters, but it does not necessarily reflect whether the remote cluster is available or not.\nThe remote cluster may be available, while the local cluster is not currently connected to it.\n\nYou can use the `_resolve/cluster` API to attempt to reconnect to remote clusters.\nFor example with `GET _resolve/cluster` or `GET _resolve/cluster/*:*`.\nThe `connected` field in the response will indicate whether it was successful.\nIf a connection was (re-)established, this will also cause the `remote/info` endpoint to now indicate a connected status.", - "operationId": "indices-resolve-cluster", - "parameters": [ + "x-api": "async_query_delete.esql", + "x-category": "common", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.resolve_cluster-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-ignore_throttled" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-timeout" + "content": "Elasticsearch", + "name": "product_name" } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.resolve_cluster-200" - } - }, - "x-state": "Added in 8.13.0", - "x-api-name" : "resolve_cluster", - "x-namespace": "indices" + ] } }, - "/_resolve/cluster/{name}": { - "get": { + "/_query/async/{id}/stop": { + "post": { "tags": [ - "indices" - ], - "summary": "Resolve the cluster", - "description": "Resolve the specified index expressions to return information about each cluster, including the local \"querying\" cluster, if included.\nIf no index expression is provided, the API will return information about all the remote clusters that are configured on the querying cluster.\n\nThis endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search.\n\nYou use the same index expression with this endpoint as you would for cross-cluster search.\nIndex and cluster exclusions are also supported with this endpoint.\n\nFor each cluster in the index expression, information is returned about:\n\n* Whether the querying (\"local\") cluster is currently connected to each remote cluster specified in the index expression. Note that this endpoint actively attempts to contact the remote clusters, unlike the `remote/info` endpoint.\n* Whether each remote cluster is configured with `skip_unavailable` as `true` or `false`.\n* Whether there are any indices, aliases, or data streams on that cluster that match the index expression.\n* Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index).\n* Cluster version information, including the Elasticsearch server version.\n\nFor example, `GET /_resolve/cluster/my-index-*,cluster*:my-index-*` returns information about the local cluster and all remotely configured clusters that start with the alias `cluster*`.\nEach cluster returns information about whether it has any indices, aliases or data streams that match `my-index-*`.\n\n## Note on backwards compatibility\nThe ability to query without an index expression was added in version 8.18, so when\nquerying remote clusters older than that, the local cluster will send the index\nexpression `dummy*` to those remote clusters. Thus, if an errors occur, you may see a reference\nto that index expression even though you didn't request it. If it causes a problem, you can\ninstead include an index expression like `*:*` to bypass the issue.\n\n## Advantages of using this endpoint before a cross-cluster search\n\nYou may want to exclude a cluster or index from a search when:\n\n* A remote cluster is not currently connected and is configured with `skip_unavailable=false`. Running a cross-cluster search under those conditions will cause the entire search to fail.\n* A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is `logs*,remote1:logs*` and the remote1 cluster has no indices, aliases or data streams that match `logs*`. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search.\n* The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the \"error\" field in the `_resolve/cluster` response will be present. (This is also where security/permission errors will be shown.)\n* A remote cluster is an older version that does not support the feature you want to use in your search.\n\n## Test availability of remote clusters\n\nThe `remote/info` endpoint is commonly used to test whether the \"local\" cluster (the cluster being queried) is connected to its remote clusters, but it does not necessarily reflect whether the remote cluster is available or not.\nThe remote cluster may be available, while the local cluster is not currently connected to it.\n\nYou can use the `_resolve/cluster` API to attempt to reconnect to remote clusters.\nFor example with `GET _resolve/cluster` or `GET _resolve/cluster/*:*`.\nThe `connected` field in the response will indicate whether it was successful.\nIf a connection was (re-)established, this will also cause the `remote/info` endpoint to now indicate a connected status.", - "operationId": "indices-resolve-cluster-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.resolve_cluster-name" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-ignore_throttled" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.resolve_cluster-timeout" - } + "esql" ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.resolve_cluster-200" - } + "summary": "Stop async ES|QL query", + "description": "This API interrupts the query execution and returns the results so far.\nIf the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.", + "externalDocs": { + "description": "ES|QL reference", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql" }, - "x-state": "Added in 8.13.0", - "x-api-name" : "resolve_cluster", - "x-namespace": "indices" - } - }, - "/_resolve/index/{name}": { - "get": { - "tags": [ - "indices" - ], - "summary": "Resolve indices", - "description": "Resolve the names and/or index patterns for indices, aliases, and data streams.\nMultiple patterns and remote clusters are supported.", - "operationId": "indices-resolve-index", + "operationId": "esql-async-query-stop", "parameters": [ { "in": "path", - "name": "name", - "description": "Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.\nResources on remote clusters can be specified using the ``:`` syntax.", + "name": "id", + "description": "The unique identifier of the query.\nA query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.\nA query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "name": "drop_null_columns", + "description": "Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.\nIf `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.", "deprecated": false, "schema": { "type": "boolean" @@ -17161,388 +19713,447 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexItem" - } - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexAliasItem" - } - }, - "data_streams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexDataStreamsItem" - } - } - }, - "required": [ - "indices", - "aliases", - "data_streams" - ] - }, - "examples": { - "ResolveIndexResponseExample1": { - "description": "A successful response from `GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all`.", - "value": "{\n \"indices\": [\n {\n \"name\": \"foo_closed\",\n \"attributes\": [\n \"closed\"\n ]\n },\n {\n \"name\": \"freeze-index\",\n \"aliases\": [\n \"f-alias\"\n ],\n \"attributes\": [\n \"open\"\n ]\n },\n {\n \"name\": \"remoteCluster1:bar-01\",\n \"attributes\": [\n \"open\"\n ]\n }\n ],\n \"aliases\": [\n {\n \"name\": \"f-alias\",\n \"indices\": [\n \"freeze-index\",\n \"my-index-000001\"\n ]\n }\n ],\n \"data_streams\": [\n {\n \"name\": \"foo\",\n \"backing_indices\": [\n \".ds-foo-2099.03.07-000001\"\n ],\n \"timestamp_field\": \"@timestamp\"\n }\n ]\n}" - } + "$ref": "#/components/schemas/esql._types.EsqlResult" } } } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "resolve_index", - "x-namespace": "indices" - } - }, - "/{alias}/_rollover": { - "post": { - "tags": [ - "indices" + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n POST\n /_query/async/{id}/stop\n
\n " ], - "summary": "Roll over to a new index", - "description": "TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.\n\nThe rollover API creates a new index for a data stream or index alias.\nThe API behavior depends on the rollover target.\n\n**Roll over a data stream**\n\nIf you roll over a data stream, the API creates a new write index for the stream.\nThe stream's previous write index becomes a regular backing index.\nA rollover also increments the data stream's generation.\n\n**Roll over an index alias with a write index**\n\nTIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.\nData streams replace this functionality, require less maintenance, and automatically integrate with data tiers.\n\nIf an index alias points to multiple indices, one of the indices must be a write index.\nThe rollover API creates a new write index for the alias with `is_write_index` set to `true`.\nThe API also `sets is_write_index` to `false` for the previous write index.\n\n**Roll over an index alias with one index**\n\nIf you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.\n\nNOTE: A rollover creates a new index and is subject to the `wait_for_active_shards` setting.\n\n**Increment index names for an alias**\n\nWhen you roll over an index alias, you can specify a name for the new index.\nIf you don't specify a name and the current index ends with `-` and a number, such as `my-index-000001` or `my-index-3`, the new index name increments that number.\nFor example, if you roll over an alias with a current index of `my-index-000001`, the rollover creates a new index named `my-index-000002`.\nThis number is always six characters and zero-padded, regardless of the previous index's name.\n\nIf you use an index alias for time series data, you can use date math in the index name to track the rollover date.\nFor example, you can create an alias that points to an index named ``.\nIf you create the index on May 6, 2099, the index's name is `my-index-2099.05.06-000001`.\nIf you roll over the alias on May 7, 2099, the new index's name is `my-index-2099.05.07-000002`.", - "operationId": "indices-rollover", - "parameters": [ - { - "$ref": "#/components/parameters/indices.rollover-alias" - }, - { - "$ref": "#/components/parameters/indices.rollover-dry_run" - }, - { - "$ref": "#/components/parameters/indices.rollover-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.rollover-timeout" - }, - { - "$ref": "#/components/parameters/indices.rollover-wait_for_active_shards" - }, + "x-api": "async_query_stop.esql", + "x-category": "common", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.rollover-lazy" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.rollover" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.rollover-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "rollover", - "x-namespace": "indices" + ] } }, - "/{alias}/_rollover/{new_index}": { - "post": { + "/_query/queries/{id}": { + "get": { "tags": [ - "indices" + "esql" ], - "summary": "Roll over to a new index", - "description": "TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.\n\nThe rollover API creates a new index for a data stream or index alias.\nThe API behavior depends on the rollover target.\n\n**Roll over a data stream**\n\nIf you roll over a data stream, the API creates a new write index for the stream.\nThe stream's previous write index becomes a regular backing index.\nA rollover also increments the data stream's generation.\n\n**Roll over an index alias with a write index**\n\nTIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.\nData streams replace this functionality, require less maintenance, and automatically integrate with data tiers.\n\nIf an index alias points to multiple indices, one of the indices must be a write index.\nThe rollover API creates a new write index for the alias with `is_write_index` set to `true`.\nThe API also `sets is_write_index` to `false` for the previous write index.\n\n**Roll over an index alias with one index**\n\nIf you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.\n\nNOTE: A rollover creates a new index and is subject to the `wait_for_active_shards` setting.\n\n**Increment index names for an alias**\n\nWhen you roll over an index alias, you can specify a name for the new index.\nIf you don't specify a name and the current index ends with `-` and a number, such as `my-index-000001` or `my-index-3`, the new index name increments that number.\nFor example, if you roll over an alias with a current index of `my-index-000001`, the rollover creates a new index named `my-index-000002`.\nThis number is always six characters and zero-padded, regardless of the previous index's name.\n\nIf you use an index alias for time series data, you can use date math in the index name to track the rollover date.\nFor example, you can create an alias that points to an index named ``.\nIf you create the index on May 6, 2099, the index's name is `my-index-2099.05.06-000001`.\nIf you roll over the alias on May 7, 2099, the new index's name is `my-index-2099.05.07-000002`.", - "operationId": "indices-rollover-1", + "summary": "Get a specific running ES|QL query information", + "description": "Returns an object extended information about a running ES|QL query.", + "operationId": "esql-get-query", "parameters": [ { - "$ref": "#/components/parameters/indices.rollover-alias" - }, - { - "$ref": "#/components/parameters/indices.rollover-new_index" - }, - { - "$ref": "#/components/parameters/indices.rollover-dry_run" - }, - { - "$ref": "#/components/parameters/indices.rollover-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.rollover-timeout" - }, - { - "$ref": "#/components/parameters/indices.rollover-wait_for_active_shards" - }, - { - "$ref": "#/components/parameters/indices.rollover-lazy" + "in": "path", + "name": "id", + "description": "The query ID", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.rollover" - }, "responses": { "200": { - "$ref": "#/components/responses/indices.rollover-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + }, + "start_time_millis": { + "type": "number" + }, + "running_time_nanos": { + "type": "number" + }, + "query": { + "type": "string" + }, + "coordinating_node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + }, + "data_nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.NodeId" + } + } + }, + "required": [ + "id", + "node", + "start_time_millis", + "running_time_nanos", + "query", + "coordinating_node", + "data_nodes" + ] + } + } + } } }, - "x-state": "Added in 5.0.0", - "x-api-name" : "rollover", - "x-namespace": "indices" - } - }, - "/_segments": { - "get": { - "tags": [ - "indices" + "x-state": "Technical preview; Added in 9.1.0", + "x-variations": [ + "
\n GET\n /_query/queries/{id}\n
\n " ], - "summary": "Get index segments", - "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the stream's backing indices.", - "operationId": "indices-segments", - "parameters": [ - { - "$ref": "#/components/parameters/indices.segments-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.segments-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.segments-ignore_unavailable" - } + "x-req-auth": [ + "Cluster privileges: `monitor_esql`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.segments-200" + "x-api": "get_query.esql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "segments", - "x-namespace": "indices" + ] } }, - "/{index}/_segments": { + "/_query/queries": { "get": { "tags": [ - "indices" - ], - "summary": "Get index segments", - "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the stream's backing indices.", - "operationId": "indices-segments-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.segments-index" - }, - { - "$ref": "#/components/parameters/indices.segments-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.segments-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.segments-ignore_unavailable" - } + "esql" ], + "summary": "Get running ES|QL queries information", + "description": "Returns an object containing IDs and other information about the running ES|QL queries.", + "operationId": "esql-list-queries", "responses": { "200": { - "$ref": "#/components/responses/indices.segments-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql.list_queries.Body" + } + } + }, + "required": [ + "queries" + ] + } + } + } } }, - "x-api-name" : "segments", - "x-namespace": "indices" - } - }, - "/_shard_stores": { - "get": { - "tags": [ - "indices" + "x-state": "Technical preview; Added in 9.1.0", + "x-variations": [ + "
\n GET\n /_query/queries\n
\n " ], - "summary": "Get index shard stores", - "description": "Get store information about replica shards in one or more indices.\nFor data streams, the API retrieves store information for the stream's backing indices.\n\nThe index shard stores API returns the following information:\n\n* The node on which each replica shard exists.\n* The allocation ID for each replica shard.\n* A unique ID for each replica shard.\n* Any errors encountered while opening the shard index or from an earlier failure.\n\nBy default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.", - "operationId": "indices-shard-stores", - "parameters": [ - { - "$ref": "#/components/parameters/indices.shard_stores-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.shard_stores-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.shard_stores-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.shard_stores-status" - } + "x-req-auth": [ + "Cluster privileges: `monitor_esql`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.shard_stores-200" + "x-api": "list_queries.esql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "shard_stores", - "x-namespace": "indices" + ] } }, - "/{index}/_shard_stores": { - "get": { + "/_query": { + "post": { "tags": [ - "indices" + "esql" ], - "summary": "Get index shard stores", - "description": "Get store information about replica shards in one or more indices.\nFor data streams, the API retrieves store information for the stream's backing indices.\n\nThe index shard stores API returns the following information:\n\n* The node on which each replica shard exists.\n* The allocation ID for each replica shard.\n* A unique ID for each replica shard.\n* Any errors encountered while opening the shard index or from an earlier failure.\n\nBy default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.", - "operationId": "indices-shard-stores-1", + "summary": "Run an ES|QL query", + "description": "Get search results for an ES|QL (Elasticsearch query language) query.", + "externalDocs": { + "description": "ES|QL reference", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql" + }, + "operationId": "esql-query", "parameters": [ { - "$ref": "#/components/parameters/indices.shard_stores-index" - }, - { - "$ref": "#/components/parameters/indices.shard_stores-allow_no_indices" + "in": "query", + "name": "format", + "description": "A short version of the Accept header, e.g. json, yaml.\n\n`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/esql._types.EsqlFormat" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.shard_stores-expand_wildcards" + "in": "query", + "name": "delimiter", + "description": "The character to use between values within a CSV row. Only valid for the CSV format.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.shard_stores-ignore_unavailable" + "in": "query", + "name": "drop_null_columns", + "description": "Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results?\nDefaults to `false`. If `true` then the response will include an extra section under the name `all_columns` which has the name of all columns.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.shard_stores-status" + "in": "query", + "name": "allow_partial_results", + "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "columnar": { + "description": "By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.", + "type": "boolean" + }, + "filter": { + "description": "Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "time_zone": { + "description": "Sets the default timezone of the query.", + "x-state": "Technical preview; Added in 9.4.0", + "type": "string" + }, + "locale": { + "description": "Returns results (especially dates) formatted per the conventions of the locale.", + "type": "string" + }, + "params": { + "description": "To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/esql._types.ESQLParams" + } + ] + }, + "profile": { + "description": "If provided and `true` the response will include an extra `profile` object\nwith information on how the query was executed. This information is for human debugging\nand its format can change at any time but it can give some insight into the performance\nof each part of the query.", + "type": "boolean" + }, + "query": { + "description": "The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.", + "type": "string" + }, + "tables": { + "description": "Tables to use with the LOOKUP operation. The top level key is the table\nname and the next level key is the column name.", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql._types.TableValuesContainer" + } + } + }, + "include_ccs_metadata": { + "description": "When set to `true` and performing a cross-cluster/cross-project query, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.", + "default": false, + "type": "boolean" + }, + "include_execution_metadata": { + "description": "When set to `true`, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.\nThis is similar to `include_ccs_metadata`, but it also returns metadata when the query is not CCS/CPS", + "default": false, + "type": "boolean" + } + }, + "required": [ + "query" + ] + }, + "examples": { + "QueryRequestExample1": { + "description": "Run `POST /_query` to get results for an ES|QL query.", + "value": "{\n \"query\": \"\"\"\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \"\"\",\n \"include_ccs_metadata\": true\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/indices.shard_stores-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/esql._types.EsqlResult" + } + } + } } }, - "x-api-name" : "shard_stores", - "x-namespace": "indices" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n POST\n /_query\n
\n " + ], + "x-api": "query.esql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_shrink/{target}": { - "put": { + "/{index}/_source/{id}": { + "get": { "tags": [ - "indices" + "document" ], - "summary": "Shrink an index", - "description": "Shrink an index into a new index with fewer primary shards.\n\nBefore you can shrink an index:\n\n* The index must be read-only.\n* A copy of every shard in the index must reside on the same node.\n* The index must have a green health status.\n\nTo make shard allocation easier, we recommend you also remove the index's replica shards.\nYou can later re-add replica shards as part of the shrink operation.\n\nThe requested number of primary shards in the target index must be a factor of the number of shards in the source index.\nFor example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an index with 15 primary shards can be shrunk into 5, 3 or 1.\nIf the number of shards in the index is a prime number it can only be shrunk into a single primary shard\n Before shrinking, a (primary or replica) copy of every shard in the index must be present on the same node.\n\nThe current write index on a data stream cannot be shrunk. In order to shrink the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be shrunk.\n\nA shrink operation:\n\n* Creates a new target index with the same definition as the source index, but with a smaller number of primary shards.\n* Hard-links segments from the source index into the target index. If the file system does not support hard-linking, then all segments are copied into the new index, which is a much more time consuming process. Also if using multiple data paths, shards on different data paths require a full copy of segment files if they are not on the same disk since hardlinks do not work across disks.\n* Recovers the target index as though it were a closed index which had just been re-opened. Recovers shards to the `.routing.allocation.initial_recovery._id` index setting.\n\nIMPORTANT: Indices can only be shrunk if they satisfy the following requirements:\n\n* The target index must not exist.\n* The source index must have more primary shards than the target index.\n* The number of primary shards in the target index must be a factor of the number of primary shards in the source index. The source index must have more primary shards than the target index.\n* The index must not contain more than 2,147,483,519 documents in total across all shards that will be shrunk into a single shard on the target index as this is the maximum number of docs that can fit into a single shard.\n* The node handling the shrink process must have sufficient free disk space to accommodate a second copy of the existing index.", - "operationId": "indices-shrink", + "summary": "Get a document's source", + "description": "Get the source of a document.\nFor example:\n\n```\nGET my-index-000001/_source/1\n```\n\nYou can use the source filtering parameters to control which parts of the `_source` are returned:\n\n```\nGET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities\n```", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-source-field", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-get.html" + }, + "operationId": "get-source", "parameters": [ { - "$ref": "#/components/parameters/indices.shrink-index" - }, - { - "$ref": "#/components/parameters/indices.shrink-target" - }, - { - "$ref": "#/components/parameters/indices.shrink-master_timeout" + "in": "path", + "name": "index", + "description": "The name of the index that contains the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.shrink-timeout" + "in": "path", + "name": "id", + "description": "A unique document identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.shrink-wait_for_active_shards" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.shrink" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.shrink-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "shrink", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Shrink an index", - "description": "Shrink an index into a new index with fewer primary shards.\n\nBefore you can shrink an index:\n\n* The index must be read-only.\n* A copy of every shard in the index must reside on the same node.\n* The index must have a green health status.\n\nTo make shard allocation easier, we recommend you also remove the index's replica shards.\nYou can later re-add replica shards as part of the shrink operation.\n\nThe requested number of primary shards in the target index must be a factor of the number of shards in the source index.\nFor example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an index with 15 primary shards can be shrunk into 5, 3 or 1.\nIf the number of shards in the index is a prime number it can only be shrunk into a single primary shard\n Before shrinking, a (primary or replica) copy of every shard in the index must be present on the same node.\n\nThe current write index on a data stream cannot be shrunk. In order to shrink the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be shrunk.\n\nA shrink operation:\n\n* Creates a new target index with the same definition as the source index, but with a smaller number of primary shards.\n* Hard-links segments from the source index into the target index. If the file system does not support hard-linking, then all segments are copied into the new index, which is a much more time consuming process. Also if using multiple data paths, shards on different data paths require a full copy of segment files if they are not on the same disk since hardlinks do not work across disks.\n* Recovers the target index as though it were a closed index which had just been re-opened. Recovers shards to the `.routing.allocation.initial_recovery._id` index setting.\n\nIMPORTANT: Indices can only be shrunk if they satisfy the following requirements:\n\n* The target index must not exist.\n* The source index must have more primary shards than the target index.\n* The number of primary shards in the target index must be a factor of the number of primary shards in the source index. The source index must have more primary shards than the target index.\n* The index must not contain more than 2,147,483,519 documents in total across all shards that will be shrunk into a single shard on the target index as this is the maximum number of docs that can fit into a single shard.\n* The node handling the shrink process must have sufficient free disk space to accommodate a second copy of the existing index.", - "operationId": "indices-shrink-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.shrink-index" + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, the operation is randomized between the shard replicas.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.shrink-target" + "in": "query", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.shrink-master_timeout" + "in": "query", + "name": "refresh", + "description": "If `true`, the request refreshes the relevant shards before retrieving the document.\nSetting it to `true` should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.shrink-timeout" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.shrink-wait_for_active_shards" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.shrink" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.shrink-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "shrink", - "x-namespace": "indices" - } - }, - "/_index_template/_simulate_index/{name}": { - "post": { - "tags": [ - "indices" - ], - "summary": "Simulate an index", - "description": "Get the index configuration that would be applied to the specified index from an existing index template.", - "operationId": "indices-simulate-index-template", - "parameters": [ - { - "in": "path", - "name": "name", - "description": "Name of the index to simulate", - "required": true, + "in": "query", + "name": "_source", + "description": "Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "create", - "description": "Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude in the response.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "cause", - "description": "User defined reason for dry-run creating the new template for simulation purposes", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "version", + "description": "The version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.VersionNumber" }, "style": "form" }, { "in": "query", - "name": "include_defaults", - "description": "If true, returns all relevant default configurations for the index template.", + "name": "version_type", + "description": "The version type.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.VersionType" }, "style": "form" } @@ -17553,408 +20164,326 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "overlapping": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.simulate_template.Overlapping" - } - }, - "template": { - "$ref": "#/components/schemas/indices.simulate_template.Template" - } - }, - "required": [ - "template" - ] - }, - "examples": { - "indicesSimulateIndexTemplateResponseExample1": { - "description": "A successful response from `POST /_index_template/_simulate_index/my-index-000001`.", - "value": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"2\",\n \"number_of_replicas\" : \"0\",\n \"routing\" : {\n \"allocation\" : {\n \"include\" : {\n \"_tier_preference\" : \"data_content\"\n }\n }\n }\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [\n {\n \"name\" : \"template_1\",\n \"index_patterns\" : [\n \"my-index-*\"\n ]\n }\n ]\n}" - } + "type": "object" } } } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "simulate_index_template", - "x-namespace": "indices" - } - }, - "/_index_template/_simulate": { - "post": { - "tags": [ - "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_source/{id}\n
\n " ], - "summary": "Simulate an index template", - "description": "Get the index configuration that would be applied by a particular index template.", - "operationId": "indices-simulate-template", - "parameters": [ - { - "$ref": "#/components/parameters/indices.simulate_template-create" - }, - { - "$ref": "#/components/parameters/indices.simulate_template-cause" - }, + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "get_source", + "x-category": "document management", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.simulate_template-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.simulate_template-include_defaults" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.simulate_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.simulate_template-200" - } - }, - "x-api-name" : "simulate_template", - "x-namespace": "indices" - } - }, - "/_index_template/_simulate/{name}": { - "post": { - "tags": [ - "indices" - ], - "summary": "Simulate an index template", - "description": "Get the index configuration that would be applied by a particular index template.", - "operationId": "indices-simulate-template-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.simulate_template-name" - }, - { - "$ref": "#/components/parameters/indices.simulate_template-create" - }, - { - "$ref": "#/components/parameters/indices.simulate_template-cause" - }, - { - "$ref": "#/components/parameters/indices.simulate_template-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.simulate_template-include_defaults" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.simulate_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.simulate_template-200" - } - }, - "x-api-name" : "simulate_template", - "x-namespace": "indices" - } - }, - "/{index}/_split/{target}": { - "put": { - "tags": [ - "indices" - ], - "summary": "Split an index", - "description": "Split an index into a new index with more primary shards.\n* Before you can split an index:\n\n* The index must be read-only.\n* The cluster health status must be green.\n\nYou can do make an index read-only with the following request using the add index block API:\n\n```\nPUT /my_source_index/_block/write\n```\n\nThe current write index on a data stream cannot be split.\nIn order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split.\n\nThe number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the `index.number_of_routing_shards` setting.\nThe number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing.\nFor instance, a 5 shard index with `number_of_routing_shards` set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3.\n\nA split operation:\n\n* Creates a new target index with the same definition as the source index, but with a larger number of primary shards.\n* Hard-links segments from the source index into the target index. If the file system doesn't support hard-linking, all segments are copied into the new index, which is a much more time consuming process.\n* Hashes all documents again, after low level files are created, to delete documents that belong to a different shard.\n* Recovers the target index as though it were a closed index which had just been re-opened.\n\nIMPORTANT: Indices can only be split if they satisfy the following requirements:\n\n* The target index must not exist.\n* The source index must have fewer primary shards than the target index.\n* The number of primary shards in the target index must be a multiple of the number of primary shards in the source index.\n* The node handling the split process must have sufficient free disk space to accommodate a second copy of the existing index.", - "operationId": "indices-split", - "parameters": [ - { - "$ref": "#/components/parameters/indices.split-index" - }, - { - "$ref": "#/components/parameters/indices.split-target" - }, - { - "$ref": "#/components/parameters/indices.split-master_timeout" - }, - { - "$ref": "#/components/parameters/indices.split-timeout" - }, - { - "$ref": "#/components/parameters/indices.split-wait_for_active_shards" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.split" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.split-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "split", - "x-namespace": "indices" + ] }, - "post": { + "head": { "tags": [ - "indices" + "document" ], - "summary": "Split an index", - "description": "Split an index into a new index with more primary shards.\n* Before you can split an index:\n\n* The index must be read-only.\n* The cluster health status must be green.\n\nYou can do make an index read-only with the following request using the add index block API:\n\n```\nPUT /my_source_index/_block/write\n```\n\nThe current write index on a data stream cannot be split.\nIn order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split.\n\nThe number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the `index.number_of_routing_shards` setting.\nThe number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing.\nFor instance, a 5 shard index with `number_of_routing_shards` set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3.\n\nA split operation:\n\n* Creates a new target index with the same definition as the source index, but with a larger number of primary shards.\n* Hard-links segments from the source index into the target index. If the file system doesn't support hard-linking, all segments are copied into the new index, which is a much more time consuming process.\n* Hashes all documents again, after low level files are created, to delete documents that belong to a different shard.\n* Recovers the target index as though it were a closed index which had just been re-opened.\n\nIMPORTANT: Indices can only be split if they satisfy the following requirements:\n\n* The target index must not exist.\n* The source index must have fewer primary shards than the target index.\n* The number of primary shards in the target index must be a multiple of the number of primary shards in the source index.\n* The node handling the split process must have sufficient free disk space to accommodate a second copy of the existing index.", - "operationId": "indices-split-1", + "summary": "Check for a document source", + "description": "Check whether a document source exists in an index.\nFor example:\n\n```\nHEAD my-index-000001/_source/1\n```\n\nA document's source is not available if it is disabled in the mapping.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-source-field", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-get.html" + }, + "operationId": "exists-source", "parameters": [ { - "$ref": "#/components/parameters/indices.split-index" - }, - { - "$ref": "#/components/parameters/indices.split-target" - }, - { - "$ref": "#/components/parameters/indices.split-master_timeout" + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases.\nIt supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.split-timeout" + "in": "path", + "name": "id", + "description": "A unique identifier for the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.split-wait_for_active_shards" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.split" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.split-200" - } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "split", - "x-namespace": "indices" - } - }, - "/_stats": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get index statistics", - "description": "For data streams, the API retrieves statistics for the stream's backing indices.\n\nBy default, the returned statistics are index-level with `primaries` and `total` aggregations.\n`primaries` are the values for only the primary shards.\n`total` are the accumulated values for both primary and replica shards.\n\nTo get shard-level statistics, set the `level` parameter to `shards`.\n\nNOTE: When moving to another node, the shard-level statistics for a shard are cleared.\nAlthough the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.", - "operationId": "indices-stats", - "parameters": [ - { - "$ref": "#/components/parameters/indices.stats-completion_fields" + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, the operation is randomized between the shard replicas.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-expand_wildcards" + "in": "query", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-fielddata_fields" + "in": "query", + "name": "refresh", + "description": "If `true`, the request refreshes the relevant shards before retrieving the document.\nSetting it to `true` should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-fields" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-forbid_closed_indices" + "in": "query", + "name": "_source", + "description": "Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-groups" + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude in the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-include_segment_file_sizes" + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-include_unloaded_segments" + "in": "query", + "name": "version", + "description": "The version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-level" + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/indices.stats-200" + "description": "", + "content": { + "application/json": {} + } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "stats", - "x-namespace": "indices" - } - }, - "/_stats/{metric}": { - "get": { - "tags": [ - "indices" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n HEAD\n /{index}/_source/{id}\n
\n " ], - "summary": "Get index statistics", - "description": "For data streams, the API retrieves statistics for the stream's backing indices.\n\nBy default, the returned statistics are index-level with `primaries` and `total` aggregations.\n`primaries` are the values for only the primary shards.\n`total` are the accumulated values for both primary and replica shards.\n\nTo get shard-level statistics, set the `level` parameter to `shards`.\n\nNOTE: When moving to another node, the shard-level statistics for a shard are cleared.\nAlthough the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.", - "operationId": "indices-stats-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.stats-metric" - }, - { - "$ref": "#/components/parameters/indices.stats-completion_fields" - }, - { - "$ref": "#/components/parameters/indices.stats-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.stats-fielddata_fields" - }, - { - "$ref": "#/components/parameters/indices.stats-fields" - }, - { - "$ref": "#/components/parameters/indices.stats-forbid_closed_indices" - }, - { - "$ref": "#/components/parameters/indices.stats-groups" - }, - { - "$ref": "#/components/parameters/indices.stats-include_segment_file_sizes" - }, - { - "$ref": "#/components/parameters/indices.stats-include_unloaded_segments" - }, - { - "$ref": "#/components/parameters/indices.stats-level" - } + "x-req-auth": [ + "Index privileges: `read`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.stats-200" + "x-api": "exists_source", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "stats", - "x-namespace": "indices" + ] } }, - "/{index}/_stats": { + "/{index}/_explain/{id}": { "get": { "tags": [ - "indices" + "search" ], - "summary": "Get index statistics", - "description": "For data streams, the API retrieves statistics for the stream's backing indices.\n\nBy default, the returned statistics are index-level with `primaries` and `total` aggregations.\n`primaries` are the values for only the primary shards.\n`total` are the accumulated values for both primary and replica shards.\n\nTo get shard-level statistics, set the `level` parameter to `shards`.\n\nNOTE: When moving to another node, the shard-level statistics for a shard are cleared.\nAlthough the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.", - "operationId": "indices-stats-2", + "summary": "Explain a document match result", + "description": "Get information about why a specific document matches, or doesn't match, a query.\nIt computes a score explanation for a query and a specific document.", + "operationId": "explain", "parameters": [ { - "$ref": "#/components/parameters/indices.stats-index" - }, - { - "$ref": "#/components/parameters/indices.stats-completion_fields" - }, - { - "$ref": "#/components/parameters/indices.stats-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.stats-fielddata_fields" - }, - { - "$ref": "#/components/parameters/indices.stats-fields" - }, - { - "$ref": "#/components/parameters/indices.stats-forbid_closed_indices" - }, - { - "$ref": "#/components/parameters/indices.stats-groups" - }, - { - "$ref": "#/components/parameters/indices.stats-include_segment_file_sizes" + "in": "path", + "name": "index", + "description": "Index names that are used to limit the request.\nOnly a single index name can be provided to this parameter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.stats-include_unloaded_segments" + "in": "path", + "name": "id", + "description": "The document identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.stats-level" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.stats-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "stats", - "x-namespace": "indices" - } - }, - "/{index}/_stats/{metric}": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get index statistics", - "description": "For data streams, the API retrieves statistics for the stream's backing indices.\n\nBy default, the returned statistics are index-level with `primaries` and `total` aggregations.\n`primaries` are the values for only the primary shards.\n`total` are the accumulated values for both primary and replica shards.\n\nTo get shard-level statistics, set the `level` parameter to `shards`.\n\nNOTE: When moving to another node, the shard-level statistics for a shard are cleared.\nAlthough the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.", - "operationId": "indices-stats-3", - "parameters": [ - { - "$ref": "#/components/parameters/indices.stats-index" + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-metric" + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-completion_fields" + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-expand_wildcards" + "in": "query", + "name": "df", + "description": "The field to use as default where no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-fielddata_fields" + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-fields" + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-forbid_closed_indices" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-groups" + "in": "query", + "name": "_source", + "description": "`True` or `false` to return the `_source` field or not or a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-include_segment_file_sizes" + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.stats-include_unloaded_segments" + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - { - "$ref": "#/components/parameters/indices.stats-level" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/indices.stats-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "stats", - "x-namespace": "indices" - } - }, - "/_aliases": { - "post": { - "tags": [ - "indices" - ], - "summary": "Create or update an alias", - "description": "Adds a data stream or index to an alias.", - "operationId": "indices-update-aliases", - "parameters": [ { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "q", + "description": "The query in the Lucene query string syntax.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" } @@ -17965,18 +20494,24 @@ "schema": { "type": "object", "properties": { - "actions": { - "description": "Actions to perform.", - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.update_aliases.Action" - } + "query": { + "description": "Defines the search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] } } + }, + "examples": { + "ExplainRequestExample1": { + "description": "Run `GET /my-index-000001/_explain/0` with the request body. Alternatively, run `GET /my-index-000001/_explain/0?q=message:elasticsearch`\n", + "value": "{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}" + } } } - }, - "required": true + } }, "responses": { "200": { @@ -17984,279 +20519,404 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "matched": { + "type": "boolean" + }, + "explanation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.explain.ExplanationDetail" + } + ] + }, + "get": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.InlineGet" + } + ] + } + }, + "required": [ + "_index", + "_id", + "matched" + ] + }, + "examples": { + "ExplainResponseExample1": { + "description": "A successful response from `GET /my-index-000001/_explain/0`.", + "value": "{\n \"_index\":\"my-index-000001\",\n \"_id\":\"0\",\n \"matched\":true,\n \"explanation\":{\n \"value\":1.6943598,\n \"description\":\"weight(message:elasticsearch in 0) [PerFieldSimilarity], result of:\",\n \"details\":[\n {\n \"value\":1.6943598,\n \"description\":\"score(freq=1.0), computed as boost * idf * tf from:\",\n \"details\":[\n {\n \"value\":2.2,\n \"description\":\"boost\",\n \"details\":[]\n },\n {\n \"value\":1.3862944,\n \"description\":\"idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\",\n \"details\":[\n {\n \"value\":1,\n \"description\":\"n, number of documents containing term\",\n \"details\":[]\n },\n {\n \"value\":5,\n \"description\":\"N, total number of documents with field\",\n \"details\":[]\n }\n ]\n },\n {\n \"value\":0.5555556,\n \"description\":\"tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\",\n \"details\":[\n {\n \"value\":1.0,\n \"description\":\"freq, occurrences of term within document\",\n \"details\":[]\n },\n {\n \"value\":1.2,\n \"description\":\"k1, term saturation parameter\",\n \"details\":[]\n },\n {\n \"value\":0.75,\n \"description\":\"b, length normalization parameter\",\n \"details\":[]\n },\n {\n \"value\":3.0,\n \"description\":\"dl, length of field\",\n \"details\":[]\n },\n {\n \"value\":5.4,\n \"description\":\"avgdl, average length of field\",\n \"details\":[]\n }\n ]\n }\n ]\n }\n ]\n }\n}" + } } } } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "update_aliases", - "x-namespace": "indices" - } - }, - "/_validate/query": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_explain/{id}\n
\n ", + "
\n POST\n /{index}/_explain/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "explain", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "indices" + "search" ], - "summary": "Validate a query", - "description": "Validates a query without running it.", - "operationId": "indices-validate-query", + "summary": "Explain a document match result", + "description": "Get information about why a specific document matches, or doesn't match, a query.\nIt computes a score explanation for a query and a specific document.", + "operationId": "explain-1", "parameters": [ { - "$ref": "#/components/parameters/indices.validate_query-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.validate_query-all_shards" - }, - { - "$ref": "#/components/parameters/indices.validate_query-analyzer" + "in": "path", + "name": "index", + "description": "Index names that are used to limit the request.\nOnly a single index name can be provided to this parameter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.validate_query-analyze_wildcard" + "in": "path", + "name": "id", + "description": "The document identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/indices.validate_query-default_operator" + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-df" + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-expand_wildcards" + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-explain" + "in": "query", + "name": "df", + "description": "The field to use as default where no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.validate_query-lenient" - }, - { - "$ref": "#/components/parameters/indices.validate_query-rewrite" - }, - { - "$ref": "#/components/parameters/indices.validate_query-q" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.validate_query" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.validate_query-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "validate_query", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" - ], - "summary": "Validate a query", - "description": "Validates a query without running it.", - "operationId": "indices-validate-query-1", - "parameters": [ - { - "$ref": "#/components/parameters/indices.validate_query-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.validate_query-all_shards" - }, - { - "$ref": "#/components/parameters/indices.validate_query-analyzer" - }, - { - "$ref": "#/components/parameters/indices.validate_query-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/indices.validate_query-default_operator" + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-df" + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-expand_wildcards" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-explain" + "in": "query", + "name": "_source", + "description": "`True` or `false` to return the `_source` field or not or a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-ignore_unavailable" + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-lenient" + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-rewrite" + "in": "query", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return in the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/indices.validate_query-q" + "in": "query", + "name": "q", + "description": "The query in the Lucene query string syntax.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/indices.validate_query" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "Defines the search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + } + }, + "examples": { + "ExplainRequestExample1": { + "description": "Run `GET /my-index-000001/_explain/0` with the request body. Alternatively, run `GET /my-index-000001/_explain/0?q=message:elasticsearch`\n", + "value": "{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}" + } + } + } + } }, "responses": { "200": { - "$ref": "#/components/responses/indices.validate_query-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "matched": { + "type": "boolean" + }, + "explanation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.explain.ExplanationDetail" + } + ] + }, + "get": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.InlineGet" + } + ] + } + }, + "required": [ + "_index", + "_id", + "matched" + ] + }, + "examples": { + "ExplainResponseExample1": { + "description": "A successful response from `GET /my-index-000001/_explain/0`.", + "value": "{\n \"_index\":\"my-index-000001\",\n \"_id\":\"0\",\n \"matched\":true,\n \"explanation\":{\n \"value\":1.6943598,\n \"description\":\"weight(message:elasticsearch in 0) [PerFieldSimilarity], result of:\",\n \"details\":[\n {\n \"value\":1.6943598,\n \"description\":\"score(freq=1.0), computed as boost * idf * tf from:\",\n \"details\":[\n {\n \"value\":2.2,\n \"description\":\"boost\",\n \"details\":[]\n },\n {\n \"value\":1.3862944,\n \"description\":\"idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\",\n \"details\":[\n {\n \"value\":1,\n \"description\":\"n, number of documents containing term\",\n \"details\":[]\n },\n {\n \"value\":5,\n \"description\":\"N, total number of documents with field\",\n \"details\":[]\n }\n ]\n },\n {\n \"value\":0.5555556,\n \"description\":\"tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\",\n \"details\":[\n {\n \"value\":1.0,\n \"description\":\"freq, occurrences of term within document\",\n \"details\":[]\n },\n {\n \"value\":1.2,\n \"description\":\"k1, term saturation parameter\",\n \"details\":[]\n },\n {\n \"value\":0.75,\n \"description\":\"b, length normalization parameter\",\n \"details\":[]\n },\n {\n \"value\":3.0,\n \"description\":\"dl, length of field\",\n \"details\":[]\n },\n {\n \"value\":5.4,\n \"description\":\"avgdl, average length of field\",\n \"details\":[]\n }\n ]\n }\n ]\n }\n ]\n }\n}" + } + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "validate_query", - "x-namespace": "indices" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_explain/{id}\n
\n ", + "
\n POST\n /{index}/_explain/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "explain", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_validate/query": { + "/_features": { "get": { "tags": [ - "indices" + "features" ], - "summary": "Validate a query", - "description": "Validates a query without running it.", - "operationId": "indices-validate-query-2", + "summary": "Get the features", + "description": "Get a list of features that can be included in snapshots using the `feature_states` field when creating a snapshot.\nYou can use this API to determine which feature states to include when taking a snapshot.\nBy default, all feature states are included in a snapshot if that snapshot includes the global state, or none if it does not.\n\nA feature state includes one or more system indices necessary for a given feature to function.\nIn order to ensure data integrity, all system indices that comprise a feature state are snapshotted and restored together.\n\nThe features listed by this API are a combination of built-in features and features defined by plugins.\nIn order for a feature state to be listed in this API and recognized as a valid feature state by the create snapshot API, the plugin that defines that feature must be installed on the master node.", + "externalDocs": { + "description": "\"Create", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-features-api.html" + }, + "operationId": "features-get-features", "parameters": [ { - "$ref": "#/components/parameters/indices.validate_query-index" - }, - { - "$ref": "#/components/parameters/indices.validate_query-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.validate_query-all_shards" - }, - { - "$ref": "#/components/parameters/indices.validate_query-analyzer" - }, - { - "$ref": "#/components/parameters/indices.validate_query-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/indices.validate_query-default_operator" - }, - { - "$ref": "#/components/parameters/indices.validate_query-df" - }, - { - "$ref": "#/components/parameters/indices.validate_query-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.validate_query-explain" - }, - { - "$ref": "#/components/parameters/indices.validate_query-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.validate_query-lenient" - }, - { - "$ref": "#/components/parameters/indices.validate_query-rewrite" - }, - { - "$ref": "#/components/parameters/indices.validate_query-q" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.validate_query" - }, "responses": { "200": { - "$ref": "#/components/responses/indices.validate_query-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/features._types.Feature" + } + } + }, + "required": [ + "features" + ] + }, + "examples": { + "GetFeaturesResponseExample1": { + "description": "A successful response for retrieving a list of feature states that can be included when taking a snapshot.", + "value": "{\n \"features\": [\n {\n \"name\": \"tasks\",\n \"description\": \"Manages task results\"\n },\n {\n \"name\": \"kibana\",\n \"description\": \"Manages Kibana configuration and reports\"\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "validate_query", - "x-namespace": "indices" - }, - "post": { - "tags": [ - "indices" + "x-state": "Generally available; Added in 7.12.0", + "x-variations": [ + "
\n GET\n /_features\n
\n " ], - "summary": "Validate a query", - "description": "Validates a query without running it.", - "operationId": "indices-validate-query-3", - "parameters": [ - { - "$ref": "#/components/parameters/indices.validate_query-index" - }, - { - "$ref": "#/components/parameters/indices.validate_query-allow_no_indices" - }, - { - "$ref": "#/components/parameters/indices.validate_query-all_shards" - }, - { - "$ref": "#/components/parameters/indices.validate_query-analyzer" - }, - { - "$ref": "#/components/parameters/indices.validate_query-analyze_wildcard" - }, + "x-api": "get_features.features", + "x-category": "info", + "x-metaTags": [ { - "$ref": "#/components/parameters/indices.validate_query-default_operator" - }, - { - "$ref": "#/components/parameters/indices.validate_query-df" - }, - { - "$ref": "#/components/parameters/indices.validate_query-expand_wildcards" - }, - { - "$ref": "#/components/parameters/indices.validate_query-explain" - }, - { - "$ref": "#/components/parameters/indices.validate_query-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/indices.validate_query-lenient" - }, - { - "$ref": "#/components/parameters/indices.validate_query-rewrite" - }, - { - "$ref": "#/components/parameters/indices.validate_query-q" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/indices.validate_query" - }, - "responses": { - "200": { - "$ref": "#/components/responses/indices.validate_query-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "validate_query", - "x-namespace": "indices" + ] } }, - "/_inference/chat_completion/{inference_id}/_stream": { + "/_features/_reset": { "post": { "tags": [ - "inference" + "features" ], - "summary": "Perform chat completion inference\n", - "description": "The chat completion inference API enables real-time responses for chat completion tasks by delivering answers incrementally, reducing response times during computation.\nIt only works with the `chat_completion` task type for `openai` and `elastic` inference services.\n\nNOTE: The `chat_completion` task type is only available within the _stream API and only supports streaming.\nThe Chat completion inference API and the Stream inference API differ in their response structure and capabilities.\nThe Chat completion inference API provides more comprehensive customization options through more fields and function calling support.\nIf you use the `openai` service or the `elastic` service, use the Chat completion inference API.", - "operationId": "inference-chat-completion-unified", + "summary": "Reset the features", + "description": "Clear all of the state information stored in system indices by Elasticsearch features, including the security and machine learning indices.\n\nWARNING: Intended for development and testing use only. Do not reset features on a production cluster.\n\nReturn a cluster to the same state as a new installation by resetting the feature state for all Elasticsearch features.\nThis deletes all state information stored in system indices.\n\nThe response code is HTTP 200 if the state is successfully reset for all features.\nIt is HTTP 500 if the reset operation failed for any feature.\n\nNote that select features might provide a way to reset particular system indices.\nUsing this API resets all features, both those that are built-in and implemented as plugins.\n\nTo list the features that will be affected, use the get features API.\n\nIMPORTANT: The features installed on the node you submit this request to are the features that will be reset. Run on the master node if you have any doubts about which plugins are installed on individual nodes.", + "operationId": "features-reset-features", "parameters": [ - { - "in": "path", - "name": "inference_id", - "description": "The inference Id", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, { "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait for the inference request to complete.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -18264,83 +20924,152 @@ "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.RequestChatCompletion" - }, - "examples": { - "PostChatCompletionRequestExample1": { - "summary": "A chat completion task", - "description": "Run `POST _inference/chat_completion/openai-completion/_stream` to perform a chat completion on the example question with streaming.", - "value": "{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is Elastic?\"\n }\n ]\n}" - }, - "PostChatCompletionRequestExample2": { - "summary": "A chat completion task with tool_calls", - "description": "Run `POST POST _inference/chat_completion/openai-completion/_stream` to perform a chat completion using an Assistant message with `tool_calls`.", - "value": "{\n \"messages\": [\n {\n \"role\": \"assistant\",\n \"content\": \"Let's find out what the weather is\",\n \"tool_calls\": [ \n {\n \"id\": \"call_KcAjWtAww20AihPHphUh46Gd\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\":\\\"Boston, MA\\\"}\"\n }\n }\n ]\n },\n { \n \"role\": \"tool\",\n \"content\": \"The weather is cold\",\n \"tool_call_id\": \"call_KcAjWtAww20AihPHphUh46Gd\"\n }\n ]\n}" - }, - "PostChatCompletionRequestExample3": { - "summary": "A chat completion task with tools and tool_calls", - "description": "Run `POST POST _inference/chat_completion/openai-completion/_stream` to perform a chat completion using a User message with `tools` and `tool_choice`.", - "value": "{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"What's the price of a scarf?\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_price\",\n \"description\": \"Get the current price of a item\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"id\": \"123\"\n }\n }\n }\n }\n }\n ],\n \"tool_choice\": {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_price\"\n }\n }\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.StreamResult" + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/features._types.Feature" + } + } + }, + "required": [ + "features" + ] }, "examples": { - "PostChatCompletionResponseExample1": { - "description": "A successful response when performing a chat completion task using a User message with `tools` and `tool_choice`.", - "value": "event: message\ndata: {\"chat_completion\":{\"id\":\"chatcmpl-Ae0TWsy2VPnSfBbv5UztnSdYUMFP3\",\"choices\":[{\"delta\":{\"content\":\"\",\"role\":\"assistant\"},\"index\":0}],\"model\":\"gpt-4o-2024-08-06\",\"object\":\"chat.completion.chunk\"}}\n\nevent: message\ndata: {\"chat_completion\":{\"id\":\"chatcmpl-Ae0TWsy2VPnSfBbv5UztnSdYUMFP3\",\"choices\":[{\"delta\":{\"content\":Elastic\"},\"index\":0}],\"model\":\"gpt-4o-2024-08-06\",\"object\":\"chat.completion.chunk\"}}\n\nevent: message\ndata: {\"chat_completion\":{\"id\":\"chatcmpl-Ae0TWsy2VPnSfBbv5UztnSdYUMFP3\",\"choices\":[{\"delta\":{\"content\":\" is\"},\"index\":0}],\"model\":\"gpt-4o-2024-08-06\",\"object\":\"chat.completion.chunk\"}}\n\n(...)\n\nevent: message\ndata: {\"chat_completion\":{\"id\":\"chatcmpl-Ae0TWsy2VPnSfBbv5UztnSdYUMFP3\",\"choices\":[],\"model\":\"gpt-4o-2024-08-06\",\"object\":\"chat.completion.chunk\",\"usage\":{\"completion_tokens\":28,\"prompt_tokens\":16,\"total_tokens\":44}}} \n\nevent: message\ndata: [DONE]" + "ResetFeaturesResponseExample1": { + "description": "A successful response for clearing state information stored in system indices by Elasticsearch features.", + "value": "{\n \"features\" : [\n {\n \"feature_name\" : \"security\",\n \"status\" : \"SUCCESS\"\n },\n {\n \"feature_name\" : \"tasks\",\n \"status\" : \"SUCCESS\"\n }\n ]\n}" } } } } } }, - "x-state": "Added in 8.18.0", - "x-api-name" : "chat_completion_unified", - "x-namespace": "inference" + "x-state": "Technical preview; Added in 7.12.0", + "x-variations": [ + "
\n POST\n /_features/_reset\n
\n " + ], + "x-api": "reset_features.features", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_inference/completion/{inference_id}": { - "post": { + "/_field_caps": { + "get": { "tags": [ - "inference" + "search" ], - "summary": "Perform completion inference on the service", - "operationId": "inference-completion", + "summary": "Get the field capabilities", + "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", + "operationId": "field-caps", "parameters": [ { - "in": "path", - "name": "inference_id", - "description": "The inference Id", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias,\nor `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait for the inference request to complete.", + "name": "expand_wildcards", + "description": "The 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 comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "fields", + "description": "A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_unmapped", + "description": "If true, unmapped fields are included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "filters", + "description": "A comma-separated list of filters to apply to the response.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "x-state": "Generally available; Added in 8.2.0", + "style": "form" + }, + { + "in": "query", + "name": "types", + "description": "A comma-separated list of field types to include.\nAny fields that do not match one of these types will be excluded from the results.\nIt defaults to empty, meaning that all field types are returned.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "x-state": "Generally available; Added in 8.2.0", + "style": "form" + }, + { + "in": "query", + "name": "include_empty_fields", + "description": "If false, empty fields are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" }, + "x-state": "Generally available; Added in 8.13.0", "style": "form" } ], @@ -18350,33 +21079,38 @@ "schema": { "type": "object", "properties": { - "input": { - "description": "Inference input.\nEither a string or an array of strings.", - "oneOf": [ + "fields": { + "description": "A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "x-state": "Generally available; Added in 8.5.0", + "allOf": [ { - "type": "string" - }, + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "index_filter": { + "description": "Filter indices if the provided query rewrites to `match_none` on every shard.\n\nIMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to `match_none` instead of fully running the request.\nFor instance a range query over a date field can rewrite to `match_none` if all documents within a shard (including deleted documents) are outside of the provided range.\nHowever, not all queries can rewrite to `match_none` so this API may return an index even if the provided filter matches no document.", + "allOf": [ { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" } ] }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.TaskSettings" + "runtime_mappings": { + "description": "Define ad-hoc runtime fields in the request similar to the way it is done in search requests.\nThese fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.", + "x-state": "Generally available; Added in 7.12.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] } - }, - "required": [ - "input" - ] + } }, "examples": { - "CompletionRequestExample1": { - "summary": "Completion task", - "description": "Run `POST _inference/completion/openai_chat_completions` to perform a completion on the example question.", - "value": "{\n \"input\": \"What is Elastic?\"\n}" + "FieldCapabilitiesRequestExample1": { + "description": "Run `POST my-index-*/_field_caps?fields=rating` to get field capabilities and filter indices with a query. Indices that rewrite the provided filter to `match_none` on every shard will be filtered from the response.\n", + "value": "{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" } } } @@ -18388,281 +21122,167 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.CompletionInferenceResult" + "type": "object", + "properties": { + "indices": { + "description": "The list of indices where this field has the same type family, or null if all indices have the same type family for the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.field_caps.FieldCapability" + } + } + } + }, + "required": [ + "indices", + "fields" + ] }, "examples": { - "CompletionResponseExample1": { - "summary": "Completion task", - "description": "A successful response from `POST _inference/completion/openai_chat_completions`.\n", - "value": "{\n \"completion\": [\n {\n \"result\": \"Elastic is a company that provides a range of software solutions for search, logging, security, and analytics. Their flagship product is Elasticsearch, an open-source, distributed search engine that allows users to search, analyze, and visualize large volumes of data in real-time. Elastic also offers products such as Kibana, a data visualization tool, and Logstash, a log management and pipeline tool, as well as various other tools and solutions for data analysis and management.\"\n }\n ]\n}" + "FieldCapabilitiesResponseExample1": { + "summary": "Get two fields", + "description": "A successful response from `GET _field_caps?fields=rating,title`. The field `rating` is defined as a long in `index1` and `index2` and as a `keyword` in `index3` and `index4`. The field `rating` is not aggregatable in `index1`. The field `rating` is not searchable in `index4`. The field `title` is defined as text in all indices.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + }, + "FieldCapabilitiesResponseExample2": { + "summary": "Get unmapped fields", + "description": "A successful response from `GET _field_caps?fields=rating,title&include_unmapped`. The response contains an entry for each field that is present in some indices but not all. For example, the `rating` and `title` fields are unmapped in `index5`.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" } } } } } }, - "x-state": "Added in 8.11.0", - "x-api-name" : "completion", - "x-namespace": "inference" - } - }, - "/_inference/{inference_id}": { - "get": { - "tags": [ - "inference" - ], - "summary": "Get an inference endpoint", - "operationId": "inference-get-1", - "parameters": [ - { - "$ref": "#/components/parameters/inference.get-inference_id" - } + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_field_caps\n
\n ", + "
\n POST\n /_field_caps\n
\n " ], - "responses": { - "200": { - "$ref": "#/components/responses/inference.get-200" - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "get", - "x-namespace": "inference" - }, - "put": { - "tags": [ - "inference" + "x-req-auth": [ + "Index privileges: `view_index_metadata`,`read`\n" ], - "summary": "Create an inference endpoint", - "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", - "operationId": "inference-put", - "parameters": [ + "x-api": "field_caps", + "x-category": "unknown", + "x-metaTags": [ { - "$ref": "#/components/parameters/inference.put-inference_id" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/inference.put" - }, - "responses": { - "200": { - "$ref": "#/components/responses/inference.put-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "put", - "x-namespace": "inference" + ] }, "post": { "tags": [ - "inference" + "search" ], - "summary": "Perform inference on the service", - "description": "This API enables you to use machine learning models to perform specific tasks on data that you provide as an input.\nIt returns a response with the results of the tasks.\nThe inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API.\n\nFor details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation.\n\n> info\n> The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", - "operationId": "inference-inference", + "summary": "Get the field capabilities", + "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", + "operationId": "field-caps-1", "parameters": [ { - "$ref": "#/components/parameters/inference.inference-inference_id" - }, - { - "$ref": "#/components/parameters/inference.inference-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/inference.inference" - }, - "responses": { - "200": { - "$ref": "#/components/responses/inference.inference-200" - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "inference", - "x-namespace": "inference" - }, - "delete": { - "tags": [ - "inference" - ], - "summary": "Delete an inference endpoint", - "operationId": "inference-delete", - "parameters": [ - { - "$ref": "#/components/parameters/inference.delete-inference_id" - }, - { - "$ref": "#/components/parameters/inference.delete-dry_run" - }, - { - "$ref": "#/components/parameters/inference.delete-force" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/inference.delete-200" - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "delete", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{inference_id}": { - "get": { - "tags": [ - "inference" - ], - "summary": "Get an inference endpoint", - "operationId": "inference-get-2", - "parameters": [ - { - "$ref": "#/components/parameters/inference.get-task_type" - }, - { - "$ref": "#/components/parameters/inference.get-inference_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/inference.get-200" - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "get", - "x-namespace": "inference" - }, - "put": { - "tags": [ - "inference" - ], - "summary": "Create an inference endpoint", - "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", - "operationId": "inference-put-1", - "parameters": [ - { - "$ref": "#/components/parameters/inference.put-task_type" + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias,\nor `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/inference.put-inference_id" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/inference.put" - }, - "responses": { - "200": { - "$ref": "#/components/responses/inference.put-200" - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "put", - "x-namespace": "inference" - }, - "post": { - "tags": [ - "inference" - ], - "summary": "Perform inference on the service", - "description": "This API enables you to use machine learning models to perform specific tasks on data that you provide as an input.\nIt returns a response with the results of the tasks.\nThe inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API.\n\nFor details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation.\n\n> info\n> The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", - "operationId": "inference-inference-1", - "parameters": [ - { - "$ref": "#/components/parameters/inference.inference-task_type" + "in": "query", + "name": "expand_wildcards", + "description": "The 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 comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/inference.inference-inference_id" + "in": "query", + "name": "fields", + "description": "A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/inference.inference-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/inference.inference" - }, - "responses": { - "200": { - "$ref": "#/components/responses/inference.inference-200" - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "inference", - "x-namespace": "inference" - }, - "delete": { - "tags": [ - "inference" - ], - "summary": "Delete an inference endpoint", - "operationId": "inference-delete-1", - "parameters": [ - { - "$ref": "#/components/parameters/inference.delete-task_type" + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/inference.delete-inference_id" + "in": "query", + "name": "include_unmapped", + "description": "If true, unmapped fields are included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/inference.delete-dry_run" + "in": "query", + "name": "filters", + "description": "A comma-separated list of filters to apply to the response.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "x-state": "Generally available; Added in 8.2.0", + "style": "form" }, { - "$ref": "#/components/parameters/inference.delete-force" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/inference.delete-200" - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "delete", - "x-namespace": "inference" - } - }, - "/_inference": { - "get": { - "tags": [ - "inference" - ], - "summary": "Get an inference endpoint", - "operationId": "inference-get", - "responses": { - "200": { - "$ref": "#/components/responses/inference.get-200" - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "get", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{alibabacloud_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create an AlibabaCloud AI Search inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `alibabacloud-ai-search` service.", - "operationId": "inference-put-alibabacloud", - "parameters": [ - { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", - "required": true, + "in": "query", + "name": "types", + "description": "A comma-separated list of field types to include.\nAny fields that do not match one of these types will be excluded from the results.\nIt defaults to empty, meaning that all field types are returned.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.AlibabaCloudTaskType" + "type": "array", + "items": { + "type": "string" + } }, - "style": "simple" + "x-state": "Generally available; Added in 8.2.0", + "style": "form" }, { - "in": "path", - "name": "alibabacloud_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "include_empty_fields", + "description": "If false, empty fields are not included in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "x-state": "Generally available; Added in 8.13.0", + "style": "form" } ], "requestBody": { @@ -18671,44 +21291,38 @@ "schema": { "type": "object", "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.AlibabaCloudServiceType" + "fields": { + "description": "A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "x-state": "Generally available; Added in 8.5.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.AlibabaCloudServiceSettings" + "index_filter": { + "description": "Filter indices if the provided query rewrites to `match_none` on every shard.\n\nIMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to `match_none` instead of fully running the request.\nFor instance a range query over a date field can rewrite to `match_none` if all documents within a shard (including deleted documents) are outside of the provided range.\nHowever, not all queries can rewrite to `match_none` so this API may return an index even if the provided filter matches no document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.AlibabaCloudTaskSettings" + "runtime_mappings": { + "description": "Define ad-hoc runtime fields in the request similar to the way it is done in search requests.\nThese fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.", + "x-state": "Generally available; Added in 7.12.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] } - }, - "required": [ - "service", - "service_settings" - ] + } }, "examples": { - "PutAlibabaCloudRequestExample1": { - "summary": "A completion task", - "description": "Run `PUT _inference/completion/alibabacloud_ai_search_completion` to create an inference endpoint that performs a completion task.", - "value": "{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"host\" : \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-qwen-turbo\",\n \"workspace\" : \"default\"\n }\n}" - }, - "PutAlibabaCloudRequestExample2": { - "summary": "A rerank task", - "description": "Run `PUT _inference/rerank/alibabacloud_ai_search_rerank` to create an inference endpoint that performs a rerank task.", - "value": "{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-bge-reranker-larger\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n}" - }, - "PutAlibabaCloudRequestExample3": { - "summary": "A sparse embedding task", - "description": "Run `PUT _inference/sparse_embedding/alibabacloud_ai_search_sparse` to create an inference endpoint that performs perform a sparse embedding task.", - "value": "{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-text-sparse-embedding-001\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n}" - }, - "PutAlibabaCloudRequestExample4": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/alibabacloud_ai_search_embeddings` to create an inference endpoint that performs a text embedding task.", - "value": "{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-text-embedding-001\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n}" + "FieldCapabilitiesRequestExample1": { + "description": "Run `POST my-index-*/_field_caps?fields=rating` to get field capabilities and filter indices with a query. Indices that rewrite the provided filter to `match_none` on every shard will be filtered from the response.\n", + "value": "{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" } } } @@ -18720,135 +21334,180 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAlibabaCloudAI" + "type": "object", + "properties": { + "indices": { + "description": "The list of indices where this field has the same type family, or null if all indices have the same type family for the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.field_caps.FieldCapability" + } + } + } + }, + "required": [ + "indices", + "fields" + ] + }, + "examples": { + "FieldCapabilitiesResponseExample1": { + "summary": "Get two fields", + "description": "A successful response from `GET _field_caps?fields=rating,title`. The field `rating` is defined as a long in `index1` and `index2` and as a `keyword` in `index3` and `index4`. The field `rating` is not aggregatable in `index1`. The field `rating` is not searchable in `index4`. The field `title` is defined as text in all indices.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + }, + "FieldCapabilitiesResponseExample2": { + "summary": "Get unmapped fields", + "description": "A successful response from `GET _field_caps?fields=rating,title&include_unmapped`. The response contains an entry for each field that is present in some indices but not all. For example, the `rating` and `title` fields are unmapped in `index5`.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + } } } } } }, - "x-state": "Added in 8.16.0", - "x-api-name" : "put_alibabacloud", - "x-namespace": "inference" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_field_caps\n
\n ", + "
\n POST\n /_field_caps\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`,`read`\n" + ], + "x-api": "field_caps", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_inference/{task_type}/{amazonbedrock_inference_id}": { - "put": { + "/{index}/_field_caps": { + "get": { "tags": [ - "inference" + "search" ], - "summary": "Create an Amazon Bedrock inference endpoint", - "description": "Creates an inference endpoint to perform an inference task with the `amazonbedrock` service.\n\n>info\n> You need to provide the access and secret keys only once, during the inference model creation. The get inference API does not retrieve your access or secret keys. After creating the inference model, you cannot change the associated key pairs. If you want to use a different access and secret key pair, delete the inference model and recreate it with the same name and the updated keys.", - "operationId": "inference-put-amazonbedrock", + "summary": "Get the field capabilities", + "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", + "operationId": "field-caps-2", "parameters": [ { "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.AmazonBedrockTaskType" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { - "in": "path", - "name": "amazonbedrock_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias,\nor `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.AmazonBedrockServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.AmazonBedrockServiceSettings" - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.AmazonBedrockTaskSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutAmazonBedrockRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/amazon_bedrock_embeddings` to create an inference endpoint that performs a text embedding task.", - "value": "{\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-embed-text-v2:0\"\n }\n}" + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The 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 comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "fields", + "description": "A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_unmapped", + "description": "If true, unmapped fields are included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "filters", + "description": "A comma-separated list of filters to apply to the response.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" }, - "PutAmazonBedrockRequestExample2": { - "summary": "A completion task", - "description": "Run `PUT _inference/completion/openai-completion` to create an inference endpoint to perform a completion task type.", - "value": "{\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"gpt-3.5-turbo\"\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAmazonBedrock" + { + "type": "array", + "items": { + "type": "string" + } } - } - } - } - }, - "x-state": "Added in 8.12.0", - "x-api-name" : "put_amazonbedrock", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{anthropic_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create an Anthropic inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `anthropic` service.", - "operationId": "inference-put-anthropic", - "parameters": [ + ] + }, + "x-state": "Generally available; Added in 8.2.0", + "style": "form" + }, { - "in": "path", - "name": "task_type", - "description": "The task type.\nThe only valid task type for the model to perform is `completion`.", - "required": true, + "in": "query", + "name": "types", + "description": "A comma-separated list of field types to include.\nAny fields that do not match one of these types will be excluded from the results.\nIt defaults to empty, meaning that all field types are returned.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.AnthropicTaskType" + "type": "array", + "items": { + "type": "string" + } }, - "style": "simple" + "x-state": "Generally available; Added in 8.2.0", + "style": "form" }, { - "in": "path", - "name": "anthropic_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "include_empty_fields", + "description": "If false, empty fields are not included in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "x-state": "Generally available; Added in 8.13.0", + "style": "form" } ], "requestBody": { @@ -18857,28 +21516,38 @@ "schema": { "type": "object", "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.AnthropicServiceType" + "fields": { + "description": "A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "x-state": "Generally available; Added in 8.5.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.AnthropicServiceSettings" + "index_filter": { + "description": "Filter indices if the provided query rewrites to `match_none` on every shard.\n\nIMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to `match_none` instead of fully running the request.\nFor instance a range query over a date field can rewrite to `match_none` if all documents within a shard (including deleted documents) are outside of the provided range.\nHowever, not all queries can rewrite to `match_none` so this API may return an index even if the provided filter matches no document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.AnthropicTaskSettings" + "runtime_mappings": { + "description": "Define ad-hoc runtime fields in the request similar to the way it is done in search requests.\nThese fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.", + "x-state": "Generally available; Added in 7.12.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] } - }, - "required": [ - "service", - "service_settings" - ] + } }, "examples": { - "PutAnthropicRequestExample1": { - "description": "Run `PUT _inference/completion/anthropic_completion` to create an inference endpoint that performs a completion task.", - "value": "{\n \"service\": \"anthropic\",\n \"service_settings\": {\n \"api_key\": \"Anthropic-Api-Key\",\n \"model_id\": \"Model-ID\"\n },\n \"task_settings\": {\n \"max_tokens\": 1024\n }\n}" + "FieldCapabilitiesRequestExample1": { + "description": "Run `POST my-index-*/_field_caps?fields=rating` to get field capabilities and filter indices with a query. Indices that rewrite the provided filter to `match_none` on every shard will be filtered from the response.\n", + "value": "{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" } } } @@ -18890,135 +21559,178 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAnthropic" + "type": "object", + "properties": { + "indices": { + "description": "The list of indices where this field has the same type family, or null if all indices have the same type family for the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.field_caps.FieldCapability" + } + } + } + }, + "required": [ + "indices", + "fields" + ] + }, + "examples": { + "FieldCapabilitiesResponseExample1": { + "summary": "Get two fields", + "description": "A successful response from `GET _field_caps?fields=rating,title`. The field `rating` is defined as a long in `index1` and `index2` and as a `keyword` in `index3` and `index4`. The field `rating` is not aggregatable in `index1`. The field `rating` is not searchable in `index4`. The field `title` is defined as text in all indices.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + }, + "FieldCapabilitiesResponseExample2": { + "summary": "Get unmapped fields", + "description": "A successful response from `GET _field_caps?fields=rating,title&include_unmapped`. The response contains an entry for each field that is present in some indices but not all. For example, the `rating` and `title` fields are unmapped in `index5`.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + } } } } } }, - "x-state": "Added in 8.16.0", - "x-api-name" : "put_anthropic", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{azureaistudio_inference_id}": { - "put": { + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /{index}/_field_caps\n
\n ", + "
\n POST\n /{index}/_field_caps\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`,`read`\n" + ], + "x-api": "field_caps", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "inference" + "search" ], - "summary": "Create an Azure AI studio inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `azureaistudio` service.", - "operationId": "inference-put-azureaistudio", + "summary": "Get the field capabilities", + "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", + "operationId": "field-caps-3", "parameters": [ { "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.AzureAiStudioTaskType" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { - "in": "path", - "name": "azureaistudio_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias,\nor `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.AzureAiStudioServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.AzureAiStudioServiceSettings" - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.AzureAiStudioTaskSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutAzureAiStudioRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/azure_ai_studio_embeddings` to create an inference endpoint that performs a text_embedding task. Note that you do not specify a model here, as it is defined already in the Azure AI Studio deployment.", - "value": "{\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-Uri\",\n \"provider\": \"openai\",\n \"endpoint_type\": \"token\"\n }\n}" + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The 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 comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "fields", + "description": "A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_unmapped", + "description": "If true, unmapped fields are included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "filters", + "description": "A comma-separated list of filters to apply to the response.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" }, - "PutAzureAiStudioRequestExample2": { - "summary": "A completion task", - "description": "Run `PUT _inference/completion/azure_ai_studio_completion` to create an inference endpoint that performs a completion task.", - "value": "{\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-URI\",\n \"provider\": \"databricks\",\n \"endpoint_type\": \"realtime\"\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAzureAIStudio" + { + "type": "array", + "items": { + "type": "string" + } } - } - } - } - }, - "x-state": "Added in 8.14.0", - "x-api-name" : "put_azureaistudio", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{azureopenai_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create an Azure OpenAI inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `azureopenai` service.\n\nThe list of chat completion models that you can choose from in your Azure OpenAI deployment include:\n\n* [GPT-4 and GPT-4 Turbo models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-4-and-gpt-4-turbo-models)\n* [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-35)\n\nThe list of embeddings models that you can choose from in your deployment can be found in the [Azure models documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings).", - "operationId": "inference-put-azureopenai", - "parameters": [ + ] + }, + "x-state": "Generally available; Added in 8.2.0", + "style": "form" + }, { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", - "required": true, + "in": "query", + "name": "types", + "description": "A comma-separated list of field types to include.\nAny fields that do not match one of these types will be excluded from the results.\nIt defaults to empty, meaning that all field types are returned.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.AzureOpenAITaskType" + "type": "array", + "items": { + "type": "string" + } }, - "style": "simple" + "x-state": "Generally available; Added in 8.2.0", + "style": "form" }, { - "in": "path", - "name": "azureopenai_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "include_empty_fields", + "description": "If false, empty fields are not included in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "x-state": "Generally available; Added in 8.13.0", + "style": "form" } ], "requestBody": { @@ -19027,34 +21739,38 @@ "schema": { "type": "object", "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.AzureOpenAIServiceType" + "fields": { + "description": "A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "x-state": "Generally available; Added in 8.5.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.AzureOpenAIServiceSettings" + "index_filter": { + "description": "Filter indices if the provided query rewrites to `match_none` on every shard.\n\nIMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to `match_none` instead of fully running the request.\nFor instance a range query over a date field can rewrite to `match_none` if all documents within a shard (including deleted documents) are outside of the provided range.\nHowever, not all queries can rewrite to `match_none` so this API may return an index even if the provided filter matches no document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.AzureOpenAITaskSettings" + "runtime_mappings": { + "description": "Define ad-hoc runtime fields in the request similar to the way it is done in search requests.\nThese fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.", + "x-state": "Generally available; Added in 7.12.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] } - }, - "required": [ - "service", - "service_settings" - ] + } }, "examples": { - "PutAzureOpenAiRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/azure_openai_embeddings` to create an inference endpoint that performs a `text_embedding` task. You do not specify a model, as it is defined already in the Azure OpenAI deployment.", - "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" - }, - "PutAzureOpenAiRequestExample2": { - "summary": "A completion task", - "description": "Run `PUT _inference/completion/azure_openai_completion` to create an inference endpoint that performs a `completion` task.", - "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" + "FieldCapabilitiesRequestExample1": { + "description": "Run `POST my-index-*/_field_caps?fields=rating` to get field capabilities and filter indices with a query. Indices that rewrite the provided filter to `match_none` on every shard will be filtered from the response.\n", + "value": "{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" } } } @@ -19066,195 +21782,332 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAzureOpenAI" + "type": "object", + "properties": { + "indices": { + "description": "The list of indices where this field has the same type family, or null if all indices have the same type family for the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.field_caps.FieldCapability" + } + } + } + }, + "required": [ + "indices", + "fields" + ] + }, + "examples": { + "FieldCapabilitiesResponseExample1": { + "summary": "Get two fields", + "description": "A successful response from `GET _field_caps?fields=rating,title`. The field `rating` is defined as a long in `index1` and `index2` and as a `keyword` in `index3` and `index4`. The field `rating` is not aggregatable in `index1`. The field `rating` is not searchable in `index4`. The field `title` is defined as text in all indices.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + }, + "FieldCapabilitiesResponseExample2": { + "summary": "Get unmapped fields", + "description": "A successful response from `GET _field_caps?fields=rating,title&include_unmapped`. The response contains an entry for each field that is present in some indices but not all. For example, the `rating` and `title` fields are unmapped in `index5`.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + } } } } } }, - "x-state": "Added in 8.14.0", - "x-api-name" : "put_azureopenai", - "x-namespace": "inference" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /{index}/_field_caps\n
\n ", + "
\n POST\n /{index}/_field_caps\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`,`read`\n" + ], + "x-api": "field_caps", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_inference/{task_type}/{cohere_inference_id}": { - "put": { + "/{index}/_fleet/global_checkpoints": { + "get": { "tags": [ - "inference" + "fleet" ], - "summary": "Create a Cohere inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `cohere` service.", - "operationId": "inference-put-cohere", + "summary": "Get global checkpoints", + "description": "Get the current global checkpoints for an index.\nThis API is designed for internal use by the Fleet server project.", + "operationId": "fleet-global-checkpoints", "parameters": [ { "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", + "name": "index", + "description": "A single index or index alias that resolves to a single index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.CohereTaskType" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "$ref": "#/components/schemas/_types.IndexAlias" + } + ] }, "style": "simple" }, { - "in": "path", - "name": "cohere_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "wait_for_advance", + "description": "A boolean value which controls whether to wait (until the timeout) for the global checkpoints\nto advance past the provided `checkpoints`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.CohereServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.CohereServiceSettings" - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.CohereTaskSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutCohereRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/cohere-embeddings` to create an inference endpoint that performs a text embedding task.", - "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-Api-key\",\n \"model_id\": \"embed-english-light-v3.0\",\n \"embedding_type\": \"byte\"\n }\n}" - }, - "PutCohereRequestExample2": { - "summary": "A rerank task", - "description": "Run `PUT _inference/rerank/cohere-rerank` to create an inference endpoint that performs a rerank task.", - "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"rerank-english-v3.0\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n}" - } + "style": "form" + }, + { + "in": "query", + "name": "wait_for_index", + "description": "A boolean value which controls whether to wait (until the timeout) for the target index to exist\nand all primary shards be active. Can only be true when `wait_for_advance` is true.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "checkpoints", + "description": "A comma separated list of previous global checkpoints. When used in combination with `wait_for_advance`,\nthe API will only return once the global checkpoints advances past the checkpoints. Providing an empty list\nwill cause Elasticsearch to immediately return the current global checkpoints.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fleet._types.Checkpoint" } - } + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a global checkpoints to advance past `checkpoints`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - }, + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoCohere" + "type": "object", + "properties": { + "global_checkpoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fleet._types.Checkpoint" + } + }, + "timed_out": { + "type": "boolean" + } + }, + "required": [ + "global_checkpoints", + "timed_out" + ] } } } } }, - "x-state": "Added in 8.13.0", - "x-api-name" : "put_cohere", - "x-namespace": "inference" + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /{index}/_fleet/global_checkpoints\n
\n " + ], + "x-api": "global_checkpoints.fleet", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] } }, - "/_inference/{task_type}/{elasticsearch_inference_id}": { - "put": { + "/_fleet/_fleet_msearch": { + "get": { "tags": [ - "inference" + "fleet" ], - "summary": "Create an Elasticsearch inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `elasticsearch` service.\n\n> info\n> Your Elasticsearch deployment contains preconfigured ELSER and E5 inference endpoints, you only need to create the enpoints using the API if you want to customize the settings.\n\nIf you use the ELSER or the E5 model through the `elasticsearch` service, the API request will automatically download and deploy the model if it isn't downloaded yet.\n\n> info\n> You might see a 502 bad gateway error in the response when using the Kibana Console. This error usually just reflects a timeout, while the model downloads in the background. You can check the download progress in the Machine Learning UI. If using the Python client, you can set the timeout parameter to a higher value.\n\nAfter creating the endpoint, wait for the model deployment to complete before using it.\nTo verify the deployment status, use the get trained model statistics API.\nLook for `\"state\": \"fully_allocated\"` in the response and ensure that the `\"allocation_count\"` matches the `\"target_allocation_count\"`.\nAvoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.", - "operationId": "inference-put-elasticsearch", + "summary": "Run multiple Fleet searches", + "description": "Run several Fleet searches with a single API request.\nThe API follows the same structure as the multi search API.\nHowever, similar to the Fleet search API, it supports the `wait_for_checkpoints` parameter.", + "operationId": "fleet-msearch", "parameters": [ { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.ElasticsearchTaskType" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "elasticsearch_inference_id", - "description": "The unique identifier of the inference endpoint.\nThe must not match the `model_id`.", - "required": true, + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_concurrent_searches", + "description": "Maximum number of concurrent searches the multi search API can execute.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_checkpoints", + "description": "A comma separated list of checkpoints. When configured, the search API will only be executed on a shard\nafter the relevant checkpoint has become visible for search. Defaults to an empty list which will cause\nElasticsearch to immediately execute the search.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fleet._types.Checkpoint" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard request timeouts or shard failures.\nIf false, returns an error with no partial results.\nDefaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.ElasticsearchServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.ElasticsearchServiceSettings" - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.ElasticsearchTaskSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutElasticsearchRequestExample1": { - "summary": "ELSER sparse embedding task", - "description": "Run `PUT _inference/sparse_embedding/my-elser-model` to create an inference endpoint that performs a `sparse_embedding` task. The `model_id` must be the ID of one of the built-in ELSER models. The API will automatically download the ELSER model if it isn't already downloaded and then deploy the model.", - "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": { \n \"enabled\": true,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n },\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\" \n }\n}" - }, - "PutElasticsearchRequestExample2": { - "summary": "Elastic rerank task", - "description": "Run `PUT _inference/rerank/my-elastic-rerank` to create an inference endpoint that performs a rerank task using the built-in Elastic Rerank cross-encoder model. The `model_id` must be `.rerank-v1`, which is the ID of the built-in Elastic Rerank model. The API will automatically download the Elastic Rerank model if it isn't already downloaded and then deploy the model. Once deployed, the model can be used for semantic re-ranking with a `text_similarity_reranker` retriever.", - "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"model_id\": \".rerank-v1\", \n \"num_threads\": 1,\n \"adaptive_allocations\": { \n \"enabled\": true,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n }\n }\n}" - }, - "PutElasticsearchRequestExample3": { - "summary": "E5 text embedding task", - "description": "Run `PUT _inference/text_embedding/my-e5-model` to create an inference endpoint that performs a `text_embedding` task. The `model_id` must be the ID of one of the built-in E5 models. The API will automatically download the E5 model if it isn't already downloaded and then deploy the model.", - "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1,\n \"model_id\": \".multilingual-e5-small\" \n }\n}" - }, - "PutElasticsearchRequestExample4": { - "summary": "Eland text embedding task", - "description": "Run `PUT _inference/text_embedding/my-msmarco-minilm-model` to create an inference endpoint that performs a `text_embedding` task with a model that was uploaded by Eland.", - "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1,\n \"model_id\": \"msmarco-MiniLM-L12-cos-v5\" \n }\n}" - }, - "PutElasticsearchRequestExample5": { - "summary": "Adaptive allocation", - "description": "Run `PUT _inference/text_embedding/my-e5-model` to create an inference endpoint that performs a `text_embedding` task and to configure adaptive allocations. The API request will automatically download the E5 model if it isn't already downloaded and then deploy the model.", - "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 3,\n \"max_number_of_allocations\": 10\n },\n \"num_threads\": 1,\n \"model_id\": \".multilingual-e5-small\"\n }\n}" - }, - "PutElasticsearchRequestExample6": { - "summary": "Existing model deployment", - "description": "Run `PUT _inference/sparse_embedding/use_existing_deployment` to use an already existing model deployment when creating an inference endpoint.", - "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"deployment_id\": \".elser_model_2\"\n }\n}" + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.RequestItem" } } } - } + }, + "required": true }, "responses": { "200": { @@ -19262,265 +22115,194 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoElasticsearch" - }, - "examples": { - "PutElasticsearchResponseExample1": { - "description": "A successful response from `PUT _inference/sparse_embedding/use_existing_deployment`. It contains the model ID and the threads and allocations settings from the model deployment.\n", - "value": "{\n \"inference_id\": \"use_existing_deployment\",\n \"task_type\": \"sparse_embedding\",\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 2,\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\",\n \"deployment_id\": \".elser_model_2\"\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" - } + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.ResponseItem" + } + } + }, + "required": [ + "docs" + ] } } } } }, - "x-state": "Added in 8.13.0", - "x-api-name" : "put_elasticsearch", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{elser_inference_id}": { - "put": { - "tags": [ - "inference" + "x-state": "Technical preview; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /_fleet/_fleet_msearch\n
\n ", + "
\n POST\n /_fleet/_fleet_msearch\n
\n " ], - "summary": "Create an ELSER inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `elser` service.\nYou can also deploy ELSER by using the Elasticsearch inference integration.\n\n> info\n> Your Elasticsearch deployment contains a preconfigured ELSER inference endpoint, you only need to create the enpoint using the API if you want to customize the settings.\n\nThe API request will automatically download and deploy the ELSER model if it isn't already downloaded.\n\n> info\n> You might see a 502 bad gateway error in the response when using the Kibana Console. This error usually just reflects a timeout, while the model downloads in the background. You can check the download progress in the Machine Learning UI. If using the Python client, you can set the timeout parameter to a higher value.\n\nAfter creating the endpoint, wait for the model deployment to complete before using it.\nTo verify the deployment status, use the get trained model statistics API.\nLook for `\"state\": \"fully_allocated\"` in the response and ensure that the `\"allocation_count\"` matches the `\"target_allocation_count\"`.\nAvoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.", - "operationId": "inference-put-elser", - "parameters": [ + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch.fleet", + "x-category": "ingest", + "x-metaTags": [ { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", - "required": true, + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "fleet" + ], + "summary": "Run multiple Fleet searches", + "description": "Run several Fleet searches with a single API request.\nThe API follows the same structure as the multi search API.\nHowever, similar to the Fleet search API, it supports the `wait_for_checkpoints` parameter.", + "operationId": "fleet-msearch-1", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.ElserTaskType" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "elser_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.ElserServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.ElserServiceSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutElserRequestExample1": { - "summary": "A sparse embedding task", - "description": "Run `PUT _inference/sparse_embedding/my-elser-model` to create an inference endpoint that performs a `sparse_embedding` task. The request will automatically download the ELSER model if it isn't already downloaded and then deploy the model.", - "value": "{\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n }\n}" - }, - "PutElserRequestExample2": { - "summary": "Adaptive allocations", - "description": "Run `PUT _inference/sparse_embedding/my-elser-model` to create an inference endpoint that performs a `sparse_embedding` task with adaptive allocations. When adaptive allocations are enabled, the number of allocations of the model is set automatically based on the current load.", - "value": "{\n \"service\": \"elser\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 3,\n \"max_number_of_allocations\": 10\n },\n \"num_threads\": 1\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoELSER" - }, - "examples": { - "PutElserResponseExample1": { - "description": "A successful response when creating an ELSER inference endpoint.", - "value": "{\n \"inference_id\": \"my-elser-model\",\n \"task_type\": \"sparse_embedding\",\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n },\n \"task_settings\": {}\n}" - } - } - } - } - } - }, - "deprecated": true, - "x-state": "Added in 8.11.0", - "x-api-name" : "put_elser", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{googleaistudio_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create an Google AI Studio inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `googleaistudio` service.", - "operationId": "inference-put-googleaistudio", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", - "required": true, + "in": "query", + "name": "expand_wildcards", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.GoogleAiStudioTaskType" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "googleaistudio_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.GoogleAiServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.GoogleAiStudioServiceSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutGoogleAiStudioRequestExample1": { - "summary": "A completion task", - "description": "Run `PUT _inference/completion/google_ai_studio_completion` to create an inference endpoint to perform a `completion` task type.", - "value": "{\n \"service\": \"googleaistudio\",\n \"service_settings\": {\n \"api_key\": \"api-key\",\n \"model_id\": \"model-id\"\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoGoogleAIStudio" - } - } - } - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "put_googleaistudio", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{googlevertexai_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create a Google Vertex AI inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `googlevertexai` service.", - "operationId": "inference-put-googlevertexai", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", - "required": true, + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.GoogleVertexAITaskType" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "googlevertexai_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "max_concurrent_searches", + "description": "Maximum number of concurrent searches the multi search API can execute.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "number" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_checkpoints", + "description": "A comma separated list of checkpoints. When configured, the search API will only be executed on a shard\nafter the relevant checkpoint has become visible for search. Defaults to an empty list which will cause\nElasticsearch to immediately execute the search.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fleet._types.Checkpoint" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard request timeouts or shard failures.\nIf false, returns an error with no partial results.\nDefaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.GoogleVertexAIServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.GoogleVertexAIServiceSettings" - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.GoogleVertexAITaskSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutGoogleVertexAiRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/google_vertex_ai_embeddings` to create an inference endpoint to perform a `text_embedding` task type.", - "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"model_id\": \"model-id\",\n \"location\": \"location\",\n \"project_id\": \"project-id\"\n }\n}" - }, - "PutGoogleVertexAiRequestExample2": { - "summary": "A rerank task", - "description": "Run `PUT _inference/rerank/google_vertex_ai_rerank` to create an inference endpoint to perform a `rerank` task type.", - "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"project_id\": \"project-id\"\n }\n}" + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.RequestItem" } } } - } + }, + "required": true }, "responses": { "200": { @@ -19528,79 +22310,214 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoGoogleVertexAI" + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.ResponseItem" + } + } + }, + "required": [ + "docs" + ] } } } } }, - "x-state": "Added in 8.15.0", - "x-api-name" : "put_googlevertexai", - "x-namespace": "inference" + "x-state": "Technical preview; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /_fleet/_fleet_msearch\n
\n ", + "
\n POST\n /_fleet/_fleet_msearch\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch.fleet", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] } }, - "/_inference/{task_type}/{huggingface_inference_id}": { - "put": { + "/{index}/_fleet/_fleet_msearch": { + "get": { "tags": [ - "inference" + "fleet" ], - "summary": "Create a Hugging Face inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `hugging_face` service.\n\nYou must first create an inference endpoint on the Hugging Face endpoint page to get an endpoint URL.\nSelect the model you want to use on the new endpoint creation page (for example `intfloat/e5-small-v2`), then select the sentence embeddings task under the advanced configuration section.\nCreate the endpoint and copy the URL after the endpoint initialization has been finished.\n\nThe following models are recommended for the Hugging Face service:\n\n* `all-MiniLM-L6-v2`\n* `all-MiniLM-L12-v2`\n* `all-mpnet-base-v2`\n* `e5-base-v2`\n* `e5-small-v2`\n* `multilingual-e5-base`\n* `multilingual-e5-small`", - "operationId": "inference-put-hugging-face", + "summary": "Run multiple Fleet searches", + "description": "Run several Fleet searches with a single API request.\nThe API follows the same structure as the multi search API.\nHowever, similar to the Fleet search API, it supports the `wait_for_checkpoints` parameter.", + "operationId": "fleet-msearch-2", "parameters": [ { "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", + "name": "index", + "description": "A single target to search. If the target is an index alias, it must resolve to a single index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.HuggingFaceTaskType" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "$ref": "#/components/schemas/_types.IndexAlias" + } + ] }, "style": "simple" }, { - "in": "path", - "name": "huggingface_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_concurrent_searches", + "description": "Maximum number of concurrent searches the multi search API can execute.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_checkpoints", + "description": "A comma separated list of checkpoints. When configured, the search API will only be executed on a shard\nafter the relevant checkpoint has become visible for search. Defaults to an empty list which will cause\nElasticsearch to immediately execute the search.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fleet._types.Checkpoint" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard request timeouts or shard failures.\nIf false, returns an error with no partial results.\nDefaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.HuggingFaceServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.HuggingFaceServiceSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutHuggingFaceRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/hugging-face-embeddings` to create an inference endpoint that performs a `text_embedding` task type.", - "value": "{\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\", \n \"url\": \"url-endpoint\" \n }\n}" + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.RequestItem" } } } - } + }, + "required": true }, "responses": { "200": { @@ -19608,462 +22525,196 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoHuggingFace" + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.ResponseItem" + } + } + }, + "required": [ + "docs" + ] } } } } }, - "x-state": "Added in 8.12.0", - "x-api-name" : "put_hugging_face", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{jinaai_inference_id}": { - "put": { + "x-state": "Technical preview; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /{index}/_fleet/_fleet_msearch\n
\n ", + "
\n POST\n /{index}/_fleet/_fleet_msearch\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch.fleet", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "inference" + "fleet" ], - "summary": "Create an JinaAI inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `jinaai` service.\n\nTo review the available `rerank` models, refer to .\nTo review the available `text_embedding` models, refer to the .", - "operationId": "inference-put-jinaai", + "summary": "Run multiple Fleet searches", + "description": "Run several Fleet searches with a single API request.\nThe API follows the same structure as the multi search API.\nHowever, similar to the Fleet search API, it supports the `wait_for_checkpoints` parameter.", + "operationId": "fleet-msearch-3", "parameters": [ { "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", + "name": "index", + "description": "A single target to search. If the target is an index alias, it must resolve to a single index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.JinaAITaskType" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "$ref": "#/components/schemas/_types.IndexAlias" + } + ] }, "style": "simple" }, { - "in": "path", - "name": "jinaai_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.JinaAIServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.JinaAIServiceSettings" - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.JinaAITaskSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutJinaAiRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/jinaai-embeddings` to create an inference endpoint for text embedding tasks using the JinaAI service.", - "value": "{\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"api_key\": \"JinaAi-Api-key\"\n }\n}" - }, - "PutJinaAiRequestExample2": { - "summary": "A rerank task", - "description": "Run `PUT _inference/rerank/jinaai-rerank` to create an inference endpoint for rerank tasks using the JinaAI service.", - "value": "{\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"api_key\": \"JinaAI-Api-key\",\n \"model_id\": \"jina-reranker-v2-base-multilingual\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoJinaAi" - } - } - } - } - }, - "x-state": "Added in 8.18.0", - "x-api-name" : "put_jinaai", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{mistral_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create a Mistral inference endpoint", - "description": "Creates an inference endpoint to perform an inference task with the `mistral` service.", - "operationId": "inference-put-mistral", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "task_type", - "description": "The task type.\nThe only valid task type for the model to perform is `text_embedding`.", - "required": true, + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.MistralTaskType" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "mistral_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "expand_wildcards", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.MistralServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.MistralServiceSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutMistralRequestExample1": { - "description": "Run `PUT _inference/text_embedding/mistral-embeddings-test` to create a Mistral inference endpoint that performs a text embedding task.", - "value": "{\n \"service\": \"mistral\",\n \"service_settings\": {\n \"api_key\": \"Mistral-API-Key\",\n \"model\": \"mistral-embed\" \n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoMistral" - } - } - } - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "put_mistral", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{openai_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create an OpenAI inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `openai` service or `openai` compatible APIs.", - "operationId": "inference-put-openai", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", - "required": true, + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.OpenAITaskType" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "openai_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.OpenAIServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.OpenAIServiceSettings" - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.OpenAITaskSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutOpenAiRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/openai-embeddings` to create an inference endpoint that performs a `text_embedding` task. The embeddings created by requests to this endpoint will have 128 dimensions.", - "value": "{\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"text-embedding-3-small\",\n \"dimensions\": 128\n }\n}" - }, - "PutOpenAiRequestExample2": { - "summary": "A completion task", - "description": "Run `PUT _inference/completion/amazon_bedrock_completion` to create an inference endpoint to perform a completion task.", - "value": "{\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-text-premier-v1:0\"\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoOpenAI" - } - } - } - } - }, - "x-state": "Added in 8.12.0", - "x-api-name" : "put_openai", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{voyageai_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create a VoyageAI inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `voyageai` service.\n\nAvoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.", - "operationId": "inference-put-voyageai", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", - "required": true, + "in": "query", + "name": "max_concurrent_searches", + "description": "Maximum number of concurrent searches the multi search API can execute.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.VoyageAITaskType" + "type": "number" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "voyageai_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "number" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "$ref": "#/components/schemas/inference._types.VoyageAIServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.VoyageAIServiceSettings" - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.VoyageAITaskSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutVoyageAIRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/voyageai-embeddings` to create an inference endpoint that performs a `text_embedding` task. The embeddings created by requests to this endpoint will have 512 dimensions.", - "value": "{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n}" - }, - "PutVoyageAIRequestExample2": { - "summary": "A rerank task", - "description": "Run `PUT _inference/rerank/voyageai-rerank` to create an inference endpoint that performs a `rerank` task.", - "value": "{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"rerank-2\"\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoVoyageAI" - } - } - } - } - }, - "x-state": "Added in 8.19.0", - "x-api-name" : "put_voyageai", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{watsonx_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create a Watsonx inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `watsonxai` service.\nYou need an IBM Cloud Databases for Elasticsearch deployment to use the `watsonxai` inference service.\nYou can provision one through the IBM catalog, the Cloud Databases CLI plug-in, the Cloud Databases API, or Terraform.", - "operationId": "inference-put-watsonx", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "task_type", - "description": "The task type.\nThe only valid task type for the model to perform is `text_embedding`.", - "required": true, + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.WatsonxTaskType" + "type": "number" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "watsonx_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, + "in": "query", + "name": "search_type", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.SearchType" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "service": { - "$ref": "#/components/schemas/inference._types.WatsonxServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.WatsonxServiceSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutWatsonxRequestExample1": { - "description": "Run `PUT _inference/text_embedding/watsonx-embeddings` to create an Watonsx inference endpoint that performs a text embedding task.", - "value": "{\n \"service\": \"watsonxai\",\n \"service_settings\": {\n \"api_key\": \"Watsonx-API-Key\", \n \"url\": \"Wastonx-URL\", \n \"model_id\": \"ibm/slate-30m-english-rtrvr\",\n \"project_id\": \"IBM-Cloud-ID\", \n \"api_version\": \"2024-03-14\"\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoWatsonx" - } - } - } - } - }, - "x-state": "Added in 8.16.0", - "x-api-name" : "put_watsonx", - "x-namespace": "inference" - } - }, - "/_inference/rerank/{inference_id}": { - "post": { - "tags": [ - "inference" - ], - "summary": "Perform rereanking inference on the service", - "operationId": "inference-rerank", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "inference_id", - "description": "The unique identifier for the inference endpoint.", - "required": true, + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The amount of time to wait for the inference request to complete.", + "name": "typed_keys", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_checkpoints", + "description": "A comma separated list of checkpoints. When configured, the search API will only be executed on a shard\nafter the relevant checkpoint has become visible for search. Defaults to an empty list which will cause\nElasticsearch to immediately execute the search.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fleet._types.Checkpoint" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard request timeouts or shard failures.\nIf false, returns an error with no partial results.\nDefaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.", + "deprecated": false, + "schema": { + "type": "boolean" }, "style": "form" } @@ -20072,44 +22723,14 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "query": { - "description": "Query input.", - "type": "string" - }, - "input": { - "description": "The text on which you want to perform the inference task.\nIt can be a single string or an array.\n\n> info\n> Inference endpoints for the `completion` task type currently only support a single string as input.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.TaskSettings" - } - }, - "required": [ - "query", - "input" - ] - }, - "examples": { - "RerankRequestExample1": { - "summary": "Rerank task", - "description": "Run `POST _inference/rerank/cohere_rerank` to perform reranking on the example input.", - "value": "{\n \"input\": [\"luke\", \"like\", \"leia\", \"chewy\",\"r2d2\", \"star\", \"wars\"],\n \"query\": \"star wars main character\"\n}" + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.RequestItem" } } } - } + }, + "required": true }, "responses": { "200": { @@ -20117,778 +22738,319 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types.RerankedInferenceResult" - }, - "examples": { - "RerankResponseExample1": { - "summary": "Rerank task", - "description": "A successful response from `POST _inference/rerank/cohere_rerank`.\n", - "value": "{\n \"rerank\": [\n {\n \"index\": \"2\",\n \"relevance_score\": \"0.011597361\",\n \"text\": \"leia\"\n },\n {\n \"index\": \"0\",\n \"relevance_score\": \"0.006338922\",\n \"text\": \"luke\"\n },\n {\n \"index\": \"5\",\n \"relevance_score\": \"0.0016166499\",\n \"text\": \"star\"\n },\n {\n \"index\": \"4\",\n \"relevance_score\": \"0.0011695103\",\n \"text\": \"r2d2\"\n },\n {\n \"index\": \"1\",\n \"relevance_score\": \"5.614787E-4\",\n \"text\": \"like\"\n },\n {\n \"index\": \"6\",\n \"relevance_score\": \"3.7850367E-4\",\n \"text\": \"wars\"\n },\n {\n \"index\": \"3\",\n \"relevance_score\": \"1.2508839E-5\",\n \"text\": \"chewy\"\n }\n ]\n}" - } + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.ResponseItem" + } + } + }, + "required": [ + "docs" + ] } } } } }, - "x-state": "Added in 8.11.0", - "x-api-name" : "rerank", - "x-namespace": "inference" + "x-state": "Technical preview; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /{index}/_fleet/_fleet_msearch\n
\n ", + "
\n POST\n /{index}/_fleet/_fleet_msearch\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch.fleet", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] } }, - "/_inference/sparse_embedding/{inference_id}": { - "post": { + "/{index}/_fleet/_fleet_search": { + "get": { "tags": [ - "inference" + "fleet" ], - "summary": "Perform sparse embedding inference on the service", - "operationId": "inference-sparse-embedding", + "summary": "Run a Fleet search", + "description": "The purpose of the Fleet search API is to provide an API where the search will be run only\nafter the provided checkpoint has been processed and is visible for searches inside of Elasticsearch.", + "operationId": "fleet-search", "parameters": [ { "in": "path", - "name": "inference_id", - "description": "The inference Id", + "name": "index", + "description": "A single target to search. If the target is an index alias, it must resolve to a single index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "$ref": "#/components/schemas/_types.IndexAlias" + } + ] }, "style": "simple" }, { "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait for the inference request to complete.", + "name": "allow_no_indices", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "input": { - "description": "Inference input.\nEither a string or an array of strings.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.TaskSettings" - } - }, - "required": [ - "input" - ] - }, - "examples": { - "SparseEmbeddingRequestExample1": { - "summary": "Sparse embedding task", - "description": "Run `POST _inference/sparse_embedding/my-elser-model` to perform sparse embedding on the example sentence.", - "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\"\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.SparseEmbeddingInferenceResult" - }, - "examples": { - "SparseEmbeddingResponseExample1": { - "summary": "Sparse embedding task", - "description": "An abbreviated response from `POST _inference/sparse_embedding/my-elser-model`.\n", - "value": "{\n \"sparse_embedding\": [\n {\n \"port\": 2.1259406,\n \"sky\": 1.7073475,\n \"color\": 1.6922266,\n \"dead\": 1.6247464,\n \"television\": 1.3525393,\n \"above\": 1.2425821,\n \"tuned\": 1.1440028,\n \"colors\": 1.1218185,\n \"tv\": 1.0111054,\n \"ports\": 1.0067928,\n \"poem\": 1.0042328,\n \"channel\": 0.99471164,\n \"tune\": 0.96235967,\n \"scene\": 0.9020516\n }\n ]\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "sparse_embedding", - "x-namespace": "inference" - } - }, - "/_inference/completion/{inference_id}/_stream": { - "post": { - "tags": [ - "inference" - ], - "summary": "Perform streaming inference", - "description": "Get real-time responses for completion tasks by delivering answers incrementally, reducing response times during computation.\nThis API works only with the completion task type.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThis API requires the `monitor_inference` cluster privilege (the built-in `inference_admin` and `inference_user` roles grant this privilege). You must use a client that supports streaming.", - "operationId": "inference-stream-completion", - "parameters": [ + }, { - "in": "path", - "name": "inference_id", - "description": "The unique identifier for the inference endpoint.", - "required": true, + "in": "query", + "name": "analyzer", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "string" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "input": { - "description": "The text on which you want to perform the inference task.\nIt can be a single string or an array.\n\nNOTE: Inference endpoints for the completion task type currently only support a single string as input.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.TaskSettings" - } - }, - "required": [ - "input" - ] - }, - "examples": { - "StreamInferenceRequestExample1": { - "summary": "Perform a completion task", - "description": "Run `POST _inference/completion/openai-completion/_stream` to perform a completion on the example question with streaming.", - "value": "{\n \"input\": \"What is Elastic?\"\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.StreamResult" - } - } - } - } - }, - "x-state": "Added in 8.16.0", - "x-api-name" : "stream_completion", - "x-namespace": "inference" - } - }, - "/_inference/text_embedding/{inference_id}": { - "post": { - "tags": [ - "inference" - ], - "summary": "Perform text embedding inference on the service", - "operationId": "inference-text-embedding", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "inference_id", - "description": "The inference Id", - "required": true, + "in": "query", + "name": "analyze_wildcard", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait for the inference request to complete.", + "name": "batched_reduce_size", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "input": { - "description": "Inference input.\nEither a string or an array of strings.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.TaskSettings" - } - }, - "required": [ - "input" - ] - }, - "examples": { - "TextEmbeddingRequestExample1": { - "summary": "Text embedding task", - "description": "Run `POST _inference/text_embedding/my-cohere-endpoint` to perform text embedding on the example sentence using the Cohere integration,", - "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\": {\n \"input_type\": \"ingest\"\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.TextEmbeddingInferenceResult" - }, - "examples": { - "TextEmbeddingResponseExample1": { - "summary": "Text embedding task", - "description": "An abbreviated response from `POST _inference/text_embedding/my-cohere-endpoint`.\n", - "value": "{\n \"text_embedding\": [\n {\n \"embedding\": [\n {\n 0.018569946,\n -0.036895752,\n 0.01486969,\n -0.0045204163,\n -0.04385376,\n 0.0075950623,\n 0.04260254,\n -0.004005432,\n 0.007865906,\n 0.030792236,\n -0.050476074,\n 0.011795044,\n -0.011642456,\n -0.010070801\n }\n ]\n }\n ]\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.11.0", - "x-api-name" : "text_embedding", - "x-namespace": "inference" - } - }, - "/_inference/{inference_id}/_update": { - "put": { - "tags": [ - "inference" - ], - "summary": "Update an inference endpoint", - "description": "Modify `task_settings`, secrets (within `service_settings`), or `num_allocations` for an inference endpoint, depending on the specific endpoint service and `task_type`.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", - "operationId": "inference-update", - "parameters": [ - { - "$ref": "#/components/parameters/inference.update-inference_id" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/inference.update" - }, - "responses": { - "200": { - "$ref": "#/components/responses/inference.update-200" - } - }, - "x-state": "Added in 8.17.0", - "x-api-name" : "update", - "x-namespace": "inference" - } - }, - "/_inference/{task_type}/{inference_id}/_update": { - "put": { - "tags": [ - "inference" - ], - "summary": "Update an inference endpoint", - "description": "Modify `task_settings`, secrets (within `service_settings`), or `num_allocations` for an inference endpoint, depending on the specific endpoint service and `task_type`.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", - "operationId": "inference-update-1", - "parameters": [ - { - "$ref": "#/components/parameters/inference.update-task_type" }, { - "$ref": "#/components/parameters/inference.update-inference_id" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/inference.update" - }, - "responses": { - "200": { - "$ref": "#/components/responses/inference.update-200" - } - }, - "x-state": "Added in 8.17.0", - "x-api-name" : "update", - "x-namespace": "inference" - } - }, - "/": { - "get": { - "tags": [ - "info" - ], - "summary": "Get cluster info", - "description": "Get basic build, version, and cluster information.", - "operationId": "info", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "cluster_uuid": { - "$ref": "#/components/schemas/_types.Uuid" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "tagline": { - "type": "string" - }, - "version": { - "$ref": "#/components/schemas/_types.ElasticsearchVersionInfo" - } - }, - "required": [ - "cluster_name", - "cluster_uuid", - "name", - "tagline", - "version" - ] - }, - "examples": { - "RootNodeInfoResponseExample1": { - "description": "A successful response from `GET /`s.", - "value": "{\n \"name\": \"instance-0000000000\",\n \"cluster_name\": \"my_test_cluster\",\n \"cluster_uuid\": \"5QaxoN0pRZuOmWSxstBBwQ\",\n \"version\": {\n \"build_date\": \"2024-02-01T13:07:13.727175297Z\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"build_hash\": \"6185ba65d27469afabc9bc951cded6c17c21e3f3\",\n \"number\": \"8.12.1\",\n \"lucene_version\": \"9.9.2\",\n \"minimum_index_compatibility_version\": \"7.0.0\",\n \"build_flavor\": \"default\",\n \"build_snapshot\": false,\n \"build_type\": \"docker\"\n },\n \"tagline\": \"You Know, for Search\"\n}" - } - } - } - } - } - }, - "x-api-name": "info" - }, - "head": { - "tags": [ - "cluster" - ], - "summary": "Ping the cluster", - "description": "Get information about whether the cluster is running.", - "operationId": "ping", - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "x-api-name": "ping" - } - }, - "/_ingest/geoip/database/{id}": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Get GeoIP database configurations", - "description": "Get information about one or more IP geolocation database configurations.", - "operationId": "ingest-get-geoip-database-1", - "parameters": [ - { - "$ref": "#/components/parameters/ingest.get_geoip_database-id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ingest.get_geoip_database-200" - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "get_geoip_database", - "x-namespace": "ingest" - }, - "put": { - "tags": [ - "ingest" - ], - "summary": "Create or update a GeoIP database configuration", - "description": "Refer to the create or update IP geolocation database configuration API.", - "operationId": "ingest-put-geoip-database", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "ID of the database configuration to create or update.", - "required": true, + "in": "query", + "name": "ccs_minimize_roundtrips", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "default_operator", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.query_dsl.Operator" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "df", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "maxmind": { - "$ref": "#/components/schemas/ingest._types.Maxmind" - } - }, - "required": [ - "name", - "maxmind" - ] - } - } }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "put_geoip_database", - "x-namespace": "ingest" - }, - "delete": { - "tags": [ - "ingest" - ], - "summary": "Delete GeoIP database configurations", - "description": "Delete one or more IP geolocation database configurations.", - "operationId": "ingest-delete-geoip-database", - "parameters": [ { - "in": "path", - "name": "id", - "description": "A comma-separated list of geoip database configurations to delete", - "required": true, + "in": "query", + "name": "docvalue_fields", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Ids" + "$ref": "#/components/schemas/_types.Fields" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "expand_wildcards", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "explain", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "delete_geoip_database", - "x-namespace": "ingest" - } - }, - "/_ingest/ip_location/database/{id}": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Get IP geolocation database configurations", - "operationId": "ingest-get-ip-location-database-1", - "parameters": [ - { - "$ref": "#/components/parameters/ingest.get_ip_location_database-id" }, { - "$ref": "#/components/parameters/ingest.get_ip_location_database-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ingest.get_ip_location_database-200" - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "get_ip_location_database", - "x-namespace": "ingest" - }, - "put": { - "tags": [ - "ingest" - ], - "summary": "Create or update an IP geolocation database configuration", - "operationId": "ingest-put-ip-location-database", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The database configuration identifier.", - "required": true, + "in": "query", + "name": "ignore_throttled", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", + "name": "ignore_unavailable", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response indicates that it was not completely acknowledged.\nA value of `-1` indicates that the request should never time out.", + "name": "lenient", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ingest._types.DatabaseConfiguration" - } - } }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "put_ip_location_database", - "x-namespace": "ingest" - }, - "delete": { - "tags": [ - "ingest" - ], - "summary": "Delete IP geolocation database configurations", - "operationId": "ingest-delete-ip-location-database", - "parameters": [ { - "in": "path", - "name": "id", - "description": "A comma-separated list of IP location database configurations.", - "required": true, + "in": "query", + "name": "max_concurrent_shard_requests", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Ids" + "type": "number" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", + "name": "preference", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", + "name": "pre_filter_shard_size", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } + }, + { + "in": "query", + "name": "request_cache", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "stats", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" } - } - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "delete_ip_location_database", - "x-namespace": "ingest" - } - }, - "/_ingest/pipeline/{id}": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Get pipelines", - "description": "Get information about one or more ingest pipelines.\nThis API returns a local reference of the pipeline.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines" - }, - "operationId": "ingest-get-pipeline-1", - "parameters": [ + }, + "style": "form" + }, { - "$ref": "#/components/parameters/ingest.get_pipeline-id" + "in": "query", + "name": "stored_fields", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ingest.get_pipeline-master_timeout" + "in": "query", + "name": "suggest_field", + "description": "Specifies which field to use for suggestions.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ingest.get_pipeline-summary" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ingest.get_pipeline-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "get_pipeline", - "x-namespace": "ingest" - }, - "put": { - "tags": [ - "ingest" - ], - "summary": "Create or update a pipeline", - "description": "Changes made using this API take effect immediately.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines" - }, - "operationId": "ingest-put-pipeline", - "parameters": [ + "in": "query", + "name": "suggest_mode", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SuggestMode" + }, + "style": "form" + }, { - "in": "path", - "name": "id", - "description": "ID of the ingest pipeline to create or update.", - "required": true, + "in": "query", + "name": "suggest_size", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "number" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "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.", + "name": "suggest_text", + "description": "The source text for which the suggestions should be returned.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "terminate_after", + "deprecated": false, + "schema": { + "type": "number" }, "style": "form" }, { "in": "query", "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -20897,11 +23059,151 @@ }, { "in": "query", - "name": "if_version", - "description": "Required version for optimistic concurrency control for pipeline updates", + "name": "track_total_hits", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, + { + "in": "query", + "name": "track_scores", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_excludes", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_includes", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "seq_no_primary_term", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "q", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_checkpoints", + "description": "A comma separated list of checkpoints. When configured, the search API will only be executed on a shard\nafter the relevant checkpoint has become visible for search. Defaults to an empty list which will cause\nElasticsearch to immediately execute the search.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fleet._types.Checkpoint" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard request timeouts or shard failures.\nIf false, returns an error with no partial results.\nDefaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.", + "deprecated": false, + "schema": { + "type": "boolean" }, "style": "form" } @@ -20912,46 +23214,215 @@ "schema": { "type": "object", "properties": { - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } }, - "description": { - "description": "Description of the ingest pipeline.", - "type": "string" + "collapse": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] }, - "on_failure": { - "description": "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.", + "explain": { + "description": "If true, returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "description": "Boosts the _score of documents from specified indices.", "type": "array", "items": { - "$ref": "#/components/schemas/ingest._types.ProcessorContainer" + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 } }, - "processors": { - "description": "Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified.", + "docvalue_fields": { + "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", "type": "array", "items": { - "$ref": "#/components/schemas/ingest._types.ProcessorContainer" + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in search results and results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "type": "boolean" + }, + "query": { + "description": "Defines the search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "default": 10.0, + "type": "number" + }, + "slice": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "description": "Indicates which source fields are returned for matching documents. These\nfields are returned in the hits._source property of the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" } }, + "suggest": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "description": "If true, returns document version as part of a hit.", + "default": false, + "type": "boolean" }, - "deprecated": { - "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "seq_no_primary_term": { + "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", "type": "boolean" + }, + "stored_fields": { + "description": "List of stored fields to return as part of a hit. If no fields are specified,\nno stored fields are included in the response. If this field is specified, the _source\nparameter defaults to false. You can pass _source: true to return both source fields\nand stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limits the search to a point in time (PIT). If you provide a PIT, you\ncannot specify an in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "description": "Defines one or more runtime fields in the search request. These fields take\nprecedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", + "type": "array", + "items": { + "type": "string" + } } } - }, - "examples": { - "PutPipelineRequestExample1": { - "summary": "Create an ingest pipeline.", - "value": "{\n \"description\" : \"My optional pipeline description\",\n \"processors\" : [\n {\n \"set\" : {\n \"description\" : \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ]\n}" - }, - "PutPipelineRequestExample2": { - "summary": "Create an ingest pipeline with metadata.", - "description": "You can use the `_meta` parameter to add arbitrary metadata to a pipeline.", - "value": "{\n \"description\" : \"My optional pipeline description\",\n \"processors\" : [\n {\n \"set\" : {\n \"description\" : \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ],\n \"_meta\": {\n \"reason\": \"set my-keyword-field to foo\",\n \"serialization\": {\n \"class\": \"MyPipeline\",\n \"id\": 10\n }\n }\n}" - } } } }, @@ -20963,348 +23434,226 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" + } + }, + "_clusters": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "max_score": { + "type": "number" + }, + "num_reduce_phases": { + "type": "number" + }, + "profile": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Profile" + } + ] + }, + "pit_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_scroll_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] + }, + "suggest": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Suggest" + } + } + }, + "terminated_early": { + "type": "boolean" + } + }, + "required": [ + "took", + "timed_out", + "_shards", + "hits" + ] } } } } }, - "x-state": "Added in 5.0.0", - "x-api-name" : "put_pipeline", - "x-namespace": "ingest" + "x-state": "Technical preview; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /{index}/_fleet/_fleet_search\n
\n ", + "
\n POST\n /{index}/_fleet/_fleet_search\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search.fleet", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] }, - "delete": { + "post": { "tags": [ - "ingest" + "fleet" ], - "summary": "Delete pipelines", - "description": "Delete one or more ingest pipelines.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines" - }, - "operationId": "ingest-delete-pipeline", + "summary": "Run a Fleet search", + "description": "The purpose of the Fleet search API is to provide an API where the search will be run only\nafter the provided checkpoint has been processed and is visible for searches inside of Elasticsearch.", + "operationId": "fleet-search-1", "parameters": [ { "in": "path", - "name": "id", - "description": "Pipeline ID or wildcard expression of pipeline IDs used to limit the request.\nTo delete all ingest pipelines in a cluster, use a value of `*`.", + "name": "index", + "description": "A single target to search. If the target is an index alias, it must resolve to a single index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "$ref": "#/components/schemas/_types.IndexAlias" + } + ] }, "style": "simple" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "allow_no_indices", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "analyzer", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "delete_pipeline", - "x-namespace": "ingest" - } - }, - "/_ingest/geoip/stats": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Get GeoIP statistics", - "description": "Get download statistics for GeoIP2 databases that are used with the GeoIP processor.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/enrich-processor/geoip-processor" - }, - "operationId": "ingest-geo-ip-stats", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "stats": { - "$ref": "#/components/schemas/ingest.geo_ip_stats.GeoIpDownloadStatistics" - }, - "nodes": { - "description": "Downloaded GeoIP2 databases for each node.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ingest.geo_ip_stats.GeoIpNodeDatabases" - } - } - }, - "required": [ - "stats", - "nodes" - ] - } - } - } - } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "geo_ip_stats", - "x-namespace": "ingest" - } - }, - "/_ingest/geoip/database": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Get GeoIP database configurations", - "description": "Get information about one or more IP geolocation database configurations.", - "operationId": "ingest-get-geoip-database", - "responses": { - "200": { - "$ref": "#/components/responses/ingest.get_geoip_database-200" - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "get_geoip_database", - "x-namespace": "ingest" - } - }, - "/_ingest/ip_location/database": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Get IP geolocation database configurations", - "operationId": "ingest-get-ip-location-database", - "parameters": [ - { - "$ref": "#/components/parameters/ingest.get_ip_location_database-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ingest.get_ip_location_database-200" - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "get_ip_location_database", - "x-namespace": "ingest" - } - }, - "/_ingest/pipeline": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Get pipelines", - "description": "Get information about one or more ingest pipelines.\nThis API returns a local reference of the pipeline.", - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines" - }, - "operationId": "ingest-get-pipeline", - "parameters": [ - { - "$ref": "#/components/parameters/ingest.get_pipeline-master_timeout" }, { - "$ref": "#/components/parameters/ingest.get_pipeline-summary" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ingest.get_pipeline-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "get_pipeline", - "x-namespace": "ingest" - } - }, - "/_ingest/processor/grok": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Run a grok processor", - "description": "Extract structured fields out of a single text field within a document.\nYou must choose which field to extract matched fields from, as well as the grok pattern you expect will match.\nA grok pattern is like a regular expression that supports aliased expressions that can be reused.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/enrich-processor/grok-processor" - }, - "operationId": "ingest-processor-grok", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "patterns": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "required": [ - "patterns" - ] - } - } - } - } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "processor_grok", - "x-namespace": "ingest" - } - }, - "/_ingest/pipeline/_simulate": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Simulate a pipeline", - "description": "Run an ingest pipeline against a set of provided documents.\nYou can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.", - "operationId": "ingest-simulate", - "parameters": [ + "in": "query", + "name": "analyze_wildcard", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/ingest.simulate-verbose" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ingest.simulate" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ingest.simulate-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "simulate", - "x-namespace": "ingest" - }, - "post": { - "tags": [ - "ingest" - ], - "summary": "Simulate a pipeline", - "description": "Run an ingest pipeline against a set of provided documents.\nYou can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.", - "operationId": "ingest-simulate-1", - "parameters": [ + "in": "query", + "name": "batched_reduce_size", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/ingest.simulate-verbose" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ingest.simulate" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ingest.simulate-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "simulate", - "x-namespace": "ingest" - } - }, - "/_ingest/pipeline/{id}/_simulate": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Simulate a pipeline", - "description": "Run an ingest pipeline against a set of provided documents.\nYou can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.", - "operationId": "ingest-simulate-2", - "parameters": [ + "in": "query", + "name": "ccs_minimize_roundtrips", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/ingest.simulate-id" + "in": "query", + "name": "default_operator", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ingest.simulate-verbose" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ingest.simulate" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ingest.simulate-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "simulate", - "x-namespace": "ingest" - }, - "post": { - "tags": [ - "ingest" - ], - "summary": "Simulate a pipeline", - "description": "Run an ingest pipeline against a set of provided documents.\nYou can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.", - "operationId": "ingest-simulate-3", - "parameters": [ + "in": "query", + "name": "df", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/ingest.simulate-id" + "in": "query", + "name": "docvalue_fields", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ingest.simulate-verbose" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ingest.simulate" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ingest.simulate-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name" : "simulate", - "x-namespace": "ingest" - } - }, - "/_license": { - "get": { - "tags": [ - "license" - ], - "summary": "Get license information", - "description": "Get information about your Elastic license including its type, its status, when it was issued, and when it expires.\n\n>info\n> If the master node is generating a new cluster state, the get license API may return a `404 Not Found` response.\n> If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.", - "operationId": "license-get", - "parameters": [ + "in": "query", + "name": "expand_wildcards", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, { "in": "query", - "name": "accept_enterprise", - "description": "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.\nThis parameter is deprecated and will always be set to true in 8.x.", - "deprecated": true, + "name": "explain", + "deprecated": false, "schema": { "type": "boolean" }, @@ -21312,239 +23661,61 @@ }, { "in": "query", - "name": "local", - "description": "Specifies whether to retrieve local information. The default value is `false`, which means the information is retrieved from the master node.", + "name": "ignore_throttled", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "license": { - "$ref": "#/components/schemas/license.get.LicenseInformation" - } - }, - "required": [ - "license" - ] - }, - "examples": { - "GetLicenseResponseExample1": { - "description": "A successful response from `GET /_license`.", - "value": "{\n \"license\" : {\n \"status\" : \"active\",\n \"uid\" : \"cbff45e7-c553-41f7-ae4f-9205eabd80xx\",\n \"type\" : \"trial\",\n \"issue_date\" : \"2018-10-20T22:05:12.332Z\",\n \"issue_date_in_millis\" : 1540073112332,\n \"expiry_date\" : \"2018-11-19T22:05:12.332Z\",\n \"expiry_date_in_millis\" : 1542665112332,\n \"max_nodes\" : 1000,\n \"max_resource_units\" : null,\n \"issued_to\" : \"test\",\n \"issuer\" : \"elasticsearch\",\n \"start_date_in_millis\" : -1\n }\n}" - } - } - } - } - } - }, - "x-api-name" : "get", - "x-namespace": "license" - }, - "put": { - "tags": [ - "license" - ], - "summary": "Update the license", - "description": "You can update your license at runtime without shutting down your nodes.\nLicense updates take effect immediately.\nIf the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response.\nYou must then re-submit the API request with the acknowledge parameter set to true.\n\nNOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license.\nIf the operator privileges feature is enabled, only operator users can use this API.", - "operationId": "license-post", - "parameters": [ - { - "$ref": "#/components/parameters/license.post-acknowledge" }, { - "$ref": "#/components/parameters/license.post-master_timeout" + "in": "query", + "name": "ignore_unavailable", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/license.post-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/license.post" - }, - "responses": { - "200": { - "$ref": "#/components/responses/license.post-200" - } - }, - "x-api-name" : "post", - "x-namespace": "license" - }, - "post": { - "tags": [ - "license" - ], - "summary": "Update the license", - "description": "You can update your license at runtime without shutting down your nodes.\nLicense updates take effect immediately.\nIf the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response.\nYou must then re-submit the API request with the acknowledge parameter set to true.\n\nNOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license.\nIf the operator privileges feature is enabled, only operator users can use this API.", - "operationId": "license-post-1", - "parameters": [ - { - "$ref": "#/components/parameters/license.post-acknowledge" + "in": "query", + "name": "lenient", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/license.post-master_timeout" + "in": "query", + "name": "max_concurrent_shard_requests", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - { - "$ref": "#/components/parameters/license.post-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/license.post" - }, - "responses": { - "200": { - "$ref": "#/components/responses/license.post-200" - } - }, - "x-api-name" : "post", - "x-namespace": "license" - }, - "delete": { - "tags": [ - "license" - ], - "summary": "Delete the license", - "description": "When the license expires, your subscription level reverts to Basic.\n\nIf the operator privileges feature is enabled, only operator users can use this API.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/license/manage-your-license-in-self-managed-cluster" - }, - "operationId": "license-delete", - "parameters": [ { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.", + "name": "preference", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "pre_filter_shard_size", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-api-name" : "delete", - "x-namespace": "license" - } - }, - "/_license/basic_status": { - "get": { - "tags": [ - "license" - ], - "summary": "Get the basic license status", - "operationId": "license-get-basic-status", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "eligible_to_start_basic": { - "type": "boolean" - } - }, - "required": [ - "eligible_to_start_basic" - ] - }, - "examples": { - "GetBasicLicenseStatusResponseExample1": { - "description": "A successful response from `GET /_license/basic_status`.", - "value": "{\n \"eligible_to_start_basic\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.3.0", - "x-api-name" : "get_basic_status", - "x-namespace": "license" - } - }, - "/_license/trial_status": { - "get": { - "tags": [ - "license" - ], - "summary": "Get the trial status", - "operationId": "license-get-trial-status", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "eligible_to_start_trial": { - "type": "boolean" - } - }, - "required": [ - "eligible_to_start_trial" - ] - }, - "examples": { - "GetTrialLicenseStatusResponseExample1": { - "description": "A successful response from `GET /_license/trial_status`.", - "value": "{\n \"eligible_to_start_trial\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "get_trial_status", - "x-namespace": "license" - } - }, - "/_license/start_basic": { - "post": { - "tags": [ - "license" - ], - "summary": "Start a basic license", - "description": "Start an indefinite basic license, which gives access to all the basic features.\n\nNOTE: In order to start a basic license, you must not currently have a basic license.\n\nIf the basic license does not support all of the features that are available with your current license, however, you are notified in the response.\nYou must then re-submit the API request with the `acknowledge` parameter set to `true`.\n\nTo check the status of your basic license, use the get basic license API.", - "operationId": "license-post-start-basic", - "parameters": [ + }, { "in": "query", - "name": "acknowledge", - "description": "whether the user has acknowledged acknowledge messages (default: false)", + "name": "request_cache", "deprecated": false, "schema": { "type": "boolean" @@ -21553,575 +23724,479 @@ }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "name": "routing", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "scroll", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "basic_was_started": { - "type": "boolean" - }, - "error_message": { - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/license._types.LicenseType" - }, - "acknowledge": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } - } - }, - "required": [ - "acknowledged", - "basic_was_started" - ] - }, - "examples": { - "StartBasicLicenseResponseExample1": { - "description": "A successful response from `POST /_license/start_basic?acknowledge=true`. If you currently have a license with more features than a basic license and you start a basic license, you must pass the acknowledge parameter.", - "value": "{\n \"basic_was_started\": true,\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.3.0", - "x-api-name" : "post_start_basic", - "x-namespace": "license" - } - }, - "/_license/start_trial": { - "post": { - "tags": [ - "license" - ], - "summary": "Start a trial", - "description": "Start a 30-day trial, which gives access to all subscription features.\n\nNOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version.\nFor example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at https://www.elastic.co/trialextension.\n\nTo check the status of your trial, use the get trial status API.", - "operationId": "license-post-start-trial", - "parameters": [ + }, { "in": "query", - "name": "acknowledge", - "description": "whether the user has acknowledged acknowledge messages (default: false)", + "name": "search_type", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.SearchType" }, "style": "form" }, { "in": "query", - "name": "type_query_string", + "name": "stats", "deprecated": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } }, "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "name": "stored_fields", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "error_message": { - "type": "string" - }, - "trial_was_started": { - "type": "boolean" - }, - "type": { - "$ref": "#/components/schemas/license._types.LicenseType" - } - }, - "required": [ - "acknowledged", - "trial_was_started" - ] - }, - "examples": { - "StartTrialLicenseResponseExample1": { - "description": "A successful response from `POST /_license/start_trial?acknowledge=true`.", - "value": "{\n \"trial_was_started\": true,\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "post_start_trial", - "x-namespace": "license" - } - }, - "/_logstash/pipeline/{id}": { - "get": { - "tags": [ - "logstash" - ], - "summary": "Get Logstash pipelines", - "description": "Get pipelines that are used for Logstash Central Management.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management" - }, - "operationId": "logstash-get-pipeline-1", - "parameters": [ - { - "$ref": "#/components/parameters/logstash.get_pipeline-id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/logstash.get_pipeline-200" - } - }, - "x-state": "Added in 7.12.0", - "x-api-name" : "get_pipeline", - "x-namespace": "logstash" - }, - "put": { - "tags": [ - "logstash" - ], - "summary": "Create or update a Logstash pipeline", - "description": "Create a pipeline that is used for Logstash Central Management.\nIf the specified pipeline exists, it is replaced.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management" - }, - "operationId": "logstash-put-pipeline", - "parameters": [ + }, { - "in": "path", - "name": "id", - "description": "An identifier for the pipeline.", - "required": true, + "in": "query", + "name": "suggest_field", + "description": "Specifies which field to use for suggestions.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Field" }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/logstash._types.Pipeline" - }, - "examples": { - "LogstashPutPipelineRequestExample1": { - "summary": "Create a pipeline", - "description": "Run `PUT _logstash/pipeline/my_pipeline` to create a pipeline.", - "value": "{\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": 1\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n}" - } - } - } + "style": "form" }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "x-state": "Added in 7.12.0", - "x-api-name" : "put_pipeline", - "x-namespace": "logstash" - }, - "delete": { - "tags": [ - "logstash" - ], - "summary": "Delete a Logstash pipeline", - "description": "Delete a pipeline that is used for Logstash Central Management.\nIf the request succeeds, you receive an empty response with an appropriate status code.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management" - }, - "operationId": "logstash-delete-pipeline", - "parameters": [ { - "in": "path", - "name": "id", - "description": "An identifier for the pipeline.", - "required": true, + "in": "query", + "name": "suggest_mode", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.SuggestMode" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "x-state": "Added in 7.12.0", - "x-api-name" : "delete_pipeline", - "x-namespace": "logstash" - } - }, - "/_logstash/pipeline": { - "get": { - "tags": [ - "logstash" - ], - "summary": "Get Logstash pipelines", - "description": "Get pipelines that are used for Logstash Central Management.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management" - }, - "operationId": "logstash-get-pipeline", - "responses": { - "200": { - "$ref": "#/components/responses/logstash.get_pipeline-200" - } - }, - "x-state": "Added in 7.12.0", - "x-api-name" : "get_pipeline", - "x-namespace": "logstash" - } - }, - "/_mget": { - "get": { - "tags": [ - "document" - ], - "summary": "Get multiple documents", - "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", - "operationId": "mget", - "parameters": [ - { - "$ref": "#/components/parameters/mget-preference" - }, - { - "$ref": "#/components/parameters/mget-realtime" - }, - { - "$ref": "#/components/parameters/mget-refresh" - }, - { - "$ref": "#/components/parameters/mget-routing" - }, - { - "$ref": "#/components/parameters/mget-_source" - }, - { - "$ref": "#/components/parameters/mget-_source_excludes" - }, - { - "$ref": "#/components/parameters/mget-_source_includes" - }, - { - "$ref": "#/components/parameters/mget-stored_fields" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/mget" - }, - "responses": { - "200": { - "$ref": "#/components/responses/mget-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name": "mget" - }, - "post": { - "tags": [ - "document" - ], - "summary": "Get multiple documents", - "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", - "operationId": "mget-1", - "parameters": [ - { - "$ref": "#/components/parameters/mget-preference" - }, - { - "$ref": "#/components/parameters/mget-realtime" - }, - { - "$ref": "#/components/parameters/mget-refresh" - }, - { - "$ref": "#/components/parameters/mget-routing" - }, - { - "$ref": "#/components/parameters/mget-_source" + "style": "form" }, { - "$ref": "#/components/parameters/mget-_source_excludes" + "in": "query", + "name": "suggest_size", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-_source_includes" + "in": "query", + "name": "suggest_text", + "description": "The source text for which the suggestions should be returned.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-stored_fields" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/mget" - }, - "responses": { - "200": { - "$ref": "#/components/responses/mget-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name": "mget" - } - }, - "/{index}/_mget": { - "get": { - "tags": [ - "document" - ], - "summary": "Get multiple documents", - "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", - "operationId": "mget-2", - "parameters": [ - { - "$ref": "#/components/parameters/mget-index" + "in": "query", + "name": "terminate_after", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-preference" + "in": "query", + "name": "timeout", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-realtime" + "in": "query", + "name": "track_total_hits", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-refresh" + "in": "query", + "name": "track_scores", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-routing" + "in": "query", + "name": "typed_keys", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-_source" + "in": "query", + "name": "rest_total_hits_as_int", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-_source_excludes" + "in": "query", + "name": "version", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-_source_includes" + "in": "query", + "name": "_source", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-stored_fields" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/mget" - }, - "responses": { - "200": { - "$ref": "#/components/responses/mget-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name": "mget" - }, - "post": { - "tags": [ - "document" - ], - "summary": "Get multiple documents", - "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", - "operationId": "mget-3", - "parameters": [ - { - "$ref": "#/components/parameters/mget-index" + "in": "query", + "name": "_source_excludes", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-preference" + "in": "query", + "name": "_source_includes", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-realtime" + "in": "query", + "name": "seq_no_primary_term", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-refresh" + "in": "query", + "name": "q", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-routing" + "in": "query", + "name": "size", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-_source" + "in": "query", + "name": "from", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-_source_excludes" + "in": "query", + "name": "sort", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-_source_includes" + "in": "query", + "name": "wait_for_checkpoints", + "description": "A comma separated list of checkpoints. When configured, the search API will only be executed on a shard\nafter the relevant checkpoint has become visible for search. Defaults to an empty list which will cause\nElasticsearch to immediately execute the search.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fleet._types.Checkpoint" + } + }, + "style": "form" }, { - "$ref": "#/components/parameters/mget-stored_fields" + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard request timeouts or shard failures.\nIf false, returns an error with no partial results.\nDefaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/mget" - }, - "responses": { - "200": { - "$ref": "#/components/responses/mget-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name": "mget" - } - }, - "/_migration/deprecations": { - "get": { - "tags": [ - "migration" - ], - "summary": "Get deprecation information", - "description": "Get information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.\n\nTIP: This APIs is designed for indirect use by the Upgrade Assistant.\nYou are strongly recommended to use the Upgrade Assistant.", - "operationId": "migration-deprecations", - "responses": { - "200": { - "$ref": "#/components/responses/migration.deprecations-200" - } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "deprecations", - "x-namespace": "migration" - } - }, - "/{index}/_migration/deprecations": { - "get": { - "tags": [ - "migration" - ], - "summary": "Get deprecation information", - "description": "Get information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.\n\nTIP: This APIs is designed for indirect use by the Upgrade Assistant.\nYou are strongly recommended to use the Upgrade Assistant.", - "operationId": "migration-deprecations-1", - "parameters": [ - { - "$ref": "#/components/parameters/migration.deprecations-index" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/migration.deprecations-200" - } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "deprecations", - "x-namespace": "migration" - } - }, - "/_migration/system_features": { - "get": { - "tags": [ - "migration" - ], - "summary": "Get feature migration information", - "description": "Version upgrades sometimes require changes to how features store configuration information and data in system indices.\nCheck which features need to be migrated and the status of any migrations that are in progress.\n\nTIP: This API is designed for indirect use by the Upgrade Assistant.\nYou are strongly recommended to use the Upgrade Assistant.", - "operationId": "migration-get-feature-upgrade-status", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "features": { - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.get_feature_upgrade_status.MigrationFeature" - } - }, - "migration_status": { - "$ref": "#/components/schemas/migration.get_feature_upgrade_status.MigrationStatus" - } - }, - "required": [ - "features", - "migration_status" - ] - }, - "examples": { - "GetFeatureUpgradeStatusResponseExample1": { - "description": "A successful response from `GET /_migration/system_features`.", - "value": "{\n \"features\" : [\n {\n \"feature_name\" : \"async_search\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"enrich\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"ent_search\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"fleet\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"geoip\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"kibana\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"logstash_management\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"machine_learning\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"searchable_snapshots\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"security\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"synonyms\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"tasks\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"transform\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"watcher\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n }\n ],\n \"migration_status\" : \"NO_MIGRATION_NEEDED\"\n}" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "collapse": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "explain": { + "description": "If true, returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "description": "Boosts the _score of documents from specified indices.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in search results and results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "type": "boolean" + }, + "query": { + "description": "Defines the search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "default": 10.0, + "type": "number" + }, + "slice": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "description": "Indicates which source fields are returned for matching documents. These\nfields are returned in the hits._source property of the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "suggest": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If true, returns document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", + "type": "boolean" + }, + "stored_fields": { + "description": "List of stored fields to return as part of a hit. If no fields are specified,\nno stored fields are included in the response. If this field is specified, the _source\nparameter defaults to false. You can pass _source: true to return both source fields\nand stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limits the search to a point in time (PIT). If you provide a PIT, you\ncannot specify an in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "description": "Defines one or more runtime fields in the search request. These fields take\nprecedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", + "type": "array", + "items": { + "type": "string" + } } } } } - } + }, + "required": true }, - "x-state": "Added in 7.16.0", - "x-api-name" : "get_feature_upgrade_status", - "x-namespace": "migration" - }, - "post": { - "tags": [ - "migration" - ], - "summary": "Start the feature migration", - "description": "Version upgrades sometimes require changes to how features store configuration information and data in system indices.\nThis API starts the automatic migration process.\n\nSome functionality might be temporarily unavailable during the migration process.\n\nTIP: The API is designed for indirect use by the Upgrade Assistant. We strongly recommend you use the Upgrade Assistant.", - "operationId": "migration-post-feature-upgrade", "responses": { "200": { "description": "", @@ -22130,59 +24205,170 @@ "schema": { "type": "object", "properties": { - "accepted": { + "took": { + "type": "number" + }, + "timed_out": { "type": "boolean" }, - "features": { - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.post_feature_upgrade.MigrationFeature" + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" } }, - "reason": { - "type": "string" + "_clusters": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "max_score": { + "type": "number" + }, + "num_reduce_phases": { + "type": "number" + }, + "profile": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Profile" + } + ] + }, + "pit_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_scroll_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] + }, + "suggest": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Suggest" + } + } + }, + "terminated_early": { + "type": "boolean" } }, "required": [ - "accepted" + "took", + "timed_out", + "_shards", + "hits" ] - }, - "examples": { - "PostFeatureUpgradeResponseExample1": { - "description": "When you run `POST /_migration/system_features` to start the migration process, the response lists the features that will be migrated.\n", - "value": "{\n \"accepted\" : true,\n \"features\" : [\n {\n \"feature_name\" : \"security\"\n }\n ]\n}" - } } } } } }, - "x-state": "Added in 7.16.0", - "x-api-name" : "post_feature_upgrade", - "x-namespace": "migration" + "x-state": "Technical preview; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /{index}/_fleet/_fleet_search\n
\n ", + "
\n POST\n /{index}/_fleet/_fleet_search\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search.fleet", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] } }, - "/_ml/trained_models/{model_id}/deployment/cache/_clear": { - "post": { + "/_script_context": { + "get": { "tags": [ - "ml trained model" + "script" ], - "summary": "Clear trained model deployment cache", - "description": "Cache will be cleared on all nodes where the trained model is assigned.\nA trained model deployment may have an inference cache enabled.\nAs requests are handled by each allocated node, their responses may be cached on that individual node.\nCalling this API clears the caches without restarting the deployment.", - "operationId": "ml-clear-trained-model-deployment-cache", - "parameters": [ + "summary": "Get script contexts", + "description": "Get a list of supported script contexts and their methods.", + "operationId": "get-script-context", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.get_script_context.Context" + } + } + }, + "required": [ + "contexts" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_script_context\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "get_script_context", + "x-category": "search", + "x-metaTags": [ { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" + "content": "Elasticsearch", + "name": "product_name" } + ] + } + }, + "/_script_language": { + "get": { + "tags": [ + "script" ], + "summary": "Get script languages", + "description": "Get a list of available script types, languages, and contexts.", + "operationId": "get-script-languages", "responses": { "200": { "description": "", @@ -22191,73 +24377,84 @@ "schema": { "type": "object", "properties": { - "cleared": { - "type": "boolean" + "language_contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.get_script_languages.LanguageContext" + } + }, + "types_allowed": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "cleared" + "language_contexts", + "types_allowed" ] - }, - "examples": { - "MlClearTrainedModelDeploymentCacheResponseExample1": { - "description": "A successful response when clearing the inference cache.", - "value": "{\n \"cleared\": true\n}" - } } } } } }, - "x-state": "Added in 8.5.0", - "x-api-name" : "clear_trained_model_deployment_cache", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_script_language\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "get_script_languages", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/anomaly_detectors/{job_id}/_close": { - "post": { + "/{index}/_graph/explore": { + "get": { "tags": [ - "ml anomaly" + "graph" ], - "summary": "Close anomaly detection jobs", - "description": "A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.\nWhen you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.\nIf you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.\nWhen a datafeed that has a specified end date stops, it automatically closes its associated job.", - "operationId": "ml-close-job", + "summary": "Explore graph analytics", + "description": "Extract and summarize information about the documents and terms in an Elasticsearch data stream or index.\nThe easiest way to understand the behavior of this API is to use the Graph UI to explore connections.\nAn initial request to the `_explore` API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph.\nSubsequent requests enable you to spider out from one more vertices of interest.\nYou can exclude vertices that have already been returned.", + "externalDocs": { + "description": "Graph", + "url": "https://www.elastic.co/docs/explore-analyze/visualize/graph", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/graph-explore-api.html" + }, + "operationId": "graph-explore", "parameters": [ { "in": "path", - "name": "job_id", - "description": "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 comma-separated list of jobs, or a wildcard expression. You can close all jobs by using `_all` or by specifying `*` as the job identifier.", + "name": "index", + "description": "Name of the index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { "in": "query", - "name": "allow_no_match", - "description": "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.\nIf `false`, the request returns a 404 status code when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "force", - "description": "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.\nIf 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.", + "name": "routing", + "description": "Custom value used to route operations to a specific shard.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" }, { "in": "query", "name": "timeout", - "description": "Controls the time to wait until a job has closed.", + "description": "Specifies the period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -22271,21 +24468,48 @@ "schema": { "type": "object", "properties": { - "allow_no_match": { - "description": "Refer to the description for the `allow_no_match` query parameter.", - "type": "boolean" + "connections": { + "description": "Specifies or more fields from which you want to extract terms that are associated with the specified vertices.", + "allOf": [ + { + "$ref": "#/components/schemas/graph._types.Hop" + } + ] }, - "force": { - "description": "Refer to the descriptiion for the `force` query parameter.", - "type": "boolean" + "controls": { + "description": "Direct the Graph API how to build the graph.", + "allOf": [ + { + "$ref": "#/components/schemas/graph._types.ExploreControls" + } + ] }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" + "query": { + "description": "A seed query that identifies the documents of interest. Can be any valid Elasticsearch query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "vertices": { + "description": "Specifies one or more fields that contain the terms you want to include in the graph as vertices.", + "type": "array", + "items": { + "$ref": "#/components/schemas/graph._types.VertexDefinition" + } } } + }, + "examples": { + "GraphExploreRequestExample1": { + "description": "Run `POST clicklogs/_graph/explore` for a basic exploration An initial graph explore query typically begins with a query to identify strongly related terms. Seed the exploration with a query. This example is searching `clicklogs` for people who searched for the term `midi`.Identify the vertices to include in the graph. This example is looking for product codes that are significantly associated with searches for `midi`. Find the connections. This example is looking for other search terms that led people to click on the products that are associated with searches for `midi`.\n", + "value": "{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}" + } } } - } + }, + "required": true }, "responses": { "200": { @@ -22295,76 +24519,100 @@ "schema": { "type": "object", "properties": { - "closed": { + "connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/graph._types.Connection" + } + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ShardFailure" + } + }, + "timed_out": { "type": "boolean" + }, + "took": { + "type": "number" + }, + "vertices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/graph._types.Vertex" + } } }, "required": [ - "closed" + "connections", + "failures", + "timed_out", + "took", + "vertices" ] - }, - "examples": { - "MlCloseJobResponseExample1": { - "description": "A successful response when closing anomaly detection jobs.", - "value": "{\n \"closed\": true\n}" - } } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "close_job", - "x-namespace": "ml" - } - }, - "/_ml/calendars/{calendar_id}": { - "get": { - "tags": [ - "ml anomaly" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_graph/explore\n
\n ", + "
\n POST\n /{index}/_graph/explore\n
\n " ], - "summary": "Get calendar configuration info", - "operationId": "ml-get-calendars-2", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_calendars-calendar_id" - }, - { - "$ref": "#/components/parameters/ml.get_calendars-from" - }, + "x-api": "explore.graph", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.get_calendars-size" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_calendars" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_calendars-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.2.0", - "x-api-name" : "get_calendars", - "x-namespace": "ml" + ] }, - "put": { + "post": { "tags": [ - "ml anomaly" + "graph" ], - "summary": "Create a calendar", - "operationId": "ml-put-calendar", + "summary": "Explore graph analytics", + "description": "Extract and summarize information about the documents and terms in an Elasticsearch data stream or index.\nThe easiest way to understand the behavior of this API is to use the Graph UI to explore connections.\nAn initial request to the `_explore` API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph.\nSubsequent requests enable you to spider out from one more vertices of interest.\nYou can exclude vertices that have already been returned.", + "externalDocs": { + "description": "Graph", + "url": "https://www.elastic.co/docs/explore-analyze/visualize/graph", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/graph-explore-api.html" + }, + "operationId": "graph-explore-1", "parameters": [ { "in": "path", - "name": "calendar_id", - "description": "A string that uniquely identifies a calendar.", + "name": "index", + "description": "Name of the index.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" + }, + { + "in": "query", + "name": "routing", + "description": "Custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -22373,21 +24621,48 @@ "schema": { "type": "object", "properties": { - "job_ids": { - "description": "An array of anomaly detection job identifiers.", + "connections": { + "description": "Specifies or more fields from which you want to extract terms that are associated with the specified vertices.", + "allOf": [ + { + "$ref": "#/components/schemas/graph._types.Hop" + } + ] + }, + "controls": { + "description": "Direct the Graph API how to build the graph.", + "allOf": [ + { + "$ref": "#/components/schemas/graph._types.ExploreControls" + } + ] + }, + "query": { + "description": "A seed query that identifies the documents of interest. Can be any valid Elasticsearch query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "vertices": { + "description": "Specifies one or more fields that contain the terms you want to include in the graph as vertices.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/graph._types.VertexDefinition" } - }, - "description": { - "description": "A description of the calendar.", - "type": "string" } } + }, + "examples": { + "GraphExploreRequestExample1": { + "description": "Run `POST clicklogs/_graph/explore` for a basic exploration An initial graph explore query typically begins with a query to identify strongly related terms. Seed the exploration with a query. This example is searching `clicklogs` for people who searched for the term `midi`.Identify the vertices to include in the graph. This example is looking for product codes that are significantly associated with searches for `midi`. Find the connections. This example is looking for other search terms that led people to click on the products that are associated with searches for `midi`.\n", + "value": "{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}" + } } } - } + }, + "required": true }, "responses": { "200": { @@ -22397,131 +24672,96 @@ "schema": { "type": "object", "properties": { - "calendar_id": { - "$ref": "#/components/schemas/_types.Id" + "connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/graph._types.Connection" + } }, - "description": { - "description": "A description of the calendar.", - "type": "string" + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ShardFailure" + } }, - "job_ids": { - "$ref": "#/components/schemas/_types.Ids" + "timed_out": { + "type": "boolean" + }, + "took": { + "type": "number" + }, + "vertices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/graph._types.Vertex" + } } }, "required": [ - "calendar_id", - "job_ids" + "connections", + "failures", + "timed_out", + "took", + "vertices" ] } } } } }, - "x-state": "Added in 6.2.0", - "x-api-name" : "put_calendar", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml anomaly" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_graph/explore\n
\n ", + "
\n POST\n /{index}/_graph/explore\n
\n " ], - "summary": "Get calendar configuration info", - "operationId": "ml-get-calendars-3", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_calendars-calendar_id" - }, - { - "$ref": "#/components/parameters/ml.get_calendars-from" - }, + "x-api": "explore.graph", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.get_calendars-size" + "content": "Elasticsearch", + "name": "product_name" } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_calendars" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_calendars-200" - } - }, - "x-state": "Added in 6.2.0", - "x-api-name" : "get_calendars", - "x-namespace": "ml" - }, - "delete": { + ] + } + }, + "/_health_report": { + "get": { "tags": [ - "ml anomaly" + "health_report" ], - "summary": "Delete a calendar", - "description": "Remove all scheduled events from a calendar, then delete it.", - "operationId": "ml-delete-calendar", + "summary": "Get the cluster health", + "description": "Get a report with the health status of an Elasticsearch cluster.\nThe report contains a list of indicators that compose Elasticsearch functionality.\n\nEach indicator has a health status of: green, unknown, yellow or red.\nThe indicator will provide an explanation and metadata describing the reason for its current health status.\n\nThe cluster’s status is controlled by the worst indicator status.\n\nIn the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue.\nEach impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system.\n\nSome health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system.\nThe root cause and remediation steps are encapsulated in a diagnosis.\nA diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem.\n\nNOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently.\nWhen setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.", + "operationId": "health-report", "parameters": [ { - "in": "path", - "name": "calendar_id", - "description": "A string that uniquely identifies a calendar.", - "required": true, + "in": "query", + "name": "timeout", + "description": "Explicit operation timeout.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "MlDeleteCalendarResponseExample1": { - "description": "A successful response when deleting a calendar.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.2.0", - "x-api-name" : "delete_calendar", - "x-namespace": "ml" - } - }, - "/_ml/calendars/{calendar_id}/events/{event_id}": { - "delete": { - "tags": [ - "ml anomaly" - ], - "summary": "Delete events from a calendar", - "operationId": "ml-delete-calendar-event", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "calendar_id", - "description": "A string that uniquely identifies a calendar.", - "required": true, + "in": "query", + "name": "verbose", + "description": "Opt-in for more information about the health of the system.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "event_id", - "description": "Identifier for the scheduled event.\nYou can obtain this identifier by using the get calendar events API.", - "required": true, + "in": "query", + "name": "size", + "description": "Limit the number of affected resources the health report API returns.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "number" }, - "style": "simple" + "style": "form" } ], "responses": { @@ -22530,52 +24770,108 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "MlDeleteCalendarEventResponseExample1": { - "description": "A successful response when deleting a calendar event.", - "value": "{\n \"acknowledged\": true\n}" - } + "type": "object", + "properties": { + "cluster_name": { + "type": "string" + }, + "indicators": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.Indicators" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.IndicatorHealthStatus" + } + ] + } + }, + "required": [ + "cluster_name", + "indicators" + ] } } } } }, - "x-state": "Added in 6.2.0", - "x-api-name" : "delete_calendar_event", - "x-namespace": "ml" + "x-state": "Generally available; Added in 8.7.0", + "x-variations": [ + "
\n GET\n /_health_report\n
\n " + ], + "x-api": "health_report", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/calendars/{calendar_id}/jobs/{job_id}": { - "put": { + "/_health_report/{feature}": { + "get": { "tags": [ - "ml anomaly" + "health_report" ], - "summary": "Add anomaly detection job to calendar", - "operationId": "ml-put-calendar-job", + "summary": "Get the cluster health", + "description": "Get a report with the health status of an Elasticsearch cluster.\nThe report contains a list of indicators that compose Elasticsearch functionality.\n\nEach indicator has a health status of: green, unknown, yellow or red.\nThe indicator will provide an explanation and metadata describing the reason for its current health status.\n\nThe cluster’s status is controlled by the worst indicator status.\n\nIn the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue.\nEach impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system.\n\nSome health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system.\nThe root cause and remediation steps are encapsulated in a diagnosis.\nA diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem.\n\nNOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently.\nWhen setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.", + "operationId": "health-report-1", "parameters": [ { "in": "path", - "name": "calendar_id", - "description": "A string that uniquely identifies a calendar.", + "name": "feature", + "description": "A feature of the cluster, as returned by the top-level health report API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "style": "simple" }, { - "in": "path", - "name": "job_id", - "description": "An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups.", - "required": true, + "in": "query", + "name": "timeout", + "description": "Explicit operation timeout.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Ids" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "verbose", + "description": "Opt-in for more information about the health of the system.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Limit the number of affected resources the health report API returns.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" } ], "responses": { @@ -22586,58 +24882,85 @@ "schema": { "type": "object", "properties": { - "calendar_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "description": { - "description": "A description of the calendar.", + "cluster_name": { "type": "string" }, - "job_ids": { - "$ref": "#/components/schemas/_types.Ids" + "indicators": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.Indicators" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.IndicatorHealthStatus" + } + ] } }, "required": [ - "calendar_id", - "job_ids" + "cluster_name", + "indicators" ] } } } } }, - "x-state": "Added in 6.2.0", - "x-api-name" : "put_calendar_job", - "x-namespace": "ml" - }, - "delete": { + "x-state": "Generally available; Added in 8.7.0", + "x-variations": [ + "
\n GET\n /_health_report/{feature}\n
\n " + ], + "x-api": "health_report", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ilm/policy/{policy}": { + "get": { "tags": [ - "ml anomaly" + "ilm" ], - "summary": "Delete anomaly jobs from a calendar", - "operationId": "ml-delete-calendar-job", + "summary": "Get lifecycle policies", + "operationId": "ilm-get-lifecycle", "parameters": [ { "in": "path", - "name": "calendar_id", - "description": "A string that uniquely identifies a calendar.", + "name": "policy", + "description": "Identifier for the policy.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" }, { - "in": "path", - "name": "job_id", - "description": "An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a\ncomma-separated list of jobs or groups.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Ids" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -22647,90 +24970,79 @@ "application/json": { "schema": { "type": "object", - "properties": { - "calendar_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "description": { - "description": "A description of the calendar.", - "type": "string" - }, - "job_ids": { - "$ref": "#/components/schemas/_types.Ids" - } - }, - "required": [ - "calendar_id", - "job_ids" - ] + "additionalProperties": { + "$ref": "#/components/schemas/ilm.get_lifecycle.Lifecycle" + } }, "examples": { - "MlDeleteCalendarJobResponseExample1": { - "description": "A successful response when deleting an anomaly detection job from a calendar.", - "value": "{\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": []\n}" + "GetLifecycleResponseExample1": { + "description": "A successful response when retrieving a lifecycle policy.", + "value": "{\n \"my_policy\": {\n \"version\": 1,\n \"modified_date\": 82392349,\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {\n \"delete_searchable_snapshot\": true\n }\n }\n }\n }\n },\n \"in_use_by\" : {\n \"indices\" : [],\n \"data_streams\" : [],\n \"composable_templates\" : []\n }\n }\n}" } } } } } }, - "x-state": "Added in 6.2.0", - "x-api-name" : "delete_calendar_job", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics/{id}": { - "get": { - "tags": [ - "ml data frame" + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n GET\n /_ilm/policy/{policy}\n
\n " ], - "summary": "Get data frame analytics job configuration info", - "description": "You can get information for multiple data frame analytics jobs in a single\nAPI request by using a comma-separated list of data frame analytics jobs or a\nwildcard expression.", - "operationId": "ml-get-data-frame-analytics", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-id" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-from" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-size" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-exclude_generated" - } + "x-req-auth": [ + "Cluster privileges: `manage_ilm`,`read_ilm`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_data_frame_analytics-200" + "x-api": "get_lifecycle.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.3.0", - "x-api-name" : "get_data_frame_analytics", - "x-namespace": "ml" + ] }, "put": { "tags": [ - "ml data frame" + "ilm" ], - "summary": "Create a data frame analytics job", - "description": "This API creates a data frame analytics job that performs an analysis on the\nsource indices and stores the outcome in a destination index.\nBy default, the query used in the source configuration is `{\"match_all\": {}}`.\n\nIf the destination index does not exist, it is created automatically when you start the job.\n\nIf you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.", - "operationId": "ml-put-data-frame-analytics", + "summary": "Create or update a lifecycle policy", + "description": "If the specified policy exists, it is replaced and the policy version is incremented.\n\nNOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.", + "externalDocs": { + "description": "Index lifecycle management (ILM) in Elasticsearch", + "url": "https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/index-lifecycle", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-put-lifecycle.html" + }, + "operationId": "ilm-put-lifecycle", "parameters": [ { "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "name": "policy", + "description": "Identifier for the policy.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -22739,49 +25051,20 @@ "schema": { "type": "object", "properties": { - "allow_lazy_start": { - "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node. If\nset to `false` and a machine learning node with capacity to run the job\ncannot be immediately found, the API returns an error. If set to `true`,\nthe API does not return an error; the job waits in the `starting` state\nuntil sufficient machine learning node capacity is available. This\nbehavior is also affected by the cluster-wide\n`xpack.ml.max_lazy_ml_nodes` setting.", - "type": "boolean" - }, - "analysis": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" - }, - "analyzed_fields": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" - }, - "description": { - "description": "A description of the job.", - "type": "string" - }, - "dest": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" - }, - "max_num_threads": { - "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", - "type": "number" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "model_memory_limit": { - "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try\nto create data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" - }, - "headers": { - "$ref": "#/components/schemas/_types.HttpHeaders" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "policy": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Policy" + } + ] } - }, - "required": [ - "analysis", - "dest", - "source" - ] + } + }, + "examples": { + "PutLifecycleRequestExample1": { + "description": "Run `PUT _ilm/policy/my_policy` to create a new policy with arbitrary metadata.\n", + "value": "{\n \"policy\": {\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}" + } } } }, @@ -22793,100 +25076,68 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "authorization": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsAuthorization" - }, - "allow_lazy_start": { - "type": "boolean" - }, - "analysis": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" - }, - "analyzed_fields": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" - }, - "create_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "description": { - "type": "string" - }, - "dest": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "max_num_threads": { - "type": "number" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "model_memory_limit": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - } - }, - "required": [ - "allow_lazy_start", - "analysis", - "create_time", - "dest", - "id", - "max_num_threads", - "model_memory_limit", - "source", - "version" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "PutLifecycleResponseExample1": { + "description": "A successful response when creating a new lifecycle policy.", + "value": "{\n \"acknowledged\": true\n}" + } } } } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "put_data_frame_analytics", - "x-namespace": "ml" + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n PUT\n /_ilm/policy/{policy}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage_ilm`\n" + ], + "x-api": "put_lifecycle.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ - "ml data frame" + "ilm" ], - "summary": "Delete a data frame analytics job", - "operationId": "ml-delete-data-frame-analytics", + "summary": "Delete a lifecycle policy", + "description": "You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.", + "operationId": "ilm-delete-lifecycle", "parameters": [ { "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job.", + "name": "policy", + "description": "Identifier for the policy.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" }, { "in": "query", - "name": "force", - "description": "If `true`, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job.", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", "name": "timeout", - "description": "The time to wait for the job to be deleted.", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -22903,8 +25154,8 @@ "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, "examples": { - "MlDeleteDataFrameAnalyticsResponseExample1": { - "description": "A successful response when deleting a data frame analytics job.", + "DeleteLifecycleResponseExample1": { + "description": "A successful response when deleting a lifecycle policy.", "value": "{\n \"acknowledged\": true\n}" } } @@ -22912,62 +25163,47 @@ } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "delete_data_frame_analytics", - "x-namespace": "ml" - } - }, - "/_ml/datafeeds/{datafeed_id}": { - "get": { - "tags": [ - "ml anomaly" + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n DELETE\n /_ilm/policy/{policy}\n
\n " ], - "summary": "Get datafeeds configuration info", - "description": "You can get information for multiple datafeeds in a single API request by\nusing a comma-separated list of datafeeds or a wildcard expression. You can\nget information for all datafeeds by using `_all`, by specifying `*` as the\n``, or by omitting the ``.\nThis API returns a maximum of 10,000 datafeeds.", - "operationId": "ml-get-datafeeds", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_datafeeds-datafeed_id" - }, - { - "$ref": "#/components/parameters/ml.get_datafeeds-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_datafeeds-exclude_generated" - } + "x-req-auth": [ + "Cluster privileges: `manage_ilm`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_datafeeds-200" + "x-api": "delete_lifecycle.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_datafeeds", - "x-namespace": "ml" - }, - "put": { + ] + } + }, + "/{index}/_ilm/explain": { + "get": { "tags": [ - "ml anomaly" + "ilm" ], - "summary": "Create a datafeed", - "description": "Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.\nYou can associate only one datafeed with each anomaly detection job.\nThe datafeed contains a query that runs at a defined interval (`frequency`).\nIf you are concerned about delayed data, you can add a delay (`query_delay') at each interval.\nBy default, the datafeed uses the following query: `{\"match_all\": {\"boost\": 1}}`.\n\nWhen Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had\nat the time of creation and runs the query using those same roles. If you provide secondary authorization headers,\nthose credentials are used instead.\nYou must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed\ndirectly to the `.ml-config` index. Do not give users `write` privileges on the `.ml-config` index.", - "operationId": "ml-put-datafeed", + "summary": "Explain the lifecycle state", + "description": "Get the current lifecycle status for one or more indices.\nFor data streams, the API retrieves the current lifecycle status for the stream's backing indices.\n\nThe response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.", + "operationId": "ilm-explain-lifecycle", "parameters": [ { "in": "path", - "name": "datafeed_id", - "description": "A numerical character string that uniquely identifies the datafeed.\nThis identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.\nIt must start and end with alphanumeric characters.", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases to target. Supports wildcards (`*`).\nTo target all data streams and indices, use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" }, { "in": "query", - "name": "allow_no_indices", - "description": "If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the `_all`\nstring or when no indices are specified.", + "name": "only_errors", + "description": "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.", "deprecated": false, "schema": { "type": "boolean" @@ -22976,19 +25212,9 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "only_managed", + "description": "Filters the returned indices to only indices that are managed by ILM.", "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - { - "in": "query", - "name": "ignore_throttled", - "description": "If true, concrete, expanded, or aliased indices are ignored when frozen.", - "deprecated": true, "schema": { "type": "boolean" }, @@ -22996,79 +25222,15 @@ }, { "in": "query", - "name": "ignore_unavailable", - "description": "If true, unavailable indices (missing or closed) are ignored.", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aggregations": { - "description": "If set, the datafeed performs aggregation searches.\nSupport for aggregations is limited and should be used only with low cardinality data.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "chunking_config": { - "$ref": "#/components/schemas/ml._types.ChunkingConfig" - }, - "delayed_data_check_config": { - "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" - }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" - }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" - }, - "indices_options": { - "$ref": "#/components/schemas/_types.IndicesOptions" - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "max_empty_searches": { - "description": "If a real-time datafeed has never seen any data (including during any initial training period), it automatically\nstops and closes the associated job after this many real-time searches return no documents. In other words,\nit stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no\nend time that sees no data remains started until it is explicitly stopped. By default, it is not set.", - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "query_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "script_fields": { - "description": "Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.\nThe detector configuration objects in a job can contain functions that use these script fields.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } - }, - "scroll_size": { - "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.\nThe maximum value is the value of `index.max_result_window`, which is 10,000 by default.", - "type": "number" - }, - "headers": { - "$ref": "#/components/schemas/_types.HttpHeaders" - } - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", @@ -23077,104 +25239,69 @@ "schema": { "type": "object", "properties": { - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "authorization": { - "$ref": "#/components/schemas/ml._types.DatafeedAuthorization" - }, - "chunking_config": { - "$ref": "#/components/schemas/ml._types.ChunkingConfig" - }, - "delayed_data_check_config": { - "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" - }, - "datafeed_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" - }, "indices": { - "type": "array", - "items": { - "type": "string" - } - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "indices_options": { - "$ref": "#/components/schemas/_types.IndicesOptions" - }, - "max_empty_searches": { - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "query_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "script_fields": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" + "$ref": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplain" } - }, - "scroll_size": { - "type": "number" } }, "required": [ - "chunking_config", - "datafeed_id", - "indices", - "job_id", - "query", - "query_delay", - "scroll_size" + "indices" ] + }, + "examples": { + "ExplainLifecycleResponseExample1": { + "description": "A successful response when retrieving the current ILM status for an index.", + "value": "{\n \"indices\": {\n \"my-index-000001\": {\n \"index\": \"my-index-000001\",\n \"index_creation_date_millis\": 1538475653281,\n \"index_creation_date\": \"2018-10-15T13:45:21.981Z\",\n \"time_since_index_creation\": \"15s\",\n \"managed\": true,\n \"policy\": \"my_policy\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"15s\",\n \"phase\": \"new\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"complete\"\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"complete\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\"\n }\n }\n}" + } } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "put_datafeed", - "x-namespace": "ml" - }, - "delete": { + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n GET\n /{index}/_ilm/explain\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`,`manage_ilm`\n" + ], + "x-api": "explain_lifecycle.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ilm/policy": { + "get": { "tags": [ - "ml anomaly" + "ilm" ], - "summary": "Delete a datafeed", - "operationId": "ml-delete-datafeed", + "summary": "Get lifecycle policies", + "operationId": "ilm-get-lifecycle-1", "parameters": [ { - "in": "path", - "name": "datafeed_id", - "description": "A numerical character string that uniquely identifies the datafeed. This\nidentifier can contain lowercase alphanumeric characters (a-z and 0-9),\nhyphens, and underscores. It must start and end with alphanumeric\ncharacters.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "force", - "description": "Use to forcefully delete a started datafeed; this method is quicker than\nstopping and deleting the datafeed.", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -23185,130 +25312,125 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ilm.get_lifecycle.Lifecycle" + } }, "examples": { - "MlDeleteDatafeedResponseExample1": { - "description": "A successful response when deleting a datafeed.", - "value": "{\n \"acknowledged\": true\n}" + "GetLifecycleResponseExample1": { + "description": "A successful response when retrieving a lifecycle policy.", + "value": "{\n \"my_policy\": {\n \"version\": 1,\n \"modified_date\": 82392349,\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {\n \"delete_searchable_snapshot\": true\n }\n }\n }\n }\n },\n \"in_use_by\" : {\n \"indices\" : [],\n \"data_streams\" : [],\n \"composable_templates\" : []\n }\n }\n}" } } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "delete_datafeed", - "x-namespace": "ml" - } - }, - "/_ml/_delete_expired_data/{job_id}": { - "delete": { - "tags": [ - "ml anomaly" + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n GET\n /_ilm/policy\n
\n " ], - "summary": "Delete expired ML data", - "description": "Delete all job results, model snapshots and forecast data that have exceeded\ntheir retention days period. Machine learning state documents that are not\nassociated with any job are also deleted.\nYou can limit the request to a single or set of anomaly detection jobs by\nusing a job identifier, a group name, a comma-separated list of jobs, or a\nwildcard expression. You can delete expired data for all anomaly detection\njobs by using `_all`, by specifying `*` as the ``, or by omitting the\n``.", - "operationId": "ml-delete-expired-data", - "parameters": [ - { - "$ref": "#/components/parameters/ml.delete_expired_data-job_id" - }, - { - "$ref": "#/components/parameters/ml.delete_expired_data-requests_per_second" - }, - { - "$ref": "#/components/parameters/ml.delete_expired_data-timeout" - } + "x-req-auth": [ + "Cluster privileges: `manage_ilm`,`read_ilm`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.delete_expired_data" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.delete_expired_data-200" + "x-api": "get_lifecycle.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.4.0", - "x-api-name" : "delete_expired_data", - "x-namespace": "ml" + ] } }, - "/_ml/_delete_expired_data": { - "delete": { + "/_ilm/status": { + "get": { "tags": [ - "ml anomaly" - ], - "summary": "Delete expired ML data", - "description": "Delete all job results, model snapshots and forecast data that have exceeded\ntheir retention days period. Machine learning state documents that are not\nassociated with any job are also deleted.\nYou can limit the request to a single or set of anomaly detection jobs by\nusing a job identifier, a group name, a comma-separated list of jobs, or a\nwildcard expression. You can delete expired data for all anomaly detection\njobs by using `_all`, by specifying `*` as the ``, or by omitting the\n``.", - "operationId": "ml-delete-expired-data-1", - "parameters": [ - { - "$ref": "#/components/parameters/ml.delete_expired_data-requests_per_second" - }, - { - "$ref": "#/components/parameters/ml.delete_expired_data-timeout" - } + "ilm" ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.delete_expired_data" - }, + "summary": "Get the ILM status", + "description": "Get the current index lifecycle management status.", + "operationId": "ilm-get-status", "responses": { "200": { - "$ref": "#/components/responses/ml.delete_expired_data-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "operation_mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.LifecycleOperationMode" + } + ] + } + }, + "required": [ + "operation_mode" + ] + }, + "examples": { + "GetILMStatusResponseExample1": { + "description": "A successful response when retrieving the current ILM status.", + "value": "{\n \"operation_mode\": \"RUNNING\"\n}" + } + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "delete_expired_data", - "x-namespace": "ml" + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n GET\n /_ilm/status\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_ilm`\n" + ], + "x-api": "get_status.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/filters/{filter_id}": { - "get": { + "/_ilm/migrate_to_data_tiers": { + "post": { "tags": [ - "ml anomaly" + "ilm" ], - "summary": "Get filters", - "description": "You can get a single filter or all filters.", - "operationId": "ml-get-filters-1", + "summary": "Migrate to data tiers routing", + "description": "Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers.\nOptionally, delete one legacy index template.\nUsing node roles enables ILM to automatically move the indices between data tiers.\n\nMigrating away from custom node attributes routing can be manually performed.\nThis API provides an automated way of performing three out of the four manual steps listed in the migration guide:\n\n1. Stop setting the custom hot attribute on new indices.\n1. Remove custom allocation settings from existing ILM policies.\n1. Replace custom allocation settings from existing indices with the corresponding tier preference.\n\nILM must be stopped before performing the migration.\nUse the stop ILM and get ILM status APIs to wait until the reported operation mode is `STOPPED`.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/migrate-index-allocation-filters-to-node-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-migrate-to-data-tiers.html" + }, + "operationId": "ilm-migrate-to-data-tiers", "parameters": [ { - "$ref": "#/components/parameters/ml.get_filters-filter_id" - }, - { - "$ref": "#/components/parameters/ml.get_filters-from" + "in": "query", + "name": "dry_run", + "description": "If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration.\nThis provides a way to retrieve the indices and ILM policies that need to be migrated.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_filters-size" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_filters-200" - } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_filters", - "x-namespace": "ml" - }, - "put": { - "tags": [ - "ml anomaly" - ], - "summary": "Create a filter", - "description": "A filter contains a list of strings. It can be used by one or more anomaly detection jobs.\nSpecifically, filters are referenced in the `custom_rules` property of detector configuration objects.", - "operationId": "ml-put-filter", - "parameters": [ - { - "in": "path", - "name": "filter_id", - "description": "A string that uniquely identifies a filter.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" } ], "requestBody": { @@ -23317,22 +25439,22 @@ "schema": { "type": "object", "properties": { - "description": { - "description": "A description of the filter.", + "legacy_template_to_delete": { "type": "string" }, - "items": { - "description": "The items of the filter. A wildcard `*` can be used at the beginning or the end of an item.\nUp to 10000 items are allowed in each filter.", - "type": "array", - "items": { - "type": "string" - } + "node_attribute": { + "type": "string" } } + }, + "examples": { + "MigrateToDataTiersRequestExample1": { + "description": "Run `POST /_ilm/migrate_to_data_tiers` to migrate the indices, ILM policies, legacy templates, composable, and component templates away from defining custom allocation filtering using the `custom_attribute_name` node attribute. It also deletes the legacy template with name `global-template` if it exists in the system.\n", + "value": "{\n \"legacy_template_to_delete\": \"global-template\",\n \"node_attribute\": \"custom_attribute_name\"\n}" + } } } - }, - "required": true + } }, "responses": { "200": { @@ -23342,13 +25464,44 @@ "schema": { "type": "object", "properties": { - "description": { + "dry_run": { + "type": "boolean" + }, + "removed_legacy_template": { + "description": "The name of the legacy index template that was deleted.\nThis information is missing if no legacy index templates were deleted.", "type": "string" }, - "filter_id": { - "$ref": "#/components/schemas/_types.Id" + "migrated_ilm_policies": { + "description": "The ILM policies that were updated.", + "type": "array", + "items": { + "type": "string" + } }, - "items": { + "migrated_indices": { + "description": "The indices that were migrated to tier preference routing.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "migrated_legacy_templates": { + "description": "The legacy index templates that were updated to not contain custom routing settings for the provided data attribute.", + "type": "array", + "items": { + "type": "string" + } + }, + "migrated_composable_templates": { + "description": "The composable index templates that were updated to not contain custom routing settings for the provided data attribute.", + "type": "array", + "items": { + "type": "string" + } + }, + "migrated_component_templates": { + "description": "The component templates that were updated to not contain custom routing settings for the provided data attribute.", "type": "array", "items": { "type": "string" @@ -23356,39 +25509,104 @@ } }, "required": [ - "description", - "filter_id", - "items" + "dry_run", + "removed_legacy_template", + "migrated_ilm_policies", + "migrated_indices", + "migrated_legacy_templates", + "migrated_composable_templates", + "migrated_component_templates" ] + }, + "examples": { + "MigrateToDataTiersResponseExample1": { + "description": "A successful response when migrating indices, ILMs, and templates from custom node attributes to data tiers.\n", + "value": "{\n \"dry_run\": false,\n \"removed_legacy_template\":\"global-template\",\n \"migrated_ilm_policies\":[\"policy_with_allocate_action\"],\n \"migrated_indices\":[\"warm-index-to-migrate-000001\"],\n \"migrated_legacy_templates\":[\"a-legacy-template\"],\n \"migrated_composable_templates\":[\"a-composable-template\"],\n \"migrated_component_templates\":[\"a-component-template\"]\n}" + } } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "put_filter", - "x-namespace": "ml" - }, - "delete": { + "x-state": "Generally available; Added in 7.14.0", + "x-variations": [ + "
\n POST\n /_ilm/migrate_to_data_tiers\n
\n " + ], + "x-api": "migrate_to_data_tiers.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ilm/move/{index}": { + "post": { "tags": [ - "ml anomaly" + "ilm" ], - "summary": "Delete a filter", - "description": "If an anomaly detection job references the filter, you cannot delete the\nfilter. You must update or delete the job before you can delete the filter.", - "operationId": "ml-delete-filter", + "summary": "Move to a lifecycle step", + "description": "Manually move an index into a specific step in the lifecycle policy and run that step.\n\nWARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API.\n\nYou must specify both the current step and the step to be executed in the body of the request.\nThe request will fail if the current step does not match the step currently running for the index\nThis is to prevent the index from being moved from an unexpected step into the next step.\n\nWhen specifying the target (`next_step`) to which the index will be moved, either the name or both the action and name fields are optional.\nIf only the phase is specified, the index will move to the first step of the first action in the target phase.\nIf the phase and action are specified, the index will move to the first step of the specified action in the specified phase.\nOnly actions specified in the ILM policy are considered valid.\nAn index cannot move to a step that is not part of its policy.", + "operationId": "ilm-move-to-step", "parameters": [ { "in": "path", - "name": "filter_id", - "description": "A string that uniquely identifies a filter.", + "name": "index", + "description": "The name of the index whose lifecycle step is to change", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "current_step": { + "description": "The step that the index is expected to be in.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm.move_to_step.StepKey" + } + ] + }, + "next_step": { + "description": "The step that you want to run.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm.move_to_step.StepKey" + } + ] + } + }, + "required": [ + "current_step", + "next_step" + ] + }, + "examples": { + "MoveToStepRequestExample1": { + "summary": "Move to forcemerge step", + "description": "Run `POST _ilm/move/my-index-000001` to move `my-index-000001` from the initial step to the `forcemerge` step.\n", + "value": "{\n \"current_step\": {\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n}" + }, + "MoveToStepRequestExample2": { + "summary": "Move to warm step", + "description": "Run `POST _ilm/move/my-index-000001` to move `my-index-000001` from the end of hot phase into the start of warm.\n", + "value": "{\n \"current_step\": {\n \"phase\": \"hot\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -23398,8 +25616,8 @@ "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, "examples": { - "MlDeleteFilterResponseExample1": { - "description": "A successful response when deleting a filter.", + "MoveToStepResponseExample1": { + "description": "A successful response when running a specific step in a lifecycle policy.\n", "value": "{\n \"acknowledged\": true\n}" } } @@ -23407,83 +25625,44 @@ } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "delete_filter", - "x-namespace": "ml" + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n POST\n /_ilm/move/{index}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage_ilm`\n" + ], + "x-api": "move_to_step.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/anomaly_detectors/{job_id}/_forecast": { + "/{index}/_ilm/remove": { "post": { "tags": [ - "ml anomaly" + "ilm" ], - "summary": "Predict future behavior of a time series", - "description": "Forecasts are not supported for jobs that perform population analysis; an\nerror occurs if you try to create a forecast for a job that has an\n`over_field_name` in its configuration. Forcasts predict future behavior\nbased on historical data.", - "operationId": "ml-forecast", + "summary": "Remove policies from an index", + "description": "Remove the assigned lifecycle policies from an index or a data stream's backing indices.\nIt also stops managing the indices.", + "operationId": "ilm-remove-policy", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job. The job must be open when you\ncreate a forecast; otherwise, an error occurs.", + "name": "index", + "description": "The name of the index to remove policy on", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" - }, - { - "in": "query", - "name": "duration", - "description": "A period of time that indicates how far into the future to forecast. For\nexample, `30d` corresponds to 30 days. The forecast starts at the last\nrecord that was processed.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "expires_in", - "description": "The period of time that forecast results are retained. After a forecast\nexpires, the results are deleted. If set to a value of 0, the forecast is\nnever automatically deleted.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "max_model_memory", - "description": "The maximum memory the forecast can use. If the forecast needs to use\nmore than the provided amount, it will spool to disk. Default is 20mb,\nmaximum is 500mb and minimum is 1mb. If set to 40% or more of the job’s\nconfigured memory limit, it is automatically reduced to below that\namount.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/_types.Duration" - }, - "expires_in": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_model_memory": { - "description": "Refer to the description for the `max_model_memory` query parameter.", - "type": "string" - } - } - } - } - } - }, "responses": { "200": { "description": "", @@ -23492,137 +25671,277 @@ "schema": { "type": "object", "properties": { - "acknowledged": { - "type": "boolean" + "failed_indexes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } }, - "forecast_id": { - "$ref": "#/components/schemas/_types.Id" + "has_failures": { + "type": "boolean" } }, "required": [ - "acknowledged", - "forecast_id" + "failed_indexes", + "has_failures" ] + }, + "examples": { + "RemovePolicyResponseExample1": { + "description": "A successful response when removing a lifecycle policy from an index.", + "value": "{\n \"has_failures\" : false,\n \"failed_indexes\" : []\n}" + } } } } } }, - "x-state": "Added in 6.1.0", - "x-api-name" : "forecast", - "x-namespace": "ml" - }, - "delete": { - "tags": [ - "ml anomaly" + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n POST\n /{index}/_ilm/remove\n
\n " ], - "summary": "Delete forecasts from a job", - "description": "By default, forecasts are retained for 14 days. You can specify a\ndifferent retention period with the `expires_in` parameter in the forecast\njobs API. The delete forecast API enables you to delete one or more\nforecasts before they expire.", - "operationId": "ml-delete-forecast", - "parameters": [ - { - "$ref": "#/components/parameters/ml.delete_forecast-job_id" - }, - { - "$ref": "#/components/parameters/ml.delete_forecast-allow_no_forecasts" - }, - { - "$ref": "#/components/parameters/ml.delete_forecast-timeout" - } + "x-req-auth": [ + "Index privileges: `manage_ilm`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.delete_forecast-200" + "x-api": "remove_policy.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.5.0", - "x-api-name" : "delete_forecast", - "x-namespace": "ml" + ] } }, - "/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}": { - "delete": { + "/{index}/_ilm/retry": { + "post": { "tags": [ - "ml anomaly" + "ilm" ], - "summary": "Delete forecasts from a job", - "description": "By default, forecasts are retained for 14 days. You can specify a\ndifferent retention period with the `expires_in` parameter in the forecast\njobs API. The delete forecast API enables you to delete one or more\nforecasts before they expire.", - "operationId": "ml-delete-forecast-1", + "summary": "Retry a policy", + "description": "Retry running the lifecycle policy for an index that is in the ERROR step.\nThe API sets the policy back to the step where the error occurred and runs the step.\nUse the explain lifecycle state API to determine whether an index is in the ERROR step.", + "operationId": "ilm-retry", "parameters": [ { - "$ref": "#/components/parameters/ml.delete_forecast-job_id" - }, + "in": "path", + "name": "index", + "description": "The name of the indices (comma-separated) whose failed lifecycle step is to be retry", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n POST\n /{index}/_ilm/retry\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage_ilm`\n" + ], + "x-api": "retry.ilm", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.delete_forecast-forecast_id" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ilm/start": { + "post": { + "tags": [ + "ilm" + ], + "summary": "Start the ILM plugin", + "description": "Start the index lifecycle management plugin if it is currently stopped.\nILM is started automatically when the cluster is formed.\nRestarting ILM is necessary only when it has been stopped using the stop ILM API.", + "operationId": "ilm-start", + "parameters": [ { - "$ref": "#/components/parameters/ml.delete_forecast-allow_no_forecasts" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.delete_forecast-timeout" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/ml.delete_forecast-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "StartILMResponseExample1": { + "description": "A successful response when stating the ILM plugin.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "delete_forecast", - "x-namespace": "ml" + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n POST\n /_ilm/start\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ilm`\n" + ], + "x-api": "start.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/anomaly_detectors/{job_id}": { - "get": { + "/_ilm/stop": { + "post": { "tags": [ - "ml anomaly" + "ilm" ], - "summary": "Get anomaly detection jobs configuration info", - "description": "You can get information for multiple anomaly detection jobs in a single API\nrequest by using a group name, a comma-separated list of jobs, or a wildcard\nexpression. You can get information for all anomaly detection jobs by using\n`_all`, by specifying `*` as the ``, or by omitting the ``.", - "operationId": "ml-get-jobs", + "summary": "Stop the ILM plugin", + "description": "Halt all lifecycle management operations and stop the index lifecycle management plugin.\nThis is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices.\n\nThe API returns as soon as the stop request has been acknowledged, but the plugin might continue to run until in-progress operations complete and the plugin can be safely stopped.\nUse the get ILM status API to check whether ILM is running.", + "operationId": "ilm-stop", "parameters": [ { - "$ref": "#/components/parameters/ml.get_jobs-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_jobs-allow_no_match" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_jobs-exclude_generated" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/ml.get_jobs-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "StopILMResponseExample1": { + "description": "A successful response when stopping the ILM plugin.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_jobs", - "x-namespace": "ml" - }, - "put": { + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n POST\n /_ilm/stop\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ilm`\n" + ], + "x-api": "stop.ilm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_doc": { + "post": { "tags": [ - "ml anomaly" + "document" ], - "summary": "Create an anomaly detection job", - "description": "If you include a `datafeed_config`, you must have read index privileges on the source index.\nIf you include a `datafeed_config` but do not provide a query, the datafeed uses `{\"match_all\": {\"boost\": 1}}`.", - "operationId": "ml-put-job", + "summary": "Create or update a document in an index", + "description": "Add a JSON document to the specified data stream or index and make it searchable.\nIf the target is an index and the document already exists, the request updates the document and increments its version.\n\nNOTE: You cannot use this API to send update requests for existing documents in a data stream.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To add or overwrite a document using the `PUT //_doc/<_id>` request format, you must have the `create`, `index`, or `write` index privilege.\n* To add a document using the `POST //_doc/` request format, you must have the `create_doc`, `create`, `index`, or `write` index privilege.\n* To automatically create a data stream or index with this API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nNOTE: Replica shards might not all be started when an indexing operation returns successfully.\nBy default, only the primary is required. Set `wait_for_active_shards` to change this default behavior.\n\n**Automatically create data streams and indices**\n\nIf the request's target doesn't exist and matches an index template with a `data_stream` definition, the index operation automatically creates the data stream.\n\nIf the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.\n\nNOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.\n\nIf no mapping exists, the index operation creates a dynamic mapping.\nBy default, new fields and objects are automatically added to the mapping if needed.\n\nAutomatic index creation is controlled by the `action.auto_create_index` setting.\nIf it is `true`, any index can be created automatically.\nYou can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to `false` to turn off automatic index creation entirely.\nSpecify a comma-separated list of patterns you want to allow or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked.\nWhen a list is specified, the default behaviour is to disallow.\n\nNOTE: The `action.auto_create_index` setting affects the automatic creation of indices only.\nIt does not affect the creation of data streams.\n\n**Optimistic concurrency control**\n\nIndex operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Routing**\n\nBy default, shard placement — or routing — is controlled by using a hash of the document's ID value.\nFor more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the `routing` parameter.\n\nWhen setting up explicit mapping, you can also use the `_routing` field to direct the index operation to extract the routing value from the document itself.\nThis does come at the (very minimal) cost of an additional document parsing pass.\nIf the `_routing` mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Distributed**\n\nThe index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.\nAfter the primary shard completes the operation, if needed, the update is distributed to applicable replicas.\n\n**Active shards**\n\nTo improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.\nIf the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.\nBy default, write operations only wait for the primary shards to be active before proceeding (that is to say `wait_for_active_shards` is `1`).\nThis default can be overridden in the index settings dynamically by setting `index.write.wait_for_active_shards`.\nTo alter this behavior per operation, use the `wait_for_active_shards request` parameter.\n\nValid values are all or any positive integer up to the total number of configured copies per shard in the index (which is `number_of_replicas`+1).\nSpecifying a negative value or a number greater than the number of shard copies will throw an error.\n\nFor example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).\nIf you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.\nThis means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.\nIf `wait_for_active_shards` is set on the request to `3` (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.\nThis requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.\nHowever, if you set `wait_for_active_shards` to `all` (or to `4`, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.\nThe operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.\n\nIt is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.\nAfter the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.\nThe `_shards` section of the API response reveals the number of shard copies on which replication succeeded and failed.\n\n**No operation (noop) updates**\n\nWhen updating a document by using this API, a new version of the document is always created even if the document hasn't changed.\nIf this isn't acceptable use the `_update` API with `detect_noop` set to `true`.\nThe `detect_noop` option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.\n\nThere isn't a definitive rule for when noop updates aren't acceptable.\nIt's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.\n\n**Versioning**\n\nEach indexed document is given a version number.\nBy default, internal versioning is used that starts at 1 and increments with each update, deletes included.\nOptionally, the version number can be set to an external value (for example, if maintained in a database).\nTo enable this functionality, `version_type` should be set to `external`.\nThe value provided must be a numeric, long value greater than or equal to 0, and less than around `9.2e+18`.\n\nNOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.\nIf no version is provided, the operation runs without any version checks.\n\nWhen using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.\nIf true, the document will be indexed and the new version number used.\nIf the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:\n\n```\nPUT my-index-000001/_doc/1?version=2&version_type=external\n{\n \"user\": {\n \"id\": \"elkbee\"\n }\n}\n```\n\nIn this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.\nIf the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).\n\nA nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.\nEven the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.", + "externalDocs": { + "description": "Data streams", + "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-index_.html" + }, + "operationId": "index-2", "parameters": [ { "in": "path", - "name": "job_id", - "description": "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.", + "name": "index", + "description": "The name of the data stream or index to target.\nIf the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn't exist and doesn't match a data stream template, this request creates the index.\nYou can check for existing targets with the resolve index API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" }, { "in": "query", - "name": "allow_no_indices", - "description": "If `true`, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the\n`_all` string or when no indices are specified.", + "name": "if_primary_term", + "description": "Only perform the operation if the document has this primary term.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "if_seq_no", + "description": "Only perform the operation if the document has this sequence number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SequenceNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", "deprecated": false, "schema": { "type": "boolean" @@ -23631,19 +25950,89 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are:\n\n* `all`: Match any data stream or index, including hidden ones.\n* `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n* `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or both.\n* `none`: Wildcard patterns are not accepted.\n* `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "op_type", + "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.OpType" }, "style": "form" }, { "in": "query", - "name": "ignore_throttled", - "description": "If `true`, concrete, expanded or aliased indices are ignored when frozen.", - "deprecated": true, + "name": "pipeline", + "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "An explicit version number for concurrency control.\nIt must be a non-negative long number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" + }, + { + "in": "query", + "name": "require_alias", + "description": "If `true`, the destination must be an index alias.", + "deprecated": false, "schema": { "type": "boolean" }, @@ -23651,8 +26040,8 @@ }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, unavailable indices (missing or closed) are ignored.", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", "deprecated": false, "schema": { "type": "boolean" @@ -23664,76 +26053,18 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "allow_lazy_open": { - "description": "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.", - "type": "boolean" - }, - "analysis_config": { - "$ref": "#/components/schemas/ml._types.AnalysisConfig" - }, - "analysis_limits": { - "$ref": "#/components/schemas/ml._types.AnalysisLimits" - }, - "background_persist_interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "custom_settings": { - "$ref": "#/components/schemas/ml._types.CustomSettings" - }, - "daily_model_snapshot_retention_after_days": { - "description": "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`.", - "type": "number" - }, - "data_description": { - "$ref": "#/components/schemas/ml._types.DataDescription" - }, - "datafeed_config": { - "$ref": "#/components/schemas/ml._types.DatafeedConfig" - }, - "description": { - "description": "A description of the job.", - "type": "string" - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "groups": { - "description": "A list of job groups. A job can belong to no groups or many.", - "type": "array", - "items": { - "type": "string" - } - }, - "model_plot_config": { - "$ref": "#/components/schemas/ml._types.ModelPlotConfig" - }, - "model_snapshot_retention_days": { - "description": "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.", - "type": "number" - }, - "renormalization_window_days": { - "description": "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.", - "type": "number" - }, - "results_index_name": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "results_retention_days": { - "description": "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.", - "type": "number" - } - }, - "required": [ - "analysis_config", - "data_description" - ] + "type": "object" }, "examples": { - "MlPutJobRequestExample1": { - "description": "A request to create an anomaly detection job and datafeed.", - "value": "{\n \"analysis_config\": {\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\"\n }\n ]\n },\n \"data_description\": {\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n \"analysis_limits\": {\n \"model_memory_limit\": \"11MB\"\n },\n \"model_plot_config\": {\n \"enabled\": true,\n \"annotations_enabled\": true\n },\n \"results_index_name\": \"test-job1\",\n \"datafeed_config\": {\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n },\n \"datafeed_id\": \"datafeed-test-job1\"\n }\n}" + "IndexRequestExample1": { + "summary": "Automate document IDs", + "description": "Run `POST my-index-000001/_doc/` to index a document. When you use the `POST //_doc/` request format, the `op_type` is automatically set to `create` and the index operation generates a unique ID for the document.\n", + "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + }, + "IndexRequestExample2": { + "summary": "Define document IDs", + "description": "Run `PUT my-index-000001/_doc/1` to insert a JSON document into the `my-index-000001` index with an `_id` of 1.\n", + "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" } } } @@ -23746,123 +26077,76 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "allow_lazy_open": { - "type": "boolean" - }, - "analysis_config": { - "$ref": "#/components/schemas/ml._types.AnalysisConfigRead" - }, - "analysis_limits": { - "$ref": "#/components/schemas/ml._types.AnalysisLimits" - }, - "background_persist_interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "create_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "custom_settings": { - "$ref": "#/components/schemas/ml._types.CustomSettings" - }, - "daily_model_snapshot_retention_after_days": { - "type": "number" - }, - "data_description": { - "$ref": "#/components/schemas/ml._types.DataDescription" - }, - "datafeed_config": { - "$ref": "#/components/schemas/ml._types.Datafeed" - }, - "description": { - "type": "string" - }, - "groups": { - "type": "array", - "items": { - "type": "string" - } - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "job_type": { - "type": "string" - }, - "job_version": { - "type": "string" - }, - "model_plot_config": { - "$ref": "#/components/schemas/ml._types.ModelPlotConfig" - }, - "model_snapshot_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "model_snapshot_retention_days": { - "type": "number" - }, - "renormalization_window_days": { - "type": "number" - }, - "results_index_name": { - "type": "string" - }, - "results_retention_days": { - "type": "number" - } - }, - "required": [ - "allow_lazy_open", - "analysis_config", - "analysis_limits", - "create_time", - "daily_model_snapshot_retention_after_days", - "data_description", - "job_id", - "job_type", - "job_version", - "model_snapshot_retention_days", - "results_index_name" - ] + "$ref": "#/components/schemas/_types.WriteResponseBase" }, "examples": { - "MlPutJobResponseExample1": { - "description": "A successful response when creating an anomaly detection job and datafeed.", - "value": "{\n \"job_id\": \"test-job1\",\n \"job_type\": \"anomaly_detector\",\n \"job_version\": \"8.4.0\",\n \"create_time\": 1656087283340,\n \"datafeed_config\": {\n \"datafeed_id\": \"datafeed-test-job1\",\n \"job_id\": \"test-job1\",\n \"authorization\": {\n \"roles\": [\n \"superuser\"\n ]\n },\n \"query_delay\": \"61499ms\",\n \"chunking_config\": {\n \"mode\": \"auto\"\n },\n \"indices_options\": {\n \"expand_wildcards\": [\n \"open\"\n ],\n \"ignore_unavailable\": false,\n \"allow_no_indices\": true,\n \"ignore_throttled\": true\n },\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"scroll_size\": 1000,\n \"delayed_data_check_config\": {\n \"enabled\": true\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n }\n },\n \"analysis_config\": {\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"detector_index\": 0\n }\n ],\n \"influencers\": [],\n \"model_prune_window\": \"30d\"\n },\n \"analysis_limits\": {\n \"model_memory_limit\": \"11mb\",\n \"categorization_examples_limit\": 4\n },\n \"data_description\": {\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n \"model_plot_config\": {\n \"enabled\": true,\n \"annotations_enabled\": true\n },\n \"model_snapshot_retention_days\": 10,\n \"daily_model_snapshot_retention_after_days\": 1,\n \"results_index_name\": \"custom-test-job1\",\n \"allow_lazy_open\": false\n}" + "IndexResponseExample1": { + "summary": "Automate document IDs", + "description": "A successful response from `POST my-index-000001/_doc/`, which contains an automated document ID.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"W0tpsmIBdwcYyG50zbta\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"result\": \"created\"\n}" + }, + "IndexResponseExample2": { + "summary": "Define document IDs", + "description": "A successful response from `PUT my-index-000001/_doc/1`.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"result\": \"created\"\n}" } } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "put_job", - "x-namespace": "ml" - }, - "delete": { + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_doc\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "index", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_block/{block}": { + "put": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Delete an anomaly detection job", - "description": "All job configuration, model state and results are deleted.\nIt is not currently possible to delete multiple jobs using wildcards or a\ncomma separated list. If you delete a job that has a datafeed, the request\nfirst tries to delete the datafeed. This behavior is equivalent to calling\nthe delete datafeed API with the same timeout and force parameters as the\ndelete job request.", - "operationId": "ml-delete-job", + "summary": "Add an index block", + "description": "Add an index block to an index.\nIndex blocks limit the operations allowed on an index by blocking specific operation types.", + "operationId": "indices-add-block", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", + "name": "index", + "description": "A comma-separated list or wildcard expression of index names used to limit the request.\nBy default, you must explicitly name the indices you are adding blocks to.\nTo allow the adding of blocks to indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.\nYou can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "path", + "name": "block", + "description": "The block type to add to the index.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/indices._types.IndicesBlockOptions" }, "style": "simple" }, { "in": "query", - "name": "force", - "description": "Use to forcefully delete an opened job; this method is quicker than\nclosing and deleting the job.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "deprecated": false, "schema": { "type": "boolean" @@ -23871,23 +26155,43 @@ }, { "in": "query", - "name": "delete_user_annotations", - "description": "Specifies whether annotations that have been added by the\nuser should be deleted along with any auto-generated annotations when the job is\nreset.", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "wait_for_completion", - "description": "Specifies whether the request should return immediately or wait until the\njob deletion completes.", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -23896,147 +26200,129 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "shards_acknowledged": { + "type": "boolean" + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.add_block.AddIndicesBlockStatus" + } + } + }, + "required": [ + "acknowledged", + "shards_acknowledged", + "indices" + ] }, "examples": { - "MlDeleteJobResponseExample1": { - "summary": "Delete job", - "description": "A successful response when deleting an anomaly detection job.", - "value": "{\n \"acknowledged\": true\n}" - }, - "MlDeleteJobResponseExample2": { - "summary": "Delete job asynchronously", - "description": "A successful response when deleting an anomaly detection job asynchronously. When the `wait_for_completion` query parameter is set to `false`, the response contains an identifier for the job deletion task.\n", - "value": "{\n \"task\": \"oTUltX4IQMOUUVeiohTt8A:39\"\n}" + "IndicesAddBlockResponseExample1": { + "description": "A successful response from `PUT /my-index-000001/_block/write`, which adds an index block to an index.'", + "value": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\" : [ {\n \"name\" : \"my-index-000001\",\n \"blocked\" : true\n } ]\n}" } } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "delete_job", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}": { - "get": { + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n PUT\n /{index}/_block/{block}\n
\n " + ], + "x-api": "add_block.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get model snapshots info", - "operationId": "ml-get-model-snapshots", + "summary": "Remove an index block", + "description": "Remove an index block from an index.\nIndex blocks limit the operations allowed on an index by blocking specific operation types.", + "operationId": "indices-remove-block", "parameters": [ { - "$ref": "#/components/parameters/ml.get_model_snapshots-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-snapshot_id" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-desc" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-end" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-from" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-size" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-sort" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-start" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_model_snapshots" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_model_snapshots-200" - } - }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_model_snapshots", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml anomaly" - ], - "summary": "Get model snapshots info", - "operationId": "ml-get-model-snapshots-1", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_model_snapshots-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-snapshot_id" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-desc" + "in": "path", + "name": "index", + "description": "A comma-separated list or wildcard expression of index names used to limit the request.\nBy default, you must explicitly name the indices you are removing blocks from.\nTo allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.\nYou can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-end" + "in": "path", + "name": "block", + "description": "The block type to remove from the index.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/indices._types.IndicesBlockOptions" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-from" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-size" + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-sort" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-start" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_model_snapshots" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_model_snapshots-200" - } - }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_model_snapshots", - "x-namespace": "ml" - }, - "delete": { - "tags": [ - "ml anomaly" - ], - "summary": "Delete a model snapshot", - "description": "You cannot delete the active model snapshot. To delete that snapshot, first\nrevert to a different one. To identify the active model snapshot, refer to\nthe `model_snapshot_id` in the results from the get jobs API.", - "operationId": "ml-delete-model-snapshot", - "parameters": [ - { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "snapshot_id", - "description": "Identifier for the model snapshot.", - "required": true, + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nIt can also be set to `-1` to indicate that the request should never timeout.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" } ], "responses": { @@ -24045,101 +26331,70 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.remove_block.RemoveIndicesBlockStatus" + } + } + }, + "required": [ + "acknowledged", + "indices" + ] }, "examples": { - "MlDeleteModelSnapshotResponseExample1": { - "description": "A successful response when deleting an existing model snapshot.", - "value": "{\n \"acknowledged\": true\n}" + "IndicesRemoveBlockResponseExample1": { + "description": "A successful response from `DELETE /my-index-000001/_block/write`, which removes an index block from an index.'", + "value": "{\n \"acknowledged\" : true,\n \"indices\" : [ {\n \"name\" : \"my-index-000001\",\n \"unblocked\" : true\n } ]\n}" } } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "delete_model_snapshot", - "x-namespace": "ml" + "x-state": "Generally available; Added in 9.1.0", + "x-variations": [ + "
\n DELETE\n /{index}/_block/{block}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "remove_block.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/trained_models/{model_id}": { + "/_analyze": { "get": { "tags": [ - "ml trained model" - ], - "summary": "Get trained model configuration info", - "operationId": "ml-get-trained-models", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_trained_models-model_id" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-decompress_definition" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-exclude_generated" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-from" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-include" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-size" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-tags" - } + "indices" ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_trained_models-200" - } + "summary": "Get tokens from text analysis", + "description": "The analyze API performs analysis on a text string and returns the resulting tokens.\n\nGenerating excessive amount of tokens may cause a node to run out of memory.\nThe `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced.\nIf more than this limit of tokens gets generated, an error occurs.\nThe `_analyze` endpoint without a specified index will always use `10000` as its limit.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-analyze.html" }, - "x-state": "Added in 7.10.0", - "x-api-name" : "get_trained_models", - "x-namespace": "ml" - }, - "put": { - "tags": [ - "ml trained model" - ], - "summary": "Create a trained model", - "description": "Enable you to supply a trained model that is not created by data frame analytics.", - "operationId": "ml-put-trained-model", + "operationId": "indices-analyze", "parameters": [ - { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - { - "in": "query", - "name": "defer_definition_decompression", - "description": "If set to `true` and a `compressed_definition` is provided,\nthe request defers definition decompression and skips relevant\nvalidations.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, { "in": "query", - "name": "wait_for_completion", - "description": "Whether to wait for all child operations (e.g. model download)\nto complete.", + "name": "index", + "description": "Index used to derive the analyzer.\nIf specified, the `analyzer` or field parameter overrides this value.\nIf no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "form" } @@ -24150,49 +26405,102 @@ "schema": { "type": "object", "properties": { - "compressed_definition": { - "description": "The compressed (GZipped and Base64 encoded) inference definition of the\nmodel. If compressed_definition is specified, then definition cannot be\nspecified.", - "type": "string" - }, - "definition": { - "$ref": "#/components/schemas/ml.put_trained_model.Definition" - }, - "description": { - "description": "A human-readable description of the inference trained model.", + "analyzer": { + "description": "The name of the analyzer that should be applied to the provided `text`.\nThis could be a built-in analyzer, or an analyzer that’s been configured in the index.", "type": "string" }, - "inference_config": { - "$ref": "#/components/schemas/ml._types.InferenceConfigCreateContainer" - }, - "input": { - "$ref": "#/components/schemas/ml.put_trained_model.Input" - }, - "metadata": { - "description": "An object map that contains metadata about the model.", - "type": "object" + "attributes": { + "description": "Array of token attributes used to filter the output of the `explain` parameter.", + "type": "array", + "items": { + "type": "string" + } }, - "model_type": { - "$ref": "#/components/schemas/ml._types.TrainedModelType" + "char_filter": { + "description": "Array of character filters used to preprocess characters before the tokenizer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.CharFilter" + } }, - "model_size_bytes": { - "description": "The estimated memory usage in bytes to keep the trained model in memory.\nThis property is supported only if defer_definition_decompression is true\nor the model definition is not supplied.", - "type": "number" + "explain": { + "description": "If `true`, the response includes token attributes and additional details.", + "default": false, + "type": "boolean" }, - "platform_architecture": { - "description": "The platform architecture (if applicable) of the trained mode. If the model\nonly works on one platform, because it is heavily optimized for a particular\nprocessor architecture and OS combination, then this field specifies which.\nThe format of the string must match the platform identifiers used by Elasticsearch,\nso one of, `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`,\nor `windows-x86_64`. For portable models (those that work independent of processor\narchitecture or OS features), leave this field unset.", - "type": "string" + "field": { + "description": "Field used to derive the analyzer.\nTo use this parameter, you must specify an index.\nIf specified, the `analyzer` parameter overrides this value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "tags": { - "description": "An array of tags to organize the model.", + "filter": { + "description": "Array of token filters used to apply after the tokenizer.", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/_types.analysis.TokenFilter" } }, - "prefix_strings": { - "$ref": "#/components/schemas/ml._types.TrainedModelPrefixStrings" + "normalizer": { + "description": "Normalizer to use to convert text into a single token.", + "type": "string" + }, + "text": { + "description": "Text to analyze.\nIf an array of strings is provided, it is analyzed as a multi-value field.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.TextToAnalyze" + } + ] + }, + "tokenizer": { + "description": "Tokenizer to use to convert text into tokens.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.Tokenizer" + } + ] } } + }, + "examples": { + "indicesAnalyzeRequestExample1": { + "summary": "No index specified", + "description": "You can apply any of the built-in analyzers to the text string without specifying an index.", + "value": "{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample2": { + "summary": "An array of text strings", + "description": "If the text parameter is provided as array of strings, it is analyzed as a multi-value field.", + "value": "{\n \"analyzer\": \"standard\",\n \"text\": [\n \"this is a test\",\n \"the second text\"\n ]\n}" + }, + "indicesAnalyzeRequestExample3": { + "summary": "Custom analyzer example 1", + "description": "You can test a custom transient analyzer built from tokenizers, token filters, and char filters. Token filters use the filter parameter.", + "value": "{\n \"tokenizer\": \"keyword\",\n \"filter\": [\n \"lowercase\"\n ],\n \"char_filter\": [\n \"html_strip\"\n ],\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample4": { + "summary": "Custom analyzer example 2", + "description": "Custom tokenizers, token filters, and character filters can be specified in the request body.", + "value": "{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n {\n \"type\": \"stop\",\n \"stopwords\": [\n \"a\",\n \"is\",\n \"this\"\n ]\n }\n ],\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample5": { + "summary": "Derive analyzer from field mapping", + "description": "Run `GET /analyze_sample/_analyze` to run an analysis on the text using the default index analyzer associated with the `analyze_sample` index. Alternatively, the analyzer can be derived based on a field mapping.", + "value": "{\n \"field\": \"obj1.field1\",\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample6": { + "summary": "Normalizer", + "description": "Run `GET /analyze_sample/_analyze` and supply a normalizer for a keyword field if there is a normalizer associated with the specified index.", + "value": "{\n \"normalizer\": \"my_normalizer\",\n \"text\": \"BaR\"\n}" + }, + "indicesAnalyzeRequestExample7": { + "summary": "Explain analysis", + "description": "If you want to get more advanced details, set `explain` to `true`. It will output all token attributes for each token. You can filter token attributes you want to output by setting the `attributes` option. NOTE: The format of the additional detail information is labelled as experimental in Lucene and it may change in the future.\n", + "value": "{\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"snowball\"\n ],\n \"text\": \"detailed output\",\n \"explain\": true,\n \"attributes\": [\n \"keyword\"\n ]\n}" + } } } }, @@ -24204,319 +26512,558 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ml._types.TrainedModelConfig" + "type": "object", + "properties": { + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.AnalyzeDetail" + } + ] + }, + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.analyze.AnalyzeToken" + } + } + } + }, + "examples": { + "indicesAnalyzeResponseExample7": { + "description": "A successful response for an analysis with `explain` set to `true`.", + "value": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": {\n \"name\": \"standard\",\n \"tokens\": [\n {\n \"token\": \"detailed\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n },\n \"tokenfilters\": [\n {\n \"name\": \"snowball\",\n \"tokens\": [\n {\n \"token\": \"detail\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1,\n \"keyword\": false\n }\n ]\n }\n ]\n }\n}" + } } } } } }, - "x-state": "Added in 7.10.0", - "x-api-name" : "put_trained_model", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_analyze\n
\n ", + "
\n POST\n /_analyze\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "analyze.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "delete": { + "post": { "tags": [ - "ml trained model" + "indices" ], - "summary": "Delete an unreferenced trained model", - "description": "The request deletes a trained inference model that is not referenced by an ingest pipeline.", - "operationId": "ml-delete-trained-model", + "summary": "Get tokens from text analysis", + "description": "The analyze API performs analysis on a text string and returns the resulting tokens.\n\nGenerating excessive amount of tokens may cause a node to run out of memory.\nThe `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced.\nIf more than this limit of tokens gets generated, an error occurs.\nThe `_analyze` endpoint without a specified index will always use `10000` as its limit.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-analyze.html" + }, + "operationId": "indices-analyze-1", "parameters": [ - { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - { - "in": "query", - "name": "force", - "description": "Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "index", + "description": "Index used to derive the analyzer.\nIf specified, the `analyzer` or field parameter overrides this value.\nIf no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "analyzer": { + "description": "The name of the analyzer that should be applied to the provided `text`.\nThis could be a built-in analyzer, or an analyzer that’s been configured in the index.", + "type": "string" + }, + "attributes": { + "description": "Array of token attributes used to filter the output of the `explain` parameter.", + "type": "array", + "items": { + "type": "string" + } + }, + "char_filter": { + "description": "Array of character filters used to preprocess characters before the tokenizer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.CharFilter" + } + }, + "explain": { + "description": "If `true`, the response includes token attributes and additional details.", + "default": false, + "type": "boolean" + }, + "field": { + "description": "Field used to derive the analyzer.\nTo use this parameter, you must specify an index.\nIf specified, the `analyzer` parameter overrides this value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "filter": { + "description": "Array of token filters used to apply after the tokenizer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.TokenFilter" + } + }, + "normalizer": { + "description": "Normalizer to use to convert text into a single token.", + "type": "string" + }, + "text": { + "description": "Text to analyze.\nIf an array of strings is provided, it is analyzed as a multi-value field.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.TextToAnalyze" + } + ] + }, + "tokenizer": { + "description": "Tokenizer to use to convert text into tokens.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.Tokenizer" + } + ] + } + } + }, + "examples": { + "indicesAnalyzeRequestExample1": { + "summary": "No index specified", + "description": "You can apply any of the built-in analyzers to the text string without specifying an index.", + "value": "{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample2": { + "summary": "An array of text strings", + "description": "If the text parameter is provided as array of strings, it is analyzed as a multi-value field.", + "value": "{\n \"analyzer\": \"standard\",\n \"text\": [\n \"this is a test\",\n \"the second text\"\n ]\n}" + }, + "indicesAnalyzeRequestExample3": { + "summary": "Custom analyzer example 1", + "description": "You can test a custom transient analyzer built from tokenizers, token filters, and char filters. Token filters use the filter parameter.", + "value": "{\n \"tokenizer\": \"keyword\",\n \"filter\": [\n \"lowercase\"\n ],\n \"char_filter\": [\n \"html_strip\"\n ],\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample4": { + "summary": "Custom analyzer example 2", + "description": "Custom tokenizers, token filters, and character filters can be specified in the request body.", + "value": "{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n {\n \"type\": \"stop\",\n \"stopwords\": [\n \"a\",\n \"is\",\n \"this\"\n ]\n }\n ],\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample5": { + "summary": "Derive analyzer from field mapping", + "description": "Run `GET /analyze_sample/_analyze` to run an analysis on the text using the default index analyzer associated with the `analyze_sample` index. Alternatively, the analyzer can be derived based on a field mapping.", + "value": "{\n \"field\": \"obj1.field1\",\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample6": { + "summary": "Normalizer", + "description": "Run `GET /analyze_sample/_analyze` and supply a normalizer for a keyword field if there is a normalizer associated with the specified index.", + "value": "{\n \"normalizer\": \"my_normalizer\",\n \"text\": \"BaR\"\n}" + }, + "indicesAnalyzeRequestExample7": { + "summary": "Explain analysis", + "description": "If you want to get more advanced details, set `explain` to `true`. It will output all token attributes for each token. You can filter token attributes you want to output by setting the `attributes` option. NOTE: The format of the additional detail information is labelled as experimental in Lucene and it may change in the future.\n", + "value": "{\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"snowball\"\n ],\n \"text\": \"detailed output\",\n \"explain\": true,\n \"attributes\": [\n \"keyword\"\n ]\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.AnalyzeDetail" + } + ] + }, + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.analyze.AnalyzeToken" + } + } + } }, "examples": { - "MlDeleteTrainedModelResponseExample1": { - "description": "A successful response when deleting an existing trained inference model.", - "value": "{\n \"acknowledged\": true\n}" + "indicesAnalyzeResponseExample7": { + "description": "A successful response for an analysis with `explain` set to `true`.", + "value": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": {\n \"name\": \"standard\",\n \"tokens\": [\n {\n \"token\": \"detailed\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n },\n \"tokenfilters\": [\n {\n \"name\": \"snowball\",\n \"tokens\": [\n {\n \"token\": \"detail\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1,\n \"keyword\": false\n }\n ]\n }\n ]\n }\n}" } } } } } }, - "x-state": "Added in 7.10.0", - "x-api-name" : "delete_trained_model", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_analyze\n
\n ", + "
\n POST\n /_analyze\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "analyze.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/trained_models/{model_id}/model_aliases/{model_alias}": { - "put": { + "/{index}/_analyze": { + "get": { "tags": [ - "ml trained model" + "indices" ], - "summary": "Create or update a trained model alias", - "description": "A trained model alias is a logical name used to reference a single trained\nmodel.\nYou can use aliases instead of trained model identifiers to make it easier to\nreference your models. For example, you can use aliases in inference\naggregations and processors.\nAn alias must be unique and refer to only a single trained model. However,\nyou can have multiple aliases for each trained model.\nIf you use this API to update an alias such that it references a different\ntrained model ID and the model uses a different type of data frame analytics,\nan error occurs. For example, this situation occurs if you have a trained\nmodel for regression analysis and a trained model for classification\nanalysis; you cannot reassign an alias from one type of trained model to\nanother.\nIf you use this API to update an alias and there are very few input fields in\ncommon between the old and new trained models for the model alias, the API\nreturns a warning.", - "operationId": "ml-put-trained-model-alias", + "summary": "Get tokens from text analysis", + "description": "The analyze API performs analysis on a text string and returns the resulting tokens.\n\nGenerating excessive amount of tokens may cause a node to run out of memory.\nThe `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced.\nIf more than this limit of tokens gets generated, an error occurs.\nThe `_analyze` endpoint without a specified index will always use `10000` as its limit.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-analyze.html" + }, + "operationId": "indices-analyze-2", "parameters": [ { "in": "path", - "name": "model_id", - "description": "The identifier for the trained model that the alias refers to.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - { - "in": "path", - "name": "model_alias", - "description": "The alias to create or update. This value cannot end in numbers.", + "name": "index", + "description": "Index used to derive the analyzer.\nIf specified, the `analyzer` or field parameter overrides this value.\nIf no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" }, { "in": "query", - "name": "reassign", - "description": "Specifies whether the alias gets reassigned to the specified trained\nmodel if it is already assigned to a different model. If the alias is\nalready assigned and this parameter is false, the API returns an error.", + "name": "index", + "description": "Index used to derive the analyzer.\nIf specified, the `analyzer` or field parameter overrides this value.\nIf no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "analyzer": { + "description": "The name of the analyzer that should be applied to the provided `text`.\nThis could be a built-in analyzer, or an analyzer that’s been configured in the index.", + "type": "string" + }, + "attributes": { + "description": "Array of token attributes used to filter the output of the `explain` parameter.", + "type": "array", + "items": { + "type": "string" + } + }, + "char_filter": { + "description": "Array of character filters used to preprocess characters before the tokenizer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.CharFilter" + } + }, + "explain": { + "description": "If `true`, the response includes token attributes and additional details.", + "default": false, + "type": "boolean" + }, + "field": { + "description": "Field used to derive the analyzer.\nTo use this parameter, you must specify an index.\nIf specified, the `analyzer` parameter overrides this value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "filter": { + "description": "Array of token filters used to apply after the tokenizer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.TokenFilter" + } + }, + "normalizer": { + "description": "Normalizer to use to convert text into a single token.", + "type": "string" + }, + "text": { + "description": "Text to analyze.\nIf an array of strings is provided, it is analyzed as a multi-value field.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.TextToAnalyze" + } + ] + }, + "tokenizer": { + "description": "Tokenizer to use to convert text into tokens.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.Tokenizer" + } + ] + } + } + }, + "examples": { + "indicesAnalyzeRequestExample1": { + "summary": "No index specified", + "description": "You can apply any of the built-in analyzers to the text string without specifying an index.", + "value": "{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample2": { + "summary": "An array of text strings", + "description": "If the text parameter is provided as array of strings, it is analyzed as a multi-value field.", + "value": "{\n \"analyzer\": \"standard\",\n \"text\": [\n \"this is a test\",\n \"the second text\"\n ]\n}" + }, + "indicesAnalyzeRequestExample3": { + "summary": "Custom analyzer example 1", + "description": "You can test a custom transient analyzer built from tokenizers, token filters, and char filters. Token filters use the filter parameter.", + "value": "{\n \"tokenizer\": \"keyword\",\n \"filter\": [\n \"lowercase\"\n ],\n \"char_filter\": [\n \"html_strip\"\n ],\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample4": { + "summary": "Custom analyzer example 2", + "description": "Custom tokenizers, token filters, and character filters can be specified in the request body.", + "value": "{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n {\n \"type\": \"stop\",\n \"stopwords\": [\n \"a\",\n \"is\",\n \"this\"\n ]\n }\n ],\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample5": { + "summary": "Derive analyzer from field mapping", + "description": "Run `GET /analyze_sample/_analyze` to run an analysis on the text using the default index analyzer associated with the `analyze_sample` index. Alternatively, the analyzer can be derived based on a field mapping.", + "value": "{\n \"field\": \"obj1.field1\",\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample6": { + "summary": "Normalizer", + "description": "Run `GET /analyze_sample/_analyze` and supply a normalizer for a keyword field if there is a normalizer associated with the specified index.", + "value": "{\n \"normalizer\": \"my_normalizer\",\n \"text\": \"BaR\"\n}" + }, + "indicesAnalyzeRequestExample7": { + "summary": "Explain analysis", + "description": "If you want to get more advanced details, set `explain` to `true`. It will output all token attributes for each token. You can filter token attributes you want to output by setting the `attributes` option. NOTE: The format of the additional detail information is labelled as experimental in Lucene and it may change in the future.\n", + "value": "{\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"snowball\"\n ],\n \"text\": \"detailed output\",\n \"explain\": true,\n \"attributes\": [\n \"keyword\"\n ]\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.AnalyzeDetail" + } + ] + }, + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.analyze.AnalyzeToken" + } + } + } + }, + "examples": { + "indicesAnalyzeResponseExample7": { + "description": "A successful response for an analysis with `explain` set to `true`.", + "value": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": {\n \"name\": \"standard\",\n \"tokens\": [\n {\n \"token\": \"detailed\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n },\n \"tokenfilters\": [\n {\n \"name\": \"snowball\",\n \"tokens\": [\n {\n \"token\": \"detail\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1,\n \"keyword\": false\n }\n ]\n }\n ]\n }\n}" + } } } } } }, - "x-state": "Added in 7.13.0", - "x-api-name" : "put_trained_model_alias", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_analyze\n
\n ", + "
\n POST\n /{index}/_analyze\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "analyze.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "delete": { + "post": { "tags": [ - "ml trained model" + "indices" ], - "summary": "Delete a trained model alias", - "description": "This API deletes an existing model alias that refers to a trained model. If\nthe model alias is missing or refers to a model other than the one identified\nby the `model_id`, this API returns an error.", - "operationId": "ml-delete-trained-model-alias", - "parameters": [ - { - "in": "path", - "name": "model_id", - "description": "The trained model ID to which the model alias refers.", + "summary": "Get tokens from text analysis", + "description": "The analyze API performs analysis on a text string and returns the resulting tokens.\n\nGenerating excessive amount of tokens may cause a node to run out of memory.\nThe `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced.\nIf more than this limit of tokens gets generated, an error occurs.\nThe `_analyze` endpoint without a specified index will always use `10000` as its limit.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-analyze.html" + }, + "operationId": "indices-analyze-3", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "Index used to derive the analyzer.\nIf specified, the `analyzer` or field parameter overrides this value.\nIf no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" }, { - "in": "path", - "name": "model_alias", - "description": "The model alias to delete.", - "required": true, + "in": "query", + "name": "index", + "description": "Index used to derive the analyzer.\nIf specified, the `analyzer` or field parameter overrides this value.\nIf no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.IndexName" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "MlDeleteTrainedModelAliasResponseExample1": { - "description": "A successful response when deleting a trained model alias.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } + "style": "form" } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "delete_trained_model_alias", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/_estimate_model_memory": { - "post": { - "tags": [ - "ml anomaly" ], - "summary": "Estimate job model memory usage", - "description": "Make an estimation of the memory usage for an anomaly detection job model.\nThe estimate is based on analysis configuration details for the job and cardinality\nestimates for the fields it references.", - "operationId": "ml-estimate-model-memory", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "analysis_config": { - "$ref": "#/components/schemas/ml._types.AnalysisConfig" + "analyzer": { + "description": "The name of the analyzer that should be applied to the provided `text`.\nThis could be a built-in analyzer, or an analyzer that’s been configured in the index.", + "type": "string" }, - "max_bucket_cardinality": { - "description": "Estimates of the highest cardinality in a single bucket that is observed\nfor influencer fields over the time period that the job analyzes data.\nTo produce a good answer, values must be provided for all influencer\nfields. Providing values for fields that are not listed as `influencers`\nhas no effect on the estimation.", - "type": "object", - "additionalProperties": { - "type": "number" + "attributes": { + "description": "Array of token attributes used to filter the output of the `explain` parameter.", + "type": "array", + "items": { + "type": "string" } }, - "overall_cardinality": { - "description": "Estimates of the cardinality that is observed for fields over the whole\ntime period that the job analyzes data. To produce a good answer, values\nmust be provided for fields referenced in the `by_field_name`,\n`over_field_name` and `partition_field_name` of any detectors. Providing\nvalues for other fields has no effect on the estimation. It can be\nomitted from the request if no detectors have a `by_field_name`,\n`over_field_name` or `partition_field_name`.", - "type": "object", - "additionalProperties": { - "type": "number" + "char_filter": { + "description": "Array of character filters used to preprocess characters before the tokenizer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.CharFilter" } - } - } - }, - "examples": { - "MlEstimateModelMemoryRequestExample1": { - "description": "Run `POST _ml/anomaly_detectors/_estimate_model_memory` to estimate the model memory limit based on the analysis configuration details provided in the request body.", - "value": "{\n \"analysis_config\": {\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [\n \"source_ip\",\n \"dest_ip\"\n ]\n },\n \"overall_cardinality\": {\n \"status\": 10,\n \"app\": 50\n },\n \"max_bucket_cardinality\": {\n \"source_ip\": 300,\n \"dest_ip\": 30\n }\n}" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "model_memory_estimate": { - "type": "string" + }, + "explain": { + "description": "If `true`, the response includes token attributes and additional details.", + "default": false, + "type": "boolean" + }, + "field": { + "description": "Field used to derive the analyzer.\nTo use this parameter, you must specify an index.\nIf specified, the `analyzer` parameter overrides this value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "filter": { + "description": "Array of token filters used to apply after the tokenizer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.TokenFilter" } }, - "required": [ - "model_memory_estimate" - ] - }, - "examples": { - "MlEstimateModelMemoryResponseExample1": { - "description": "A successful response from `POST _ml/anomaly_detectors/_estimate_model_memory`.", - "value": "{\n \"model_memory_estimate\": \"21mb\"\n}" - } - } - } - } - } - }, - "x-state": "Added in 7.7.0", - "x-api-name" : "estimate_model_memory", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/_evaluate": { - "post": { - "tags": [ - "ml data frame" - ], - "summary": "Evaluate data frame analytics", - "description": "The API packages together commonly used evaluation metrics for various types\nof machine learning features. This has been designed for use on indexes\ncreated by data frame analytics. Evaluation requires both a ground truth\nfield and an analytics result field to be present.", - "operationId": "ml-evaluate-data-frame", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "evaluation": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationContainer" + "normalizer": { + "description": "Normalizer to use to convert text into a single token.", + "type": "string" }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "text": { + "description": "Text to analyze.\nIf an array of strings is provided, it is analyzed as a multi-value field.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.TextToAnalyze" + } + ] }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "tokenizer": { + "description": "Tokenizer to use to convert text into tokens.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.Tokenizer" + } + ] } - }, - "required": [ - "evaluation", - "index" - ] + } }, "examples": { - "MlEvaluateDataFrameRequestExample1": { - "summary": "Classification example 1", - "description": "Run `POST _ml/data_frame/_evaluate` to evaluate a a classification job for an annotated index. The `actual_field` contains the ground truth for classification. The `predicted_field` contains the predicted value calculated by the classification analysis.\n", - "value": "{\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"predicted_field\": \"ml.animal_class_prediction\",\n \"metrics\": {\n \"multiclass_confusion_matrix\": {}\n }\n }\n }\n}" + "indicesAnalyzeRequestExample1": { + "summary": "No index specified", + "description": "You can apply any of the built-in analyzers to the text string without specifying an index.", + "value": "{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" }, - "MlEvaluateDataFrameRequestExample2": { - "summary": "Classification example 2", - "description": "Run `POST _ml/data_frame/_evaluate` to evaluate a classification job with AUC ROC metrics for an annotated index. The `actual_field` contains the ground truth value for the actual animal classification. This is required in order to evaluate results. The `class_name` specifies the class name that is treated as positive during the evaluation, all the other classes are treated as negative.\n", - "value": "{\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"metrics\": {\n \"auc_roc\": {\n \"class_name\": \"dog\"\n }\n }\n }\n }\n}" + "indicesAnalyzeRequestExample2": { + "summary": "An array of text strings", + "description": "If the text parameter is provided as array of strings, it is analyzed as a multi-value field.", + "value": "{\n \"analyzer\": \"standard\",\n \"text\": [\n \"this is a test\",\n \"the second text\"\n ]\n}" }, - "MlEvaluateDataFrameRequestExample3": { - "summary": "Outlier detection", - "description": "Run `POST _ml/data_frame/_evaluate` to evaluate an outlier detection job for an annotated index.\n", - "value": "{\n \"index\": \"my_analytics_dest_index\",\n \"evaluation\": {\n \"outlier_detection\": {\n \"actual_field\": \"is_outlier\",\n \"predicted_probability_field\": \"ml.outlier_score\"\n }\n }\n}" + "indicesAnalyzeRequestExample3": { + "summary": "Custom analyzer example 1", + "description": "You can test a custom transient analyzer built from tokenizers, token filters, and char filters. Token filters use the filter parameter.", + "value": "{\n \"tokenizer\": \"keyword\",\n \"filter\": [\n \"lowercase\"\n ],\n \"char_filter\": [\n \"html_strip\"\n ],\n \"text\": \"this is a test\"\n}" }, - "MlEvaluateDataFrameRequestExample4": { - "summary": "Regression example 1", - "description": "Run `POST _ml/data_frame/_evaluate` to evaluate the testing error of a regression job for an annotated index. The term query in the body limits evaluation to be performed on the test split only. The `actual_field` contains the ground truth for house prices. The `predicted_field` contains the house price calculated by the regression analysis.\n", - "value": "{\n \"index\": \"house_price_predictions\",\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"ml.is_training\": false\n }\n }\n ]\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"price\",\n \"predicted_field\": \"ml.price_prediction\",\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {},\n \"msle\": {\n \"offset\": 10\n },\n \"huber\": {\n \"delta\": 1.5\n }\n }\n }\n }\n}" + "indicesAnalyzeRequestExample4": { + "summary": "Custom analyzer example 2", + "description": "Custom tokenizers, token filters, and character filters can be specified in the request body.", + "value": "{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n {\n \"type\": \"stop\",\n \"stopwords\": [\n \"a\",\n \"is\",\n \"this\"\n ]\n }\n ],\n \"text\": \"this is a test\"\n}" }, - "MlEvaluateDataFrameRequestExample5": { - "summary": "Regression example 2", - "description": "Run `POST _ml/data_frame/_evaluate` to evaluate the training error of a regression job for an annotated index. The term query in the body limits evaluation to be performed on the training split only. The `actual_field` contains the ground truth for house prices. The `predicted_field` contains the house price calculated by the regression analysis.\n", - "value": "{\n \"index\": \"house_price_predictions\",\n \"query\": {\n \"term\": {\n \"ml.is_training\": {\n \"value\": true\n }\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"price\",\n \"predicted_field\": \"ml.price_prediction\",\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {},\n \"msle\": {},\n \"huber\": {}\n }\n }\n }\n}" + "indicesAnalyzeRequestExample5": { + "summary": "Derive analyzer from field mapping", + "description": "Run `GET /analyze_sample/_analyze` to run an analysis on the text using the default index analyzer associated with the `analyze_sample` index. Alternatively, the analyzer can be derived based on a field mapping.", + "value": "{\n \"field\": \"obj1.field1\",\n \"text\": \"this is a test\"\n}" + }, + "indicesAnalyzeRequestExample6": { + "summary": "Normalizer", + "description": "Run `GET /analyze_sample/_analyze` and supply a normalizer for a keyword field if there is a normalizer associated with the specified index.", + "value": "{\n \"normalizer\": \"my_normalizer\",\n \"text\": \"BaR\"\n}" + }, + "indicesAnalyzeRequestExample7": { + "summary": "Explain analysis", + "description": "If you want to get more advanced details, set `explain` to `true`. It will output all token attributes for each token. You can filter token attributes you want to output by setting the `attributes` option. NOTE: The format of the additional detail information is labelled as experimental in Lucene and it may change in the future.\n", + "value": "{\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"snowball\"\n ],\n \"text\": \"detailed output\",\n \"explain\": true,\n \"attributes\": [\n \"keyword\"\n ]\n}" } } } @@ -24531,167 +27078,139 @@ "schema": { "type": "object", "properties": { - "classification": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummary" - }, - "outlier_detection": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeOutlierDetectionSummary" + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.AnalyzeDetail" + } + ] }, - "regression": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeRegressionSummary" + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.analyze.AnalyzeToken" + } } } }, "examples": { - "MlEvaluateDataFrameResponseExample1": { - "summary": "Classification example 1", - "description": "A succesful response from `POST _ml/data_frame/_evaluate` to evaluate a classification analysis job for an annotated index. The `actual_class` contains the name of the class the analysis tried to predict. The `actual_class_doc_count` is the number of documents in the index belonging to the `actual_class`. The `predicted_classes` object contains the list of the predicted classes and the number of predictions associated with the class.\n", - "value": "{\n \"classification\": {\n \"multiclass_confusion_matrix\": {\n \"confusion_matrix\": [\n {\n \"actual_class\": \"cat\",\n \"actual_class_doc_count\": 12,\n \"predicted_classes\": [\n {\n \"predicted_class\": \"cat\",\n \"count\": 12\n },\n {\n \"predicted_class\": \"dog\",\n \"count\": 0\n }\n ],\n \"other_predicted_class_doc_count\": 0\n },\n {\n \"actual_class\": \"dog\",\n \"actual_class_doc_count\": 11,\n \"predicted_classes\": [\n {\n \"predicted_class\": \"dog\",\n \"count\": 7\n },\n {\n \"predicted_class\": \"cat\",\n \"count\": 4\n }\n ],\n \"other_predicted_class_doc_count\": 0\n }\n ],\n \"other_actual_class_count\": 0\n }\n }\n}" - }, - "MlEvaluateDataFrameResponseExample2": { - "summary": "Classification example 2", - "description": "A succesful response from `POST _ml/data_frame/_evaluate` to evaluate a classification analysis job with the AUC ROC metrics for an annotated index.\n", - "value": "{\n \"classification\": {\n \"auc_roc\": {\n \"value\": 0.8941788639536681\n }\n }\n}" - }, - "MlEvaluateDataFrameResponseExample3": { - "summary": "Outlier detection", - "description": "A successful response from `POST _ml/data_frame/_evaluate` to evaluate an outlier detection job.", - "value": "{\n \"outlier_detection\": {\n \"auc_roc\": {\n \"value\": 0.9258475774641445\n },\n \"confusion_matrix\": {\n \"0.25\": {\n \"tp\": 5,\n \"fp\": 9,\n \"tn\": 204,\n \"fn\": 5\n },\n \"0.5\": {\n \"tp\": 1,\n \"fp\": 5,\n \"tn\": 208,\n \"fn\": 9\n },\n \"0.75\": {\n \"tp\": 0,\n \"fp\": 4,\n \"tn\": 209,\n \"fn\": 10\n }\n },\n \"precision\": {\n \"0.25\": 0.35714285714285715,\n \"0.5\": 0.16666666666666666,\n \"0.75\": 0\n },\n \"recall\": {\n \"0.25\": 0.5,\n \"0.5\": 0.1,\n \"0.75\": 0\n }\n }\n}" + "indicesAnalyzeResponseExample7": { + "description": "A successful response for an analysis with `explain` set to `true`.", + "value": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": {\n \"name\": \"standard\",\n \"tokens\": [\n {\n \"token\": \"detailed\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n },\n \"tokenfilters\": [\n {\n \"name\": \"snowball\",\n \"tokens\": [\n {\n \"token\": \"detail\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1,\n \"keyword\": false\n }\n ]\n }\n ]\n }\n}" } } } } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "evaluate_data_frame", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics/_explain": { - "get": { - "tags": [ - "ml data frame" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_analyze\n
\n ", + "
\n POST\n /{index}/_analyze\n
\n " ], - "summary": "Explain data frame analytics config", - "description": "This API provides explanations for a data frame analytics config that either\nexists already or one that has not been created yet. The following\nexplanations are provided:\n* which fields are included or not in the analysis and why,\n* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.\nIf you have object fields or fields that are excluded via source filtering, they are not included in the explanation.", - "operationId": "ml-explain-data-frame-analytics", - "requestBody": { - "$ref": "#/components/requestBodies/ml.explain_data_frame_analytics" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.explain_data_frame_analytics-200" - } - }, - "x-state": "Added in 7.3.0", - "x-api-name" : "explain_data_frame_analytics", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml data frame" + "x-req-auth": [ + "Index privileges: `index`\n" ], - "summary": "Explain data frame analytics config", - "description": "This API provides explanations for a data frame analytics config that either\nexists already or one that has not been created yet. The following\nexplanations are provided:\n* which fields are included or not in the analysis and why,\n* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.\nIf you have object fields or fields that are excluded via source filtering, they are not included in the explanation.", - "operationId": "ml-explain-data-frame-analytics-1", - "requestBody": { - "$ref": "#/components/requestBodies/ml.explain_data_frame_analytics" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.explain_data_frame_analytics-200" + "x-api": "analyze.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.3.0", - "x-api-name" : "explain_data_frame_analytics", - "x-namespace": "ml" + ] } }, - "/_ml/data_frame/analytics/{id}/_explain": { - "get": { + "/_migration/reindex/{index}/_cancel": { + "post": { "tags": [ - "ml data frame" + "migration" ], - "summary": "Explain data frame analytics config", - "description": "This API provides explanations for a data frame analytics config that either\nexists already or one that has not been created yet. The following\nexplanations are provided:\n* which fields are included or not in the analysis and why,\n* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.\nIf you have object fields or fields that are excluded via source filtering, they are not included in the explanation.", - "operationId": "ml-explain-data-frame-analytics-2", + "summary": "Cancel a migration reindex operation", + "description": "Cancel a migration reindex attempt for a data stream or index.", + "operationId": "indices-cancel-migrate-reindex", "parameters": [ { - "$ref": "#/components/parameters/ml.explain_data_frame_analytics-id" + "in": "path", + "name": "index", + "description": "The index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.explain_data_frame_analytics" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.explain_data_frame_analytics-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "explain_data_frame_analytics", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml data frame" + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n POST\n /_migration/reindex/{index}/_cancel\n
\n " ], - "summary": "Explain data frame analytics config", - "description": "This API provides explanations for a data frame analytics config that either\nexists already or one that has not been created yet. The following\nexplanations are provided:\n* which fields are included or not in the analysis and why,\n* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.\nIf you have object fields or fields that are excluded via source filtering, they are not included in the explanation.", - "operationId": "ml-explain-data-frame-analytics-3", - "parameters": [ + "x-api": "cancel_migrate_reindex.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.explain_data_frame_analytics-id" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.explain_data_frame_analytics" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.explain_data_frame_analytics-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.3.0", - "x-api-name" : "explain_data_frame_analytics", - "x-namespace": "ml" + ] } }, - "/_ml/anomaly_detectors/{job_id}/_flush": { + "/_cache/clear": { "post": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Force buffered data to be processed", - "description": "The flush jobs API is only applicable when sending data for analysis using\nthe post data API. Depending on the content of the buffer, then it might\nadditionally calculate new results. Both flush and close operations are\nsimilar, however the flush is more efficient if you are expecting to send\nmore data for analysis. When flushing, the job remains open and is available\nto continue analyzing data. A close operation additionally prunes and\npersists the model state to disk and the job must be opened again before\nanalyzing further data.", - "operationId": "ml-flush-job", + "summary": "Clear the cache", + "description": "Clear the cache of one or more indices.\nFor data streams, the API clears the caches of the stream's backing indices.\n\nBy default, the clear cache API clears all caches.\nTo clear only specific caches, use the `fielddata`, `query`, or `request` parameters.\nTo clear the cache only of specific fields, use the `fields` parameter.", + "operationId": "indices-clear-cache", "parameters": [ { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "advance_time", - "description": "Specifies to advance to a particular time value. Results are generated\nand the model is updated for data from the specified time interval.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "calc_interim", - "description": "If true, calculates the interim results for the most recent bucket or all\nbuckets within the latency period.", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "fielddata", + "description": "If `true`, clears the fields cache.\nUse the `fields` parameter to clear the cache of specific fields only.", "deprecated": false, "schema": { "type": "boolean" @@ -24700,373 +27219,724 @@ }, { "in": "query", - "name": "end", - "description": "When used in conjunction with `calc_interim` and `start`, specifies the\nrange of buckets on which to calculate interim results.", + "name": "fields", + "description": "Comma-separated list of field names used to limit the `fielddata` parameter.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "skip_time", - "description": "Specifies to skip to a particular time value. Results are not generated\nand the model is not updated for data from the specified time interval.", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "start", - "description": "When used in conjunction with `calc_interim`, specifies the range of\nbuckets on which to calculate interim results.", + "name": "query", + "description": "If `true`, clears the query cache.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "request", + "description": "If `true`, clears the request cache.", + "deprecated": false, + "schema": { + "type": "boolean" }, "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "advance_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "calc_interim": { - "description": "Refer to the description for the `calc_interim` query parameter.", - "type": "boolean" - }, - "end": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "skip_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "start": { - "$ref": "#/components/schemas/_types.DateTime" - } - } - } - } - } - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "flushed": { - "type": "boolean" - }, - "last_finalized_bucket_end": { - "description": "Provides the timestamp (in milliseconds since the epoch) of the end of\nthe last bucket that was processed.", - "type": "number" - } - }, - "required": [ - "flushed" - ] + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" } } } } }, - "deprecated": true, - "x-state": "Added in 5.4.0", - "x-api-name" : "flush_job", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_cache/clear\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "clear_cache.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}": { - "get": { + "/{index}/_cache/clear": { + "post": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get anomaly detection job results for buckets", - "description": "The API presents a chronological view of the records, grouped by bucket.", - "operationId": "ml-get-buckets", + "summary": "Clear the cache", + "description": "Clear the cache of one or more indices.\nFor data streams, the API clears the caches of the stream's backing indices.\n\nBy default, the clear cache API clears all caches.\nTo clear only specific caches, use the `fielddata`, `query`, or `request` parameters.\nTo clear the cache only of specific fields, use the `fields` parameter.", + "operationId": "indices-clear-cache-1", "parameters": [ { - "$ref": "#/components/parameters/ml.get_buckets-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-timestamp" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-anomaly_score" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_buckets-desc" + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-end" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-exclude_interim" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-expand" + "in": "query", + "name": "fielddata", + "description": "If `true`, clears the fields cache.\nUse the `fields` parameter to clear the cache of specific fields only.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-from" + "in": "query", + "name": "fields", + "description": "Comma-separated list of field names used to limit the `fielddata` parameter.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-size" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-sort" + "in": "query", + "name": "query", + "description": "If `true`, clears the query cache.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-start" + "in": "query", + "name": "request", + "description": "If `true`, clears the request cache.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_buckets" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_buckets-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_buckets", - "x-namespace": "ml" - }, - "post": { + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_cache/clear\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "clear_cache.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_clone/{target}": { + "put": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get anomaly detection job results for buckets", - "description": "The API presents a chronological view of the records, grouped by bucket.", - "operationId": "ml-get-buckets-1", + "summary": "Clone an index", + "description": "Clone an existing index into a new index.\nEach original primary shard is cloned into a new primary shard in the new index.\n\nIMPORTANT: Elasticsearch does not apply index templates to the resulting index.\nThe API also does not copy index metadata from the original index.\nIndex metadata includes aliases, index lifecycle management phase definitions, and cross-cluster replication (CCR) follower information.\nFor example, if you clone a CCR follower index, the resulting clone will not be a follower index.\n\nThe clone API copies most index settings from the source index to the resulting index, with the exception of `index.number_of_replicas` and `index.auto_expand_replicas`.\nTo set the number of replicas in the resulting index, configure these settings in the clone request.\n\nCloning works as follows:\n\n* First, it creates a new target index with the same definition as the source index.\n* Then it hard-links segments from the source index into the target index. If the file system does not support hard-linking, all segments are copied into the new index, which is a much more time consuming process.\n* Finally, it recovers the target index as though it were a closed index which had just been re-opened.\n\nIMPORTANT: Indices can only be cloned if they meet the following requirements:\n\n* The index must be marked as read-only and have a cluster health status of green.\n* The target index must not exist.\n* The source index must have the same number of primary shards as the target index.\n* The node handling the clone process must have sufficient free disk space to accommodate a second copy of the existing index.\n\nThe current write index on a data stream cannot be cloned.\nIn order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned.\n\nNOTE: Mappings cannot be specified in the `_clone` request. The mappings of the source index will be used for the target index.\n\n**Monitor the cloning process**\n\nThe cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the `wait_for_status` parameter to `yellow`.\n\nThe `_clone` API returns as soon as the target index has been added to the cluster state, before any shards have been allocated.\nAt this point, all shards are in the state unassigned.\nIf, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node.\n\nOnce the primary shard is allocated, it moves to state initializing, and the clone process begins.\nWhen the clone operation completes, the shard will become active.\nAt that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node.\n\n**Wait for active shards**\n\nBecause the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.", + "operationId": "indices-clone", "parameters": [ { - "$ref": "#/components/parameters/ml.get_buckets-job_id" + "in": "path", + "name": "index", + "description": "Name of the source index to clone.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_buckets-timestamp" + "in": "path", + "name": "target", + "description": "Name of the target index to create.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_buckets-anomaly_score" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-desc" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-end" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-exclude_interim" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-expand" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-from" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-size" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-sort" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-start" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/ml.get_buckets" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aliases": { + "description": "Aliases for the resulting index.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "settings": { + "description": "Configuration options for the target index.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "indicesCloneRequestExample1": { + "summary": "Clone an existing index.", + "description": "Clone `my_source_index` into a new index called `my_target_index` with `POST /my_source_index/_clone/my_target_index`. The API accepts `settings` and `aliases` parameters for the target index.\n", + "value": "{\n \"settings\": {\n \"index.refresh_interval\": \"2s\"\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}" + } + } + } + } }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_buckets-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "shards_acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "index", + "shards_acknowledged" + ] + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_buckets", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/results/buckets": { - "get": { + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n PUT\n /{index}/_clone/{target}\n
\n ", + "
\n POST\n /{index}/_clone/{target}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "clone.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get anomaly detection job results for buckets", - "description": "The API presents a chronological view of the records, grouped by bucket.", - "operationId": "ml-get-buckets-2", + "summary": "Clone an index", + "description": "Clone an existing index into a new index.\nEach original primary shard is cloned into a new primary shard in the new index.\n\nIMPORTANT: Elasticsearch does not apply index templates to the resulting index.\nThe API also does not copy index metadata from the original index.\nIndex metadata includes aliases, index lifecycle management phase definitions, and cross-cluster replication (CCR) follower information.\nFor example, if you clone a CCR follower index, the resulting clone will not be a follower index.\n\nThe clone API copies most index settings from the source index to the resulting index, with the exception of `index.number_of_replicas` and `index.auto_expand_replicas`.\nTo set the number of replicas in the resulting index, configure these settings in the clone request.\n\nCloning works as follows:\n\n* First, it creates a new target index with the same definition as the source index.\n* Then it hard-links segments from the source index into the target index. If the file system does not support hard-linking, all segments are copied into the new index, which is a much more time consuming process.\n* Finally, it recovers the target index as though it were a closed index which had just been re-opened.\n\nIMPORTANT: Indices can only be cloned if they meet the following requirements:\n\n* The index must be marked as read-only and have a cluster health status of green.\n* The target index must not exist.\n* The source index must have the same number of primary shards as the target index.\n* The node handling the clone process must have sufficient free disk space to accommodate a second copy of the existing index.\n\nThe current write index on a data stream cannot be cloned.\nIn order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned.\n\nNOTE: Mappings cannot be specified in the `_clone` request. The mappings of the source index will be used for the target index.\n\n**Monitor the cloning process**\n\nThe cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the `wait_for_status` parameter to `yellow`.\n\nThe `_clone` API returns as soon as the target index has been added to the cluster state, before any shards have been allocated.\nAt this point, all shards are in the state unassigned.\nIf, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node.\n\nOnce the primary shard is allocated, it moves to state initializing, and the clone process begins.\nWhen the clone operation completes, the shard will become active.\nAt that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node.\n\n**Wait for active shards**\n\nBecause the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.", + "operationId": "indices-clone-1", "parameters": [ { - "$ref": "#/components/parameters/ml.get_buckets-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-anomaly_score" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-desc" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-end" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-exclude_interim" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-expand" + "in": "path", + "name": "index", + "description": "Name of the source index to clone.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_buckets-from" + "in": "path", + "name": "target", + "description": "Name of the target index to create.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_buckets-size" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-sort" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-start" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/ml.get_buckets" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aliases": { + "description": "Aliases for the resulting index.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "settings": { + "description": "Configuration options for the target index.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "indicesCloneRequestExample1": { + "summary": "Clone an existing index.", + "description": "Clone `my_source_index` into a new index called `my_target_index` with `POST /my_source_index/_clone/my_target_index`. The API accepts `settings` and `aliases` parameters for the target index.\n", + "value": "{\n \"settings\": {\n \"index.refresh_interval\": \"2s\"\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}" + } + } + } + } }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_buckets-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "shards_acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "index", + "shards_acknowledged" + ] + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_buckets", - "x-namespace": "ml" - }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n PUT\n /{index}/_clone/{target}\n
\n ", + "
\n POST\n /{index}/_clone/{target}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "clone.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_close": { "post": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get anomaly detection job results for buckets", - "description": "The API presents a chronological view of the records, grouped by bucket.", - "operationId": "ml-get-buckets-3", + "summary": "Close an index", + "description": "A closed index is blocked for read or write operations and does not allow all operations that opened indices allow.\nIt is not possible to index documents or to search for documents in a closed index.\nClosed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster.\n\nWhen opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index.\nThe shards will then go through the normal recovery process.\nThe data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.\n\nYou can open and close multiple indices.\nAn error is thrown if the request explicitly refers to a missing index.\nThis behaviour can be turned off using the `ignore_unavailable=true` parameter.\n\nBy default, you must explicitly name the indices you are opening or closing.\nTo open or close indices with `_all`, `*`, or other wildcard expressions, change the` action.destructive_requires_name` setting to `false`. This setting can also be changed with the cluster update settings API.\n\nClosed indices consume a significant amount of disk-space which can cause problems in managed environments.\nClosing indices can be turned off with the cluster settings API by setting `cluster.indices.close.enable` to `false`.", + "operationId": "indices-close", "parameters": [ { - "$ref": "#/components/parameters/ml.get_buckets-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-anomaly_score" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-desc" - }, - { - "$ref": "#/components/parameters/ml.get_buckets-end" + "in": "path", + "name": "index", + "description": "Comma-separated list or wildcard expression of index names used to limit the request.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_buckets-exclude_interim" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-expand" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-from" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-size" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-sort" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_buckets-start" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_buckets" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_buckets-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.close.CloseIndexResult" + } + }, + "shards_acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "indices", + "shards_acknowledged" + ] + }, + "examples": { + "CloseIndexResponseExample1": { + "description": "A successful response for closing an index.", + "value": "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"indices\": {\n \"my-index-000001\": {\n \"closed\": true\n }\n }\n}" + } + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_buckets", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_close\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "close.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/calendars/{calendar_id}/events": { + "/{index}": { "get": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get info about events in calendars", - "operationId": "ml-get-calendar-events", + "summary": "Get index information", + "description": "Get information about one or more indices. For data streams, the API returns information about the\nstream’s backing indices.", + "operationId": "indices-get", "parameters": [ { "in": "path", - "name": "calendar_id", - "description": "A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases used to limit the request.\nWildcard expressions (*) are supported.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { "in": "query", - "name": "end", - "description": "Specifies to get events with timestamps earlier than this time.", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias, or _all value targets only\nmissing or closed indices. This behavior applies even if the request targets other open indices. For example,\na request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "from", - "description": "Skips the specified number of events.", + "name": "expand_wildcards", + "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "job_id", - "description": "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 `*`.", + "name": "flat_settings", + "description": "If true, returns settings in flat format.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "size", - "description": "Specifies the maximum number of events to obtain.", + "name": "ignore_unavailable", + "description": "If false, requests that target a missing index return an error.", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "start", - "description": "Specifies to get events with timestamps after this time.", + "name": "include_defaults", + "description": "If true, return all default settings in the response.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "features", + "description": "Return only information on specified index features", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/indices.get.Features" }, + "x-state": "Generally available; Added in 8.1.0", "style": "form" } ], @@ -25077,47 +27947,78 @@ "application/json": { "schema": { "type": "object", - "properties": { - "count": { - "type": "number" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.CalendarEvent" - } - } - }, - "required": [ - "count", - "events" - ] + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexState" + } } } } } }, - "x-state": "Added in 6.2.0", - "x-api-name" : "get_calendar_events", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`,`manage`\n" + ], + "x-api": "get.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "post": { + "put": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Add scheduled events to the calendar", - "operationId": "ml-post-calendar-events", + "summary": "Create an index", + "description": "You can use the create index API to add a new index to an Elasticsearch cluster.\nWhen creating an index, you can specify the following:\n\n* Settings for the index.\n* Mappings for fields in the index.\n* Index aliases\n\n**Wait for active shards**\n\nBy default, index creation will only return a response to the client when the primary copies of each shard have been started, or the request times out.\nThe index creation response will indicate what happened.\nFor example, `acknowledged` indicates whether the index was successfully created in the cluster, `while shards_acknowledged` indicates whether the requisite number of shard copies were started for each shard in the index before timing out.\nNote that it is still possible for either `acknowledged` or `shards_acknowledged` to be `false`, but for the index creation to be successful.\nThese values simply indicate whether the operation completed before the timeout.\nIf `acknowledged` is false, the request timed out before the cluster state was updated with the newly created index, but it probably will be created sometime soon.\nIf `shards_acknowledged` is false, then the request timed out before the requisite number of shards were started (by default just the primaries), even if the cluster state was successfully updated to reflect the newly created index (that is to say, `acknowledged` is `true`).\n\nYou can change the default of only waiting for the primary shards to start through the index setting `index.write.wait_for_active_shards`.\nNote that changing this setting will also affect the `wait_for_active_shards` value on all subsequent write operations.", + "operationId": "indices-create", "parameters": [ { "in": "path", - "name": "calendar_id", - "description": "A string that uniquely identifies a calendar.", + "name": "index", + "description": "Name of the index you wish to create.\nIndex names must meet the following criteria:\n\n* Lowercase only\n* Cannot include `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`\n* Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions\n* Cannot start with `-`, `_`, or `+`\n* Cannot be `.` or `..`\n* Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster)\n* Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], "requestBody": { @@ -25126,21 +28027,50 @@ "schema": { "type": "object", "properties": { - "events": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.CalendarEvent" + "aliases": { + "description": "Aliases for the index.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" } + }, + "mappings": { + "description": "Mapping for fields in the index. If specified, this mapping can include:\n- Field names\n- Field data types\n- Mapping parameters", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "settings": { + "description": "Configuration options for the index.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] } + } + }, + "examples": { + "indicesCreateRequestExample1": { + "summary": "Create an index.", + "description": "This request specifies the `number_of_shards` and `number_of_replicas`.", + "value": "{\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\": 2\n }\n}" }, - "required": [ - "events" - ] + "indicesCreateRequestExample2": { + "summary": "Create an index with mappings.", + "description": "You can provide mapping definitions in the create index API requests.", + "value": "{\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"properties\": {\n \"field1\": { \"type\": \"text\" }\n }\n }\n}" + }, + "indicesCreateRequestExample3": { + "summary": "Create an index with aliases.", + "description": "You can provide mapping definitions in the create index API requests. Index alias names also support date math.\n", + "value": "{\n \"aliases\": {\n \"alias_1\": {},\n \"alias_2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n }\n }\n}" + } } } - }, - "required": true + } }, "responses": { "200": { @@ -25150,681 +28080,943 @@ "schema": { "type": "object", "properties": { - "events": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.CalendarEvent" - } - } - }, - "required": [ - "events" - ] - } - } + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "shards_acknowledged": { + "type": "boolean" + }, + "acknowledged": { + "type": "boolean" + } + }, + "required": [ + "index", + "shards_acknowledged", + "acknowledged" + ] + } + } } } }, - "x-state": "Added in 6.2.0", - "x-api-name" : "post_calendar_events", - "x-namespace": "ml" - } - }, - "/_ml/calendars": { - "get": { - "tags": [ - "ml anomaly" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}\n
\n " ], - "summary": "Get calendar configuration info", - "operationId": "ml-get-calendars", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_calendars-from" - }, - { - "$ref": "#/components/parameters/ml.get_calendars-size" - } + "x-req-auth": [ + "Index privileges: `create_index`,`manage`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_calendars" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_calendars-200" + "x-api": "create.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.2.0", - "x-api-name" : "get_calendars", - "x-namespace": "ml" + ] }, - "post": { + "delete": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get calendar configuration info", - "operationId": "ml-get-calendars-1", + "summary": "Delete indices", + "description": "Deleting an index deletes its documents, shards, and metadata.\nIt does not delete related Kibana components, such as data views, visualizations, or dashboards.\n\nYou cannot delete the current write index of a data stream.\nTo delete the index, you must roll over the data stream so a new write index is created.\nYou can then use the delete index API to delete the previous write index.", + "operationId": "indices-delete", "parameters": [ { - "$ref": "#/components/parameters/ml.get_calendars-from" + "in": "path", + "name": "index", + "description": "Comma-separated list of indices to delete.\nYou cannot specify index aliases.\nBy default, this parameter does not support wildcards (`*`) or `_all`.\nTo use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_calendars-size" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_calendars" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_calendars-200" - } - }, - "x-state": "Added in 6.2.0", - "x-api-name" : "get_calendars", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}": { - "get": { - "tags": [ - "ml anomaly" - ], - "summary": "Get anomaly detection job results for categories", - "operationId": "ml-get-categories", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_categories-job_id" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-category_id" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-from" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-partition_field_value" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-size" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_categories" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_categories-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.IndicesResponseBase" + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_categories", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /{index}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `delete_index`\n" + ], + "x-api": "delete.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "post": { + "head": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get anomaly detection job results for categories", - "operationId": "ml-get-categories-1", + "summary": "Check indices", + "description": "Check if one or more indices, index aliases, or data streams exist.", + "operationId": "indices-exists", "parameters": [ { - "$ref": "#/components/parameters/ml.get_categories-job_id" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-category_id" + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-from" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-partition_field_value" + "in": "query", + "name": "include_defaults", + "description": "If `true`, return all default settings in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-size" + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_categories" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_categories-200" + "description": "", + "content": { + "application/json": {} + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_categories", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n HEAD\n /{index}\n
\n " + ], + "x-api": "exists.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/anomaly_detectors/{job_id}/results/categories": { + "/_data_stream/{name}": { "get": { "tags": [ - "ml anomaly" + "data stream" ], - "summary": "Get anomaly detection job results for categories", - "operationId": "ml-get-categories-2", + "summary": "Get data streams", + "description": "Get information about one or more data streams.", + "operationId": "indices-get-data-stream-1", "parameters": [ { - "$ref": "#/components/parameters/ml.get_categories-job_id" + "in": "path", + "name": "name", + "description": "Comma-separated list of data stream names used to limit the request.\nWildcard (`*`) expressions are supported. If omitted, all data streams are returned.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamNames" + }, + "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-from" + "in": "query", + "name": "include_defaults", + "description": "If true, returns all relevant default configurations for the index template.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.11.0", + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-partition_field_value" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-size" + "in": "query", + "name": "verbose", + "description": "Whether the maximum timestamp for each data stream should be calculated and returned.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_categories" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_categories-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.DataStream" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "indicesGetDataStreamResponseExample1": { + "description": "A successful response for retrieving information about a data stream.", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-my-data-stream-2099.03.07-000001\",\n \"index_uuid\": \"xCEhwsp8Tey0-FLNFYVwSg\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n },\n {\n \"index_name\": \".ds-my-data-stream-2099.03.08-000002\",\n \"index_uuid\": \"PA_JquKGSiKcAKBA8DJ5gw\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n }\n ],\n \"generation\": 2,\n \"_meta\": {\n \"my-meta-field\": \"foo\"\n },\n \"status\": \"GREEN\",\n \"next_generation_managed_by\": \"Index Lifecycle Management\",\n \"prefer_ilm\": true,\n \"template\": \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"hidden\": false,\n \"system\": false,\n \"allow_custom_routing\": false,\n \"replicated\": false,\n \"rollover_on_write\": false\n },\n {\n \"name\": \"my-data-stream-two\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-my-data-stream-two-2099.03.08-000001\",\n \"index_uuid\": \"3liBu2SYS5axasRt6fUIpA\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n }\n ],\n \"generation\": 1,\n \"_meta\": {\n \"my-meta-field\": \"foo\"\n },\n \"status\": \"YELLOW\",\n \"next_generation_managed_by\": \"Index Lifecycle Management\",\n \"prefer_ilm\": true,\n \"template\": \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"hidden\": false,\n \"system\": false,\n \"allow_custom_routing\": false,\n \"replicated\": false,\n \"rollover_on_write\": false\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_categories", - "x-namespace": "ml" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_data_stream/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_data_stream.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "post": { + "put": { "tags": [ - "ml anomaly" + "data stream" ], - "summary": "Get anomaly detection job results for categories", - "operationId": "ml-get-categories-3", + "summary": "Create a data stream", + "description": "You must have a matching index template with data stream enabled.", + "operationId": "indices-create-data-stream", "parameters": [ { - "$ref": "#/components/parameters/ml.get_categories-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_categories-from" + "in": "path", + "name": "name", + "description": "Name of the data stream, which must meet the following criteria:\nLowercase only;\nCannot include `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, `,`, `#`, `:`, or a space character;\nCannot start with `-`, `_`, `+`, or `.ds-`;\nCannot be `.` or `..`;\nCannot be longer than 255 bytes. Multi-byte characters count towards this limit faster.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_categories-partition_field_value" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_categories-size" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_categories" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_categories-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_categories", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics": { - "get": { - "tags": [ - "ml data frame" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n PUT\n /_data_stream/{name}\n
\n " ], - "summary": "Get data frame analytics job configuration info", - "description": "You can get information for multiple data frame analytics jobs in a single\nAPI request by using a comma-separated list of data frame analytics jobs or a\nwildcard expression.", - "operationId": "ml-get-data-frame-analytics-1", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-from" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-size" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics-exclude_generated" - } + "x-req-auth": [ + "Index privileges: `create_index`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_data_frame_analytics-200" + "x-api": "create_data_stream.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.3.0", - "x-api-name" : "get_data_frame_analytics", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics/_stats": { - "get": { + ] + }, + "delete": { "tags": [ - "ml data frame" + "data stream" ], - "summary": "Get data frame analytics job stats", - "operationId": "ml-get-data-frame-analytics-stats", + "summary": "Delete data streams", + "description": "Deletes one or more data streams and their backing indices.", + "operationId": "indices-delete-data-stream", "parameters": [ { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-from" + "in": "path", + "name": "name", + "description": "Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamNames" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-size" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-verbose" + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match. Supports comma-separated values,such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/ml.get_data_frame_analytics_stats-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "get_data_frame_analytics_stats", - "x-namespace": "ml" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n DELETE\n /_data_stream/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `delete_index`\n" + ], + "x-api": "delete_data_stream.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/data_frame/analytics/{id}/_stats": { - "get": { + "/_create_from/{source}/{dest}": { + "put": { "tags": [ - "ml data frame" + "migration" ], - "summary": "Get data frame analytics job stats", - "operationId": "ml-get-data-frame-analytics-stats-1", + "summary": "Create an index from a source index", + "description": "Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.", + "operationId": "indices-create-from", "parameters": [ { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-id" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-from" - }, - { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-size" + "in": "path", + "name": "source", + "description": "The source index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-verbose" + "in": "path", + "name": "dest", + "description": "The destination index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices.create_from.CreateFrom" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_data_frame_analytics_stats-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "shards_acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "index", + "shards_acknowledged" + ] + } + } + } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "get_data_frame_analytics_stats", - "x-namespace": "ml" - } - }, - "/_ml/datafeeds/{datafeed_id}/_stats": { - "get": { + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n PUT\n /_create_from/{source}/{dest}\n
\n ", + "
\n POST\n /_create_from/{source}/{dest}\n
\n " + ], + "x-api": "create_from.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "ml anomaly" + "migration" ], - "summary": "Get datafeed stats", - "description": "You can get statistics for multiple datafeeds in a single API request by\nusing a comma-separated list of datafeeds or a wildcard expression. You can\nget statistics for all datafeeds by using `_all`, by specifying `*` as the\n``, or by omitting the ``. If the datafeed is stopped, the\nonly information you receive is the `datafeed_id` and the `state`.\nThis API returns a maximum of 10,000 datafeeds.", - "operationId": "ml-get-datafeed-stats", + "summary": "Create an index from a source index", + "description": "Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.", + "operationId": "indices-create-from-1", "parameters": [ { - "$ref": "#/components/parameters/ml.get_datafeed_stats-datafeed_id" + "in": "path", + "name": "source", + "description": "The source index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_datafeed_stats-allow_no_match" + "in": "path", + "name": "dest", + "description": "The destination index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" } ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_datafeed_stats-200" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices.create_from.CreateFrom" + } + } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_datafeed_stats", - "x-namespace": "ml" - } - }, - "/_ml/datafeeds/_stats": { - "get": { - "tags": [ - "ml anomaly" - ], - "summary": "Get datafeed stats", - "description": "You can get statistics for multiple datafeeds in a single API request by\nusing a comma-separated list of datafeeds or a wildcard expression. You can\nget statistics for all datafeeds by using `_all`, by specifying `*` as the\n``, or by omitting the ``. If the datafeed is stopped, the\nonly information you receive is the `datafeed_id` and the `state`.\nThis API returns a maximum of 10,000 datafeeds.", - "operationId": "ml-get-datafeed-stats-1", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_datafeed_stats-allow_no_match" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_datafeed_stats-200" - } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_datafeed_stats", - "x-namespace": "ml" - } - }, - "/_ml/datafeeds": { - "get": { - "tags": [ - "ml anomaly" - ], - "summary": "Get datafeeds configuration info", - "description": "You can get information for multiple datafeeds in a single API request by\nusing a comma-separated list of datafeeds or a wildcard expression. You can\nget information for all datafeeds by using `_all`, by specifying `*` as the\n``, or by omitting the ``.\nThis API returns a maximum of 10,000 datafeeds.", - "operationId": "ml-get-datafeeds-1", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_datafeeds-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_datafeeds-exclude_generated" - } - ], "responses": { "200": { - "$ref": "#/components/responses/ml.get_datafeeds-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "shards_acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "index", + "shards_acknowledged" + ] + } + } + } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_datafeeds", - "x-namespace": "ml" - } - }, - "/_ml/filters": { - "get": { - "tags": [ - "ml anomaly" + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n PUT\n /_create_from/{source}/{dest}\n
\n ", + "
\n POST\n /_create_from/{source}/{dest}\n
\n " ], - "summary": "Get filters", - "description": "You can get a single filter or all filters.", - "operationId": "ml-get-filters", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_filters-from" - }, + "x-api": "create_from.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.get_filters-size" + "content": "Elasticsearch", + "name": "product_name" } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_filters-200" - } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_filters", - "x-namespace": "ml" + ] } }, - "/_ml/anomaly_detectors/{job_id}/results/influencers": { + "/_data_stream/_stats": { "get": { "tags": [ - "ml anomaly" - ], - "summary": "Get anomaly detection job results for influencers", - "description": "Influencers are the entities that have contributed to, or are to blame for,\nthe anomalies. Influencer results are available only if an\n`influencer_field_name` is specified in the job configuration.", - "operationId": "ml-get-influencers", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_influencers-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-desc" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-end" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-exclude_interim" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-influencer_score" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-from" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-size" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-sort" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-start" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_influencers" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_influencers-200" - } - }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_influencers", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml anomaly" + "data stream" ], - "summary": "Get anomaly detection job results for influencers", - "description": "Influencers are the entities that have contributed to, or are to blame for,\nthe anomalies. Influencer results are available only if an\n`influencer_field_name` is specified in the job configuration.", - "operationId": "ml-get-influencers-1", + "summary": "Get data stream stats", + "description": "Get statistics for one or more data streams.", + "operationId": "indices-data-streams-stats", "parameters": [ { - "$ref": "#/components/parameters/ml.get_influencers-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-desc" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-end" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-exclude_interim" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-influencer_score" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-from" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-size" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-sort" - }, - { - "$ref": "#/components/parameters/ml.get_influencers-start" + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_influencers" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_influencers-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_shards": { + "description": "Contains information about shards that attempted to execute the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "backing_indices": { + "description": "Total number of backing indices for the selected data streams.", + "type": "number" + }, + "data_stream_count": { + "description": "Total number of selected data streams.", + "type": "number" + }, + "data_streams": { + "description": "Contains statistics for the selected data streams.", + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.data_streams_stats.DataStreamsStatsItem" + } + }, + "total_store_sizes": { + "description": "Total size of all shards for the selected data streams.\nThis property is included only if the `human` query parameter is `true`", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_store_size_bytes": { + "description": "Total size, in bytes, of all shards for the selected data streams.", + "type": "number" + } + }, + "required": [ + "_shards", + "backing_indices", + "data_stream_count", + "data_streams", + "total_store_size_bytes" + ] + }, + "examples": { + "indicesDataStreamStatsResponseExample1": { + "description": "A successful response for retrieving statistics for a data stream.", + "value": "{\n \"_shards\": {\n \"total\": 10,\n \"successful\": 5,\n \"failed\": 0\n },\n \"data_stream_count\": 2,\n \"backing_indices\": 5,\n \"total_store_size\": \"7kb\",\n \"total_store_size_bytes\": 7268,\n \"data_streams\": [\n {\n \"data_stream\": \"my-data-stream\",\n \"backing_indices\": 3,\n \"store_size\": \"3.7kb\",\n \"store_size_bytes\": 3772,\n \"maximum_timestamp\": 1607512028000\n },\n {\n \"data_stream\": \"my-data-stream-two\",\n \"backing_indices\": 2,\n \"store_size\": \"3.4kb\",\n \"store_size_bytes\": 3496,\n \"maximum_timestamp\": 1607425567000\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_influencers", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/_stats": { - "get": { - "tags": [ - "ml anomaly" - ], - "summary": "Get anomaly detection job stats", - "operationId": "ml-get-job-stats", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_job_stats-allow_no_match" - } + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_data_stream/_stats\n
\n " ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_job_stats-200" - } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_job_stats", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/_stats": { - "get": { - "tags": [ - "ml anomaly" + "x-req-auth": [ + "Index privileges: `monitor`\n" ], - "summary": "Get anomaly detection job stats", - "operationId": "ml-get-job-stats-1", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_job_stats-job_id" - }, + "x-api": "data_streams_stats.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.get_job_stats-allow_no_match" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_job_stats-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_job_stats", - "x-namespace": "ml" + ] } }, - "/_ml/anomaly_detectors": { + "/_data_stream/{name}/_stats": { "get": { "tags": [ - "ml anomaly" + "data stream" ], - "summary": "Get anomaly detection jobs configuration info", - "description": "You can get information for multiple anomaly detection jobs in a single API\nrequest by using a group name, a comma-separated list of jobs, or a wildcard\nexpression. You can get information for all anomaly detection jobs by using\n`_all`, by specifying `*` as the ``, or by omitting the ``.", - "operationId": "ml-get-jobs-1", + "summary": "Get data stream stats", + "description": "Get statistics for one or more data streams.", + "operationId": "indices-data-streams-stats-1", "parameters": [ { - "$ref": "#/components/parameters/ml.get_jobs-allow_no_match" + "in": "path", + "name": "name", + "description": "Comma-separated list of data streams used to limit the request.\nWildcard expressions (`*`) are supported.\nTo target all data streams in a cluster, omit this parameter or use `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_jobs-exclude_generated" + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/ml.get_jobs-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_shards": { + "description": "Contains information about shards that attempted to execute the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "backing_indices": { + "description": "Total number of backing indices for the selected data streams.", + "type": "number" + }, + "data_stream_count": { + "description": "Total number of selected data streams.", + "type": "number" + }, + "data_streams": { + "description": "Contains statistics for the selected data streams.", + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.data_streams_stats.DataStreamsStatsItem" + } + }, + "total_store_sizes": { + "description": "Total size of all shards for the selected data streams.\nThis property is included only if the `human` query parameter is `true`", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_store_size_bytes": { + "description": "Total size, in bytes, of all shards for the selected data streams.", + "type": "number" + } + }, + "required": [ + "_shards", + "backing_indices", + "data_stream_count", + "data_streams", + "total_store_size_bytes" + ] + }, + "examples": { + "indicesDataStreamStatsResponseExample1": { + "description": "A successful response for retrieving statistics for a data stream.", + "value": "{\n \"_shards\": {\n \"total\": 10,\n \"successful\": 5,\n \"failed\": 0\n },\n \"data_stream_count\": 2,\n \"backing_indices\": 5,\n \"total_store_size\": \"7kb\",\n \"total_store_size_bytes\": 7268,\n \"data_streams\": [\n {\n \"data_stream\": \"my-data-stream\",\n \"backing_indices\": 3,\n \"store_size\": \"3.7kb\",\n \"store_size_bytes\": 3772,\n \"maximum_timestamp\": 1607512028000\n },\n {\n \"data_stream\": \"my-data-stream-two\",\n \"backing_indices\": 2,\n \"store_size\": \"3.4kb\",\n \"store_size_bytes\": 3496,\n \"maximum_timestamp\": 1607425567000\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_jobs", - "x-namespace": "ml" - } - }, - "/_ml/memory/_stats": { - "get": { - "tags": [ - "ml" - ], - "summary": "Get machine learning memory usage info", - "description": "Get information about how machine learning jobs and trained models are using memory,\non each node, both within the JVM heap, and natively, outside of the JVM.", - "operationId": "ml-get-memory-stats", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_memory_stats-master_timeout" - }, - { - "$ref": "#/components/parameters/ml.get_memory_stats-timeout" - } + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_data_stream/{name}/_stats\n
\n " ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_memory_stats-200" - } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "get_memory_stats", - "x-namespace": "ml" - } - }, - "/_ml/memory/{node_id}/_stats": { - "get": { - "tags": [ - "ml" + "x-req-auth": [ + "Index privileges: `monitor`\n" ], - "summary": "Get machine learning memory usage info", - "description": "Get information about how machine learning jobs and trained models are using memory,\non each node, both within the JVM heap, and natively, outside of the JVM.", - "operationId": "ml-get-memory-stats-1", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_memory_stats-node_id" - }, + "x-api": "data_streams_stats.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.get_memory_stats-master_timeout" - }, - { - "$ref": "#/components/parameters/ml.get_memory_stats-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_memory_stats-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "get_memory_stats", - "x-namespace": "ml" + ] } }, - "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats": { + "/{index}/_alias/{name}": { "get": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get anomaly detection job model snapshot upgrade usage info", - "operationId": "ml-get-model-snapshot-upgrade-stats", + "summary": "Get aliases", + "description": "Retrieves information for one or more data stream or index aliases.", + "operationId": "indices-get-alias-2", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", + "name": "index", + "description": "Comma-separated list of data streams or indices used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { "in": "path", - "name": "snapshot_id", - "description": "A numerical character string that uniquely identifies the model snapshot. You can get information for multiple\nsnapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using `_all`,\nby specifying `*` as the snapshot ID, or by omitting the snapshot ID.", + "name": "name", + "description": "Comma-separated list of aliases to retrieve.\nSupports wildcards (`*`).\nTo retrieve all aliases, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, { "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n - Contains wildcard expressions and there are no jobs that match.\n - Contains the _all string or no identifiers and there are no matches.\n - Contains wildcard expressions and there are only partial matches.\n\nThe default value is true, which returns an empty jobs array when there are no matches and the subset of results\nwhen there are partial matches. If this parameter is false, the request returns a 404 status code when there are\nno matches or only partial matches.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -25834,429 +29026,544 @@ "application/json": { "schema": { "type": "object", - "properties": { - "count": { - "type": "number" - }, - "model_snapshot_upgrades": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.ModelSnapshotUpgrade" - } - } - }, - "required": [ - "count", - "model_snapshot_upgrades" - ] + "additionalProperties": { + "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases" + } } } } } }, - "x-state": "Added in 7.16.0", - "x-api-name" : "get_model_snapshot_upgrade_stats", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/model_snapshots": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_alias/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get model snapshots info", - "operationId": "ml-get-model-snapshots-2", + "summary": "Create or update an alias", + "description": "Adds a data stream or index to an alias.", + "externalDocs": { + "description": "Aliases", + "url": "https://www.elastic.co/docs/manage-data/data-store/aliases", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-add-alias.html" + }, + "operationId": "indices-put-alias", "parameters": [ { - "$ref": "#/components/parameters/ml.get_model_snapshots-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-desc" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-end" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-from" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams or indices to add.\nSupports wildcards (`*`).\nWildcard patterns that match both data streams and indices return an error.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-size" + "in": "path", + "name": "name", + "description": "Alias to update.\nIf the alias doesn’t exist, the request creates it.\nIndex alias names support date math.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-sort" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-start" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/ml.get_model_snapshots" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filter": { + "description": "Query used to limit documents the alias can access.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "is_write_index": { + "description": "If `true`, sets the write index or data stream for the alias.\nIf an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.\nIf an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.\nData stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.", + "type": "boolean" + }, + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + } + } + }, + "examples": { + "indicesPutAliasRequestExample1": { + "summary": "Filter an alias", + "description": "The filter option uses Query DSL to limit the documents an alias can access.", + "value": "{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + "indicesPutAliasRequestExample2": { + "summary": "Write index", + "description": "You can use is_write_index to specify a write index or data stream for an alias. Elasticsearch routes any write requests for the alias to this index or data stream.", + "value": "{\n \"is_write_index\": true\n}" + }, + "indicesPutAliasRequestExample3": { + "summary": "Routing", + "description": "Use the routing option to route requests for an alias to a specific shard.", + "value": "{\n \"routing\": \"1\"\n}" + } + } + } + } }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_model_snapshots-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_model_snapshots", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_alias/{name}\n
\n ", + "
\n POST\n /{index}/_alias/{name}\n
\n " + ], + "x-api": "put_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get model snapshots info", - "operationId": "ml-get-model-snapshots-3", + "summary": "Create or update an alias", + "description": "Adds a data stream or index to an alias.", + "externalDocs": { + "description": "Aliases", + "url": "https://www.elastic.co/docs/manage-data/data-store/aliases", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-add-alias.html" + }, + "operationId": "indices-put-alias-1", "parameters": [ { - "$ref": "#/components/parameters/ml.get_model_snapshots-job_id" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams or indices to add.\nSupports wildcards (`*`).\nWildcard patterns that match both data streams and indices return an error.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-desc" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-end" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-from" - }, - { - "$ref": "#/components/parameters/ml.get_model_snapshots-size" + "in": "path", + "name": "name", + "description": "Alias to update.\nIf the alias doesn’t exist, the request creates it.\nIndex alias names support date math.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-sort" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_model_snapshots-start" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/ml.get_model_snapshots" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filter": { + "description": "Query used to limit documents the alias can access.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "is_write_index": { + "description": "If `true`, sets the write index or data stream for the alias.\nIf an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.\nIf an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.\nData stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.", + "type": "boolean" + }, + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + } + } + }, + "examples": { + "indicesPutAliasRequestExample1": { + "summary": "Filter an alias", + "description": "The filter option uses Query DSL to limit the documents an alias can access.", + "value": "{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + "indicesPutAliasRequestExample2": { + "summary": "Write index", + "description": "You can use is_write_index to specify a write index or data stream for an alias. Elasticsearch routes any write requests for the alias to this index or data stream.", + "value": "{\n \"is_write_index\": true\n}" + }, + "indicesPutAliasRequestExample3": { + "summary": "Routing", + "description": "Use the routing option to route requests for an alias to a specific shard.", + "value": "{\n \"routing\": \"1\"\n}" + } + } + } + } }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_model_snapshots-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_model_snapshots", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/results/overall_buckets": { - "get": { - "tags": [ - "ml anomaly" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_alias/{name}\n
\n ", + "
\n POST\n /{index}/_alias/{name}\n
\n " ], - "summary": "Get overall bucket results", - "description": "Retrievs overall bucket results that summarize the bucket results of\nmultiple anomaly detection jobs.\n\nThe `overall_score` is calculated by combining the scores of all the\nbuckets within the overall bucket span. First, the maximum\n`anomaly_score` per anomaly detection job in the overall bucket is\ncalculated. Then the `top_n` of those scores are averaged to result in\nthe `overall_score`. This means that you can fine-tune the\n`overall_score` so that it is more or less sensitive to the number of\njobs that detect an anomaly at the same time. For example, if you set\n`top_n` to `1`, the `overall_score` is the maximum bucket score in the\noverall bucket. Alternatively, if you set `top_n` to the number of jobs,\nthe `overall_score` is high only when all jobs detect anomalies in that\noverall bucket. If you set the `bucket_span` parameter (to a value\ngreater than its default), the `overall_score` is the maximum\n`overall_score` of the overall buckets that have a span equal to the\njobs' largest bucket span.", - "operationId": "ml-get-overall-buckets", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_overall_buckets-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-bucket_span" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-end" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-exclude_interim" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-overall_score" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-start" - }, + "x-api": "put_alias.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.get_overall_buckets-top_n" + "content": "Elasticsearch", + "name": "product_name" } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_overall_buckets" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_overall_buckets-200" - } - }, - "x-state": "Added in 6.1.0", - "x-api-name" : "get_overall_buckets", - "x-namespace": "ml" + ] }, - "post": { + "delete": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get overall bucket results", - "description": "Retrievs overall bucket results that summarize the bucket results of\nmultiple anomaly detection jobs.\n\nThe `overall_score` is calculated by combining the scores of all the\nbuckets within the overall bucket span. First, the maximum\n`anomaly_score` per anomaly detection job in the overall bucket is\ncalculated. Then the `top_n` of those scores are averaged to result in\nthe `overall_score`. This means that you can fine-tune the\n`overall_score` so that it is more or less sensitive to the number of\njobs that detect an anomaly at the same time. For example, if you set\n`top_n` to `1`, the `overall_score` is the maximum bucket score in the\noverall bucket. Alternatively, if you set `top_n` to the number of jobs,\nthe `overall_score` is high only when all jobs detect anomalies in that\noverall bucket. If you set the `bucket_span` parameter (to a value\ngreater than its default), the `overall_score` is the maximum\n`overall_score` of the overall buckets that have a span equal to the\njobs' largest bucket span.", - "operationId": "ml-get-overall-buckets-1", + "summary": "Delete an alias", + "description": "Removes a data stream or index from an alias.", + "operationId": "indices-delete-alias", "parameters": [ { - "$ref": "#/components/parameters/ml.get_overall_buckets-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-bucket_span" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-end" - }, - { - "$ref": "#/components/parameters/ml.get_overall_buckets-exclude_interim" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams or indices used to limit the request.\nSupports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_overall_buckets-overall_score" + "in": "path", + "name": "name", + "description": "Comma-separated list of aliases to remove.\nSupports wildcards (`*`). To remove all aliases, use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_overall_buckets-start" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_overall_buckets-top_n" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_overall_buckets" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_overall_buckets-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices.delete_alias.IndicesAliasesResponseBody" + } + } + } } }, - "x-state": "Added in 6.1.0", - "x-api-name" : "get_overall_buckets", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/results/records": { - "get": { - "tags": [ - "ml anomaly" + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /{index}/_alias/{name}\n
\n " ], - "summary": "Get anomaly records for an anomaly detection job", - "description": "Records contain the detailed analytical results. They describe the anomalous\nactivity that has been identified in the input data based on the detector\nconfiguration.\nThere can be many anomaly records depending on the characteristics and size\nof the input data. In practice, there are often too many to be able to\nmanually process them. The machine learning features therefore perform a\nsophisticated aggregation of the anomaly records into buckets.\nThe number of record results depends on the number of anomalies found in each\nbucket, which relates to the number of time series being modeled and the\nnumber of detectors.", - "operationId": "ml-get-records", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_records-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_records-desc" - }, - { - "$ref": "#/components/parameters/ml.get_records-end" - }, - { - "$ref": "#/components/parameters/ml.get_records-exclude_interim" - }, - { - "$ref": "#/components/parameters/ml.get_records-from" - }, - { - "$ref": "#/components/parameters/ml.get_records-record_score" - }, - { - "$ref": "#/components/parameters/ml.get_records-size" - }, - { - "$ref": "#/components/parameters/ml.get_records-sort" - }, - { - "$ref": "#/components/parameters/ml.get_records-start" - } + "x-req-auth": [ + "Index privileges: `manage`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_records" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_records-200" + "x-api": "delete_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_records", - "x-namespace": "ml" + ] }, - "post": { + "head": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Get anomaly records for an anomaly detection job", - "description": "Records contain the detailed analytical results. They describe the anomalous\nactivity that has been identified in the input data based on the detector\nconfiguration.\nThere can be many anomaly records depending on the characteristics and size\nof the input data. In practice, there are often too many to be able to\nmanually process them. The machine learning features therefore perform a\nsophisticated aggregation of the anomaly records into buckets.\nThe number of record results depends on the number of anomalies found in each\nbucket, which relates to the number of time series being modeled and the\nnumber of detectors.", - "operationId": "ml-get-records-1", + "summary": "Check aliases", + "description": "Check if one or more data stream or index aliases exist.", + "operationId": "indices-exists-alias-1", "parameters": [ { - "$ref": "#/components/parameters/ml.get_records-job_id" - }, - { - "$ref": "#/components/parameters/ml.get_records-desc" - }, - { - "$ref": "#/components/parameters/ml.get_records-end" - }, - { - "$ref": "#/components/parameters/ml.get_records-exclude_interim" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams or indices used to limit the request. Supports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_records-from" + "in": "path", + "name": "name", + "description": "Comma-separated list of aliases to check. Supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.get_records-record_score" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_records-size" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_records-sort" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, requests that include a missing data stream or index in the target indices or data streams return an error.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.get_records-start" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.get_records" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.get_records-200" + "description": "", + "content": { + "application/json": {} + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "get_records", - "x-namespace": "ml" - } - }, - "/_ml/trained_models": { - "get": { - "tags": [ - "ml trained model" + "x-state": "Generally available", + "x-variations": [ + "
\n HEAD\n /{index}/_alias/{name}\n
\n " ], - "summary": "Get trained model configuration info", - "operationId": "ml-get-trained-models-1", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_trained_models-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-decompress_definition" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-exclude_generated" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-from" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-include" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models-size" - }, + "x-api": "exists_alias.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.get_trained_models-tags" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_trained_models-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.10.0", - "x-api-name" : "get_trained_models", - "x-namespace": "ml" + ] } }, - "/_ml/trained_models/{model_id}/_stats": { - "get": { + "/{index}/_aliases/{name}": { + "put": { "tags": [ - "ml trained model" - ], - "summary": "Get trained models usage info", - "description": "You can get usage information for multiple trained\nmodels in a single API request by using a comma-separated list of model IDs or a wildcard expression.", - "operationId": "ml-get-trained-models-stats", - "parameters": [ - { - "$ref": "#/components/parameters/ml.get_trained_models_stats-model_id" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models_stats-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models_stats-from" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models_stats-size" - } + "indices" ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_trained_models_stats-200" - } + "summary": "Create or update an alias", + "description": "Adds a data stream or index to an alias.", + "externalDocs": { + "description": "Aliases", + "url": "https://www.elastic.co/docs/manage-data/data-store/aliases", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-add-alias.html" }, - "x-state": "Added in 7.10.0", - "x-api-name" : "get_trained_models_stats", - "x-namespace": "ml" - } - }, - "/_ml/trained_models/_stats": { - "get": { - "tags": [ - "ml trained model" - ], - "summary": "Get trained models usage info", - "description": "You can get usage information for multiple trained\nmodels in a single API request by using a comma-separated list of model IDs or a wildcard expression.", - "operationId": "ml-get-trained-models-stats-1", + "operationId": "indices-put-alias-2", "parameters": [ { - "$ref": "#/components/parameters/ml.get_trained_models_stats-allow_no_match" - }, - { - "$ref": "#/components/parameters/ml.get_trained_models_stats-from" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams or indices to add.\nSupports wildcards (`*`).\nWildcard patterns that match both data streams and indices return an error.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, - { - "$ref": "#/components/parameters/ml.get_trained_models_stats-size" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/ml.get_trained_models_stats-200" - } - }, - "x-state": "Added in 7.10.0", - "x-api-name" : "get_trained_models_stats", - "x-namespace": "ml" - } - }, - "/_ml/trained_models/{model_id}/_infer": { - "post": { - "tags": [ - "ml trained model" - ], - "summary": "Evaluate a trained model", - "operationId": "ml-infer-trained-model", - "parameters": [ { "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model.", + "name": "name", + "description": "Alias to update.\nIf the alias doesn’t exist, the request creates it.\nIndex alias names support date math.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, { "in": "query", "name": "timeout", - "description": "Controls the amount of time to wait for inference results.", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -26270,125 +29577,139 @@ "schema": { "type": "object", "properties": { - "docs": { - "description": "An array of objects to pass to the model for inference. The objects should contain a fields matching your\nconfigured trained model input. Typically, for NLP models, the field name is `text_field`.\nCurrently, for NLP models, only a single value is allowed.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "object" + "filter": { + "description": "Query used to limit documents the alias can access.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" } - } + ] }, - "inference_config": { - "$ref": "#/components/schemas/ml._types.InferenceConfigUpdateContainer" - } - }, - "required": [ - "docs" - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "inference_results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.InferenceResponseResult" + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" } - } + ] }, - "required": [ - "inference_results" - ] + "is_write_index": { + "description": "If `true`, sets the write index or data stream for the alias.\nIf an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.\nIf an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.\nData stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.", + "type": "boolean" + }, + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + } + } + }, + "examples": { + "indicesPutAliasRequestExample1": { + "summary": "Filter an alias", + "description": "The filter option uses Query DSL to limit the documents an alias can access.", + "value": "{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + "indicesPutAliasRequestExample2": { + "summary": "Write index", + "description": "You can use is_write_index to specify a write index or data stream for an alias. Elasticsearch routes any write requests for the alias to this index or data stream.", + "value": "{\n \"is_write_index\": true\n}" + }, + "indicesPutAliasRequestExample3": { + "summary": "Routing", + "description": "Use the routing option to route requests for an alias to a specific shard.", + "value": "{\n \"routing\": \"1\"\n}" } } } } }, - "x-state": "Added in 8.3.0", - "x-api-name" : "infer_trained_model", - "x-namespace": "ml" - } - }, - "/_ml/info": { - "get": { - "tags": [ - "ml" - ], - "summary": "Get machine learning information", - "description": "Get defaults and limits used by machine learning.\nThis endpoint is designed to be used by a user interface that needs to fully\nunderstand machine learning configurations where some options are not\nspecified, meaning that the defaults should be used. This endpoint may be\nused to find out what those defaults are. It also provides information about\nthe maximum size of machine learning jobs that could run in the current\ncluster configuration.", - "operationId": "ml-info", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "defaults": { - "$ref": "#/components/schemas/ml.info.Defaults" - }, - "limits": { - "$ref": "#/components/schemas/ml.info.Limits" - }, - "upgrade_mode": { - "type": "boolean" - }, - "native_code": { - "$ref": "#/components/schemas/ml.info.NativeCode" - } - }, - "required": [ - "defaults", - "limits", - "upgrade_mode", - "native_code" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 6.3.0", - "x-api-name" : "info", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/_open": { + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_aliases/{name}\n
\n ", + "
\n POST\n /{index}/_aliases/{name}\n
\n " + ], + "x-api": "put_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, "post": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Open anomaly detection jobs", - "description": "An anomaly detection job must be opened to be ready to receive and analyze\ndata. It can be opened and closed multiple times throughout its lifecycle.\nWhen you open a new job, it starts with an empty model.\nWhen you open an existing job, the most recent model state is automatically\nloaded. The job is ready to resume its analysis from where it left off, once\nnew data is received.", - "operationId": "ml-open-job", + "summary": "Create or update an alias", + "description": "Adds a data stream or index to an alias.", + "externalDocs": { + "description": "Aliases", + "url": "https://www.elastic.co/docs/manage-data/data-store/aliases", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-add-alias.html" + }, + "operationId": "indices-put-alias-3", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", + "name": "index", + "description": "Comma-separated list of data streams or indices to add.\nSupports wildcards (`*`).\nWildcard patterns that match both data streams and indices return an error.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "Alias to update.\nIf the alias doesn’t exist, the request creates it.\nIndex alias names support date math.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, { "in": "query", "name": "timeout", - "description": "Controls the time to wait until a job has opened.", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -26402,15 +29723,59 @@ "schema": { "type": "object", "properties": { - "timeout": { - "$ref": "#/components/schemas/_types.Duration" - } - } - }, - "examples": { - "MlOpenJobRequestExample1": { - "description": "A request to open anomaly detection jobs. The timeout specifies to wait 35 minutes for the job to open.\n", - "value": "{\n \"timeout\": \"35m\"\n}" + "filter": { + "description": "Query used to limit documents the alias can access.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "is_write_index": { + "description": "If `true`, sets the write index or data stream for the alias.\nIf an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.\nIf an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.\nData stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.", + "type": "boolean" + }, + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + } + } + }, + "examples": { + "indicesPutAliasRequestExample1": { + "summary": "Filter an alias", + "description": "The filter option uses Query DSL to limit the documents an alias can access.", + "value": "{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + "indicesPutAliasRequestExample2": { + "summary": "Write index", + "description": "You can use is_write_index to specify a write index or data stream for an alias. Elasticsearch routes any write requests for the alias to this index or data stream.", + "value": "{\n \"is_write_index\": true\n}" + }, + "indicesPutAliasRequestExample3": { + "summary": "Routing", + "description": "Use the routing option to route requests for an alias to a specific shard.", + "value": "{\n \"routing\": \"1\"\n}" } } } @@ -26422,414 +29787,255 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "opened": { - "type": "boolean" - }, - "node": { - "$ref": "#/components/schemas/_types.NodeId" - } - }, - "required": [ - "opened", - "node" - ] - }, - "examples": { - "MlOpenJobResponseExample1": { - "description": "A successful response when opening an anomaly detection job.", - "value": "{\n \"opened\": true,\n \"node\": \"node-1\"\n}" - } + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "open_job", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/_data": { - "post": { + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_aliases/{name}\n
\n ", + "
\n POST\n /{index}/_aliases/{name}\n
\n " + ], + "x-api": "put_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Send data to an anomaly detection job for analysis", - "description": "IMPORTANT: For each job, data can be accepted from only a single connection at a time.\nIt is not currently possible to post data to multiple jobs using wildcards or a comma-separated list.", - "operationId": "ml-post-data", + "summary": "Delete an alias", + "description": "Removes a data stream or index from an alias.", + "operationId": "indices-delete-alias-1", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job. The job must have a state of open to receive and process the data.", + "name": "index", + "description": "Comma-separated list of data streams or indices used to limit the request.\nSupports wildcards (`*`).", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "Comma-separated list of aliases to remove.\nSupports wildcards (`*`). To remove all aliases, use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, { "in": "query", - "name": "reset_end", - "description": "Specifies the end of the bucket resetting range.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "reset_start", - "description": "Specifies the start of the bucket resetting range.", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "processed_record_count": { - "type": "number" - }, - "processed_field_count": { - "type": "number" - }, - "input_bytes": { - "type": "number" - }, - "input_field_count": { - "type": "number" - }, - "invalid_date_count": { - "type": "number" - }, - "missing_field_count": { - "type": "number" - }, - "out_of_order_timestamp_count": { - "type": "number" - }, - "empty_bucket_count": { - "type": "number" - }, - "sparse_bucket_count": { - "type": "number" - }, - "bucket_count": { - "type": "number" - }, - "earliest_record_timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "latest_record_timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "last_data_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "latest_empty_bucket_timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "latest_sparse_bucket_timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "input_record_count": { - "type": "number" - }, - "log_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - } - }, - "required": [ - "job_id", - "processed_record_count", - "processed_field_count", - "input_bytes", - "input_field_count", - "invalid_date_count", - "missing_field_count", - "out_of_order_timestamp_count", - "empty_bucket_count", - "sparse_bucket_count", - "bucket_count", - "input_record_count" - ] + "$ref": "#/components/schemas/indices.delete_alias.IndicesAliasesResponseBody" } } } } }, - "deprecated": true, - "x-state": "Added in 5.4.0", - "x-api-name" : "post_data", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics/_preview": { - "get": { - "tags": [ - "ml data frame" - ], - "summary": "Preview features used by data frame analytics", - "description": "Preview the extracted features used by a data frame analytics config.", - "operationId": "ml-preview-data-frame-analytics", - "requestBody": { - "$ref": "#/components/requestBodies/ml.preview_data_frame_analytics" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.preview_data_frame_analytics-200" - } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "preview_data_frame_analytics", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml data frame" - ], - "summary": "Preview features used by data frame analytics", - "description": "Preview the extracted features used by a data frame analytics config.", - "operationId": "ml-preview-data-frame-analytics-1", - "requestBody": { - "$ref": "#/components/requestBodies/ml.preview_data_frame_analytics" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.preview_data_frame_analytics-200" - } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "preview_data_frame_analytics", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics/{id}/_preview": { - "get": { - "tags": [ - "ml data frame" - ], - "summary": "Preview features used by data frame analytics", - "description": "Preview the extracted features used by a data frame analytics config.", - "operationId": "ml-preview-data-frame-analytics-2", - "parameters": [ - { - "$ref": "#/components/parameters/ml.preview_data_frame_analytics-id" - } + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /{index}/_aliases/{name}\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.preview_data_frame_analytics" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.preview_data_frame_analytics-200" - } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "preview_data_frame_analytics", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml data frame" + "x-req-auth": [ + "Index privileges: `manage`\n" ], - "summary": "Preview features used by data frame analytics", - "description": "Preview the extracted features used by a data frame analytics config.", - "operationId": "ml-preview-data-frame-analytics-3", - "parameters": [ + "x-api": "delete_alias.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.preview_data_frame_analytics-id" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.preview_data_frame_analytics" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.preview_data_frame_analytics-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "preview_data_frame_analytics", - "x-namespace": "ml" + ] } }, - "/_ml/datafeeds/{datafeed_id}/_preview": { + "/_data_stream/{name}/_lifecycle": { "get": { "tags": [ - "ml anomaly" - ], - "summary": "Preview a datafeed", - "description": "This API returns the first \"page\" of search results from a datafeed.\nYou can preview an existing datafeed or provide configuration details for a datafeed\nand anomaly detection job in the API. The preview shows the structure of the data\nthat will be passed to the anomaly detection engine.\nIMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that\ncalled the API. However, when the datafeed starts it uses the roles of the last user that created or updated the\ndatafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.\nYou can also use secondary authorization headers to supply the credentials.", - "operationId": "ml-preview-datafeed", - "parameters": [ - { - "$ref": "#/components/parameters/ml.preview_datafeed-datafeed_id" - }, - { - "$ref": "#/components/parameters/ml.preview_datafeed-start" - }, - { - "$ref": "#/components/parameters/ml.preview_datafeed-end" - } + "data stream" ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.preview_datafeed" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.preview_datafeed-200" - } + "summary": "Get data stream lifecycles", + "description": "Get the data stream lifecycle configuration of one or more data streams.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/data-stream", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-get-lifecycle.html" }, - "x-state": "Added in 5.4.0", - "x-api-name" : "preview_datafeed", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml anomaly" - ], - "summary": "Preview a datafeed", - "description": "This API returns the first \"page\" of search results from a datafeed.\nYou can preview an existing datafeed or provide configuration details for a datafeed\nand anomaly detection job in the API. The preview shows the structure of the data\nthat will be passed to the anomaly detection engine.\nIMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that\ncalled the API. However, when the datafeed starts it uses the roles of the last user that created or updated the\ndatafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.\nYou can also use secondary authorization headers to supply the credentials.", - "operationId": "ml-preview-datafeed-1", + "operationId": "indices-get-data-lifecycle", "parameters": [ { - "$ref": "#/components/parameters/ml.preview_datafeed-datafeed_id" + "in": "path", + "name": "name", + "description": "Comma-separated list of data streams to limit the request.\nSupports wildcards (`*`).\nTo target all data streams, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamNames" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/ml.preview_datafeed-start" + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.preview_datafeed-end" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.preview_datafeed" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.preview_datafeed-200" - } - }, - "x-state": "Added in 5.4.0", - "x-api-name" : "preview_datafeed", - "x-namespace": "ml" - } - }, - "/_ml/datafeeds/_preview": { - "get": { - "tags": [ - "ml anomaly" - ], - "summary": "Preview a datafeed", - "description": "This API returns the first \"page\" of search results from a datafeed.\nYou can preview an existing datafeed or provide configuration details for a datafeed\nand anomaly detection job in the API. The preview shows the structure of the data\nthat will be passed to the anomaly detection engine.\nIMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that\ncalled the API. However, when the datafeed starts it uses the roles of the last user that created or updated the\ndatafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.\nYou can also use secondary authorization headers to supply the credentials.", - "operationId": "ml-preview-datafeed-2", - "parameters": [ - { - "$ref": "#/components/parameters/ml.preview_datafeed-start" + "in": "query", + "name": "include_defaults", + "description": "If `true`, return all default settings in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/ml.preview_datafeed-end" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.preview_datafeed" - }, "responses": { "200": { - "$ref": "#/components/responses/ml.preview_datafeed-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_data_lifecycle.DataStreamWithLifecycle" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesGetDataLifecycleResponseExample1": { + "description": "A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`.", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n },\n {\n \"name\": \"my-data-stream-2\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "preview_datafeed", - "x-namespace": "ml" - }, - "post": { - "tags": [ - "ml anomaly" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n GET\n /_data_stream/{name}/_lifecycle\n
\n " ], - "summary": "Preview a datafeed", - "description": "This API returns the first \"page\" of search results from a datafeed.\nYou can preview an existing datafeed or provide configuration details for a datafeed\nand anomaly detection job in the API. The preview shows the structure of the data\nthat will be passed to the anomaly detection engine.\nIMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that\ncalled the API. However, when the datafeed starts it uses the roles of the last user that created or updated the\ndatafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.\nYou can also use secondary authorization headers to supply the credentials.", - "operationId": "ml-preview-datafeed-3", - "parameters": [ - { - "$ref": "#/components/parameters/ml.preview_datafeed-start" - }, + "x-api": "get_data_lifecycle.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/ml.preview_datafeed-end" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ml.preview_datafeed" - }, - "responses": { - "200": { - "$ref": "#/components/responses/ml.preview_datafeed-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.4.0", - "x-api-name" : "preview_datafeed", - "x-namespace": "ml" - } - }, - "/_ml/trained_models/{model_id}/definition/{part}": { + ] + }, "put": { "tags": [ - "ml trained model" + "data stream" ], - "summary": "Create part of a trained model definition", - "operationId": "ml-put-trained-model-definition-part", + "summary": "Update data stream lifecycles", + "description": "Update the data stream lifecycle of the specified data streams.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/data-stream", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-put-lifecycle.html" + }, + "operationId": "indices-put-data-lifecycle", "parameters": [ { "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model.", + "name": "name", + "description": "Comma-separated list of data streams used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.DataStreamNames" }, "style": "simple" }, { - "in": "path", - "name": "part", - "description": "The definition part number. When the definition is loaded for inference the definition parts are streamed in the\norder of their part number. The first part must be `0` and the final part must be `total_parts - 1`.", - "required": true, + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -26838,24 +30044,46 @@ "schema": { "type": "object", "properties": { - "definition": { - "description": "The definition part for the model. Must be a base64 encoded string.", - "type": "string" + "data_retention": { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "total_definition_length": { - "description": "The total uncompressed definition length in bytes. Not base64 encoded.", - "type": "number" + "downsampling": { + "description": "The downsampling configuration to execute for the managed backing index after rollover.", + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.DownsamplingRound" + } }, - "total_parts": { - "description": "The total number of parts that will be uploaded. Must be greater than 0.", - "type": "number" + "downsampling_method": { + "description": "The method used to downsample the data. There are two options `aggregate` and `last_value`. It requires\n`downsampling` to be defined. Defaults to `aggregate`.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SamplingMethod" + } + ] + }, + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, + "type": "boolean" } + } + }, + "examples": { + "IndicesPutDataLifecycleRequestExample1": { + "summary": "Set the data stream lifecycle retention", + "value": "{\n \"data_retention\": \"7d\"\n}" }, - "required": [ - "definition", - "total_definition_length", - "total_parts" - ] + "IndicesPutDataLifecycleRequestExample2": { + "summary": "Set the data stream lifecycle downsampling", + "description": "This example configures two downsampling rounds.", + "value": "{\n \"downsampling\": [\n {\n \"after\": \"1d\",\n \"fixed_interval\": \"10m\"\n },\n {\n \"after\": \"7d\",\n \"fixed_interval\": \"1d\"\n }\n ]\n}" + } } } }, @@ -26868,73 +30096,84 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "IndicesPutDataLifecycleResponseExample1": { + "description": "A successful response for configuring a data stream lifecycle.", + "value": "{\n \"acknowledged\": true\n}" + } } } } } }, - "x-state": "Added in 8.0.0", - "x-api-name" : "put_trained_model_definition_part", - "x-namespace": "ml" - } - }, - "/_ml/trained_models/{model_id}/vocabulary": { - "put": { + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n PUT\n /_data_stream/{name}/_lifecycle\n
\n " + ], + "x-api": "put_data_lifecycle.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "ml trained model" + "indices" ], - "summary": "Create a trained model vocabulary", - "description": "This API is supported only for natural language processing (NLP) models.\nThe vocabulary is stored in the index as described in `inference_config.*.vocabulary` of the trained model definition.", - "operationId": "ml-put-trained-model-vocabulary", + "summary": "Delete data stream lifecycles", + "description": "Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/data-stream", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-delete-lifecycle.html" + }, + "operationId": "indices-delete-data-lifecycle", "parameters": [ { "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model.", + "name": "name", + "description": "A comma-separated list of data streams of which the data stream lifecycle will be deleted.\nUse `*` to get all data streams", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.DataStreamNames" }, "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "vocabulary": { - "description": "The model vocabulary, which must not be empty.", - "type": "array", - "items": { - "type": "string" - } - }, - "merges": { - "description": "The optional model merges if required by the tokenizer.", - "type": "array", - "items": { - "type": "string" - } - }, - "scores": { - "description": "The optional vocabulary value scores if required by the tokenizer.", - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "vocabulary" - ] - } - } - }, - "required": true - }, "responses": { "200": { "description": "", @@ -26942,53 +30181,68 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "IndicesDeleteDataLifecycleResponseExample1": { + "description": "A successful response for deleting a data stream lifecycle.", + "value": "{\n \"acknowledged\": true\n}" + } } } } } }, - "x-state": "Added in 8.0.0", - "x-api-name" : "put_trained_model_vocabulary", - "x-namespace": "ml" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n DELETE\n /_data_stream/{name}/_lifecycle\n
\n " + ], + "x-api": "delete_data_lifecycle.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/anomaly_detectors/{job_id}/_reset": { - "post": { + "/_data_stream/{name}/_options": { + "get": { "tags": [ - "ml anomaly" + "data stream" ], - "summary": "Reset an anomaly detection job", - "description": "All model state and results are deleted. The job is ready to start over as if\nit had just been created.\nIt is not currently possible to reset multiple jobs using wildcards or a\ncomma separated list.", - "operationId": "ml-reset-job", + "summary": "Get data stream options", + "description": "Get the data stream options configuration of one or more data streams.", + "operationId": "indices-get-data-stream-options", "parameters": [ { "in": "path", - "name": "job_id", - "description": "The ID of the job to reset.", + "name": "name", + "description": "Comma-separated list of data streams to limit the request.\nSupports wildcards (`*`).\nTo target all data streams, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.DataStreamNames" }, "style": "simple" }, { "in": "query", - "name": "wait_for_completion", - "description": "Should this request wait until the operation has completed before\nreturning.", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "delete_user_annotations", - "description": "Specifies whether annotations that have been added by the\nuser should be deleted along with any auto-generated annotations when the job is\nreset.", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -26999,55 +30253,82 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_data_stream_options.DataStreamWithOptions" + } + } + }, + "required": [ + "data_streams" + ] } } } } }, - "x-state": "Added in 7.14.0", - "x-api-name" : "reset_job", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert": { - "post": { + "x-state": "Generally available; Added in 8.19.0", + "x-variations": [ + "
\n GET\n /_data_stream/{name}/_options\n
\n " + ], + "x-api": "get_data_stream_options.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "ml anomaly" + "data stream" ], - "summary": "Revert to a snapshot", - "description": "The machine learning features react quickly to anomalous input, learning new\nbehaviors in data. Highly anomalous input increases the variance in the\nmodels whilst the system learns whether this is a new step-change in behavior\nor a one-off event. In the case where this anomalous input is known to be a\none-off, then it might be appropriate to reset the model state to a time\nbefore this event. For example, you might consider reverting to a saved\nsnapshot after Black Friday or a critical system failure.", - "operationId": "ml-revert-model-snapshot", + "summary": "Update data stream options", + "description": "Update the data stream options of the specified data streams.", + "operationId": "indices-put-data-stream-options", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", + "name": "name", + "description": "Comma-separated list of data streams used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.DataStreamNames" }, "style": "simple" }, { - "in": "path", - "name": "snapshot_id", - "description": "You can specify `empty` as the . Reverting to the empty\nsnapshot means the anomaly detection job starts learning a new model from\nscratch when it is started.", - "required": true, + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "delete_intervening_results", - "description": "If true, deletes the results in the time period between the latest\nresults and the time of the reverted snapshot. It also resets the model\nto accept records for this time period. If you choose not to delete\nintervening results when reverting a snapshot, the job will not accept\ninput data that is older than the current time. If you want to resend\ndata, then delete the intervening results.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -27058,14 +30339,19 @@ "schema": { "type": "object", "properties": { - "delete_intervening_results": { - "description": "Refer to the description for the `delete_intervening_results` query parameter.", - "type": "boolean" + "failure_store": { + "description": "If defined, it will update the failure store configuration of every data stream resolved by the name expression.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStore" + } + ] } } } } - } + }, + "required": true }, "responses": { "200": { @@ -27073,96 +30359,68 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "model": { - "$ref": "#/components/schemas/ml._types.ModelSnapshot" - } - }, - "required": [ - "model" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "revert_model_snapshot", - "x-namespace": "ml" - } - }, - "/_ml/set_upgrade_mode": { - "post": { + "x-state": "Generally available; Added in 8.19.0", + "x-variations": [ + "
\n PUT\n /_data_stream/{name}/_options\n
\n " + ], + "x-api": "put_data_stream_options.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "ml" + "data stream" ], - "summary": "Set upgrade_mode for ML indices", - "description": "Sets a cluster wide upgrade_mode setting that prepares machine learning\nindices for an upgrade.\nWhen upgrading your cluster, in some circumstances you must restart your\nnodes and reindex your machine learning indices. In those circumstances,\nthere must be no machine learning jobs running. You can close the machine\nlearning jobs, do the upgrade, then open all the jobs again. Alternatively,\nyou can use this API to temporarily halt tasks associated with the jobs and\ndatafeeds and prevent new jobs from opening. You can also use this API\nduring upgrades that do not require you to reindex your machine learning\nindices, though stopping jobs is not a requirement in that case.\nYou can see the current value for the upgrade_mode setting by using the get\nmachine learning info API.", - "operationId": "ml-set-upgrade-mode", + "summary": "Delete data stream options", + "description": "Removes the data stream options from a data stream.", + "operationId": "indices-delete-data-stream-options", "parameters": [ { - "in": "query", - "name": "enabled", - "description": "When `true`, it enables `upgrade_mode` which temporarily halts all job\nand datafeed tasks and prohibits new job and datafeed tasks from\nstarting.", + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams of which the data stream options will be deleted.\nUse `*` to get all data streams", + "required": true, "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.DataStreamNames" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "timeout", - "description": "The time to wait for the request to be completed.", + "name": "expand_wildcards", + "description": "Whether wildcard expressions should get expanded to open or closed indices", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 6.7.0", - "x-api-name" : "set_upgrade_mode", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics/{id}/_start": { - "post": { - "tags": [ - "ml data frame" - ], - "summary": "Start a data frame analytics job", - "description": "A data frame analytics job can be started and stopped multiple times\nthroughout its lifecycle.\nIf the destination index does not exist, it is created automatically the\nfirst time you start the data frame analytics job. The\n`index.number_of_shards` and `index.number_of_replicas` settings for the\ndestination index are copied from the source index. If there are multiple\nsource indices, the destination index copies the highest setting values. The\nmappings for the destination index are also copied from the source indices.\nIf there are any mapping conflicts, the job fails to start.\nIf the destination index exists, it is used as is. You can therefore set up\nthe destination index in advance with custom settings and mappings.", - "operationId": "ml-start-data-frame-analytics", - "parameters": [ + }, { - "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { "in": "query", "name": "timeout", - "description": "Controls the amount of time to wait until the data frame analytics job\nstarts.", + "description": "The period to wait for a response.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -27176,100 +30434,94 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "node": { - "$ref": "#/components/schemas/_types.NodeId" - } - }, - "required": [ - "acknowledged", - "node" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "IndicesDeleteDataStreamOptionsResponseExample1": { + "description": "A successful response for deleting data stream options.", + "value": "{\n \"acknowledged\": true\n}" + } } } } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "start_data_frame_analytics", - "x-namespace": "ml" + "x-state": "Generally available; Added in 8.19.0", + "x-variations": [ + "
\n DELETE\n /_data_stream/{name}/_options\n
\n " + ], + "x-api": "delete_data_stream_options.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/datafeeds/{datafeed_id}/_start": { - "post": { + "/_index_template/{name}": { + "get": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Start datafeeds", - "description": "A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped\nmultiple times throughout its lifecycle.\n\nBefore you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.\n\nIf you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.\nIf new data was indexed for that exact millisecond between stopping and starting, it will be ignored.\n\nWhen Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or\nupdate it had at the time of creation or update and runs the query using those same roles. If you provided secondary\nauthorization headers when you created or updated the datafeed, those credentials are used instead.", - "operationId": "ml-start-datafeed", + "summary": "Get index templates", + "description": "Get information about one or more index templates.", + "operationId": "indices-get-index-template-1", "parameters": [ { "in": "path", - "name": "datafeed_id", - "description": "A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase\nalphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric\ncharacters.", + "name": "name", + "description": "Name of index template to retrieve. Wildcard (*) expressions are supported.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" }, { "in": "query", - "name": "end", - "description": "The time that the datafeed should end, which can be specified by using one of the following formats:\n\n* ISO 8601 format with milliseconds, for example `2017-01-22T06:00:00.000Z`\n* ISO 8601 format without milliseconds, for example `2017-01-22T06:00:00+00:00`\n* Milliseconds since the epoch, for example `1485061200000`\n\nDate-time arguments using either of the ISO 8601 formats must have a time zone designator, where `Z` is accepted\nas an abbreviation for UTC time. When a URL is expected (for example, in browsers), the `+` used in time zone\ndesignators must be encoded as `%2B`.\nThe end time value is exclusive. If you do not specify an end time, the datafeed\nruns continuously.", - "deprecated": false, + "name": "local", + "description": "If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.", + "deprecated": true, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "start", - "description": "The time that the datafeed should begin, which can be specified by using the same formats as the `end` parameter.\nThis value is inclusive.\nIf you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis\nstarts from the earliest time for which data is available.\nIf you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest\nprocessed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record.", + "name": "flat_settings", + "description": "If true, returns settings in flat format.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait until a datafeed starts.", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" + }, + { + "in": "query", + "name": "include_defaults", + "description": "If true, returns all relevant default configurations for the index template.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.11.0", + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "end": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "start": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" - } - } - } - } - } - }, "responses": { "200": { "description": "", @@ -27278,112 +30530,76 @@ "schema": { "type": "object", "properties": { - "node": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "started": { - "description": "For a successful response, this value is always `true`. On failure, an exception is returned instead.", - "type": "boolean" + "index_templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_index_template.IndexTemplateItem" + } } }, "required": [ - "node", - "started" + "index_templates" ] + }, + "examples": { + "GetIndexTemplateResponseExample1": { + "description": "A successful response for retrieving information about an index template.", + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" + } } } } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "start_datafeed", - "x-namespace": "ml" - } - }, - "/_ml/trained_models/{model_id}/deployment/_start": { - "post": { + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_index_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "get_index_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "ml trained model" + "indices" ], - "summary": "Start a trained model deployment", - "description": "It allocates the model to every machine learning node.", - "operationId": "ml-start-trained-model-deployment", + "summary": "Create or update an index template", + "description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.\n\nElasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.\nIndex templates are applied during data stream or index creation.\nFor data streams, these settings and mappings are applied when the stream's backing indices are created.\nSettings and mappings specified in a create index API request override any settings or mappings specified in an index template.\nChanges to index templates do not affect existing indices, including the existing backing indices of a data stream.\n\nYou can use C-style `/* *\\/` block comments in index templates.\nYou can include comments anywhere in the request body, except before the opening curly bracket.\n\n**Multiple matching templates**\n\nIf multiple index templates match the name of a new index or data stream, the template with the highest priority is used.\n\nMultiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities.\n\n**Composing aliases, mappings, and settings**\n\nWhen multiple component templates are specified in the `composed_of` field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates.\nAny mappings, settings, or aliases from the parent index template are merged in next.\nFinally, any configuration on the index request itself is merged.\nMapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration.\nIf a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one.\nThis recursive merging strategy applies not only to field mappings, but also root options like `dynamic_templates` and `meta`.\nIf an earlier component contains a `dynamic_templates` block, then by default new `dynamic_templates` entries are appended onto the end.\nIf an entry already exists with the same key, then it is overwritten by the new definition.", + "operationId": "indices-put-index-template", "parameters": [ { "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model. Currently, only PyTorch models are supported.", + "name": "name", + "description": "Index or template name", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" }, { "in": "query", - "name": "cache_size", - "description": "The inference cache size (in memory outside the JVM heap) per node for the model.\nThe default value is the same size as the `model_size_bytes`. To disable the cache,\n`0b` can be provided.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "style": "form" - }, - { - "in": "query", - "name": "deployment_id", - "description": "A unique identifier for the deployment of the model.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "number_of_allocations", - "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "priority", - "description": "The deployment priority.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/ml._types.TrainingPriority" - }, - "style": "form" - }, - { - "in": "query", - "name": "queue_capacity", - "description": "Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds\nthis value, new requests are rejected with a 429 error.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "threads_per_allocation", - "description": "Sets the number of threads used by each model allocation during inference. This generally increases\nthe inference speed. The inference process is a compute-bound process; any number\ngreater than the number of available hardware threads on the machine does not increase the\ninference speed. If this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.", + "name": "create", + "description": "If `true`, this request cannot replace or update existing index templates.", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait for the model to deploy.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -27392,11 +30608,11 @@ }, { "in": "query", - "name": "wait_for", - "description": "Specifies the allocation status to wait for before returning.\n\nSupported values include:\n - `started`: The trained model is started on at least one node.\n - `starting`: Trained model deployment is starting but it is not yet deployed on any nodes.\n - `fully_allocated`: Trained model deployment has started on all valid nodes.\n\n", + "name": "cause", + "description": "User defined reason for creating or updating the index template", "deprecated": false, "schema": { - "$ref": "#/components/schemas/ml._types.DeploymentAllocationState" + "type": "string" }, "style": "form" } @@ -27407,13 +30623,88 @@ "schema": { "type": "object", "properties": { - "adaptive_allocations": { - "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings" + "index_patterns": { + "description": "Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "composed_of": { + "description": "An ordered list of component template names.\nComponent templates are merged in the order specified, meaning that the last component template specified has the highest precedence.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" + } + }, + "template": { + "description": "Template to be applied.\nIt may optionally include an `aliases`, `mappings`, or `settings` configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.put_index_template.IndexTemplateMapping" + } + ] + }, + "data_stream": { + "description": "If this object is included, the template is used to create data streams and their backing indices.\nSupports an empty object.\nData streams require a matching index template with a `data_stream` object.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamVisibility" + } + ] + }, + "priority": { + "description": "Priority to determine index template precedence when a new data stream or index is created.\nThe index template with the highest priority is chosen.\nIf no priority is specified the template is treated as though it is of priority 0 (lowest priority).\nThis number is not automatically generated by Elasticsearch.", + "type": "number" + }, + "version": { + "description": "Version number used to manage index templates externally.\nThis number is not automatically generated by Elasticsearch.\nExternal systems can use these version numbers to simplify template management.\nTo unset a version, replace the template without specifying one.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "_meta": { + "description": "Optional user metadata about the index template.\nIt may have any contents.\nIt is not automatically generated or used by Elasticsearch.\nThis user-defined object is stored in the cluster state, so keeping it short is preferable\nTo unset the metadata, replace the template without specifying it.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "allow_auto_create": { + "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf 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`.\nIf set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.", + "type": "boolean" + }, + "ignore_missing_component_templates": { + "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "type": "boolean" } } + }, + "examples": { + "IndicesPutIndexTemplateRequestExample1": { + "summary": "Create a template", + "value": "{\n \"index_patterns\" : [\"template*\"],\n \"priority\" : 1,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 2\n }\n }\n}" + }, + "IndicesPutIndexTemplateRequestExample2": { + "summary": "Create a template with aliases", + "description": "You can include index aliases in an index template.\nDuring index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", + "value": "{\n \"index_patterns\": [\n \"template*\"\n ],\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n }\n}" + } } } - } + }, + "required": true }, "responses": { "200": { @@ -27421,49 +30712,52 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "assignment": { - "$ref": "#/components/schemas/ml._types.TrainedModelAssignment" - } - }, - "required": [ - "assignment" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 8.0.0", - "x-api-name" : "start_trained_model_deployment", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics/{id}/_stop": { + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n PUT\n /_index_template/{name}\n
\n ", + "
\n POST\n /_index_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "put_index_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, "post": { "tags": [ - "ml data frame" + "indices" ], - "summary": "Stop data frame analytics jobs", - "description": "A data frame analytics job can be started and stopped multiple times\nthroughout its lifecycle.", - "operationId": "ml-stop-data-frame-analytics", + "summary": "Create or update an index template", + "description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.\n\nElasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.\nIndex templates are applied during data stream or index creation.\nFor data streams, these settings and mappings are applied when the stream's backing indices are created.\nSettings and mappings specified in a create index API request override any settings or mappings specified in an index template.\nChanges to index templates do not affect existing indices, including the existing backing indices of a data stream.\n\nYou can use C-style `/* *\\/` block comments in index templates.\nYou can include comments anywhere in the request body, except before the opening curly bracket.\n\n**Multiple matching templates**\n\nIf multiple index templates match the name of a new index or data stream, the template with the highest priority is used.\n\nMultiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities.\n\n**Composing aliases, mappings, and settings**\n\nWhen multiple component templates are specified in the `composed_of` field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates.\nAny mappings, settings, or aliases from the parent index template are merged in next.\nFinally, any configuration on the index request itself is merged.\nMapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration.\nIf a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one.\nThis recursive merging strategy applies not only to field mappings, but also root options like `dynamic_templates` and `meta`.\nIf an earlier component contains a `dynamic_templates` block, then by default new `dynamic_templates` entries are appended onto the end.\nIf an entry already exists with the same key, then it is overwritten by the new definition.", + "operationId": "indices-put-index-template-1", "parameters": [ { "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "name": "name", + "description": "Index or template name", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" }, { "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is true, which returns an empty data_frame_analytics\narray when there are no matches and the subset of results when there are\npartial matches. If this parameter is false, the request returns a 404\nstatus code when there are no matches or only partial matches.", + "name": "create", + "description": "If `true`, this request cannot replace or update existing index templates.", "deprecated": false, "schema": { "type": "boolean" @@ -27472,74 +30766,234 @@ }, { "in": "query", - "name": "force", - "description": "If true, the data frame analytics job is stopped forcefully.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Controls the amount of time to wait until the data frame analytics job\nstops. Defaults to 20 seconds.", + "name": "cause", + "description": "User defined reason for creating or updating the index template", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "stopped": { - "type": "boolean" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index_patterns": { + "description": "Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "composed_of": { + "description": "An ordered list of component template names.\nComponent templates are merged in the order specified, meaning that the last component template specified has the highest precedence.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" } }, - "required": [ - "stopped" - ] + "template": { + "description": "Template to be applied.\nIt may optionally include an `aliases`, `mappings`, or `settings` configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.put_index_template.IndexTemplateMapping" + } + ] + }, + "data_stream": { + "description": "If this object is included, the template is used to create data streams and their backing indices.\nSupports an empty object.\nData streams require a matching index template with a `data_stream` object.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamVisibility" + } + ] + }, + "priority": { + "description": "Priority to determine index template precedence when a new data stream or index is created.\nThe index template with the highest priority is chosen.\nIf no priority is specified the template is treated as though it is of priority 0 (lowest priority).\nThis number is not automatically generated by Elasticsearch.", + "type": "number" + }, + "version": { + "description": "Version number used to manage index templates externally.\nThis number is not automatically generated by Elasticsearch.\nExternal systems can use these version numbers to simplify template management.\nTo unset a version, replace the template without specifying one.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "_meta": { + "description": "Optional user metadata about the index template.\nIt may have any contents.\nIt is not automatically generated or used by Elasticsearch.\nThis user-defined object is stored in the cluster state, so keeping it short is preferable\nTo unset the metadata, replace the template without specifying it.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "allow_auto_create": { + "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf 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`.\nIf set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.", + "type": "boolean" + }, + "ignore_missing_component_templates": { + "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "type": "boolean" + } + } + }, + "examples": { + "IndicesPutIndexTemplateRequestExample1": { + "summary": "Create a template", + "value": "{\n \"index_patterns\" : [\"template*\"],\n \"priority\" : 1,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 2\n }\n }\n}" + }, + "IndicesPutIndexTemplateRequestExample2": { + "summary": "Create a template with aliases", + "description": "You can include index aliases in an index template.\nDuring index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", + "value": "{\n \"index_patterns\": [\n \"template*\"\n ],\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "stop_data_frame_analytics", - "x-namespace": "ml" - } - }, - "/_ml/datafeeds/{datafeed_id}/_stop": { - "post": { + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n PUT\n /_index_template/{name}\n
\n ", + "
\n POST\n /_index_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "put_index_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Stop datafeeds", - "description": "A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped\nmultiple times throughout its lifecycle.", - "operationId": "ml-stop-datafeed", + "summary": "Delete an index template", + "description": "The provided may contain multiple template names separated by a comma. If multiple template\nnames are specified then there is no wildcard support and the provided names should match completely with\nexisting templates.", + "operationId": "indices-delete-index-template", "parameters": [ { "in": "path", - "name": "datafeed_id", - "description": "Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated\nlist of datafeeds or a wildcard expression. You can close all datafeeds by using `_all` or by specifying `*` as\nthe identifier.", + "name": "name", + "description": "Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, { "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n* Contains wildcard expressions and there are no datafeeds that match.\n* Contains the `_all` string or no identifiers and there are no matches.\n* Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty datafeeds array when there are no matches and the subset of results when\nthere are partial matches. If `false`, the API returns a 404 status code when there are no matches or only\npartial matches.", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n DELETE\n /_index_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "delete_index_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "head": { + "tags": [ + "indices" + ], + "summary": "Check index templates", + "description": "Check whether index templates exist.", + "operationId": "indices-exists-index-template", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "local", + "description": "If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.", "deprecated": false, "schema": { "type": "boolean" @@ -27548,8 +31002,8 @@ }, { "in": "query", - "name": "force", - "description": "If `true`, the datafeed is stopped forcefully.", + "name": "flat_settings", + "description": "If true, returns settings in flat format.", "deprecated": false, "schema": { "type": "boolean" @@ -27558,8 +31012,8 @@ }, { "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait until a datafeed stops.", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -27567,76 +31021,59 @@ "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "allow_no_match": { - "description": "Refer to the description for the `allow_no_match` query parameter.", - "type": "boolean" - }, - "force": { - "description": "Refer to the description for the `force` query parameter.", - "type": "boolean" - }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" - } - } - } - } - } - }, "responses": { "200": { "description": "", "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "stopped": { - "type": "boolean" - } - }, - "required": [ - "stopped" - ] - } - } + "application/json": {} } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "stop_datafeed", - "x-namespace": "ml" + "x-state": "Generally available", + "x-variations": [ + "
\n HEAD\n /_index_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "exists_index_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/trained_models/{model_id}/deployment/_stop": { - "post": { + "/_template/{name}": { + "get": { "tags": [ - "ml trained model" + "indices" ], - "summary": "Stop a trained model deployment", - "operationId": "ml-stop-trained-model-deployment", + "summary": "Get legacy index templates", + "description": "Get information about one or more index templates.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-template-v1.html" + }, + "operationId": "indices-get-template-1", "parameters": [ { "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model.", + "name": "name", + "description": "Comma-separated list of index template names used to limit the request.\nWildcard (`*`) expressions are supported.\nTo return all index templates, omit this parameter or use a value of `_all` or `*`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, { "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;\ncontains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and\nthere 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.\nIf `false`, the request returns a 404 status code when there are no matches or only partial matches.", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", "deprecated": false, "schema": { "type": "boolean" @@ -27645,13 +31082,23 @@ }, { "in": "query", - "name": "force", - "description": "Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you\nrestart the model deployment.", - "deprecated": false, + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": true, "schema": { "type": "boolean" }, "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -27661,42 +31108,93 @@ "application/json": { "schema": { "type": "object", - "properties": { - "stopped": { - "type": "boolean" - } - }, - "required": [ - "stopped" - ] + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.TemplateMapping" + } } } } } }, - "x-state": "Added in 8.0.0", - "x-api-name" : "stop_trained_model_deployment", - "x-namespace": "ml" - } - }, - "/_ml/data_frame/analytics/{id}/_update": { - "post": { + "deprecated": true, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "get_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "ml data frame" + "indices" ], - "summary": "Update a data frame analytics job", - "operationId": "ml-update-data-frame-analytics", + "summary": "Create or update a legacy index template", + "description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.\nElasticsearch applies templates to new indices based on an index pattern that matches the index name.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.\n\nComposable templates always take precedence over legacy templates.\nIf no composable template matches a new index, matching legacy templates are applied according to their order.\n\nIndex templates are only applied during index creation.\nChanges to index templates do not affect existing indices.\nSettings and mappings specified in create index API requests override any settings or mappings specified in an index template.\n\nYou can use C-style `/* *\\/` block comments in index templates.\nYou can include comments anywhere in the request body, except before the opening curly bracket.\n\n**Indices matching multiple templates**\n\nMultiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index.\nThe order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them.\nNOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-templates-v1.html" + }, + "operationId": "indices-put-template", "parameters": [ { "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "name": "name", + "description": "The name of the template", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" + }, + { + "in": "query", + "name": "create", + "description": "If true, this request cannot replace or update existing index templates.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "order", + "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "cause", + "description": "User defined reason for creating or updating the index template", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" } ], "requestBody": { @@ -27705,23 +31203,67 @@ "schema": { "type": "object", "properties": { - "description": { - "description": "A description of the job.", - "type": "string" + "aliases": { + "description": "Aliases for the index.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } }, - "model_memory_limit": { - "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try\nto create data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", - "type": "string" + "index_patterns": { + "description": "Array of wildcard expressions used to match the names\nof indices during creation.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "max_num_threads": { - "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "mappings": { + "description": "Mapping for fields in the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "order": { + "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", "type": "number" }, - "allow_lazy_start": { - "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", - "type": "boolean" + "settings": { + "description": "Configuration options for the index.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "version": { + "description": "Version number used to manage index templates externally. This number\nis not automatically generated by Elasticsearch.\nTo unset a version, replace the template without specifying one.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] } } + }, + "examples": { + "indicesPutTemplateRequestExample1": { + "summary": "Create an index template", + "value": "{\n \"index_patterns\": [\n \"te*\",\n \"bar*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n}" + }, + "indicesPutTemplateRequestExample2": { + "summary": "Create an index template with aliases", + "description": "You can include index aliases in an index template. During index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", + "value": "{\n \"index_patterns\": [\n \"te*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n}" + } } } }, @@ -27733,90 +31275,57 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "authorization": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsAuthorization" - }, - "allow_lazy_start": { - "type": "boolean" - }, - "analysis": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" - }, - "analyzed_fields": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" - }, - "create_time": { - "type": "number" - }, - "description": { - "type": "string" - }, - "dest": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "max_num_threads": { - "type": "number" - }, - "model_memory_limit": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - } - }, - "required": [ - "allow_lazy_start", - "analysis", - "create_time", - "dest", - "id", - "max_num_threads", - "model_memory_limit", - "source", - "version" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "update_data_frame_analytics", - "x-namespace": "ml" - } - }, - "/_ml/datafeeds/{datafeed_id}/_update": { + "deprecated": true, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_template/{name}\n
\n ", + "
\n POST\n /_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`,`manage`\n" + ], + "x-api": "put_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, "post": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Update a datafeed", - "description": "You must stop and start the datafeed for the changes to be applied.\nWhen Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at\nthe time of the update and runs the query using those same roles. If you provide secondary authorization headers,\nthose credentials are used instead.", - "operationId": "ml-update-datafeed", + "summary": "Create or update a legacy index template", + "description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.\nElasticsearch applies templates to new indices based on an index pattern that matches the index name.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.\n\nComposable templates always take precedence over legacy templates.\nIf no composable template matches a new index, matching legacy templates are applied according to their order.\n\nIndex templates are only applied during index creation.\nChanges to index templates do not affect existing indices.\nSettings and mappings specified in create index API requests override any settings or mappings specified in an index template.\n\nYou can use C-style `/* *\\/` block comments in index templates.\nYou can include comments anywhere in the request body, except before the opening curly bracket.\n\n**Indices matching multiple templates**\n\nMultiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index.\nThe order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them.\nNOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-templates-v1.html" + }, + "operationId": "indices-put-template-1", "parameters": [ { "in": "path", - "name": "datafeed_id", - "description": "A numerical character string that uniquely identifies the datafeed.\nThis identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.\nIt must start and end with alphanumeric characters.", + "name": "name", + "description": "The name of the template", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" }, { "in": "query", - "name": "allow_no_indices", - "description": "If `true`, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the\n`_all` string or when no indices are specified.", + "name": "create", + "description": "If true, this request cannot replace or update existing index templates.", "deprecated": false, "schema": { "type": "boolean" @@ -27825,31 +31334,31 @@ }, { "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are:\n\n* `all`: Match any data stream or index, including hidden ones.\n* `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n* `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or both.\n* `none`: Wildcard patterns are not accepted.\n* `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "ignore_throttled", - "description": "If `true`, concrete, expanded or aliased indices are ignored when frozen.", - "deprecated": true, + "name": "order", + "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", + "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, unavailable indices (missing or closed) are ignored.", + "name": "cause", + "description": "User defined reason for creating or updating the index template", "deprecated": false, "schema": { - "type": "boolean" + "type": "string" }, "style": "form" } @@ -27860,60 +31369,67 @@ "schema": { "type": "object", "properties": { - "aggregations": { - "description": "If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only\nwith low cardinality data.", + "aliases": { + "description": "Aliases for the index.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "chunking_config": { - "$ref": "#/components/schemas/ml._types.ChunkingConfig" - }, - "delayed_data_check_config": { - "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" - }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" - }, - "indices": { - "description": "An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine\nlearning nodes must have the `remote_cluster_client` role.", - "type": "array", - "items": { - "type": "string" + "$ref": "#/components/schemas/indices._types.Alias" } }, - "indices_options": { - "$ref": "#/components/schemas/_types.IndicesOptions" + "index_patterns": { + "description": "Array of wildcard expressions used to match the names\nof indices during creation.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" + "mappings": { + "description": "Mapping for fields in the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] }, - "max_empty_searches": { - "description": "If a real-time datafeed has never seen any data (including during any initial training period), it automatically\nstops and closes the associated job after this many real-time searches return no documents. In other words,\nit stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no\nend time that sees no data remains started until it is explicitly stopped. By default, it is not set.", + "order": { + "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", "type": "number" }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "query_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "script_fields": { - "description": "Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.\nThe detector configuration objects in a job can contain functions that use these script fields.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } + "settings": { + "description": "Configuration options for the index.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] }, - "scroll_size": { - "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.\nThe maximum value is the value of `index.max_result_window`.", - "type": "number" + "version": { + "description": "Version number used to manage index templates externally. This number\nis not automatically generated by Elasticsearch.\nTo unset a version, replace the template without specifying one.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] } } + }, + "examples": { + "indicesPutTemplateRequestExample1": { + "summary": "Create an index template", + "value": "{\n \"index_patterns\": [\n \"te*\",\n \"bar*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n}" + }, + "indicesPutTemplateRequestExample2": { + "summary": "Create an index template with aliases", + "description": "You can include index aliases in an index template. During index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", + "value": "{\n \"index_patterns\": [\n \"te*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n}" + } } } }, @@ -27925,397 +31441,313 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "authorization": { - "$ref": "#/components/schemas/ml._types.DatafeedAuthorization" - }, - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "chunking_config": { - "$ref": "#/components/schemas/ml._types.ChunkingConfig" - }, - "delayed_data_check_config": { - "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" - }, - "datafeed_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" - }, - "indices": { - "type": "array", - "items": { - "type": "string" - } - }, - "indices_options": { - "$ref": "#/components/schemas/_types.IndicesOptions" - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "max_empty_searches": { - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "query_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "script_fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } - }, - "scroll_size": { - "type": "number" - } - }, - "required": [ - "chunking_config", - "datafeed_id", - "indices", - "job_id", - "query", - "query_delay", - "scroll_size" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 6.4.0", - "x-api-name" : "update_datafeed", - "x-namespace": "ml" - } - }, - "/_ml/filters/{filter_id}/_update": { - "post": { + "deprecated": true, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_template/{name}\n
\n ", + "
\n POST\n /_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`,`manage`\n" + ], + "x-api": "put_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Update a filter", - "description": "Updates the description of a filter, adds items, or removes items from the list.", - "operationId": "ml-update-filter", + "summary": "Delete a legacy index template", + "description": "IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.", + "operationId": "indices-delete-template", "parameters": [ { "in": "path", - "name": "filter_id", - "description": "A string that uniquely identifies a filter.", + "name": "name", + "description": "The name of the legacy index template to delete.\nWildcard (`*`) expressions are supported.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Name" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "add_items": { - "description": "The items to add to the filter.", - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "description": "A description for the filter.", - "type": "string" - }, - "remove_items": { - "description": "The items to remove from the filter.", - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "filter_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "items": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "description", - "filter_id", - "items" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 6.4.0", - "x-api-name" : "update_filter", - "x-namespace": "ml" + "deprecated": true, + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "delete_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "head": { + "tags": [ + "indices" + ], + "summary": "Check existence of index templates", + "description": "Get information about whether index templates exist.\nIndex templates define settings, mappings, and aliases that can be applied automatically to new indices.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-template-exists-v1.html" + }, + "operationId": "indices-exists-template", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "A comma-separated list of index template names used to limit the request.\nWildcard (`*`) expressions are supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "flat_settings", + "description": "Indicates whether to use a flat format for the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "Indicates whether to get information from the local node only.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": {} + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n HEAD\n /_template/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "exists_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/anomaly_detectors/{job_id}/_update": { + "/{index}/_disk_usage": { "post": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Update an anomaly detection job", - "description": "Updates certain properties of an anomaly detection job.", - "operationId": "ml-update-job", + "summary": "Analyze the index disk usage", + "description": "Analyze the disk usage of each field of an index or data stream.\nThis API might not support indices created in previous Elasticsearch versions.\nThe result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.\n\nNOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index `store_size` value because some small metadata files are ignored and some parts of data files might not be scanned by the API.\nSince stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.\nThe stored size of the `_id` field is likely underestimated while the `_source` field is overestimated.\n\nFor usage examples see the External documentation or refer to [Analyze the index disk usage example](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/index-disk-usage) for an example.", + "externalDocs": { + "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-disk-usage.html" + }, + "operationId": "indices-disk-usage", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the job.", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nIt’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.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "flush", + "description": "If `true`, the API performs a flush before analysis.\nIf `false`, the response may not include uncommitted data.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "run_expensive_tasks", + "description": "Analyzing field disk usage is resource-intensive.\nTo use the API, this parameter must be set to `true`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "allow_lazy_open": { - "description": "Advanced configuration option. Specifies whether this job can open when\nthere is insufficient machine learning node capacity for it to be\nimmediately assigned to a node. If `false` and a machine learning node\nwith capacity to run the job cannot immediately be found, the open\nanomaly detection jobs API returns an error. However, this is also\nsubject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this\noption is set to `true`, the open anomaly detection jobs API does not\nreturn an error and the job waits in the opening state until sufficient\nmachine learning node capacity is available.", - "type": "boolean" - }, - "analysis_limits": { - "$ref": "#/components/schemas/ml._types.AnalysisMemoryLimit" - }, - "background_persist_interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "custom_settings": { - "description": "Advanced configuration option. Contains custom meta data about the job.\nFor example, it can contain custom URL information as shown in Adding\ncustom URLs to machine learning results.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "categorization_filters": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "description": "A description of the job.", - "type": "string" - }, - "model_plot_config": { - "$ref": "#/components/schemas/ml._types.ModelPlotConfig" - }, - "model_prune_window": { - "$ref": "#/components/schemas/_types.Duration" - }, - "daily_model_snapshot_retention_after_days": { - "description": "Advanced configuration option, which affects the automatic removal of old\nmodel snapshots for this job. It specifies a period of time (in days)\nafter which only the first snapshot per day is retained. This period is\nrelative to the timestamp of the most recent snapshot for this job. Valid\nvalues range from 0 to `model_snapshot_retention_days`. For jobs created\nbefore version 7.8.0, the default value matches\n`model_snapshot_retention_days`.", - "type": "number" - }, - "model_snapshot_retention_days": { - "description": "Advanced configuration option, which affects the automatic removal of old\nmodel snapshots for this job. It specifies the maximum period of time (in\ndays) that snapshots are retained. This period is relative to the\ntimestamp of the most recent snapshot for this job.", - "type": "number" - }, - "renormalization_window_days": { - "description": "Advanced configuration option. The period over which adjustments to the\nscore are applied, as new data is seen.", - "type": "number" - }, - "results_retention_days": { - "description": "Advanced configuration option. The period of time (in days) that results\nare retained. Age is calculated relative to the timestamp of the latest\nbucket result. If this property has a non-null value, once per day at\n00:30 (server time), results that are the specified number of days older\nthan the latest bucket result are deleted from Elasticsearch. The default\nvalue is null, which means all results are retained.", - "type": "number" - }, - "groups": { - "description": "A list of job groups. A job can belong to no groups or many.", - "type": "array", - "items": { - "type": "string" - } - }, - "detectors": { - "description": "An array of detector update objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DetectorUpdate" - } - }, - "per_partition_categorization": { - "$ref": "#/components/schemas/ml._types.PerPartitionCategorization" - } - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "allow_lazy_open": { - "type": "boolean" - }, - "analysis_config": { - "$ref": "#/components/schemas/ml._types.AnalysisConfigRead" - }, - "analysis_limits": { - "$ref": "#/components/schemas/ml._types.AnalysisLimits" - }, - "background_persist_interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "create_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "finished_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "custom_settings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "daily_model_snapshot_retention_after_days": { - "type": "number" - }, - "data_description": { - "$ref": "#/components/schemas/ml._types.DataDescription" - }, - "datafeed_config": { - "$ref": "#/components/schemas/ml._types.Datafeed" - }, - "description": { - "type": "string" - }, - "groups": { - "type": "array", - "items": { - "type": "string" - } - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "job_type": { - "type": "string" - }, - "job_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "model_plot_config": { - "$ref": "#/components/schemas/ml._types.ModelPlotConfig" - }, - "model_snapshot_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "model_snapshot_retention_days": { - "type": "number" - }, - "renormalization_window_days": { - "type": "number" - }, - "results_index_name": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "results_retention_days": { - "type": "number" - } - }, - "required": [ - "allow_lazy_open", - "analysis_config", - "analysis_limits", - "create_time", - "daily_model_snapshot_retention_after_days", - "data_description", - "job_id", - "job_type", - "job_version", - "model_snapshot_retention_days", - "results_index_name" - ] + "type": "object" + }, + "examples": { + "IndicesDiskUsageResponseExample1": { + "description": "An abbreviated response from `POST /my-index-000001/_disk_usage?run_expensive_tasks=true`.", + "value": "{\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"my-index-000001\": {\n \"store_size\": \"929mb\",\n \"store_size_in_bytes\": 974192723,\n \"all_fields\": {\n \"total\": \"928.9mb\",\n \"total_in_bytes\": 973977084,\n \"inverted_index\": {\n \"total\": \"107.8mb\",\n \"total_in_bytes\": 113128526\n },\n \"stored_fields\": \"623.5mb\",\n \"stored_fields_in_bytes\": 653819143,\n \"doc_values\": \"125.7mb\",\n \"doc_values_in_bytes\": 131885142,\n \"points\": \"59.9mb\",\n \"points_in_bytes\": 62885773,\n \"norms\": \"2.3kb\",\n \"norms_in_bytes\": 2356,\n \"term_vectors\": \"2.2kb\",\n \"term_vectors_in_bytes\": 2310,\n \"knn_vectors\": \"0b\",\n \"knn_vectors_in_bytes\": 0\n },\n \"fields\": {\n \"_id\": {\n \"total\": \"49.3mb\",\n \"total_in_bytes\": 51709993,\n \"inverted_index\": {\n \"total\": \"29.7mb\",\n \"total_in_bytes\": 31172745\n },\n \"stored_fields\": \"19.5mb\",\n \"stored_fields_in_bytes\": 20537248,\n \"doc_values\": \"0b\",\n \"doc_values_in_bytes\": 0,\n \"points\": \"0b\",\n \"points_in_bytes\": 0,\n \"norms\": \"0b\",\n \"norms_in_bytes\": 0,\n \"term_vectors\": \"0b\",\n \"term_vectors_in_bytes\": 0,\n \"knn_vectors\": \"0b\",\n \"knn_vectors_in_bytes\": 0\n },\n \"_primary_term\": {},\n \"_seq_no\": {},\n \"_version\": {},\n \"_source\": {\n \"total\": \"603.9mb\",\n \"total_in_bytes\": 633281895,\n \"inverted_index\": {},\n \"stored_fields\": \"603.9mb\",\n \"stored_fields_in_bytes\": 633281895,\n \"doc_values\": \"0b\",\n \"doc_values_in_bytes\": 0,\n \"points\": \"0b\",\n \"points_in_bytes\": 0,\n \"norms\": \"0b\",\n \"norms_in_bytes\": 0,\n \"term_vectors\": \"0b\",\n \"term_vectors_in_bytes\": 0,\n \"knn_vectors\": \"0b\",\n \"knn_vectors_in_bytes\": 0\n },\n \"context\": {\n \"total\": \"28.6mb\",\n \"total_in_bytes\": 30060405,\n \"inverted_index\": {\n \"total\": \"22mb\",\n \"total_in_bytes\": 23090908\n },\n \"stored_fields\": \"0b\",\n \"stored_fields_in_bytes\": 0,\n \"doc_values\": \"0b\",\n \"doc_values_in_bytes\": 0,\n \"points\": \"0b\",\n \"points_in_bytes\": 0,\n \"norms\": \"2.3kb\",\n \"norms_in_bytes\": 2356,\n \"term_vectors\": \"2.2kb\",\n \"term_vectors_in_bytes\": 2310,\n \"knn_vectors\": \"0b\",\n \"knn_vectors_in_bytes\": 0\n },\n \"context.keyword\": {},\n \"message\": {},\n \"message.keyword\": {}\n }\n }\n}" + } } } } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "update_job", - "x-namespace": "ml" + "x-state": "Technical preview; Added in 7.15.0", + "x-variations": [ + "
\n POST\n /{index}/_disk_usage\n
\n " + ], + "x-api": "disk_usage.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update": { + "/{index}/_downsample/{target_index}": { "post": { "tags": [ - "ml anomaly" + "data stream" ], - "summary": "Update a snapshot", - "description": "Updates certain properties of a snapshot.", - "operationId": "ml-update-model-snapshot", + "summary": "Downsample an index", + "description": "Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:\n\n- When running in `aggregate` mode, it pre-calculates and stores statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`)\nfor each metric field grouped by a configured time interval and their dimensions.\n- When running in `last_value` mode, it keeps the last value for each metric in the configured interval and their dimensions.\n\nFor example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.\nAll documents within an hour interval are summarized and stored as a single document in the downsample index.\n\nNOTE: Only indices in a time series data stream are supported.\nNeither field nor document level security can be defined on the source index.\nThe source index must be read-only (`index.blocks.write: true`).", + "operationId": "indices-downsample", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", + "name": "index", + "description": "Name of the time series index to downsample.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" }, { "in": "path", - "name": "snapshot_id", - "description": "Identifier for the model snapshot.", + "name": "target_index", + "description": "Name of the index to create.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" } @@ -28324,16 +31756,11 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "description": { - "description": "A description of the model snapshot.", - "type": "string" - }, - "retain": { - "description": "If `true`, this snapshot will not be deleted during automatic cleanup of\nsnapshots older than `model_snapshot_retention_days`. However, this\nsnapshot will be deleted when the job is deleted.", - "type": "boolean" - } + "$ref": "#/components/schemas/indices._types.DownsampleConfig" + }, + "examples": { + "DownsampleRequestExample1": { + "value": "{\n \"fixed_interval\": \"1d\"\n}" } } } @@ -28346,77 +31773,87 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "model": { - "$ref": "#/components/schemas/ml._types.ModelSnapshot" - } - }, - "required": [ - "acknowledged", - "model" - ] + "type": "object" } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "update_model_snapshot", - "x-namespace": "ml" - } + "x-state": "Technical preview; Added in 8.5.0", + "x-variations": [ + "
\n POST\n /{index}/_downsample/{target_index}\n
\n " + ], + "x-api": "downsample.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } }, - "/_ml/trained_models/{model_id}/deployment/_update": { - "post": { + "/_alias/{name}": { + "get": { "tags": [ - "ml trained model" + "indices" ], - "summary": "Update a trained model deployment", - "operationId": "ml-update-trained-model-deployment", + "summary": "Get aliases", + "description": "Retrieves information for one or more data stream or index aliases.", + "operationId": "indices-get-alias-1", "parameters": [ { "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model. Currently, only PyTorch models are supported.", + "name": "name", + "description": "Comma-separated list of aliases to retrieve.\nSupports wildcards (`*`).\nTo retrieve all aliases, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, { "in": "query", - "name": "number_of_allocations", - "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "number_of_allocations": { - "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", - "type": "number" - }, - "adaptive_allocations": { - "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings" - } - } - } - } - } - }, "responses": { "200": { "description": "", @@ -28424,60 +31861,140 @@ "application/json": { "schema": { "type": "object", - "properties": { - "assignment": { - "$ref": "#/components/schemas/ml._types.TrainedModelAssignment" - } - }, - "required": [ - "assignment" - ] + "additionalProperties": { + "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases" + } } } } } }, - "x-beta": true, - "x-state": "Added in 8.6.0", - "x-api-name" : "update_trained_model_deployment", - "x-namespace": "ml" - } - }, - "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade": { - "post": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_alias/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "head": { "tags": [ - "ml anomaly" + "indices" ], - "summary": "Upgrade a snapshot", - "description": "Upgrade an anomaly detection model snapshot to the latest major version.\nOver time, older snapshot formats are deprecated and removed. Anomaly\ndetection jobs support only snapshots that are from the current or previous\nmajor version.\nThis API provides a means to upgrade a snapshot to the current major version.\nThis aids in preparing the cluster for an upgrade to the next major version.\nOnly one snapshot per anomaly detection job can be upgraded at a time and the\nupgraded snapshot cannot be the current snapshot of the anomaly detection\njob.", - "operationId": "ml-upgrade-job-snapshot", + "summary": "Check aliases", + "description": "Check if one or more data stream or index aliases exist.", + "operationId": "indices-exists-alias", "parameters": [ { "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", + "name": "name", + "description": "Comma-separated list of aliases to check. Supports wildcards (`*`).", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, requests that include a missing data stream or index in the target indices or data streams return an error.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": {} + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n HEAD\n /_alias/{name}\n
\n " + ], + "x-api": "exists_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_lifecycle/explain": { + "get": { + "tags": [ + "data stream" + ], + "summary": "Get the status for a data stream lifecycle", + "description": "Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/data-stream", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-explain-lifecycle.html" + }, + "operationId": "indices-explain-data-lifecycle", + "parameters": [ { "in": "path", - "name": "snapshot_id", - "description": "A numerical character string that uniquely identifies the model snapshot.", + "name": "index", + "description": "Comma-separated list of index names to explain", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { "in": "query", - "name": "wait_for_completion", - "description": "When true, the API won’t respond until the upgrade is complete.\nOtherwise, it responds as soon as the upgrade task is assigned to a node.", + "name": "include_defaults", + "description": "Indicates if the API should return the default values the system uses for the index's lifecycle", "deprecated": false, "schema": { "type": "boolean" @@ -28486,8 +32003,8 @@ }, { "in": "query", - "name": "timeout", - "description": "Controls the time to wait for the request to complete.", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -28503,696 +32020,806 @@ "schema": { "type": "object", "properties": { - "node": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "completed": { - "description": "When true, this means the task is complete. When false, it is still running.", - "type": "boolean" + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.explain_data_lifecycle.DataStreamLifecycleExplain" + } } }, "required": [ - "node", - "completed" + "indices" ] + }, + "examples": { + "IndicesExplainDataLifecycleResponseExample1": { + "summary": "Successful response", + "description": "A successful response from `GET .ds-metrics-2023.03.22-000001/_lifecycle/explain`, which retrieves the lifecycle status for a data stream backing index. If the index is managed by a data stream lifecycle, the API will show the `managed_by_lifecycle` field set to `true` and the rest of the response will contain information about the lifecycle execution status for this index.\n", + "value": "{\n \"indices\": {\n \".ds-metrics-2023.03.22-000001\": {\n \"index\" : \".ds-metrics-2023.03.22-000001\",\n \"managed_by_lifecycle\" : true,\n \"index_creation_date_millis\" : 1679475563571,\n \"time_since_index_creation\" : \"843ms\",\n \"rollover_date_millis\" : 1679475564293,\n \"time_since_rollover\" : \"121ms\",\n \"lifecycle\" : { },\n \"generation_time\" : \"121ms\"\n }\n}" + }, + "IndicesExplainDataLifecycleResponseExample2": { + "summary": "Successful response with error messages", + "description": "The API reports any errors related to the lifecycle execution for the target index.", + "value": "{\n \"indices\": {\n \".ds-metrics-2023.03.22-000001\": {\n \"index\" : \".ds-metrics-2023.03.22-000001\",\n \"managed_by_lifecycle\" : true,\n \"index_creation_date_millis\" : 1679475563571,\n \"time_since_index_creation\" : \"843ms\",\n \"lifecycle\" : {\n \"enabled\": true\n },\n \"error\": \"{\\\"type\\\":\\\"validation_exception\\\",\\\"reason\\\":\\\"Validation Failed: 1: this action would add [2] shards, but this cluster\ncurrently has [4]/[3] maximum normal shards open;\\\"}\"\n }\n}" + } } } } } }, - "x-state": "Added in 5.4.0", - "x-api-name" : "upgrade_job_snapshot", - "x-namespace": "ml" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n GET\n /{index}/_lifecycle/explain\n
\n " + ], + "x-api": "explain_data_lifecycle.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_msearch": { + "/{index}/_field_usage_stats": { "get": { "tags": [ - "search" + "indices" ], - "summary": "Run multiple searches", - "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", - "operationId": "msearch", + "summary": "Get field usage stats", + "description": "Get field usage information for each shard and field of an index.\nField usage statistics are automatically captured when queries are running on a cluster.\nA shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.\n\nThe response body reports the per-shard usage count of the data structures that back the fields in the index.\nA given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times.", + "operationId": "indices-field-usage-stats", "parameters": [ { - "$ref": "#/components/parameters/msearch-allow_no_indices" - }, - { - "$ref": "#/components/parameters/msearch-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/msearch-expand_wildcards" + "in": "path", + "name": "index", + "description": "Comma-separated list or wildcard expression of index names used to limit the request.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/msearch-ignore_throttled" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-ignore_unavailable" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-include_named_queries_score" + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-max_concurrent_searches" - }, + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices.field_usage_stats.FieldsUsageBody" + }, + "examples": { + "indicesFieldUsageStatsResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_field_usage_stats`. The `all_fields` object reports the sums of the usage counts for all fields in the index (on the listed shard).\n", + "value": "{\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"my-index-000001\": {\n \"shards\": [\n {\n \"tracking_id\": \"MpOl0QlTQ4SYYhEe6KgJoQ\",\n \"tracking_started_at_millis\": 1625558985010,\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"gA6KeeVzQkGURFCUyV-e8Q\",\n \"relocating_node\": null\n },\n \"stats\": {\n \"all_fields\": {\n \"any\": \"6\",\n \"inverted_index\": {\n \"terms\": 1,\n \"postings\": 1,\n \"proximity\": 1,\n \"positions\": 0,\n \"term_frequencies\": 1,\n \"offsets\": 0,\n \"payloads\": 0\n },\n \"stored_fields\": 2,\n \"doc_values\": 1,\n \"points\": 0,\n \"norms\": 1,\n \"term_vectors\": 0,\n \"knn_vectors\": 0\n },\n \"fields\": {\n \"_id\": {\n \"any\": 1,\n \"inverted_index\": {\n \"terms\": 1,\n \"postings\": 1,\n \"proximity\": 1,\n \"positions\": 0,\n \"term_frequencies\": 1,\n \"offsets\": 0,\n \"payloads\": 0\n },\n \"stored_fields\": 1,\n \"doc_values\": 0,\n \"points\": 0,\n \"norms\": 0,\n \"term_vectors\": 0,\n \"knn_vectors\": 0\n },\n \"_source\": {},\n \"context\": {},\n \"message.keyword\": {}\n }\n }\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 7.15.0", + "x-variations": [ + "
\n GET\n /{index}/_field_usage_stats\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "field_usage_stats.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/msearch-max_concurrent_shard_requests" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_flush": { + "get": { + "tags": [ + "indices" + ], + "summary": "Flush data streams or indices", + "description": "Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.\nWhen restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.\nElasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.\n\nAfter each operation has been flushed it is permanently stored in the Lucene index.\nThis may mean that there is no need to maintain an additional copy of it in the transaction log.\nThe transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.\n\nIt is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.\nIf you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.", + "operationId": "indices-flush-1", + "parameters": [ { - "$ref": "#/components/parameters/msearch-pre_filter_shard_size" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-rest_total_hits_as_int" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-routing" + "in": "query", + "name": "force", + "description": "If `true`, the request forces a flush even if there are no changes to commit to the index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-search_type" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-typed_keys" + "in": "query", + "name": "wait_if_ongoing", + "description": "If `true`, the flush operation blocks until execution when another flush operation is running.\nIf `false`, Elasticsearch returns an error if you request a flush when another flush operation is running.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/msearch" - }, "responses": { "200": { - "$ref": "#/components/responses/msearch-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name": "msearch" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_flush\n
\n ", + "
\n GET\n /_flush\n
\n " + ], + "x-req-auth": [ + "Index privileges: `maintenance`\n" + ], + "x-api": "flush.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ - "search" + "indices" ], - "summary": "Run multiple searches", - "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", - "operationId": "msearch-1", + "summary": "Flush data streams or indices", + "description": "Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.\nWhen restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.\nElasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.\n\nAfter each operation has been flushed it is permanently stored in the Lucene index.\nThis may mean that there is no need to maintain an additional copy of it in the transaction log.\nThe transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.\n\nIt is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.\nIf you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.", + "operationId": "indices-flush", "parameters": [ { - "$ref": "#/components/parameters/msearch-allow_no_indices" - }, - { - "$ref": "#/components/parameters/msearch-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/msearch-expand_wildcards" - }, - { - "$ref": "#/components/parameters/msearch-ignore_throttled" - }, - { - "$ref": "#/components/parameters/msearch-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/msearch-include_named_queries_score" - }, - { - "$ref": "#/components/parameters/msearch-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/msearch-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/msearch-pre_filter_shard_size" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-rest_total_hits_as_int" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-routing" + "in": "query", + "name": "force", + "description": "If `true`, the request forces a flush even if there are no changes to commit to the index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-search_type" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-typed_keys" + "in": "query", + "name": "wait_if_ongoing", + "description": "If `true`, the flush operation blocks until execution when another flush operation is running.\nIf `false`, Elasticsearch returns an error if you request a flush when another flush operation is running.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/msearch" - }, "responses": { "200": { - "$ref": "#/components/responses/msearch-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name": "msearch" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_flush\n
\n ", + "
\n GET\n /_flush\n
\n " + ], + "x-req-auth": [ + "Index privileges: `maintenance`\n" + ], + "x-api": "flush.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_msearch": { + "/{index}/_flush": { "get": { "tags": [ - "search" + "indices" ], - "summary": "Run multiple searches", - "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", - "operationId": "msearch-2", + "summary": "Flush data streams or indices", + "description": "Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.\nWhen restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.\nElasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.\n\nAfter each operation has been flushed it is permanently stored in the Lucene index.\nThis may mean that there is no need to maintain an additional copy of it in the transaction log.\nThe transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.\n\nIt is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.\nIf you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.", + "operationId": "indices-flush-3", "parameters": [ { - "$ref": "#/components/parameters/msearch-index" - }, - { - "$ref": "#/components/parameters/msearch-allow_no_indices" - }, - { - "$ref": "#/components/parameters/msearch-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/msearch-expand_wildcards" - }, - { - "$ref": "#/components/parameters/msearch-ignore_throttled" - }, - { - "$ref": "#/components/parameters/msearch-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/msearch-include_named_queries_score" - }, - { - "$ref": "#/components/parameters/msearch-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/msearch-max_concurrent_shard_requests" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases to flush.\nSupports wildcards (`*`).\nTo flush all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/msearch-pre_filter_shard_size" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-rest_total_hits_as_int" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-routing" + "in": "query", + "name": "force", + "description": "If `true`, the request forces a flush even if there are no changes to commit to the index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-search_type" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-typed_keys" + "in": "query", + "name": "wait_if_ongoing", + "description": "If `true`, the flush operation blocks until execution when another flush operation is running.\nIf `false`, Elasticsearch returns an error if you request a flush when another flush operation is running.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/msearch" - }, "responses": { "200": { - "$ref": "#/components/responses/msearch-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name": "msearch" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_flush\n
\n ", + "
\n GET\n /{index}/_flush\n
\n " + ], + "x-req-auth": [ + "Index privileges: `maintenance`\n" + ], + "x-api": "flush.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ - "search" + "indices" ], - "summary": "Run multiple searches", - "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", - "operationId": "msearch-3", + "summary": "Flush data streams or indices", + "description": "Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.\nWhen restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.\nElasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.\n\nAfter each operation has been flushed it is permanently stored in the Lucene index.\nThis may mean that there is no need to maintain an additional copy of it in the transaction log.\nThe transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.\n\nIt is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.\nIf you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.", + "operationId": "indices-flush-2", "parameters": [ { - "$ref": "#/components/parameters/msearch-index" - }, - { - "$ref": "#/components/parameters/msearch-allow_no_indices" - }, - { - "$ref": "#/components/parameters/msearch-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/msearch-expand_wildcards" - }, - { - "$ref": "#/components/parameters/msearch-ignore_throttled" - }, - { - "$ref": "#/components/parameters/msearch-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/msearch-include_named_queries_score" - }, - { - "$ref": "#/components/parameters/msearch-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/msearch-max_concurrent_shard_requests" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases to flush.\nSupports wildcards (`*`).\nTo flush all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/msearch-pre_filter_shard_size" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-rest_total_hits_as_int" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-routing" + "in": "query", + "name": "force", + "description": "If `true`, the request forces a flush even if there are no changes to commit to the index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-search_type" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch-typed_keys" + "in": "query", + "name": "wait_if_ongoing", + "description": "If `true`, the flush operation blocks until execution when another flush operation is running.\nIf `false`, Elasticsearch returns an error if you request a flush when another flush operation is running.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/msearch" - }, "responses": { "200": { - "$ref": "#/components/responses/msearch-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name": "msearch" - } - }, - "/_msearch/template": { - "get": { - "tags": [ - "search" - ], - "summary": "Run multiple templated searches", - "description": "Run multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "msearch-template", - "parameters": [ - { - "$ref": "#/components/parameters/msearch_template-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/msearch_template-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/msearch_template-search_type" - }, - { - "$ref": "#/components/parameters/msearch_template-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/msearch_template-typed_keys" - } + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_flush\n
\n ", + "
\n GET\n /{index}/_flush\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/msearch_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/msearch_template-200" - } - }, - "x-state": "Added in 5.0.0", - "x-api-name": "msearch_template" - }, - "post": { - "tags": [ - "search" + "x-req-auth": [ + "Index privileges: `maintenance`\n" ], - "summary": "Run multiple templated searches", - "description": "Run multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "msearch-template-1", - "parameters": [ - { - "$ref": "#/components/parameters/msearch_template-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/msearch_template-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/msearch_template-search_type" - }, + "x-api": "flush.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/msearch_template-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/msearch_template-typed_keys" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/msearch_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/msearch_template-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.0.0", - "x-api-name": "msearch_template" + ] } }, - "/{index}/_msearch/template": { - "get": { + "/_forcemerge": { + "post": { "tags": [ - "search" + "indices" ], - "summary": "Run multiple templated searches", - "description": "Run multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", + "summary": "Force a merge", + "description": "Perform the force merge operation on the shards of one or more indices.\nFor data streams, the API forces a merge on the shards of the stream's backing indices.\n\nMerging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents.\nMerging normally happens automatically, but sometimes it is useful to trigger a merge manually.\n\nWARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes).\nWhen documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a \"tombstone\".\nThese soft-deleted documents are automatically cleaned up during regular segment merges.\nBut force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges.\nSo the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.\nIf you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.\n\n**Blocks during a force merge**\n\nCalls to this API block until the merge is complete (unless request contains `wait_for_completion=false`).\nIf the client connection is lost before completion then the force merge process will continue in the background.\nAny new requests to force merge the same indices will also block until the ongoing force merge is complete.\n\n**Running force merge asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task.\nHowever, you can not cancel this task as the force merge task is not cancelable.\nElasticsearch creates a record of this task as a document at `_tasks/`.\nWhen you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.\n\n**Force merging multiple indices**\n\nYou can force merge multiple indices with a single request by targeting:\n\n* One or more data streams that contain multiple backing indices\n* Multiple indices\n* One or more aliases\n* All data streams and indices in a cluster\n\nEach targeted shard is force-merged separately using the force_merge threadpool.\nBy default each node only has a single `force_merge` thread which means that the shards on that node are force-merged one at a time.\nIf you expand the `force_merge` threadpool on a node then it will force merge its shards in parallel\n\nForce merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case `max_num_segments parameter` is set to `1`, to rewrite all segments into a new one.\n\n**Data streams and time-based indices**\n\nForce-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover.\nIn these cases, each index only receives indexing traffic for a certain period of time.\nOnce an index receive no more writes, its shards can be force-merged to a single segment.\nThis can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches.\nFor example:\n\n```\nPOST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1\n```", "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" + "url": "https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-forcemerge.html" }, - "operationId": "msearch-template-2", + "operationId": "indices-forcemerge", "parameters": [ { - "$ref": "#/components/parameters/msearch_template-index" + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch_template-ccs_minimize_roundtrips" + "in": "query", + "name": "flush", + "description": "Specify whether the index should be flushed after performing the operation", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch_template-max_concurrent_searches" + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch_template-search_type" + "in": "query", + "name": "max_num_segments", + "description": "The number of segments the index should be merged into (default: dynamic)", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch_template-rest_total_hits_as_int" + "in": "query", + "name": "only_expunge_deletes", + "description": "Specify whether the operation should only expunge deleted documents", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/msearch_template-typed_keys" + "in": "query", + "name": "wait_for_completion", + "description": "Should the request wait until the force merge is completed", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/msearch_template" - }, "responses": { "200": { - "$ref": "#/components/responses/msearch_template-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices.forcemerge._types.ForceMergeResponseBody" + } + } + } } }, - "x-state": "Added in 5.0.0", - "x-api-name": "msearch_template" - }, - "post": { - "tags": [ - "search" + "x-state": "Generally available; Added in 2.1.0", + "x-variations": [ + "
\n POST\n /_forcemerge\n
\n " ], - "summary": "Run multiple templated searches", - "description": "Run multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "msearch-template-3", - "parameters": [ - { - "$ref": "#/components/parameters/msearch_template-index" - }, - { - "$ref": "#/components/parameters/msearch_template-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/msearch_template-max_concurrent_searches" - }, - { - "$ref": "#/components/parameters/msearch_template-search_type" - }, - { - "$ref": "#/components/parameters/msearch_template-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/msearch_template-typed_keys" - } + "x-req-auth": [ + "Index privileges: `maintenance`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/msearch_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/msearch_template-200" + "x-api": "forcemerge.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.0.0", - "x-api-name": "msearch_template" + ] } }, - "/_mtermvectors": { - "get": { + "/{index}/_forcemerge": { + "post": { "tags": [ - "document" + "indices" ], - "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", - "operationId": "mtermvectors", + "summary": "Force a merge", + "description": "Perform the force merge operation on the shards of one or more indices.\nFor data streams, the API forces a merge on the shards of the stream's backing indices.\n\nMerging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents.\nMerging normally happens automatically, but sometimes it is useful to trigger a merge manually.\n\nWARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes).\nWhen documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a \"tombstone\".\nThese soft-deleted documents are automatically cleaned up during regular segment merges.\nBut force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges.\nSo the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.\nIf you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.\n\n**Blocks during a force merge**\n\nCalls to this API block until the merge is complete (unless request contains `wait_for_completion=false`).\nIf the client connection is lost before completion then the force merge process will continue in the background.\nAny new requests to force merge the same indices will also block until the ongoing force merge is complete.\n\n**Running force merge asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task.\nHowever, you can not cancel this task as the force merge task is not cancelable.\nElasticsearch creates a record of this task as a document at `_tasks/`.\nWhen you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.\n\n**Force merging multiple indices**\n\nYou can force merge multiple indices with a single request by targeting:\n\n* One or more data streams that contain multiple backing indices\n* Multiple indices\n* One or more aliases\n* All data streams and indices in a cluster\n\nEach targeted shard is force-merged separately using the force_merge threadpool.\nBy default each node only has a single `force_merge` thread which means that the shards on that node are force-merged one at a time.\nIf you expand the `force_merge` threadpool on a node then it will force merge its shards in parallel\n\nForce merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case `max_num_segments parameter` is set to `1`, to rewrite all segments into a new one.\n\n**Data streams and time-based indices**\n\nForce-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover.\nIn these cases, each index only receives indexing traffic for a certain period of time.\nOnce an index receive no more writes, its shards can be force-merged to a single segment.\nThis can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches.\nFor example:\n\n```\nPOST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1\n```", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-forcemerge.html" + }, + "operationId": "indices-forcemerge-1", "parameters": [ { - "$ref": "#/components/parameters/mtermvectors-ids" - }, - { - "$ref": "#/components/parameters/mtermvectors-fields" - }, - { - "$ref": "#/components/parameters/mtermvectors-field_statistics" - }, - { - "$ref": "#/components/parameters/mtermvectors-offsets" - }, - { - "$ref": "#/components/parameters/mtermvectors-payloads" + "in": "path", + "name": "index", + "description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/mtermvectors-positions" + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mtermvectors-preference" + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mtermvectors-realtime" + "in": "query", + "name": "flush", + "description": "Specify whether the index should be flushed after performing the operation", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mtermvectors-routing" + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mtermvectors-term_statistics" + "in": "query", + "name": "max_num_segments", + "description": "The number of segments the index should be merged into (default: dynamic)", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mtermvectors-version" + "in": "query", + "name": "only_expunge_deletes", + "description": "Specify whether the operation should only expunge deleted documents", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mtermvectors-version_type" + "in": "query", + "name": "wait_for_completion", + "description": "Should the request wait until the force merge is completed", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/mtermvectors" - }, "responses": { "200": { - "$ref": "#/components/responses/mtermvectors-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices.forcemerge._types.ForceMergeResponseBody" + } + } + } } }, - "x-api-name": "mtermvectors" - }, - "post": { - "tags": [ - "document" + "x-state": "Generally available; Added in 2.1.0", + "x-variations": [ + "
\n POST\n /{index}/_forcemerge\n
\n " ], - "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", - "operationId": "mtermvectors-1", - "parameters": [ - { - "$ref": "#/components/parameters/mtermvectors-ids" - }, - { - "$ref": "#/components/parameters/mtermvectors-fields" - }, - { - "$ref": "#/components/parameters/mtermvectors-field_statistics" - }, - { - "$ref": "#/components/parameters/mtermvectors-offsets" - }, - { - "$ref": "#/components/parameters/mtermvectors-payloads" - }, - { - "$ref": "#/components/parameters/mtermvectors-positions" - }, - { - "$ref": "#/components/parameters/mtermvectors-preference" - }, - { - "$ref": "#/components/parameters/mtermvectors-realtime" - }, - { - "$ref": "#/components/parameters/mtermvectors-routing" - }, - { - "$ref": "#/components/parameters/mtermvectors-term_statistics" - }, - { - "$ref": "#/components/parameters/mtermvectors-version" - }, - { - "$ref": "#/components/parameters/mtermvectors-version_type" - } + "x-req-auth": [ + "Index privileges: `maintenance`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/mtermvectors" - }, - "responses": { - "200": { - "$ref": "#/components/responses/mtermvectors-200" + "x-api": "forcemerge.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "mtermvectors" + ] } }, - "/{index}/_mtermvectors": { + "/_alias": { "get": { "tags": [ - "document" - ], - "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", - "operationId": "mtermvectors-2", - "parameters": [ - { - "$ref": "#/components/parameters/mtermvectors-index" - }, - { - "$ref": "#/components/parameters/mtermvectors-ids" - }, - { - "$ref": "#/components/parameters/mtermvectors-fields" - }, - { - "$ref": "#/components/parameters/mtermvectors-field_statistics" - }, - { - "$ref": "#/components/parameters/mtermvectors-offsets" - }, - { - "$ref": "#/components/parameters/mtermvectors-payloads" - }, - { - "$ref": "#/components/parameters/mtermvectors-positions" - }, - { - "$ref": "#/components/parameters/mtermvectors-preference" - }, - { - "$ref": "#/components/parameters/mtermvectors-realtime" - }, - { - "$ref": "#/components/parameters/mtermvectors-routing" - }, - { - "$ref": "#/components/parameters/mtermvectors-term_statistics" - }, - { - "$ref": "#/components/parameters/mtermvectors-version" - }, - { - "$ref": "#/components/parameters/mtermvectors-version_type" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/mtermvectors" - }, - "responses": { - "200": { - "$ref": "#/components/responses/mtermvectors-200" - } - }, - "x-api-name": "mtermvectors" - }, - "post": { - "tags": [ - "document" + "indices" ], - "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", - "operationId": "mtermvectors-3", + "summary": "Get aliases", + "description": "Retrieves information for one or more data stream or index aliases.", + "operationId": "indices-get-alias", "parameters": [ { - "$ref": "#/components/parameters/mtermvectors-index" - }, - { - "$ref": "#/components/parameters/mtermvectors-ids" - }, - { - "$ref": "#/components/parameters/mtermvectors-fields" - }, - { - "$ref": "#/components/parameters/mtermvectors-field_statistics" - }, - { - "$ref": "#/components/parameters/mtermvectors-offsets" - }, - { - "$ref": "#/components/parameters/mtermvectors-payloads" - }, - { - "$ref": "#/components/parameters/mtermvectors-positions" - }, - { - "$ref": "#/components/parameters/mtermvectors-preference" - }, - { - "$ref": "#/components/parameters/mtermvectors-realtime" - }, - { - "$ref": "#/components/parameters/mtermvectors-routing" - }, - { - "$ref": "#/components/parameters/mtermvectors-term_statistics" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mtermvectors-version" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/mtermvectors-version_type" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/mtermvectors" - }, - "responses": { - "200": { - "$ref": "#/components/responses/mtermvectors-200" - } - }, - "x-api-name": "mtermvectors" - } - }, - "/_nodes/{node_id}/_repositories_metering/{max_archive_version}": { - "delete": { - "tags": [ - "cluster" - ], - "summary": "Clear the archived repositories metering", - "description": "Clear the archived repositories metering information in the cluster.", - "operationId": "nodes-clear-repositories-metering-archive", - "parameters": [ - { - "in": "path", - "name": "node_id", - "description": "Comma-separated list of node IDs or names used to limit returned information.", - "required": true, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.NodeIds" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "max_archive_version", - "description": "Specifies the maximum `archive_version` to be cleared from the archive.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" } ], "responses": { @@ -29201,725 +32828,1132 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/nodes.clear_repositories_metering_archive.ResponseBase" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases" + } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "clear_repositories_metering_archive", - "x-namespace": "nodes" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_alias\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_nodes/{node_id}/_repositories_metering": { + "/{index}/_alias": { "get": { "tags": [ - "cluster" + "indices" ], - "summary": "Get cluster repositories metering", - "description": "Get repositories metering information for a cluster.\nThis API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time.\nAdditionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts.", - "operationId": "nodes-get-repositories-metering-info", + "summary": "Get aliases", + "description": "Retrieves information for one or more data stream or index aliases.", + "operationId": "indices-get-alias-3", "parameters": [ { "in": "path", - "name": "node_id", - "description": "Comma-separated list of node IDs or names used to limit returned information.", + "name": "index", + "description": "Comma-separated list of data streams or indices used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.NodeIds" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" - } - ], - "responses": { - "200": { + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/nodes.get_repositories_metering_info.ResponseBase" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases" + } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "get_repositories_metering_info", - "x-namespace": "nodes" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_alias\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_alias.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_nodes/hot_threads": { + "/_lifecycle/stats": { "get": { "tags": [ - "cluster" - ], - "summary": "Get the hot threads for nodes", - "description": "Get a breakdown of the hot threads on each selected node in the cluster.\nThe output is plain text with a breakdown of the top hot threads for each node.", - "operationId": "nodes-hot-threads", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.hot_threads-ignore_idle_threads" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-interval" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-snapshots" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-threads" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-timeout" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-type" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-sort" - } + "data stream" ], + "summary": "Get data stream lifecycle stats", + "description": "Get statistics about the data streams that are managed by a data stream lifecycle.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/data-stream", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-get-lifecycle-stats.html" + }, + "operationId": "indices-get-data-lifecycle-stats", "responses": { "200": { - "$ref": "#/components/responses/nodes.hot_threads-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_stream_count": { + "description": "The count of data streams currently being managed by the data stream lifecycle.", + "type": "number" + }, + "data_streams": { + "description": "Information about the data streams that are managed by the data stream lifecycle.", + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_data_lifecycle_stats.DataStreamStats" + } + }, + "last_run_duration_in_millis": { + "description": "The duration of the last data stream lifecycle execution.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "time_between_starts_in_millis": { + "description": "The time that passed between the start of the last two data stream lifecycle executions.\nThis value should amount approximately to `data_streams.lifecycle.poll_interval`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + } + }, + "required": [ + "data_stream_count", + "data_streams" + ] + }, + "examples": { + "IndicesGetDataLifecycleStatsResponseExample1": { + "description": "A successful response for `GET _lifecycle/stats?human&pretty`", + "value": "{\n \"last_run_duration_in_millis\": 2,\n \"last_run_duration\": \"2ms\",\n \"time_between_starts_in_millis\": 9998,\n \"time_between_starts\": \"9.99s\",\n \"data_streams_count\": 2,\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"backing_indices_in_total\": 2,\n \"backing_indices_in_error\": 0\n },\n {\n \"name\": \"my-other-stream\",\n \"backing_indices_in_total\": 2,\n \"backing_indices_in_error\": 1\n }\n ]\n}" + } + } + } + } } }, - "x-api-name" : "hot_threads", - "x-namespace": "nodes" + "x-state": "Generally available; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_lifecycle/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "get_data_lifecycle_stats.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_nodes/{node_id}/hot_threads": { + "/_data_stream": { "get": { "tags": [ - "cluster" + "data stream" ], - "summary": "Get the hot threads for nodes", - "description": "Get a breakdown of the hot threads on each selected node in the cluster.\nThe output is plain text with a breakdown of the top hot threads for each node.", - "operationId": "nodes-hot-threads-1", + "summary": "Get data streams", + "description": "Get information about one or more data streams.", + "operationId": "indices-get-data-stream", "parameters": [ { - "$ref": "#/components/parameters/nodes.hot_threads-node_id" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-ignore_idle_threads" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-interval" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-snapshots" - }, - { - "$ref": "#/components/parameters/nodes.hot_threads-threads" + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.hot_threads-timeout" + "in": "query", + "name": "include_defaults", + "description": "If true, returns all relevant default configurations for the index template.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.11.0", + "style": "form" }, { - "$ref": "#/components/parameters/nodes.hot_threads-type" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.hot_threads-sort" + "in": "query", + "name": "verbose", + "description": "Whether the maximum timestamp for each data stream should be calculated and returned.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/nodes.hot_threads-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.DataStream" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "indicesGetDataStreamResponseExample1": { + "description": "A successful response for retrieving information about a data stream.", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-my-data-stream-2099.03.07-000001\",\n \"index_uuid\": \"xCEhwsp8Tey0-FLNFYVwSg\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n },\n {\n \"index_name\": \".ds-my-data-stream-2099.03.08-000002\",\n \"index_uuid\": \"PA_JquKGSiKcAKBA8DJ5gw\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n }\n ],\n \"generation\": 2,\n \"_meta\": {\n \"my-meta-field\": \"foo\"\n },\n \"status\": \"GREEN\",\n \"next_generation_managed_by\": \"Index Lifecycle Management\",\n \"prefer_ilm\": true,\n \"template\": \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"hidden\": false,\n \"system\": false,\n \"allow_custom_routing\": false,\n \"replicated\": false,\n \"rollover_on_write\": false\n },\n {\n \"name\": \"my-data-stream-two\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-my-data-stream-two-2099.03.08-000001\",\n \"index_uuid\": \"3liBu2SYS5axasRt6fUIpA\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n }\n ],\n \"generation\": 1,\n \"_meta\": {\n \"my-meta-field\": \"foo\"\n },\n \"status\": \"YELLOW\",\n \"next_generation_managed_by\": \"Index Lifecycle Management\",\n \"prefer_ilm\": true,\n \"template\": \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"hidden\": false,\n \"system\": false,\n \"allow_custom_routing\": false,\n \"replicated\": false,\n \"rollover_on_write\": false\n }\n ]\n}" + } + } + } + } } }, - "x-api-name" : "hot_threads", - "x-namespace": "nodes" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_data_stream\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_data_stream.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_nodes": { + "/_data_stream/{name}/_mappings": { "get": { "tags": [ - "cluster" + "data stream" ], - "summary": "Get node information", - "description": "By default, the API returns all attributes and core settings for cluster nodes.", - "operationId": "nodes-info", + "summary": "Get data stream mappings", + "description": "Get mapping information for one or more data streams.", + "operationId": "indices-get-data-stream-mappings", "parameters": [ { - "$ref": "#/components/parameters/nodes.info-flat_settings" + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/nodes.info-timeout" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/nodes.info-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_data_stream_mappings.DataStreamMappings" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesGetDataStreamMappingsResponseExample1": { + "summary": "Get data stream settings on a data stream", + "description": "This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The `effective_settings` field shows additional settings that are pulled from its template.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"mappings\": {\n \"properties\": {\n \"field1\": {\n \"type\": \"ip\"\n },\n \"field3\": {\n \"type\": \"text\"\n }\n }\n },\n \"effective_mappings\": {\n \"properties\": {\n \"field1\": {\n \"type\": \"ip\"\n },\n \"field2\": {\n \"type\": \"text\"\n },\n \"field3\": {\n \"type\": \"text\"\n }\n }\n }\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "info", - "x-namespace": "nodes" - } - }, - "/_nodes/{node_id}": { - "get": { + "x-state": "Generally available; Added in 9.1.0", + "x-variations": [ + "
\n GET\n /_data_stream/{name}/_mappings\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_data_stream_mappings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "cluster" + "data stream" ], - "summary": "Get node information", - "description": "By default, the API returns all attributes and core settings for cluster nodes.", - "operationId": "nodes-info-1", + "summary": "Update data stream mappings", + "description": "This API can be used to override mappings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. The mapping change is only applied to new write indices\nthat are created during rollover after this API is called. No indices are changed by this API.", + "operationId": "indices-put-data-stream-mappings", "parameters": [ { - "$ref": "#/components/parameters/nodes.info-node_id" + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams or data stream patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "dry_run", + "description": "If `true`, the request does not actually change the mappings on any data streams. Instead, it\nsimulates changing the settings and reports back to the user what would have happened had these settings\nactually been applied.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.info-flat_settings" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.info-timeout" + "in": "query", + "name": "timeout", + "description": "The period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + }, + "examples": { + "IndicesPutDataStreamMappingsRequestExample1": { + "summary": "Change a data stream mapping", + "description": "This is a request to add or modify two fields in a mapping on a data stream.\n", + "value": "{\n \"properties\":{\n \"field1\":{\n \"type\":\"ip\"\n },\n \"field3\":{\n \"type\":\"text\"\n }\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/nodes.info-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.put_data_stream_mappings.UpdatedDataStreamMappings" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesPutDataStreamMappingsResponseExample1": { + "summary": "Change data stream settings on a data stream", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when two settings are successfully updated on the data stream. In this case, `index.number_of_shards` is only applied to the data stream -- it will be applied to the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"mappings\": {\n \"properties\": {\n \"field1\": {\n \"type\": \"ip\"\n },\n \"field3\": {\n \"type\": \"text\"\n }\n }\n },\n \"effective_mappings\": {\n \"properties\": {\n \"field1\": {\n \"type\": \"ip\"\n },\n \"field3\": {\n \"type\": \"text\"\n }\n }\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamMappingsResponseExample2": { + "summary": "Attempt to change a data stream setting that is not allowed", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a user attempts to set a setting that is not allowed on a data stream. As a result, no change was applied to the data stream.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": false,\n \"error\": \"Failed to parse mapping: The mapper type [txt] declared on field [field1] does not exist. It might have been created within a future version or requires a plugin to be installed. Check the documentation.\",\n \"mappings\": {\n \"_doc\": {}\n },\n \"effective_mappings\": {\n \"_doc\": {}\n }\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "info", - "x-namespace": "nodes" + "x-state": "Generally available; Added in 9.2.0", + "x-variations": [ + "
\n PUT\n /_data_stream/{name}/_mappings\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "put_data_stream_mappings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_nodes/{metric}": { + "/_data_stream/{name}/_settings": { "get": { "tags": [ - "cluster" + "data stream" ], - "summary": "Get node information", - "description": "By default, the API returns all attributes and core settings for cluster nodes.", - "operationId": "nodes-info-2", + "summary": "Get data stream settings", + "description": "Get setting information for one or more data streams.", + "operationId": "indices-get-data-stream-settings", "parameters": [ { - "$ref": "#/components/parameters/nodes.info-metric" - }, - { - "$ref": "#/components/parameters/nodes.info-flat_settings" + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/nodes.info-timeout" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/nodes.info-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_data_stream_settings.DataStreamSettings" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesGetDataStreamSettingsResponseExample1": { + "summary": "Get data stream settings on a data stream", + "description": "This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The `effective_settings` field shows additional settings that are pulled from its template.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n }\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 1.3.0", - "x-api-name" : "info", - "x-namespace": "nodes" - } - }, - "/_nodes/{node_id}/{metric}": { - "get": { + "x-state": "Generally available; Added in 9.1.0", + "x-variations": [ + "
\n GET\n /_data_stream/{name}/_settings\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_data_stream_settings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "cluster" + "data stream" ], - "summary": "Get node information", - "description": "By default, the API returns all attributes and core settings for cluster nodes.", - "operationId": "nodes-info-3", + "summary": "Update data stream settings", + "description": "NOTE: Available in 8.19. Not available in earlier versions.\n\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,\nonly certain settings are allowed. If possible, the setting change is applied to all\nbacking indices. Otherwise, it will be applied when the data stream is next rolled over.", + "operationId": "indices-put-data-stream-settings", "parameters": [ { - "$ref": "#/components/parameters/nodes.info-node_id" + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams or data stream patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/nodes.info-metric" + "in": "query", + "name": "dry_run", + "description": "If `true`, the request does not actually change the settings on any data streams or indices. Instead, it\nsimulates changing the settings and reports back to the user what would have happened had these settings\nactually been applied.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.info-flat_settings" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.info-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/nodes.info-200" - } - }, - "x-state": "Added in 1.3.0", - "x-api-name" : "info", - "x-namespace": "nodes" - } - }, - "/_nodes/reload_secure_settings": { - "post": { - "tags": [ - "cluster" - ], - "summary": "Reload the keystore on nodes in the cluster", - "description": "Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable.\nThat is, you can change them on disk and reload them without restarting any nodes in the cluster.\nWhen you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node.\n\nWhen the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings.\nReloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted.\nAlternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password.", - "operationId": "nodes-reload-secure-settings", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.reload_secure_settings-timeout" + "in": "query", + "name": "timeout", + "description": "The period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/nodes.reload_secure_settings" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "examples": { + "IndicesPutDataStreamSettingsRequestExample1": { + "summary": "Change a data stream setting", + "description": "This is a request to change two settings on a data stream.\n", + "value": "{\n \"index.lifecycle.name\" : \"new-test-policy\",\n \"index.number_of_shards\": 11\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/nodes.reload_secure_settings-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.put_data_stream_settings.UpdatedDataStreamSettings" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesPutDataStreamSettingsResponseExample1": { + "summary": "Change data stream settings on a data stream", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when two settings are successfully updated on the data stream. In this case, `index.number_of_shards` is only applied to the data stream -- it will be applied to the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ]\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamSettingsResponseExample2": { + "summary": "Change data stream settings on a data stream that has an index with a metadata block", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a setting is successfully applied to the data stream, but one of the backing indices, `.ds-my-data-stream-2025.05.28-000001`, has a write block. The response reports that the setting was not successfully applied to that index.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ],\n \"errors\": [\n {\n \"index\": \".ds-my-data-stream-2025.05.28-000001\",\n \"error\": \"index [.ds-my-data-stream-2025.05.28-000001] blocked by: [FORBIDDEN/9/index metadata (api)];\"\n }\n ]\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamSettingsResponseExample3": { + "summary": "Attempt to change a data stream setting that is not allowed", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a user attempts to set a setting that is not allowed on a data stream. As a result, no change was applied to the data stream.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": false,\n \"error\": \"Cannot set the following settings on a data stream: [index.number_of_replicas]\",\n \"settings\": {},\n \"effective_settings\": {},\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [],\n \"applied_to_data_stream_and_backing_indices\": []\n }\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "reload_secure_settings", - "x-namespace": "nodes" - } - }, - "/_nodes/{node_id}/reload_secure_settings": { - "post": { - "tags": [ - "cluster" + "x-state": "Generally available; Added in 9.1.0", + "x-variations": [ + "
\n PUT\n /_data_stream/{name}/_settings\n
\n " ], - "summary": "Reload the keystore on nodes in the cluster", - "description": "Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable.\nThat is, you can change them on disk and reload them without restarting any nodes in the cluster.\nWhen you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node.\n\nWhen the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings.\nReloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted.\nAlternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password.", - "operationId": "nodes-reload-secure-settings-1", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.reload_secure_settings-node_id" - }, - { - "$ref": "#/components/parameters/nodes.reload_secure_settings-timeout" - } + "x-req-auth": [ + "Index privileges: `manage`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/nodes.reload_secure_settings" - }, - "responses": { - "200": { - "$ref": "#/components/responses/nodes.reload_secure_settings-200" + "x-api": "put_data_stream_settings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.5.0", - "x-api-name" : "reload_secure_settings", - "x-namespace": "nodes" + ] } }, - "/_nodes/stats": { + "/_mapping/field/{fields}": { "get": { "tags": [ - "cluster" + "indices" ], - "summary": "Get node statistics", - "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", - "operationId": "nodes-stats", + "summary": "Get mapping definitions", + "description": "Retrieves mapping definitions for one or more fields.\nFor data streams, the API retrieves field mappings for the stream’s backing indices.\n\nThis API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.", + "operationId": "indices-get-field-mapping", "parameters": [ { - "$ref": "#/components/parameters/nodes.stats-completion_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fielddata_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fields" + "in": "path", + "name": "fields", + "description": "Comma-separated list or wildcard expression of fields used to limit returned information.\nSupports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/nodes.stats-groups" - }, - { - "$ref": "#/components/parameters/nodes.stats-include_segment_file_sizes" - }, - { - "$ref": "#/components/parameters/nodes.stats-level" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-timeout" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-types" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-include_unloaded_segments" + "in": "query", + "name": "include_defaults", + "description": "If `true`, return all default settings in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/nodes.stats-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.get_field_mapping.TypeFieldMappings" + } + }, + "examples": { + "indicesGetFieldMappingResponseExample1": { + "summary": "A single field mapping", + "description": "A sucessful response from `GET publications/_mapping/field/title`, which returns the mapping of a field called `title`.\n", + "value": "{\n \"publications\": {\n \"mappings\": {\n \"title\": {\n \"full_name\": \"title\",\n \"mapping\": {\n \"title\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" + }, + "indicesGetFieldMappingResponseExample2": { + "summary": "Multiple field mappings", + "description": "A successful response from `GET publications/_mapping/field/author.id,abstract,name`. The get field mapping API also supports wildcard notation.\n", + "value": "{\n \"publications\": {\n \"mappings\": {\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" + }, + "indicesGetFieldMappingResponseExample3": { + "summary": "Wildcards", + "description": "A successful response from `GET publications/_mapping/field/a*`.\n", + "value": "{\n \"publications\": {\n \"mappings\": {\n \"author.name\": {\n \"full_name\": \"author.name\",\n \"mapping\": {\n \"name\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n },\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" + } + } + } + } } }, - "x-api-name" : "stats", - "x-namespace": "nodes" - } - }, - "/_nodes/{node_id}/stats": { - "get": { - "tags": [ - "cluster" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_mapping/field/{fields}\n
\n " ], - "summary": "Get node statistics", - "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", - "operationId": "nodes-stats-1", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.stats-node_id" - }, - { - "$ref": "#/components/parameters/nodes.stats-completion_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fielddata_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-groups" - }, - { - "$ref": "#/components/parameters/nodes.stats-include_segment_file_sizes" - }, - { - "$ref": "#/components/parameters/nodes.stats-level" - }, - { - "$ref": "#/components/parameters/nodes.stats-timeout" - }, - { - "$ref": "#/components/parameters/nodes.stats-types" - }, - { - "$ref": "#/components/parameters/nodes.stats-include_unloaded_segments" - } + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/nodes.stats-200" + "x-api": "get_field_mapping.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "stats", - "x-namespace": "nodes" + ] } }, - "/_nodes/stats/{metric}": { + "/{index}/_mapping/field/{fields}": { "get": { "tags": [ - "cluster" + "indices" ], - "summary": "Get node statistics", - "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", - "operationId": "nodes-stats-2", + "summary": "Get mapping definitions", + "description": "Retrieves mapping definitions for one or more fields.\nFor data streams, the API retrieves field mappings for the stream’s backing indices.\n\nThis API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.", + "operationId": "indices-get-field-mapping-1", "parameters": [ { - "$ref": "#/components/parameters/nodes.stats-metric" - }, - { - "$ref": "#/components/parameters/nodes.stats-completion_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fielddata_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-groups" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/nodes.stats-include_segment_file_sizes" + "in": "path", + "name": "fields", + "description": "Comma-separated list or wildcard expression of fields used to limit returned information.\nSupports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/nodes.stats-level" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-timeout" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-types" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-include_unloaded_segments" + "in": "query", + "name": "include_defaults", + "description": "If `true`, return all default settings in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/nodes.stats-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.get_field_mapping.TypeFieldMappings" + } + }, + "examples": { + "indicesGetFieldMappingResponseExample1": { + "summary": "A single field mapping", + "description": "A sucessful response from `GET publications/_mapping/field/title`, which returns the mapping of a field called `title`.\n", + "value": "{\n \"publications\": {\n \"mappings\": {\n \"title\": {\n \"full_name\": \"title\",\n \"mapping\": {\n \"title\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" + }, + "indicesGetFieldMappingResponseExample2": { + "summary": "Multiple field mappings", + "description": "A successful response from `GET publications/_mapping/field/author.id,abstract,name`. The get field mapping API also supports wildcard notation.\n", + "value": "{\n \"publications\": {\n \"mappings\": {\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" + }, + "indicesGetFieldMappingResponseExample3": { + "summary": "Wildcards", + "description": "A successful response from `GET publications/_mapping/field/a*`.\n", + "value": "{\n \"publications\": {\n \"mappings\": {\n \"author.name\": {\n \"full_name\": \"author.name\",\n \"mapping\": {\n \"name\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n },\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" + } + } + } + } } }, - "x-api-name" : "stats", - "x-namespace": "nodes" - } - }, - "/_nodes/{node_id}/stats/{metric}": { - "get": { - "tags": [ - "cluster" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_mapping/field/{fields}\n
\n " ], - "summary": "Get node statistics", - "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", - "operationId": "nodes-stats-3", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.stats-node_id" - }, - { - "$ref": "#/components/parameters/nodes.stats-metric" - }, - { - "$ref": "#/components/parameters/nodes.stats-completion_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fielddata_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-groups" - }, - { - "$ref": "#/components/parameters/nodes.stats-include_segment_file_sizes" - }, - { - "$ref": "#/components/parameters/nodes.stats-level" - }, - { - "$ref": "#/components/parameters/nodes.stats-timeout" - }, - { - "$ref": "#/components/parameters/nodes.stats-types" - }, - { - "$ref": "#/components/parameters/nodes.stats-include_unloaded_segments" - } + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/nodes.stats-200" + "x-api": "get_field_mapping.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "stats", - "x-namespace": "nodes" + ] } }, - "/_nodes/stats/{metric}/{index_metric}": { + "/_index_template": { "get": { "tags": [ - "cluster" + "indices" ], - "summary": "Get node statistics", - "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", - "operationId": "nodes-stats-4", + "summary": "Get index templates", + "description": "Get information about one or more index templates.", + "operationId": "indices-get-index-template", "parameters": [ { - "$ref": "#/components/parameters/nodes.stats-metric" - }, - { - "$ref": "#/components/parameters/nodes.stats-index_metric" - }, - { - "$ref": "#/components/parameters/nodes.stats-completion_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fielddata_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-groups" - }, - { - "$ref": "#/components/parameters/nodes.stats-include_segment_file_sizes" - }, - { - "$ref": "#/components/parameters/nodes.stats-level" + "in": "query", + "name": "local", + "description": "If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-timeout" + "in": "query", + "name": "flat_settings", + "description": "If true, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-types" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-include_unloaded_segments" + "in": "query", + "name": "include_defaults", + "description": "If true, returns all relevant default configurations for the index template.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.11.0", + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/nodes.stats-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index_templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_index_template.IndexTemplateItem" + } + } + }, + "required": [ + "index_templates" + ] + }, + "examples": { + "GetIndexTemplateResponseExample1": { + "description": "A successful response for retrieving information about an index template.", + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" + } + } + } + } } }, - "x-api-name" : "stats", - "x-namespace": "nodes" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_index_template\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "get_index_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_nodes/{node_id}/stats/{metric}/{index_metric}": { + "/_mapping": { "get": { "tags": [ - "cluster" + "indices" ], - "summary": "Get node statistics", - "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", - "operationId": "nodes-stats-5", + "summary": "Get mapping definitions", + "description": "For data streams, the API retrieves mappings for the stream’s backing indices.", + "operationId": "indices-get-mapping", "parameters": [ { - "$ref": "#/components/parameters/nodes.stats-node_id" - }, - { - "$ref": "#/components/parameters/nodes.stats-metric" - }, - { - "$ref": "#/components/parameters/nodes.stats-index_metric" - }, - { - "$ref": "#/components/parameters/nodes.stats-completion_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fielddata_fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-fields" - }, - { - "$ref": "#/components/parameters/nodes.stats-groups" - }, - { - "$ref": "#/components/parameters/nodes.stats-include_segment_file_sizes" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-level" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-timeout" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-types" + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/nodes.stats-include_unloaded_segments" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/nodes.stats-200" - } - }, - "x-api-name" : "stats", - "x-namespace": "nodes" - } - }, - "/_nodes/usage": { - "get": { - "tags": [ - "cluster" - ], - "summary": "Get feature usage information", - "operationId": "nodes-usage", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.usage-timeout" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/nodes.usage-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.get_mapping.IndexMappingRecord" + } + } + } + } } }, - "x-state": "Added in 6.0.0", - "x-api-name" : "usage", - "x-namespace": "nodes" - } - }, - "/_nodes/{node_id}/usage": { - "get": { - "tags": [ - "cluster" - ], - "summary": "Get feature usage information", - "operationId": "nodes-usage-1", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.usage-node_id" - }, - { - "$ref": "#/components/parameters/nodes.usage-timeout" - } + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_mapping\n
\n " ], - "responses": { - "200": { - "$ref": "#/components/responses/nodes.usage-200" - } - }, - "x-state": "Added in 6.0.0", - "x-api-name" : "usage", - "x-namespace": "nodes" - } - }, - "/_nodes/usage/{metric}": { - "get": { - "tags": [ - "cluster" + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" ], - "summary": "Get feature usage information", - "operationId": "nodes-usage-2", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.usage-metric" - }, + "x-api": "get_mapping.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/nodes.usage-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/nodes.usage-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.0.0", - "x-api-name" : "usage", - "x-namespace": "nodes" + ] } }, - "/_nodes/{node_id}/usage/{metric}": { + "/{index}/_mapping": { "get": { "tags": [ - "cluster" - ], - "summary": "Get feature usage information", - "operationId": "nodes-usage-3", - "parameters": [ - { - "$ref": "#/components/parameters/nodes.usage-node_id" - }, - { - "$ref": "#/components/parameters/nodes.usage-metric" - }, - { - "$ref": "#/components/parameters/nodes.usage-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/nodes.usage-200" - } - }, - "x-state": "Added in 6.0.0", - "x-api-name" : "usage", - "x-namespace": "nodes" - } - }, - "/{index}/_pit": { - "post": { - "tags": [ - "search" + "indices" ], - "summary": "Open a point in time", - "description": "A search request by default runs against the most recent visible data of the target indices,\nwhich is called point in time. Elasticsearch pit (point in time) is a lightweight view into the\nstate of the data as it existed when initiated. In some cases, it’s preferred to perform multiple\nsearch requests using the same point in time. For example, if refreshes happen between\n`search_after` requests, then the results of those requests might not be consistent as changes happening\nbetween searches are only visible to the more recent point in time.\n\nA point in time must be opened explicitly before being used in search requests.\n\nA subsequent search request with the `pit` parameter must not specify `index`, `routing`, or `preference` values as these parameters are copied from the point in time.\n\nJust like regular searches, you can use `from` and `size` to page through point in time search results, up to the first 10,000 hits.\nIf you want to retrieve more hits, use PIT with `search_after`.\n\nIMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.\n\nWhen a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a `NoShardAvailableActionException` exception.\nTo get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.\n\n**Keeping point in time alive**\n\nThe `keep_alive` parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.\nThe value does not need to be long enough to process all data — it just needs to be long enough for the next request.\n\nNormally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.\nOnce the smaller segments are no longer needed they are deleted.\nHowever, open point-in-times prevent the old segments from being deleted since they are still in use.\n\nTIP: Keeping older segments alive means that more disk space and file handles are needed.\nEnsure that you have configured your nodes to have ample free file handles.\n\nAdditionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.\nEnsure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.\nNote that a point-in-time doesn't prevent its associated indices from being deleted.\nYou can check how many point-in-times (that is, search contexts) are open with the nodes stats API.", - "operationId": "open-point-in-time", + "summary": "Get mapping definitions", + "description": "For data streams, the API retrieves mappings for the stream’s backing indices.", + "operationId": "indices-get-mapping-1", "parameters": [ { "in": "path", "name": "index", - "description": "A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { @@ -29929,19 +33963,8 @@ }, { "in": "query", - "name": "keep_alive", - "description": "Extend the length of time that the point in time persists.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", "deprecated": false, "schema": { "type": "boolean" @@ -29950,39 +33973,29 @@ }, { "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nBy default, it is random.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "routing", - "description": "A custom value that is used to route operations to a specific shard.", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Routing" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "allow_partial_search_results", - "description": "Indicates whether the point in time tolerates unavailable shards or shard failures when initially creating the PIT.\nIf `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.\nIf `true`, the point in time will contain all the shards that are available at the time of the request.", - "deprecated": false, + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": true, "schema": { "type": "boolean" }, @@ -29990,29 +34003,15 @@ }, { "in": "query", - "name": "max_concurrent_shard_requests", - "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - } - } - } - }, "responses": { "200": { "description": "", @@ -30020,195 +34019,112 @@ "application/json": { "schema": { "type": "object", - "properties": { - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "required": [ - "_shards", - "id" - ] - }, - "examples": { - "OpenPointInTimeResponseExample1": { - "description": "A successful response from `POST /my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true`. It includes a summary of the total number of shards, as well as the number of successful shards when creating the PIT.\n", - "value": "{\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA=\",\n \"_shards\": {\n \"total\": 10,\n \"successful\": 10,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" + "additionalProperties": { + "$ref": "#/components/schemas/indices.get_mapping.IndexMappingRecord" } } } } } }, - "x-state": "Added in 7.10.0", - "x-api-name": "open_point_in_time" - } - }, - "/_scripts/{id}/{context}": { - "put": { - "tags": [ - "script" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_mapping\n
\n " ], - "summary": "Create or update a script or search template", - "description": "Creates or updates a stored script or search template.", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "put-script-2", - "parameters": [ - { - "$ref": "#/components/parameters/put_script-id" - }, - { - "$ref": "#/components/parameters/put_script-context" - }, - { - "$ref": "#/components/parameters/put_script-context_" - }, - { - "$ref": "#/components/parameters/put_script-master_timeout" - }, - { - "$ref": "#/components/parameters/put_script-timeout" - } + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/put_script" - }, - "responses": { - "200": { - "$ref": "#/components/responses/put_script-200" + "x-api": "get_mapping.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "put_script" + ] }, - "post": { + "put": { "tags": [ - "script" + "indices" ], - "summary": "Create or update a script or search template", - "description": "Creates or updates a stored script or search template.", + "summary": "Update field mappings", + "description": "Add new fields to an existing data stream or index.\nYou can use the update mapping API to:\n\n- Add a new field to an existing index\n- Update mappings for multiple indices in a single request\n- Add new properties to an object field\n- Enable multi-fields for an existing field\n- Update supported mapping parameters\n- Change a field's mapping using reindexing\n- Rename a field using a field alias\n\nLearn how to use the update mapping API with practical examples in the [Update mapping API examples](https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples) guide.", "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" + "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-parameters", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-put-mapping.html" }, - "operationId": "put-script-3", + "operationId": "indices-put-mapping", "parameters": [ { - "$ref": "#/components/parameters/put_script-id" - }, - { - "$ref": "#/components/parameters/put_script-context" + "in": "path", + "name": "index", + "description": "A comma-separated list of index names the mapping should be added to (supports wildcards).\nUse `_all` or omit to add the mapping on all indices.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/put_script-context_" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/put_script-master_timeout" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/put_script-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/put_script" - }, - "responses": { - "200": { - "$ref": "#/components/responses/put_script-200" - } - }, - "x-api-name": "put_script" - } - }, - "/_query_rules/{ruleset_id}/_rule/{rule_id}": { - "get": { - "tags": [ - "query_rules" - ], - "summary": "Get a query rule", - "description": "Get details about a query rule within a query ruleset.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules" - }, - "operationId": "query-rules-get-rule", - "parameters": [ - { - "in": "path", - "name": "ruleset_id", - "description": "The unique identifier of the query ruleset containing the rule to retrieve", - "required": true, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "rule_id", - "description": "The unique identifier of the query rule within the specified ruleset to retrieve", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/query_rules._types.QueryRule" - }, - "examples": { - "QueryRuleGetResponseExample1": { - "description": "A successful response from `GET _query_rules/my-ruleset/_rule/my-rule1`.", - "value": "{\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"query_string\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "get_rule", - "x-namespace": "query_rules" - }, - "put": { - "tags": [ - "query_rules" - ], - "summary": "Create or update a query rule", - "description": "Create or update a query rule within a query ruleset.\n\nIMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule.\nIt is advised to use one or the other in query rulesets, to avoid errors.\nAdditionally, pinned queries have a maximum limit of 100 pinned hits.\nIf multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.", - "operationId": "query-rules-put-rule", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "ruleset_id", - "description": "The unique identifier of the query ruleset containing the rule to be created or updated.", - "required": true, + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "rule_id", - "description": "The unique identifier of the query rule within the specified ruleset to be created or updated.", - "required": true, + "in": "query", + "name": "write_index_only", + "description": "If `true`, the mappings are applied only to the current write index for the target.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" } ], "requestBody": { @@ -30217,40 +34133,96 @@ "schema": { "type": "object", "properties": { - "type": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleType" + "date_detection": { + "description": "Controls whether dynamic date detection is enabled.", + "type": "boolean" }, - "criteria": { - "description": "The criteria that must be met for the rule to be applied.\nIf multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.", - "oneOf": [ + "dynamic": { + "description": "Controls whether new fields are added dynamically.", + "allOf": [ { - "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" + "$ref": "#/components/schemas/_types.mapping.DynamicMapping" + } + ] + }, + "dynamic_date_formats": { + "description": "If date detection is enabled then new string fields are checked\nagainst 'dynamic_date_formats' and if the value matches then\na new date field is added instead of string.", + "type": "array", + "items": { + "type": "string" + } + }, + "dynamic_templates": { + "description": "Specify dynamic templates for the mapping.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.DynamicTemplate" }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "_field_names": { + "description": "Control whether field names are enabled for the index.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" - } + "$ref": "#/components/schemas/_types.mapping.FieldNamesField" } ] }, - "actions": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleActions" + "_meta": { + "description": "A mapping type can have custom meta data associated with it. These are\nnot used at all by Elasticsearch, but can be used to store\napplication-specific metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] }, - "priority": { - "type": "number" + "numeric_detection": { + "description": "Automatically map strings into numeric data types for all fields.", + "default": false, + "type": "boolean" + }, + "properties": { + "description": "Mapping for a field. For new fields, this mapping can include:\n\n- Field name\n- Field data type\n- Mapping parameters", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.Property" + } + }, + "_routing": { + "description": "Enable making a routing value required on indexed documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RoutingField" + } + ] + }, + "_source": { + "description": "Control whether the _source field is enabled on the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SourceField" + } + ] + }, + "runtime": { + "description": "Mapping of runtime fields for the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] } - }, - "required": [ - "type", - "criteria", - "actions" - ] + } }, "examples": { - "QueryRulePutRequestExample1": { - "description": "Run `POST _query_rules/my-ruleset/_test` to test a ruleset. Provide the match criteria that you want to test against.\n", - "value": "{\n \"match_criteria\": {\n \"query_string\": \"puggles\"\n }\n}" + "indicesPutMappingRequestExample1": { + "summary": "Update multiple targets", + "description": "The update mapping API can be applied to multiple data streams or indices with a single request. For example, run `PUT /my-index-000001,my-index-000002/_mapping` to update mappings for the `my-index-000001` and `my-index-000002` indices at the same time.\n", + "value": "{\n \"properties\": {\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n}" } } } @@ -30263,136 +34235,111 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] + "$ref": "#/components/schemas/_types.IndicesResponseBase" } } } } }, - "x-state": "Added in 8.15.0", - "x-api-name" : "put_rule", - "x-namespace": "query_rules" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_mapping\n
\n ", + "
\n POST\n /{index}/_mapping\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "put_mapping.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "delete": { + "post": { "tags": [ - "query_rules" + "indices" ], - "summary": "Delete a query rule", - "description": "Delete a query rule within a query ruleset.\nThis is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API.", - "operationId": "query-rules-delete-rule", + "summary": "Update field mappings", + "description": "Add new fields to an existing data stream or index.\nYou can use the update mapping API to:\n\n- Add a new field to an existing index\n- Update mappings for multiple indices in a single request\n- Add new properties to an object field\n- Enable multi-fields for an existing field\n- Update supported mapping parameters\n- Change a field's mapping using reindexing\n- Rename a field using a field alias\n\nLearn how to use the update mapping API with practical examples in the [Update mapping API examples](https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples) guide.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-parameters", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-put-mapping.html" + }, + "operationId": "indices-put-mapping-1", "parameters": [ { "in": "path", - "name": "ruleset_id", - "description": "The unique identifier of the query ruleset containing the rule to delete", + "name": "index", + "description": "A comma-separated list of index names the mapping should be added to (supports wildcards).\nUse `_all` or omit to add the mapping on all indices.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { - "in": "path", - "name": "rule_id", - "description": "The unique identifier of the query rule within the specified ruleset to delete", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "delete_rule", - "x-namespace": "query_rules" - } - }, - "/_query_rules/{ruleset_id}": { - "get": { - "tags": [ - "query_rules" - ], - "summary": "Get a query ruleset", - "description": "Get details about a query ruleset.", - "operationId": "query-rules-get-ruleset", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "ruleset_id", - "description": "The unique identifier of the query ruleset", - "required": true, + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleset" - }, - "examples": { - "QueryRulesetGetResponseExample1": { - "description": "A successful response from `GET _query_rules/my-ruleset/`.", - "value": "{\n \"ruleset_id\": \"my-ruleset\",\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"query_string\",\n \"values\": [ \"pugs\", \"puggles\" ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"query_string\",\n \"values\": [ \"rescue dogs\" ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.10.0", - "x-api-name" : "get_ruleset", - "x-namespace": "query_rules" - }, - "put": { - "tags": [ - "query_rules" - ], - "summary": "Create or update a query ruleset", - "description": "There is a limit of 100 rules per ruleset.\nThis limit can be increased by using the `xpack.applications.rules.max_rules_per_ruleset` cluster setting.\n\nIMPORTANT: Due to limitations within pinned queries, you can only select documents using `ids` or `docs`, but cannot use both in single rule.\nIt is advised to use one or the other in query rulesets, to avoid errors.\nAdditionally, pinned queries have a maximum limit of 100 pinned hits.\nIf multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules" - }, - "operationId": "query-rules-put-ruleset", - "parameters": [ + "style": "form" + }, { - "in": "path", - "name": "ruleset_id", - "description": "The unique identifier of the query ruleset to be created or updated.", - "required": true, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "write_index_only", + "description": "If `true`, the mappings are applied only to the current write index for the target.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { @@ -30401,28 +34348,96 @@ "schema": { "type": "object", "properties": { - "rules": { - "oneOf": [ + "date_detection": { + "description": "Controls whether dynamic date detection is enabled.", + "type": "boolean" + }, + "dynamic": { + "description": "Controls whether new fields are added dynamically.", + "allOf": [ { - "$ref": "#/components/schemas/query_rules._types.QueryRule" + "$ref": "#/components/schemas/_types.mapping.DynamicMapping" + } + ] + }, + "dynamic_date_formats": { + "description": "If date detection is enabled then new string fields are checked\nagainst 'dynamic_date_formats' and if the value matches then\na new date field is added instead of string.", + "type": "array", + "items": { + "type": "string" + } + }, + "dynamic_templates": { + "description": "Specify dynamic templates for the mapping.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.DynamicTemplate" }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "_field_names": { + "description": "Control whether field names are enabled for the index.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/query_rules._types.QueryRule" - } + "$ref": "#/components/schemas/_types.mapping.FieldNamesField" + } + ] + }, + "_meta": { + "description": "A mapping type can have custom meta data associated with it. These are\nnot used at all by Elasticsearch, but can be used to store\napplication-specific metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "numeric_detection": { + "description": "Automatically map strings into numeric data types for all fields.", + "default": false, + "type": "boolean" + }, + "properties": { + "description": "Mapping for a field. For new fields, this mapping can include:\n\n- Field name\n- Field data type\n- Mapping parameters", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.Property" + } + }, + "_routing": { + "description": "Enable making a routing value required on indexed documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RoutingField" + } + ] + }, + "_source": { + "description": "Control whether the _source field is enabled on the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SourceField" + } + ] + }, + "runtime": { + "description": "Mapping of runtime fields for the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" } ] } - }, - "required": [ - "rules" - ] + } }, "examples": { - "QueryRulesetPutRequestExample1": { - "description": "Run `PUT _query_rules/my-ruleset` to create a new query ruleset. Two rules are associated with `my-ruleset`. `my-rule1` will pin documents with IDs `id1` and `id2` when `user_query` contains `pugs` or `puggles` and `user_country` exactly matches `us`. `my-rule2` will exclude documents from different specified indices with IDs `id3` and `id4` when the `query_string` fuzzily matches `rescue dogs`.\n", - "value": "{\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [ \"pugs\", \"puggles\" ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [ \"us\" ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [ \"rescue dogs\" ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n}" + "indicesPutMappingRequestExample1": { + "summary": "Update multiple targets", + "description": "The update mapping API can be applied to multiple data streams or indices with a single request. For example, run `PUT /my-index-000001,my-index-000002/_mapping` to update mappings for the `my-index-000001` and `my-index-000002` indices at the same time.\n", + "value": "{\n \"properties\": {\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n}" } } } @@ -30435,89 +34450,49 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - } - }, - "required": [ - "result" - ] + "$ref": "#/components/schemas/_types.IndicesResponseBase" } } } } }, - "x-state": "Added in 8.10.0", - "x-api-name" : "put_ruleset", - "x-namespace": "query_rules" - }, - "delete": { - "tags": [ - "query_rules" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_mapping\n
\n ", + "
\n POST\n /{index}/_mapping\n
\n " ], - "summary": "Delete a query ruleset", - "description": "Remove a query ruleset and its associated data.\nThis is a destructive action that is not recoverable.", - "operationId": "query-rules-delete-ruleset", - "parameters": [ - { - "in": "path", - "name": "ruleset_id", - "description": "The unique identifier of the query ruleset to delete", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - } + "x-req-auth": [ + "Index privileges: `manage`\n" ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } + "x-api": "put_mapping.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 8.10.0", - "x-api-name" : "delete_ruleset", - "x-namespace": "query_rules" + ] } }, - "/_query_rules": { + "/_migration/reindex/{index}/_status": { "get": { "tags": [ - "query_rules" + "migration" ], - "summary": "Get all query rulesets", - "description": "Get summarized information about the query rulesets.", - "operationId": "query-rules-list-rulesets", + "summary": "Get the migration reindexing status", + "description": "Get the status of a migration reindex attempt for a data stream or index.", + "operationId": "indices-get-migrate-reindex-status", "parameters": [ { - "in": "query", - "name": "from", - "description": "The offset from the first result to fetch.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "size", - "description": "The maximum number of results to retrieve.", + "in": "path", + "name": "index", + "description": "The index or data stream name.", + "required": true, "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Indices" }, - "style": "form" + "style": "simple" } ], "responses": { @@ -30528,85 +34503,160 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "number" + "start_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/query_rules.list_rulesets.QueryRulesetListItem" - } - } - }, + "start_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "complete": { + "type": "boolean" + }, + "total_indices_in_data_stream": { + "type": "number" + }, + "total_indices_requiring_upgrade": { + "type": "number" + }, + "successes": { + "type": "number" + }, + "in_progress": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_migrate_reindex_status.StatusInProgress" + } + }, + "pending": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_migrate_reindex_status.StatusError" + } + }, + "exception": { + "type": "string" + } + }, "required": [ - "count", - "results" + "start_time_millis", + "complete", + "total_indices_in_data_stream", + "total_indices_requiring_upgrade", + "successes", + "in_progress", + "pending", + "errors" ] - }, - "examples": { - "QueryRulesetListResponseExample1": { - "description": "A successful response from `GET _query_rules/?from=0&size=3`.", - "value": "{\n \"count\": 3,\n \"results\": [\n {\n \"ruleset_id\": \"ruleset-1\",\n \"rule_total_count\": 1,\n \"rule_criteria_types_counts\": {\n \"exact\": 1\n }\n },\n {\n \"ruleset_id\": \"ruleset-2\",\n \"rule_total_count\": 2,\n \"rule_criteria_types_counts\": {\n \"exact\": 1,\n \"fuzzy\": 1\n }\n },\n {\n \"ruleset_id\": \"ruleset-3\",\n \"rule_total_count\": 3,\n \"rule_criteria_types_counts\": {\n \"exact\": 1,\n \"fuzzy\": 2\n }\n }\n ]\n}" - } } } } } }, - "x-state": "Added in 8.10.0", - "x-api-name" : "list_rulesets", - "x-namespace": "query_rules" + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n GET\n /_migration/reindex/{index}/_status\n
\n " + ], + "x-api": "get_migrate_reindex_status.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_query_rules/{ruleset_id}/_test": { - "post": { + "/_settings": { + "get": { "tags": [ - "query_rules" + "indices" ], - "summary": "Test a query ruleset", - "description": "Evaluate match criteria against a query ruleset to identify the rules that would match that criteria.", - "operationId": "query-rules-test", + "summary": "Get index settings", + "description": "Get setting information for one or more indices.\nFor data streams, it returns setting information for the stream's backing indices.", + "operationId": "indices-get-settings", "parameters": [ { - "in": "path", - "name": "ruleset_id", - "description": "The unique identifier of the query ruleset to be created or updated", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index\nalias, or `_all` value targets only missing or closed indices. This\nbehavior applies even if the request targets other open indices. For\nexample, a request targeting `foo*,bar*` returns an error if an index\nstarts with foo but no index starts with `bar`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_defaults", + "description": "If `true`, return all default settings in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only. If\n`false`, information is retrieved from the master node.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "match_criteria": { - "description": "The match criteria to apply to rules in the given query ruleset.\nMatch criteria should match the keys defined in the `criteria.metadata` field of the rule.", - "type": "object", - "additionalProperties": { - "type": "object" - } - } - }, - "required": [ - "match_criteria" - ] - }, - "examples": { - "QueryRulesetTestRequestExample1": { - "description": "Run `PUT _query_rules/my-ruleset` to create a new query ruleset. Two rules are associated with `my-ruleset`. `my-rule1` will pin documents with IDs `id1` and `id2` when `user_query` contains `pugs` or `puggles` and `user_country` exactly matches `us`. `my-rule2` will exclude documents from different specified indices with IDs `id3` and `id4` when the `query_string` fuzzily matches `rescue dogs`.\n", - "value": "{\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [ \"pugs\", \"puggles\" ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [ \"us\" ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [ \"rescue dogs\" ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", @@ -30614,188 +34664,327 @@ "application/json": { "schema": { "type": "object", - "properties": { - "total_matched_rules": { - "type": "number" - }, - "matched_rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/query_rules.test.QueryRulesetMatchedRule" - } - } - }, - "required": [ - "total_matched_rules", - "matched_rules" - ] - }, - "examples": { - "QueryRulesetTestResponseExample1": { - "description": "A successful response from `POST _query_rules/my-ruleset/_test`.", - "value": "{\n \"total_matched_rules\": 1,\n \"matched_rules\": [\n {\n \"ruleset_id\": \"my-ruleset\",\n \"rule_id\": \"my-rule1\"\n }\n ]\n}" + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexState" } } } } } }, - "x-state": "Added in 8.10.0", - "x-api-name" : "test", - "x-namespace": "query_rules" - } - }, - "/_rank_eval": { - "get": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_settings\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_settings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "search" + "indices" ], - "summary": "Evaluate ranked search results", - "description": "Evaluate the quality of ranked search results over a set of typical search queries.", - "operationId": "rank-eval", + "summary": "Update index settings", + "description": "Changes dynamic index settings in real time.\nFor data streams, index setting changes are applied to all backing indices by default.\n\nTo revert a setting to the default value, use a null value.\nThe list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation.\nTo preserve existing settings from being updated, set the `preserve_existing` parameter to `true`.\n\nFor performance optimization during bulk indexing, you can disable the refresh interval.\nRefer to [disable refresh interval](https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval) for an example.\nThere are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example:\n\n```\n{\n \"number_of_replicas\": 1\n}\n```\n\nOr you can use an `index` setting object:\n```\n{\n \"index\": {\n \"number_of_replicas\": 1\n }\n}\n```\n\nOr you can use dot annotation:\n```\n{\n \"index.number_of_replicas\": 1\n}\n```\n\nOr you can embed any of the aforementioned options in a `settings` object. For example:\n\n```\n{\n \"settings\": {\n \"index\": {\n \"number_of_replicas\": 1\n }\n }\n}\n```\n\nNOTE: You can only define new analyzers on closed indices.\nTo add an analyzer, you must close the index, define the analyzer, and reopen the index.\nYou cannot close the write index of a data stream.\nTo update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream.\nThen roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.\nThis affects searches and any new data added to the stream after the rollover.\nHowever, it does not affect the data stream's backing indices or their existing data.\nTo change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.\nRefer to [updating analyzers on existing indices](https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices) for step-by-step examples.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/index-settings/", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-update-settings.html" + }, + "operationId": "indices-put-settings", "parameters": [ { - "$ref": "#/components/parameters/rank_eval-allow_no_indices" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index\nalias, or `_all` value targets only missing or closed indices. This\nbehavior applies even if the request targets other open indices. For\nexample, a request targeting `foo*,bar*` returns an error if an index\nstarts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-expand_wildcards" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target\ndata streams, this argument determines whether wildcard expressions match\nhidden data streams. Supports comma-separated values, such as\n`open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-ignore_unavailable" + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-search_type" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/rank_eval" - }, - "responses": { - "200": { - "$ref": "#/components/responses/rank_eval-200" - } - }, - "x-state": "Added in 6.2.0", - "x-api-name": "rank_eval" - }, - "post": { - "tags": [ - "search" - ], - "summary": "Evaluate ranked search results", - "description": "Evaluate the quality of ranked search results over a set of typical search queries.", - "operationId": "rank-eval-1", - "parameters": [ + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/rank_eval-allow_no_indices" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-expand_wildcards" + "in": "query", + "name": "preserve_existing", + "description": "If `true`, existing index settings remain unchanged.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-ignore_unavailable" + "in": "query", + "name": "reopen", + "description": "Whether to close and reopen the index to apply non-dynamic settings.\nIf set to `true` the indices to which the settings are being applied\nwill be closed temporarily and then reopened in order to apply the changes.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-search_type" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/rank_eval" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "examples": { + "IndicesPutSettingsRequestExample1": { + "summary": "Change a dynamic index setting", + "value": "{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}" + }, + "indicesPutSettingsRequestExample2": { + "summary": "Reset an index setting", + "description": "To revert a setting to the default value, use `null`.", + "value": "{\n \"index\" : {\n \"refresh_interval\" : null\n }\n}" + }, + "indicesPutSettingsRequestExample3": { + "summary": "Update index analysis", + "description": "To add an analyzer, you must close the index (`POST /my-index-000001/_close`), define the analyzer, then reopen the index (`POST /my-index-000001/_open`).", + "value": "{\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/rank_eval-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 6.2.0", - "x-api-name": "rank_eval" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_settings\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "put_settings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_rank_eval": { + "/{index}/_settings": { "get": { "tags": [ - "search" + "indices" ], - "summary": "Evaluate ranked search results", - "description": "Evaluate the quality of ranked search results over a set of typical search queries.", - "operationId": "rank-eval-2", + "summary": "Get index settings", + "description": "Get setting information for one or more indices.\nFor data streams, it returns setting information for the stream's backing indices.", + "operationId": "indices-get-settings-1", "parameters": [ { - "$ref": "#/components/parameters/rank_eval-index" - }, - { - "$ref": "#/components/parameters/rank_eval-allow_no_indices" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit\nthe request. Supports wildcards (`*`). To target all data streams and\nindices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/rank_eval-expand_wildcards" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index\nalias, or `_all` value targets only missing or closed indices. This\nbehavior applies even if the request targets other open indices. For\nexample, a request targeting `foo*,bar*` returns an error if an index\nstarts with foo but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-ignore_unavailable" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-search_type" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/rank_eval" - }, - "responses": { - "200": { - "$ref": "#/components/responses/rank_eval-200" - } - }, - "x-state": "Added in 6.2.0", - "x-api-name": "rank_eval" - }, - "post": { - "tags": [ - "search" - ], - "summary": "Evaluate ranked search results", - "description": "Evaluate the quality of ranked search results over a set of typical search queries.", - "operationId": "rank-eval-3", - "parameters": [ - { - "$ref": "#/components/parameters/rank_eval-index" + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-allow_no_indices" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-expand_wildcards" + "in": "query", + "name": "include_defaults", + "description": "If `true`, return all default settings in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-ignore_unavailable" + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only. If\n`false`, information is retrieved from the master node.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rank_eval-search_type" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/rank_eval" - }, "responses": { "200": { - "$ref": "#/components/responses/rank_eval-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexState" + } + } + } + } } }, - "x-state": "Added in 6.2.0", - "x-api-name": "rank_eval" - } - }, - "/_reindex": { - "post": { + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_settings\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "get_settings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "document" + "indices" ], - "summary": "Reindex documents", - "description": "Copy documents from a source to a destination.\nYou can copy all documents to the destination index or reindex a subset of the documents.\nThe source can be any existing index, alias, or data stream.\nThe destination must differ from the source.\nFor example, you cannot reindex a data stream into itself.\n\nIMPORTANT: Reindex requires `_source` to be enabled for all documents in the source.\nThe destination should be configured as wanted before calling the reindex API.\nReindex does not copy the settings from the source or its associated template.\nMappings, shard counts, and replicas, for example, must be configured ahead of time.\n\nIf the Elasticsearch security features are enabled, you must have the following security privileges:\n\n* The `read` index privilege for the source data stream, index, or alias.\n* The `write` index privilege for the destination data stream, index, or index alias.\n* To automatically create a data stream or index with a reindex API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege for the destination data stream, index, or alias.\n* If reindexing from a remote cluster, the `source.remote.user` must have the `monitor` cluster privilege and the `read` index privilege for the source data stream, index, or alias.\n\nIf reindexing from a remote cluster, you must explicitly allow the remote host in the `reindex.remote.whitelist` setting.\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe `dest` element can be configured like the index API to control optimistic concurrency control.\nOmitting `version_type` or setting it to `internal` causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.\n\nSetting `version_type` to `external` causes Elasticsearch to preserve the `version` from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source.\n\nSetting `op_type` to `create` causes the reindex API to create only missing documents in the destination.\nAll existing documents will cause a version conflict.\n\nIMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an `op_type` of `create`.\nA reindex can only add new documents to a destination data stream.\nIt cannot update existing documents in a destination data stream.\n\nBy default, version conflicts abort the reindex process.\nTo continue reindexing if there are conflicts, set the `conflicts` request body property to `proceed`.\nIn this case, the response includes a count of the version conflicts that were encountered.\nNote that the handling of other error types is unaffected by the `conflicts` property.\nAdditionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.\n\nNOTE: The reindex API makes no effort to handle ID collisions.\nThe last document written will \"win\" but the order isn't usually predictable so it is not a good idea to rely on this behavior.\nInstead, make sure that IDs are unique by using a script.\n\n**Running reindex asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task.\nElasticsearch creates a record of this task as a document at `_tasks/`.\n\n**Reindex from multiple sources**\n\nIf you have many sources to reindex it is generally better to reindex them one at a time rather than using a glob pattern to pick up multiple sources.\nThat way you can resume the process if there are any errors by removing the partially completed source and starting over.\nIt also makes parallelizing the process fairly simple: split the list of sources to reindex and run each list in parallel.\n\nFor example, you can use a bash script like this:\n\n```\nfor index in i1 i2 i3 i4 i5; do\n curl -HContent-Type:application/json -XPOST localhost:9200/_reindex?pretty -d'{\n \"source\": {\n \"index\": \"'$index'\"\n },\n \"dest\": {\n \"index\": \"'$index'-reindexed\"\n }\n }'\ndone\n```\n\n**Throttling**\n\nSet `requests_per_second` to any positive decimal number (`1.4`, `6`, `1000`, for example) to throttle the rate at which reindex issues batches of index operations.\nRequests are throttled by padding each batch with a wait time.\nTo turn off throttling, set `requests_per_second` to `-1`.\n\nThe throttling is done by waiting between batches so that the scroll that reindex uses internally can be given a timeout that takes into account the padding.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is `1000`, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single bulk request, large batch sizes cause Elasticsearch to create many requests and then wait for a while before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nReindex supports sliced scroll to parallelize the reindexing process.\nThis parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nNOTE: Reindexing from remote clusters does not support manual or automatic slicing.\n\nYou can slice a reindex request manually by providing a slice ID and total number of slices to each request.\nYou can also let reindex automatically parallelize by using sliced scroll to slice on `_id`.\nThe `slices` parameter specifies the number of slices to use.\n\nAdding `slices` to the reindex request just automates the manual process, creating sub-requests which means it has some quirks:\n\n* You can see these requests in the tasks API. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with `slices` will cancel each sub-request.\n* Due to the nature of `slices`, each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with `slices` are distributed proportionally to each sub-request. Combine that with the previous point about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being reindexed.\n* Each sub-request gets a slightly different snapshot of the source, though these are all taken at approximately the same time.\n\nIf slicing automatically, setting `slices` to `auto` will choose a reasonable number for most indices.\nIf slicing manually or otherwise tuning automatic slicing, use the following guidelines.\n\nQuery performance is most efficient when the number of slices is equal to the number of shards in the index.\nIf that number is large (for example, `500`), choose a lower number as too many slices will hurt performance.\nSetting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n\nIndexing performance scales linearly across available resources with the number of slices.\n\nWhether query or indexing performance dominates the runtime depends on the documents being reindexed and cluster resources.\n\n**Modify documents during reindexing**\n\nLike `_update_by_query`, reindex operations support a script that modifies the document.\nUnlike `_update_by_query`, the script is allowed to modify the document's metadata.\n\nJust as in `_update_by_query`, you can set `ctx.op` to change the operation that is run on the destination.\nFor example, set `ctx.op` to `noop` if your script decides that the document doesn’t have to be indexed in the destination. This \"no operation\" will be reported in the `noop` counter in the response body.\nSet `ctx.op` to `delete` if your script decides that the document must be deleted from the destination.\nThe deletion will be reported in the `deleted` counter in the response body.\nSetting `ctx.op` to anything else will return an error, as will setting any other field in `ctx`.\n\nThink of the possibilities! Just be careful; you are able to change:\n\n* `_id`\n* `_index`\n* `_version`\n* `_routing`\n\nSetting `_version` to `null` or clearing it from the `ctx` map is just like not sending the version in an indexing request.\nIt will cause the document to be overwritten in the destination regardless of the version on the target or the version type you use in the reindex API.\n\n**Reindex from remote**\n\nReindex supports reindexing from a remote Elasticsearch cluster.\nThe `host` parameter must contain a scheme, host, port, and optional path.\nThe `username` and `password` parameters are optional and when they are present the reindex operation will connect to the remote Elasticsearch node using basic authentication.\nBe sure to use HTTPS when using basic authentication or the password will be sent in plain text.\nThere are a range of settings available to configure the behavior of the HTTPS connection.\n\nWhen using Elastic Cloud, it is also possible to authenticate against the remote cluster through the use of a valid API key.\nRemote hosts must be explicitly allowed with the `reindex.remote.whitelist` setting.\nIt can be set to a comma delimited list of allowed remote host and port combinations.\nScheme is ignored; only the host and port are used.\nFor example:\n\n```\nreindex.remote.whitelist: [otherhost:9200, another:9200, 127.0.10.*:9200, localhost:*\"]\n```\n\nThe list of allowed hosts must be configured on any nodes that will coordinate the reindex.\nThis feature should work with remote clusters of any version of Elasticsearch.\nThis should enable you to upgrade from any version of Elasticsearch to the current version by reindexing from a cluster of the old version.\n\nWARNING: Elasticsearch does not support forward compatibility across major versions.\nFor example, you cannot reindex from a 7.x cluster into a 6.x cluster.\n\nTo enable queries sent to older versions of Elasticsearch, the `query` parameter is sent directly to the remote host without validation or modification.\n\nNOTE: Reindexing from remote clusters does not support manual or automatic slicing.\n\nReindexing from a remote server uses an on-heap buffer that defaults to a maximum size of 100mb.\nIf the remote index includes very large documents you'll need to use a smaller batch size.\nIt is also possible to set the socket read timeout on the remote connection with the `socket_timeout` field and the connection timeout with the `connect_timeout` field.\nBoth default to 30 seconds.\n\n**Configuring SSL parameters**\n\nReindex from remote supports configurable SSL settings.\nThese must be specified in the `elasticsearch.yml` file, with the exception of the secure settings, which you add in the Elasticsearch keystore.\nIt is not possible to configure SSL in the body of the reindex request.", - "operationId": "reindex", + "summary": "Update index settings", + "description": "Changes dynamic index settings in real time.\nFor data streams, index setting changes are applied to all backing indices by default.\n\nTo revert a setting to the default value, use a null value.\nThe list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation.\nTo preserve existing settings from being updated, set the `preserve_existing` parameter to `true`.\n\nFor performance optimization during bulk indexing, you can disable the refresh interval.\nRefer to [disable refresh interval](https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval) for an example.\nThere are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example:\n\n```\n{\n \"number_of_replicas\": 1\n}\n```\n\nOr you can use an `index` setting object:\n```\n{\n \"index\": {\n \"number_of_replicas\": 1\n }\n}\n```\n\nOr you can use dot annotation:\n```\n{\n \"index.number_of_replicas\": 1\n}\n```\n\nOr you can embed any of the aforementioned options in a `settings` object. For example:\n\n```\n{\n \"settings\": {\n \"index\": {\n \"number_of_replicas\": 1\n }\n }\n}\n```\n\nNOTE: You can only define new analyzers on closed indices.\nTo add an analyzer, you must close the index, define the analyzer, and reopen the index.\nYou cannot close the write index of a data stream.\nTo update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream.\nThen roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.\nThis affects searches and any new data added to the stream after the rollover.\nHowever, it does not affect the data stream's backing indices or their existing data.\nTo change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.\nRefer to [updating analyzers on existing indices](https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices) for step-by-step examples.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/index-settings/", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-update-settings.html" + }, + "operationId": "indices-put-settings-1", "parameters": [ + { + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit\nthe request. Supports wildcards (`*`). To target all data streams and\nindices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, { "in": "query", - "name": "refresh", - "description": "If `true`, the request refreshes affected shards to make this operation visible to search.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index\nalias, or `_all` value targets only missing or closed indices. This\nbehavior applies even if the request targets other open indices. For\nexample, a request targeting `foo*,bar*` returns an error if an index\nstarts with `foo` but no index starts with `bar`.", "deprecated": false, "schema": { "type": "boolean" @@ -30804,38 +34993,38 @@ }, { "in": "query", - "name": "requests_per_second", - "description": "The throttle for this request in sub-requests per second.\nBy default, there is no throttle.", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target\ndata streams, this argument determines whether wildcard expressions match\nhidden data streams. Supports comma-separated values, such as\n`open,hidden`.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "scroll", - "description": "The period of time that a consistent view of the index should be maintained for scrolled search.", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "slices", - "description": "The number of slices this task should be divided into.\nIt defaults to one slice, which means the task isn't sliced into subtasks.\n\nReindex supports sliced scroll to parallelize the reindexing process.\nThis parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nNOTE: Reindexing from remote clusters does not support manual or automatic slicing.\n\nIf set to `auto`, Elasticsearch chooses the number of slices to use.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple sources, it will choose the number of slices based on the index or backing index with the smallest number of shards.", + "name": "ignore_unavailable", + "description": "If `true`, returns settings in flat format.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Slices" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.\nBy default, Elasticsearch waits for at least one minute before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -30844,18 +35033,18 @@ }, { "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value is one, which means it waits for each primary shard to be active.", + "name": "preserve_existing", + "description": "If `true`, existing index settings remain unchanged.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request blocks until the operation is complete.", + "name": "reopen", + "description": "Whether to close and reopen the index to apply non-dynamic settings.\nIf set to `true` the indices to which the settings are being applied\nwill be closed temporarily and then reopened in order to apply the changes.", "deprecated": false, "schema": { "type": "boolean" @@ -30864,11 +35053,11 @@ }, { "in": "query", - "name": "require_alias", - "description": "If `true`, the destination must be an index alias.", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -30877,98 +35066,22 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "conflicts": { - "$ref": "#/components/schemas/_types.Conflicts" - }, - "dest": { - "$ref": "#/components/schemas/_global.reindex.Destination" - }, - "max_docs": { - "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", - "type": "number" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "size": { - "type": "number" - }, - "source": { - "$ref": "#/components/schemas/_global.reindex.Source" - } - }, - "required": [ - "dest", - "source" - ] + "$ref": "#/components/schemas/indices._types.IndexSettings" }, "examples": { - "ReindexRequestExample1": { - "summary": "Reindex multiple sources", - "description": "Run `POST _reindex` to reindex from multiple sources. The `index` attribute in source can be a list, which enables you to copy from lots of sources in one request. This example copies documents from the `my-index-000001` and `my-index-000002` indices.\n", - "value": "{\n \"source\": {\n \"index\": [\"my-index-000001\", \"my-index-000002\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000002\"\n }\n}" - }, - "ReindexRequestExample10": { - "summary": "Reindex with Painless", - "description": "You can use Painless to reindex daily indices to apply a new template to the existing documents. The script extracts the date from the index name and creates a new index with `-1` appended. For example, all data from `metricbeat-2016.05.31` will be reindexed into `metricbeat-2016.05.31-1`.\n", - "value": "{\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n}" + "IndicesPutSettingsRequestExample1": { + "summary": "Change a dynamic index setting", + "value": "{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}" }, - "ReindexRequestExample11": { - "summary": "Reindex a random subset", - "description": "Run `POST _reindex` to extract a random subset of the source for testing. You might need to adjust the `min_score` value depending on the relative amount of data extracted from source.\n", - "value": "{\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\" : {\n \"random_score\" : {},\n \"min_score\" : 0.9\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + "indicesPutSettingsRequestExample2": { + "summary": "Reset an index setting", + "description": "To revert a setting to the default value, use `null`.", + "value": "{\n \"index\" : {\n \"refresh_interval\" : null\n }\n}" }, - "ReindexRequestExample12": { - "summary": "Reindex modified documents", - "description": "Run `POST _reindex` to modify documents during reindexing. This example bumps the version of the source document.\n", - "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n}" - }, - "ReindexRequestExample13": { - "summary": "Reindex from remote on Elastic Cloud", - "description": "When using Elastic Cloud, you can run `POST _reindex` and authenticate against a remote cluster with an API key.\n", - "value": "{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" - }, - "ReindexRequestExample2": { - "summary": "Manual slicing", - "description": "Run `POST _reindex` to slice a reindex request manually. Provide a slice ID and total number of slices to each request.\n", - "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" - }, - "ReindexRequestExample3": { - "summary": "Automatic slicing", - "description": "Run `POST _reindex?slices=5&refresh` to automatically parallelize using sliced scroll to slice on `_id`. The `slices` parameter specifies the number of slices to use.\n", - "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" - }, - "ReindexRequestExample4": { - "summary": "Routing", - "description": "By default if reindex sees a document with routing then the routing is preserved unless it's changed by the script. You can set `routing` on the `dest` request to change this behavior. In this example, run `POST _reindex` to copy all documents from the `source` with the company name `cat` into the `dest` with routing set to `cat`.\n", - "value": "{\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}" - }, - "ReindexRequestExample5": { - "summary": "Ingest pipelines", - "description": "Run `POST _reindex` and use the ingest pipelines feature.", - "value": "{\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n}" - }, - "ReindexRequestExample6": { - "summary": "Reindex with a query", - "description": "Run `POST _reindex` and add a query to the `source` to limit the documents to reindex. For example, this request copies documents into `my-new-index-000001` only if they have a `user.id` of `kimchy`.\n", - "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" - }, - "ReindexRequestExample7": { - "summary": "Reindex with max_docs", - "description": "You can limit the number of processed documents by setting `max_docs`. For example, run `POST _reindex` to copy a single document from `my-index-000001` to `my-new-index-000001`.\n", - "value": "{\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" - }, - "ReindexRequestExample8": { - "summary": "Reindex selected fields", - "description": "You can use source filtering to reindex a subset of the fields in the original documents. For example, run `POST _reindex` the reindex only the `user.id` and `_doc` fields of each document.\n", - "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"_source\": [\"user.id\", \"_doc\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" - }, - "ReindexRequestExample9": { - "summary": "Reindex new field names", - "description": "A reindex operation can build a copy of an index with renamed fields. If your index has documents with `text` and `flag` fields, you can change the latter field name to `tag` during the reindex.\n", - "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n}" + "indicesPutSettingsRequestExample3": { + "summary": "Update index analysis", + "description": "To add an analyzer, you must close the index (`POST /my-index-000001/_close`), define the analyzer, then reopen the index (`POST /my-index-000001/_open`).", + "value": "{\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n}" } } } @@ -30981,106 +35094,127 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "batches": { - "description": "The number of scroll responses that were pulled back by the reindex.", - "type": "number" - }, - "created": { - "description": "The number of documents that were successfully created.", - "type": "number" - }, - "deleted": { - "description": "The number of documents that were successfully deleted.", - "type": "number" - }, - "failures": { - "description": "If there were any unrecoverable errors during the process, it is an array of those failures.\nIf this array is not empty, the request ended because of those failures.\nReindex is implemented using batches and any failure causes the entire process to end but all failures in the current batch are collected into the array.\nYou can use the `conflicts` option to prevent the reindex from ending on version conflicts.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.BulkIndexByScrollFailure" - } - }, - "noops": { - "description": "The number of documents that were ignored because the script used for the reindex returned a `noop` value for `ctx.op`.", - "type": "number" - }, - "retries": { - "$ref": "#/components/schemas/_types.Retries" - }, - "requests_per_second": { - "description": "The number of requests per second effectively run during the reindex.", - "type": "number" - }, - "slice_id": { - "type": "number" - }, - "task": { - "$ref": "#/components/schemas/_types.TaskId" - }, - "throttled_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "throttled_until_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "timed_out": { - "description": "If any of the requests that ran during the reindex timed out, it is `true`.", - "type": "boolean" - }, - "took": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total": { - "description": "The number of documents that were successfully processed.", - "type": "number" - }, - "updated": { - "description": "The number of documents that were successfully updated.\nThat is to say, a document with the same ID already existed before the reindex updated it.", - "type": "number" - }, - "version_conflicts": { - "description": "The number of version conflicts that occurred.", - "type": "number" - } - } + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 2.3.0", - "x-api-name": "reindex" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_settings\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "put_settings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_reindex/{task_id}/_rethrottle": { - "post": { + "/{index}/_settings/{name}": { + "get": { "tags": [ - "document" + "indices" ], - "summary": "Throttle a reindex operation", - "description": "Change the number of requests per second for a particular reindex operation.\nFor example:\n\n```\nPOST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\n```\n\nRethrottling that speeds up the query takes effect immediately.\nRethrottling that slows down the query will take effect after completing the current batch.\nThis behavior prevents scroll timeouts.", - "operationId": "reindex-rethrottle", + "summary": "Get index settings", + "description": "Get setting information for one or more indices.\nFor data streams, it returns setting information for the stream's backing indices.", + "operationId": "indices-get-settings-2", "parameters": [ { "in": "path", - "name": "task_id", - "description": "The task identifier, which can be found by using the tasks API.", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit\nthe request. Supports wildcards (`*`). To target all data streams and\nindices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "Comma-separated list or wildcard expression of settings to retrieve.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, { "in": "query", - "name": "requests_per_second", - "description": "The throttle for this request in sub-requests per second.\nIt can be either `-1` to turn off throttling or any decimal number like `1.7` or `12` to throttle to that level.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index\nalias, or `_all` value targets only missing or closed indices. This\nbehavior applies even if the request targets other open indices. For\nexample, a request targeting `foo*,bar*` returns an error if an index\nstarts with foo but no index starts with `bar`.", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_defaults", + "description": "If `true`, return all default settings in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only. If\n`false`, information is retrieved from the master node.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -31092,201 +35226,249 @@ "application/json": { "schema": { "type": "object", - "properties": { - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.reindex_rethrottle.ReindexNode" - } - } - }, - "required": [ - "nodes" - ] + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexState" + } } } } } }, - "x-state": "Added in 2.4.0", - "x-api-name": "reindex_rethrottle" - } - }, - "/_render/template": { - "get": { - "tags": [ - "search" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_settings/{name}\n
\n " ], - "summary": "Render a search template", - "description": "Render a search template as a search request body.", - "operationId": "render-search-template", - "requestBody": { - "$ref": "#/components/requestBodies/render_search_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/render_search_template-200" - } - }, - "x-api-name": "render_search_template" - }, - "post": { - "tags": [ - "search" + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" ], - "summary": "Render a search template", - "description": "Render a search template as a search request body.", - "operationId": "render-search-template-1", - "requestBody": { - "$ref": "#/components/requestBodies/render_search_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/render_search_template-200" + "x-api": "get_settings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "render_search_template" + ] } }, - "/_render/template/{id}": { + "/_settings/{name}": { "get": { "tags": [ - "search" + "indices" ], - "summary": "Render a search template", - "description": "Render a search template as a search request body.", - "operationId": "render-search-template-2", + "summary": "Get index settings", + "description": "Get setting information for one or more indices.\nFor data streams, it returns setting information for the stream's backing indices.", + "operationId": "indices-get-settings-3", "parameters": [ { - "$ref": "#/components/parameters/render_search_template-id" + "in": "path", + "name": "name", + "description": "Comma-separated list or wildcard expression of settings to retrieve.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index\nalias, or `_all` value targets only missing or closed indices. This\nbehavior applies even if the request targets other open indices. For\nexample, a request targeting `foo*,bar*` returns an error if an index\nstarts with foo but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_defaults", + "description": "If `true`, return all default settings in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only. If\n`false`, information is retrieved from the master node.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/render_search_template" - }, "responses": { "200": { - "$ref": "#/components/responses/render_search_template-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexState" + } + } + } + } } }, - "x-api-name": "render_search_template" - }, - "post": { - "tags": [ - "search" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_settings/{name}\n
\n " ], - "summary": "Render a search template", - "description": "Render a search template as a search request body.", - "operationId": "render-search-template-3", - "parameters": [ - { - "$ref": "#/components/parameters/render_search_template-id" - } + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/render_search_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/render_search_template-200" + "x-api": "get_settings.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "render_search_template" + ] } }, - "/_rollup/job/{id}": { + "/_template": { "get": { "tags": [ - "rollup" + "indices" ], - "summary": "Get rollup job information", - "description": "Get the configuration, stats, and status of rollup jobs.\n\nNOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs.\nIf a job was created, ran for a while, then was deleted, the API does not return any details about it.\nFor details about a historical rollup job, the rollup capabilities API may be more useful.", - "operationId": "rollup-get-jobs", + "summary": "Get legacy index templates", + "description": "Get information about one or more index templates.\n\nIMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-template-v1.html" + }, + "operationId": "indices-get-template", "parameters": [ { - "$ref": "#/components/parameters/rollup.get_jobs-id" + "in": "query", + "name": "flat_settings", + "description": "If `true`, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/rollup.get_jobs-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.TemplateMapping" + } + } + } + } } }, "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "get_jobs", - "x-namespace": "rollup" - }, - "put": { - "tags": [ - "rollup" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_template\n
\n " ], - "summary": "Create a rollup job", - "description": "WARNING: From 8.15.0, calling this API in a cluster with no rollup usage will fail with a message about the deprecation and planned removal of rollup features. A cluster needs to contain either a rollup job or a rollup index in order for this API to be allowed to run.\n\nThe rollup job configuration contains all the details about how the job should run, when it indexes documents, and what future queries will be able to run against the rollup index.\n\nThere are three main sections to the job configuration: the logistical details about the job (for example, the cron schedule), the fields that are used for grouping, and what metrics to collect for each group.\n\nJobs are created in a `STOPPED` state. You can start them with the start rollup jobs API.", - "operationId": "rollup-put-job", - "parameters": [ + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" + ], + "x-api": "get_template.indices", + "x-category": "management", + "x-metaTags": [ { - "in": "path", - "name": "id", - "description": "Identifier for the rollup job. This can be any alphanumeric string and uniquely identifies the\ndata that is associated with the rollup job. The ID is persistent; it is stored with the rolled\nup data. If you create a job, let it run for a while, then delete the job, the data that the job\nrolled up is still be associated with this job ID. You cannot create a new job with the same ID\nsince that could lead to problems with mismatched job configurations.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" + "content": "Elasticsearch", + "name": "product_name" } + ] + } + }, + "/_migration/reindex": { + "post": { + "tags": [ + "migration" ], + "summary": "Reindex legacy backing indices", + "description": "Reindex all legacy backing indices for a data stream.\nThis operation occurs in a persistent task.\nThe persistent task ID is returned immediately and the reindexing work is completed in that task.", + "operationId": "indices-migrate-reindex", "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "cron": { - "description": "A cron string which defines the intervals when the rollup job should be executed. When the interval\ntriggers, the indexer attempts to rollup the data in the index pattern. The cron pattern is unrelated\nto the time interval of the data being rolled up. For example, you may wish to create hourly rollups\nof your document but to only run the indexer on a daily basis at midnight, as defined by the cron. The\ncron pattern is defined just like a Watcher cron schedule.", - "type": "string" - }, - "groups": { - "$ref": "#/components/schemas/rollup._types.Groupings" - }, - "index_pattern": { - "description": "The index or index pattern to roll up. Supports wildcard-style patterns (`logstash-*`). The job attempts to\nrollup the entire index or index-pattern.", - "type": "string" - }, - "metrics": { - "description": "Defines the metrics to collect for each grouping tuple. By default, only the doc_counts are collected for each\ngroup. To make rollup useful, you will often add metrics like averages, mins, maxes, etc. Metrics are defined\non a per-field basis and for each field you configure which metric should be collected.", - "type": "array", - "items": { - "$ref": "#/components/schemas/rollup._types.FieldMetric" - } - }, - "page_size": { - "description": "The number of bucket results that are processed on each iteration of the rollup indexer. A larger value tends\nto execute faster, but requires more memory during processing. This value has no effect on how the data is\nrolled up; it is merely used for tweaking the speed or memory cost of the indexer.", - "type": "number" - }, - "rollup_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "headers": { - "$ref": "#/components/schemas/_types.HttpHeaders" - } - }, - "required": [ - "cron", - "groups", - "index_pattern", - "page_size", - "rollup_index" - ] + "$ref": "#/components/schemas/indices.migrate_reindex.MigrateReindex" }, "examples": { - "CreateRollupJobRequestExample1": { - "description": "Run `PUT _rollup/job/sensor` to create a rollup job that targets the `sensor-*` index pattern. This configuration enables date histograms to be used on the `timestamp` field and terms aggregations to be used on the `node` field. This configuration defines metrics over two fields: `temperature` and `voltage`. For the `temperature` field, it collects the `min`, `max`, and `sum` of the temperature. For `voltage`, it collects the `average`.\n", - "value": "{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\": 1000,\n \"groups\": {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [ \"node\" ]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [ \"min\", \"max\", \"sum\" ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [ \"avg\" ]\n }\n ]\n}" + "IndicesMigrateReindexExample1": { + "description": "An example body for a `POST _migration/reindex` request.", + "value": "{\n \"source\": {\n \"index\": \"my-data-stream\"\n },\n \"mode\": \"upgrade\"\n}" } } } @@ -31300,39 +35482,64 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "CreateRollupJobResponseExample1": { - "value": "{\n \"acknowledged\": true\n}" - } } } } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "put_job", - "x-namespace": "rollup" - }, - "delete": { + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n POST\n /_migration/reindex\n
\n " + ], + "x-api": "migrate_reindex.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_data_stream/_migrate/{name}": { + "post": { "tags": [ - "rollup" + "data stream" ], - "summary": "Delete a rollup job", - "description": "A job must be stopped before it can be deleted.\nIf you attempt to delete a started job, an error occurs.\nSimilarly, if you attempt to delete a nonexistent job, an exception occurs.\n\nIMPORTANT: When you delete a job, you remove only the process that is actively monitoring and rolling up data.\nThe API does not delete any previously rolled up data.\nThis is by design; a user may wish to roll up a static data set.\nBecause the data set is static, after it has been fully rolled up there is no need to keep the indexing rollup job around (as there will be no new data).\nThus the job can be deleted, leaving behind the rolled up data for analysis.\nIf you wish to also remove the rollup data and the rollup index contains the data for only a single job, you can delete the whole rollup index.\nIf the rollup index stores data from several jobs, you must issue a delete-by-query that targets the rollup job's identifier in the rollup index. For example:\n\n```\nPOST my_rollup_index/_delete_by_query\n{\n \"query\": {\n \"term\": {\n \"_rollup.id\": \"the_rollup_job_id\"\n }\n }\n}\n```", - "operationId": "rollup-delete-job", + "summary": "Convert an index alias to a data stream", + "description": "Converts an index alias to a data stream.\nYou must have a matching index template that is data stream enabled.\nThe alias must meet the following criteria:\nThe alias must have a write index;\nAll indices for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos` field type;\nThe alias must not have any filters;\nThe alias must not use custom routing.\nIf successful, the request removes the alias and creates a data stream with the same name.\nThe indices for the alias become hidden backing indices for the stream.\nThe write index for the alias becomes the write index for the stream.", + "operationId": "indices-migrate-to-data-stream", "parameters": [ { "in": "path", - "name": "id", - "description": "Identifier for the job.", + "name": "name", + "description": "Name of the index alias to convert to a data stream.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { @@ -31341,119 +35548,170 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "task_failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.TaskFailure" - } - } - }, - "required": [ - "acknowledged" - ] - }, - "examples": { - "DeleteRollupJobResponseExample1": { - "description": "A successful response from `DELETE _rollup/job/sensor`.", - "value": "{\n \"acknowledged\": true\n}" - } + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "delete_job", - "x-namespace": "rollup" - } - }, - "/_rollup/job": { - "get": { - "tags": [ - "rollup" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n POST\n /_data_stream/_migrate/{name}\n
\n " ], - "summary": "Get rollup job information", - "description": "Get the configuration, stats, and status of rollup jobs.\n\nNOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs.\nIf a job was created, ran for a while, then was deleted, the API does not return any details about it.\nFor details about a historical rollup job, the rollup capabilities API may be more useful.", - "operationId": "rollup-get-jobs-1", - "responses": { - "200": { - "$ref": "#/components/responses/rollup.get_jobs-200" - } - }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "get_jobs", - "x-namespace": "rollup" - } - }, - "/_rollup/data/{id}": { - "get": { - "tags": [ - "rollup" + "x-req-auth": [ + "Index privileges: `manage`\n" ], - "summary": "Get the rollup job capabilities", - "description": "Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.\n\nThis API is useful because a rollup job is often configured to rollup only a subset of fields from the source index.\nFurthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.\nThis API enables you to inspect an index and determine:\n\n1. Does this index have associated rollup data somewhere in the cluster?\n2. If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?", - "operationId": "rollup-get-rollup-caps", - "parameters": [ + "x-api": "migrate_to_data_stream.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/rollup.get_rollup_caps-id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/rollup.get_rollup_caps-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "get_rollup_caps", - "x-namespace": "rollup" + ] } }, - "/_rollup/data": { - "get": { + "/_data_stream/_modify": { + "post": { "tags": [ - "rollup" + "data stream" ], - "summary": "Get the rollup job capabilities", - "description": "Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.\n\nThis API is useful because a rollup job is often configured to rollup only a subset of fields from the source index.\nFurthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.\nThis API enables you to inspect an index and determine:\n\n1. Does this index have associated rollup data somewhere in the cluster?\n2. If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?", - "operationId": "rollup-get-rollup-caps-1", + "summary": "Update data streams", + "description": "Performs one or more data stream modification actions in a single atomic operation.", + "operationId": "indices-modify-data-stream", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "actions": { + "description": "Actions to perform.", + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.modify_data_stream.Action" + } + } + }, + "required": [ + "actions" + ] + }, + "examples": { + "IndicesModifyDataStreamExample1": { + "description": "An example body for a `POST _data_stream/_modify` request.", + "value": "{\n \"actions\": [\n {\n \"remove_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001\"\n }\n },\n {\n \"add_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001-downsample\"\n }\n }\n ]\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/rollup.get_rollup_caps-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "get_rollup_caps", - "x-namespace": "rollup" + "x-state": "Generally available; Added in 7.16.0", + "x-variations": [ + "
\n POST\n /_data_stream/_modify\n
\n " + ], + "x-api": "modify_data_stream.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_rollup/data": { - "get": { + "/{index}/_open": { + "post": { "tags": [ - "rollup" + "indices" ], - "summary": "Get the rollup index capabilities", - "description": "Get the rollup capabilities of all jobs inside of a rollup index.\nA single rollup index may store the data for multiple rollup jobs and may have a variety of capabilities depending on those jobs. This API enables you to determine:\n\n* What jobs are stored in an index (or indices specified via a pattern)?\n* What target indices were rolled up, what fields were used in those rollups, and what aggregations can be performed on each job?", - "operationId": "rollup-get-rollup-index-caps", + "summary": "Open a closed index", + "description": "For data streams, the API opens any closed backing indices.\n\nA closed index is blocked for read/write operations and does not allow all operations that opened indices allow.\nIt is not possible to index documents or to search for documents in a closed index.\nThis allows closed indices to not have to maintain internal data structures for indexing or searching documents, resulting in a smaller overhead on the cluster.\n\nWhen opening or closing an index, the master is responsible for restarting the index shards to reflect the new state of the index.\nThe shards will then go through the normal recovery process.\nThe data of opened or closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.\n\nYou can open and close multiple indices.\nAn error is thrown if the request explicitly refers to a missing index.\nThis behavior can be turned off by using the `ignore_unavailable=true` parameter.\n\nBy default, you must explicitly name the indices you are opening or closing.\nTo open or close indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.\nThis setting can also be changed with the cluster update settings API.\n\nClosed indices consume a significant amount of disk-space which can cause problems in managed environments.\nClosing indices can be turned off with the cluster settings API by setting `cluster.indices.close.enable` to `false`.\n\nBecause opening or closing an index allocates its shards, the `wait_for_active_shards` setting on index creation applies to the `_open` and `_close` index actions as well.", + "operationId": "indices-open", "parameters": [ { "in": "path", "name": "index", - "description": "Data stream or index to check for rollup capabilities.\nWildcard (`*`) expressions are supported.", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nBy default, you must explicitly name the indices you using to limit the request.\nTo limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false.\nYou can update this setting in the `elasticsearch.yml` file or using the cluster update settings API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Ids" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], "responses": { @@ -31463,109 +35721,276 @@ "application/json": { "schema": { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/rollup.get_rollup_index_caps.IndexCapabilities" - } + "properties": { + "acknowledged": { + "type": "boolean" + }, + "shards_acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "shards_acknowledged" + ] }, "examples": { - "GetRollupIndexCapabilitiesResponseExample1": { - "description": "A successful response from `GET /sensor_rollup/_rollup/data`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.\n", - "value": "{\n \"sensor_rollup\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}" + "indicesOpenResponseExample1": { + "description": "A successful response for opening an index.", + "value": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true\n}" } } } } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "get_rollup_index_caps", - "x-namespace": "rollup" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_open\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "open.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_rollup_search": { - "get": { + "/_data_stream/_promote/{name}": { + "post": { "tags": [ - "rollup" + "data stream" ], - "summary": "Search rolled-up data", - "description": "The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\n**Searching both historical rollup and non-rollup data**\n\nThe rollup search API has the capability to search across both \"live\" non-rollup data and the aggregated rollup data.\nThis is done by simply adding the live indices to the URI. For example:\n\n```\nGET sensor-1,sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}\n```\n\nThe rollup search endpoint does two things when the search runs:\n\n* The original request is sent to the non-rollup index unaltered.\n* A rewritten version of the original request is sent to the rollup index.\n\nWhen the two responses are received, the endpoint rewrites the rollup response and merges the two together.\nDuring the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.", - "operationId": "rollup-rollup-search", + "summary": "Promote a data stream", + "description": "Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.\n\nWith CCR auto following, a data stream from a remote cluster can be replicated to the local cluster.\nThese data streams can't be rolled over in the local cluster.\nThese replicated data streams roll over only if the upstream data stream rolls over.\nIn the event that the remote cluster is no longer available, the data stream in the local cluster can be promoted to a regular data stream, which allows these data streams to be rolled over in the local cluster.\n\nNOTE: When promoting a data stream, ensure the local cluster has a data stream enabled index template that matches the data stream.\nIf this is missing, the data stream will not be able to roll over until a matching index template is created.\nThis will affect the lifecycle management of the data stream and interfere with the data stream size and retention.", + "operationId": "indices-promote-data-stream", "parameters": [ { - "$ref": "#/components/parameters/rollup.rollup_search-index" - }, - { - "$ref": "#/components/parameters/rollup.rollup_search-rest_total_hits_as_int" + "in": "path", + "name": "name", + "description": "The name of the data stream to promote", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/rollup.rollup_search-typed_keys" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/rollup.rollup_search" - }, "responses": { "200": { - "$ref": "#/components/responses/rollup.rollup_search-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "rollup_search", - "x-namespace": "rollup" - }, - "post": { + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n POST\n /_data_stream/_promote/{name}\n
\n " + ], + "x-api": "promote_data_stream.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_recovery": { + "get": { "tags": [ - "rollup" + "indices" ], - "summary": "Search rolled-up data", - "description": "The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\n**Searching both historical rollup and non-rollup data**\n\nThe rollup search API has the capability to search across both \"live\" non-rollup data and the aggregated rollup data.\nThis is done by simply adding the live indices to the URI. For example:\n\n```\nGET sensor-1,sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}\n```\n\nThe rollup search endpoint does two things when the search runs:\n\n* The original request is sent to the non-rollup index unaltered.\n* A rewritten version of the original request is sent to the rollup index.\n\nWhen the two responses are received, the endpoint rewrites the rollup response and merges the two together.\nDuring the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.", - "operationId": "rollup-rollup-search-1", + "summary": "Get index recovery information", + "description": "Get information about ongoing and completed shard recoveries for one or more indices.\nFor data streams, the API returns information for the stream's backing indices.\n\nAll recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.\n\nShard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.\nWhen a shard recovery completes, the recovered shard is available for search and indexing.\n\nRecovery automatically occurs during the following processes:\n\n* When creating an index for the first time.\n* When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path.\n* Creation of new replica shard copies from the primary.\n* Relocation of a shard copy to a different node in the same cluster.\n* A snapshot restore operation.\n* A clone, shrink, or split operation.\n\nYou can determine the cause of a shard recovery using the recovery or cat recovery APIs.\n\nThe index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster.\nIt only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist.\nThis means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.", + "operationId": "indices-recovery", "parameters": [ { - "$ref": "#/components/parameters/rollup.rollup_search-index" + "in": "query", + "name": "active_only", + "description": "If `true`, the response only includes ongoing shard recoveries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "detailed", + "description": "If `true`, the response includes detailed information about shard recoveries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rollup.rollup_search-rest_total_hits_as_int" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/rollup.rollup_search-typed_keys" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/rollup.rollup_search" - }, "responses": { "200": { - "$ref": "#/components/responses/rollup.rollup_search-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.recovery.RecoveryStatus" + } + }, + "examples": { + "indicesRecoveryResponseExample1": { + "summary": "Get segment information", + "description": "A successful response from `GET /_recovery?human`, which gets information about ongoing and completed shard recoveries for all data streams and indices in a cluster. This example includes information about a single index recovering a single shard. The source of the recovery is a snapshot repository and the target of the recovery is the `my_es_node` node. The response also includes the number and percentage of files and bytes recovered.\n", + "value": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"SNAPSHOT\",\n \"stage\" : \"INDEX\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:15:59.716\",\n \"start_time_in_millis\": 1393244159716,\n \"stop_time\" : \"0s\",\n \"stop_time_in_millis\" : 0,\n \"total_time\" : \"2.9m\",\n \"total_time_in_millis\" : 175576,\n \"source\" : {\n \"repository\" : \"my_repository\",\n \"snapshot\" : \"my_snapshot\",\n \"index\" : \"index1\",\n \"version\" : \"{version}\",\n \"restoreUUID\": \"PDh1ZAOaRbiGIVtCvZOMww\"\n },\n \"target\" : {\n \"id\" : \"ryqJ5lO5S4-lSFbGntkEkg\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"75.4mb\",\n \"total_in_bytes\" : 79063092,\n \"reused\" : \"0b\",\n \"reused_in_bytes\" : 0,\n \"recovered\" : \"65.7mb\",\n \"recovered_in_bytes\" : 68891939,\n \"recovered_from_snapshot\" : \"0b\",\n \"recovered_from_snapshot_in_bytes\" : 0,\n \"percent\" : \"87.1%\"\n },\n \"files\" : {\n \"total\" : 73,\n \"reused\" : 0,\n \"recovered\" : 69,\n \"percent\" : \"94.5%\"\n },\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 0,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n },\n \"verify_index\" : {\n \"check_index_time\" : \"0s\",\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n }\n } ]\n }\n}" + }, + "indicesRecoveryResponseExample2": { + "summary": "Get detailed recovery information", + "description": "A successful response from `GET _recovery?human&detailed=true`. The response includes a listing of any physical files recovered and their sizes. The response also includes timings in milliseconds of the various stages of recovery: index retrieval, translog replay, and index start time. This response indicates the recovery is done.\n", + "value": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"EXISTING_STORE\",\n \"stage\" : \"DONE\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:38:06.349\",\n \"start_time_in_millis\" : \"1393245486349\",\n \"stop_time\" : \"2014-02-24T12:38:08.464\",\n \"stop_time_in_millis\" : \"1393245488464\",\n \"total_time\" : \"2.1s\",\n \"total_time_in_millis\" : 2115,\n \"source\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"target\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"24.7mb\",\n \"total_in_bytes\" : 26001617,\n \"reused\" : \"24.7mb\",\n \"reused_in_bytes\" : 26001617,\n \"recovered\" : \"0b\",\n \"recovered_in_bytes\" : 0,\n \"recovered_from_snapshot\" : \"0b\",\n \"recovered_from_snapshot_in_bytes\" : 0,\n \"percent\" : \"100.0%\"\n },\n \"files\" : {\n \"total\" : 26,\n \"reused\" : 26,\n \"recovered\" : 0,\n \"percent\" : \"100.0%\",\n \"details\" : [ {\n \"name\" : \"segments.gen\",\n \"length\" : 20,\n \"recovered\" : 20\n }, {\n \"name\" : \"_0.cfs\",\n \"length\" : 135306,\n \"recovered\" : 135306,\n \"recovered_from_snapshot\": 0\n }, {\n \"name\" : \"segments_2\",\n \"length\" : 251,\n \"recovered\" : 251,\n \"recovered_from_snapshot\": 0\n }\n ]\n },\n \"total_time\" : \"2ms\",\n \"total_time_in_millis\" : 2,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 71,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"2.0s\",\n \"total_time_in_millis\" : 2025\n },\n \"verify_index\" : {\n \"check_index_time\" : 0,\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"88ms\",\n \"total_time_in_millis\" : 88\n }\n } ]\n }\n}" + } + } + } + } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "rollup_search", - "x-namespace": "rollup" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_recovery\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n" + ], + "x-api": "recovery.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_rollup/job/{id}/_start": { - "post": { + "/{index}/_recovery": { + "get": { "tags": [ - "rollup" + "indices" ], - "summary": "Start rollup jobs", - "description": "If you try to start a job that does not exist, an exception occurs.\nIf you try to start a job that is already started, nothing happens.", - "operationId": "rollup-start-job", + "summary": "Get index recovery information", + "description": "Get information about ongoing and completed shard recoveries for one or more indices.\nFor data streams, the API returns information for the stream's backing indices.\n\nAll recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.\n\nShard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.\nWhen a shard recovery completes, the recovered shard is available for search and indexing.\n\nRecovery automatically occurs during the following processes:\n\n* When creating an index for the first time.\n* When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path.\n* Creation of new replica shard copies from the primary.\n* Relocation of a shard copy to a different node in the same cluster.\n* A snapshot restore operation.\n* A clone, shrink, or split operation.\n\nYou can determine the cause of a shard recovery using the recovery or cat recovery APIs.\n\nThe index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster.\nIt only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist.\nThis means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.", + "operationId": "indices-recovery-1", "parameters": [ { "in": "path", - "name": "id", - "description": "Identifier for the rollup job.", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" + }, + { + "in": "query", + "name": "active_only", + "description": "If `true`, the response only includes ongoing shard recoveries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "detailed", + "description": "If `true`, the response includes detailed information about shard recoveries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { @@ -31575,65 +36000,76 @@ "application/json": { "schema": { "type": "object", - "properties": { - "started": { - "type": "boolean" - } - }, - "required": [ - "started" - ] + "additionalProperties": { + "$ref": "#/components/schemas/indices.recovery.RecoveryStatus" + } }, "examples": { - "StartRollupJobResponseExample1": { - "description": "A successful response from `POST _rollup/job/sensor/_start`.", - "value": "{\n \"started\": true\n}" + "indicesRecoveryResponseExample1": { + "summary": "Get segment information", + "description": "A successful response from `GET /_recovery?human`, which gets information about ongoing and completed shard recoveries for all data streams and indices in a cluster. This example includes information about a single index recovering a single shard. The source of the recovery is a snapshot repository and the target of the recovery is the `my_es_node` node. The response also includes the number and percentage of files and bytes recovered.\n", + "value": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"SNAPSHOT\",\n \"stage\" : \"INDEX\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:15:59.716\",\n \"start_time_in_millis\": 1393244159716,\n \"stop_time\" : \"0s\",\n \"stop_time_in_millis\" : 0,\n \"total_time\" : \"2.9m\",\n \"total_time_in_millis\" : 175576,\n \"source\" : {\n \"repository\" : \"my_repository\",\n \"snapshot\" : \"my_snapshot\",\n \"index\" : \"index1\",\n \"version\" : \"{version}\",\n \"restoreUUID\": \"PDh1ZAOaRbiGIVtCvZOMww\"\n },\n \"target\" : {\n \"id\" : \"ryqJ5lO5S4-lSFbGntkEkg\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"75.4mb\",\n \"total_in_bytes\" : 79063092,\n \"reused\" : \"0b\",\n \"reused_in_bytes\" : 0,\n \"recovered\" : \"65.7mb\",\n \"recovered_in_bytes\" : 68891939,\n \"recovered_from_snapshot\" : \"0b\",\n \"recovered_from_snapshot_in_bytes\" : 0,\n \"percent\" : \"87.1%\"\n },\n \"files\" : {\n \"total\" : 73,\n \"reused\" : 0,\n \"recovered\" : 69,\n \"percent\" : \"94.5%\"\n },\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 0,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n },\n \"verify_index\" : {\n \"check_index_time\" : \"0s\",\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n }\n } ]\n }\n}" + }, + "indicesRecoveryResponseExample2": { + "summary": "Get detailed recovery information", + "description": "A successful response from `GET _recovery?human&detailed=true`. The response includes a listing of any physical files recovered and their sizes. The response also includes timings in milliseconds of the various stages of recovery: index retrieval, translog replay, and index start time. This response indicates the recovery is done.\n", + "value": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"EXISTING_STORE\",\n \"stage\" : \"DONE\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:38:06.349\",\n \"start_time_in_millis\" : \"1393245486349\",\n \"stop_time\" : \"2014-02-24T12:38:08.464\",\n \"stop_time_in_millis\" : \"1393245488464\",\n \"total_time\" : \"2.1s\",\n \"total_time_in_millis\" : 2115,\n \"source\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"target\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"24.7mb\",\n \"total_in_bytes\" : 26001617,\n \"reused\" : \"24.7mb\",\n \"reused_in_bytes\" : 26001617,\n \"recovered\" : \"0b\",\n \"recovered_in_bytes\" : 0,\n \"recovered_from_snapshot\" : \"0b\",\n \"recovered_from_snapshot_in_bytes\" : 0,\n \"percent\" : \"100.0%\"\n },\n \"files\" : {\n \"total\" : 26,\n \"reused\" : 26,\n \"recovered\" : 0,\n \"percent\" : \"100.0%\",\n \"details\" : [ {\n \"name\" : \"segments.gen\",\n \"length\" : 20,\n \"recovered\" : 20\n }, {\n \"name\" : \"_0.cfs\",\n \"length\" : 135306,\n \"recovered\" : 135306,\n \"recovered_from_snapshot\": 0\n }, {\n \"name\" : \"segments_2\",\n \"length\" : 251,\n \"recovered\" : 251,\n \"recovered_from_snapshot\": 0\n }\n ]\n },\n \"total_time\" : \"2ms\",\n \"total_time_in_millis\" : 2,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 71,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"2.0s\",\n \"total_time_in_millis\" : 2025\n },\n \"verify_index\" : {\n \"check_index_time\" : 0,\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"88ms\",\n \"total_time_in_millis\" : 88\n }\n } ]\n }\n}" } } } } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "start_job", - "x-namespace": "rollup" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_recovery\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n" + ], + "x-api": "recovery.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_rollup/job/{id}/_stop": { - "post": { + "/_refresh": { + "get": { "tags": [ - "rollup" + "indices" ], - "summary": "Stop rollup jobs", - "description": "If you try to stop a job that does not exist, an exception occurs.\nIf you try to stop a job that is already stopped, nothing happens.\n\nSince only a stopped job can be deleted, it can be useful to block the API until the indexer has fully stopped.\nThis is accomplished with the `wait_for_completion` query parameter, and optionally a timeout. For example:\n\n```\nPOST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s\n```\nThe parameter blocks the API call from returning until either the job has moved to STOPPED or the specified time has elapsed.\nIf the specified time elapses without the job moving to STOPPED, a timeout exception occurs.", - "operationId": "rollup-stop-job", + "summary": "Refresh an index", + "description": "A refresh makes recent operations performed on one or more indices available for search.\nFor data streams, the API runs the refresh operation on the stream’s backing indices.\n\nBy default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.\nYou can change this default interval with the `index.refresh_interval` setting.\n\nIn Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.\n\nRefresh requests are synchronous and do not return a response until the refresh operation completes.\n\nRefreshes are resource-intensive.\nTo ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.\n\nIf your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.\nThis option ensures the indexing operation waits for a periodic refresh before running the search.", + "operationId": "indices-refresh-1", "parameters": [ { - "in": "path", - "name": "id", - "description": "Identifier for the rollup job.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "timeout", - "description": "If `wait_for_completion` is `true`, the API blocks for (at maximum) the specified duration while waiting for the job to stop.\nIf more than `timeout` time has passed, the API throws a timeout exception.\nNOTE: Even if a timeout occurs, the stop request is still processing and eventually moves the job to STOPPED.\nThe timeout simply means the API call itself timed out while waiting for the status change.", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "wait_for_completion", - "description": "If set to `true`, causes the API to block until the indexer state completely stops.\nIf set to `false`, the API returns immediately and the indexer is stopped asynchronously in the background.", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { "type": "boolean" @@ -31647,696 +36083,631 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "stopped": { - "type": "boolean" - } - }, - "required": [ - "stopped" - ] + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" } } } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "stop_job", - "x-namespace": "rollup" - } - }, - "/_scripts/painless/_execute": { - "get": { - "tags": [ - "script" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_refresh\n
\n ", + "
\n GET\n /_refresh\n
\n " ], - "summary": "Run a script", - "description": "Runs a script and returns a result.\nUse this API to build and test scripts, such as when defining a script for a runtime field.\nThis API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster.\n\nThe API uses several _contexts_, which control how scripts are run, what variables are available at runtime, and what the return type is.\n\nEach context requires a script, but additional parameters depend on the context you're using for that script.", - "operationId": "scripts-painless-execute", - "requestBody": { - "$ref": "#/components/requestBodies/scripts_painless_execute" - }, - "responses": { - "200": { - "$ref": "#/components/responses/scripts_painless_execute-200" + "x-req-auth": [ + "Index privileges: `maintenance`\n" + ], + "x-api": "refresh.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Technical preview", - "x-api-name": "scripts_painless_execute" + ] }, "post": { "tags": [ - "script" + "indices" ], - "summary": "Run a script", - "description": "Runs a script and returns a result.\nUse this API to build and test scripts, such as when defining a script for a runtime field.\nThis API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster.\n\nThe API uses several _contexts_, which control how scripts are run, what variables are available at runtime, and what the return type is.\n\nEach context requires a script, but additional parameters depend on the context you're using for that script.", - "operationId": "scripts-painless-execute-1", - "requestBody": { - "$ref": "#/components/requestBodies/scripts_painless_execute" - }, - "responses": { - "200": { - "$ref": "#/components/responses/scripts_painless_execute-200" - } - }, - "x-state": "Technical preview", - "x-api-name": "scripts_painless_execute" - } - }, - "/_search": { - "get": { - "tags": [ - "search" - ], - "summary": "Run a search", - "description": "Get search hits that match the query defined in the request.\nYou can provide search queries using the `q` query string parameter or the request body.\nIf both are specified, only the query parameter is used.\n\nIf the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.\nTo search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices.\n\n**Search slicing**\n\nWhen paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties.\nBy default the splitting is done first on the shards, then locally on each shard.\nThe local splitting partitions the shard into contiguous ranges based on Lucene document IDs.\n\nFor instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.\n\nIMPORTANT: The same point-in-time ID should be used for all slices.\nIf different PIT IDs are used, slices can overlap and miss documents.\nThis situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs" - }, - "operationId": "search", + "summary": "Refresh an index", + "description": "A refresh makes recent operations performed on one or more indices available for search.\nFor data streams, the API runs the refresh operation on the stream’s backing indices.\n\nBy default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.\nYou can change this default interval with the `index.refresh_interval` setting.\n\nIn Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.\n\nRefresh requests are synchronous and do not return a response until the refresh operation completes.\n\nRefreshes are resource-intensive.\nTo ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.\n\nIf your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.\nThis option ensures the indexing operation waits for a periodic refresh before running the search.", + "operationId": "indices-refresh", "parameters": [ { - "$ref": "#/components/parameters/search-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search-allow_partial_search_results" - }, - { - "$ref": "#/components/parameters/search-analyzer" - }, - { - "$ref": "#/components/parameters/search-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/search-batched_reduce_size" - }, - { - "$ref": "#/components/parameters/search-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/search-default_operator" - }, - { - "$ref": "#/components/parameters/search-df" - }, - { - "$ref": "#/components/parameters/search-docvalue_fields" - }, - { - "$ref": "#/components/parameters/search-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search-explain" - }, - { - "$ref": "#/components/parameters/search-ignore_throttled" - }, - { - "$ref": "#/components/parameters/search-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search-include_named_queries_score" - }, - { - "$ref": "#/components/parameters/search-lenient" - }, - { - "$ref": "#/components/parameters/search-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/search-preference" - }, - { - "$ref": "#/components/parameters/search-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/search-request_cache" - }, - { - "$ref": "#/components/parameters/search-routing" - }, - { - "$ref": "#/components/parameters/search-scroll" - }, - { - "$ref": "#/components/parameters/search-search_type" - }, - { - "$ref": "#/components/parameters/search-stats" - }, - { - "$ref": "#/components/parameters/search-stored_fields" - }, - { - "$ref": "#/components/parameters/search-suggest_field" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-suggest_mode" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-suggest_size" - }, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_refresh\n
\n ", + "
\n GET\n /_refresh\n
\n " + ], + "x-req-auth": [ + "Index privileges: `maintenance`\n" + ], + "x-api": "refresh.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/search-suggest_text" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_refresh": { + "get": { + "tags": [ + "indices" + ], + "summary": "Refresh an index", + "description": "A refresh makes recent operations performed on one or more indices available for search.\nFor data streams, the API runs the refresh operation on the stream’s backing indices.\n\nBy default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.\nYou can change this default interval with the `index.refresh_interval` setting.\n\nIn Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.\n\nRefresh requests are synchronous and do not return a response until the refresh operation completes.\n\nRefreshes are resource-intensive.\nTo ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.\n\nIf your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.\nThis option ensures the indexing operation waits for a periodic refresh before running the search.", + "operationId": "indices-refresh-3", + "parameters": [ { - "$ref": "#/components/parameters/search-terminate_after" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search-timeout" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-track_total_hits" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-track_scores" - }, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_refresh\n
\n ", + "
\n GET\n /{index}/_refresh\n
\n " + ], + "x-req-auth": [ + "Index privileges: `maintenance`\n" + ], + "x-api": "refresh.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/search-typed_keys" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "indices" + ], + "summary": "Refresh an index", + "description": "A refresh makes recent operations performed on one or more indices available for search.\nFor data streams, the API runs the refresh operation on the stream’s backing indices.\n\nBy default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.\nYou can change this default interval with the `index.refresh_interval` setting.\n\nIn Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.\n\nRefresh requests are synchronous and do not return a response until the refresh operation completes.\n\nRefreshes are resource-intensive.\nTo ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.\n\nIf your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.\nThis option ensures the indexing operation waits for a periodic refresh before running the search.", + "operationId": "indices-refresh-2", + "parameters": [ { - "$ref": "#/components/parameters/search-rest_total_hits_as_int" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search-version" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-_source" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-_source_excludes" - }, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_refresh\n
\n ", + "
\n GET\n /{index}/_refresh\n
\n " + ], + "x-req-auth": [ + "Index privileges: `maintenance`\n" + ], + "x-api": "refresh.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/search-_source_includes" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_reload_search_analyzers": { + "get": { + "tags": [ + "indices" + ], + "summary": "Reload search analyzers", + "description": "Reload an index's search analyzers and their resources.\nFor data streams, the API reloads search analyzers and resources for the stream's backing indices.\n\nIMPORTANT: After reloading the search analyzers you should clear the request cache to make sure it doesn't contain responses derived from the previous versions of the analyzer.\n\nYou can use the reload search analyzers API to pick up changes to synonym files used in the `synonym_graph` or `synonym` token filter of a search analyzer.\nTo be eligible, the token filter must have an `updateable` flag of `true` and only be used in search analyzers.\n\nNOTE: This API does not perform a reload for each shard of an index.\nInstead, it performs a reload for each node containing index shards.\nAs a result, the total shard count returned by the API can differ from the number of index shards.\nBecause reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API.\nThis ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/search-analyzer", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-reload-analyzers.html" + }, + "operationId": "indices-reload-search-analyzers", + "parameters": [ { - "$ref": "#/components/parameters/search-seq_no_primary_term" + "in": "path", + "name": "index", + "description": "A comma-separated list of index names to reload analyzers for", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search-q" + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-size" + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-from" + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-sort" + "in": "query", + "name": "resource", + "description": "Changed resource to reload analyzers from if applicable", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/search" - }, "responses": { "200": { - "$ref": "#/components/responses/search-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult" + }, + "examples": { + "ReloadSearchAnalyzersResponseExample1": { + "description": "A successful response when reloading a search analyzer of an index.", + "value": "{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n}" + } + } + } + } } }, - "x-api-name": "search" + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /{index}/_reload_search_analyzers\n
\n ", + "
\n POST\n /{index}/_reload_search_analyzers\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "reload_search_analyzers.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ - "search" + "indices" ], - "summary": "Run a search", - "description": "Get search hits that match the query defined in the request.\nYou can provide search queries using the `q` query string parameter or the request body.\nIf both are specified, only the query parameter is used.\n\nIf the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.\nTo search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices.\n\n**Search slicing**\n\nWhen paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties.\nBy default the splitting is done first on the shards, then locally on each shard.\nThe local splitting partitions the shard into contiguous ranges based on Lucene document IDs.\n\nFor instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.\n\nIMPORTANT: The same point-in-time ID should be used for all slices.\nIf different PIT IDs are used, slices can overlap and miss documents.\nThis situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.", + "summary": "Reload search analyzers", + "description": "Reload an index's search analyzers and their resources.\nFor data streams, the API reloads search analyzers and resources for the stream's backing indices.\n\nIMPORTANT: After reloading the search analyzers you should clear the request cache to make sure it doesn't contain responses derived from the previous versions of the analyzer.\n\nYou can use the reload search analyzers API to pick up changes to synonym files used in the `synonym_graph` or `synonym` token filter of a search analyzer.\nTo be eligible, the token filter must have an `updateable` flag of `true` and only be used in search analyzers.\n\nNOTE: This API does not perform a reload for each shard of an index.\nInstead, it performs a reload for each node containing index shards.\nAs a result, the total shard count returned by the API can differ from the number of index shards.\nBecause reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API.\nThis ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.", "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs" + "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/search-analyzer", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-reload-analyzers.html" }, - "operationId": "search-1", + "operationId": "indices-reload-search-analyzers-1", "parameters": [ { - "$ref": "#/components/parameters/search-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search-allow_partial_search_results" - }, - { - "$ref": "#/components/parameters/search-analyzer" - }, - { - "$ref": "#/components/parameters/search-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/search-batched_reduce_size" - }, - { - "$ref": "#/components/parameters/search-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/search-default_operator" - }, - { - "$ref": "#/components/parameters/search-df" - }, - { - "$ref": "#/components/parameters/search-docvalue_fields" - }, - { - "$ref": "#/components/parameters/search-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search-explain" - }, - { - "$ref": "#/components/parameters/search-ignore_throttled" - }, - { - "$ref": "#/components/parameters/search-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search-include_named_queries_score" - }, - { - "$ref": "#/components/parameters/search-lenient" - }, - { - "$ref": "#/components/parameters/search-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/search-preference" - }, - { - "$ref": "#/components/parameters/search-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/search-request_cache" - }, - { - "$ref": "#/components/parameters/search-routing" - }, - { - "$ref": "#/components/parameters/search-scroll" - }, - { - "$ref": "#/components/parameters/search-search_type" - }, - { - "$ref": "#/components/parameters/search-stats" - }, - { - "$ref": "#/components/parameters/search-stored_fields" - }, - { - "$ref": "#/components/parameters/search-suggest_field" - }, - { - "$ref": "#/components/parameters/search-suggest_mode" - }, - { - "$ref": "#/components/parameters/search-suggest_size" - }, - { - "$ref": "#/components/parameters/search-suggest_text" - }, - { - "$ref": "#/components/parameters/search-terminate_after" - }, - { - "$ref": "#/components/parameters/search-timeout" - }, - { - "$ref": "#/components/parameters/search-track_total_hits" - }, - { - "$ref": "#/components/parameters/search-track_scores" - }, - { - "$ref": "#/components/parameters/search-typed_keys" + "in": "path", + "name": "index", + "description": "A comma-separated list of index names to reload analyzers for", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search-rest_total_hits_as_int" + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-version" + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-_source" + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-_source_excludes" - }, + "in": "query", + "name": "resource", + "description": "Changed resource to reload analyzers from if applicable", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult" + }, + "examples": { + "ReloadSearchAnalyzersResponseExample1": { + "description": "A successful response when reloading a search analyzer of an index.", + "value": "{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /{index}/_reload_search_analyzers\n
\n ", + "
\n POST\n /{index}/_reload_search_analyzers\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "reload_search_analyzers.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/search-_source_includes" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_resolve/cluster": { + "get": { + "tags": [ + "indices" + ], + "summary": "Resolve the cluster", + "description": "Resolve the specified index expressions to return information about each cluster, including the local \"querying\" cluster, if included.\nIf no index expression is provided, the API will return information about all the remote clusters that are configured on the querying cluster.\n\nThis endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search.\n\nYou use the same index expression with this endpoint as you would for cross-cluster search.\nIndex and cluster exclusions are also supported with this endpoint.\n\nFor each cluster in the index expression, information is returned about:\n\n* Whether the querying (\"local\") cluster is currently connected to each remote cluster specified in the index expression. Note that this endpoint actively attempts to contact the remote clusters, unlike the `remote/info` endpoint.\n* Whether each remote cluster is configured with `skip_unavailable` as `true` or `false`.\n* Whether there are any indices, aliases, or data streams on that cluster that match the index expression.\n* Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index).\n* Cluster version information, including the Elasticsearch server version.\n\nFor example, `GET /_resolve/cluster/my-index-*,cluster*:my-index-*` returns information about the local cluster and all remotely configured clusters that start with the alias `cluster*`.\nEach cluster returns information about whether it has any indices, aliases or data streams that match `my-index-*`.\n\n## Note on backwards compatibility\nThe ability to query without an index expression was added in version 8.18, so when\nquerying remote clusters older than that, the local cluster will send the index\nexpression `dummy*` to those remote clusters. Thus, if an errors occur, you may see a reference\nto that index expression even though you didn't request it. If it causes a problem, you can\ninstead include an index expression like `*:*` to bypass the issue.\n\n## Advantages of using this endpoint before a cross-cluster search\n\nYou may want to exclude a cluster or index from a search when:\n\n* A remote cluster is not currently connected and is configured with `skip_unavailable=false`. Running a cross-cluster search under those conditions will cause the entire search to fail.\n* A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is `logs*,remote1:logs*` and the remote1 cluster has no indices, aliases or data streams that match `logs*`. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search.\n* The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the \"error\" field in the `_resolve/cluster` response will be present. (This is also where security/permission errors will be shown.)\n* A remote cluster is an older version that does not support the feature you want to use in your search.\n\n## Test availability of remote clusters\n\nThe `remote/info` endpoint is commonly used to test whether the \"local\" cluster (the cluster being queried) is connected to its remote clusters, but it does not necessarily reflect whether the remote cluster is available or not.\nThe remote cluster may be available, while the local cluster is not currently connected to it.\n\nYou can use the `_resolve/cluster` API to attempt to reconnect to remote clusters.\nFor example with `GET _resolve/cluster` or `GET _resolve/cluster/*:*`.\nThe `connected` field in the response will indicate whether it was successful.\nIf a connection was (re-)established, this will also cause the `remote/info` endpoint to now indicate a connected status.", + "operationId": "indices-resolve-cluster", + "parameters": [ { - "$ref": "#/components/parameters/search-seq_no_primary_term" + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing\nor closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-q" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-size" + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded, or aliased indices are ignored when frozen.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-from" + "in": "query", + "name": "ignore_unavailable", + "description": "If false, the request returns an error if it targets a missing or closed index.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-sort" + "in": "query", + "name": "timeout", + "description": "The maximum time to wait for remote clusters to respond.\nIf a remote cluster does not respond within this timeout period, the API response\nwill show the cluster as not connected and include an error message that the\nrequest timed out.\n\nThe default timeout is unset and the query can take\nas long as the networking layer is configured to wait for remote clusters that are\nnot responding (typically 30 seconds).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/search" - }, "responses": { "200": { - "$ref": "#/components/responses/search-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.resolve_cluster.ResolveClusterInfo" + } + }, + "examples": { + "ResolveClusterResponseExample1": { + "summary": "Resolve with wildcards", + "description": "A successful response from `GET /_resolve/cluster/my-index*,clust*:my-index*`. Each cluster has its own response section. The cluster you sent the request to is labelled as \"(local)\".\n", + "value": "{\n \"(local)\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_one\": {\n \"connected\": true,\n \"skip_unavailable\": true,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_two\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n }\n}" + }, + "ResolveClusterResponseExample2": { + "summary": "Identify search problems", + "description": "A successful response from `GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s`. This type of request can be used to identify potential problems with your cross-cluster search. Note also that a `timeout` of 5 seconds is sent, which sets the maximum time the query will wait for remote clusters to respond. The local cluster has no index called `not_present`. Searching with `ignore_unavailable=false` would return a \"no such index\" error. The `cluster_one` remote cluster has no indices that match the pattern `my-index*`. There may be no indices that match the pattern or the index could be closed. The `cluster_two` remote cluster is not connected (the attempt to connect failed). Since this cluster is marked as `skip_unavailable=false`, you should probably exclude this cluster from the search by adding `-cluster_two:*` to the search index expression. For `cluster_three`, the error message indicates that this remote cluster did not respond within the 5-second timeout window specified, so it is also marked as not connected. The `oldcluster` remote cluster shows that it has matching indices, but no version information is included. This indicates that the cluster version predates the introduction of the `_resolve/cluster` API, so you may want to exclude it from your cross-cluster search.\n", + "value": "{\n \"(local)\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"error\": \"no such index [not_present]\"\n },\n \"cluster_one\": {\n \"connected\": true,\n \"skip_unavailable\": true,\n \"matching_indices\": false,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_two\": {\n \"connected\": false,\n \"skip_unavailable\": false\n },\n \"cluster_three\": {\n \"connected\": false,\n \"skip_unavailable\": false,\n \"error\": \"Request timed out before receiving a response from the remote cluster\"\n },\n \"oldcluster\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true\n }\n}" + } + } + } + } } }, - "x-api-name": "search" + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n GET\n /_resolve/cluster\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "resolve_cluster.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_search": { + "/_resolve/cluster/{name}": { "get": { "tags": [ - "search" + "indices" ], - "summary": "Run a search", - "description": "Get search hits that match the query defined in the request.\nYou can provide search queries using the `q` query string parameter or the request body.\nIf both are specified, only the query parameter is used.\n\nIf the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.\nTo search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices.\n\n**Search slicing**\n\nWhen paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties.\nBy default the splitting is done first on the shards, then locally on each shard.\nThe local splitting partitions the shard into contiguous ranges based on Lucene document IDs.\n\nFor instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.\n\nIMPORTANT: The same point-in-time ID should be used for all slices.\nIf different PIT IDs are used, slices can overlap and miss documents.\nThis situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs" - }, - "operationId": "search-2", + "summary": "Resolve the cluster", + "description": "Resolve the specified index expressions to return information about each cluster, including the local \"querying\" cluster, if included.\nIf no index expression is provided, the API will return information about all the remote clusters that are configured on the querying cluster.\n\nThis endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search.\n\nYou use the same index expression with this endpoint as you would for cross-cluster search.\nIndex and cluster exclusions are also supported with this endpoint.\n\nFor each cluster in the index expression, information is returned about:\n\n* Whether the querying (\"local\") cluster is currently connected to each remote cluster specified in the index expression. Note that this endpoint actively attempts to contact the remote clusters, unlike the `remote/info` endpoint.\n* Whether each remote cluster is configured with `skip_unavailable` as `true` or `false`.\n* Whether there are any indices, aliases, or data streams on that cluster that match the index expression.\n* Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index).\n* Cluster version information, including the Elasticsearch server version.\n\nFor example, `GET /_resolve/cluster/my-index-*,cluster*:my-index-*` returns information about the local cluster and all remotely configured clusters that start with the alias `cluster*`.\nEach cluster returns information about whether it has any indices, aliases or data streams that match `my-index-*`.\n\n## Note on backwards compatibility\nThe ability to query without an index expression was added in version 8.18, so when\nquerying remote clusters older than that, the local cluster will send the index\nexpression `dummy*` to those remote clusters. Thus, if an errors occur, you may see a reference\nto that index expression even though you didn't request it. If it causes a problem, you can\ninstead include an index expression like `*:*` to bypass the issue.\n\n## Advantages of using this endpoint before a cross-cluster search\n\nYou may want to exclude a cluster or index from a search when:\n\n* A remote cluster is not currently connected and is configured with `skip_unavailable=false`. Running a cross-cluster search under those conditions will cause the entire search to fail.\n* A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is `logs*,remote1:logs*` and the remote1 cluster has no indices, aliases or data streams that match `logs*`. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search.\n* The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the \"error\" field in the `_resolve/cluster` response will be present. (This is also where security/permission errors will be shown.)\n* A remote cluster is an older version that does not support the feature you want to use in your search.\n\n## Test availability of remote clusters\n\nThe `remote/info` endpoint is commonly used to test whether the \"local\" cluster (the cluster being queried) is connected to its remote clusters, but it does not necessarily reflect whether the remote cluster is available or not.\nThe remote cluster may be available, while the local cluster is not currently connected to it.\n\nYou can use the `_resolve/cluster` API to attempt to reconnect to remote clusters.\nFor example with `GET _resolve/cluster` or `GET _resolve/cluster/*:*`.\nThe `connected` field in the response will indicate whether it was successful.\nIf a connection was (re-)established, this will also cause the `remote/info` endpoint to now indicate a connected status.", + "operationId": "indices-resolve-cluster-1", "parameters": [ { - "$ref": "#/components/parameters/search-index" + "in": "path", + "name": "name", + "description": "A comma-separated list of names or index patterns for the indices, aliases, and data streams to resolve.\nResources on remote clusters can be specified using the ``:`` syntax.\nIndex and cluster exclusions (e.g., `-cluster1:*`) are also supported.\nIf no index expression is specified, information about all remote clusters configured on the local cluster\nis returned without doing any index matching", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search-allow_no_indices" + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing\nor closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-allow_partial_search_results" - }, - { - "$ref": "#/components/parameters/search-analyzer" - }, - { - "$ref": "#/components/parameters/search-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/search-batched_reduce_size" - }, - { - "$ref": "#/components/parameters/search-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/search-default_operator" - }, - { - "$ref": "#/components/parameters/search-df" - }, - { - "$ref": "#/components/parameters/search-docvalue_fields" - }, - { - "$ref": "#/components/parameters/search-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search-explain" - }, - { - "$ref": "#/components/parameters/search-ignore_throttled" - }, - { - "$ref": "#/components/parameters/search-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search-include_named_queries_score" - }, - { - "$ref": "#/components/parameters/search-lenient" - }, - { - "$ref": "#/components/parameters/search-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/search-preference" - }, - { - "$ref": "#/components/parameters/search-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/search-request_cache" - }, - { - "$ref": "#/components/parameters/search-routing" - }, - { - "$ref": "#/components/parameters/search-scroll" - }, - { - "$ref": "#/components/parameters/search-search_type" - }, - { - "$ref": "#/components/parameters/search-stats" - }, - { - "$ref": "#/components/parameters/search-stored_fields" - }, - { - "$ref": "#/components/parameters/search-suggest_field" - }, - { - "$ref": "#/components/parameters/search-suggest_mode" - }, - { - "$ref": "#/components/parameters/search-suggest_size" - }, - { - "$ref": "#/components/parameters/search-suggest_text" - }, - { - "$ref": "#/components/parameters/search-terminate_after" - }, - { - "$ref": "#/components/parameters/search-timeout" - }, - { - "$ref": "#/components/parameters/search-track_total_hits" - }, - { - "$ref": "#/components/parameters/search-track_scores" - }, - { - "$ref": "#/components/parameters/search-typed_keys" - }, - { - "$ref": "#/components/parameters/search-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/search-version" - }, - { - "$ref": "#/components/parameters/search-_source" - }, - { - "$ref": "#/components/parameters/search-_source_excludes" - }, - { - "$ref": "#/components/parameters/search-_source_includes" - }, - { - "$ref": "#/components/parameters/search-seq_no_primary_term" - }, - { - "$ref": "#/components/parameters/search-q" - }, - { - "$ref": "#/components/parameters/search-size" - }, - { - "$ref": "#/components/parameters/search-from" - }, - { - "$ref": "#/components/parameters/search-sort" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/search" - }, - "responses": { - "200": { - "$ref": "#/components/responses/search-200" - } - }, - "x-api-name": "search" - }, - "post": { - "tags": [ - "search" - ], - "summary": "Run a search", - "description": "Get search hits that match the query defined in the request.\nYou can provide search queries using the `q` query string parameter or the request body.\nIf both are specified, only the query parameter is used.\n\nIf the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.\nTo search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices.\n\n**Search slicing**\n\nWhen paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties.\nBy default the splitting is done first on the shards, then locally on each shard.\nThe local splitting partitions the shard into contiguous ranges based on Lucene document IDs.\n\nFor instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.\n\nIMPORTANT: The same point-in-time ID should be used for all slices.\nIf different PIT IDs are used, slices can overlap and miss documents.\nThis situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs" - }, - "operationId": "search-3", - "parameters": [ - { - "$ref": "#/components/parameters/search-index" - }, - { - "$ref": "#/components/parameters/search-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search-allow_partial_search_results" - }, - { - "$ref": "#/components/parameters/search-analyzer" - }, - { - "$ref": "#/components/parameters/search-analyze_wildcard" - }, - { - "$ref": "#/components/parameters/search-batched_reduce_size" - }, - { - "$ref": "#/components/parameters/search-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/search-default_operator" - }, - { - "$ref": "#/components/parameters/search-df" - }, - { - "$ref": "#/components/parameters/search-docvalue_fields" - }, - { - "$ref": "#/components/parameters/search-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search-explain" - }, - { - "$ref": "#/components/parameters/search-ignore_throttled" - }, - { - "$ref": "#/components/parameters/search-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search-include_named_queries_score" - }, - { - "$ref": "#/components/parameters/search-lenient" - }, - { - "$ref": "#/components/parameters/search-max_concurrent_shard_requests" - }, - { - "$ref": "#/components/parameters/search-preference" - }, - { - "$ref": "#/components/parameters/search-pre_filter_shard_size" - }, - { - "$ref": "#/components/parameters/search-request_cache" - }, - { - "$ref": "#/components/parameters/search-routing" - }, - { - "$ref": "#/components/parameters/search-scroll" - }, - { - "$ref": "#/components/parameters/search-search_type" - }, - { - "$ref": "#/components/parameters/search-stats" - }, - { - "$ref": "#/components/parameters/search-stored_fields" - }, - { - "$ref": "#/components/parameters/search-suggest_field" - }, - { - "$ref": "#/components/parameters/search-suggest_mode" - }, - { - "$ref": "#/components/parameters/search-suggest_size" - }, - { - "$ref": "#/components/parameters/search-suggest_text" - }, - { - "$ref": "#/components/parameters/search-terminate_after" - }, - { - "$ref": "#/components/parameters/search-timeout" - }, - { - "$ref": "#/components/parameters/search-track_total_hits" - }, - { - "$ref": "#/components/parameters/search-track_scores" - }, - { - "$ref": "#/components/parameters/search-typed_keys" - }, - { - "$ref": "#/components/parameters/search-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/search-version" - }, - { - "$ref": "#/components/parameters/search-_source" - }, - { - "$ref": "#/components/parameters/search-_source_excludes" - }, - { - "$ref": "#/components/parameters/search-_source_includes" - }, - { - "$ref": "#/components/parameters/search-seq_no_primary_term" - }, - { - "$ref": "#/components/parameters/search-q" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-size" + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded, or aliased indices are ignored when frozen.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-from" + "in": "query", + "name": "ignore_unavailable", + "description": "If false, the request returns an error if it targets a missing or closed index.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search-sort" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/search" - }, - "responses": { - "200": { - "$ref": "#/components/responses/search-200" - } - }, - "x-api-name": "search" - } - }, - "/_application/search_application/{name}": { - "get": { - "tags": [ - "search_application" - ], - "summary": "Get search application details", - "operationId": "search-application-get", - "parameters": [ - { - "in": "path", - "name": "name", - "description": "The name of the search application", - "required": true, + "in": "query", + "name": "timeout", + "description": "The maximum time to wait for remote clusters to respond.\nIf a remote cluster does not respond within this timeout period, the API response\nwill show the cluster as not connected and include an error message that the\nrequest timed out.\n\nThe default timeout is unset and the query can take\nas long as the networking layer is configured to wait for remote clusters that are\nnot responding (typically 30 seconds).", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" } ], "responses": { @@ -32345,66 +36716,124 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/search_application._types.SearchApplication" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.resolve_cluster.ResolveClusterInfo" + } }, "examples": { - "SearchApplicationGetResponseExample1": { - "description": "A sucessful response from `GET _application/search_application/my-app/`.", - "value": "{\n \"name\": \"my-app\",\n \"indices\": [ \"index1\", \"index2\" ],\n \"updated_at_millis\": 1682105622204,\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"lang\": \"mustache\",\n \"options\": {\n \"content_type\": \"application/json;charset=utf-8\"\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n }\n }\n}" + "ResolveClusterResponseExample1": { + "summary": "Resolve with wildcards", + "description": "A successful response from `GET /_resolve/cluster/my-index*,clust*:my-index*`. Each cluster has its own response section. The cluster you sent the request to is labelled as \"(local)\".\n", + "value": "{\n \"(local)\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_one\": {\n \"connected\": true,\n \"skip_unavailable\": true,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_two\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n }\n}" + }, + "ResolveClusterResponseExample2": { + "summary": "Identify search problems", + "description": "A successful response from `GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s`. This type of request can be used to identify potential problems with your cross-cluster search. Note also that a `timeout` of 5 seconds is sent, which sets the maximum time the query will wait for remote clusters to respond. The local cluster has no index called `not_present`. Searching with `ignore_unavailable=false` would return a \"no such index\" error. The `cluster_one` remote cluster has no indices that match the pattern `my-index*`. There may be no indices that match the pattern or the index could be closed. The `cluster_two` remote cluster is not connected (the attempt to connect failed). Since this cluster is marked as `skip_unavailable=false`, you should probably exclude this cluster from the search by adding `-cluster_two:*` to the search index expression. For `cluster_three`, the error message indicates that this remote cluster did not respond within the 5-second timeout window specified, so it is also marked as not connected. The `oldcluster` remote cluster shows that it has matching indices, but no version information is included. This indicates that the cluster version predates the introduction of the `_resolve/cluster` API, so you may want to exclude it from your cross-cluster search.\n", + "value": "{\n \"(local)\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"error\": \"no such index [not_present]\"\n },\n \"cluster_one\": {\n \"connected\": true,\n \"skip_unavailable\": true,\n \"matching_indices\": false,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_two\": {\n \"connected\": false,\n \"skip_unavailable\": false\n },\n \"cluster_three\": {\n \"connected\": false,\n \"skip_unavailable\": false,\n \"error\": \"Request timed out before receiving a response from the remote cluster\"\n },\n \"oldcluster\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true\n }\n}" } } } } } }, - "x-beta": true, - "x-api-name" : "get", - "x-namespace": "search_application" - }, - "put": { + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n GET\n /_resolve/cluster/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "resolve_cluster.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_resolve/index/{name}": { + "get": { "tags": [ - "search_application" + "indices" ], - "summary": "Create or update a search application", - "operationId": "search-application-put", + "summary": "Resolve indices", + "description": "Resolve the names and/or index patterns for indices, aliases, and data streams.\nMultiple patterns and remote clusters are supported.", + "operationId": "indices-resolve-index", "parameters": [ { "in": "path", "name": "name", - "description": "The name of the search application to be created or updated.", + "description": "Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.\nResources on remote clusters can be specified using the ``:`` syntax.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" }, { "in": "query", - "name": "create", - "description": "If `true`, this request cannot replace or update existing Search Applications.", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" + }, + { + "in": "query", + "name": "mode", + "description": "Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexMode" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.IndexMode" + } + } + ] + }, + "x-state": "Generally available; Added in 9.2.0", + "style": "form" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/search_application._types.SearchApplicationParameters" - }, - "examples": { - "SearchApplicationPutRequestExample1": { - "description": "Run `PUT _application/search_application/my-app` to create or update a search application called `my-app`. When the dictionary parameter is specified, the search application search API will perform the following parameter validation: it accepts only the `query_string` and `default_field` parameters; it verifies that `query_string` and `default_field` are both strings; it accepts `default_field` only if it takes the values title or description. If the parameters are not valid, the search application search API will return an error.\n", - "value": "{\n \"indices\": [ \"index1\", \"index2\" ],\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \"type\": \"string\"\n },\n \"default_field\": {\n \"type\": \"string\",\n \"enum\": [\n \"title\",\n \"description\"\n ]\n },\n \"additionalProperties\": false\n },\n \"required\": [\n \"query_string\"\n ]\n }\n }\n}" - } + "type": "object" } } - }, - "required": true + } }, "responses": { "200": { @@ -32414,213 +36843,138 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexItem" + } + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexAliasItem" + } + }, + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexDataStreamsItem" + } } }, "required": [ - "result" + "indices", + "aliases", + "data_streams" ] + }, + "examples": { + "ResolveIndexResponseExample1": { + "description": "A successful response from `GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all`.", + "value": "{\n \"indices\": [\n {\n \"name\": \"foo_closed\",\n \"attributes\": [\n \"closed\"\n ],\n \"mode\": \"standard\"\n },\n {\n \"name\": \"freeze-index\",\n \"aliases\": [\n \"f-alias\"\n ],\n \"attributes\": [\n \"open\"\n ]\n },\n {\n \"name\": \"remoteCluster1:bar-01\",\n \"attributes\": [\n \"open\"\n ]\n }\n ],\n \"aliases\": [\n {\n \"name\": \"f-alias\",\n \"indices\": [\n \"freeze-index\",\n \"my-index-000001\"\n ]\n }\n ],\n \"data_streams\": [\n {\n \"name\": \"foo\",\n \"backing_indices\": [\n \".ds-foo-2099.03.07-000001\"\n ],\n \"timestamp_field\": \"@timestamp\"\n }\n ]\n}" + } } } } } }, - "x-beta": true, - "x-api-name" : "put", - "x-namespace": "search_application" - }, - "delete": { - "tags": [ - "search_application" - ], - "summary": "Delete a search application", - "description": "Remove a search application and its associated alias. Indices attached to the search application are not removed.", - "operationId": "search-application-delete", - "parameters": [ - { - "in": "path", - "name": "name", - "description": "The name of the search application to delete.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - } + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_resolve/index/{name}\n
\n ", + "
\n POST\n /_resolve/index/{name}\n
\n " ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-beta": true, - "x-api-name" : "delete", - "x-namespace": "search_application" - } - }, - "/_application/analytics/{name}": { - "get": { - "tags": [ - "analytics" + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" ], - "summary": "Get behavioral analytics collections", - "operationId": "search-application-get-behavioral-analytics-1", - "parameters": [ + "x-api": "resolve_index.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/search_application.get_behavioral_analytics-name" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/search_application.get_behavioral_analytics-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "get_behavioral_analytics", - "x-namespace": "search_application" + ] }, - "put": { + "post": { "tags": [ - "analytics" + "indices" ], - "summary": "Create a behavioral analytics collection", - "operationId": "search-application-put-behavioral-analytics", + "summary": "Resolve indices", + "description": "Resolve the names and/or index patterns for indices, aliases, and data streams.\nMultiple patterns and remote clusters are supported.", + "operationId": "indices-resolve-index-1", "parameters": [ { "in": "path", "name": "name", - "description": "The name of the analytics collection to be created or updated.", + "description": "Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.\nResources on remote clusters can be specified using the ``:`` syntax.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Names" }, "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/search_application.put_behavioral_analytics.AnalyticsAcknowledgeResponseBase" - } - } - } - } - }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "put_behavioral_analytics", - "x-namespace": "search_application" - }, - "delete": { - "tags": [ - "analytics" - ], - "summary": "Delete a behavioral analytics collection", - "description": "The associated data stream is also deleted.", - "operationId": "search-application-delete-behavioral-analytics", - "parameters": [ + }, { - "in": "path", - "name": "name", - "description": "The name of the analytics collection to be deleted", - "required": true, + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "delete_behavioral_analytics", - "x-namespace": "search_application" - } - }, - "/_application/analytics": { - "get": { - "tags": [ - "analytics" - ], - "summary": "Get behavioral analytics collections", - "operationId": "search-application-get-behavioral-analytics", - "responses": { - "200": { - "$ref": "#/components/responses/search_application.get_behavioral_analytics-200" - } - }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "get_behavioral_analytics", - "x-namespace": "search_application" - } - }, - "/_application/search_application": { - "get": { - "tags": [ - "search_application" - ], - "summary": "Get search applications", - "description": "Get information about search applications.", - "operationId": "search-application-list", - "parameters": [ + "style": "form" + }, { "in": "query", - "name": "q", - "description": "Query in the Lucene query string syntax.", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "type": "string" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "from", - "description": "Starting offset.", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "size", - "description": "Specifies a max number of results to get.", + "name": "mode", + "description": "Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.", "deprecated": false, "schema": { - "type": "number" + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexMode" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.IndexMode" + } + } + ] }, + "x-state": "Generally available; Added in 9.2.0", "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, "responses": { "200": { "description": "", @@ -32629,73 +36983,123 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "number" + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexItem" + } }, - "results": { + "aliases": { "type": "array", "items": { - "$ref": "#/components/schemas/search_application._types.SearchApplication" + "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexAliasItem" + } + }, + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.resolve_index.ResolveIndexDataStreamsItem" } } }, "required": [ - "count", - "results" + "indices", + "aliases", + "data_streams" ] }, "examples": { - "SearchApplicationsListResponseExample1": { - "description": "A succesful response from `GET _application/search_application?from=0&size=3&q=app*` returns the first three search applications whose names start with `app`.", - "value": "{\n \"count\": 2,\n \"results\": [\n {\n \"name\": \"app-1\",\n \"updated_at_millis\": 1690981129366\n },\n {\n \"name\": \"app-2\",\n \"updated_at_millis\": 1691501823939\n }\n ]\n}" + "ResolveIndexResponseExample1": { + "description": "A successful response from `GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all`.", + "value": "{\n \"indices\": [\n {\n \"name\": \"foo_closed\",\n \"attributes\": [\n \"closed\"\n ],\n \"mode\": \"standard\"\n },\n {\n \"name\": \"freeze-index\",\n \"aliases\": [\n \"f-alias\"\n ],\n \"attributes\": [\n \"open\"\n ]\n },\n {\n \"name\": \"remoteCluster1:bar-01\",\n \"attributes\": [\n \"open\"\n ]\n }\n ],\n \"aliases\": [\n {\n \"name\": \"f-alias\",\n \"indices\": [\n \"freeze-index\",\n \"my-index-000001\"\n ]\n }\n ],\n \"data_streams\": [\n {\n \"name\": \"foo\",\n \"backing_indices\": [\n \".ds-foo-2099.03.07-000001\"\n ],\n \"timestamp_field\": \"@timestamp\"\n }\n ]\n}" } } } } } }, - "x-beta": true, - "x-api-name" : "list", - "x-namespace": "search_application" + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n GET\n /_resolve/index/{name}\n
\n ", + "
\n POST\n /_resolve/index/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "resolve_index.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_application/analytics/{collection_name}/event/{event_type}": { + "/{alias}/_rollover": { "post": { "tags": [ - "analytics" + "indices" ], - "summary": "Create a behavioral analytics collection event", - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/behavioral-analytics-event-reference.html" - }, - "operationId": "search-application-post-behavioral-analytics-event", + "summary": "Roll over to a new index", + "description": "TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.\n\nThe rollover API creates a new index for a data stream or index alias.\nThe API behavior depends on the rollover target.\n\n**Roll over a data stream**\n\nIf you roll over a data stream, the API creates a new write index for the stream.\nThe stream's previous write index becomes a regular backing index.\nA rollover also increments the data stream's generation.\n\n**Roll over an index alias with a write index**\n\nTIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.\nData streams replace this functionality, require less maintenance, and automatically integrate with data tiers.\n\nIf an index alias points to multiple indices, one of the indices must be a write index.\nThe rollover API creates a new write index for the alias with `is_write_index` set to `true`.\nThe API also `sets is_write_index` to `false` for the previous write index.\n\n**Roll over an index alias with one index**\n\nIf you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.\n\nNOTE: A rollover creates a new index and is subject to the `wait_for_active_shards` setting.\n\n**Increment index names for an alias**\n\nWhen you roll over an index alias, you can specify a name for the new index.\nIf you don't specify a name and the current index ends with `-` and a number, such as `my-index-000001` or `my-index-3`, the new index name increments that number.\nFor example, if you roll over an alias with a current index of `my-index-000001`, the rollover creates a new index named `my-index-000002`.\nThis number is always six characters and zero-padded, regardless of the previous index's name.\n\nIf you use an index alias for time series data, you can use date math in the index name to track the rollover date.\nFor example, you can create an alias that points to an index named ``.\nIf you create the index on May 6, 2099, the index's name is `my-index-2099.05.06-000001`.\nIf you roll over the alias on May 7, 2099, the new index's name is `my-index-2099.05.07-000002`.", + "operationId": "indices-rollover", "parameters": [ { "in": "path", - "name": "collection_name", - "description": "The name of the behavioral analytics collection.", + "name": "alias", + "description": "Name of the data stream or index alias to roll over.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.IndexAlias" }, "style": "simple" }, { - "in": "path", - "name": "event_type", - "description": "The analytics event type.", - "required": true, + "in": "query", + "name": "dry_run", + "description": "If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/search_application._types.EventType" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "debug", - "description": "Whether the response type has to include more details", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" + }, + { + "in": "query", + "name": "lazy", + "description": "If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write.\nOnly allowed on data streams.", "deprecated": false, "schema": { "type": "boolean" @@ -32707,17 +37111,54 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "aliases": { + "description": "Aliases for the target index.\nData streams do not support this parameter.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "conditions": { + "description": "Conditions for the rollover.\nIf specified, Elasticsearch only performs the rollover if the current index satisfies these conditions.\nIf this parameter is not specified, Elasticsearch performs the rollover unconditionally.\nIf conditions are specified, at least one of them must be a `max_*` condition.\nThe index will rollover if any `max_*` condition is satisfied and all `min_*` conditions are satisfied.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.rollover.RolloverConditions" + } + ] + }, + "mappings": { + "description": "Mapping for fields in the index.\nIf specified, this mapping can include field names, field data types, and mapping paramaters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "settings": { + "description": "Configuration options for the index.\nData streams do not support this parameter.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } }, "examples": { - "BehavioralAnalyticsEventPostRequestExample1": { - "description": "Run `POST _application/analytics/my_analytics_collection/event/search_click` to send a `search_click` event to an analytics collection called `my_analytics_collection`.", - "value": "{\n \"session\": {\n \"id\": \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"\n },\n \"user\": {\n \"id\": \"5f26f01a-bbee-4202-9298-81261067abbd\"\n },\n \"search\":{\n \"query\": \"search term\",\n \"results\": {\n \"items\": [\n {\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n ],\n \"total_results\": 10\n },\n \"sort\": {\n \"name\": \"relevance\"\n },\n \"search_application\": \"website\"\n },\n \"document\":{\n \"id\": \"123\",\n \"index\": \"products\"\n }\n}" + "indicesRolloverRequestExample1": { + "summary": "Stack request", + "description": "Create a new index for a data stream", + "value": "{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n }\n}" + }, + "indicesRolloverRequestExample2": { + "summary": "Serverless request", + "description": "Create a new index for a data stream", + "value": "{}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -32727,46 +37168,148 @@ "schema": { "type": "object", "properties": { - "accepted": { + "acknowledged": { "type": "boolean" }, - "event": { - "type": "object" + "conditions": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "dry_run": { + "type": "boolean" + }, + "new_index": { + "type": "string" + }, + "old_index": { + "type": "string" + }, + "rolled_over": { + "type": "boolean" + }, + "shards_acknowledged": { + "type": "boolean" } }, "required": [ - "accepted" + "acknowledged", + "conditions", + "dry_run", + "new_index", + "old_index", + "rolled_over", + "shards_acknowledged" ] + }, + "examples": { + "indicesRolloverResponseExample1": { + "description": "An abbreviated response from `GET /_segments`.\n", + "value": "{\n \"_shards\": {},\n \"indices\": {\n \"test\": {\n \"shards\": {\n \"0\": [\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"zDC_RorJQCao9xf9pg3Fvw\"\n },\n \"num_committed_segments\": 0,\n \"num_search_segments\": 1,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 1,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 3800,\n \"committed\": false,\n \"search\": true,\n \"version\": \"7.0.0\",\n \"compound\": true,\n \"attributes\": {}\n }\n }\n }\n ]\n }\n }\n }\n}" + } } } } } }, - "deprecated": true, - "x-state": "Technical preview", - "x-api-name" : "post_behavioral_analytics_event", - "x-namespace": "search_application" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n POST\n /{alias}/_rollover\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "rollover.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_application/search_application/{name}/_render_query": { + "/{alias}/_rollover/{new_index}": { "post": { "tags": [ - "search_application" + "indices" ], - "summary": "Render a search application query", - "description": "Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified.\nIf a parameter used in the search template is not specified in `params`, the parameter's default value will be used.\nThe API returns the specific Elasticsearch query that would be generated and run by calling the search application search API.\n\nYou must have `read` privileges on the backing alias of the search application.", - "operationId": "search-application-render-query", + "summary": "Roll over to a new index", + "description": "TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.\n\nThe rollover API creates a new index for a data stream or index alias.\nThe API behavior depends on the rollover target.\n\n**Roll over a data stream**\n\nIf you roll over a data stream, the API creates a new write index for the stream.\nThe stream's previous write index becomes a regular backing index.\nA rollover also increments the data stream's generation.\n\n**Roll over an index alias with a write index**\n\nTIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.\nData streams replace this functionality, require less maintenance, and automatically integrate with data tiers.\n\nIf an index alias points to multiple indices, one of the indices must be a write index.\nThe rollover API creates a new write index for the alias with `is_write_index` set to `true`.\nThe API also `sets is_write_index` to `false` for the previous write index.\n\n**Roll over an index alias with one index**\n\nIf you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.\n\nNOTE: A rollover creates a new index and is subject to the `wait_for_active_shards` setting.\n\n**Increment index names for an alias**\n\nWhen you roll over an index alias, you can specify a name for the new index.\nIf you don't specify a name and the current index ends with `-` and a number, such as `my-index-000001` or `my-index-3`, the new index name increments that number.\nFor example, if you roll over an alias with a current index of `my-index-000001`, the rollover creates a new index named `my-index-000002`.\nThis number is always six characters and zero-padded, regardless of the previous index's name.\n\nIf you use an index alias for time series data, you can use date math in the index name to track the rollover date.\nFor example, you can create an alias that points to an index named ``.\nIf you create the index on May 6, 2099, the index's name is `my-index-2099.05.06-000001`.\nIf you roll over the alias on May 7, 2099, the new index's name is `my-index-2099.05.07-000002`.", + "operationId": "indices-rollover-1", "parameters": [ { "in": "path", - "name": "name", - "description": "The name of the search application to render teh query for.", + "name": "alias", + "description": "Name of the data stream or index alias to roll over.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.IndexAlias" + }, + "style": "simple" + }, + { + "in": "path", + "name": "new_index", + "description": "Name of the index to create.\nSupports date math.\nData streams do not support this parameter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" + }, + { + "in": "query", + "name": "dry_run", + "description": "If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" + }, + { + "in": "query", + "name": "lazy", + "description": "If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write.\nOnly allowed on data streams.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { @@ -32775,7 +37318,31 @@ "schema": { "type": "object", "properties": { - "params": { + "aliases": { + "description": "Aliases for the target index.\nData streams do not support this parameter.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "conditions": { + "description": "Conditions for the rollover.\nIf specified, Elasticsearch only performs the rollover if the current index satisfies these conditions.\nIf this parameter is not specified, Elasticsearch performs the rollover unconditionally.\nIf conditions are specified, at least one of them must be a `max_*` condition.\nThe index will rollover if any `max_*` condition is satisfied and all `min_*` conditions are satisfied.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.rollover.RolloverConditions" + } + ] + }, + "mappings": { + "description": "Mapping for fields in the index.\nIf specified, this mapping can include field names, field data types, and mapping paramaters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "settings": { + "description": "Configuration options for the index.\nData streams do not support this parameter.", "type": "object", "additionalProperties": { "type": "object" @@ -32784,9 +37351,15 @@ } }, "examples": { - "SearchApplicationsRenderQueryRequestExample1": { - "description": "Run `POST _application/search_application/my-app/_render_query` to generate a query for a search application called `my-app` that uses the search template.", - "value": "{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n }\n}" + "indicesRolloverRequestExample1": { + "summary": "Stack request", + "description": "Create a new index for a data stream", + "value": "{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n }\n}" + }, + "indicesRolloverRequestExample2": { + "summary": "Serverless request", + "description": "Create a new index for a data stream", + "value": "{}" } } } @@ -32798,746 +37371,1102 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "conditions": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "dry_run": { + "type": "boolean" + }, + "new_index": { + "type": "string" + }, + "old_index": { + "type": "string" + }, + "rolled_over": { + "type": "boolean" + }, + "shards_acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "conditions", + "dry_run", + "new_index", + "old_index", + "rolled_over", + "shards_acknowledged" + ] }, "examples": { - "SearchApplicationsRenderQueryResponseExample1": { - "description": "A successful response for generating a query for a search application. The `from`, `size`, and `explain` parameters were not specified in the request, so the default values specified in the search template are used.", - "value": "{\n \"from\": 0,\n \"size\": 10,\n \"query\": {\n \"multi_match\": {\n \"query\": \"my first query\",\n \"fields\": [\n \"description^1.0\",\n \"title^5.0\"\n ]\n }\n },\n \"explain\": false\n}" + "indicesRolloverResponseExample1": { + "description": "An abbreviated response from `GET /_segments`.\n", + "value": "{\n \"_shards\": {},\n \"indices\": {\n \"test\": {\n \"shards\": {\n \"0\": [\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"zDC_RorJQCao9xf9pg3Fvw\"\n },\n \"num_committed_segments\": 0,\n \"num_search_segments\": 1,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 1,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 3800,\n \"committed\": false,\n \"search\": true,\n \"version\": \"7.0.0\",\n \"compound\": true,\n \"attributes\": {}\n }\n }\n }\n ]\n }\n }\n }\n}" } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "render_query", - "x-namespace": "search_application" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n POST\n /{alias}/_rollover/{new_index}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "rollover.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_application/search_application/{name}/_search": { + "/_segments": { "get": { "tags": [ - "search_application" + "indices" ], - "summary": "Run a search application search", - "description": "Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template.\nUnspecified template parameters are assigned their default values if applicable.", - "operationId": "search-application-search", + "summary": "Get index segments", + "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the stream's backing indices.", + "operationId": "indices-segments", "parameters": [ { - "$ref": "#/components/parameters/search_application.search-name" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_application.search-typed_keys" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/search_application.search" - }, "responses": { "200": { - "$ref": "#/components/responses/search_application.search-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.segments.IndexSegment" + } + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + } + }, + "required": [ + "indices", + "_shards" + ] + }, + "examples": { + "indicesSegmentsResponseExample1": { + "description": "A response describing information about index segments.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"successful\": 2,\n \"failed\": 0\n },\n \"indices\": {\n \"kibana_sample_data_ecommerce\": {\n \"shards\": {\n \"0\": [\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": false,\n \"node\": \"zZg9NuPhQPKO3LMRkMo2iw\"\n },\n \"num_committed_segments\": 4,\n \"num_search_segments\": 4,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 500,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 524718,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_1\": {\n \"generation\": 1,\n \"num_docs\": 500,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 526100,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_2\": {\n \"generation\": 2,\n \"num_docs\": 2000,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1846181,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_3\": {\n \"generation\": 3,\n \"num_docs\": 1675,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1572960,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n }\n }\n },\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"sp27SQiNTQWKpBKoRcnfQQ\"\n },\n \"num_committed_segments\": 5,\n \"num_search_segments\": 5,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 187,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 227245,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_1\": {\n \"generation\": 1,\n \"num_docs\": 253,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 297549,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_2\": {\n \"generation\": 2,\n \"num_docs\": 560,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 580918,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_3\": {\n \"generation\": 3,\n \"num_docs\": 1603,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1506385,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_4\": {\n \"generation\": 4,\n \"num_docs\": 2072,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1913051,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}" + } + } + } + } } }, - "x-beta": true, - "x-api-name" : "search", - "x-namespace": "search_application" - }, - "post": { - "tags": [ - "search_application" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_segments\n
\n " ], - "summary": "Run a search application search", - "description": "Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template.\nUnspecified template parameters are assigned their default values if applicable.", - "operationId": "search-application-search-1", - "parameters": [ - { - "$ref": "#/components/parameters/search_application.search-name" - }, - { - "$ref": "#/components/parameters/search_application.search-typed_keys" - } + "x-req-auth": [ + "Index privileges: `monitor`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/search_application.search" - }, - "responses": { - "200": { - "$ref": "#/components/responses/search_application.search-200" + "x-api": "segments.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-beta": true, - "x-api-name" : "search", - "x-namespace": "search_application" + ] } }, - "/{index}/_mvt/{field}/{zoom}/{x}/{y}": { + "/{index}/_segments": { "get": { "tags": [ - "search" + "indices" ], - "summary": "Search a vector tile", - "description": "Search a vector tile for geospatial values.\nBefore using this API, you should be familiar with the Mapbox vector tile specification.\nThe API returns results as a binary mapbox vector tile.\n\nInternally, Elasticsearch translates a vector tile search API request into a search containing:\n\n* A `geo_bounding_box` query on the ``. The query uses the `//` tile as a bounding box.\n* A `geotile_grid` or `geohex_grid` aggregation on the ``. The `grid_agg` parameter determines the aggregation type. The aggregation uses the `//` tile as a bounding box.\n* Optionally, a `geo_bounds` aggregation on the ``. The search only includes this aggregation if the `exact_bounds` parameter is `true`.\n* If the optional parameter `with_labels` is `true`, the internal search will include a dynamic runtime field that calls the `getLabelPosition` function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label.\n\nFor example, Elasticsearch may translate a vector tile search API request with a `grid_agg` argument of `geotile` and an `exact_bounds` argument of `true` into the following search\n\n```\nGET my-index/_search\n{\n \"size\": 10000,\n \"query\": {\n \"geo_bounding_box\": {\n \"my-geo-field\": {\n \"top_left\": {\n \"lat\": -40.979898069620134,\n \"lon\": -45\n },\n \"bottom_right\": {\n \"lat\": -66.51326044311186,\n \"lon\": 0\n }\n }\n }\n },\n \"aggregations\": {\n \"grid\": {\n \"geotile_grid\": {\n \"field\": \"my-geo-field\",\n \"precision\": 11,\n \"size\": 65536,\n \"bounds\": {\n \"top_left\": {\n \"lat\": -40.979898069620134,\n \"lon\": -45\n },\n \"bottom_right\": {\n \"lat\": -66.51326044311186,\n \"lon\": 0\n }\n }\n }\n },\n \"bounds\": {\n \"geo_bounds\": {\n \"field\": \"my-geo-field\",\n \"wrap_longitude\": false\n }\n }\n }\n}\n```\n\nThe API returns results as a binary Mapbox vector tile.\nMapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers:\n\n* A `hits` layer containing a feature for each `` value matching the `geo_bounding_box` query.\n* An `aggs` layer containing a feature for each cell of the `geotile_grid` or `geohex_grid`. The layer only contains features for cells with matching data.\n* A meta layer containing:\n * A feature containing a bounding box. By default, this is the bounding box of the tile.\n * Value ranges for any sub-aggregations on the `geotile_grid` or `geohex_grid`.\n * Metadata for the search.\n\nThe API only returns features that can display at its zoom level.\nFor example, if a polygon feature has no area at its zoom level, the API omits it.\nThe API returns errors as UTF-8 encoded JSON.\n\nIMPORTANT: You can specify several options for this API as either a query parameter or request body parameter.\nIf you specify both parameters, the query parameter takes precedence.\n\n**Grid precision for geotile**\n\nFor a `grid_agg` of `geotile`, you can use cells in the `aggs` layer as tiles for lower zoom levels.\n`grid_precision` represents the additional zoom levels available through these cells. The final precision is computed by as follows: ` + grid_precision`.\nFor example, if `` is 7 and `grid_precision` is 8, then the `geotile_grid` aggregation will use a precision of 15.\nThe maximum final precision is 29.\nThe `grid_precision` also determines the number of cells for the grid as follows: `(2^grid_precision) x (2^grid_precision)`.\nFor example, a value of 8 divides the tile into a grid of 256 x 256 cells.\nThe `aggs` layer only contains features for cells with matching data.\n\n**Grid precision for geohex**\n\nFor a `grid_agg` of `geohex`, Elasticsearch uses `` and `grid_precision` to calculate a final precision as follows: ` + grid_precision`.\n\nThis precision determines the H3 resolution of the hexagonal cells produced by the `geohex` aggregation.\nThe following table maps the H3 resolution for each precision.\nFor example, if `` is 3 and `grid_precision` is 3, the precision is 6.\nAt a precision of 6, hexagonal cells have an H3 resolution of 2.\nIf `` is 3 and `grid_precision` is 4, the precision is 7.\nAt a precision of 7, hexagonal cells have an H3 resolution of 3.\n\n| Precision | Unique tile bins | H3 resolution | Unique hex bins |\tRatio |\n| --------- | ---------------- | ------------- | ----------------| ----- |\n| 1 | 4 | 0 | 122 | 30.5 |\n| 2 | 16 | 0 | 122 | 7.625 |\n| 3 | 64 | 1 | 842 | 13.15625 |\n| 4 | 256 | 1 | 842 | 3.2890625 |\n| 5 | 1024 | 2 | 5882 | 5.744140625 |\n| 6 | 4096 | 2 | 5882 | 1.436035156 |\n| 7 | 16384 | 3 | 41162 | 2.512329102 |\n| 8 | 65536 | 3 | 41162 | 0.6280822754 |\n| 9 | 262144 | 4 | 288122 | 1.099098206 |\n| 10 | 1048576 | 4 | 288122 | 0.2747745514 |\n| 11 | 4194304 | 5 | 2016842 | 0.4808526039 |\n| 12 | 16777216 | 6 | 14117882 | 0.8414913416 |\n| 13 | 67108864 | 6 | 14117882 | 0.2103728354 |\n| 14 | 268435456 | 7 | 98825162 | 0.3681524172 |\n| 15 | 1073741824 | 8 | 691776122 | 0.644266719 |\n| 16 | 4294967296 | 8 | 691776122 | 0.1610666797 |\n| 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 |\n| 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 |\n| 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 |\n| 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 |\n| 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 |\n| 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 |\n| 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 |\n| 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 |\n| 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 |\n| 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 |\n| 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 |\n| 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 |\n| 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 |\n\nHexagonal cells don't align perfectly on a vector tile.\nSome cells may intersect more than one vector tile.\nTo compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level.\nElasticsearch uses the H3 resolution that is closest to the corresponding geotile density.", - "externalDocs": { - "url": "https://github.com/mapbox/vector-tile-spec/blob/master/README.md" - }, - "operationId": "search-mvt-1", + "summary": "Get index segments", + "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the stream's backing indices.", + "operationId": "indices-segments-1", "parameters": [ { - "$ref": "#/components/parameters/search_mvt-index" - }, - { - "$ref": "#/components/parameters/search_mvt-field" - }, - { - "$ref": "#/components/parameters/search_mvt-zoom" - }, - { - "$ref": "#/components/parameters/search_mvt-x" - }, - { - "$ref": "#/components/parameters/search_mvt-y" - }, - { - "$ref": "#/components/parameters/search_mvt-exact_bounds" - }, - { - "$ref": "#/components/parameters/search_mvt-extent" - }, - { - "$ref": "#/components/parameters/search_mvt-grid_agg" - }, - { - "$ref": "#/components/parameters/search_mvt-grid_precision" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search_mvt-grid_type" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_mvt-size" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_mvt-with_labels" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "$ref": "#/components/requestBodies/search_mvt" - }, "responses": { "200": { - "$ref": "#/components/responses/search_mvt-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.segments.IndexSegment" + } + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + } + }, + "required": [ + "indices", + "_shards" + ] + }, + "examples": { + "indicesSegmentsResponseExample1": { + "description": "A response describing information about index segments.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"successful\": 2,\n \"failed\": 0\n },\n \"indices\": {\n \"kibana_sample_data_ecommerce\": {\n \"shards\": {\n \"0\": [\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": false,\n \"node\": \"zZg9NuPhQPKO3LMRkMo2iw\"\n },\n \"num_committed_segments\": 4,\n \"num_search_segments\": 4,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 500,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 524718,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_1\": {\n \"generation\": 1,\n \"num_docs\": 500,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 526100,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_2\": {\n \"generation\": 2,\n \"num_docs\": 2000,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1846181,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_3\": {\n \"generation\": 3,\n \"num_docs\": 1675,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1572960,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n }\n }\n },\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"sp27SQiNTQWKpBKoRcnfQQ\"\n },\n \"num_committed_segments\": 5,\n \"num_search_segments\": 5,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 187,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 227245,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_1\": {\n \"generation\": 1,\n \"num_docs\": 253,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 297549,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_2\": {\n \"generation\": 2,\n \"num_docs\": 560,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 580918,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_3\": {\n \"generation\": 3,\n \"num_docs\": 1603,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1506385,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_4\": {\n \"generation\": 4,\n \"num_docs\": 2072,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1913051,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}" + } + } + } + } } }, - "x-state": "Added in 7.15.0", - "x-api-name": "search_mvt" - }, - "post": { - "tags": [ - "search" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_segments\n
\n " ], - "summary": "Search a vector tile", - "description": "Search a vector tile for geospatial values.\nBefore using this API, you should be familiar with the Mapbox vector tile specification.\nThe API returns results as a binary mapbox vector tile.\n\nInternally, Elasticsearch translates a vector tile search API request into a search containing:\n\n* A `geo_bounding_box` query on the ``. The query uses the `//` tile as a bounding box.\n* A `geotile_grid` or `geohex_grid` aggregation on the ``. The `grid_agg` parameter determines the aggregation type. The aggregation uses the `//` tile as a bounding box.\n* Optionally, a `geo_bounds` aggregation on the ``. The search only includes this aggregation if the `exact_bounds` parameter is `true`.\n* If the optional parameter `with_labels` is `true`, the internal search will include a dynamic runtime field that calls the `getLabelPosition` function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label.\n\nFor example, Elasticsearch may translate a vector tile search API request with a `grid_agg` argument of `geotile` and an `exact_bounds` argument of `true` into the following search\n\n```\nGET my-index/_search\n{\n \"size\": 10000,\n \"query\": {\n \"geo_bounding_box\": {\n \"my-geo-field\": {\n \"top_left\": {\n \"lat\": -40.979898069620134,\n \"lon\": -45\n },\n \"bottom_right\": {\n \"lat\": -66.51326044311186,\n \"lon\": 0\n }\n }\n }\n },\n \"aggregations\": {\n \"grid\": {\n \"geotile_grid\": {\n \"field\": \"my-geo-field\",\n \"precision\": 11,\n \"size\": 65536,\n \"bounds\": {\n \"top_left\": {\n \"lat\": -40.979898069620134,\n \"lon\": -45\n },\n \"bottom_right\": {\n \"lat\": -66.51326044311186,\n \"lon\": 0\n }\n }\n }\n },\n \"bounds\": {\n \"geo_bounds\": {\n \"field\": \"my-geo-field\",\n \"wrap_longitude\": false\n }\n }\n }\n}\n```\n\nThe API returns results as a binary Mapbox vector tile.\nMapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers:\n\n* A `hits` layer containing a feature for each `` value matching the `geo_bounding_box` query.\n* An `aggs` layer containing a feature for each cell of the `geotile_grid` or `geohex_grid`. The layer only contains features for cells with matching data.\n* A meta layer containing:\n * A feature containing a bounding box. By default, this is the bounding box of the tile.\n * Value ranges for any sub-aggregations on the `geotile_grid` or `geohex_grid`.\n * Metadata for the search.\n\nThe API only returns features that can display at its zoom level.\nFor example, if a polygon feature has no area at its zoom level, the API omits it.\nThe API returns errors as UTF-8 encoded JSON.\n\nIMPORTANT: You can specify several options for this API as either a query parameter or request body parameter.\nIf you specify both parameters, the query parameter takes precedence.\n\n**Grid precision for geotile**\n\nFor a `grid_agg` of `geotile`, you can use cells in the `aggs` layer as tiles for lower zoom levels.\n`grid_precision` represents the additional zoom levels available through these cells. The final precision is computed by as follows: ` + grid_precision`.\nFor example, if `` is 7 and `grid_precision` is 8, then the `geotile_grid` aggregation will use a precision of 15.\nThe maximum final precision is 29.\nThe `grid_precision` also determines the number of cells for the grid as follows: `(2^grid_precision) x (2^grid_precision)`.\nFor example, a value of 8 divides the tile into a grid of 256 x 256 cells.\nThe `aggs` layer only contains features for cells with matching data.\n\n**Grid precision for geohex**\n\nFor a `grid_agg` of `geohex`, Elasticsearch uses `` and `grid_precision` to calculate a final precision as follows: ` + grid_precision`.\n\nThis precision determines the H3 resolution of the hexagonal cells produced by the `geohex` aggregation.\nThe following table maps the H3 resolution for each precision.\nFor example, if `` is 3 and `grid_precision` is 3, the precision is 6.\nAt a precision of 6, hexagonal cells have an H3 resolution of 2.\nIf `` is 3 and `grid_precision` is 4, the precision is 7.\nAt a precision of 7, hexagonal cells have an H3 resolution of 3.\n\n| Precision | Unique tile bins | H3 resolution | Unique hex bins |\tRatio |\n| --------- | ---------------- | ------------- | ----------------| ----- |\n| 1 | 4 | 0 | 122 | 30.5 |\n| 2 | 16 | 0 | 122 | 7.625 |\n| 3 | 64 | 1 | 842 | 13.15625 |\n| 4 | 256 | 1 | 842 | 3.2890625 |\n| 5 | 1024 | 2 | 5882 | 5.744140625 |\n| 6 | 4096 | 2 | 5882 | 1.436035156 |\n| 7 | 16384 | 3 | 41162 | 2.512329102 |\n| 8 | 65536 | 3 | 41162 | 0.6280822754 |\n| 9 | 262144 | 4 | 288122 | 1.099098206 |\n| 10 | 1048576 | 4 | 288122 | 0.2747745514 |\n| 11 | 4194304 | 5 | 2016842 | 0.4808526039 |\n| 12 | 16777216 | 6 | 14117882 | 0.8414913416 |\n| 13 | 67108864 | 6 | 14117882 | 0.2103728354 |\n| 14 | 268435456 | 7 | 98825162 | 0.3681524172 |\n| 15 | 1073741824 | 8 | 691776122 | 0.644266719 |\n| 16 | 4294967296 | 8 | 691776122 | 0.1610666797 |\n| 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 |\n| 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 |\n| 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 |\n| 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 |\n| 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 |\n| 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 |\n| 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 |\n| 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 |\n| 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 |\n| 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 |\n| 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 |\n| 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 |\n| 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 |\n\nHexagonal cells don't align perfectly on a vector tile.\nSome cells may intersect more than one vector tile.\nTo compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level.\nElasticsearch uses the H3 resolution that is closest to the corresponding geotile density.", - "externalDocs": { - "url": "https://github.com/mapbox/vector-tile-spec/blob/master/README.md" - }, - "operationId": "search-mvt", - "parameters": [ - { - "$ref": "#/components/parameters/search_mvt-index" - }, - { - "$ref": "#/components/parameters/search_mvt-field" - }, - { - "$ref": "#/components/parameters/search_mvt-zoom" - }, - { - "$ref": "#/components/parameters/search_mvt-x" - }, - { - "$ref": "#/components/parameters/search_mvt-y" - }, - { - "$ref": "#/components/parameters/search_mvt-exact_bounds" - }, - { - "$ref": "#/components/parameters/search_mvt-extent" - }, - { - "$ref": "#/components/parameters/search_mvt-grid_agg" - }, - { - "$ref": "#/components/parameters/search_mvt-grid_precision" - }, - { - "$ref": "#/components/parameters/search_mvt-grid_type" - }, - { - "$ref": "#/components/parameters/search_mvt-size" - }, - { - "$ref": "#/components/parameters/search_mvt-with_labels" - } + "x-req-auth": [ + "Index privileges: `monitor`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/search_mvt" - }, - "responses": { - "200": { - "$ref": "#/components/responses/search_mvt-200" + "x-api": "segments.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.15.0", - "x-api-name": "search_mvt" + ] } }, - "/_search_shards": { + "/_shard_stores": { "get": { "tags": [ - "search" + "indices" ], - "summary": "Get the search shards", - "description": "Get the indices and shards that a search request would be run against.\nThis information can be useful for working out issues or planning optimizations with routing and shard preferences.\nWhen filtered aliases are used, the filter is returned as part of the `indices` section.\n\nIf the Elasticsearch security features are enabled, you must have the `view_index_metadata` or `manage` index privilege for the target data stream, index, or alias.", - "operationId": "search-shards", + "summary": "Get index shard stores", + "description": "Get store information about replica shards in one or more indices.\nFor data streams, the API retrieves store information for the stream's backing indices.\n\nThe index shard stores API returns the following information:\n\n* The node on which each replica shard exists.\n* The allocation ID for each replica shard.\n* A unique ID for each replica shard.\n* Any errors encountered while opening the shard index or from an earlier failure.\n\nBy default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.", + "operationId": "indices-shard-stores", "parameters": [ { - "$ref": "#/components/parameters/search_shards-allow_no_indices" + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias, or _all\nvalue targets only missing or closed indices. This behavior applies even if the request\ntargets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_shards-expand_wildcards" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams,\nthis argument determines whether wildcard expressions match hidden data streams.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_shards-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search_shards-local" - }, - { - "$ref": "#/components/parameters/search_shards-master_timeout" - }, - { - "$ref": "#/components/parameters/search_shards-preference" + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_shards-routing" + "in": "query", + "name": "status", + "description": "List of shard health statuses used to limit the request.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices.shard_stores.ShardStoreStatus" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.shard_stores.ShardStoreStatus" + } + } + ] + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/search_shards-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.shard_stores.IndicesShardStores" + } + } + }, + "required": [ + "indices" + ] + }, + "examples": { + "indicesShardStoresResponseExample1": { + "description": "An abbreviated response from `GET /_shard_stores?status=green`.\n", + "value": "{\n \"indices\": {\n \"my-index-000001\": {\n \"shards\": {\n \"0\": {\n \"stores\": [\n {\n \"sPa3OgxLSYGvQ4oPs-Tajw\": {\n \"name\": \"node_t0\",\n \"ephemeral_id\": \"9NlXRFGCT1m8tkvYCMK-8A\",\n \"transport_address\": \"local[1]\",\n \"external_id\": \"node_t0\",\n \"attributes\": {},\n \"roles\": [],\n \"version\": \"8.10.0\",\n \"min_index_version\": 7000099,\n \"max_index_version\": 8100099\n },\n \"allocation_id\": \"2iNySv_OQVePRX-yaRH_lQ\",\n \"allocation\": \"primary\",\n \"store_exception\": {}\n }\n ]\n }\n }\n }\n }\n}" + } + } + } + } } }, - "x-api-name": "search_shards" - }, - "post": { - "tags": [ - "search" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_shard_stores\n
\n " ], - "summary": "Get the search shards", - "description": "Get the indices and shards that a search request would be run against.\nThis information can be useful for working out issues or planning optimizations with routing and shard preferences.\nWhen filtered aliases are used, the filter is returned as part of the `indices` section.\n\nIf the Elasticsearch security features are enabled, you must have the `view_index_metadata` or `manage` index privilege for the target data stream, index, or alias.", - "operationId": "search-shards-1", - "parameters": [ - { - "$ref": "#/components/parameters/search_shards-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search_shards-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search_shards-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search_shards-local" - }, - { - "$ref": "#/components/parameters/search_shards-master_timeout" - }, - { - "$ref": "#/components/parameters/search_shards-preference" - }, - { - "$ref": "#/components/parameters/search_shards-routing" - } + "x-req-auth": [ + "Index privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/search_shards-200" + "x-api": "shard_stores.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "search_shards" + ] } }, - "/{index}/_search_shards": { + "/{index}/_shard_stores": { "get": { "tags": [ - "search" + "indices" ], - "summary": "Get the search shards", - "description": "Get the indices and shards that a search request would be run against.\nThis information can be useful for working out issues or planning optimizations with routing and shard preferences.\nWhen filtered aliases are used, the filter is returned as part of the `indices` section.\n\nIf the Elasticsearch security features are enabled, you must have the `view_index_metadata` or `manage` index privilege for the target data stream, index, or alias.", - "operationId": "search-shards-2", + "summary": "Get index shard stores", + "description": "Get store information about replica shards in one or more indices.\nFor data streams, the API retrieves store information for the stream's backing indices.\n\nThe index shard stores API returns the following information:\n\n* The node on which each replica shard exists.\n* The allocation ID for each replica shard.\n* A unique ID for each replica shard.\n* Any errors encountered while opening the shard index or from an earlier failure.\n\nBy default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.", + "operationId": "indices-shard-stores-1", "parameters": [ { - "$ref": "#/components/parameters/search_shards-index" - }, - { - "$ref": "#/components/parameters/search_shards-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search_shards-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search_shards-ignore_unavailable" + "in": "path", + "name": "index", + "description": "List of data streams, indices, and aliases used to limit the request.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search_shards-local" + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias, or _all\nvalue targets only missing or closed indices. This behavior applies even if the request\ntargets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_shards-master_timeout" + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams,\nthis argument determines whether wildcard expressions match hidden data streams.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_shards-preference" + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_shards-routing" + "in": "query", + "name": "status", + "description": "List of shard health statuses used to limit the request.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices.shard_stores.ShardStoreStatus" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.shard_stores.ShardStoreStatus" + } + } + ] + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/search_shards-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.shard_stores.IndicesShardStores" + } + } + }, + "required": [ + "indices" + ] + }, + "examples": { + "indicesShardStoresResponseExample1": { + "description": "An abbreviated response from `GET /_shard_stores?status=green`.\n", + "value": "{\n \"indices\": {\n \"my-index-000001\": {\n \"shards\": {\n \"0\": {\n \"stores\": [\n {\n \"sPa3OgxLSYGvQ4oPs-Tajw\": {\n \"name\": \"node_t0\",\n \"ephemeral_id\": \"9NlXRFGCT1m8tkvYCMK-8A\",\n \"transport_address\": \"local[1]\",\n \"external_id\": \"node_t0\",\n \"attributes\": {},\n \"roles\": [],\n \"version\": \"8.10.0\",\n \"min_index_version\": 7000099,\n \"max_index_version\": 8100099\n },\n \"allocation_id\": \"2iNySv_OQVePRX-yaRH_lQ\",\n \"allocation\": \"primary\",\n \"store_exception\": {}\n }\n ]\n }\n }\n }\n }\n}" + } + } + } + } } }, - "x-api-name": "search_shards" - }, - "post": { - "tags": [ - "search" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_shard_stores\n
\n " ], - "summary": "Get the search shards", - "description": "Get the indices and shards that a search request would be run against.\nThis information can be useful for working out issues or planning optimizations with routing and shard preferences.\nWhen filtered aliases are used, the filter is returned as part of the `indices` section.\n\nIf the Elasticsearch security features are enabled, you must have the `view_index_metadata` or `manage` index privilege for the target data stream, index, or alias.", - "operationId": "search-shards-3", - "parameters": [ - { - "$ref": "#/components/parameters/search_shards-index" - }, - { - "$ref": "#/components/parameters/search_shards-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search_shards-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search_shards-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search_shards-local" - }, - { - "$ref": "#/components/parameters/search_shards-master_timeout" - }, - { - "$ref": "#/components/parameters/search_shards-preference" - }, - { - "$ref": "#/components/parameters/search_shards-routing" - } + "x-req-auth": [ + "Index privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/search_shards-200" + "x-api": "shard_stores.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name": "search_shards" + ] } }, - "/_search/template": { - "get": { + "/{index}/_shrink/{target}": { + "put": { "tags": [ - "search" + "indices" ], - "summary": "Run a search with a search template", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "search-template", + "summary": "Shrink an index", + "description": "Shrink an index into a new index with fewer primary shards.\n\nBefore you can shrink an index:\n\n* The index must be read-only.\n* A copy of every shard in the index must reside on the same node.\n* The index must have a green health status.\n\nTo make shard allocation easier, we recommend you also remove the index's replica shards.\nYou can later re-add replica shards as part of the shrink operation.\n\nThe requested number of primary shards in the target index must be a factor of the number of shards in the source index.\nFor example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an index with 15 primary shards can be shrunk into 5, 3 or 1.\nIf the number of shards in the index is a prime number it can only be shrunk into a single primary shard\n Before shrinking, a (primary or replica) copy of every shard in the index must be present on the same node.\n\nThe current write index on a data stream cannot be shrunk. In order to shrink the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be shrunk.\n\nA shrink operation:\n\n* Creates a new target index with the same definition as the source index, but with a smaller number of primary shards.\n* Hard-links segments from the source index into the target index. If the file system does not support hard-linking, then all segments are copied into the new index, which is a much more time consuming process. Also if using multiple data paths, shards on different data paths require a full copy of segment files if they are not on the same disk since hardlinks do not work across disks.\n* Recovers the target index as though it were a closed index which had just been re-opened. Recovers shards to the `.routing.allocation.initial_recovery._id` index setting.\n\nIMPORTANT: Indices can only be shrunk if they satisfy the following requirements:\n\n* The target index must not exist.\n* The source index must have more primary shards than the target index.\n* The number of primary shards in the target index must be a factor of the number of primary shards in the source index. The source index must have more primary shards than the target index.\n* The index must not contain more than 2,147,483,519 documents in total across all shards that will be shrunk into a single shard on the target index as this is the maximum number of docs that can fit into a single shard.\n* The node handling the shrink process must have sufficient free disk space to accommodate a second copy of the existing index.", + "operationId": "indices-shrink", "parameters": [ { - "$ref": "#/components/parameters/search_template-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search_template-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/search_template-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search_template-explain" - }, - { - "$ref": "#/components/parameters/search_template-ignore_throttled" - }, - { - "$ref": "#/components/parameters/search_template-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search_template-preference" - }, - { - "$ref": "#/components/parameters/search_template-profile" - }, - { - "$ref": "#/components/parameters/search_template-routing" + "in": "path", + "name": "index", + "description": "Name of the source index to shrink.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search_template-scroll" + "in": "path", + "name": "target", + "description": "Name of the target index to create.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search_template-search_type" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_template-rest_total_hits_as_int" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_template-typed_keys" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/search_template" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aliases": { + "description": "The key is the alias name.\nIndex alias names support date math.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "settings": { + "description": "Configuration options for the target index.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "indicesShrinkRequestExample1": { + "summary": "Shrink an existing index into a new index with fewer primary shards.", + "value": "{\n \"settings\": {\n \"index.routing.allocation.require._name\": null,\n \"index.blocks.write\": null\n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/search_template-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "shards_acknowledged": { + "type": "boolean" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + } + }, + "required": [ + "acknowledged", + "shards_acknowledged", + "index" + ] + } + } + } } }, - "x-state": "Added in 2.0.0", - "x-api-name": "search_template" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n PUT\n /{index}/_shrink/{target}\n
\n ", + "
\n POST\n /{index}/_shrink/{target}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "shrink.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ - "search" + "indices" ], - "summary": "Run a search with a search template", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "search-template-1", + "summary": "Shrink an index", + "description": "Shrink an index into a new index with fewer primary shards.\n\nBefore you can shrink an index:\n\n* The index must be read-only.\n* A copy of every shard in the index must reside on the same node.\n* The index must have a green health status.\n\nTo make shard allocation easier, we recommend you also remove the index's replica shards.\nYou can later re-add replica shards as part of the shrink operation.\n\nThe requested number of primary shards in the target index must be a factor of the number of shards in the source index.\nFor example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an index with 15 primary shards can be shrunk into 5, 3 or 1.\nIf the number of shards in the index is a prime number it can only be shrunk into a single primary shard\n Before shrinking, a (primary or replica) copy of every shard in the index must be present on the same node.\n\nThe current write index on a data stream cannot be shrunk. In order to shrink the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be shrunk.\n\nA shrink operation:\n\n* Creates a new target index with the same definition as the source index, but with a smaller number of primary shards.\n* Hard-links segments from the source index into the target index. If the file system does not support hard-linking, then all segments are copied into the new index, which is a much more time consuming process. Also if using multiple data paths, shards on different data paths require a full copy of segment files if they are not on the same disk since hardlinks do not work across disks.\n* Recovers the target index as though it were a closed index which had just been re-opened. Recovers shards to the `.routing.allocation.initial_recovery._id` index setting.\n\nIMPORTANT: Indices can only be shrunk if they satisfy the following requirements:\n\n* The target index must not exist.\n* The source index must have more primary shards than the target index.\n* The number of primary shards in the target index must be a factor of the number of primary shards in the source index. The source index must have more primary shards than the target index.\n* The index must not contain more than 2,147,483,519 documents in total across all shards that will be shrunk into a single shard on the target index as this is the maximum number of docs that can fit into a single shard.\n* The node handling the shrink process must have sufficient free disk space to accommodate a second copy of the existing index.", + "operationId": "indices-shrink-1", "parameters": [ { - "$ref": "#/components/parameters/search_template-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search_template-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/search_template-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search_template-explain" - }, - { - "$ref": "#/components/parameters/search_template-ignore_throttled" - }, - { - "$ref": "#/components/parameters/search_template-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search_template-preference" - }, - { - "$ref": "#/components/parameters/search_template-profile" - }, - { - "$ref": "#/components/parameters/search_template-routing" + "in": "path", + "name": "index", + "description": "Name of the source index to shrink.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search_template-scroll" + "in": "path", + "name": "target", + "description": "Name of the target index to create.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search_template-search_type" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_template-rest_total_hits_as_int" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_template-typed_keys" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/search_template" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aliases": { + "description": "The key is the alias name.\nIndex alias names support date math.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "settings": { + "description": "Configuration options for the target index.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "indicesShrinkRequestExample1": { + "summary": "Shrink an existing index into a new index with fewer primary shards.", + "value": "{\n \"settings\": {\n \"index.routing.allocation.require._name\": null,\n \"index.blocks.write\": null\n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/search_template-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "shards_acknowledged": { + "type": "boolean" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + } + }, + "required": [ + "acknowledged", + "shards_acknowledged", + "index" + ] + } + } + } } }, - "x-state": "Added in 2.0.0", - "x-api-name": "search_template" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n PUT\n /{index}/_shrink/{target}\n
\n ", + "
\n POST\n /{index}/_shrink/{target}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "shrink.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_search/template": { - "get": { + "/_index_template/_simulate_index/{name}": { + "post": { "tags": [ - "search" + "indices" ], - "summary": "Run a search with a search template", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "search-template-2", + "summary": "Simulate an index", + "description": "Get the index configuration that would be applied to the specified index from an existing index template.", + "operationId": "indices-simulate-index-template", "parameters": [ { - "$ref": "#/components/parameters/search_template-index" - }, - { - "$ref": "#/components/parameters/search_template-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search_template-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/search_template-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search_template-explain" - }, - { - "$ref": "#/components/parameters/search_template-ignore_throttled" - }, - { - "$ref": "#/components/parameters/search_template-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search_template-preference" - }, - { - "$ref": "#/components/parameters/search_template-profile" - }, - { - "$ref": "#/components/parameters/search_template-routing" + "in": "path", + "name": "name", + "description": "Name of the index to simulate", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/search_template-scroll" + "in": "query", + "name": "create", + "description": "Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_template-search_type" + "in": "query", + "name": "cause", + "description": "User defined reason for dry-run creating the new template for simulation purposes", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_template-rest_total_hits_as_int" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/search_template-typed_keys" + "in": "query", + "name": "include_defaults", + "description": "If true, returns all relevant default configurations for the index template.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.11.0", + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/search_template" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices._types.IndexTemplate" + } + } + } }, "responses": { "200": { - "$ref": "#/components/responses/search_template-200" - } - }, - "x-state": "Added in 2.0.0", - "x-api-name": "search_template" - }, - "post": { - "tags": [ - "search" - ], - "summary": "Run a search with a search template", - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/search-templates" - }, - "operationId": "search-template-3", - "parameters": [ - { - "$ref": "#/components/parameters/search_template-index" - }, - { - "$ref": "#/components/parameters/search_template-allow_no_indices" - }, - { - "$ref": "#/components/parameters/search_template-ccs_minimize_roundtrips" - }, - { - "$ref": "#/components/parameters/search_template-expand_wildcards" - }, - { - "$ref": "#/components/parameters/search_template-explain" - }, - { - "$ref": "#/components/parameters/search_template-ignore_throttled" - }, - { - "$ref": "#/components/parameters/search_template-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/search_template-preference" - }, - { - "$ref": "#/components/parameters/search_template-profile" - }, - { - "$ref": "#/components/parameters/search_template-routing" - }, - { - "$ref": "#/components/parameters/search_template-scroll" - }, - { - "$ref": "#/components/parameters/search_template-search_type" - }, - { - "$ref": "#/components/parameters/search_template-rest_total_hits_as_int" - }, - { - "$ref": "#/components/parameters/search_template-typed_keys" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/search_template" - }, - "responses": { - "200": { - "$ref": "#/components/responses/search_template-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "overlapping": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.simulate_template.Overlapping" + } + }, + "template": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.simulate_template.Template" + } + ] + } + }, + "required": [ + "template" + ] + }, + "examples": { + "indicesSimulateIndexTemplateResponseExample1": { + "description": "A successful response from `POST /_index_template/_simulate_index/my-index-000001`.", + "value": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"2\",\n \"number_of_replicas\" : \"0\",\n \"routing\" : {\n \"allocation\" : {\n \"include\" : {\n \"_tier_preference\" : \"data_content\"\n }\n }\n }\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [\n {\n \"name\" : \"template_1\",\n \"index_patterns\" : [\n \"my-index-*\"\n ]\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Added in 2.0.0", - "x-api-name": "search_template" - } - }, - "/_searchable_snapshots/cache/stats": { - "get": { - "tags": [ - "searchable_snapshots" - ], - "summary": "Get cache statistics", - "description": "Get statistics about the shared cache for partially mounted indices.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots" - }, - "operationId": "searchable-snapshots-cache-stats", - "parameters": [ - { - "$ref": "#/components/parameters/searchable_snapshots.cache_stats-master_timeout" - } + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n POST\n /_index_template/_simulate_index/{name}\n
\n " ], - "responses": { - "200": { - "$ref": "#/components/responses/searchable_snapshots.cache_stats-200" - } - }, - "x-state": "Technical preview", - "x-api-name" : "cache_stats", - "x-namespace": "searchable_snapshots" - } - }, - "/_searchable_snapshots/{node_id}/cache/stats": { - "get": { - "tags": [ - "searchable_snapshots" + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" ], - "summary": "Get cache statistics", - "description": "Get statistics about the shared cache for partially mounted indices.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots" - }, - "operationId": "searchable-snapshots-cache-stats-1", - "parameters": [ - { - "$ref": "#/components/parameters/searchable_snapshots.cache_stats-node_id" - }, + "x-api": "simulate_index_template.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/searchable_snapshots.cache_stats-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/searchable_snapshots.cache_stats-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Technical preview", - "x-api-name" : "cache_stats", - "x-namespace": "searchable_snapshots" + ] } }, - "/_searchable_snapshots/cache/clear": { + "/_index_template/_simulate": { "post": { "tags": [ - "searchable_snapshots" + "indices" ], - "summary": "Clear the cache", - "description": "Clear indices and data streams from the shared cache for partially mounted indices.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots" - }, - "operationId": "searchable-snapshots-clear-cache", + "summary": "Simulate an index template", + "description": "Get the index configuration that would be applied by a particular index template.", + "operationId": "indices-simulate-template", "parameters": [ { - "$ref": "#/components/parameters/searchable_snapshots.clear_cache-expand_wildcards" + "in": "query", + "name": "create", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "cause", + "description": "User defined reason for dry-run creating the new template for simulation purposes", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/searchable_snapshots.clear_cache-allow_no_indices" + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/searchable_snapshots.clear_cache-ignore_unavailable" + "in": "query", + "name": "include_defaults", + "description": "If true, returns all relevant default configurations for the index template.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.11.0", + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_auto_create": { + "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf 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`.\nIf set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.", + "type": "boolean" + }, + "index_patterns": { + "description": "Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "composed_of": { + "description": "An ordered list of component template names.\nComponent templates are merged in the order specified, meaning that the last component template specified has the highest precedence.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" + } + }, + "template": { + "description": "Template to be applied.\nIt may optionally include an `aliases`, `mappings`, or `settings` configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.put_index_template.IndexTemplateMapping" + } + ] + }, + "data_stream": { + "description": "If this object is included, the template is used to create data streams and their backing indices.\nSupports an empty object.\nData streams require a matching index template with a `data_stream` object.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamVisibility" + } + ] + }, + "priority": { + "description": "Priority to determine index template precedence when a new data stream or index is created.\nThe index template with the highest priority is chosen.\nIf no priority is specified the template is treated as though it is of priority 0 (lowest priority).\nThis number is not automatically generated by Elasticsearch.", + "type": "number" + }, + "version": { + "description": "Version number used to manage index templates externally.\nThis number is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "_meta": { + "description": "Optional user metadata about the index template.\nMay have any contents.\nThis map is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "ignore_missing_component_templates": { + "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "type": "boolean" + } + } + }, + "examples": { + "indicesSimulateTemplateRequestExample1": { + "description": "To see what settings will be applied by a template before you add it to the cluster, you can pass a template configuration in the request body. The specified template is used for the simulation if it has a higher priority than existing templates.\n", + "value": "{\n \"index_patterns\": [\"my-index-*\"],\n \"composed_of\": [\"ct2\"],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n}" + } + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/searchable_snapshots.clear_cache-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "overlapping": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.simulate_template.Overlapping" + } + }, + "template": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.simulate_template.Template" + } + ] + } + }, + "required": [ + "template" + ] + }, + "examples": { + "indicesSimulateTemplateResponseExample2": { + "description": "A successful response from `POST /_index_template/_simulate` with a template configuration in the request body. The response shows any overlapping templates with a lower priority.\n", + "value": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_replicas\" : \"1\",\n \"routing\" : {\n \"allocation\" : {\n \"include\" : {\n \"_tier_preference\" : \"data_content\"\n }\n }\n }\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [\n {\n \"name\" : \"final-template\",\n \"index_patterns\" : [\n \"my-index-*\"\n ]\n }\n ]\n}" + } + } + } + } } }, - "x-state": "Technical preview", - "x-api-name" : "clear_cache", - "x-namespace": "searchable_snapshots" - } - }, - "/{index}/_searchable_snapshots/cache/clear": { - "post": { - "tags": [ - "searchable_snapshots" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_index_template/_simulate\n
\n " ], - "summary": "Clear the cache", - "description": "Clear indices and data streams from the shared cache for partially mounted indices.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots" - }, - "operationId": "searchable-snapshots-clear-cache-1", - "parameters": [ - { - "$ref": "#/components/parameters/searchable_snapshots.clear_cache-index" - }, - { - "$ref": "#/components/parameters/searchable_snapshots.clear_cache-expand_wildcards" - }, - { - "$ref": "#/components/parameters/searchable_snapshots.clear_cache-allow_no_indices" - }, - { - "$ref": "#/components/parameters/searchable_snapshots.clear_cache-ignore_unavailable" - } + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/searchable_snapshots.clear_cache-200" + "x-api": "simulate_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Technical preview", - "x-api-name" : "clear_cache", - "x-namespace": "searchable_snapshots" + ] } }, - "/_snapshot/{repository}/{snapshot}/_mount": { + "/_index_template/_simulate/{name}": { "post": { "tags": [ - "searchable_snapshots" + "indices" ], - "summary": "Mount a snapshot", - "description": "Mount a snapshot as a searchable snapshot index.\nDo not use this API for snapshots managed by index lifecycle management (ILM).\nManually mounting ILM-managed snapshots can interfere with ILM processes.", - "operationId": "searchable-snapshots-mount", + "summary": "Simulate an index template", + "description": "Get the index configuration that would be applied by a particular index template.", + "operationId": "indices-simulate-template-1", "parameters": [ { "in": "path", - "name": "repository", - "description": "The name of the repository containing the snapshot of the index to mount.", + "name": "name", + "description": "Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit\nthis parameter and specify the template configuration in the request body.", "required": true, "deprecated": false, "schema": { @@ -33546,44 +38475,44 @@ "style": "simple" }, { - "in": "path", - "name": "snapshot", - "description": "The name of the snapshot of the index to mount.", - "required": true, + "in": "query", + "name": "create", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "name": "cause", + "description": "User defined reason for dry-run creating the new template for simulation purposes", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "wait_for_completion", - "description": "If true, the request blocks until the operation is complete.", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "storage", - "description": "The mount option for the searchable snapshot index.", + "name": "include_defaults", + "description": "If true, returns all relevant default configurations for the index template.", "deprecated": false, "schema": { - "type": "string" + "type": "boolean" }, + "x-state": "Generally available; Added in 8.11.0", "style": "form" } ], @@ -33593,40 +38522,82 @@ "schema": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "allow_auto_create": { + "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf 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`.\nIf set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.", + "type": "boolean" }, - "renamed_index": { - "$ref": "#/components/schemas/_types.IndexName" + "index_patterns": { + "description": "Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "index_settings": { - "description": "The settings that should be added to the index when it is mounted.", - "type": "object", - "additionalProperties": { - "type": "object" + "composed_of": { + "description": "An ordered list of component template names.\nComponent templates are merged in the order specified, meaning that the last component template specified has the highest precedence.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" } }, - "ignore_index_settings": { - "description": "The names of settings that should be removed from the index when it is mounted.", + "template": { + "description": "Template to be applied.\nIt may optionally include an `aliases`, `mappings`, or `settings` configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.put_index_template.IndexTemplateMapping" + } + ] + }, + "data_stream": { + "description": "If this object is included, the template is used to create data streams and their backing indices.\nSupports an empty object.\nData streams require a matching index template with a `data_stream` object.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamVisibility" + } + ] + }, + "priority": { + "description": "Priority to determine index template precedence when a new data stream or index is created.\nThe index template with the highest priority is chosen.\nIf no priority is specified the template is treated as though it is of priority 0 (lowest priority).\nThis number is not automatically generated by Elasticsearch.", + "type": "number" + }, + "version": { + "description": "Version number used to manage index templates externally.\nThis number is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "_meta": { + "description": "Optional user metadata about the index template.\nMay have any contents.\nThis map is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "ignore_missing_component_templates": { + "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", "type": "array", "items": { "type": "string" } + }, + "deprecated": { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "type": "boolean" } - }, - "required": [ - "index" - ] + } }, "examples": { - "SearchableSnapshotsMountSnapshotRequestExample1": { - "description": "Run `POST /_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true` to mount the index `my_docs` from an existing snapshot named `my_snapshot` stored in `my_repository` as a new index `docs`.\n", - "value": "{\n \"index\": \"my_docs\",\n \"renamed_index\": \"docs\",\n \"index_settings\": {\n \"index.number_of_replicas\": 0\n },\n \"ignore_index_settings\": [ \"index.refresh_interval\" ]\n}" + "indicesSimulateTemplateRequestExample1": { + "description": "To see what settings will be applied by a template before you add it to the cluster, you can pass a template configuration in the request body. The specified template is used for the simulation if it has a higher priority than existing templates.\n", + "value": "{\n \"index_patterns\": [\"my-index-*\"],\n \"composed_of\": [\"ct2\"],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -33636,145 +38607,145 @@ "schema": { "type": "object", "properties": { - "snapshot": { - "$ref": "#/components/schemas/searchable_snapshots.mount.MountedSnapshot" + "overlapping": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.simulate_template.Overlapping" + } + }, + "template": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.simulate_template.Template" + } + ] } }, "required": [ - "snapshot" + "template" ] + }, + "examples": { + "indicesSimulateTemplateResponseExample2": { + "description": "A successful response from `POST /_index_template/_simulate` with a template configuration in the request body. The response shows any overlapping templates with a lower priority.\n", + "value": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_replicas\" : \"1\",\n \"routing\" : {\n \"allocation\" : {\n \"include\" : {\n \"_tier_preference\" : \"data_content\"\n }\n }\n }\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [\n {\n \"name\" : \"final-template\",\n \"index_patterns\" : [\n \"my-index-*\"\n ]\n }\n ]\n}" + } } } } } }, - "x-state": "Added in 7.10.0", - "x-api-name" : "mount", - "x-namespace": "searchable_snapshots" - } - }, - "/_searchable_snapshots/stats": { - "get": { - "tags": [ - "searchable_snapshots" + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_index_template/_simulate/{name}\n
\n " ], - "summary": "Get searchable snapshot statistics", - "operationId": "searchable-snapshots-stats", - "parameters": [ - { - "$ref": "#/components/parameters/searchable_snapshots.stats-level" - } + "x-req-auth": [ + "Cluster privileges: `manage_index_templates`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/searchable_snapshots.stats-200" + "x-api": "simulate_template.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.10.0", - "x-api-name" : "stats", - "x-namespace": "searchable_snapshots" + ] } }, - "/{index}/_searchable_snapshots/stats": { - "get": { + "/{index}/_split/{target}": { + "put": { "tags": [ - "searchable_snapshots" + "indices" ], - "summary": "Get searchable snapshot statistics", - "operationId": "searchable-snapshots-stats-1", + "summary": "Split an index", + "description": "Split an index into a new index with more primary shards.\n* Before you can split an index:\n\n* The index must be read-only.\n* The cluster health status must be green.\n\nYou can do make an index read-only with the following request using the add index block API:\n\n```\nPUT /my_source_index/_block/write\n```\n\nThe current write index on a data stream cannot be split.\nIn order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split.\n\nThe number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the `index.number_of_routing_shards` setting.\nThe number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing.\nFor instance, a 5 shard index with `number_of_routing_shards` set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3.\n\nA split operation:\n\n* Creates a new target index with the same definition as the source index, but with a larger number of primary shards.\n* Hard-links segments from the source index into the target index. If the file system doesn't support hard-linking, all segments are copied into the new index, which is a much more time consuming process.\n* Hashes all documents again, after low level files are created, to delete documents that belong to a different shard.\n* Recovers the target index as though it were a closed index which had just been re-opened.\n\nIMPORTANT: Indices can only be split if they satisfy the following requirements:\n\n* The target index must not exist.\n* The source index must have fewer primary shards than the target index.\n* The number of primary shards in the target index must be a multiple of the number of primary shards in the source index.\n* The node handling the split process must have sufficient free disk space to accommodate a second copy of the existing index.", + "operationId": "indices-split", "parameters": [ { - "$ref": "#/components/parameters/searchable_snapshots.stats-index" + "in": "path", + "name": "index", + "description": "Name of the source index to split.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/searchable_snapshots.stats-level" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/searchable_snapshots.stats-200" + "in": "path", + "name": "target", + "description": "Name of the target index to create.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" } - }, - "x-state": "Added in 7.10.0", - "x-api-name" : "stats", - "x-namespace": "searchable_snapshots" - } - }, - "/_security/profile/_activate": { - "post": { - "tags": [ - "security" ], - "summary": "Activate a user profile", - "description": "Create or update a user profile on behalf of another user.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nThe calling application must have either an `access_token` or a combination of `username` and `password` for the user that the profile document is intended for.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nThis API creates or updates a profile document for end users with information that is extracted from the user's authentication object including `username`, `full_name,` `roles`, and the authentication realm.\nFor example, in the JWT `access_token` case, the profile user's `username` is extracted from the JWT token claim pointed to by the `claims.principal` setting of the JWT realm that authenticated the token.\n\nWhen updating a profile document, the API enables the document if it was disabled.\nAny updates do not change existing content for either the `labels` or `data` fields.", - "operationId": "security-activate-user-profile", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "access_token": { - "description": "The user's Elasticsearch access token or JWT.\nBoth `access` and `id` JWT token types are supported and they depend on the underlying JWT realm configuration.\nIf you specify the `access_token` grant type, this parameter is required.\nIt is not valid with other grant types.", - "type": "string" - }, - "grant_type": { - "$ref": "#/components/schemas/security._types.GrantType" - }, - "password": { - "description": "The user's password.\nIf you specify the `password` grant type, this parameter is required.\nIt is not valid with other grant types.", - "type": "string" + "aliases": { + "description": "Aliases for the resulting index.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } }, - "username": { - "description": "The username that identifies the user.\nIf you specify the `password` grant type, this parameter is required.\nIt is not valid with other grant types.", - "type": "string" + "settings": { + "description": "Configuration options for the target index.", + "type": "object", + "additionalProperties": { + "type": "object" + } } - }, - "required": [ - "grant_type" - ] + } }, "examples": { - "ActivateUserProfileRequestExample1": { - "description": "Run `POST /_security/profile/_activate` to activate a user profile.\n", - "value": "{\n \"grant_type\": \"password\",\n \"username\" : \"jacknich\",\n \"password\" : \"l0ng-r4nd0m-p@ssw0rd\"\n}" + "indicesSplitRequestExample1": { + "description": "Split an existing index into a new index with more primary shards.", + "value": "{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}" } } } }, "required": true }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/security._types.UserProfileWithMetadata" - }, - "examples": { - "ActivateUserProfileResponseExample1": { - "description": "A successful response from `POST /_security/profile/_activate`.", - "value": "{\n \"uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n \"enabled\": true,\n \"last_synchronized\": 1642650651037,\n \"user\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"realm_name\": \"native\",\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\"\n },\n \"labels\": {},\n \"data\": {},\n \"_doc\": {\n \"_primary_term\": 88,\n \"_seq_no\": 66\n }\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "activate_user_profile", - "x-namespace": "security" - } - }, - "/_security/_authenticate": { - "get": { - "tags": [ - "security" - ], - "summary": "Authenticate a user", - "description": "Authenticates a user and returns information about the authenticated user.\nInclude the user information in a [basic auth header](https://en.wikipedia.org/wiki/Basic_access_authentication).\nA successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user.\nIf the user cannot be authenticated, this API returns a 401 status code.", - "operationId": "security-authenticate", "responses": { "200": { "description": "", @@ -33783,115 +38754,104 @@ "schema": { "type": "object", "properties": { - "api_key": { - "$ref": "#/components/schemas/security.authenticate.AuthenticateApiKey" - }, - "authentication_realm": { - "$ref": "#/components/schemas/security._types.RealmInfo" + "acknowledged": { + "type": "boolean" }, - "email": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "shards_acknowledged": { + "type": "boolean" }, - "full_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Name" - }, + "index": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.IndexName" } ] - }, - "lookup_realm": { - "$ref": "#/components/schemas/security._types.RealmInfo" - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "username": { - "$ref": "#/components/schemas/_types.Username" - }, - "enabled": { - "type": "boolean" - }, - "authentication_type": { - "type": "string" - }, - "token": { - "$ref": "#/components/schemas/security.authenticate.Token" } }, "required": [ - "authentication_realm", - "lookup_realm", - "metadata", - "roles", - "username", - "enabled", - "authentication_type" + "acknowledged", + "shards_acknowledged", + "index" ] - }, - "examples": { - "SecurityAuthenticateResponseExample1": { - "description": "A successful response from `GET /_security/_authenticate`.", - "value": "{\n \"username\": \"rdeniro\",\n \"roles\": [\n \"admin\"\n ],\n \"full_name\": null,\n \"email\": null,\n \"metadata\": { },\n \"enabled\": true,\n \"authentication_realm\": {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"lookup_realm\": {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"authentication_type\": \"realm\"\n}" - } } } } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "authenticate", - "x-namespace": "security" - } - }, - "/_security/role": { - "get": { - "tags": [ - "security" + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n PUT\n /{index}/_split/{target}\n
\n ", + "
\n POST\n /{index}/_split/{target}\n
\n " ], - "summary": "Get roles", - "description": "Get roles in the native realm.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe get roles API cannot retrieve roles that are defined in roles files.", - "operationId": "security-get-role-1", - "responses": { - "200": { - "$ref": "#/components/responses/security.get_role-200" + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "split.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "get_role", - "x-namespace": "security" + ] }, "post": { "tags": [ - "security" + "indices" ], - "summary": "Bulk create or update roles", - "description": "The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe bulk create or update roles API cannot update roles that are defined in roles files.", - "operationId": "security-bulk-put-role", + "summary": "Split an index", + "description": "Split an index into a new index with more primary shards.\n* Before you can split an index:\n\n* The index must be read-only.\n* The cluster health status must be green.\n\nYou can do make an index read-only with the following request using the add index block API:\n\n```\nPUT /my_source_index/_block/write\n```\n\nThe current write index on a data stream cannot be split.\nIn order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split.\n\nThe number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the `index.number_of_routing_shards` setting.\nThe number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing.\nFor instance, a 5 shard index with `number_of_routing_shards` set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3.\n\nA split operation:\n\n* Creates a new target index with the same definition as the source index, but with a larger number of primary shards.\n* Hard-links segments from the source index into the target index. If the file system doesn't support hard-linking, all segments are copied into the new index, which is a much more time consuming process.\n* Hashes all documents again, after low level files are created, to delete documents that belong to a different shard.\n* Recovers the target index as though it were a closed index which had just been re-opened.\n\nIMPORTANT: Indices can only be split if they satisfy the following requirements:\n\n* The target index must not exist.\n* The source index must have fewer primary shards than the target index.\n* The number of primary shards in the target index must be a multiple of the number of primary shards in the source index.\n* The node handling the split process must have sufficient free disk space to accommodate a second copy of the existing index.", + "operationId": "indices-split-1", "parameters": [ + { + "in": "path", + "name": "index", + "description": "Name of the source index to split.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "target", + "description": "Name of the target index to create.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, { "in": "query", - "name": "refresh", - "description": "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.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" }, "style": "form" } @@ -33902,33 +38862,26 @@ "schema": { "type": "object", "properties": { - "roles": { - "description": "A dictionary of role name to RoleDescriptor objects to add or update", + "aliases": { + "description": "Aliases for the resulting index.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleDescriptor" + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "settings": { + "description": "Configuration options for the target index.", + "type": "object", + "additionalProperties": { + "type": "object" } } - }, - "required": [ - "roles" - ] + } }, "examples": { - "SecurityBulkPutRoleRequestExample1": { - "summary": "Bulk role success", - "description": "Run `POST /_security/role` to add roles called `my_admin_role` and `my_user_role`.\n", - "value": "{\n \"roles\": {\n \"my_admin_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n }\n}" - }, - "SecurityBulkPutRoleRequestExample2": { - "summary": "Bulk role errors", - "description": "Because errors are handled individually for each role create or update, the API allows partial success. For example, `POST /_security/role` would throw an error for `my_admin_role` because the privilege `bad_cluster_privilege` doesn't exist, but would be successful for the `my_user_role`.\n", - "value": "{\n \"roles\": {\n \"my_admin_role\": {\n \"cluster\": [\n \"bad_cluster_privilege\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\"all\"],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n }\n}" - }, - "SecurityBulkPutRoleRequestExample3": { - "summary": "Role example 3", - "description": "Run `POST /_security/role/only_remote_access_role` to configure a role with remote indices and remote cluster privileges for a remote cluster.", - "value": "{\n \"remote_indices\": [\n {\n \"clusters\": [\"my_remote\"], \n \"names\": [\"logs*\"], \n \"privileges\": [\"read\", \"read_cross_cluster\", \"view_index_metadata\"] \n }\n ],\n \"remote_cluster\": [\n {\n \"clusters\": [\"my_remote\"], \n \"privileges\": [\"monitor_stats\"] \n }\n ]\n}" + "indicesSplitRequestExample1": { + "description": "Split an existing index into a new index with more primary shards.", + "value": "{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}" } } } @@ -33943,213 +38896,158 @@ "schema": { "type": "object", "properties": { - "created": { - "description": "Array of created roles", - "type": "array", - "items": { - "type": "string" - } - }, - "updated": { - "description": "Array of updated roles", - "type": "array", - "items": { - "type": "string" - } + "acknowledged": { + "type": "boolean" }, - "noop": { - "description": "Array of role names without any changes", - "type": "array", - "items": { - "type": "string" - } + "shards_acknowledged": { + "type": "boolean" }, - "errors": { - "$ref": "#/components/schemas/security._types.BulkError" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] } - } - }, - "examples": { - "SecurityBulkPutRoleResponseExample1": { - "summary": "A successful response", - "description": "A successful response from `POST /_security/role/my_admin_role` returns a JSON structure that shows whether the role has been created, updated, or had no changes made.\n", - "value": "{\n \"created\": [ \n \"my_admin_role\", \n \"my_user_role\"\n ]\n}" }, - "SecurityBulkPutRoleResponseExample2": { - "summary": "A partially successful response", - "description": "A partially successful response from `POST /_security/role`. Errors are handled individually for each role create or update, thus the API allows partial success. In this example, the creation of the `my_user_role` role succeeds and the `my_admin_role` role fails.\n", - "value": "{\n \"created\": [\n \"my_user_role\" \n ],\n \"errors\": { \n \"count\": 1, \n \"details\": {\n \"my_admin_role\": { \n \"type\": \"action_request_validation_exception\",\n \"reason\": \"Validation Failed: 1: unknown cluster privilege [bad_cluster_privilege]. a privilege must be either one of the predefined cluster privilege names [manage_own_api_key,manage_data_stream_global_retention,monitor_data_stream_global_retention,none,cancel_task,cross_cluster_replication,cross_cluster_search,delegate_pki,grant_api_key,manage_autoscaling,manage_index_templates,manage_logstash_pipelines,manage_oidc,manage_saml,manage_search_application,manage_search_query_rules,manage_search_synonyms,manage_service_account,manage_token,manage_user_profile,monitor_connector,monitor_enrich,monitor_inference,monitor_ml,monitor_rollup,monitor_snapshot,monitor_stats,monitor_text_structure,monitor_watcher,post_behavioral_analytics_event,read_ccr,read_connector_secrets,read_fleet_secrets,read_ilm,read_pipeline,read_security,read_slm,transport_client,write_connector_secrets,write_fleet_secrets,create_snapshot,manage_behavioral_analytics,manage_ccr,manage_connector,manage_enrich,manage_ilm,manage_inference,manage_ml,manage_rollup,manage_slm,manage_watcher,monitor_data_frame_transforms,monitor_transform,manage_api_key,manage_ingest_pipelines,manage_pipeline,manage_data_frame_transforms,manage_transform,manage_security,monitor,manage,all] or a pattern over one of the available cluster actions;\"\n }\n }\n }\n}" - } + "required": [ + "acknowledged", + "shards_acknowledged", + "index" + ] } } } } }, - "x-state": "Added in 8.15.0", - "x-api-name" : "bulk_put_role", - "x-namespace": "security" - }, - "delete": { + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n PUT\n /{index}/_split/{target}\n
\n ", + "
\n POST\n /{index}/_split/{target}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n" + ], + "x-api": "split.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_stats": { + "get": { "tags": [ - "security" + "indices" ], - "summary": "Bulk delete roles", - "description": "The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe bulk delete roles API cannot delete roles that are defined in roles files.", - "operationId": "security-bulk-delete-role", + "summary": "Get index statistics", + "description": "For data streams, the API retrieves statistics for the stream's backing indices.\n\nBy default, the returned statistics are index-level with `primaries` and `total` aggregations.\n`primaries` are the values for only the primary shards.\n`total` are the accumulated values for both primary and replica shards.\n\nTo get shard-level statistics, set the `level` parameter to `shards`.\n\nNOTE: When moving to another node, the shard-level statistics for a shard are cleared.\nAlthough the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.", + "operationId": "indices-stats", "parameters": [ { "in": "query", - "name": "refresh", - "description": "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.", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "names": { - "description": "An array of role names to delete", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "names" - ] - }, - "examples": { - "SecurityBulkDeleteRoleRequestExample1": { - "summary": "Bulk delete example 1", - "description": "Run DELETE /_security/role` to delete `my_admin_role` and `my_user_role` roles.\n", - "value": "{\n \"names\": [\"my_admin_role\", \"my_user_role\"]\n}" - } - } - } }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "deleted": { - "description": "Array of deleted roles", - "type": "array", - "items": { - "type": "string" - } - }, - "not_found": { - "description": "Array of roles that could not be found", - "type": "array", - "items": { - "type": "string" - } - }, - "errors": { - "$ref": "#/components/schemas/security._types.BulkError" - } - } + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "forbid_closed_indices", + "description": "If true, statistics are not collected from closed indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" }, - "examples": { - "SecurityBulkDeleteRoleResponseExample1": { - "summary": "A successful response", - "description": "A successful response from `DELETE /_security/role`.", - "value": "{\n \"deleted\": [\n \"my_admin_role\",\n \"my_user_role\"\n ]\n}" - }, - "SecurityBulkDeleteRoleResponseExample2": { - "summary": "A response with not_found roles", - "description": "A partially successful response from `DELETE /_security/role`. If a role cannot be found, it appears in the `not_found` list in the response.\n", - "value": "{\n \"deleted\": [\n \"my_admin_role\"\n ],\n \"not_found\": [\n \"not_an_existing_role\"\n ]\n}" - }, - "SecurityBulkDeleteRoleResponseExample3": { - "summary": "A response with errors", - "description": "A partially successful response from `DELETE /_security/role`. If part of a request fails or is invalid, the response includes `errors`.\n", - "value": "{\n \"deleted\": [\n \"my_admin_role\"\n ],\n \"errors\": {\n \"count\": 1,\n \"details\": {\n \"superuser\": {\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"role [superuser] is reserved and cannot be deleted\"\n }\n }\n }\n}" + { + "type": "array", + "items": { + "type": "string" } } - } - } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_unloaded_segments", + "description": "If true, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the cluster, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Level" + }, + "style": "form" } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "bulk_delete_role", - "x-namespace": "security" - } - }, - "/_security/api_key/_bulk_update": { - "post": { - "tags": [ - "security" ], - "summary": "Bulk update API keys", - "description": "Update the attributes for multiple API keys.\n\nIMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required.\n\nThis API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates.\n\nIt is not possible to update expired or invalidated API keys.\n\nThis API supports updates to API key access scope, metadata and expiration.\nThe access scope of each API key is derived from the `role_descriptors` you specify in the request and a snapshot of the owner user's permissions at the time of the request.\nThe snapshot of the owner's permissions is updated automatically on every call.\n\nIMPORTANT: If you don't specify `role_descriptors` in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified.\n\nA successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update.", - "operationId": "security-bulk-update-api-keys", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "expiration": { - "$ref": "#/components/schemas/_types.Duration" - }, - "ids": { - "description": "The API key identifiers.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "role_descriptors": { - "description": "The role descriptors to assign to the API keys.\nAn API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of permissions of the owner user.\nYou can assign new privileges by specifying them in this parameter.\nTo remove assigned privileges, supply the `role_descriptors` parameter as an empty object `{}`.\nIf an API key has no assigned privileges, it inherits the owner user's full permissions.\nThe snapshot of the owner's permissions is always updated, whether you supply the `role_descriptors` parameter.\nThe structure of a role descriptor is the same as the request for the create API keys API.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleDescriptor" - } - } - }, - "required": [ - "ids" - ] - }, - "examples": { - "SecurityBulkUpdateApiKeysRequestExample1": { - "description": "Assign new role descriptors and metadata and update the expiration time for two API keys.", - "value": "{\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\n \"production\"\n ]\n }\n },\n \"expiration\": \"30d\"\n}" - }, - "SecurityBulkUpdateApiKeysRequestExample2": { - "description": "Remove the previously assigned permissions for two API keys, making them inherit the owner user's full permissions.", - "value": "{\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"role_descriptors\": {}\n}" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "", @@ -34158,220 +39056,172 @@ "schema": { "type": "object", "properties": { - "errors": { - "$ref": "#/components/schemas/security._types.BulkError" - }, - "noops": { - "type": "array", - "items": { - "type": "string" + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.stats.IndicesStats" } }, - "updated": { - "type": "array", - "items": { - "type": "string" - } + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "_all": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndicesStats" + } + ] } }, "required": [ - "noops", - "updated" + "_shards", + "_all" ] - }, - "examples": { - "SecurityBulkUpdateApiKeysResponseExample1": { - "description": "A successful response from updating two API keys.", - "value": "{\n \"updated\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"noops\": []\n}" - } } } } } }, - "x-state": "Added in 8.5.0", - "x-api-name" : "bulk_update_api_keys", - "x-namespace": "security" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_stats\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n" + ], + "x-api": "stats.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_security/user/{username}/_password": { - "put": { + "/_stats/{metric}": { + "get": { "tags": [ - "security" + "indices" ], - "summary": "Change passwords", - "description": "Change the passwords of users in the native realm and built-in users.", - "operationId": "security-change-password", + "summary": "Get index statistics", + "description": "For data streams, the API retrieves statistics for the stream's backing indices.\n\nBy default, the returned statistics are index-level with `primaries` and `total` aggregations.\n`primaries` are the values for only the primary shards.\n`total` are the accumulated values for both primary and replica shards.\n\nTo get shard-level statistics, set the `level` parameter to `shards`.\n\nNOTE: When moving to another node, the shard-level statistics for a shard are cleared.\nAlthough the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.", + "operationId": "indices-stats-1", "parameters": [ { - "$ref": "#/components/parameters/security.change_password-username" + "in": "path", + "name": "metric", + "description": "Limit the information returned the specific metrics", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.CommonStatsFlags" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.change_password-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.change_password" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.change_password-200" - } - }, - "x-api-name" : "change_password", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Change passwords", - "description": "Change the passwords of users in the native realm and built-in users.", - "operationId": "security-change-password-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.change_password-username" + "in": "query", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.change_password-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.change_password" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.change_password-200" - } - }, - "x-api-name" : "change_password", - "x-namespace": "security" - } - }, - "/_security/user/_password": { - "put": { - "tags": [ - "security" - ], - "summary": "Change passwords", - "description": "Change the passwords of users in the native realm and built-in users.", - "operationId": "security-change-password-2", - "parameters": [ + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/security.change_password-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.change_password" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.change_password-200" - } - }, - "x-api-name" : "change_password", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Change passwords", - "description": "Change the passwords of users in the native realm and built-in users.", - "operationId": "security-change-password-3", - "parameters": [ + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/security.change_password-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.change_password" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.change_password-200" - } - }, - "x-api-name" : "change_password", - "x-namespace": "security" - } - }, - "/_security/api_key/{ids}/_clear_cache": { - "post": { - "tags": [ - "security" - ], - "summary": "Clear the API key cache", - "description": "Evict a subset of all entries from the API key cache.\nThe cache is also automatically cleared on state changes of the security index.", - "operationId": "security-clear-api-key-cache", - "parameters": [ + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, { - "in": "path", - "name": "ids", - "description": "Comma-separated list of API key IDs to evict from the API key cache.\nTo evict all API keys, use `*`.\nDoes not support other wildcard patterns.", - "required": true, + "in": "query", + "name": "forbid_closed_indices", + "description": "If true, statistics are not collected from closed indices.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Ids" + "type": "boolean" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" - }, - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.ClusterNode" - } - } - }, - "required": [ - "_nodes", - "cluster_name", - "nodes" - ] + "style": "form" + }, + { + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } } - } - } - } - }, - "x-state": "Added in 7.10.0", - "x-api-name" : "clear_api_key_cache", - "x-namespace": "security" - } - }, - "/_security/privilege/{application}/_clear_cache": { - "post": { - "tags": [ - "security" - ], - "summary": "Clear the privileges cache", - "description": "Evict privileges from the native application privilege cache.\nThe cache is also automatically cleared for applications that have their privileges updated.", - "operationId": "security-clear-cached-privileges", - "parameters": [ + ] + }, + "style": "form" + }, { - "in": "path", - "name": "application", - "description": "A comma-separated list of applications.\nTo clear all applications, use an asterism (`*`).\nIt does not support other wildcard patterns.", - "required": true, + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "type": "boolean" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "include_unloaded_segments", + "description": "If true, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the cluster, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Level" + }, + "style": "form" } ], "responses": { @@ -34382,125 +39232,172 @@ "schema": { "type": "object", "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" - }, - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "nodes": { + "indices": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/security._types.ClusterNode" + "$ref": "#/components/schemas/indices.stats.IndicesStats" } + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "_all": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndicesStats" + } + ] } }, "required": [ - "_nodes", - "cluster_name", - "nodes" + "_shards", + "_all" ] } } } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "clear_cached_privileges", - "x-namespace": "security" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_stats/{metric}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n" + ], + "x-api": "stats.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_security/realm/{realms}/_clear_cache": { - "post": { + "/{index}/_stats": { + "get": { "tags": [ - "security" + "indices" ], - "summary": "Clear the user cache", - "description": "Evict users from the user cache.\nYou can completely clear the cache or evict specific users.\n\nUser credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request.\nThere are realm settings that you can use to configure the user cache.\nFor more information, refer to the documentation about controlling the user cache.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-user-cache" - }, - "operationId": "security-clear-cached-realms", + "summary": "Get index statistics", + "description": "For data streams, the API retrieves statistics for the stream's backing indices.\n\nBy default, the returned statistics are index-level with `primaries` and `total` aggregations.\n`primaries` are the values for only the primary shards.\n`total` are the accumulated values for both primary and replica shards.\n\nTo get shard-level statistics, set the `level` parameter to `shards`.\n\nNOTE: When moving to another node, the shard-level statistics for a shard are cleared.\nAlthough the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.", + "operationId": "indices-stats-2", "parameters": [ { "in": "path", - "name": "realms", - "description": "A comma-separated list of realms.\nTo clear all realms, use an asterisk (`*`).\nIt does not support other wildcard patterns.", + "name": "index", + "description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { "in": "query", - "name": "usernames", - "description": "A comma-separated list of the users to clear from the cache.\nIf you do not specify this parameter, the API evicts all users from the user cache.", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", "deprecated": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" - }, - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.ClusterNode" - } - } - }, - "required": [ - "_nodes", - "cluster_name", - "nodes" - ] + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "forbid_closed_indices", + "description": "If true, statistics are not collected from closed indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } } - } - } - } - }, - "x-api-name" : "clear_cached_realms", - "x-namespace": "security" - } - }, - "/_security/role/{name}/_clear_cache": { - "post": { - "tags": [ - "security" - ], - "summary": "Clear the roles cache", - "description": "Evict roles from the native role cache.", - "operationId": "security-clear-cached-roles", - "parameters": [ + ] + }, + "style": "form" + }, { - "in": "path", - "name": "name", - "description": "A comma-separated list of roles to evict from the role cache.\nTo evict all roles, use an asterisk (`*`).\nIt does not support other wildcard patterns.", - "required": true, + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "type": "boolean" }, - "style": "simple" + "style": "form" + }, + { + "in": "query", + "name": "include_unloaded_segments", + "description": "If true, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the cluster, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Level" + }, + "style": "form" } ], "responses": { @@ -34511,177 +39408,158 @@ "schema": { "type": "object", "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" - }, - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "nodes": { + "indices": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/security._types.ClusterNode" + "$ref": "#/components/schemas/indices.stats.IndicesStats" } + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "_all": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndicesStats" + } + ] } }, "required": [ - "_nodes", - "cluster_name", - "nodes" + "_shards", + "_all" ] } } } } }, - "x-api-name" : "clear_cached_roles", - "x-namespace": "security" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /{index}/_stats\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n" + ], + "x-api": "stats.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache": { - "post": { + "/{index}/_stats/{metric}": { + "get": { "tags": [ - "security" + "indices" ], - "summary": "Clear service account token caches", - "description": "Evict a subset of all entries from the service account token caches.\nTwo separate caches exist for service account tokens: one cache for tokens backed by the `service_tokens` file, and another for tokens backed by the `.security` index.\nThis API clears matching entries from both caches.\n\nThe cache for service account tokens backed by the `.security` index is cleared automatically on state changes of the security index.\nThe cache for tokens backed by the `service_tokens` file is cleared automatically on file changes.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-clear-cached-service-tokens", + "summary": "Get index statistics", + "description": "For data streams, the API retrieves statistics for the stream's backing indices.\n\nBy default, the returned statistics are index-level with `primaries` and `total` aggregations.\n`primaries` are the values for only the primary shards.\n`total` are the accumulated values for both primary and replica shards.\n\nTo get shard-level statistics, set the `level` parameter to `shards`.\n\nNOTE: When moving to another node, the shard-level statistics for a shard are cleared.\nAlthough the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.", + "operationId": "indices-stats-3", "parameters": [ { "in": "path", - "name": "namespace", - "description": "The namespace, which is a top-level grouping of service accounts.", + "name": "index", + "description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Namespace" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { "in": "path", - "name": "service", - "description": "The name of the service, which must be unique within its namespace.", + "name": "metric", + "description": "Limit the information returned the specific metrics", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Service" + "$ref": "#/components/schemas/_types.CommonStatsFlags" }, "style": "simple" }, { - "in": "path", - "name": "name", - "description": "A comma-separated list of token names to evict from the service account token caches.\nUse a wildcard (`*`) to evict all tokens that belong to a service account.\nIt does not support other wildcard patterns.", - "required": true, + "in": "query", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.Fields" }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" - }, - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.ClusterNode" - } - } - }, - "required": [ - "_nodes", - "cluster_name", - "nodes" - ] - } - } - } - } - }, - "x-api-name" : "clear_cached_service_tokens", - "x-namespace": "security" - } - }, - "/_security/api_key": { - "get": { - "tags": [ - "security" - ], - "summary": "Get API key information", - "description": "Retrieves information for one or more API keys.\nNOTE: If you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.\nIf you have `read_security`, `manage_api_key` or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.", - "operationId": "security-get-api-key", - "parameters": [ + "style": "form" + }, { "in": "query", - "name": "id", - "description": "An API key id.\nThis parameter cannot be used with any of `name`, `realm_name` or `username`.", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "name", - "description": "An API key name.\nThis parameter cannot be used with any of `id`, `realm_name` or `username`.\nIt supports prefix search with wildcard.", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "owner", - "description": "A boolean flag that can be used to query API keys owned by the currently authenticated user.\nThe `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones.", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "realm_name", - "description": "The name of an authentication realm.\nThis parameter cannot be used with either `id` or `name` or when `owner` flag is set to `true`.", + "name": "forbid_closed_indices", + "description": "If true, statistics are not collected from closed indices.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "username", - "description": "The username of a user.\nThis parameter cannot be used with either `id` or `name` or when `owner` flag is set to `true`.", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Username" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "style": "form" }, { "in": "query", - "name": "with_limited_by", - "description": "Return the snapshot of the owner user's role descriptors\nassociated with the API key. An API key's actual\npermission is the intersection of its assigned role\ndescriptors and the owner user's role descriptors.", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", "deprecated": false, "schema": { "type": "boolean" @@ -34690,8 +39568,8 @@ }, { "in": "query", - "name": "active_only", - "description": "A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as `owner` or `name`. If `active_only` is false, the response will include both active and inactive (expired or invalidated) keys.", + "name": "include_unloaded_segments", + "description": "If true, the response includes information from segments that are not loaded into memory.", "deprecated": false, "schema": { "type": "boolean" @@ -34700,11 +39578,11 @@ }, { "in": "query", - "name": "with_profile_uid", - "description": "Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.", + "name": "level", + "description": "Indicates whether statistics are aggregated at the cluster, indices, or shards level.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Level" }, "style": "form" } @@ -34717,160 +39595,102 @@ "schema": { "type": "object", "properties": { - "api_keys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ApiKey" - } + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.stats.IndicesStats" + } + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "_all": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndicesStats" + } + ] } }, "required": [ - "api_keys" + "_shards", + "_all" ] - }, - "examples": { - "SecurityGetApiKeyResponseExample1": { - "summary": "Get a key by ID", - "description": "A successful response from `GET /_security/api_key?id=VuaCfGcBCdbkQm-e5aOx&with_limited_by=true`.", - "value": "{\n \"api_keys\": [ \n {\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\", \n \"name\": \"my-api-key\", \n \"creation\": 1548550550158, \n \"expiration\": 1548551550158, \n \"invalidated\": false, \n \"username\": \"myuser\", \n \"realm\": \"native1\", \n \"realm_type\": \"native\",\n \"metadata\": { \n \"application\": \"myapp\"\n },\n \"role_descriptors\": { }, \n \"limited_by\": [ \n {\n \"role-power-user\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n ]\n }\n ]\n}" - }, - "SecurityGetApiKeyResponseExample2": { - "summary": "Get all keys for a user", - "description": "A successful response from `GET /_security/api_key?username=myuser&realm_name=native1`. The response contains all API keys for the user `myuser` in the `native1` realm.\n", - "value": "{\n \"api_keys\": [\n {\n \"id\": \"0GF5GXsBCXxz2eDxWwFN\",\n \"name\": \"hadoop_myuser_key\",\n \"creation\": 1548550550158,\n \"expiration\": 1548551550158,\n \"invalidated\": false,\n \"username\": \"myuser\",\n \"realm\": \"native1\",\n \"realm_type\": \"native\",\n \"metadata\": {\n \"application\": \"myapp\"\n },\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n },\n {\n \"id\": \"6wHJmcQpReKBa42EHV5SBw\",\n \"name\": \"api-key-name-2\",\n \"creation\": 1548550550158,\n \"invalidated\": false,\n \"username\": \"user-y\",\n \"realm\": \"realm-2\",\n \"metadata\": {},\n \"role_descriptors\": { }\n }\n ]\n}" - } } } } } }, - "x-state": "Added in 6.7.0", - "x-api-name" : "get_api_key", - "x-namespace": "security" - }, - "put": { - "tags": [ - "security" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /{index}/_stats/{metric}\n
\n " ], - "summary": "Create an API key", - "description": "Create an API key for access without requiring basic authentication.\n\nIMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges.\nIf you specify privileges, the API returns an error.\n\nA successful request returns a JSON structure that contains the API key, its unique id, and its name.\nIf applicable, it also returns expiration information for the API key in milliseconds.\n\nNOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.\n\nThe API keys are created by the Elasticsearch API key service, which is automatically enabled.\nTo configure or turn off the API key service, refer to API key service setting documentation.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#api-key-service-settings" - }, - "operationId": "security-create-api-key", - "parameters": [ - { - "$ref": "#/components/parameters/security.create_api_key-refresh" - } + "x-req-auth": [ + "Index privileges: `monitor`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/security.create_api_key" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.create_api_key-200" + "x-api": "stats.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.7.0", - "x-api-name" : "create_api_key", - "x-namespace": "security" - }, + ] + } + }, + "/_aliases": { "post": { "tags": [ - "security" + "indices" ], - "summary": "Create an API key", - "description": "Create an API key for access without requiring basic authentication.\n\nIMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges.\nIf you specify privileges, the API returns an error.\n\nA successful request returns a JSON structure that contains the API key, its unique id, and its name.\nIf applicable, it also returns expiration information for the API key in milliseconds.\n\nNOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.\n\nThe API keys are created by the Elasticsearch API key service, which is automatically enabled.\nTo configure or turn off the API key service, refer to API key service setting documentation.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#api-key-service-settings" - }, - "operationId": "security-create-api-key-1", + "summary": "Create or update an alias", + "description": "Adds a data stream or index to an alias.", + "operationId": "indices-update-aliases", "parameters": [ { - "$ref": "#/components/parameters/security.create_api_key-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.create_api_key" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.create_api_key-200" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - }, - "x-state": "Added in 6.7.0", - "x-api-name" : "create_api_key", - "x-namespace": "security" - }, - "delete": { - "tags": [ - "security" ], - "summary": "Invalidate API keys", - "description": "This API invalidates API keys created by the create API key or grant API key APIs.\nInvalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted.\n\nTo use this API, you must have at least the `manage_security`, `manage_api_key`, or `manage_own_api_key` cluster privileges.\nThe `manage_security` privilege allows deleting any API key, including both REST and cross cluster API keys.\nThe `manage_api_key` privilege allows deleting any REST API key, but not cross cluster API keys.\nThe `manage_own_api_key` only allows deleting REST API keys that are owned by the user.\nIn addition, with the `manage_own_api_key` privilege, an invalidation request must be issued in one of the three formats:\n\n- Set the parameter `owner=true`.\n- Or, set both `username` and `realm_name` to match the user's identity.\n- Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the `ids` field.", - "operationId": "security-invalidate-api-key", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "ids": { - "description": "A list of API key ids.\nThis parameter cannot be used with any of `name`, `realm_name`, or `username`.", + "actions": { + "description": "Actions to perform.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/indices.update_aliases.Action" } - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "owner": { - "description": "Query API keys owned by the currently authenticated user.\nThe `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones.\n\nNOTE: At least one of `ids`, `name`, `username`, and `realm_name` must be specified if `owner` is `false`.", - "type": "boolean" - }, - "realm_name": { - "description": "The name of an authentication realm.\nThis parameter cannot be used with either `ids` or `name`, or when `owner` flag is set to `true`.", - "type": "string" - }, - "username": { - "$ref": "#/components/schemas/_types.Username" } } }, "examples": { - "SecurityInvalidateApiKeyRequestExample1": { - "summary": "API keys by ID", - "description": "Run `DELETE /_security/api_key` to invalidate the API keys identified by ID.", - "value": "{\n \"ids\" : [ \"VuaCfGcBCdbkQm-e5aOx\" ]\n}" - }, - "SecurityInvalidateApiKeyRequestExample2": { - "summary": "API keys by name", - "description": "Run `DELETE /_security/api_key` to invalidate the API keys identified by name.", - "value": "{\n \"name\" : \"my-api-key\"\n}" - }, - "SecurityInvalidateApiKeyRequestExample3": { - "summary": "API keys by realm", - "description": "Run `DELETE /_security/api_key` to invalidate all API keys for the `native1` realm.", - "value": "{\n \"realm_name\" : \"native1\"\n}" - }, - "SecurityInvalidateApiKeyRequestExample4": { - "summary": "API keys by user", - "description": "Run `DELETE /_security/api_key` to invalidate all API keys for the user `myuser` in all realms.", - "value": "{\n \"username\" : \"myuser\"\n}" - }, - "SecurityInvalidateApiKeyRequestExample5": { - "summary": "API keys by ID and owner", - "description": "Run `DELETE /_security/api_key` to invalidate the API keys identified by ID if they are owned by the currently authenticated user.", - "value": "{\n \"ids\" : [\"VuaCfGcBCdbkQm-e5aOx\"],\n \"owner\" : \"true\"\n}" - }, - "SecurityInvalidateApiKeyRequestExample6": { - "summary": "API keys by user and realm", - "description": "Run `DELETE /_security/api_key` to invalidate all API keys for the user `myuser` in the `native1` realm .", - "value": "{\n \"username\" : \"myuser\",\n \"realm_name\" : \"native1\"\n}" + "IndicesUpdateAliasesExample1": { + "description": "An example body for a `POST _aliases` request.", + "value": "{\n \"actions\": [\n {\n \"add\": {\n \"index\": \"logs-nginx.access-prod\",\n \"alias\": \"logs\"\n }\n }\n ]\n}" } } } @@ -34883,99 +39703,174 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "error_count": { - "description": "The number of errors that were encountered when invalidating the API keys.", - "type": "number" - }, - "error_details": { - "description": "Details about the errors.\nThis field is not present in the response when `error_count` is `0`.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ErrorCause" - } - }, - "invalidated_api_keys": { - "description": "The IDs of the API keys that were invalidated as part of this request.", - "type": "array", - "items": { - "type": "string" - } - }, - "previously_invalidated_api_keys": { - "description": "The IDs of the API keys that were already invalidated.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "error_count", - "invalidated_api_keys", - "previously_invalidated_api_keys" - ] - }, - "examples": { - "SecurityInvalidateApiKeyResponseExample1": { - "description": "A successful response from `DELETE /_security/api_key`.\n", - "value": "{\n \"invalidated_api_keys\": [ \n \"api-key-id-1\"\n ],\n \"previously_invalidated_api_keys\": [ \n \"api-key-id-2\",\n \"api-key-id-3\"\n ],\n \"error_count\": 2, \n \"error_details\": [ \n {\n \"type\": \"exception\",\n \"reason\": \"error occurred while invalidating api keys\",\n \"caused_by\": {\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"invalid api key id\"\n }\n },\n {\n \"type\": \"exception\",\n \"reason\": \"error occurred while invalidating api keys\",\n \"caused_by\": {\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"invalid api key id\"\n }\n }\n ]\n}" - } + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 6.7.0", - "x-api-name" : "invalidate_api_key", - "x-namespace": "security" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n POST\n /_aliases\n
\n " + ], + "x-api": "update_aliases.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_security/cross_cluster/api_key": { - "post": { + "/_validate/query": { + "get": { "tags": [ - "security" + "indices" + ], + "summary": "Validate a query", + "description": "Validates a query without running it.", + "operationId": "indices-validate-query", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "all_shards", + "description": "If `true`, the validation is executed on all shards instead of one random shard per index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "analyzer", + "description": "Analyzer to use for the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" + }, + { + "in": "query", + "name": "df", + "description": "Field to use as default where no field prefix is given in the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "If `true`, the response returns detailed information if an error has occurred.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "rewrite", + "description": "If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "q", + "description": "Query in the Lucene query string syntax.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } ], - "summary": "Create a cross-cluster API key", - "description": "Create an API key of the `cross_cluster` type for the API key based remote cluster access.\nA `cross_cluster` API key cannot be used to authenticate through the REST interface.\n\nIMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error.\n\nCross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled.\n\nNOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the `access` property.\n\nA successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds.\n\nBy default, API keys never expire. You can specify expiration information when you create the API keys.\n\nCross-cluster API keys can only be updated with the update cross-cluster API key API.\nAttempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-api-key" - }, - "operationId": "security-create-cross-cluster-api-key", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "access": { - "$ref": "#/components/schemas/security._types.Access" - }, - "expiration": { - "$ref": "#/components/schemas/_types.Duration" - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "query": { + "description": "Query in the Lucene query string syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] } - }, - "required": [ - "access", - "name" - ] - }, - "examples": { - "CreateCrossClusterApiKeyRequestExample1": { - "description": "Run `POST /_security/cross_cluster/api_key` to create a cross-cluster API key.\n", - "value": "{\n \"name\": \"my-cross-cluster-api-key\",\n \"expiration\": \"1d\", \n \"access\": {\n \"search\": [ \n {\n \"names\": [\"logs*\"]\n }\n ],\n \"replication\": [ \n {\n \"names\": [\"archive*\"]\n }\n ]\n },\n \"metadata\": {\n \"description\": \"phase one\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -34985,165 +39880,196 @@ "schema": { "type": "object", "properties": { - "api_key": { - "description": "Generated API key.", - "type": "string" - }, - "expiration": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "explanations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.validate_query.IndicesValidationExplanation" + } }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "valid": { + "type": "boolean" }, - "encoded": { - "description": "API key credentials which is the base64-encoding of\nthe UTF-8 representation of `id` and `api_key` joined\nby a colon (`:`).", + "error": { "type": "string" } }, "required": [ - "api_key", - "id", - "name", - "encoded" + "valid" ] - }, - "examples": { - "CreateCrossClusterApiKeyResponseExample1": { - "description": "A successful response from `POST /_security/service/elastic/fleet-server/credential/token`.\n", - "value": "{\n \"created\": true,\n \"token\": {\n \"name\": \"Jk5J1HgBuyBK5TpDrdo4\",\n \"value\": \"AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ\"\n }\n}" - } } } } } }, - "x-api-name" : "create_cross_cluster_api_key", - "x-namespace": "security" - } - }, - "/_security/service/{namespace}/{service}/credential/token/{name}": { - "put": { + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_validate/query\n
\n ", + "
\n POST\n /_validate/query\n
\n " + ], + "x-api": "validate_query.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "security" + "indices" ], - "summary": "Create a service account token", - "description": "Create a service accounts token for access without requiring basic authentication.\n\nNOTE: Service account tokens never expire.\nYou must actively delete them if they are no longer needed.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-create-service-token", + "summary": "Validate a query", + "description": "Validates a query without running it.", + "operationId": "indices-validate-query-1", "parameters": [ { - "$ref": "#/components/parameters/security.create_service_token-namespace" + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.create_service_token-service" + "in": "query", + "name": "all_shards", + "description": "If `true`, the validation is executed on all shards instead of one random shard per index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.create_service_token-name" + "in": "query", + "name": "analyzer", + "description": "Analyzer to use for the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.create_service_token-refresh" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.create_service_token-200" - } - }, - "x-api-name" : "create_service_token", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Create a service account token", - "description": "Create a service accounts token for access without requiring basic authentication.\n\nNOTE: Service account tokens never expire.\nYou must actively delete them if they are no longer needed.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-create-service-token-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.create_service_token-namespace" + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.create_service_token-service" + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.create_service_token-name" + "in": "query", + "name": "df", + "description": "Field to use as default where no field prefix is given in the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.create_service_token-refresh" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.create_service_token-200" - } - }, - "x-api-name" : "create_service_token", - "x-namespace": "security" - }, - "delete": { - "tags": [ - "security" - ], - "summary": "Delete service account tokens", - "description": "Delete service account tokens for a service in a specified namespace.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-delete-service-token", - "parameters": [ + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, { - "in": "path", - "name": "namespace", - "description": "The namespace, which is a top-level grouping of service accounts.", - "required": true, + "in": "query", + "name": "explain", + "description": "If `true`, the response returns detailed information if an error has occurred.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Namespace" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "service", - "description": "The service name.", - "required": true, + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Service" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "name", - "description": "The name of the service account token.", - "required": true, + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "refresh", - "description": "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.", + "name": "rewrite", + "description": "If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "type": "boolean" }, "style": "form" - } + }, + { + "in": "query", + "name": "q", + "description": "Query in the Lucene query string syntax.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "Query in the Lucene query string syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + } + } + } + } + }, "responses": { "200": { "description": "", @@ -35152,99 +40078,208 @@ "schema": { "type": "object", "properties": { - "found": { - "description": "If the service account token is successfully deleted, the request returns `{\"found\": true}`.\nOtherwise, the response will have status code 404 and `found` is set to `false`.", + "explanations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.validate_query.IndicesValidationExplanation" + } + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "valid": { "type": "boolean" + }, + "error": { + "type": "string" } }, "required": [ - "found" + "valid" ] - }, - "examples": { - "DeleteServiceTokenResponseExample1": { - "description": "A successful response from `DELETE /_security/service/elastic/fleet-server/credential/token/token42`.\n", - "value": "{\n \"found\" : true\n}" - } } } } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "delete_service_token", - "x-namespace": "security" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_validate/query\n
\n ", + "
\n POST\n /_validate/query\n
\n " + ], + "x-api": "validate_query.indices", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_security/service/{namespace}/{service}/credential/token": { - "post": { + "/{index}/_validate/query": { + "get": { "tags": [ - "security" + "indices" ], - "summary": "Create a service account token", - "description": "Create a service accounts token for access without requiring basic authentication.\n\nNOTE: Service account tokens never expire.\nYou must actively delete them if they are no longer needed.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-create-service-token-2", + "summary": "Validate a query", + "description": "Validates a query without running it.", + "operationId": "indices-validate-query-2", "parameters": [ { - "$ref": "#/components/parameters/security.create_service_token-namespace" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases to search.\nSupports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.create_service_token-service" + "in": "query", + "name": "all_shards", + "description": "If `true`, the validation is executed on all shards instead of one random shard per index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.create_service_token-refresh" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.create_service_token-200" + "in": "query", + "name": "analyzer", + "description": "Analyzer to use for the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" + }, + { + "in": "query", + "name": "df", + "description": "Field to use as default where no field prefix is given in the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "If `true`, the response returns detailed information if an error has occurred.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "rewrite", + "description": "If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "q", + "description": "Query in the Lucene query string syntax.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" } - }, - "x-api-name" : "create_service_token", - "x-namespace": "security" - } - }, - "/_security/delegate_pki": { - "post": { - "tags": [ - "security" ], - "summary": "Delegate PKI authentication", - "description": "This API implements the exchange of an X509Certificate chain for an Elasticsearch access token.\nThe certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has `delegation.enabled` set to `true`.\nA successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw `username_pattern` of the respective realm.\n\nThis API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—- as if the user connected directly to Elasticsearch.\n\nIMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated.\nThis is part of the TLS authentication process and it is delegated to the proxy that calls this API.\nThe proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/pki" - }, - "operationId": "security-delegate-pki", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "x509_certificate_chain": { - "description": "The X509Certificate chain, which is represented as an ordered string array.\nEach string in the array is a base64-encoded (Section 4 of RFC4648 - not base64url-encoded) of the certificate's DER encoding.\n\nThe first element is the target certificate that contains the subject distinguished name that is requesting access.\nThis may be followed by additional certificates; each subsequent certificate is used to certify the previous one.", - "type": "array", - "items": { - "type": "string" - } + "query": { + "description": "Query in the Lucene query string syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] } - }, - "required": [ - "x509_certificate_chain" - ] - }, - "examples": { - "SecurityDelegatePkiRequestExample1": { - "description": "Delegate a one element certificate chain.", - "value": "{\n\"x509_certificate_chain\": [\"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"]\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -35254,253 +40289,207 @@ "schema": { "type": "object", "properties": { - "access_token": { - "description": "An access token associated with the subject distinguished name of the client's certificate.", - "type": "string" + "explanations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.validate_query.IndicesValidationExplanation" + } }, - "expires_in": { - "description": "The amount of time (in seconds) before the token expires.", - "type": "number" + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] }, - "type": { - "description": "The type of token.", - "type": "string" + "valid": { + "type": "boolean" }, - "authentication": { - "$ref": "#/components/schemas/security.delegate_pki.Authentication" + "error": { + "type": "string" } }, "required": [ - "access_token", - "expires_in", - "type" + "valid" ] - }, - "examples": { - "SecurityDelegatePkiResponseExample1": { - "description": "A successful response from delegating a one element certificate chain.", - "value": "{\n \"access_token\": \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\": \"Bearer\",\n \"expires_in\": 1200,\n \"authentication\": {\n \"username\": \"Elasticsearch Test Client\",\n \"roles\": [],\n \"full_name\": null,\n \"email\": null,\n \"metadata\": {\n \"pki_dn\": \"O=org, OU=Elasticsearch, CN=Elasticsearch Test Client\",\n \"pki_delegated_by_user\": \"test_admin\",\n \"pki_delegated_by_realm\": \"file\"\n },\n \"enabled\": true,\n \"authentication_realm\": {\n \"name\": \"pki1\",\n \"type\": \"pki\"\n },\n \"lookup_realm\": {\n \"name\": \"pki1\",\n \"type\": \"pki\"\n },\n \"authentication_type\": \"realm\"\n }\n}" - } } } } } }, - "x-state": "Added in 7.4.0", - "x-api-name" : "delegate_pki", - "x-namespace": "security" - } - }, - "/_security/privilege/{application}/{name}": { - "get": { - "tags": [ - "security" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /{index}/_validate/query\n
\n ", + "
\n POST\n /{index}/_validate/query\n
\n " ], - "summary": "Get application privileges", - "description": "To use this API, you must have one of the following privileges:\n\n* The `read_security` cluster privilege (or a greater privilege such as `manage_security` or `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-get-privileges-2", - "parameters": [ - { - "$ref": "#/components/parameters/security.get_privileges-application" - }, + "x-api": "validate_query.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/security.get_privileges-name" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.get_privileges-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 6.4.0", - "x-api-name" : "get_privileges", - "x-namespace": "security" + ] }, - "delete": { + "post": { "tags": [ - "security" + "indices" ], - "summary": "Delete application privileges", - "description": "To use this API, you must have one of the following privileges:\n\n* The `manage_security` cluster privilege (or a greater privilege such as `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-delete-privileges", + "summary": "Validate a query", + "description": "Validates a query without running it.", + "operationId": "indices-validate-query-3", "parameters": [ { "in": "path", - "name": "application", - "description": "The name of the application.\nApplication privileges are always associated with exactly one application.", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases to search.\nSupports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Indices" }, "style": "simple" }, { - "in": "path", - "name": "name", - "description": "The name of the privilege.", - "required": true, + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "refresh", - "description": "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.", + "name": "all_shards", + "description": "If `true`, the validation is executed on all shards instead of one random shard per index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "type": "boolean" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.delete_privileges.FoundStatus" - } - } - }, - "examples": { - "SecurityDeletePrivilegesResponseExample1": { - "description": "A successful response from `DELETE /_security/privilege/myapp/read`. If the privilege is successfully deleted, `found` is set to `true`.\n", - "value": "{\n \"myapp\": {\n \"read\": {\n \"found\" : true\n }\n }\n}" - } - } - } - } - } - }, - "x-state": "Added in 6.4.0", - "x-api-name" : "delete_privileges", - "x-namespace": "security" - } - }, - "/_security/role/{name}": { - "get": { - "tags": [ - "security" - ], - "summary": "Get roles", - "description": "Get roles in the native realm.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe get roles API cannot retrieve roles that are defined in roles files.", - "operationId": "security-get-role", - "parameters": [ + }, { - "$ref": "#/components/parameters/security.get_role-name" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.get_role-200" - } - }, - "x-api-name" : "get_role", - "x-namespace": "security" - }, - "put": { - "tags": [ - "security" - ], - "summary": "Create or update roles", - "description": "The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.\nThe create or update roles API cannot update roles that are defined in roles files.\nFile-based role management is not available in Elastic Serverless.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles" - }, - "operationId": "security-put-role", - "parameters": [ + "in": "query", + "name": "analyzer", + "description": "Analyzer to use for the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/security.put_role-name" + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.put_role-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.put_role" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.put_role-200" - } - }, - "x-api-name" : "put_role", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Create or update roles", - "description": "The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.\nThe create or update roles API cannot update roles that are defined in roles files.\nFile-based role management is not available in Elastic Serverless.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles" - }, - "operationId": "security-put-role-1", - "parameters": [ + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" + }, { - "$ref": "#/components/parameters/security.put_role-name" + "in": "query", + "name": "df", + "description": "Field to use as default where no field prefix is given in the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.put_role-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.put_role" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.put_role-200" - } - }, - "x-api-name" : "put_role", - "x-namespace": "security" - }, - "delete": { - "tags": [ - "security" - ], - "summary": "Delete roles", - "description": "Delete roles in the native realm.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe delete roles API cannot remove roles that are defined in roles files.", - "operationId": "security-delete-role", - "parameters": [ + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, { - "in": "path", - "name": "name", - "description": "The name of the role.", - "required": true, + "in": "query", + "name": "explain", + "description": "If `true`, the response returns detailed information if an error has occurred.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "refresh", - "description": "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.", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "rewrite", + "description": "If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "q", + "description": "Query in the Lucene query string syntax.", + "deprecated": false, + "schema": { + "type": "string" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "Query in the Lucene query string syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + } + } + } + } + }, "responses": { "200": { "description": "", @@ -35509,281 +40498,517 @@ "schema": { "type": "object", "properties": { - "found": { - "description": "If the role is successfully deleted, `found` is `true`.\nOtherwise, `found` is `false`.", + "explanations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.validate_query.IndicesValidationExplanation" + } + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "valid": { "type": "boolean" + }, + "error": { + "type": "string" } }, "required": [ - "found" + "valid" ] - }, - "examples": { - "SecurityDeleteRoleResponseExample1": { - "description": "A successful response from `DELETE /_security/role/my_admin_role`. If the role is successfully deleted, `found` is set to `true`.\n", - "value": "{\n \"found\" : true\n}" - } } } } } }, - "x-api-name" : "delete_role", - "x-namespace": "security" - } - }, - "/_security/role_mapping/{name}": { - "get": { - "tags": [ - "security" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /{index}/_validate/query\n
\n ", + "
\n POST\n /{index}/_validate/query\n
\n " ], - "summary": "Get role mappings", - "description": "Role mappings define which roles are assigned to each user.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.\nThe get role mappings API cannot retrieve role mappings that are defined in role mapping files.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles" - }, - "operationId": "security-get-role-mapping", - "parameters": [ + "x-api": "validate_query.indices", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/parameters/security.get_role_mapping-name" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.get_role_mapping-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_role_mapping", - "x-namespace": "security" - }, - "put": { + ] + } + }, + "/_inference/chat_completion/{inference_id}/_stream": { + "post": { "tags": [ - "security" + "inference" ], - "summary": "Create or update role mappings", - "description": "Role mappings define which roles are assigned to each user.\nEach mapping has rules that identify users and a list of roles that are granted to those users.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.\n\nNOTE: This API does not create roles. Rather, it maps users to existing roles.\nRoles can be created by using the create or update roles API or roles files.\n\n**Role templates**\n\nThe most common use for role mappings is to create a mapping from a known value on the user to a fixed role name.\nFor example, all users in the `cn=admin,dc=example,dc=com` LDAP group should be given the superuser role in Elasticsearch.\nThe `roles` field is used for this purpose.\n\nFor more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user.\nThe `role_templates` field is used for this purpose.\n\nNOTE: To use role templates successfully, the relevant scripting feature must be enabled.\nOtherwise, all attempts to create a role mapping with role templates fail.\n\nAll of the user fields that are available in the role mapping rules are also available in the role templates.\nThus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated.\n\nBy default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user.\nIf the format of the template is set to \"json\" then the template is expected to produce a JSON string or an array of JSON strings for the role names.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles" - }, - "operationId": "security-put-role-mapping", + "summary": "Perform chat completion inference on the service", + "description": "The chat completion inference API enables real-time responses for chat completion tasks by delivering answers incrementally, reducing response times during computation.\nIt only works with the `chat_completion` task type.\n\nNOTE: The `chat_completion` task type is only available within the _stream API and only supports streaming.\nThe Chat completion inference API and the Stream inference API differ in their response structure and capabilities.\nThe Chat completion inference API provides more comprehensive customization options through more fields and function calling support.\nTo determine whether a given inference service supports this task type, please see the page for that service.", + "operationId": "inference-chat-completion-unified", "parameters": [ { - "$ref": "#/components/parameters/security.put_role_mapping-name" + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.put_role_mapping-refresh" + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference request to complete.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/security.put_role_mapping" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.RequestChatCompletion" + }, + "examples": { + "PostChatCompletionRequestExample1": { + "summary": "A chat completion task", + "description": "Run `POST _inference/chat_completion/openai-completion/_stream` to perform a chat completion on the example question with streaming.", + "value": "{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is Elastic?\"\n }\n ]\n}" + }, + "PostChatCompletionRequestExample2": { + "summary": "A chat completion task with tool_calls", + "description": "Run `POST _inference/chat_completion/openai-completion/_stream` to perform a chat completion using an Assistant message with `tool_calls`.", + "value": "{\n \"messages\": [\n {\n \"role\": \"assistant\",\n \"content\": \"Let's find out what the weather is\",\n \"tool_calls\": [ \n {\n \"id\": \"call_KcAjWtAww20AihPHphUh46Gd\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\":\\\"Boston, MA\\\"}\"\n }\n }\n ]\n },\n { \n \"role\": \"tool\",\n \"content\": \"The weather is cold\",\n \"tool_call_id\": \"call_KcAjWtAww20AihPHphUh46Gd\"\n }\n ]\n}" + }, + "PostChatCompletionRequestExample3": { + "summary": "A chat completion task with tools and tool_calls", + "description": "Run `POST _inference/chat_completion/openai-completion/_stream` to perform a chat completion using a User message with `tools` and `tool_choice`.", + "value": "{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"What's the price of a scarf?\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_price\",\n \"description\": \"Get the current price of a item\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"id\": \"123\"\n }\n }\n }\n }\n }\n ],\n \"tool_choice\": {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_price\"\n }\n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/security.put_role_mapping-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.StreamResult" + }, + "examples": { + "PostChatCompletionResponseExample1": { + "description": "A successful response when performing a chat completion task using a User message with `tools` and `tool_choice`.", + "value": "event: message\ndata: {\"chat_completion\":{\"id\":\"chatcmpl-Ae0TWsy2VPnSfBbv5UztnSdYUMFP3\",\"choices\":[{\"delta\":{\"content\":\"\",\"role\":\"assistant\"},\"index\":0}],\"model\":\"gpt-4o-2024-08-06\",\"object\":\"chat.completion.chunk\"}}\n\nevent: message\ndata: {\"chat_completion\":{\"id\":\"chatcmpl-Ae0TWsy2VPnSfBbv5UztnSdYUMFP3\",\"choices\":[{\"delta\":{\"content\":Elastic\"},\"index\":0}],\"model\":\"gpt-4o-2024-08-06\",\"object\":\"chat.completion.chunk\"}}\n\nevent: message\ndata: {\"chat_completion\":{\"id\":\"chatcmpl-Ae0TWsy2VPnSfBbv5UztnSdYUMFP3\",\"choices\":[{\"delta\":{\"content\":\" is\"},\"index\":0}],\"model\":\"gpt-4o-2024-08-06\",\"object\":\"chat.completion.chunk\"}}\n\n(...)\n\nevent: message\ndata: {\"chat_completion\":{\"id\":\"chatcmpl-Ae0TWsy2VPnSfBbv5UztnSdYUMFP3\",\"choices\":[],\"model\":\"gpt-4o-2024-08-06\",\"object\":\"chat.completion.chunk\",\"usage\":{\"completion_tokens\":28,\"prompt_tokens\":16,\"total_tokens\":44}}} \n\nevent: message\ndata: [DONE]" + } + } + } + } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "put_role_mapping", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n POST\n /_inference/chat_completion/{inference_id}/_stream\n
\n " ], - "summary": "Create or update role mappings", - "description": "Role mappings define which roles are assigned to each user.\nEach mapping has rules that identify users and a list of roles that are granted to those users.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.\n\nNOTE: This API does not create roles. Rather, it maps users to existing roles.\nRoles can be created by using the create or update roles API or roles files.\n\n**Role templates**\n\nThe most common use for role mappings is to create a mapping from a known value on the user to a fixed role name.\nFor example, all users in the `cn=admin,dc=example,dc=com` LDAP group should be given the superuser role in Elasticsearch.\nThe `roles` field is used for this purpose.\n\nFor more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user.\nThe `role_templates` field is used for this purpose.\n\nNOTE: To use role templates successfully, the relevant scripting feature must be enabled.\nOtherwise, all attempts to create a role mapping with role templates fail.\n\nAll of the user fields that are available in the role mapping rules are also available in the role templates.\nThus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated.\n\nBy default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user.\nIf the format of the template is set to \"json\" then the template is expected to produce a JSON string or an array of JSON strings for the role names.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles" - }, - "operationId": "security-put-role-mapping-1", - "parameters": [ + "x-api": "chat_completion_unified.inference", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/parameters/security.put_role_mapping-name" - }, - { - "$ref": "#/components/parameters/security.put_role_mapping-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.put_role_mapping" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.put_role_mapping-200" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "put_role_mapping", - "x-namespace": "security" - }, - "delete": { + ] + } + }, + "/_inference/completion/{inference_id}": { + "post": { "tags": [ - "security" + "inference" ], - "summary": "Delete role mappings", - "description": "Role mappings define which roles are assigned to each user.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.\nThe delete role mappings API cannot remove role mappings that are defined in role mapping files.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles" - }, - "operationId": "security-delete-role-mapping", + "summary": "Perform completion inference on the service", + "description": "Get responses for completion tasks.\nThis API works only with the completion task type.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThis API requires the `monitor_inference` cluster privilege (the built-in `inference_admin` and `inference_user` roles grant this privilege).", + "operationId": "inference-completion", "parameters": [ { "in": "path", - "name": "name", - "description": "The distinct name that identifies the role mapping.\nThe 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.", + "name": "inference_id", + "description": "The inference Id", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "refresh", - "description": "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.", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference request to complete.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "input": { + "description": "Inference input.\nEither a string or an array of strings.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "task_settings": { + "description": "Task settings for the individual inference request. These settings are specific to the you specified and override the task settings specified when initializing the service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] + } + }, + "required": [ + "input" + ] + }, + "examples": { + "CompletionRequestExample1": { + "summary": "Completion task", + "description": "Run `POST _inference/completion/openai_completions` to perform a completion on the example question.", + "value": "{\n \"input\": \"What is Elastic?\"\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "found": { - "description": "If the mapping is successfully deleted, `found` is `true`.\nOtherwise, `found` is `false`.", - "type": "boolean" - } - }, - "required": [ - "found" - ] + "$ref": "#/components/schemas/inference._types.CompletionInferenceResult" }, "examples": { - "SecurityDeleteRoleMappingResponseExample1": { - "description": "A successful response from `DELETE /_security/role_mapping/mapping1`. If the mapping is successfully deleted, `found` is `true`.\n", - "value": "{\n \"found\" : true\n}" + "CompletionResponseExample1": { + "summary": "Completion task", + "description": "A successful response from `POST _inference/completion/openai_completions`.\n", + "value": "{\n \"completion\": [\n {\n \"result\": \"Elastic is a company that provides a range of software solutions for search, logging, security, and analytics. Their flagship product is Elasticsearch, an open-source, distributed search engine that allows users to search, analyze, and visualize large volumes of data in real-time. Elastic also offers products such as Kibana, a data visualization tool, and Logstash, a log management and pipeline tool, as well as various other tools and solutions for data analysis and management.\"\n }\n ]\n}" } } } } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "delete_role_mapping", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n POST\n /_inference/completion/{inference_id}\n
\n " + ], + "x-api": "completion.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/user/{username}": { + "/_inference/{inference_id}": { "get": { "tags": [ - "security" + "inference" ], - "summary": "Get users", - "description": "Get information about users in the native realm and built-in users.", - "operationId": "security-get-user", + "summary": "Get an inference endpoint", + "description": "This API requires the `monitor_inference` cluster privilege (the built-in `inference_admin` and `inference_user` roles grant this privilege).", + "operationId": "inference-get-1", "parameters": [ { - "$ref": "#/components/parameters/security.get_user-username" - }, - { - "$ref": "#/components/parameters/security.get_user-with_profile_uid" + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "responses": { "200": { - "$ref": "#/components/responses/security.get_user-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" + } + } + }, + "required": [ + "endpoints" + ] + } + } + } } }, - "x-api-name" : "get_user", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n GET\n /_inference/{inference_id}\n
\n " + ], + "x-api": "get.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ - "security" + "inference" ], - "summary": "Create or update users", - "description": "Add and update users in the native realm.\nA password is required for adding a new user but is optional when updating an existing user.\nTo change a user's password without updating any other fields, use the change password API.", - "operationId": "security-put-user", + "summary": "Create an inference endpoint", + "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AI21 (`chat_completion`, `completion`)\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`chat_completion`, `completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `rerank`, `text_embedding`)\n* Azure OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`chat_completion`, `completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Groq (`chat_completion`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* JinaAI (`embedding`, `rerank`, `text_embedding`)\n* Llama (`chat_completion`, `completion`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* Nvidia (`chat_completion`, `completion`, `text_embedding`, `rerank`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* OpenShift AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* VoyageAI (`rerank`, `text_embedding`)\n* Watsonx (`chat_completion`, `completion`, `rerank`, `text_embedding`)", + "operationId": "inference-put", "parameters": [ { - "$ref": "#/components/parameters/security.put_user-username" + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.put_user-refresh" + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/security.put_user" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + "examples": { + "InferencePutExample1": { + "description": "An example body for a `PUT _inference/rerank/my-rerank-model` request.", + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/security.put_user-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" + } + } + } } }, - "x-api-name" : "put_user", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n PUT\n /_inference/{inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ - "security" + "inference" ], - "summary": "Create or update users", - "description": "Add and update users in the native realm.\nA password is required for adding a new user but is optional when updating an existing user.\nTo change a user's password without updating any other fields, use the change password API.", - "operationId": "security-put-user-1", + "summary": "Perform inference on the service", + "description": "This API enables you to use machine learning models to perform specific tasks on data that you provide as an input.\nIt returns a response with the results of the tasks.\nThe inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API.\n\nFor details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation.\n\n> info\n> The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", + "operationId": "inference-inference", "parameters": [ { - "$ref": "#/components/parameters/security.put_user-username" + "in": "path", + "name": "inference_id", + "description": "The unique identifier for the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.put_user-refresh" + "in": "query", + "name": "timeout", + "description": "The amount of time to wait for the inference request to complete.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/security.put_user" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "The query input, which is required only for the `rerank` task.\nIt is not required for other tasks.", + "type": "string" + }, + "input": { + "description": "The text on which you want to perform the inference task.\nIt can be a single string or an array.\n\n> info\n> Inference endpoints for the `completion` task type currently only support a single string as input.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "input_type": { + "description": "Specifies the input data type for the embedding model. The `input_type` parameter only applies to Inference Endpoints with the `embedding` or `text_embedding` task type. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "type": "string" + }, + "task_settings": { + "description": "Task settings for the individual inference request.\nThese settings are specific to the task type you specified and override the task settings specified when initializing the service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] + } + }, + "required": [ + "input" + ] + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/security.put_user-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceResult" + } + } + } } }, - "x-api-name" : "put_user", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n POST\n /_inference/{inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_inference`\n" + ], + "x-api": "inference.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ - "security" + "inference" ], - "summary": "Delete users", - "description": "Delete users from the native realm.", - "operationId": "security-delete-user", + "summary": "Delete an inference endpoint", + "description": "This API requires the manage_inference cluster privilege (the built-in `inference_admin` role grants this privilege).", + "operationId": "inference-delete", "parameters": [ { "in": "path", - "name": "username", - "description": "An identifier for the user.", + "name": "inference_id", + "description": "The inference identifier.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Username" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "refresh", - "description": "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.", + "name": "dry_run", + "description": "When true, checks the semantic_text fields and inference processors that reference the endpoint and returns them in a list, but does not delete the endpoint.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "force", + "description": "When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields.", + "deprecated": false, + "schema": { + "type": "boolean" }, "style": "form" } @@ -35794,350 +41019,468 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "found": { - "description": "If the user is successfully deleted, the request returns `{\"found\": true}`.\nOtherwise, `found` is set to `false`.", - "type": "boolean" - } - }, - "required": [ - "found" - ] - }, - "examples": { - "SecurityDeleteUserResponseExample1": { - "description": "A successful response from `DELETE /_security/user/jacknich`.\n", - "value": "{\n \"found\" : true\n}" - } + "$ref": "#/components/schemas/inference._types.DeleteInferenceEndpointResult" } } } } }, - "x-api-name" : "delete_user", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n DELETE\n /_inference/{inference_id}\n
\n " + ], + "x-api": "delete.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/user/{username}/_disable": { - "put": { + "/_inference/{task_type}/{inference_id}": { + "get": { "tags": [ - "security" + "inference" ], - "summary": "Disable users", - "description": "Disable users in the native realm.\nBy default, when you create users, they are enabled.\nYou can use this API to revoke a user's access to Elasticsearch.", - "operationId": "security-disable-user", + "summary": "Get an inference endpoint", + "description": "This API requires the `monitor_inference` cluster privilege (the built-in `inference_admin` and `inference_user` roles grant this privilege).", + "operationId": "inference-get-2", "parameters": [ { - "$ref": "#/components/parameters/security.disable_user-username" + "in": "path", + "name": "task_type", + "description": "The task type", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskType" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.disable_user-refresh" + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "responses": { "200": { - "$ref": "#/components/responses/security.disable_user-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" + } + } + }, + "required": [ + "endpoints" + ] + } + } + } } }, - "x-api-name" : "disable_user", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n GET\n /_inference/{task_type}/{inference_id}\n
\n " + ], + "x-api": "get.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, - "post": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Disable users", - "description": "Disable users in the native realm.\nBy default, when you create users, they are enabled.\nYou can use this API to revoke a user's access to Elasticsearch.", - "operationId": "security-disable-user-1", + "summary": "Create an inference endpoint", + "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AI21 (`chat_completion`, `completion`)\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`chat_completion`, `completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `rerank`, `text_embedding`)\n* Azure OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`chat_completion`, `completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Groq (`chat_completion`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* JinaAI (`embedding`, `rerank`, `text_embedding`)\n* Llama (`chat_completion`, `completion`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* Nvidia (`chat_completion`, `completion`, `text_embedding`, `rerank`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* OpenShift AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* VoyageAI (`rerank`, `text_embedding`)\n* Watsonx (`chat_completion`, `completion`, `rerank`, `text_embedding`)", + "operationId": "inference-put-1", "parameters": [ { - "$ref": "#/components/parameters/security.disable_user-username" + "in": "path", + "name": "task_type", + "description": "The task type. Refer to the integration list in the API description for the available task types.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.disable_user-refresh" + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + "examples": { + "InferencePutExample1": { + "description": "An example body for a `PUT _inference/rerank/my-rerank-model` request.", + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/security.disable_user-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" + } + } + } } }, - "x-api-name" : "disable_user", - "x-namespace": "security" - } - }, - "/_security/profile/{uid}/_disable": { - "put": { - "tags": [ - "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{inference_id}\n
\n " ], - "summary": "Disable a user profile", - "description": "Disable user profiles so that they are not visible in user profile searches.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nWhen you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches.\nTo re-enable a disabled user profile, use the enable user profile API .", - "operationId": "security-disable-user-profile", - "parameters": [ - { - "$ref": "#/components/parameters/security.disable_user_profile-uid" - }, + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put.inference", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/parameters/security.disable_user_profile-refresh" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.disable_user_profile-200" - } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "disable_user_profile", - "x-namespace": "security" + ] }, "post": { "tags": [ - "security" + "inference" ], - "summary": "Disable a user profile", - "description": "Disable user profiles so that they are not visible in user profile searches.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nWhen you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches.\nTo re-enable a disabled user profile, use the enable user profile API .", - "operationId": "security-disable-user-profile-1", + "summary": "Perform inference on the service", + "description": "This API enables you to use machine learning models to perform specific tasks on data that you provide as an input.\nIt returns a response with the results of the tasks.\nThe inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API.\n\nFor details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation.\n\n> info\n> The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", + "operationId": "inference-inference-1", "parameters": [ { - "$ref": "#/components/parameters/security.disable_user_profile-uid" + "in": "path", + "name": "task_type", + "description": "The type of inference task that the model performs.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "inference_id", + "description": "The unique identifier for the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.disable_user_profile-refresh" + "in": "query", + "name": "timeout", + "description": "The amount of time to wait for the inference request to complete.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "The query input, which is required only for the `rerank` task.\nIt is not required for other tasks.", + "type": "string" + }, + "input": { + "description": "The text on which you want to perform the inference task.\nIt can be a single string or an array.\n\n> info\n> Inference endpoints for the `completion` task type currently only support a single string as input.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "input_type": { + "description": "Specifies the input data type for the embedding model. The `input_type` parameter only applies to Inference Endpoints with the `embedding` or `text_embedding` task type. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "type": "string" + }, + "task_settings": { + "description": "Task settings for the individual inference request.\nThese settings are specific to the task type you specified and override the task settings specified when initializing the service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] + } + }, + "required": [ + "input" + ] + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/security.disable_user_profile-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceResult" + } + } + } } }, - "x-state": "Added in 8.2.0", - "x-api-name" : "disable_user_profile", - "x-namespace": "security" - } - }, - "/_security/user/{username}/_enable": { - "put": { - "tags": [ - "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n POST\n /_inference/{task_type}/{inference_id}\n
\n " ], - "summary": "Enable users", - "description": "Enable users in the native realm.\nBy default, when you create users, they are enabled.", - "operationId": "security-enable-user", - "parameters": [ - { - "$ref": "#/components/parameters/security.enable_user-username" - }, - { - "$ref": "#/components/parameters/security.enable_user-refresh" - } + "x-req-auth": [ + "Cluster privileges: `monitor_inference`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/security.enable_user-200" + "x-api": "inference.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-api-name" : "enable_user", - "x-namespace": "security" + ] }, - "post": { + "delete": { "tags": [ - "security" + "inference" ], - "summary": "Enable users", - "description": "Enable users in the native realm.\nBy default, when you create users, they are enabled.", - "operationId": "security-enable-user-1", + "summary": "Delete an inference endpoint", + "description": "This API requires the manage_inference cluster privilege (the built-in `inference_admin` role grants this privilege).", + "operationId": "inference-delete-1", "parameters": [ { - "$ref": "#/components/parameters/security.enable_user-username" + "in": "path", + "name": "task_type", + "description": "The task type", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskType" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.enable_user-refresh" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.enable_user-200" - } - }, - "x-api-name" : "enable_user", - "x-namespace": "security" - } - }, - "/_security/profile/{uid}/_enable": { - "put": { - "tags": [ - "security" - ], - "summary": "Enable a user profile", - "description": "Enable user profiles to make them visible in user profile searches.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nWhen you activate a user profile, it's automatically enabled and visible in user profile searches.\nIf you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again.", - "operationId": "security-enable-user-profile", - "parameters": [ + "in": "path", + "name": "inference_id", + "description": "The inference identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, { - "$ref": "#/components/parameters/security.enable_user_profile-uid" + "in": "query", + "name": "dry_run", + "description": "When true, checks the semantic_text fields and inference processors that reference the endpoint and returns them in a list, but does not delete the endpoint.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/security.enable_user_profile-refresh" + "in": "query", + "name": "force", + "description": "When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/security.enable_user_profile-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.DeleteInferenceEndpointResult" + } + } + } } }, - "x-state": "Added in 8.2.0", - "x-api-name" : "enable_user_profile", - "x-namespace": "security" - }, + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n DELETE\n /_inference/{task_type}/{inference_id}\n
\n " + ], + "x-api": "delete.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/embedding/{inference_id}": { "post": { "tags": [ - "security" + "inference" ], - "summary": "Enable a user profile", - "description": "Enable user profiles to make them visible in user profile searches.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nWhen you activate a user profile, it's automatically enabled and visible in user profile searches.\nIf you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again.", - "operationId": "security-enable-user-profile-1", + "summary": "Perform dense embedding inference on the service", + "operationId": "inference-embedding", "parameters": [ { - "$ref": "#/components/parameters/security.enable_user_profile-uid" + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.enable_user_profile-refresh" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.enable_user_profile-200" + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference request to complete.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "enable_user_profile", - "x-namespace": "security" - } - }, - "/_security/enroll/kibana": { - "get": { - "tags": [ - "security" ], - "summary": "Enroll Kibana", - "description": "Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.\n\nNOTE: This API is currently intended for internal use only by Kibana.\nKibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled.", - "operationId": "security-enroll-kibana", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "token": { - "$ref": "#/components/schemas/security.enroll_kibana.Token" - }, - "http_ca": { - "description": "The CA certificate used to sign the node certificates that Elasticsearch uses for TLS on the HTTP layer.\nThe certificate is returned as a Base64 encoded string of the ASN.1 DER encoding of the certificate.", - "type": "string" - } - }, - "required": [ - "token", - "http_ca" - ] + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.RequestEmbedding" + }, + "examples": { + "EmbeddingRequestExample1": { + "summary": "Multimodal embedding task", + "description": "Run `POST _inference/embedding/my-multimodal-endpoint` to generate embeddings from the example text and image", + "value": "{\n \"input\": [\n {\n \"content\": {\n \"type\": \"image\",\n \"format\": \"base64\",\n \"value\": \"data:image/jpg;base64,...\"\n }\n },\n {\n \"content\": {\n \"type\": \"text\",\n \"value\": \"Some text to create an embedding\"\n }\n }\n ]\n}" }, - "examples": { - "EnrollKibanaResponseExample1": { - "description": "A successful response from `GET /_security/enroll/kibana`.", - "value": "{\n \"token\" : {\n \"name\" : \"enroll-process-token-1629123923000\", \n \"value\": \"AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ\" \n },\n \"http_ca\" : \"MIIJlAIBAzVoGCSqGSIb3...vsDfsA3UZBAjEPfhubpQysAICAA=\", \n}" - } + "EmbeddingRequestExample2": { + "summary": "Text-only embedding task", + "description": "Run `POST _inference/embedding/my-text-only-endpoint` to generate embeddings from the example text", + "value": "{\n \"input\": [\"The first text\", \"The second text\"]\n}" } } } - } + }, + "required": true }, - "x-state": "Added in 8.0.0", - "x-api-name" : "enroll_kibana", - "x-namespace": "security" - } - }, - "/_security/enroll/node": { - "get": { - "tags": [ - "security" - ], - "summary": "Enroll a node", - "description": "Enroll a new node to allow it to join an existing cluster with security features enabled.\n\nThe response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster.\nThe response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster.", - "operationId": "security-enroll-node", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "http_ca_key": { - "description": "The CA private key that can be used by the new node in order to sign its certificate for the HTTP layer, as a Base64 encoded string of the ASN.1 DER encoding of the key.", - "type": "string" - }, - "http_ca_cert": { - "description": "The CA certificate that can be used by the new node in order to sign its certificate for the HTTP layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate.", - "type": "string" - }, - "transport_ca_cert": { - "description": "The CA certificate that is used to sign the TLS certificate for the transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate.", - "type": "string" - }, - "transport_key": { - "description": "The private key that the node can use for TLS for its transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the key.", - "type": "string" - }, - "transport_cert": { - "description": "The certificate that the node can use for TLS for its transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate.", - "type": "string" - }, - "nodes_addresses": { - "description": "A list of transport addresses in the form of `host:port` for the nodes that are already members of the cluster.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "http_ca_key", - "http_ca_cert", - "transport_ca_cert", - "transport_key", - "transport_cert", - "nodes_addresses" - ] + "$ref": "#/components/schemas/inference._types.EmbeddingInferenceResult" }, "examples": { - "EnrollNodeResponseExample1": { - "description": "A successful response from `PGET /security/enroll/node`.", - "value": "{\n \"http_ca_key\" : \"MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqGSIb3DQ....vsDfsA3UZBAjEPfhubpQysAICCAA=\", \n \"http_ca_cert\" : \"MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqGSIb3DQ....vsDfsA3UZBAjEPfhubpQysAICCAA=\", \n \"transport_ca_cert\" : \"MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqG....vsDfsA3UZBAjEPfhubpQysAICCAA=\", \n \"transport_key\" : \"MIIEJgIBAzCCA98GCSqGSIb3DQEHAaCCA9AEggPMMIIDyDCCA8QGCSqGSIb3....YuEiOXvqZ6jxuVSQ0CAwGGoA==\", \n \"transport_cert\" : \"MIIEJgIBAzCCA98GCSqGSIb3DQEHAaCCA9AEggPMMIIDyDCCA8QGCSqGSIb3....YuEiOXvqZ6jxuVSQ0CAwGGoA==\", \n \"nodes_addresses\" : [ \n \"192.168.1.2:9300\"\n ]\n}" + "EmbeddingResponseExample1": { + "summary": "Multimodal embedding task", + "description": "An abbreviated response from `POST _inference/embedding/my-multimodal-endpoint`.\n", + "value": "{\n \"embeddings\": [\n {\n \"embedding\": [\n -0.0189209,\n -0.04174805,\n 0.00854492,\n 0.01556396,\n 0.01928711,\n -0.00616455,\n -0.00460815,\n 0.01477051,\n -0.00656128,\n 0.05419922\n ]\n },\n {\n \"embedding\": [\n -0.01379395,\n -0.02368164,\n 0.01068115,\n 0.0279541,\n 0.01043701,\n -7.7057E-4,\n 0.04150391,\n 0.00836182,\n -0.01135254,\n 0.0246582\n ]\n }\n ]\n}" + }, + "EmbeddingResponseExample2": { + "summary": "Text-only embedding task", + "description": "An abbreviated response from `POST _inference/embedding/my-text-only-endpoint`.\n", + "value": "{\n \"embeddings\": [\n {\n \"embedding\": [\n 0.00854492,\n -0.00616455,\n -0.0189209,\n 0.01556396,\n -0.00460815,\n 0.01477051,\n -0.04174805,\n 0.01928711,\n -0.00656128,\n 0.05419922\n ]\n },\n {\n \"embedding\": [\n -0.01135254,\n 0.0279541,\n -0.02368164,\n 0.01068115,\n 0.01043701,\n 0.04150391,\n 0.00836182,\n -7.7057E-4,\n -0.01379395,\n 0.0246582\n ]\n }\n ]\n}" } } } } } }, - "x-state": "Added in 8.0.0", - "x-api-name" : "enroll_node", - "x-namespace": "security" + "x-state": "Technical preview; Added in 9.4.0", + "x-variations": [ + "
\n POST\n /_inference/embedding/{inference_id}\n
\n " + ], + "x-api": "embedding.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/privilege/_builtin": { + "/_inference": { "get": { "tags": [ - "security" + "inference" ], - "summary": "Get builtin privileges", - "description": "Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-get-builtin-privileges", + "summary": "Get an inference endpoint", + "description": "This API requires the `monitor_inference` cluster privilege (the built-in `inference_admin` and `inference_user` roles grant this privilege).", + "operationId": "inference-get", "responses": { "200": { "description": "", @@ -36146,401 +41489,466 @@ "schema": { "type": "object", "properties": { - "cluster": { - "description": "The list of cluster privileges that are understood by this version of Elasticsearch.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ClusterPrivilege" - } - }, - "index": { - "description": "The list of index privileges that are understood by this version of Elasticsearch.", + "endpoints": { "type": "array", "items": { - "$ref": "#/components/schemas/_types.IndexName" - } - }, - "remote_cluster": { - "description": "The list of remote_cluster privileges that are understood by this version of Elasticsearch.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteClusterPrivilege" + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" } } }, "required": [ - "cluster", - "index", - "remote_cluster" + "endpoints" ] - }, - "examples": { - "SecurityGetBuiltinPrivilegesResponseExample1": { - "description": "A successful response from `GET /_security/privilege/_builtin`.", - "value": "{\n \"cluster\" : [\n \"all\",\n \"cancel_task\",\n \"create_snapshot\",\n \"cross_cluster_replication\",\n \"cross_cluster_search\",\n \"delegate_pki\",\n \"grant_api_key\",\n \"manage\",\n \"manage_api_key\",\n \"manage_autoscaling\",\n \"manage_behavioral_analytics\",\n \"manage_ccr\",\n \"manage_connector\",\n \"manage_data_frame_transforms\",\n \"manage_data_stream_global_retention\",\n \"manage_enrich\",\n \"manage_ilm\",\n \"manage_index_templates\",\n \"manage_inference\",\n \"manage_ingest_pipelines\",\n \"manage_logstash_pipelines\",\n \"manage_ml\",\n \"manage_oidc\",\n \"manage_own_api_key\",\n \"manage_pipeline\",\n \"manage_rollup\",\n \"manage_saml\",\n \"manage_search_application\",\n \"manage_search_query_rules\",\n \"manage_search_synonyms\",\n \"manage_security\",\n \"manage_service_account\",\n \"manage_slm\",\n \"manage_token\",\n \"manage_transform\",\n \"manage_user_profile\",\n \"manage_watcher\",\n \"monitor\",\n \"monitor_connector\",\n \"monitor_data_frame_transforms\",\n \"monitor_data_stream_global_retention\",\n \"monitor_enrich\",\n \"monitor_inference\",\n \"monitor_ml\",\n \"monitor_rollup\",\n \"monitor_snapshot\",\n \"monitor_stats\",\n \"monitor_text_structure\",\n \"monitor_transform\",\n \"monitor_watcher\",\n \"none\",\n \"post_behavioral_analytics_event\",\n \"read_ccr\",\n \"read_connector_secrets\",\n \"read_fleet_secrets\",\n \"read_ilm\",\n \"read_pipeline\",\n \"read_security\",\n \"read_slm\",\n \"transport_client\",\n \"write_connector_secrets\",\n \"write_fleet_secrets\"\n ],\n \"index\" : [\n \"all\",\n \"auto_configure\",\n \"create\",\n \"create_doc\",\n \"create_index\",\n \"cross_cluster_replication\",\n \"cross_cluster_replication_internal\",\n \"delete\",\n \"delete_index\",\n \"index\",\n \"maintenance\",\n \"manage\",\n \"manage_data_stream_lifecycle\",\n \"manage_follow_index\",\n \"manage_ilm\",\n \"manage_leader_index\",\n \"monitor\",\n \"none\",\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\",\n \"write\"\n ],\n \"remote_cluster\" : [\n \"monitor_enrich\",\n \"monitor_stats\"\n ]\n}" - } } } } } }, - "x-state": "Added in 7.3.0", - "x-api-name" : "get_builtin_privileges", - "x-namespace": "security" - } - }, - "/_security/privilege": { - "get": { - "tags": [ - "security" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n GET\n /_inference\n
\n " ], - "summary": "Get application privileges", - "description": "To use this API, you must have one of the following privileges:\n\n* The `read_security` cluster privilege (or a greater privilege such as `manage_security` or `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-get-privileges", - "responses": { - "200": { - "$ref": "#/components/responses/security.get_privileges-200" + "x-api": "get.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Added in 6.4.0", - "x-api-name" : "get_privileges", - "x-namespace": "security" - }, + ] + } + }, + "/_inference/{task_type}/{ai21_inference_id}": { "put": { "tags": [ - "security" + "inference" ], - "summary": "Create or update application privileges", - "description": "To use this API, you must have one of the following privileges:\n\n* The `manage_security` cluster privilege (or a greater privilege such as `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.\n\nApplication names are formed from a prefix, with an optional suffix that conform to the following rules:\n\n* The prefix must begin with a lowercase ASCII letter.\n* The prefix must contain only ASCII letters or digits.\n* The prefix must be at least 3 characters long.\n* If the suffix exists, it must begin with either a dash `-` or `_`.\n* The suffix cannot contain any of the following characters: `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, `,`, `*`.\n* No part of the name can contain whitespace.\n\nPrivilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters `_`, `-`, and `.`.\n\nAction names can contain any number of printable ASCII characters and must contain at least one of the following characters: `/`, `*`, `:`.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-put-privileges", + "summary": "Create a AI21 inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `ai21` service.", + "operationId": "inference-put-ai21", "parameters": [ { - "$ref": "#/components/parameters/security.put_privileges-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.put_privileges" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.put_privileges-200" - } - }, - "x-state": "Added in 6.4.0", - "x-api-name" : "put_privileges", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Create or update application privileges", - "description": "To use this API, you must have one of the following privileges:\n\n* The `manage_security` cluster privilege (or a greater privilege such as `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.\n\nApplication names are formed from a prefix, with an optional suffix that conform to the following rules:\n\n* The prefix must begin with a lowercase ASCII letter.\n* The prefix must contain only ASCII letters or digits.\n* The prefix must be at least 3 characters long.\n* If the suffix exists, it must begin with either a dash `-` or `_`.\n* The suffix cannot contain any of the following characters: `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, `,`, `*`.\n* No part of the name can contain whitespace.\n\nPrivilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters `_`, `-`, and `.`.\n\nAction names can contain any number of printable ASCII characters and must contain at least one of the following characters: `/`, `*`, `:`.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-put-privileges-1", - "parameters": [ + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.Ai21TaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "ai21_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, { - "$ref": "#/components/parameters/security.put_privileges-refresh" + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/security.put_privileges" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "service": { + "description": "The type of service supported for the specified task type. In this case, `ai21`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.Ai21ServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `ai21` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.Ai21ServiceSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutAi21RequestExample1": { + "description": "Run `PUT _inference/completion/ai21-completion` to create an AI21 inference endpoint that performs a `completion` task.", + "value": "{\n \"service\": \"ai21\",\n \"service_settings\": {\n \"api_key\": \"ai21-api-key\",\n \"model_id\": \"jamba-large\" \n }\n}" + }, + "PutAi21RequestExample2": { + "description": "Run `PUT _inference/chat-completion/ai21-chat-completion` to create a AI21 inference endpoint that performs a `chat_completion` task.", + "value": "{\n \"service\": \"ai21\",\n \"service_settings\": {\n \"api_key\": \"ai21-api-key\",\n \"model_id\": \"jamba-mini\" \n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/security.put_privileges-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAi21" + } + } + } } }, - "x-state": "Added in 6.4.0", - "x-api-name" : "put_privileges", - "x-namespace": "security" - } - }, - "/_security/privilege/{application}": { - "get": { - "tags": [ - "security" - ], - "summary": "Get application privileges", - "description": "To use this API, you must have one of the following privileges:\n\n* The `read_security` cluster privilege (or a greater privilege such as `manage_security` or `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-get-privileges-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.get_privileges-application" - } + "x-state": "Generally available; Added in 9.2.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{ai21_inference_id}\n
\n " ], - "responses": { - "200": { - "$ref": "#/components/responses/security.get_privileges-200" - } - }, - "x-state": "Added in 6.4.0", - "x-api-name" : "get_privileges", - "x-namespace": "security" - } - }, - "/_security/role_mapping": { - "get": { - "tags": [ - "security" + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" ], - "summary": "Get role mappings", - "description": "Role mappings define which roles are assigned to each user.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.\nThe get role mappings API cannot retrieve role mappings that are defined in role mapping files.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles" - }, - "operationId": "security-get-role-mapping-1", - "responses": { - "200": { - "$ref": "#/components/responses/security.get_role_mapping-200" + "x-api": "put_ai21.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_role_mapping", - "x-namespace": "security" + ] } }, - "/_security/service/{namespace}/{service}": { - "get": { + "/_inference/{task_type}/{alibabacloud_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Get service accounts", - "description": "Get a list of service accounts that match the provided path parameters.\n\nNOTE: Currently, only the `elastic/fleet-server` service account is available.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-get-service-accounts", + "summary": "Create an AlibabaCloud AI Search inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `alibabacloud-ai-search` service.", + "operationId": "inference-put-alibabacloud", "parameters": [ { - "$ref": "#/components/parameters/security.get_service_accounts-namespace" + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.AlibabaCloudTaskType" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.get_service_accounts-service" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.get_service_accounts-200" - } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "get_service_accounts", - "x-namespace": "security" - } - }, - "/_security/service/{namespace}": { - "get": { - "tags": [ - "security" - ], - "summary": "Get service accounts", - "description": "Get a list of service accounts that match the provided path parameters.\n\nNOTE: Currently, only the `elastic/fleet-server` service account is available.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-get-service-accounts-1", - "parameters": [ + "in": "path", + "name": "alibabacloud_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, { - "$ref": "#/components/parameters/security.get_service_accounts-namespace" + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `sparse_embedding` or `text_embedding` task types.\nNot applicable to the `rerank` or `completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] + }, + "service": { + "description": "The type of service supported for the specified task type. In this case, `alibabacloud-ai-search`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AlibabaCloudServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `alibabacloud-ai-search` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AlibabaCloudServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AlibabaCloudTaskSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutAlibabaCloudRequestExample1": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/alibabacloud_ai_search_completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"host\" : \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-qwen-turbo\",\n \"workspace\" : \"default\"\n }\n}" + }, + "PutAlibabaCloudRequestExample2": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/alibabacloud_ai_search_rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-bge-reranker-larger\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n}" + }, + "PutAlibabaCloudRequestExample3": { + "summary": "A sparse embedding task", + "description": "Run `PUT _inference/sparse_embedding/alibabacloud_ai_search_sparse` to create an inference endpoint that performs perform a sparse embedding task.", + "value": "{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-text-sparse-embedding-001\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n}" + }, + "PutAlibabaCloudRequestExample4": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/alibabacloud_ai_search_embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-text-embedding-001\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { - "$ref": "#/components/responses/security.get_service_accounts-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAlibabaCloudAI" + } + } + } } }, - "x-state": "Added in 7.13.0", - "x-api-name" : "get_service_accounts", - "x-namespace": "security" - } - }, - "/_security/service": { - "get": { - "tags": [ - "security" + "x-state": "Generally available; Added in 8.16.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{alibabacloud_inference_id}\n
\n " ], - "summary": "Get service accounts", - "description": "Get a list of service accounts that match the provided path parameters.\n\nNOTE: Currently, only the `elastic/fleet-server` service account is available.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-get-service-accounts-2", - "responses": { - "200": { - "$ref": "#/components/responses/security.get_service_accounts-200" + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_alibabacloud.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "get_service_accounts", - "x-namespace": "security" + ] } }, - "/_security/service/{namespace}/{service}/credential": { - "get": { + "/_inference/{task_type}/{amazonbedrock_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Get service account credentials", - "description": "To use this API, you must have at least the `read_security` cluster privilege (or a greater privilege such as `manage_service_account` or `manage_security`).\n\nThe response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster.\n\nNOTE: For tokens backed by the `service_tokens` file, the API collects them from all nodes of the cluster.\nTokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts" - }, - "operationId": "security-get-service-credentials", + "summary": "Create an Amazon Bedrock inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `amazonbedrock` service.\n\n>info\n> You need to provide the access and secret keys only once, during the inference model creation. The get inference API does not retrieve your access or secret keys. After creating the inference model, you cannot change the associated key pairs. If you want to use a different access and secret key pair, delete the inference model and recreate it with the same name and the updated keys.", + "operationId": "inference-put-amazonbedrock", "parameters": [ { "in": "path", - "name": "namespace", - "description": "The name of the namespace.", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Namespace" + "$ref": "#/components/schemas/inference._types.AmazonBedrockTaskType" }, "style": "simple" }, { "in": "path", - "name": "service", - "description": "The service name.", + "name": "amazonbedrock_inference_id", + "description": "The unique identifier of the inference endpoint.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "service_account": { - "type": "string" - }, - "count": { - "type": "number" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" }, - "tokens": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.Metadata" + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `chat_completion` and `completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" } - }, - "nodes_credentials": { - "$ref": "#/components/schemas/security.get_service_credentials.NodesCredentials" - } + ] }, - "required": [ - "service_account", - "count", - "tokens", - "nodes_credentials" - ] - }, - "examples": { - "GetServiceCredentialsResponseExample1": { - "description": "A successful response from `GET /_security/service/elastic/fleet-server/credential`. The response contains all credentials for the `elastic/fleet-server` service account.\n", - "value": "{\n \"service_account\": \"elastic/fleet-server\",\n \"count\": 3,\n \"tokens\": {\n \"token1\": {}, \n \"token42\": {} \n },\n \"nodes_credentials\": { \n \"_nodes\": { \n \"total\": 3,\n \"successful\": 3,\n \"failed\": 0\n },\n \"file_tokens\": { \n \"my-token\": {\n \"nodes\": [ \"node0\", \"node1\" ] \n }\n }\n }\n}" + "service": { + "description": "The type of service supported for the specified task type. In this case, `amazonbedrock`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AmazonBedrockServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `amazonbedrock` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AmazonBedrockServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AmazonBedrockTaskSettings" + } + ] } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutAmazonBedrockRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/amazon_bedrock_embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-embed-text-v2:0\"\n }\n}" + }, + "PutAmazonBedrockRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/amazon_bedrock_completion` to create an inference endpoint to perform a completion task.", + "value": "{\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-text-premier-v1:0\"\n }\n}" + }, + "PutAmazonBedrockRequestExample3": { + "summary": "A chat completion task", + "description": "Run `PUT _inference/chat_completion/amazon_bedrock_chat_completion` to create an inference endpoint to perform a chat completion task.", + "value": "{\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-text-premier-v1:0\"\n }\n}" } } } - } + }, + "required": true }, - "x-state": "Added in 7.13.0", - "x-api-name" : "get_service_credentials", - "x-namespace": "security" - } - }, - "/_security/settings": { - "get": { - "tags": [ - "security" - ], - "summary": "Get security index settings", - "description": "Get the user-configurable settings for the security internal index (`.security` and associated indices).\nOnly a subset of the index settings — those that are user-configurable—will be shown.\nThis includes:\n\n* `index.auto_expand_replicas`\n* `index.number_of_replicas`", - "operationId": "security-get-settings", - "parameters": [ - { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "security": { - "$ref": "#/components/schemas/security._types.SecuritySettings" - }, - "security-profile": { - "$ref": "#/components/schemas/security._types.SecuritySettings" - }, - "security-tokens": { - "$ref": "#/components/schemas/security._types.SecuritySettings" - } - }, - "required": [ - "security", - "security-profile", - "security-tokens" - ] + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAmazonBedrock" } } } } }, - "x-api-name" : "get_settings", - "x-namespace": "security" - }, + "x-state": "Generally available; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{amazonbedrock_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_amazonbedrock.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{amazonsagemaker_inference_id}": { "put": { "tags": [ - "security" + "inference" ], - "summary": "Update security index settings", - "description": "Update the user-configurable settings for the security internal index (`.security` and associated indices). Only a subset of settings are allowed to be modified. This includes `index.auto_expand_replicas` and `index.number_of_replicas`.\n\nNOTE: If `index.auto_expand_replicas` is set, `index.number_of_replicas` will be ignored during updates.\n\nIf a specific index is not in use on the system and settings are provided for it, the request will be rejected.\nThis API does not yet support configuring the settings for indices before they are in use.", - "operationId": "security-update-settings", + "summary": "Create an Amazon SageMaker inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `amazon_sagemaker` service.", + "operationId": "inference-put-amazonsagemaker", "parameters": [ { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/inference._types.TaskTypeAmazonSageMaker" }, - "style": "form" + "style": "simple" + }, + { + "in": "path", + "name": "amazonsagemaker_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -36554,21 +41962,72 @@ "schema": { "type": "object", "properties": { - "security": { - "$ref": "#/components/schemas/security._types.SecuritySettings" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `sparse_embedding` or `text_embedding` task types.\nNot applicable to the `rerank`, `completion`, or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "security-profile": { - "$ref": "#/components/schemas/security._types.SecuritySettings" + "service": { + "description": "The type of service supported for the specified task type. In this case, `amazon_sagemaker`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerServiceType" + } + ] }, - "security-tokens": { - "$ref": "#/components/schemas/security._types.SecuritySettings" + "service_settings": { + "description": "Settings used to install the inference model.\nThese settings are specific to the `amazon_sagemaker` service and `service_settings.api` you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type and `service_settings.api` you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerTaskSettings" + } + ] } - } + }, + "required": [ + "service", + "service_settings" + ] }, "examples": { - "SecurityUpdateSettingsRequestExample1": { - "description": "Run `PUT /_security/settings` to modify the security settings.", - "value": "{\n \"security\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-tokens\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-profile\": {\n \"index.auto_expand_replicas\": \"0-all\"\n }\n}" + "PutAmazonSageMakerRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/amazon_sagemaker_embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\",\n \"dimensions\": 384,\n \"element_type\": \"float\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/amazon_sagemaker_completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample3": { + "summary": "A chat completion task", + "description": "Run `PUT _inference/chat_completion/amazon_sagemaker_chat_completion` to create an inference endpoint that performs a chat completion task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample4": { + "summary": "A sparse embedding task", + "description": "Run `PUT _inference/sparse_embedding/amazon_sagemaker_sparse_embedding` to create an inference endpoint that performs a sparse embedding task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample5": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/amazon_sagemaker_rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" } } } @@ -36581,74 +42040,111 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - } - }, - "required": [ - "acknowledged" - ] + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAmazonSageMaker" } } } } }, - "x-api-name" : "update_settings", - "x-namespace": "security" + "x-state": "Generally available; Added in 9.1.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{amazonsagemaker_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_amazonsagemaker.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/oauth2/token": { - "post": { + "/_inference/{task_type}/{anthropic_inference_id}": { + "put": { "tags": [ - "security" + "inference" + ], + "summary": "Create an Anthropic inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `anthropic` service.", + "operationId": "inference-put-anthropic", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The task type.\nThe only valid task type for the model to perform is `completion`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.AnthropicTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "anthropic_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } ], - "summary": "Get a token", - "description": "Create a bearer token for access without requiring basic authentication.\nThe tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface.\nAlternatively, you can explicitly enable the `xpack.security.authc.token.enabled` setting.\nWhen you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface.\n\nThe get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body.\n\nA successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available.\n\nThe tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used.\nThat time period is defined by the `xpack.security.authc.token.timeout` setting.\nIf you want to invalidate a token immediately, you can do so by using the invalidate token API.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security-plus-https#encrypt-http-communication" - }, - "operationId": "security-get-token", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "grant_type": { - "$ref": "#/components/schemas/security.get_token.AccessTokenGrantType" - }, - "scope": { - "description": "The scope of the token.\nCurrently tokens are only issued for a scope of FULL regardless of the value sent with the request.", - "type": "string" - }, - "password": { - "$ref": "#/components/schemas/_types.Password" - }, - "kerberos_ticket": { - "description": "The base64 encoded kerberos ticket.\nIf you specify the `_kerberos` grant type, this parameter is required.\nThis parameter is not valid with any other supported grant type.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `anthropic`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AnthropicServiceType" + } + ] }, - "refresh_token": { - "description": "The string that was returned when you created the token, which enables you to extend its life.\nIf you specify the `refresh_token` grant type, this parameter is required.\nThis parameter is not valid with any other supported grant type.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `anthropic` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AnthropicServiceSettings" + } + ] }, - "username": { - "$ref": "#/components/schemas/_types.Username" + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AnthropicTaskSettings" + } + ] } - } + }, + "required": [ + "service", + "service_settings" + ] }, "examples": { - "GetUserAccessTokenRequestExample1": { - "summary": "A client_credentials grant type example", - "description": "Run `POST /_security/oauth2/token` to obtain a token using the `client_credentials` grant type, which simply creates a token as the authenticated user.\n", - "value": "{\n \"grant_type\" : \"client_credentials\"\n}" - }, - "GetUserAccessTokenRequestExample2": { - "summary": "A password grant type example", - "description": "Run `POST /_security/oauth2/token` to obtain a token for the `test_admin` user using the password grant type. This request needs to be made by an authenticated user with sufficient privileges that may or may not be the same as the one whose username is passed in the `username` parameter.\n", - "value": "{\n \"grant_type\" : \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\"\n}" + "PutAnthropicRequestExample1": { + "description": "Run `PUT _inference/completion/anthropic_completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"anthropic\",\n \"service_settings\": {\n \"api_key\": \"Anthropic-Api-Key\",\n \"model_id\": \"Model-ID\"\n },\n \"task_settings\": {\n \"max_tokens\": 1024\n }\n}" } } } @@ -36661,111 +42157,133 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "access_token": { - "type": "string" - }, - "expires_in": { - "type": "number" - }, - "scope": { - "type": "string" - }, - "type": { - "type": "string" - }, - "refresh_token": { - "type": "string" - }, - "kerberos_authentication_response_token": { - "type": "string" - }, - "authentication": { - "$ref": "#/components/schemas/security.get_token.AuthenticatedUser" - } - }, - "required": [ - "access_token", - "expires_in", - "type", - "authentication" - ] - }, - "examples": { - "GetUserAccessTokenResponseExample1": { - "summary": "A client_credentials grant type example", - "description": "A successful response from `POST /_security/oauth2/token`.", - "value": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"authentication\" : {\n \"username\" : \"test_admin\",\n \"roles\" : [\n \"superuser\"\n ],\n \"full_name\" : null,\n \"email\" : null,\n \"metadata\" : { },\n \"enabled\" : true,\n \"authentication_realm\" : {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"lookup_realm\" : {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"authentication_type\" : \"realm\"\n }\n}" - }, - "GetUserAccessTokenResponseExample2": { - "summary": "A password grant type example", - "description": "A successful response from `POST /_security/oauth2/token`.", - "value": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"authentication\" : {\n \"username\" : \"test_admin\",\n \"roles\" : [\n \"superuser\"\n ],\n \"full_name\" : null,\n \"email\" : null,\n \"metadata\" : { },\n \"enabled\" : true,\n \"authentication_realm\" : {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"lookup_realm\" : {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"authentication_type\" : \"realm\"\n }\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAnthropic" } } } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "get_token", - "x-namespace": "security" - }, - "delete": { + "x-state": "Generally available; Added in 8.16.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{anthropic_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_anthropic.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{azureaistudio_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Invalidate a token", - "description": "The access tokens returned by the get token API have a finite period of time for which they are valid.\nAfter that time period, they can no longer be used.\nThe time period is defined by the `xpack.security.authc.token.timeout` setting.\n\nThe refresh tokens returned by the get token API are only valid for 24 hours.\nThey can also be used exactly once.\nIf you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.\n\nNOTE: While all parameters are optional, at least one of them is required.\nMore specifically, either one of `token` or `refresh_token` parameters is required.\nIf none of these two are specified, then `realm_name` and/or `username` need to be specified.", - "operationId": "security-invalidate-token", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "token": { - "description": "An access token.\nThis parameter cannot be used if any of `refresh_token`, `realm_name`, or `username` are used.", - "type": "string" - }, - "refresh_token": { - "description": "A refresh token.\nThis parameter cannot be used if any of `refresh_token`, `realm_name`, or `username` are used.", - "type": "string" - }, - "realm_name": { - "$ref": "#/components/schemas/_types.Name" + "summary": "Create an Azure AI studio inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `azureaistudio` service.", + "operationId": "inference-put-azureaistudio", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.AzureAiStudioTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "azureaistudio_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank` or `completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "username": { - "$ref": "#/components/schemas/_types.Username" + "service": { + "description": "The type of service supported for the specified task type. In this case, `azureaistudio`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureAiStudioServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `azureaistudio` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureAiStudioServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureAiStudioTaskSettings" + } + ] } - } + }, + "required": [ + "service", + "service_settings" + ] }, "examples": { - "SecurityInvalidateTokenRequestExample1": { - "summary": "Invalidate an access token", - "description": "Run `DELETE /_security/oauth2/token` to invalidate an access token.\n", - "value": "{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"\n}" - }, - "SecurityInvalidateTokenRequestExample2": { - "summary": "Invalidate a refresh token", - "description": "Run `DELETE /_security/oauth2/token` to invalidate a refresh token.\n", - "value": "{\n \"refresh_token\" : \"vLBPvmAB6KvwvJZr27cS\"\n}" - }, - "SecurityInvalidateTokenRequestExample3": { - "summary": "Invalidate tokens by realm", - "description": "Run `DELETE /_security/oauth2/token` to invalidate all access tokens and refresh tokens for the `saml1` realm.", - "value": "{\n \"realm_name\" : \"saml1\"\n}" + "PutAzureAiStudioRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/azure_ai_studio_embeddings` to create an inference endpoint that performs a text_embedding task. Note that you do not specify a model here, as it is defined already in the Azure AI Studio deployment.", + "value": "{\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-Uri\",\n \"provider\": \"openai\",\n \"endpoint_type\": \"token\"\n }\n}" }, - "SecurityInvalidateTokenRequestExample4": { - "summary": "Invalidate tokens by user", - "description": "Run `DELETE /_security/oauth2/token` to invalidate all access tokens and refresh tokens for the user `myuser` in all realms.", - "value": "{\n \"username\" : \"myuser\"\n}" + "PutAzureAiStudioRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/azure_ai_studio_completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-URI\",\n \"provider\": \"databricks\",\n \"endpoint_type\": \"realtime\"\n }\n}" }, - "SecurityInvalidateTokenRequestExample5": { - "summary": "Invalidate tokens by user and realm", - "description": "Run `DELETE /_security/oauth2/token` to invalidate all access tokens and refresh tokens for the user `myuser` in the `saml1` realm.", - "value": "{\n \"username\" : \"myuser\",\n \"realm_name\" : \"saml1\"\n}" + "PutAzureAiStudioRequestExample3": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/azure_ai_studio_rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-URI\",\n \"provider\": \"cohere\",\n \"endpoint_type\": \"token\"\n }\n}" } } } @@ -36778,341 +42296,289 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "error_count": { - "description": "The number of errors that were encountered when invalidating the tokens.", - "type": "number" - }, - "error_details": { - "description": "Details about the errors.\nThis field is not present in the response when `error_count` is `0`.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ErrorCause" - } - }, - "invalidated_tokens": { - "description": "The number of the tokens that were invalidated as part of this request.", - "type": "number" - }, - "previously_invalidated_tokens": { - "description": "The number of tokens that were already invalidated.", - "type": "number" - } - }, - "required": [ - "error_count", - "invalidated_tokens", - "previously_invalidated_tokens" - ] - }, - "examples": { - "SecurityInvalidateTokenResponseExample1": { - "description": "A partially successful response from `DELETE /_security/oauth2/token`. The response includes the number of the tokens that were invalidated, the number of errors that were encountered when invalidating the tokens, and details about these errors.\n", - "value": "{\n \"invalidated_tokens\":9, \n \"previously_invalidated_tokens\":15, \n \"error_count\":2, \n \"error_details\":[ \n {\n \"type\":\"exception\",\n \"reason\":\"Elasticsearch exception [type=exception, reason=foo]\",\n \"caused_by\":{\n \"type\":\"exception\",\n \"reason\":\"Elasticsearch exception [type=illegal_argument_exception, reason=bar]\"\n }\n },\n {\n \"type\":\"exception\",\n \"reason\":\"Elasticsearch exception [type=exception, reason=boo]\",\n \"caused_by\":{\n \"type\":\"exception\",\n \"reason\":\"Elasticsearch exception [type=illegal_argument_exception, reason=far]\"\n }\n }\n ]\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAzureAIStudio" } } } } }, - "x-state": "Added in 5.5.0", - "x-api-name" : "invalidate_token", - "x-namespace": "security" - } - }, - "/_security/user": { - "get": { - "tags": [ - "security" + "x-state": "Generally available; Added in 8.14.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{azureaistudio_inference_id}\n
\n " ], - "summary": "Get users", - "description": "Get information about users in the native realm and built-in users.", - "operationId": "security-get-user-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.get_user-with_profile_uid" - } + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/security.get_user-200" + "x-api": "put_azureaistudio.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-api-name" : "get_user", - "x-namespace": "security" + ] } }, - "/_security/user/_privileges": { - "get": { + "/_inference/{task_type}/{azureopenai_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Get user privileges", - "description": "Get the security privileges for the logged in user.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.\nTo check whether a user has a specific list of privileges, use the has privileges API.", - "operationId": "security-get-user-privileges", + "summary": "Create an Azure OpenAI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `azureopenai` service.\n\nThe list of chat completion models that you can choose from in your Azure OpenAI deployment include:\n\n* [GPT-4 and GPT-4 Turbo models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-4-and-gpt-4-turbo-models)\n* [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-35)\n\nThe list of embeddings models that you can choose from in your deployment can be found in the [Azure models documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings).", + "operationId": "inference-put-azureopenai", "parameters": [ { - "in": "query", - "name": "application", - "description": "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.", + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/inference._types.AzureOpenAITaskType" }, - "style": "form" + "style": "simple" }, { - "in": "query", - "name": "priviledge", - "description": "The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application.", + "in": "path", + "name": "azureopenai_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "username", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Name" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `completion` and `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] + }, + "service": { + "description": "The type of service supported for the specified task type. In this case, `azureopenai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureOpenAIServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `azureopenai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureOpenAIServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureOpenAITaskSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutAzureOpenAiRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/azure_openai_embeddings` to create an inference endpoint that performs a `text_embedding` task. You do not specify a model, as it is defined already in the Azure OpenAI deployment.", + "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" + }, + "PutAzureOpenAiRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/azure_openai_completion` to create an inference endpoint that performs a `completion` task.", + "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" + }, + "PutAzureOpenAiRequestExample3": { + "summary": "A chat completion task", + "description": "Run `PUT _inference/chat_completion/azure_openai_chat_completion` to create an inference endpoint that performs a `chat_completion` task.", + "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ApplicationPrivileges" - } - }, - "cluster": { - "type": "array", - "items": { - "type": "string" - } - }, - "remote_cluster": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" - } - }, - "global": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.GlobalPrivilege" - } - }, - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.UserIndicesPrivileges" - } - }, - "remote_indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteUserIndicesPrivileges" - } - }, - "run_as": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "applications", - "cluster", - "global", - "indices", - "run_as" - ] + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAzureOpenAI" }, "examples": { - "SecurityGetUserPrivilegesResponseExample1": { - "description": "A successful response from `GET /_security/user/_privileges`.", - "value": "{\n \"cluster\" : [\n \"all\"\n ],\n \"global\" : [ ],\n \"indices\" : [\n {\n \"names\" : [\n \"*\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"allow_restricted_indices\" : true\n }\n ],\n \"applications\" : [\n {\n \"application\" : \"*\",\n \"privileges\" : [\n \"*\"\n ],\n \"resources\" : [\n \"*\"\n ]\n }\n ],\n \"run_as\" : [\n \"*\"\n ]\n}" + "PutAzureOpenAiResponseExample1": { + "summary": "A text embedding task", + "description": "A successful response when creating an Azure OpenAI `text_embedding` inference endpoint.", + "value": "{\n \"inference_id\": \"azure_openai_embeddings\",\n \"task_type\": \"text_embedding\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 1140\n },\n \"dimensions\": 1536,\n \"similarity\": \"dot_product\"\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" + }, + "PutAzureOpenAiResponseExample2": { + "summary": "A completion task", + "description": "A successful response when creating an Azure OpenAI `completion` inference endpoint.", + "value": "{\n \"inference_id\": \"azure_openai_completion\",\n \"task_type\": \"completion\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 120\n }\n }\n}" + }, + "PutAzureOpenAiResponseExample3": { + "summary": "A chat completion task", + "description": "A successful response when creating an Azure OpenAI `chat_completion` inference endpoint.", + "value": "{\n \"inference_id\": \"azure_openai_chat_completion\",\n \"task_type\": \"chat_completion\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 120\n }\n }\n}" } } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name" : "get_user_privileges", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.14.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{azureopenai_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_azureopenai.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/profile/{uid}": { - "get": { + "/_inference/{task_type}/{cohere_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Get a user profile", - "description": "Get a user's profile using the unique profile ID.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", - "operationId": "security-get-user-profile", + "summary": "Create a Cohere inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `cohere` service.", + "operationId": "inference-put-cohere", "parameters": [ { "in": "path", - "name": "uid", - "description": "A unique identifier for the user profile.", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", "required": true, "deprecated": false, "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/security._types.UserProfileId" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.UserProfileId" - } - } - ] + "$ref": "#/components/schemas/inference._types.CohereTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "cohere_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "data", - "description": "A comma-separated list of filters for the `data` field of the profile document.\nTo return all content use `data=*`.\nTo return a subset of content use `data=` to retrieve content nested under the specified ``.\nBy default returns no `data` content.", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "profiles": { - "description": "A successful call returns the JSON representation of the user profile and its internal versioning numbers.\nThe API returns an empty object if no profile document is found for the provided `uid`.\nThe content of the data field is not returned by default to avoid deserializing a potential large payload.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.UserProfileWithMetadata" - } - }, - "errors": { - "$ref": "#/components/schemas/security.get_user_profile.GetUserProfileErrors" - } - }, - "required": [ - "profiles" - ] - }, - "examples": { - "GetUserProfileResponseExample1": { - "summary": "Profile details for a UUID", - "description": "A successful response from `GET /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0`. By default, no content is returned in the `data` field.\n", - "value": "{\n \"profiles\": [\n {\n \"uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n \"enabled\": true,\n \"last_synchronized\": 1642650651037,\n \"user\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"realm_name\": \"native\",\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\"\n },\n \"labels\": {\n \"direction\": \"north\"\n },\n \"data\": {}, \n \"_doc\": {\n \"_primary_term\": 88,\n \"_seq_no\": 66\n }\n }\n ]\n}" - }, - "GetUserProfileResponseExample2": { - "summary": "Profile details for a UUID and data key", - "description": "A successful response from `GET /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0?data=app1.key1`.\n", - "value": "{\n \"profiles\": [\n {\n \"uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n \"enabled\": true,\n \"last_synchronized\": 1642650651037,\n \"user\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"realm_name\": \"native\",\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\"\n },\n \"labels\": {\n \"direction\": \"north\"\n },\n \"data\": {\n \"app1\": {\n \"key1\": \"value1\"\n }\n },\n \"_doc\": {\n \"_primary_term\": 88,\n \"_seq_no\": 66\n }\n }\n ]\n}" - }, - "GetUserProfileResponseExample3": { - "summary": "Profile details with errors", - "description": "A response that contains errors that occurred while retrieving user profiles.\n", - "value": "{\n \"profiles\": [],\n \"errors\": {\n \"count\": 1,\n \"details\": {\n \"u_FmxQt3gr1BBH5wpnz9HkouPj3Q710XkOgg1PWkwLPBW_5\": {\n \"type\": \"resource_not_found_exception\",\n \"reason\": \"profile document not found\"\n }\n }\n }\n}" - } - } - } - } - } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "get_user_profile", - "x-namespace": "security" - } - }, - "/_security/api_key/grant": { - "post": { - "tags": [ - "security" - ], - "summary": "Grant an API key", - "description": "Create an API key on behalf of another user.\nThis API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API.\nThe caller must have authentication credentials for the user on whose behalf the API key will be created.\nIt is not possible to use this API to create an API key without that user's credentials.\nThe supported user authentication credential types are:\n\n* username and password\n* Elasticsearch access tokens\n* JWTs\n\nThe user, for whom the authentication credentials is provided, can optionally \"run as\" (impersonate) another user.\nIn this case, the API key will be created on behalf of the impersonated user.\n\nThis API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.\nThe API keys are created by the Elasticsearch API key service, which is automatically enabled.\n\nA successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.\nIf applicable, it also returns expiration information for the API key in milliseconds.\n\nBy default, API keys never expire. You can specify expiration information when you create the API keys.", - "operationId": "security-grant-api-key", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "api_key": { - "$ref": "#/components/schemas/security.grant_api_key.GrantApiKey" - }, - "grant_type": { - "$ref": "#/components/schemas/security.grant_api_key.ApiKeyGrantType" - }, - "access_token": { - "description": "The user's access token.\nIf you specify the `access_token` grant type, this parameter is required.\nIt is not valid with other grant types.", - "type": "string" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank` or `completion` task type.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "username": { - "$ref": "#/components/schemas/_types.Username" + "service": { + "description": "The type of service supported for the specified task type. In this case, `cohere`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CohereServiceType" + } + ] }, - "password": { - "$ref": "#/components/schemas/_types.Password" + "service_settings": { + "description": "Settings used to install the inference model.\nThese settings are specific to the `cohere` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CohereServiceSettings" + } + ] }, - "run_as": { - "$ref": "#/components/schemas/_types.Username" + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CohereTaskSettings" + } + ] } }, "required": [ - "api_key", - "grant_type" + "service", + "service_settings" ] }, "examples": { - "SecurityGrantApiKeyRequestExample1": { - "summary": "Grant an API key", - "description": "Run `POST /_security/api_key/grant` to create an API key on behalf of the `test_admin` user.\n", - "value": "{\n \"grant_type\": \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\",\n \"api_key\" : {\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n }\n}" + "PutCohereRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/cohere-embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-Api-key\",\n \"model_id\": \"embed-english-light-v3.0\",\n \"embedding_type\": \"byte\"\n }\n}" }, - "SecurityGrantApiKeyRequestExample2": { - "summary": "Grant an API key with run_as", - "description": "Run `POST /_security/api_key/grant`. The user (`test_admin`) whose credentials are provided can \"run as\" another user (`test_user`). The API key will be granted to the impersonated user (`test_user`).\n", - "value": "{\n \"grant_type\": \"password\",\n \"username\" : \"test_admin\", \n \"password\" : \"x-pack-test-password\", \n \"run_as\": \"test_user\", \n \"api_key\" : {\n \"name\": \"another-api-key\"\n }\n}" + "PutCohereRequestExample2": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/cohere-rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"rerank-english-v3.0\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n}" + }, + "PutCohereRequestExample3": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/cohere-completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"command-a-03-2025\"\n }\n}" } } } @@ -37125,229 +42591,251 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "api_key": { - "type": "string" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "expiration": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "encoded": { - "type": "string" - } - }, - "required": [ - "api_key", - "id", - "name", - "encoded" - ] + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoCohere" } } } } }, - "x-state": "Added in 7.9.0", - "x-api-name" : "grant_api_key", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{cohere_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_cohere.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/user/_has_privileges": { - "get": { + "/_inference/{task_type}/{contextualai_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Check user privileges", - "description": "Determine whether the specified user has a specified list of privileges.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-has-privileges", - "requestBody": { - "$ref": "#/components/requestBodies/security.has_privileges" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.has_privileges-200" - } - }, - "x-state": "Added in 6.4.0", - "x-api-name" : "has_privileges", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Check user privileges", - "description": "Determine whether the specified user has a specified list of privileges.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-has-privileges-1", - "requestBody": { - "$ref": "#/components/requestBodies/security.has_privileges" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.has_privileges-200" - } - }, - "x-state": "Added in 6.4.0", - "x-api-name" : "has_privileges", - "x-namespace": "security" - } - }, - "/_security/user/{user}/_has_privileges": { - "get": { - "tags": [ - "security" - ], - "summary": "Check user privileges", - "description": "Determine whether the specified user has a specified list of privileges.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-has-privileges-2", + "summary": "Create an Contextual AI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `contexualai` service.\n\nTo review the available `rerank` models, refer to .", + "operationId": "inference-put-contextualai", "parameters": [ { - "$ref": "#/components/parameters/security.has_privileges-user" + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskTypeContextualAI" + }, + "style": "simple" + }, + { + "in": "path", + "name": "contextualai_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { - "$ref": "#/components/requestBodies/security.has_privileges" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "service": { + "description": "The type of service supported for the specified task type. In this case, `contextualai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ContextualAIServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `contextualai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ContextualAIServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ContextualAITaskSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutContextualAiRequestExample1": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/contextualai-rerank` to create an inference endpoint for rerank tasks using the Contextual AI service.", + "value": "{\n \"service\": \"contextualai\",\n \"service_settings\": {\n \"api_key\": \"ContextualAI-Api-key\",\n \"model_id\": \"ctxl-rerank-v2-instruct-multilingual-mini\"\n },\n \"task_settings\": {\n \"instruction\": \"Rerank the following documents based on their relevance to the query.\",\n \"top_k\": 3\n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/security.has_privileges-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoContextualAi" + } + } + } } }, - "x-state": "Added in 6.4.0", - "x-api-name" : "has_privileges", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" + "x-state": "Generally available; Added in 9.2.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{contextualai_inference_id}\n
\n " ], - "summary": "Check user privileges", - "description": "Determine whether the specified user has a specified list of privileges.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.", - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges" - }, - "operationId": "security-has-privileges-3", - "parameters": [ - { - "$ref": "#/components/parameters/security.has_privileges-user" - } + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/security.has_privileges" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.has_privileges-200" + "x-api": "put_contextualai.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Added in 6.4.0", - "x-api-name" : "has_privileges", - "x-namespace": "security" + ] } }, - "/_security/profile/_has_privileges": { - "get": { - "tags": [ - "security" - ], - "summary": "Check user profile privileges", - "description": "Determine whether the users associated with the specified user profile IDs have all the requested privileges.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/user-profiles" - }, - "operationId": "security-has-privileges-user-profile", - "requestBody": { - "$ref": "#/components/requestBodies/security.has_privileges_user_profile" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.has_privileges_user_profile-200" - } - }, - "x-state": "Added in 8.3.0", - "x-api-name" : "has_privileges_user_profile", - "x-namespace": "security" - }, - "post": { + "/_inference/{task_type}/{custom_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Check user profile privileges", - "description": "Determine whether the users associated with the specified user profile IDs have all the requested privileges.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/user-profiles" - }, - "operationId": "security-has-privileges-user-profile-1", - "requestBody": { - "$ref": "#/components/requestBodies/security.has_privileges_user_profile" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.has_privileges_user_profile-200" + "summary": "Create a custom inference endpoint", + "description": "The custom service gives more control over how to interact with external inference services that aren't explicitly supported through dedicated integrations.\nThe custom service gives you the ability to define the headers, url, query parameters, request body, and secrets.\nThe custom service supports the template replacement functionality, which enables you to define a template that can be replaced with the value associated with that key.\nTemplates are portions of a string that start with `${` and end with `}`.\nThe parameters `secret_parameters` and `task_settings` are checked for keys for template replacement. Template replacement is supported in the `request`, `headers`, `url`, and `query_parameters`.\nIf the definition (key) is not found for a template, an error message is returned.\nIn case of an endpoint definition like the following:\n```\nPUT _inference/text_embedding/test-text-embedding\n{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"...endpoints.huggingface.cloud/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}\n```\nTo replace `${api_key}` the `secret_parameters` and `task_settings` are checked for a key named `api_key`.\n\n> info\n> Templates should not be surrounded by quotes.\n\nPre-defined templates:\n* `${input}` refers to the array of input strings that comes from the `input` field of the subsequent inference requests.\n* `${input_type}` refers to the input type translation values.\n* `${query}` refers to the query field used specifically for reranking tasks.\n* `${top_n}` refers to the `top_n` field available when performing rerank requests.\n* `${return_documents}` refers to the `return_documents` field available when performing rerank requests.", + "operationId": "inference-put-custom", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.CustomTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "custom_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } - }, - "x-state": "Added in 8.3.0", - "x-api-name" : "has_privileges_user_profile", - "x-namespace": "security" - } - }, - "/_security/oidc/authenticate": { - "post": { - "tags": [ - "security" ], - "summary": "Authenticate OpenID Connect", - "description": "Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.\n\nElasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.\nThese APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.", - "operationId": "security-oidc-authenticate", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "nonce": { - "description": "Associate a client session with an ID token and mitigate replay attacks.\nThis value needs to be the same as the one that was provided to the `/_security/oidc/prepare` API or the one that was generated by Elasticsearch and included in the response to that call.", - "type": "string" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `sparse_embedding` or `text_embedding` task types.\nNot applicable to the `rerank` or `completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "realm": { - "description": "The name of the OpenID Connect realm.\nThis property is useful in cases where multiple realms are defined.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `custom`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CustomServiceType" + } + ] }, - "redirect_uri": { - "description": "The URL to which the OpenID Connect Provider redirected the User Agent in response to an authentication request after a successful authentication.\nThis URL must be provided as-is (URL encoded), taken from the body of the response or as the value of a location header in the response from the OpenID Connect Provider.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model.\nThese settings are specific to the `custom` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CustomServiceSettings" + } + ] }, - "state": { - "description": "Maintain state between the authentication request and the response.\nThis value needs to be the same as the one that was provided to the `/_security/oidc/prepare` API or the one that was generated by Elasticsearch and included in the response to that call.", - "type": "string" + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CustomTaskSettings" + } + ] } }, "required": [ - "nonce", - "redirect_uri", - "state" + "service", + "service_settings" ] }, "examples": { - "OidcAuthenticateRequestExample1": { - "description": "Run `POST /_security/oidc/authenticate` to exchange the response that was returned from the OpenID Connect Provider after a successful authentication for an Elasticsearch access token and refresh token. This example is from an authentication that uses the authorization code grant flow.\n", - "value": "{\n \"redirect_uri\" : \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}" + "PutCustomRequestExample1": { + "summary": "Custom text embedding task (OpenAI)", + "description": "Run `PUT _inference/text_embedding/custom-embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.openai.com/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n },\n \"request\": \"{\\\"input\\\": ${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\": \"$.data[*].embedding[*]\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample2": { + "summary": "Custom rerank task (Cohere APIv2)", + "description": "Run `PUT _inference/rerank/custom-rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.cohere.com/v2/rerank\",\n \"headers\": {\n \"Authorization\": \"bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"documents\\\": ${input}, \\\"query\\\": ${query}, \\\"model\\\": \\\"rerank-v3.5\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"reranked_index\":\"$.results[*].index\",\n \"relevance_score\":\"$.results[*].relevance_score\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample3": { + "summary": "Custom text embedding task (Cohere APIv2)", + "description": "Run `PUT _inference/text_embedding/custom-text-embedding` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.cohere.com/v2/embed\",\n \"headers\": {\n \"Authorization\": \"bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"texts\\\": ${input}, \\\"model\\\": \\\"embed-v4.0\\\", \\\"input_type\\\": ${input_type}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.embeddings.float[*]\"\n }\n },\n \"input_type\": {\n \"translation\": {\n \"ingest\": \"search_document\",\n \"search\": \"search_query\"\n },\n \"default\": \"search_document\"\n }\n }\n}" + }, + "PutCustomRequestExample4": { + "summary": "Custom rerank task (Jina AI)", + "description": "Run `PUT _inference/rerank/custom-rerank-jina` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n }, \n \"url\": \"https://api.jina.ai/v1/rerank\",\n \"headers\": {\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"Bearer ${api_key}\"\n },\n \"request\": \"{\\\"model\\\": \\\"jina-reranker-v2-base-multilingual\\\",\\\"query\\\": ${query},\\\"documents\\\":${input}}\",\n \"response\": {\n \"json_parser\": {\n \"relevance_score\": \"$.results[*].relevance_score\",\n \"reranked_index\": \"$.results[*].index\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample5": { + "summary": "Custom text embedding task (Hugging Face)", + "description": "Run `PUT _inference/text_embedding/custom-text-embedding-hf` to create an inference endpoint that performs a text embedding task by using the Qwen/Qwen3-Embedding-8B model.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}" } } } @@ -37360,78 +42848,98 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "access_token": { - "description": "The Elasticsearch access token.", - "type": "string" - }, - "expires_in": { - "description": "The duration (in seconds) of the tokens.", - "type": "number" - }, - "refresh_token": { - "description": "The Elasticsearch refresh token.", - "type": "string" - }, - "type": { - "description": "The type of token.", - "type": "string" - } - }, - "required": [ - "access_token", - "expires_in", - "refresh_token", - "type" - ] - }, - "examples": { - "OidcAuthenticateResponseExample1": { - "description": "A successful response from `POST /_security/oidc/authenticate`. It contains the access and refresh tokens that were generated, the token duration (in seconds), and the type.\n", - "value": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoCustom" } } } } }, - "x-api-name" : "oidc_authenticate", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.19.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{custom_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_custom.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/oidc/logout": { - "post": { + "/_inference/{task_type}/{deepseek_inference_id}": { + "put": { "tags": [ - "security" + "inference" + ], + "summary": "Create a DeepSeek inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `deepseek` service.", + "operationId": "inference-put-deepseek", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskTypeDeepSeek" + }, + "style": "simple" + }, + { + "in": "path", + "name": "deepseek_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } ], - "summary": "Logout of OpenID Connect", - "description": "Invalidate an access token and a refresh token that were generated as a response to the `/_security/oidc/authenticate` API.\n\nIf the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout.\n\nElasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.\nThese APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.", - "operationId": "security-oidc-logout", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "token": { - "description": "The access token to be invalidated.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `deepseek`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.DeepSeekServiceType" + } + ] }, - "refresh_token": { - "description": "The refresh token to be invalidated.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model.\nThese settings are specific to the `deepseek` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.DeepSeekServiceSettings" + } + ] } }, "required": [ - "token" + "service", + "service_settings" ] - }, - "examples": { - "OidcLogoutRequestExample1": { - "description": "Run `POST /_security/oidc/logout` to perform the logout.", - "value": "{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}" - } } } }, @@ -37443,82 +42951,148 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "redirect": { - "description": "A URI that points to the end session endpoint of the OpenID Connect Provider with all the parameters of the logout request as HTTP GET parameters.", - "type": "string" - } - }, - "required": [ - "redirect" - ] - }, - "examples": { - "OidcLogoutResponseExample1": { - "description": "A successful response from `POST /_security/oidc/logout`, which contains the URI pointing to the End Session Endpoint of the OpenID Connect Provider with all the parameters of the Logout Request as HTTP GET parameters.", - "value": "{\n \"redirect\" : \"https://op-provider.org/logout?id_token_hint=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&post_logout_redirect_uri=http%3A%2F%2Foidc-kibana.elastic.co%2Floggedout&state=lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\"\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoDeepSeek" } } } } }, - "x-api-name" : "oidc_logout", - "x-namespace": "security" + "x-state": "Generally available; Added in 9.1.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{deepseek_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_deepseek.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/oidc/prepare": { - "post": { + "/_inference/{task_type}/{elasticsearch_inference_id}": { + "put": { "tags": [ - "security" + "inference" + ], + "summary": "Create an Elasticsearch inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `elasticsearch` service.\n\n> info\n> Your Elasticsearch deployment contains preconfigured ELSER and E5 inference endpoints, you only need to create the enpoints using the API if you want to customize the settings.\n\nIf you use the ELSER or the E5 model through the `elasticsearch` service, the API request will automatically download and deploy the model if it isn't downloaded yet.\n\n> info\n> You might see a 502 bad gateway error in the response when using the Kibana Console. This error usually just reflects a timeout, while the model downloads in the background. You can check the download progress in the Machine Learning UI. If using the Python client, you can set the timeout parameter to a higher value.\n\nAfter creating the endpoint, wait for the model deployment to complete before using it.\nTo verify the deployment status, use the get trained model statistics API.\nLook for `\"state\": \"fully_allocated\"` in the response and ensure that the `\"allocation_count\"` matches the `\"target_allocation_count\"`.\nAvoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.", + "operationId": "inference-put-elasticsearch", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.ElasticsearchTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "elasticsearch_inference_id", + "description": "The unique identifier of the inference endpoint.\nThe must not match the `model_id`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } ], - "summary": "Prepare OpenID connect authentication", - "description": "Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch.\n\nThe response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process.\n\nElasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.\nThese APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.", - "operationId": "security-oidc-prepare-authentication", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "iss": { - "description": "In the case of a third party initiated single sign on, this is the issuer identifier for the OP that the RP is to send the authentication request to.\nIt cannot be specified when *realm* is specified.\nOne of *realm* or *iss* is required.", - "type": "string" - }, - "login_hint": { - "description": "In the case of a third party initiated single sign on, it is a string value that is included in the authentication request as the *login_hint* parameter.\nThis parameter is not valid when *realm* is specified.", - "type": "string" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `sparse_embedding` and `text_embedding` task types.\nNot applicable to the `rerank` task type.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "nonce": { - "description": "The value used to associate a client session with an ID token and to mitigate replay attacks.\nIf the caller of the API does not provide a value, Elasticsearch will generate one with sufficient entropy and return it in the response.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `elasticsearch`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ElasticsearchServiceType" + } + ] }, - "realm": { - "description": "The name of the OpenID Connect realm in Elasticsearch the configuration of which should be used in order to generate the authentication request.\nIt cannot be specified when *iss* is specified.\nOne of *realm* or *iss* is required.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `elasticsearch` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ElasticsearchServiceSettings" + } + ] }, - "state": { - "description": "The value used to maintain state between the authentication request and the response, typically used as a Cross-Site Request Forgery mitigation.\nIf the caller of the API does not provide a value, Elasticsearch will generate one with sufficient entropy and return it in the response.", - "type": "string" + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ElasticsearchTaskSettings" + } + ] } - } + }, + "required": [ + "service", + "service_settings" + ] }, "examples": { - "OidcPrepareAuthenticationRequestExample1": { - "summary": "Prepare with realm", - "description": "Run `POST /_security/oidc/prepare` to generate an authentication request for the OpenID Connect Realm `oidc1`.\n", - "value": "{\n \"realm\" : \"oidc1\"\n}" + "PutElasticsearchRequestExample1": { + "summary": "ELSER sparse embedding task", + "description": "Run `PUT _inference/sparse_embedding/my-elser-model` to create an inference endpoint that performs a `sparse_embedding` task. The `model_id` must be the ID of one of the built-in ELSER models. The API will automatically download the ELSER model if it isn't already downloaded and then deploy the model.", + "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": { \n \"enabled\": true,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n },\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\" \n }\n}" }, - "OidcPrepareAuthenticationRequestExample2": { - "summary": "Prepare with realm, state, and nonce", - "description": "Run `POST /_security/oidc/prepare` to generate an authentication request for the OpenID Connect Realm `oidc1`, where the values for the `state` and the `nonce` have been generated by the client.\n", - "value": "{\n \"realm\" : \"oidc1\",\n \"state\" : \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n \"nonce\" : \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\"\n}" + "PutElasticsearchRequestExample2": { + "summary": "Elastic rerank task", + "description": "Run `PUT _inference/rerank/my-elastic-rerank` to create an inference endpoint that performs a rerank task using the built-in Elastic Rerank cross-encoder model. The `model_id` must be `.rerank-v1`, which is the ID of the built-in Elastic Rerank model. The API will automatically download the Elastic Rerank model if it isn't already downloaded and then deploy the model. Once deployed, the model can be used for semantic re-ranking with a `text_similarity_reranker` retriever.", + "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"model_id\": \".rerank-v1\", \n \"num_threads\": 1,\n \"adaptive_allocations\": { \n \"enabled\": true,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n }\n }\n}" }, - "OidcPrepareAuthenticationRequestExample3": { - "summary": "Prepare by realm", - "description": "Run `POST /_security/oidc/prepare` to generate an authentication request for a third party initiated single sign on. Specify the issuer that should be used for matching the appropriate OpenID Connect Authentication realm.\n", - "value": "{\n \"iss\" : \"http://127.0.0.1:8080\",\n \"login_hint\": \"this_is_an_opaque_string\"\n}" + "PutElasticsearchRequestExample3": { + "summary": "E5 text embedding task", + "description": "Run `PUT _inference/text_embedding/my-e5-model` to create an inference endpoint that performs a `text_embedding` task. The `model_id` must be the ID of one of the built-in E5 models. The API will automatically download the E5 model if it isn't already downloaded and then deploy the model.", + "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1,\n \"model_id\": \".multilingual-e5-small\" \n }\n}" + }, + "PutElasticsearchRequestExample4": { + "summary": "Eland text embedding task", + "description": "Run `PUT _inference/text_embedding/my-msmarco-minilm-model` to create an inference endpoint that performs a `text_embedding` task with a model that was uploaded by Eland.", + "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1,\n \"model_id\": \"msmarco-MiniLM-L12-cos-v5\" \n }\n}" + }, + "PutElasticsearchRequestExample5": { + "summary": "Adaptive allocation", + "description": "Run `PUT _inference/text_embedding/my-e5-model` to create an inference endpoint that performs a `text_embedding` task and to configure adaptive allocations. The API request will automatically download the E5 model if it isn't already downloaded and then deploy the model.", + "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 3,\n \"max_number_of_allocations\": 10\n },\n \"num_threads\": 1,\n \"model_id\": \".multilingual-e5-small\"\n }\n}" + }, + "PutElasticsearchRequestExample6": { + "summary": "Existing model deployment", + "description": "Run `PUT _inference/sparse_embedding/use_existing_deployment` to use an already existing model deployment when creating an inference endpoint.", + "value": "{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"deployment_id\": \".elser_model_2\"\n }\n}" } } } @@ -37531,233 +43105,126 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "nonce": { - "type": "string" - }, - "realm": { - "type": "string" - }, - "redirect": { - "description": "A URI that points to the authorization endpoint of the OpenID Connect Provider with all the parameters of the authentication request as HTTP GET parameters.", - "type": "string" - }, - "state": { - "type": "string" - } - }, - "required": [ - "nonce", - "realm", - "redirect", - "state" - ] + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoElasticsearch" }, "examples": { - "OidcPrepareAuthenticationResponseExample1": { - "description": "A successful response from `POST /_security/oidc/prepare`. It contains the URI pointing to the Authorization Endpoint of the OpenID Connect Provider with all the parameters of the Authentication Request as HTTP GET parameters.\n", - "value": "{\n \"redirect\" : \"http://127.0.0.1:8080/c2id-login?scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I&nonce=WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM&client_id=elasticsearch-rp\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}" + "PutElasticsearchResponseExample1": { + "description": "A successful response from `PUT _inference/sparse_embedding/use_existing_deployment`. It contains the model ID and the threads and allocations settings from the model deployment.\n", + "value": "{\n \"inference_id\": \"use_existing_deployment\",\n \"task_type\": \"sparse_embedding\",\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 2,\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\",\n \"deployment_id\": \".elser_model_2\"\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" } } } } } }, - "x-api-name" : "oidc_prepare_authentication", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{elasticsearch_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_elasticsearch.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/_query/api_key": { - "get": { + "/_inference/{task_type}/{elser_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Find API keys with a query", - "description": "Get a paginated list of API keys and their information.\nYou can optionally filter the results with a query.\n\nTo use this API, you must have at least the `manage_own_api_key` or the `read_security` cluster privileges.\nIf you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.\nIf you have the `read_security`, `manage_api_key`, or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.", - "operationId": "security-query-api-keys", + "summary": "Create an ELSER inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `elser` service.\nYou can also deploy ELSER by using the Elasticsearch inference integration.\n\n> info\n> Your Elasticsearch deployment contains a preconfigured ELSER inference endpoint, you only need to create the enpoint using the API if you want to customize the settings.\n\nThe API request will automatically download and deploy the ELSER model if it isn't already downloaded.\n\n> info\n> You might see a 502 bad gateway error in the response when using the Kibana Console. This error usually just reflects a timeout, while the model downloads in the background. You can check the download progress in the Machine Learning UI. If using the Python client, you can set the timeout parameter to a higher value.\n\nAfter creating the endpoint, wait for the model deployment to complete before using it.\nTo verify the deployment status, use the get trained model statistics API.\nLook for `\"state\": \"fully_allocated\"` in the response and ensure that the `\"allocation_count\"` matches the `\"target_allocation_count\"`.\nAvoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.", + "operationId": "inference-put-elser", "parameters": [ { - "$ref": "#/components/parameters/security.query_api_keys-with_limited_by" - }, - { - "$ref": "#/components/parameters/security.query_api_keys-with_profile_uid" - }, - { - "$ref": "#/components/parameters/security.query_api_keys-typed_keys" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.query_api_keys" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.query_api_keys-200" - } - }, - "x-state": "Added in 7.15.0", - "x-api-name" : "query_api_keys", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Find API keys with a query", - "description": "Get a paginated list of API keys and their information.\nYou can optionally filter the results with a query.\n\nTo use this API, you must have at least the `manage_own_api_key` or the `read_security` cluster privileges.\nIf you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.\nIf you have the `read_security`, `manage_api_key`, or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.", - "operationId": "security-query-api-keys-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.query_api_keys-with_limited_by" + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.ElserTaskType" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.query_api_keys-with_profile_uid" + "in": "path", + "name": "elser_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/security.query_api_keys-typed_keys" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.query_api_keys" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.query_api_keys-200" - } - }, - "x-state": "Added in 7.15.0", - "x-api-name" : "query_api_keys", - "x-namespace": "security" - } - }, - "/_security/_query/role": { - "get": { - "tags": [ - "security" - ], - "summary": "Find roles with a query", - "description": "Get roles in a paginated manner.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe query roles API does not retrieve roles that are defined in roles files, nor built-in ones.\nYou can optionally filter the results with a query.\nAlso, the results can be paginated and sorted.", - "operationId": "security-query-role", - "requestBody": { - "$ref": "#/components/requestBodies/security.query_role" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.query_role-200" - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "query_role", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Find roles with a query", - "description": "Get roles in a paginated manner.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe query roles API does not retrieve roles that are defined in roles files, nor built-in ones.\nYou can optionally filter the results with a query.\nAlso, the results can be paginated and sorted.", - "operationId": "security-query-role-1", - "requestBody": { - "$ref": "#/components/requestBodies/security.query_role" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.query_role-200" - } - }, - "x-state": "Added in 8.15.0", - "x-api-name" : "query_role", - "x-namespace": "security" - } - }, - "/_security/_query/user": { - "get": { - "tags": [ - "security" - ], - "summary": "Find users with a query", - "description": "Get information for users in a paginated manner.\nYou can optionally filter the results with a query.\n\nNOTE: As opposed to the get user API, built-in users are excluded from the result.\nThis API is only for native users.", - "operationId": "security-query-user", - "parameters": [ - { - "$ref": "#/components/parameters/security.query_user-with_profile_uid" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.query_user" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.query_user-200" - } - }, - "x-state": "Added in 8.14.0", - "x-api-name" : "query_user", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Find users with a query", - "description": "Get information for users in a paginated manner.\nYou can optionally filter the results with a query.\n\nNOTE: As opposed to the get user API, built-in users are excluded from the result.\nThis API is only for native users.", - "operationId": "security-query-user-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.query_user-with_profile_uid" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.query_user" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.query_user-200" + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - }, - "x-state": "Added in 8.14.0", - "x-api-name" : "query_user", - "x-namespace": "security" - } - }, - "/_security/saml/authenticate": { - "post": { - "tags": [ - "security" ], - "summary": "Authenticate SAML", - "description": "Submit a SAML response message to Elasticsearch for consumption.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThe SAML message that is submitted can be:\n\n* A response to a SAML authentication request that was previously created using the SAML prepare authentication API.\n* An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow.\n\nIn either case, the SAML message needs to be a base64 encoded XML document with a root element of ``.\n\nAfter successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.\nThis API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml" - }, - "operationId": "security-saml-authenticate", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "content": { - "description": "The SAML response as it was sent by the user's browser, usually a Base64 encoded XML document.", - "type": "string" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nNote that for ELSER endpoints, the max_chunk_size may not exceed `300`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "ids": { - "$ref": "#/components/schemas/_types.Ids" + "service": { + "description": "The type of service supported for the specified task type. In this case, `elser`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ElserServiceType" + } + ] }, - "realm": { - "description": "The name of the realm that should authenticate the SAML response. Useful in cases where many SAML realms are defined.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `elser` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ElserServiceSettings" + } + ] } }, "required": [ - "content", - "ids" + "service", + "service_settings" ] }, "examples": { - "SamlAuthenticateRequestExample1": { - "description": "Run `POST /_security/saml/authenticate` to exchange a SAML Response indicating a successful authentication at the SAML IdP for an Elasticsearch access token and refresh token to be used in subsequent requests.\n", - "value": "{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : [\"4fee3b046395c4e751011e97f8900b5273d56685\"]\n}" + "PutElserRequestExample1": { + "summary": "A sparse embedding task", + "description": "Run `PUT _inference/sparse_embedding/my-elser-model` to create an inference endpoint that performs a `sparse_embedding` task. The request will automatically download the ELSER model if it isn't already downloaded and then deploy the model.", + "value": "{\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n }\n}" + }, + "PutElserRequestExample2": { + "summary": "Adaptive allocations", + "description": "Run `PUT _inference/sparse_embedding/my-elser-model` to create an inference endpoint that performs a `sparse_embedding` task with adaptive allocations. When adaptive allocations are enabled, the number of allocations of the model is set automatically based on the current load.", + "value": "{\n \"service\": \"elser\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 3,\n \"max_number_of_allocations\": 10\n },\n \"num_threads\": 1\n }\n}" } } } @@ -37770,100 +43237,122 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "access_token": { - "description": "The access token that was generated by Elasticsearch.", - "type": "string" - }, - "username": { - "description": "The authenticated user's name.", - "type": "string" - }, - "expires_in": { - "description": "The amount of time (in seconds) left until the token expires.", - "type": "number" - }, - "refresh_token": { - "description": "The refresh token that was generated by Elasticsearch.", - "type": "string" - }, - "realm": { - "description": "The name of the realm where the user was authenticated.", - "type": "string" - } - }, - "required": [ - "access_token", - "username", - "expires_in", - "refresh_token", - "realm" - ] + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoELSER" }, "examples": { - "SamlAuthenticateResponseExample1": { - "description": "A successful response from `POST /_security/saml/authenticate`.", - "value": "{\n \"access_token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"username\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"mJdXLtmvTUSpoLwMvdBt_w\",\n \"realm\": \"saml1\"\n}" + "PutElserResponseExample1": { + "description": "A successful response when creating an ELSER inference endpoint.", + "value": "{\n \"inference_id\": \"my-elser-model\",\n \"task_type\": \"sparse_embedding\",\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n },\n \"task_settings\": {}\n}" } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "saml_authenticate", - "x-namespace": "security" + "deprecated": true, + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{elser_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_elser.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/saml/complete_logout": { - "post": { + "/_inference/{task_type}/{googleaistudio_inference_id}": { + "put": { "tags": [ - "security" + "inference" + ], + "summary": "Create an Google AI Studio inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `googleaistudio` service.", + "operationId": "inference-put-googleaistudio", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.GoogleAiStudioTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "googleaistudio_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } ], - "summary": "Logout of SAML completely", - "description": "Verifies the logout response sent from the SAML IdP.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThe SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout.\nThis API verifies the response by ensuring the content is relevant and validating its signature.\nAn empty response is returned if the verification process is successful.\nThe response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding.\nThe caller of this API must prepare the request accordingly so that this API can handle either of them.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml" - }, - "operationId": "security-saml-complete-logout", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "realm": { - "description": "The name of the SAML realm in Elasticsearch for which the configuration is used to verify the logout response.", - "type": "string" - }, - "ids": { - "$ref": "#/components/schemas/_types.Ids" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `completion` task type.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "query_string": { - "description": "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.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `googleaistudio`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.GoogleAiServiceType" + } + ] }, - "content": { - "description": "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.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `googleaistudio` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.GoogleAiStudioServiceSettings" + } + ] } }, "required": [ - "realm", - "ids" + "service", + "service_settings" ] }, "examples": { - "SamlCompleteLogoutRequestExample1": { - "summary": "HTTP-Redirect binding", - "description": "Run `POST /_security/saml/complete_logout` to verify the logout response sent by the SAML IdP using the HTTP-Redirect binding.\n", - "value": "{\n \"realm\": \"saml1\",\n \"ids\": [ \"_1c368075e0b3...\" ],\n \"query_string\": \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\"\n}" - }, - "SamlCompleteLogoutRequestExample2": { - "summary": "HTTP-Post binding", - "description": "Run `POST /_security/saml/complete_logout` to verify the logout response sent by the SAML IdP using the HTTP-Post binding.\n", - "value": "{\n \"realm\": \"saml1\",\n \"ids\": [ \"_1c368075e0b3...\" ],\n \"content\": \"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...\"\n}" + "PutGoogleAiStudioRequestExample1": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/google_ai_studio_completion` to create an inference endpoint to perform a `completion` task type.", + "value": "{\n \"service\": \"googleaistudio\",\n \"service_settings\": {\n \"api_key\": \"api-key\",\n \"model_id\": \"model-id\"\n }\n}" } } } @@ -37874,53 +43363,230 @@ "200": { "description": "", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoGoogleAIStudio" + } + } } } }, - "x-state": "Added in 7.14.0", - "x-api-name" : "saml_complete_logout", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{googleaistudio_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_googleaistudio.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/saml/invalidate": { - "post": { + "/_inference/{task_type}/{googlevertexai_inference_id}": { + "put": { "tags": [ - "security" + "inference" + ], + "summary": "Create a Google Vertex AI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `googlevertexai` service.", + "operationId": "inference-put-googlevertexai", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.GoogleVertexAITaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "googlevertexai_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } ], - "summary": "Invalidate SAML", - "description": "Submit a SAML LogoutRequest message to Elasticsearch for consumption.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThe logout request comes from the SAML IdP during an IdP initiated Single Logout.\nThe custom web application can use this API to have Elasticsearch process the `LogoutRequest`.\nAfter successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message.\nThus the user can be redirected back to their IdP.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml" - }, - "operationId": "security-saml-invalidate", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "acs": { - "description": "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.", - "type": "string" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank`, `completion`, or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "query_string": { - "description": "The query part of the URL that the user was redirected to by the SAML IdP to initiate the Single Logout.\nThis query should include a single parameter named `SAMLRequest` that contains a SAML logout request that is deflated and Base64 encoded.\nIf 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.\nIn 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.\nThe client application must not attempt to parse or process the string in any way.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `googlevertexai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.GoogleVertexAIServiceType" + } + ] }, - "realm": { - "description": "The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the `acs` parameter.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `googlevertexai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.GoogleVertexAIServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.GoogleVertexAITaskSettings" + } + ] } }, "required": [ - "query_string" + "service", + "service_settings" ] }, "examples": { - "SamlInvalidateRequestExample1": { - "description": "Run `POST /_security/saml/invalidate` to invalidate all the tokens for realm `saml1` pertaining to the user that is identified in the SAML Logout Request.\n", - "value": "{\n \"query_string\" : \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" : \"saml1\"\n}" + "PutGoogleVertexAiRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/google_vertex_ai_embeddings` to create an inference endpoint to perform a `text_embedding` task type.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"model_id\": \"model-id\",\n \"location\": \"location\",\n \"project_id\": \"project-id\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample10": { + "summary": "A chat_completion task for Google Model Garden Meta shared endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_meta_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Meta's model hosted on Google Model Garden shared endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"meta\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample11": { + "summary": "A completion task for Google Model Garden Hugging Face dedicated endpoint with single URL provided for both streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_hugging_face_completion` to create an inference endpoint to perform a `completion` task using Hugging Face's model hosted on Google Model Garden dedicated endpoint with single URL provided for both streaming and non-streaming tasks. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"hugging_face\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample12": { + "summary": "A chat_completion task for Google Model Garden Hugging Face dedicated endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_hugging_face_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Hugging Face's model hosted on Google Model Garden dedicated endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"hugging_face\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample13": { + "summary": "A completion task for Google Model Garden Hugging Face shared endpoint with single URL provided for both streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_hugging_face_completion` to create an inference endpoint to perform a `completion` task using Hugging Face's model hosted on Google Model Garden shared endpoint with single URL provided for both streaming and non-streaming tasks. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"hugging_face\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample14": { + "summary": "A chat_completion task for Google Model Garden Hugging Face shared endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_hugging_face_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Hugging Face's model hosted on Google Model Garden shared endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"hugging_face\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample15": { + "summary": "A completion task for Google Model Garden Mistral serverless endpoint with separate URLs for streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_mistral_completion` to create an inference endpoint to perform a `completion` task using Mistral's serverless model hosted on Google Model Garden with separate URLs for streaming and non-streaming tasks. See the Mistral model documentation for instructions on how to construct URLs.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"mistral\",\n \"model_id\": \"mistral-small-2503\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/mistralai/models/%MODEL_ID%:rawPredict\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/mistralai/models/%MODEL_ID%:streamRawPredict\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample16": { + "summary": "A chat_completion task for Google Model Garden Mistral serverless endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_mistral_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Mistral's serverless model hosted on Google Model Garden with single streaming URL provided. See the Mistral model documentation for instructions on how to construct the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"mistral\",\n \"model_id\": \"mistral-small-2503\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/mistralai/models/%MODEL_ID%:streamRawPredict\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample17": { + "summary": "A completion task for Google Model Garden Mistral dedicated endpoint with single URL provided for both streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_mistral_completion` to create an inference endpoint to perform a `completion` task using Mistral's model hosted on Google Model Garden dedicated endpoint with single URL provided for both streaming and non-streaming tasks. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"mistral\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample18": { + "summary": "A chat_completion task for Google Model Garden Mistral dedicated endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_mistral_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Mistral's model hosted on Google Model Garden dedicated endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"mistral\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample19": { + "summary": "A completion task for Google Model Garden Mistral shared endpoint with single URL provided for both streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_mistral_completion` to create an inference endpoint to perform a `completion` task using Mistral's model hosted on Google Model Garden shared endpoint with single URL provided for both streaming and non-streaming tasks. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"mistral\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample2": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/google_vertex_ai_rerank` to create an inference endpoint to perform a `rerank` task type.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"project_id\": \"project-id\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample20": { + "summary": "A chat_completion task for Google Model Garden Mistral shared endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_mistral_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Mistral's model hosted on Google Model Garden shared endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"mistral\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample21": { + "summary": "A completion task for Google Model Garden AI21 serverless endpoint with separate URLs for streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_ai21_completion` to create an inference endpoint to perform a `completion` task using AI21's model hosted on Google Model Garden serverless endpoint with separate URLs for streaming and non-streaming tasks. See the AI21 model documentation for instructions on how to construct URLs.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"ai21\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/ai21/models/%MODEL_ID%:rawPredict\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/ai21/models/%MODEL_ID%:streamRawPredict\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample22": { + "summary": "A chat_completion task for Google Model Garden AI21 serverless endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_ai21_chat_completion` to create an inference endpoint to perform a `chat_completion` task using AI21's model hosted on Google Model Garden serverless endpoint with single streaming URL provided. See the AI21 model documentation for instructions on how to construct URLs.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"ai21\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/ai21/models/%MODEL_ID%:streamRawPredict\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample3": { + "summary": "A completion task for Google Model Garden Anthropic serverless endpoint with separate URLs for streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_anthropic_completion` to create an inference endpoint to perform a `completion` task using Anthropic's serverless model hosted on Google Model Garden with separate URLs for streaming and non-streaming tasks. See the Anthropic model documentation for instructions on how to construct URLs.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"anthropic\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/anthropic/models/%MODEL_ID%:rawPredict\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/anthropic/models/%MODEL_ID%:streamRawPredict\"\n },\n \"task_settings\": {\n \"max_tokens\": 128\n }\n}" + }, + "PutGoogleVertexAiRequestExample4": { + "summary": "A chat_completion task for Google Model Garden Anthropic serverless endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_anthropic_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Anthropic's serverless model hosted on Google Model Garden with single streaming URL provided. See the Anthropic model documentation for instructions on how to construct the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"anthropic\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/anthropic/models/%MODEL_ID%:streamRawPredict\"\n },\n \"task_settings\": {\n \"max_tokens\": 128\n }\n}" + }, + "PutGoogleVertexAiRequestExample5": { + "summary": "A completion task for Google Model Garden Meta serverless endpoint with single URL provided for both streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_meta_completion` to create an inference endpoint to perform a `completion` task using Meta's serverless model hosted on Google Model Garden with single URL provided for both streaming and non-streaming tasks. See the Meta model documentation for instructions on how to construct the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"meta\",\n \"model_id\": \"meta/llama-3.3-70b-instruct-maas\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/openapi/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample6": { + "summary": "A chat_completion task for Google Model Garden Meta serverless endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_meta_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Meta's serverless model hosted on Google Model Garden with single streaming URL provided. See the Meta model documentation for instructions on how to construct the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"meta\",\n \"model_id\": \"meta/llama-3.3-70b-instruct-maas\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/openapi/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample7": { + "summary": "A completion task for Google Model Garden Meta dedicated endpoint with single URL provided for both streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_meta_completion` to create an inference endpoint to perform a `completion` task using Meta's model hosted on Google Model Garden dedicated endpoint with single URL provided for both streaming and non-streaming tasks. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"meta\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%ENDPOINT_ID%.%LOCATION_ID%-fasttryout.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample8": { + "summary": "A chat_completion task for Google Model Garden Meta dedicated endpoint with single streaming URL provided", + "description": "Run `PUT _inference/chat_completion/google_model_garden_meta_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Meta's model hosted on Google Model Garden dedicated endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"meta\",\n \"service_account_json\": \"service-account-json\",\n \"streaming_url\": \"https://%ENDPOINT_ID%.%LOCATION_ID%-fasttryout.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" + }, + "PutGoogleVertexAiRequestExample9": { + "summary": "A completion task for Google Model Garden Meta shared endpoint with single URL provided for both streaming and non-streaming tasks", + "description": "Run `PUT _inference/completion/google_model_garden_meta_completion` to create an inference endpoint to perform a `completion` task using Meta's model hosted on Google Model Garden shared endpoint with single URL provided for both streaming and non-streaming tasks. See the endpoint's `Sample request` page for the variable values used in the URL.", + "value": "{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"provider\": \"meta\",\n \"service_account_json\": \"service-account-json\",\n \"url\": \"https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions\"\n }\n}" } } } @@ -37933,76 +43599,103 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "invalidated": { - "description": "The number of tokens that were invalidated as part of this logout.", - "type": "number" - }, - "realm": { - "description": "The realm name of the SAML realm in Elasticsearch that authenticated the user.", - "type": "string" - }, - "redirect": { - "description": "A SAML logout response as a parameter so that the user can be redirected back to the SAML IdP.", - "type": "string" - } - }, - "required": [ - "invalidated", - "realm", - "redirect" - ] - }, - "examples": { - "SamlInvalidateResponseExample1": { - "description": "A successful response from `POST /_security/saml/invalidate`.", - "value": "{\n \"redirect\" : \"https://my-idp.org/logout/SAMLResponse=....\",\n \"invalidated\" : 2,\n \"realm\" : \"saml1\"\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoGoogleVertexAI" } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "saml_invalidate", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{googlevertexai_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_googlevertexai.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/saml/logout": { - "post": { + "/_inference/{task_type}/{groq_inference_id}": { + "put": { "tags": [ - "security" + "inference" + ], + "summary": "Create a Groq inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `groq` service.", + "operationId": "inference-put-groq", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.GroqTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "groq_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } ], - "summary": "Logout of SAML", - "description": "Submits a request to invalidate an access token and refresh token.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThis API invalidates the tokens that were generated for a user by the SAML authenticate API.\nIf the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout).", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml" - }, - "operationId": "security-saml-logout", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "token": { - "description": "The access token that was returned as a response to calling the SAML authenticate API.\nAlternatively, the most recent token that was received after refreshing the original one by using a `refresh_token`.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `groq`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.GroqServiceType" + } + ] }, - "refresh_token": { - "description": "The refresh token that was returned as a response to calling the SAML authenticate API.\nAlternatively, the most recent refresh token that was received after refreshing the original access token.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `groq` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.GroqServiceSettings" + } + ] } }, "required": [ - "token" + "service", + "service_settings" ] }, "examples": { - "SamlLogoutRequestExample1": { - "description": "Run `POST /_security/saml/logout` to invalidate the pair of tokens that were generated by calling the SAML authenticate API with a successful SAML response.\n", - "value": "{\n \"token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\" : \"mJdXLtmvTUSpoLwMvdBt_w\"\n}" + "PutGroqRequestExample1": { + "description": "Run `PUT _inference/chat_completion/groq-chat-completion` to create a Groq inference endpoint that performs a `chat_completion` task.", + "value": "{\n \"service\": \"groq\",\n \"service_settings\": {\n \"api_key\": \"groq-api-key\",\n \"model_id\": \"llama-3.3-70b-versatile\" \n }\n}" } } } @@ -38015,73 +43708,128 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "redirect": { - "description": "A URL that contains a SAML logout request as a parameter.\nYou can use this URL to be redirected back to the SAML IdP and to initiate Single Logout.", - "type": "string" - } - }, - "required": [ - "redirect" - ] - }, - "examples": { - "SamlLogoutResponseExample1": { - "description": "A successful response from `POST /_security/saml/logout`.", - "value": "{\n \"redirect\" : \"https://my-idp.org/logout/SAMLRequest=....\"\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoGroq" } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "saml_logout", - "x-namespace": "security" + "x-state": "Generally available; Added in 9.3.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{groq_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_groq.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/saml/prepare": { - "post": { + "/_inference/{task_type}/{huggingface_inference_id}": { + "put": { "tags": [ - "security" + "inference" + ], + "summary": "Create a Hugging Face inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `hugging_face` service.\nSupported tasks include: `text_embedding`, `completion`, and `chat_completion`.\n\nTo configure the endpoint, first visit the Hugging Face Inference Endpoints page and create a new endpoint.\nSelect a model that supports the task you intend to use.\n\nFor Elastic's `text_embedding` task:\nThe selected model must support the `Sentence Embeddings` task. On the new endpoint creation page, select the `Sentence Embeddings` task under the `Advanced Configuration` section.\nAfter the endpoint has initialized, copy the generated endpoint URL.\nRecommended models for `text_embedding` task:\n\n* `all-MiniLM-L6-v2`\n* `all-MiniLM-L12-v2`\n* `all-mpnet-base-v2`\n* `e5-base-v2`\n* `e5-small-v2`\n* `multilingual-e5-base`\n* `multilingual-e5-small`\n\nFor Elastic's `chat_completion` and `completion` tasks:\nThe selected model must support the `Text Generation` task and expose OpenAI API. HuggingFace supports both serverless and dedicated endpoints for `Text Generation`. When creating dedicated endpoint select the `Text Generation` task.\nAfter the endpoint is initialized (for dedicated) or ready (for serverless), ensure it supports the OpenAI API and includes `/v1/chat/completions` part in URL. Then, copy the full endpoint URL for use.\nRecommended models for `chat_completion` and `completion` tasks:\n\n* `Mistral-7B-Instruct-v0.2`\n* `QwQ-32B`\n* `Phi-3-mini-128k-instruct`\n\nFor Elastic's `rerank` task:\nThe selected model must support the `sentence-ranking` task and expose OpenAI API.\nHuggingFace supports only dedicated (not serverless) endpoints for `Rerank` so far.\nAfter the endpoint is initialized, copy the full endpoint URL for use.\nTested models for `rerank` task:\n\n* `bge-reranker-base`\n* `jina-reranker-v1-turbo-en-GGUF`", + "operationId": "inference-put-hugging-face", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.HuggingFaceTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "huggingface_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } ], - "summary": "Prepare SAML authentication", - "description": "Create a SAML authentication request (``) as a URL string based on the configuration of the respective SAML realm in Elasticsearch.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThis API returns a URL pointing to the SAML Identity Provider.\nYou can use the URL to redirect the browser of the user in order to continue the authentication process.\nThe URL includes a single parameter named `SAMLRequest`, which contains a SAML Authentication request that is deflated and Base64 encoded.\nIf the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named `SigAlg` and `Signature`.\nThese parameters contain the algorithm used for the signature and the signature value itself.\nIt also returns a random string that uniquely identifies this SAML Authentication request.\nThe caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml" - }, - "operationId": "security-saml-prepare-authentication", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "acs": { - "description": "The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch.\nThe realm is used to generate the authentication request. You must specify either this parameter or the `realm` parameter.", - "type": "string" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank`, `completion`, or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "realm": { - "description": "The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request.\nYou must specify either this parameter or the `acs` parameter.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `hugging_face`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.HuggingFaceServiceType" + } + ] }, - "relay_state": { - "description": "A string that will be included in the redirect URL that this API returns as the `RelayState` query parameter.\nIf the Authentication Request is signed, this value is used as part of the signature computation.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `hugging_face` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.HuggingFaceServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.HuggingFaceTaskSettings" + } + ] } - } + }, + "required": [ + "service", + "service_settings" + ] }, "examples": { - "SamlPrepareAuthenticationRequestExample1": { - "summary": "Prepare with a realm", - "description": "Run `POST /_security/saml/prepare` to generate a SAML authentication request for the SAML realm named `saml1`.\n", - "value": "{\n \"realm\" : \"saml1\"\n}" + "PutHuggingFaceRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/hugging-face-embeddings` to create an inference endpoint that performs a `text_embedding` task type.", + "value": "{\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\", \n \"url\": \"url-endpoint\" \n }\n}" }, - "SamlPrepareAuthenticationRequestExample2": { - "summary": "Prepare with an ACS", - "description": "Run `POST /_security/saml/prepare` to generate a SAML authentication request for the SAML realm with an Assertion Consuming Service (ACS) URL.\n", - "value": "{\n \"acs\" : \"https://kibana.org/api/security/saml/callback\"\n}" + "PutHuggingFaceRequestExample2": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/hugging-face-rerank` to create an inference endpoint that performs a `rerank` task type.", + "value": "{\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\", \n \"url\": \"url-endpoint\" \n },\n \"task_settings\": {\n \"return_documents\": true,\n \"top_n\": 3\n }\n}" } } } @@ -38094,163 +43842,69 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "realm": { - "description": "The name of the Elasticsearch realm that was used to construct the authentication request.", - "type": "string" - }, - "redirect": { - "description": "The URL to redirect the user to.", - "type": "string" - } - }, - "required": [ - "id", - "realm", - "redirect" - ] - }, - "examples": { - "SAmlPrepareAuthenticationResponseExample1": { - "description": "A successful response from `POST /_security/saml/prepare`.", - "value": "{\n \"redirect\": \"https://my-idp.org/login?SAMLRequest=fVJdc6IwFP0rmbwDgUKLGbFDtc462%2B06FX3Yl50rBJsKCZsbrPbXL6J22hdfk%2FNx7zl3eL%2BvK7ITBqVWCfVdRolQuS6k2iR0mU2dmN6Phgh1FTQ8be2rehH%2FWoGWdESF%2FPST0NYorgElcgW1QG5zvkh%2FPfHAZbwx2upcV5SkiMLYzmqsFba1MAthdjIXy5enhL5a23DPOyo6W7kGBa7cwhZ2gO7G8OiW%2BR400kORt0bag7fzezAlk24eqcD2OxxlsNN5O3MdsW9c6CZnbq7rntF4d3s0D7BaHTZhIWN52P%2BcjiuGRbDU6cdj%2BEjJbJLQv4N4ADdhxBiEZbQuWclY4Q8iABbCXczCdSiKMAC%2FgyO2YqbQgrIJDZg%2FcFjsMD%2Fzb3gUcBa5sR%2F9oWR%2BzuJBqlPG14Jbn0DIf2TZ3Jn%2FXmSUrC5ddQB6bob37uZrJdeF4dIDHV3iuhb70Ptq83kOz53ubDLXlcwPJK0q%2FT42AqxIaAkVCkqm2tRgr49yfJGFU%2FZQ3hy3QyuUpd7obPv97kb%2FAQ%3D%3D\"}\",\n \"realm\": \"saml1\",\n \"id\": \"_989a34500a4f5bf0f00d195aa04a7804b4ed42a1\"\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoHuggingFace" } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "saml_prepare_authentication", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{huggingface_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_hugging_face.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/saml/metadata/{realm_name}": { - "get": { + "/_inference/{task_type}/{jinaai_inference_id}": { + "put": { "tags": [ - "security" + "inference" ], - "summary": "Create SAML service provider metadata", - "description": "Generate SAML metadata for a SAML 2.0 Service Provider.\n\nThe SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file.\nThis API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch.", - "operationId": "security-saml-service-provider-metadata", + "summary": "Create an JinaAI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `jinaai` service.\n\nTo review the available `rerank` models, refer to .\nTo review the available `embedding` and `text_embedding` models, refer to .", + "operationId": "inference-put-jinaai", "parameters": [ { "in": "path", - "name": "realm_name", - "description": "The name of the SAML realm in Elasticsearch.", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/inference._types.JinaAITaskType" }, "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "An XML string that contains a SAML Service Provider's metadata for the realm.", - "type": "string" - } - }, - "required": [ - "metadata" - ] - }, - "examples": { - "SamlServiceProviderMetadataResponseExample1": { - "description": "A successful response from `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data`, which indicates that the request is acknowledged.\n", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } - } - }, - "x-state": "Added in 7.11.0", - "x-api-name" : "saml_service_provider_metadata", - "x-namespace": "security" - } - }, - "/_security/profile/_suggest": { - "get": { - "tags": [ - "security" - ], - "summary": "Suggest a user profile", - "description": "Get suggestions for user profiles that match specified search criteria.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", - "operationId": "security-suggest-user-profiles", - "parameters": [ - { - "$ref": "#/components/parameters/security.suggest_user_profiles-data" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.suggest_user_profiles" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.suggest_user_profiles-200" - } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "suggest_user_profiles", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" - ], - "summary": "Suggest a user profile", - "description": "Get suggestions for user profiles that match specified search criteria.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", - "operationId": "security-suggest-user-profiles-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.suggest_user_profiles-data" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.suggest_user_profiles" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.suggest_user_profiles-200" - } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "suggest_user_profiles", - "x-namespace": "security" - } - }, - "/_security/api_key/{id}": { - "put": { - "tags": [ - "security" - ], - "summary": "Update an API key", - "description": "Update attributes of an existing API key.\nThis API supports updates to an API key's access scope, expiration, and metadata.\n\nTo use this API, you must have at least the `manage_own_api_key` cluster privilege.\nUsers can only update API keys that they created or that were granted to them.\nTo update another user’s API key, use the `run_as` feature to submit a request on behalf of another user.\n\nIMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required.\n\nUse this API to update API keys created by the create API key or grant API Key APIs.\nIf you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead.\nIt's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API.\n\nThe access scope of an API key is derived from the `role_descriptors` you specify in the request and a snapshot of the owner user's permissions at the time of the request.\nThe snapshot of the owner's permissions is updated automatically on every call.\n\nIMPORTANT: If you don't specify `role_descriptors` in the request, a call to this API might still change the API key's access scope.\nThis change can occur if the owner user's permissions have changed since the API key was created or last modified.", - "operationId": "security-update-api-key", - "parameters": [ + }, { "in": "path", - "name": "id", - "description": "The ID of the API key to update.", + "name": "jinaai_inference_id", + "description": "The unique identifier of the inference endpoint.", "required": true, "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -38259,35 +43913,72 @@ "schema": { "type": "object", "properties": { - "role_descriptors": { - "description": "The role descriptors to assign to this API key.\nThe API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user.\nYou can assign new privileges by specifying them in this parameter.\nTo remove assigned privileges, you can supply an empty `role_descriptors` parameter, that is to say, an empty object `{}`.\nIf an API key has no assigned privileges, it inherits the owner user's full permissions.\nThe snapshot of the owner's permissions is always updated, whether you supply the `role_descriptors` parameter or not.\nThe structure of a role descriptor is the same as the request for the create API keys API.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleDescriptor" - } + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `embedding` and text_embedding` task types.\nNot applicable to the `rerank` task type.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "service": { + "description": "The type of service supported for the specified task type. In this case, `jinaai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.JinaAIServiceType" + } + ] }, - "expiration": { - "$ref": "#/components/schemas/_types.Duration" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `jinaai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.JinaAIServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.JinaAITaskSettings" + } + ] } - } + }, + "required": [ + "service", + "service_settings" + ] }, "examples": { - "UpdateApiKeyRequestExample1": { - "summary": "Update role and metadata", - "description": "Run `PUT /_security/api_key/VuaCfGcBCdbkQm-e5aOx` to assign new role descriptors and metadata to an API key.\n", - "value": "{\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\"*\"],\n \"privileges\": [\"write\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\"production\"]\n }\n }\n}" + "PutJinaAiRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/jinaai-embeddings` to create an inference endpoint for text embedding tasks using the JinaAI service.", + "value": "{\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"api_key\": \"JinaAi-Api-key\"\n }\n}" }, - "UpdateApiKeyRequestExample2": { - "summary": "Remove permissions", - "description": "Run `PUT /_security/api_key/VuaCfGcBCdbkQm-e5aOx` to remove the API key's previously assigned permissions. It will inherit the owner user's full permissions.\n", - "value": "{\n \"role_descriptors\": {}\n}" + "PutJinaAiRequestExample2": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/jinaai-rerank` to create an inference endpoint for rerank tasks using the JinaAI service.", + "value": "{\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"api_key\": \"JinaAI-Api-key\",\n \"model_id\": \"jina-reranker-v2-base-multilingual\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n}" + }, + "PutJinaAiRequestExample3": { + "summary": "An embedding task using a multimodal model", + "description": "Run `PUT _inference/embedding/jinaai-embeddings-multimodal` to create an inference endpoint for embedding tasks using an embedding model that supports multimodal inputs (e.g. `jina-embeddings-v4`) via the JinaAI service.", + "value": "{\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v4\",\n \"api_key\": \"JinaAi-Api-key\"\n }\n}" + }, + "PutJinaAiRequestExample4": { + "summary": "An embedding task using a non-multimodal model", + "description": "Run `PUT _inference/embedding/jinaai-embeddings-text-only` to create an inference endpoint for embedding tasks using an embedding model that does not support multimodal inputs (e.g. `jina-embeddings-v3`) via the JinaAI service.", + "value": "{\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"api_key\": \"JinaAi-Api-key\",\n \"multimodal_model\": false\n }\n}" } } } - } + }, + "required": true }, "responses": { "200": { @@ -38295,55 +43986,91 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "updated": { - "description": "If `true`, the API key was updated.\nIf `false`, the API key didn't change because no change was detected.", - "type": "boolean" - } - }, - "required": [ - "updated" - ] + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoJinaAi" }, "examples": { - "UpdateApiKeyResponseExample1": { - "summary": "Update role and metadata", - "description": "A successful response from `PUT /_security/api_key/VuaCfGcBCdbkQm-e5aOx`. The API key's effective permissions after the update will be the intersection of the supplied role descriptors and the owner user's permissions.\n", - "value": "{\n \"updated\": true\n}" + "PutJinaAiResponseExample1": { + "summary": "A text embedding task", + "description": "A successful response when creating a JinaAI `text_embedding` inference endpoint.", + "value": "{\n \"inference_id\": \"jinaai-embeddings\",\n \"task_type\": \"text_embedding\",\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"rate_limit\": {\n \"requests_per_minute\": 2000\n },\n \"dimensions\": 1024,\n \"embedding_type\": \"float\",\n \"similarity\": \"dot_product\"\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" + }, + "PutJinaAiResponseExample2": { + "summary": "A rerank task", + "description": "A successful response when creating a JinaAI `rerank` inference endpoint.", + "value": "{\n \"inference_id\": \"jinaai-rerank\",\n \"task_type\": \"rerank\",\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-reranker-v2-base-multilingual\",\n \"rate_limit\": {\n \"requests_per_minute\": 2000\n }\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n}" + }, + "PutJinaAiResponseExample3": { + "summary": "An embedding task using a multimodal model", + "description": "A successful response when creating a JinaAI `embedding` inference endpoint.", + "value": "{\n \"inference_id\": \"jinaai-embeddings-multimodal\",\n \"task_type\": \"embedding\",\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v4\",\n \"rate_limit\": {\n \"requests_per_minute\": 2000\n },\n \"dimensions\": 2048,\n \"embedding_type\": \"float\",\n \"similarity\": \"dot_product\",\n \"multimodal_model\": true\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" + }, + "PutJinaAiResponseExample4": { + "summary": "An embedding task using a non-multimodal model", + "description": "A successful response when creating a JinaAI `embedding` inference endpoint with a model that does not support multimodal inputs.", + "value": "{\n \"inference_id\": \"jinaai-embeddings-text-only\",\n \"task_type\": \"embedding\",\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"rate_limit\": {\n \"requests_per_minute\": 2000\n },\n \"dimensions\": 1024,\n \"embedding_type\": \"float\",\n \"similarity\": \"dot_product\",\n \"multimodal_model\": false\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" } } } } } }, - "x-state": "Added in 8.4.0", - "x-api-name" : "update_api_key", - "x-namespace": "security" + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{jinaai_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_jinaai.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_security/cross_cluster/api_key/{id}": { + "/_inference/{task_type}/{llama_inference_id}": { "put": { "tags": [ - "security" + "inference" ], - "summary": "Update a cross-cluster API key", - "description": "Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.\n\nTo use this API, you must have at least the `manage_security` cluster privilege.\nUsers can only update API keys that they created.\nTo update another user's API key, use the `run_as` feature to submit a request on behalf of another user.\n\nIMPORTANT: It's not possible to use an API key as the authentication credential for this API.\nTo update an API key, the owner user's credentials are required.\n\nIt's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API.\n\nThis API supports updates to an API key's access scope, metadata, and expiration.\nThe owner user's information, such as the `username` and `realm`, is also updated automatically on every call.\n\nNOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-api-key" - }, - "operationId": "security-update-cross-cluster-api-key", + "summary": "Create a Llama inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `llama` service.", + "operationId": "inference-put-llama", "parameters": [ { "in": "path", - "name": "id", - "description": "The ID of the cross-cluster API key to update.", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.LlamaTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "llama_inference_id", + "description": "The unique identifier of the inference endpoint.", "required": true, "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -38352,24 +44079,51 @@ "schema": { "type": "object", "properties": { - "access": { - "$ref": "#/components/schemas/security._types.Access" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `completion` or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "expiration": { - "$ref": "#/components/schemas/_types.Duration" + "service": { + "description": "The type of service supported for the specified task type. In this case, `llama`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.LlamaServiceType" + } + ] }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `llama` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.LlamaServiceSettings" + } + ] } }, "required": [ - "access" + "service", + "service_settings" ] }, "examples": { - "UpdateCrossClusterApiKeyRequestExample1": { - "description": "Run `PUT /_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx` to update a cross-cluster API key, assigning it new access scope and metadata.\n", - "value": "{\n \"access\": {\n \"replication\": [\n {\n \"names\": [\"archive\"]\n }\n ]\n },\n \"metadata\": {\n \"application\": \"replication\"\n }\n}" + "PutLlamaRequestExample1": { + "description": "Run `PUT _inference/text_embedding/llama-text-embedding` to create a Llama inference endpoint that performs a `text_embedding` task.", + "value": "{\n \"service\": \"llama\",\n \"service_settings\": {\n \"url\": \"http://localhost:8321/v1/inference/embeddings\",\n \"dimensions\": 384,\n \"model_id\": \"all-MiniLM-L6-v2\" \n }\n}" + }, + "PutLlamaRequestExample2": { + "description": "Run `PUT _inference/completion/llama-completion` to create a Llama inference endpoint that performs a `completion` task.", + "value": "{\n \"service\": \"llama\",\n \"service_settings\": {\n \"url\": \"http://localhost:8321/v1/openai/v1/chat/completions\",\n \"model_id\": \"llama3.2:3b\" \n }\n}" + }, + "PutLlamaRequestExample3": { + "description": "Run `PUT _inference/chat_completion/llama-chat-completion` to create a Llama inference endpoint that performs a `chat_completion` task.", + "value": "{\n \"service\": \"llama\",\n \"service_settings\": {\n \"url\": \"http://localhost:8321/v1/openai/v1/chat/completions\",\n \"model_id\": \"llama3.2:3b\" \n }\n}" } } } @@ -38382,160 +44136,67 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "updated": { - "description": "If `true`, the API key was updated.\nIf `false`, the API key didn’t change because no change was detected.", - "type": "boolean" - } - }, - "required": [ - "updated" - ] - }, - "examples": { - "UpdateCrossClusterApiKeyResponseExample1": { - "description": "A successful response from `PUT /_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx` that indicates that the API key was updated.\n", - "value": "{\n \"updated\": true\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoLlama" } } } } }, - "x-api-name" : "update_cross_cluster_api_key", - "x-namespace": "security" - } - }, - "/_security/profile/{uid}/_data": { - "put": { - "tags": [ - "security" - ], - "summary": "Update user profile data", - "description": "Update specific data for the user profile that is associated with a unique ID.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nTo use this API, you must have one of the following privileges:\n\n* The `manage_user_profile` cluster privilege.\n* The `update_profile_data` global privilege for the namespaces that are referenced in the request.\n\nThis API updates the `labels` and `data` fields of an existing user profile document with JSON objects.\nNew keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request.\n\nFor both labels and data, content is namespaced by the top-level fields.\nThe `update_profile_data` global privilege grants privileges for updating only the allowed namespaces.", - "operationId": "security-update-user-profile-data", - "parameters": [ - { - "$ref": "#/components/parameters/security.update_user_profile_data-uid" - }, - { - "$ref": "#/components/parameters/security.update_user_profile_data-if_seq_no" - }, - { - "$ref": "#/components/parameters/security.update_user_profile_data-if_primary_term" - }, - { - "$ref": "#/components/parameters/security.update_user_profile_data-refresh" - } + "x-state": "Generally available; Added in 9.2.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{llama_inference_id}\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/security.update_user_profile_data" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.update_user_profile_data-200" - } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "update_user_profile_data", - "x-namespace": "security" - }, - "post": { - "tags": [ - "security" + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" ], - "summary": "Update user profile data", - "description": "Update specific data for the user profile that is associated with a unique ID.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nTo use this API, you must have one of the following privileges:\n\n* The `manage_user_profile` cluster privilege.\n* The `update_profile_data` global privilege for the namespaces that are referenced in the request.\n\nThis API updates the `labels` and `data` fields of an existing user profile document with JSON objects.\nNew keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request.\n\nFor both labels and data, content is namespaced by the top-level fields.\nThe `update_profile_data` global privilege grants privileges for updating only the allowed namespaces.", - "operationId": "security-update-user-profile-data-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.update_user_profile_data-uid" - }, - { - "$ref": "#/components/parameters/security.update_user_profile_data-if_seq_no" - }, + "x-api": "put_llama.inference", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/parameters/security.update_user_profile_data-if_primary_term" - }, - { - "$ref": "#/components/parameters/security.update_user_profile_data-refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.update_user_profile_data" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.update_user_profile_data-200" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Added in 8.2.0", - "x-api-name" : "update_user_profile_data", - "x-namespace": "security" + ] } }, - "/_nodes/{node_id}/shutdown": { - "get": { - "tags": [ - "shutdown" - ], - "summary": "Get the shutdown status", - "description": "Get information about nodes that are ready to be shut down, have shut down preparations still in progress, or have stalled.\nThe API returns status information for each part of the shut down process.\n\nNOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.\n\nIf the operator privileges feature is enabled, you must be an operator to use this API.", - "operationId": "shutdown-get-node-1", - "parameters": [ - { - "$ref": "#/components/parameters/shutdown.get_node-node_id" - }, - { - "$ref": "#/components/parameters/shutdown.get_node-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/shutdown.get_node-200" - } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "get_node", - "x-namespace": "shutdown" - }, + "/_inference/{task_type}/{mistral_inference_id}": { "put": { "tags": [ - "shutdown" + "inference" ], - "summary": "Prepare a node to be shut down", - "description": "NOTE: This feature is designed for indirect use by Elastic Cloud, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.\n\nIf you specify a node that is offline, it will be prepared for shut down when it rejoins the cluster.\n\nIf the operator privileges feature is enabled, you must be an operator to use this API.\n\nThe API migrates ongoing tasks and index shards to other nodes as needed to prepare a node to be restarted or shut down and removed from the cluster.\nThis ensures that Elasticsearch can be stopped safely with minimal disruption to the cluster.\n\nYou must specify the type of shutdown: `restart`, `remove`, or `replace`.\nIf a node is already being prepared for shutdown, you can use this API to change the shutdown type.\n\nIMPORTANT: This API does NOT terminate the Elasticsearch process.\nMonitor the node shutdown status to determine when it is safe to stop Elasticsearch.", - "operationId": "shutdown-put-node", + "summary": "Create a Mistral inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `mistral` service.", + "operationId": "inference-put-mistral", "parameters": [ { "in": "path", - "name": "node_id", - "description": "The node identifier.\nThis parameter is not validated against the cluster's active nodes.\nThis enables you to register a node for shut down while it is offline.\nNo error is thrown if you specify an invalid node ID.", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.NodeId" + "$ref": "#/components/schemas/inference._types.MistralTaskType" }, "style": "simple" }, { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "in": "path", + "name": "mistral_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -38546,31 +44207,43 @@ "schema": { "type": "object", "properties": { - "type": { - "$ref": "#/components/schemas/shutdown._types.Type" - }, - "reason": { - "description": "A human-readable reason that the node is being shut down.\nThis field provides information for other cluster operators; it does not affect the shut down process.", - "type": "string" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `completion` or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "allocation_delay": { - "description": "Only valid if type is restart.\nControls how long Elasticsearch will wait for the node to restart and join the cluster before reassigning its shards to other nodes.\nThis works the same as delaying allocation with the index.unassigned.node_left.delayed_timeout setting.\nIf you specify both a restart allocation delay and an index-level allocation delay, the longer of the two is used.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `mistral`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.MistralServiceType" + } + ] }, - "target_node_name": { - "description": "Only valid if type is replace.\nSpecifies the name of the node that is replacing the node being shut down.\nShards from the shut down node are only allowed to be allocated to the target node, and no other data will be allocated to the target node.\nDuring relocation of data certain allocation rules are ignored, such as disk watermarks or user attribute filtering rules.", - "type": "string" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `mistral` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.MistralServiceSettings" + } + ] } }, "required": [ - "type", - "reason" + "service", + "service_settings" ] }, "examples": { - "ShutdownPutNodeRequestExample1": { - "description": "Register a node for shutdown with `PUT /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown`. The `restart` type prepares the node to be restarted.\n", - "value": "{\n \"type\": \"restart\",\n \"reason\": \"Demonstrating how the node shutdown API works\",\n \"allocation_delay\": \"20m\"\n}" + "PutMistralRequestExample1": { + "description": "Run `PUT _inference/text_embedding/mistral-embeddings-test` to create a Mistral inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"mistral\",\n \"service_settings\": {\n \"api_key\": \"Mistral-API-Key\",\n \"model\": \"mistral-embed\" \n }\n}" } } } @@ -38583,269 +44256,270 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoMistral" } } } } }, - "x-state": "Added in 7.13.0", - "x-api-name" : "put_node", - "x-namespace": "shutdown" - }, - "delete": { - "tags": [ - "shutdown" + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{mistral_inference_id}\n
\n " ], - "summary": "Cancel node shutdown preparations", - "description": "Remove a node from the shutdown list so it can resume normal operations.\nYou must explicitly clear the shutdown request when a node rejoins the cluster or when a node has permanently left the cluster.\nShutdown requests are never removed automatically by Elasticsearch.\n\nNOTE: This feature is designed for indirect use by Elastic Cloud, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.\nDirect use is not supported.\n\nIf the operator privileges feature is enabled, you must be an operator to use this API.", - "operationId": "shutdown-delete-node", - "parameters": [ + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_mistral.inference", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "path", - "name": "node_id", - "description": "The node id of node to be removed from the shutdown state", - "required": true, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{nvidia_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create an Nvidia inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `nvidia` service.", + "operationId": "inference-put-nvidia", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.NodeId" + "$ref": "#/components/schemas/inference._types.NvidiaTaskType" }, "style": "simple" }, { - "in": "query", - "name": "master_timeout", - "description": "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.", + "in": "path", + "name": "nvidia_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank`, `completion`, or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] + }, + "service": { + "description": "The type of service supported for the specified task type. In this case, `nvidia`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.NvidiaServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `nvidia` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.NvidiaServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank`, `completion`, or `chat_completion` task types.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.NvidiaTaskSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutNvidiaRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/nvidia-text-embedding` to create an inference endpoint that performs a `text_embedding` task.", + "value": "{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"url\": \"nvidia-embeddings-url\",\n \"api_key\": \"nvidia-embeddings-token\",\n \"model_id\": \"nvidia/llama-3.2-nv-embedqa-1b-v2\"\n }\n}" + }, + "PutNvidiaRequestExample2": { + "summary": "A text embedding task with custom `task_settings` and no `url` parameter", + "description": "Run `PUT _inference/text_embedding/nvidia-text-embedding` to create an inference endpoint that performs a `text_embedding` task, specifying custom `task_settings` and omitting the `url` parameter if model is accessible via default NVIDIA endpoint.", + "value": "{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"nvidia/llama-3.2-nv-embedqa-1b-v2\",\n \"api_key\": \"nvidia-text-embeddings-token\"\n },\n \"task_settings\": {\n \"input_type\": \"ingest\",\n \"truncate\": \"start\"\n }\n}" + }, + "PutNvidiaRequestExample3": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/nvidia-completion` to create an inference endpoint that performs a `completion` task.", + "value": "{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"url\": \"nvidia-completion-url\",\n \"api_key\": \"nvidia-completion-token\",\n \"model_id\": \"microsoft/phi-3-mini-128k-instruct\"\n }\n}" + }, + "PutNvidiaRequestExample4": { + "summary": "A completion task without `url` parameter", + "description": "Run `PUT _inference/completion/nvidia-completion` to create an inference endpoint that performs a `completion` task, omitting the `url` parameter if model is accessible via default NVIDIA endpoint.", + "value": "{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"api_key\": \"nvidia-completion-token\",\n \"model_id\": \"microsoft/phi-3-mini-128k-instruct\"\n }\n}" + }, + "PutNvidiaRequestExample5": { + "summary": "A chat completion task", + "description": "Run `PUT _inference/chat_completion/nvidia-chat-completion` to create an inference endpoint that performs a `chat_completion` task.", + "value": "{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"url\": \"nvidia-chat-completion-url\",\n \"api_key\": \"nvidia-chat-completion-token\",\n \"model_id\": \"microsoft/phi-3-mini-128k-instruct\"\n }\n}" + }, + "PutNvidiaRequestExample6": { + "summary": "A chat completion task without `url` parameter", + "description": "Run `PUT _inference/chat_completion/nvidia-chat-completion` to create an inference endpoint that performs a `chat_completion` task, omitting the `url` parameter if model is accessible via default NVIDIA endpoint.", + "value": "{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"api_key\": \"nvidia-chat-completion-token\",\n \"model_id\": \"microsoft/phi-3-mini-128k-instruct\"\n }\n}" + }, + "PutNvidiaRequestExample7": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/nvidia-rerank` to create an inference endpoint that performs a `rerank` task.", + "value": "{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"url\": \"nvidia-rerank-url\",\n \"api_key\": \"nvidia-rerank-token\",\n \"model_id\": \"nv-rerank-qa-mistral-4b:1\"\n }\n}" + }, + "PutNvidiaRequestExample8": { + "summary": "A rerank task without `url` parameter", + "description": "Run `PUT _inference/rerank/nvidia-rerank` to create an inference endpoint that performs a `rerank` task, omitting the `url` parameter if model is accessible via default NVIDIA endpoint.", + "value": "{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"api_key\": \"nvidia-rerank-token\",\n \"model_id\": \"nv-rerank-qa-mistral-4b:1\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoNvidia" }, "examples": { - "ShutdownDeleteNodeResponseExample1": { - "description": "A successful response from `DELETE /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown`.", - "value": "{\n \"acknowledged\": true\n}" + "PutNvidiaResponseExample1": { + "summary": "A text embedding task", + "description": "A successful response when creating an Nvidia `text_embedding` inference endpoint.", + "value": "{\n \"inference_id\": \"nvidia-text-embedding\",\n \"task_type\": \"text_embedding\",\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"nvidia/llama-3.2-nv-embedqa-1b-v2\",\n \"url\": \"nvidia-embeddings-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n },\n \"dimensions\": 2048,\n \"similarity\": \"dot_product\"\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" + }, + "PutNvidiaResponseExample2": { + "summary": "A text embedding task with custom `task_settings` and no `url` parameter", + "description": "A successful response when creating an Nvidia `text_embedding` inference endpoint with custom `task_settings` and no `url` parameter.", + "value": "{\n \"inference_id\": \"nvidia-text-embedding\",\n \"task_type\": \"text_embedding\",\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"nvidia/llama-3.2-nv-embedqa-1b-v2\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n },\n \"dimensions\": 2048,\n \"similarity\": \"dot_product\"\n },\n \"task_settings\": {\n \"input_type\": \"ingest\",\n \"truncate\": \"start\"\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" + }, + "PutNvidiaResponseExample3": { + "summary": "A completion task", + "description": "A successful response when creating an Nvidia `completion` inference endpoint.", + "value": "{\n \"inference_id\": \"nvidia-completion\",\n \"task_type\": \"completion\",\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"microsoft/phi-3-mini-128k-instruct\",\n \"url\": \"nvidia-completion-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" + }, + "PutNvidiaResponseExample4": { + "summary": "A completion task without `url` parameter", + "description": "A successful response when creating an Nvidia `completion` inference endpoint without `url` parameter.", + "value": "{\n \"inference_id\": \"nvidia-completion\",\n \"task_type\": \"completion\",\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"microsoft/phi-3-mini-128k-instruct\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" + }, + "PutNvidiaResponseExample5": { + "summary": "A chat completion task", + "description": "A successful response when creating an Nvidia `chat_completion` inference endpoint.", + "value": "{\n \"inference_id\": \"nvidia-chat-completion\",\n \"task_type\": \"chat_completion\",\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"microsoft/phi-3-mini-128k-instruct\",\n \"url\": \"nvidia-chat-completion-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" + }, + "PutNvidiaResponseExample6": { + "summary": "A chat completion task without `url` parameter", + "description": "A successful response when creating an Nvidia `chat_completion` inference endpoint without `url` parameter.", + "value": "{\n \"inference_id\": \"nvidia-chat-completion\",\n \"task_type\": \"chat_completion\",\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"microsoft/phi-3-mini-128k-instruct\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" + }, + "PutNvidiaResponseExample7": { + "summary": "A rerank task", + "description": "A successful response when creating an Nvidia `rerank` inference endpoint.", + "value": "{\n \"inference_id\": \"nvidia-rerank\",\n \"task_type\": \"rerank\",\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"nv-rerank-qa-mistral-4b:1\",\n \"url\": \"nvidia-rerank-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" + }, + "PutNvidiaResponseExample8": { + "summary": "A rerank task without `url` parameter", + "description": "A successful response when creating an Nvidia `rerank` inference endpoint without `url` parameter.", + "value": "{\n \"inference_id\": \"nvidia-rerank\",\n \"task_type\": \"rerank\",\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"model_id\": \"nv-rerank-qa-mistral-4b:1\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" } } } } } }, - "x-state": "Added in 7.13.0", - "x-api-name" : "delete_node", - "x-namespace": "shutdown" - } - }, - "/_nodes/shutdown": { - "get": { - "tags": [ - "shutdown" - ], - "summary": "Get the shutdown status", - "description": "Get information about nodes that are ready to be shut down, have shut down preparations still in progress, or have stalled.\nThe API returns status information for each part of the shut down process.\n\nNOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.\n\nIf the operator privileges feature is enabled, you must be an operator to use this API.", - "operationId": "shutdown-get-node", - "parameters": [ - { - "$ref": "#/components/parameters/shutdown.get_node-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/shutdown.get_node-200" - } - }, - "x-state": "Added in 7.13.0", - "x-api-name" : "get_node", - "x-namespace": "shutdown" - } - }, - "/_ingest/_simulate": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Simulate data ingestion", - "description": "Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.\n\nThis API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.\n\nThe API runs the default and final pipeline for that index against a set of documents provided in the body of the request.\nIf a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.\nNo data is indexed into Elasticsearch.\nInstead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.\nThe transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.\n\nThis API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.\nThe simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.\n\nBy default, the pipeline definitions that are currently in the system are used.\nHowever, you can supply substitute pipeline definitions in the body of the request.\nThese will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.", - "operationId": "simulate-ingest", - "parameters": [ - { - "$ref": "#/components/parameters/simulate.ingest-pipeline" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/simulate.ingest" - }, - "responses": { - "200": { - "$ref": "#/components/responses/simulate.ingest-200" - } - }, - "x-state": "Technical preview", - "x-api-name" : "ingest", - "x-namespace": "simulate" - }, - "post": { - "tags": [ - "ingest" - ], - "summary": "Simulate data ingestion", - "description": "Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.\n\nThis API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.\n\nThe API runs the default and final pipeline for that index against a set of documents provided in the body of the request.\nIf a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.\nNo data is indexed into Elasticsearch.\nInstead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.\nThe transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.\n\nThis API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.\nThe simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.\n\nBy default, the pipeline definitions that are currently in the system are used.\nHowever, you can supply substitute pipeline definitions in the body of the request.\nThese will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.", - "operationId": "simulate-ingest-1", - "parameters": [ - { - "$ref": "#/components/parameters/simulate.ingest-pipeline" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/simulate.ingest" - }, - "responses": { - "200": { - "$ref": "#/components/responses/simulate.ingest-200" - } - }, - "x-state": "Technical preview", - "x-api-name" : "ingest", - "x-namespace": "simulate" - } - }, - "/_ingest/{index}/_simulate": { - "get": { - "tags": [ - "ingest" - ], - "summary": "Simulate data ingestion", - "description": "Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.\n\nThis API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.\n\nThe API runs the default and final pipeline for that index against a set of documents provided in the body of the request.\nIf a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.\nNo data is indexed into Elasticsearch.\nInstead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.\nThe transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.\n\nThis API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.\nThe simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.\n\nBy default, the pipeline definitions that are currently in the system are used.\nHowever, you can supply substitute pipeline definitions in the body of the request.\nThese will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.", - "operationId": "simulate-ingest-2", - "parameters": [ - { - "$ref": "#/components/parameters/simulate.ingest-index" - }, - { - "$ref": "#/components/parameters/simulate.ingest-pipeline" - } + "x-state": "Generally available; Added in 9.3.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{nvidia_inference_id}\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/simulate.ingest" - }, - "responses": { - "200": { - "$ref": "#/components/responses/simulate.ingest-200" - } - }, - "x-state": "Technical preview", - "x-api-name" : "ingest", - "x-namespace": "simulate" - }, - "post": { - "tags": [ - "ingest" + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" ], - "summary": "Simulate data ingestion", - "description": "Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.\n\nThis API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.\n\nThe API runs the default and final pipeline for that index against a set of documents provided in the body of the request.\nIf a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.\nNo data is indexed into Elasticsearch.\nInstead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.\nThe transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.\n\nThis API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.\nThe simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.\n\nBy default, the pipeline definitions that are currently in the system are used.\nHowever, you can supply substitute pipeline definitions in the body of the request.\nThese will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.", - "operationId": "simulate-ingest-3", - "parameters": [ - { - "$ref": "#/components/parameters/simulate.ingest-index" - }, + "x-api": "put_nvidia.inference", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/parameters/simulate.ingest-pipeline" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/simulate.ingest" - }, - "responses": { - "200": { - "$ref": "#/components/responses/simulate.ingest-200" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Technical preview", - "x-api-name" : "ingest", - "x-namespace": "simulate" + ] } }, - "/_slm/policy/{policy_id}": { - "get": { - "tags": [ - "slm" - ], - "summary": "Get policy information", - "description": "Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.", - "operationId": "slm-get-lifecycle", - "parameters": [ - { - "$ref": "#/components/parameters/slm.get_lifecycle-policy_id" - }, - { - "$ref": "#/components/parameters/slm.get_lifecycle-master_timeout" - }, - { - "$ref": "#/components/parameters/slm.get_lifecycle-timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/slm.get_lifecycle-200" - } - }, - "x-state": "Added in 7.4.0", - "x-api-name" : "get_lifecycle", - "x-namespace": "slm" - }, + "/_inference/{task_type}/{openai_inference_id}": { "put": { "tags": [ - "slm" + "inference" ], - "summary": "Create or update a policy", - "description": "Create or update a snapshot lifecycle policy.\nIf the policy already exists, this request increments the policy version.\nOnly the latest version of a policy is stored.", - "operationId": "slm-put-lifecycle", + "summary": "Create an OpenAI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `openai` service or `openai` compatible APIs.", + "operationId": "inference-put-openai", "parameters": [ { "in": "path", - "name": "policy_id", - "description": "The identifier for the snapshot lifecycle policy you want to create or update.", + "name": "task_type", + "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/inference._types.OpenAITaskType" }, "style": "simple" }, { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "in": "path", + "name": "openai_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -38859,38 +44533,62 @@ "schema": { "type": "object", "properties": { - "config": { - "$ref": "#/components/schemas/slm._types.Configuration" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `completion` or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "repository": { - "description": "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.", - "type": "string" + "service": { + "description": "The type of service supported for the specified task type. In this case, `openai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.OpenAIServiceType" + } + ] }, - "retention": { - "$ref": "#/components/schemas/slm._types.Retention" + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `openai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.OpenAIServiceSettings" + } + ] }, - "schedule": { - "$ref": "#/components/schemas/watcher._types.CronExpression" + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.OpenAITaskSettings" + } + ] } - } + }, + "required": [ + "service", + "service_settings" + ] }, "examples": { - "PutSnapshotLifecycleRequestExample1 copy": { - "summary": "Create a policy", - "description": "Run `PUT /_slm/policy/daily-snapshots` to create a lifecycle policy. The `schedule` is when the snapshot should be taken, in this case, 1:30am daily. The `retention` details specify to: keep snapshots for 30 days; always keep at least 5 successful snapshots, even if they're more than 30 days old; keep no more than 50 successful snapshots, even if they're less than 30 days old.\n", - "value": "{\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n}" + "PutOpenAiRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/openai-embeddings` to create an inference endpoint that performs a `text_embedding` task. The embeddings created by requests to this endpoint will have 128 dimensions.", + "value": "{\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"text-embedding-3-small\",\n \"dimensions\": 128\n }\n}" }, - "PutSnapshotLifecycleRequestExample2": { - "summary": "Create a policy with intevals", - "description": "Run `PUT /_slm/policy/hourly-snapshots` to create a lifecycle policy that uses interval scheduling. It creates a snapshot once every hour. The first snapshot will be created one hour after the policy is modified, with subsequent snapshots every hour afterward.\n", - "value": "{\n \"schedule\": \"1h\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"]\n }\n}" + "PutOpenAiRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/openai-completion` to create an inference endpoint to perform a `completion` task type.", + "value": "{\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"gpt-3.5-turbo\"\n }\n}" } } } - } + }, + "required": true }, "responses": { "200": { @@ -38898,49 +44596,64 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoOpenAI" } } } } }, - "x-state": "Added in 7.4.0", - "x-api-name" : "put_lifecycle", - "x-namespace": "slm" - }, - "delete": { + "x-state": "Generally available; Added in 8.12.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{openai_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_openai.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{openshiftai_inference_id}": { + "put": { "tags": [ - "slm" + "inference" ], - "summary": "Delete a policy", - "description": "Delete a snapshot lifecycle policy definition.\nThis operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots.", - "operationId": "slm-delete-lifecycle", + "summary": "Create an OpenShift AI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `openshift_ai` service.", + "operationId": "inference-put-openshift-ai", "parameters": [ { "in": "path", - "name": "policy_id", - "description": "The id of the snapshot lifecycle policy to remove", + "name": "task_type", + "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/inference._types.OpenShiftAiTaskType" }, "style": "simple" }, { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "in": "path", + "name": "openshiftai_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -38948,57 +44661,175 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank`, `completion`, or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] + }, + "service": { + "description": "The type of service supported for the specified task type. In this case, `openshift_ai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.OpenShiftAiServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `openshift_ai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.OpenShiftAiServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nApplies only to the `rerank` task type.\nNot applicable to the `text_embedding`, `completion`, or `chat_completion` task types.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.OpenShiftAiTaskSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutOpenShiftAiRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/openshift-ai-text-embedding` to create an inference endpoint that performs a `text_embedding` task.", + "value": "{\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-embeddings-url\",\n \"api_key\": \"openshift-ai-embeddings-token\",\n \"model_id\": \"gritlm-7b\"\n }\n}" + }, + "PutOpenShiftAiRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/openshift-ai-completion` to create an inference endpoint that performs a `completion` task.", + "value": "{\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-completion-url\",\n \"api_key\": \"openshift-ai-completion-token\",\n \"model_id\": \"llama-31-8b-instruct\"\n }\n}" + }, + "PutOpenShiftAiRequestExample3": { + "summary": "A chat completion task", + "description": "Run `PUT _inference/chat_completion/openshift-ai-chat-completion` to create an inference endpoint that performs a `chat_completion` task.", + "value": "{\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-chat-completion-url\",\n \"api_key\": \"openshift-ai-chat-completion-token\",\n \"model_id\": \"llama-31-8b-instruct\"\n }\n}" + }, + "PutOpenShiftAiRequestExample4": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/openshift-ai-rerank` to create an inference endpoint that performs a `rerank` task.", + "value": "{\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-rerank-url\",\n \"api_key\": \"openshift-ai-rerank-token\",\n \"model_id\": \"bge-reranker-v2-m3\"\n }\n}" + }, + "PutOpenShiftAiRequestExample5": { + "summary": "A rerank task with custom `task_settings` and omitted `model_id`", + "description": "Run `PUT _inference/rerank/openshift-ai-rerank` to create an inference endpoint that performs a `rerank` task, specifying custom `task_settings` and omitting the `model_id` if deployed model doesn't require it.", + "value": "{\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-rerank-url\",\n \"api_key\": \"openshift-ai-rerank-token\"\n },\n \"task_settings\": {\n \"return_documents\": true,\n \"top_n\": 2\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoOpenShiftAi" + }, + "examples": { + "PutOpenShiftAiResponseExample1": { + "summary": "A text embedding task", + "description": "A successful response when creating an OpenShift AI `text_embedding` inference endpoint.", + "value": "{\n \"inference_id\": \"openshift-ai-text-embedding\",\n \"task_type\": \"text_embedding\",\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"model_id\": \"gritlm-7b\",\n \"url\": \"openshift-ai-embeddings-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n },\n \"dimensions\": 4096,\n \"similarity\": \"dot_product\",\n \"dimensions_set_by_user\": false\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" + }, + "PutOpenShiftAiResponseExample2": { + "summary": "A completion task", + "description": "A successful response when creating an OpenShift AI `completion` inference endpoint.", + "value": "{\n \"inference_id\": \"openshift-ai-completion\",\n \"task_type\": \"completion\",\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"model_id\": \"llama-31-8b-instruct\",\n \"url\": \"openshift-ai-completion-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" + }, + "PutOpenShiftAiResponseExample3": { + "summary": "A chat completion task", + "description": "A successful response when creating an OpenShift AI `chat_completion` inference endpoint.", + "value": "{\n \"inference_id\": \"openshift-ai-chat-completion\",\n \"task_type\": \"chat_completion\",\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"model_id\": \"llama-31-8b-instruct\",\n \"url\": \"openshift-ai-chat-completion-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" + }, + "PutOpenShiftAiResponseExample4": { + "summary": "A rerank task", + "description": "A successful response when creating an OpenShift AI `rerank` inference endpoint.", + "value": "{\n \"inference_id\": \"openshift-ai-rerank\",\n \"task_type\": \"rerank\",\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"model_id\": \"bge-reranker-v2-m3\",\n \"url\": \"openshift-ai-rerank-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n }\n}" + }, + "PutOpenShiftAiResponseExample5": { + "summary": "A rerank task with custom `task_settings` and omitted `model_id`", + "description": "A successful response when creating an OpenShift AI `rerank` inference endpoint with custom `task_settings` and omitted `model_id`", + "value": "{\n \"inference_id\": \"openshift-ai-rerank\",\n \"task_type\": \"rerank\",\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-rerank-url\",\n \"rate_limit\": {\n \"requests_per_minute\": 3000\n }\n },\n \"task_settings\": {\n \"return_documents\": true,\n \"top_n\": 2\n }\n}" + } } } } } }, - "x-state": "Added in 7.4.0", - "x-api-name" : "delete_lifecycle", - "x-namespace": "slm" + "x-state": "Generally available; Added in 9.3.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{openshiftai_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_openshift_ai.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_slm/policy/{policy_id}/_execute": { + "/_inference/{task_type}/{voyageai_inference_id}": { "put": { "tags": [ - "slm" + "inference" ], - "summary": "Run a policy", - "description": "Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time.\nThe snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.", - "operationId": "slm-execute-lifecycle", + "summary": "Create a VoyageAI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `voyageai` service.\n\nAvoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.", + "operationId": "inference-put-voyageai", "parameters": [ { "in": "path", - "name": "policy_id", - "description": "The id of the snapshot lifecycle policy to be executed", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/inference._types.VoyageAITaskType" }, "style": "simple" }, { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "in": "path", + "name": "voyageai_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -39006,60 +44837,133 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank` task type.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] + }, + "service": { + "description": "The type of service supported for the specified task type. In this case, `voyageai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.VoyageAIServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `voyageai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.VoyageAIServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.VoyageAITaskSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutVoyageAIRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/voyageai-embeddings` to create an inference endpoint that performs a `text_embedding` task. The embeddings created by requests to this endpoint will have 512 dimensions.", + "value": "{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n}" + }, + "PutVoyageAIRequestExample2": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/voyageai-rerank` to create an inference endpoint that performs a `rerank` task.", + "value": "{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"rerank-2\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "snapshot_name": { - "$ref": "#/components/schemas/_types.Name" - } - }, - "required": [ - "snapshot_name" - ] - }, - "examples": { - "ExecuteSnapshotLifecycleResponseExample1": { - "description": "Run `POST /_slm/policy/daily-snapshots/_execute` to take an immediate snapshot according to the `daily-snapshots` policy.\n", - "value": "{\n \"snapshot_name\": \"daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea\"\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoVoyageAI" } } } } }, - "x-state": "Added in 7.4.0", - "x-api-name" : "execute_lifecycle", - "x-namespace": "slm" + "x-state": "Generally available; Added in 8.19.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{voyageai_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_voyageai.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_slm/_execute_retention": { - "post": { + "/_inference/{task_type}/{watsonx_inference_id}": { + "put": { "tags": [ - "slm" + "inference" ], - "summary": "Run a retention policy", - "description": "Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.\nThe retention policy is normally applied according to its schedule.", - "operationId": "slm-execute-retention", + "summary": "Create a Watsonx inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `watsonxai` service.\nYou need an IBM Cloud Databases for Elasticsearch deployment to use the `watsonxai` inference service.\nYou can provision one through the IBM catalog, the Cloud Databases CLI plug-in, the Cloud Databases API, or Terraform.", + "operationId": "inference-put-watsonx", "parameters": [ { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/inference._types.WatsonxTaskType" }, - "style": "form" + "style": "simple" + }, + { + "in": "path", + "name": "watsonx_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -39067,72 +44971,107 @@ "style": "form" } ], - "responses": { - "200": { - "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank`, `completion` or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] + }, + "service": { + "description": "The type of service supported for the specified task type. In this case, `watsonxai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.WatsonxServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `watsonxai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.WatsonxServiceSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutWatsonxRequestExample1": { + "description": "Run `PUT _inference/text_embedding/watsonx-embeddings` to create an Watonsx inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"watsonxai\",\n \"service_settings\": {\n \"api_key\": \"Watsonx-API-Key\", \n \"url\": \"Wastonx-URL\", \n \"model_id\": \"ibm/slate-30m-english-rtrvr\",\n \"project_id\": \"IBM-Cloud-ID\", \n \"api_version\": \"2024-03-14\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoWatsonx" } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "execute_retention", - "x-namespace": "slm" - } - }, - "/_slm/policy": { - "get": { - "tags": [ - "slm" + "x-state": "Generally available; Added in 8.16.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{watsonx_inference_id}\n
\n " ], - "summary": "Get policy information", - "description": "Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.", - "operationId": "slm-get-lifecycle-1", - "parameters": [ - { - "$ref": "#/components/parameters/slm.get_lifecycle-master_timeout" - }, - { - "$ref": "#/components/parameters/slm.get_lifecycle-timeout" - } + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/slm.get_lifecycle-200" + "x-api": "put_watsonx.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Added in 7.4.0", - "x-api-name" : "get_lifecycle", - "x-namespace": "slm" + ] } }, - "/_slm/stats": { - "get": { + "/_inference/rerank/{inference_id}": { + "post": { "tags": [ - "slm" + "inference" ], - "summary": "Get snapshot lifecycle management statistics", - "description": "Get global and policy-level statistics about actions taken by snapshot lifecycle management.", - "operationId": "slm-get-stats", + "summary": "Perform reranking inference on the service", + "operationId": "inference-rerank", "parameters": [ { - "in": "query", - "name": "master_timeout", - "description": "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.", + "in": "path", + "name": "inference_id", + "description": "The unique identifier for the inference endpoint.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "description": "The amount of time to wait for the inference request to complete.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -39140,98 +45079,135 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "Query input.", + "type": "string" + }, + "input": { + "description": "The documents to rank.", + "type": "array", + "items": { + "type": "string" + } + }, + "return_documents": { + "description": "Include the document text in the response.", + "type": "boolean" + }, + "top_n": { + "description": "Limit the response to the top N documents.", + "type": "number" + }, + "task_settings": { + "description": "Task settings for the individual inference request.\nThese settings are specific to the task type you specified and override the task settings specified when initializing the service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] + } + }, + "required": [ + "query", + "input" + ] + }, + "examples": { + "RerankRequestExample1": { + "summary": "Rerank task", + "description": "Run `POST _inference/rerank/cohere_rerank` to perform reranking on the example input.", + "value": "{\n \"input\": [\"luke\", \"like\", \"leia\", \"chewy\",\"r2d2\", \"star\", \"wars\"],\n \"query\": \"star wars main character\"\n}" + }, + "RerankRequestExample2": { + "summary": "Rerank task", + "description": "Run `POST _inference/rerank/bge-reranker-base-mkn` to perform reranking on the example input via Hugging Face", + "value": "{\n \"input\": [\"luke\", \"like\", \"leia\", \"chewy\",\"r2d2\", \"star\", \"wars\"],\n \"query\": \"star wars main character\",\n \"return_documents\": false,\n \"top_n\": 2\n}" + }, + "RerankRequestExample3": { + "summary": "Rerank task", + "description": "Run `POST _inference/rerank/bge-reranker-base-mkn` to perform reranking on the example input via Hugging Face", + "value": "{\n \"input\": [\"luke\", \"like\", \"leia\", \"chewy\",\"r2d2\", \"star\", \"wars\"],\n \"query\": \"star wars main character\",\n \"return_documents\": true,\n \"top_n\": 3\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "retention_deletion_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "retention_deletion_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "retention_failed": { - "type": "number" - }, - "retention_runs": { - "type": "number" - }, - "retention_timed_out": { - "type": "number" - }, - "total_snapshots_deleted": { - "type": "number" - }, - "total_snapshot_deletion_failures": { - "type": "number" - }, - "total_snapshots_failed": { - "type": "number" - }, - "total_snapshots_taken": { - "type": "number" - }, - "policy_stats": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "retention_deletion_time", - "retention_deletion_time_millis", - "retention_failed", - "retention_runs", - "retention_timed_out", - "total_snapshots_deleted", - "total_snapshot_deletion_failures", - "total_snapshots_failed", - "total_snapshots_taken", - "policy_stats" - ] + "$ref": "#/components/schemas/inference._types.RerankedInferenceResult" }, "examples": { - "GetSnapshotLifecycleManagementStatsResponseExample1": { - "description": "A successful response from `GET /_slm/stats`.", - "value": "{\n \"retention_runs\": 13,\n \"retention_failed\": 0,\n \"retention_timed_out\": 0,\n \"retention_deletion_time\": \"1.4s\",\n \"retention_deletion_time_millis\": 1404,\n \"policy_stats\": [ ],\n \"total_snapshots_taken\": 1,\n \"total_snapshots_failed\": 1,\n \"total_snapshots_deleted\": 0,\n \"total_snapshot_deletion_failures\": 0\n}" + "RerankResponseExample1": { + "summary": "Rerank task", + "description": "A successful response from `POST _inference/rerank/cohere_rerank`.\n", + "value": "{\n \"rerank\": [\n {\n \"index\": \"2\",\n \"relevance_score\": \"0.011597361\",\n \"text\": \"leia\"\n },\n {\n \"index\": \"0\",\n \"relevance_score\": \"0.006338922\",\n \"text\": \"luke\"\n },\n {\n \"index\": \"5\",\n \"relevance_score\": \"0.0016166499\",\n \"text\": \"star\"\n },\n {\n \"index\": \"4\",\n \"relevance_score\": \"0.0011695103\",\n \"text\": \"r2d2\"\n },\n {\n \"index\": \"1\",\n \"relevance_score\": \"5.614787E-4\",\n \"text\": \"like\"\n },\n {\n \"index\": \"6\",\n \"relevance_score\": \"3.7850367E-4\",\n \"text\": \"wars\"\n },\n {\n \"index\": \"3\",\n \"relevance_score\": \"1.2508839E-5\",\n \"text\": \"chewy\"\n }\n ]\n}" + }, + "RerankResponseExample2": { + "summary": "Rerank task", + "description": "A successful response from `POST _inference/rerank/bge-reranker-base-mkn`.\n", + "value": "{\n \"rerank\": [\n {\n \"index\": 6,\n \"relevance_score\": 0.50955844\n },\n {\n \"index\": 5,\n \"relevance_score\": 0.084341794\n }\n ]\n}" + }, + "RerankResponseExample3": { + "summary": "Rerank task", + "description": "A successful response from `POST _inference/rerank/bge-reranker-base-mkn`.\n", + "value": "{\n \"rerank\": [\n {\n \"index\": 6,\n \"relevance_score\": 0.50955844,\n \"text\": \"wars\"\n },\n {\n \"index\": 5,\n \"relevance_score\": 0.084341794,\n \"text\": \"star\"\n },\n {\n \"index\": 3,\n \"relevance_score\": 0.004520818,\n \"text\": \"chewy\"\n }\n ]\n}" } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "get_stats", - "x-namespace": "slm" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n POST\n /_inference/rerank/{inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_inference`\n" + ], + "x-api": "rerank.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_slm/status": { - "get": { + "/_inference/sparse_embedding/{inference_id}": { + "post": { "tags": [ - "slm" + "inference" ], - "summary": "Get the snapshot lifecycle management status", - "operationId": "slm-get-status", + "summary": "Perform sparse embedding inference on the service", + "operationId": "inference-sparse-embedding", "parameters": [ { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "description": "Specifies the amount of time to wait for the inference request to complete.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -39239,60 +45215,107 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "input": { + "description": "Inference input.\nEither a string or an array of strings.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "task_settings": { + "description": "Task settings for the individual inference request. These settings are specific to the you specified and override the task settings specified when initializing the service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] + } + }, + "required": [ + "input" + ] + }, + "examples": { + "SparseEmbeddingRequestExample1": { + "summary": "Sparse embedding task", + "description": "Run `POST _inference/sparse_embedding/my-elser-model` to perform sparse embedding on the example sentence.", + "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\"\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "operation_mode": { - "$ref": "#/components/schemas/_types.LifecycleOperationMode" - } - }, - "required": [ - "operation_mode" - ] + "$ref": "#/components/schemas/inference._types.SparseEmbeddingInferenceResult" }, "examples": { - "GetSnapshotLifecycleManagementStatusResponseExample1": { - "description": "A successful response from `GET _slm/status`.", - "value": "{\n \"operation_mode\": \"RUNNING\"\n}" + "SparseEmbeddingResponseExample1": { + "summary": "Sparse embedding task", + "description": "An abbreviated response from `POST _inference/sparse_embedding/my-elser-model`.\n", + "value": "{\n \"sparse_embedding\": [\n {\n \"is_truncated\": false,\n \"embedding\": {\n \"port\": 2.1259406,\n \"sky\": 1.7073475,\n \"color\": 1.6922266,\n \"dead\": 1.6247464,\n \"television\": 1.3525393,\n \"above\": 1.2425821,\n \"tuned\": 1.1440028,\n \"colors\": 1.1218185,\n \"tv\": 1.0111054,\n \"ports\": 1.0067928,\n \"poem\": 1.0042328,\n \"channel\": 0.99471164,\n \"tune\": 0.96235967,\n \"scene\": 0.9020516\n }\n }\n ]\n}" } } } } } }, - "x-state": "Added in 7.6.0", - "x-api-name" : "get_status", - "x-namespace": "slm" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n POST\n /_inference/sparse_embedding/{inference_id}\n
\n " + ], + "x-api": "sparse_embedding.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_slm/start": { + "/_inference/completion/{inference_id}/_stream": { "post": { "tags": [ - "slm" + "inference" ], - "summary": "Start snapshot lifecycle management", - "description": "Snapshot lifecycle management (SLM) starts automatically when a cluster is formed.\nManually starting SLM is necessary only if it has been stopped using the stop SLM API.", - "operationId": "slm-start", + "summary": "Perform streaming completion inference on the service", + "description": "Get real-time responses for completion tasks by delivering answers incrementally, reducing response times during computation.\nThis API works only with the completion task type.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThis API requires the `monitor_inference` cluster privilege (the built-in `inference_admin` and `inference_user` roles grant this privilege). You must use a client that supports streaming.", + "operationId": "inference-stream-completion", "parameters": [ { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "in": "path", + "name": "inference_id", + "description": "The unique identifier for the inference endpoint.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "description": "The amount of time to wait for the inference request to complete.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -39300,52 +45323,102 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "input": { + "description": "The text on which you want to perform the inference task.\nIt can be a single string or an array.\n\nNOTE: Inference endpoints for the completion task type currently only support a single string as input.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "task_settings": { + "description": "Task settings for the individual inference request. These settings are specific to the you specified and override the task settings specified when initializing the service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] + } + }, + "required": [ + "input" + ] + }, + "examples": { + "StreamInferenceRequestExample1": { + "summary": "Perform a completion task", + "description": "Run `POST _inference/completion/openai-completion/_stream` to perform a completion on the example question with streaming.", + "value": "{\n \"input\": \"What is Elastic?\"\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "StartSnapshotLifecycleManagementResponseExample1": { - "description": "A successful response from `POST _slm/start`.", - "value": "{\n \"acknowledged\": true\n}" - } + "$ref": "#/components/schemas/_types.StreamResult" } } } } }, - "x-state": "Added in 7.6.0", - "x-api-name" : "start", - "x-namespace": "slm" + "x-state": "Generally available; Added in 8.16.0", + "x-variations": [ + "
\n POST\n /_inference/completion/{inference_id}/_stream\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_inference`\n" + ], + "x-api": "stream_completion.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_slm/stop": { + "/_inference/text_embedding/{inference_id}": { "post": { "tags": [ - "slm" + "inference" ], - "summary": "Stop snapshot lifecycle management", - "description": "Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.\nThis API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices.\nStopping SLM does not stop any snapshots that are in progress.\nYou can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.\n\nThe API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped.\nUse the get snapshot lifecycle management status API to see if SLM is running.", - "operationId": "slm-stop", + "summary": "Perform text embedding inference on the service", + "operationId": "inference-text-embedding", "parameters": [ { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "description": "Specifies the amount of time to wait for the inference request to complete.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -39353,170 +45426,195 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "input": { + "description": "Inference input.\nEither a string or an array of strings.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "input_type": { + "description": "The input data type for the text embedding model. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "type": "string" + }, + "task_settings": { + "description": "Task settings for the individual inference request. These settings are specific to the you specified and override the task settings specified when initializing the service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] + } + }, + "required": [ + "input" + ] + }, + "examples": { + "TextEmbeddingRequestExample1": { + "summary": "Text embedding task", + "description": "Run `POST _inference/text_embedding/my-cohere-endpoint` to perform text embedding on the example sentence using the Cohere integration,", + "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\": \"ingest\"\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/inference._types.TextEmbeddingInferenceResult" + }, + "examples": { + "TextEmbeddingResponseExample1": { + "summary": "Text embedding task", + "description": "An abbreviated response from `POST _inference/text_embedding/my-text-embedding-endpoint`.\n", + "value": "{\n \"text_embedding\": [\n {\n \"embedding\": [\n 0.018569946,\n -0.036895752,\n 0.01486969,\n -0.0045204163,\n -0.04385376,\n 0.0075950623,\n 0.04260254,\n -0.004005432,\n 0.007865906,\n 0.030792236,\n -0.050476074,\n 0.011795044,\n -0.011642456,\n -0.010070801\n ]\n }\n ]\n}" + } } } } } }, - "x-state": "Added in 7.6.0", - "x-api-name" : "stop", - "x-namespace": "slm" + "x-state": "Generally available; Added in 8.11.0", + "x-variations": [ + "
\n POST\n /_inference/text_embedding/{inference_id}\n
\n " + ], + "x-api": "text_embedding.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_snapshot/{repository}/_cleanup": { - "post": { + "/_inference/{inference_id}/_update": { + "put": { "tags": [ - "snapshot" + "inference" ], - "summary": "Clean up the snapshot repository", - "description": "Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-cleanup" - }, - "operationId": "snapshot-cleanup-repository", + "summary": "Update an inference endpoint", + "description": "Modify `task_settings`, secrets (within `service_settings`), or `num_allocations` for an inference endpoint, depending on the specific endpoint service and `task_type`.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", + "operationId": "inference-update", "parameters": [ { "in": "path", - "name": "repository", - "description": "The name of the snapshot repository to clean up.", + "name": "inference_id", + "description": "The unique identifier of the inference endpoint.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "timeout", - "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + "examples": { + "InferenceUpdateExample1": { + "description": "An example body for a `PUT _inference/my-inference-endpoint/_update` request.", + "value": "{\n \"service_settings\": {\n \"api_key\": \"\"\n },\n\"service\": \"example-service\"\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "results": { - "$ref": "#/components/schemas/snapshot.cleanup_repository.CleanupRepositoryResults" - } - }, - "required": [ - "results" - ] - }, - "examples": { - "SnapshotCleanupRepositoryResponseExample1": { - "description": "A successful response from `POST /_snapshot/my_repository/_cleanup`.", - "value": "{\n \"results\": {\n \"deleted_bytes\": 20,\n \"deleted_blobs\": 5\n }\n}" - } + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" } } } } }, - "x-state": "Added in 7.4.0", - "x-api-name" : "cleanup_repository", - "x-namespace": "snapshot" + "x-state": "Generally available; Added in 8.17.0", + "x-variations": [ + "
\n PUT\n /_inference/{inference_id}/_update\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "update.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}": { + "/_inference/{task_type}/{inference_id}/_update": { "put": { "tags": [ - "snapshot" + "inference" ], - "summary": "Clone a snapshot", - "description": "Clone part of all of a snapshot into another snapshot in the same repository.", - "operationId": "snapshot-clone", + "summary": "Update an inference endpoint", + "description": "Modify `task_settings`, secrets (within `service_settings`), or `num_allocations` for an inference endpoint, depending on the specific endpoint service and `task_type`.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", + "operationId": "inference-update-1", "parameters": [ { "in": "path", - "name": "repository", - "description": "The name of the snapshot repository that both source and target snapshot belong to.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - { - "in": "path", - "name": "snapshot", - "description": "The source snapshot name.", + "name": "task_type", + "description": "The type of inference task that the model performs.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/inference._types.TaskType" }, "style": "simple" }, { "in": "path", - "name": "target_snapshot", - "description": "The target snapshot name.", + "name": "inference_id", + "description": "The unique identifier of the inference endpoint.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "indices": { - "description": "A comma-separated list of indices to include in the snapshot.\nMulti-target syntax is supported.", - "type": "string" - } - }, - "required": [ - "indices" - ] + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, "examples": { - "SnapshotCloneRequestExample1": { - "description": "Run `PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot` to clone the `source_snapshot` into a new `target_snapshot`.", - "value": "{\n \"indices\": \"index_a,index_b\"\n}" + "InferenceUpdateExample1": { + "description": "An example body for a `PUT _inference/my-inference-endpoint/_update` request.", + "value": "{\n \"service_settings\": {\n \"api_key\": \"\"\n },\n\"service\": \"example-service\"\n}" } } } @@ -39529,179 +45627,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" } } } } }, - "x-state": "Added in 7.10.0", - "x-api-name" : "clone", - "x-namespace": "snapshot" + "x-state": "Generally available; Added in 8.17.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{inference_id}/_update\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "update.inference", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_snapshot/{repository}/{snapshot}": { + "/": { "get": { "tags": [ - "snapshot" - ], - "summary": "Get snapshot information", - "description": "NOTE: The `after` parameter and `next` field enable you to iterate through snapshots with some consistency guarantees regarding concurrent creation or deletion of snapshots.\nIt is guaranteed that any snapshot that exists at the beginning of the iteration and is not concurrently deleted will be seen during the iteration.\nSnapshots concurrently created may be seen during an iteration.", - "operationId": "snapshot-get", - "parameters": [ - { - "in": "path", - "name": "repository", - "description": "A comma-separated list of snapshot repository names used to limit the request.\nWildcard (`*`) expressions are supported.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - { - "in": "path", - "name": "snapshot", - "description": "A comma-separated list of snapshot names to retrieve\nWildcards (`*`) are supported.\n\n* To get information about all snapshots in a registered repository, use a wildcard (`*`) or `_all`.\n* To get information about any snapshots that are currently running, use `_current`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - { - "in": "query", - "name": "after", - "description": "An offset identifier to start pagination from as returned by the next field in the response body.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "from_sort_value", - "description": "The value of the current sort column at which to start retrieval.\nIt can be a string `snapshot-` or a repository name when sorting by snapshot or repository name.\nIt can be a millisecond time value or a number when sorting by `index-` or shard count.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error for any snapshots that are unavailable.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "index_details", - "description": "If `true`, the response includes 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.\nThe default is `false`, meaning that this information is omitted.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "index_names", - "description": "If `true`, the response includes the name of each index in each snapshot.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "include_repository", - "description": "If `true`, the response includes the repository name in each snapshot.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "order", - "description": "The sort order.\nValid values are `asc` for ascending and `desc` for descending order.\nThe default behavior is ascending order.\n\nSupported values include:\n - `asc`: Ascending (smallest to largest)\n - `desc`: Descending (largest to smallest)\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SortOrder" - }, - "style": "form" - }, - { - "in": "query", - "name": "offset", - "description": "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.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "size", - "description": "The maximum number of snapshots to return.\nThe default is 0, which means to return all that match the request without limit.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "slm_policy_filter", - "description": "Filter snapshots by a comma-separated list of snapshot lifecycle management (SLM) policy names that snapshots belong to.\n\nYou can use wildcards (`*`) and combinations of wildcards followed by exclude patterns starting with `-`.\nFor example, the pattern `*,-policy-a-\\*` will return all snapshots except for those that were created by an SLM policy with a name starting with `policy-a-`.\nNote that the wildcard pattern `*` matches all snapshots created by an SLM policy but not those snapshots that were not created by an SLM policy.\nTo include snapshots that were not created by an SLM policy, you can use the special pattern `_none` that will match all snapshots without an SLM policy.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort", - "description": "The sort order for the result.\nThe default behavior is sorting by snapshot start time stamp.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/snapshot._types.SnapshotSort" - }, - "style": "form" - }, - { - "in": "query", - "name": "verbose", - "description": "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.\n\nNOTE: The parameters `size`, `order`, `after`, `from_sort_value`, `offset`, `slm_policy_filter`, and `sort` are not supported when you set `verbose=false` and the sort order for requests with `verbose=false` is undefined.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - } + "info" ], + "summary": "Get cluster info", + "description": "Get basic build, version, and cluster information.\n::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.", + "operationId": "info", "responses": { "200": { "description": "", @@ -39710,155 +45666,200 @@ "schema": { "type": "object", "properties": { - "remaining": { - "description": "The number of remaining snapshots that were not returned due to size limits and that can be fetched by additional requests using the `next` field value.", - "type": "number" + "cluster_name": { + "description": "The responding cluster's name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "total": { - "description": "The total number of snapshots that match the request when ignoring the size limit or `after` query parameter.", - "type": "number" + "cluster_uuid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" + } + ] }, - "next": { - "description": "If the request contained a size limit and there might be more results, a `next` field will be added to the response.\nIt can be used as the `after` query parameter to fetch additional results.", - "type": "string" + "name": { + "description": "The responding node's name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/snapshot.get.SnapshotResponseItem" - } + "tagline": { + "type": "string" }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/snapshot._types.SnapshotInfo" - } + "version": { + "description": "The running version of Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ElasticsearchVersionInfo" + } + ] } }, "required": [ - "remaining", - "total" + "cluster_name", + "cluster_uuid", + "name", + "tagline", + "version" ] }, "examples": { - "SnapshotGetResponseExample1": { - "description": "A successful response from `GET /_snapshot/my_repository/snapshot_*?sort=start_time&from_sort_value=1577833200000`. The response contains information for all snapshots with names starting with `snapshot_` and that started on or after timestamp `1577833200000` (Jan 1st 2020) when sorted by snapshot start time in the default ascending order.\n", - "value": "{\n \"snapshots\": [\n {\n \"snapshot\": \"snapshot_1\",\n \"uuid\": \"dKb54xw67gvdRctLCxSket\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-07-06T21:55:18.128Z\",\n \"start_time_in_millis\": 1593093628849,\n \"end_time\": \"2020-07-06T21:55:18.129Z\",\n \"end_time_in_millis\": 1593093628850,\n \"duration_in_millis\": 1,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n },\n {\n \"snapshot\": \"snapshot_2\",\n \"uuid\": \"vdRctLCxSketdKb54xw67g\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-07-06T21:55:18.130Z\",\n \"start_time_in_millis\": 1593093628851,\n \"end_time\": \"2020-07-06T21:55:18.130Z\",\n \"end_time_in_millis\": 1593093628851,\n \"duration_in_millis\": 0,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n },\n {\n \"snapshot\": \"snapshot_3\",\n \"uuid\": \"dRctdKb54xw67gvLCxSket\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-07-06T21:55:18.131Z\",\n \"start_time_in_millis\": 1593093628852,\n \"end_time\": \"2020-07-06T21:55:18.135Z\",\n \"end_time_in_millis\": 1593093628856,\n \"duration_in_millis\": 4,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n ],\n \"total\": 3,\n \"remaining\": 0\n}" + "RootNodeInfoResponseExample1": { + "summary": "Stack response", + "description": "A successful response from `GET /`.", + "value": "{\n \"name\": \"instance-0000000000\",\n \"cluster_name\": \"my_test_cluster\",\n \"cluster_uuid\": \"zk-HjQtYQGyL3NFSSu7InA\",\n \"version\": {\n \"number\": \"9.1.0\",\n \"build_flavor\": \"default\",\n \"build_type\": \"docker\",\n \"build_hash\": 0,\n \"build_date\": \"2025-07-09T22:10:13.578Z\",\n \"build_snapshot\": false,\n \"lucene_version\": \"10.2.2\",\n \"minimum_wire_compatibility_version\": \"8.19.0\",\n \"minimum_index_compatibility_version\": \"8.0.0\"\n },\n \"tagline\": \"You Know, for Search\"\n}" + }, + "RootNodeInfoResponseExample2": { + "summary": "Serverless response", + "description": "A successful response from `GET /` on Serverless. This API is retained for backward compatibility only. Some fields, such as the version number, return static values and should be ignored.", + "value": "{\n \"name\": \"serverless\",\n \"cluster_name\": \"my_test_serverless_cluster\",\n \"cluster_uuid\": \"8xx0pi24Squnf4PFDOAtwg\",\n \"version\": {\n \"number\": \"8.11.0\",\n \"build_flavor\": \"serverless\",\n \"build_type\": \"docker\",\n \"build_hash\": 0,\n \"build_date\": \"2023-10-31T00:00:00.000Z\",\n \"build_snapshot\": false,\n \"lucene_version\": \"9.7.0\",\n \"minimum_wire_compatibility_version\": \"8.11.0\",\n \"minimum_index_compatibility_version\": \"8.11.0\"\n },\n \"tagline\": \"You Know, for Search\"\n}" } } } } } }, - "x-state": "Added in 0.0.0", - "x-api-name" : "get", - "x-namespace": "snapshot" - }, - "put": { - "tags": [ - "snapshot" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /\n
\n " ], - "summary": "Create a snapshot", - "description": "Take a snapshot of a cluster or of data streams and indices.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots" - }, - "operationId": "snapshot-create", - "parameters": [ - { - "$ref": "#/components/parameters/snapshot.create-repository" - }, - { - "$ref": "#/components/parameters/snapshot.create-snapshot" - }, - { - "$ref": "#/components/parameters/snapshot.create-master_timeout" - }, + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "info", + "x-category": "info", + "x-metaTags": [ { - "$ref": "#/components/parameters/snapshot.create-wait_for_completion" + "content": "Elasticsearch", + "name": "product_name" } + ] + }, + "head": { + "tags": [ + "cluster" ], - "requestBody": { - "$ref": "#/components/requestBodies/snapshot.create" - }, + "summary": "Ping the cluster", + "description": "Get information about whether the cluster is running.", + "operationId": "ping", "responses": { "200": { - "$ref": "#/components/responses/snapshot.create-200" + "description": "", + "content": { + "application/json": {} + } } }, - "x-state": "Added in 0.0.0", - "x-api-name" : "create", - "x-namespace": "snapshot" - }, - "post": { + "x-state": "Generally available", + "x-variations": [ + "
\n HEAD\n /\n
\n " + ], + "x-api": "ping", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ingest/geoip/database/{id}": { + "get": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Create a snapshot", - "description": "Take a snapshot of a cluster or of data streams and indices.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots" - }, - "operationId": "snapshot-create-1", + "summary": "Get GeoIP database configurations", + "description": "Get information about one or more IP geolocation database configurations.", + "operationId": "ingest-get-geoip-database-1", "parameters": [ { - "$ref": "#/components/parameters/snapshot.create-repository" - }, - { - "$ref": "#/components/parameters/snapshot.create-snapshot" - }, - { - "$ref": "#/components/parameters/snapshot.create-master_timeout" - }, - { - "$ref": "#/components/parameters/snapshot.create-wait_for_completion" + "in": "path", + "name": "id", + "description": "A comma-separated list of database configuration IDs to retrieve.\nWildcard (`*`) expressions are supported.\nTo get all database configurations, omit this parameter or use `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Ids" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/snapshot.create" - }, "responses": { "200": { - "$ref": "#/components/responses/snapshot.create-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest.get_geoip_database.DatabaseConfigurationMetadata" + } + } + }, + "required": [ + "databases" + ] + } + } + } } }, - "x-state": "Added in 0.0.0", - "x-api-name" : "create", - "x-namespace": "snapshot" + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n GET\n /_ingest/geoip/database/{id}\n
\n " + ], + "x-api": "get_geoip_database.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, - "delete": { + "put": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Delete snapshots", - "operationId": "snapshot-delete", + "summary": "Create or update a GeoIP database configuration", + "description": "Refer to the create or update IP geolocation database configuration API.", + "operationId": "ingest-put-geoip-database", "parameters": [ { "in": "path", - "name": "repository", - "description": "The name of the repository to delete a snapshot from.", + "name": "id", + "description": "ID of the database configuration to create or update.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { - "in": "path", - "name": "snapshot", - "description": "A comma-separated list of snapshot names to delete.\nIt also accepts wildcards (`*`).", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -39866,6 +45867,38 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "The provider-assigned name of the IP geolocation database to download.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "maxmind": { + "description": "The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading.\nAt present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Maxmind" + } + ] + } + }, + "required": [ + "name", + "maxmind" + ] + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -39873,143 +45906,47 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "SnapshotDeleteResponseExample1": { - "description": "A successful response from `DELETE /_snapshot/my_repository/snapshot_2,snapshot_3`. The request deletes `snapshot_2` and `snapshot_3` from the repository named `my_repository`.\n", - "value": "{\n \"acknowledged\" : true\n}" - } } } } } }, - "x-api-name" : "delete", - "x-namespace": "snapshot" - } - }, - "/_snapshot/{repository}": { - "get": { - "tags": [ - "snapshot" - ], - "summary": "Get snapshot repository information", - "operationId": "snapshot-get-repository-1", - "parameters": [ - { - "$ref": "#/components/parameters/snapshot.get_repository-repository" - }, - { - "$ref": "#/components/parameters/snapshot.get_repository-local" - }, - { - "$ref": "#/components/parameters/snapshot.get_repository-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/snapshot.get_repository-200" - } - }, - "x-state": "Added in 0.0.0", - "x-api-name" : "get_repository", - "x-namespace": "snapshot" - }, - "put": { - "tags": [ - "snapshot" - ], - "summary": "Create or update a snapshot repository", - "description": "IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.\nTo register a snapshot repository, the cluster's global metadata must be writeable.\nEnsure there are no cluster blocks (for example, `cluster.blocks.read_only` and `clsuter.blocks.read_only_allow_delete` settings) that prevent write access.\n\nSeveral options for this API can be specified using a query parameter or a request body parameter.\nIf both parameters are specified, only the query parameter is used.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed" - }, - "operationId": "snapshot-create-repository", - "parameters": [ - { - "$ref": "#/components/parameters/snapshot.create_repository-repository" - }, - { - "$ref": "#/components/parameters/snapshot.create_repository-master_timeout" - }, - { - "$ref": "#/components/parameters/snapshot.create_repository-timeout" - }, - { - "$ref": "#/components/parameters/snapshot.create_repository-verify" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/snapshot.create_repository" - }, - "responses": { - "200": { - "$ref": "#/components/responses/snapshot.create_repository-200" - } - }, - "x-state": "Added in 0.0.0", - "x-api-name" : "create_repository", - "x-namespace": "snapshot" - }, - "post": { - "tags": [ - "snapshot" + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n PUT\n /_ingest/geoip/database/{id}\n
\n " ], - "summary": "Create or update a snapshot repository", - "description": "IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.\nTo register a snapshot repository, the cluster's global metadata must be writeable.\nEnsure there are no cluster blocks (for example, `cluster.blocks.read_only` and `clsuter.blocks.read_only_allow_delete` settings) that prevent write access.\n\nSeveral options for this API can be specified using a query parameter or a request body parameter.\nIf both parameters are specified, only the query parameter is used.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed" - }, - "operationId": "snapshot-create-repository-1", - "parameters": [ - { - "$ref": "#/components/parameters/snapshot.create_repository-repository" - }, - { - "$ref": "#/components/parameters/snapshot.create_repository-master_timeout" - }, - { - "$ref": "#/components/parameters/snapshot.create_repository-timeout" - }, + "x-api": "put_geoip_database.ingest", + "x-category": "ingest", + "x-metaTags": [ { - "$ref": "#/components/parameters/snapshot.create_repository-verify" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/snapshot.create_repository" - }, - "responses": { - "200": { - "$ref": "#/components/responses/snapshot.create_repository-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 0.0.0", - "x-api-name" : "create_repository", - "x-namespace": "snapshot" + ] }, "delete": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Delete snapshot repositories", - "description": "When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots.\nThe snapshots themselves are left untouched and in place.", - "operationId": "snapshot-delete-repository", + "summary": "Delete GeoIP database configurations", + "description": "Delete one or more IP geolocation database configurations.", + "operationId": "ingest-delete-geoip-database", "parameters": [ { "in": "path", - "name": "repository", - "description": "The ame of the snapshot repositories to unregister.\nWildcard (`*`) patterns are supported.", + "name": "id", + "description": "A comma-separated list of geoip database configurations to delete", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.Ids" }, "style": "simple" }, { "in": "query", "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -40019,7 +45956,7 @@ { "in": "query", "name": "timeout", - "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", + "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -40039,170 +45976,194 @@ } } }, - "x-state": "Added in 0.0.0", - "x-api-name" : "delete_repository", - "x-namespace": "snapshot" + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n DELETE\n /_ingest/geoip/database/{id}\n
\n " + ], + "x-api": "delete_geoip_database.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_snapshot": { + "/_ingest/ip_location/database/{id}": { "get": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Get snapshot repository information", - "operationId": "snapshot-get-repository", + "summary": "Get IP geolocation database configurations", + "operationId": "ingest-get-ip-location-database-1", "parameters": [ { - "$ref": "#/components/parameters/snapshot.get_repository-local" - }, - { - "$ref": "#/components/parameters/snapshot.get_repository-master_timeout" + "in": "path", + "name": "id", + "description": "Comma-separated list of database configuration IDs to retrieve.\nWildcard (`*`) expressions are supported.\nTo get all database configurations, omit this parameter or use `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Ids" + }, + "style": "simple" } ], "responses": { "200": { - "$ref": "#/components/responses/snapshot.get_repository-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest.get_ip_location_database.DatabaseConfigurationMetadata" + } + } + }, + "required": [ + "databases" + ] + } + } + } } }, - "x-state": "Added in 0.0.0", - "x-api-name" : "get_repository", - "x-namespace": "snapshot" - } - }, - "/_snapshot/{repository}/_analyze": { - "post": { + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n GET\n /_ingest/ip_location/database/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "get_ip_location_database.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Analyze a snapshot repository", - "description": "Performs operations on a snapshot repository in order to check for incorrect behaviour.\n\nThere are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch.\nSome storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do.\nThis API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system.\n\nThe default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations.\nRun your first analysis with the default parameter values to check for simple problems.\nSome repositories may behave correctly when lightly loaded but incorrectly under production-like workloads.\nIf the first analysis is successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a `blob_count` of at least `2000`, a `max_blob_size` of at least `2gb`, a `max_total_data_size` of at least `1tb`, and a `register_operation_count` of at least `100`.\nAlways specify a generous timeout, possibly `1h` or longer, to allow time for each analysis to run to completion.\nSome repositories may behave correctly when accessed by a small number of Elasticsearch nodes but incorrectly when accessed concurrently by a production-scale cluster.\nPerform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once.\n\nIf the analysis fails, Elasticsearch detected that your repository behaved unexpectedly.\nThis usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support.\nIf so, this storage system is not suitable for use as a snapshot repository.\nRepository analysis triggers conditions that occur only rarely when taking snapshots in a production system.\nSnapshotting to unsuitable storage may appear to work correctly most of the time despite repository analysis failures.\nHowever your snapshot data is at risk if you store it in a snapshot repository that does not reliably pass repository analysis.\nYou can demonstrate that the analysis failure is due to an incompatible storage implementation by verifying that Elasticsearch does not detect the same problem when analysing the reference implementation of the storage protocol you are using.\nFor instance, if you are using storage that offers an API which the supplier claims to be compatible with AWS S3, verify that repositories in AWS S3 do not fail repository analysis.\nThis allows you to demonstrate to your storage supplier that a repository analysis failure must only be caused by an incompatibility with AWS S3 and cannot be attributed to a problem in Elasticsearch.\nPlease do not report Elasticsearch issues involving third-party storage systems unless you can demonstrate that the same issue exists when analysing a repository that uses the reference implementation of the same storage protocol.\nYou will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects.\n\nIf the analysis is successful, the API returns details of the testing process, optionally including how long each operation took.\nYou can use this information to determine the performance of your storage system.\nIf any operation fails or returns an incorrect result, the API returns an error.\nIf the API returns an error, it may not have removed all the data it wrote to the repository.\nThe error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs.\nYou should verify that this location has been cleaned up correctly.\nIf there is still leftover data at the specified location, you should manually remove it.\n\nIf the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled.\nSome clients are configured to close their connection if no response is received within a certain timeout.\nAn analysis takes a long time to complete so you might need to relax any such client-side timeouts.\nOn cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all.\nThe path to the leftover data is recorded in the Elasticsearch logs.\nYou should verify that this location has been cleaned up correctly.\nIf there is still leftover data at the specified location, you should manually remove it.\n\nIf the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed.\nThe analysis attempts to detect common bugs but it does not offer 100% coverage.\nAdditionally, it does not test the following:\n\n* Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster.\n* Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted.\n* Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results.\n\nIMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again.\nThis consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself.\nYou must ensure this load does not affect other users of these systems.\nAnalyses respect the repository settings `max_snapshot_bytes_per_sec` and `max_restore_bytes_per_sec` if available and the cluster setting `indices.recovery.max_bytes_per_sec` which you can use to limit the bandwidth they consume.\n\nNOTE: This API is intended for exploratory use by humans.\nYou should expect the request parameters and the response format to vary in future versions.\nThe response exposes immplementation details of the analysis which may change from version to version.\n\nNOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones.\nA storage system that passes repository analysis with one version of Elasticsearch may fail with a different version.\nThis indicates it behaves incorrectly in ways that the former version did not detect.\nYou must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch.\n\nNOTE: This API may not work correctly in a mixed-version cluster.\n\n*Implementation details*\n\nNOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions.\nThe request parameters and response format depend on details of the implementation so may also be different in newer versions.\n\nThe analysis comprises a number of blob-level tasks, as set by the `blob_count` parameter and a number of compare-and-exchange operations on linearizable registers, as set by the `register_operation_count` parameter.\nThese tasks are distributed over the data and master-eligible nodes in the cluster for execution.\n\nFor most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote.\nThe size of the blob is chosen randomly, according to the `max_blob_size` and `max_total_data_size` parameters.\nIf any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires.\n\nFor some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes.\nThese reads are permitted to fail, but must not return partial data.\nIf any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires.\n\nFor some blob-level tasks, the executing node will overwrite the blob while its peers are reading it.\nIn this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs.\nIf any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites.\n\nThe executing node will use a variety of different methods to write the blob.\nFor instance, where applicable, it will use both single-part and multi-part uploads.\nSimilarly, the reading nodes will use a variety of different methods to read the data back again.\nFor instance they may read the entire blob from start to end or may read only a subset of the data.\n\nFor some blob-level tasks, the executing node will cancel the write before it is complete.\nIn this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob.\n\nLinearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation.\nThis operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time.\nThe detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type.\nRepository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed.\nRepository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results.\nIf an operation fails due to contention, Elasticsearch retries the operation until it succeeds.\nMost of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob.\nSome operations also verify the behavior on small blobs with sizes other than 8 bytes.", - "operationId": "snapshot-repository-analyze", + "summary": "Create or update an IP geolocation database configuration", + "operationId": "ingest-put-ip-location-database", "parameters": [ { "in": "path", - "name": "repository", - "description": "The name of the repository.", + "name": "id", + "description": "The database configuration identifier.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "blob_count", - "description": "The total number of blobs to write to the repository during the test.\nFor realistic experiments, you should set it to at least `2000`.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "concurrency", - "description": "The number of operations to run concurrently during the test.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "detailed", - "description": "Indicates whether to return detailed results, including timing information for every operation performed during the analysis.\nIf false, it returns only a summary of the analysis.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "early_read_node_count", - "description": "The number of nodes on which to perform an early read operation while writing each blob.\nEarly read operations are only rarely performed.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "max_blob_size", - "description": "The maximum size of a blob to be written during the test.\nFor realistic experiments, you should set it to at least `2gb`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "style": "form" - }, - { - "in": "query", - "name": "max_total_data_size", - "description": "An upper limit on the total size of all the blobs written during the test.\nFor realistic experiments, you should set it to at least `1tb`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "style": "form" - }, - { - "in": "query", - "name": "rare_action_probability", - "description": "The probability of performing a rare action such as an early read, an overwrite, or an aborted write on each blob.", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "rarely_abort_writes", - "description": "Indicates whether to rarely cancel writes before they complete.", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response indicates that it was not completely acknowledged.\nA value of `-1` indicates that the request should never time out.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ingest._types.DatabaseConfiguration" + }, + "examples": { + "IngestPutIpLocationDatabaseExample1": { + "description": "An example body for a `PUT _ingest/ip_location/database/my-database-1` request.", + "value": "{\n \"name\": \"GeoIP2-Domain\",\n \"maxmind\": {\n \"account_id\": \"1234567\"\n }\n}" + } + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n PUT\n /_ingest/ip_location/database/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "put_ip_location_database.ingest", + "x-category": "ingest", + "x-metaTags": [ { - "in": "query", - "name": "read_node_count", - "description": "The number of nodes on which to read a blob after writing.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "ingest" + ], + "summary": "Delete IP geolocation database configurations", + "operationId": "ingest-delete-ip-location-database", + "parameters": [ { - "in": "query", - "name": "register_operation_count", - "description": "The minimum number of linearizable register operations to perform in total.\nFor realistic experiments, you should set it to at least `100`.", + "in": "path", + "name": "id", + "description": "A comma-separated list of IP location database configurations.", + "required": true, "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Ids" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "seed", - "description": "The seed for the pseudo-random number generator used to generate the list of operations performed during the test.\nTo repeat the same set of operations in multiple experiments, use the same seed in each experiment.\nNote that the operations are performed concurrently so might not always happen in the same order on each run.", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", "name": "timeout", - "description": "The period of time to wait for the test to complete.\nIf no response is received before the timeout expires, the test is cancelled and returns an error.", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -40216,209 +46177,68 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "blob_count": { - "description": "The number of blobs written to the repository during the test.", - "type": "number" - }, - "blob_path": { - "description": "The path in the repository under which all the blobs were written during the test.", - "type": "string" - }, - "concurrency": { - "description": "The number of write operations performed concurrently during the test.", - "type": "number" - }, - "coordinating_node": { - "$ref": "#/components/schemas/snapshot.repository_analyze.SnapshotNodeInfo" - }, - "delete_elapsed": { - "$ref": "#/components/schemas/_types.Duration" - }, - "delete_elapsed_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "details": { - "$ref": "#/components/schemas/snapshot.repository_analyze.DetailsInfo" - }, - "early_read_node_count": { - "description": "The limit on the number of nodes on which early read operations were performed after writing each blob.", - "type": "number" - }, - "issues_detected": { - "description": "A list of correctness issues detected, which is empty if the API succeeded.\nIt is included to emphasize that a successful response does not guarantee correct behaviour in future.", - "type": "array", - "items": { - "type": "string" - } - }, - "listing_elapsed": { - "$ref": "#/components/schemas/_types.Duration" - }, - "listing_elapsed_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "max_blob_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_blob_size_bytes": { - "description": "The limit, in bytes, on the size of a blob written during the test.", - "type": "number" - }, - "max_total_data_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_total_data_size_bytes": { - "description": "The limit, in bytes, on the total size of all blob written during the test.", - "type": "number" - }, - "rare_action_probability": { - "description": "The probability of performing rare actions during the test.", - "type": "number" - }, - "read_node_count": { - "description": "The limit on the number of nodes on which read operations were performed after writing each blob.", - "type": "number" - }, - "repository": { - "description": "The name of the repository that was the subject of the analysis.", - "type": "string" - }, - "seed": { - "description": "The seed for the pseudo-random number generator used to generate the operations used during the test.", - "type": "number" - }, - "summary": { - "$ref": "#/components/schemas/snapshot.repository_analyze.SummaryInfo" - } - }, - "required": [ - "blob_count", - "blob_path", - "concurrency", - "coordinating_node", - "delete_elapsed", - "delete_elapsed_nanos", - "details", - "early_read_node_count", - "issues_detected", - "listing_elapsed", - "listing_elapsed_nanos", - "max_blob_size", - "max_blob_size_bytes", - "max_total_data_size", - "max_total_data_size_bytes", - "rare_action_probability", - "read_node_count", - "repository", - "seed", - "summary" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 7.12.0", - "x-api-name" : "repository_analyze", - "x-namespace": "snapshot" + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n DELETE\n /_ingest/ip_location/database/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "delete_ip_location_database.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_snapshot/{repository}/_verify_integrity": { - "post": { + "/_ingest/pipeline/{id}": { + "get": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Verify the repository integrity", - "description": "Verify the integrity of the contents of a snapshot repository.\n\nThis API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail.\n\nIf you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its `read_only` option to `true`, and use this API to verify its integrity.\nUntil you do so:\n\n* It may not be possible to restore some snapshots from this repository.\n* Searchable snapshots may report errors when searched or may have unassigned shards.\n* Taking snapshots into this repository may fail or may appear to succeed but have created a snapshot which cannot be restored.\n* Deleting snapshots from this repository may fail or may appear to succeed but leave the underlying data on disk.\n* Continuing to write to the repository while it is in an invalid state may causing additional damage to its contents.\n\nIf the API finds any problems with the integrity of the contents of your repository, Elasticsearch will not be able to repair the damage.\nThe only way to bring the repository back into a fully working state after its contents have been damaged is by restoring its contents from a repository backup which was taken before the damage occurred.\nYou must also identify what caused the damage and take action to prevent it from happening again.\n\nIf you cannot restore a repository backup, register a new repository and use this for all future snapshot operations.\nIn some cases it may be possible to recover some of the contents of a damaged repository, either by restoring as many of its snapshots as needed and taking new snapshots of the restored data, or by using the reindex API to copy data from any searchable snapshots mounted from the damaged repository.\n\nAvoid all operations which write to the repository while the verify repository integrity API is running.\nIf something changes the repository contents while an integrity verification is running then Elasticsearch may incorrectly report having detected some anomalies in its contents due to the concurrent writes.\nIt may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting.\n\nNOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions.\n\nNOTE: This API may not work correctly in a mixed-version cluster.\n\nThe default values for the parameters of this API are designed to limit the impact of the integrity verification on other activities in your cluster.\nFor instance, by default it will only use at most half of the `snapshot_meta` threads to verify the integrity of each snapshot, allowing other snapshot operations to use the other half of this thread pool.\nIf you modify these parameters to speed up the verification process, you risk disrupting other snapshot-related operations in your cluster.\nFor large repositories, consider setting up a separate single-node Elasticsearch cluster just for running the integrity verification API.\n\nThe response exposes implementation details of the analysis which may change from version to version.\nThe response body format is therefore not considered stable and may be different in newer versions.", - "operationId": "snapshot-repository-verify-integrity", + "summary": "Get pipelines", + "description": "Get information about one or more ingest pipelines.\nThis API returns a local reference of the pipeline.", + "externalDocs": { + "description": "Elasticsearch ingest pipelines", + "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-pipeline-api.html" + }, + "operationId": "ingest-get-pipeline-1", "parameters": [ { "in": "path", - "name": "repository", - "description": "The name of the snapshot repository.", + "name": "id", + "description": "Comma-separated list of pipeline IDs to retrieve.\nWildcard (`*`) expressions are supported.\nTo get all ingest pipelines, omit this parameter or use `*`.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "blob_thread_pool_concurrency", - "description": "If `verify_blob_contents` is `true`, this parameter specifies how many blobs to verify at once.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "index_snapshot_verification_concurrency", - "description": "The maximum number of index snapshots to verify concurrently within each index verification.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "index_verification_concurrency", - "description": "The number of indices to verify concurrently.\nThe default behavior is to use the entire `snapshot_meta` thread pool.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "max_bytes_per_sec", - "description": "If `verify_blob_contents` is `true`, this parameter specifies the maximum amount of data that Elasticsearch will read from the repository every second.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "max_failed_shard_snapshots", - "description": "The number of shard snapshot failures to track during integrity verification, in order to avoid excessive resource usage.\nIf your repository contains more than this number of shard snapshot failures, the verification will fail.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "meta_thread_pool_concurrency", - "description": "The maximum number of snapshot metadata operations to run concurrently.\nThe default behavior is to use at most half of the `snapshot_meta` thread pool at once.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "snapshot_verification_concurrency", - "description": "The number of snapshots to verify concurrently.\nThe default behavior is to use at most half of the `snapshot_meta` thread pool at once.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" }, { "in": "query", - "name": "verify_blob_contents", - "description": "Indicates whether to verify the checksum of every data blob in the repository.\nIf this feature is enabled, Elasticsearch will read the entire repository contents, which may be extremely slow and expensive.", + "name": "summary", + "description": "Return pipelines without their definitions", "deprecated": false, "schema": { "type": "boolean" @@ -40432,55 +46252,71 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + }, + "examples": { + "GetPipelineResponseExample1": { + "description": "A successful response for retrieving information about an ingest pipeline.", + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n}" + } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "repository_verify_integrity", - "x-namespace": "snapshot" - } - }, - "/_snapshot/{repository}/{snapshot}/_restore": { - "post": { + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_ingest/pipeline/{id}\n
\n " + ], + "x-api": "get_pipeline.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Restore a snapshot", - "description": "Restore a snapshot of a cluster or data streams and indices.\n\nYou can restore a snapshot only to a running cluster with an elected master node.\nThe snapshot repository must be registered and available to the cluster.\nThe snapshot and cluster versions must be compatible.\n\nTo restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks.\n\nBefore you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API:\n\n```\nGET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\n```\n\nIf no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices.\n\nIf your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot.", + "summary": "Create or update a pipeline", + "description": "Changes made using this API take effect immediately.", "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/restore-snapshot" + "description": "Elasticsearch ingest pipelines", + "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines" }, - "operationId": "snapshot-restore", + "operationId": "ingest-put-pipeline", "parameters": [ { "in": "path", - "name": "repository", - "description": "The name of the repository to restore a snapshot from.", + "name": "id", + "description": "ID of the ingest pipeline to create or update.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { - "in": "path", - "name": "snapshot", - "description": "The name of the snapshot to restore.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "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.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -40489,11 +46325,11 @@ }, { "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request returns a response when the restore operation completes.\nThe operation is complete when it finishes all attempts to recover primary shards for restored indices.\nThis applies even if one or more of the recovery attempts fail.\n\nIf `false`, the request returns a response when the restore operation initializes.", + "name": "if_version", + "description": "Required version for optimistic concurrency control for pipeline updates", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" } @@ -40504,72 +46340,71 @@ "schema": { "type": "object", "properties": { - "feature_states": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state" - }, - "description": "The feature states to restore.\nIf `include_global_state` is `true`, the request restores all feature states in the snapshot by default.\nIf `include_global_state` is `false`, the request restores no feature states by default.\nNote that specifying an empty array will result in the default behavior.\nTo restore no feature states, regardless of the `include_global_state` value, specify an array containing only the value `none` (`[\"none\"]`).", + "_meta": { + "description": "Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "description": { + "description": "Description of the ingest pipeline.", + "type": "string" + }, + "on_failure": { + "description": "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.", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ingest._types.ProcessorContainer" } }, - "ignore_index_settings": { - "description": "The index settings to not restore from the snapshot.\nYou can't use this option to ignore `index.number_of_shards`.\n\nFor data streams, this option applies only to restored backing indices.\nNew backing indices are configured using the data stream's matching index template.", + "processors": { + "description": "Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified.", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ingest._types.ProcessorContainer" } }, - "ignore_unavailable": { - "description": "If `true`, the request ignores any index or data stream in indices that's missing from the snapshot.\nIf `false`, the request returns an error for any missing index or data stream.", - "type": "boolean" - }, - "include_aliases": { - "description": "If `true`, the request restores aliases for any restored data streams and indices.\nIf `false`, the request doesn’t restore aliases.", - "type": "boolean" - }, - "include_global_state": { - "description": "If `true`, restore the cluster state. The cluster state includes:\n\n* Persistent cluster settings\n* Index templates\n* Legacy index templates\n* Ingest pipelines\n* Index lifecycle management (ILM) policies\n* Stored scripts\n* For snapshots taken after 7.12.0, feature states\n\nIf `include_global_state` is `true`, the restore operation merges the legacy index templates in your cluster with the templates contained in the snapshot, replacing any existing ones whose name matches one in the snapshot.\nIt completely removes all persistent settings, non-legacy index templates, ingest pipelines, and ILM lifecycle policies that exist in your cluster and replaces them with the corresponding items from the snapshot.\n\nUse the `feature_states` parameter to configure how feature states are restored.\n\nIf `include_global_state` is `true` and a snapshot was created without a global state then the restore request will fail.", - "type": "boolean" - }, - "index_settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "version": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] }, - "partial": { - "description": "If `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.\n\nIf true, it allows restoring a partial snapshot of indices with unavailable shards.\nOnly shards that were successfully included in the snapshot will be restored.\nAll missing shards will be recreated as empty.", + "deprecated": { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "default": false, "type": "boolean" }, - "rename_pattern": { - "externalDocs": { - "url": "https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#appendReplacement-java.lang.StringBuffer-java.lang.String-" - }, - "description": "A rename pattern to apply to restored data streams and indices.\nData streams and indices matching the rename pattern will be renamed according to `rename_replacement`.\n\nThe rename pattern is applied as defined by the regular expression that supports referencing the original text, according to the `appendReplacement` logic.", - "type": "string" - }, - "rename_replacement": { - "description": "The rename replacement string that is used with the `rename_pattern`.", - "type": "string" + "field_access_pattern": { + "description": "Controls how processors in this pipeline should read and write data on a document's source.", + "default": "classic", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.FieldAccessPattern" + } + ] } } }, "examples": { - "SnapshotRestoreRequestExample1": { - "summary": "Restore with rename pattern", - "description": "Run `POST /_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true`. It restores `index_1` and `index_2` from `snapshot_2`. The `rename_pattern` and `rename_replacement` parameters indicate any index matching the regular expression `index_(.+)` will be renamed using the pattern `restored_index_$1`. For example, `index_1` will be renamed to `restored_index_1`.\n", - "value": "{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"rename_pattern\": \"index_(.+)\",\n \"rename_replacement\": \"restored_index_$1\",\n \"include_aliases\": false\n}" + "PutPipelineRequestExample1": { + "summary": "Create an ingest pipeline.", + "value": "{\n \"description\" : \"My optional pipeline description\",\n \"processors\" : [\n {\n \"set\" : {\n \"description\" : \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ]\n}" }, - "SnapshotRestoreRequestExample2": { - "summary": "Restore in-place", - "description": "Close `index_1` then run `POST /_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true` to restore an index in-place. For example, you might want to perform this type of restore operation when no alternative options surface after the cluster allocation explain API reports `no_valid_shard_copy`.\n", - "value": "{\n \"indices\": \"index_1\"\n}" + "PutPipelineRequestExample2": { + "summary": "Create an ingest pipeline with metadata.", + "description": "You can use the `_meta` parameter to add arbitrary metadata to a pipeline.", + "value": "{\n \"description\" : \"My optional pipeline description\",\n \"processors\" : [\n {\n \"set\" : {\n \"description\" : \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ],\n \"_meta\": {\n \"reason\": \"set my-keyword-field to foo\",\n \"serialization\": {\n \"class\": \"MyPipeline\",\n \"id\": 10\n }\n }\n}" } } } - } + }, + "required": true }, "responses": { "200": { @@ -40577,139 +46412,264 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "accepted": { - "type": "boolean" - }, - "snapshot": { - "$ref": "#/components/schemas/snapshot.restore.SnapshotRestore" - } - } + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 0.0.0", - "x-api-name" : "restore", - "x-namespace": "snapshot" - } - }, - "/_snapshot/_status": { - "get": { - "tags": [ - "snapshot" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n PUT\n /_ingest/pipeline/{id}\n
\n " ], - "summary": "Get the snapshot status", - "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", - "operationId": "snapshot-status", - "parameters": [ + "x-api": "put_pipeline.ingest", + "x-category": "ingest", + "x-metaTags": [ { - "$ref": "#/components/parameters/snapshot.status-ignore_unavailable" - }, - { - "$ref": "#/components/parameters/snapshot.status-master_timeout" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/snapshot.status-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.8.0", - "x-api-name" : "status", - "x-namespace": "snapshot" - } - }, - "/_snapshot/{repository}/_status": { - "get": { + ] + }, + "delete": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Get the snapshot status", - "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", - "operationId": "snapshot-status-1", + "summary": "Delete pipelines", + "description": "Delete one or more ingest pipelines.", + "externalDocs": { + "description": "Elasticsearch ingest pipelines", + "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-pipeline-api.html" + }, + "operationId": "ingest-delete-pipeline", "parameters": [ { - "$ref": "#/components/parameters/snapshot.status-repository" + "in": "path", + "name": "id", + "description": "Pipeline ID or wildcard expression of pipeline IDs used to limit the request.\nTo delete all ingest pipelines in a cluster, use a value of `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/snapshot.status-ignore_unavailable" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "$ref": "#/components/parameters/snapshot.status-master_timeout" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "responses": { "200": { - "$ref": "#/components/responses/snapshot.status-200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } } }, - "x-state": "Added in 7.8.0", - "x-api-name" : "status", - "x-namespace": "snapshot" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n DELETE\n /_ingest/pipeline/{id}\n
\n " + ], + "x-api": "delete_pipeline.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_snapshot/{repository}/{snapshot}/_status": { + "/_ingest/geoip/stats": { "get": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Get the snapshot status", - "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", - "operationId": "snapshot-status-2", - "parameters": [ - { - "$ref": "#/components/parameters/snapshot.status-repository" - }, - { - "$ref": "#/components/parameters/snapshot.status-snapshot" - }, + "summary": "Get GeoIP statistics", + "description": "Get download statistics for GeoIP2 databases that are used with the GeoIP processor.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/enrich-processor/geoip-processor" + }, + "operationId": "ingest-geo-ip-stats", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "description": "Download statistics for all GeoIP2 databases.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest.geo_ip_stats.GeoIpDownloadStatistics" + } + ] + }, + "nodes": { + "description": "Downloaded GeoIP2 databases for each node.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ingest.geo_ip_stats.GeoIpNodeDatabases" + } + } + }, + "required": [ + "stats", + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_ingest/geoip/stats\n
\n " + ], + "x-api": "geo_ip_stats.ingest", + "x-category": "ingest", + "x-metaTags": [ { - "$ref": "#/components/parameters/snapshot.status-ignore_unavailable" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ingest/geoip/database": { + "get": { + "tags": [ + "ingest" + ], + "summary": "Get GeoIP database configurations", + "description": "Get information about one or more IP geolocation database configurations.", + "operationId": "ingest-get-geoip-database", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest.get_geoip_database.DatabaseConfigurationMetadata" + } + } + }, + "required": [ + "databases" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n GET\n /_ingest/geoip/database\n
\n " + ], + "x-api": "get_geoip_database.ingest", + "x-category": "ingest", + "x-metaTags": [ { - "$ref": "#/components/parameters/snapshot.status-master_timeout" + "content": "Elasticsearch", + "name": "product_name" } + ] + } + }, + "/_ingest/ip_location/database": { + "get": { + "tags": [ + "ingest" ], + "summary": "Get IP geolocation database configurations", + "operationId": "ingest-get-ip-location-database", "responses": { "200": { - "$ref": "#/components/responses/snapshot.status-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest.get_ip_location_database.DatabaseConfigurationMetadata" + } + } + }, + "required": [ + "databases" + ] + } + } + } } }, - "x-state": "Added in 7.8.0", - "x-api-name" : "status", - "x-namespace": "snapshot" + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n GET\n /_ingest/ip_location/database\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "get_ip_location_database.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_snapshot/{repository}/_verify": { - "post": { + "/_ingest/pipeline": { + "get": { "tags": [ - "snapshot" + "ingest" ], - "summary": "Verify a snapshot repository", - "description": "Check for common misconfigurations in a snapshot repository.", + "summary": "Get pipelines", + "description": "Get information about one or more ingest pipelines.\nThis API returns a local reference of the pipeline.", "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-verification" + "description": "Elasticsearch ingest pipelines", + "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-pipeline-api.html" }, - "operationId": "snapshot-verify-repository", + "operationId": "ingest-get-pipeline", "parameters": [ - { - "in": "path", - "name": "repository", - "description": "The name of the snapshot repository to verify.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, { "in": "query", "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -40718,15 +46678,61 @@ }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", + "name": "summary", + "description": "Return pipelines without their definitions", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + }, + "examples": { + "GetPipelineResponseExample1": { + "description": "A successful response for retrieving information about an ingest pipeline.", + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_ingest/pipeline\n
\n " + ], + "x-api": "get_pipeline.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ingest/processor/grok": { + "get": { + "tags": [ + "ingest" + ], + "summary": "Run a grok processor", + "description": "Extract structured fields out of a single text field within a document.\nYou must choose which field to extract matched fields from, as well as the grok pattern you expect will match.\nA grok pattern is like a regular expression that supports aliased expressions that can be reused.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/enrich-processor/grok-processor" + }, + "operationId": "ingest-processor-grok", "responses": { "200": { "description": "", @@ -40735,53 +46741,86 @@ "schema": { "type": "object", "properties": { - "nodes": { - "description": "Information about the nodes connected to the snapshot repository.\nThe key is the ID of the node.", + "patterns": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/snapshot.verify_repository.CompactNodeInfo" + "type": "string" } } }, "required": [ - "nodes" + "patterns" ] } } } } }, - "x-state": "Added in 0.0.0", - "x-api-name" : "verify_repository", - "x-namespace": "snapshot" + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n GET\n /_ingest/processor/grok\n
\n " + ], + "x-api": "processor_grok.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_sql/close": { - "post": { + "/_ingest/pipeline/_simulate": { + "get": { "tags": [ - "sql" + "ingest" + ], + "summary": "Simulate a pipeline", + "description": "Run an ingest pipeline against a set of provided documents.\nYou can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.", + "operationId": "ingest-simulate", + "parameters": [ + { + "in": "query", + "name": "verbose", + "description": "If `true`, the response includes output data for each processor in the executed pipeline.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } ], - "summary": "Clear an SQL search cursor", - "operationId": "sql-clear-cursor", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "cursor": { - "description": "Cursor to clear.", - "type": "string" + "docs": { + "description": "Sample documents to test in the pipeline.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.Document" + } + }, + "pipeline": { + "description": "The pipeline to test.\nIf you don't specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + ] } }, "required": [ - "cursor" + "docs" ] }, "examples": { - "ClearSqlCursorRequestExample1": { - "description": "Run `POST _sql/close` to clear an SQL search cursor.", - "value": "{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n}" + "SimulatePipelineRequestExample1": { + "summary": "Run an ingest pipeline against a set of provided documents.", + "description": "You can specify the used pipeline either in the request body or as a path parameter.", + "value": "{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" } } } @@ -40796,74 +46835,160 @@ "schema": { "type": "object", "properties": { - "succeeded": { - "type": "boolean" + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.SimulateDocumentResult" + } } }, "required": [ - "succeeded" + "docs" ] + }, + "examples": { + "SimulatePipelineResponseExample1": { + "description": "A successful response for running an ingest pipeline against a set of provided documents.", + "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}" + } } } } } }, - "x-state": "Added in 6.3.0", - "x-api-name" : "clear_cursor", - "x-namespace": "sql" - } - }, - "/_sql/async/delete/{id}": { - "delete": { + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_ingest/pipeline/_simulate\n
\n ", + "
\n POST\n /_ingest/pipeline/_simulate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_pipeline`\n" + ], + "x-api": "simulate.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "sql" + "ingest" ], - "summary": "Delete an async SQL search", - "description": "Delete an async SQL search or a stored synchronous SQL search.\nIf the search is still running, the API cancels it.\n\nIf the Elasticsearch security features are enabled, only the following users can use this API to delete a search:\n\n* Users with the `cancel_task` cluster privilege.\n* The user who first submitted the search.", - "operationId": "sql-delete-async", + "summary": "Simulate a pipeline", + "description": "Run an ingest pipeline against a set of provided documents.\nYou can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.", + "operationId": "ingest-simulate-1", "parameters": [ { - "in": "path", - "name": "id", - "description": "The identifier for the search.", - "required": true, + "in": "query", + "name": "verbose", + "description": "If `true`, the response includes output data for each processor in the executed pipeline.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "Sample documents to test in the pipeline.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.Document" + } + }, + "pipeline": { + "description": "The pipeline to test.\nIf you don't specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + ] + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulatePipelineRequestExample1": { + "summary": "Run an ingest pipeline against a set of provided documents.", + "description": "You can specify the used pipeline either in the request body or as a path parameter.", + "value": "{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.SimulateDocumentResult" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulatePipelineResponseExample1": { + "description": "A successful response for running an ingest pipeline against a set of provided documents.", + "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}" + } } } } } }, - "x-state": "Added in 7.15.0", - "x-api-name" : "delete_async", - "x-namespace": "sql" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_ingest/pipeline/_simulate\n
\n ", + "
\n POST\n /_ingest/pipeline/_simulate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_pipeline`\n" + ], + "x-api": "simulate.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_sql/async/{id}": { + "/_ingest/pipeline/{id}/_simulate": { "get": { "tags": [ - "sql" + "ingest" ], - "summary": "Get async SQL search results", - "description": "Get the current status and available results for an async SQL search or stored synchronous SQL search.\n\nIf the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.", - "operationId": "sql-get-async", + "summary": "Simulate a pipeline", + "description": "Run an ingest pipeline against a set of provided documents.\nYou can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.", + "operationId": "ingest-simulate-2", "parameters": [ { "in": "path", "name": "id", - "description": "The identifier for the search.", + "description": "The pipeline to test.\nIf you don't specify a `pipeline` in the request body, this parameter is required.", "required": true, "deprecated": false, "schema": { @@ -40873,45 +46998,52 @@ }, { "in": "query", - "name": "delimiter", - "description": "The separator for CSV results.\nThe API supports this parameter only for CSV responses.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "format", - "description": "The format for the response.\nYou must specify a format using this parameter or the `Accept` HTTP header.\nIf you specify both, the API uses this parameter.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "keep_alive", - "description": "The retention period for the search and its results.\nIt defaults to the `keep_alive` period for the original SQL search.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "wait_for_completion_timeout", - "description": "The period to wait for complete results.\nIt defaults to no timeout, meaning the request waits for complete search results.", + "name": "verbose", + "description": "If `true`, the response includes output data for each processor in the executed pipeline.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "Sample documents to test in the pipeline.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.Document" + } + }, + "pipeline": { + "description": "The pipeline to test.\nIf you don't specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + ] + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulatePipelineRequestExample1": { + "summary": "Run an ingest pipeline against a set of provided documents.", + "description": "You can specify the used pipeline either in the request body or as a path parameter.", + "value": "{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -40920,283 +47052,184 @@ "schema": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "is_running": { - "description": "If `true`, the search is still running.\nIf `false`, the search has finished.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", - "type": "boolean" - }, - "is_partial": { - "description": "If `true`, the response does not contain complete search results.\nIf `is_partial` is `true` and `is_running` is `true`, the search is still running.\nIf `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", - "type": "boolean" - }, - "columns": { - "description": "Column headings for the search results. Each object is a column.", - "type": "array", - "items": { - "$ref": "#/components/schemas/sql._types.Column" - } - }, - "cursor": { - "description": "The cursor for the next set of paginated results.\nFor CSV, TSV, and TXT responses, this value is returned in the `Cursor` HTTP header.", - "type": "string" - }, - "rows": { - "description": "The values for the search results.", + "docs": { "type": "array", "items": { - "$ref": "#/components/schemas/sql._types.Row" + "$ref": "#/components/schemas/ingest._types.SimulateDocumentResult" } } }, "required": [ - "id", - "is_running", - "is_partial", - "rows" + "docs" ] + }, + "examples": { + "SimulatePipelineResponseExample1": { + "description": "A successful response for running an ingest pipeline against a set of provided documents.", + "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}" + } } } } } }, - "x-state": "Added in 7.15.0", - "x-api-name" : "get_async", - "x-namespace": "sql" - } - }, - "/_sql/async/status/{id}": { - "get": { + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_ingest/pipeline/{id}/_simulate\n
\n ", + "
\n POST\n /_ingest/pipeline/{id}/_simulate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_pipeline`\n" + ], + "x-api": "simulate.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { "tags": [ - "sql" + "ingest" ], - "summary": "Get the async SQL search status", - "description": "Get the current status of an async SQL search or a stored synchronous SQL search.", - "operationId": "sql-get-async-status", + "summary": "Simulate a pipeline", + "description": "Run an ingest pipeline against a set of provided documents.\nYou can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.", + "operationId": "ingest-simulate-3", "parameters": [ { "in": "path", "name": "id", - "description": "The identifier for the search.", + "description": "The pipeline to test.\nIf you don't specify a `pipeline` in the request body, this parameter is required.", "required": true, "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "verbose", + "description": "If `true`, the response includes output data for each processor in the executed pipeline.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "expiration_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "id": { - "description": "The identifier for the search.", - "type": "string" - }, - "is_running": { - "description": "If `true`, the search is still running.\nIf `false`, the search has finished.", - "type": "boolean" - }, - "is_partial": { - "description": "If `true`, the response does not contain complete search results.\nIf `is_partial` is `true` and `is_running` is `true`, the search is still running.\nIf `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.", - "type": "boolean" - }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "completion_status": { - "$ref": "#/components/schemas/_types.uint" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "Sample documents to test in the pipeline.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.Document" } }, - "required": [ - "expiration_time_in_millis", - "id", - "is_running", - "is_partial", - "start_time_in_millis" - ] + "pipeline": { + "description": "The pipeline to test.\nIf you don't specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + ] + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulatePipelineRequestExample1": { + "summary": "Run an ingest pipeline against a set of provided documents.", + "description": "You can specify the used pipeline either in the request body or as a path parameter.", + "value": "{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" } } } - } - }, - "x-state": "Added in 7.15.0", - "x-api-name" : "get_async_status", - "x-namespace": "sql" - } - }, - "/_sql": { - "get": { - "tags": [ - "sql" - ], - "summary": "Get SQL search results", - "description": "Run an SQL request.", - "operationId": "sql-query-1", - "parameters": [ - { - "$ref": "#/components/parameters/sql.query-format" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/sql.query" - }, - "responses": { - "200": { - "$ref": "#/components/responses/sql.query-200" - } - }, - "x-state": "Added in 6.3.0", - "x-api-name" : "query", - "x-namespace": "sql" - }, - "post": { - "tags": [ - "sql" - ], - "summary": "Get SQL search results", - "description": "Run an SQL request.", - "operationId": "sql-query", - "parameters": [ - { - "$ref": "#/components/parameters/sql.query-format" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/sql.query" - }, - "responses": { - "200": { - "$ref": "#/components/responses/sql.query-200" - } - }, - "x-state": "Added in 6.3.0", - "x-api-name" : "query", - "x-namespace": "sql" - } - }, - "/_sql/translate": { - "get": { - "tags": [ - "sql" - ], - "summary": "Translate SQL into Elasticsearch queries", - "description": "Translate an SQL search into a search API request containing Query DSL.\nIt accepts the same request body parameters as the SQL search API, excluding `cursor`.", - "operationId": "sql-translate-1", - "requestBody": { - "$ref": "#/components/requestBodies/sql.translate" - }, - "responses": { - "200": { - "$ref": "#/components/responses/sql.translate-200" - } - }, - "x-state": "Added in 6.3.0", - "x-api-name" : "translate", - "x-namespace": "sql" - }, - "post": { - "tags": [ - "sql" - ], - "summary": "Translate SQL into Elasticsearch queries", - "description": "Translate an SQL search into a search API request containing Query DSL.\nIt accepts the same request body parameters as the SQL search API, excluding `cursor`.", - "operationId": "sql-translate", - "requestBody": { - "$ref": "#/components/requestBodies/sql.translate" - }, - "responses": { - "200": { - "$ref": "#/components/responses/sql.translate-200" - } - }, - "x-state": "Added in 6.3.0", - "x-api-name" : "translate", - "x-namespace": "sql" - } - }, - "/_ssl/certificates": { - "get": { - "tags": [ - "security" - ], - "summary": "Get SSL certificates", - "description": "Get information about the X.509 certificates that are used to encrypt communications in the cluster.\nThe API returns a list that includes certificates from all TLS contexts including:\n\n- Settings for transport and HTTP interfaces\n- TLS settings that are used within authentication realms\n- TLS settings for remote monitoring exporters\n\nThe list includes certificates that are used for configuring trust, such as those configured in the `xpack.security.transport.ssl.truststore` and `xpack.security.transport.ssl.certificate_authorities` settings.\nIt also includes certificates that are used for configuring server identity, such as `xpack.security.http.ssl.keystore` and `xpack.security.http.ssl.certificate settings`.\n\nThe list does not include certificates that are sourced from the default SSL context of the Java Runtime Environment (JRE), even if those certificates are in use within Elasticsearch.\n\nNOTE: When a PKCS#11 token is configured as the truststore of the JRE, the API returns all the certificates that are included in the PKCS#11 token irrespective of whether these are used in the Elasticsearch TLS configuration.\n\nIf Elasticsearch is configured to use a keystore or truststore, the API output includes all certificates in that store, even though some of the certificates might not be in active use within the cluster.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security#encrypt-internode-communication" + }, + "required": true }, - "operationId": "ssl-certificates", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ssl.certificates.CertificateInformation" - } + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.SimulateDocumentResult" + } + } + }, + "required": [ + "docs" + ] }, "examples": { - "GetCertificatesResponseExample1": { - "description": "A successful response from `GET /_ssl/certificates`, which provides information about the certificates on a single node of Elasticsearch.\n", - "value": "[\n {\n \"path\": \"certs/elastic-certificates.p12\",\n \"format\": \"PKCS12\",\n \"alias\": \"instance\",\n \"subject_dn\": \"CN=Elastic Certificate Tool Autogenerated CA\",\n \"serial_number\": \"a20f0ee901e8f69dc633ff633e5cd5437cdb4137\",\n \"has_private_key\": false,\n \"expiry\": \"2021-01-15T20:42:49.000Z\"\n },\n {\n \"path\": \"certs/elastic-certificates.p12\",\n \"format\": \"PKCS12\",\n \"alias\": \"ca\",\n \"subject_dn\": \"CN=Elastic Certificate Tool Autogenerated CA\",\n \"serial_number\": \"a20f0ee901e8f69dc633ff633e5cd5437cdb4137\",\n \"has_private_key\": false,\n \"expiry\": \"2021-01-15T20:42:49.000Z\"\n },\n {\n \"path\": \"certs/elastic-certificates.p12\",\n \"format\": \"PKCS12\",\n \"alias\": \"instance\",\n \"subject_dn\": \"CN=instance\",\n \"serial_number\": \"fc1905e1494dc5230218d079c47a617088f84ce0\",\n \"has_private_key\": true,\n \"expiry\": \"2021-01-15T20:44:32.000Z\"\n }\n]" + "SimulatePipelineResponseExample1": { + "description": "A successful response for running an ingest pipeline against a set of provided documents.", + "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}" } } } } } }, - "x-state": "Added in 6.2.0", - "x-api-name" : "certificates", - "x-namespace": "ssl" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_ingest/pipeline/{id}/_simulate\n
\n ", + "
\n POST\n /_ingest/pipeline/{id}/_simulate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_pipeline`\n" + ], + "x-api": "simulate.ingest", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_synonyms/{id}": { + "/_license": { "get": { "tags": [ - "synonyms" + "license" ], - "summary": "Get a synonym set", - "operationId": "synonyms-get-synonym", + "summary": "Get license information", + "description": "Get information about your Elastic license including its type, its status, when it was issued, and when it expires.\n\n>info\n> If the master node is generating a new cluster state, the get license API may return a `404 Not Found` response.\n> If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.", + "operationId": "license-get", "parameters": [ - { - "in": "path", - "name": "id", - "description": "The synonyms set identifier to retrieve.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, { "in": "query", - "name": "from", - "description": "The starting offset for query rules to retrieve.", - "deprecated": false, + "name": "accept_enterprise", + "description": "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.\nThis parameter is deprecated and will always be set to true in 8.x.", + "deprecated": true, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "size", - "description": "The max number of query rules to retrieve.", + "name": "local", + "description": "Specifies whether to retrieve local information.\nFrom 9.2 onwards the default value is `true`, which means the information is retrieved from the responding node.\nIn earlier versions the default is `false`, which means the information is retrieved from the elected master node.", "deprecated": false, "schema": { - "type": "number" + "type": "boolean" }, "style": "form" } @@ -41209,63 +47242,76 @@ "schema": { "type": "object", "properties": { - "count": { - "description": "The total number of synonyms rules that the synonyms set contains.", - "type": "number" - }, - "synonyms_set": { - "description": "Synonym rule details.", - "type": "array", - "items": { - "$ref": "#/components/schemas/synonyms._types.SynonymRuleRead" - } + "license": { + "allOf": [ + { + "$ref": "#/components/schemas/license.get.LicenseInformation" + } + ] } }, "required": [ - "count", - "synonyms_set" + "license" ] }, "examples": { - "SynonymsGetResponseExample1": { - "description": "A successful response from `GET _synonyms/my-synonyms-set`.", - "value": "{\n \"count\": 3,\n \"synonyms_set\": [\n {\n \"id\": \"test-1\",\n \"synonyms\": \"hello, hi\"\n },\n {\n \"id\": \"test-2\",\n \"synonyms\": \"bye, goodbye\"\n },\n {\n \"id\": \"test-3\",\n \"synonyms\": \"test => check\"\n }\n ]\n}" + "GetLicenseResponseExample1": { + "description": "A successful response from `GET /_license`.", + "value": "{\n \"license\" : {\n \"status\" : \"active\",\n \"uid\" : \"cbff45e7-c553-41f7-ae4f-9205eabd80xx\",\n \"type\" : \"trial\",\n \"issue_date\" : \"2018-10-20T22:05:12.332Z\",\n \"issue_date_in_millis\" : 1540073112332,\n \"expiry_date\" : \"2018-11-19T22:05:12.332Z\",\n \"expiry_date_in_millis\" : 1542665112332,\n \"max_nodes\" : 1000,\n \"max_resource_units\" : null,\n \"issued_to\" : \"test\",\n \"issuer\" : \"elasticsearch\",\n \"start_date_in_millis\" : -1\n }\n}" } } } } } }, - "x-state": "Added in 8.10.0", - "x-api-name" : "get_synonym", - "x-namespace": "synonyms" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_license\n
\n " + ], + "x-api": "get.license", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ - "synonyms" + "license" ], - "summary": "Create or update a synonym set", - "description": "Synonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.", - "operationId": "synonyms-put-synonym", + "summary": "Update the license", + "description": "You can update your license at runtime without shutting down your nodes.\nLicense updates take effect immediately.\nIf the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response.\nYou must then re-submit the API request with the acknowledge parameter set to true.\n\nNOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license.\nIf the operator privileges feature is enabled, only operator users can use this API.", + "operationId": "license-post", "parameters": [ { - "in": "path", - "name": "id", - "description": "The ID of the synonyms set to be created or updated.", - "required": true, + "in": "query", + "name": "acknowledge", + "description": "Specifies whether you acknowledge the license changes.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "refresh", - "description": "If `true`, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning.\nIf `false`, analyzers will not be reloaded with the new synonym set", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -41276,28 +47322,30 @@ "schema": { "type": "object", "properties": { - "synonyms_set": { - "description": "The synonym rules definitions for the synonyms set.", - "oneOf": [ + "license": { + "allOf": [ { - "$ref": "#/components/schemas/synonyms._types.SynonymRule" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/synonyms._types.SynonymRule" - } + "$ref": "#/components/schemas/license._types.License" } ] + }, + "licenses": { + "description": "A sequence of one or more JSON documents containing the license information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/license._types.License" + } } - }, - "required": [ - "synonyms_set" - ] + } + }, + "examples": { + "PostLicenseRequestExample1": { + "description": "Run `PUT _license` to update to a basic license. NOTE: These values are invalid; you must substitute the appropriate contents from your license file.\n", + "value": "{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}" + } } } - }, - "required": true + } }, "responses": { "200": { @@ -41307,153 +47355,91 @@ "schema": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "acknowledge": { + "allOf": [ + { + "$ref": "#/components/schemas/license.post.Acknowledgement" + } + ] }, - "reload_analyzers_details": { - "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult" + "acknowledged": { + "type": "boolean" + }, + "license_status": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseStatus" + } + ] } }, "required": [ - "result" + "acknowledged", + "license_status" ] + }, + "examples": { + "PostLicenseResponseExample1": { + "description": "If you update to a basic license and you previously had a license with more features, you receive this type of response. You must re-submit the API request and set the `acknowledge` parameter to `true`.", + "value": "{\n \"acknowledged\": false,\n \"license_status\": \"valid\",\n \"acknowledge\": {\n \"message\": \"\\\"\\\"\\\"This license update requires acknowledgement. To acknowledge the license, please read the following messages and update the license again, this time with the \\\"acknowledge=true\\\" parameter:\\\"\\\"\\\"\",\n \"watcher\": [\n \"Watcher will be disabled\"\n ],\n \"logstash\": [\n \"Logstash will no longer poll for centrally-managed pipelines\"\n ],\n \"security\": [\n \"The following X-Pack security functionality will be disabled ...\"\n ]\n }\n}" + } } } } } }, - "x-state": "Added in 8.10.0", - "x-api-name" : "put_synonym", - "x-namespace": "synonyms" - }, - "delete": { - "tags": [ - "synonyms" - ], - "summary": "Delete a synonym set", - "description": "You can only delete a synonyms set that is not in use by any index analyzer.\n\nSynonyms sets can be used in synonym graph token filters and synonym token filters.\nThese synonym filters can be used as part of search analyzers.\n\nAnalyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open).\nEven if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase.\n\nIf any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available.\nTo prevent that, synonyms sets that are used in analyzers can't be deleted.\nA delete request in this case will return a 400 response code.\n\nTo remove a synonyms set, you must first remove all indices that contain analyzers using it.\nYou can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data.\nOnce finished, you can delete the index.\nWhen the synonyms set is not used in analyzers, you will be able to delete it.", - "operationId": "synonyms-delete-synonym", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The synonyms set identifier to delete.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - } + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_license\n
\n ", + "
\n POST\n /_license\n
\n " ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Added in 8.10.0", - "x-api-name" : "delete_synonym", - "x-namespace": "synonyms" - } - }, - "/_synonyms/{set_id}/{rule_id}": { - "get": { - "tags": [ - "synonyms" + "x-req-auth": [ + "Cluster privileges: `manage`\n" ], - "summary": "Get a synonym rule", - "description": "Get a synonym rule from a synonym set.", - "operationId": "synonyms-get-synonym-rule", - "parameters": [ - { - "in": "path", - "name": "set_id", - "description": "The ID of the synonym set to retrieve the synonym rule from.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, + "x-api": "post.license", + "x-category": "info", + "x-metaTags": [ { - "in": "path", - "name": "rule_id", - "description": "The ID of the synonym rule to retrieve.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/synonyms._types.SynonymRuleRead" - }, - "examples": { - "SynonymRuleGetResponseExample1": { - "description": "A successful response from `GET _synonyms/my-synonyms-set/test-1`.", - "value": "{\n \"id\": \"test-1\",\n \"synonyms\": \"hello, hi\"\n}" - } - } - } - } + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 8.10.0", - "x-api-name" : "get_synonym_rule", - "x-namespace": "synonyms" + ] }, - "put": { + "post": { "tags": [ - "synonyms" + "license" ], - "summary": "Create or update a synonym rule", - "description": "Create or update a synonym rule in a synonym set.\n\nIf any of the synonym rules included is invalid, the API returns an error.\n\nWhen you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.", - "operationId": "synonyms-put-synonym-rule", + "summary": "Update the license", + "description": "You can update your license at runtime without shutting down your nodes.\nLicense updates take effect immediately.\nIf the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response.\nYou must then re-submit the API request with the acknowledge parameter set to true.\n\nNOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license.\nIf the operator privileges feature is enabled, only operator users can use this API.", + "operationId": "license-post-1", "parameters": [ { - "in": "path", - "name": "set_id", - "description": "The ID of the synonym set.", - "required": true, + "in": "query", + "name": "acknowledge", + "description": "Specifies whether you acknowledge the license changes.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { - "in": "path", - "name": "rule_id", - "description": "The ID of the synonym rule to be updated or created.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "refresh", - "description": "If `true`, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning.\nIf `false`, analyzers will not be reloaded with the new synonym rule", + "name": "timeout", + "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -41464,24 +47450,30 @@ "schema": { "type": "object", "properties": { - "synonyms": { - "$ref": "#/components/schemas/synonyms._types.SynonymString" + "license": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.License" + } + ] + }, + "licenses": { + "description": "A sequence of one or more JSON documents containing the license information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/license._types.License" + } } - }, - "required": [ - "synonyms" - ] + } }, "examples": { - "SynonymRulePutRequestExample1": { - "summary": "synonyms/apis/put-synonym-rule.asciidoc:107", - "description": "", - "value": "{\n \"synonyms\": \"hello, hi, howdy\"\n}" + "PostLicenseRequestExample1": { + "description": "Run `PUT _license` to update to a basic license. NOTE: These values are invalid; you must substitute the appropriate contents from your license file.\n", + "value": "{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -41489,59 +47481,87 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/synonyms._types.SynonymsUpdateResult" + "type": "object", + "properties": { + "acknowledge": { + "allOf": [ + { + "$ref": "#/components/schemas/license.post.Acknowledgement" + } + ] + }, + "acknowledged": { + "type": "boolean" + }, + "license_status": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseStatus" + } + ] + } + }, + "required": [ + "acknowledged", + "license_status" + ] }, "examples": { - "SynonymRuleResponseExample1": { - "description": "A successful response from `PUT _synonyms/my-synonyms-set/test-1`.\n", - "value": "{\n \"result\": \"updated\",\n \"reload_analyzers_details\": {\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"reload_details\": [\n {\n \"index\": \"test-index\",\n \"reloaded_analyzers\": [\n \"my_search_analyzer\"\n ],\n \"reloaded_node_ids\": [\n \"1wYFZzq8Sxeu_Jvt9mlbkg\"\n ]\n }\n ]\n }\n}" + "PostLicenseResponseExample1": { + "description": "If you update to a basic license and you previously had a license with more features, you receive this type of response. You must re-submit the API request and set the `acknowledge` parameter to `true`.", + "value": "{\n \"acknowledged\": false,\n \"license_status\": \"valid\",\n \"acknowledge\": {\n \"message\": \"\\\"\\\"\\\"This license update requires acknowledgement. To acknowledge the license, please read the following messages and update the license again, this time with the \\\"acknowledge=true\\\" parameter:\\\"\\\"\\\"\",\n \"watcher\": [\n \"Watcher will be disabled\"\n ],\n \"logstash\": [\n \"Logstash will no longer poll for centrally-managed pipelines\"\n ],\n \"security\": [\n \"The following X-Pack security functionality will be disabled ...\"\n ]\n }\n}" } } } } } }, - "x-state": "Added in 8.10.0", - "x-api-name" : "put_synonym_rule", - "x-namespace": "synonyms" + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_license\n
\n ", + "
\n POST\n /_license\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "post.license", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ - "synonyms" + "license" ], - "summary": "Delete a synonym rule", - "description": "Delete a synonym rule from a synonym set.", - "operationId": "synonyms-delete-synonym-rule", + "summary": "Delete the license", + "description": "When the license expires, your subscription level reverts to Basic.\n\nIf the operator privileges feature is enabled, only operator users can use this API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/license/manage-your-license-in-self-managed-cluster", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-license.html" + }, + "operationId": "license-delete", "parameters": [ { - "in": "path", - "name": "set_id", - "description": "The ID of the synonym set to update.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - { - "in": "path", - "name": "rule_id", - "description": "The ID of the synonym rule to delete.", - "required": true, + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Duration" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "refresh", - "description": "If `true`, the request will refresh the analyzers with the deleted synonym rule and wait for the new synonyms to be available before returning.\nIf `false`, analyzers will not be reloaded with the deleted synonym rule", + "name": "timeout", + "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -41552,53 +47572,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/synonyms._types.SynonymsUpdateResult" - }, - "examples": { - "SynonymRuleDeleteResponseExample1": { - "description": "A successful response from `DELETE _synonyms/my-synonyms-set/test-1`. All analyzers using this synonyms set will be reloaded automatically to reflect the rule being deleted.\n", - "value": "{\n \"result\": \"deleted\",\n \"reload_analyzers_details\": {\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"reload_details\": [\n {\n \"index\": \"test-index\",\n \"reloaded_analyzers\": [\n \"my_search_analyzer\"\n ],\n \"reloaded_node_ids\": [\n \"1wYFZzq8Sxeu_Jvt9mlbkg\"\n ]\n }\n ]\n }\n}" - } + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } } } } }, - "x-state": "Added in 8.10.0", - "x-api-name" : "delete_synonym_rule", - "x-namespace": "synonyms" + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_license\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "delete.license", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_synonyms": { + "/_license/basic_status": { "get": { "tags": [ - "synonyms" - ], - "summary": "Get all synonym sets", - "description": "Get a summary of all defined synonym sets.", - "operationId": "synonyms-get-synonyms-sets", - "parameters": [ - { - "in": "query", - "name": "from", - "description": "The starting offset for synonyms sets to retrieve.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "size", - "description": "The maximum number of synonyms sets to retrieve.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - } + "license" ], + "summary": "Get the basic license status", + "operationId": "license-get-basic-status", "responses": { "200": { "description": "", @@ -41607,129 +47610,114 @@ "schema": { "type": "object", "properties": { - "count": { - "description": "The total number of synonyms sets defined.", - "type": "number" - }, - "results": { - "description": "The identifier and total number of defined synonym rules for each synonyms set.", - "type": "array", - "items": { - "$ref": "#/components/schemas/synonyms.get_synonyms_sets.SynonymsSetItem" - } + "eligible_to_start_basic": { + "type": "boolean" } }, "required": [ - "count", - "results" + "eligible_to_start_basic" ] }, "examples": { - "SynonymsSetsGetResponseExample1": { - "description": "A successful response from `GET _synonyms`.", - "value": "{\n \"count\": 3,\n \"results\": [\n {\n \"synonyms_set\": \"ecommerce-synonyms\",\n \"count\": 2\n },\n {\n \"synonyms_set\": \"my-synonyms-set\",\n \"count\": 3\n },\n {\n \"synonyms_set\": \"new-ecommerce-synonyms\",\n \"count\": 1\n }\n ]\n}" + "GetBasicLicenseStatusResponseExample1": { + "description": "A successful response from `GET /_license/basic_status`.", + "value": "{\n \"eligible_to_start_basic\": true\n}" } } } } } }, - "x-state": "Added in 8.10.0", - "x-api-name" : "get_synonyms_sets", - "x-namespace": "synonyms" - } - }, - "/_tasks/_cancel": { - "post": { - "tags": [ - "tasks" + "x-state": "Generally available; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_license/basic_status\n
\n " ], - "summary": "Cancel a task", - "description": "WARNING: The task management API is new and should still be considered a beta feature.\nThe API may change in ways that are not backwards compatible.\n\nA task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away.\nIt is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation.\nThe get task information API will continue to list these cancelled tasks until they complete.\nThe cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.\n\nTo troubleshoot why a cancelled task does not complete promptly, use the get task information API with the `?detailed` parameter to identify the other tasks the system is running.\nYou can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.", - "operationId": "tasks-cancel", - "parameters": [ - { - "$ref": "#/components/parameters/tasks.cancel-actions" - }, - { - "$ref": "#/components/parameters/tasks.cancel-nodes" - }, - { - "$ref": "#/components/parameters/tasks.cancel-parent_task_id" - }, - { - "$ref": "#/components/parameters/tasks.cancel-wait_for_completion" - } + "x-req-auth": [ + "Cluster privileges: `monitor`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/tasks.cancel-200" + "x-api": "get_basic_status.license", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Technical preview", - "x-api-name" : "cancel", - "x-namespace": "tasks" + ] } }, - "/_tasks/{task_id}/_cancel": { - "post": { + "/_license/trial_status": { + "get": { "tags": [ - "tasks" - ], - "summary": "Cancel a task", - "description": "WARNING: The task management API is new and should still be considered a beta feature.\nThe API may change in ways that are not backwards compatible.\n\nA task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away.\nIt is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation.\nThe get task information API will continue to list these cancelled tasks until they complete.\nThe cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.\n\nTo troubleshoot why a cancelled task does not complete promptly, use the get task information API with the `?detailed` parameter to identify the other tasks the system is running.\nYou can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.", - "operationId": "tasks-cancel-1", - "parameters": [ - { - "$ref": "#/components/parameters/tasks.cancel-task_id" - }, - { - "$ref": "#/components/parameters/tasks.cancel-actions" - }, - { - "$ref": "#/components/parameters/tasks.cancel-nodes" - }, - { - "$ref": "#/components/parameters/tasks.cancel-parent_task_id" - }, - { - "$ref": "#/components/parameters/tasks.cancel-wait_for_completion" - } + "license" ], + "summary": "Get the trial status", + "operationId": "license-get-trial-status", "responses": { "200": { - "$ref": "#/components/responses/tasks.cancel-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "eligible_to_start_trial": { + "type": "boolean" + } + }, + "required": [ + "eligible_to_start_trial" + ] + }, + "examples": { + "GetTrialLicenseStatusResponseExample1": { + "description": "A successful response from `GET /_license/trial_status`.", + "value": "{\n \"eligible_to_start_trial\": true\n}" + } + } + } + } } }, - "x-state": "Technical preview", - "x-api-name" : "cancel", - "x-namespace": "tasks" + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n GET\n /_license/trial_status\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "get_trial_status.license", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_tasks/{task_id}": { - "get": { + "/_license/start_basic": { + "post": { "tags": [ - "tasks" + "license" ], - "summary": "Get task information", - "description": "Get information about a task currently running in the cluster.\n\nWARNING: The task management API is new and should still be considered a beta feature.\nThe API may change in ways that are not backwards compatible.\n\nIf the task identifier is not found, a 404 response code indicates that there are no resources that match the request.", - "operationId": "tasks-get", + "summary": "Start a basic license", + "description": "Start an indefinite basic license, which gives access to all the basic features.\n\nNOTE: In order to start a basic license, you must not currently have a basic license.\n\nIf the basic license does not support all of the features that are available with your current license, however, you are notified in the response.\nYou must then re-submit the API request with the `acknowledge` parameter set to `true`.\n\nTo check the status of your basic license, use the get basic license API.", + "operationId": "license-post-start-basic", "parameters": [ { - "in": "path", - "name": "task_id", - "description": "The task identifier.", - "required": true, + "in": "query", + "name": "acknowledge", + "description": "Whether the user has acknowledged acknowledge messages", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "boolean" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -41738,11 +47726,11 @@ }, { "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request blocks until the task has completed.", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -41755,78 +47743,84 @@ "schema": { "type": "object", "properties": { - "completed": { + "acknowledged": { "type": "boolean" }, - "task": { - "$ref": "#/components/schemas/tasks._types.TaskInfo" + "basic_was_started": { + "type": "boolean" }, - "response": { - "type": "object" + "error_message": { + "type": "string" }, - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseType" + } + ] + }, + "acknowledge": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } } }, "required": [ - "completed", - "task" + "acknowledged", + "basic_was_started" ] }, "examples": { - "GetTaskResponseExample1": { - "summary": "Get cluster actions", - "description": "A successful response from `GET _tasks?actions=cluster:*`, which retrieves all cluster-related tasks.\n", - "value": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:124\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 124,\n \"type\" : \"direct\",\n \"action\" : \"cluster:monitor/tasks/lists[n]\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 47402,\n \"cancellable\" : false,\n \"parent_task_id\" : \"oTUltX4IQMOUUVeiohTt8A:123\"\n },\n \"oTUltX4IQMOUUVeiohTt8A:123\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 123,\n \"type\" : \"transport\",\n \"action\" : \"cluster:monitor/tasks/lists\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 236042,\n \"cancellable\" : false\n }\n }\n }\n }\n}" - }, - "GetTaskResponseExample2": { - "summary": "Get details about a delete by query", - "description": "A successful response from `GET _tasks?detailed=true&actions=*/delete/byquery`, which gets the status of a delete by query operation. The `status` object contains the actual status. `total` is the total number of operations that the reindex expects to perform. You can estimate the progress by adding the `updated`, `created`, and `deleted` fields. The request will finish when their sum is equal to the `total` field.\n", - "value": "{\n \"nodes\" : {\n \"r1A2WoRbTwKZ516z6NEs5A\" : {\n \"name\" : \"r1A2WoR\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"attributes\" : {\n \"testattr\" : \"test\",\n \"portsfile\" : \"true\"\n },\n \"tasks\" : {\n \"r1A2WoRbTwKZ516z6NEs5A:36619\" : {\n \"node\" : \"r1A2WoRbTwKZ516z6NEs5A\",\n \"id\" : 36619,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/write/delete/byquery\",\n \"status\" : { \n \"total\" : 6154,\n \"updated\" : 0,\n \"created\" : 0,\n \"deleted\" : 3500,\n \"batches\" : 36,\n \"version_conflicts\" : 0,\n \"noops\" : 0,\n \"retries\": 0,\n \"throttled_millis\": 0\n },\n \"description\" : \"\"\n }\n }\n }\n }\n}" + "StartBasicLicenseResponseExample1": { + "description": "A successful response from `POST /_license/start_basic?acknowledge=true`. If you currently have a license with more features than a basic license and you start a basic license, you must pass the acknowledge parameter.", + "value": "{\n \"basic_was_started\": true,\n \"acknowledged\": true\n}" } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "get", - "x-namespace": "tasks" + "x-state": "Generally available; Added in 6.3.0", + "x-variations": [ + "
\n POST\n /_license/start_basic\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "post_start_basic.license", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_tasks": { - "get": { + "/_license/start_trial": { + "post": { "tags": [ - "tasks" + "license" ], - "summary": "Get all tasks", - "description": "Get information about the tasks currently running on one or more nodes in the cluster.\n\nWARNING: The task management API is new and should still be considered a beta feature.\nThe API may change in ways that are not backwards compatible.\n\n**Identifying running tasks**\n\nThe `X-Opaque-Id header`, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information.\nThis enables you to track certain calls or associate certain tasks with the client that started them.\nFor example:\n\n```\ncurl -i -H \"X-Opaque-Id: 123456\" \"http://localhost:9200/_tasks?group_by=parents\"\n```\n\nThe API returns the following result:\n\n```\nHTTP/1.1 200 OK\nX-Opaque-Id: 123456\ncontent-type: application/json; charset=UTF-8\ncontent-length: 831\n\n{\n \"tasks\" : {\n \"u5lcZHqcQhu-rUoFaqDphA:45\" : {\n \"node\" : \"u5lcZHqcQhu-rUoFaqDphA\",\n \"id\" : 45,\n \"type\" : \"transport\",\n \"action\" : \"cluster:monitor/tasks/lists\",\n \"start_time_in_millis\" : 1513823752749,\n \"running_time_in_nanos\" : 293139,\n \"cancellable\" : false,\n \"headers\" : {\n \"X-Opaque-Id\" : \"123456\"\n },\n \"children\" : [\n {\n \"node\" : \"u5lcZHqcQhu-rUoFaqDphA\",\n \"id\" : 46,\n \"type\" : \"direct\",\n \"action\" : \"cluster:monitor/tasks/lists[n]\",\n \"start_time_in_millis\" : 1513823752750,\n \"running_time_in_nanos\" : 92133,\n \"cancellable\" : false,\n \"parent_task_id\" : \"u5lcZHqcQhu-rUoFaqDphA:45\",\n \"headers\" : {\n \"X-Opaque-Id\" : \"123456\"\n }\n }\n ]\n }\n }\n }\n```\nIn this example, `X-Opaque-Id: 123456` is the ID as a part of the response header.\nThe `X-Opaque-Id` in the task `headers` is the ID for the task that was initiated by the REST request.\nThe `X-Opaque-Id` in the children `headers` is the child task of the task that was initiated by the REST request.", - "operationId": "tasks-list", + "summary": "Start a trial", + "description": "Start a 30-day trial, which gives access to all subscription features.\n\nNOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version.\nFor example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at https://www.elastic.co/trialextension.\n\nTo check the status of your trial, use the get trial status API.", + "operationId": "license-post-start-trial", "parameters": [ { "in": "query", - "name": "actions", - "description": "A comma-separated list or wildcard expression of actions used to limit the request.\nFor example, you can use `cluser:*` to retrieve all cluster-related tasks.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "style": "form" - }, - { - "in": "query", - "name": "detailed", - "description": "If `true`, the response includes detailed information about the running tasks.\nThis information is useful to distinguish tasks from each other but is more costly to run.", + "name": "acknowledge", + "description": "Whether the user has acknowledged acknowledge messages", "deprecated": false, "schema": { "type": "boolean" @@ -41835,53 +47829,23 @@ }, { "in": "query", - "name": "group_by", - "description": "A key that is used to group tasks in the response.\nThe task lists can be grouped either by nodes or by parent tasks.\n\nSupported values include:\n - `nodes`: Group tasks by node ID.\n - `parents`: Group tasks by parent task ID.\n - `none`: Do not group tasks.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/tasks._types.GroupBy" - }, - "style": "form" - }, - { - "in": "query", - "name": "nodes", - "description": "A comma-separated list of node IDs or names that is used to limit the returned information.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "form" - }, - { - "in": "query", - "name": "parent_task_id", - "description": "A parent task identifier that is used to limit returned information.\nTo return all tasks, omit this parameter or use a value of `-1`.\nIf the parent task is not found, the API does not return a 404 response code.", + "name": "type", + "description": "The type of trial license to generate", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for each node to respond.\nIf a node does not respond before its timeout expires, the response does not include its information.\nHowever, timed out nodes are included in the `node_failures` property.", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, - { - "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request blocks until the operation is complete.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" } ], "responses": { @@ -41890,453 +47854,605 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/tasks._types.TaskListResponseBase" + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "error_message": { + "type": "string" + }, + "trial_was_started": { + "type": "boolean" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseType" + } + ] + } + }, + "required": [ + "acknowledged", + "trial_was_started" + ] }, "examples": { - "ListTasksResponseExample1": { - "description": "A successful response from `GET _tasks?actions=*search&detailed` The `detailed` parameter affects the `description` field, which contains human readable text that identifies the particular request that the task is performing. For example, it helps identify the search request being performed by a search task.\n", - "value": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:464\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 464,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/read/search\",\n \"description\" : \"indices[test], types[test], search_type[QUERY_THEN_FETCH], source[{\\\"query\\\":...}]\",\n \"start_time_in_millis\" : 1483478610008,\n \"running_time_in_nanos\" : 13991383,\n \"cancellable\" : true,\n \"cancelled\" : false\n }\n }\n }\n }\n}" + "StartTrialLicenseResponseExample1": { + "description": "A successful response from `POST /_license/start_trial?acknowledge=true`.", + "value": "{\n \"trial_was_started\": true,\n \"acknowledged\": true\n}" } } } } } }, - "x-state": "Technical preview", - "x-api-name" : "list", - "x-namespace": "tasks" + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n POST\n /_license/start_trial\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "post_start_trial.license", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/{index}/_terms_enum": { + "/_logstash/pipeline/{id}": { "get": { "tags": [ - "search" + "logstash" ], - "summary": "Get terms in an index", - "description": "Discover terms that match a partial string in an index.\nThis API is designed for low-latency look-ups used in auto-complete scenarios.\n\n> info\n> The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", - "operationId": "terms-enum", + "summary": "Get Logstash pipelines", + "description": "Get pipelines that are used for Logstash Central Management.", + "externalDocs": { + "description": "Centralized pipeline management", + "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-get-pipeline.html" + }, + "operationId": "logstash-get-pipeline-1", "parameters": [ { - "$ref": "#/components/parameters/terms_enum-index" + "in": "path", + "name": "id", + "description": "A comma-separated list of pipeline identifiers.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Ids" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/terms_enum" - }, "responses": { "200": { - "$ref": "#/components/responses/terms_enum-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/logstash._types.Pipeline" + } + }, + "examples": { + "LogstashGetPipelineResponseExample1": { + "description": "A successful response from `GET _logstash/pipeline/my_pipeline`.\n", + "value": "{\n \"my_pipeline\": {\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": \"1\"\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n }\n}" + } + } + } + } } }, - "x-state": "Added in 7.14.0", - "x-api-name": "terms_enum" + "x-state": "Generally available; Added in 7.12.0", + "x-variations": [ + "
\n GET\n /_logstash/pipeline/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_logstash_pipelines`\n" + ], + "x-api": "get_pipeline.logstash", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] }, - "post": { + "put": { "tags": [ - "search" + "logstash" ], - "summary": "Get terms in an index", - "description": "Discover terms that match a partial string in an index.\nThis API is designed for low-latency look-ups used in auto-complete scenarios.\n\n> info\n> The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", - "operationId": "terms-enum-1", + "summary": "Create or update a Logstash pipeline", + "description": "Create a pipeline that is used for Logstash Central Management.\nIf the specified pipeline exists, it is replaced.", + "externalDocs": { + "description": "Centralized pipeline management", + "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-put-pipeline.html" + }, + "operationId": "logstash-put-pipeline", "parameters": [ { - "$ref": "#/components/parameters/terms_enum-index" + "in": "path", + "name": "id", + "description": "An identifier for the pipeline.\nPipeline IDs must begin with a letter or underscore and contain only letters, underscores, dashes, hyphens and numbers.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], "requestBody": { - "$ref": "#/components/requestBodies/terms_enum" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/logstash._types.Pipeline" + }, + "examples": { + "LogstashPutPipelineRequestExample1": { + "summary": "Create a pipeline", + "description": "Run `PUT _logstash/pipeline/my_pipeline` to create a pipeline.", + "value": "{\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": 1\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n}" + } + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/terms_enum-200" + "description": "", + "content": { + "application/json": {} + } } }, - "x-state": "Added in 7.14.0", - "x-api-name": "terms_enum" - } - }, - "/{index}/_termvectors/{id}": { - "get": { + "x-state": "Generally available; Added in 7.12.0", + "x-variations": [ + "
\n PUT\n /_logstash/pipeline/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_logstash_pipelines`\n" + ], + "x-api": "put_pipeline.logstash", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "document" + "logstash" ], - "summary": "Get term vector information", - "description": "Get information and statistics about terms in the fields of a particular document.\n\nYou can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.\nYou can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body.\nFor example:\n\n```\nGET /my-index-000001/_termvectors/1?fields=message\n```\n\nFields can be specified using wildcards, similar to the multi match query.\n\nTerm vectors are real-time by default, not near real-time.\nThis can be changed by setting `realtime` parameter to `false`.\n\nYou can request three types of values: _term information_, _term statistics_, and _field statistics_.\nBy default, all term information and field statistics are returned for all fields but term statistics are excluded.\n\n**Term information**\n\n* term frequency in the field (always returned)\n* term positions (`positions: true`)\n* start and end offsets (`offsets: true`)\n* term payloads (`payloads: true`), as base64 encoded bytes\n\nIf the requested information wasn't stored in the index, it will be computed on the fly if possible.\nAdditionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.\n\n> warn\n> Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.\n\n**Behaviour**\n\nThe term and field statistics are not accurate.\nDeleted documents are not taken into account.\nThe information is only retrieved for the shard the requested document resides in.\nThe term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.\nBy default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.\nUse `routing` only to hit a particular shard.", - "operationId": "termvectors", + "summary": "Delete a Logstash pipeline", + "description": "Delete a pipeline that is used for Logstash Central Management.\nIf the request succeeds, you receive an empty response with an appropriate status code.", + "externalDocs": { + "description": "Centralized pipeline management", + "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-delete-pipeline.html" + }, + "operationId": "logstash-delete-pipeline", "parameters": [ { - "$ref": "#/components/parameters/termvectors-index" - }, - { - "$ref": "#/components/parameters/termvectors-id" - }, - { - "$ref": "#/components/parameters/termvectors-fields" - }, - { - "$ref": "#/components/parameters/termvectors-field_statistics" - }, - { - "$ref": "#/components/parameters/termvectors-offsets" - }, - { - "$ref": "#/components/parameters/termvectors-payloads" - }, - { - "$ref": "#/components/parameters/termvectors-positions" - }, - { - "$ref": "#/components/parameters/termvectors-preference" - }, - { - "$ref": "#/components/parameters/termvectors-realtime" - }, - { - "$ref": "#/components/parameters/termvectors-routing" - }, - { - "$ref": "#/components/parameters/termvectors-term_statistics" - }, - { - "$ref": "#/components/parameters/termvectors-version" - }, - { - "$ref": "#/components/parameters/termvectors-version_type" + "in": "path", + "name": "id", + "description": "An identifier for the pipeline.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/termvectors" - }, "responses": { "200": { - "$ref": "#/components/responses/termvectors-200" + "description": "", + "content": { + "application/json": {} + } } }, - "x-api-name": "termvectors" - }, - "post": { - "tags": [ - "document" + "x-state": "Generally available; Added in 7.12.0", + "x-variations": [ + "
\n DELETE\n /_logstash/pipeline/{id}\n
\n " ], - "summary": "Get term vector information", - "description": "Get information and statistics about terms in the fields of a particular document.\n\nYou can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.\nYou can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body.\nFor example:\n\n```\nGET /my-index-000001/_termvectors/1?fields=message\n```\n\nFields can be specified using wildcards, similar to the multi match query.\n\nTerm vectors are real-time by default, not near real-time.\nThis can be changed by setting `realtime` parameter to `false`.\n\nYou can request three types of values: _term information_, _term statistics_, and _field statistics_.\nBy default, all term information and field statistics are returned for all fields but term statistics are excluded.\n\n**Term information**\n\n* term frequency in the field (always returned)\n* term positions (`positions: true`)\n* start and end offsets (`offsets: true`)\n* term payloads (`payloads: true`), as base64 encoded bytes\n\nIf the requested information wasn't stored in the index, it will be computed on the fly if possible.\nAdditionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.\n\n> warn\n> Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.\n\n**Behaviour**\n\nThe term and field statistics are not accurate.\nDeleted documents are not taken into account.\nThe information is only retrieved for the shard the requested document resides in.\nThe term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.\nBy default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.\nUse `routing` only to hit a particular shard.", - "operationId": "termvectors-1", - "parameters": [ - { - "$ref": "#/components/parameters/termvectors-index" - }, - { - "$ref": "#/components/parameters/termvectors-id" - }, - { - "$ref": "#/components/parameters/termvectors-fields" - }, - { - "$ref": "#/components/parameters/termvectors-field_statistics" - }, - { - "$ref": "#/components/parameters/termvectors-offsets" - }, - { - "$ref": "#/components/parameters/termvectors-payloads" - }, - { - "$ref": "#/components/parameters/termvectors-positions" - }, - { - "$ref": "#/components/parameters/termvectors-preference" - }, - { - "$ref": "#/components/parameters/termvectors-realtime" - }, - { - "$ref": "#/components/parameters/termvectors-routing" - }, - { - "$ref": "#/components/parameters/termvectors-term_statistics" - }, - { - "$ref": "#/components/parameters/termvectors-version" - }, + "x-req-auth": [ + "Cluster privileges: `manage_logstash_pipelines`\n" + ], + "x-api": "delete_pipeline.logstash", + "x-category": "ingest", + "x-metaTags": [ { - "$ref": "#/components/parameters/termvectors-version_type" + "content": "Elasticsearch, Logstash", + "name": "product_name" } + ] + } + }, + "/_logstash/pipeline": { + "get": { + "tags": [ + "logstash" ], - "requestBody": { - "$ref": "#/components/requestBodies/termvectors" + "summary": "Get Logstash pipelines", + "description": "Get pipelines that are used for Logstash Central Management.", + "externalDocs": { + "description": "Centralized pipeline management", + "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-get-pipeline.html" }, + "operationId": "logstash-get-pipeline", "responses": { "200": { - "$ref": "#/components/responses/termvectors-200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/logstash._types.Pipeline" + } + }, + "examples": { + "LogstashGetPipelineResponseExample1": { + "description": "A successful response from `GET _logstash/pipeline/my_pipeline`.\n", + "value": "{\n \"my_pipeline\": {\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": \"1\"\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n }\n}" + } + } + } + } } }, - "x-api-name": "termvectors" + "x-state": "Generally available; Added in 7.12.0", + "x-variations": [ + "
\n GET\n /_logstash/pipeline\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_logstash_pipelines`\n" + ], + "x-api": "get_pipeline.logstash", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] } }, - "/{index}/_termvectors": { + "/_mget": { "get": { "tags": [ "document" ], - "summary": "Get term vector information", - "description": "Get information and statistics about terms in the fields of a particular document.\n\nYou can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.\nYou can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body.\nFor example:\n\n```\nGET /my-index-000001/_termvectors/1?fields=message\n```\n\nFields can be specified using wildcards, similar to the multi match query.\n\nTerm vectors are real-time by default, not near real-time.\nThis can be changed by setting `realtime` parameter to `false`.\n\nYou can request three types of values: _term information_, _term statistics_, and _field statistics_.\nBy default, all term information and field statistics are returned for all fields but term statistics are excluded.\n\n**Term information**\n\n* term frequency in the field (always returned)\n* term positions (`positions: true`)\n* start and end offsets (`offsets: true`)\n* term payloads (`payloads: true`), as base64 encoded bytes\n\nIf the requested information wasn't stored in the index, it will be computed on the fly if possible.\nAdditionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.\n\n> warn\n> Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.\n\n**Behaviour**\n\nThe term and field statistics are not accurate.\nDeleted documents are not taken into account.\nThe information is only retrieved for the shard the requested document resides in.\nThe term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.\nBy default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.\nUse `routing` only to hit a particular shard.", - "operationId": "termvectors-2", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", + "operationId": "mget", "parameters": [ { - "$ref": "#/components/parameters/termvectors-index" - }, - { - "$ref": "#/components/parameters/termvectors-fields" - }, - { - "$ref": "#/components/parameters/termvectors-field_statistics" - }, - { - "$ref": "#/components/parameters/termvectors-offsets" - }, - { - "$ref": "#/components/parameters/termvectors-payloads" - }, - { - "$ref": "#/components/parameters/termvectors-positions" - }, - { - "$ref": "#/components/parameters/termvectors-preference" - }, - { - "$ref": "#/components/parameters/termvectors-realtime" - }, - { - "$ref": "#/components/parameters/termvectors-routing" - }, - { - "$ref": "#/components/parameters/termvectors-term_statistics" - }, - { - "$ref": "#/components/parameters/termvectors-version" - }, - { - "$ref": "#/components/parameters/termvectors-version_type" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/termvectors" - }, - "responses": { - "200": { - "$ref": "#/components/responses/termvectors-200" - } - }, - "x-api-name": "termvectors" - }, - "post": { - "tags": [ - "document" - ], - "summary": "Get term vector information", - "description": "Get information and statistics about terms in the fields of a particular document.\n\nYou can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.\nYou can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body.\nFor example:\n\n```\nGET /my-index-000001/_termvectors/1?fields=message\n```\n\nFields can be specified using wildcards, similar to the multi match query.\n\nTerm vectors are real-time by default, not near real-time.\nThis can be changed by setting `realtime` parameter to `false`.\n\nYou can request three types of values: _term information_, _term statistics_, and _field statistics_.\nBy default, all term information and field statistics are returned for all fields but term statistics are excluded.\n\n**Term information**\n\n* term frequency in the field (always returned)\n* term positions (`positions: true`)\n* start and end offsets (`offsets: true`)\n* term payloads (`payloads: true`), as base64 encoded bytes\n\nIf the requested information wasn't stored in the index, it will be computed on the fly if possible.\nAdditionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.\n\n> warn\n> Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.\n\n**Behaviour**\n\nThe term and field statistics are not accurate.\nDeleted documents are not taken into account.\nThe information is only retrieved for the shard the requested document resides in.\nThe term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.\nBy default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.\nUse `routing` only to hit a particular shard.", - "operationId": "termvectors-3", - "parameters": [ - { - "$ref": "#/components/parameters/termvectors-index" - }, - { - "$ref": "#/components/parameters/termvectors-fields" - }, - { - "$ref": "#/components/parameters/termvectors-field_statistics" - }, - { - "$ref": "#/components/parameters/termvectors-offsets" - }, - { - "$ref": "#/components/parameters/termvectors-payloads" - }, - { - "$ref": "#/components/parameters/termvectors-positions" - }, - { - "$ref": "#/components/parameters/termvectors-preference" - }, - { - "$ref": "#/components/parameters/termvectors-realtime" - }, - { - "$ref": "#/components/parameters/termvectors-routing" - }, - { - "$ref": "#/components/parameters/termvectors-term_statistics" + "in": "query", + "name": "preference", + "description": "Specifies the node or shard the operation should be performed on. Random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/termvectors-version" + "in": "query", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - { - "$ref": "#/components/parameters/termvectors-version_type" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/termvectors" - }, - "responses": { - "200": { - "$ref": "#/components/responses/termvectors-200" - } - }, - "x-api-name": "termvectors" - } - }, - "/_text_structure/find_field_structure": { - "get": { - "tags": [ - "text_structure" - ], - "summary": "Find the structure of a text field", - "description": "Find the structure of a text field in an Elasticsearch index.\n\nThis API provides a starting point for extracting further information from log messages already ingested into Elasticsearch.\nFor example, if you have ingested data into a very simple index that has just `@timestamp` and message fields, you can use this API to see what common structure exists in the message field.\n\nThe response from the API contains:\n\n* Sample messages.\n* Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields.\n* Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text.\n* Appropriate mappings for an Elasticsearch index, which you could use to ingest the text.\n\nAll this information can be calculated by the structure finder with no guidance.\nHowever, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.\n\nIf the structure finder produces unexpected results, specify the `explain` query parameter and an explanation will appear in the response.\nIt helps determine why the returned structure was chosen.", - "operationId": "text-structure-find-field-structure", - "parameters": [ { "in": "query", - "name": "column_names", - "description": "If `format` is set to `delimited`, you can specify the column names in a comma-separated list.\nIf this parameter is not specified, the structure finder uses the column names from the header row of the text.\nIf the text does not have a header row, columns are named \"column1\", \"column2\", \"column3\", for example.", + "name": "refresh", + "description": "If `true`, the request refreshes relevant shards before retrieving documents.", "deprecated": false, "schema": { - "type": "string" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "delimiter", - "description": "If you have set `format` to `delimited`, you can specify the character used to delimit the values in each row.\nOnly a single character is supported; the delimiter cannot have multiple characters.\nBy default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (`|`).\nIn this default scenario, all rows must have the same number of fields for the delimited format to be detected.\nIf you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row.", + "name": "routing", + "description": "Custom value used to route operations to a specific shard.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" }, { "in": "query", - "name": "documents_to_sample", - "description": "The number of documents to include in the structural analysis.\nThe minimum value is 2.", + "name": "_source", + "description": "True or false to return the `_source` field or not, or a list of fields to return.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.uint" + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" }, "style": "form" }, { "in": "query", - "name": "ecs_compatibility", - "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nThis setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.\nIf the structure finder identifies a common structure but has no idea of the meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output.\nThe intention in that situation is that a user who knows the meanings will rename the fields before using them.", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "explain", - "description": "If `true`, the response includes a field named `explanation`, which is an array of strings that indicate how the structure finder produced its result.", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "field", - "description": "The field that should be analyzed.", - "required": true, + "name": "stored_fields", + "description": "If `true`, retrieves the document fields stored in the index rather than the document `_source`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Field" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "The documents you want to retrieve. Required if no index is specified in the request URI.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mget.Operation" + } + }, + "ids": { + "description": "The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + } + } + }, + "examples": { + "MultiGetRequestExample1": { + "summary": "Get documents by ID", + "description": "Run `GET /my-index-000001/_mget`. When you specify an index in the request URI, only the document IDs are required in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" + }, + "MultiGetRequestExample2": { + "summary": "Filter source fields", + "description": "Run `GET /_mget`. This request sets `_source` to `false` for document 1 to exclude the source entirely. It retrieves `field3` and `field4` from document 2. It retrieves the `user` field from document 3 but filters out the `user.location` field.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": false\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [ \"field3\", \"field4\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [ \"user\" ],\n \"exclude\": [ \"user.location\" ]\n }\n }\n ]\n}" + }, + "MultiGetRequestExample3": { + "summary": "Get stored fields", + "description": "Run `GET /_mget`. This request retrieves `field1` and `field2` from document 1 and `field3` and `field4` from document 2.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [ \"field1\", \"field2\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [ \"field3\", \"field4\" ]\n }\n ]\n}" + }, + "MultiGetRequestExample4": { + "summary": "Document routing", + "description": "Run `GET /_mget?routing=key1`. If routing is used during indexing, you need to specify the routing value to retrieve documents. This request fetches `test/_doc/2` from the shard corresponding to routing key `key1`. It fetches `test/_doc/1` from the shard corresponding to routing key `key2`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ]\n}" + } + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "The response includes a docs array that contains the documents in the order specified in the request.\nThe structure of the returned documents is similar to that returned by the get API.\nIf there is a failure getting a particular document, the error is included in place of the document.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mget.ResponseItem" + } + } + }, + "required": [ + "docs" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_mget\n
\n ", + "
\n POST\n /_mget\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "mget", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "document" + ], + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", + "operationId": "mget-1", + "parameters": [ { "in": "query", - "name": "format", - "description": "The high level structure of the text.\nBy default, the API chooses the format.\nIn this default scenario, all rows must have the same number of fields for a delimited format to be detected.\nIf 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.", + "name": "preference", + "description": "Specifies the node or shard the operation should be performed on. Random by default.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/text_structure._types.FormatType" + "type": "string" }, "style": "form" }, { "in": "query", - "name": "grok_pattern", - "description": "If the format is `semi_structured_text`, you can specify a Grok pattern that is used to extract fields from every message in the text.\nThe name of the timestamp field in the Grok pattern must match what is specified in the `timestamp_field` parameter.\nIf that parameter is not specified, the name of the timestamp field in the Grok pattern must match \"timestamp\".\nIf `grok_pattern` is not specified, the structure finder creates a Grok pattern.", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.GrokPattern" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "index", - "description": "The name of the index that contains the analyzed field.", - "required": true, + "name": "refresh", + "description": "If `true`, the request refreshes relevant shards before retrieving documents.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "quote", - "description": "If the format is `delimited`, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character.\nOnly a single character is supported.\nIf this parameter is not specified, the default value is a double quote (`\"`).\nIf 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.", + "name": "routing", + "description": "Custom value used to route operations to a specific shard.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" }, { "in": "query", - "name": "should_trim_fields", - "description": "If the format is `delimited`, you can specify whether values between delimiters should have whitespace trimmed from them.\nIf this parameter is not specified and the delimiter is pipe (`|`), the default value is true.\nOtherwise, the default value is `false`.", + "name": "_source", + "description": "True or false to return the `_source` field or not, or a list of fields to return.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The maximum amount of time that the structure analysis can take.\nIf the analysis is still running when the timeout expires, it will be stopped.", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "timestamp_field", - "description": "The name of the field that contains the primary timestamp of each record in the text.\nIn particular, if the text was ingested into an index, this is the field that would be used to populate the `@timestamp` field.\n\nIf the format is `semi_structured_text`, this field must match the name of the appropriate extraction in the `grok_pattern`.\nTherefore, for semi-structured text, it is best not to specify this parameter unless `grok_pattern` is also specified.\n\nFor structured text, if you specify this parameter, the field must exist within the text.\n\nIf this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field.\nFor structured text, it is not compulsory to have a timestamp in the text.", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Field" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "timestamp_format", - "description": "The Java time format of the timestamp field in the text.\nOnly a subset of Java time format letter groups are supported:\n\n* `a`\n* `d`\n* `dd`\n* `EEE`\n* `EEEE`\n* `H`\n* `HH`\n* `h`\n* `M`\n* `MM`\n* `MMM`\n* `MMMM`\n* `mm`\n* `ss`\n* `XX`\n* `XXX`\n* `yy`\n* `yyyy`\n* `zzz`\n\nAdditionally `S` letter groups (fractional seconds) of length one to nine are supported providing they occur after `ss` and are separated from the `ss` by a period (`.`), comma (`,`), or colon (`:`).\nSpacing and punctuation is also permitted with the exception a question mark (`?`), newline, and carriage return, together with literal text enclosed in single quotes.\nFor example, `MM/dd HH.mm.ss,SSSSSS 'in' yyyy` is a valid override format.\n\nOne valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full `grok_pattern`.\nAnother is when the timestamp format is one that the structure finder does not consider by default.\n\nIf this parameter is not specified, the structure finder chooses the best format from a built-in set.\n\nIf the special value `null` is specified, the structure finder will not look for a primary timestamp in the text.\nWhen the format is semi-structured text, this will result in the structure finder treating the text as single-line messages.", + "name": "stored_fields", + "description": "If `true`, retrieves the document fields stored in the index rather than the document `_source`.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "The documents you want to retrieve. Required if no index is specified in the request URI.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mget.Operation" + } + }, + "ids": { + "description": "The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + } + } + }, + "examples": { + "MultiGetRequestExample1": { + "summary": "Get documents by ID", + "description": "Run `GET /my-index-000001/_mget`. When you specify an index in the request URI, only the document IDs are required in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" + }, + "MultiGetRequestExample2": { + "summary": "Filter source fields", + "description": "Run `GET /_mget`. This request sets `_source` to `false` for document 1 to exclude the source entirely. It retrieves `field3` and `field4` from document 2. It retrieves the `user` field from document 3 but filters out the `user.location` field.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": false\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [ \"field3\", \"field4\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [ \"user\" ],\n \"exclude\": [ \"user.location\" ]\n }\n }\n ]\n}" + }, + "MultiGetRequestExample3": { + "summary": "Get stored fields", + "description": "Run `GET /_mget`. This request retrieves `field1` and `field2` from document 1 and `field3` and `field4` from document 2.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [ \"field1\", \"field2\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [ \"field3\", \"field4\" ]\n }\n ]\n}" + }, + "MultiGetRequestExample4": { + "summary": "Document routing", + "description": "Run `GET /_mget?routing=key1`. If routing is used during indexing, you need to specify the routing value to retrieve documents. This request fetches `test/_doc/2` from the shard corresponding to routing key `key1`. It fetches `test/_doc/1` from the shard corresponding to routing key `key2`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ]\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -42345,238 +48461,64 @@ "schema": { "type": "object", "properties": { - "charset": { - "type": "string" - }, - "ecs_compatibility": { - "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" - }, - "field_stats": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/text_structure._types.FieldStat" - } - }, - "format": { - "$ref": "#/components/schemas/text_structure._types.FormatType" - }, - "grok_pattern": { - "$ref": "#/components/schemas/_types.GrokPattern" - }, - "java_timestamp_formats": { + "docs": { + "description": "The response includes a docs array that contains the documents in the order specified in the request.\nThe structure of the returned documents is similar to that returned by the get API.\nIf there is a failure getting a particular document, the error is included in place of the document.", "type": "array", "items": { - "type": "string" - } - }, - "joda_timestamp_formats": { - "type": "array", - "items": { - "type": "string" + "$ref": "#/components/schemas/_global.mget.ResponseItem" } - }, - "ingest_pipeline": { - "$ref": "#/components/schemas/ingest._types.PipelineConfig" - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" - }, - "multiline_start_pattern": { - "type": "string" - }, - "need_client_timezone": { - "type": "boolean" - }, - "num_lines_analyzed": { - "type": "number" - }, - "num_messages_analyzed": { - "type": "number" - }, - "sample_start": { - "type": "string" - }, - "timestamp_field": { - "$ref": "#/components/schemas/_types.Field" } }, "required": [ - "charset", - "field_stats", - "format", - "ingest_pipeline", - "mappings", - "need_client_timezone", - "num_lines_analyzed", - "num_messages_analyzed", - "sample_start" + "docs" ] - }, - "examples": { - "FindFieldStructureResponseExample1": { - "description": "A successful response from `GET _text_structure/find_field_structure?index=test-logs&field=message`.", - "value": "{\n \"num_lines_analyzed\" : 22,\n \"num_messages_analyzed\" : 22,\n \"sample_start\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\\n[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\\n\",\n \"charset\" : \"UTF-8\",\n \"format\" : \"semi_structured_text\",\n \"multiline_start_pattern\" : \"^\\\\[\\\\b\\\\d{4}-\\\\d{2}-\\\\d{2}[T ]\\\\d{2}:\\\\d{2}\",\n \"grok_pattern\" : \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\",\n \"ecs_compatibility\" : \"disabled\",\n \"timestamp_field\" : \"timestamp\",\n \"joda_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true,\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"loglevel\" : {\n \"type\" : \"keyword\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by text structure finder\",\n \"processors\" : [\n {\n \"grok\" : {\n \"field\" : \"message\",\n \"patterns\" : [\n \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\"\n ],\n \"ecs_compatibility\" : \"disabled\"\n }\n },\n {\n \"date\" : {\n \"field\" : \"timestamp\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n },\n {\n \"remove\" : {\n \"field\" : \"timestamp\"\n }\n }\n ]\n },\n \"field_stats\" : {\n \"loglevel\" : {\n \"count\" : 22,\n \"cardinality\" : 1,\n \"top_hits\" : [\n {\n \"value\" : \"INFO\",\n \"count\" : 22\n }\n ]\n },\n \"message\" : {\n \"count\" : 22,\n \"cardinality\" : 22,\n \"top_hits\" : [\n {\n \"value\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"count\" : 1\n }\n ]\n },\n \"timestamp\" : {\n \"count\" : 22,\n \"cardinality\" : 14,\n \"earliest\" : \"2024-03-05T10:52:36,256\",\n \"latest\" : \"2024-03-05T10:52:49,199\",\n \"top_hits\" : [\n {\n \"value\" : \"2024-03-05T10:52:41,044\",\n \"count\" : 6\n },\n {\n \"value\" : \"2024-03-05T10:52:41,043\",\n \"count\" : 3\n },\n {\n \"value\" : \"2024-03-05T10:52:41,059\",\n \"count\" : 2\n },\n {\n \"value\" : \"2024-03-05T10:52:36,256\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,038\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,042\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:43,291\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:46,098\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,227\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,259\",\n \"count\" : 1\n }\n ]\n }\n }\n}" - } } } } } }, - "x-api-name" : "find_field_structure", - "x-namespace": "text_structure" - } - }, - "/_text_structure/find_message_structure": { - "get": { - "tags": [ - "text_structure" - ], - "summary": "Find the structure of text messages", - "description": "Find the structure of a list of text messages.\nThe messages must contain data that is suitable to be ingested into Elasticsearch.\n\nThis API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.\nUse this API rather than the find text structure API if your input text has already been split up into separate messages by some other process.\n\nThe response from the API contains:\n\n* Sample messages.\n* Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields.\n* Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text.\nAppropriate mappings for an Elasticsearch index, which you could use to ingest the text.\n\nAll this information can be calculated by the structure finder with no guidance.\nHowever, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.\n\nIf the structure finder produces unexpected results, specify the `explain` query parameter and an explanation will appear in the response.\nIt helps determine why the returned structure was chosen.", - "operationId": "text-structure-find-message-structure", - "parameters": [ - { - "$ref": "#/components/parameters/text_structure.find_message_structure-column_names" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-delimiter" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-ecs_compatibility" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-explain" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-format" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-grok_pattern" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-quote" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-should_trim_fields" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-timeout" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-timestamp_field" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-timestamp_format" - } + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_mget\n
\n ", + "
\n POST\n /_mget\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/text_structure.find_message_structure" - }, - "responses": { - "200": { - "$ref": "#/components/responses/text_structure.find_message_structure-200" - } - }, - "x-api-name" : "find_message_structure", - "x-namespace": "text_structure" - }, - "post": { - "tags": [ - "text_structure" + "x-req-auth": [ + "Index privileges: `read`\n" ], - "summary": "Find the structure of text messages", - "description": "Find the structure of a list of text messages.\nThe messages must contain data that is suitable to be ingested into Elasticsearch.\n\nThis API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.\nUse this API rather than the find text structure API if your input text has already been split up into separate messages by some other process.\n\nThe response from the API contains:\n\n* Sample messages.\n* Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields.\n* Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text.\nAppropriate mappings for an Elasticsearch index, which you could use to ingest the text.\n\nAll this information can be calculated by the structure finder with no guidance.\nHowever, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.\n\nIf the structure finder produces unexpected results, specify the `explain` query parameter and an explanation will appear in the response.\nIt helps determine why the returned structure was chosen.", - "operationId": "text-structure-find-message-structure-1", - "parameters": [ - { - "$ref": "#/components/parameters/text_structure.find_message_structure-column_names" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-delimiter" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-ecs_compatibility" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-explain" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-format" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-grok_pattern" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-quote" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-should_trim_fields" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-timeout" - }, - { - "$ref": "#/components/parameters/text_structure.find_message_structure-timestamp_field" - }, + "x-api": "mget", + "x-category": "document management", + "x-metaTags": [ { - "$ref": "#/components/parameters/text_structure.find_message_structure-timestamp_format" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/text_structure.find_message_structure" - }, - "responses": { - "200": { - "$ref": "#/components/responses/text_structure.find_message_structure-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-api-name" : "find_message_structure", - "x-namespace": "text_structure" + ] } }, - "/_text_structure/find_structure": { - "post": { + "/{index}/_mget": { + "get": { "tags": [ - "text_structure" + "document" ], - "summary": "Find the structure of a text file", - "description": "The text file must contain data that is suitable to be ingested into Elasticsearch.\n\nThis API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.\nUnlike other Elasticsearch endpoints, the data that is posted to this endpoint does not need to be UTF-8 encoded and in JSON format.\nIt must, however, be text; binary text formats are not currently supported.\nThe size is limited to the Elasticsearch HTTP receive buffer size, which defaults to 100 Mb.\n\nThe response from the API contains:\n\n* A couple of messages from the beginning of the text.\n* Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields.\n* Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text.\n* Appropriate mappings for an Elasticsearch index, which you could use to ingest the text.\n\nAll this information can be calculated by the structure finder with no guidance.\nHowever, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.", - "operationId": "text-structure-find-structure", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", + "operationId": "mget-2", "parameters": [ { - "in": "query", - "name": "charset", - "description": "The text's character set.\nIt must be a character set that is supported by the JVM that Elasticsearch uses.\nFor example, `UTF-8`, `UTF-16LE`, `windows-1252`, or `EUC-JP`.\nIf this parameter is not specified, the structure finder chooses an appropriate character set.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "column_names", - "description": "If you have set format to `delimited`, you can specify the column names in a comma-separated list.\nIf this parameter is not specified, the structure finder uses the column names from the header row of the text.\nIf the text does not have a header role, columns are named \"column1\", \"column2\", \"column3\", for example.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "delimiter", - "description": "If you have set `format` to `delimited`, you can specify the character used to delimit the values in each row.\nOnly a single character is supported; the delimiter cannot have multiple characters.\nBy default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (`|`).\nIn this default scenario, all rows must have the same number of fields for the delimited format to be detected.\nIf you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row.", + "in": "path", + "name": "index", + "description": "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.", + "required": true, "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.IndexName" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "ecs_compatibility", - "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nValid values are `disabled` and `v1`.\nThis setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.\nIf the structure finder identifies a common structure but has no idea of meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output, with the intention that a user who knows the meanings rename these fields before using it.", + "name": "preference", + "description": "Specifies the node or shard the operation should be performed on. Random by default.", "deprecated": false, "schema": { "type": "string" @@ -42585,8 +48527,8 @@ }, { "in": "query", - "name": "explain", - "description": "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.\nIf the structure finder produces unexpected results for some text, use this query parameter to help you determine why the returned structure was chosen.", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", "deprecated": false, "schema": { "type": "boolean" @@ -42595,28 +48537,8 @@ }, { "in": "query", - "name": "format", - "description": "The high level structure of the text.\nValid values are `ndjson`, `xml`, `delimited`, and `semi_structured_text`.\nBy default, the API chooses the format.\nIn this default scenario, all rows must have the same number of fields for a delimited format to be detected.\nIf 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.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "grok_pattern", - "description": "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.\nThe name of the timestamp field in the Grok pattern must match what is specified in the `timestamp_field` parameter.\nIf that parameter is not specified, the name of the timestamp field in the Grok pattern must match \"timestamp\".\nIf `grok_pattern` is not specified, the structure finder creates a Grok pattern.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.GrokPattern" - }, - "style": "form" - }, - { - "in": "query", - "name": "has_header_row", - "description": "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.\nIf this parameter is not specified, the structure finder guesses based on the similarity of the first row of the text to other rows.", + "name": "refresh", + "description": "If `true`, the request refreshes relevant shards before retrieving documents.", "deprecated": false, "schema": { "type": "boolean" @@ -42625,71 +48547,51 @@ }, { "in": "query", - "name": "line_merge_size_limit", - "description": "The maximum number of characters in a message when lines are merged to form messages while analyzing semi-structured text.\nIf 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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.uint" - }, - "style": "form" - }, - { - "in": "query", - "name": "lines_to_sample", - "description": "The number of lines to include in the structural analysis, starting from the beginning of the text.\nThe minimum is 2.\nIf 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.\n\nNOTE: The number of lines and the variation of the lines affects the speed of the analysis.\nFor example, if you upload text where the first 1000 lines are all variations on the same message, the analysis will find more commonality than would be seen with a bigger sample.\nIf possible, however, it is more efficient to upload sample text with more variety in the first 1000 lines than to request analysis of 100000 lines to achieve some variety.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.uint" - }, - "style": "form" - }, - { - "in": "query", - "name": "quote", - "description": "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.\nOnly a single character is supported.\nIf this parameter is not specified, the default value is a double quote (`\"`).\nIf 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.", + "name": "routing", + "description": "Custom value used to route operations to a specific shard.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Routing" }, "style": "form" }, { "in": "query", - "name": "should_trim_fields", - "description": "If you have set `format` to `delimited`, you can specify whether values between delimiters should have whitespace trimmed from them.\nIf this parameter is not specified and the delimiter is pipe (`|`), the default value is `true`.\nOtherwise, the default value is `false`.", + "name": "_source", + "description": "True or false to return the `_source` field or not, or a list of fields to return.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "The maximum amount of time that the structure analysis can take.\nIf the analysis is still running when the timeout expires then it will be stopped.", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "timestamp_field", - "description": "The name of the field that contains the primary timestamp of each record in the text.\nIn particular, if the text were ingested into an index, this is the field that would be used to populate the `@timestamp` field.\n\nIf the `format` is `semi_structured_text`, this field must match the name of the appropriate extraction in the `grok_pattern`.\nTherefore, for semi-structured text, it is best not to specify this parameter unless `grok_pattern` is also specified.\n\nFor structured text, if you specify this parameter, the field must exist within the text.\n\nIf this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field.\nFor structured text, it is not compulsory to have a timestamp in the text.", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Field" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "timestamp_format", - "description": "The Java time format of the timestamp field in the text.\n\nOnly a subset of Java time format letter groups are supported:\n\n* `a`\n* `d`\n* `dd`\n* `EEE`\n* `EEEE`\n* `H`\n* `HH`\n* `h`\n* `M`\n* `MM`\n* `MMM`\n* `MMMM`\n* `mm`\n* `ss`\n* `XX`\n* `XXX`\n* `yy`\n* `yyyy`\n* `zzz`\n\nAdditionally `S` letter groups (fractional seconds) of length one to nine are supported providing they occur after `ss` and separated from the `ss` by a `.`, `,` or `:`.\nSpacing and punctuation is also permitted with the exception of `?`, newline and carriage return, together with literal text enclosed in single quotes.\nFor example, `MM/dd HH.mm.ss,SSSSSS 'in' yyyy` is a valid override format.\n\nOne valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full `grok_pattern`.\nAnother is when the timestamp format is one that the structure finder does not consider by default.\n\nIf this parameter is not specified, the structure finder chooses the best format from a built-in set.\n\nIf the special value `null` is specified the structure finder will not look for a primary timestamp in the text.\nWhen the format is semi-structured text this will result in the structure finder treating the text as single-line messages.", + "name": "stored_fields", + "description": "If `true`, retrieves the document fields stored in the index rather than the document `_source`.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" } @@ -42698,15 +48600,45 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object" - } + "type": "object", + "properties": { + "docs": { + "description": "The documents you want to retrieve. Required if no index is specified in the request URI.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mget.Operation" + } + }, + "ids": { + "description": "The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + } + } }, "examples": { - "FindStructureRequestExample1": { - "description": "Run `POST _text_structure/find_structure` to analyze newline-delimited JSON text.", - "value": "{\"name\": \"Leviathan Wakes\", \"author\": \"James S.A. Corey\", \"release_date\": \"2011-06-02\", \"page_count\": 561}\n{\"name\": \"Hyperion\", \"author\": \"Dan Simmons\", \"release_date\": \"1989-05-26\", \"page_count\": 482}\n{\"name\": \"Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1965-06-01\", \"page_count\": 604}\n{\"name\": \"Dune Messiah\", \"author\": \"Frank Herbert\", \"release_date\": \"1969-10-15\", \"page_count\": 331}\n{\"name\": \"Children of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1976-04-21\", \"page_count\": 408}\n{\"name\": \"God Emperor of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1981-05-28\", \"page_count\": 454}\n{\"name\": \"Consider Phlebas\", \"author\": \"Iain M. Banks\", \"release_date\": \"1987-04-23\", \"page_count\": 471}\n{\"name\": \"Pandora's Star\", \"author\": \"Peter F. Hamilton\", \"release_date\": \"2004-03-02\", \"page_count\": 768}\n{\"name\": \"Revelation Space\", \"author\": \"Alastair Reynolds\", \"release_date\": \"2000-03-15\", \"page_count\": 585}\n{\"name\": \"A Fire Upon the Deep\", \"author\": \"Vernor Vinge\", \"release_date\": \"1992-06-01\", \"page_count\": 613}\n{\"name\": \"Ender's Game\", \"author\": \"Orson Scott Card\", \"release_date\": \"1985-06-01\", \"page_count\": 324}\n{\"name\": \"1984\", \"author\": \"George Orwell\", \"release_date\": \"1985-06-01\", \"page_count\": 328}\n{\"name\": \"Fahrenheit 451\", \"author\": \"Ray Bradbury\", \"release_date\": \"1953-10-15\", \"page_count\": 227}\n{\"name\": \"Brave New World\", \"author\": \"Aldous Huxley\", \"release_date\": \"1932-06-01\", \"page_count\": 268}\n{\"name\": \"Foundation\", \"author\": \"Isaac Asimov\", \"release_date\": \"1951-06-01\", \"page_count\": 224}\n{\"name\": \"The Giver\", \"author\": \"Lois Lowry\", \"release_date\": \"1993-04-26\", \"page_count\": 208}\n{\"name\": \"Slaughterhouse-Five\", \"author\": \"Kurt Vonnegut\", \"release_date\": \"1969-06-01\", \"page_count\": 275}\n{\"name\": \"The Hitchhiker's Guide to the Galaxy\", \"author\": \"Douglas Adams\", \"release_date\": \"1979-10-12\", \"page_count\": 180}\n{\"name\": \"Snow Crash\", \"author\": \"Neal Stephenson\", \"release_date\": \"1992-06-01\", \"page_count\": 470}\n{\"name\": \"Neuromancer\", \"author\": \"William Gibson\", \"release_date\": \"1984-07-01\", \"page_count\": 271}\n{\"name\": \"The Handmaid's Tale\", \"author\": \"Margaret Atwood\", \"release_date\": \"1985-06-01\", \"page_count\": 311}\n{\"name\": \"Starship Troopers\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1959-12-01\", \"page_count\": 335}\n{\"name\": \"The Left Hand of Darkness\", \"author\": \"Ursula K. Le Guin\", \"release_date\": \"1969-06-01\", \"page_count\": 304}\n{\"name\": \"The Moon is a Harsh Mistress\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1966-04-01\", \"page_count\": 288}" + "MultiGetRequestExample1": { + "summary": "Get documents by ID", + "description": "Run `GET /my-index-000001/_mget`. When you specify an index in the request URI, only the document IDs are required in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" + }, + "MultiGetRequestExample2": { + "summary": "Filter source fields", + "description": "Run `GET /_mget`. This request sets `_source` to `false` for document 1 to exclude the source entirely. It retrieves `field3` and `field4` from document 2. It retrieves the `user` field from document 3 but filters out the `user.location` field.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": false\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [ \"field3\", \"field4\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [ \"user\" ],\n \"exclude\": [ \"user.location\" ]\n }\n }\n ]\n}" + }, + "MultiGetRequestExample3": { + "summary": "Get stored fields", + "description": "Run `GET /_mget`. This request retrieves `field1` and `field2` from document 1 and `field3` and `field4` from document 2.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [ \"field1\", \"field2\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [ \"field3\", \"field4\" ]\n }\n ]\n}" + }, + "MultiGetRequestExample4": { + "summary": "Document routing", + "description": "Run `GET /_mget?routing=key1`. If routing is used during indexing, you need to specify the routing value to retrieve documents. This request fetches `test/_doc/2` from the shard corresponding to routing key `key1`. It fetches `test/_doc/1` from the shard corresponding to routing key `key2`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ]\n}" } } } @@ -42721,253 +48653,135 @@ "schema": { "type": "object", "properties": { - "charset": { - "description": "The character encoding used to parse the text.", - "type": "string" - }, - "has_header_row": { - "type": "boolean" - }, - "has_byte_order_marker": { - "description": "For UTF character encodings, it indicates whether the text begins with a byte order marker.", - "type": "boolean" - }, - "format": { - "description": "Valid values include `ndjson`, `xml`, `delimited`, and `semi_structured_text`.", - "type": "string" - }, - "field_stats": { - "description": "The most common values of each field, plus basic numeric statistics for the numeric `page_count` field.\nThis information may provide clues that the data needs to be cleaned or transformed prior to use by other Elastic Stack functionality.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/text_structure._types.FieldStat" - } - }, - "sample_start": { - "description": "The first two messages in the text verbatim.\nThis may help diagnose parse errors or accidental uploads of the wrong text.", - "type": "string" - }, - "num_messages_analyzed": { - "description": "The number of distinct messages the lines contained.\nFor NDJSON, this value is the same as `num_lines_analyzed`.\nFor other text formats, messages can span several lines.", - "type": "number" - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" - }, - "quote": { - "type": "string" - }, - "delimiter": { - "type": "string" - }, - "need_client_timezone": { - "description": "If a timestamp format is detected that does not include a timezone, `need_client_timezone` is `true`.\nThe server that parses the text must therefore be told the correct timezone by the client.", - "type": "boolean" - }, - "num_lines_analyzed": { - "description": "The number of lines of the text that were analyzed.", - "type": "number" - }, - "column_names": { - "description": "If `format` is `delimited`, the `column_names` field lists the column names in the order they appear in the sample.", - "type": "array", - "items": { - "type": "string" - } - }, - "explanation": { - "type": "array", - "items": { - "type": "string" - } - }, - "grok_pattern": { - "$ref": "#/components/schemas/_types.GrokPattern" - }, - "multiline_start_pattern": { - "type": "string" - }, - "exclude_lines_pattern": { - "type": "string" - }, - "java_timestamp_formats": { - "description": "The Java time formats recognized in the time fields.\nElasticsearch mappings and ingest pipelines use this format.", + "docs": { + "description": "The response includes a docs array that contains the documents in the order specified in the request.\nThe structure of the returned documents is similar to that returned by the get API.\nIf there is a failure getting a particular document, the error is included in place of the document.", "type": "array", "items": { - "type": "string" - } - }, - "joda_timestamp_formats": { - "description": "Information that is used to tell Logstash how to parse timestamps.", - "type": "array", - "items": { - "type": "string" + "$ref": "#/components/schemas/_global.mget.ResponseItem" } - }, - "timestamp_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "should_trim_fields": { - "type": "boolean" - }, - "ingest_pipeline": { - "$ref": "#/components/schemas/ingest._types.PipelineConfig" } }, "required": [ - "charset", - "has_byte_order_marker", - "format", - "field_stats", - "sample_start", - "num_messages_analyzed", - "mappings", - "need_client_timezone", - "num_lines_analyzed", - "ingest_pipeline" + "docs" ] - }, - "examples": { - "FindStructureResponseExample1": { - "description": "A successful response from `POST _text_structure/find_structure`.", - "value": "{\n \"num_lines_analyzed\" : 24,\n \"num_messages_analyzed\" : 24,\n \"sample_start\" : \"{\\\"name\\\": \\\"Leviathan Wakes\\\", \\\"author\\\": \\\"James S.A. Corey\\\", \\\"release_date\\\": \\\"2011-06-02\\\", \\\"page_count\\\": 561}\\n{\\\"name\\\": \\\"Hyperion\\\", \\\"author\\\": \\\"Dan Simmons\\\", \\\"release_date\\\": \\\"1989-05-26\\\", \\\"page_count\\\": 482}\\n\",\n \"charset\" : \"UTF-8\",\n \"has_byte_order_marker\" : false,\n \"format\" : \"ndjson\",\n \"ecs_compatibility\" : \"disabled\",\n \"timestamp_field\" : \"release_date\",\n \"joda_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true,\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"author\" : {\n \"type\" : \"keyword\"\n },\n \"name\" : {\n \"type\" : \"keyword\"\n },\n \"page_count\" : {\n \"type\" : \"long\"\n },\n \"release_date\" : {\n \"type\" : \"date\",\n \"format\" : \"iso8601\"\n }\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by text structure finder\",\n \"processors\" : [\n {\n \"date\" : {\n \"field\" : \"release_date\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n }\n ]\n },\n \"field_stats\" : {\n \"author\" : {\n \"count\" : 24,\n \"cardinality\" : 20,\n \"top_hits\" : [\n {\n \"value\" : \"Frank Herbert\",\n \"count\" : 4\n },\n {\n \"value\" : \"Robert A. Heinlein\",\n \"count\" : 2\n },\n {\n \"value\" : \"Alastair Reynolds\",\n \"count\" : 1\n },\n {\n \"value\" : \"Aldous Huxley\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dan Simmons\",\n \"count\" : 1\n },\n {\n \"value\" : \"Douglas Adams\",\n \"count\" : 1\n },\n {\n \"value\" : \"George Orwell\",\n \"count\" : 1\n },\n {\n \"value\" : \"Iain M. Banks\",\n \"count\" : 1\n },\n {\n \"value\" : \"Isaac Asimov\",\n \"count\" : 1\n },\n {\n \"value\" : \"James S.A. Corey\",\n \"count\" : 1\n }\n ]\n },\n \"name\" : {\n \"count\" : 24,\n \"cardinality\" : 24,\n \"top_hits\" : [\n {\n \"value\" : \"1984\",\n \"count\" : 1\n },\n {\n \"value\" : \"A Fire Upon the Deep\",\n \"count\" : 1\n },\n {\n \"value\" : \"Brave New World\",\n \"count\" : 1\n },\n {\n \"value\" : \"Children of Dune\",\n \"count\" : 1\n },\n {\n \"value\" : \"Consider Phlebas\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dune\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dune Messiah\",\n \"count\" : 1\n },\n {\n \"value\" : \"Ender's Game\",\n \"count\" : 1\n },\n {\n \"value\" : \"Fahrenheit 451\",\n \"count\" : 1\n },\n {\n \"value\" : \"Foundation\",\n \"count\" : 1\n }\n ]\n },\n \"page_count\" : {\n \"count\" : 24,\n \"cardinality\" : 24,\n \"min_value\" : 180,\n \"max_value\" : 768,\n \"mean_value\" : 387.0833333333333,\n \"median_value\" : 329.5,\n \"top_hits\" : [\n {\n \"value\" : 180,\n \"count\" : 1\n },\n {\n \"value\" : 208,\n \"count\" : 1\n },\n {\n \"value\" : 224,\n \"count\" : 1\n },\n {\n \"value\" : 227,\n \"count\" : 1\n },\n {\n \"value\" : 268,\n \"count\" : 1\n },\n {\n \"value\" : 271,\n \"count\" : 1\n },\n {\n \"value\" : 275,\n \"count\" : 1\n },\n {\n \"value\" : 288,\n \"count\" : 1\n },\n {\n \"value\" : 304,\n \"count\" : 1\n },\n {\n \"value\" : 311,\n \"count\" : 1\n }\n ]\n },\n \"release_date\" : {\n \"count\" : 24,\n \"cardinality\" : 20,\n \"earliest\" : \"1932-06-01\",\n \"latest\" : \"2011-06-02\",\n \"top_hits\" : [\n {\n \"value\" : \"1985-06-01\",\n \"count\" : 3\n },\n {\n \"value\" : \"1969-06-01\",\n \"count\" : 2\n },\n {\n \"value\" : \"1992-06-01\",\n \"count\" : 2\n },\n {\n \"value\" : \"1932-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1951-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1953-10-15\",\n \"count\" : 1\n },\n {\n \"value\" : \"1959-12-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1965-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1966-04-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1969-10-15\",\n \"count\" : 1\n }\n ]\n }\n }\n}" - } } } } } }, - "x-state": "Added in 7.13.0", - "x-api-name" : "find_structure", - "x-namespace": "text_structure" - } - }, - "/_text_structure/test_grok_pattern": { - "get": { - "tags": [ - "text_structure" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /{index}/_mget\n
\n ", + "
\n POST\n /{index}/_mget\n
\n " ], - "summary": "Test a Grok pattern", - "description": "Test a Grok pattern on one or more lines of text.\nThe API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/scripting/grok" - }, - "operationId": "text-structure-test-grok-pattern", - "parameters": [ - { - "$ref": "#/components/parameters/text_structure.test_grok_pattern-ecs_compatibility" - } + "x-req-auth": [ + "Index privileges: `read`\n" ], - "requestBody": { - "$ref": "#/components/requestBodies/text_structure.test_grok_pattern" - }, - "responses": { - "200": { - "$ref": "#/components/responses/text_structure.test_grok_pattern-200" + "x-api": "mget", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 8.13.0", - "x-api-name" : "test_grok_pattern", - "x-namespace": "text_structure" + ] }, "post": { "tags": [ - "text_structure" + "document" ], - "summary": "Test a Grok pattern", - "description": "Test a Grok pattern on one or more lines of text.\nThe API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/scripting/grok" - }, - "operationId": "text-structure-test-grok-pattern-1", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", + "operationId": "mget-3", "parameters": [ { - "$ref": "#/components/parameters/text_structure.test_grok_pattern-ecs_compatibility" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/text_structure.test_grok_pattern" - }, - "responses": { - "200": { - "$ref": "#/components/responses/text_structure.test_grok_pattern-200" - } - }, - "x-state": "Added in 8.13.0", - "x-api-name" : "test_grok_pattern", - "x-namespace": "text_structure" - } - }, - "/_transform/{transform_id}": { - "get": { - "tags": [ - "transform" - ], - "summary": "Get transforms", - "description": "Get configuration information for transforms.", - "operationId": "transform-get-transform", - "parameters": [ + "in": "path", + "name": "index", + "description": "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.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, { - "$ref": "#/components/parameters/transform.get_transform-transform_id" + "in": "query", + "name": "preference", + "description": "Specifies the node or shard the operation should be performed on. Random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "$ref": "#/components/parameters/transform.get_transform-allow_no_match" + "in": "query", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/transform.get_transform-from" + "in": "query", + "name": "refresh", + "description": "If `true`, the request refreshes relevant shards before retrieving documents.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/parameters/transform.get_transform-size" + "in": "query", + "name": "routing", + "description": "Custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/parameters/transform.get_transform-exclude_generated" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/transform.get_transform-200" - } - }, - "x-state": "Added in 7.5.0", - "x-api-name" : "get_transform", - "x-namespace": "transform" - }, - "put": { - "tags": [ - "transform" - ], - "summary": "Create a transform", - "description": "Creates a transform.\n\nA transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as\na data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a\nunique row per entity.\n\nYou must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If\nyou choose to use the pivot method for your transform, the entities are defined by the set of `group_by` fields in\nthe pivot object. If you choose to use the latest method, the entities are defined by the `unique_key` field values\nin the latest object.\n\nYou must have `create_index`, `index`, and `read` privileges on the destination index and `read` and\n`view_index_metadata` privileges on the source indices. When Elasticsearch security features are enabled, the\ntransform remembers which roles the user that created it had at the time of creation and uses those same roles. If\nthose roles do not have the required privileges on the source and destination indices, the transform fails when it\nattempts unauthorized operations.\n\nNOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any\n`.transform-internal*` indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do\nnot give users any privileges on `.transform-internal*` indices. If you used transforms prior to 7.5, also do not\ngive users any privileges on `.data-frame-internal*` indices.", - "operationId": "transform-put-transform", - "parameters": [ + "in": "query", + "name": "_source", + "description": "True or false to return the `_source` field or not, or a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" + }, { - "in": "path", - "name": "transform_id", - "description": "Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),\nhyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.", - "required": true, + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Fields" }, - "style": "simple" + "style": "form" }, { "in": "query", - "name": "defer_validation", - "description": "When the transform is created, a series of validations occur to ensure its success. For example, there is a\ncheck for the existence of the source indices and a check that the destination index is not part of the source\nindex pattern. You can use this parameter to skip the checks, for example when the source index does not exist\nuntil after the transform is created. The validations are always run when you start the transform, however, with\nthe exception of privilege checks.", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "stored_fields", + "description": "If `true`, retrieves the document fields stored in the index rather than the document `_source`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "$ref": "#/components/schemas/_types.Fields" }, "style": "form" } @@ -42978,53 +48792,43 @@ "schema": { "type": "object", "properties": { - "dest": { - "$ref": "#/components/schemas/transform._types.Destination" - }, - "description": { - "description": "Free text description of the transform.", - "type": "string" - }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" - }, - "latest": { - "$ref": "#/components/schemas/transform._types.Latest" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "pivot": { - "$ref": "#/components/schemas/transform._types.Pivot" - }, - "retention_policy": { - "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" - }, - "settings": { - "$ref": "#/components/schemas/transform._types.Settings" - }, - "source": { - "$ref": "#/components/schemas/transform._types.Source" + "docs": { + "description": "The documents you want to retrieve. Required if no index is specified in the request URI.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mget.Operation" + } }, - "sync": { - "$ref": "#/components/schemas/transform._types.SyncContainer" + "ids": { + "description": "The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] } - }, - "required": [ - "dest", - "source" - ] + } }, "examples": { - "PutTransformRequestExample1": { - "summary": "A pivot transform", - "description": "Run `PUT _transform/ecommerce_transform1` to create a transform that uses the pivot method.", - "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" + "MultiGetRequestExample1": { + "summary": "Get documents by ID", + "description": "Run `GET /my-index-000001/_mget`. When you specify an index in the request URI, only the document IDs are required in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" }, - "PutTransformRequestExample2": { - "summary": "A latest transform", - "description": "Run `PUT _transform/ecommerce_transform2` to create a transform that uses the latest method.", - "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"latest\": {\n \"unique_key\": [\n \"customer_id\"\n ],\n \"sort\": \"order_date\"\n },\n \"description\": \"Latest order for each customer\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform2\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n }\n}" + "MultiGetRequestExample2": { + "summary": "Filter source fields", + "description": "Run `GET /_mget`. This request sets `_source` to `false` for document 1 to exclude the source entirely. It retrieves `field3` and `field4` from document 2. It retrieves the `user` field from document 3 but filters out the `user.location` field.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": false\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [ \"field3\", \"field4\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [ \"user\" ],\n \"exclude\": [ \"user.location\" ]\n }\n }\n ]\n}" + }, + "MultiGetRequestExample3": { + "summary": "Get stored fields", + "description": "Run `GET /_mget`. This request retrieves `field1` and `field2` from document 1 and `field3` and `field4` from document 2.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [ \"field1\", \"field2\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [ \"field3\", \"field4\" ]\n }\n ]\n}" + }, + "MultiGetRequestExample4": { + "summary": "Document routing", + "description": "Run `GET /_mget?routing=key1`. If routing is used during indexing, you need to specify the routing value to retrieve documents. This request fetches `test/_doc/2` from the shard corresponding to routing key `key1`. It fetches `test/_doc/1` from the shard corresponding to routing key `key2`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ]\n}" } } } @@ -43037,185 +48841,175 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "PutTransformResponseExample1": { - "description": "A successful response when creating a transform.", - "value": "{\n \"acknowledged\": true\n}" - } + "type": "object", + "properties": { + "docs": { + "description": "The response includes a docs array that contains the documents in the order specified in the request.\nThe structure of the returned documents is similar to that returned by the get API.\nIf there is a failure getting a particular document, the error is included in place of the document.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mget.ResponseItem" + } + } + }, + "required": [ + "docs" + ] } } } } }, - "x-state": "Added in 7.2.0", - "x-api-name" : "put_transform", - "x-namespace": "transform" - }, - "delete": { - "tags": [ - "transform" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /{index}/_mget\n
\n ", + "
\n POST\n /{index}/_mget\n
\n " ], - "summary": "Delete a transform", - "operationId": "transform-delete-transform", - "parameters": [ - { - "in": "path", - "name": "transform_id", - "description": "Identifier for the transform.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - { - "in": "query", - "name": "force", - "description": "If this value is false, the transform must be stopped before it can be deleted. If true, the transform is\ndeleted regardless of its current state.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "delete_dest_index", - "description": "If this value is true, the destination index is deleted together with the transform. If false, the destination\nindex will not be deleted", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "mget", + "x-category": "document management", + "x-metaTags": [ { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "content": "Elasticsearch", + "name": "product_name" } + ] + } + }, + "/_migration/deprecations": { + "get": { + "tags": [ + "migration" ], + "summary": "Get deprecation information", + "description": "Get information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.\n\nTIP: This APIs is designed for indirect use by the Upgrade Assistant.\nYou are strongly recommended to use the Upgrade Assistant.", + "operationId": "migration-deprecations", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "cluster_settings": { + "description": "Cluster-level deprecation warnings.", + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + }, + "index_settings": { + "description": "Index warnings are sectioned off per index and can be filtered using an index-pattern in the query.\nThis section includes warnings for the backing indices of data streams specified in the request path.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + } + }, + "data_streams": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + } + }, + "node_settings": { + "description": "Node-level deprecation warnings.\nSince only a subset of your nodes might incorporate these settings, it is important to read the details section for more information about which nodes are affected.", + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + }, + "ml_settings": { + "description": "Machine learning-related deprecation warnings.", + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + }, + "templates": { + "description": "Template warnings are sectioned off per template and include deprecations for both component templates and\nindex templates.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + } + }, + "ilm_policies": { + "description": "ILM policy warnings are sectioned off per policy.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + } + } + }, + "required": [ + "cluster_settings", + "index_settings", + "data_streams", + "node_settings", + "ml_settings", + "templates", + "ilm_policies" + ] }, "examples": { - "DeleteTransformResponseExample1": { - "description": "A successful response when the transform is deleted.", - "value": "{\n \"acknowledged\": true\n}" + "DeprecationInfoResponseExample1": { + "description": "An abbreviated response from `GET /_migration/deprecations`.\n", + "value": "{\n \"cluster_settings\": [\n {\n \"level\": \"critical\",\n \"message\": \"Cluster name cannot contain ':'\",\n \"url\": \"https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_cluster_name\",\n \"details\": \"This cluster is named [mycompany:logging], which contains the illegal character ':'.\"\n }\n ],\n \"node_settings\": [],\n \"index_settings\": {\n \"logs:apache\": [\n {\n \"level\": \"warning\",\n \"message\": \"Index name cannot contain ':'\",\n \"url\": \"https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_index_name\",\n \"details\": \"This index is named [logs:apache], which contains the illegal character ':'.\"\n }\n ]\n },\n \"ml_settings\": []\n}" } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "delete_transform", - "x-namespace": "transform" - } - }, - "/_transform": { - "get": { - "tags": [ - "transform" + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n GET\n /_migration/deprecations\n
\n " ], - "summary": "Get transforms", - "description": "Get configuration information for transforms.", - "operationId": "transform-get-transform-1", - "parameters": [ - { - "$ref": "#/components/parameters/transform.get_transform-allow_no_match" - }, - { - "$ref": "#/components/parameters/transform.get_transform-from" - }, - { - "$ref": "#/components/parameters/transform.get_transform-size" - }, - { - "$ref": "#/components/parameters/transform.get_transform-exclude_generated" - } + "x-req-auth": [ + "Cluster privileges: `manage`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/transform.get_transform-200" + "x-api": "deprecations.migration", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.5.0", - "x-api-name" : "get_transform", - "x-namespace": "transform" + ] } }, - "/_transform/{transform_id}/_stats": { + "/{index}/_migration/deprecations": { "get": { "tags": [ - "transform" + "migration" ], - "summary": "Get transform stats", - "description": "Get usage information for transforms.", - "operationId": "transform-get-transform-stats", + "summary": "Get deprecation information", + "description": "Get information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.\n\nTIP: This APIs is designed for indirect use by the Upgrade Assistant.\nYou are strongly recommended to use the Upgrade Assistant.", + "operationId": "migration-deprecations-1", "parameters": [ { "in": "path", - "name": "transform_id", - "description": "Identifier for the transform. It can be a transform identifier or a\nwildcard expression. You can get information for all transforms by using\n`_all`, by specifying `*` as the ``, or by omitting the\n``.", + "name": "index", + "description": "Comma-separate list of data streams or indices to check. Wildcard (*) expressions are supported.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/_types.IndexName" }, "style": "simple" - }, - { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no transforms that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf this parameter is false, the request returns a 404 status code when\nthere are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "from", - "description": "Skips the specified number of transforms.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of transforms to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "timeout", - "description": "Controls the time to wait for the stats", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" } ], "responses": { @@ -43226,299 +49020,245 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "transforms": { + "cluster_settings": { + "description": "Cluster-level deprecation warnings.", "type": "array", "items": { - "$ref": "#/components/schemas/transform.get_transform_stats.TransformStats" + "$ref": "#/components/schemas/migration.deprecations.Deprecation" } - } - }, - "required": [ - "count", - "transforms" - ] - }, - "examples": { - "GetTransformStatsResponseExample1": { - "description": "A successful response that contains usage information for a transform.", - "value": "{\n \"count\": 1,\n \"transforms\": [\n {\n \"id\": \"ecommerce-customer-transform\",\n \"state\": \"started\",\n \"node\": {\n \"id\": \"cpTIGMsVQ8Gqwqlxxxxxxx\",\n \"name\": \"my.home\",\n \"ephemeral_id\": \"5-L21nFsQxxxxxxxxxx-xx\",\n \"transport_address\": \"127.0.0.1:9300\",\n \"attributes\": {}\n },\n \"stats\": {\n \"pages_processed\": 78,\n \"documents_processed\": 6027,\n \"documents_indexed\": 68,\n \"documents_deleted\": 22,\n \"delete_time_in_ms\": 214,\n \"trigger_count\": 168,\n \"index_time_in_ms\": 412,\n \"index_total\": 20,\n \"index_failures\": 0,\n \"search_time_in_ms\": 353,\n \"search_total\": 78,\n \"search_failures\": 0,\n \"processing_time_in_ms\": 8,\n \"processing_total\": 78,\n \"exponential_avg_checkpoint_duration_ms\": 97.30637923893185,\n \"exponential_avg_documents_indexed\": 2.2064915040974062,\n \"exponential_avg_documents_processed\": 179.89419945785045\n },\n \"checkpointing\": {\n \"last\": {\n \"checkpoint\": 20,\n \"timestamp_millis\": 1585344558220,\n \"time_upper_bound_millis\": 1585344498220\n },\n \"changes_last_detected_at\": 1585344558219\n },\n \"health\": {\n \"status\": \"green\"\n }\n }\n ]\n}" + }, + "index_settings": { + "description": "Index warnings are sectioned off per index and can be filtered using an index-pattern in the query.\nThis section includes warnings for the backing indices of data streams specified in the request path.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + } + }, + "data_streams": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + } + }, + "node_settings": { + "description": "Node-level deprecation warnings.\nSince only a subset of your nodes might incorporate these settings, it is important to read the details section for more information about which nodes are affected.", + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + }, + "ml_settings": { + "description": "Machine learning-related deprecation warnings.", + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + }, + "templates": { + "description": "Template warnings are sectioned off per template and include deprecations for both component templates and\nindex templates.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + } + }, + "ilm_policies": { + "description": "ILM policy warnings are sectioned off per policy.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations.Deprecation" + } + } + } + }, + "required": [ + "cluster_settings", + "index_settings", + "data_streams", + "node_settings", + "ml_settings", + "templates", + "ilm_policies" + ] + }, + "examples": { + "DeprecationInfoResponseExample1": { + "description": "An abbreviated response from `GET /_migration/deprecations`.\n", + "value": "{\n \"cluster_settings\": [\n {\n \"level\": \"critical\",\n \"message\": \"Cluster name cannot contain ':'\",\n \"url\": \"https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_cluster_name\",\n \"details\": \"This cluster is named [mycompany:logging], which contains the illegal character ':'.\"\n }\n ],\n \"node_settings\": [],\n \"index_settings\": {\n \"logs:apache\": [\n {\n \"level\": \"warning\",\n \"message\": \"Index name cannot contain ':'\",\n \"url\": \"https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_index_name\",\n \"details\": \"This index is named [logs:apache], which contains the illegal character ':'.\"\n }\n ]\n },\n \"ml_settings\": []\n}" } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "get_transform_stats", - "x-namespace": "transform" - } - }, - "/_transform/{transform_id}/_preview": { - "get": { - "tags": [ - "transform" - ], - "summary": "Preview a transform", - "description": "Generates a preview of the results that you will get when you create a transform with the same configuration.\n\nIt returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also\ngenerates a list of mappings and settings for the destination index. These values are determined based on the field\ntypes of the source index and the transform aggregations.", - "operationId": "transform-preview-transform", - "parameters": [ - { - "$ref": "#/components/parameters/transform.preview_transform-transform_id" - }, - { - "$ref": "#/components/parameters/transform.preview_transform-timeout" - } + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n GET\n /{index}/_migration/deprecations\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/transform.preview_transform" - }, - "responses": { - "200": { - "$ref": "#/components/responses/transform.preview_transform-200" - } - }, - "x-state": "Added in 7.2.0", - "x-api-name" : "preview_transform", - "x-namespace": "transform" - }, - "post": { - "tags": [ - "transform" + "x-req-auth": [ + "Cluster privileges: `manage`\n" ], - "summary": "Preview a transform", - "description": "Generates a preview of the results that you will get when you create a transform with the same configuration.\n\nIt returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also\ngenerates a list of mappings and settings for the destination index. These values are determined based on the field\ntypes of the source index and the transform aggregations.", - "operationId": "transform-preview-transform-1", - "parameters": [ - { - "$ref": "#/components/parameters/transform.preview_transform-transform_id" - }, + "x-api": "deprecations.migration", + "x-category": "info", + "x-metaTags": [ { - "$ref": "#/components/parameters/transform.preview_transform-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/transform.preview_transform" - }, - "responses": { - "200": { - "$ref": "#/components/responses/transform.preview_transform-200" + "content": "Elasticsearch", + "name": "product_name" } - }, - "x-state": "Added in 7.2.0", - "x-api-name" : "preview_transform", - "x-namespace": "transform" + ] } }, - "/_transform/_preview": { + "/_migration/system_features": { "get": { "tags": [ - "transform" - ], - "summary": "Preview a transform", - "description": "Generates a preview of the results that you will get when you create a transform with the same configuration.\n\nIt returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also\ngenerates a list of mappings and settings for the destination index. These values are determined based on the field\ntypes of the source index and the transform aggregations.", - "operationId": "transform-preview-transform-2", - "parameters": [ - { - "$ref": "#/components/parameters/transform.preview_transform-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/transform.preview_transform" - }, - "responses": { - "200": { - "$ref": "#/components/responses/transform.preview_transform-200" - } - }, - "x-state": "Added in 7.2.0", - "x-api-name" : "preview_transform", - "x-namespace": "transform" - }, - "post": { - "tags": [ - "transform" - ], - "summary": "Preview a transform", - "description": "Generates a preview of the results that you will get when you create a transform with the same configuration.\n\nIt returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also\ngenerates a list of mappings and settings for the destination index. These values are determined based on the field\ntypes of the source index and the transform aggregations.", - "operationId": "transform-preview-transform-3", - "parameters": [ - { - "$ref": "#/components/parameters/transform.preview_transform-timeout" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/transform.preview_transform" - }, - "responses": { - "200": { - "$ref": "#/components/responses/transform.preview_transform-200" - } - }, - "x-state": "Added in 7.2.0", - "x-api-name" : "preview_transform", - "x-namespace": "transform" - } - }, - "/_transform/{transform_id}/_reset": { - "post": { - "tags": [ - "transform" - ], - "summary": "Reset a transform", - "description": "Before you can reset it, you must stop it; alternatively, use the `force` query parameter.\nIf the destination index was created by the transform, it is deleted.", - "operationId": "transform-reset-transform", - "parameters": [ - { - "in": "path", - "name": "transform_id", - "description": "Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),\nhyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - { - "in": "query", - "name": "force", - "description": "If this value is `true`, the transform is reset regardless of its current state. If it's `false`, the transform\nmust be stopped before it can be reset.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } + "migration" ], + "summary": "Get feature migration information", + "description": "Version upgrades sometimes require changes to how features store configuration information and data in system indices.\nCheck which features need to be migrated and the status of any migrations that are in progress.\n\nTIP: This API is designed for indirect use by the Upgrade Assistant.\nYou are strongly recommended to use the Upgrade Assistant.", + "operationId": "migration-get-feature-upgrade-status", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.get_feature_upgrade_status.MigrationFeature" + } + }, + "migration_status": { + "allOf": [ + { + "$ref": "#/components/schemas/migration.get_feature_upgrade_status.MigrationStatus" + } + ] + } + }, + "required": [ + "features", + "migration_status" + ] }, "examples": { - "ResetTransformResponseExample1": { - "description": "A successful response when the transform is reset.", - "value": "{\n \"acknowledged\": true\n}" + "GetFeatureUpgradeStatusResponseExample1": { + "description": "A successful response from `GET /_migration/system_features`.", + "value": "{\n \"features\" : [\n {\n \"feature_name\" : \"async_search\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"enrich\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"ent_search\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"fleet\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"geoip\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"kibana\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"logstash_management\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"machine_learning\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"searchable_snapshots\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"security\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"synonyms\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"tasks\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"transform\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n },\n {\n \"feature_name\" : \"watcher\",\n \"minimum_index_version\" : \"8100099\",\n \"migration_status\" : \"NO_MIGRATION_NEEDED\",\n \"indices\" : [ ]\n }\n ],\n \"migration_status\" : \"NO_MIGRATION_NEEDED\"\n}" } } } } } }, - "x-state": "Added in 8.1.0", - "x-api-name" : "reset_transform", - "x-namespace": "transform" - } - }, - "/_transform/{transform_id}/_schedule_now": { - "post": { - "tags": [ - "transform" + "x-state": "Generally available; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /_migration/system_features\n
\n " ], - "summary": "Schedule a transform to start now", - "description": "Instantly run a transform to process data.\nIf you run this API, the transform will process the new data instantly,\nwithout waiting for the configured frequency interval. After the API is called,\nthe transform will be processed again at `now + frequency` unless the API\nis called again in the meantime.", - "operationId": "transform-schedule-now-transform", - "parameters": [ - { - "in": "path", - "name": "transform_id", - "description": "Identifier for the transform.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage`\n" + ], + "x-api": "get_feature_upgrade_status.migration", + "x-category": "info", + "x-metaTags": [ { - "in": "query", - "name": "timeout", - "description": "Controls the time to wait for the scheduling to take place", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "content": "Elasticsearch", + "name": "product_name" } + ] + }, + "post": { + "tags": [ + "migration" ], + "summary": "Start the feature migration", + "description": "Version upgrades sometimes require changes to how features store configuration information and data in system indices.\nThis API starts the automatic migration process.\n\nSome functionality might be temporarily unavailable during the migration process.\n\nTIP: The API is designed for indirect use by the Upgrade Assistant. We strongly recommend you use the Upgrade Assistant.", + "operationId": "migration-post-feature-upgrade", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "accepted": { + "type": "boolean" + }, + "features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.post_feature_upgrade.MigrationFeature" + } + }, + "reason": { + "type": "string" + } + }, + "required": [ + "accepted" + ] }, "examples": { - "ScheduleNowTransformResponseExample1": { - "description": "A successful response when the transform is scheduled to run now.", - "value": "{\n \"acknowledged\": true\n}" + "PostFeatureUpgradeResponseExample1": { + "description": "When you run `POST /_migration/system_features` to start the migration process, the response lists the features that will be migrated.\n", + "value": "{\n \"accepted\" : true,\n \"features\" : [\n {\n \"feature_name\" : \"security\"\n }\n ]\n}" } } } } } }, - "x-state": "Added in 8.7.0", - "x-api-name" : "schedule_now_transform", - "x-namespace": "transform" + "x-state": "Generally available; Added in 7.16.0", + "x-variations": [ + "
\n POST\n /_migration/system_features\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage`\n" + ], + "x-api": "post_feature_upgrade.migration", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, - "/_transform/{transform_id}/_start": { + "/_ml/trained_models/{model_id}/deployment/cache/_clear": { "post": { "tags": [ - "transform" + "ml trained model" ], - "summary": "Start a transform", - "description": "When you start a transform, it creates the destination index if it does not already exist. The `number_of_shards` is\nset to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform, it deduces the mapping\ndefinitions for the destination index from the source indices and the transform aggregations. If fields in the\ndestination index are derived from scripts (as in the case of `scripted_metric` or `bucket_script` aggregations),\nthe transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce\nmapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you\nstart the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings\nin a pivot transform.\n\nWhen the transform starts, a series of validations occur to ensure its success. If you deferred validation when you\ncreated the transform, they occur when you start the transform— with the exception of privilege checks. When\nElasticsearch security features are enabled, the transform remembers which roles the user that created it had at the\ntime of creation and uses those same roles. If those roles do not have the required privileges on the source and\ndestination indices, the transform fails when it attempts unauthorized operations.", - "operationId": "transform-start-transform", + "summary": "Clear trained model deployment cache", + "description": "Cache will be cleared on all nodes where the trained model is assigned.\nA trained model deployment may have an inference cache enabled.\nAs requests are handled by each allocated node, their responses may be cached on that individual node.\nCalling this API clears the caches without restarting the deployment.", + "operationId": "ml-clear-trained-model-deployment-cache", "parameters": [ { "in": "path", - "name": "transform_id", - "description": "Identifier for the transform.", + "name": "model_id", + "description": "The unique identifier of the trained model.", "required": true, "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, - { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "from", - "description": "Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" } ], "responses": { @@ -43527,47 +49267,67 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "cleared": { + "type": "boolean" + } + }, + "required": [ + "cleared" + ] }, "examples": { - "StartTransformResponseExample1": { - "description": "A successful response when a transform starts.", - "value": "{\n \"acknowledged\": true\n}" + "MlClearTrainedModelDeploymentCacheResponseExample1": { + "description": "A successful response when clearing the inference cache.", + "value": "{\n \"cleared\": true\n}" } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "start_transform", - "x-namespace": "transform" + "x-state": "Generally available; Added in 8.5.0", + "x-variations": [ + "
\n POST\n /_ml/trained_models/{model_id}/deployment/cache/_clear\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "clear_trained_model_deployment_cache.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_transform/{transform_id}/_stop": { + "/_ml/anomaly_detectors/{job_id}/_close": { "post": { "tags": [ - "transform" + "ml anomaly" ], - "summary": "Stop transforms", - "description": "Stops one or more transforms.", - "operationId": "transform-stop-transform", + "summary": "Close anomaly detection jobs", + "description": "A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.\nWhen you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.\nIf you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.\nWhen a datafeed that has a specified end date stops, it automatically closes its associated job.", + "operationId": "ml-close-job", "parameters": [ { "in": "path", - "name": "transform_id", - "description": "Identifier for the transform. To stop multiple transforms, use a comma-separated list or a wildcard expression.\nTo stop all transforms, use `_all` or `*` as the identifier.", + "name": "job_id", + "description": "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 comma-separated list of jobs, or a wildcard expression. You can close all jobs by using `_all` or by specifying `*` as the job identifier.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", "name": "allow_no_match", - "description": "Specifies what to do when the request: contains wildcard expressions and there are no transforms that match;\ncontains the `_all` string or no identifiers and there are no matches; contains wildcard expressions and there\nare only partial matches.\n\nIf it is true, the API returns a successful acknowledgement message when there are no matches. When there are\nonly partial matches, the API stops the appropriate transforms.\n\nIf it is false, the request returns a 404 status code when there are no matches or only partial matches.", + "description": "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.\nIf `false`, the request returns a 404 status code when there are no matches or only partial matches.", "deprecated": false, "schema": { "type": "boolean" @@ -43577,7 +49337,7 @@ { "in": "query", "name": "force", - "description": "If it is true, the API forcefully stops the transforms.", + "description": "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.\nIf 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.", "deprecated": false, "schema": { "type": "boolean" @@ -43587,70 +49347,99 @@ { "in": "query", "name": "timeout", - "description": "Period to wait for a response when `wait_for_completion` is `true`. If no response is received before the\ntimeout expires, the request returns a timeout exception. However, the request continues processing and\neventually moves the transform to a STOPPED state.", + "description": "Controls the time to wait until a job has closed.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, - { - "in": "query", - "name": "wait_for_checkpoint", - "description": "If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false,\nthe transform stops as soon as possible.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "wait_for_completion", - "description": "If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns\nimmediately and the indexer is stopped asynchronously in the background.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_no_match": { + "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, + "type": "boolean" + }, + "force": { + "description": "Refer to the descriptiion for the `force` query parameter.", + "default": false, + "type": "boolean" + }, + "timeout": { + "description": "Refer to the description for the `timeout` query parameter.", + "default": "30m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } + } + } + } + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "type": "object", + "properties": { + "closed": { + "type": "boolean" + } + }, + "required": [ + "closed" + ] }, "examples": { - "StopTransformResponseExample1": { - "description": "A successful response when a transform stops.", - "value": "{\n \"acknowledged\": true\n}" + "MlCloseJobResponseExample1": { + "description": "A successful response when closing anomaly detection jobs.", + "value": "{\n \"closed\": true\n}" } } } } } }, - "x-state": "Added in 7.5.0", - "x-api-name" : "stop_transform", - "x-namespace": "transform" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/_close\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "close_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_transform/{transform_id}/_update": { - "post": { + "/_ml/calendars/{calendar_id}": { + "get": { "tags": [ - "transform" + "ml anomaly" ], - "summary": "Update a transform", - "description": "Updates certain properties of a transform.\n\nAll updated properties except `description` do not take effect until after the transform starts the next checkpoint,\nthus there is data consistency in each checkpoint. To use this API, you must have `read` and `view_index_metadata`\nprivileges for the source indices. You must also have `index` and `read` privileges for the destination index. When\nElasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the\ntime of update and runs with those privileges.", - "operationId": "transform-update-transform", + "summary": "Get calendar configuration info", + "operationId": "ml-get-calendars-2", "parameters": [ { "in": "path", - "name": "transform_id", - "description": "Identifier for the transform.", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.", "required": true, "deprecated": false, "schema": { @@ -43660,21 +49449,21 @@ }, { "in": "query", - "name": "defer_validation", - "description": "When true, deferrable validations are not run. This behavior may be\ndesired if the source index does not exist until after the transform is\ncreated.", + "name": "from", + "description": "Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier.", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the\ntimeout expires, the request fails and returns an error.", + "name": "size", + "description": "Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" } @@ -43685,51 +49474,18 @@ "schema": { "type": "object", "properties": { - "dest": { - "$ref": "#/components/schemas/transform._types.Destination" - }, - "description": { - "description": "Free text description of the transform.", - "type": "string" - }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "source": { - "$ref": "#/components/schemas/transform._types.Source" - }, - "settings": { - "$ref": "#/components/schemas/transform._types.Settings" - }, - "sync": { - "$ref": "#/components/schemas/transform._types.SyncContainer" - }, - "retention_policy": { - "description": "Defines a retention policy for the transform. Data that meets the defined\ncriteria is deleted from the destination index.", - "oneOf": [ - { - "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" - }, + "page": { + "description": "This object is supported only when you omit the calendar identifier.", + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/ml._types.Page" } ] } } - }, - "examples": { - "UpdateTransformRequestExample1": { - "description": "Run `POST _transform/simple-kibana-ecomm-pivot/_update` to update a transform that uses the pivot method.", - "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" - } } } - }, - "required": true + } }, "responses": { "200": { @@ -43739,104 +49495,195 @@ "schema": { "type": "object", "properties": { - "authorization": { - "$ref": "#/components/schemas/ml._types.TransformAuthorization" + "calendars": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.get_calendars.Calendar" + } }, - "create_time": { + "count": { "type": "number" - }, - "description": { - "type": "string" - }, - "dest": { - "$ref": "#/components/schemas/_global.reindex.Destination" - }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "latest": { - "$ref": "#/components/schemas/transform._types.Latest" - }, - "pivot": { - "$ref": "#/components/schemas/transform._types.Pivot" - }, - "retention_policy": { - "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" - }, - "settings": { - "$ref": "#/components/schemas/transform._types.Settings" - }, - "source": { - "$ref": "#/components/schemas/_global.reindex.Source" - }, - "sync": { - "$ref": "#/components/schemas/transform._types.SyncContainer" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" } }, "required": [ - "create_time", - "description", - "dest", - "id", - "settings", - "source", - "version" + "calendars", + "count" ] - }, - "examples": { - "UpdateTransformResponseExample1": { - "description": "A successful response when creating a transform.", - "value": "{\n \"id\": \"simple-kibana-ecomm-pivot\",\n \"authorization\": {\n \"roles\": [\n \"superuser\"\n ]\n },\n \"version\": \"10.0.0\",\n \"create_time\": 1712951576767,\n \"source\": {\n \"index\": [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"settings\": {},\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" - } } } } } }, - "x-state": "Added in 7.2.0", - "x-api-name" : "update_transform", - "x-namespace": "transform" - } - }, - "/_transform/_upgrade": { - "post": { - "tags": [ - "transform" + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /_ml/calendars/{calendar_id}\n
\n ", + "
\n POST\n /_ml/calendars/{calendar_id}\n
\n " ], - "summary": "Upgrade all transforms", - "description": "Transforms are compatible across minor versions and between supported major versions.\nHowever, over time, the format of transform configuration information may change.\nThis API identifies transforms that have a legacy configuration format and upgrades them to the latest version.\nIt also cleans up the internal data structures that store the transform state and checkpoints.\nThe upgrade does not affect the source and destination indices.\nThe upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged.\n\nIf a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue.\nResolve the issue then re-run the process again.\nA summary is returned when the upgrade is finished.\n\nTo ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster.\nYou may want to perform a recent cluster backup prior to the upgrade.", - "operationId": "transform-upgrade-transforms", + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_calendars.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "ml anomaly" + ], + "summary": "Create a calendar", + "operationId": "ml-put-calendar", + "parameters": [ + { + "in": "path", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_ids": { + "description": "An array of anomaly detection job identifiers.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "description": { + "description": "A description of the calendar.", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "calendar_id": { + "description": "A string that uniquely identifies a calendar.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "description": { + "description": "A description of the calendar.", + "type": "string" + }, + "job_ids": { + "description": "A list of anomaly detection job identifiers or group names.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + } + }, + "required": [ + "calendar_id", + "job_ids" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n PUT\n /_ml/calendars/{calendar_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_calendar.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get calendar configuration info", + "operationId": "ml-get-calendars-3", "parameters": [ + { + "in": "path", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, { "in": "query", - "name": "dry_run", - "description": "When true, the request checks for updates but does not run them.", + "name": "from", + "description": "Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier.", "deprecated": false, "schema": { - "type": "boolean" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and\nreturns an error.", + "name": "size", + "description": "Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "number" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "This object is supported only when you omit the calendar identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } + } + } + } + } + }, "responses": { "200": { "description": "", @@ -43845,200 +49692,459 @@ "schema": { "type": "object", "properties": { - "needs_update": { - "description": "The number of transforms that need to be upgraded.", - "type": "number" - }, - "no_action": { - "description": "The number of transforms that don’t require upgrading.", - "type": "number" + "calendars": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.get_calendars.Calendar" + } }, - "updated": { - "description": "The number of transforms that have been upgraded.", + "count": { "type": "number" } }, "required": [ - "needs_update", - "no_action", - "updated" + "calendars", + "count" ] + } + } + } + } + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /_ml/calendars/{calendar_id}\n
\n ", + "
\n POST\n /_ml/calendars/{calendar_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_calendars.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "ml anomaly" + ], + "summary": "Delete a calendar", + "description": "Remove all scheduled events from a calendar, then delete it.", + "operationId": "ml-delete-calendar", + "parameters": [ + { + "in": "path", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, "examples": { - "UpgradeTransformResponseExample1": { - "description": "A successful response contains a summary when all transforms are upgraded.", - "value": "{\n \"needs_update\": 0,\n \"updated\": 2,\n \"no_action\": 1\n}" + "MlDeleteCalendarResponseExample1": { + "description": "A successful response when deleting a calendar.", + "value": "{\n \"acknowledged\": true\n}" } } } } } }, - "x-state": "Added in 7.16.0", - "x-api-name" : "upgrade_transforms", - "x-namespace": "transform" + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n DELETE\n /_ml/calendars/{calendar_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_calendar.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/{index}/_update/{id}": { - "post": { + "/_ml/calendars/{calendar_id}/events/{event_id}": { + "delete": { "tags": [ - "document" + "ml anomaly" ], - "summary": "Update a document", - "description": "Update a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).", - "operationId": "update", + "summary": "Delete events from a calendar", + "operationId": "ml-delete-calendar-event", "parameters": [ { "in": "path", - "name": "index", - "description": "The name of the target index.\nBy default, the index is created automatically if it doesn't exist.", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "path", - "name": "id", - "description": "A unique identifier for the document to be updated.", + "name": "event_id", + "description": "Identifier for the scheduled event.\nYou can obtain this identifier by using the get calendar events API.", "required": true, "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Id" }, "style": "simple" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "MlDeleteCalendarEventResponseExample1": { + "description": "A successful response when deleting a calendar event.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n DELETE\n /_ml/calendars/{calendar_id}/events/{event_id}\n
\n " + ], + "x-api": "delete_calendar_event.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/calendars/{calendar_id}/jobs/{job_id}": { + "put": { + "tags": [ + "ml anomaly" + ], + "summary": "Add anomaly detection job to calendar", + "operationId": "ml-put-calendar-job", + "parameters": [ { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", + "in": "path", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { - "in": "query", - "name": "include_source_on_error", - "description": "True or false if to include the document source in the error message in case of parsing errors.", + "in": "path", + "name": "job_id", + "description": "An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups.", + "required": true, "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Ids" }, - "style": "form" - }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "calendar_id": { + "description": "A string that uniquely identifies a calendar.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "description": { + "description": "A description of the calendar.", + "type": "string" + }, + "job_ids": { + "description": "A list of anomaly detection job identifiers or group names.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + } + }, + "required": [ + "calendar_id", + "job_ids" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n PUT\n /_ml/calendars/{calendar_id}/jobs/{job_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_calendar_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "lang", - "description": "The script language.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "ml anomaly" + ], + "summary": "Delete anomaly jobs from a calendar", + "operationId": "ml-delete-calendar-job", + "parameters": [ { - "in": "query", - "name": "refresh", - "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', it does nothing with refreshes.", + "in": "path", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Refresh" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { - "in": "query", - "name": "require_alias", - "description": "If `true`, the destination must be an index alias.", + "in": "path", + "name": "job_id", + "description": "An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a\ncomma-separated list of jobs or groups.", + "required": true, "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Ids" }, - "style": "form" - }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "calendar_id": { + "description": "A string that uniquely identifies a calendar.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "description": { + "description": "A description of the calendar.", + "type": "string" + }, + "job_ids": { + "description": "A list of anomaly detection job identifiers or group names.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + } + }, + "required": [ + "calendar_id", + "job_ids" + ] + }, + "examples": { + "MlDeleteCalendarJobResponseExample1": { + "description": "A successful response when deleting an anomaly detection job from a calendar.", + "value": "{\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": []\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n DELETE\n /_ml/calendars/{calendar_id}/jobs/{job_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_calendar_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "retry_on_conflict", - "description": "The number of times the operation should be retried when a conflict occurs.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/data_frame/analytics/{id}": { + "get": { + "tags": [ + "ml data frame" + ], + "summary": "Get data frame analytics job configuration info", + "description": "You can get information for multiple data frame analytics jobs in a single\nAPI request by using a comma-separated list of data frame analytics jobs or a\nwildcard expression.", + "operationId": "ml-get-data-frame-analytics", + "parameters": [ { - "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job. If you do not specify this\noption, the API returns information for the first hundred data frame\nanalytics jobs.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Routing" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "timeout", - "description": "The period to wait for the following operations: dynamic mapping updates and waiting for active shards.\nElasticsearch waits for at least the timeout period before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value returns an empty data_frame_analytics array when there\nare no matches and the subset of results when there are partial matches.\nIf this parameter is `false`, the request returns a 404 status code when\nthere are no matches or only partial matches.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "wait_for_active_shards", - "description": "The number of copies of each shard that must be active before proceeding with the operation.\nSet to 'all' or any positive integer up to the total number of shards in the index (`number_of_replicas`+1).\nThe default value of `1` means it waits for each primary shard to be active.", + "name": "from", + "description": "Skips the specified number of data frame analytics jobs.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "_source", - "description": "If `false`, source retrieval is turned off.\nYou can also specify a comma-separated list of the fields you want to retrieve.", + "name": "size", + "description": "Specifies the maximum number of data frame analytics jobs to obtain.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "_source_excludes", - "description": "The source fields you want to exclude.", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Fields" + "type": "boolean" }, "style": "form" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "data_frame_analytics": { + "description": "An array of data frame analytics job resources, which are sorted by the id value in ascending order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSummary" + } + } + }, + "required": [ + "count", + "data_frame_analytics" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "_source_includes", - "description": "The source fields you want to retrieve.", + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "ml data frame" + ], + "summary": "Create a data frame analytics job", + "description": "This API creates a data frame analytics job that performs an analysis on the\nsource indices and stores the outcome in a destination index.\nBy default, the query used in the source configuration is `{\"match_all\": {}}`.\n\nIf the destination index does not exist, it is created automatically when you start the job.\n\nIf you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.", + "operationId": "ml-put-data-frame-analytics", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Fields" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" } ], "requestBody": { @@ -44047,89 +50153,91 @@ "schema": { "type": "object", "properties": { - "detect_noop": { - "description": "If `true`, the `result` in the response is set to `noop` (no operation) when there are no changes to the document.", + "allow_lazy_start": { + "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node. If\nset to `false` and a machine learning node with capacity to run the job\ncannot be immediately found, the API returns an error. If set to `true`,\nthe API does not return an error; the job waits in the `starting` state\nuntil sufficient machine learning node capacity is available. This\nbehavior is also affected by the cluster-wide\n`xpack.ml.max_lazy_ml_nodes` setting.", + "default": false, "type": "boolean" }, - "doc": { - "description": "A partial update to an existing document.\nIf both `doc` and `script` are specified, `doc` is ignored.", - "type": "object" + "analysis": { + "description": "The analysis configuration, which contains the information necessary to\nperform one of the following types of analysis: classification, outlier\ndetection, or regression.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] }, - "doc_as_upsert": { - "description": "If `true`, use the contents of 'doc' as the value of 'upsert'.\nNOTE: Using ingest pipelines with `doc_as_upsert` is not supported.", - "type": "boolean" + "analyzed_fields": { + "description": "Specifies `includes` and/or `excludes` patterns to select which fields\nwill be included in the analysis. The patterns specified in `excludes`\nare applied last, therefore `excludes` takes precedence. In other words,\nif the same field is specified in both `includes` and `excludes`, then\nthe field will not be included in the analysis. If `analyzed_fields` is\nnot set, only the relevant fields will be included. For example, all the\nnumeric fields for outlier detection.\nThe supported fields vary for each type of analysis. Outlier detection\nrequires numeric or `boolean` data to analyze. The algorithms don’t\nsupport missing values therefore fields that have data types other than\nnumeric or boolean are ignored. Documents where included fields contain\nmissing values, null values, or an array are also ignored. Therefore the\n`dest` index may contain documents that don’t have an outlier score.\nRegression supports fields that are numeric, `boolean`, `text`,\n`keyword`, and `ip` data types. It is also tolerant of missing values.\nFields that are supported are included in the analysis, other fields are\nignored. Documents where included fields contain an array with two or\nmore values are also ignored. Documents in the `dest` index that don’t\ncontain a results field are not included in the regression analysis.\nClassification supports fields that are numeric, `boolean`, `text`,\n`keyword`, and `ip` data types. It is also tolerant of missing values.\nFields that are supported are included in the analysis, other fields are\nignored. Documents where included fields contain an array with two or\nmore values are also ignored. Documents in the `dest` index that don’t\ncontain a results field are not included in the classification analysis.\nClassification analysis can be improved by mapping ordinal variable\nvalues to a single number. For example, in case of age ranges, you can\nmodel the values as `0-14 = 0`, `15-24 = 1`, `25-34 = 2`, and so on.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] }, - "script": { - "$ref": "#/components/schemas/_types.Script" + "description": { + "description": "A description of the job.", + "type": "string" }, - "scripted_upsert": { - "description": "If `true`, run the script whether or not the document exists.", - "type": "boolean" + "dest": { + "description": "The destination configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" + } + ] }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" + "max_num_threads": { + "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, + "type": "number" }, - "upsert": { - "description": "If the document does not already exist, the contents of 'upsert' are inserted as a new document.\nIf the document exists, the 'script' is run.", - "type": "object" + "_meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "model_memory_limit": { + "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try\nto create data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", + "type": "string" + }, + "source": { + "description": "The configuration of how to source the analysis data.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] + }, + "headers": { + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.HttpHeaders" + } + ] + }, + "version": { + "x-state": "Generally available; Added in 7.16.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] } - } + }, + "required": [ + "analysis", + "dest", + "source" + ] }, "examples": { - "UpdateRequestExample1": { - "summary": "Update a counter with a script", - "description": "Run `POST test/_update/1` to increment a counter by using a script.", - "value": "{\n \"script\" : {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\" : {\n \"count\" : 4\n }\n }\n}" - }, - "UpdateRequestExample10": { - "summary": "Scripted upsert", - "description": "Run `POST test/_update/1` to perform a scripted upsert. When `scripted_upsert` is `true`, the script runs whether or not the document exists.\n", - "value": "{\n \"scripted_upsert\": true,\n \"script\": {\n \"source\": \"\"\"\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n \"\"\",\n \"params\": {\n \"count\": 4\n }\n },\n \"upsert\": {}\n}" - }, - "UpdateRequestExample11": { - "summary": "Doc as upsert", - "description": "Run `POST test/_update/1` to perform a doc as upsert. Instead of sending a partial `doc` plus an `upsert` doc, you can set `doc_as_upsert` to `true` to use the contents of `doc` as the `upsert` value.\n", - "value": "{\n \"doc\": {\n \"name\": \"new_name\"\n },\n \"doc_as_upsert\": true\n}" - }, - "UpdateRequestExample2": { - "summary": "Add a tag with a script", - "description": "Run `POST test/_update/1` to use a script to add a tag to a list of tags. In this example, it is just a list, so the tag is added even it exists.\n", - "value": "{\n \"script\": {\n \"source\": \"ctx._source.tags.add(params.tag)\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"blue\"\n }\n }\n}" - }, - "UpdateRequestExample3": { - "summary": "Remove a tag with a script", - "description": "Run `POST test/_update/1` to use a script to remove a tag from a list of tags. The Painless function to remove a tag takes the array index of the element you want to remove. To avoid a possible runtime error, you first need to make sure the tag exists. If the list contains duplicates of the tag, this script just removes one occurrence.\n", - "value": "{\n \"script\": {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"blue\"\n }\n }\n}" - }, - "UpdateRequestExample4": { - "summary": "Add fields with a script", - "description": "Run `POST test/_update/1` to use a script to add a field `new_field` to the document.\n", - "value": "{\n \"script\" : \"ctx._source.new_field = 'value_of_new_field'\"\n}" - }, - "UpdateRequestExample5": { - "summary": "Remove fields with a script", - "description": "Run `POST test/_update/1` to use a script to remove a field `new_field` from the document.\n", - "value": "{\n \"script\" : \"ctx._source.remove('new_field')\"\n}" - }, - "UpdateRequestExample6": { - "summary": "Remove subfields with a script", - "description": "Run `POST test/_update/1` to use a script to remove a subfield from an object field.\n", - "value": "{\n \"script\": \"ctx._source['my-object'].remove('my-subfield')\"\n}" - }, - "UpdateRequestExample7": { - "summary": "Change the operation with a script", - "description": "Run `POST test/_update/1` to change the operation that runs from within the script. For example, this request deletes the document if the `tags` field contains `green`, otherwise it does nothing (`noop`).\n", - "value": "{\n \"script\": {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"green\"\n }\n }\n}" - }, - "UpdateRequestExample8": { - "summary": "Update part of a document", - "description": "Run `POST test/_update/1` to do a partial update that adds a new field to the existing document.\n", - "value": "{\n \"doc\": {\n \"name\": \"new_name\"\n }\n}" - }, - "UpdateRequestExample9": { - "summary": "Upsert", - "description": "Run `POST test/_update/1` to perfom an upsert. If the document does not already exist, the contents of the upsert element are inserted as a new document. If the document exists, the script is run.\n", - "value": "{\n \"script\": {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\": {\n \"count\": 4\n }\n },\n \"upsert\": {\n \"counter\": 1\n }\n}" + "MlPutDataFrameAnalyticsExample1": { + "description": "An example body for a `PUT _ml/data_frame/analytics/model-flight-delays-pre` request.", + "value": "{\n \"source\": {\n \"index\": [\n \"kibana_sample_data_flights\"\n ],\n \"query\": {\n \"range\": {\n \"DistanceKilometers\": {\n \"gt\": 0\n }\n }\n },\n \"_source\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightDelay\",\n \"FlightDelayType\"\n ]\n }\n },\n \"dest\": {\n \"index\": \"df-flight-delays\",\n \"results_field\": \"ml-results\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"FlightDelayMin\",\n \"training_percent\": 90\n }\n },\n \"analyzed_fields\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightNum\"\n ]\n },\n \"model_memory_limit\": \"100mb\"\n}" } } } @@ -44142,66 +50250,139 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_global.update.UpdateWriteResponseBase" - }, - "examples": { - "UpdateResponseExample1": { - "summary": "Detect noop updates", - "description": "By default updates that don't change anything detect that they don't change anything and return `\"result\": \"noop\"`.\n", - "value": "{\n \"_shards\": {\n \"total\": 0,\n \"successful\": 0,\n \"failed\": 0\n },\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"_primary_term\": 1,\n \"_seq_no\": 1,\n \"result\": \"noop\"\n}" - } + "type": "object", + "properties": { + "authorization": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsAuthorization" + } + ] + }, + "allow_lazy_start": { + "type": "boolean" + }, + "analysis": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] + }, + "analyzed_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] + }, + "create_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "description": { + "type": "string" + }, + "dest": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "max_num_threads": { + "type": "number" + }, + "_meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "model_memory_limit": { + "type": "string" + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + } + }, + "required": [ + "allow_lazy_start", + "analysis", + "create_time", + "dest", + "id", + "max_num_threads", + "model_memory_limit", + "source", + "version" + ] } } } } }, - "x-api-name": "update" - } - }, - "/{index}/_update_by_query": { - "post": { + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n PUT\n /_ml/data_frame/analytics/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `create_index`,`index`,`manage`,`read`,`view_index_metadata`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "delete": { "tags": [ - "document" + "ml data frame" ], - "summary": "Update documents", - "description": "Updates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\n\n**Update the document source**\n\nUpdate by query supports scripts to update the document source.\nAs with the update API, you can set `ctx.op` to change the operation that is performed.\n\nSet `ctx.op = \"noop\"` if your script decides that it doesn't have to make any changes.\nThe update by query operation skips updating the document and increments the `noop` counter.\n\nSet `ctx.op = \"delete\"` if your script decides that the document should be deleted.\nThe update by query operation deletes the document and increments the `deleted` counter.\n\nUpdate by query supports only `index`, `noop`, and `delete`.\nSetting `ctx.op` to anything else is an error.\nSetting any other field in `ctx` is an error.\nThis API enables you to only modify the source of matching documents; you cannot move them.", - "operationId": "update-by-query", + "summary": "Delete a data frame analytics job", + "operationId": "ml-delete-data-frame-analytics", "parameters": [ { "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", + "name": "id", + "description": "Identifier for the data frame analytics job.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Indices" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" }, { "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "analyzer", - "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "analyze_wildcard", - "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "name": "force", + "description": "If `true`, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job.", "deprecated": false, "schema": { "type": "boolean" @@ -44210,58 +50391,74 @@ }, { "in": "query", - "name": "conflicts", - "description": "The preferred behavior when update by query hits version conflicts: `abort` or `proceed`.\n\nSupported values include:\n - `abort`: Stop reindexing if there are conflicts.\n - `proceed`: Continue reindexing even if there are conflicts.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Conflicts" - }, - "style": "form" - }, - { - "in": "query", - "name": "default_operator", - "description": "The default operator for query string query: `AND` or `OR`.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "style": "form" - }, - { - "in": "query", - "name": "df", - "description": "The field to use as default where no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "name": "timeout", + "description": "The time to wait for the job to be deleted.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "MlDeleteDataFrameAnalyticsResponseExample1": { + "description": "A successful response when deleting a data frame analytics job.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n DELETE\n /_ml/data_frame/analytics/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/datafeeds/{datafeed_id}": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get datafeeds configuration info", + "description": "You can get information for multiple datafeeds in a single API request by\nusing a comma-separated list of datafeeds or a wildcard expression. You can\nget information for all datafeeds by using `_all`, by specifying `*` as the\n``, or by omitting the ``.\nThis API returns a maximum of 10,000 datafeeds.", + "operationId": "ml-get-datafeeds", + "parameters": [ { - "in": "query", - "name": "from", - "description": "Skips the specified number of documents.", + "in": "path", + "name": "datafeed_id", + "description": "Identifier for the datafeed. It can be a datafeed identifier or a\nwildcard expression. If you do not specify one of these options, the API\nreturns information about all datafeeds.", + "required": true, "deprecated": false, "schema": { - "type": "number" + "$ref": "#/components/schemas/_types.Ids" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no datafeeds that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `datafeeds` array\nwhen there are no matches and the subset of results when there are\npartial matches. If this parameter is `false`, the request returns a\n`404` status code when there are no matches or only partial matches.", "deprecated": false, "schema": { "type": "boolean" @@ -44270,59 +50467,102 @@ }, { "in": "query", - "name": "lenient", - "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" - }, + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "datafeeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Datafeed" + } + } + }, + "required": [ + "count", + "datafeeds" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/datafeeds/{datafeed_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_datafeeds.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "max_docs", - "description": "The maximum number of documents to process.\nIt defaults to all documents.\nWhen set to a value less then or equal to `scroll_size` then a scroll will not be used to retrieve the results for the operation.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "ml anomaly" + ], + "summary": "Create a datafeed", + "description": "Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.\nYou can associate only one datafeed with each anomaly detection job.\nThe datafeed contains a query that runs at a defined interval (`frequency`).\nIf you are concerned about delayed data, you can add a delay (`query_delay') at each interval.\nBy default, the datafeed uses the following query: `{\"match_all\": {\"boost\": 1}}`.\n\nWhen Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had\nat the time of creation and runs the query using those same roles. If you provide secondary authorization headers,\nthose credentials are used instead.\nYou must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed\ndirectly to the `.ml-config` index. Do not give users `write` privileges on the `.ml-config` index.", + "operationId": "ml-put-datafeed", + "parameters": [ { - "in": "query", - "name": "pipeline", - "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", + "in": "path", + "name": "datafeed_id", + "description": "A numerical character string that uniquely identifies the datafeed.\nThis identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.\nIt must start and end with alphanumeric characters.", + "required": true, "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "name": "allow_no_indices", + "description": "If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the `_all`\nstring or when no indices are specified.", "deprecated": false, "schema": { - "type": "string" + "type": "boolean" }, "style": "form" }, { "in": "query", - "name": "q", - "description": "A query in the Lucene query string syntax.", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.", "deprecated": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, { "in": "query", - "name": "refresh", - "description": "If `true`, Elasticsearch refreshes affected shards to make the operation visible to search after the request completes.\nThis is different than the update API's `refresh` parameter, which causes just the shard that received the request to be refreshed.", - "deprecated": false, + "name": "ignore_throttled", + "description": "If true, concrete, expanded, or aliased indices are ignored when frozen.", + "deprecated": true, "schema": { "type": "boolean" }, @@ -44330,114 +50570,359 @@ }, { "in": "query", - "name": "request_cache", - "description": "If `true`, the request cache is used for this request.\nIt defaults to the index-level setting.", + "name": "ignore_unavailable", + "description": "If true, unavailable indices (missing or closed) are ignored.", "deprecated": false, "schema": { "type": "boolean" }, "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "description": "If set, the datafeed performs aggregation searches.\nSupport for aggregations is limited and should be used only with low cardinality data.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "chunking_config": { + "description": "Datafeeds might be required to search over long time periods, for several months or years.\nThis search is split into time chunks in order to ensure the load on Elasticsearch is managed.\nChunking configuration controls how the size of these time chunks are calculated;\nit is an advanced configuration option.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ChunkingConfig" + } + ] + }, + "delayed_data_check_config": { + "description": "Specifies whether the datafeed checks for missing data and the size of the window.\nThe datafeed can optionally search over indices that have already been read in an effort to determine whether\nany data has subsequently been added to the index. If missing data is found, it is a good indication that the\n`query_delay` is set too low and the data is being indexed after the datafeed has passed that moment in time.\nThis check runs only on real-time datafeeds.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" + } + ] + }, + "frequency": { + "description": "The interval at which scheduled queries are made while the datafeed runs in real time.\nThe default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible\nfraction of the bucket span. When `frequency` is shorter than the bucket span, interim results for the last\n(partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses\naggregations, this value must be divisible by the interval of the date histogram aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "indices": { + "description": "An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the master\nnodes and the machine learning nodes must have the `remote_cluster_client` role.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "indices_options": { + "description": "Specifies index expansion options that are used during search", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndicesOptions" + } + ] + }, + "job_id": { + "description": "Identifier for the anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "max_empty_searches": { + "description": "If a real-time datafeed has never seen any data (including during any initial training period), it automatically\nstops and closes the associated job after this many real-time searches return no documents. In other words,\nit stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no\nend time that sees no data remains started until it is explicitly stopped. By default, it is not set.", + "type": "number" + }, + "query": { + "description": "The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an\nElasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this\nobject is passed verbatim to Elasticsearch.", + "default": "{\"match_all\": {\"boost\": 1}}", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "query_delay": { + "description": "The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might\nnot be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default\nvalue is randomly selected between `60s` and `120s`. This randomness improves the query performance\nwhen there are multiple jobs running on the same node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "runtime_mappings": { + "description": "Specifies runtime fields for the datafeed search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "script_fields": { + "description": "Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.\nThe detector configuration objects in a job can contain functions that use these script fields.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "scroll_size": { + "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.\nThe maximum value is the value of `index.max_result_window`, which is 10,000 by default.", + "default": 1000.0, + "type": "number" + }, + "headers": { + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.HttpHeaders" + } + ] + } + } + }, + "examples": { + "MlPutDatafeedExample1": { + "description": "An example body for a `PUT _ml/datafeeds/datafeed-test-job?pretty` request.", + "value": "{\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"job_id\": \"test-job\"\n}" + } + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "authorization": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedAuthorization" + } + ] + }, + "chunking_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ChunkingConfig" + } + ] + }, + "delayed_data_check_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" + } + ] + }, + "datafeed_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "frequency": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "indices": { + "type": "array", + "items": { + "type": "string" + } + }, + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "indices_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndicesOptions" + } + ] + }, + "max_empty_searches": { + "type": "number" + }, + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "query_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "runtime_mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "script_fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "scroll_size": { + "type": "number" + } + }, + "required": [ + "chunking_config", + "datafeed_id", + "indices", + "job_id", + "query", + "query_delay", + "scroll_size" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n PUT\n /_ml/datafeeds/{datafeed_id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "requests_per_second", - "description": "The throttle for this request in sub-requests per second.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - { - "in": "query", - "name": "scroll", - "description": "The period to retain the search context for scrolling.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "scroll_size", - "description": "The size of the scroll request that powers the operation.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - { - "in": "query", - "name": "search_timeout", - "description": "An explicit timeout for each search request.\nBy default, there is no timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "ml anomaly" + ], + "summary": "Delete a datafeed", + "operationId": "ml-delete-datafeed", + "parameters": [ { - "in": "query", - "name": "search_type", - "description": "The type of the search operation. Available options include `query_then_fetch` and `dfs_query_then_fetch`.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", + "in": "path", + "name": "datafeed_id", + "description": "A numerical character string that uniquely identifies the datafeed. This\nidentifier can contain lowercase alphanumeric characters (a-z and 0-9),\nhyphens, and underscores. It must start and end with alphanumeric\ncharacters.", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.SearchType" + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "slices", - "description": "The number of slices this task should be divided into.", + "name": "force", + "description": "Use to forcefully delete a started datafeed; this method is quicker than\nstopping and deleting the datafeed.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Slices" + "type": "boolean" }, "style": "form" - }, - { - "in": "query", - "name": "sort", - "description": "A comma-separated list of : pairs.", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "type": "string" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "MlDeleteDatafeedResponseExample1": { + "description": "A successful response when deleting a datafeed.", + "value": "{\n \"acknowledged\": true\n}" + } + } } - }, - "style": "form" - }, + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n DELETE\n /_ml/datafeeds/{datafeed_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "stats", - "description": "The specific `tag` of the request for logging and statistical purposes.", + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/_delete_expired_data/{job_id}": { + "delete": { + "tags": [ + "ml anomaly" + ], + "summary": "Delete expired ML data", + "description": "Delete all job results, model snapshots and forecast data that have exceeded\ntheir retention days period. Machine learning state documents that are not\nassociated with any job are also deleted.\nYou can limit the request to a single or set of anomaly detection jobs by\nusing a job identifier, a group name, a comma-separated list of jobs, or a\nwildcard expression. You can delete expired data for all anomaly detection\njobs by using `_all`, by specifying `*` as the ``, or by omitting the\n``.", + "operationId": "ml-delete-expired-data", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for an anomaly detection job. It can be a job identifier, a\ngroup name, or a wildcard expression.", + "required": true, "deprecated": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.Id" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "terminate_after", - "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", + "name": "requests_per_second", + "description": "The desired requests per second for the deletion processes. The default\nbehavior is no throttling.", "deprecated": false, "schema": { "type": "number" @@ -44447,50 +50932,107 @@ { "in": "query", "name": "timeout", - "description": "The period each update request waits for the following operations: dynamic mapping updates, waiting for active shards.\nBy default, it is one minute.\nThis guarantees Elasticsearch waits for at least the timeout before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "description": "How long can the underlying delete processes run until they are canceled.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - }, - { - "in": "query", - "name": "version", - "description": "If `true`, returns the document version as part of a hit.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "requests_per_second": { + "description": "The desired requests per second for the deletion processes. The default\nbehavior is no throttling.", + "type": "number" + }, + "timeout": { + "description": "How long can the underlying delete processes run until they are canceled.", + "default": "8h", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean" + } + }, + "required": [ + "deleted" + ] + }, + "examples": { + "MlDeleteExpiredDataResponseExample1": { + "description": "A successful response when deleting expired and unused anomaly detection data.", + "value": "{\n \"deleted\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n DELETE\n /_ml/_delete_expired_data/{job_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_expired_data.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "in": "query", - "name": "version_type", - "description": "Should the document increment the version number (internal) on hit or not (reindex)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/_delete_expired_data": { + "delete": { + "tags": [ + "ml anomaly" + ], + "summary": "Delete expired ML data", + "description": "Delete all job results, model snapshots and forecast data that have exceeded\ntheir retention days period. Machine learning state documents that are not\nassociated with any job are also deleted.\nYou can limit the request to a single or set of anomaly detection jobs by\nusing a job identifier, a group name, a comma-separated list of jobs, or a\nwildcard expression. You can delete expired data for all anomaly detection\njobs by using `_all`, by specifying `*` as the ``, or by omitting the\n``.", + "operationId": "ml-delete-expired-data-1", + "parameters": [ { "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe `timeout` parameter controls how long each write request waits for unavailable shards to become available.\nBoth work exactly the way they work in the bulk API.", + "name": "requests_per_second", + "description": "The desired requests per second for the deletion processes. The default\nbehavior is no throttling.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" + "type": "number" }, "style": "form" }, { "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request blocks until the operation is complete.\nIf `false`, Elasticsearch performs some preflight checks, launches the request, and returns a task ID that you can use to cancel or get the status of the task.\nElasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.", + "name": "timeout", + "description": "How long can the underlying delete processes run until they are canceled.", "deprecated": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/_types.Duration" }, "style": "form" } @@ -44501,45 +51043,20 @@ "schema": { "type": "object", "properties": { - "max_docs": { - "description": "The maximum number of documents to update.", + "requests_per_second": { + "description": "The desired requests per second for the deletion processes. The default\nbehavior is no throttling.", "type": "number" }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "slice": { - "$ref": "#/components/schemas/_types.SlicedScroll" - }, - "conflicts": { - "$ref": "#/components/schemas/_types.Conflicts" + "timeout": { + "description": "How long can the underlying delete processes run until they are canceled.", + "default": "8h", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] } } - }, - "examples": { - "UpdateByQueryRequestExample1": { - "summary": "Update selected documents", - "description": "Run `POST my-index-000001/_update_by_query?conflicts=proceed` to update documents that match a query.\n", - "value": "{\n \"query\": { \n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" - }, - "UpdateByQueryRequestExample2": { - "summary": "Update the document source", - "description": "Run `POST my-index-000001/_update_by_query` with a script to update the document source. It increments the `count` field for all documents with a `user.id` of `kimchy` in `my-index-000001`.\n", - "value": "{\n \"script\": {\n \"source\": \"ctx._source.count++\",\n \"lang\": \"painless\"\n },\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" - }, - "UpdateByQueryRequestExample3": { - "summary": "Slice manually", - "description": "Run `POST my-index-000001/_update_by_query` to slice an update by query manually. Provide a slice ID and total number of slices to each request.\n", - "value": "{\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}" - }, - "UpdateByQueryRequestExample4": { - "summary": "Slice automatically", - "description": "Run `POST my-index-000001/_update_by_query?refresh&slices=5` to use automatic slicing. It automatically parallelizes using sliced scroll to slice on `_id`.\n", - "value": "{\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}" - } } } } @@ -44552,100 +51069,75 @@ "schema": { "type": "object", "properties": { - "batches": { - "description": "The number of scroll responses pulled back by the update by query.", - "type": "number" - }, - "failures": { - "description": "Array of failures if there were any unrecoverable errors during the process.\nIf this is non-empty then the request ended because of those failures.\nUpdate by query is implemented using batches.\nAny failure causes the entire process to end, but all failures in the current batch are collected into the array.\nYou can use the `conflicts` option to prevent reindex from ending when version conflicts occur.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.BulkIndexByScrollFailure" - } - }, - "noops": { - "description": "The number of documents that were ignored because the script used for the update by query returned a noop value for `ctx.op`.", - "type": "number" - }, "deleted": { - "description": "The number of documents that were successfully deleted.", - "type": "number" - }, - "requests_per_second": { - "description": "The number of requests per second effectively run during the update by query.", - "type": "number" - }, - "retries": { - "$ref": "#/components/schemas/_types.Retries" - }, - "task": { - "$ref": "#/components/schemas/_types.TaskId" - }, - "timed_out": { - "description": "If true, some requests timed out during the update by query.", "type": "boolean" - }, - "took": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total": { - "description": "The number of documents that were successfully processed.", - "type": "number" - }, - "updated": { - "description": "The number of documents that were successfully updated.", - "type": "number" - }, - "version_conflicts": { - "description": "The number of version conflicts that the update by query hit.", - "type": "number" - }, - "throttled": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttled_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "throttled_until": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttled_until_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } + }, + "required": [ + "deleted" + ] + }, + "examples": { + "MlDeleteExpiredDataResponseExample1": { + "description": "A successful response when deleting expired and unused anomaly detection data.", + "value": "{\n \"deleted\": true\n}" } } } } } }, - "x-state": "Added in 2.4.0", - "x-api-name": "update_by_query" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n DELETE\n /_ml/_delete_expired_data\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_expired_data.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_update_by_query/{task_id}/_rethrottle": { - "post": { + "/_ml/filters/{filter_id}": { + "get": { "tags": [ - "document" + "ml anomaly" ], - "summary": "Throttle an update by query operation", - "description": "Change the number of requests per second for a particular update by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", - "operationId": "update-by-query-rethrottle", + "summary": "Get filters", + "description": "You can get a single filter or all filters.", + "operationId": "ml-get-filters-1", "parameters": [ { "in": "path", - "name": "task_id", - "description": "The ID for the task.", + "name": "filter_id", + "description": "A string that uniquely identifies a filter.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_types.Ids" }, "style": "simple" }, { "in": "query", - "name": "requests_per_second", - "description": "The throttle for this request in sub-requests per second.\nTo turn off throttling, set it to `-1`.", + "name": "from", + "description": "Skips the specified number of filters.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of filters to obtain.", "deprecated": false, "schema": { "type": "number" @@ -44661,231 +51153,90 @@ "schema": { "type": "object", "properties": { - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.update_by_query_rethrottle.UpdateByQueryRethrottleNode" + "count": { + "type": "number" + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Filter" } } }, "required": [ - "nodes" + "count", + "filters" ] } } } } }, - "x-state": "Added in 6.5.0", - "x-api-name": "update_by_query_rethrottle" - } - }, - "/_watcher/watch/{watch_id}/_ack": { - "put": { - "tags": [ - "watcher" + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/filters/{filter_id}\n
\n " ], - "summary": "Acknowledge a watch", - "description": "Acknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).", - "operationId": "watcher-ack-watch", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.ack_watch-watch_id" - } + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.ack_watch-200" + "x-api": "get_filters.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-api-name" : "ack_watch", - "x-namespace": "watcher" + ] }, - "post": { + "put": { "tags": [ - "watcher" + "ml anomaly" ], - "summary": "Acknowledge a watch", - "description": "Acknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).", - "operationId": "watcher-ack-watch-1", + "summary": "Create a filter", + "description": "A filter contains a list of strings. It can be used by one or more anomaly detection jobs.\nSpecifically, filters are referenced in the `custom_rules` property of detector configuration objects.", + "operationId": "ml-put-filter", "parameters": [ { - "$ref": "#/components/parameters/watcher.ack_watch-watch_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.ack_watch-200" - } - }, - "x-api-name" : "ack_watch", - "x-namespace": "watcher" - } - }, - "/_watcher/watch/{watch_id}/_ack/{action_id}": { - "put": { - "tags": [ - "watcher" - ], - "summary": "Acknowledge a watch", - "description": "Acknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).", - "operationId": "watcher-ack-watch-2", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.ack_watch-watch_id" - }, - { - "$ref": "#/components/parameters/watcher.ack_watch-action_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.ack_watch-200" - } - }, - "x-api-name" : "ack_watch", - "x-namespace": "watcher" - }, - "post": { - "tags": [ - "watcher" - ], - "summary": "Acknowledge a watch", - "description": "Acknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).", - "operationId": "watcher-ack-watch-3", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.ack_watch-watch_id" - }, - { - "$ref": "#/components/parameters/watcher.ack_watch-action_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.ack_watch-200" - } - }, - "x-api-name" : "ack_watch", - "x-namespace": "watcher" - } - }, - "/_watcher/watch/{watch_id}/_activate": { - "put": { - "tags": [ - "watcher" - ], - "summary": "Activate a watch", - "description": "A watch can be either active or inactive.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works" - }, - "operationId": "watcher-activate-watch", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.activate_watch-watch_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.activate_watch-200" - } - }, - "x-api-name" : "activate_watch", - "x-namespace": "watcher" - }, - "post": { - "tags": [ - "watcher" - ], - "summary": "Activate a watch", - "description": "A watch can be either active or inactive.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works" - }, - "operationId": "watcher-activate-watch-1", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.activate_watch-watch_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.activate_watch-200" - } - }, - "x-api-name" : "activate_watch", - "x-namespace": "watcher" - } - }, - "/_watcher/watch/{watch_id}/_deactivate": { - "put": { - "tags": [ - "watcher" - ], - "summary": "Deactivate a watch", - "description": "A watch can be either active or inactive.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works" - }, - "operationId": "watcher-deactivate-watch", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.deactivate_watch-watch_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.deactivate_watch-200" - } - }, - "x-api-name" : "deactivate_watch", - "x-namespace": "watcher" - }, - "post": { - "tags": [ - "watcher" - ], - "summary": "Deactivate a watch", - "description": "A watch can be either active or inactive.", - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works" - }, - "operationId": "watcher-deactivate-watch-1", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.deactivate_watch-watch_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.deactivate_watch-200" - } - }, - "x-api-name" : "deactivate_watch", - "x-namespace": "watcher" - } - }, - "/_watcher/watch/{id}": { - "get": { - "tags": [ - "watcher" - ], - "summary": "Get a watch", - "operationId": "watcher-get-watch", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The watch identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" + "in": "path", + "name": "filter_id", + "description": "A string that uniquely identifies a filter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "description": "A description of the filter.", + "type": "string" + }, + "items": { + "description": "The items of the filter. A wildcard `*` can be used at the beginning or the end of an item.\nUp to 10000 items are allowed in each filter.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "MlPutFilterExample1": { + "description": "An example body for a `PUT _ml/filters/safe_domains` request.", + "value": "{\n \"description\": \"A list of safe domains\",\n \"items\": [\"*.google.com\", \"wikipedia.org\"]\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -44894,133 +51245,65 @@ "schema": { "type": "object", "properties": { - "found": { - "type": "boolean" - }, - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "status": { - "$ref": "#/components/schemas/watcher._types.WatchStatus" - }, - "watch": { - "$ref": "#/components/schemas/watcher._types.Watch" - }, - "_primary_term": { - "type": "number" + "description": { + "type": "string" }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "filter_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "items": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "found", - "_id" + "description", + "filter_id", + "items" ] - }, - "examples": { - "GetWatchResponseExample1": { - "description": "A successful response from `GET _watcher/watch/my_watch`.", - "value": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"_version\": 1,\n \"status\": { \n \"version\": 1,\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:21:08.630Z\"\n },\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:21:08.630Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n }\n },\n \"watch\": {\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"trigger\": {\n \"schedule\": {\n \"hourly\": {\n \"minute\": [0, 5]\n }\n }\n },\n \"actions\": {\n \"test_index\": {\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n }\n}" - } } } } } }, - "x-state": "Added in 5.6.0", - "x-api-name" : "get_watch", - "x-namespace": "watcher" - }, - "put": { - "tags": [ - "watcher" - ], - "summary": "Create or update a watch", - "description": "When a watch is registered, a new document that represents the watch is added to the `.watches` index and its trigger is immediately registered with the relevant trigger engine.\nTypically for the `schedule` trigger, the scheduler is the trigger engine.\n\nIMPORTANT: You must use Kibana or this API to create a watch.\nDo not add a watch directly to the `.watches` index by using the Elasticsearch index API.\nIf Elasticsearch security features are enabled, do not give users write privileges on the `.watches` index.\n\nWhen you add a watch you can also define its initial active state by setting the *active* parameter.\n\nWhen Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.\nIf the user is able to read index `a`, but not index `b`, the same will apply when the watch runs.", - "operationId": "watcher-put-watch", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.put_watch-id" - }, - { - "$ref": "#/components/parameters/watcher.put_watch-active" - }, - { - "$ref": "#/components/parameters/watcher.put_watch-if_primary_term" - }, - { - "$ref": "#/components/parameters/watcher.put_watch-if_seq_no" - }, - { - "$ref": "#/components/parameters/watcher.put_watch-version" - } + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n PUT\n /_ml/filters/{filter_id}\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/watcher.put_watch" - }, - "responses": { - "200": { - "$ref": "#/components/responses/watcher.put_watch-200" - } - }, - "x-api-name" : "put_watch", - "x-namespace": "watcher" - }, - "post": { - "tags": [ - "watcher" + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" ], - "summary": "Create or update a watch", - "description": "When a watch is registered, a new document that represents the watch is added to the `.watches` index and its trigger is immediately registered with the relevant trigger engine.\nTypically for the `schedule` trigger, the scheduler is the trigger engine.\n\nIMPORTANT: You must use Kibana or this API to create a watch.\nDo not add a watch directly to the `.watches` index by using the Elasticsearch index API.\nIf Elasticsearch security features are enabled, do not give users write privileges on the `.watches` index.\n\nWhen you add a watch you can also define its initial active state by setting the *active* parameter.\n\nWhen Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.\nIf the user is able to read index `a`, but not index `b`, the same will apply when the watch runs.", - "operationId": "watcher-put-watch-1", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.put_watch-id" - }, + "x-api": "put_filter.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/parameters/watcher.put_watch-active" - }, - { - "$ref": "#/components/parameters/watcher.put_watch-if_primary_term" - }, - { - "$ref": "#/components/parameters/watcher.put_watch-if_seq_no" - }, - { - "$ref": "#/components/parameters/watcher.put_watch-version" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/watcher.put_watch" - }, - "responses": { - "200": { - "$ref": "#/components/responses/watcher.put_watch-200" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-api-name" : "put_watch", - "x-namespace": "watcher" + ] }, "delete": { "tags": [ - "watcher" + "ml anomaly" ], - "summary": "Delete a watch", - "description": "When the watch is removed, the document representing the watch in the `.watches` index is gone and it will never be run again.\n\nDeleting a watch does not delete any watch execution records related to this watch from the watch history.\n\nIMPORTANT: Deleting a watch must be done by using only this API.\nDo not delete the watch directly from the `.watches` index using the Elasticsearch delete document API\nWhen Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the `.watches` index.", - "operationId": "watcher-delete-watch", + "summary": "Delete a filter", + "description": "If an anomaly detection job references the filter, you cannot delete the\nfilter. You must update or delete the job before you can delete the filter.", + "operationId": "ml-delete-filter", "parameters": [ { "in": "path", - "name": "id", - "description": "The watch identifier.", + "name": "filter_id", + "description": "A string that uniquely identifies a filter.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/_types.Id" }, "style": "simple" } @@ -45031,201 +51314,69 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "found": { - "type": "boolean" - }, - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - } - }, - "required": [ - "found", - "_id", - "_version" - ] + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, "examples": { - "DeleteWatchResponseExample1": { - "description": "A successful response from `DELETE _watcher/watch/my_watch`.", - "value": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_version\": 2\n}" + "MlDeleteFilterResponseExample1": { + "description": "A successful response when deleting a filter.", + "value": "{\n \"acknowledged\": true\n}" } } } } } }, - "x-api-name" : "delete_watch", - "x-namespace": "watcher" - } - }, - "/_watcher/watch/{id}/_execute": { - "put": { - "tags": [ - "watcher" - ], - "summary": "Run a watch", - "description": "This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.", - "operationId": "watcher-execute-watch", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.execute_watch-id" - }, - { - "$ref": "#/components/parameters/watcher.execute_watch-debug" - } + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n DELETE\n /_ml/filters/{filter_id}\n
\n " ], - "requestBody": { - "$ref": "#/components/requestBodies/watcher.execute_watch" - }, - "responses": { - "200": { - "$ref": "#/components/responses/watcher.execute_watch-200" - } - }, - "x-api-name" : "execute_watch", - "x-namespace": "watcher" - }, - "post": { - "tags": [ - "watcher" + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" ], - "summary": "Run a watch", - "description": "This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.", - "operationId": "watcher-execute-watch-1", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.execute_watch-id" - }, + "x-api": "delete_filter.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/parameters/watcher.execute_watch-debug" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - ], - "requestBody": { - "$ref": "#/components/requestBodies/watcher.execute_watch" - }, - "responses": { - "200": { - "$ref": "#/components/responses/watcher.execute_watch-200" - } - }, - "x-api-name" : "execute_watch", - "x-namespace": "watcher" + ] } }, - "/_watcher/watch/_execute": { - "put": { - "tags": [ - "watcher" - ], - "summary": "Run a watch", - "description": "This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.", - "operationId": "watcher-execute-watch-2", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.execute_watch-debug" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/watcher.execute_watch" - }, - "responses": { - "200": { - "$ref": "#/components/responses/watcher.execute_watch-200" - } - }, - "x-api-name" : "execute_watch", - "x-namespace": "watcher" - }, + "/_ml/anomaly_detectors/{job_id}/_forecast": { "post": { "tags": [ - "watcher" + "ml anomaly" ], - "summary": "Run a watch", - "description": "This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.", - "operationId": "watcher-execute-watch-3", + "summary": "Predict future behavior of a time series", + "description": "Forecasts are not supported for jobs that perform population analysis; an\nerror occurs if you try to create a forecast for a job that has an\n`over_field_name` in its configuration. Forcasts predict future behavior\nbased on historical data.", + "operationId": "ml-forecast", "parameters": [ { - "$ref": "#/components/parameters/watcher.execute_watch-debug" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/watcher.execute_watch" - }, - "responses": { - "200": { - "$ref": "#/components/responses/watcher.execute_watch-200" - } - }, - "x-api-name" : "execute_watch", - "x-namespace": "watcher" - } - }, - "/_watcher/settings": { - "get": { - "tags": [ - "watcher" - ], - "summary": "Get Watcher index settings", - "description": "Get settings for the Watcher internal index (`.watches`).\nOnly a subset of settings are shown, for example `index.auto_expand_replicas` and `index.number_of_replicas`.", - "operationId": "watcher-get-settings", - "parameters": [ + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job. The job must be open when you\ncreate a forecast; otherwise, an error occurs.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "duration", + "description": "A period of time that indicates how far into the future to forecast. For\nexample, `30d` corresponds to 30 days. The forecast starts at the last\nrecord that was processed.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" }, "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - } - }, - "required": [ - "index" - ] - }, - "examples": { - "WatcherGetSettingsResponseExample1": { - "description": "A successful response with two index settings.", - "value": "{\n \"index\": {\n \"auto_expand_replicas\": \"0-4\",\n \"number_of_replicas\": 0\n }\n}" - } - } - } - } - } - }, - "x-api-name" : "get_settings", - "x-namespace": "watcher" - }, - "put": { - "tags": [ - "watcher" - ], - "summary": "Update Watcher index settings", - "description": "Update settings for the Watcher internal index (`.watches`).\nOnly a subset of settings can be modified.\nThis includes `index.auto_expand_replicas`, `index.number_of_replicas`, `index.routing.allocation.exclude.*`,\n`index.routing.allocation.include.*` and `index.routing.allocation.require.*`.\nModification of `index.routing.allocation.include._tier_preference` is an exception and is not allowed as the\nWatcher shards must always be in the `data_content` tier.", - "operationId": "watcher-update-settings", - "parameters": [ + }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "expires_in", + "description": "The period of time that forecast results are retained. After a forecast\nexpires, the results are deleted. If set to a value of 0, the forecast is\nnever automatically deleted.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -45234,11 +51385,11 @@ }, { "in": "query", - "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "max_model_memory", + "description": "The maximum memory the forecast can use. If the forecast needs to use\nmore than the provided amount, it will spool to disk. Default is 20mb,\nmaximum is 500mb and minimum is 1mb. If set to 40% or more of the job’s\nconfigured memory limit, it is automatically reduced to below that\namount.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "string" }, "style": "form" } @@ -45249,22 +51400,39 @@ "schema": { "type": "object", "properties": { - "index.auto_expand_replicas": { - "type": "string" + "duration": { + "description": "Refer to the description for the `duration` query parameter.", + "default": "1d", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "index.number_of_replicas": { - "type": "number" + "expires_in": { + "description": "Refer to the description for the `expires_in` query parameter.", + "default": "14d", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max_model_memory": { + "description": "Refer to the description for the `max_model_memory` query parameter.", + "default": "20mb", + "type": "string" } } }, "examples": { - "WatcherUpdateSettingsRequestExample1": { - "value": "{\n \"index.auto_expand_replicas\": \"0-4\"\n}" + "MlForecastExample1": { + "description": "An example body for a `POST _ml/anomaly_detectors/low_request_rate/_forecast` request.", + "value": "{\n \"duration\": \"10d\"\n}" } } } - }, - "required": true + } }, "responses": { "200": { @@ -45276,73 +51444,73 @@ "properties": { "acknowledged": { "type": "boolean" + }, + "forecast_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] } }, "required": [ - "acknowledged" + "acknowledged", + "forecast_id" ] } } } } }, - "x-api-name" : "update_settings", - "x-namespace": "watcher" - } - }, - "/_watcher/_query/watches": { - "get": { - "tags": [ - "watcher" + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/_forecast\n
\n " ], - "summary": "Query watches", - "description": "Get all registered watches in a paginated manner and optionally filter watches by a query.\n\nNote that only the `_id` and `metadata.*` fields are queryable or sortable.", - "operationId": "watcher-query-watches", - "requestBody": { - "$ref": "#/components/requestBodies/watcher.query_watches" - }, - "responses": { - "200": { - "$ref": "#/components/responses/watcher.query_watches-200" - } - }, - "x-state": "Added in 7.11.0", - "x-api-name" : "query_watches", - "x-namespace": "watcher" - }, - "post": { - "tags": [ - "watcher" + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" ], - "summary": "Query watches", - "description": "Get all registered watches in a paginated manner and optionally filter watches by a query.\n\nNote that only the `_id` and `metadata.*` fields are queryable or sortable.", - "operationId": "watcher-query-watches-1", - "requestBody": { - "$ref": "#/components/requestBodies/watcher.query_watches" - }, - "responses": { - "200": { - "$ref": "#/components/responses/watcher.query_watches-200" + "x-api": "forecast.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "x-state": "Added in 7.11.0", - "x-api-name" : "query_watches", - "x-namespace": "watcher" - } - }, - "/_watcher/_start": { - "post": { + ] + }, + "delete": { "tags": [ - "watcher" + "ml anomaly" ], - "summary": "Start the watch service", - "description": "Start the Watcher service if it is not already running.", - "operationId": "watcher-start", + "summary": "Delete forecasts from a job", + "description": "By default, forecasts are retained for 14 days. You can specify a\ndifferent retention period with the `expires_in` parameter in the forecast\njobs API. The delete forecast API enables you to delete one or more\nforecasts before they expire.", + "operationId": "ml-delete-forecast", "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, { "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "name": "allow_no_forecasts", + "description": "Specifies whether an error occurs when there are no forecasts. In\nparticular, if this parameter is set to `false` and there are no\nforecasts associated with the job, attempts to delete all forecasts\nreturn an error.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the period of time to wait for the completion of the delete\noperation. When this period of time elapses, the API fails and returns an\nerror.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -45359,8 +51527,8 @@ "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, "examples": { - "WatcherStartResponseExample1": { - "description": "A successful response from `POST _watcher/_start`.", + "MlDeleteForecastResponseExample1": { + "description": "A successful response when deleting a forecast from an anomaly detection job.", "value": "{\n \"acknowledged\": true\n}" } } @@ -45368,78 +51536,68 @@ } } }, - "x-api-name" : "start", - "x-namespace": "watcher" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n DELETE\n /_ml/anomaly_detectors/{job_id}/_forecast\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_forecast.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_watcher/stats": { - "get": { + "/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}": { + "delete": { "tags": [ - "watcher" + "ml anomaly" ], - "summary": "Get Watcher statistics", - "description": "This API always returns basic metrics.\nYou retrieve more metrics by using the metric parameter.", - "operationId": "watcher-stats", + "summary": "Delete forecasts from a job", + "description": "By default, forecasts are retained for 14 days. You can specify a\ndifferent retention period with the `expires_in` parameter in the forecast\njobs API. The delete forecast API enables you to delete one or more\nforecasts before they expire.", + "operationId": "ml-delete-forecast-1", "parameters": [ { - "$ref": "#/components/parameters/watcher.stats-emit_stacktraces" - }, - { - "$ref": "#/components/parameters/watcher.stats-metric_" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.stats-200" - } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "stats", - "x-namespace": "watcher" - } - }, - "/_watcher/stats/{metric}": { - "get": { - "tags": [ - "watcher" - ], - "summary": "Get Watcher statistics", - "description": "This API always returns basic metrics.\nYou retrieve more metrics by using the metric parameter.", - "operationId": "watcher-stats-1", - "parameters": [ - { - "$ref": "#/components/parameters/watcher.stats-metric" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/watcher.stats-emit_stacktraces" + "in": "path", + "name": "forecast_id", + "description": "A comma-separated list of forecast identifiers. If you do not specify\nthis optional parameter or if you specify `_all` or `*` the API deletes\nall forecasts from the job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/parameters/watcher.stats-metric_" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/watcher.stats-200" - } - }, - "x-state": "Added in 5.5.0", - "x-api-name" : "stats", - "x-namespace": "watcher" - } - }, - "/_watcher/_stop": { - "post": { - "tags": [ - "watcher" - ], - "summary": "Stop the watch service", - "description": "Stop the Watcher service if it is running.", - "operationId": "watcher-stop", - "parameters": [ + "in": "query", + "name": "allow_no_forecasts", + "description": "Specifies whether an error occurs when there are no forecasts. In\nparticular, if this parameter is set to `false` and there are no\nforecasts associated with the job, attempts to delete all forecasts\nreturn an error.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "name": "timeout", + "description": "Specifies the period of time to wait for the completion of the delete\noperation. When this period of time elapses, the API fails and returns an\nerror.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -45456,8 +51614,8 @@ "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, "examples": { - "WatcherStopResponseExample1": { - "description": "A successful response from `POST _watcher/_stop`.", + "MlDeleteForecastResponseExample1": { + "description": "A successful response when deleting a forecast from an anomaly detection job.", "value": "{\n \"acknowledged\": true\n}" } } @@ -45465,36 +51623,47 @@ } } }, - "x-api-name" : "stop", - "x-namespace": "watcher" + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n DELETE\n /_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_forecast.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, - "/_xpack": { + "/_ml/anomaly_detectors/{job_id}": { "get": { "tags": [ - "xpack" + "ml anomaly" ], - "summary": "Get information", - "description": "The information provided by the API includes:\n\n* Build information including the build number and timestamp.\n* License information about the currently installed license.\n* Feature information for the features that are currently enabled and available under the current license.", - "operationId": "xpack-info", + "summary": "Get anomaly detection jobs configuration info", + "description": "You can get information for multiple anomaly detection jobs in a single API\nrequest by using a group name, a comma-separated list of jobs, or a wildcard\nexpression. You can get information for all anomaly detection jobs by using\n`_all`, by specifying `*` as the ``, or by omitting the ``.", + "operationId": "ml-get-jobs", "parameters": [ { - "in": "query", - "name": "categories", - "description": "A comma-separated list of the information categories to include in the response.\nFor example, `build,license,features`.", + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, or a wildcard expression. If you do not specify one of these\noptions, the API returns information for all anomaly detection jobs.", + "required": true, "deprecated": false, "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/xpack.info.XPackCategory" - } + "$ref": "#/components/schemas/_types.Ids" }, - "style": "form" + "style": "simple" }, { "in": "query", - "name": "accept_enterprise", - "description": "If this param is used it must be set to true", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If this parameter is `false`, the request returns a `404` status\ncode when there are no matches or only partial matches.", "deprecated": false, "schema": { "type": "boolean" @@ -45503,8 +51672,8 @@ }, { "in": "query", - "name": "human", - "description": "Defines whether additional human-readable information is included in the response.\nIn particular, it adds descriptions and a tag line.", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", "deprecated": false, "schema": { "type": "boolean" @@ -45520,60 +51689,230 @@ "schema": { "type": "object", "properties": { - "build": { - "$ref": "#/components/schemas/xpack.info.BuildInformation" - }, - "features": { - "$ref": "#/components/schemas/xpack.info.Features" - }, - "license": { - "$ref": "#/components/schemas/xpack.info.MinimalLicenseInformation" + "count": { + "type": "number" }, - "tagline": { - "type": "string" + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Job" + } } }, "required": [ - "build", - "features", - "license", - "tagline" + "count", + "jobs" ] - }, - "examples": { - "XPackInfoResponseExample1": { - "description": "A successful response from `GET /_xpack`.", - "value": "{\n \"build\" : {\n \"hash\" : \"2798b1a3ce779b3611bb53a0082d4d741e4d3168\",\n \"date\" : \"2015-04-07T13:34:42Z\"\n },\n \"license\" : {\n \"uid\" : \"893361dc-9749-4997-93cb-xxx\",\n \"type\" : \"trial\",\n \"mode\" : \"trial\",\n \"status\" : \"active\",\n \"expiry_date_in_millis\" : 1542665112332\n },\n \"features\" : {\n \"ccr\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"aggregate_metric\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"analytics\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"archive\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"enrich\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"graph\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ilm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"logstash\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ml\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"esql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"monitoring\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"rollup\": {\n \"available\": true,\n \"enabled\": true\n },\n \"searchable_snapshots\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"security\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"slm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"spatial\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"eql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"sql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"transform\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"voting_only\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"watcher\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"data_streams\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"data_tiers\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"enterprise_search\": {\n \"available\": true,\n \"enabled\": true\n },\n \"universal_profiling\": {\n \"available\": true,\n \"enabled\": true\n },\n \"logsdb\": {\n \"available\": true,\n \"enabled\": false\n }\n },\n \"tagline\" : \"You know, for X\"\n}" - } } } } } }, - "x-api-name" : "info", - "x-namespace": "xpack" - } - }, - "/_xpack/usage": { - "get": { + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_jobs.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "put": { "tags": [ - "xpack" + "ml anomaly" ], - "summary": "Get usage information", - "description": "Get information about the features that are currently enabled and available under the current license.\nThe API also provides some usage statistics.", - "operationId": "xpack-usage", + "summary": "Create an anomaly detection job", + "description": "If you include a `datafeed_config`, you must have read index privileges on the source index.\nIf you include a `datafeed_config` but do not provide a query, the datafeed uses `{\"match_all\": {\"boost\": 1}}`.", + "operationId": "ml-put-job", "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "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.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, { "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "name": "allow_no_indices", + "description": "If `true`, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the\n`_all` string or when no indices are specified.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Duration" + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, unavailable indices (missing or closed) are ignored.", + "deprecated": false, + "schema": { + "type": "boolean" }, "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_lazy_open": { + "description": "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.", + "default": false, + "type": "boolean" + }, + "analysis_config": { + "description": "Specifies how to analyze the data. After you create a job, you cannot change the analysis configuration; all the properties are informational.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisConfig" + } + ] + }, + "analysis_limits": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisLimits" + } + ] + }, + "background_persist_interval": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "custom_settings": { + "description": "Advanced configuration option. Contains custom meta data about the job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CustomSettings" + } + ] + }, + "daily_model_snapshot_retention_after_days": { + "description": "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`.", + "default": 1.0, + "type": "number" + }, + "data_description": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataDescription" + } + ] + }, + "datafeed_config": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedConfig" + } + ] + }, + "description": { + "description": "A description of the job.", + "type": "string" + }, + "job_id": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "groups": { + "description": "A list of job groups. A job can belong to no groups or many.", + "type": "array", + "items": { + "type": "string" + } + }, + "model_plot_config": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelPlotConfig" + } + ] + }, + "model_snapshot_retention_days": { + "description": "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.", + "default": 10.0, + "type": "number" + }, + "renormalization_window_days": { + "description": "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.", + "type": "number" + }, + "results_index_name": { + "description": "A text string that affects the name of the machine learning results index. By default, the job generates an index named `.ml-anomalies-shared`.", + "default": "shared", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "results_retention_days": { + "description": "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.", + "type": "number" + } + }, + "required": [ + "analysis_config", + "data_description" + ] + }, + "examples": { + "MlPutJobRequestExample1": { + "description": "A request to create an anomaly detection job and datafeed.", + "value": "{\n \"analysis_config\": {\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\"\n }\n ]\n },\n \"data_description\": {\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n \"analysis_limits\": {\n \"model_memory_limit\": \"11MB\"\n },\n \"model_plot_config\": {\n \"enabled\": true,\n \"annotations_enabled\": true\n },\n \"results_index_name\": \"test-job1\",\n \"datafeed_config\": {\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n },\n \"datafeed_id\": \"datafeed-test-job1\"\n }\n}" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "", @@ -45582,15088 +51921,70699 @@ "schema": { "type": "object", "properties": { - "aggregate_metric": { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - "analytics": { - "$ref": "#/components/schemas/xpack.usage.Analytics" - }, - "archive": { - "$ref": "#/components/schemas/xpack.usage.Archive" - }, - "watcher": { - "$ref": "#/components/schemas/xpack.usage.Watcher" - }, - "ccr": { - "$ref": "#/components/schemas/xpack.usage.Ccr" - }, - "data_frame": { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - "data_science": { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - "data_streams": { - "$ref": "#/components/schemas/xpack.usage.DataStreams" - }, - "data_tiers": { - "$ref": "#/components/schemas/xpack.usage.DataTiers" + "allow_lazy_open": { + "type": "boolean" }, - "enrich": { - "$ref": "#/components/schemas/xpack.usage.Base" + "analysis_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisConfigRead" + } + ] }, - "eql": { - "$ref": "#/components/schemas/xpack.usage.Eql" + "analysis_limits": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisLimits" + } + ] }, - "flattened": { - "$ref": "#/components/schemas/xpack.usage.Flattened" + "background_persist_interval": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "graph": { - "$ref": "#/components/schemas/xpack.usage.Base" + "create_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "health_api": { - "$ref": "#/components/schemas/xpack.usage.HealthStatistics" + "custom_settings": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CustomSettings" + } + ] }, - "ilm": { - "$ref": "#/components/schemas/xpack.usage.Ilm" + "daily_model_snapshot_retention_after_days": { + "type": "number" }, - "logstash": { - "$ref": "#/components/schemas/xpack.usage.Base" + "data_description": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataDescription" + } + ] }, - "ml": { - "$ref": "#/components/schemas/xpack.usage.MachineLearning" + "datafeed_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Datafeed" + } + ] }, - "monitoring": { - "$ref": "#/components/schemas/xpack.usage.Monitoring" + "description": { + "type": "string" }, - "rollup": { - "$ref": "#/components/schemas/xpack.usage.Base" + "groups": { + "type": "array", + "items": { + "type": "string" + } }, - "runtime_fields": { - "$ref": "#/components/schemas/xpack.usage.RuntimeFieldTypes" + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "spatial": { - "$ref": "#/components/schemas/xpack.usage.Base" + "job_type": { + "type": "string" }, - "searchable_snapshots": { - "$ref": "#/components/schemas/xpack.usage.SearchableSnapshots" + "job_version": { + "type": "string" }, - "security": { - "$ref": "#/components/schemas/xpack.usage.Security" + "model_plot_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelPlotConfig" + } + ] }, - "slm": { - "$ref": "#/components/schemas/xpack.usage.Slm" + "model_snapshot_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "sql": { - "$ref": "#/components/schemas/xpack.usage.Sql" + "model_snapshot_retention_days": { + "type": "number" }, - "transform": { - "$ref": "#/components/schemas/xpack.usage.Base" + "renormalization_window_days": { + "type": "number" }, - "vectors": { - "$ref": "#/components/schemas/xpack.usage.Vector" + "results_index_name": { + "type": "string" }, - "voting_only": { - "$ref": "#/components/schemas/xpack.usage.Base" + "results_retention_days": { + "type": "number" } }, "required": [ - "aggregate_metric", - "analytics", - "archive", - "watcher", - "ccr", - "data_tiers", - "eql", - "graph", - "ilm", - "logstash", - "ml", - "monitoring", - "rollup", - "spatial", - "searchable_snapshots", - "security", - "slm", - "sql", - "transform", - "voting_only" + "allow_lazy_open", + "analysis_config", + "analysis_limits", + "create_time", + "daily_model_snapshot_retention_after_days", + "data_description", + "job_id", + "job_type", + "job_version", + "model_snapshot_retention_days", + "results_index_name" ] }, "examples": { - "XPackUsageResponseExample1": { - "description": "An abbreviated response from `GET /_xpack/usage`.", - "value": "{\n \"security\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"monitoring\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"collection_enabled\" : false,\n \"enabled_exporters\" : {\n \"local\" : 1\n }\n },\n \"watcher\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"execution\" : {\n \"actions\" : {\n \"_all\" : {\n \"total\" : 0,\n \"total_time_in_ms\" : 0\n }\n }\n },\n \"watch\" : {\n \"input\" : {\n \"_all\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n },\n \"trigger\" : {\n \"_all\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n }\n },\n \"count\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n },\n \"graph\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ml\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"jobs\" : {\n \"_all\" : {\n \"count\" : 0,\n \"detectors\" : { },\n \"created_by\" : { },\n \"model_size\" : { },\n \"forecasts\" : {\n \"total\" : 0,\n \"forecasted_jobs\" : 0\n }\n }\n },\n \"datafeeds\" : {\n \"_all\" : {\n \"count\" : 0\n }\n },\n \"data_frame_analytics_jobs\" : {\n \"_all\" : {\n \"count\" : 0\n },\n \"analysis_counts\": { },\n \"memory_usage\": {\n \"peak_usage_bytes\": {\n \"min\": 0.0,\n \"max\": 0.0,\n \"avg\": 0.0,\n \"total\": 0.0\n }\n }\n },\n \"inference\" : {\n \"ingest_processors\" : {\n \"_all\" : {\n \"num_docs_processed\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n },\n \"pipelines\" : {\n \"count\" : 0\n },\n \"num_failures\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n },\n \"time_ms\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n }\n }\n },\n \"trained_models\" : {\n \"_all\" : {\n \"count\": 1\n },\n \"count\": {\n \"total\": 1,\n \"prepackaged\": 1,\n \"other\": 0\n },\n \"model_size_bytes\": {\n \"min\": 0.0,\n \"max\": 0.0,\n \"avg\": 0.0,\n \"total\": 0.0\n },\n \"estimated_operations\": {\n \"min\": 0.0,\n \"max\": 0.0,\n \"avg\": 0.0,\n \"total\": 0.0\n }\n },\n \"deployments\": {\n \"count\": 0,\n \"inference_counts\": {\n \"total\": 0.0,\n \"min\": 0.0,\n \"avg\": 0.0,\n \"max\": 0.0\n },\n \"stats_by_model\": [],\n \"model_sizes_bytes\": {\n \"total\": 0.0,\n \"min\": 0.0,\n \"avg\": 0.0,\n \"max\": 0.0\n },\n \"time_ms\": {\n \"avg\": 0.0\n }\n }\n },\n \"node_count\" : 1,\n \"memory\": {\n anomaly_detectors_memory_bytes: 0,\n data_frame_analytics_memory_bytes: 0,\n pytorch_inference_memory_bytes: 0,\n total_used_memory_bytes: 0\n }\n },\n \"inference\": {\n \"available\" : true,\n \"enabled\" : true,\n \"models\" : [ ]\n },\n \"logstash\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"eql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"esql\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"features\" : {\n \"eval\" : 0,\n \"stats\" : 0,\n \"dissect\": 0,\n \"grok\" : 0,\n \"limit\" : 0,\n \"where\" : 0,\n \"sort\" : 0,\n \"drop\" : 0,\n \"show\" : 0,\n \"rename\" : 0,\n \"mv_expand\" : 0,\n \"keep\" : 0,\n \"enrich\" : 0,\n \"from\" : 0,\n \"row\" : 0\n },\n \"queries\" : {\n \"rest\" : {\n \"total\" : 0,\n \"failed\" : 0\n },\n \"kibana\" : {\n \"total\" : 0,\n \"failed\" : 0\n },\n \"_all\" : {\n \"total\" : 0,\n \"failed\" : 0\n }\n }\n },\n \"sql\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"features\" : {\n \"having\" : 0,\n \"subselect\" : 0,\n \"limit\" : 0,\n \"orderby\" : 0,\n \"where\" : 0,\n \"join\" : 0,\n \"groupby\" : 0,\n \"command\" : 0,\n \"local\" : 0\n },\n \"queries\" : {\n \"rest\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"cli\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"canvas\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"jdbc\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc32\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc64\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"_all\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"translate\" : {\n \"count\" : 0\n }\n }\n },\n \"rollup\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ilm\" : {\n \"policy_count\" : 3,\n \"policy_stats\" : [ ]\n },\n \"slm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ccr\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"follower_indices_count\" : 0,\n \"auto_follow_patterns_count\" : 0\n },\n \"transform\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"voting_only\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"searchable_snapshots\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"indices_count\" : 0,\n \"full_copy_indices_count\" : 0,\n \"shared_cache_indices_count\" : 0\n },\n \"spatial\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"analytics\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"stats\": {\n \"boxplot_usage\" : 0,\n \"top_metrics_usage\" : 0,\n \"normalize_usage\" : 0,\n \"cumulative_cardinality_usage\" : 0,\n \"t_test_usage\" : 0,\n \"rate_usage\" : 0,\n \"string_stats_usage\" : 0,\n \"moving_percentiles_usage\" : 0,\n \"multi_terms_usage\" : 0\n }\n },\n \"data_streams\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"data_streams\" : 0,\n \"indices_count\" : 0\n },\n \"data_lifecycle\" : {\n \"available\": true,\n \"enabled\": true,\n \"count\": 0,\n \"default_rollover_used\": true,\n \"data_retention\": {\n \"configured_data_streams\": 0\n },\n \"effective_retention\": {\n \"retained_data_streams\": 0\n },\n \"global_retention\": {\n \"default\": {\n \"defined\": false\n },\n \"max\": {\n \"defined\": false\n }\n }\n },\n \"data_tiers\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"data_warm\" : {\n \"node_count\" : 0,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n },\n \"data_frozen\" : {\n \"node_count\" : 1,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n },\n \"data_cold\" : {\n \"node_count\" : 0,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n },\n \"data_content\" : {\n \"node_count\" : 0,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n },\n \"data_hot\" : {\n \"node_count\" : 0,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n }\n },\n \"aggregate_metric\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"archive\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"indices_count\" : 0\n },\n \"health_api\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"invocations\": {\n \"total\": 0\n }\n },\n \"remote_clusters\": {\n \"size\": 0,\n \"mode\": {\n \"proxy\": 0,\n \"sniff\": 0\n },\n \"security\": {\n \"cert\": 0,\n \"api_key\": 0\n }\n },\n \"enterprise_search\" : {\n \"available\": true,\n \"enabled\": true,\n \"search_applications\" : {\n \"count\": 0\n },\n \"analytics_collections\": {\n \"count\": 0\n },\n \"query_rulesets\": {\n \"total_rule_count\": 0,\n \"total_count\": 0,\n \"min_rule_count\": 0,\n \"max_rule_count\": 0\n }\n },\n \"universal_profiling\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"logsdb\": {\n \"available\": true,\n \"enabled\": false,\n \"indices_count\": 0,\n \"indices_with_synthetic_source\": 0,\n \"num_docs\": 0,\n \"size_in_bytes\": 0,\n \"has_custom_cutoff_date\": false\n }\n}" + "MlPutJobResponseExample1": { + "description": "A successful response when creating an anomaly detection job and datafeed.", + "value": "{\n \"job_id\": \"test-job1\",\n \"job_type\": \"anomaly_detector\",\n \"job_version\": \"8.4.0\",\n \"create_time\": 1656087283340,\n \"datafeed_config\": {\n \"datafeed_id\": \"datafeed-test-job1\",\n \"job_id\": \"test-job1\",\n \"authorization\": {\n \"roles\": [\n \"superuser\"\n ]\n },\n \"query_delay\": \"61499ms\",\n \"chunking_config\": {\n \"mode\": \"auto\"\n },\n \"indices_options\": {\n \"expand_wildcards\": [\n \"open\"\n ],\n \"ignore_unavailable\": false,\n \"allow_no_indices\": true,\n \"ignore_throttled\": true\n },\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"scroll_size\": 1000,\n \"delayed_data_check_config\": {\n \"enabled\": true\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n }\n },\n \"analysis_config\": {\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"detector_index\": 0\n }\n ],\n \"influencers\": [],\n \"model_prune_window\": \"30d\"\n },\n \"analysis_limits\": {\n \"model_memory_limit\": \"11mb\",\n \"categorization_examples_limit\": 4\n },\n \"data_description\": {\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n \"model_plot_config\": {\n \"enabled\": true,\n \"annotations_enabled\": true\n },\n \"model_snapshot_retention_days\": 10,\n \"daily_model_snapshot_retention_after_days\": 1,\n \"results_index_name\": \"custom-test-job1\",\n \"allow_lazy_open\": false\n}" } } } } } }, - "x-api-name" : "usage", - "x-namespace": "xpack" - } - } - }, - "components": { - "schemas": { - "_types.Id": { - "type": "string" - }, - "_types.AcknowledgedResponseBase": { - "type": "object", - "properties": { - "acknowledged": { - "description": "For a successful response, this value is always true. On failure, an exception is returned instead.", - "type": "boolean" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n PUT\n /_ml/anomaly_detectors/{job_id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "required": [ - "acknowledged" ] }, - "_types.Duration": { - "description": "A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and\n`d` (days). Also accepts \"0\" without a unit and \"-1\" to indicate an unspecified value.", - "oneOf": [ + "delete": { + "tags": [ + "ml anomaly" + ], + "summary": "Delete an anomaly detection job", + "description": "All job configuration, model state and results are deleted.\nIt is not currently possible to delete multiple jobs using wildcards or a\ncomma separated list. If you delete a job that has a datafeed, the request\nfirst tries to delete the datafeed. This behavior is equivalent to calling\nthe delete datafeed API with the same timeout and force parameters as the\ndelete job request.", + "operationId": "ml-delete-job", + "parameters": [ { - "type": "string" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "string", - "enum": [ - "-1" - ] + "in": "query", + "name": "force", + "description": "Use to forcefully delete an opened job; this method is quicker than\nclosing and deleting the job.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "string", - "enum": [ - "0" - ] - } - ] - }, - "async_search._types.AsyncSearchDocumentResponseBase": { - "allOf": [ - { - "$ref": "#/components/schemas/async_search._types.AsyncSearchResponseBase" + "in": "query", + "name": "delete_user_annotations", + "description": "Specifies whether annotations that have been added by the\nuser should be deleted along with any auto-generated annotations when the job is\nreset.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "response": { - "$ref": "#/components/schemas/async_search._types.AsyncSearch" - } + "in": "query", + "name": "wait_for_completion", + "description": "Specifies whether the request should return immediately or wait until the\njob deletion completes.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "response" - ] + "style": "form" } - ] - }, - "async_search._types.AsyncSearch": { - "type": "object", - "properties": { - "aggregations": { - "description": "Partial aggregations results, coming from the shards that have already completed running the query.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.Aggregate" - } - }, - "_clusters": { - "$ref": "#/components/schemas/_types.ClusterStatistics" - }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "hits": { - "$ref": "#/components/schemas/_global.search._types.HitsMetadata" - }, - "max_score": { - "type": "number" - }, - "num_reduce_phases": { - "description": "Indicates how many reductions of the results have been performed.\nIf this number increases compared to the last retrieved results for a get asynch search request, you can expect additional results included in the search response.", - "type": "number" - }, - "profile": { - "$ref": "#/components/schemas/_global.search._types.Profile" - }, - "pit_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_scroll_id": { - "$ref": "#/components/schemas/_types.ScrollId" - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "suggest": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Suggest" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "MlDeleteJobResponseExample1": { + "summary": "Delete job", + "description": "A successful response when deleting an anomaly detection job.", + "value": "{\n \"acknowledged\": true\n}" + }, + "MlDeleteJobResponseExample2": { + "summary": "Delete job asynchronously", + "description": "A successful response when deleting an anomaly detection job asynchronously. When the `wait_for_completion` query parameter is set to `false`, the response contains an identifier for the job deletion task.\n", + "value": "{\n \"task\": \"oTUltX4IQMOUUVeiohTt8A:39\"\n}" + } + } } } - }, - "terminated_early": { - "type": "boolean" - }, - "timed_out": { - "type": "boolean" - }, - "took": { - "type": "number" } }, - "required": [ - "hits", - "_shards", - "timed_out", - "took" - ] - }, - "_types.aggregations.Aggregate": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.CardinalityAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.HdrPercentilesAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.HdrPercentileRanksAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.TDigestPercentilesAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.TDigestPercentileRanksAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.PercentilesBucketAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.MedianAbsoluteDeviationAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.MinAggregate" - }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n DELETE\n /_ml/anomaly_detectors/{job_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.aggregations.MaxAggregate" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get model snapshots info", + "operationId": "ml-get-model-snapshots", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.SumAggregate" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.aggregations.AvgAggregate" + "in": "path", + "name": "snapshot_id", + "description": "A numerical character string that uniquely identifies the model snapshot. You can get information for multiple\nsnapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using `_all`,\nby specifying `*` as the snapshot ID, or by omitting the snapshot ID.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.aggregations.WeightedAvgAggregate" + "in": "query", + "name": "desc", + "description": "If true, the results are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.ValueCountAggregate" + "in": "query", + "name": "end", + "description": "Returns snapshots with timestamps earlier than this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.SimpleValueAggregate" + "in": "query", + "name": "from", + "description": "Skips the specified number of snapshots.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.DerivativeAggregate" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of snapshots to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.BucketMetricValueAggregate" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested snapshots. By default, the\nsnapshots are sorted by their timestamp.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.StatsAggregate" - }, + "in": "query", + "name": "start", + "description": "Returns snapshots with timestamps after this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "sort": { + "description": "Refer to the description for the `sort` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } + }, + "examples": { + "MlGetModelSnapshotsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots` request.", + "value": "{\n \"start\": \"1575402236000\"\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "model_snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.ModelSnapshot" + } + } + }, + "required": [ + "count", + "model_snapshots" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_model_snapshots.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.aggregations.StatsBucketAggregate" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get model snapshots info", + "operationId": "ml-get-model-snapshots-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsAggregate" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsBucketAggregate" + "in": "path", + "name": "snapshot_id", + "description": "A numerical character string that uniquely identifies the model snapshot. You can get information for multiple\nsnapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using `_all`,\nby specifying `*` as the snapshot ID, or by omitting the snapshot ID.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.aggregations.GeoBoundsAggregate" + "in": "query", + "name": "desc", + "description": "If true, the results are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.GeoCentroidAggregate" + "in": "query", + "name": "end", + "description": "Returns snapshots with timestamps earlier than this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.HistogramAggregate" + "in": "query", + "name": "from", + "description": "Skips the specified number of snapshots.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.DateHistogramAggregate" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of snapshots to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.AutoDateHistogramAggregate" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested snapshots. By default, the\nsnapshots are sorted by their timestamp.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.VariableWidthHistogramAggregate" - }, + "in": "query", + "name": "start", + "description": "Returns snapshots with timestamps after this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "sort": { + "description": "Refer to the description for the `sort` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } + }, + "examples": { + "MlGetModelSnapshotsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots` request.", + "value": "{\n \"start\": \"1575402236000\"\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "model_snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.ModelSnapshot" + } + } + }, + "required": [ + "count", + "model_snapshots" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_model_snapshots.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.aggregations.StringTermsAggregate" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "ml anomaly" + ], + "summary": "Delete a model snapshot", + "description": "You cannot delete the active model snapshot. To delete that snapshot, first\nrevert to a different one. To identify the active model snapshot, refer to\nthe `model_snapshot_id` in the results from the get jobs API.", + "operationId": "ml-delete-model-snapshot", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.LongTermsAggregate" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.aggregations.DoubleTermsAggregate" - }, + "in": "path", + "name": "snapshot_id", + "description": "Identifier for the model snapshot.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "MlDeleteModelSnapshotResponseExample1": { + "description": "A successful response when deleting an existing model snapshot.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n DELETE\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_model_snapshot.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.aggregations.UnmappedTermsAggregate" - }, + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/trained_models/{model_id}": { + "get": { + "tags": [ + "ml trained model" + ], + "summary": "Get trained model configuration info", + "operationId": "ml-get-trained-models", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.LongRareTermsAggregate" + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model or a model alias.\n\nYou can get information for multiple trained models in a single API\nrequest by using a comma-separated list of model IDs or a wildcard\nexpression.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Ids" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.aggregations.StringRareTermsAggregate" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n- Contains wildcard expressions and there are no models that match.\n- Contains the _all string or no identifiers and there are no matches.\n- Contains wildcard expressions and there are only partial matches.\n\nIf true, it returns an empty array when there are no matches and the\nsubset of results when there are partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.UnmappedRareTermsAggregate" + "in": "query", + "name": "decompress_definition", + "description": "Specifies whether the included model definition should be returned as a\nJSON map (true) or in a custom compressed format (false).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.MultiTermsAggregate" + "in": "query", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.MissingAggregate" + "in": "query", + "name": "from", + "description": "Skips the specified number of models.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.NestedAggregate" + "in": "query", + "name": "include", + "description": "A comma delimited string of optional fields to include in the response\nbody.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/ml._types.Include" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.ReverseNestedAggregate" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of models to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.GlobalAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.FilterAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.ChildrenAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.ParentAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.SamplerAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.UnmappedSamplerAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.GeoHashGridAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.GeoTileGridAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.GeoHexGridAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.RangeAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.DateRangeAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.GeoDistanceAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.IpRangeAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.IpPrefixAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.FiltersAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.AdjacencyMatrixAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.SignificantLongTermsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.SignificantStringTermsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.UnmappedSignificantTermsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.TimeSeriesAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.ScriptedMetricAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.TopHitsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.InferenceAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.StringStatsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.BoxPlotAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.TopMetricsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.TTestAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.RateAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.CumulativeCardinalityAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.MatrixStatsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.GeoLineAggregate" - } - ] - }, - "_types.aggregations.CardinalityAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" - }, - { - "type": "object", - "properties": { - "value": { - "type": "number" - } + "in": "query", + "name": "tags", + "description": "A comma delimited string of tags. A trained model can have many tags, or\nnone. When supplied, only trained models that contain all the supplied\ntags are returned.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "required": [ - "value" - ] + "style": "form" } - ] - }, - "_types.aggregations.AggregateBase": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/components/schemas/_types.Metadata" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "trained_model_configs": { + "description": "An array of trained model resources, which are sorted by the model_id value in ascending order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TrainedModelConfig" + } + } + }, + "required": [ + "count", + "trained_model_configs" + ] + } + } + } } - } - }, - "_types.Metadata": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "_types.aggregations.HdrPercentilesAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" - }, + }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n GET\n /_ml/trained_models/{model_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_trained_models.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.PercentilesAggregateBase": { - "allOf": [ + "put": { + "tags": [ + "ml trained model" + ], + "summary": "Create a trained model", + "description": "Enable you to supply a trained model that is not created by data frame analytics.", + "operationId": "ml-put-trained-model", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "values": { - "$ref": "#/components/schemas/_types.aggregations.Percentiles" - } + "in": "query", + "name": "defer_definition_decompression", + "description": "If set to `true` and a `compressed_definition` is provided,\nthe request defers definition decompression and skips relevant\nvalidations.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "values" - ] - } - ] - }, - "_types.aggregations.Percentiles": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.KeyedPercentiles" + "x-state": "Generally available; Added in 8.0.0", + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.ArrayPercentilesItem" - } - } - ] - }, - "_types.aggregations.KeyedPercentiles": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" + "in": "query", + "name": "wait_for_completion", + "description": "Whether to wait for all child operations (e.g. model download)\nto complete.", + "deprecated": false, + "schema": { + "type": "boolean" }, - { - "nullable": true, - "type": "string" + "x-state": "Generally available; Added in 8.8.0", + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "compressed_definition": { + "description": "The compressed (GZipped and Base64 encoded) inference definition of the\nmodel. If compressed_definition is specified, then definition cannot be\nspecified.", + "type": "string" + }, + "definition": { + "description": "The inference definition for the model. If definition is specified, then\ncompressed_definition cannot be specified.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.Definition" + } + ] + }, + "description": { + "description": "A human-readable description of the inference trained model.", + "type": "string" + }, + "inference_config": { + "description": "The default configuration for inference. This can be either a regression\nor classification configuration. It must match the underlying\ndefinition.trained_model's target_type. For pre-packaged models such as\nELSER the config is not required.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.InferenceConfigCreateContainer" + } + ] + }, + "input": { + "description": "The input field names for the model definition.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.Input" + } + ] + }, + "metadata": { + "description": "An object map that contains metadata about the model.", + "type": "object" + }, + "model_type": { + "description": "The model type.", + "default": "tree_ensemble", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelType" + } + ] + }, + "model_size_bytes": { + "description": "The estimated memory usage in bytes to keep the trained model in memory.\nThis property is supported only if defer_definition_decompression is true\nor the model definition is not supplied.", + "type": "number" + }, + "platform_architecture": { + "description": "The platform architecture (if applicable) of the trained mode. If the model\nonly works on one platform, because it is heavily optimized for a particular\nprocessor architecture and OS combination, then this field specifies which.\nThe format of the string must match the platform identifiers used by Elasticsearch,\nso one of, `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`,\nor `windows-x86_64`. For portable models (those that work independent of processor\narchitecture or OS features), leave this field unset.", + "type": "string" + }, + "tags": { + "description": "An array of tags to organize the model.", + "type": "array", + "items": { + "type": "string" + } + }, + "prefix_strings": { + "description": "Optional prefix strings applied at inference", + "x-state": "Generally available; Added in 8.12.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelPrefixStrings" + } + ] + } + } + } } - ] - } - }, - "_types.aggregations.ArrayPercentilesItem": { - "type": "object", - "properties": { - "key": { - "type": "string" }, - "value": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ml._types.TrainedModelConfig" + } } - ] - }, - "value_as_string": { - "type": "string" + } } }, - "required": [ - "key", - "value" - ] - }, - "_types.aggregations.HdrPercentileRanksAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" - }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n PUT\n /_ml/trained_models/{model_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_trained_model.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.TDigestPercentilesAggregate": { - "allOf": [ + "delete": { + "tags": [ + "ml trained model" + ], + "summary": "Delete an unreferenced trained model", + "description": "The request deletes a trained inference model that is not referenced by an ingest pipeline.", + "operationId": "ml-delete-trained-model", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object" - } - ] - }, - "_types.aggregations.TDigestPercentileRanksAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" + "in": "query", + "name": "force", + "description": "Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - ] - }, - "_types.aggregations.PercentilesBucketAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" - }, + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "MlDeleteTrainedModelResponseExample1": { + "description": "A successful response when deleting an existing trained inference model.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n DELETE\n /_ml/trained_models/{model_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_trained_model.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.MedianAbsoluteDeviationAggregate": { - "allOf": [ + } + }, + "/_ml/trained_models/{model_id}/model_aliases/{model_alias}": { + "put": { + "tags": [ + "ml trained model" + ], + "summary": "Create or update a trained model alias", + "description": "A trained model alias is a logical name used to reference a single trained\nmodel.\nYou can use aliases instead of trained model identifiers to make it easier to\nreference your models. For example, you can use aliases in inference\naggregations and processors.\nAn alias must be unique and refer to only a single trained model. However,\nyou can have multiple aliases for each trained model.\nIf you use this API to update an alias such that it references a different\ntrained model ID and the model uses a different type of data frame analytics,\nan error occurs. For example, this situation occurs if you have a trained\nmodel for regression analysis and a trained model for classification\nanalysis; you cannot reassign an alias from one type of trained model to\nanother.\nIf you use this API to update an alias and there are very few input fields in\ncommon between the old and new trained models for the model alias, the API\nreturns a warning.", + "operationId": "ml-put-trained-model-alias", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + "in": "path", + "name": "model_id", + "description": "The identifier for the trained model that the alias refers to.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object" - } - ] - }, - "_types.aggregations.SingleMetricAggregateBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "path", + "name": "model_alias", + "description": "The alias to create or update. This value cannot end in numbers.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "value": { - "description": "The metric value. A missing value generally means that there was no data to aggregate,\nunless specified otherwise.", - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "value_as_string": { - "type": "string" - } + "in": "query", + "name": "reassign", + "description": "Specifies whether the alias gets reassigned to the specified trained\nmodel if it is already assigned to a different model. If the alias is\nalready assigned and this parameter is false, the API returns an error.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "value" - ] + "style": "form" } - ] - }, - "_types.aggregations.MinAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" - }, + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n PUT\n /_ml/trained_models/{model_id}/model_aliases/{model_alias}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_trained_model_alias.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.MaxAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" - }, - { - "type": "object" - } - ] - }, - "_types.aggregations.SumAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" - }, - { - "type": "object" - } - ] - }, - "_types.aggregations.AvgAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" - }, - { - "type": "object" - } - ] - }, - "_types.aggregations.WeightedAvgAggregate": { - "allOf": [ + "delete": { + "tags": [ + "ml trained model" + ], + "summary": "Delete a trained model alias", + "description": "This API deletes an existing model alias that refers to a trained model. If\nthe model alias is missing or refers to a model other than the one identified\nby the `model_id`, this API returns an error.", + "operationId": "ml-delete-trained-model-alias", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + "in": "path", + "name": "model_id", + "description": "The trained model ID to which the model alias refers.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object" + "in": "path", + "name": "model_alias", + "description": "The model alias to delete.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" } - ] - }, - "_types.aggregations.ValueCountAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" - }, - { - "type": "object" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "MlDeleteTrainedModelAliasResponseExample1": { + "description": "A successful response when deleting a trained model alias.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } } - ] - }, - "_types.aggregations.SimpleValueAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" - }, + }, + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n DELETE\n /_ml/trained_models/{model_id}/model_aliases/{model_alias}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "delete_trained_model_alias.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.DerivativeAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" - }, - { - "type": "object", - "properties": { - "normalized_value": { - "type": "number" + } + }, + "/_ml/anomaly_detectors/_estimate_model_memory": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Estimate job model memory usage", + "description": "Make an estimation of the memory usage for an anomaly detection job model.\nThe estimate is based on analysis configuration details for the job and cardinality\nestimates for the fields it references.", + "operationId": "ml-estimate-model-memory", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "analysis_config": { + "description": "For a list of the properties that you can specify in the\n`analysis_config` component of the body of this API.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisConfig" + } + ] + }, + "max_bucket_cardinality": { + "description": "Estimates of the highest cardinality in a single bucket that is observed\nfor influencer fields over the time period that the job analyzes data.\nTo produce a good answer, values must be provided for all influencer\nfields. Providing values for fields that are not listed as `influencers`\nhas no effect on the estimation.", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "overall_cardinality": { + "description": "Estimates of the cardinality that is observed for fields over the whole\ntime period that the job analyzes data. To produce a good answer, values\nmust be provided for fields referenced in the `by_field_name`,\n`over_field_name` and `partition_field_name` of any detectors. Providing\nvalues for other fields has no effect on the estimation. It can be\nomitted from the request if no detectors have a `by_field_name`,\n`over_field_name` or `partition_field_name`.", + "type": "object", + "additionalProperties": { + "type": "number" + } + } + } }, - "normalized_value_as_string": { - "type": "string" + "examples": { + "MlEstimateModelMemoryRequestExample1": { + "description": "Run `POST _ml/anomaly_detectors/_estimate_model_memory` to estimate the model memory limit based on the analysis configuration details provided in the request body.", + "value": "{\n \"analysis_config\": {\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [\n \"source_ip\",\n \"dest_ip\"\n ]\n },\n \"overall_cardinality\": {\n \"status\": 10,\n \"app\": 50\n },\n \"max_bucket_cardinality\": {\n \"source_ip\": 300,\n \"dest_ip\": 30\n }\n}" + } } } - } - ] - }, - "_types.aggregations.BucketMetricValueAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" }, - { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model_memory_estimate": { + "type": "string" + } + }, + "required": [ + "model_memory_estimate" + ] + }, + "examples": { + "MlEstimateModelMemoryResponseExample1": { + "description": "A successful response from `POST _ml/anomaly_detectors/_estimate_model_memory`.", + "value": "{\n \"model_memory_estimate\": \"21mb\"\n}" + } } } - }, - "required": [ - "keys" - ] + } } - ] - }, - "_types.aggregations.StatsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" - }, + }, + "x-state": "Generally available; Added in 7.7.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/_estimate_model_memory\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "estimate_model_memory.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "min": { - "oneOf": [ - { - "type": "number" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/data_frame/_evaluate": { + "post": { + "tags": [ + "ml data frame" + ], + "summary": "Evaluate data frame analytics", + "description": "The API packages together commonly used evaluation metrics for various types\nof machine learning features. This has been designed for use on indexes\ncreated by data frame analytics. Evaluation requires both a ground truth\nfield and an analytics result field to be present.", + "operationId": "ml-evaluate-data-frame", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "evaluation": { + "description": "Defines the type of evaluation you want to perform.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationContainer" + } + ] }, - { - "nullable": true, - "type": "string" - } - ] - }, - "max": { - "oneOf": [ - { - "type": "number" + "index": { + "description": "Defines the `index` in which the evaluation will be performed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - { - "nullable": true, - "type": "string" + "query": { + "description": "A query clause that retrieves a subset of data from the source index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] } + }, + "required": [ + "evaluation", + "index" ] }, - "avg": { - "oneOf": [ - { - "type": "number" + "examples": { + "MlEvaluateDataFrameRequestExample1": { + "summary": "Classification example 1", + "description": "Run `POST _ml/data_frame/_evaluate` to evaluate a a classification job for an annotated index. The `actual_field` contains the ground truth for classification. The `predicted_field` contains the predicted value calculated by the classification analysis.\n", + "value": "{\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"predicted_field\": \"ml.animal_class_prediction\",\n \"metrics\": {\n \"multiclass_confusion_matrix\": {}\n }\n }\n }\n}" + }, + "MlEvaluateDataFrameRequestExample2": { + "summary": "Classification example 2", + "description": "Run `POST _ml/data_frame/_evaluate` to evaluate a classification job with AUC ROC metrics for an annotated index. The `actual_field` contains the ground truth value for the actual animal classification. This is required in order to evaluate results. The `class_name` specifies the class name that is treated as positive during the evaluation, all the other classes are treated as negative.\n", + "value": "{\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"metrics\": {\n \"auc_roc\": {\n \"class_name\": \"dog\"\n }\n }\n }\n }\n}" + }, + "MlEvaluateDataFrameRequestExample3": { + "summary": "Outlier detection", + "description": "Run `POST _ml/data_frame/_evaluate` to evaluate an outlier detection job for an annotated index.\n", + "value": "{\n \"index\": \"my_analytics_dest_index\",\n \"evaluation\": {\n \"outlier_detection\": {\n \"actual_field\": \"is_outlier\",\n \"predicted_probability_field\": \"ml.outlier_score\"\n }\n }\n}" + }, + "MlEvaluateDataFrameRequestExample4": { + "summary": "Regression example 1", + "description": "Run `POST _ml/data_frame/_evaluate` to evaluate the testing error of a regression job for an annotated index. The term query in the body limits evaluation to be performed on the test split only. The `actual_field` contains the ground truth for house prices. The `predicted_field` contains the house price calculated by the regression analysis.\n", + "value": "{\n \"index\": \"house_price_predictions\",\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"ml.is_training\": false\n }\n }\n ]\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"price\",\n \"predicted_field\": \"ml.price_prediction\",\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {},\n \"msle\": {\n \"offset\": 10\n },\n \"huber\": {\n \"delta\": 1.5\n }\n }\n }\n }\n}" + }, + "MlEvaluateDataFrameRequestExample5": { + "summary": "Regression example 2", + "description": "Run `POST _ml/data_frame/_evaluate` to evaluate the training error of a regression job for an annotated index. The term query in the body limits evaluation to be performed on the training split only. The `actual_field` contains the ground truth for house prices. The `predicted_field` contains the house price calculated by the regression analysis.\n", + "value": "{\n \"index\": \"house_price_predictions\",\n \"query\": {\n \"term\": {\n \"ml.is_training\": {\n \"value\": true\n }\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"price\",\n \"predicted_field\": \"ml.price_prediction\",\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {},\n \"msle\": {},\n \"huber\": {}\n }\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "classification": { + "description": "Evaluation results for a classification analysis.\nIt outputs a prediction that identifies to which of the classes each document belongs.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummary" + } + ] + }, + "outlier_detection": { + "description": "Evaluation results for an outlier detection analysis.\nIt outputs the probability that each document is an outlier.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeOutlierDetectionSummary" + } + ] + }, + "regression": { + "description": "Evaluation results for a regression analysis which outputs a prediction of values.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeRegressionSummary" + } + ] + } + } + }, + "examples": { + "MlEvaluateDataFrameResponseExample1": { + "summary": "Classification example 1", + "description": "A succesful response from `POST _ml/data_frame/_evaluate` to evaluate a classification analysis job for an annotated index. The `actual_class` contains the name of the class the analysis tried to predict. The `actual_class_doc_count` is the number of documents in the index belonging to the `actual_class`. The `predicted_classes` object contains the list of the predicted classes and the number of predictions associated with the class.\n", + "value": "{\n \"classification\": {\n \"multiclass_confusion_matrix\": {\n \"confusion_matrix\": [\n {\n \"actual_class\": \"cat\",\n \"actual_class_doc_count\": 12,\n \"predicted_classes\": [\n {\n \"predicted_class\": \"cat\",\n \"count\": 12\n },\n {\n \"predicted_class\": \"dog\",\n \"count\": 0\n }\n ],\n \"other_predicted_class_doc_count\": 0\n },\n {\n \"actual_class\": \"dog\",\n \"actual_class_doc_count\": 11,\n \"predicted_classes\": [\n {\n \"predicted_class\": \"dog\",\n \"count\": 7\n },\n {\n \"predicted_class\": \"cat\",\n \"count\": 4\n }\n ],\n \"other_predicted_class_doc_count\": 0\n }\n ],\n \"other_actual_class_count\": 0\n }\n }\n}" }, - { - "nullable": true, - "type": "string" + "MlEvaluateDataFrameResponseExample2": { + "summary": "Classification example 2", + "description": "A succesful response from `POST _ml/data_frame/_evaluate` to evaluate a classification analysis job with the AUC ROC metrics for an annotated index.\n", + "value": "{\n \"classification\": {\n \"auc_roc\": {\n \"value\": 0.8941788639536681\n }\n }\n}" + }, + "MlEvaluateDataFrameResponseExample3": { + "summary": "Outlier detection", + "description": "A successful response from `POST _ml/data_frame/_evaluate` to evaluate an outlier detection job.", + "value": "{\n \"outlier_detection\": {\n \"auc_roc\": {\n \"value\": 0.9258475774641445\n },\n \"confusion_matrix\": {\n \"0.25\": {\n \"tp\": 5,\n \"fp\": 9,\n \"tn\": 204,\n \"fn\": 5\n },\n \"0.5\": {\n \"tp\": 1,\n \"fp\": 5,\n \"tn\": 208,\n \"fn\": 9\n },\n \"0.75\": {\n \"tp\": 0,\n \"fp\": 4,\n \"tn\": 209,\n \"fn\": 10\n }\n },\n \"precision\": {\n \"0.25\": 0.35714285714285715,\n \"0.5\": 0.16666666666666666,\n \"0.75\": 0\n },\n \"recall\": {\n \"0.25\": 0.5,\n \"0.5\": 0.1,\n \"0.75\": 0\n }\n }\n}" } - ] - }, - "sum": { - "type": "number" - }, - "min_as_string": { - "type": "string" - }, - "max_as_string": { - "type": "string" - }, - "avg_as_string": { - "type": "string" - }, - "sum_as_string": { - "type": "string" + } } - }, - "required": [ - "count", - "min", - "max", - "avg", - "sum" - ] + } } - ] - }, - "_types.aggregations.StatsBucketAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.StatsAggregate" - }, + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n POST\n /_ml/data_frame/_evaluate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "evaluate_data_frame.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.ExtendedStatsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.StatsAggregate" - }, - { - "type": "object", - "properties": { - "sum_of_squares": { - "oneOf": [ - { - "type": "number" + } + }, + "/_ml/data_frame/analytics/_explain": { + "get": { + "tags": [ + "ml data frame" + ], + "summary": "Explain data frame analytics config", + "description": "This API provides explanations for a data frame analytics config that either\nexists already or one that has not been created yet. The following\nexplanations are provided:\n* which fields are included or not in the analysis and why,\n* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.\nIf you have object fields or fields that are excluded via source filtering, they are not included in the explanation.", + "operationId": "ml-explain-data-frame-analytics", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source": { + "description": "The configuration of how to source the analysis data. It requires an\nindex. Optionally, query and _source may be specified.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] }, - { - "nullable": true, - "type": "string" - } - ] - }, - "variance": { - "oneOf": [ - { - "type": "number" + "dest": { + "description": "The destination configuration, consisting of index and optionally\nresults_field (ml by default).", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" + } + ] }, - { - "nullable": true, - "type": "string" - } - ] - }, - "variance_population": { - "oneOf": [ - { - "type": "number" + "analysis": { + "description": "The analysis configuration, which contains the information necessary to\nperform one of the following types of analysis: classification, outlier\ndetection, or regression.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] }, - { - "nullable": true, + "description": { + "description": "A description of the job.", "type": "string" - } - ] - }, - "variance_sampling": { - "oneOf": [ - { - "type": "number" }, - { - "nullable": true, + "model_memory_limit": { + "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try to\ncreate data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", "type": "string" - } - ] - }, - "std_deviation": { - "oneOf": [ - { - "type": "number" }, - { - "nullable": true, - "type": "string" - } - ] - }, - "std_deviation_population": { - "oneOf": [ - { + "max_num_threads": { + "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, "type": "number" }, - { - "nullable": true, - "type": "string" - } - ] - }, - "std_deviation_sampling": { - "oneOf": [ - { - "type": "number" + "analyzed_fields": { + "description": "Specify includes and/or excludes patterns to select which fields will be\nincluded in the analysis. The patterns specified in excludes are applied\nlast, therefore excludes takes precedence. In other words, if the same\nfield is specified in both includes and excludes, then the field will not\nbe included in the analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] }, - { - "nullable": true, - "type": "string" + "allow_lazy_start": { + "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", + "default": false, + "type": "boolean" } - ] - }, - "std_deviation_bounds": { - "$ref": "#/components/schemas/_types.aggregations.StandardDeviationBounds" - }, - "sum_of_squares_as_string": { - "type": "string" - }, - "variance_as_string": { - "type": "string" - }, - "variance_population_as_string": { - "type": "string" - }, - "variance_sampling_as_string": { - "type": "string" - }, - "std_deviation_as_string": { - "type": "string" + } }, - "std_deviation_bounds_as_string": { - "$ref": "#/components/schemas/_types.aggregations.StandardDeviationBoundsAsString" + "examples": { + "MlExplainDataFrameAnalyticsRequestExample1": { + "description": "Run `POST _ml/data_frame/analytics/_explain` to explain a data frame analytics job configuration.", + "value": "{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + } } - }, - "required": [ - "sum_of_squares", - "variance", - "variance_population", - "variance_sampling", - "std_deviation", - "std_deviation_population", - "std_deviation_sampling" - ] + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "field_selection": { + "description": "An array of objects that explain selection for each field, sorted by the field names.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsFieldSelection" + } + }, + "memory_estimation": { + "description": "An array of objects that explain selection for each field, sorted by the field names.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsMemoryEstimation" + } + ] + } + }, + "required": [ + "field_selection", + "memory_estimation" + ] + }, + "examples": { + "MlExplainDataFrameAnalyticsResponseExample1": { + "description": "A succesful response for explaining a data frame analytics job configuration.", + "value": "{\n \"field_selection\": [\n {\n \"field\": \"number_of_bedrooms\",\n \"mappings_types\": [\n \"integer\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"numerical\"\n },\n {\n \"field\": \"postcode\",\n \"mappings_types\": [\n \"text\"\n ],\n \"is_included\": false,\n \"is_required\": false,\n \"reason\": \"[postcode.keyword] is preferred because it is aggregatable\"\n },\n {\n \"field\": \"postcode.keyword\",\n \"mappings_types\": [\n \"keyword\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"categorical\"\n },\n {\n \"field\": \"price\",\n \"mappings_types\": [\n \"float\"\n ],\n \"is_included\": true,\n \"is_required\": true,\n \"feature_type\": \"numerical\"\n }\n ],\n \"memory_estimation\": {\n \"expected_memory_without_disk\": \"128MB\",\n \"expected_memory_with_disk\": \"32MB\"\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/_explain\n
\n ", + "
\n POST\n /_ml/data_frame/analytics/_explain\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "explain_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.StandardDeviationBounds": { - "type": "object", - "properties": { - "upper": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "lower": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "upper_population": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "lower_population": { - "oneOf": [ - { - "type": "number" + "post": { + "tags": [ + "ml data frame" + ], + "summary": "Explain data frame analytics config", + "description": "This API provides explanations for a data frame analytics config that either\nexists already or one that has not been created yet. The following\nexplanations are provided:\n* which fields are included or not in the analysis and why,\n* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.\nIf you have object fields or fields that are excluded via source filtering, they are not included in the explanation.", + "operationId": "ml-explain-data-frame-analytics-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source": { + "description": "The configuration of how to source the analysis data. It requires an\nindex. Optionally, query and _source may be specified.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] + }, + "dest": { + "description": "The destination configuration, consisting of index and optionally\nresults_field (ml by default).", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" + } + ] + }, + "analysis": { + "description": "The analysis configuration, which contains the information necessary to\nperform one of the following types of analysis: classification, outlier\ndetection, or regression.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] + }, + "description": { + "description": "A description of the job.", + "type": "string" + }, + "model_memory_limit": { + "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try to\ncreate data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", + "type": "string" + }, + "max_num_threads": { + "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, + "type": "number" + }, + "analyzed_fields": { + "description": "Specify includes and/or excludes patterns to select which fields will be\nincluded in the analysis. The patterns specified in excludes are applied\nlast, therefore excludes takes precedence. In other words, if the same\nfield is specified in both includes and excludes, then the field will not\nbe included in the analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] + }, + "allow_lazy_start": { + "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", + "default": false, + "type": "boolean" + } + } }, - { - "nullable": true, - "type": "string" + "examples": { + "MlExplainDataFrameAnalyticsRequestExample1": { + "description": "Run `POST _ml/data_frame/analytics/_explain` to explain a data frame analytics job configuration.", + "value": "{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + } } - ] - }, - "upper_sampling": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "field_selection": { + "description": "An array of objects that explain selection for each field, sorted by the field names.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsFieldSelection" + } + }, + "memory_estimation": { + "description": "An array of objects that explain selection for each field, sorted by the field names.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsMemoryEstimation" + } + ] + } + }, + "required": [ + "field_selection", + "memory_estimation" + ] + }, + "examples": { + "MlExplainDataFrameAnalyticsResponseExample1": { + "description": "A succesful response for explaining a data frame analytics job configuration.", + "value": "{\n \"field_selection\": [\n {\n \"field\": \"number_of_bedrooms\",\n \"mappings_types\": [\n \"integer\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"numerical\"\n },\n {\n \"field\": \"postcode\",\n \"mappings_types\": [\n \"text\"\n ],\n \"is_included\": false,\n \"is_required\": false,\n \"reason\": \"[postcode.keyword] is preferred because it is aggregatable\"\n },\n {\n \"field\": \"postcode.keyword\",\n \"mappings_types\": [\n \"keyword\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"categorical\"\n },\n {\n \"field\": \"price\",\n \"mappings_types\": [\n \"float\"\n ],\n \"is_included\": true,\n \"is_required\": true,\n \"feature_type\": \"numerical\"\n }\n ],\n \"memory_estimation\": {\n \"expected_memory_without_disk\": \"128MB\",\n \"expected_memory_with_disk\": \"32MB\"\n }\n}" + } + } } - ] - }, - "lower_sampling": { - "oneOf": [ - { - "type": "number" + } + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/_explain\n
\n ", + "
\n POST\n /_ml/data_frame/analytics/_explain\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "explain_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/data_frame/analytics/{id}/_explain": { + "get": { + "tags": [ + "ml data frame" + ], + "summary": "Explain data frame analytics config", + "description": "This API provides explanations for a data frame analytics config that either\nexists already or one that has not been created yet. The following\nexplanations are provided:\n* which fields are included or not in the analysis and why,\n* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.\nIf you have object fields or fields that are excluded via source filtering, they are not included in the explanation.", + "operationId": "ml-explain-data-frame-analytics-2", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source": { + "description": "The configuration of how to source the analysis data. It requires an\nindex. Optionally, query and _source may be specified.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] + }, + "dest": { + "description": "The destination configuration, consisting of index and optionally\nresults_field (ml by default).", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" + } + ] + }, + "analysis": { + "description": "The analysis configuration, which contains the information necessary to\nperform one of the following types of analysis: classification, outlier\ndetection, or regression.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] + }, + "description": { + "description": "A description of the job.", + "type": "string" + }, + "model_memory_limit": { + "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try to\ncreate data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", + "type": "string" + }, + "max_num_threads": { + "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, + "type": "number" + }, + "analyzed_fields": { + "description": "Specify includes and/or excludes patterns to select which fields will be\nincluded in the analysis. The patterns specified in excludes are applied\nlast, therefore excludes takes precedence. In other words, if the same\nfield is specified in both includes and excludes, then the field will not\nbe included in the analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] + }, + "allow_lazy_start": { + "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", + "default": false, + "type": "boolean" + } + } }, - { - "nullable": true, - "type": "string" + "examples": { + "MlExplainDataFrameAnalyticsRequestExample1": { + "description": "Run `POST _ml/data_frame/analytics/_explain` to explain a data frame analytics job configuration.", + "value": "{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + } } - ] + } } }, - "required": [ - "upper", - "lower", - "upper_population", - "lower_population", - "upper_sampling", - "lower_sampling" - ] - }, - "_types.aggregations.StandardDeviationBoundsAsString": { - "type": "object", - "properties": { - "upper": { - "type": "string" - }, - "lower": { - "type": "string" - }, - "upper_population": { - "type": "string" - }, - "lower_population": { - "type": "string" - }, - "upper_sampling": { - "type": "string" - }, - "lower_sampling": { - "type": "string" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "field_selection": { + "description": "An array of objects that explain selection for each field, sorted by the field names.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsFieldSelection" + } + }, + "memory_estimation": { + "description": "An array of objects that explain selection for each field, sorted by the field names.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsMemoryEstimation" + } + ] + } + }, + "required": [ + "field_selection", + "memory_estimation" + ] + }, + "examples": { + "MlExplainDataFrameAnalyticsResponseExample1": { + "description": "A succesful response for explaining a data frame analytics job configuration.", + "value": "{\n \"field_selection\": [\n {\n \"field\": \"number_of_bedrooms\",\n \"mappings_types\": [\n \"integer\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"numerical\"\n },\n {\n \"field\": \"postcode\",\n \"mappings_types\": [\n \"text\"\n ],\n \"is_included\": false,\n \"is_required\": false,\n \"reason\": \"[postcode.keyword] is preferred because it is aggregatable\"\n },\n {\n \"field\": \"postcode.keyword\",\n \"mappings_types\": [\n \"keyword\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"categorical\"\n },\n {\n \"field\": \"price\",\n \"mappings_types\": [\n \"float\"\n ],\n \"is_included\": true,\n \"is_required\": true,\n \"feature_type\": \"numerical\"\n }\n ],\n \"memory_estimation\": {\n \"expected_memory_without_disk\": \"128MB\",\n \"expected_memory_with_disk\": \"32MB\"\n }\n}" + } + } + } + } } }, - "required": [ - "upper", - "lower", - "upper_population", - "lower_population", - "upper_sampling", - "lower_sampling" - ] - }, - "_types.aggregations.ExtendedStatsBucketAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsAggregate" - }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/{id}/_explain\n
\n ", + "
\n POST\n /_ml/data_frame/analytics/{id}/_explain\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "explain_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.GeoBoundsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" - }, + "post": { + "tags": [ + "ml data frame" + ], + "summary": "Explain data frame analytics config", + "description": "This API provides explanations for a data frame analytics config that either\nexists already or one that has not been created yet. The following\nexplanations are provided:\n* which fields are included or not in the analysis and why,\n* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.\nIf you have object fields or fields that are excluded via source filtering, they are not included in the explanation.", + "operationId": "ml-explain-data-frame-analytics-3", + "parameters": [ { - "type": "object", - "properties": { - "bounds": { - "$ref": "#/components/schemas/_types.GeoBounds" + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source": { + "description": "The configuration of how to source the analysis data. It requires an\nindex. Optionally, query and _source may be specified.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] + }, + "dest": { + "description": "The destination configuration, consisting of index and optionally\nresults_field (ml by default).", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" + } + ] + }, + "analysis": { + "description": "The analysis configuration, which contains the information necessary to\nperform one of the following types of analysis: classification, outlier\ndetection, or regression.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] + }, + "description": { + "description": "A description of the job.", + "type": "string" + }, + "model_memory_limit": { + "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try to\ncreate data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", + "type": "string" + }, + "max_num_threads": { + "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, + "type": "number" + }, + "analyzed_fields": { + "description": "Specify includes and/or excludes patterns to select which fields will be\nincluded in the analysis. The patterns specified in excludes are applied\nlast, therefore excludes takes precedence. In other words, if the same\nfield is specified in both includes and excludes, then the field will not\nbe included in the analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] + }, + "allow_lazy_start": { + "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", + "default": false, + "type": "boolean" + } + } + }, + "examples": { + "MlExplainDataFrameAnalyticsRequestExample1": { + "description": "Run `POST _ml/data_frame/analytics/_explain` to explain a data frame analytics job configuration.", + "value": "{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "field_selection": { + "description": "An array of objects that explain selection for each field, sorted by the field names.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsFieldSelection" + } + }, + "memory_estimation": { + "description": "An array of objects that explain selection for each field, sorted by the field names.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsMemoryEstimation" + } + ] + } + }, + "required": [ + "field_selection", + "memory_estimation" + ] + }, + "examples": { + "MlExplainDataFrameAnalyticsResponseExample1": { + "description": "A succesful response for explaining a data frame analytics job configuration.", + "value": "{\n \"field_selection\": [\n {\n \"field\": \"number_of_bedrooms\",\n \"mappings_types\": [\n \"integer\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"numerical\"\n },\n {\n \"field\": \"postcode\",\n \"mappings_types\": [\n \"text\"\n ],\n \"is_included\": false,\n \"is_required\": false,\n \"reason\": \"[postcode.keyword] is preferred because it is aggregatable\"\n },\n {\n \"field\": \"postcode.keyword\",\n \"mappings_types\": [\n \"keyword\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"categorical\"\n },\n {\n \"field\": \"price\",\n \"mappings_types\": [\n \"float\"\n ],\n \"is_included\": true,\n \"is_required\": true,\n \"feature_type\": \"numerical\"\n }\n ],\n \"memory_estimation\": {\n \"expected_memory_without_disk\": \"128MB\",\n \"expected_memory_with_disk\": \"32MB\"\n }\n}" + } + } } } } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/{id}/_explain\n
\n ", + "
\n POST\n /_ml/data_frame/analytics/{id}/_explain\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "explain_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.GeoBounds": { - "description": "A geo bounding box. It can be represented in various ways:\n- as 4 top/bottom/left/right coordinates\n- as 2 top_left / bottom_right points\n- as 2 top_right / bottom_left points\n- as a WKT bounding box", - "oneOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/_flush": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Force buffered data to be processed", + "description": "The flush jobs API is only applicable when sending data for analysis using\nthe post data API. Depending on the content of the buffer, then it might\nadditionally calculate new results. Both flush and close operations are\nsimilar, however the flush is more efficient if you are expecting to send\nmore data for analysis. When flushing, the job remains open and is available\nto continue analyzing data. A close operation additionally prunes and\npersists the model state to disk and the job must be opened again before\nanalyzing further data.", + "operationId": "ml-flush-job", + "parameters": [ { - "$ref": "#/components/schemas/_types.CoordsGeoBounds" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.TopLeftBottomRightGeoBounds" + "in": "query", + "name": "advance_time", + "description": "Specifies to advance to a particular time value. Results are generated\nand the model is updated for data from the specified time interval.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.TopRightBottomLeftGeoBounds" + "in": "query", + "name": "calc_interim", + "description": "If true, calculates the interim results for the most recent bucket or all\nbuckets within the latency period.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.WktGeoBounds" - } - ] - }, - "_types.CoordsGeoBounds": { - "type": "object", - "properties": { - "top": { - "type": "number" - }, - "bottom": { - "type": "number" + "in": "query", + "name": "end", + "description": "When used in conjunction with `calc_interim` and `start`, specifies the\nrange of buckets on which to calculate interim results.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, - "left": { - "type": "number" + { + "in": "query", + "name": "skip_time", + "description": "Specifies to skip to a particular time value. Results are not generated\nand the model is not updated for data from the specified time interval.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, - "right": { - "type": "number" - } - }, - "required": [ - "top", - "bottom", - "left", - "right" - ] - }, - "_types.TopLeftBottomRightGeoBounds": { - "type": "object", - "properties": { - "top_left": { - "$ref": "#/components/schemas/_types.GeoLocation" - }, - "bottom_right": { - "$ref": "#/components/schemas/_types.GeoLocation" + { + "in": "query", + "name": "start", + "description": "When used in conjunction with `calc_interim`, specifies the range of\nbuckets on which to calculate interim results.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "advance_time": { + "description": "Refer to the description for the `advance_time` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "calc_interim": { + "description": "Refer to the description for the `calc_interim` query parameter.", + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "skip_time": { + "description": "Refer to the description for the `skip_time` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } + }, + "examples": { + "MlFlushJobExample1": { + "description": "An example body for a `POST _ml/anomaly_detectors/low_request_rate/_flush` request.", + "value": "{\n \"calc_interim\": true\n}" + } + } + } } }, - "required": [ - "top_left", - "bottom_right" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "flushed": { + "type": "boolean" + }, + "last_finalized_bucket_end": { + "description": "Provides the timestamp (in milliseconds since the epoch) of the end of\nthe last bucket that was processed.", + "type": "number" + } + }, + "required": [ + "flushed" + ] + } + } + } + } + }, + "deprecated": true, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/_flush\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "flush_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.GeoLocation": { - "description": "A latitude/longitude as a 2 dimensional point. It can be represented in various ways:\n- as a `{lat, long}` object\n- as a geo hash value\n- as a `[lon, lat]` array\n- as a string in `\", \"` or WKT point formats", - "oneOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for buckets", + "description": "The API presents a chronological view of the records, grouped by bucket.", + "operationId": "ml-get-buckets", + "parameters": [ { - "$ref": "#/components/schemas/_types.LatLonGeoLocation" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.GeoHashLocation" + "in": "path", + "name": "timestamp", + "description": "The timestamp of a single bucket result. If you do not specify this\nparameter, the API returns information about all buckets.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "simple" }, { - "type": "array", - "items": { + "in": "query", + "name": "anomaly_score", + "description": "Returns buckets with anomaly scores greater or equal than this value.", + "deprecated": false, + "schema": { "type": "number" - } + }, + "style": "form" }, { - "type": "string" - } - ] - }, - "_types.LatLonGeoLocation": { - "type": "object", - "properties": { - "lat": { - "description": "Latitude", - "type": "number" - }, - "lon": { - "description": "Longitude", - "type": "number" - } - }, - "required": [ - "lat", - "lon" - ] - }, - "_types.GeoHashLocation": { - "type": "object", - "properties": { - "geohash": { - "$ref": "#/components/schemas/_types.GeoHash" - } - }, - "required": [ - "geohash" - ] - }, - "_types.GeoHash": { - "type": "string" - }, - "_types.TopRightBottomLeftGeoBounds": { - "type": "object", - "properties": { - "top_right": { - "$ref": "#/components/schemas/_types.GeoLocation" + "in": "query", + "name": "desc", + "description": "If `true`, the buckets are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "bottom_left": { - "$ref": "#/components/schemas/_types.GeoLocation" - } - }, - "required": [ - "top_right", - "bottom_left" - ] - }, - "_types.WktGeoBounds": { - "type": "object", - "properties": { - "wkt": { - "type": "string" - } - }, - "required": [ - "wkt" - ] - }, - "_types.aggregations.GeoCentroidAggregate": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "end", + "description": "Returns buckets with timestamps earlier than this time. `-1` means it is\nunset and results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "location": { - "$ref": "#/components/schemas/_types.GeoLocation" - } + "in": "query", + "name": "exclude_interim", + "description": "If `true`, the output excludes interim results.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "count" - ] - } - ] - }, - "_types.aggregations.HistogramAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseHistogramBucket" + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseHistogramBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "expand", + "description": "If true, the output includes anomaly records.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsHistogramBucket" - } + "in": "query", + "name": "from", + "description": "Skips the specified number of buckets.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsHistogramBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.HistogramBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.HistogramBucket" - } - } - ] - }, - "_types.aggregations.HistogramBucket": { - "allOf": [ + "in": "query", + "name": "size", + "description": "Specifies the maximum number of buckets to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested buckets.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "type": "object", - "properties": { - "key_as_string": { - "type": "string" + "in": "query", + "name": "start", + "description": "Returns buckets with timestamps after this time. `-1` means it is unset\nand results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "anomaly_score": { + "description": "Refer to the description for the `anomaly_score` query parameter.", + "default": 0.0, + "type": "number" + }, + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "exclude_interim": { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, + "type": "boolean" + }, + "expand": { + "description": "Refer to the description for the `expand` query parameter.", + "default": false, + "type": "boolean" + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "sort": { + "description": "Refer to the desription for the `sort` query parameter.", + "default": "timestamp", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } }, - "key": { - "type": "number" + "examples": { + "MlGetBucketsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/low_request_rate/results/buckets` request.", + "value": "{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}" + } } - }, - "required": [ - "key" - ] + } } - ] - }, - "_types.aggregations.MultiBucketBase": { - "type": "object", - "properties": { - "doc_count": { - "type": "number" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "buckets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.BucketSummary" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "buckets", + "count" + ] + } + } + } } }, - "required": [ - "doc_count" - ] - }, - "_types.aggregations.DateHistogramAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket" - }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_buckets.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket": { - "allOf": [ + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for buckets", + "description": "The API presents a chronological view of the records, grouped by bucket.", + "operationId": "ml-get-buckets-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsDateHistogramBucket" - } + "in": "path", + "name": "timestamp", + "description": "The timestamp of a single bucket result. If you do not specify this\nparameter, the API returns information about all buckets.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsDateHistogramBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ + "style": "simple" + }, { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.DateHistogramBucket" - } + "in": "query", + "name": "anomaly_score", + "description": "Returns buckets with anomaly scores greater or equal than this value.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.DateHistogramBucket" - } - } - ] - }, - "_types.aggregations.DateHistogramBucket": { - "allOf": [ + "in": "query", + "name": "desc", + "description": "If `true`, the buckets are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "query", + "name": "end", + "description": "Returns buckets with timestamps earlier than this time. `-1` means it is\nunset and results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "key_as_string": { - "type": "string" - }, - "key": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - } + "in": "query", + "name": "exclude_interim", + "description": "If `true`, the output excludes interim results.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "key" - ] - } - ] - }, - "_types.EpochTimeUnitMillis": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.UnitMillis" - } - ] - }, - "_types.UnitMillis": { - "description": "Time unit for milliseconds", - "type": "number" - }, - "_types.aggregations.AutoDateHistogramAggregate": { - "allOf": [ + "in": "query", + "name": "expand", + "description": "If true, the output includes anomaly records.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket" + "in": "query", + "name": "from", + "description": "Skips the specified number of buckets.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "interval": { - "$ref": "#/components/schemas/_types.DurationLarge" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of buckets to obtain.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "interval" - ] - } - ] - }, - "_types.DurationLarge": { - "description": "A date histogram interval. Similar to `Duration` with additional units: `w` (week), `M` (month), `q` (quarter) and\n`y` (year)", - "type": "string" - }, - "_types.aggregations.VariableWidthHistogramAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVariableWidthHistogramBucket" + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseVariableWidthHistogramBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested buckets.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsVariableWidthHistogramBucket" - } + "in": "query", + "name": "start", + "description": "Returns buckets with timestamps after this time. `-1` means it is unset\nand results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsVariableWidthHistogramBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.VariableWidthHistogramBucket" - } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.VariableWidthHistogramBucket" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "anomaly_score": { + "description": "Refer to the description for the `anomaly_score` query parameter.", + "default": 0.0, + "type": "number" + }, + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "exclude_interim": { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, + "type": "boolean" + }, + "expand": { + "description": "Refer to the description for the `expand` query parameter.", + "default": false, + "type": "boolean" + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "sort": { + "description": "Refer to the desription for the `sort` query parameter.", + "default": "timestamp", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } + }, + "examples": { + "MlGetBucketsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/low_request_rate/results/buckets` request.", + "value": "{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}" + } + } } } - ] - }, - "_types.aggregations.VariableWidthHistogramBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" - }, - { - "type": "object", - "properties": { - "min": { - "type": "number" - }, - "key": { - "type": "number" - }, - "max": { - "type": "number" - }, - "min_as_string": { - "type": "string" - }, - "key_as_string": { - "type": "string" - }, - "max_as_string": { - "type": "string" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "buckets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.BucketSummary" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "buckets", + "count" + ] + } } - }, - "required": [ - "min", - "key", - "max" - ] + } } - ] - }, - "_types.aggregations.StringTermsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseStringTermsBucket" - }, + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_buckets.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.TermsAggregateBaseStringTermsBucket": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/results/buckets": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for buckets", + "description": "The API presents a chronological view of the records, grouped by bucket.", + "operationId": "ml-get-buckets-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseStringTermsBucket" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "doc_count_error_upper_bound": { - "type": "number" - }, - "sum_other_doc_count": { - "type": "number" - } - } - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseStringTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "anomaly_score", + "description": "Returns buckets with anomaly scores greater or equal than this value.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsStringTermsBucket" - } + "in": "query", + "name": "desc", + "description": "If `true`, the buckets are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsStringTermsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.StringTermsBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.StringTermsBucket" - } - } - ] - }, - "_types.aggregations.StringTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.TermsBucketBase" + "in": "query", + "name": "end", + "description": "Returns buckets with timestamps earlier than this time. `-1` means it is\nunset and results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/_types.FieldValue" - } + "in": "query", + "name": "exclude_interim", + "description": "If `true`, the output excludes interim results.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "key" - ] - } - ] - }, - "_types.FieldValue": { - "description": "A field value.", - "oneOf": [ - { - "type": "number" + "style": "form" }, { - "type": "number" + "in": "query", + "name": "expand", + "description": "If true, the output includes anomaly records.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "string" + "in": "query", + "name": "from", + "description": "Skips the specified number of buckets.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "boolean" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of buckets to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "nullable": true, - "type": "string" - } - ] - }, - "_types.aggregations.TermsBucketBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested buckets.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "type": "object", - "properties": { - "doc_count_error_upper_bound": { - "type": "number" + "in": "query", + "name": "start", + "description": "Returns buckets with timestamps after this time. `-1` means it is unset\nand results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "anomaly_score": { + "description": "Refer to the description for the `anomaly_score` query parameter.", + "default": 0.0, + "type": "number" + }, + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "exclude_interim": { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, + "type": "boolean" + }, + "expand": { + "description": "Refer to the description for the `expand` query parameter.", + "default": false, + "type": "boolean" + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "sort": { + "description": "Refer to the desription for the `sort` query parameter.", + "default": "timestamp", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } + }, + "examples": { + "MlGetBucketsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/low_request_rate/results/buckets` request.", + "value": "{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}" + } } } } - ] - }, - "_types.aggregations.LongTermsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseLongTermsBucket" - }, - { - "type": "object" - } - ] - }, - "_types.aggregations.TermsAggregateBaseLongTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseLongTermsBucket" - }, - { - "type": "object", - "properties": { - "doc_count_error_upper_bound": { - "type": "number" - }, - "sum_other_doc_count": { - "type": "number" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "buckets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.BucketSummary" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "buckets", + "count" + ] + } } } } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/buckets\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/buckets\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_buckets.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] }, - "_types.aggregations.MultiBucketAggregateBaseLongTermsBucket": { - "allOf": [ + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for buckets", + "description": "The API presents a chronological view of the records, grouped by bucket.", + "operationId": "ml-get-buckets-3", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsLongTermsBucket" - } + "in": "query", + "name": "anomaly_score", + "description": "Returns buckets with anomaly scores greater or equal than this value.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsLongTermsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.LongTermsBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.LongTermsBucket" - } - } - ] - }, - "_types.aggregations.LongTermsBucket": { - "allOf": [ + "in": "query", + "name": "desc", + "description": "If `true`, the buckets are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.TermsBucketBase" + "in": "query", + "name": "end", + "description": "Returns buckets with timestamps earlier than this time. `-1` means it is\nunset and results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "key": { - "type": "number" - }, - "key_as_string": { - "type": "string" - } + "in": "query", + "name": "exclude_interim", + "description": "If `true`, the output excludes interim results.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "key" - ] - } - ] - }, - "_types.aggregations.DoubleTermsAggregate": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseDoubleTermsBucket" + "in": "query", + "name": "expand", + "description": "If true, the output includes anomaly records.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.TermsAggregateBaseDoubleTermsBucket": { - "allOf": [ + "in": "query", + "name": "from", + "description": "Skips the specified number of buckets.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseDoubleTermsBucket" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of buckets to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "doc_count_error_upper_bound": { - "type": "number" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested buckets.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" + }, + { + "in": "query", + "name": "start", + "description": "Returns buckets with timestamps after this time. `-1` means it is unset\nand results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "anomaly_score": { + "description": "Refer to the description for the `anomaly_score` query parameter.", + "default": 0.0, + "type": "number" + }, + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "exclude_interim": { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, + "type": "boolean" + }, + "expand": { + "description": "Refer to the description for the `expand` query parameter.", + "default": false, + "type": "boolean" + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "sort": { + "description": "Refer to the desription for the `sort` query parameter.", + "default": "timestamp", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } }, - "sum_other_doc_count": { - "type": "number" + "examples": { + "MlGetBucketsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/low_request_rate/results/buckets` request.", + "value": "{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}" + } } } } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseDoubleTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" - }, - { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsDoubleTermsBucket" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "buckets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.BucketSummary" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "buckets", + "count" + ] + } } - }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsDoubleTermsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.DoubleTermsBucket" } - }, + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/buckets\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/buckets\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_buckets.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.DoubleTermsBucket" - } + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.DoubleTermsBucket": { - "allOf": [ + } + }, + "/_ml/calendars/{calendar_id}/events": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get info about events in calendars", + "operationId": "ml-get-calendar-events", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.TermsBucketBase" + "in": "path", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "key": { - "type": "number" - }, - "key_as_string": { - "type": "string" - } + "in": "query", + "name": "end", + "description": "Specifies to get events with timestamps earlier than this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" }, - "required": [ - "key" - ] - } - ] - }, - "_types.aggregations.UnmappedTermsAggregate": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseVoid" + "in": "query", + "name": "from", + "description": "Skips the specified number of events.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.TermsAggregateBaseVoid": { - "allOf": [ + "in": "query", + "name": "job_id", + "description": "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 `*`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVoid" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of events to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "doc_count_error_upper_bound": { - "type": "number" - }, - "sum_other_doc_count": { - "type": "number" + "in": "query", + "name": "start", + "description": "Specifies to get events with timestamps after this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.CalendarEvent" + } + } + }, + "required": [ + "count", + "events" + ] + } } } } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseVoid": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" - }, + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /_ml/calendars/{calendar_id}/events\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_calendar_events.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsVoid" - } - }, - "required": [ - "buckets" - ] + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.BucketsVoid": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Add scheduled events to the calendar", + "operationId": "ml-post-calendar-events", + "parameters": [ { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_spec_utils.Void" + "in": "path", + "name": "calendar_id", + "description": "A string that uniquely identifies a calendar.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "events": { + "description": "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.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.CalendarEvent" + } + } + }, + "required": [ + "events" + ] + }, + "examples": { + "MlPostCalendarEventsExample1": { + "description": "An example body for a `POST _ml/calendars/planned-outages/events` request.", + "value": "{\n \"events\" : [\n {\"description\": \"event 1\", \"start_time\": 1513641600000, \"end_time\": 1513728000000},\n {\"description\": \"event 2\", \"start_time\": 1513814400000, \"end_time\": 1513900800000},\n {\"description\": \"event 3\", \"start_time\": 1514160000000, \"end_time\": 1514246400000}\n ]\n}" + } + } } }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_spec_utils.Void" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.CalendarEvent" + } + } + }, + "required": [ + "events" + ] + } + } } } - ] - }, - "_spec_utils.Void": { - "description": "The absence of any type. This is commonly used in APIs that don't return a body.\n\nAlthough \"void\" is generally used for the unit type that has only one value, this is to be interpreted as\nthe bottom type that has no value at all. Most languages have a unit type, but few have a bottom type.\n\nSee https://en.m.wikipedia.org/wiki/Unit_type and https://en.m.wikipedia.org/wiki/Bottom_type", - "type": "object" - }, - "_types.aggregations.LongRareTermsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseLongRareTermsBucket" - }, + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n POST\n /_ml/calendars/{calendar_id}/events\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "post_calendar_events.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.MultiBucketAggregateBaseLongRareTermsBucket": { - "allOf": [ + } + }, + "/_ml/calendars": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get calendar configuration info", + "operationId": "ml-get-calendars", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "from", + "description": "Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsLongRareTermsBucket" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsLongRareTermsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.LongRareTermsBucket" - } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.LongRareTermsBucket" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "This object is supported only when you omit the calendar identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } + } + } } } - ] - }, - "_types.aggregations.LongRareTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" - }, - { - "type": "object", - "properties": { - "key": { - "type": "number" - }, - "key_as_string": { - "type": "string" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "calendars": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.get_calendars.Calendar" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "calendars", + "count" + ] + } } - }, - "required": [ - "key" - ] + } } - ] - }, - "_types.aggregations.StringRareTermsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseStringRareTermsBucket" - }, + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /_ml/calendars\n
\n ", + "
\n POST\n /_ml/calendars\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_calendars.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.MultiBucketAggregateBaseStringRareTermsBucket": { - "allOf": [ + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get calendar configuration info", + "operationId": "ml-get-calendars-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "from", + "description": "Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsStringRareTermsBucket" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsStringRareTermsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.StringRareTermsBucket" - } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.StringRareTermsBucket" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "This object is supported only when you omit the calendar identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } + } + } } } - ] - }, - "_types.aggregations.StringRareTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" - }, - { - "type": "object", - "properties": { - "key": { - "type": "string" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "calendars": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.get_calendars.Calendar" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "calendars", + "count" + ] + } } - }, - "required": [ - "key" - ] + } } - ] - }, - "_types.aggregations.UnmappedRareTermsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVoid" - }, + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /_ml/calendars\n
\n ", + "
\n POST\n /_ml/calendars\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_calendars.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.MultiTermsAggregate": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for categories", + "operationId": "ml-get-categories", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseMultiTermsBucket" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object" - } - ] - }, - "_types.aggregations.TermsAggregateBaseMultiTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseMultiTermsBucket" + "in": "path", + "name": "category_id", + "description": "Identifier for the category, which is unique in the job. If you specify\nneither the category ID nor the partition_field_value, the API returns\ninformation about all categories. If you specify only the\npartition_field_value, it returns information about all categories for\nthe specified partition.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.CategoryId" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "doc_count_error_upper_bound": { - "type": "number" - }, - "sum_other_doc_count": { - "type": "number" - } - } - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseMultiTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "from", + "description": "Skips the specified number of categories.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsMultiTermsBucket" - } + "in": "query", + "name": "partition_field_value", + "description": "Only return categories for the specified partition.", + "deprecated": false, + "schema": { + "type": "string" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsMultiTermsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.MultiTermsBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.MultiTermsBucket" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of categories to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" } - ] - }, - "_types.aggregations.MultiTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" - }, - { - "type": "object", - "properties": { - "key": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.FieldValue" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "Configures pagination.\nThis parameter has the `from` and `size` properties.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } } }, - "key_as_string": { - "type": "string" - }, - "doc_count_error_upper_bound": { - "type": "number" + "examples": { + "MlGetCategoriesExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/esxi_log/results/categories` request.", + "value": "{\n \"page\":{\n \"size\": 1\n }\n}" + } } - }, - "required": [ - "key" - ] + } } - ] - }, - "_types.aggregations.MissingAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" - }, + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Category" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "categories", + "count" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/categories/{category_id}\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/categories/{category_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_categories.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.SingleBucketAggregateBase": { - "allOf": [ + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for categories", + "operationId": "ml-get-categories-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "doc_count": { - "type": "number" - } + "in": "path", + "name": "category_id", + "description": "Identifier for the category, which is unique in the job. If you specify\nneither the category ID nor the partition_field_value, the API returns\ninformation about all categories. If you specify only the\npartition_field_value, it returns information about all categories for\nthe specified partition.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.CategoryId" }, - "required": [ - "doc_count" - ] - } - ] - }, - "_types.aggregations.NestedAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + "style": "simple" }, { - "type": "object" - } - ] - }, - "_types.aggregations.ReverseNestedAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + "in": "query", + "name": "from", + "description": "Skips the specified number of categories.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.GlobalAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + "in": "query", + "name": "partition_field_value", + "description": "Only return categories for the specified partition.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "type": "object" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of categories to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" } - ] - }, - "_types.aggregations.FilterAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" - }, - { - "type": "object" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "Configures pagination.\nThis parameter has the `from` and `size` properties.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } + } + }, + "examples": { + "MlGetCategoriesExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/esxi_log/results/categories` request.", + "value": "{\n \"page\":{\n \"size\": 1\n }\n}" + } + } + } } - ] - }, - "_types.aggregations.ChildrenAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" - }, + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Category" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "categories", + "count" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/categories/{category_id}\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/categories/{category_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_categories.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.ParentAggregate": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/results/categories": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for categories", + "operationId": "ml-get-categories-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object" - } - ] - }, - "_types.aggregations.SamplerAggregate": { - "allOf": [ + "in": "query", + "name": "from", + "description": "Skips the specified number of categories.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + "in": "query", + "name": "partition_field_value", + "description": "Only return categories for the specified partition.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "type": "object" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of categories to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" } - ] - }, - "_types.aggregations.UnmappedSamplerAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" - }, + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "Configures pagination.\nThis parameter has the `from` and `size` properties.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } + } + }, + "examples": { + "MlGetCategoriesExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/esxi_log/results/categories` request.", + "value": "{\n \"page\":{\n \"size\": 1\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Category" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "categories", + "count" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/categories\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/categories\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_categories.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.GeoHashGridAggregate": { - "allOf": [ + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for categories", + "operationId": "ml-get-categories-3", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseGeoHashGridBucket" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object" - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseGeoHashGridBucket": { - "allOf": [ + "in": "query", + "name": "from", + "description": "Skips the specified number of categories.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "partition_field_value", + "description": "Only return categories for the specified partition.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsGeoHashGridBucket" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of categories to obtain.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsGeoHashGridBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.GeoHashGridBucket" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "Configures pagination.\nThis parameter has the `from` and `size` properties.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } + } + }, + "examples": { + "MlGetCategoriesExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/esxi_log/results/categories` request.", + "value": "{\n \"page\":{\n \"size\": 1\n }\n}" + } + } } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.GeoHashGridBucket" + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Category" + } + }, + "count": { + "type": "number" + } + }, + "required": [ + "categories", + "count" + ] + } + } } } - ] - }, - "_types.aggregations.GeoHashGridBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" - }, + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/categories\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/categories\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_categories.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/_types.GeoHash" - } - }, - "required": [ - "key" - ] + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.GeoTileGridAggregate": { - "allOf": [ + } + }, + "/_ml/data_frame/analytics": { + "get": { + "tags": [ + "ml data frame" + ], + "summary": "Get data frame analytics job configuration info", + "description": "You can get information for multiple data frame analytics jobs in a single\nAPI request by using a comma-separated list of data frame analytics jobs or a\nwildcard expression.", + "operationId": "ml-get-data-frame-analytics-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseGeoTileGridBucket" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value returns an empty data_frame_analytics array when there\nare no matches and the subset of results when there are partial matches.\nIf this parameter is `false`, the request returns a 404 status code when\nthere are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseGeoTileGridBucket": { - "allOf": [ + "in": "query", + "name": "from", + "description": "Skips the specified number of data frame analytics jobs.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of data frame analytics jobs to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsGeoTileGridBucket" - } + "in": "query", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsGeoTileGridBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.GeoTileGridBucket" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "data_frame_analytics": { + "description": "An array of data frame analytics job resources, which are sorted by the id value in ascending order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSummary" + } + } + }, + "required": [ + "count", + "data_frame_analytics" + ] + } + } } - }, + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.GeoTileGridBucket" - } + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.GeoTileGridBucket": { - "allOf": [ + } + }, + "/_ml/data_frame/analytics/_stats": { + "get": { + "tags": [ + "ml data frame" + ], + "summary": "Get data frame analytics job stats", + "operationId": "ml-get-data-frame-analytics-stats", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value returns an empty data_frame_analytics array when there\nare no matches and the subset of results when there are partial matches.\nIf this parameter is `false`, the request returns a 404 status code when\nthere are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/_types.GeoTile" - } + "in": "query", + "name": "from", + "description": "Skips the specified number of data frame analytics jobs.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "key" - ] - } - ] - }, - "_types.GeoTile": { - "description": "A map tile reference, represented as `{zoom}/{x}/{y}`", - "type": "string" - }, - "_types.aggregations.GeoHexGridAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseGeoHexGridBucket" + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseGeoHexGridBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of data frame analytics jobs to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsGeoHexGridBucket" - } + "in": "query", + "name": "verbose", + "description": "Defines whether the stats response should be verbose.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsGeoHexGridBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.GeoHexGridBucket" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "data_frame_analytics": { + "description": "An array of objects that contain usage information for data frame analytics jobs, which are sorted by the id value in ascending order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DataframeAnalytics" + } + } + }, + "required": [ + "count", + "data_frame_analytics" + ] + } + } } - }, + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_data_frame_analytics_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.GeoHexGridBucket" - } + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.GeoHexGridBucket": { - "allOf": [ + } + }, + "/_ml/data_frame/analytics/{id}/_stats": { + "get": { + "tags": [ + "ml data frame" + ], + "summary": "Get data frame analytics job stats", + "operationId": "ml-get-data-frame-analytics-stats-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job. If you do not specify this\noption, the API returns information for the first hundred data frame\nanalytics jobs.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/_types.GeoHexCell" - } + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value returns an empty data_frame_analytics array when there\nare no matches and the subset of results when there are partial matches.\nIf this parameter is `false`, the request returns a 404 status code when\nthere are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "key" - ] - } - ] - }, - "_types.GeoHexCell": { - "description": "A map hex cell (H3) reference", - "type": "string" - }, - "_types.aggregations.RangeAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseRangeBucket" + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseRangeBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "from", + "description": "Skips the specified number of data frame analytics jobs.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsRangeBucket" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of data frame analytics jobs to obtain.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsRangeBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.RangeBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.RangeBucket" - } + "in": "query", + "name": "verbose", + "description": "Defines whether the stats response should be verbose.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } - ] - }, - "_types.aggregations.RangeBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" - }, - { - "type": "object", - "properties": { - "from": { - "type": "number" - }, - "to": { - "type": "number" - }, - "from_as_string": { - "type": "string" - }, - "to_as_string": { - "type": "string" - }, - "key": { - "description": "The bucket key. Present if the aggregation is _not_ keyed", - "type": "string" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "data_frame_analytics": { + "description": "An array of objects that contain usage information for data frame analytics jobs, which are sorted by the id value in ascending order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DataframeAnalytics" + } + } + }, + "required": [ + "count", + "data_frame_analytics" + ] + } } } } - ] - }, - "_types.aggregations.DateRangeAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.RangeAggregate" - }, + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/{id}/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_data_frame_analytics_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.GeoDistanceAggregate": { - "allOf": [ + } + }, + "/_ml/datafeeds/{datafeed_id}/_stats": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get datafeed stats", + "description": "You can get statistics for multiple datafeeds in a single API request by\nusing a comma-separated list of datafeeds or a wildcard expression. You can\nget statistics for all datafeeds by using `_all`, by specifying `*` as the\n``, or by omitting the ``. If the datafeed is stopped, the\nonly information you receive is the `datafeed_id` and the `state`.\nThis API returns a maximum of 10,000 datafeeds.", + "operationId": "ml-get-datafeed-stats", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.RangeAggregate" + "in": "path", + "name": "datafeed_id", + "description": "Identifier for the datafeed. It can be a datafeed identifier or a\nwildcard expression. If you do not specify one of these options, the API\nreturns information about all datafeeds.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Ids" + }, + "style": "simple" }, { - "type": "object" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no datafeeds that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `datafeeds` array\nwhen there are no matches and the subset of results when there are\npartial matches. If this parameter is `false`, the request returns a\n`404` status code when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } - ] - }, - "_types.aggregations.IpRangeAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseIpRangeBucket" - }, + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "datafeeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DatafeedStats" + } + } + }, + "required": [ + "count", + "datafeeds" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/datafeeds/{datafeed_id}/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_datafeed_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.MultiBucketAggregateBaseIpRangeBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" - }, + } + }, + "/_ml/datafeeds/_stats": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get datafeed stats", + "description": "You can get statistics for multiple datafeeds in a single API request by\nusing a comma-separated list of datafeeds or a wildcard expression. You can\nget statistics for all datafeeds by using `_all`, by specifying `*` as the\n``, or by omitting the ``. If the datafeed is stopped, the\nonly information you receive is the `datafeed_id` and the `state`.\nThis API returns a maximum of 10,000 datafeeds.", + "operationId": "ml-get-datafeed-stats-1", + "parameters": [ { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsIpRangeBucket" - } + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no datafeeds that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `datafeeds` array\nwhen there are no matches and the subset of results when there are\npartial matches. If this parameter is `false`, the request returns a\n`404` status code when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsIpRangeBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.IpRangeBucket" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "datafeeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DatafeedStats" + } + } + }, + "required": [ + "count", + "datafeeds" + ] + } + } } - }, + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/datafeeds/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_datafeed_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.IpRangeBucket" - } + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.IpRangeBucket": { - "allOf": [ + } + }, + "/_ml/datafeeds": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get datafeeds configuration info", + "description": "You can get information for multiple datafeeds in a single API request by\nusing a comma-separated list of datafeeds or a wildcard expression. You can\nget information for all datafeeds by using `_all`, by specifying `*` as the\n``, or by omitting the ``.\nThis API returns a maximum of 10,000 datafeeds.", + "operationId": "ml-get-datafeeds-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no datafeeds that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `datafeeds` array\nwhen there are no matches and the subset of results when there are\npartial matches. If this parameter is `false`, the request returns a\n`404` status code when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" + "in": "query", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "datafeeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Datafeed" + } + } + }, + "required": [ + "count", + "datafeeds" + ] + } } } } - ] - }, - "_types.aggregations.IpPrefixAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseIpPrefixBucket" - }, + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/datafeeds\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_datafeeds.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.MultiBucketAggregateBaseIpPrefixBucket": { - "allOf": [ + } + }, + "/_ml/filters": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get filters", + "description": "You can get a single filter or all filters.", + "operationId": "ml-get-filters", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "from", + "description": "Skips the specified number of filters.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsIpPrefixBucket" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of filters to obtain.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsIpPrefixBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.IpPrefixBucket" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Filter" + } + } + }, + "required": [ + "count", + "filters" + ] + } + } } - }, + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/filters\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "get_filters.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.IpPrefixBucket" - } + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.IpPrefixBucket": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/results/influencers": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for influencers", + "description": "Influencers are the entities that have contributed to, or are to blame for,\nthe anomalies. Influencer results are available only if an\n`influencer_field_name` is specified in the job configuration.", + "operationId": "ml-get-influencers", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "is_ipv6": { - "type": "boolean" - }, - "key": { - "type": "string" - }, - "prefix_length": { - "type": "number" - }, - "netmask": { - "type": "string" - } + "in": "query", + "name": "desc", + "description": "If true, the results are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "is_ipv6", - "key", - "prefix_length" - ] - } - ] - }, - "_types.aggregations.FiltersAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseFiltersBucket" + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseFiltersBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "end", + "description": "Returns influencers with timestamps earlier than this time.\nThe default value means it is unset and results are not limited to\nspecific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsFiltersBucket" - } + "in": "query", + "name": "exclude_interim", + "description": "If true, the output excludes interim results. By default, interim results\nare included.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsFiltersBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.FiltersBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.FiltersBucket" - } - } - ] - }, - "_types.aggregations.FiltersBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "query", + "name": "influencer_score", + "description": "Returns influencers with anomaly scores greater than or equal to this\nvalue.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.AdjacencyMatrixAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseAdjacencyMatrixBucket" + "in": "query", + "name": "from", + "description": "Skips the specified number of influencers.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseAdjacencyMatrixBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of influencers to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsAdjacencyMatrixBucket" - } + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested influencers. By default, the\ninfluencers are sorted by the `influencer_score` value.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsAdjacencyMatrixBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AdjacencyMatrixBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.AdjacencyMatrixBucket" + "in": "query", + "name": "start", + "description": "Returns influencers with timestamps after this time. The default value\nmeans it is unset and results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "Configures pagination.\nThis parameter has the `from` and `size` properties.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } + } + }, + "examples": { + "MlGetInfluencersExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/high_sum_total_sales/results/influencers` request.", + "value": "{\n \"sort\": \"influencer_score\",\n \"desc\": true\n}" + } + } } } - ] - }, - "_types.aggregations.AdjacencyMatrixBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" - }, - { - "type": "object", - "properties": { - "key": { - "type": "string" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "influencers": { + "description": "Array of influencer objects", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Influencer" + } + } + }, + "required": [ + "count", + "influencers" + ] + } } - }, - "required": [ - "key" - ] + } } - ] - }, - "_types.aggregations.SignificantLongTermsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SignificantTermsAggregateBaseSignificantLongTermsBucket" - }, + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/influencers\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/influencers\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_influencers.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.SignificantTermsAggregateBaseSignificantLongTermsBucket": { - "allOf": [ + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job results for influencers", + "description": "Influencers are the entities that have contributed to, or are to blame for,\nthe anomalies. Influencer results are available only if an\n`influencer_field_name` is specified in the job configuration.", + "operationId": "ml-get-influencers-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseSignificantLongTermsBucket" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "bg_count": { - "type": "number" - }, - "doc_count": { - "type": "number" - } - } - } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseSignificantLongTermsBucket": { - "allOf": [ + "in": "query", + "name": "desc", + "description": "If true, the results are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "end", + "description": "Returns influencers with timestamps earlier than this time.\nThe default value means it is unset and results are not limited to\nspecific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsSignificantLongTermsBucket" - } + "in": "query", + "name": "exclude_interim", + "description": "If true, the output excludes interim results. By default, interim results\nare included.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsSignificantLongTermsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.SignificantLongTermsBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.SignificantLongTermsBucket" - } - } - ] - }, - "_types.aggregations.SignificantLongTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SignificantTermsBucketBase" + "in": "query", + "name": "influencer_score", + "description": "Returns influencers with anomaly scores greater than or equal to this\nvalue.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "key": { - "type": "number" - }, - "key_as_string": { - "type": "string" - } + "in": "query", + "name": "from", + "description": "Skips the specified number of influencers.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "key" - ] - } - ] - }, - "_types.aggregations.SignificantTermsBucketBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "style": "form" }, { - "type": "object", - "properties": { - "score": { - "type": "number" - }, - "bg_count": { - "type": "number" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of influencers to obtain.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "score", - "bg_count" - ] - } - ] - }, - "_types.aggregations.SignificantStringTermsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SignificantTermsAggregateBaseSignificantStringTermsBucket" + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.SignificantTermsAggregateBaseSignificantStringTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseSignificantStringTermsBucket" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested influencers. By default, the\ninfluencers are sorted by the `influencer_score` value.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "type": "object", - "properties": { - "bg_count": { - "type": "number" + "in": "query", + "name": "start", + "description": "Returns influencers with timestamps after this time. The default value\nmeans it is unset and results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "description": "Configures pagination.\nThis parameter has the `from` and `size` properties.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + } + } }, - "doc_count": { - "type": "number" + "examples": { + "MlGetInfluencersExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/high_sum_total_sales/results/influencers` request.", + "value": "{\n \"sort\": \"influencer_score\",\n \"desc\": true\n}" + } } } } - ] - }, - "_types.aggregations.MultiBucketAggregateBaseSignificantStringTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" - }, - { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsSignificantStringTermsBucket" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "influencers": { + "description": "Array of influencer objects", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Influencer" + } + } + }, + "required": [ + "count", + "influencers" + ] + } } - }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsSignificantStringTermsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.SignificantStringTermsBucket" } - }, + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/influencers\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/influencers\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_influencers.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.SignificantStringTermsBucket" - } + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.SignificantStringTermsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SignificantTermsBucketBase" - }, + } + }, + "/_ml/anomaly_detectors/_stats": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job stats", + "operationId": "ml-get-job-stats", + "parameters": [ { - "type": "object", - "properties": { - "key": { - "type": "string" - } + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If `false`, the API returns a `404` status\ncode when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "key" - ] + "style": "form" } - ] - }, - "_types.aggregations.UnmappedSignificantTermsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.SignificantTermsAggregateBaseVoid" - }, + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.JobStats" + } + } + }, + "required": [ + "count", + "jobs" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_job_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.SignificantTermsAggregateBaseVoid": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/_stats": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job stats", + "operationId": "ml-get-job-stats-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVoid" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, a comma-separated list of jobs, or a wildcard expression. If\nyou do not specify one of these options, the API returns information for\nall anomaly detection jobs.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "bg_count": { - "type": "number" - }, - "doc_count": { - "type": "number" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If `false`, the API returns a `404` status\ncode when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.JobStats" + } + } + }, + "required": [ + "count", + "jobs" + ] + } } } } - ] - }, - "_types.aggregations.CompositeAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseCompositeBucket" - }, + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_job_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object", - "properties": { - "after_key": { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregateKey" - } - } + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.CompositeAggregateKey": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.FieldValue" - } - }, - "_types.aggregations.MultiBucketAggregateBaseCompositeBucket": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection jobs configuration info", + "description": "You can get information for multiple anomaly detection jobs in a single API\nrequest by using a group name, a comma-separated list of jobs, or a wildcard\nexpression. You can get information for all anomaly detection jobs by using\n`_all`, by specifying `*` as the ``, or by omitting the ``.", + "operationId": "ml-get-jobs-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If this parameter is `false`, the request returns a `404` status\ncode when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsCompositeBucket" - } + "in": "query", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "buckets" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketsCompositeBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.CompositeBucket" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Job" + } + } + }, + "required": [ + "count", + "jobs" + ] + } + } } - }, + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_jobs.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.CompositeBucket" - } + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.CompositeBucket": { - "allOf": [ + } + }, + "/_ml/memory/_stats": { + "get": { + "tags": [ + "ml" + ], + "summary": "Get machine learning memory usage info", + "description": "Get information about how machine learning jobs and trained models are using memory,\non each node, both within the JVM heap, and natively, outside of the JVM.", + "operationId": "ml-get-memory-stats", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is received before the timeout\nexpires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregateKey" - } + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request\nfails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "required": [ - "key" - ] + "style": "form" } - ] - }, - "_types.aggregations.FrequentItemSetsAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseFrequentItemSetsBucket" - }, + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ml.get_memory_stats.Memory" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n GET\n /_ml/memory/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_memory_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.MultiBucketAggregateBaseFrequentItemSetsBucket": { - "allOf": [ + } + }, + "/_ml/memory/{node_id}/_stats": { + "get": { + "tags": [ + "ml" + ], + "summary": "Get machine learning memory usage info", + "description": "Get information about how machine learning jobs and trained models are using memory,\non each node, both within the JVM heap, and natively, outside of the JVM.", + "operationId": "ml-get-memory-stats-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "path", + "name": "node_id", + "description": "The names of particular nodes in the cluster to target. For example, `nodeId1,nodeId2` or\n`ml:true`", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsFrequentItemSetsBucket" - } + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node. If no response is received before the timeout\nexpires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsFrequentItemSetsBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsBucket" - } + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsBucket" - } + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request\nfails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - ] - }, - "_types.aggregations.FrequentItemSetsBucket": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" - }, - { - "type": "object", - "properties": { - "key": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ml.get_memory_stats.Memory" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "nodes" + ] } - }, - "support": { - "type": "number" } - }, - "required": [ - "key", - "support" - ] + } } - ] - }, - "_types.aggregations.TimeSeriesAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseTimeSeriesBucket" - }, + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n GET\n /_ml/memory/{node_id}/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_memory_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.MultiBucketAggregateBaseTimeSeriesBucket": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job model snapshot upgrade usage info", + "operationId": "ml-get-model-snapshot-upgrade-stats", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "buckets": { - "$ref": "#/components/schemas/_types.aggregations.BucketsTimeSeriesBucket" - } + "in": "path", + "name": "snapshot_id", + "description": "A numerical character string that uniquely identifies the model snapshot. You can get information for multiple\nsnapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using `_all`,\nby specifying `*` as the snapshot ID, or by omitting the snapshot ID.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, - "required": [ - "buckets" - ] - } - ] - }, - "_types.aggregations.BucketsTimeSeriesBucket": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.TimeSeriesBucket" - } + "style": "simple" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.TimeSeriesBucket" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n - Contains wildcard expressions and there are no jobs that match.\n - Contains the _all string or no identifiers and there are no matches.\n - Contains wildcard expressions and there are only partial matches.\n\nThe default value is true, which returns an empty jobs array when there are no matches and the subset of results\nwhen there are partial matches. If this parameter is false, the request returns a 404 status code when there are\nno matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "model_snapshot_upgrades": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.ModelSnapshotUpgrade" + } + } + }, + "required": [ + "count", + "model_snapshot_upgrades" + ] + } + } } } + }, + "x-state": "Generally available; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_model_snapshot_upgrade_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.aggregations.TimeSeriesBucket": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/model_snapshots": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get model snapshots info", + "operationId": "ml-get-model-snapshots-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "key": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.FieldValue" - } - } + "in": "query", + "name": "desc", + "description": "If true, the results are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "key" - ] - } - ] - }, - "_types.aggregations.ScriptedMetricAggregate": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "end", + "description": "Returns snapshots with timestamps earlier than this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "value": { - "type": "object" - } + "in": "query", + "name": "from", + "description": "Skips the specified number of snapshots.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "value" - ] - } - ] - }, - "_types.aggregations.TopHitsAggregate": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "size", + "description": "Specifies the maximum number of snapshots to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "hits": { - "$ref": "#/components/schemas/_global.search._types.HitsMetadata" - } + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested snapshots. By default, the\nsnapshots are sorted by their timestamp.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" }, - "required": [ - "hits" - ] + "style": "form" + }, + { + "in": "query", + "name": "start", + "description": "Returns snapshots with timestamps after this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" } - ] - }, - "_global.search._types.HitsMetadata": { - "type": "object", - "properties": { - "total": { - "description": "Total hit count information, present only if `track_total_hits` wasn't `false` in the search request.", - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.TotalHits" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "sort": { + "description": "Refer to the description for the `sort` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } }, - { - "type": "number" + "examples": { + "MlGetModelSnapshotsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots` request.", + "value": "{\n \"start\": \"1575402236000\"\n}" + } } - ] - }, - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Hit" } - }, - "max_score": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] } }, - "required": [ - "hits" - ] - }, - "_global.search._types.TotalHits": { - "type": "object", - "properties": { - "relation": { - "$ref": "#/components/schemas/_global.search._types.TotalHitsRelation" - }, - "value": { - "type": "number" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "model_snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.ModelSnapshot" + } + } + }, + "required": [ + "count", + "model_snapshots" + ] + } + } + } } }, - "required": [ - "relation", - "value" - ] - }, - "_global.search._types.TotalHitsRelation": { - "type": "string", - "enum": [ - "eq", - "gte" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/model_snapshots\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/model_snapshots\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_model_snapshots.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] }, - "_global.search._types.Hit": { - "type": "object", - "properties": { - "_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "_id": { - "$ref": "#/components/schemas/_types.Id" + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get model snapshots info", + "operationId": "ml-get-model-snapshots-3", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "_score": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "desc", + "description": "If true, the results are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "_explanation": { - "$ref": "#/components/schemas/_global.explain.Explanation" + { + "in": "query", + "name": "end", + "description": "Returns snapshots with timestamps earlier than this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "object" - } + { + "in": "query", + "name": "from", + "description": "Skips the specified number of snapshots.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "highlight": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of snapshots to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "inner_hits": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.search._types.InnerHitsResult" - } + { + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested snapshots. By default, the\nsnapshots are sorted by their timestamp.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, - "matched_queries": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { + { + "in": "query", + "name": "start", + "description": "Returns snapshots with timestamps after this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "object", - "additionalProperties": { - "type": "number" - } + "properties": { + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "sort": { + "description": "Refer to the description for the `sort` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } + }, + "examples": { + "MlGetModelSnapshotsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots` request.", + "value": "{\n \"start\": \"1575402236000\"\n}" + } } - ] - }, - "_nested": { - "$ref": "#/components/schemas/_global.search._types.NestedIdentity" - }, - "_ignored": { - "type": "array", - "items": { - "type": "string" } - }, - "ignored_field_values": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "object" + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "model_snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.ModelSnapshot" + } + } + }, + "required": [ + "count", + "model_snapshots" + ] + } } } - }, - "_shard": { - "type": "string" - }, - "_node": { - "type": "string" - }, - "_routing": { - "type": "string" - }, - "_source": { - "type": "object" - }, - "_rank": { - "type": "number" - }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "_primary_term": { - "type": "number" - }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "sort": { - "$ref": "#/components/schemas/_types.SortResults" } }, - "required": [ - "_index" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/model_snapshots\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/model_snapshots\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_model_snapshots.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.IndexName": { - "type": "string" - }, - "_global.explain.Explanation": { - "type": "object", - "properties": { - "description": { - "type": "string" + } + }, + "/_ml/anomaly_detectors/{job_id}/results/overall_buckets": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get overall bucket results", + "description": "Retrievs overall bucket results that summarize the bucket results of\nmultiple anomaly detection jobs.\n\nThe `overall_score` is calculated by combining the scores of all the\nbuckets within the overall bucket span. First, the maximum\n`anomaly_score` per anomaly detection job in the overall bucket is\ncalculated. Then the `top_n` of those scores are averaged to result in\nthe `overall_score`. This means that you can fine-tune the\n`overall_score` so that it is more or less sensitive to the number of\njobs that detect an anomaly at the same time. For example, if you set\n`top_n` to `1`, the `overall_score` is the maximum bucket score in the\noverall bucket. Alternatively, if you set `top_n` to the number of jobs,\nthe `overall_score` is high only when all jobs detect anomalies in that\noverall bucket. If you set the `bucket_span` parameter (to a value\ngreater than its default), the `overall_score` is the maximum\n`overall_score` of the overall buckets that have a span equal to the\njobs' largest bucket span.", + "operationId": "ml-get-overall-buckets", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, a comma-separated list of jobs or groups, or a wildcard\nexpression.\n\nYou can summarize the bucket results for all anomaly detection jobs by\nusing `_all` or by specifying `*` as the ``.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.explain.ExplanationDetail" - } + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the request returns an empty `jobs` array when there are no\nmatches and the subset of results when there are partial matches. If this\nparameter is `false`, the request returns a `404` status code when there\nare no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "value": { - "type": "number" - } - }, - "required": [ - "description", - "details", - "value" - ] - }, - "_global.explain.ExplanationDetail": { - "type": "object", - "properties": { - "description": { - "type": "string" + { + "in": "query", + "name": "bucket_span", + "description": "The span of the overall buckets. Must be greater or equal to the largest\nbucket span of the specified anomaly detection jobs, which is the default\nvalue.\n\nBy default, an overall bucket has a span equal to the largest bucket span\nof the specified anomaly detection jobs. To override that behavior, use\nthe optional `bucket_span` parameter.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.explain.ExplanationDetail" - } + { + "in": "query", + "name": "end", + "description": "Returns overall buckets with timestamps earlier than this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, - "value": { - "type": "number" - } - }, - "required": [ - "description", - "value" - ] - }, - "_global.search._types.InnerHitsResult": { - "type": "object", - "properties": { - "hits": { - "$ref": "#/components/schemas/_global.search._types.HitsMetadata" - } - }, - "required": [ - "hits" - ] - }, - "_global.search._types.NestedIdentity": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" + { + "in": "query", + "name": "exclude_interim", + "description": "If `true`, the output excludes interim results.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "offset": { - "type": "number" + { + "in": "query", + "name": "overall_score", + "description": "Returns overall buckets with overall scores greater than or equal to this\nvalue.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "_nested": { - "$ref": "#/components/schemas/_global.search._types.NestedIdentity" - } - }, - "required": [ - "field", - "offset" - ] - }, - "_types.Field": { - "description": "Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.", - "type": "string" - }, - "_types.SequenceNumber": { - "type": "number" - }, - "_types.VersionNumber": { - "type": "number" - }, - "_types.SortResults": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.FieldValue" - } - }, - "_types.aggregations.InferenceAggregate": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "start", + "description": "Returns overall buckets with timestamps after this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/_types.FieldValue" - }, - "feature_importance": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.InferenceFeatureImportance" + "in": "query", + "name": "top_n", + "description": "The number of top anomaly detection job bucket scores to be used in the\n`overall_score` calculation.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_no_match": { + "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, + "type": "boolean" + }, + "bucket_span": { + "description": "Refer to the description for the `bucket_span` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "exclude_interim": { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, + "type": "boolean" + }, + "overall_score": { + "description": "Refer to the description for the `overall_score` query parameter.", + "type": "number" + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "top_n": { + "description": "Refer to the description for the `top_n` query parameter.", + "default": 1.0, + "type": "number" + } } }, - "top_classes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.InferenceTopClassEntry" + "examples": { + "MlGetOverallBucketsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/job-*/results/overall_buckets` request.", + "value": "{\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n}" } - }, - "warning": { - "type": "string" } } } - ] - }, - "_types.aggregations.InferenceFeatureImportance": { - "type": "object", - "properties": { - "feature_name": { - "type": "string" - }, - "importance": { - "type": "number" - }, - "classes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.InferenceClassImportance" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "overall_buckets": { + "description": "Array of overall bucket objects", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.OverallBucket" + } + } + }, + "required": [ + "count", + "overall_buckets" + ] + } + } } } }, - "required": [ - "feature_name" - ] - }, - "_types.aggregations.InferenceClassImportance": { - "type": "object", - "properties": { - "class_name": { - "type": "string" - }, - "importance": { - "type": "number" + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/overall_buckets\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/overall_buckets\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_overall_buckets.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "required": [ - "class_name", - "importance" ] }, - "_types.aggregations.InferenceTopClassEntry": { - "type": "object", - "properties": { - "class_name": { - "$ref": "#/components/schemas/_types.FieldValue" + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get overall bucket results", + "description": "Retrievs overall bucket results that summarize the bucket results of\nmultiple anomaly detection jobs.\n\nThe `overall_score` is calculated by combining the scores of all the\nbuckets within the overall bucket span. First, the maximum\n`anomaly_score` per anomaly detection job in the overall bucket is\ncalculated. Then the `top_n` of those scores are averaged to result in\nthe `overall_score`. This means that you can fine-tune the\n`overall_score` so that it is more or less sensitive to the number of\njobs that detect an anomaly at the same time. For example, if you set\n`top_n` to `1`, the `overall_score` is the maximum bucket score in the\noverall bucket. Alternatively, if you set `top_n` to the number of jobs,\nthe `overall_score` is high only when all jobs detect anomalies in that\noverall bucket. If you set the `bucket_span` parameter (to a value\ngreater than its default), the `overall_score` is the maximum\n`overall_score` of the overall buckets that have a span equal to the\njobs' largest bucket span.", + "operationId": "ml-get-overall-buckets-1", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, a comma-separated list of jobs or groups, or a wildcard\nexpression.\n\nYou can summarize the bucket results for all anomaly detection jobs by\nusing `_all` or by specifying `*` as the ``.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "class_probability": { - "type": "number" + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the request returns an empty `jobs` array when there are no\nmatches and the subset of results when there are partial matches. If this\nparameter is `false`, the request returns a `404` status code when there\nare no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "class_score": { - "type": "number" - } - }, - "required": [ - "class_name", - "class_probability", - "class_score" - ] - }, - "_types.aggregations.StringStatsAggregate": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "bucket_span", + "description": "The span of the overall buckets. Must be greater or equal to the largest\nbucket span of the specified anomaly detection jobs, which is the default\nvalue.\n\nBy default, an overall bucket has a span equal to the largest bucket span\nof the specified anomaly detection jobs. To override that behavior, use\nthe optional `bucket_span` parameter.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "min_length": { - "oneOf": [ - { - "type": "number" + "in": "query", + "name": "end", + "description": "Returns overall buckets with timestamps earlier than this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + }, + { + "in": "query", + "name": "exclude_interim", + "description": "If `true`, the output excludes interim results.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "overall_score", + "description": "Returns overall buckets with overall scores greater than or equal to this\nvalue.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "start", + "description": "Returns overall buckets with timestamps after this time.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + }, + { + "in": "query", + "name": "top_n", + "description": "The number of top anomaly detection job bucket scores to be used in the\n`overall_score` calculation.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_no_match": { + "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, + "type": "boolean" }, - { - "nullable": true, - "type": "string" - } - ] - }, - "max_length": { - "oneOf": [ - { - "type": "number" + "bucket_span": { + "description": "Refer to the description for the `bucket_span` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - { - "nullable": true, - "type": "string" - } - ] - }, - "avg_length": { - "oneOf": [ - { + "end": { + "description": "Refer to the description for the `end` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "exclude_interim": { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, + "type": "boolean" + }, + "overall_score": { + "description": "Refer to the description for the `overall_score` query parameter.", "type": "number" }, - { - "nullable": true, - "type": "string" + "start": { + "description": "Refer to the description for the `start` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "top_n": { + "description": "Refer to the description for the `top_n` query parameter.", + "default": 1.0, + "type": "number" } - ] + } }, - "entropy": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "distribution": { - "oneOf": [ - { - "type": "object", - "additionalProperties": { + "examples": { + "MlGetOverallBucketsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/job-*/results/overall_buckets` request.", + "value": "{\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { "type": "number" + }, + "overall_buckets": { + "description": "Array of overall bucket objects", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.OverallBucket" + } } }, - { - "nullable": true, - "type": "string" - } - ] - }, - "min_length_as_string": { - "type": "string" - }, - "max_length_as_string": { - "type": "string" - }, - "avg_length_as_string": { - "type": "string" + "required": [ + "count", + "overall_buckets" + ] + } } - }, - "required": [ - "count", - "min_length", - "max_length", - "avg_length", - "entropy" - ] + } } - ] - }, - "_types.aggregations.BoxPlotAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" - }, + }, + "x-state": "Generally available; Added in 6.1.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/overall_buckets\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/overall_buckets\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_overall_buckets.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object", - "properties": { - "min": { - "type": "number" - }, - "max": { - "type": "number" - }, - "q1": { - "type": "number" - }, - "q2": { - "type": "number" - }, - "q3": { - "type": "number" - }, - "lower": { - "type": "number" - }, - "upper": { - "type": "number" - }, - "min_as_string": { - "type": "string" - }, - "max_as_string": { - "type": "string" - }, - "q1_as_string": { - "type": "string" - }, - "q2_as_string": { - "type": "string" - }, - "q3_as_string": { - "type": "string" - }, - "lower_as_string": { - "type": "string" - }, - "upper_as_string": { - "type": "string" - } - }, - "required": [ - "min", - "max", - "q1", - "q2", - "q3", - "lower", - "upper" - ] + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.aggregations.TopMetricsAggregate": { - "allOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/results/records": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly records for an anomaly detection job", + "description": "Records contain the detailed analytical results. They describe the anomalous\nactivity that has been identified in the input data based on the detector\nconfiguration.\nThere can be many anomaly records depending on the characteristics and size\nof the input data. In practice, there are often too many to be able to\nmanually process them. The machine learning features therefore perform a\nsophisticated aggregation of the anomaly records into buckets.\nThe number of record results depends on the number of anomalies found in each\nbucket, which relates to the number of time series being modeled and the\nnumber of detectors.", + "operationId": "ml-get-records", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "top": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.TopMetrics" - } - } + "in": "query", + "name": "desc", + "description": "If true, the results are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "top" - ] - } - ] - }, - "_types.aggregations.TopMetrics": { - "type": "object", - "properties": { - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.FieldValue" - }, - { - "nullable": true, - "type": "string" - } - ] - } + "style": "form" }, - "metrics": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.FieldValue" - }, - { - "nullable": true, - "type": "string" - } - ] - } - } - }, - "required": [ - "sort", - "metrics" - ] - }, - "_types.aggregations.TTestAggregate": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "end", + "description": "Returns records with timestamps earlier than this time. The default value\nmeans results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "value": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "value_as_string": { - "type": "string" - } + "in": "query", + "name": "exclude_interim", + "description": "If `true`, the output excludes interim results.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "value" - ] - } - ] - }, - "_types.aggregations.RateAggregate": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "style": "form" }, { - "type": "object", - "properties": { - "value": { - "type": "number" - }, - "value_as_string": { - "type": "string" - } + "in": "query", + "name": "from", + "description": "Skips the specified number of records.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "value" - ] - } - ] - }, - "_types.aggregations.CumulativeCardinalityAggregate": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "record_score", + "description": "Returns records with anomaly scores greater or equal than this value.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "value": { - "type": "number" - }, - "value_as_string": { - "type": "string" - } + "in": "query", + "name": "size", + "description": "Specifies the maximum number of records to obtain.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "value" - ] - } - ] - }, - "_types.aggregations.MatrixStatsAggregate": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested records.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "type": "object", - "properties": { - "doc_count": { - "type": "number" + "in": "query", + "name": "start", + "description": "Returns records with timestamps after this time. The default value means\nresults are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "exclude_interim": { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, + "type": "boolean" + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "record_score": { + "description": "Refer to the description for the `record_score` query parameter.", + "default": 0.0, + "type": "number" + }, + "sort": { + "description": "Refer to the description for the `sort` query parameter.", + "default": "record_score", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } }, - "fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.MatrixStatsFields" + "examples": { + "MlGetRecordsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/low_request_rate/results/records` request.", + "value": "{\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n}" } } - }, - "required": [ - "doc_count" - ] + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Anomaly" + } + } + }, + "required": [ + "count", + "records" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/records\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/records\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_records.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.aggregations.MatrixStatsFields": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Field" - }, - "count": { - "type": "number" + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly records for an anomaly detection job", + "description": "Records contain the detailed analytical results. They describe the anomalous\nactivity that has been identified in the input data based on the detector\nconfiguration.\nThere can be many anomaly records depending on the characteristics and size\nof the input data. In practice, there are often too many to be able to\nmanually process them. The machine learning features therefore perform a\nsophisticated aggregation of the anomaly records into buckets.\nThe number of record results depends on the number of anomalies found in each\nbucket, which relates to the number of time series being modeled and the\nnumber of detectors.", + "operationId": "ml-get-records-1", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "mean": { - "type": "number" + { + "in": "query", + "name": "desc", + "description": "If true, the results are sorted in descending order.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "variance": { - "type": "number" + { + "in": "query", + "name": "end", + "description": "Returns records with timestamps earlier than this time. The default value\nmeans results are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, - "skewness": { - "type": "number" + { + "in": "query", + "name": "exclude_interim", + "description": "If `true`, the output excludes interim results.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "kurtosis": { - "type": "number" + { + "in": "query", + "name": "from", + "description": "Skips the specified number of records.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "covariance": { - "type": "object", - "additionalProperties": { + { + "in": "query", + "name": "record_score", + "description": "Returns records with anomaly scores greater or equal than this value.", + "deprecated": false, + "schema": { "type": "number" - } + }, + "style": "form" }, - "correlation": { - "type": "object", - "additionalProperties": { + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of records to obtain.", + "deprecated": false, + "schema": { "type": "number" - } - } - }, - "required": [ - "name", - "count", - "mean", - "variance", - "skewness", - "kurtosis", - "covariance", - "correlation" - ] - }, - "_types.aggregations.GeoLineAggregate": { - "allOf": [ + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + "in": "query", + "name": "sort", + "description": "Specifies the sort field for the requested records.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "geometry": { - "$ref": "#/components/schemas/_types.GeoLine" - }, - "properties": { - "type": "object" - } + "in": "query", + "name": "start", + "description": "Returns records with timestamps after this time. The default value means\nresults are not limited to specific timestamps.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" }, - "required": [ - "type", - "geometry", - "properties" - ] + "style": "form" } - ] - }, - "_types.GeoLine": { - "type": "object", - "properties": { - "type": { - "description": "Always `\"LineString\"`", - "type": "string" - }, - "coordinates": { - "description": "Array of `[lon, lat]` coordinates", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "desc": { + "description": "Refer to the description for the `desc` query parameter.", + "default": false, + "type": "boolean" + }, + "end": { + "description": "Refer to the description for the `end` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "exclude_interim": { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, + "type": "boolean" + }, + "page": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Page" + } + ] + }, + "record_score": { + "description": "Refer to the description for the `record_score` query parameter.", + "default": 0.0, + "type": "number" + }, + "sort": { + "description": "Refer to the description for the `sort` query parameter.", + "default": "record_score", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "default": "-1", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } + }, + "examples": { + "MlGetRecordsExample1": { + "description": "An example body for a `GET _ml/anomaly_detectors/low_request_rate/results/records` request.", + "value": "{\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n}" + } } } } }, - "required": [ - "type", - "coordinates" - ] - }, - "_types.ClusterStatistics": { - "type": "object", - "properties": { - "skipped": { - "type": "number" - }, - "successful": { - "type": "number" - }, - "total": { - "type": "number" - }, - "running": { - "type": "number" - }, - "partial": { - "type": "number" - }, - "failed": { - "type": "number" - }, - "details": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ClusterDetails" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Anomaly" + } + } + }, + "required": [ + "count", + "records" + ] + } + } } } }, - "required": [ - "skipped", - "successful", - "total", - "running", - "partial", - "failed" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/results/records\n
\n ", + "
\n POST\n /_ml/anomaly_detectors/{job_id}/results/records\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_records.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.ClusterDetails": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/_types.ClusterSearchStatus" + } + }, + "/_ml/trained_models": { + "get": { + "tags": [ + "ml trained model" + ], + "summary": "Get trained model configuration info", + "operationId": "ml-get-trained-models-1", + "parameters": [ + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n- Contains wildcard expressions and there are no models that match.\n- Contains the _all string or no identifiers and there are no matches.\n- Contains wildcard expressions and there are only partial matches.\n\nIf true, it returns an empty array when there are no matches and the\nsubset of results when there are partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "indices": { - "type": "string" + { + "in": "query", + "name": "decompress_definition", + "description": "Specifies whether the included model definition should be returned as a\nJSON map (true) or in a custom compressed format (false).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "took": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + { + "in": "query", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "timed_out": { - "type": "boolean" + { + "in": "query", + "name": "from", + "description": "Skips the specified number of models.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" + { + "in": "query", + "name": "include", + "description": "A comma delimited string of optional fields to include in the response\nbody.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/ml._types.Include" + }, + "style": "form" }, - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ShardFailure" + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of models to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "tags", + "description": "A comma delimited string of tags. A trained model can have many tags, or\nnone. When supplied, only trained models that contain all the supplied\ntags are returned.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "trained_model_configs": { + "description": "An array of trained model resources, which are sorted by the model_id value in ascending order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TrainedModelConfig" + } + } + }, + "required": [ + "count", + "trained_model_configs" + ] + } + } } } }, - "required": [ - "status", - "indices", - "timed_out" - ] - }, - "_types.ClusterSearchStatus": { - "type": "string", - "enum": [ - "running", - "successful", - "partial", - "skipped", - "failed" - ] - }, - "_types.DurationValueUnitMillis": { - "allOf": [ + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n GET\n /_ml/trained_models\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_trained_models.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.UnitMillis" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.ShardStatistics": { - "type": "object", - "properties": { - "failed": { - "$ref": "#/components/schemas/_types.uint" + } + }, + "/_ml/trained_models/{model_id}/_stats": { + "get": { + "tags": [ + "ml trained model" + ], + "summary": "Get trained models usage info", + "description": "You can get usage information for multiple trained\nmodels in a single API request by using a comma-separated list of model IDs or a wildcard expression.", + "operationId": "ml-get-trained-models-stats", + "parameters": [ + { + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model or a model alias. It can be a\ncomma-separated list or a wildcard expression.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Ids" + }, + "style": "simple" }, - "successful": { - "$ref": "#/components/schemas/_types.uint" + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n- Contains wildcard expressions and there are no models that match.\n- Contains the _all string or no identifiers and there are no matches.\n- Contains wildcard expressions and there are only partial matches.\n\nIf true, it returns an empty array when there are no matches and the\nsubset of results when there are partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "total": { - "$ref": "#/components/schemas/_types.uint" + { + "in": "query", + "name": "from", + "description": "Skips the specified number of models.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ShardFailure" + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of models to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "description": "The total number of trained model statistics that matched the requested ID patterns. Could be higher than the number of items in the trained_model_stats array as the size of the array is restricted by the supplied size parameter.", + "type": "number" + }, + "trained_model_stats": { + "description": "An array of trained model statistics, which are sorted by the model_id value in ascending order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TrainedModelStats" + } + } + }, + "required": [ + "count", + "trained_model_stats" + ] + } + } } - }, - "skipped": { - "$ref": "#/components/schemas/_types.uint" } }, - "required": [ - "failed", - "successful", - "total" - ] - }, - "_types.uint": { - "type": "number" - }, - "_types.ShardFailure": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "node": { - "type": "string" - }, - "reason": { - "$ref": "#/components/schemas/_types.ErrorCause" - }, - "shard": { - "type": "number" - }, - "status": { - "type": "string" + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n GET\n /_ml/trained_models/{model_id}/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_trained_models_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "required": [ - "reason", - "shard" ] - }, - "_types.ErrorCause": { - "type": "object", - "properties": { - "type": { - "description": "The type of error", - "type": "string" - }, - "reason": { - "description": "A human-readable explanation of the error, in English.", - "type": "string" - }, - "stack_trace": { - "description": "The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.", - "type": "string" - }, - "caused_by": { - "$ref": "#/components/schemas/_types.ErrorCause" + } + }, + "/_ml/trained_models/_stats": { + "get": { + "tags": [ + "ml trained model" + ], + "summary": "Get trained models usage info", + "description": "You can get usage information for multiple trained\nmodels in a single API request by using a comma-separated list of model IDs or a wildcard expression.", + "operationId": "ml-get-trained-models-stats-1", + "parameters": [ + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n- Contains wildcard expressions and there are no models that match.\n- Contains the _all string or no identifiers and there are no matches.\n- Contains wildcard expressions and there are only partial matches.\n\nIf true, it returns an empty array when there are no matches and the\nsubset of results when there are partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "root_cause": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ErrorCause" - } + { + "in": "query", + "name": "from", + "description": "Skips the specified number of models.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "suppressed": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ErrorCause" - } + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of models to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" } - }, - "required": [ - "type" - ] - }, - "_global.search._types.Profile": { - "type": "object", - "properties": { - "shards": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.ShardProfile" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "description": "The total number of trained model statistics that matched the requested ID patterns. Could be higher than the number of items in the trained_model_stats array as the size of the array is restricted by the supplied size parameter.", + "type": "number" + }, + "trained_model_stats": { + "description": "An array of trained model statistics, which are sorted by the model_id value in ascending order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TrainedModelStats" + } + } + }, + "required": [ + "count", + "trained_model_stats" + ] + } + } } } }, - "required": [ - "shards" - ] - }, - "_global.search._types.ShardProfile": { - "type": "object", - "properties": { - "aggregations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.AggregationProfile" - } - }, - "cluster": { - "type": "string" - }, - "dfs": { - "$ref": "#/components/schemas/_global.search._types.DfsProfile" - }, - "fetch": { - "$ref": "#/components/schemas/_global.search._types.FetchProfile" - }, - "id": { - "type": "string" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "node_id": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "searches": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.SearchProfile" - } - }, - "shard_id": { - "type": "number" + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n GET\n /_ml/trained_models/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_trained_models_stats.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - }, - "required": [ - "aggregations", - "cluster", - "id", - "index", - "node_id", - "searches", - "shard_id" ] - }, - "_global.search._types.AggregationProfile": { - "type": "object", - "properties": { - "breakdown": { - "$ref": "#/components/schemas/_global.search._types.AggregationBreakdown" - }, - "description": { - "type": "string" - }, - "time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "type": { - "type": "string" + } + }, + "/_ml/trained_models/{model_id}/_infer": { + "post": { + "tags": [ + "ml trained model" + ], + "summary": "Evaluate a trained model", + "operationId": "ml-infer-trained-model", + "parameters": [ + { + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "debug": { - "$ref": "#/components/schemas/_global.search._types.AggregationProfileDebug" + { + "in": "query", + "name": "timeout", + "description": "Controls the amount of time to wait for inference results.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "An array of objects to pass to the model for inference. The objects should contain a fields matching your\nconfigured trained model input. Typically, for NLP models, the field name is `text_field`.\nCurrently, for NLP models, only a single value is allowed.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "inference_config": { + "description": "The inference configuration updates to apply on the API call", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.InferenceConfigUpdateContainer" + } + ] + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "MlInferTrainedModelExample1": { + "description": "An example body for a `POST _ml/trained_models/lang_ident_model_1/_infer` request.", + "value": "{\n \"docs\":[{\"text\": \"The fool doth think he is wise, but the wise man knows himself to be a fool.\"}]\n}" + } + } + } }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.AggregationProfile" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "inference_results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.InferenceResponseResult" + } + } + }, + "required": [ + "inference_results" + ] + } + } } } }, - "required": [ - "breakdown", - "description", - "time_in_nanos", - "type" + "x-state": "Generally available; Added in 8.3.0", + "x-variations": [ + "
\n POST\n /_ml/trained_models/{model_id}/_infer\n
\n " + ], + "x-api": "infer_trained_model.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_global.search._types.AggregationBreakdown": { - "type": "object", - "properties": { - "build_aggregation": { - "type": "number" - }, - "build_aggregation_count": { - "type": "number" - }, - "build_leaf_collector": { - "type": "number" - }, - "build_leaf_collector_count": { - "type": "number" - }, - "collect": { - "type": "number" - }, - "collect_count": { - "type": "number" - }, - "initialize": { - "type": "number" - }, - "initialize_count": { - "type": "number" - }, - "post_collection": { - "type": "number" - }, - "post_collection_count": { - "type": "number" - }, - "reduce": { - "type": "number" - }, - "reduce_count": { - "type": "number" + } + }, + "/_ml/info": { + "get": { + "tags": [ + "ml" + ], + "summary": "Get machine learning information", + "description": "Get defaults and limits used by machine learning.\nThis endpoint is designed to be used by a user interface that needs to fully\nunderstand machine learning configurations where some options are not\nspecified, meaning that the defaults should be used. This endpoint may be\nused to find out what those defaults are. It also provides information about\nthe maximum size of machine learning jobs that could run in the current\ncluster configuration.", + "operationId": "ml-info", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "defaults": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.info.Defaults" + } + ] + }, + "limits": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.info.Limits" + } + ] + }, + "upgrade_mode": { + "type": "boolean" + }, + "native_code": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.info.NativeCode" + } + ] + } + }, + "required": [ + "defaults", + "limits", + "upgrade_mode", + "native_code" + ] + } + } + } } }, - "required": [ - "build_aggregation", - "build_aggregation_count", - "build_leaf_collector", - "build_leaf_collector_count", - "collect", - "collect_count", - "initialize", - "initialize_count", - "reduce", - "reduce_count" - ] - }, - "_types.DurationValueUnitNanos": { - "allOf": [ + "x-state": "Generally available; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_ml/info\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "info.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.UnitNanos" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.UnitNanos": { - "description": "Time unit for nanoseconds", - "type": "number" - }, - "_global.search._types.AggregationProfileDebug": { - "type": "object", - "properties": { - "segments_with_multi_valued_ords": { - "type": "number" - }, - "collection_strategy": { - "type": "string" - }, - "segments_with_single_valued_ords": { - "type": "number" - }, - "total_buckets": { - "type": "number" - }, - "built_buckets": { - "type": "number" - }, - "result_strategy": { - "type": "string" - }, - "has_filter": { - "type": "boolean" - }, - "delegate": { - "type": "string" - }, - "delegate_debug": { - "$ref": "#/components/schemas/_global.search._types.AggregationProfileDebug" - }, - "chars_fetched": { - "type": "number" - }, - "extract_count": { - "type": "number" - }, - "extract_ns": { - "type": "number" - }, - "values_fetched": { - "type": "number" - }, - "collect_analyzed_ns": { - "type": "number" - }, - "collect_analyzed_count": { - "type": "number" - }, - "surviving_buckets": { - "type": "number" - }, - "ordinals_collectors_used": { - "type": "number" - }, - "ordinals_collectors_overhead_too_high": { - "type": "number" - }, - "string_hashing_collectors_used": { - "type": "number" - }, - "numeric_collectors_used": { - "type": "number" - }, - "empty_collectors_used": { - "type": "number" - }, - "deferred_aggregators": { - "type": "array", - "items": { - "type": "string" - } - }, - "segments_with_doc_count_field": { - "type": "number" - }, - "segments_with_deleted_docs": { - "type": "number" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.AggregationProfileDelegateDebugFilter" - } - }, - "segments_counted": { - "type": "number" - }, - "segments_collected": { - "type": "number" - }, - "map_reducer": { - "type": "string" - }, - "brute_force_used": { - "type": "number" - }, - "dynamic_pruning_attempted": { - "type": "number" - }, - "dynamic_pruning_used": { - "type": "number" - }, - "skipped_due_to_no_data": { - "type": "number" - } - } - }, - "_global.search._types.AggregationProfileDelegateDebugFilter": { - "type": "object", - "properties": { - "results_from_metadata": { - "type": "number" - }, - "query": { - "type": "string" - }, - "specialized_for": { - "type": "string" + } + }, + "/_ml/anomaly_detectors/{job_id}/_open": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Open anomaly detection jobs", + "description": "An anomaly detection job must be opened to be ready to receive and analyze\ndata. It can be opened and closed multiple times throughout its lifecycle.\nWhen you open a new job, it starts with an empty model.\nWhen you open an existing job, the most recent model state is automatically\nloaded. The job is ready to resume its analysis from where it left off, once\nnew data is received.", + "operationId": "ml-open-job", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "segments_counted_in_constant_time": { - "type": "number" + { + "in": "query", + "name": "timeout", + "description": "Controls the time to wait until a job has opened.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - } - }, - "_global.search._types.DfsProfile": { - "type": "object", - "properties": { - "statistics": { - "$ref": "#/components/schemas/_global.search._types.DfsStatisticsProfile" - }, - "knn": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.DfsKnnProfile" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timeout": { + "description": "Refer to the description for the `timeout` query parameter.", + "default": "30m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } + }, + "examples": { + "MlOpenJobRequestExample1": { + "description": "A request to open anomaly detection jobs. The timeout specifies to wait 35 minutes for the job to open.\n", + "value": "{\n \"timeout\": \"35m\"\n}" + } + } } } - } - }, - "_global.search._types.DfsStatisticsProfile": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "description": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "breakdown": { - "$ref": "#/components/schemas/_global.search._types.DfsStatisticsBreakdown" - }, - "debug": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.DfsStatisticsProfile" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "opened": { + "type": "boolean" + }, + "node": { + "description": "The ID of the node that the job was started on. In serverless this will be the \"serverless\".\nIf the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + } + }, + "required": [ + "opened", + "node" + ] + }, + "examples": { + "MlOpenJobResponseExample1": { + "description": "A successful response when opening an anomaly detection job.", + "value": "{\n \"opened\": true,\n \"node\": \"node-1\"\n}" + } + } + } } } }, - "required": [ - "type", - "description", - "time_in_nanos", - "breakdown" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/_open\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "open_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_global.search._types.DfsStatisticsBreakdown": { - "type": "object", - "properties": { - "collection_statistics": { - "type": "number" - }, - "collection_statistics_count": { - "type": "number" - }, - "create_weight": { - "type": "number" - }, - "create_weight_count": { - "type": "number" - }, - "rewrite": { - "type": "number" - }, - "rewrite_count": { - "type": "number" + } + }, + "/_ml/anomaly_detectors/{job_id}/_data": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Send data to an anomaly detection job for analysis", + "description": "IMPORTANT: For each job, data can be accepted from only a single connection at a time.\nIt is not currently possible to post data to multiple jobs using wildcards or a comma-separated list.", + "operationId": "ml-post-data", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job. The job must have a state of open to receive and process the data.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "term_statistics": { - "type": "number" + { + "in": "query", + "name": "reset_end", + "description": "Specifies the end of the bucket resetting range.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, - "term_statistics_count": { - "type": "number" - } - }, - "required": [ - "collection_statistics", - "collection_statistics_count", - "create_weight", - "create_weight_count", - "rewrite", - "rewrite_count", - "term_statistics", - "term_statistics_count" - ] - }, - "_global.search._types.DfsKnnProfile": { - "type": "object", - "properties": { - "vector_operations_count": { - "type": "number" - }, - "query": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.KnnQueryProfileResult" + { + "in": "query", + "name": "reset_start", + "description": "Specifies the start of the bucket resetting range.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } } }, - "rewrite_time": { - "type": "number" - }, - "collector": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.KnnCollectorResult" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "processed_record_count": { + "type": "number" + }, + "processed_field_count": { + "type": "number" + }, + "input_bytes": { + "type": "number" + }, + "input_field_count": { + "type": "number" + }, + "invalid_date_count": { + "type": "number" + }, + "missing_field_count": { + "type": "number" + }, + "out_of_order_timestamp_count": { + "type": "number" + }, + "empty_bucket_count": { + "type": "number" + }, + "sparse_bucket_count": { + "type": "number" + }, + "bucket_count": { + "type": "number" + }, + "earliest_record_timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "latest_record_timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "last_data_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "latest_empty_bucket_timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "latest_sparse_bucket_timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "input_record_count": { + "type": "number" + }, + "log_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + } + }, + "required": [ + "job_id", + "processed_record_count", + "processed_field_count", + "input_bytes", + "input_field_count", + "invalid_date_count", + "missing_field_count", + "out_of_order_timestamp_count", + "empty_bucket_count", + "sparse_bucket_count", + "bucket_count", + "input_record_count" + ] + } + } } } }, - "required": [ - "query", - "rewrite_time", - "collector" + "deprecated": true, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/_data\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "post_data.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_global.search._types.KnnQueryProfileResult": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "description": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "breakdown": { - "$ref": "#/components/schemas/_global.search._types.KnnQueryProfileBreakdown" - }, - "debug": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.KnnQueryProfileResult" + } + }, + "/_ml/data_frame/analytics/_preview": { + "get": { + "tags": [ + "ml data frame" + ], + "summary": "Preview features used by data frame analytics", + "description": "Preview the extracted features used by a data frame analytics config.", + "operationId": "ml-preview-data-frame-analytics", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "description": "A data frame analytics config as described in create data frame analytics\njobs. Note that `id` and `dest` don’t need to be provided in the context of\nthis API.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.preview_data_frame_analytics.DataframePreviewConfig" + } + ] + } + } + }, + "examples": { + "MlPreviewDataFrameAnalyticsExample1": { + "description": "An example body for a `POST _ml/data_frame/analytics/_preview` request.", + "value": "{\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}" + } + } } } }, - "required": [ - "type", - "description", - "time_in_nanos", - "breakdown" - ] - }, - "_global.search._types.KnnQueryProfileBreakdown": { - "type": "object", - "properties": { - "advance": { - "type": "number" - }, - "advance_count": { - "type": "number" - }, - "build_scorer": { - "type": "number" - }, - "build_scorer_count": { - "type": "number" - }, - "compute_max_score": { - "type": "number" - }, - "compute_max_score_count": { - "type": "number" - }, - "count_weight": { - "type": "number" - }, - "count_weight_count": { - "type": "number" - }, - "create_weight": { - "type": "number" - }, - "create_weight_count": { - "type": "number" - }, - "match": { - "type": "number" - }, - "match_count": { - "type": "number" - }, - "next_doc": { - "type": "number" - }, - "next_doc_count": { - "type": "number" - }, - "score": { - "type": "number" - }, - "score_count": { - "type": "number" - }, - "set_min_competitive_score": { - "type": "number" - }, - "set_min_competitive_score_count": { - "type": "number" - }, - "shallow_advance": { - "type": "number" - }, - "shallow_advance_count": { - "type": "number" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "feature_values": { + "description": "An array of objects that contain feature name and value pairs. The features have been processed and indicate what will be sent to the model for training.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "required": [ + "feature_values" + ] + } + } + } } }, - "required": [ - "advance", - "advance_count", - "build_scorer", - "build_scorer_count", - "compute_max_score", - "compute_max_score_count", - "count_weight", - "count_weight_count", - "create_weight", - "create_weight_count", - "match", - "match_count", - "next_doc", - "next_doc_count", - "score", - "score_count", - "set_min_competitive_score", - "set_min_competitive_score_count", - "shallow_advance", - "shallow_advance_count" + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/_preview\n
\n ", + "
\n POST\n /_ml/data_frame/analytics/_preview\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "preview_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] }, - "_global.search._types.KnnCollectorResult": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "reason": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.KnnCollectorResult" + "post": { + "tags": [ + "ml data frame" + ], + "summary": "Preview features used by data frame analytics", + "description": "Preview the extracted features used by a data frame analytics config.", + "operationId": "ml-preview-data-frame-analytics-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "description": "A data frame analytics config as described in create data frame analytics\njobs. Note that `id` and `dest` don’t need to be provided in the context of\nthis API.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.preview_data_frame_analytics.DataframePreviewConfig" + } + ] + } + } + }, + "examples": { + "MlPreviewDataFrameAnalyticsExample1": { + "description": "An example body for a `POST _ml/data_frame/analytics/_preview` request.", + "value": "{\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}" + } + } } } }, - "required": [ - "name", - "reason", - "time_in_nanos" - ] - }, - "_global.search._types.FetchProfile": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "description": { - "type": "string" - }, - "time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "breakdown": { - "$ref": "#/components/schemas/_global.search._types.FetchProfileBreakdown" - }, - "debug": { - "$ref": "#/components/schemas/_global.search._types.FetchProfileDebug" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.FetchProfile" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "feature_values": { + "description": "An array of objects that contain feature name and value pairs. The features have been processed and indicate what will be sent to the model for training.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "required": [ + "feature_values" + ] + } + } } } }, - "required": [ - "type", - "description", - "time_in_nanos", - "breakdown" - ] - }, - "_global.search._types.FetchProfileBreakdown": { - "type": "object", - "properties": { - "load_source": { - "type": "number" - }, - "load_source_count": { - "type": "number" - }, - "load_stored_fields": { - "type": "number" - }, - "load_stored_fields_count": { - "type": "number" - }, - "next_reader": { - "type": "number" - }, - "next_reader_count": { - "type": "number" - }, - "process_count": { - "type": "number" - }, - "process": { - "type": "number" + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/_preview\n
\n ", + "
\n POST\n /_ml/data_frame/analytics/_preview\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "preview_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - } - }, - "_global.search._types.FetchProfileDebug": { - "type": "object", - "properties": { - "stored_fields": { - "type": "array", - "items": { - "type": "string" - } - }, - "fast_path": { - "type": "number" + ] + } + }, + "/_ml/data_frame/analytics/{id}/_preview": { + "get": { + "tags": [ + "ml data frame" + ], + "summary": "Preview features used by data frame analytics", + "description": "Preview the extracted features used by a data frame analytics config.", + "operationId": "ml-preview-data-frame-analytics-2", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } - } - }, - "_types.NodeId": { - "type": "string" - }, - "_global.search._types.SearchProfile": { - "type": "object", - "properties": { - "collector": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Collector" - } - }, - "query": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.QueryProfile" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "description": "A data frame analytics config as described in create data frame analytics\njobs. Note that `id` and `dest` don’t need to be provided in the context of\nthis API.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.preview_data_frame_analytics.DataframePreviewConfig" + } + ] + } + } + }, + "examples": { + "MlPreviewDataFrameAnalyticsExample1": { + "description": "An example body for a `POST _ml/data_frame/analytics/_preview` request.", + "value": "{\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}" + } + } } - }, - "rewrite_time": { - "type": "number" } }, - "required": [ - "collector", - "query", - "rewrite_time" - ] - }, - "_global.search._types.Collector": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "reason": { - "type": "string" - }, - "time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Collector" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "feature_values": { + "description": "An array of objects that contain feature name and value pairs. The features have been processed and indicate what will be sent to the model for training.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "required": [ + "feature_values" + ] + } + } } } }, - "required": [ - "name", - "reason", - "time_in_nanos" + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/{id}/_preview\n
\n ", + "
\n POST\n /_ml/data_frame/analytics/{id}/_preview\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "preview_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] }, - "_global.search._types.QueryProfile": { - "type": "object", - "properties": { - "breakdown": { - "$ref": "#/components/schemas/_global.search._types.QueryBreakdown" - }, - "description": { - "type": "string" - }, - "time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "type": { - "type": "string" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.QueryProfile" + "post": { + "tags": [ + "ml data frame" + ], + "summary": "Preview features used by data frame analytics", + "description": "Preview the extracted features used by a data frame analytics config.", + "operationId": "ml-preview-data-frame-analytics-3", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "description": "A data frame analytics config as described in create data frame analytics\njobs. Note that `id` and `dest` don’t need to be provided in the context of\nthis API.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.preview_data_frame_analytics.DataframePreviewConfig" + } + ] + } + } + }, + "examples": { + "MlPreviewDataFrameAnalyticsExample1": { + "description": "An example body for a `POST _ml/data_frame/analytics/_preview` request.", + "value": "{\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}" + } + } } } }, - "required": [ - "breakdown", - "description", - "time_in_nanos", - "type" - ] - }, - "_global.search._types.QueryBreakdown": { - "type": "object", - "properties": { - "advance": { - "type": "number" - }, - "advance_count": { - "type": "number" - }, - "build_scorer": { - "type": "number" - }, - "build_scorer_count": { - "type": "number" - }, - "create_weight": { - "type": "number" - }, - "create_weight_count": { - "type": "number" - }, - "match": { - "type": "number" - }, - "match_count": { - "type": "number" - }, - "shallow_advance": { - "type": "number" - }, - "shallow_advance_count": { - "type": "number" - }, - "next_doc": { - "type": "number" - }, - "next_doc_count": { - "type": "number" - }, - "score": { - "type": "number" - }, - "score_count": { - "type": "number" - }, - "compute_max_score": { - "type": "number" - }, - "compute_max_score_count": { - "type": "number" - }, - "count_weight": { - "type": "number" - }, - "count_weight_count": { - "type": "number" - }, - "set_min_competitive_score": { - "type": "number" - }, - "set_min_competitive_score_count": { - "type": "number" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "feature_values": { + "description": "An array of objects that contain feature name and value pairs. The features have been processed and indicate what will be sent to the model for training.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "required": [ + "feature_values" + ] + } + } + } } }, - "required": [ - "advance", - "advance_count", - "build_scorer", - "build_scorer_count", - "create_weight", - "create_weight_count", - "match", - "match_count", - "shallow_advance", - "shallow_advance_count", - "next_doc", - "next_doc_count", - "score", - "score_count", - "compute_max_score", - "compute_max_score_count", - "count_weight", - "count_weight_count", - "set_min_competitive_score", - "set_min_competitive_score_count" + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_ml/data_frame/analytics/{id}/_preview\n
\n ", + "
\n POST\n /_ml/data_frame/analytics/{id}/_preview\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "preview_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.ScrollId": { - "type": "string" - }, - "_global.search._types.Suggest": { - "oneOf": [ + } + }, + "/_ml/datafeeds/{datafeed_id}/_preview": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Preview a datafeed", + "description": "This API returns the first \"page\" of search results from a datafeed.\nYou can preview an existing datafeed or provide configuration details for a datafeed\nand anomaly detection job in the API. The preview shows the structure of the data\nthat will be passed to the anomaly detection engine.\nIMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that\ncalled the API. However, when the datafeed starts it uses the roles of the last user that created or updated the\ndatafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.\nYou can also use secondary authorization headers to supply the credentials.", + "operationId": "ml-preview-datafeed", + "parameters": [ { - "$ref": "#/components/schemas/_global.search._types.CompletionSuggest" + "in": "path", + "name": "datafeed_id", + "description": "A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase\nalphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric\ncharacters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job\nconfiguration details in the request body.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_global.search._types.PhraseSuggest" + "in": "query", + "name": "start", + "description": "The start time from where the datafeed preview should begin", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_global.search._types.TermSuggest" + "in": "query", + "name": "end", + "description": "The end time when the datafeed preview should stop", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" } - ] - }, - "_global.search._types.CompletionSuggest": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.search._types.SuggestBase" - }, - { - "type": "object", - "properties": { - "options": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.CompletionSuggestOption" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "datafeed_config": { + "description": "The datafeed definition to preview.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedConfig" + } + ] }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.CompletionSuggestOption" - } + "job_config": { + "description": "The configuration details for the anomaly detection job that is associated with the datafeed. If the\n`datafeed_config` object does not include a `job_id` that references an existing anomaly detection job, you must\nsupply this `job_config` object. If you include both a `job_id` and a `job_config`, the latter information is\nused. You cannot specify a `job_config` object unless you also supply a `datafeed_config` object.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobConfig" + } + ] } - ] + } } - }, - "required": [ - "options" - ] + } } - ] - }, - "_global.search._types.CompletionSuggestOption": { - "type": "object", - "properties": { - "collate_match": { - "type": "boolean" - }, - "contexts": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Context" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } } } - }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "_id": { - "type": "string" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "_routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "_score": { - "type": "number" - }, - "_source": { - "type": "object" - }, - "text": { - "type": "string" - }, - "score": { - "type": "number" } }, - "required": [ - "text" - ] - }, - "_global.search._types.Context": { - "description": "Text or location that we want similar documents for or a lookup to a document's field for the text.", - "oneOf": [ - { - "type": "string" - }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/datafeeds/{datafeed_id}/_preview\n
\n ", + "
\n POST\n /_ml/datafeeds/{datafeed_id}/_preview\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "preview_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.GeoLocation" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "_types.Routing": { - "type": "string" - }, - "_global.search._types.SuggestBase": { - "type": "object", - "properties": { - "length": { - "type": "number" - }, - "offset": { - "type": "number" + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Preview a datafeed", + "description": "This API returns the first \"page\" of search results from a datafeed.\nYou can preview an existing datafeed or provide configuration details for a datafeed\nand anomaly detection job in the API. The preview shows the structure of the data\nthat will be passed to the anomaly detection engine.\nIMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that\ncalled the API. However, when the datafeed starts it uses the roles of the last user that created or updated the\ndatafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.\nYou can also use secondary authorization headers to supply the credentials.", + "operationId": "ml-preview-datafeed-1", + "parameters": [ + { + "in": "path", + "name": "datafeed_id", + "description": "A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase\nalphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric\ncharacters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job\nconfiguration details in the request body.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "text": { - "type": "string" - } - }, - "required": [ - "length", - "offset", - "text" - ] - }, - "_global.search._types.PhraseSuggest": { - "allOf": [ { - "$ref": "#/components/schemas/_global.search._types.SuggestBase" + "in": "query", + "name": "start", + "description": "The start time from where the datafeed preview should begin", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "options": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.PhraseSuggestOption" + "in": "query", + "name": "end", + "description": "The end time when the datafeed preview should stop", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "datafeed_config": { + "description": "The datafeed definition to preview.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedConfig" + } + ] }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.PhraseSuggestOption" - } + "job_config": { + "description": "The configuration details for the anomaly detection job that is associated with the datafeed. If the\n`datafeed_config` object does not include a `job_id` that references an existing anomaly detection job, you must\nsupply this `job_config` object. If you include both a `job_id` and a `job_config`, the latter information is\nused. You cannot specify a `job_config` object unless you also supply a `datafeed_config` object.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobConfig" + } + ] } - ] + } } - }, - "required": [ - "options" - ] + } } - ] - }, - "_global.search._types.PhraseSuggestOption": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "score": { - "type": "number" - }, - "highlighted": { - "type": "string" - }, - "collate_match": { - "type": "boolean" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } } }, - "required": [ - "text", - "score" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/datafeeds/{datafeed_id}/_preview\n
\n ", + "
\n POST\n /_ml/datafeeds/{datafeed_id}/_preview\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "preview_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_global.search._types.TermSuggest": { - "allOf": [ + } + }, + "/_ml/datafeeds/_preview": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Preview a datafeed", + "description": "This API returns the first \"page\" of search results from a datafeed.\nYou can preview an existing datafeed or provide configuration details for a datafeed\nand anomaly detection job in the API. The preview shows the structure of the data\nthat will be passed to the anomaly detection engine.\nIMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that\ncalled the API. However, when the datafeed starts it uses the roles of the last user that created or updated the\ndatafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.\nYou can also use secondary authorization headers to supply the credentials.", + "operationId": "ml-preview-datafeed-2", + "parameters": [ { - "$ref": "#/components/schemas/_global.search._types.SuggestBase" + "in": "query", + "name": "start", + "description": "The start time from where the datafeed preview should begin", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "options": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.TermSuggestOption" + "in": "query", + "name": "end", + "description": "The end time when the datafeed preview should stop", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "datafeed_config": { + "description": "The datafeed definition to preview.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedConfig" + } + ] }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.TermSuggestOption" - } + "job_config": { + "description": "The configuration details for the anomaly detection job that is associated with the datafeed. If the\n`datafeed_config` object does not include a `job_id` that references an existing anomaly detection job, you must\nsupply this `job_config` object. If you include both a `job_id` and a `job_config`, the latter information is\nused. You cannot specify a `job_config` object unless you also supply a `datafeed_config` object.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobConfig" + } + ] } - ] + } } - }, - "required": [ - "options" - ] - } - ] - }, - "_global.search._types.TermSuggestOption": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "score": { - "type": "number" - }, - "freq": { - "type": "number" - }, - "highlighted": { - "type": "string" - }, - "collate_match": { - "type": "boolean" + } } }, - "required": [ - "text", - "score", - "freq" - ] - }, - "async_search._types.AsyncSearchResponseBase": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "is_partial": { - "description": "When the query is no longer running, this property indicates whether the search failed or was successfully completed on all shards.\nWhile the query is running, `is_partial` is always set to `true`.", - "type": "boolean" - }, - "is_running": { - "description": "Indicates whether the search is still running or has completed.\n\n> info\n> If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though `is_running` is `false`.", - "type": "boolean" - }, - "expiration_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "expiration_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "start_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "completion_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "completion_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } } }, - "required": [ - "is_partial", - "is_running", - "expiration_time_in_millis", - "start_time_in_millis" - ] - }, - "_types.DateTime": { - "description": "A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a\nnumber of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string\nrepresentation.", - "oneOf": [ - { - "type": "string" - }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/datafeeds/_preview\n
\n ", + "
\n POST\n /_ml/datafeeds/_preview\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "preview_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] }, - "async_search.status.StatusResponseBase": { - "allOf": [ + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Preview a datafeed", + "description": "This API returns the first \"page\" of search results from a datafeed.\nYou can preview an existing datafeed or provide configuration details for a datafeed\nand anomaly detection job in the API. The preview shows the structure of the data\nthat will be passed to the anomaly detection engine.\nIMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that\ncalled the API. However, when the datafeed starts it uses the roles of the last user that created or updated the\ndatafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.\nYou can also use secondary authorization headers to supply the credentials.", + "operationId": "ml-preview-datafeed-3", + "parameters": [ { - "$ref": "#/components/schemas/async_search._types.AsyncSearchResponseBase" + "in": "query", + "name": "start", + "description": "The start time from where the datafeed preview should begin", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "style": "form" }, { - "type": "object", - "properties": { - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "_clusters": { - "$ref": "#/components/schemas/_types.ClusterStatistics" - }, - "completion_status": { - "description": "If the async search completed, this field shows the status code of the search.\nFor example, `200` indicates that the async search was successfully completed.\n`503` indicates that the async search was completed with an error.", - "type": "number" - } + "in": "query", + "name": "end", + "description": "The end time when the datafeed preview should stop", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" }, - "required": [ - "_shards" - ] + "style": "form" } - ] - }, - "_types.Indices": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.IndexName" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "datafeed_config": { + "description": "The datafeed definition to preview.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedConfig" + } + ] + }, + "job_config": { + "description": "The configuration details for the anomaly detection job that is associated with the datafeed. If the\n`datafeed_config` object does not include a `job_id` that references an existing anomaly detection job, you must\nsupply this `job_config` object. If you include both a `job_id` and a `job_config`, the latter information is\nused. You cannot specify a `job_config` object unless you also supply a `datafeed_config` object.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobConfig" + } + ] + } + } + } } } - ] - }, - "_types.query_dsl.Operator": { - "type": "string", - "enum": [ - "and", - "AND", - "or", - "OR" - ] - }, - "_types.Fields": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Field" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } } } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_ml/datafeeds/_preview\n
\n ", + "
\n POST\n /_ml/datafeeds/_preview\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "preview_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.ExpandWildcards": { - "oneOf": [ + } + }, + "/_ml/trained_models/{model_id}/definition/{part}": { + "put": { + "tags": [ + "ml trained model" + ], + "summary": "Create part of a trained model definition", + "operationId": "ml-put-trained-model-definition-part", + "parameters": [ { - "$ref": "#/components/schemas/_types.ExpandWildcard" + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ExpandWildcard" + "in": "path", + "name": "part", + "description": "The definition part number. When the definition is loaded for inference the definition parts are streamed in the\norder of their part number. The first part must be `0` and the final part must be `total_parts - 1`.", + "required": true, + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "definition": { + "description": "The definition part for the model. Must be a base64 encoded string.", + "type": "string" + }, + "total_definition_length": { + "description": "The total uncompressed definition length in bytes. Not base64 encoded.", + "type": "number" + }, + "total_parts": { + "description": "The total number of parts that will be uploaded. Must be greater than 0.", + "type": "number" + } + }, + "required": [ + "definition", + "total_definition_length", + "total_parts" + ] + }, + "examples": { + "MlPutTrainedModelDefinitionPartExample1": { + "description": "An example body for a `PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0` request.", + "value": "{\n \"definition\": \"...\",\n \"total_definition_length\": 265632637,\n \"total_parts\": 64\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } } } + }, + "x-state": "Generally available; Added in 8.0.0", + "x-variations": [ + "
\n PUT\n /_ml/trained_models/{model_id}/definition/{part}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_trained_model_definition_part.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.ExpandWildcard": { - "type": "string", - "enum": [ - "all", - "open", - "closed", - "hidden", - "none" - ] - }, - "_types.SearchType": { - "type": "string", - "enum": [ - "query_then_fetch", - "dfs_query_then_fetch" - ] - }, - "_types.SuggestMode": { - "type": "string", - "enum": [ - "missing", - "popular", - "always" - ] - }, - "_global.search._types.TrackHits": { - "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", - "oneOf": [ + } + }, + "/_ml/trained_models/{model_id}/vocabulary": { + "put": { + "tags": [ + "ml trained model" + ], + "summary": "Create a trained model vocabulary", + "description": "This API is supported only for natural language processing (NLP) models.\nThe vocabulary is stored in the index as described in `inference_config.*.vocabulary` of the trained model definition.", + "operationId": "ml-put-trained-model-vocabulary", + "parameters": [ { - "type": "boolean" + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "vocabulary": { + "description": "The model vocabulary, which must not be empty.", + "type": "array", + "items": { + "type": "string" + } + }, + "merges": { + "description": "The optional model merges if required by the tokenizer.", + "x-state": "Generally available; Added in 8.2.0", + "type": "array", + "items": { + "type": "string" + } + }, + "scores": { + "description": "The optional vocabulary value scores if required by the tokenizer.", + "x-state": "Generally available; Added in 8.9.0", + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "vocabulary" + ] + }, + "examples": { + "MlPutTrainedModelVocabularyExample1": { + "description": "An example body for a `PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/vocabulary` request.", + "value": "{\n \"vocabulary\": [\n \"[PAD]\",\n \"[unused0]\",\n ]\n}" + } + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.0.0", + "x-variations": [ + "
\n PUT\n /_ml/trained_models/{model_id}/vocabulary\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "put_trained_model_vocabulary.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "number" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_global.search._types.SourceConfigParam": { - "description": "Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.\nUsed as a query parameter along with the `_source_includes` and `_source_excludes` parameters.", - "oneOf": [ + } + }, + "/_ml/anomaly_detectors/{job_id}/_reset": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Reset an anomaly detection job", + "description": "All model state and results are deleted. The job is ready to start over as if\nit had just been created.\nIt is not currently possible to reset multiple jobs using wildcards or a\ncomma separated list.", + "operationId": "ml-reset-job", + "parameters": [ { - "type": "boolean" + "in": "path", + "name": "job_id", + "description": "The ID of the job to reset.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.Fields" - } - ] - }, - "_types.aggregations.AggregationContainer": { - "allOf": [ + "in": "query", + "name": "wait_for_completion", + "description": "Should this request wait until the operation has completed before\nreturning.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "type": "object", - "properties": { - "aggregations": { - "description": "Sub-aggregations for this aggregation.\nOnly applies to bucket aggregations.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + "in": "query", + "name": "delete_user_annotations", + "description": "Specifies whether annotations that have been added by the\nuser should be deleted along with any auto-generated annotations when the job is\nreset.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" } - }, - "meta": { - "$ref": "#/components/schemas/_types.Metadata" } } + } + }, + "x-state": "Generally available; Added in 7.14.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/_reset\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "reset_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Revert to a snapshot", + "description": "The machine learning features react quickly to anomalous input, learning new\nbehaviors in data. Highly anomalous input increases the variance in the\nmodels whilst the system learns whether this is a new step-change in behavior\nor a one-off event. In the case where this anomalous input is known to be a\none-off, then it might be appropriate to reset the model state to a time\nbefore this event. For example, you might consider reverting to a saved\nsnapshot after Black Friday or a critical system failure.", + "operationId": "ml-revert-model-snapshot", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "adjacency_matrix": { - "$ref": "#/components/schemas/_types.aggregations.AdjacencyMatrixAggregation" - }, - "auto_date_histogram": { - "$ref": "#/components/schemas/_types.aggregations.AutoDateHistogramAggregation" - }, - "avg": { - "$ref": "#/components/schemas/_types.aggregations.AverageAggregation" - }, - "avg_bucket": { - "$ref": "#/components/schemas/_types.aggregations.AverageBucketAggregation" - }, - "boxplot": { - "$ref": "#/components/schemas/_types.aggregations.BoxplotAggregation" - }, - "bucket_script": { - "$ref": "#/components/schemas/_types.aggregations.BucketScriptAggregation" - }, - "bucket_selector": { - "$ref": "#/components/schemas/_types.aggregations.BucketSelectorAggregation" - }, - "bucket_sort": { - "$ref": "#/components/schemas/_types.aggregations.BucketSortAggregation" - }, - "bucket_count_ks_test": { - "$ref": "#/components/schemas/_types.aggregations.BucketKsAggregation" - }, - "bucket_correlation": { - "$ref": "#/components/schemas/_types.aggregations.BucketCorrelationAggregation" - }, - "cardinality": { - "$ref": "#/components/schemas/_types.aggregations.CardinalityAggregation" - }, - "categorize_text": { - "$ref": "#/components/schemas/_types.aggregations.CategorizeTextAggregation" - }, - "children": { - "$ref": "#/components/schemas/_types.aggregations.ChildrenAggregation" - }, - "composite": { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregation" - }, - "cumulative_cardinality": { - "$ref": "#/components/schemas/_types.aggregations.CumulativeCardinalityAggregation" - }, - "cumulative_sum": { - "$ref": "#/components/schemas/_types.aggregations.CumulativeSumAggregation" - }, - "date_histogram": { - "$ref": "#/components/schemas/_types.aggregations.DateHistogramAggregation" - }, - "date_range": { - "$ref": "#/components/schemas/_types.aggregations.DateRangeAggregation" - }, - "derivative": { - "$ref": "#/components/schemas/_types.aggregations.DerivativeAggregation" - }, - "diversified_sampler": { - "$ref": "#/components/schemas/_types.aggregations.DiversifiedSamplerAggregation" - }, - "extended_stats": { - "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsAggregation" - }, - "extended_stats_bucket": { - "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsBucketAggregation" - }, - "frequent_item_sets": { - "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsAggregation" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "filters": { - "$ref": "#/components/schemas/_types.aggregations.FiltersAggregation" - }, - "geo_bounds": { - "$ref": "#/components/schemas/_types.aggregations.GeoBoundsAggregation" - }, - "geo_centroid": { - "$ref": "#/components/schemas/_types.aggregations.GeoCentroidAggregation" - }, - "geo_distance": { - "$ref": "#/components/schemas/_types.aggregations.GeoDistanceAggregation" - }, - "geohash_grid": { - "$ref": "#/components/schemas/_types.aggregations.GeoHashGridAggregation" - }, - "geo_line": { - "$ref": "#/components/schemas/_types.aggregations.GeoLineAggregation" - }, - "geotile_grid": { - "$ref": "#/components/schemas/_types.aggregations.GeoTileGridAggregation" - }, - "geohex_grid": { - "$ref": "#/components/schemas/_types.aggregations.GeohexGridAggregation" - }, - "global": { - "$ref": "#/components/schemas/_types.aggregations.GlobalAggregation" - }, - "histogram": { - "$ref": "#/components/schemas/_types.aggregations.HistogramAggregation" - }, - "ip_range": { - "$ref": "#/components/schemas/_types.aggregations.IpRangeAggregation" - }, - "ip_prefix": { - "$ref": "#/components/schemas/_types.aggregations.IpPrefixAggregation" - }, - "inference": { - "$ref": "#/components/schemas/_types.aggregations.InferenceAggregation" - }, - "line": { - "$ref": "#/components/schemas/_types.aggregations.GeoLineAggregation" - }, - "matrix_stats": { - "$ref": "#/components/schemas/_types.aggregations.MatrixStatsAggregation" - }, - "max": { - "$ref": "#/components/schemas/_types.aggregations.MaxAggregation" - }, - "max_bucket": { - "$ref": "#/components/schemas/_types.aggregations.MaxBucketAggregation" - }, - "median_absolute_deviation": { - "$ref": "#/components/schemas/_types.aggregations.MedianAbsoluteDeviationAggregation" - }, - "min": { - "$ref": "#/components/schemas/_types.aggregations.MinAggregation" - }, - "min_bucket": { - "$ref": "#/components/schemas/_types.aggregations.MinBucketAggregation" - }, - "missing": { - "$ref": "#/components/schemas/_types.aggregations.MissingAggregation" - }, - "moving_avg": { - "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregation" - }, - "moving_percentiles": { - "$ref": "#/components/schemas/_types.aggregations.MovingPercentilesAggregation" - }, - "moving_fn": { - "$ref": "#/components/schemas/_types.aggregations.MovingFunctionAggregation" - }, - "multi_terms": { - "$ref": "#/components/schemas/_types.aggregations.MultiTermsAggregation" - }, - "nested": { - "$ref": "#/components/schemas/_types.aggregations.NestedAggregation" - }, - "normalize": { - "$ref": "#/components/schemas/_types.aggregations.NormalizeAggregation" - }, - "parent": { - "$ref": "#/components/schemas/_types.aggregations.ParentAggregation" - }, - "percentile_ranks": { - "$ref": "#/components/schemas/_types.aggregations.PercentileRanksAggregation" - }, - "percentiles": { - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregation" - }, - "percentiles_bucket": { - "$ref": "#/components/schemas/_types.aggregations.PercentilesBucketAggregation" - }, - "range": { - "$ref": "#/components/schemas/_types.aggregations.RangeAggregation" - }, - "rare_terms": { - "$ref": "#/components/schemas/_types.aggregations.RareTermsAggregation" - }, - "rate": { - "$ref": "#/components/schemas/_types.aggregations.RateAggregation" - }, - "reverse_nested": { - "$ref": "#/components/schemas/_types.aggregations.ReverseNestedAggregation" - }, - "random_sampler": { - "$ref": "#/components/schemas/_types.aggregations.RandomSamplerAggregation" - }, - "sampler": { - "$ref": "#/components/schemas/_types.aggregations.SamplerAggregation" - }, - "scripted_metric": { - "$ref": "#/components/schemas/_types.aggregations.ScriptedMetricAggregation" - }, - "serial_diff": { - "$ref": "#/components/schemas/_types.aggregations.SerialDifferencingAggregation" - }, - "significant_terms": { - "$ref": "#/components/schemas/_types.aggregations.SignificantTermsAggregation" - }, - "significant_text": { - "$ref": "#/components/schemas/_types.aggregations.SignificantTextAggregation" - }, - "stats": { - "$ref": "#/components/schemas/_types.aggregations.StatsAggregation" - }, - "stats_bucket": { - "$ref": "#/components/schemas/_types.aggregations.StatsBucketAggregation" - }, - "string_stats": { - "$ref": "#/components/schemas/_types.aggregations.StringStatsAggregation" - }, - "sum": { - "$ref": "#/components/schemas/_types.aggregations.SumAggregation" - }, - "sum_bucket": { - "$ref": "#/components/schemas/_types.aggregations.SumBucketAggregation" - }, - "terms": { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregation" - }, - "time_series": { - "$ref": "#/components/schemas/_types.aggregations.TimeSeriesAggregation" - }, - "top_hits": { - "$ref": "#/components/schemas/_types.aggregations.TopHitsAggregation" - }, - "t_test": { - "$ref": "#/components/schemas/_types.aggregations.TTestAggregation" - }, - "top_metrics": { - "$ref": "#/components/schemas/_types.aggregations.TopMetricsAggregation" - }, - "value_count": { - "$ref": "#/components/schemas/_types.aggregations.ValueCountAggregation" - }, - "weighted_avg": { - "$ref": "#/components/schemas/_types.aggregations.WeightedAverageAggregation" - }, - "variable_width_histogram": { - "$ref": "#/components/schemas/_types.aggregations.VariableWidthHistogramAggregation" - } + "in": "path", + "name": "snapshot_id", + "description": "You can specify `empty` as the . Reverting to the empty\nsnapshot means the anomaly detection job starts learning a new model from\nscratch when it is started.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, - "minProperties": 1, - "maxProperties": 1 - } - ] - }, - "_types.aggregations.AdjacencyMatrixAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "style": "simple" }, { - "type": "object", - "properties": { - "filters": { - "description": "Filters used to create buckets.\nAt least one filter is required.", + "in": "query", + "name": "delete_intervening_results", + "description": "If true, deletes the results in the time period between the latest\nresults and the time of the reverted snapshot. It also resets the model\nto accept records for this time period. If you choose not to delete\nintervening results when reverting a snapshot, the job will not accept\ninput data that is older than the current time. If you want to resend\ndata, then delete the intervening results.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "properties": { + "delete_intervening_results": { + "description": "Refer to the description for the `delete_intervening_results` query parameter.", + "default": false, + "type": "boolean" + } } }, - "separator": { - "description": "Separator used to concatenate filter names. Defaults to &.", - "type": "string" + "examples": { + "MlRevertModelSnapshotExample1": { + "description": "An example body for a `POST _ml/anomaly_detectors/low_request_rate/model_snapshots/1637092688/_revert` request.", + "value": "{\n \"delete_intervening_results\": true\n}" + } } } } - ] - }, - "_types.query_dsl.QueryContainer": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl" }, - "description": "An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.", - "type": "object", - "properties": { - "bool": { - "$ref": "#/components/schemas/_types.query_dsl.BoolQuery" - }, - "boosting": { - "$ref": "#/components/schemas/_types.query_dsl.BoostingQuery" - }, - "common": { - "deprecated": true, - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.CommonTermsQuery" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelSnapshot" + } + ] + } + }, + "required": [ + "model" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "revert_model_snapshot.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/set_upgrade_mode": { + "post": { + "tags": [ + "ml" + ], + "summary": "Set upgrade_mode for ML indices", + "description": "Sets a cluster wide upgrade_mode setting that prepares machine learning\nindices for an upgrade.\nWhen upgrading your cluster, in some circumstances you must restart your\nnodes and reindex your machine learning indices. In those circumstances,\nthere must be no machine learning jobs running. You can close the machine\nlearning jobs, do the upgrade, then open all the jobs again. Alternatively,\nyou can use this API to temporarily halt tasks associated with the jobs and\ndatafeeds and prevent new jobs from opening. You can also use this API\nduring upgrades that do not require you to reindex your machine learning\nindices, though stopping jobs is not a requirement in that case.\nYou can see the current value for the upgrade_mode setting by using the get\nmachine learning info API.", + "operationId": "ml-set-upgrade-mode", + "parameters": [ + { + "in": "query", + "name": "enabled", + "description": "When `true`, it enables `upgrade_mode` which temporarily halts all job\nand datafeed tasks and prohibits new job and datafeed tasks from\nstarting.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "minProperties": 1, - "maxProperties": 1 - }, - "combined_fields": { - "$ref": "#/components/schemas/_types.query_dsl.CombinedFieldsQuery" - }, - "constant_score": { - "$ref": "#/components/schemas/_types.query_dsl.ConstantScoreQuery" - }, - "dis_max": { - "$ref": "#/components/schemas/_types.query_dsl.DisMaxQuery" - }, - "distance_feature": { - "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQuery" - }, - "exists": { - "$ref": "#/components/schemas/_types.query_dsl.ExistsQuery" - }, - "function_score": { - "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreQuery" + "style": "form" }, - "fuzzy": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-fuzzy-query" - }, - "description": "Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.FuzzyQuery" + { + "in": "query", + "name": "timeout", + "description": "The time to wait for the request to be completed.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "minProperties": 1, - "maxProperties": 1 - }, - "geo_bounding_box": { - "$ref": "#/components/schemas/_types.query_dsl.GeoBoundingBoxQuery" - }, - "geo_distance": { - "$ref": "#/components/schemas/_types.query_dsl.GeoDistanceQuery" - }, - "geo_grid": { - "description": "Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.GeoGridQuery" + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 6.7.0", + "x-variations": [ + "
\n POST\n /_ml/set_upgrade_mode\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "set_upgrade_mode.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/data_frame/analytics/{id}/_start": { + "post": { + "tags": [ + "ml data frame" + ], + "summary": "Start a data frame analytics job", + "description": "A data frame analytics job can be started and stopped multiple times\nthroughout its lifecycle.\nIf the destination index does not exist, it is created automatically the\nfirst time you start the data frame analytics job. The\n`index.number_of_shards` and `index.number_of_replicas` settings for the\ndestination index are copied from the source index. If there are multiple\nsource indices, the destination index copies the highest setting values. The\nmappings for the destination index are also copied from the source indices.\nIf there are any mapping conflicts, the job fails to start.\nIf the destination index exists, it is used as is. You can therefore set up\nthe destination index in advance with custom settings and mappings.", + "operationId": "ml-start-data-frame-analytics", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, - "minProperties": 1, - "maxProperties": 1 - }, - "geo_polygon": { - "$ref": "#/components/schemas/_types.query_dsl.GeoPolygonQuery" - }, - "geo_shape": { - "$ref": "#/components/schemas/_types.query_dsl.GeoShapeQuery" - }, - "has_child": { - "$ref": "#/components/schemas/_types.query_dsl.HasChildQuery" - }, - "has_parent": { - "$ref": "#/components/schemas/_types.query_dsl.HasParentQuery" - }, - "ids": { - "$ref": "#/components/schemas/_types.query_dsl.IdsQuery" + "style": "simple" }, - "intervals": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-intervals-query" + { + "in": "query", + "name": "timeout", + "description": "Controls the amount of time to wait until the data frame analytics job\nstarts.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "description": "Returns documents based on the order and proximity of matching terms.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsQuery" + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "If provided, must be the same identifier as in the path.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "timeout": { + "description": "Controls the amount of time to wait until the data frame analytics job\nstarts.", + "default": "20s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "node": { + "description": "The ID of the node that the job was started on. If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string.\nThe node ID of the node the job has been assigned to, or\nan empty string if it hasn't been assigned to a node. In\nserverless if the job has been assigned to run then the\nnode ID will be \"serverless\".", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + } + }, + "required": [ + "acknowledged", + "node" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n POST\n /_ml/data_frame/analytics/{id}/_start\n
\n " + ], + "x-req-auth": [ + "Index privileges: `create_index`,`index`,`manage`,`read`,`view_index_metadata`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "start_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/datafeeds/{datafeed_id}/_start": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Start datafeeds", + "description": "A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped\nmultiple times throughout its lifecycle.\n\nBefore you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.\n\nIf you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.\nIf new data was indexed for that exact millisecond between stopping and starting, it will be ignored.\n\nWhen Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or\nupdate it had at the time of creation or update and runs the query using those same roles. If you provided secondary\nauthorization headers when you created or updated the datafeed, those credentials are used instead.", + "operationId": "ml-start-datafeed", + "parameters": [ + { + "in": "path", + "name": "datafeed_id", + "description": "A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase\nalphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric\ncharacters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, - "minProperties": 1, - "maxProperties": 1 - }, - "knn": { - "$ref": "#/components/schemas/_types.KnnQuery" + "style": "simple" }, - "match": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query" - }, - "description": "Returns documents that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.MatchQuery" + { + "in": "query", + "name": "end", + "description": "The time that the datafeed should end, which can be specified by using one of the following formats:\n\n* ISO 8601 format with milliseconds, for example `2017-01-22T06:00:00.000Z`\n* ISO 8601 format without milliseconds, for example `2017-01-22T06:00:00+00:00`\n* Milliseconds since the epoch, for example `1485061200000`\n\nDate-time arguments using either of the ISO 8601 formats must have a time zone designator, where `Z` is accepted\nas an abbreviation for UTC time. When a URL is expected (for example, in browsers), the `+` used in time zone\ndesignators must be encoded as `%2B`.\nThe end time value is exclusive. If you do not specify an end time, the datafeed\nruns continuously.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" }, - "minProperties": 1, - "maxProperties": 1 - }, - "match_all": { - "$ref": "#/components/schemas/_types.query_dsl.MatchAllQuery" + "style": "form" }, - "match_bool_prefix": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-bool-prefix-query" - }, - "description": "Analyzes its input and constructs a `bool` query from the terms.\nEach term except the last is used in a `term` query.\nThe last term is used in a prefix query.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.MatchBoolPrefixQuery" + { + "in": "query", + "name": "start", + "description": "The time that the datafeed should begin, which can be specified by using the same formats as the `end` parameter.\nThis value is inclusive.\nIf you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis\nstarts from the earliest time for which data is available.\nIf you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest\nprocessed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DateTime" }, - "minProperties": 1, - "maxProperties": 1 - }, - "match_none": { - "$ref": "#/components/schemas/_types.query_dsl.MatchNoneQuery" + "style": "form" }, - "match_phrase": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase" - }, - "description": "Analyzes the text and creates a phrase query out of the analyzed text.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.MatchPhraseQuery" + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait until a datafeed starts.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "minProperties": 1, - "maxProperties": 1 - }, - "match_phrase_prefix": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase-prefix" - }, - "description": "Returns documents that contain the words of a provided text, in the same order as provided.\nThe last term of the provided text is treated as a prefix, matching any words that begin with that term.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.MatchPhrasePrefixQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "more_like_this": { - "$ref": "#/components/schemas/_types.query_dsl.MoreLikeThisQuery" - }, - "multi_match": { - "$ref": "#/components/schemas/_types.query_dsl.MultiMatchQuery" - }, - "nested": { - "$ref": "#/components/schemas/_types.query_dsl.NestedQuery" - }, - "parent_id": { - "$ref": "#/components/schemas/_types.query_dsl.ParentIdQuery" - }, - "percolate": { - "$ref": "#/components/schemas/_types.query_dsl.PercolateQuery" - }, - "pinned": { - "$ref": "#/components/schemas/_types.query_dsl.PinnedQuery" - }, - "prefix": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-prefix-query" - }, - "description": "Returns documents that contain a specific prefix in a provided field.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.PrefixQuery" + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "end": { + "description": "Refer to the description for the `end` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "start": { + "description": "Refer to the description for the `start` query parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "timeout": { + "description": "Refer to the description for the `timeout` query parameter.", + "default": "20s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } + }, + "examples": { + "MlStartDatafeedExample1": { + "description": "An example body for a `POST _ml/datafeeds/datafeed-low_request_rate/_start` request.", + "value": "{\n \"start\": \"2019-04-07T18:22:16Z\"\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "description": "The ID of the node that the job was started on. In serverless this will be the \"serverless\".\nIf the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeIds" + } + ] + }, + "started": { + "description": "For a successful response, this value is always `true`. On failure, an exception is returned instead.", + "type": "boolean" + } + }, + "required": [ + "node", + "started" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n POST\n /_ml/datafeeds/{datafeed_id}/_start\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "start_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/trained_models/{model_id}/deployment/_start": { + "post": { + "tags": [ + "ml trained model" + ], + "summary": "Start a trained model deployment", + "description": "It allocates the model to every machine learning node.", + "operationId": "ml-start-trained-model-deployment", + "parameters": [ + { + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model. Currently, only PyTorch models are supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, - "minProperties": 1, - "maxProperties": 1 - }, - "query_string": { - "$ref": "#/components/schemas/_types.query_dsl.QueryStringQuery" + "style": "simple" }, - "range": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-range-query" - }, - "description": "Returns documents that contain terms within a provided range.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.RangeQuery" + { + "in": "query", + "name": "cache_size", + "description": "The inference cache size (in memory outside the JVM heap) per node for the model.\nThe default value is the same size as the `model_size_bytes`. To disable the cache,\n`0b` can be provided.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ByteSize" }, - "minProperties": 1, - "maxProperties": 1 - }, - "rank_feature": { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureQuery" + "style": "form" }, - "regexp": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-regexp-query" - }, - "description": "Returns documents that contain terms matching a regular expression.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.RegexpQuery" + { + "in": "query", + "name": "deployment_id", + "description": "A unique identifier for the deployment of the model.", + "deprecated": false, + "schema": { + "type": "string" }, - "minProperties": 1, - "maxProperties": 1 - }, - "rule": { - "$ref": "#/components/schemas/_types.query_dsl.RuleQuery" - }, - "script": { - "$ref": "#/components/schemas/_types.query_dsl.ScriptQuery" - }, - "script_score": { - "$ref": "#/components/schemas/_types.query_dsl.ScriptScoreQuery" - }, - "semantic": { - "$ref": "#/components/schemas/_types.query_dsl.SemanticQuery" - }, - "shape": { - "$ref": "#/components/schemas/_types.query_dsl.ShapeQuery" - }, - "simple_query_string": { - "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringQuery" - }, - "span_containing": { - "$ref": "#/components/schemas/_types.query_dsl.SpanContainingQuery" - }, - "span_field_masking": { - "$ref": "#/components/schemas/_types.query_dsl.SpanFieldMaskingQuery" - }, - "span_first": { - "$ref": "#/components/schemas/_types.query_dsl.SpanFirstQuery" - }, - "span_multi": { - "$ref": "#/components/schemas/_types.query_dsl.SpanMultiTermQuery" - }, - "span_near": { - "$ref": "#/components/schemas/_types.query_dsl.SpanNearQuery" - }, - "span_not": { - "$ref": "#/components/schemas/_types.query_dsl.SpanNotQuery" - }, - "span_or": { - "$ref": "#/components/schemas/_types.query_dsl.SpanOrQuery" + "x-state": "Generally available; Added in 8.8.0", + "style": "form" }, - "span_term": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-term-query" - }, - "description": "Matches spans containing a term.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.SpanTermQuery" + { + "in": "query", + "name": "number_of_allocations", + "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", + "deprecated": false, + "schema": { + "type": "number" }, - "minProperties": 1, - "maxProperties": 1 - }, - "span_within": { - "$ref": "#/components/schemas/_types.query_dsl.SpanWithinQuery" - }, - "sparse_vector": { - "$ref": "#/components/schemas/_types.query_dsl.SparseVectorQuery" + "style": "form" }, - "term": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-term-query" - }, - "description": "Returns documents that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.TermQuery" + { + "in": "query", + "name": "priority", + "description": "The deployment priority", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/ml._types.TrainingPriority" }, - "minProperties": 1, - "maxProperties": 1 - }, - "terms": { - "$ref": "#/components/schemas/_types.query_dsl.TermsQuery" + "style": "form" }, - "terms_set": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-terms-set-query" - }, - "description": "Returns documents that contain a minimum number of exact terms in a provided field.\nTo return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.TermsSetQuery" + { + "in": "query", + "name": "queue_capacity", + "description": "Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds\nthis value, new requests are rejected with a 429 error.", + "deprecated": false, + "schema": { + "type": "number" }, - "minProperties": 1, - "maxProperties": 1 + "style": "form" }, - "text_expansion": { - "deprecated": true, - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-text-expansion-query" - }, - "description": "Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.TextExpansionQuery" + { + "in": "query", + "name": "threads_per_allocation", + "description": "Sets the number of threads used by each model allocation during inference. This generally increases\nthe inference speed. The inference process is a compute-bound process; any number\ngreater than the number of available hardware threads on the machine does not increase the\ninference speed. If this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.", + "deprecated": false, + "schema": { + "type": "number" }, - "minProperties": 1, - "maxProperties": 1 + "style": "form" }, - "weighted_tokens": { - "deprecated": true, - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-weighted-tokens-query" - }, - "description": "Supports returning text_expansion query results by sending in precomputed tokens with the query.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.WeightedTokensQuery" + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the model to deploy.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "minProperties": 1, - "maxProperties": 1 + "style": "form" }, - "wildcard": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-wildcard-query" - }, - "description": "Returns documents that contain terms matching a wildcard pattern.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.WildcardQuery" + { + "in": "query", + "name": "wait_for", + "description": "Specifies the allocation status to wait for before returning.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/ml._types.DeploymentAllocationState" }, - "minProperties": 1, - "maxProperties": 1 - }, - "wrapper": { - "$ref": "#/components/schemas/_types.query_dsl.WrapperQuery" - }, - "type": { - "$ref": "#/components/schemas/_types.query_dsl.TypeQuery" + "style": "form" } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.query_dsl.BoolQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "filter": { - "description": "The clause (query) must appear in matching documents.\nHowever, unlike `must`, the score of the query will be ignored.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - ] - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "must": { - "description": "The clause (query) must appear in matching documents and will contribute to the score.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "adaptive_allocations": { + "description": "Adaptive allocations configuration. When enabled, the number of allocations\nis set based on the current load.\nIf adaptive_allocations is enabled, do not set the number of allocations manually.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings" + } + ] } - ] - }, - "must_not": { - "description": "The clause (query) must not appear in the matching documents.\nBecause scoring is ignored, a score of `0` is returned for all documents.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "assignment": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelAssignment" + } + ] } - } - ] - }, - "should": { - "description": "The clause (query) should appear in the matching document.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - ] + "required": [ + "assignment" + ] + } } } } - ] - }, - "_types.MinimumShouldMatch": { - "description": "The minimum number of terms that should match as integer, percentage or range", - "oneOf": [ - { - "type": "number" - }, + }, + "x-state": "Generally available; Added in 8.0.0", + "x-variations": [ + "
\n POST\n /_ml/trained_models/{model_id}/deployment/_start\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "start_trained_model_deployment.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "string" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.query_dsl.QueryBase": { - "type": "object", - "properties": { - "boost": { - "description": "Floating point number used to decrease or increase the relevance scores of the query.\nBoost values are relative to the default value of 1.0.\nA boost value between 0 and 1.0 decreases the relevance score.\nA value greater than 1.0 increases the relevance score.", - "type": "number" - }, - "_name": { - "type": "string" - } - } - }, - "_types.query_dsl.BoostingQuery": { - "allOf": [ + } + }, + "/_ml/data_frame/analytics/{id}/_stop": { + "post": { + "tags": [ + "ml data frame" + ], + "summary": "Stop data frame analytics jobs", + "description": "A data frame analytics job can be started and stopped multiple times\nthroughout its lifecycle.", + "operationId": "ml-stop-data-frame-analytics", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "negative_boost": { - "description": "Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query.", - "type": "number" - }, - "negative": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "positive": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is true, which returns an empty data_frame_analytics\narray when there are no matches and the subset of results when there are\npartial matches. If this parameter is false, the request returns a 404\nstatus code when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "negative_boost", - "negative", - "positive" - ] - } - ] - }, - "_types.query_dsl.CommonTermsQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "style": "form" }, { - "type": "object", - "properties": { - "analyzer": { - "type": "string" - }, - "cutoff_frequency": { - "type": "number" - }, - "high_freq_operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "low_freq_operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "query": { - "type": "string" - } + "in": "query", + "name": "force", + "description": "If true, the data frame analytics job is stopped forcefully.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "query" - ] - } - ] - }, - "_types.query_dsl.CombinedFieldsQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "fields": { - "description": "List of fields to search. Field wildcard patterns are allowed. Only `text` fields are supported, and they must all have the same search `analyzer`.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "query": { - "description": "Text to search for in the provided `fields`.\nThe `combined_fields` query analyzes the provided text before performing a search.", - "type": "string" - }, - "auto_generate_synonyms_phrase_query": { - "description": "If true, match phrase queries are automatically created for multi-term synonyms.", - "type": "boolean" - }, - "operator": { - "$ref": "#/components/schemas/_types.query_dsl.CombinedFieldsOperator" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.CombinedFieldsZeroTerms" - } + "in": "query", + "name": "timeout", + "description": "Controls the amount of time to wait until the data frame analytics job\nstops. Defaults to 20 seconds.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "required": [ - "fields", - "query" - ] + "style": "form" } - ] - }, - "_types.query_dsl.CombinedFieldsOperator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "_types.query_dsl.CombinedFieldsZeroTerms": { - "type": "string", - "enum": [ - "none", - "all" - ] - }, - "_types.query_dsl.ConstantScoreQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "If provided, must be the same identifier as in the path.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "allow_no_match": { + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is true, which returns an empty data_frame_analytics\narray when there are no matches and the subset of results when there are\npartial matches. If this parameter is false, the request returns a 404\nstatus code when there are no matches or only partial matches.", + "default": true, + "type": "boolean" + }, + "force": { + "description": "If true, the data frame analytics job is stopped forcefully.", + "default": false, + "type": "boolean" + }, + "timeout": { + "description": "Controls the amount of time to wait until the data frame analytics job\nstops. Defaults to 20 seconds.", + "default": "20s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } } - }, - "required": [ - "filter" - ] + } } - ] - }, - "_types.query_dsl.DisMaxQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "queries": { - "description": "One or more query clauses.\nReturned documents must match one or more of these queries.\nIf a document matches multiple queries, Elasticsearch uses the highest relevance score.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stopped": { + "type": "boolean" + } + }, + "required": [ + "stopped" + ] } - }, - "tie_breaker": { - "description": "Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.", - "type": "number" } - }, - "required": [ - "queries" - ] + } } - ] - }, - "_types.query_dsl.DistanceFeatureQuery": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-distance-feature-query" }, - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.UntypedDistanceFeatureQuery" - }, - { - "$ref": "#/components/schemas/_types.query_dsl.GeoDistanceFeatureQuery" - }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n POST\n /_ml/data_frame/analytics/{id}/_stop\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "stop_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.query_dsl.DateDistanceFeatureQuery" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.query_dsl.UntypedDistanceFeatureQuery": { - "allOf": [ + } + }, + "/_ml/datafeeds/{datafeed_id}/_stop": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Stop datafeeds", + "description": "A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped\nmultiple times throughout its lifecycle.", + "operationId": "ml-stop-datafeed", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBase" + "in": "path", + "name": "datafeed_id", + "description": "Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated\nlist of datafeeds or a wildcard expression. You can close all datafeeds by using `_all` or by specifying `*` as\nthe identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object" - } - ] - }, - "_types.query_dsl.DistanceFeatureQueryBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n* Contains wildcard expressions and there are no datafeeds that match.\n* Contains the `_all` string or no identifiers and there are no matches.\n* Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty datafeeds array when there are no matches and the subset of results when\nthere are partial matches. If `false`, the API returns a 404 status code when there are no matches or only\npartial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "origin": { - "description": "Date or point of origin used to calculate distances.\nIf the `field` value is a `date` or `date_nanos` field, the `origin` value must be a date.\nDate Math, such as `now-1h`, is supported.\nIf the field value is a `geo_point` field, the `origin` value must be a geopoint.", - "type": "object" - }, - "pivot": { - "description": "Distance from the `origin` at which relevance scores receive half of the `boost` value.\nIf the `field` value is a `date` or `date_nanos` field, the `pivot` value must be a time unit, such as `1h` or `10d`. If the `field` value is a `geo_point` field, the `pivot` value must be a distance unit, such as `1km` or `12m`.", - "type": "object" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - } + "in": "query", + "name": "force", + "description": "If `true`, the datafeed is stopped forcefully.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "origin", - "pivot", - "field" - ] - } - ] - }, - "_types.query_dsl.GeoDistanceFeatureQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBaseGeoLocationDistance" + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.query_dsl.DistanceFeatureQueryBaseGeoLocationDistance": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait until a datafeed stops.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "origin": { - "$ref": "#/components/schemas/_types.GeoLocation" - }, - "pivot": { - "$ref": "#/components/schemas/_types.Distance" + "in": "query", + "name": "close_job", + "description": "If `true` the job associated with the datafeed is closed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_no_match": { + "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, + "type": "boolean" + }, + "force": { + "description": "Refer to the description for the `force` query parameter.", + "default": false, + "type": "boolean" + }, + "timeout": { + "description": "Refer to the description for the `timeout` query parameter.", + "default": "20s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "close_job": { + "description": "Refer to the description for the `close_job` query parameter.", + "default": false, + "type": "boolean" + } + } }, - "field": { - "$ref": "#/components/schemas/_types.Field" + "examples": { + "MlStopDatafeedExample1": { + "description": "An example body for a `POST _ml/datafeeds/datafeed-low_request_rate/_stop` request.", + "value": "{\n \"timeout\": \"30s\"\n}" + } } - }, - "required": [ - "origin", - "pivot", - "field" - ] + } } - ] - }, - "_types.Distance": { - "type": "string" - }, - "_types.query_dsl.DateDistanceFeatureQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBaseDateMathDuration" - }, + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stopped": { + "type": "boolean" + } + }, + "required": [ + "stopped" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n POST\n /_ml/datafeeds/{datafeed_id}/_stop\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "stop_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.query_dsl.DistanceFeatureQueryBaseDateMathDuration": { - "allOf": [ + } + }, + "/_ml/trained_models/{model_id}/deployment/_stop": { + "post": { + "tags": [ + "ml trained model" + ], + "summary": "Stop a trained model deployment", + "operationId": "ml-stop-trained-model-deployment", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "origin": { - "$ref": "#/components/schemas/_types.DateMath" - }, - "pivot": { - "$ref": "#/components/schemas/_types.Duration" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - } + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;\ncontains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and\nthere 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.\nIf `false`, the request returns a 404 status code when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "origin", - "pivot", - "field" - ] - } - ] - }, - "_types.DateMath": { - "type": "string" - }, - "_types.query_dsl.ExistsQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "style": "form" }, { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - } + "in": "query", + "name": "force", + "description": "Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you\nrestart the model deployment.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "field" - ] + "style": "form" } - ] - }, - "_types.query_dsl.FunctionScoreQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "boost_mode": { - "$ref": "#/components/schemas/_types.query_dsl.FunctionBoostMode" - }, - "functions": { - "description": "One or more functions that compute a new score for each document returned by the query.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreContainer" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "If provided, must be the same identifier as in the path.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "allow_no_match": { + "description": "Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;\ncontains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and\nthere 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.\nIf `false`, the request returns a 404 status code when there are no matches or only partial matches.", + "default": true, + "type": "boolean" + }, + "force": { + "description": "Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you\nrestart the model deployment.", + "default": false, + "type": "boolean" + } } - }, - "max_boost": { - "description": "Restricts the new score to not exceed the provided limit.", - "type": "number" - }, - "min_score": { - "description": "Excludes documents that do not meet the provided score threshold.", - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "score_mode": { - "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreMode" } } } - ] - }, - "_types.query_dsl.FunctionBoostMode": { - "type": "string", - "enum": [ - "multiply", - "replace", - "sum", - "avg", - "max", - "min" - ] - }, - "_types.query_dsl.FunctionScoreContainer": { - "allOf": [ - { - "type": "object", - "properties": { - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "weight": { - "type": "number" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stopped": { + "type": "boolean" + } + }, + "required": [ + "stopped" + ] + } } } - }, - { - "type": "object", - "properties": { - "exp": { - "$ref": "#/components/schemas/_types.query_dsl.DecayFunction" - }, - "gauss": { - "$ref": "#/components/schemas/_types.query_dsl.DecayFunction" - }, - "linear": { - "$ref": "#/components/schemas/_types.query_dsl.DecayFunction" - }, - "field_value_factor": { - "$ref": "#/components/schemas/_types.query_dsl.FieldValueFactorScoreFunction" - }, - "random_score": { - "$ref": "#/components/schemas/_types.query_dsl.RandomScoreFunction" - }, - "script_score": { - "$ref": "#/components/schemas/_types.query_dsl.ScriptScoreFunction" - } - }, - "minProperties": 1, - "maxProperties": 1 } - ] - }, - "_types.query_dsl.DecayFunction": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.UntypedDecayFunction" - }, - { - "$ref": "#/components/schemas/_types.query_dsl.DateDecayFunction" - }, - { - "$ref": "#/components/schemas/_types.query_dsl.NumericDecayFunction" - }, + }, + "x-state": "Generally available; Added in 8.0.0", + "x-variations": [ + "
\n POST\n /_ml/trained_models/{model_id}/deployment/_stop\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "stop_trained_model_deployment.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.query_dsl.GeoDecayFunction" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.query_dsl.UntypedDecayFunction": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBase" - }, - { - "type": "object" - } - ] - }, - "_types.query_dsl.DecayFunctionBase": { - "type": "object", - "properties": { - "multi_value_mode": { - "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode" - } - } - }, - "_types.query_dsl.MultiValueMode": { - "type": "string", - "enum": [ - "min", - "max", - "avg", - "sum" - ] - }, - "_types.query_dsl.DateDecayFunction": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBaseDateMathDuration" - }, - { - "type": "object" - } - ] - }, - "_types.query_dsl.DecayFunctionBaseDateMathDuration": { - "type": "object", - "properties": { - "multi_value_mode": { - "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode" - } - } - }, - "_types.query_dsl.NumericDecayFunction": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBasedoubledouble" - }, - { - "type": "object" - } - ] - }, - "_types.query_dsl.DecayFunctionBasedoubledouble": { - "type": "object", - "properties": { - "multi_value_mode": { - "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode" - } - } - }, - "_types.query_dsl.GeoDecayFunction": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBaseGeoLocationDistance" - }, + } + }, + "/_ml/data_frame/analytics/{id}/_update": { + "post": { + "tags": [ + "ml data frame" + ], + "summary": "Update a data frame analytics job", + "operationId": "ml-update-data-frame-analytics", + "parameters": [ { - "type": "object" - } - ] - }, - "_types.query_dsl.DecayFunctionBaseGeoLocationDistance": { - "type": "object", - "properties": { - "multi_value_mode": { - "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode" - } - } - }, - "_types.query_dsl.FieldValueFactorScoreFunction": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "factor": { - "description": "Optional factor to multiply the field value with.", - "type": "number" - }, - "missing": { - "description": "Value used if the document doesn’t have that field.\nThe modifier and factor are still applied to it as though it were read from the document.", - "type": "number" - }, - "modifier": { - "$ref": "#/components/schemas/_types.query_dsl.FieldValueFactorModifier" + "in": "path", + "name": "id", + "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } - }, - "required": [ - "field" - ] - }, - "_types.query_dsl.FieldValueFactorModifier": { - "type": "string", - "enum": [ - "none", - "log", - "log1p", - "log2p", - "ln", - "ln1p", - "ln2p", - "square", - "sqrt", - "reciprocal" - ] - }, - "_types.query_dsl.RandomScoreFunction": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "seed": { - "oneOf": [ - { - "type": "number" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "description": "A description of the job.", + "type": "string" + }, + "model_memory_limit": { + "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try\nto create data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", + "type": "string" + }, + "max_num_threads": { + "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, + "type": "number" + }, + "allow_lazy_start": { + "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", + "default": false, + "type": "boolean" + } + } }, - { - "type": "string" + "examples": { + "MlUpdateDataFrameAnalyticsExample1": { + "description": "An example body for a `POST _ml/data_frame/analytics/loganalytics/_update` request.", + "value": "{\n \"model_memory_limit\": \"200mb\"\n}" + } } - ] - } - } - }, - "_types.query_dsl.ScriptScoreFunction": { - "type": "object", - "properties": { - "script": { - "$ref": "#/components/schemas/_types.Script" - } - }, - "required": [ - "script" - ] - }, - "_types.Script": { - "type": "object", - "properties": { - "source": { - "$ref": "#/components/schemas/_types.ScriptSource" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "params": { - "description": "Specifies any named parameters that are passed into the script as variables.\nUse parameters instead of hard-coded values to decrease compile time.", - "type": "object", - "additionalProperties": { - "type": "object" } }, - "lang": { - "$ref": "#/components/schemas/_types.ScriptLanguage" - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorization": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsAuthorization" + } + ] + }, + "allow_lazy_start": { + "type": "boolean" + }, + "analysis": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] + }, + "analyzed_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] + }, + "create_time": { + "type": "number" + }, + "description": { + "type": "string" + }, + "dest": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "max_num_threads": { + "type": "number" + }, + "model_memory_limit": { + "type": "string" + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + } + }, + "required": [ + "allow_lazy_start", + "analysis", + "create_time", + "dest", + "id", + "max_num_threads", + "model_memory_limit", + "source", + "version" + ] + } + } } } - } - }, - "_types.ScriptSource": { - "oneOf": [ - { - "type": "string" - }, + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n POST\n /_ml/data_frame/analytics/{id}/_update\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`create_index`,`manage`,`index`,`view_index_metadata`\n", + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "update_data_frame_analytics.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_global.search._types.SearchRequestBody" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_global.search._types.SearchRequestBody": { - "type": "object", - "properties": { - "aggregations": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" + } + }, + "/_ml/datafeeds/{datafeed_id}/_update": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Update a datafeed", + "description": "You must stop and start the datafeed for the changes to be applied.\nWhen Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at\nthe time of the update and runs the query using those same roles. If you provide secondary authorization headers,\nthose credentials are used instead.", + "operationId": "ml-update-datafeed", + "parameters": [ + { + "in": "path", + "name": "datafeed_id", + "description": "A numerical character string that uniquely identifies the datafeed.\nThis identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.\nIt must start and end with alphanumeric characters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, - "description": "Defines the aggregations that are run as part of the search request.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types.FieldCollapse" - }, - "explain": { - "description": "If `true`, the request returns detailed information about score computation as part of a hit.", - "type": "boolean" - }, - "ext": { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "from": { - "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types.Highlight" + "style": "simple" }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types.TrackHits" + { + "in": "query", + "name": "allow_no_indices", + "description": "If `true`, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the\n`_all` string or when no indices are specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "indices_boost": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores" + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - } + "style": "form" }, - "docvalue_fields": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields" + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" }, - "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } + "style": "form" }, - "knn": { - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn" + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, unavailable indices (missing or closed) are ignored.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "description": "The approximate kNN search to run.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.KnnSearch" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.KnnSearch" + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "description": "If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only\nwith low cardinality data.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "chunking_config": { + "description": "Datafeeds might search over long time periods, for several months or years. This search is split into time\nchunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of\nthese time chunks are calculated; it is an advanced configuration option.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ChunkingConfig" + } + ] + }, + "delayed_data_check_config": { + "description": "Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally\nsearch over indices that have already been read in an effort to determine whether any data has subsequently been\nadded to the index. If missing data is found, it is a good indication that the `query_delay` is set too low and\nthe data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time\ndatafeeds.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" + } + ] + }, + "frequency": { + "description": "The interval at which scheduled queries are made while the datafeed runs in real time. The default value is\neither the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket\nspan. When `frequency` is shorter than the bucket span, interim results for the last (partial) bucket are\nwritten then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value\nmust be divisible by the interval of the date histogram aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "indices": { + "description": "An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine\nlearning nodes must have the `remote_cluster_client` role.", + "type": "array", + "items": { + "type": "string" + } + }, + "indices_options": { + "description": "Specifies index expansion options that are used during search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndicesOptions" + } + ] + }, + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "max_empty_searches": { + "description": "If a real-time datafeed has never seen any data (including during any initial training period), it automatically\nstops and closes the associated job after this many real-time searches return no documents. In other words,\nit stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no\nend time that sees no data remains started until it is explicitly stopped. By default, it is not set.", + "type": "number" + }, + "query": { + "description": "The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an\nElasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this\nobject is passed verbatim to Elasticsearch. Note that if you change the query, the analyzed data is also\nchanged. Therefore, the time required to learn might be long and the understandability of the results is\nunpredictable. If you want to make significant changes to the source data, it is recommended that you\nclone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one\nwhen you are satisfied with the results of the job.", + "default": "{\"match_all\": {\"boost\": 1}}", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "query_delay": { + "description": "The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might\nnot be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default\nvalue is randomly selected between `60s` and `120s`. This randomness improves the query performance\nwhen there are multiple jobs running on the same node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "runtime_mappings": { + "description": "Specifies runtime fields for the datafeed search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "script_fields": { + "description": "Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.\nThe detector configuration objects in a job can contain functions that use these script fields.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "scroll_size": { + "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.\nThe maximum value is the value of `index.max_result_window`.", + "default": 1000.0, + "type": "number" + } } - } - ] - }, - "rank": { - "$ref": "#/components/schemas/_types.RankContainer" - }, - "min_score": { - "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in search results or results collected by aggregations.", - "type": "number" - }, - "post_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "profile": { - "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", - "type": "boolean" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "rescore": { - "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.Rescore" }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Rescore" + "examples": { + "MlUpdateDatafeedExample1": { + "description": "An example body for a `POST _ml/datafeeds/datafeed-test-job/_update` request.", + "value": "{\n \"query\": {\n \"term\": {\n \"geo.src\": \"US\"\n }\n }\n}" } } - ] + } }, - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "script_fields": { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" - }, - "size": { - "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", - "type": "number" - }, - "slice": { - "$ref": "#/components/schemas/_types.SlicedScroll" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "fields": { - "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorization": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedAuthorization" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "chunking_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ChunkingConfig" + } + ] + }, + "delayed_data_check_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" + } + ] + }, + "datafeed_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "frequency": { + "description": "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. For example: `150s`. 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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "indices": { + "type": "array", + "items": { + "type": "string" + } + }, + "indices_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndicesOptions" + } + ] + }, + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "max_empty_searches": { + "type": "number" + }, + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "query_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "runtime_mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "script_fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "scroll_size": { + "type": "number" + } + }, + "required": [ + "chunking_config", + "datafeed_id", + "indices", + "job_id", + "query", + "query_delay", + "scroll_size" + ] + } + } } - }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types.Suggester" - }, - "terminate_after": { - "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", - "type": "number" - }, - "timeout": { - "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", - "type": "string" - }, - "track_scores": { - "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", - "type": "boolean" - }, - "version": { - "description": "If `true`, the request returns the document version as part of a hit.", - "type": "boolean" - }, - "seq_no_primary_term": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control" + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n POST\n /_ml/datafeeds/{datafeed_id}/_update\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "update_datafeed.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/filters/{filter_id}/_update": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Update a filter", + "description": "Updates the description of a filter, adds items, or removes items from the list.", + "operationId": "ml-update-filter", + "parameters": [ + { + "in": "path", + "name": "filter_id", + "description": "A string that uniquely identifies a filter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, - "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", - "type": "boolean" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "pit": { - "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "stats": { - "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", - "type": "array", - "items": { - "type": "string" - } + "style": "simple" } - } - }, - "_global.search._types.FieldCollapse": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "inner_hits": { - "description": "The number of inner hits and their sort order", - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.InnerHits" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "add_items": { + "description": "The items to add to the filter.", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "description": "A description for the filter.", + "type": "string" + }, + "remove_items": { + "description": "The items to remove from the filter.", + "type": "array", + "items": { + "type": "string" + } + } + } }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.InnerHits" + "examples": { + "MlUpdateFilterExample1": { + "description": "An example body for a `POST _ml/filters/safe_domains/_update` request.", + "value": "{\n \"description\": \"Updated list of domains\",\n \"add_items\": [\"*.myorg.com\"],\n \"remove_items\": [\"wikipedia.org\"]\n}" } } - ] - }, - "max_concurrent_group_searches": { - "description": "The number of concurrent requests allowed to retrieve the inner_hits per group", - "type": "number" - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types.FieldCollapse" - } - }, - "required": [ - "field" - ] - }, - "_global.search._types.InnerHits": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "size": { - "description": "The maximum number of hits to return per `inner_hits`.", - "type": "number" - }, - "from": { - "description": "Inner hit starting document offset.", - "type": "number" - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types.FieldCollapse" - }, - "docvalue_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "explain": { - "type": "boolean" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types.Highlight" - }, - "ignore_unmapped": { - "type": "boolean" - }, - "script_fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" } }, - "seq_no_primary_term": { - "type": "boolean" - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "filter_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "description", + "filter_id", + "items" + ] + } + } } - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "track_scores": { - "type": "boolean" - }, - "version": { - "type": "boolean" - } - } - }, - "_types.Name": { - "type": "string" - }, - "_types.query_dsl.FieldAndFormat": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "format": { - "description": "The format in which the values are returned.", - "type": "string" - }, - "include_unmapped": { - "type": "boolean" } }, - "required": [ - "field" - ] - }, - "_global.search._types.Highlight": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.search._types.HighlightBase" - }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n POST\n /_ml/filters/{filter_id}/_update\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "update_filter.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object", - "properties": { - "encoder": { - "$ref": "#/components/schemas/_global.search._types.HighlighterEncoder" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.search._types.HighlightField" - } - } - }, - "required": [ - "fields" - ] + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_global.search._types.HighlighterEncoder": { - "type": "string", - "enum": [ - "default", - "html" - ] - }, - "_global.search._types.HighlightField": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.search._types.HighlightBase" - }, + } + }, + "/_ml/anomaly_detectors/{job_id}/_update": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Update an anomaly detection job", + "description": "Updates certain properties of an anomaly detection job.", + "operationId": "ml-update-job", + "parameters": [ { - "type": "object", - "properties": { - "fragment_offset": { - "type": "number" + "in": "path", + "name": "job_id", + "description": "Identifier for the job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_lazy_open": { + "description": "Advanced configuration option. Specifies whether this job can open when\nthere is insufficient machine learning node capacity for it to be\nimmediately assigned to a node. If `false` and a machine learning node\nwith capacity to run the job cannot immediately be found, the open\nanomaly detection jobs API returns an error. However, this is also\nsubject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this\noption is set to `true`, the open anomaly detection jobs API does not\nreturn an error and the job waits in the opening state until sufficient\nmachine learning node capacity is available.", + "default": false, + "type": "boolean" + }, + "analysis_limits": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisMemoryLimit" + } + ] + }, + "background_persist_interval": { + "description": "Advanced configuration option. The time between each periodic persistence\nof the model.\nThe default value is a randomized value between 3 to 4 hours, which\navoids all jobs persisting at exactly the same time. The smallest allowed\nvalue is 1 hour.\nFor very large models (several GB), persistence could take 10-20 minutes,\nso do not set the value too low.\nIf the job is open when you make the update, you must stop the datafeed,\nclose the job, then reopen the job and restart the datafeed for the\nchanges to take effect.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "custom_settings": { + "description": "Advanced configuration option. Contains custom meta data about the job.\nFor example, it can contain custom URL information as shown in Adding\ncustom URLs to machine learning results.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "categorization_filters": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "description": "A description of the job.", + "type": "string" + }, + "model_plot_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelPlotConfig" + } + ] + }, + "model_prune_window": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "daily_model_snapshot_retention_after_days": { + "description": "Advanced configuration option, which affects the automatic removal of old\nmodel snapshots for this job. It specifies a period of time (in days)\nafter which only the first snapshot per day is retained. This period is\nrelative to the timestamp of the most recent snapshot for this job. Valid\nvalues range from 0 to `model_snapshot_retention_days`. For jobs created\nbefore version 7.8.0, the default value matches\n`model_snapshot_retention_days`.", + "default": 1.0, + "type": "number" + }, + "model_snapshot_retention_days": { + "description": "Advanced configuration option, which affects the automatic removal of old\nmodel snapshots for this job. It specifies the maximum period of time (in\ndays) that snapshots are retained. This period is relative to the\ntimestamp of the most recent snapshot for this job.", + "default": 10.0, + "type": "number" + }, + "renormalization_window_days": { + "description": "Advanced configuration option. The period over which adjustments to the\nscore are applied, as new data is seen.", + "type": "number" + }, + "results_retention_days": { + "description": "Advanced configuration option. The period of time (in days) that results\nare retained. Age is calculated relative to the timestamp of the latest\nbucket result. If this property has a non-null value, once per day at\n00:30 (server time), results that are the specified number of days older\nthan the latest bucket result are deleted from Elasticsearch. The default\nvalue is null, which means all results are retained.", + "type": "number" + }, + "groups": { + "description": "A list of job groups. A job can belong to no groups or many.", + "type": "array", + "items": { + "type": "string" + } + }, + "detectors": { + "description": "An array of detector update objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DetectorUpdate" + } + }, + "per_partition_categorization": { + "description": "Settings related to how categorization interacts with partition fields.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.PerPartitionCategorization" + } + ] + } + } }, - "matched_fields": { - "$ref": "#/components/schemas/_types.Fields" + "examples": { + "MlUpdateJobExample1": { + "description": "An example body for a `POST _ml/anomaly_detectors/low_request_rate/_update` request.", + "value": "{\n \"description\":\"An updated job\",\n \"detectors\": {\n \"detector_index\": 0,\n \"description\": \"An updated detector description\"\n },\n \"groups\": [\"kibana_sample_data\",\"kibana_sample_web_logs\"],\n \"model_plot_config\": {\n \"enabled\": true\n },\n \"renormalization_window_days\": 30,\n \"background_persist_interval\": \"2h\",\n \"model_snapshot_retention_days\": 7,\n \"results_retention_days\": 60\n}" + } } } - } - ] - }, - "_global.search._types.HighlightBase": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_global.search._types.HighlighterType" - }, - "boundary_chars": { - "description": "A string that contains each boundary character.", - "type": "string" }, - "boundary_max_scan": { - "description": "How far to scan for boundary characters.", - "type": "number" - }, - "boundary_scanner": { - "$ref": "#/components/schemas/_global.search._types.BoundaryScanner" - }, - "boundary_scanner_locale": { - "description": "Controls which locale is used to search for sentence and word boundaries.\nThis parameter takes a form of a language tag, for example: `\"en-US\"`, `\"fr-FR\"`, `\"ja-JP\"`.", - "type": "string" - }, - "force_source": { - "deprecated": true, - "type": "boolean" - }, - "fragmenter": { - "$ref": "#/components/schemas/_global.search._types.HighlighterFragmenter" - }, - "fragment_size": { - "description": "The size of the highlighted fragment in characters.", - "type": "number" - }, - "highlight_filter": { - "type": "boolean" - }, - "highlight_query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "max_fragment_length": { - "type": "number" - }, - "max_analyzed_offset": { - "description": "If set to a non-negative value, highlighting stops at this defined maximum limit.\nThe rest of the text is not processed, thus not highlighted and no error is returned\nThe `max_analyzed_offset` query setting does not override the `index.highlight.max_analyzed_offset` setting, which prevails when it’s set to lower value than the query setting.", - "type": "number" - }, - "no_match_size": { - "description": "The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.", - "type": "number" - }, - "number_of_fragments": { - "description": "The maximum number of fragments to return.\nIf the number of fragments is set to `0`, no fragments are returned.\nInstead, the entire field contents are highlighted and returned.\nThis can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required.\nIf `number_of_fragments` is `0`, `fragment_size` is ignored.", - "type": "number" - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "order": { - "$ref": "#/components/schemas/_global.search._types.HighlighterOrder" - }, - "phrase_limit": { - "description": "Controls the number of matching phrases in a document that are considered.\nPrevents the `fvh` highlighter from analyzing too many phrases and consuming too much memory.\nWhen using `matched_fields`, `phrase_limit` phrases per matched field are considered. Raising the limit increases query time and consumes more memory.\nOnly supported by the `fvh` highlighter.", - "type": "number" - }, - "post_tags": { - "description": "Use in conjunction with `pre_tags` to define the HTML tags to use for the highlighted text.\nBy default, highlighted text is wrapped in `` and `` tags.", - "type": "array", - "items": { - "type": "string" - } - }, - "pre_tags": { - "description": "Use in conjunction with `post_tags` to define the HTML tags to use for the highlighted text.\nBy default, highlighted text is wrapped in `` and `` tags.", - "type": "array", - "items": { - "type": "string" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_lazy_open": { + "type": "boolean" + }, + "analysis_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisConfigRead" + } + ] + }, + "analysis_limits": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisLimits" + } + ] + }, + "background_persist_interval": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "create_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "finished_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "custom_settings": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "daily_model_snapshot_retention_after_days": { + "type": "number" + }, + "data_description": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataDescription" + } + ] + }, + "datafeed_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Datafeed" + } + ] + }, + "description": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "job_type": { + "type": "string" + }, + "job_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "model_plot_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelPlotConfig" + } + ] + }, + "model_snapshot_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "model_snapshot_retention_days": { + "type": "number" + }, + "renormalization_window_days": { + "type": "number" + }, + "results_index_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "results_retention_days": { + "type": "number" + } + }, + "required": [ + "allow_lazy_open", + "analysis_config", + "analysis_limits", + "create_time", + "daily_model_snapshot_retention_after_days", + "data_description", + "job_id", + "job_type", + "job_version", + "model_snapshot_retention_days", + "results_index_name" + ] + } + } } - }, - "require_field_match": { - "description": "By default, only fields that contains a query match are highlighted.\nSet to `false` to highlight all fields.", - "type": "boolean" - }, - "tags_schema": { - "$ref": "#/components/schemas/_global.search._types.HighlighterTagsSchema" } - } - }, - "_global.search._types.HighlighterType": { - "anyOf": [ + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/_update\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "update_job.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "string", - "enum": [ - "plain", - "fvh", - "unified" - ] + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Update a snapshot", + "description": "Updates certain properties of a snapshot.", + "operationId": "ml-update-model-snapshot", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "string" + "in": "path", + "name": "snapshot_id", + "description": "Identifier for the model snapshot.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } - ] - }, - "_global.search._types.BoundaryScanner": { - "type": "string", - "enum": [ - "chars", - "sentence", - "word" - ] - }, - "_global.search._types.HighlighterFragmenter": { - "type": "string", - "enum": [ - "simple", - "span" - ] - }, - "_global.search._types.HighlighterOrder": { - "type": "string", - "enum": [ - "score" - ] - }, - "_global.search._types.HighlighterTagsSchema": { - "type": "string", - "enum": [ - "styled" - ] - }, - "_types.ScriptField": { - "type": "object", - "properties": { - "script": { - "$ref": "#/components/schemas/_types.Script" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "description": "A description of the model snapshot.", + "type": "string" + }, + "retain": { + "description": "If `true`, this snapshot will not be deleted during automatic cleanup of\nsnapshots older than `model_snapshot_retention_days`. However, this\nsnapshot will be deleted when the job is deleted.", + "default": false, + "type": "boolean" + } + } + }, + "examples": { + "MlUpdateModelSnapshotExample1": { + "description": "An example body for a `POST` request.", + "value": "_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update\n{\n \"description\": \"Snapshot 1\",\n \"retain\": true\n}" + } + } + } }, - "ignore_failure": { - "type": "boolean" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "model": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelSnapshot" + } + ] + } + }, + "required": [ + "acknowledged", + "model" + ] + } + } + } } }, - "required": [ - "script" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "update_model_snapshot.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } ] - }, - "_types.Sort": { - "oneOf": [ + } + }, + "/_ml/trained_models/{model_id}/deployment/_update": { + "post": { + "tags": [ + "ml trained model" + ], + "summary": "Update a trained model deployment", + "operationId": "ml-update-trained-model-deployment", + "parameters": [ { - "$ref": "#/components/schemas/_types.SortCombinations" + "in": "path", + "name": "model_id", + "description": "The unique identifier of the trained model. Currently, only PyTorch models are supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.SortCombinations" + "in": "query", + "name": "number_of_allocations", + "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "number_of_allocations": { + "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", + "default": 1.0, + "type": "number" + }, + "adaptive_allocations": { + "description": "Adaptive allocations configuration. When enabled, the number of allocations\nis set based on the current load.\nIf adaptive_allocations is enabled, do not set the number of allocations manually.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings" + } + ] + } + } + }, + "examples": { + "MlUpdateTrainedModelDeploymentExample1": { + "description": "An example body for a `POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_update` request.", + "value": "{\n \"number_of_allocations\": 4\n}" + } + } } } - ] - }, - "_types.SortCombinations": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Field" - }, + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "assignment": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelAssignment" + } + ] + } + }, + "required": [ + "assignment" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 8.6.0", + "x-variations": [ + "
\n POST\n /_ml/trained_models/{model_id}/deployment/_update\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "update_trained_model_deployment.ml", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.SortOptions" + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } ] - }, - "_types.SortOptions": { - "type": "object", - "properties": { - "_score": { - "$ref": "#/components/schemas/_types.ScoreSort" + } + }, + "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade": { + "post": { + "tags": [ + "ml anomaly" + ], + "summary": "Upgrade a snapshot", + "description": "Upgrade an anomaly detection model snapshot to the latest major version.\nOver time, older snapshot formats are deprecated and removed. Anomaly\ndetection jobs support only snapshots that are from the current or previous\nmajor version.\nThis API provides a means to upgrade a snapshot to the current major version.\nThis aids in preparing the cluster for an upgrade to the next major version.\nOnly one snapshot per anomaly detection job can be upgraded at a time and the\nupgraded snapshot cannot be the current snapshot of the anomaly detection\njob.", + "operationId": "ml-upgrade-job-snapshot", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "_doc": { - "$ref": "#/components/schemas/_types.ScoreSort" + { + "in": "path", + "name": "snapshot_id", + "description": "A numerical character string that uniquely identifies the model snapshot.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "_geo_distance": { - "$ref": "#/components/schemas/_types.GeoDistanceSort" + { + "in": "query", + "name": "wait_for_completion", + "description": "When true, the API won’t respond until the upgrade is complete.\nOtherwise, it responds as soon as the upgrade task is assigned to a node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "_script": { - "$ref": "#/components/schemas/_types.ScriptSort" + { + "in": "query", + "name": "timeout", + "description": "Controls the time to wait for the request to complete.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node": { + "description": "The ID of the node that the upgrade task was started on if it is still running. In serverless this will be the \"serverless\".", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + }, + "completed": { + "description": "When true, this means the task is complete. When false, it is still running.", + "type": "boolean" + } + }, + "required": [ + "node", + "completed" + ] + } + } + } } }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.ScoreSort": { - "type": "object", - "properties": { - "order": { - "$ref": "#/components/schemas/_types.SortOrder" + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n POST\n /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ml`\n" + ], + "x-api": "upgrade_job_snapshot.ml", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" } - } - }, - "_types.SortOrder": { - "type": "string", - "enum": [ - "asc", - "desc" ] - }, - "_types.GeoDistanceSort": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/_types.SortMode" - }, - "distance_type": { - "$ref": "#/components/schemas/_types.GeoDistanceType" + } + }, + "/_msearch": { + "get": { + "tags": [ + "search" + ], + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", + "operationId": "msearch", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "ignore_unmapped": { - "type": "boolean" + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "order": { - "$ref": "#/components/schemas/_types.SortOrder" + { + "in": "query", + "name": "expand_wildcards", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, - "unit": { - "$ref": "#/components/schemas/_types.DistanceUnit" + { + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "nested": { - "$ref": "#/components/schemas/_types.NestedSortValue" - } - } - }, - "_types.SortMode": { - "type": "string", - "enum": [ - "min", - "max", - "sum", - "avg", - "median" - ] - }, - "_types.GeoDistanceType": { - "type": "string", - "enum": [ - "arc", - "plane" - ] - }, - "_types.DistanceUnit": { - "type": "string", - "enum": [ - "in", - "ft", - "yd", - "mi", - "nmi", - "km", - "m", - "cm", - "mm" - ] - }, - "_types.NestedSortValue": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + { + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "max_children": { - "type": "number" + { + "in": "query", + "name": "include_named_queries_score", + "description": "Indicates whether hit.matched_queries should be rendered as a map that includes\nthe name of the matched query associated with its score (true)\nor as an array containing the name of the matched queries (false)\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "nested": { - "$ref": "#/components/schemas/_types.NestedSortValue" + { + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" }, - "path": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "path" - ] - }, - "_types.ScriptSort": { - "type": "object", - "properties": { - "order": { - "$ref": "#/components/schemas/_types.SortOrder" + { + "in": "query", + "name": "max_concurrent_searches", + "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "script": { - "$ref": "#/components/schemas/_types.Script" + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "type": { - "$ref": "#/components/schemas/_types.ScriptSortType" + { + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "mode": { - "$ref": "#/components/schemas/_types.SortMode" + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "nested": { - "$ref": "#/components/schemas/_types.NestedSortValue" - } - }, - "required": [ - "script" - ] - }, - "_types.ScriptSortType": { - "type": "string", - "enum": [ - "string", - "number", - "version" - ] - }, - "_global.search._types.SourceConfig": { - "description": "Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.", - "oneOf": [ { - "type": "boolean" + "in": "query", + "name": "routing", + "description": "Custom routing value used to route search operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_global.search._types.SourceFilter" - } - ] - }, - "_global.search._types.SourceFilter": { - "type": "object", - "properties": { - "excludes": { - "$ref": "#/components/schemas/_types.Fields" + "in": "query", + "name": "search_type", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, - "includes": { - "$ref": "#/components/schemas/_types.Fields" + { + "in": "query", + "name": "typed_keys", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } - } - }, - "_types.KnnSearch": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "query_vector": { - "$ref": "#/components/schemas/_types.QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types.QueryVectorBuilder" - }, - "k": { - "description": "The final number of nearest neighbors to return as top hits", - "type": "number" - }, - "num_candidates": { - "description": "The number of nearest neighbor candidates to consider per shard", - "type": "number" - }, - "boost": { - "description": "Boost value to apply to kNN scores", - "type": "number" - }, - "filter": { - "description": "Filters for the kNN search query", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - { + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "$ref": "#/components/schemas/_global.msearch.RequestItem" + } + }, + "examples": { + "MsearchRequestExample1": { + "description": "An example body for a `GET my-index-000001/_msearch` request.", + "value": "{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"my-index-000002\"}\n{\"query\" : {\"match_all\" : {}}}" } } - ] - }, - "similarity": { - "description": "The minimum similarity for a vector to be considered a match", - "type": "number" - }, - "inner_hits": { - "$ref": "#/components/schemas/_global.search._types.InnerHits" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types.RescoreVector" - } - }, - "required": [ - "field" - ] - }, - "_types.QueryVector": { - "type": "array", - "items": { - "type": "number" - } - }, - "_types.QueryVectorBuilder": { - "type": "object", - "properties": { - "text_embedding": { - "$ref": "#/components/schemas/_types.TextEmbedding" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.TextEmbedding": { - "type": "object", - "properties": { - "model_id": { - "type": "string" + } }, - "model_text": { - "type": "string" - } - }, - "required": [ - "model_id", - "model_text" - ] - }, - "_types.RescoreVector": { - "type": "object", - "properties": { - "oversample": { - "description": "Applies the specified oversample factor to k on the approximate kNN search", - "type": "number" - } + "required": true }, - "required": [ - "oversample" - ] - }, - "_types.RankContainer": { - "type": "object", - "properties": { - "rrf": { - "$ref": "#/components/schemas/_types.RrfRank" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" + } + } + } } }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.RrfRank": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.RankBase" - }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_msearch\n
\n ", + "
\n POST\n /_msearch\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch", + "x-category": "search", + "x-metaTags": [ { - "type": "object", - "properties": { - "rank_constant": { - "description": "How much influence documents in individual result sets per query have over the final ranked result set", - "type": "number" - }, - "rank_window_size": { - "description": "Size of the individual result sets per query", - "type": "number" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.RankBase": { - "type": "object" - }, - "_global.search._types.Rescore": { - "allOf": [ + "post": { + "tags": [ + "search" + ], + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", + "operationId": "msearch-1", + "parameters": [ { - "type": "object", - "properties": { - "window_size": { - "type": "number" - } - } + "in": "query", + "name": "allow_no_indices", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_global.search._types.RescoreQuery" - }, - "learning_to_rank": { - "$ref": "#/components/schemas/_global.search._types.LearningToRank" - } + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "minProperties": 1, - "maxProperties": 1 - } - ] - }, - "_global.search._types.RescoreQuery": { - "type": "object", - "properties": { - "rescore_query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "query_weight": { - "description": "Relative importance of the original query versus the rescore query.", - "type": "number" + "style": "form" }, - "rescore_query_weight": { - "description": "Relative importance of the rescore query versus the original query.", - "type": "number" + { + "in": "query", + "name": "expand_wildcards", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, - "score_mode": { - "$ref": "#/components/schemas/_global.search._types.ScoreMode" - } - }, - "required": [ - "rescore_query" - ] - }, - "_global.search._types.ScoreMode": { - "type": "string", - "enum": [ - "avg", - "max", - "min", - "multiply", - "total" - ] - }, - "_global.search._types.LearningToRank": { - "type": "object", - "properties": { - "model_id": { - "description": "The unique identifier of the trained model uploaded to Elasticsearch", - "type": "string" + { + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "params": { - "description": "Named parameters to be passed to the query templates used for feature", - "type": "object", - "additionalProperties": { - "type": "object" - } - } - }, - "required": [ - "model_id" - ] - }, - "_types.RetrieverContainer": { - "type": "object", - "properties": { - "standard": { - "$ref": "#/components/schemas/_types.StandardRetriever" + { + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "knn": { - "$ref": "#/components/schemas/_types.KnnRetriever" + { + "in": "query", + "name": "include_named_queries_score", + "description": "Indicates whether hit.matched_queries should be rendered as a map that includes\nthe name of the matched query associated with its score (true)\nor as an array containing the name of the matched queries (false)\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "rrf": { - "$ref": "#/components/schemas/_types.RRFRetriever" + { + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" }, - "text_similarity_reranker": { - "$ref": "#/components/schemas/_types.TextSimilarityReranker" + { + "in": "query", + "name": "max_concurrent_searches", + "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "rule": { - "$ref": "#/components/schemas/_types.RuleRetriever" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.StandardRetriever": { - "allOf": [ { - "$ref": "#/components/schemas/_types.RetrieverBase" + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" - }, - "terminate_after": { - "description": "Maximum number of documents to collect for each shard.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types.FieldCollapse" - } - } - } - ] - }, - "_types.RetrieverBase": { - "type": "object", - "properties": { - "filter": { - "description": "Query to filter the documents that can match.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - ] + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", - "type": "number" - } - } - }, - "_types.KnnRetriever": { - "allOf": [ { - "$ref": "#/components/schemas/_types.RetrieverBase" + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "field": { - "description": "The name of the vector field to search against.", - "type": "string" - }, - "query_vector": { - "$ref": "#/components/schemas/_types.QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types.QueryVectorBuilder" - }, - "k": { - "description": "Number of nearest neighbors to return as top hits.", - "type": "number" - }, - "num_candidates": { - "description": "Number of nearest neighbor candidates to consider per shard.", - "type": "number" - }, - "similarity": { - "description": "The minimum similarity required for a document to be considered a match.", - "type": "number" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types.RescoreVector" - } + "in": "query", + "name": "routing", + "description": "Custom routing value used to route search operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" }, - "required": [ - "field", - "k", - "num_candidates" - ] - } - ] - }, - "_types.RRFRetriever": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.RetrieverBase" + "in": "query", + "name": "search_type", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, { - "type": "object", - "properties": { - "retrievers": { - "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", + "in": "query", + "name": "typed_keys", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/_types.RetrieverContainer" + "$ref": "#/components/schemas/_global.msearch.RequestItem" } }, - "rank_constant": { - "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", - "type": "number" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result sets per query.", - "type": "number" + "examples": { + "MsearchRequestExample1": { + "description": "An example body for a `GET my-index-000001/_msearch` request.", + "value": "{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"my-index-000002\"}\n{\"query\" : {\"match_all\" : {}}}" + } } - }, - "required": [ - "retrievers" - ] + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" + } + } + } + } + }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_msearch\n
\n ", + "
\n POST\n /_msearch\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.TextSimilarityReranker": { - "allOf": [ + } + }, + "/{index}/_msearch": { + "get": { + "tags": [ + "search" + ], + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", + "operationId": "msearch-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.RetrieverBase" + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines how many documents we will consider from the nested retriever.", - "type": "number" - }, - "inference_id": { - "description": "Unique identifier of the inference endpoint created using the inference API.", - "type": "string" - }, - "inference_text": { - "description": "The text snippet used as the basis for similarity comparison", - "type": "string" - }, - "field": { - "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", - "type": "string" - } + "in": "query", + "name": "allow_no_indices", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "retriever" - ] - } - ] - }, - "_types.RuleRetriever": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.RetrieverBase" + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "ruleset_ids": { - "description": "The ruleset IDs containing the rules this retriever is evaluating against.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "match_criteria": { - "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", - "type": "object" - }, - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result set.", - "type": "number" - } + "in": "query", + "name": "expand_wildcards", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "required": [ - "ruleset_ids", - "match_criteria", - "retriever" - ] - } - ] - }, - "_types.SlicedScroll": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" + "style": "form" }, - "id": { - "$ref": "#/components/schemas/_types.Id" + { + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "max": { - "type": "number" - } - }, - "required": [ - "id", - "max" - ] - }, - "_global.search._types.Suggester": { - "type": "object", - "properties": { - "text": { - "description": "Global suggest text, to avoid repetition when the same text is used in several suggesters", - "type": "string" - } - } - }, - "_global.search._types.PointInTimeReference": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + { + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "keep_alive": { - "$ref": "#/components/schemas/_types.Duration" - } - }, - "required": [ - "id" - ] - }, - "_types.mapping.RuntimeFields": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.RuntimeField" - } - }, - "_types.mapping.RuntimeField": { - "type": "object", - "properties": { - "fields": { - "description": "For type `composite`", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.CompositeSubField" - } + { + "in": "query", + "name": "include_named_queries_score", + "description": "Indicates whether hit.matched_queries should be rendered as a map that includes\nthe name of the matched query associated with its score (true)\nor as an array containing the name of the matched queries (false)\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "fetch_fields": { - "description": "For type `lookup`", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFieldFetchFields" - } + { + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" }, - "format": { - "description": "A custom format for `date` type runtime fields.", - "type": "string" + { + "in": "query", + "name": "max_concurrent_searches", + "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "input_field": { - "$ref": "#/components/schemas/_types.Field" + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + { + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "target_index": { - "$ref": "#/components/schemas/_types.IndexName" + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "script": { - "$ref": "#/components/schemas/_types.Script" + { + "in": "query", + "name": "routing", + "description": "Custom routing value used to route search operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, - "type": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFieldType" + { + "in": "query", + "name": "search_type", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.RequestItem" + } + }, + "examples": { + "MsearchRequestExample1": { + "description": "An example body for a `GET my-index-000001/_msearch` request.", + "value": "{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"my-index-000002\"}\n{\"query\" : {\"match_all\" : {}}}" + } + } + } + }, + "required": true }, - "required": [ - "type" - ] - }, - "_types.mapping.CompositeSubField": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFieldType" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" + } + } + } } }, - "required": [ - "type" - ] - }, - "_types.mapping.RuntimeFieldType": { - "type": "string", - "enum": [ - "boolean", - "composite", - "date", - "double", - "geo_point", - "geo_shape", - "ip", - "keyword", - "long", - "lookup" - ] - }, - "_types.mapping.RuntimeFieldFetchFields": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "format": { - "type": "string" + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /{index}/_msearch\n
\n ", + "
\n POST\n /{index}/_msearch\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "required": [ - "field" ] }, - "_types.ScriptLanguage": { - "anyOf": [ + "post": { + "tags": [ + "search" + ], + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", + "operationId": "msearch-3", + "parameters": [ { - "type": "string", - "enum": [ - "painless", - "expression", - "mustache", - "java" - ] + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "type": "string" - } - ] - }, - "_types.query_dsl.FunctionScoreMode": { - "type": "string", - "enum": [ - "multiply", - "sum", - "avg", - "first", - "max", - "min" - ] - }, - "_types.query_dsl.FuzzyQuery": { - "allOf": [ + "in": "query", + "name": "allow_no_indices", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "max_expansions": { - "description": "Maximum number of variations created.", - "type": "number" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged when creating expansions.", - "type": "number" - }, - "rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "transpositions": { - "description": "Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).", - "type": "boolean" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "value": { - "description": "Term you wish to find in the provided field.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } + "in": "query", + "name": "expand_wildcards", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "required": [ - "value" - ] - } - ] - }, - "_types.MultiTermQueryRewrite": { - "type": "string" - }, - "_types.Fuzziness": { - "oneOf": [ + "style": "form" + }, { - "type": "string" + "in": "query", + "name": "ignore_throttled", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "number" - } - ] - }, - "_types.query_dsl.GeoBoundingBoxQuery": { - "allOf": [ + "in": "query", + "name": "ignore_unavailable", + "description": "If true, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "include_named_queries_score", + "description": "Indicates whether hit.matched_queries should be rendered as a map that includes\nthe name of the matched query associated with its score (true)\nor as an array containing the name of the matched queries (false)\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_types.query_dsl.GeoExecution" - }, - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl.GeoValidationMethod" - }, - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" - } - } - } - ] - }, - "_types.query_dsl.GeoExecution": { - "type": "string", - "enum": [ - "memory", - "indexed" - ] - }, - "_types.query_dsl.GeoValidationMethod": { - "type": "string", - "enum": [ - "coerce", - "ignore_malformed", - "strict" - ] - }, - "_types.query_dsl.GeoDistanceQuery": { - "allOf": [ + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "max_concurrent_searches", + "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "distance": { - "$ref": "#/components/schemas/_types.Distance" - }, - "distance_type": { - "$ref": "#/components/schemas/_types.GeoDistanceType" - }, - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl.GeoValidationMethod" - }, - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" - } + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "distance" - ] - } - ] - }, - "_types.query_dsl.GeoGridQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "geogrid": { - "$ref": "#/components/schemas/_types.GeoTile" - }, - "geohash": { - "$ref": "#/components/schemas/_types.GeoHash" - }, - "geohex": { - "$ref": "#/components/schemas/_types.GeoHexCell" - } + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "minProperties": 1, - "maxProperties": 1 - } - ] - }, - "_types.query_dsl.GeoPolygonQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "routing", + "description": "Custom routing value used to route search operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "type": "object", - "properties": { - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl.GeoValidationMethod" + "in": "query", + "name": "search_type", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.RequestItem" + } }, - "ignore_unmapped": { - "type": "boolean" + "examples": { + "MsearchRequestExample1": { + "description": "An example body for a `GET my-index-000001/_msearch` request.", + "value": "{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"my-index-000002\"}\n{\"query\" : {\"match_all\" : {}}}" + } } } - } - ] - }, - "_types.query_dsl.GeoShapeQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" }, - { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" + } } } } + }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /{index}/_msearch\n
\n ", + "
\n POST\n /{index}/_msearch\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "_types.query_dsl.HasChildQuery": { - "allOf": [ + } + }, + "/_msearch/template": { + "get": { + "tags": [ + "search" + ], + "summary": "Run multiple templated searches", + "description": "Run multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/multi-search-template.html" + }, + "operationId": "msearch-template", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", - "type": "boolean" - }, - "inner_hits": { - "$ref": "#/components/schemas/_global.search._types.InnerHits" - }, - "max_children": { - "description": "Maximum number of child documents that match the query allowed for a returned parent document.\nIf the parent document exceeds this limit, it is excluded from the search results.", - "type": "number" - }, - "min_children": { - "description": "Minimum number of child documents that match the query required to match the query for a returned parent document.\nIf the parent document does not meet this limit, it is excluded from the search results.", - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "score_mode": { - "$ref": "#/components/schemas/_types.query_dsl.ChildScoreMode" - }, - "type": { - "$ref": "#/components/schemas/_types.RelationName" - } + "in": "query", + "name": "max_concurrent_searches", + "description": "The maximum number of concurrent searches the API can run.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "query", - "type" - ] - } - ] - }, - "_types.query_dsl.ChildScoreMode": { - "type": "string", - "enum": [ - "none", - "avg", - "sum", - "max", - "min" - ] - }, - "_types.RelationName": { - "type": "string" - }, - "_types.query_dsl.HasParentQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "style": "form" }, { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.\nYou can use this parameter to query multiple indices that may not contain the `parent_type`.", - "type": "boolean" - }, - "inner_hits": { - "$ref": "#/components/schemas/_global.search._types.InnerHits" - }, - "parent_type": { - "$ref": "#/components/schemas/_types.RelationName" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "score": { - "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", - "type": "boolean" - } + "in": "query", + "name": "search_type", + "description": "The type of the search operation.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" }, - "required": [ - "parent_type", - "query" - ] - } - ] - }, - "_types.query_dsl.IdsQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If `true`, the response returns `hits.total` as an integer.\nIf `false`, it returns `hits.total` as an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "values": { - "$ref": "#/components/schemas/_types.Ids" + "in": "query", + "name": "typed_keys", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch_template.RequestItem" + } + }, + "examples": { + "MultiSearchTemplateRequestExample1": { + "description": "Run `GET my-index/_msearch/template` to run multiple templated searches.", + "value": "{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" + } } } } + }, + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_msearch/template\n
\n ", + "
\n POST\n /_msearch/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] }, - "_types.Ids": { - "oneOf": [ + "post": { + "tags": [ + "search" + ], + "summary": "Run multiple templated searches", + "description": "Run multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/multi-search-template.html" + }, + "operationId": "msearch-template-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.Id" + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } - } - ] - }, - "_types.query_dsl.IntervalsQuery": { - "allOf": [ + "in": "query", + "name": "max_concurrent_searches", + "description": "The maximum number of concurrent searches the API can run.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "search_type", + "description": "The type of the search operation.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-intervals-query" + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If `true`, the response returns `hits.total` as an integer.\nIf `false`, it returns `hits.total` as an object.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "type": "object", - "properties": { - "all_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" - }, - "any_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" - }, - "fuzzy": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" - }, - "match": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" - }, - "prefix": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" - }, - "wildcard": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" - } + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "minProperties": 1, - "maxProperties": 1 + "style": "form" } - ] - }, - "_types.query_dsl.IntervalsAllOf": { - "type": "object", - "properties": { - "intervals": { - "description": "An array of rules to combine. All rules must produce a match in a document for the overall source to match.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch_template.RequestItem" + } + }, + "examples": { + "MultiSearchTemplateRequestExample1": { + "description": "Run `GET my-index/_msearch/template` to run multiple templated searches.", + "value": "{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + } + } } }, - "max_gaps": { - "description": "Maximum number of positions between the matching terms.\nIntervals produced by the rules further apart than this are not considered matches.", - "type": "number" - }, - "ordered": { - "description": "If `true`, intervals produced by the rules should appear in the order in which they are specified.", - "type": "boolean" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" + } + } + } } }, - "required": [ - "intervals" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_msearch/template\n
\n ", + "
\n POST\n /_msearch/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "_types.query_dsl.IntervalsContainer": { - "type": "object", - "properties": { - "all_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" + } + }, + "/{index}/_msearch/template": { + "get": { + "tags": [ + "search" + ], + "summary": "Run multiple templated searches", + "description": "Run multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/multi-search-template.html" + }, + "operationId": "msearch-template-2", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, - "any_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "fuzzy": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" + { + "in": "query", + "name": "max_concurrent_searches", + "description": "The maximum number of concurrent searches the API can run.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "match": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" + { + "in": "query", + "name": "search_type", + "description": "The type of the search operation.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, - "prefix": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If `true`, the response returns `hits.total` as an integer.\nIf `false`, it returns `hits.total` as an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "wildcard": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.query_dsl.IntervalsAnyOf": { - "type": "object", - "properties": { - "intervals": { - "description": "An array of rules to match.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch_template.RequestItem" + } + }, + "examples": { + "MultiSearchTemplateRequestExample1": { + "description": "Run `GET my-index/_msearch/template` to run multiple templated searches.", + "value": "{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + } + } } }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" + } + } + } } }, - "required": [ - "intervals" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /{index}/_msearch/template\n
\n ", + "
\n POST\n /{index}/_msearch/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] }, - "_types.query_dsl.IntervalsFilter": { - "type": "object", - "properties": { - "after": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" - }, - "before": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" - }, - "contained_by": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" - }, - "containing": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + "post": { + "tags": [ + "search" + ], + "summary": "Run multiple templated searches", + "description": "Run multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/multi-search-template.html" + }, + "operationId": "msearch-template-3", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, - "not_contained_by": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "not_containing": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + { + "in": "query", + "name": "max_concurrent_searches", + "description": "The maximum number of concurrent searches the API can run.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "not_overlapping": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + { + "in": "query", + "name": "search_type", + "description": "The type of the search operation.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, - "overlapping": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If `true`, the response returns `hits.total` as an integer.\nIf `false`, it returns `hits.total` as an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "script": { - "$ref": "#/components/schemas/_types.Script" + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.query_dsl.IntervalsFuzzy": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to normalize the term.", - "type": "string" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged when creating expansions.", - "type": "number" - }, - "term": { - "description": "The term to match.", - "type": "string" - }, - "transpositions": { - "description": "Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`).", - "type": "boolean" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch_template.RequestItem" + } + }, + "examples": { + "MultiSearchTemplateRequestExample1": { + "description": "Run `GET my-index/_msearch/template` to run multiple templated searches.", + "value": "{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + } + } + } }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" + } + } + } } }, - "required": [ - "term" + "x-state": "Generally available; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /{index}/_msearch/template\n
\n ", + "
\n POST\n /{index}/_msearch/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "msearch_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "_types.query_dsl.IntervalsMatch": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to analyze terms in the query.", - "type": "string" + } + }, + "/_mtermvectors": { + "get": { + "tags": [ + "document" + ], + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", + "operationId": "mtermvectors", + "parameters": [ + { + "in": "query", + "name": "ids", + "description": "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "style": "form" }, - "max_gaps": { - "description": "Maximum number of positions between the matching terms.\nTerms further apart than this are not considered matches.", - "type": "number" + { + "in": "query", + "name": "fields", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "ordered": { - "description": "If `true`, matching terms must appear in their specified order.", - "type": "boolean" + { + "in": "query", + "name": "field_statistics", + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "query": { - "description": "Text you wish to find in the provided field.", - "type": "string" + { + "in": "query", + "name": "offsets", + "description": "If `true`, the response includes term offsets.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" + { + "in": "query", + "name": "payloads", + "description": "If `true`, the response includes term payloads.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" - } - }, - "required": [ - "query" - ] - }, - "_types.query_dsl.IntervalsPrefix": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to analyze the `prefix`.", - "type": "string" + { + "in": "query", + "name": "positions", + "description": "If `true`, the response includes term positions.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "prefix": { - "description": "Beginning characters of terms you wish to find in the top-level field.", - "type": "string" + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "prefix" - ] - }, - "_types.query_dsl.IntervalsWildcard": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to analyze the `pattern`.\nDefaults to the top-level field's analyzer.", - "type": "string" + { + "in": "query", + "name": "realtime", + "description": "If true, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pattern": { - "description": "Wildcard pattern used to find matching terms.", - "type": "string" + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "pattern" - ] - }, - "_types.KnnQuery": { - "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "term_statistics", + "description": "If true, the response includes term frequency and document frequency.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "query_vector": { - "$ref": "#/components/schemas/_types.QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types.QueryVectorBuilder" - }, - "num_candidates": { - "description": "The number of nearest neighbor candidates to consider per shard", - "type": "number" - }, - "k": { - "description": "The final number of nearest neighbors to return as top hits", - "type": "number" - }, - "filter": { - "description": "Filters for the kNN search query", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "An array of existing or artificial documents.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mtermvectors.Operation" + } }, - { + "ids": { + "description": "A simplified syntax to specify documents by their ID if they're in the same index.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "$ref": "#/components/schemas/_types.Id" } } - ] - }, - "similarity": { - "description": "The minimum similarity for a vector to be considered a match", - "type": "number" + } }, - "rescore_vector": { - "$ref": "#/components/schemas/_types.RescoreVector" + "examples": { + "MultiTermVectorsRequestExample1": { + "summary": "Get multiple term vectors", + "description": "Run `POST /my-index-000001/_mtermvectors`. When you specify an index in the request URI, the index does not need to be specified for each documents in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" + }, + "MultiTermVectorsRequestExample2": { + "summary": "Simplified syntax", + "description": "Run `POST /my-index-000001/_mtermvectors`. If all requested documents are in same index and the parameters are the same, you can use a simplified syntax.\n", + "value": "{\n \"ids\": [ \"1\", \"2\" ],\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n}" + }, + "MultiTermVectorsRequestExample3": { + "summary": "Artificial documents", + "description": "Run `POST /_mtermvectors` to generate term vectors for artificial documents provided in the body of the request. The mapping used is determined by the specified `_index`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"Another test ...\"\n }\n }\n ]\n}" + } } - }, - "required": [ - "field" - ] + } } - ] - }, - "_types.query_dsl.MatchQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to convert the text in the query value into tokens.", - "type": "string" - }, - "auto_generate_synonyms_phrase_query": { - "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", - "type": "boolean" - }, - "cutoff_frequency": { - "deprecated": true, - "type": "number" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "fuzzy_rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "fuzzy_transpositions": { - "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", - "type": "boolean" - }, - "lenient": { - "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", - "type": "boolean" - }, - "max_expansions": { - "description": "Maximum number of terms to which the query will expand.", - "type": "number" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged for fuzzy matching.", - "type": "number" - }, - "query": { - "description": "Text, number, boolean value or date you wish to find in the provided field.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mtermvectors.TermVectorsResult" + } + } }, - { - "type": "boolean" - } - ] - }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + "required": [ + "docs" + ] + } } - }, - "required": [ - "query" - ] + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_mtermvectors\n
\n ", + "
\n POST\n /_mtermvectors\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "mtermvectors", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.query_dsl.ZeroTermsQuery": { - "type": "string", - "enum": [ - "all", - "none" - ] - }, - "_types.query_dsl.MatchAllQuery": { - "allOf": [ + "post": { + "tags": [ + "document" + ], + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", + "operationId": "mtermvectors-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "ids", + "description": "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.query_dsl.MatchBoolPrefixQuery": { - "allOf": [ + "in": "query", + "name": "fields", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "field_statistics", + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to convert the text in the query value into tokens.", - "type": "string" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "fuzzy_rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "fuzzy_transpositions": { - "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", - "type": "boolean" - }, - "max_expansions": { - "description": "Maximum number of terms to which the query will expand.\nCan be applied to the term subqueries constructed for all terms but the final term.", - "type": "number" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged for fuzzy matching.\nCan be applied to the term subqueries constructed for all terms but the final term.", - "type": "number" - }, - "query": { - "description": "Terms you wish to find in the provided field.\nThe last term is used in a prefix query.", - "type": "string" - } + "in": "query", + "name": "offsets", + "description": "If `true`, the response includes term offsets.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "query" - ] - } - ] - }, - "_types.query_dsl.MatchNoneQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "payloads", + "description": "If `true`, the response includes term payloads.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.query_dsl.MatchPhraseQuery": { - "allOf": [ + "in": "query", + "name": "positions", + "description": "If `true`, the response includes term positions.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to convert the text in the query value into tokens.", - "type": "string" - }, - "query": { - "description": "Query terms that are analyzed and turned into a phrase query.", - "type": "string" - }, - "slop": { - "description": "Maximum number of positions allowed between matching tokens.", - "type": "number" - }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" - } + "in": "query", + "name": "realtime", + "description": "If true, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "query" - ] - } - ] - }, - "_types.query_dsl.MatchPhrasePrefixQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to convert text in the query value into tokens.", - "type": "string" - }, - "max_expansions": { - "description": "Maximum number of terms to which the last provided term of the query value will expand.", - "type": "number" - }, - "query": { - "description": "Text you wish to find in the provided field.", - "type": "string" - }, - "slop": { - "description": "Maximum number of positions allowed between matching tokens.", - "type": "number" - }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" - } + "in": "query", + "name": "term_statistics", + "description": "If true, the response includes term frequency and document frequency.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "query" - ] - } - ] - }, - "_types.query_dsl.MoreLikeThisQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" }, { - "type": "object", - "properties": { - "analyzer": { - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis" - }, - "description": "The analyzer that is used to analyze the free form text.\nDefaults to the analyzer associated with the first field in fields.", - "type": "string" - }, - "boost_terms": { - "description": "Each term in the formed query could be further boosted by their tf-idf score.\nThis sets the boost factor to use when using this feature.\nDefaults to deactivated (0).", - "type": "number" - }, - "fail_on_unsupported_field": { - "description": "Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (`text` or `keyword`).", - "type": "boolean" - }, - "fields": { - "description": "A list of fields to fetch and analyze the text from.\nDefaults to the `index.query.default_field` index setting, which has a default value of `*`.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "include": { - "description": "Specifies whether the input documents should also be included in the search results returned.", - "type": "boolean" - }, - "like": { - "description": "Specifies free form text and/or a single or multiple documents for which you want to find similar documents.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.Like" - }, - { + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "An array of existing or artificial documents.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.query_dsl.Like" + "$ref": "#/components/schemas/_global.mtermvectors.Operation" } - } - ] - }, - "max_doc_freq": { - "description": "The maximum document frequency above which the terms are ignored from the input document.", - "type": "number" - }, - "max_query_terms": { - "description": "The maximum number of query terms that can be selected.", - "type": "number" - }, - "max_word_length": { - "description": "The maximum word length above which the terms are ignored.\nDefaults to unbounded (`0`).", - "type": "number" - }, - "min_doc_freq": { - "description": "The minimum document frequency below which the terms are ignored from the input document.", - "type": "number" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "min_term_freq": { - "description": "The minimum term frequency below which the terms are ignored from the input document.", - "type": "number" - }, - "min_word_length": { - "description": "The minimum word length below which the terms are ignored.", - "type": "number" - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "stop_words": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "unlike": { - "description": "Used in combination with `like` to exclude documents that match a set of terms.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.Like" }, - { + "ids": { + "description": "A simplified syntax to specify documents by their ID if they're in the same index.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.query_dsl.Like" + "$ref": "#/components/schemas/_types.Id" } } - ] - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + } }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" + "examples": { + "MultiTermVectorsRequestExample1": { + "summary": "Get multiple term vectors", + "description": "Run `POST /my-index-000001/_mtermvectors`. When you specify an index in the request URI, the index does not need to be specified for each documents in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" + }, + "MultiTermVectorsRequestExample2": { + "summary": "Simplified syntax", + "description": "Run `POST /my-index-000001/_mtermvectors`. If all requested documents are in same index and the parameters are the same, you can use a simplified syntax.\n", + "value": "{\n \"ids\": [ \"1\", \"2\" ],\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n}" + }, + "MultiTermVectorsRequestExample3": { + "summary": "Artificial documents", + "description": "Run `POST /_mtermvectors` to generate term vectors for artificial documents provided in the body of the request. The mapping used is determined by the specified `_index`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"Another test ...\"\n }\n }\n ]\n}" + } } - }, - "required": [ - "like" - ] + } } - ] - }, - "_types.query_dsl.Like": { - "description": "Text that we want similar documents for or a lookup to a document's field for the text.", - "oneOf": [ - { - "type": "string" - }, + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mtermvectors.TermVectorsResult" + } + } + }, + "required": [ + "docs" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_mtermvectors\n
\n ", + "
\n POST\n /_mtermvectors\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "mtermvectors", + "x-category": "document management", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.query_dsl.LikeDocument" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.LikeDocument": { - "type": "object", - "properties": { - "doc": { - "description": "A document not present in the index.", - "type": "object" + } + }, + "/{index}/_mtermvectors": { + "get": { + "tags": [ + "document" + ], + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", + "operationId": "mtermvectors-2", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The name of the index that contains the documents.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, - "fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" - } + { + "in": "query", + "name": "ids", + "description": "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "style": "form" }, - "_id": { - "$ref": "#/components/schemas/_types.Id" + { + "in": "query", + "name": "fields", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + { + "in": "query", + "name": "field_statistics", + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "per_field_analyzer": { - "description": "Overrides the default analyzer.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" + { + "in": "query", + "name": "offsets", + "description": "If `true`, the response includes term offsets.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + { + "in": "query", + "name": "payloads", + "description": "If `true`, the response includes term payloads.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" - } - } - }, - "_types.VersionType": { - "type": "string", - "enum": [ - "internal", - "external", - "external_gte", - "force" - ] - }, - "_types.analysis.StopWords": { - "description": "Language value, such as _arabic_ or _thai_. Defaults to _english_.\nEach language value corresponds to a predefined list of stop words in Lucene. See Stop words by language for supported language values and their stop words.\nAlso accepts an array of stop words.", - "oneOf": [ { - "$ref": "#/components/schemas/_types.analysis.StopWordLanguage" + "in": "query", + "name": "positions", + "description": "If `true`, the response includes term positions.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "array", - "items": { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { "type": "string" - } - } - ] - }, - "_types.analysis.StopWordLanguage": { - "type": "string", - "enum": [ - "_arabic_", - "_armenian_", - "_basque_", - "_bengali_", - "_brazilian_", - "_bulgarian_", - "_catalan_", - "_cjk_", - "_czech_", - "_danish_", - "_dutch_", - "_english_", - "_estonian_", - "_finnish_", - "_french_", - "_galician_", - "_german_", - "_greek_", - "_hindi_", - "_hungarian_", - "_indonesian_", - "_irish_", - "_italian_", - "_latvian_", - "_lithuanian_", - "_norwegian_", - "_persian_", - "_portuguese_", - "_romanian_", - "_russian_", - "_serbian_", - "_sorani_", - "_spanish_", - "_swedish_", - "_thai_", - "_turkish_", - "_none_" - ] - }, - "_types.query_dsl.MultiMatchQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + "style": "form" }, { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to convert the text in the query value into tokens.", - "type": "string" - }, - "auto_generate_synonyms_phrase_query": { - "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", - "type": "boolean" - }, - "cutoff_frequency": { - "deprecated": true, - "type": "number" - }, - "fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "fuzzy_rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "fuzzy_transpositions": { - "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", - "type": "boolean" - }, - "lenient": { - "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", - "type": "boolean" - }, - "max_expansions": { - "description": "Maximum number of terms to which the query will expand.", - "type": "number" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged for fuzzy matching.", - "type": "number" - }, - "query": { - "description": "Text, number, boolean value or date you wish to find in the provided field.", - "type": "string" - }, - "slop": { - "description": "Maximum number of positions allowed between matching tokens.", - "type": "number" - }, - "tie_breaker": { - "description": "Determines how scores for each per-term blended query and scores across groups are combined.", - "type": "number" - }, - "type": { - "$ref": "#/components/schemas/_types.query_dsl.TextQueryType" - }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" - } + "in": "query", + "name": "realtime", + "description": "If true, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "query" - ] - } - ] - }, - "_types.query_dsl.TextQueryType": { - "type": "string", - "enum": [ - "best_fields", - "most_fields", - "cross_fields", - "phrase", - "phrase_prefix", - "bool_prefix" - ] - }, - "_types.query_dsl.NestedQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "style": "form" }, { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped path and not return any documents instead of an error.", - "type": "boolean" - }, - "inner_hits": { - "$ref": "#/components/schemas/_global.search._types.InnerHits" - }, - "path": { - "$ref": "#/components/schemas/_types.Field" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "score_mode": { - "$ref": "#/components/schemas/_types.query_dsl.ChildScoreMode" - } + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" }, - "required": [ - "path", - "query" - ] - } - ] - }, - "_types.query_dsl.ParentIdQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "style": "form" }, { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", - "type": "boolean" - }, - "type": { - "$ref": "#/components/schemas/_types.RelationName" - } - } - } - ] - }, - "_types.query_dsl.PercolateQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "term_statistics", + "description": "If true, the response includes term frequency and document frequency.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "document": { - "description": "The source of the document being percolated.", - "type": "object" - }, - "documents": { - "description": "An array of sources of the documents being percolated.", - "type": "array", - "items": { - "type": "object" - } - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "name": { - "description": "The suffix used for the `_percolator_document_slot` field when multiple `percolate` queries are specified.", - "type": "string" - }, - "preference": { - "description": "Preference used to fetch document to percolate.", - "type": "string" - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - } + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" }, - "required": [ - "field" - ] - } - ] - }, - "_types.query_dsl.PinnedQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "style": "form" }, { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-pinned-query" + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" }, - "allOf": [ - { - "type": "object", - "properties": { - "organic": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - }, - "required": [ - "organic" - ] - }, - { + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "ids": { - "description": "Document IDs listed in the order they are to appear in results.\nRequired if `docs` is not specified.", + "docs": { + "description": "An array of existing or artificial documents.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.Id" + "$ref": "#/components/schemas/_global.mtermvectors.Operation" } }, - "docs": { - "description": "Documents listed in the order they are to appear in results.\nRequired if `ids` is not specified.", + "ids": { + "description": "A simplified syntax to specify documents by their ID if they're in the same index.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.query_dsl.PinnedDoc" + "$ref": "#/components/schemas/_types.Id" } } + } + }, + "examples": { + "MultiTermVectorsRequestExample1": { + "summary": "Get multiple term vectors", + "description": "Run `POST /my-index-000001/_mtermvectors`. When you specify an index in the request URI, the index does not need to be specified for each documents in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" }, - "minProperties": 1, - "maxProperties": 1 + "MultiTermVectorsRequestExample2": { + "summary": "Simplified syntax", + "description": "Run `POST /my-index-000001/_mtermvectors`. If all requested documents are in same index and the parameters are the same, you can use a simplified syntax.\n", + "value": "{\n \"ids\": [ \"1\", \"2\" ],\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n}" + }, + "MultiTermVectorsRequestExample3": { + "summary": "Artificial documents", + "description": "Run `POST /_mtermvectors` to generate term vectors for artificial documents provided in the body of the request. The mapping used is determined by the specified `_index`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"Another test ...\"\n }\n }\n ]\n}" + } } - ] + } } - ] - }, - "_types.query_dsl.PinnedDoc": { - "type": "object", - "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mtermvectors.TermVectorsResult" + } + } + }, + "required": [ + "docs" + ] + } + } + } } }, - "required": [ - "_id" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_mtermvectors\n
\n ", + "
\n POST\n /{index}/_mtermvectors\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "mtermvectors", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] }, - "_types.query_dsl.PrefixQuery": { - "allOf": [ + "post": { + "tags": [ + "document" + ], + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", + "operationId": "mtermvectors-3", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "index", + "description": "The name of the index that contains the documents.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "value": { - "description": "Beginning characters of terms you wish to find in the provided field.", - "type": "string" - }, - "case_insensitive": { - "description": "Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`.\nDefault is `false` which means the case sensitivity of matching depends on the underlying field’s mapping.", - "type": "boolean" + "in": "query", + "name": "ids", + "description": "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" } }, - "required": [ - "value" - ] - } - ] - }, - "_types.query_dsl.QueryStringQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "fields", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "object", - "properties": { - "allow_leading_wildcard": { - "description": "If `true`, the wildcard characters `*` and `?` are allowed as the first character of the query string.", - "type": "boolean" - }, - "analyzer": { - "description": "Analyzer used to convert text in the query string into tokens.", - "type": "string" - }, - "analyze_wildcard": { - "description": "If `true`, the query attempts to analyze wildcard terms in the query string.", - "type": "boolean" - }, - "auto_generate_synonyms_phrase_query": { - "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", - "type": "boolean" - }, - "default_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "default_operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "enable_position_increments": { - "description": "If `true`, enable position increments in queries constructed from a `query_string` search.", - "type": "boolean" - }, - "escape": { - "type": "boolean" - }, - "fields": { - "description": "Array of fields to search. Supports wildcards (`*`).", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "fuzzy_max_expansions": { - "description": "Maximum number of terms to which the query expands for fuzzy matching.", - "type": "number" - }, - "fuzzy_prefix_length": { - "description": "Number of beginning characters left unchanged for fuzzy matching.", - "type": "number" - }, - "fuzzy_rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "fuzzy_transpositions": { - "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", - "type": "boolean" - }, - "lenient": { - "description": "If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.", - "type": "boolean" - }, - "max_determinized_states": { - "description": "Maximum number of automaton states required for the query.", - "type": "number" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "phrase_slop": { - "description": "Maximum number of positions allowed between matching tokens for phrases.", - "type": "number" - }, - "query": { - "description": "Query string you wish to parse and use for search.", - "type": "string" - }, - "quote_analyzer": { - "description": "Analyzer used to convert quoted text in the query string into tokens.\nFor quoted text, this parameter overrides the analyzer specified in the `analyzer` parameter.", - "type": "string" - }, - "quote_field_suffix": { - "description": "Suffix appended to quoted text in the query string.\nYou can use this suffix to use a different analysis method for exact matches.", - "type": "string" - }, - "rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "tie_breaker": { - "description": "How to combine the queries generated from the individual search terms in the resulting `dis_max` query.", - "type": "number" - }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" - }, - "type": { - "$ref": "#/components/schemas/_types.query_dsl.TextQueryType" - } + "in": "query", + "name": "field_statistics", + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "query" - ] - } - ] - }, - "_types.TimeZone": { - "type": "string" - }, - "_types.query_dsl.RangeQuery": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-range-query" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.UntypedRangeQuery" + "style": "form" }, { - "$ref": "#/components/schemas/_types.query_dsl.DateRangeQuery" + "in": "query", + "name": "offsets", + "description": "If `true`, the response includes term offsets.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.query_dsl.NumberRangeQuery" + "in": "query", + "name": "payloads", + "description": "If `true`, the response includes term payloads.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.query_dsl.TermRangeQuery" - } - ] - }, - "_types.query_dsl.UntypedRangeQuery": { - "allOf": [ + "in": "query", + "name": "positions", + "description": "If `true`, the response includes term positions.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.RangeQueryBase" + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "type": "object", - "properties": { - "format": { - "$ref": "#/components/schemas/_types.DateFormat" - }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" - } - } - } - ] - }, - "_types.DateFormat": { - "type": "string" - }, - "_types.query_dsl.RangeQueryBase": { - "allOf": [ + "in": "query", + "name": "realtime", + "description": "If true, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "type": "object", - "properties": { - "relation": { - "$ref": "#/components/schemas/_types.query_dsl.RangeRelation" - }, - "gt": { - "description": "Greater than.", - "type": "object" - }, - "gte": { - "description": "Greater than or equal to.", - "type": "object" - }, - "lt": { - "description": "Less than.", - "type": "object" - }, - "lte": { - "description": "Less than or equal to.", - "type": "object" - } - } - } - ] - }, - "_types.query_dsl.RangeRelation": { - "type": "string", - "enum": [ - "within", - "contains", - "intersects" - ] - }, - "_types.query_dsl.DateRangeQuery": { - "allOf": [ + "in": "query", + "name": "term_statistics", + "description": "If true, the response includes term frequency and document frequency.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.RangeQueryBaseDateMath" + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" }, { - "type": "object", - "properties": { - "format": { - "$ref": "#/components/schemas/_types.DateFormat" + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "An array of existing or artificial documents.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mtermvectors.Operation" + } + }, + "ids": { + "description": "A simplified syntax to specify documents by their ID if they're in the same index.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + } + } }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" + "examples": { + "MultiTermVectorsRequestExample1": { + "summary": "Get multiple term vectors", + "description": "Run `POST /my-index-000001/_mtermvectors`. When you specify an index in the request URI, the index does not need to be specified for each documents in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" + }, + "MultiTermVectorsRequestExample2": { + "summary": "Simplified syntax", + "description": "Run `POST /my-index-000001/_mtermvectors`. If all requested documents are in same index and the parameters are the same, you can use a simplified syntax.\n", + "value": "{\n \"ids\": [ \"1\", \"2\" ],\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n}" + }, + "MultiTermVectorsRequestExample3": { + "summary": "Artificial documents", + "description": "Run `POST /_mtermvectors` to generate term vectors for artificial documents provided in the body of the request. The mapping used is determined by the specified `_index`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"Another test ...\"\n }\n }\n ]\n}" + } } } } - ] - }, - "_types.query_dsl.RangeQueryBaseDateMath": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "relation": { - "$ref": "#/components/schemas/_types.query_dsl.RangeRelation" - }, - "gt": { - "$ref": "#/components/schemas/_types.DateMath" - }, - "gte": { - "$ref": "#/components/schemas/_types.DateMath" - }, - "lt": { - "$ref": "#/components/schemas/_types.DateMath" - }, - "lte": { - "$ref": "#/components/schemas/_types.DateMath" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mtermvectors.TermVectorsResult" + } + } + }, + "required": [ + "docs" + ] + } } } } - ] - }, - "_types.query_dsl.NumberRangeQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.RangeQueryBasedouble" - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_mtermvectors\n
\n ", + "
\n POST\n /{index}/_mtermvectors\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "mtermvectors", + "x-category": "document management", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.RangeQueryBasedouble": { - "allOf": [ + } + }, + "/_nodes/{node_id}/_repositories_metering/{max_archive_version}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Clear the archived repositories metering", + "description": "Clear the archived repositories metering information in the cluster.", + "operationId": "nodes-clear-repositories-metering-archive", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "node_id", + "description": "Comma-separated list of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "relation": { - "$ref": "#/components/schemas/_types.query_dsl.RangeRelation" - }, - "gt": { - "description": "Greater than.", - "type": "number" - }, - "gte": { - "description": "Greater than or equal to.", - "type": "number" - }, - "lt": { - "description": "Less than.", - "type": "number" - }, - "lte": { - "description": "Less than or equal to.", - "type": "number" + "in": "path", + "name": "max_archive_version", + "description": "Specifies the maximum `archive_version` to be cleared from the archive.", + "required": true, + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.clear_repositories_metering_archive.ResponseBase" + } } } } - ] - }, - "_types.query_dsl.TermRangeQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.RangeQueryBasestring" - }, + }, + "x-state": "Technical preview; Added in 7.16.0", + "x-variations": [ + "
\n DELETE\n /_nodes/{node_id}/_repositories_metering/{max_archive_version}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "clear_repositories_metering_archive.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.RangeQueryBasestring": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, + } + }, + "/_nodes/{node_id}/_repositories_metering": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster repositories metering", + "description": "Get repositories metering information for a cluster.\nThis API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time.\nAdditionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts.", + "operationId": "nodes-get-repositories-metering-info", + "parameters": [ { - "type": "object", - "properties": { - "relation": { - "$ref": "#/components/schemas/_types.query_dsl.RangeRelation" - }, - "gt": { - "description": "Greater than.", - "type": "string" - }, - "gte": { - "description": "Greater than or equal to.", - "type": "string" - }, - "lt": { - "description": "Less than.", - "type": "string" - }, - "lte": { - "description": "Less than or equal to.", - "type": "string" + "in": "path", + "name": "node_id", + "description": "Comma-separated list of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.get_repositories_metering_info.ResponseBase" + } } } } - ] - }, - "_types.query_dsl.RankFeatureQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, + }, + "x-state": "Technical preview; Added in 7.16.0", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/_repositories_metering\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "get_repositories_metering_info.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "saturation": { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunctionSaturation" - }, - "log": { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunctionLogarithm" - }, - "linear": { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunctionLinear" - }, - "sigmoid": { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunctionSigmoid" - } - }, - "required": [ - "field" - ] + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.RankFeatureFunctionSaturation": { - "allOf": [ + } + }, + "/_nodes/hot_threads": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get the hot threads for nodes", + "description": "Get a breakdown of the hot threads on each selected node in the cluster.\nThe output is plain text with a breakdown of the top hot threads for each node.", + "operationId": "nodes-hot-threads", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunction" + "in": "query", + "name": "ignore_idle_threads", + "description": "If true, known idle threads (e.g. waiting in a socket select, or to get\na task from an empty queue) are filtered out.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "pivot": { - "description": "Configurable pivot value so that the result will be less than 0.5.", - "type": "number" - } - } - } - ] - }, - "_types.query_dsl.RankFeatureFunction": { - "type": "object" - }, - "_types.query_dsl.RankFeatureFunctionLogarithm": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunction" + "in": "query", + "name": "interval", + "description": "The interval to do the second sampling of threads.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "scaling_factor": { - "description": "Configurable scaling factor.", - "type": "number" - } + "in": "query", + "name": "snapshots", + "description": "Number of samples of thread stacktrace.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "scaling_factor" - ] - } - ] - }, - "_types.query_dsl.RankFeatureFunctionLinear": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunction" + "in": "query", + "name": "threads", + "description": "Specifies the number of hot threads to provide information for.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.query_dsl.RankFeatureFunctionSigmoid": { - "allOf": [ + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received\nbefore the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunction" + "in": "query", + "name": "type", + "description": "The type to sample.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ThreadType" + }, + "style": "form" }, { - "type": "object", - "properties": { - "pivot": { - "description": "Configurable pivot value so that the result will be less than 0.5.", - "type": "number" - }, - "exponent": { - "description": "Configurable Exponent.", - "type": "number" - } + "in": "query", + "name": "sort", + "description": "The sort order for 'cpu' type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ThreadType" }, - "required": [ - "pivot", - "exponent" - ] + "style": "form" } - ] - }, - "_types.query_dsl.RegexpQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "case_insensitive": { - "description": "Allows case insensitive matching of the regular expression value with the indexed field values when set to `true`.\nWhen `false`, case sensitivity of matching depends on the underlying field’s mapping.", - "type": "boolean" - }, - "flags": { - "description": "Enables optional operators for the regular expression.", - "type": "string" - }, - "max_determinized_states": { - "description": "Maximum number of automaton states required for the query.", - "type": "number" - }, - "rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "value": { - "description": "Regular expression for terms you wish to find in the provided field.", - "type": "string" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } } - }, - "required": [ - "value" - ] + } } - ] - }, - "_types.query_dsl.RuleQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/hot_threads\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "hot_threads.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object", - "properties": { - "organic": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "ruleset_ids": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "match_criteria": { - "type": "object" - } - }, - "required": [ - "organic", - "ruleset_ids", - "match_criteria" - ] + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.ScriptQuery": { - "allOf": [ + } + }, + "/_nodes/{node_id}/hot_threads": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get the hot threads for nodes", + "description": "Get a breakdown of the hot threads on each selected node in the cluster.\nThe output is plain text with a breakdown of the top hot threads for each node.", + "operationId": "nodes-hot-threads-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "node_id", + "description": "List of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "script": { - "$ref": "#/components/schemas/_types.Script" - } + "in": "query", + "name": "ignore_idle_threads", + "description": "If true, known idle threads (e.g. waiting in a socket select, or to get\na task from an empty queue) are filtered out.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "script" - ] - } - ] - }, - "_types.query_dsl.ScriptScoreQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "interval", + "description": "The interval to do the second sampling of threads.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "min_score": { - "description": "Documents with a score lower than this floating point number are excluded from the search results.", - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - } + "in": "query", + "name": "snapshots", + "description": "Number of samples of thread stacktrace.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "query", - "script" - ] - } - ] - }, - "_types.query_dsl.SemanticQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "threads", + "description": "Specifies the number of hot threads to provide information for.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "field": { - "description": "The field to query, which must be a semantic_text field type", - "type": "string" - }, - "query": { - "description": "The query text", - "type": "string" - } + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received\nbefore the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "required": [ - "field", - "query" - ] - } - ] - }, - "_types.query_dsl.ShapeQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "type", + "description": "The type to sample.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ThreadType" + }, + "style": "form" }, { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "When set to `true` the query ignores an unmapped field and will not match any documents.", - "type": "boolean" + "in": "query", + "name": "sort", + "description": "The sort order for 'cpu' type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ThreadType" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } } } } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/hot_threads\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "hot_threads.nodes", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "_types.query_dsl.SimpleQueryStringQuery": { - "allOf": [ + } + }, + "/_nodes": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node information", + "description": "By default, the API returns all attributes and core settings for cluster nodes.", + "operationId": "nodes-info", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "flat_settings", + "description": "If true, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to convert text in the query string into tokens.", - "type": "string" - }, - "analyze_wildcard": { - "description": "If `true`, the query attempts to analyze wildcard terms in the query string.", - "type": "boolean" - }, - "auto_generate_synonyms_phrase_query": { - "description": "If `true`, the parser creates a match_phrase query for each multi-position token.", - "type": "boolean" - }, - "default_operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "fields": { - "description": "Array of fields you wish to search.\nAccepts wildcard expressions.\nYou also can boost relevance scores for matches to particular fields using a caret (`^`) notation.\nDefaults to the `index.query.default_field index` setting, which has a default value of `*`.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.info.ResponseBase" + }, + "examples": { + "nodesInfoResponseExample1": { + "description": "An abbreviated response when requesting cluster nodes information.", + "value": "{\n \"_nodes\": {},\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"transport_version\": 100000298,\n \"index_version\": 100000074,\n \"component_versions\": {\n \"ml_config_version\": 100000162,\n \"transform_config_version\": 100000096\n },\n \"build_flavor\": \"default\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [\n \"master\",\n \"data\",\n \"ingest\"\n ],\n \"attributes\": {},\n \"plugins\": [\n {\n \"name\": \"analysis-icu\",\n \"version\": \"{version}\",\n \"description\": \"The ICU Analysis plugin integrates Lucene ICU\n module into elasticsearch, adding ICU relates analysis components.\",\n \"classname\":\n \"org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin\",\n \"has_native_controller\": false\n }\n ],\n \"modules\": [\n {\n \"name\": \"lang-painless\",\n \"version\": \"{version}\",\n \"description\": \"An easy, safe and fast scripting language for\n Elasticsearch\",\n \"classname\": \"org.elasticsearch.painless.PainlessPlugin\",\n \"has_native_controller\": false\n }\n ]\n }\n }\n}" + } } - }, - "flags": { - "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringFlags" - }, - "fuzzy_max_expansions": { - "description": "Maximum number of terms to which the query expands for fuzzy matching.", - "type": "number" - }, - "fuzzy_prefix_length": { - "description": "Number of beginning characters left unchanged for fuzzy matching.", - "type": "number" - }, - "fuzzy_transpositions": { - "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", - "type": "boolean" - }, - "lenient": { - "description": "If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.", - "type": "boolean" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "query": { - "description": "Query string in the simple query string syntax you wish to parse and use for search.", - "type": "string" - }, - "quote_field_suffix": { - "description": "Suffix appended to quoted text in the query string.", - "type": "string" } - }, - "required": [ - "query" - ] + } } - ] - }, - "_types.query_dsl.SimpleQueryStringFlags": { - "description": "Query flags can be either a single flag or a combination of flags, e.g. `OR|AND|PREFIX`", - "allOf": [ + }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_nodes\n
\n " + ], + "x-api": "info.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "$ref": "#/components/schemas/_spec_utils.PipeSeparatedFlagsSimpleQueryStringFlag" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_spec_utils.PipeSeparatedFlagsSimpleQueryStringFlag": { - "description": "A set of flags that can be represented as a single enum value or a set of values that are encoded\nas a pipe-separated string\n\nDepending on the target language, code generators can use this hint to generate language specific\nflags enum constructs and the corresponding (de-)serialization code.", - "oneOf": [ + } + }, + "/_nodes/{node_id}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node information", + "description": "By default, the API returns all attributes and core settings for cluster nodes.", + "operationId": "nodes-info-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringFlag" + "in": "path", + "name": "node_id", + "description": "Comma-separated list of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "type": "string" - } - ] - }, - "_types.query_dsl.SimpleQueryStringFlag": { - "type": "string", - "enum": [ - "NONE", - "AND", - "NOT", - "OR", - "PREFIX", - "PHRASE", - "PRECEDENCE", - "ESCAPE", - "WHITESPACE", - "FUZZY", - "NEAR", - "SLOP", - "ALL" - ] - }, - "_types.query_dsl.SpanContainingQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "flat_settings", + "description": "If true, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "big": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" - }, - "little": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" - } + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "required": [ - "big", - "little" - ] + "style": "form" } - ] - }, - "_types.query_dsl.SpanQuery": { - "type": "object", - "properties": { - "span_containing": { - "$ref": "#/components/schemas/_types.query_dsl.SpanContainingQuery" - }, - "span_field_masking": { - "$ref": "#/components/schemas/_types.query_dsl.SpanFieldMaskingQuery" - }, - "span_first": { - "$ref": "#/components/schemas/_types.query_dsl.SpanFirstQuery" - }, - "span_gap": { - "$ref": "#/components/schemas/_types.query_dsl.SpanGapQuery" - }, - "span_multi": { - "$ref": "#/components/schemas/_types.query_dsl.SpanMultiTermQuery" - }, - "span_near": { - "$ref": "#/components/schemas/_types.query_dsl.SpanNearQuery" - }, - "span_not": { - "$ref": "#/components/schemas/_types.query_dsl.SpanNotQuery" - }, - "span_or": { - "$ref": "#/components/schemas/_types.query_dsl.SpanOrQuery" - }, - "span_term": { - "description": "The equivalent of the `term` query but for use with other span queries.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.SpanTermQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "span_within": { - "$ref": "#/components/schemas/_types.query_dsl.SpanWithinQuery" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.info.ResponseBase" + }, + "examples": { + "nodesInfoResponseExample1": { + "description": "An abbreviated response when requesting cluster nodes information.", + "value": "{\n \"_nodes\": {},\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"transport_version\": 100000298,\n \"index_version\": 100000074,\n \"component_versions\": {\n \"ml_config_version\": 100000162,\n \"transform_config_version\": 100000096\n },\n \"build_flavor\": \"default\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [\n \"master\",\n \"data\",\n \"ingest\"\n ],\n \"attributes\": {},\n \"plugins\": [\n {\n \"name\": \"analysis-icu\",\n \"version\": \"{version}\",\n \"description\": \"The ICU Analysis plugin integrates Lucene ICU\n module into elasticsearch, adding ICU relates analysis components.\",\n \"classname\":\n \"org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin\",\n \"has_native_controller\": false\n }\n ],\n \"modules\": [\n {\n \"name\": \"lang-painless\",\n \"version\": \"{version}\",\n \"description\": \"An easy, safe and fast scripting language for\n Elasticsearch\",\n \"classname\": \"org.elasticsearch.painless.PainlessPlugin\",\n \"has_native_controller\": false\n }\n ]\n }\n }\n}" + } + } + } + } } }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.query_dsl.SpanFieldMaskingQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}\n
\n " + ], + "x-api": "info.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" - } - }, - "required": [ - "field", - "query" - ] + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.SpanFirstQuery": { - "allOf": [ + } + }, + "/_nodes/{metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node information", + "description": "By default, the API returns all attributes and core settings for cluster nodes.", + "operationId": "nodes-info-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "metric", + "description": "Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/nodes.info.NodesInfoMetrics" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "end": { - "description": "Controls the maximum end position permitted in a match.", - "type": "number" - }, - "match": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" - } + "in": "query", + "name": "flat_settings", + "description": "If true, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "end", - "match" - ] - } - ] - }, - "_types.query_dsl.SpanGapQuery": { - "description": "Can only be used as a clause in a span_near query.", - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types.query_dsl.SpanMultiTermQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "match": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "required": [ - "match" - ] + "style": "form" } - ] - }, - "_types.query_dsl.SpanNearQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "clauses": { - "description": "Array of one or more other span type queries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.info.ResponseBase" + }, + "examples": { + "nodesInfoResponseExample1": { + "description": "An abbreviated response when requesting cluster nodes information.", + "value": "{\n \"_nodes\": {},\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"transport_version\": 100000298,\n \"index_version\": 100000074,\n \"component_versions\": {\n \"ml_config_version\": 100000162,\n \"transform_config_version\": 100000096\n },\n \"build_flavor\": \"default\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [\n \"master\",\n \"data\",\n \"ingest\"\n ],\n \"attributes\": {},\n \"plugins\": [\n {\n \"name\": \"analysis-icu\",\n \"version\": \"{version}\",\n \"description\": \"The ICU Analysis plugin integrates Lucene ICU\n module into elasticsearch, adding ICU relates analysis components.\",\n \"classname\":\n \"org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin\",\n \"has_native_controller\": false\n }\n ],\n \"modules\": [\n {\n \"name\": \"lang-painless\",\n \"version\": \"{version}\",\n \"description\": \"An easy, safe and fast scripting language for\n Elasticsearch\",\n \"classname\": \"org.elasticsearch.painless.PainlessPlugin\",\n \"has_native_controller\": false\n }\n ]\n }\n }\n}" + } } - }, - "in_order": { - "description": "Controls whether matches are required to be in-order.", - "type": "boolean" - }, - "slop": { - "description": "Controls the maximum number of intervening unmatched positions permitted.", - "type": "number" } - }, - "required": [ - "clauses" - ] + } + } + }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_nodes/{metric}\n
\n " + ], + "x-api": "info.nodes", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.SpanNotQuery": { - "allOf": [ + } + }, + "/_nodes/{node_id}/{metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node information", + "description": "By default, the API returns all attributes and core settings for cluster nodes.", + "operationId": "nodes-info-3", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "node_id", + "description": "Comma-separated list of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "dist": { - "description": "The number of tokens from within the include span that can’t have overlap with the exclude span.\nEquivalent to setting both `pre` and `post`.", - "type": "number" - }, - "exclude": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" - }, - "include": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" - }, - "post": { - "description": "The number of tokens after the include span that can’t have overlap with the exclude span.", - "type": "number" - }, - "pre": { - "description": "The number of tokens before the include span that can’t have overlap with the exclude span.", - "type": "number" - } + "in": "path", + "name": "metric", + "description": "Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/nodes.info.NodesInfoMetrics" }, - "required": [ - "exclude", - "include" - ] - } - ] - }, - "_types.query_dsl.SpanOrQuery": { - "allOf": [ + "style": "simple" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "flat_settings", + "description": "If true, returns settings in flat format.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "clauses": { - "description": "Array of one or more other span type queries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.info.ResponseBase" + }, + "examples": { + "nodesInfoResponseExample1": { + "description": "An abbreviated response when requesting cluster nodes information.", + "value": "{\n \"_nodes\": {},\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"transport_version\": 100000298,\n \"index_version\": 100000074,\n \"component_versions\": {\n \"ml_config_version\": 100000162,\n \"transform_config_version\": 100000096\n },\n \"build_flavor\": \"default\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [\n \"master\",\n \"data\",\n \"ingest\"\n ],\n \"attributes\": {},\n \"plugins\": [\n {\n \"name\": \"analysis-icu\",\n \"version\": \"{version}\",\n \"description\": \"The ICU Analysis plugin integrates Lucene ICU\n module into elasticsearch, adding ICU relates analysis components.\",\n \"classname\":\n \"org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin\",\n \"has_native_controller\": false\n }\n ],\n \"modules\": [\n {\n \"name\": \"lang-painless\",\n \"version\": \"{version}\",\n \"description\": \"An easy, safe and fast scripting language for\n Elasticsearch\",\n \"classname\": \"org.elasticsearch.painless.PainlessPlugin\",\n \"has_native_controller\": false\n }\n ]\n }\n }\n}" + } } } - }, - "required": [ - "clauses" - ] + } } - ] - }, - "_types.query_dsl.SpanTermQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, + }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/{metric}\n
\n " + ], + "x-api": "info.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/_types.FieldValue" - } - }, - "required": [ - "value" - ] + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.SpanWithinQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, + } + }, + "/_nodes/reload_secure_settings": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Reload the keystore on nodes in the cluster", + "description": "Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable.\nThat is, you can change them on disk and reload them without restarting any nodes in the cluster.\nWhen you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node.\n\nWhen the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings.\nReloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted.\nAlternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password.", + "operationId": "nodes-reload-secure-settings", + "parameters": [ { - "type": "object", - "properties": { - "big": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secure_settings_password": { + "description": "The password for the Elasticsearch keystore.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + } + } }, - "little": { - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + "examples": { + "ReloadSecureSettingsRequestExample1": { + "description": "Run `POST _nodes/reload_secure_settings` to reload the keystore on nodes in the cluster.", + "value": "{\n \"secure_settings_password\": \"keystore-password\"\n}" + } } - }, - "required": [ - "big", - "little" - ] + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.reload_secure_settings.ResponseBase" + }, + "examples": { + "ReloadSecureSettingsResponseExample1": { + "description": "A successful response when reloading keystore on nodes in your cluster.", + "value": "{\n \"_nodes\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"cluster_name\": \"my_cluster\",\n \"nodes\": {\n \"pQHNt5rXTTWNvUgOrdynKg\": {\n \"name\": \"node-0\",\n \"secure_setting_names\": [\n \"keystore.seed\",\n \"xpack.security.transport.ssl.keystore.secure_password\",\n \"xpack.security.transport.ssl.truststore.secure_password\"\n ],\n \"keystore_path\": \"/etc/elasticsearch/elasticsearch.keystore\",\n \"keystore_digest\": \"031757c262a50abe1b7e017230cdbab99c1be9fbd7116ff504b27a8787158f46\",\n \"keystore_last_modified_time\": \"2025-12-09T22:06:00.408Z\"\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n POST\n /_nodes/reload_secure_settings\n
\n " + ], + "x-api": "reload_secure_settings.nodes", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.query_dsl.SparseVectorQuery": { - "allOf": [ + } + }, + "/_nodes/{node_id}/reload_secure_settings": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Reload the keystore on nodes in the cluster", + "description": "Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable.\nThat is, you can change them on disk and reload them without restarting any nodes in the cluster.\nWhen you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node.\n\nWhen the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings.\nReloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted.\nAlternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password.", + "operationId": "nodes-reload-secure-settings-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "node_id", + "description": "The names of particular nodes in the cluster to target.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-sparse-vector-query" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "allOf": [ - { + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "query": { - "description": "The query text you want to use for search.\nIf inference_id is specified, query must also be specified.", - "type": "string" - }, - "prune": { - "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", - "x-state": "Technical preview", - "type": "boolean" - }, - "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" + "secure_settings_password": { + "description": "The password for the Elasticsearch keystore.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] } - }, - "required": [ - "field" - ] + } }, - { - "type": "object", - "properties": { - "query_vector": { - "description": "Dictionary of precomputed sparse vectors and their associated weights.\nOnly one of inference_id or query_vector may be supplied in a request.", - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "inference_id": { - "$ref": "#/components/schemas/_types.Id" - } + "examples": { + "ReloadSecureSettingsRequestExample1": { + "description": "Run `POST _nodes/reload_secure_settings` to reload the keystore on nodes in the cluster.", + "value": "{\n \"secure_settings_password\": \"keystore-password\"\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.reload_secure_settings.ResponseBase" }, - "minProperties": 1, - "maxProperties": 1 + "examples": { + "ReloadSecureSettingsResponseExample1": { + "description": "A successful response when reloading keystore on nodes in your cluster.", + "value": "{\n \"_nodes\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"cluster_name\": \"my_cluster\",\n \"nodes\": {\n \"pQHNt5rXTTWNvUgOrdynKg\": {\n \"name\": \"node-0\",\n \"secure_setting_names\": [\n \"keystore.seed\",\n \"xpack.security.transport.ssl.keystore.secure_password\",\n \"xpack.security.transport.ssl.truststore.secure_password\"\n ],\n \"keystore_path\": \"/etc/elasticsearch/elasticsearch.keystore\",\n \"keystore_digest\": \"031757c262a50abe1b7e017230cdbab99c1be9fbd7116ff504b27a8787158f46\",\n \"keystore_last_modified_time\": \"2025-12-09T22:06:00.408Z\"\n }\n }\n}" + } + } } - ] + } } - ] - }, - "_types.query_dsl.TokenPruningConfig": { - "type": "object", - "properties": { - "tokens_freq_ratio_threshold": { - "description": "Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.", - "type": "number" - }, - "tokens_weight_threshold": { - "description": "Tokens whose weight is less than this threshold are considered nonsignificant and pruned.", - "type": "number" - }, - "only_score_pruned_tokens": { - "description": "Whether to only score pruned tokens, vs only scoring kept tokens.", - "type": "boolean" + }, + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n POST\n /_nodes/{node_id}/reload_secure_settings\n
\n " + ], + "x-api": "reload_secure_settings.nodes", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - } - }, - "_types.query_dsl.TermQuery": { - "allOf": [ + ] + } + }, + "/_nodes/stats": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node statistics", + "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", + "operationId": "nodes-stats", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/_types.FieldValue" - }, - "case_insensitive": { - "description": "Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`.\nWhen `false`, the case sensitivity of matching depends on the underlying field’s mapping.", - "type": "boolean" - } + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" }, - "required": [ - "value" - ] - } - ] - }, - "_types.query_dsl.TermsQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.query_dsl.TermsSetQuery": { - "allOf": [ + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "minimum_should_match_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "minimum_should_match_script": { - "$ref": "#/components/schemas/_types.Script" - }, - "terms": { - "description": "Array of terms you wish to find in the provided field.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.FieldValue" - } - } + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the node, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeStatsLevel" }, - "required": [ - "terms" - ] - } - ] - }, - "_types.query_dsl.TextExpansionQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "model_id": { - "description": "The text expansion NLP model to use", - "type": "string" - }, - "model_text": { - "description": "The query text", + "in": "query", + "name": "types", + "description": "A comma-separated list of document types for the indexing index metric.", + "deprecated": false, + "schema": { + "type": "array", + "items": { "type": "string" - }, - "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" } }, - "required": [ - "model_id", - "model_text" - ] - } - ] - }, - "_types.query_dsl.WeightedTokensQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "style": "form" }, { - "type": "object", - "properties": { - "tokens": { - "description": "The tokens representing this query", - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" - } + "in": "query", + "name": "include_unloaded_segments", + "description": "If `true`, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "tokens" - ] + "style": "form" } - ] - }, - "_types.query_dsl.WildcardQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "case_insensitive": { - "description": "Allows case insensitive matching of the pattern with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping.", - "type": "boolean" - }, - "rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "value": { - "description": "Wildcard pattern for terms you wish to find in the provided field. Required, when wildcard is not set.", - "type": "string" - }, - "wildcard": { - "description": "Wildcard pattern for terms you wish to find in the provided field. Required, when value is not set.", - "type": "string" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.stats.ResponseBase" + } } } } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "stats.nodes", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "_types.query_dsl.WrapperQuery": { - "allOf": [ + } + }, + "/_nodes/{node_id}/stats": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node statistics", + "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", + "operationId": "nodes-stats-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "path", + "name": "node_id", + "description": "Comma-separated list of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "query": { - "description": "A base64 encoded query.\nThe binary data format can be any of JSON, YAML, CBOR or SMILE encodings", - "type": "string" - } + "in": "query", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" }, - "required": [ - "query" - ] - } - ] - }, - "_types.query_dsl.TypeQuery": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "object", - "properties": { - "value": { - "type": "string" - } + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" }, - "required": [ - "value" - ] - } - ] - }, - "_types.aggregations.BucketAggregationBase": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.Aggregation": { - "type": "object" - }, - "_types.aggregations.AutoDateHistogramAggregation": { - "allOf": [ + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the node, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeStatsLevel" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets": { - "description": "The target number of buckets.", - "type": "number" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "format": { - "description": "The date format used to format `key_as_string` in the response.\nIf no `format` is specified, the first date format specified in the field mapping is used.", - "type": "string" - }, - "minimum_interval": { - "$ref": "#/components/schemas/_types.aggregations.MinimumInterval" - }, - "missing": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "offset": { - "description": "Time zone specified as a ISO 8601 UTC offset.", + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "types", + "description": "A comma-separated list of document types for the indexing index metric.", + "deprecated": false, + "schema": { + "type": "array", + "items": { "type": "string" - }, - "params": { - "type": "object", - "additionalProperties": { - "type": "object" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "include_unloaded_segments", + "description": "If `true`, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.stats.ResponseBase" } - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" } } } - ] - }, - "_types.aggregations.MinimumInterval": { - "type": "string", - "enum": [ - "second", - "minute", - "hour", - "day", - "month", - "year" - ] - }, - "_types.aggregations.AverageAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "stats.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.FormatMetricAggregationBase": { - "allOf": [ + } + }, + "/_nodes/stats/{metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node statistics", + "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", + "operationId": "nodes-stats-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + "in": "path", + "name": "metric", + "description": "Limits the information returned to the specific metrics.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/nodes.stats.NodeStatsMetrics" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "format": { - "type": "string" - } - } - } - ] - }, - "_types.aggregations.MetricAggregationBase": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "missing": { - "$ref": "#/components/schemas/_types.aggregations.Missing" + "in": "query", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "script": { - "$ref": "#/components/schemas/_types.Script" - } - } - }, - "_types.aggregations.Missing": { - "oneOf": [ { - "type": "string" + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "number" + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "number" + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "boolean" - } - ] - }, - "_types.aggregations.AverageBucketAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.PipelineAggregationBase": { - "allOf": [ + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the node, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeStatsLevel" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.BucketPathAggregation" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "format": { - "description": "`DecimalFormat` pattern for the output value.\nIf specified, the formatted value is returned in the aggregation’s `value_as_string` property.", + "in": "query", + "name": "types", + "description": "A comma-separated list of document types for the indexing index metric.", + "deprecated": false, + "schema": { + "type": "array", + "items": { "type": "string" - }, - "gap_policy": { - "$ref": "#/components/schemas/_types.aggregations.GapPolicy" } - } - } - ] - }, - "_types.aggregations.GapPolicy": { - "type": "string", - "enum": [ - "skip", - "insert_zeros", - "keep_values" - ] - }, - "_types.aggregations.BucketPathAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + "style": "form" }, { - "type": "object", - "properties": { - "buckets_path": { - "$ref": "#/components/schemas/_types.aggregations.BucketsPath" + "in": "query", + "name": "include_unloaded_segments", + "description": "If `true`, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.stats.ResponseBase" + } } } } - ] - }, - "_types.aggregations.BucketsPath": { - "description": "Buckets path can be expressed in different ways, and an aggregation may accept some or all of these\nforms depending on its type. Please refer to each aggregation's documentation to know what buckets\npath forms they accept.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/stats/{metric}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "stats.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object", - "additionalProperties": { - "type": "string" - } + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.BoxplotAggregation": { - "allOf": [ + } + }, + "/_nodes/{node_id}/stats/{metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node statistics", + "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", + "operationId": "nodes-stats-3", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + "in": "path", + "name": "node_id", + "description": "Comma-separated list of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "compression": { - "description": "Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.", - "type": "number" - } - } - } - ] - }, - "_types.aggregations.BucketScriptAggregation": { - "allOf": [ + "in": "path", + "name": "metric", + "description": "Limits the information returned to the specific metrics.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/nodes.stats.NodeStatsMetrics" + }, + "style": "simple" + }, { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "query", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "object", - "properties": { - "script": { - "$ref": "#/components/schemas/_types.Script" - } - } - } - ] - }, - "_types.aggregations.BucketSelectorAggregation": { - "allOf": [ + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "object", - "properties": { - "script": { - "$ref": "#/components/schemas/_types.Script" - } - } - } - ] - }, - "_types.aggregations.BucketSortAggregation": { - "allOf": [ + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "from": { - "description": "Buckets in positions prior to `from` will be truncated.", - "type": "number" - }, - "gap_policy": { - "$ref": "#/components/schemas/_types.aggregations.GapPolicy" - }, - "size": { - "description": "The number of buckets to return.\nDefaults to all buckets of the parent aggregation.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - } - } - } - ] - }, - "_types.aggregations.BucketKsAggregation": { - "allOf": [ + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the node, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeStatsLevel" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.BucketPathAggregation" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "alternative": { - "description": "A list of string values indicating which K-S test alternative to calculate. The valid values\nare: \"greater\", \"less\", \"two_sided\". This parameter is key for determining the K-S statistic used\nwhen calculating the K-S test. Default value is all possible alternative hypotheses.", - "type": "array", - "items": { - "type": "string" - } - }, - "fractions": { - "description": "A list of doubles indicating the distribution of the samples with which to compare to the `buckets_path` results.\nIn typical usage this is the overall proportion of documents in each bucket, which is compared with the actual\ndocument proportions in each bucket from the sibling aggregation counts. The default is to assume that overall\ndocuments are uniformly distributed on these buckets, which they would be if one used equal percentiles of a\nmetric to define the bucket end points.", - "type": "array", - "items": { - "type": "number" - } - }, - "sampling_method": { - "description": "Indicates the sampling methodology when calculating the K-S test. Note, this is sampling of the returned values.\nThis determines the cumulative distribution function (CDF) points used comparing the two samples. Default is\n`upper_tail`, which emphasizes the upper end of the CDF points. Valid options are: `upper_tail`, `uniform`,\nand `lower_tail`.", + "in": "query", + "name": "types", + "description": "A comma-separated list of document types for the indexing index metric.", + "deprecated": false, + "schema": { + "type": "array", + "items": { "type": "string" } - } - } - ] - }, - "_types.aggregations.BucketCorrelationAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketPathAggregation" + }, + "style": "form" }, { - "type": "object", - "properties": { - "function": { - "$ref": "#/components/schemas/_types.aggregations.BucketCorrelationFunction" - } + "in": "query", + "name": "include_unloaded_segments", + "description": "If `true`, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" }, - "required": [ - "function" - ] + "style": "form" } - ] - }, - "_types.aggregations.BucketCorrelationFunction": { - "type": "object", - "properties": { - "count_correlation": { - "$ref": "#/components/schemas/_types.aggregations.BucketCorrelationFunctionCountCorrelation" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.stats.ResponseBase" + } + } + } } }, - "required": [ - "count_correlation" - ] - }, - "_types.aggregations.BucketCorrelationFunctionCountCorrelation": { - "type": "object", - "properties": { - "indicator": { - "$ref": "#/components/schemas/_types.aggregations.BucketCorrelationFunctionCountCorrelationIndicator" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/stats/{metric}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "stats.nodes", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "required": [ - "indicator" ] - }, - "_types.aggregations.BucketCorrelationFunctionCountCorrelationIndicator": { - "type": "object", - "properties": { - "doc_count": { - "description": "The total number of documents that initially created the expectations. It’s required to be greater\nthan or equal to the sum of all values in the buckets_path as this is the originating superset of data\nto which the term values are correlated.", - "type": "number" - }, - "expectations": { - "description": "An array of numbers with which to correlate the configured `bucket_path` values.\nThe length of this value must always equal the number of buckets returned by the `bucket_path`.", - "type": "array", - "items": { - "type": "number" - } + } + }, + "/_nodes/stats/{metric}/{index_metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node statistics", + "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", + "operationId": "nodes-stats-4", + "parameters": [ + { + "in": "path", + "name": "metric", + "description": "Limits the information returned to the specific metrics.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/nodes.stats.NodeStatsMetrics" + }, + "style": "simple" }, - "fractions": { - "description": "An array of fractions to use when averaging and calculating variance. This should be used if\nthe pre-calculated data and the buckets_path have known gaps. The length of fractions, if provided,\nmust equal expectations.", - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "doc_count", - "expectations" - ] - }, - "_types.aggregations.CardinalityAggregation": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + "in": "path", + "name": "index_metric", + "description": "Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.CommonStatsFlags" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "precision_threshold": { - "description": "A unique count below which counts are expected to be close to accurate.\nThis allows to trade memory for accuracy.", - "type": "number" - }, - "rehash": { - "type": "boolean" - }, - "execution_hint": { - "$ref": "#/components/schemas/_types.aggregations.CardinalityExecutionMode" - } - } - } - ] - }, - "_types.aggregations.CardinalityExecutionMode": { - "type": "string", - "enum": [ - "global_ordinals", - "segment_ordinals", - "direct", - "save_memory_heuristic", - "save_time_heuristic" - ] - }, - "_types.aggregations.CategorizeTextAggregation": { - "allOf": [ + "in": "query", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "max_unique_tokens": { - "description": "The maximum number of unique tokens at any position up to max_matched_tokens. Must be larger than 1.\nSmaller values use less memory and create fewer categories. Larger values will use more memory and\ncreate narrower categories. Max allowed value is 100.", - "type": "number" - }, - "max_matched_tokens": { - "description": "The maximum number of token positions to match on before attempting to merge categories. Larger\nvalues will use more memory and create narrower categories. Max allowed value is 100.", - "type": "number" - }, - "similarity_threshold": { - "description": "The minimum percentage of tokens that must match for text to be added to the category bucket. Must\nbe between 1 and 100. The larger the value the narrower the categories. Larger values will increase memory\nusage and create narrower categories.", - "type": "number" - }, - "categorization_filters": { - "description": "This property expects an array of regular expressions. The expressions are used to filter out matching\nsequences from the categorization field values. You can use this functionality to fine tune the categorization\nby excluding sequences from consideration when categories are defined. For example, you can exclude SQL\nstatements that appear in your log files. This property cannot be used at the same time as categorization_analyzer.\nIf you only want to define simple regular expression filters that are applied prior to tokenization, setting\nthis property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering,\nuse the categorization_analyzer property instead and include the filters as pattern_replace character filters.", - "type": "array", - "items": { - "type": "string" - } - }, - "categorization_analyzer": { - "$ref": "#/components/schemas/_types.aggregations.CategorizeTextAnalyzer" - }, - "shard_size": { - "description": "The number of categorization buckets to return from each shard before merging all the results.", - "type": "number" - }, - "size": { - "description": "The number of buckets to return.", - "type": "number" - }, - "min_doc_count": { - "description": "The minimum number of documents in a bucket to be returned to the results.", - "type": "number" - }, - "shard_min_doc_count": { - "description": "The minimum number of documents in a bucket to be returned from the shard before merging.", - "type": "number" - } + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" }, - "required": [ - "field" - ] - } - ] - }, - "_types.aggregations.CategorizeTextAnalyzer": { - "oneOf": [ + "style": "form" + }, { - "type": "string" + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "$ref": "#/components/schemas/_types.aggregations.CustomCategorizeTextAnalyzer" - } - ] - }, - "_types.aggregations.CustomCategorizeTextAnalyzer": { - "type": "object", - "properties": { - "char_filter": { - "type": "array", - "items": { - "type": "string" - } + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "tokenizer": { - "type": "string" + { + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the node, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeStatsLevel" + }, + "style": "form" }, - "filter": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "_types.aggregations.ChildrenAggregation": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_types.RelationName" + "in": "query", + "name": "types", + "description": "A comma-separated list of document types for the indexing index metric.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" } - } - } - ] - }, - "_types.aggregations.CompositeAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + "style": "form" }, { - "type": "object", - "properties": { - "after": { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregateKey" - }, - "size": { - "description": "The number of composite buckets that should be returned.", - "type": "number" - }, - "sources": { - "description": "The value sources used to build composite buckets.\nKeys are returned in the order of the `sources` definition.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationSource" - } + "in": "query", + "name": "include_unloaded_segments", + "description": "If `true`, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.stats.ResponseBase" } } } } - ] - }, - "_types.aggregations.CompositeAggregationSource": { - "type": "object", - "properties": { - "terms": { - "$ref": "#/components/schemas/_types.aggregations.CompositeTermsAggregation" - }, - "histogram": { - "$ref": "#/components/schemas/_types.aggregations.CompositeHistogramAggregation" - }, - "date_histogram": { - "$ref": "#/components/schemas/_types.aggregations.CompositeDateHistogramAggregation" - }, - "geotile_grid": { - "$ref": "#/components/schemas/_types.aggregations.CompositeGeoTileGridAggregation" - } - } - }, - "_types.aggregations.CompositeTermsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationBase" - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/stats/{metric}/{index_metric}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "stats.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.CompositeAggregationBase": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "missing_bucket": { - "type": "boolean" + } + }, + "/_nodes/{node_id}/stats/{metric}/{index_metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get node statistics", + "description": "Get statistics for nodes in a cluster.\nBy default, all stats are returned. You can limit the returned information by using metrics.", + "operationId": "nodes-stats-5", + "parameters": [ + { + "in": "path", + "name": "node_id", + "description": "Comma-separated list of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, - "missing_order": { - "$ref": "#/components/schemas/_types.aggregations.MissingOrder" + { + "in": "path", + "name": "metric", + "description": "Limits the information returned to the specific metrics.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/nodes.stats.NodeStatsMetrics" + }, + "style": "simple" }, - "script": { - "$ref": "#/components/schemas/_types.Script" + { + "in": "path", + "name": "index_metric", + "description": "Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.CommonStatsFlags" + }, + "style": "simple" }, - "value_type": { - "$ref": "#/components/schemas/_types.aggregations.ValueType" + { + "in": "query", + "name": "completion_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "order": { - "$ref": "#/components/schemas/_types.SortOrder" - } - } - }, - "_types.aggregations.MissingOrder": { - "type": "string", - "enum": [ - "first", - "last", - "default" - ] - }, - "_types.aggregations.ValueType": { - "type": "string", - "enum": [ - "string", - "long", - "double", - "number", - "date", - "date_nanos", - "ip", - "numeric", - "geo_point", - "boolean" - ] - }, - "_types.aggregations.CompositeHistogramAggregation": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationBase" + "in": "query", + "name": "fielddata_fields", + "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "object", - "properties": { - "interval": { - "type": "number" - } + "in": "query", + "name": "fields", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" }, - "required": [ - "interval" - ] - } - ] - }, - "_types.aggregations.CompositeDateHistogramAggregation": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationBase" + "in": "query", + "name": "groups", + "description": "Comma-separated list of search groups to include in the search statistics.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "format": { - "type": "string" - }, - "calendar_interval": { - "$ref": "#/components/schemas/_types.DurationLarge" - }, - "fixed_interval": { - "$ref": "#/components/schemas/_types.DurationLarge" - }, - "offset": { - "$ref": "#/components/schemas/_types.Duration" - }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" - } - } - } - ] - }, - "_types.aggregations.CompositeGeoTileGridAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationBase" + "in": "query", + "name": "include_segment_file_sizes", + "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "precision": { - "type": "number" - }, - "bounds": { - "$ref": "#/components/schemas/_types.GeoBounds" - } - } - } - ] - }, - "_types.aggregations.CumulativeCardinalityAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "query", + "name": "level", + "description": "Indicates whether statistics are aggregated at the node, indices, or shards level.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeStatsLevel" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.CumulativeSumAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object" - } - ] - }, - "_types.aggregations.DateHistogramAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "types", + "description": "A comma-separated list of document types for the indexing index metric.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" }, { - "type": "object", - "properties": { - "calendar_interval": { - "$ref": "#/components/schemas/_types.aggregations.CalendarInterval" - }, - "extended_bounds": { - "$ref": "#/components/schemas/_types.aggregations.ExtendedBoundsFieldDateMath" - }, - "hard_bounds": { - "$ref": "#/components/schemas/_types.aggregations.ExtendedBoundsFieldDateMath" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "fixed_interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "format": { - "description": "The date format used to format `key_as_string` in the response.\nIf no `format` is specified, the first date format specified in the field mapping is used.", - "type": "string" - }, - "interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "min_doc_count": { - "description": "Only returns buckets that have `min_doc_count` number of documents.\nBy default, all buckets between the first bucket that matches documents and the last one are returned.", - "type": "number" - }, - "missing": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "offset": { - "$ref": "#/components/schemas/_types.Duration" - }, - "order": { - "$ref": "#/components/schemas/_types.aggregations.AggregateOrder" - }, - "params": { - "type": "object", - "additionalProperties": { - "type": "object" + "in": "query", + "name": "include_unloaded_segments", + "description": "If `true`, the response includes information from segments that are not loaded into memory.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.stats.ResponseBase" } - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" - }, - "keyed": { - "description": "Set to `true` to associate a unique string key with each bucket and return the ranges as a hash rather than an array.", - "type": "boolean" } } } - ] - }, - "_types.aggregations.CalendarInterval": { - "type": "string", - "enum": [ - "second", - "1s", - "minute", - "1m", - "hour", - "1h", - "day", - "1d", - "week", - "1w", - "month", - "1M", - "quarter", - "1q", - "year", - "1y" - ] - }, - "_types.aggregations.ExtendedBoundsFieldDateMath": { - "type": "object", - "properties": { - "max": { - "$ref": "#/components/schemas/_types.aggregations.FieldDateMath" - }, - "min": { - "$ref": "#/components/schemas/_types.aggregations.FieldDateMath" - } - } - }, - "_types.aggregations.FieldDateMath": { - "description": "A date range limit, represented either as a DateMath expression or a number expressed\naccording to the target field's precision.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.DateMath" - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/stats/{metric}/{index_metric}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "stats.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "number" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.AggregateOrder": { - "oneOf": [ + } + }, + "/_nodes/usage": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get feature usage information", + "operationId": "nodes-usage", + "parameters": [ { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.SortOrder" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" }, - "minProperties": 1, - "maxProperties": 1 - }, - { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.SortOrder" - }, - "minProperties": 1, - "maxProperties": 1 - } + "style": "form" } - ] - }, - "_types.aggregations.DateRangeAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "format": { - "description": "The date format used to format `from` and `to` in the response.", - "type": "string" - }, - "missing": { - "$ref": "#/components/schemas/_types.aggregations.Missing" - }, - "ranges": { - "description": "Array of date ranges.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.DateRangeExpression" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.usage.ResponseBase" } - }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" - }, - "keyed": { - "description": "Set to `true` to associate a unique string key with each bucket and returns the ranges as a hash rather than an array.", - "type": "boolean" } } } - ] - }, - "_types.aggregations.DateRangeExpression": { - "type": "object", - "properties": { - "from": { - "$ref": "#/components/schemas/_types.aggregations.FieldDateMath" - }, - "key": { - "description": "Custom key to return the range with.", - "type": "string" - }, - "to": { - "$ref": "#/components/schemas/_types.aggregations.FieldDateMath" - } - } - }, - "_types.aggregations.DerivativeAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" - }, + }, + "x-state": "Generally available; Added in 6.0.0", + "x-variations": [ + "
\n GET\n /_nodes/usage\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "usage.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.DiversifiedSamplerAggregation": { - "allOf": [ + } + }, + "/_nodes/{node_id}/usage": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get feature usage information", + "operationId": "nodes-usage-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "path", + "name": "node_id", + "description": "A comma-separated list of node IDs or names to limit the returned information.\nUse `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "execution_hint": { - "$ref": "#/components/schemas/_types.aggregations.SamplerAggregationExecutionHint" - }, - "max_docs_per_value": { - "description": "Limits how many documents are permitted per choice of de-duplicating value.", - "type": "number" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "shard_size": { - "description": "Limits how many top-scoring documents are collected in the sample processed on each shard.", - "type": "number" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.usage.ResponseBase" + } } } } - ] - }, - "_types.aggregations.SamplerAggregationExecutionHint": { - "type": "string", - "enum": [ - "map", - "global_ordinals", - "bytes_hash" - ] - }, - "_types.aggregations.ExtendedStatsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" - }, + }, + "x-state": "Generally available; Added in 6.0.0", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/usage\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "usage.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object", - "properties": { - "sigma": { - "description": "The number of standard deviations above/below the mean to display.", - "type": "number" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.ExtendedStatsBucketAggregation": { - "allOf": [ + } + }, + "/_nodes/usage/{metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get feature usage information", + "operationId": "nodes-usage-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "path", + "name": "metric", + "description": "Limits the information returned to the specific metrics.\nA comma-separated list of the following options: `_all`, `rest_actions`, `aggregations`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/nodes.usage.NodesUsageMetrics" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "sigma": { - "description": "The number of standard deviations above/below the mean to display.", - "type": "number" - } - } + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - ] - }, - "_types.aggregations.FrequentItemSetsAggregation": { - "type": "object", - "properties": { - "fields": { - "description": "Fields to analyze.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsField" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.usage.ResponseBase" + } + } } - }, - "minimum_set_size": { - "description": "The minimum size of one item set.", - "type": "number" - }, - "minimum_support": { - "description": "The minimum support of one item set.", - "type": "number" - }, - "size": { - "description": "The number of top item sets to return.", - "type": "number" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - }, - "required": [ - "fields" - ] - }, - "_types.aggregations.FrequentItemSetsField": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "exclude": { - "$ref": "#/components/schemas/_types.aggregations.TermsExclude" - }, - "include": { - "$ref": "#/components/schemas/_types.aggregations.TermsInclude" } }, - "required": [ - "field" - ] - }, - "_types.aggregations.TermsExclude": { - "oneOf": [ - { - "type": "string" - }, + "x-state": "Generally available; Added in 6.0.0", + "x-variations": [ + "
\n GET\n /_nodes/usage/{metric}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "usage.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "array", - "items": { - "type": "string" - } + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.TermsInclude": { - "oneOf": [ + } + }, + "/_nodes/{node_id}/usage/{metric}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get feature usage information", + "operationId": "nodes-usage-3", + "parameters": [ { - "type": "string" + "in": "path", + "name": "node_id", + "description": "A comma-separated list of node IDs or names to limit the returned information.\nUse `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" }, { - "type": "array", - "items": { - "type": "string" - } + "in": "path", + "name": "metric", + "description": "Limits the information returned to the specific metrics.\nA comma-separated list of the following options: `_all`, `rest_actions`, `aggregations`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/nodes.usage.NodesUsageMetrics" + }, + "style": "simple" }, { - "$ref": "#/components/schemas/_types.aggregations.TermsPartition" + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } - ] - }, - "_types.aggregations.TermsPartition": { - "type": "object", - "properties": { - "num_partitions": { - "description": "The number of partitions.", - "type": "number" - }, - "partition": { - "description": "The partition number for this request.", - "type": "number" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nodes.usage.ResponseBase" + } + } + } } }, - "required": [ - "num_partitions", - "partition" - ] - }, - "_types.aggregations.FiltersAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, + "x-state": "Generally available; Added in 6.0.0", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/usage/{metric}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "usage.nodes", + "x-category": "unknown", + "x-metaTags": [ { - "type": "object", - "properties": { - "filters": { - "$ref": "#/components/schemas/_types.aggregations.BucketsQueryContainer" - }, - "other_bucket": { - "description": "Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters.", - "type": "boolean" - }, - "other_bucket_key": { - "description": "The key with which the other bucket is returned.", - "type": "string" - }, - "keyed": { - "description": "By default, the named filters aggregation returns the buckets as an object.\nSet to `false` to return the buckets as an array of objects.", - "type": "boolean" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.BucketsQueryContainer": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ + } + }, + "/{index}/_pit": { + "post": { + "tags": [ + "search" + ], + "summary": "Open a point in time", + "description": "A search request by default runs against the most recent visible data of the target indices,\nwhich is called point in time. Elasticsearch pit (point in time) is a lightweight view into the\nstate of the data as it existed when initiated. In some cases, it’s preferred to perform multiple\nsearch requests using the same point in time. For example, if refreshes happen between\n`search_after` requests, then the results of those requests might not be consistent as changes happening\nbetween searches are only visible to the more recent point in time.\n\nA point in time must be opened explicitly before being used in search requests.\n\nA subsequent search request with the `pit` parameter must not specify `index`, `routing`, or `preference` values as these parameters are copied from the point in time.\n\nJust like regular searches, you can use `from` and `size` to page through point in time search results, up to the first 10,000 hits.\nIf you want to retrieve more hits, use PIT with `search_after`.\n\nIMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.\n\nWhen a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a `NoShardAvailableActionException` exception.\nTo get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.\n\n**Keeping point in time alive**\n\nThe `keep_alive` parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.\nThe value does not need to be long enough to process all data — it just needs to be long enough for the next request.\n\nNormally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.\nOnce the smaller segments are no longer needed they are deleted.\nHowever, open point-in-times prevent the old segments from being deleted since they are still in use.\n\nTIP: Keeping older segments alive means that more disk space and file handles are needed.\nEnsure that you have configured your nodes to have ample free file handles.\n\nAdditionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.\nEnsure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.\nNote that a point-in-time doesn't prevent its associated indices from being deleted.\nYou can check how many point-in-times (that is, search contexts) are open with the nodes stats API.", + "operationId": "open-point-in-time", + "parameters": [ { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } + "in": "path", + "name": "index", + "description": "A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - ] - }, - "_types.aggregations.GeoBoundsAggregation": { - "allOf": [ + "in": "query", + "name": "keep_alive", + "description": "Extend the length of time that the point in time persists.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "wrap_longitude": { - "description": "Specifies whether the bounding box should be allowed to overlap the international date line.", - "type": "boolean" - } - } - } - ] - }, - "_types.aggregations.GeoCentroidAggregation": { - "allOf": [ + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nBy default, it is random.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "location": { - "$ref": "#/components/schemas/_types.GeoLocation" - } - } - } - ] - }, - "_types.aggregations.GeoDistanceAggregation": { - "allOf": [ + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "allow_partial_search_results", + "description": "Indicates whether the point in time tolerates unavailable shards or shard failures when initially creating the PIT.\nIf `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.\nIf `true`, the point in time will contain all the shards that are available at the time of the request.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "distance_type": { - "$ref": "#/components/schemas/_types.GeoDistanceType" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "origin": { - "$ref": "#/components/schemas/_types.GeoLocation" - }, - "ranges": { - "description": "An array of ranges used to bucket documents.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.AggregationRange" + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index_filter": { + "description": "Filter indices if the provided query rewrites to `match_none` on every shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } } - }, - "unit": { - "$ref": "#/components/schemas/_types.DistanceUnit" } } } - ] - }, - "_types.aggregations.AggregationRange": { - "type": "object", - "properties": { - "from": { - "description": "Start of the range (inclusive).", - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "key": { - "description": "Custom key to return the range with.", - "type": "string" - }, - "to": { - "description": "End of the range (exclusive).", - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_shards": { + "description": "Shards used to create the PIT", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + } + }, + "required": [ + "_shards", + "id" + ] + }, + "examples": { + "OpenPointInTimeResponseExample1": { + "description": "A successful response from `POST /my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true`. It includes a summary of the total number of shards, as well as the number of successful shards when creating the PIT.\n", + "value": "{\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA=\",\n \"_shards\": {\n \"total\": 10,\n \"successful\": 10,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" + } + } } - ] + } } - } - }, - "_types.aggregations.GeoHashGridAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, + }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n POST\n /{index}/_pit\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "open_point_in_time", + "x-category": "search", + "x-metaTags": [ { - "type": "object", - "properties": { - "bounds": { - "$ref": "#/components/schemas/_types.GeoBounds" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "precision": { - "$ref": "#/components/schemas/_types.GeoHashPrecision" - }, - "shard_size": { - "description": "Allows for more accurate counting of the top cells returned in the final result the aggregation.\nDefaults to returning `max(10,(size x number-of-shards))` buckets from each shard.", - "type": "number" - }, - "size": { - "description": "The maximum number of geohash buckets to return.", - "type": "number" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.GeoHashPrecision": { - "description": "A precision that can be expressed as a geohash length between 1 and 12, or a distance measure like \"1km\", \"10m\".", - "oneOf": [ + } + }, + "/_scripts/{id}/{context}": { + "put": { + "tags": [ + "script" + ], + "summary": "Create or update a script or search template", + "description": "Creates or updates a stored script or search template.", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-stored-script-api.html" + }, + "operationId": "put-script-2", + "parameters": [ { - "type": "number" + "in": "path", + "name": "id", + "description": "The identifier for the stored script or search template.\nIt must be unique within the cluster.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "string" - } - ] - }, - "_types.aggregations.GeoLineAggregation": { - "type": "object", - "properties": { - "point": { - "$ref": "#/components/schemas/_types.aggregations.GeoLinePoint" - }, - "sort": { - "$ref": "#/components/schemas/_types.aggregations.GeoLineSort" - }, - "include_sort": { - "description": "When `true`, returns an additional array of the sort values in the feature properties.", - "type": "boolean" + "in": "path", + "name": "context", + "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, - "sort_order": { - "$ref": "#/components/schemas/_types.SortOrder" + { + "in": "query", + "name": "context", + "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.\nIf you specify both this and the `` path parameter, the API uses the request path parameter.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "form" }, - "size": { - "description": "The maximum length of the line represented in the aggregation.\nValid sizes are between 1 and 10000.", - "type": "number" - } - }, - "required": [ - "point", - "sort" - ] - }, - "_types.aggregations.GeoLinePoint": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "field" - ] - }, - "_types.aggregations.GeoLineSort": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "field" - ] - }, - "_types.aggregations.GeoTileGridAggregation": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "precision": { - "$ref": "#/components/schemas/_types.GeoTilePrecision" - }, - "shard_size": { - "description": "Allows for more accurate counting of the top cells returned in the final result the aggregation.\nDefaults to returning `max(10,(size x number-of-shards))` buckets from each shard.", - "type": "number" - }, - "size": { - "description": "The maximum number of buckets to return.", - "type": "number" + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "script": { + "description": "The script or search template, its parameters, and its language.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.StoredScript" + } + ] + } + }, + "required": [ + "script" + ] }, - "bounds": { - "$ref": "#/components/schemas/_types.GeoBounds" + "examples": { + "PutScriptRequestExample1": { + "summary": "Create a search template", + "description": "Run `PUT _scripts/my-search-template` to create a search template.\n", + "value": "{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" + }, + "PutScriptRequestExample2": { + "summary": "Create a stored script", + "description": "Run `PUT _scripts/my-stored-script` to create a stored script.\n", + "value": "{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n }\n}" + } } } - } - ] - }, - "_types.GeoTilePrecision": { - "type": "number" - }, - "_types.aggregations.GeohexGridAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "precision": { - "description": "Integer zoom of the key used to defined cells or buckets\nin the results. Value should be between 0-15.", - "type": "number" - }, - "bounds": { - "$ref": "#/components/schemas/_types.GeoBounds" - }, - "size": { - "description": "Maximum number of buckets to return.", - "type": "number" - }, - "shard_size": { - "description": "Number of buckets returned from each shard.", - "type": "number" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } } - }, - "required": [ - "field" - ] + } } - ] - }, - "_types.aggregations.GlobalAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_scripts/{id}/{context}\n
\n ", + "
\n POST\n /_scripts/{id}/{context}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "put_script", + "x-category": "search", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.aggregations.HistogramAggregation": { - "allOf": [ + "post": { + "tags": [ + "script" + ], + "summary": "Create or update a script or search template", + "description": "Creates or updates a stored script or search template.", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-stored-script-api.html" + }, + "operationId": "put-script-3", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "path", + "name": "id", + "description": "The identifier for the stored script or search template.\nIt must be unique within the cluster.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "extended_bounds": { - "$ref": "#/components/schemas/_types.aggregations.ExtendedBoundsdouble" - }, - "hard_bounds": { - "$ref": "#/components/schemas/_types.aggregations.ExtendedBoundsdouble" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "interval": { - "description": "The interval for the buckets.\nMust be a positive decimal.", - "type": "number" - }, - "min_doc_count": { - "description": "Only returns buckets that have `min_doc_count` number of documents.\nBy default, the response will fill gaps in the histogram with empty buckets.", - "type": "number" - }, - "missing": { - "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", - "type": "number" - }, - "offset": { - "description": "By default, the bucket keys start with 0 and then continue in even spaced steps of `interval`.\nThe bucket boundaries can be shifted by using the `offset` option.", - "type": "number" - }, - "order": { - "$ref": "#/components/schemas/_types.aggregations.AggregateOrder" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "format": { - "type": "string" - }, - "keyed": { - "description": "If `true`, returns buckets as a hash instead of an array, keyed by the bucket keys.", - "type": "boolean" - } - } - } - ] - }, - "_types.aggregations.ExtendedBoundsdouble": { - "type": "object", - "properties": { - "max": { - "description": "Maximum value for the bound.", - "type": "number" + "in": "path", + "name": "context", + "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" }, - "min": { - "description": "Minimum value for the bound.", - "type": "number" - } - } - }, - "_types.aggregations.IpRangeAggregation": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "context", + "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.\nIf you specify both this and the `` path parameter, the API uses the request path parameter.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "form" }, { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "script": { + "description": "The script or search template, its parameters, and its language.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.StoredScript" + } + ] + } + }, + "required": [ + "script" + ] }, - "ranges": { - "description": "Array of IP ranges.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.IpRangeAggregationRange" + "examples": { + "PutScriptRequestExample1": { + "summary": "Create a search template", + "description": "Run `PUT _scripts/my-search-template` to create a search template.\n", + "value": "{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" + }, + "PutScriptRequestExample2": { + "summary": "Create a stored script", + "description": "Run `PUT _scripts/my-stored-script` to create a stored script.\n", + "value": "{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n }\n}" } } } - } - ] - }, - "_types.aggregations.IpRangeAggregationRange": { - "type": "object", - "properties": { - "from": { - "description": "Start of the range.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "mask": { - "description": "IP range defined as a CIDR mask.", - "type": "string" }, - "to": { - "description": "End of the range.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } } - ] + } } - } - }, - "_types.aggregations.IpPrefixAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_scripts/{id}/{context}\n
\n ", + "
\n POST\n /_scripts/{id}/{context}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "put_script", + "x-category": "search", + "x-metaTags": [ { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "prefix_length": { - "description": "Length of the network prefix. For IPv4 addresses the accepted range is [0, 32].\nFor IPv6 addresses the accepted range is [0, 128].", - "type": "number" - }, - "is_ipv6": { - "description": "Defines whether the prefix applies to IPv6 addresses.", - "type": "boolean" - }, - "append_prefix_length": { - "description": "Defines whether the prefix length is appended to IP address keys in the response.", - "type": "boolean" - }, - "keyed": { - "description": "Defines whether buckets are returned as a hash rather than an array in the response.", - "type": "boolean" - }, - "min_doc_count": { - "description": "Minimum number of documents in a bucket for it to be included in the response.", - "type": "number" - } - }, - "required": [ - "field", - "prefix_length" - ] + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.InferenceAggregation": { - "allOf": [ + } + }, + "/_query_rules/{ruleset_id}/_rule/{rule_id}": { + "get": { + "tags": [ + "query_rules" + ], + "summary": "Get a query rule", + "description": "Get details about a query rule within a query ruleset.", + "externalDocs": { + "description": "See rules and rulesets in Query Rules UI", + "url": "https://www.elastic.co/docs/solutions/search/query-rules-ui#accessing-the-query-rules-ui", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-query-rule.html" + }, + "operationId": "query-rules-get-rule", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "path", + "name": "ruleset_id", + "description": "The unique identifier of the query ruleset containing the rule to retrieve", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "model_id": { - "$ref": "#/components/schemas/_types.Name" - }, - "inference_config": { - "$ref": "#/components/schemas/_types.aggregations.InferenceConfigContainer" - } + "in": "path", + "name": "rule_id", + "description": "The unique identifier of the query rule within the specified ruleset to retrieve", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" }, - "required": [ - "model_id" - ] + "style": "simple" } - ] - }, - "_types.aggregations.InferenceConfigContainer": { - "type": "object", - "properties": { - "regression": { - "$ref": "#/components/schemas/ml._types.RegressionInferenceOptions" - }, - "classification": { - "$ref": "#/components/schemas/ml._types.ClassificationInferenceOptions" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/query_rules._types.QueryRule" + }, + "examples": { + "QueryRuleGetResponseExample1": { + "description": "A successful response from `GET _query_rules/my-ruleset/_rule/my-rule1`.", + "value": "{\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"query_string\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n}" + } + } + } + } } }, - "minProperties": 1, - "maxProperties": 1 - }, - "ml._types.RegressionInferenceOptions": { - "type": "object", - "properties": { - "results_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "num_top_feature_importance_values": { - "description": "Specifies the maximum number of feature importance values per document.", - "type": "number" - } - } - }, - "ml._types.ClassificationInferenceOptions": { - "type": "object", - "properties": { - "num_top_classes": { - "description": "Specifies the number of top class predictions to return. Defaults to 0.", - "type": "number" - }, - "num_top_feature_importance_values": { - "description": "Specifies the maximum number of feature importance values per document.", - "type": "number" - }, - "prediction_field_type": { - "description": "Specifies the type of the predicted field to write. Acceptable values are: string, number, boolean. When boolean is provided 1.0 is transformed to true and 0.0 to false.", - "type": "string" - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" - }, - "top_classes_results_field": { - "description": "Specifies the field to which the top classes are written. Defaults to top_classes.", - "type": "string" - } - } - }, - "_types.aggregations.MatrixStatsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MatrixAggregation" - }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n GET\n /_query_rules/{ruleset_id}/_rule/{rule_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_query_rules`\n" + ], + "x-api": "get_rule.query_rules", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/_types.SortMode" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.aggregations.MatrixAggregation": { - "allOf": [ + "put": { + "tags": [ + "query_rules" + ], + "summary": "Create or update a query rule", + "description": "Create or update a query rule within a query ruleset.\n\nIMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule.\nIt is advised to use one or the other in query rulesets, to avoid errors.\nAdditionally, pinned queries have a maximum limit of 100 pinned hits.\nIf multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.", + "externalDocs": { + "description": "Edit rules and rulesets from the Query Rules UI", + "url": "https://www.elastic.co/docs/solutions/search/query-rules-ui#edit-a-rule", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-query-rule.html" + }, + "operationId": "query-rules-put-rule", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" + "in": "path", + "name": "ruleset_id", + "description": "The unique identifier of the query ruleset containing the rule to be created or updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "missing": { - "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "in": "path", + "name": "rule_id", + "description": "The unique identifier of the query rule within the specified ruleset to be created or updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "object", - "additionalProperties": { - "type": "number" + "properties": { + "type": { + "description": "The type of rule.", + "allOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRuleType" + } + ] + }, + "criteria": { + "description": "The criteria that must be met for the rule to be applied.\nIf multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.", + "oneOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" + } + } + ] + }, + "actions": { + "description": "The actions to take when the rule is matched.\nThe format of this action depends on the rule type.", + "allOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRuleActions" + } + ] + }, + "priority": { + "type": "number" + } + }, + "required": [ + "type", + "criteria", + "actions" + ] + }, + "examples": { + "QueryRulePutRequestExample1": { + "description": "Run `POST _query_rules/my-ruleset/_test` to test a ruleset. Provide the match criteria that you want to test against.\n", + "value": "{\n \"match_criteria\": {\n \"query_string\": \"puggles\"\n }\n}" } } } - } - ] - }, - "_types.aggregations.MaxAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" }, - { - "type": "object" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + } + } + } } - ] - }, - "_types.aggregations.MaxBucketAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" - }, + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n PUT\n /_query_rules/{ruleset_id}/_rule/{rule_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_query_rules`\n" + ], + "x-api": "put_rule.query_rules", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.aggregations.MedianAbsoluteDeviationAggregation": { - "allOf": [ + "delete": { + "tags": [ + "query_rules" + ], + "summary": "Delete a query rule", + "description": "Delete a query rule within a query ruleset.\nThis is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API.", + "externalDocs": { + "description": "Delete a rule from the Query Rules UI", + "url": "https://www.elastic.co/docs/solutions/search/query-rules-ui#delete-a-rule", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-query-rule.html" + }, + "operationId": "query-rules-delete-rule", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + "in": "path", + "name": "ruleset_id", + "description": "The unique identifier of the query ruleset containing the rule to delete", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "compression": { - "description": "Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.", - "type": "number" + "in": "path", + "name": "rule_id", + "description": "The unique identifier of the query rule within the specified ruleset to delete", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } } } } - ] - }, - "_types.aggregations.MinAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" - }, - { - "type": "object" - } - ] - }, - "_types.aggregations.MinBucketAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" - }, + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n DELETE\n /_query_rules/{ruleset_id}/_rule/{rule_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_query_rules`\n" + ], + "x-api": "delete_rule.query_rules", + "x-category": "ai/ml", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.MissingAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, + } + }, + "/_query_rules/{ruleset_id}": { + "get": { + "tags": [ + "query_rules" + ], + "summary": "Get a query ruleset", + "description": "Get details about a query ruleset.", + "externalDocs": { + "description": "See rules and rulesets in Query Rules UI", + "url": "https://www.elastic.co/docs/solutions/search/query-rules-ui#accessing-the-query-rules-ui", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-query-ruleset.html" + }, + "operationId": "query-rules-get-ruleset", + "parameters": [ { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "missing": { - "$ref": "#/components/schemas/_types.aggregations.Missing" + "in": "path", + "name": "ruleset_id", + "description": "The unique identifier of the query ruleset", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/query_rules._types.QueryRuleset" + }, + "examples": { + "QueryRulesetGetResponseExample1": { + "description": "A successful response from `GET _query_rules/my-ruleset/`.", + "value": "{\n \"ruleset_id\": \"my-ruleset\",\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"query_string\",\n \"values\": [ \"pugs\", \"puggles\" ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"query_string\",\n \"values\": [ \"rescue dogs\" ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n}" + } + } } } } - ] - }, - "_types.aggregations.MovingAverageAggregation": { - "discriminator": { - "propertyName": "model" }, - "oneOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.LinearMovingAverageAggregation" - }, - { - "$ref": "#/components/schemas/_types.aggregations.SimpleMovingAverageAggregation" - }, - { - "$ref": "#/components/schemas/_types.aggregations.EwmaMovingAverageAggregation" - }, - { - "$ref": "#/components/schemas/_types.aggregations.HoltMovingAverageAggregation" - }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n GET\n /_query_rules/{ruleset_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_query_rules`\n" + ], + "x-api": "get_ruleset.query_rules", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.aggregations.HoltWintersMovingAverageAggregation" + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.aggregations.LinearMovingAverageAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" - }, + "put": { + "tags": [ + "query_rules" + ], + "summary": "Create or update a query ruleset", + "description": "There is a limit of 100 rules per ruleset.\nThis limit can be increased by using the `xpack.applications.rules.max_rules_per_ruleset` cluster setting.\n\nIMPORTANT: Due to limitations within pinned queries, you can only select documents using `ids` or `docs`, but cannot use both in single rule.\nIt is advised to use one or the other in query rulesets, to avoid errors.\nAdditionally, pinned queries have a maximum limit of 100 pinned hits.\nIf multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.", + "externalDocs": { + "description": "Edit rules and rulesets from the Query Rules UI", + "url": "https://www.elastic.co/docs/solutions/search/query-rules-ui#edit-a-rule", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-query-ruleset.html" + }, + "operationId": "query-rules-put-ruleset", + "parameters": [ { - "type": "object", - "properties": { - "model": { - "type": "string", - "enum": [ - "linear" + "in": "path", + "name": "ruleset_id", + "description": "The unique identifier of the query ruleset to be created or updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "rules": { + "oneOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRule" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/query_rules._types.QueryRule" + } + } + ] + } + }, + "required": [ + "rules" ] }, - "settings": { - "$ref": "#/components/schemas/_types.EmptyObject" + "examples": { + "QueryRulesetPutRequestExample1": { + "description": "Run `PUT _query_rules/my-ruleset` to create a new query ruleset. Two rules are associated with `my-ruleset`. `my-rule1` will pin documents with IDs `id1` and `id2` when `user_query` contains `pugs` or `puggles` and `user_country` exactly matches `us`. `my-rule2` will exclude documents from different specified indices with IDs `id3` and `id4` when the `query_string` fuzzily matches `rescue dogs`.\n", + "value": "{\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [ \"pugs\", \"puggles\" ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [ \"us\" ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [ \"rescue dogs\" ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n}" + } } - }, - "required": [ - "model", - "settings" - ] + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n PUT\n /_query_rules/{ruleset_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_query_rules`\n" + ], + "x-api": "put_ruleset.query_rules", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.EmptyObject": { - "type": "object" - }, - "_types.aggregations.MovingAverageAggregationBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" - }, + "delete": { + "tags": [ + "query_rules" + ], + "summary": "Delete a query ruleset", + "description": "Remove a query ruleset and its associated data.\nThis is a destructive action that is not recoverable.", + "externalDocs": { + "description": "Delete a ruleset from the Query Rules UI", + "url": "https://www.elastic.co/docs/solutions/search/query-rules-ui#delete-a-ruleset", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-query-ruleset.html" + }, + "operationId": "query-rules-delete-ruleset", + "parameters": [ { - "type": "object", - "properties": { - "minimize": { - "type": "boolean" - }, - "predict": { - "type": "number" - }, - "window": { - "type": "number" + "in": "path", + "name": "ruleset_id", + "description": "The unique identifier of the query ruleset to delete", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } } } } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n DELETE\n /_query_rules/{ruleset_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_query_rules`\n" + ], + "x-api": "delete_ruleset.query_rules", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "_types.aggregations.SimpleMovingAverageAggregation": { - "allOf": [ + } + }, + "/_query_rules": { + "get": { + "tags": [ + "query_rules" + ], + "summary": "Get all query rulesets", + "description": "Get summarized information about the query rulesets.", + "externalDocs": { + "description": "See rules and rulesets in Query Rules UI", + "url": "https://www.elastic.co/docs/solutions/search/query-rules-ui#accessing-the-query-rules-ui", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/list-query-rulesets.html" + }, + "operationId": "query-rules-list-rulesets", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" + "in": "query", + "name": "from", + "description": "The offset from the first result to fetch.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "model": { - "type": "string", - "enum": [ - "simple" - ] - }, - "settings": { - "$ref": "#/components/schemas/_types.EmptyObject" - } + "in": "query", + "name": "size", + "description": "The maximum number of results to retrieve.", + "deprecated": false, + "schema": { + "type": "number" }, - "required": [ - "model", - "settings" - ] + "style": "form" } - ] - }, - "_types.aggregations.EwmaMovingAverageAggregation": { - "allOf": [ + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/query_rules.list_rulesets.QueryRulesetListItem" + } + } + }, + "required": [ + "count", + "results" + ] + }, + "examples": { + "QueryRulesetListResponseExample1": { + "description": "A successful response from `GET _query_rules/?from=0&size=3`.", + "value": "{\n \"count\": 3,\n \"results\": [\n {\n \"ruleset_id\": \"ruleset-1\",\n \"rule_total_count\": 1,\n \"rule_criteria_types_counts\": {\n \"exact\": 1\n }\n },\n {\n \"ruleset_id\": \"ruleset-2\",\n \"rule_total_count\": 2,\n \"rule_criteria_types_counts\": {\n \"exact\": 1,\n \"fuzzy\": 1\n }\n },\n {\n \"ruleset_id\": \"ruleset-3\",\n \"rule_total_count\": 3,\n \"rule_criteria_types_counts\": {\n \"exact\": 1,\n \"fuzzy\": 2\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n GET\n /_query_rules\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_query_rules`\n" + ], + "x-api": "list_rulesets.query_rules", + "x-category": "ai/ml", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_query_rules/{ruleset_id}/_test": { + "post": { + "tags": [ + "query_rules" + ], + "summary": "Test a query ruleset", + "description": "Evaluate match criteria against a query ruleset to identify the rules that would match that criteria.", + "operationId": "query-rules-test", + "parameters": [ { - "type": "object", - "properties": { - "model": { - "type": "string", - "enum": [ - "ewma" + "in": "path", + "name": "ruleset_id", + "description": "The unique identifier of the query ruleset to be created or updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "match_criteria": { + "description": "The match criteria to apply to rules in the given query ruleset.\nMatch criteria should match the keys defined in the `criteria.metadata` field of the rule.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "match_criteria" ] }, - "settings": { - "$ref": "#/components/schemas/_types.aggregations.EwmaModelSettings" + "examples": { + "QueryRulesetTestRequestExample1": { + "description": "Run `PUT _query_rules/my-ruleset` to create a new query ruleset. Two rules are associated with `my-ruleset`. `my-rule1` will pin documents with IDs `id1` and `id2` when `user_query` contains `pugs` or `puggles` and `user_country` exactly matches `us`. `my-rule2` will exclude documents from different specified indices with IDs `id3` and `id4` when the `query_string` fuzzily matches `rescue dogs`.\n", + "value": "{\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [ \"pugs\", \"puggles\" ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [ \"us\" ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [ \"rescue dogs\" ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n}" + } } - }, - "required": [ - "model", - "settings" - ] + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_matched_rules": { + "type": "number" + }, + "matched_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/query_rules.test.QueryRulesetMatchedRule" + } + } + }, + "required": [ + "total_matched_rules", + "matched_rules" + ] + }, + "examples": { + "QueryRulesetTestResponseExample1": { + "description": "A successful response from `POST _query_rules/my-ruleset/_test`.", + "value": "{\n \"total_matched_rules\": 1,\n \"matched_rules\": [\n {\n \"ruleset_id\": \"my-ruleset\",\n \"rule_id\": \"my-rule1\"\n }\n ]\n}" + } + } + } + } } - ] - }, - "_types.aggregations.EwmaModelSettings": { - "type": "object", - "properties": { - "alpha": { - "type": "number" + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n POST\n /_query_rules/{ruleset_id}/_test\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_query_rules`\n" + ], + "x-api": "test.query_rules", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - } - }, - "_types.aggregations.HoltMovingAverageAggregation": { - "allOf": [ + ] + } + }, + "/_rank_eval": { + "get": { + "tags": [ + "search" + ], + "summary": "Evaluate ranked search results", + "description": "Evaluate the quality of ranked search results over a set of typical search queries.", + "operationId": "rank-eval", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" + "in": "query", + "name": "allow_no_indices", + "description": "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`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "model": { - "type": "string", - "enum": [ - "holt" - ] - }, - "settings": { - "$ref": "#/components/schemas/_types.aggregations.HoltLinearModelSettings" - } + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "required": [ - "model", - "settings" - ] - } - ] - }, - "_types.aggregations.HoltLinearModelSettings": { - "type": "object", - "properties": { - "alpha": { - "type": "number" + "style": "form" }, - "beta": { - "type": "number" - } - } - }, - "_types.aggregations.HoltWintersMovingAverageAggregation": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "model": { - "type": "string", - "enum": [ - "holt_winters" + "in": "query", + "name": "search_type", + "description": "Search operation type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "requests": { + "description": "A set of typical search requests, together with their provided ratings.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalRequestItem" + } + }, + "metric": { + "description": "Definition of the evaluation metric to calculate.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetric" + } + ] + } + }, + "required": [ + "requests" ] }, - "settings": { - "$ref": "#/components/schemas/_types.aggregations.HoltWintersModelSettings" + "examples": { + "RankEvalRequestExample1": { + "description": "An example body for a `GET /my-index-000001/_rank_eval` request.", + "value": "{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {} } },\n \"ratings\": []\n } ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}" + } } - }, - "required": [ - "model", - "settings" - ] - } - ] - }, - "_types.aggregations.HoltWintersModelSettings": { - "type": "object", - "properties": { - "alpha": { - "type": "number" - }, - "beta": { - "type": "number" - }, - "gamma": { - "type": "number" - }, - "pad": { - "type": "boolean" - }, - "period": { - "type": "number" - }, - "type": { - "$ref": "#/components/schemas/_types.aggregations.HoltWintersType" - } - } - }, - "_types.aggregations.HoltWintersType": { - "type": "string", - "enum": [ - "add", - "mult" - ] - }, - "_types.aggregations.MovingPercentilesAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + } }, - { - "type": "object", - "properties": { - "window": { - "description": "The size of window to \"slide\" across the histogram.", - "type": "number" - }, - "shift": { - "description": "By default, the window consists of the last n values excluding the current bucket.\nIncreasing `shift` by 1, moves the starting window position by 1 to the right.", - "type": "number" - }, - "keyed": { - "type": "boolean" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "metric_score": { + "description": "The overall evaluation quality calculated by the defined metric", + "type": "number" + }, + "details": { + "description": "The details section contains one entry for every query in the original requests section, keyed by the search request id", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDetail" + } + }, + "failures": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "metric_score", + "details", + "failures" + ] + } } } } - ] - }, - "_types.aggregations.MovingFunctionAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" - }, + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /_rank_eval\n
\n ", + "
\n POST\n /_rank_eval\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "rank_eval", + "x-category": "search", + "x-metaTags": [ { - "type": "object", - "properties": { - "script": { - "description": "The script that should be executed on each window of data.", - "type": "string" - }, - "shift": { - "description": "By default, the window consists of the last n values excluding the current bucket.\nIncreasing `shift` by 1, moves the starting window position by 1 to the right.", - "type": "number" - }, - "window": { - "description": "The size of window to \"slide\" across the histogram.", - "type": "number" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.aggregations.MultiTermsAggregation": { - "allOf": [ + "post": { + "tags": [ + "search" + ], + "summary": "Evaluate ranked search results", + "description": "Evaluate the quality of ranked search results over a set of typical search queries.", + "operationId": "rank-eval-1", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "allow_no_indices", + "description": "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`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "collect_mode": { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregationCollectMode" - }, - "order": { - "$ref": "#/components/schemas/_types.aggregations.AggregateOrder" - }, - "min_doc_count": { - "description": "The minimum number of documents in a bucket for it to be returned.", - "type": "number" - }, - "shard_min_doc_count": { - "description": "The minimum number of documents in a bucket on each shard for it to be returned.", - "type": "number" - }, - "shard_size": { - "description": "The number of candidate terms produced by each shard.\nBy default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.", - "type": "number" - }, - "show_term_doc_count_error": { - "description": "Calculates the doc count error on per term basis.", - "type": "boolean" - }, - "size": { - "description": "The number of term buckets should be returned out of the overall terms list.", - "type": "number" - }, - "terms": { - "description": "The field from which to generate sets of terms.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.MultiTermLookup" - } - } + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" }, - "required": [ - "terms" - ] - } - ] - }, - "_types.aggregations.TermsAggregationCollectMode": { - "type": "string", - "enum": [ - "depth_first", - "breadth_first" - ] - }, - "_types.aggregations.MultiTermLookup": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" + "style": "form" }, - "missing": { - "$ref": "#/components/schemas/_types.aggregations.Missing" - } - }, - "required": [ - "field" - ] - }, - "_types.aggregations.NestedAggregation": { - "allOf": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "path": { - "$ref": "#/components/schemas/_types.Field" + "in": "query", + "name": "search_type", + "description": "Search operation type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "requests": { + "description": "A set of typical search requests, together with their provided ratings.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalRequestItem" + } + }, + "metric": { + "description": "Definition of the evaluation metric to calculate.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetric" + } + ] + } + }, + "required": [ + "requests" + ] + }, + "examples": { + "RankEvalRequestExample1": { + "description": "An example body for a `GET /my-index-000001/_rank_eval` request.", + "value": "{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {} } },\n \"ratings\": []\n } ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}" + } } } - } - ] - }, - "_types.aggregations.NormalizeAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" }, - { - "type": "object", - "properties": { - "method": { - "$ref": "#/components/schemas/_types.aggregations.NormalizeMethod" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "metric_score": { + "description": "The overall evaluation quality calculated by the defined metric", + "type": "number" + }, + "details": { + "description": "The details section contains one entry for every query in the original requests section, keyed by the search request id", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDetail" + } + }, + "failures": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "metric_score", + "details", + "failures" + ] + } } } } + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /_rank_eval\n
\n ", + "
\n POST\n /_rank_eval\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "rank_eval", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "_types.aggregations.NormalizeMethod": { - "type": "string", - "enum": [ - "rescale_0_1", - "rescale_0_100", - "percent_of_sum", - "mean", - "z-score", - "softmax" - ] - }, - "_types.aggregations.ParentAggregation": { - "allOf": [ + } + }, + "/{index}/_rank_eval": { + "get": { + "tags": [ + "search" + ], + "summary": "Evaluate ranked search results", + "description": "Evaluate the quality of ranked search results over a set of typical search queries.", + "operationId": "rank-eval-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and index aliases used to limit the request.\nWildcard (`*`) expressions are supported.\nTo target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_types.RelationName" - } - } - } - ] - }, - "_types.aggregations.PercentileRanksAggregation": { - "allOf": [ + "in": "query", + "name": "allow_no_indices", + "description": "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`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "type": "object", - "properties": { - "keyed": { - "description": "By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array.\nSet to `false` to disable this behavior.", - "type": "boolean" - }, - "values": { - "description": "An array of values for which to calculate the percentile ranks.", - "oneOf": [ - { + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "Search operation type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "requests": { + "description": "A set of typical search requests, together with their provided ratings.", "type": "array", "items": { - "type": "number" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalRequestItem" } }, - { - "nullable": true, - "type": "string" + "metric": { + "description": "Definition of the evaluation metric to calculate.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetric" + } + ] } + }, + "required": [ + "requests" ] }, - "hdr": { - "$ref": "#/components/schemas/_types.aggregations.HdrMethod" - }, - "tdigest": { - "$ref": "#/components/schemas/_types.aggregations.TDigest" + "examples": { + "RankEvalRequestExample1": { + "description": "An example body for a `GET /my-index-000001/_rank_eval` request.", + "value": "{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {} } },\n \"ratings\": []\n } ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}" + } } } - } - ] - }, - "_types.aggregations.HdrMethod": { - "type": "object", - "properties": { - "number_of_significant_value_digits": { - "description": "Specifies the resolution of values for the histogram in number of significant digits.", - "type": "number" - } - } - }, - "_types.aggregations.TDigest": { - "type": "object", - "properties": { - "compression": { - "description": "Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.", - "type": "number" - } - } - }, - "_types.aggregations.PercentilesAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" }, - { - "type": "object", - "properties": { - "keyed": { - "description": "By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array.\nSet to `false` to disable this behavior.", - "type": "boolean" - }, - "percents": { - "description": "The percentiles to calculate.", - "type": "array", - "items": { - "type": "number" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "metric_score": { + "description": "The overall evaluation quality calculated by the defined metric", + "type": "number" + }, + "details": { + "description": "The details section contains one entry for every query in the original requests section, keyed by the search request id", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDetail" + } + }, + "failures": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "metric_score", + "details", + "failures" + ] } - }, - "hdr": { - "$ref": "#/components/schemas/_types.aggregations.HdrMethod" - }, - "tdigest": { - "$ref": "#/components/schemas/_types.aggregations.TDigest" } } } + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /{index}/_rank_eval\n
\n ", + "
\n POST\n /{index}/_rank_eval\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "rank_eval", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] }, - "_types.aggregations.PercentilesBucketAggregation": { - "allOf": [ + "post": { + "tags": [ + "search" + ], + "summary": "Evaluate ranked search results", + "description": "Evaluate the quality of ranked search results over a set of typical search queries.", + "operationId": "rank-eval-3", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and index aliases used to limit the request.\nWildcard (`*`) expressions are supported.\nTo target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "percents": { - "description": "The list of percentiles to calculate.", - "type": "array", - "items": { - "type": "number" - } - } - } - } - ] - }, - "_types.aggregations.RangeAggregation": { - "allOf": [ + "in": "query", + "name": "allow_no_indices", + "description": "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`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "missing": { - "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", - "type": "number" + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "Search operation type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "requests": { + "description": "A set of typical search requests, together with their provided ratings.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalRequestItem" + } + }, + "metric": { + "description": "Definition of the evaluation metric to calculate.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetric" + } + ] + } + }, + "required": [ + "requests" + ] }, - "ranges": { - "description": "An array of ranges used to bucket documents.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.AggregationRange" + "examples": { + "RankEvalRequestExample1": { + "description": "An example body for a `GET /my-index-000001/_rank_eval` request.", + "value": "{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {} } },\n \"ratings\": []\n } ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}" } - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "keyed": { - "description": "Set to `true` to associate a unique string key with each bucket and return the ranges as a hash rather than an array.", - "type": "boolean" - }, - "format": { - "type": "string" } } - } - ] - }, - "_types.aggregations.RareTermsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" }, - { - "type": "object", - "properties": { - "exclude": { - "$ref": "#/components/schemas/_types.aggregations.TermsExclude" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "include": { - "$ref": "#/components/schemas/_types.aggregations.TermsInclude" - }, - "max_doc_count": { - "description": "The maximum number of documents a term should appear in.", - "type": "number" - }, - "missing": { - "$ref": "#/components/schemas/_types.aggregations.Missing" - }, - "precision": { - "description": "The precision of the internal CuckooFilters.\nSmaller precision leads to better approximation, but higher memory usage.", - "type": "number" - }, - "value_type": { - "type": "string" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "metric_score": { + "description": "The overall evaluation quality calculated by the defined metric", + "type": "number" + }, + "details": { + "description": "The details section contains one entry for every query in the original requests section, keyed by the search request id", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDetail" + } + }, + "failures": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "metric_score", + "details", + "failures" + ] + } } } } - ] - }, - "_types.aggregations.RateAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" - }, + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /{index}/_rank_eval\n
\n ", + "
\n POST\n /{index}/_rank_eval\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "rank_eval", + "x-category": "search", + "x-metaTags": [ { - "type": "object", - "properties": { - "unit": { - "$ref": "#/components/schemas/_types.aggregations.CalendarInterval" - }, - "mode": { - "$ref": "#/components/schemas/_types.aggregations.RateMode" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.RateMode": { - "type": "string", - "enum": [ - "sum", - "value_count" - ] - }, - "_types.aggregations.ReverseNestedAggregation": { - "allOf": [ + } + }, + "/_reindex": { + "post": { + "tags": [ + "document" + ], + "summary": "Reindex documents", + "description": "Copy documents from a source to a destination.\nYou can copy all documents to the destination index or reindex a subset of the documents.\nThe source can be any existing index, alias, or data stream.\nThe destination must differ from the source.\nFor example, you cannot reindex a data stream into itself.\n\nIMPORTANT: Reindex requires `_source` to be enabled for all documents in the source.\nThe destination should be configured as wanted before calling the reindex API.\nReindex does not copy the settings from the source or its associated template.\nMappings, shard counts, and replicas, for example, must be configured ahead of time.\n\nIf the Elasticsearch security features are enabled, you must have the following security privileges:\n\n* The `read` index privilege for the source data stream, index, or alias.\n* The `write` index privilege for the destination data stream, index, or index alias.\n* To automatically create a data stream or index with a reindex API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege for the destination data stream, index, or alias.\n* If reindexing from a remote cluster, the `source.remote.user` must have the `monitor` cluster privilege and the `read` index privilege for the source data stream, index, or alias.\n\nIf reindexing from a remote cluster into a cluster using Elastic Stack, you must explicitly allow the remote host using the `reindex.remote.whitelist` node setting on the destination cluster.\nIf reindexing from a remote cluster into an Elastic Cloud Serverless project, only remote hosts from Elastic Cloud Hosted are allowed.\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe `dest` element can be configured like the index API to control optimistic concurrency control.\nOmitting `version_type` or setting it to `internal` causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.\n\nSetting `version_type` to `external` causes Elasticsearch to preserve the `version` from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source.\n\nSetting `op_type` to `create` causes the reindex API to create only missing documents in the destination.\nAll existing documents will cause a version conflict.\n\nIMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an `op_type` of `create`.\nA reindex can only add new documents to a destination data stream.\nIt cannot update existing documents in a destination data stream.\n\nBy default, version conflicts abort the reindex process.\nTo continue reindexing if there are conflicts, set the `conflicts` request body property to `proceed`.\nIn this case, the response includes a count of the version conflicts that were encountered.\nNote that the handling of other error types is unaffected by the `conflicts` property.\nAdditionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.\n\nIt's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes.\n* When requested with `wait_for_completion=true` (default), the request fails if the node shuts down.\n* When requested with `wait_for_completion=false`, a task id is returned, for use with the task management APIs. The task may disappear or fail if the node shuts down.\nWhen retrying a failed reindex operation, it might be necessary to set `conflicts=proceed` or to first delete the partial destination index.\nAdditionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause.\n\nRefer to the linked documentation for examples of how to reindex documents.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/reindex-indices", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-reindex.html" + }, + "operationId": "reindex", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "refresh", + "description": "If `true`, the request refreshes affected shards to make this operation visible to search.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "path": { - "$ref": "#/components/schemas/_types.Field" - } - } - } - ] - }, - "_types.aggregations.RandomSamplerAggregation": { - "allOf": [ + "in": "query", + "name": "requests_per_second", + "description": "The throttle for this request in sub-requests per second.\nBy default, there is no throttle.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "scroll", + "description": "The period of time that a consistent view of the index should be maintained for scrolled search.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "object", - "properties": { - "probability": { - "description": "The probability that a document will be included in the aggregated data.\nMust be greater than 0, less than 0.5, or exactly 1.\nThe lower the probability, the fewer documents are matched.", - "type": "number" - }, - "seed": { - "description": "The seed to generate the random sampling of documents.\nWhen a seed is provided, the random subset of documents is the same between calls.", - "type": "number" - }, - "shard_seed": { - "description": "When combined with seed, setting shard_seed ensures 100% consistent sampling over shards where data is exactly the same.", - "type": "number" - } + "in": "query", + "name": "slices", + "description": "The number of slices this task should be divided into.\nIt defaults to one slice, which means the task isn't sliced into subtasks.\n\nReindex supports sliced scroll to parallelize the reindexing process.\nThis parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nNOTE: Reindexing from remote clusters does not support manual or automatic slicing.\n\nIf set to `auto`, Elasticsearch chooses the number of slices to use.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple sources, it will choose the number of slices based on the index or backing index with the smallest number of shards.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Slices" }, - "required": [ - "probability" - ] - } - ] - }, - "_types.aggregations.SamplerAggregation": { - "allOf": [ + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + "in": "query", + "name": "max_docs", + "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "object", - "properties": { - "shard_size": { - "description": "Limits how many top-scoring documents are collected in the sample processed on each shard.", - "type": "number" - } - } - } - ] - }, - "_types.aggregations.ScriptedMetricAggregation": { - "allOf": [ + "in": "query", + "name": "timeout", + "description": "The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.\nBy default, Elasticsearch waits for at least one minute before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value is one, which means it waits for each primary shard to be active.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" }, { - "type": "object", - "properties": { - "combine_script": { - "$ref": "#/components/schemas/_types.Script" - }, - "init_script": { - "$ref": "#/components/schemas/_types.Script" - }, - "map_script": { - "$ref": "#/components/schemas/_types.Script" - }, - "params": { - "description": "A global object with script parameters for `init`, `map` and `combine` scripts.\nIt is shared between the scripts.", + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request blocks until the operation is complete.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "require_alias", + "description": "If `true`, the destination must be an index alias.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "object", - "additionalProperties": { - "type": "object" - } + "properties": { + "conflicts": { + "description": "Indicates whether to continue reindexing even when there are conflicts.", + "default": "abort", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Conflicts" + } + ] + }, + "dest": { + "description": "The destination you are copying to.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.reindex.Destination" + } + ] + }, + "max_docs": { + "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", + "type": "number" + }, + "script": { + "description": "The script to run to update the document source or metadata when reindexing.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "source": { + "description": "The source you are copying from.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.reindex.Source" + } + ] + } + }, + "required": [ + "dest", + "source" + ] }, - "reduce_script": { - "$ref": "#/components/schemas/_types.Script" + "examples": { + "ReindexRequestExample1": { + "summary": "Reindex multiple sources", + "description": "Run `POST _reindex` to reindex from multiple sources. The `index` attribute in source can be a list, which enables you to copy from lots of sources in one request. This example copies documents from the `my-index-000001` and `my-index-000002` indices.\n", + "value": "{\n \"source\": {\n \"index\": [\"my-index-000001\", \"my-index-000002\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000002\"\n }\n}" + }, + "ReindexRequestExample10": { + "summary": "Reindex with Painless", + "description": "You can use Painless to reindex daily indices to apply a new template to the existing documents. The script extracts the date from the index name and creates a new index with `-1` appended. For example, all data from `metricbeat-2016.05.31` will be reindexed into `metricbeat-2016.05.31-1`.\n", + "value": "{\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n}" + }, + "ReindexRequestExample11": { + "summary": "Reindex a random subset", + "description": "Run `POST _reindex` to extract a random subset of the source for testing. You might need to adjust the `min_score` value depending on the relative amount of data extracted from source.\n", + "value": "{\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\" : {\n \"random_score\" : {},\n \"min_score\" : 0.9\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample12": { + "summary": "Reindex modified documents", + "description": "Run `POST _reindex` to modify documents during reindexing. This example bumps the version of the source document.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n}" + }, + "ReindexRequestExample13": { + "summary": "Reindex from remote on Elastic Cloud", + "description": "When using Elastic Cloud, you can run `POST _reindex` and authenticate against a remote cluster with an API key.\n", + "value": "{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample2": { + "summary": "Manual slicing", + "description": "Run `POST _reindex` to slice a reindex request manually. Provide a slice ID and total number of slices to each request.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample3": { + "summary": "Automatic slicing", + "description": "Run `POST _reindex?slices=5&refresh` to automatically parallelize using sliced scroll to slice on `_id`. The `slices` parameter specifies the number of slices to use.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample4": { + "summary": "Routing", + "description": "By default if reindex sees a document with routing then the routing is preserved unless it's changed by the script. You can set `routing` on the `dest` request to change this behavior. In this example, run `POST _reindex` to copy all documents from the `source` with the company name `cat` into the `dest` with routing set to `cat`.\n", + "value": "{\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}" + }, + "ReindexRequestExample5": { + "summary": "Ingest pipelines", + "description": "Run `POST _reindex` and use the ingest pipelines feature.", + "value": "{\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n}" + }, + "ReindexRequestExample6": { + "summary": "Reindex with a query", + "description": "Run `POST _reindex` and add a query to the `source` to limit the documents to reindex. For example, this request copies documents into `my-new-index-000001` only if they have a `user.id` of `kimchy`.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample7": { + "summary": "Reindex with max_docs", + "description": "You can limit the number of processed documents by setting `max_docs`. For example, run `POST _reindex` to copy a single document from `my-index-000001` to `my-new-index-000001`.\n", + "value": "{\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample8": { + "summary": "Reindex selected fields", + "description": "You can use source filtering to reindex a subset of the fields in the original documents. For example, run `POST _reindex` the reindex only the `user.id` and `_doc` fields of each document.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"_source\": [\"user.id\", \"_doc\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample9": { + "summary": "Reindex new field names", + "description": "A reindex operation can build a copy of an index with renamed fields. If your index has documents with `text` and `flag` fields, you can change the latter field name to `tag` during the reindex.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n}" + } } } - } - ] - }, - "_types.aggregations.SerialDifferencingAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" }, - { - "type": "object", - "properties": { - "lag": { - "description": "The historical bucket to subtract from the current value.\nMust be a positive, non-zero integer.", - "type": "number" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "batches": { + "description": "The number of scroll responses that were pulled back by the reindex.", + "type": "number" + }, + "created": { + "description": "The number of documents that were successfully created.", + "type": "number" + }, + "deleted": { + "description": "The number of documents that were successfully deleted.", + "type": "number" + }, + "failures": { + "description": "If there were any unrecoverable errors during the process, it is an array of those failures.\nIf this array is not empty, the request ended because of those failures.\nReindex is implemented using batches and any failure causes the entire process to end but all failures in the current batch are collected into the array.\nYou can use the `conflicts` option to prevent the reindex from ending on version conflicts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.BulkIndexByScrollFailure" + } + }, + "noops": { + "description": "The number of documents that were ignored because the script used for the reindex returned a `noop` value for `ctx.op`.", + "type": "number" + }, + "retries": { + "description": "The number of retries attempted by reindex.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Retries" + } + ] + }, + "requests_per_second": { + "description": "The number of requests per second effectively run during the reindex.", + "type": "number" + }, + "slice_id": { + "type": "number" + }, + "slices": { + "description": "Status of each slice if the reindex was sliced", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ReindexStatus" + } + }, + "task": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TaskId" + } + ] + }, + "throttled_millis": { + "description": "The number of milliseconds the request slept to conform to `requests_per_second`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "throttled_until_millis": { + "description": "This field should always be equal to zero in a reindex response.\nIt has meaning only when using the task API, where it indicates the next time (in milliseconds since epoch) that a throttled request will be run again in order to conform to `requests_per_second`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "timed_out": { + "description": "If any of the requests that ran during the reindex timed out, it is `true`.", + "type": "boolean" + }, + "took": { + "description": "The total milliseconds the entire operation took.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "total": { + "description": "The number of documents that were successfully processed.", + "type": "number" + }, + "updated": { + "description": "The number of documents that were successfully updated.\nThat is to say, a document with the same ID already existed before the reindex updated it.", + "type": "number" + }, + "version_conflicts": { + "description": "The number of version conflicts that occurred.", + "type": "number" + } + } + } } } } - ] - }, - "_types.aggregations.SignificantTermsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, + }, + "x-state": "Generally available; Added in 2.3.0", + "x-variations": [ + "
\n POST\n /_reindex\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`write`\n" + ], + "x-api": "reindex", + "x-category": "document management", + "x-metaTags": [ { - "type": "object", - "properties": { - "background_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "chi_square": { - "$ref": "#/components/schemas/_types.aggregations.ChiSquareHeuristic" - }, - "exclude": { - "$ref": "#/components/schemas/_types.aggregations.TermsExclude" - }, - "execution_hint": { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregationExecutionHint" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "gnd": { - "$ref": "#/components/schemas/_types.aggregations.GoogleNormalizedDistanceHeuristic" - }, - "include": { - "$ref": "#/components/schemas/_types.aggregations.TermsInclude" - }, - "jlh": { - "$ref": "#/components/schemas/_types.EmptyObject" - }, - "min_doc_count": { - "description": "Only return terms that are found in more than `min_doc_count` hits.", - "type": "number" - }, - "mutual_information": { - "$ref": "#/components/schemas/_types.aggregations.MutualInformationHeuristic" - }, - "percentage": { - "$ref": "#/components/schemas/_types.aggregations.PercentageScoreHeuristic" - }, - "script_heuristic": { - "$ref": "#/components/schemas/_types.aggregations.ScriptedHeuristic" - }, - "shard_min_doc_count": { - "description": "Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the `min_doc_count`.\nTerms will only be considered if their local shard frequency within the set is higher than the `shard_min_doc_count`.", - "type": "number" - }, - "shard_size": { - "description": "Can be used to control the volumes of candidate terms produced by each shard.\nBy default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.", - "type": "number" - }, - "size": { - "description": "The number of buckets returned out of the overall terms list.", - "type": "number" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.ChiSquareHeuristic": { - "type": "object", - "properties": { - "background_is_superset": { - "description": "Set to `false` if you defined a custom background filter that represents a different set of documents that you want to compare to.", - "type": "boolean" + } + }, + "/_reindex/{task_id}/_rethrottle": { + "post": { + "tags": [ + "document" + ], + "summary": "Throttle a reindex operation", + "description": "Change the number of requests per second for a particular reindex operation.\nFor example:\n\n```\nPOST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\n```\n\nRethrottling that speeds up the query takes effect immediately.\nRethrottling that slows down the query will take effect after completing the current batch.\nThis behavior prevents scroll timeouts.", + "operationId": "reindex-rethrottle", + "parameters": [ + { + "in": "path", + "name": "task_id", + "description": "The task identifier, which can be found by using the tasks API.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "include_negatives": { - "description": "Set to `false` to filter out the terms that appear less often in the subset than in documents outside the subset.", - "type": "boolean" + { + "in": "query", + "name": "requests_per_second", + "description": "The throttle for this request in sub-requests per second.\nIt can be either `-1` to turn off throttling or any decimal number like `1.7` or `12` to throttle to that level.", + "required": true, + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.reindex_rethrottle.ReindexNode" + } + } + }, + "required": [ + "nodes" + ] + } + } + } } }, - "required": [ - "background_is_superset", - "include_negatives" - ] - }, - "_types.aggregations.TermsAggregationExecutionHint": { - "type": "string", - "enum": [ - "map", - "global_ordinals", - "global_ordinals_hash", - "global_ordinals_low_cardinality" - ] - }, - "_types.aggregations.GoogleNormalizedDistanceHeuristic": { - "type": "object", - "properties": { - "background_is_superset": { - "description": "Set to `false` if you defined a custom background filter that represents a different set of documents that you want to compare to.", - "type": "boolean" + "x-state": "Generally available; Added in 2.4.0", + "x-variations": [ + "
\n POST\n /_reindex/{task_id}/_rethrottle\n
\n " + ], + "x-api": "reindex_rethrottle", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - } - }, - "_types.aggregations.MutualInformationHeuristic": { - "type": "object", - "properties": { - "background_is_superset": { - "description": "Set to `false` if you defined a custom background filter that represents a different set of documents that you want to compare to.", - "type": "boolean" + ] + } + }, + "/_render/template": { + "get": { + "tags": [ + "search" + ], + "summary": "Render a search template", + "description": "Render a search template as a search request body.", + "operationId": "render-search-template", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "The ID of the search template to render.\nIf no `source` is specified, this or the `` request path parameter is required.\nIf you specify both this parameter and the `` parameter, the API uses only ``.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "file": { + "type": "string" + }, + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "source": { + "description": "An inline search template.\nIt supports the same parameters as the search API's request body.\nThese parameters also support Mustache variables.\nIf no `id` or `` is specified, this parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + }, + "examples": { + "RenderSearchTemplateRequestExample1": { + "description": "Run `POST _render/template`", + "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + } + } + } }, - "include_negatives": { - "description": "Set to `false` to filter out the terms that appear less often in the subset than in documents outside the subset.", - "type": "boolean" - } - } - }, - "_types.aggregations.PercentageScoreHeuristic": { - "type": "object" - }, - "_types.aggregations.ScriptedHeuristic": { - "type": "object", - "properties": { - "script": { - "$ref": "#/components/schemas/_types.Script" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template_output": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "template_output" + ] + } + } + } } }, - "required": [ - "script" + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_render/template\n
\n ", + "
\n POST\n /_render/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "render_search_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] }, - "_types.aggregations.SignificantTextAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, - { - "type": "object", - "properties": { - "background_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "chi_square": { - "$ref": "#/components/schemas/_types.aggregations.ChiSquareHeuristic" - }, - "exclude": { - "$ref": "#/components/schemas/_types.aggregations.TermsExclude" - }, - "execution_hint": { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregationExecutionHint" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "filter_duplicate_text": { - "description": "Whether to out duplicate text to deal with noisy data.", - "type": "boolean" - }, - "gnd": { - "$ref": "#/components/schemas/_types.aggregations.GoogleNormalizedDistanceHeuristic" - }, - "include": { - "$ref": "#/components/schemas/_types.aggregations.TermsInclude" - }, - "jlh": { - "$ref": "#/components/schemas/_types.EmptyObject" - }, - "min_doc_count": { - "description": "Only return values that are found in more than `min_doc_count` hits.", - "type": "number" - }, - "mutual_information": { - "$ref": "#/components/schemas/_types.aggregations.MutualInformationHeuristic" - }, - "percentage": { - "$ref": "#/components/schemas/_types.aggregations.PercentageScoreHeuristic" - }, - "script_heuristic": { - "$ref": "#/components/schemas/_types.aggregations.ScriptedHeuristic" - }, - "shard_min_doc_count": { - "description": "Regulates the certainty a shard has if the values should actually be added to the candidate list or not with respect to the min_doc_count.\nValues will only be considered if their local shard frequency within the set is higher than the `shard_min_doc_count`.", - "type": "number" - }, - "shard_size": { - "description": "The number of candidate terms produced by each shard.\nBy default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.", - "type": "number" - }, - "size": { - "description": "The number of buckets returned out of the overall terms list.", - "type": "number" + "post": { + "tags": [ + "search" + ], + "summary": "Render a search template", + "description": "Render a search template as a search request body.", + "operationId": "render-search-template-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "The ID of the search template to render.\nIf no `source` is specified, this or the `` request path parameter is required.\nIf you specify both this parameter and the `` parameter, the API uses only ``.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "file": { + "type": "string" + }, + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "source": { + "description": "An inline search template.\nIt supports the same parameters as the search API's request body.\nThese parameters also support Mustache variables.\nIf no `id` or `` is specified, this parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } }, - "source_fields": { - "$ref": "#/components/schemas/_types.Fields" + "examples": { + "RenderSearchTemplateRequestExample1": { + "description": "Run `POST _render/template`", + "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + } } } - } - ] - }, - "_types.aggregations.StatsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template_output": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "template_output" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_render/template\n
\n ", + "
\n POST\n /_render/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "render_search_template", + "x-category": "search", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.StatsBucketAggregation": { - "allOf": [ + } + }, + "/_render/template/{id}": { + "get": { + "tags": [ + "search" + ], + "summary": "Render a search template", + "description": "Render a search template as a search request body.", + "operationId": "render-search-template-2", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + "in": "path", + "name": "id", + "description": "The ID of the search template to render.\nIf no `source` is specified, this or the `id` request body parameter is required.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "The ID of the search template to render.\nIf no `source` is specified, this or the `` request path parameter is required.\nIf you specify both this parameter and the `` parameter, the API uses only ``.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "file": { + "type": "string" + }, + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "source": { + "description": "An inline search template.\nIt supports the same parameters as the search API's request body.\nThese parameters also support Mustache variables.\nIf no `id` or `` is specified, this parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + }, + "examples": { + "RenderSearchTemplateRequestExample1": { + "description": "Run `POST _render/template`", + "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + } + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template_output": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "template_output" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_render/template/{id}\n
\n ", + "
\n POST\n /_render/template/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "render_search_template", + "x-category": "search", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.aggregations.StringStatsAggregation": { - "allOf": [ + "post": { + "tags": [ + "search" + ], + "summary": "Render a search template", + "description": "Render a search template as a search request body.", + "operationId": "render-search-template-3", + "parameters": [ { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + "in": "path", + "name": "id", + "description": "The ID of the search template to render.\nIf no `source` is specified, this or the `id` request body parameter is required.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "The ID of the search template to render.\nIf no `source` is specified, this or the `` request path parameter is required.\nIf you specify both this parameter and the `` parameter, the API uses only ``.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "file": { + "type": "string" + }, + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "source": { + "description": "An inline search template.\nIt supports the same parameters as the search API's request body.\nThese parameters also support Mustache variables.\nIf no `id` or `` is specified, this parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + }, + "examples": { + "RenderSearchTemplateRequestExample1": { + "description": "Run `POST _render/template`", + "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + } + } + } }, - { - "type": "object", - "properties": { - "show_distribution": { - "description": "Shows the probability distribution for all characters.", - "type": "boolean" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template_output": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "template_output" + ] + } } } } - ] - }, - "_types.aggregations.SumAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" - }, + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_render/template/{id}\n
\n ", + "
\n POST\n /_render/template/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "render_search_template", + "x-category": "search", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.SumBucketAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" - }, + } + }, + "/_rollup/job/{id}": { + "get": { + "tags": [ + "rollup" + ], + "summary": "Get rollup job information", + "description": "Get the configuration, stats, and status of rollup jobs.\n\nNOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs.\nIf a job was created, ran for a while, then was deleted, the API does not return any details about it.\nFor details about a historical rollup job, the rollup capabilities API may be more useful.", + "operationId": "rollup-get-jobs", + "parameters": [ { - "type": "object" + "in": "path", + "name": "id", + "description": "Identifier for the rollup job.\nIf it is `_all` or omitted, the API returns all rollup jobs.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } - ] - }, - "_types.aggregations.TermsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, - { - "type": "object", - "properties": { - "collect_mode": { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregationCollectMode" - }, - "exclude": { - "$ref": "#/components/schemas/_types.aggregations.TermsExclude" - }, - "execution_hint": { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregationExecutionHint" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "include": { - "$ref": "#/components/schemas/_types.aggregations.TermsInclude" - }, - "min_doc_count": { - "description": "Only return values that are found in more than `min_doc_count` hits.", - "type": "number" - }, - "missing": { - "$ref": "#/components/schemas/_types.aggregations.Missing" - }, - "missing_order": { - "$ref": "#/components/schemas/_types.aggregations.MissingOrder" - }, - "missing_bucket": { - "type": "boolean" - }, - "value_type": { - "description": "Coerced unmapped fields into the specified type.", - "type": "string" - }, - "order": { - "$ref": "#/components/schemas/_types.aggregations.AggregateOrder" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "shard_min_doc_count": { - "description": "Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the `min_doc_count`.\nTerms will only be considered if their local shard frequency within the set is higher than the `shard_min_doc_count`.", - "type": "number" - }, - "shard_size": { - "description": "The number of candidate terms produced by each shard.\nBy default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.", - "type": "number" - }, - "show_term_doc_count_error": { - "description": "Set to `true` to return the `doc_count_error_upper_bound`, which is an upper bound to the error on the `doc_count` returned by each shard.", - "type": "boolean" - }, - "size": { - "description": "The number of buckets returned out of the overall terms list.", - "type": "number" - }, - "format": { - "type": "string" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/rollup.get_jobs.RollupJob" + } + } + }, + "required": [ + "jobs" + ] + }, + "examples": { + "GetRollupJobResponseExample1": { + "description": "A successful response from `GET _rollup/job/sensor`.", + "value": "{\n \"jobs\": [\n {\n \"config\": {\n \"id\": \"sensor\",\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"groups\": {\n \"date_histogram\": {\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\",\n \"field\": \"timestamp\",\n \"time_zone\": \"UTC\"\n },\n \"terms\": {\n \"fields\": [\n \"node\"\n ]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\n \"avg\"\n ]\n }\n ],\n \"timeout\": \"20s\",\n \"page_size\": 1000\n },\n \"status\": {\n \"job_state\": \"stopped\"\n },\n \"stats\": {\n \"pages_processed\": 0,\n \"documents_processed\": 0,\n \"rollups_indexed\": 0,\n \"trigger_count\": 0,\n \"index_failures\": 0,\n \"index_time_in_ms\": 0,\n \"index_total\": 0,\n \"search_failures\": 0,\n \"search_time_in_ms\": 0,\n \"search_total\": 0,\n \"processing_time_in_ms\": 0,\n \"processing_total\": 0\n }\n }\n ]\n}" + } + } } } } - ] - }, - "_types.aggregations.TimeSeriesAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, + }, + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_rollup/job/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_rollup`\n" + ], + "x-api": "get_jobs.rollup", + "x-category": "management", + "x-metaTags": [ { - "type": "object", - "properties": { - "size": { - "description": "The maximum number of results to return.", - "type": "number" - }, - "keyed": { - "description": "Set to `true` to associate a unique string key with each bucket and returns the ranges as a hash rather than an array.", - "type": "boolean" - } - } + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_types.aggregations.TopHitsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" - }, + "put": { + "tags": [ + "rollup" + ], + "summary": "Create a rollup job", + "description": "WARNING: From 8.15.0, calling this API in a cluster with no rollup usage will fail with a message about the deprecation and planned removal of rollup features. A cluster needs to contain either a rollup job or a rollup index in order for this API to be allowed to run.\n\nThe rollup job configuration contains all the details about how the job should run, when it indexes documents, and what future queries will be able to run against the rollup index.\n\nThere are three main sections to the job configuration: the logistical details about the job (for example, the cron schedule), the fields that are used for grouping, and what metrics to collect for each group.\n\nJobs are created in a `STOPPED` state. You can start them with the start rollup jobs API.", + "operationId": "rollup-put-job", + "parameters": [ { - "type": "object", - "properties": { - "docvalue_fields": { - "description": "Fields for which to return doc values.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "explain": { - "description": "If `true`, returns detailed information about score computation as part of a hit.", - "type": "boolean" - }, - "fields": { - "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "from": { - "description": "Starting document offset.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types.Highlight" - }, - "script_fields": { - "description": "Returns the result of one or more script evaluations for each hit.", + "in": "path", + "name": "id", + "description": "Identifier for the rollup job. This can be any alphanumeric string and uniquely identifies the\ndata that is associated with the rollup job. The ID is persistent; it is stored with the rolled\nup data. If you create a job, let it run for a while, then delete the job, the data that the job\nrolled up is still be associated with this job ID. You cannot create a new job with the same ID\nsince that could lead to problems with mismatched job configurations.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } - }, - "size": { - "description": "The maximum number of top matching hits to return per bucket.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "track_scores": { - "description": "If `true`, calculates and returns document scores, even if the scores are not used for sorting.", - "type": "boolean" - }, - "version": { - "description": "If `true`, returns document version as part of a hit.", - "type": "boolean" + "properties": { + "cron": { + "description": "A cron string which defines the intervals when the rollup job should be executed. When the interval\ntriggers, the indexer attempts to rollup the data in the index pattern. The cron pattern is unrelated\nto the time interval of the data being rolled up. For example, you may wish to create hourly rollups\nof your document but to only run the indexer on a daily basis at midnight, as defined by the cron. The\ncron pattern is defined just like a Watcher cron schedule.", + "type": "string" + }, + "groups": { + "description": "Defines the grouping fields and aggregations that are defined for this rollup job. These fields will then be\navailable later for aggregating into buckets. These aggs and fields can be used in any combination. Think of\nthe groups configuration as defining a set of tools that can later be used in aggregations to partition the\ndata. Unlike raw data, we have to think ahead to which fields and aggregations might be used. Rollups provide\nenough flexibility that you simply need to determine which fields are needed, not in what order they are needed.", + "allOf": [ + { + "$ref": "#/components/schemas/rollup._types.Groupings" + } + ] + }, + "index_pattern": { + "description": "The index or index pattern to roll up. Supports wildcard-style patterns (`logstash-*`). The job attempts to\nrollup the entire index or index-pattern.", + "type": "string" + }, + "metrics": { + "description": "Defines the metrics to collect for each grouping tuple. By default, only the doc_counts are collected for each\ngroup. To make rollup useful, you will often add metrics like averages, mins, maxes, etc. Metrics are defined\non a per-field basis and for each field you configure which metric should be collected.", + "type": "array", + "items": { + "$ref": "#/components/schemas/rollup._types.FieldMetric" + } + }, + "page_size": { + "description": "The number of bucket results that are processed on each iteration of the rollup indexer. A larger value tends\nto execute faster, but requires more memory during processing. This value has no effect on how the data is\nrolled up; it is merely used for tweaking the speed or memory cost of the indexer.", + "type": "number" + }, + "rollup_index": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "timeout": { + "description": "Time to wait for the request to complete.", + "default": "20s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "headers": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.HttpHeaders" + } + ] + } + }, + "required": [ + "cron", + "groups", + "index_pattern", + "page_size", + "rollup_index" + ] }, - "seq_no_primary_term": { - "description": "If `true`, returns sequence number and primary term of the last modification of each hit.", - "type": "boolean" + "examples": { + "CreateRollupJobRequestExample1": { + "description": "Run `PUT _rollup/job/sensor` to create a rollup job that targets the `sensor-*` index pattern. This configuration enables date histograms to be used on the `timestamp` field and terms aggregations to be used on the `node` field. This configuration defines metrics over two fields: `temperature` and `voltage`. For the `temperature` field, it collects the `min`, `max`, and `sum` of the temperature. For `voltage`, it collects the `average`.\n", + "value": "{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\": 1000,\n \"groups\": {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [ \"node\" ]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [ \"min\", \"max\", \"sum\" ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [ \"avg\" ]\n }\n ]\n}" + } } } - } - ] - }, - "_types.aggregations.TTestAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" }, - { - "type": "object", - "properties": { - "a": { - "$ref": "#/components/schemas/_types.aggregations.TestPopulation" - }, - "b": { - "$ref": "#/components/schemas/_types.aggregations.TestPopulation" - }, - "type": { - "$ref": "#/components/schemas/_types.aggregations.TTestType" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "CreateRollupJobResponseExample1": { + "value": "{\n \"acknowledged\": true\n}" + } + } } } } - ] - }, - "_types.aggregations.TestPopulation": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } }, - "required": [ - "field" - ] - }, - "_types.aggregations.TTestType": { - "type": "string", - "enum": [ - "paired", - "homoscedastic", - "heteroscedastic" + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n PUT\n /_rollup/job/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`,`manage_rollup`\n" + ], + "x-api": "put_job.rollup", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] }, - "_types.aggregations.TopMetricsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" - }, + "delete": { + "tags": [ + "rollup" + ], + "summary": "Delete a rollup job", + "description": "A job must be stopped before it can be deleted.\nIf you attempt to delete a started job, an error occurs.\nSimilarly, if you attempt to delete a nonexistent job, an exception occurs.\n\nIMPORTANT: When you delete a job, you remove only the process that is actively monitoring and rolling up data.\nThe API does not delete any previously rolled up data.\nThis is by design; a user may wish to roll up a static data set.\nBecause the data set is static, after it has been fully rolled up there is no need to keep the indexing rollup job around (as there will be no new data).\nThus the job can be deleted, leaving behind the rolled up data for analysis.\nIf you wish to also remove the rollup data and the rollup index contains the data for only a single job, you can delete the whole rollup index.\nIf the rollup index stores data from several jobs, you must issue a delete-by-query that targets the rollup job's identifier in the rollup index. For example:\n\n```\nPOST my_rollup_index/_delete_by_query\n{\n \"query\": {\n \"term\": {\n \"_rollup.id\": \"the_rollup_job_id\"\n }\n }\n}\n```", + "operationId": "rollup-delete-job", + "parameters": [ { - "type": "object", - "properties": { - "metrics": { - "description": "The fields of the top document to return.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.TopMetricsValue" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.TopMetricsValue" + "in": "path", + "name": "id", + "description": "Identifier for the job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "task_failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.TaskFailure" + } } + }, + "required": [ + "acknowledged" + ] + }, + "examples": { + "DeleteRollupJobResponseExample1": { + "description": "A successful response from `DELETE _rollup/job/sensor`.", + "value": "{\n \"acknowledged\": true\n}" } - ] - }, - "size": { - "description": "The number of top documents from which to return metrics.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" + } } } } - ] - }, - "_types.aggregations.TopMetricsValue": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - } }, - "required": [ - "field" - ] - }, - "_types.aggregations.ValueCountAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormattableMetricAggregation" - }, + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n DELETE\n /_rollup/job/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_rollup`\n" + ], + "x-api": "delete_job.rollup", + "x-category": "management", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.aggregations.FormattableMetricAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" - }, - { - "type": "object", - "properties": { - "format": { - "type": "string" + } + }, + "/_rollup/job": { + "get": { + "tags": [ + "rollup" + ], + "summary": "Get rollup job information", + "description": "Get the configuration, stats, and status of rollup jobs.\n\nNOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs.\nIf a job was created, ran for a while, then was deleted, the API does not return any details about it.\nFor details about a historical rollup job, the rollup capabilities API may be more useful.", + "operationId": "rollup-get-jobs-1", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/rollup.get_jobs.RollupJob" + } + } + }, + "required": [ + "jobs" + ] + }, + "examples": { + "GetRollupJobResponseExample1": { + "description": "A successful response from `GET _rollup/job/sensor`.", + "value": "{\n \"jobs\": [\n {\n \"config\": {\n \"id\": \"sensor\",\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"groups\": {\n \"date_histogram\": {\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\",\n \"field\": \"timestamp\",\n \"time_zone\": \"UTC\"\n },\n \"terms\": {\n \"fields\": [\n \"node\"\n ]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\n \"avg\"\n ]\n }\n ],\n \"timeout\": \"20s\",\n \"page_size\": 1000\n },\n \"status\": {\n \"job_state\": \"stopped\"\n },\n \"stats\": {\n \"pages_processed\": 0,\n \"documents_processed\": 0,\n \"rollups_indexed\": 0,\n \"trigger_count\": 0,\n \"index_failures\": 0,\n \"index_time_in_ms\": 0,\n \"index_total\": 0,\n \"search_failures\": 0,\n \"search_time_in_ms\": 0,\n \"search_total\": 0,\n \"processing_time_in_ms\": 0,\n \"processing_total\": 0\n }\n }\n ]\n}" + } + } } } } - ] - }, - "_types.aggregations.WeightedAverageAggregation": { - "allOf": [ + }, + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_rollup/job\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_rollup`\n" + ], + "x-api": "get_jobs.rollup", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" - }, + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_rollup/data/{id}": { + "get": { + "tags": [ + "rollup" + ], + "summary": "Get the rollup job capabilities", + "description": "Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.\n\nThis API is useful because a rollup job is often configured to rollup only a subset of fields from the source index.\nFurthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.\nThis API enables you to inspect an index and determine:\n\n1. Does this index have associated rollup data somewhere in the cluster?\n2. If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?", + "operationId": "rollup-get-rollup-caps", + "parameters": [ { - "type": "object", - "properties": { - "format": { - "description": "A numeric response formatter.", - "type": "string" - }, - "value": { - "$ref": "#/components/schemas/_types.aggregations.WeightedAverageValue" - }, - "value_type": { - "$ref": "#/components/schemas/_types.aggregations.ValueType" - }, - "weight": { - "$ref": "#/components/schemas/_types.aggregations.WeightedAverageValue" + "in": "path", + "name": "id", + "description": "Index, indices or index-pattern to return rollup capabilities for.\n`_all` may be used to fetch rollup capabilities from all jobs.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupCapabilities" + } + }, + "examples": { + "GetRollupCapabilitiesResponseExample1": { + "description": "A successful response from `GET _rollup/data/sensor-*` for a rollup job that targets the index pattern `sensor-*`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.\n", + "value": "{\n \"sensor-*\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}" + } + } } } } - ] - }, - "_types.aggregations.WeightedAverageValue": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "missing": { - "description": "A value or weight to use if the field is missing.", - "type": "number" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - } - } - }, - "_types.aggregations.VariableWidthHistogramAggregation": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "buckets": { - "description": "The target number of buckets.", - "type": "number" - }, - "shard_size": { - "description": "The number of buckets that the coordinating node will request from each shard.\nDefaults to `buckets * 50`.", - "type": "number" - }, - "initial_buffer": { - "description": "Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run.\nDefaults to `min(10 * shard_size, 50000)`.", - "type": "number" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - } - } - }, - "autoscaling.get_autoscaling_capacity.AutoscalingDeciders": { - "type": "object", - "properties": { - "required_capacity": { - "$ref": "#/components/schemas/autoscaling.get_autoscaling_capacity.AutoscalingCapacity" - }, - "current_capacity": { - "$ref": "#/components/schemas/autoscaling.get_autoscaling_capacity.AutoscalingCapacity" - }, - "current_nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/autoscaling.get_autoscaling_capacity.AutoscalingNode" - } - }, - "deciders": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/autoscaling.get_autoscaling_capacity.AutoscalingDecider" - } - } - }, - "required": [ - "required_capacity", - "current_capacity", - "current_nodes", - "deciders" - ] - }, - "autoscaling.get_autoscaling_capacity.AutoscalingCapacity": { - "type": "object", - "properties": { - "node": { - "$ref": "#/components/schemas/autoscaling.get_autoscaling_capacity.AutoscalingResources" - }, - "total": { - "$ref": "#/components/schemas/autoscaling.get_autoscaling_capacity.AutoscalingResources" - } }, - "required": [ - "node", - "total" - ] - }, - "autoscaling.get_autoscaling_capacity.AutoscalingResources": { - "type": "object", - "properties": { - "storage": { - "type": "number" - }, - "memory": { - "type": "number" + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_rollup/data/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_rollup`\n" + ], + "x-api": "get_rollup_caps.rollup", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "required": [ - "storage", - "memory" ] - }, - "autoscaling.get_autoscaling_capacity.AutoscalingNode": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.NodeName" + } + }, + "/_rollup/data": { + "get": { + "tags": [ + "rollup" + ], + "summary": "Get the rollup job capabilities", + "description": "Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.\n\nThis API is useful because a rollup job is often configured to rollup only a subset of fields from the source index.\nFurthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.\nThis API enables you to inspect an index and determine:\n\n1. Does this index have associated rollup data somewhere in the cluster?\n2. If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?", + "operationId": "rollup-get-rollup-caps-1", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupCapabilities" + } + }, + "examples": { + "GetRollupCapabilitiesResponseExample1": { + "description": "A successful response from `GET _rollup/data/sensor-*` for a rollup job that targets the index pattern `sensor-*`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.\n", + "value": "{\n \"sensor-*\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}" + } + } + } + } } }, - "required": [ - "name" - ] - }, - "_types.NodeName": { - "type": "string" - }, - "autoscaling.get_autoscaling_capacity.AutoscalingDecider": { - "type": "object", - "properties": { - "required_capacity": { - "$ref": "#/components/schemas/autoscaling.get_autoscaling_capacity.AutoscalingCapacity" - }, - "reason_summary": { - "type": "string" - }, - "reason_details": { - "type": "object" + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_rollup/data\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_rollup`\n" + ], + "x-api": "get_rollup_caps.rollup", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - }, - "required": [ - "required_capacity" ] - }, - "autoscaling._types.AutoscalingPolicy": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "deciders": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/autoscaling/autoscaling-deciders" + } + }, + "/{index}/_rollup/data": { + "get": { + "tags": [ + "rollup" + ], + "summary": "Get the rollup index capabilities", + "description": "Get the rollup capabilities of all jobs inside of a rollup index.\nA single rollup index may store the data for multiple rollup jobs and may have a variety of capabilities depending on those jobs. This API enables you to determine:\n\n* What jobs are stored in an index (or indices specified via a pattern)?\n* What target indices were rolled up, what fields were used in those rollups, and what aggregations can be performed on each job?", + "operationId": "rollup-get-rollup-index-caps", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "Data stream or index to check for rollup capabilities.\nWildcard (`*`) expressions are supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Ids" }, - "description": "Decider settings.", - "type": "object", - "additionalProperties": { - "type": "object" + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/rollup.get_rollup_index_caps.IndexCapabilities" + } + }, + "examples": { + "GetRollupIndexCapabilitiesResponseExample1": { + "description": "A successful response from `GET /sensor_rollup/_rollup/data`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.\n", + "value": "{\n \"sensor_rollup\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}" + } + } + } } } }, - "required": [ - "roles", - "deciders" - ] - }, - "_types.Refresh": { - "type": "string", - "enum": [ - "true", - "false", - "wait_for" - ] - }, - "_types.WaitForActiveShards": { - "oneOf": [ - { - "type": "number" - }, + "deprecated": true, + "x-state": "Technical preview; Added in 6.4.0", + "x-variations": [ + "
\n GET\n /{index}/_rollup/data\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "get_rollup_index_caps.rollup", + "x-category": "management", + "x-metaTags": [ { - "$ref": "#/components/schemas/_types.WaitForActiveShardOptions" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_types.WaitForActiveShardOptions": { - "type": "string", - "enum": [ - "all", - "index-setting" - ] - }, - "_global.bulk.OperationContainer": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_global.bulk.IndexOperation" - }, - "create": { - "$ref": "#/components/schemas/_global.bulk.CreateOperation" - }, - "update": { - "$ref": "#/components/schemas/_global.bulk.UpdateOperation" - }, - "delete": { - "$ref": "#/components/schemas/_global.bulk.DeleteOperation" - } + } + }, + "/{index}/_rollup_search": { + "get": { + "tags": [ + "rollup" + ], + "summary": "Search rolled-up data", + "description": "The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\nFor more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/getting-started-api#historical-only-search-example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-search.html" }, - "minProperties": 1, - "maxProperties": 1 - }, - "_global.bulk.IndexOperation": { - "allOf": [ + "operationId": "rollup-rollup-search", + "parameters": [ { - "$ref": "#/components/schemas/_global.bulk.WriteOperation" + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams and indices used to limit the request.\nThis parameter has the following rules:\n\n* At least one data stream, index, or wildcard expression must be specified. This target can include a rollup or non-rollup index. For data streams, the stream's backing indices can only serve as non-rollup indices. Omitting the parameter or using `_all` are not permitted.\n* Multiple non-rollup indices may be specified.\n* Only one rollup index may be specified. If more than one are supplied, an exception occurs.\n* Wildcard expressions (`*`) may be used. If they match more than one rollup index, an exception occurs. However, you can use an expression to match multiple non-rollup indices or data streams.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "type": "object" - } - ] - }, - "_global.bulk.WriteOperation": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.bulk.OperationBase" + "in": "query", + "name": "rest_total_hits_as_int", + "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "object", - "properties": { - "dynamic_templates": { - "description": "A map from the full name of fields to the name of dynamic templates.\nIt defaults to an empty map.\nIf a name matches a dynamic template, that template will be applied regardless of other match predicates defined in the template.\nIf a field is already defined in the mapping, then this parameter won't be used.", + "in": "query", + "name": "typed_keys", + "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "aggregations": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-aggregation-limitations" + }, + "description": "Specifies aggregations.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-search-limitations" + }, + "description": "Specifies a DSL query that is subject to some limitations.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "size": { + "description": "Must be zero if set, as rollups work on pre-aggregated data.", + "type": "number" + } } }, - "pipeline": { - "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", - "type": "string" - }, - "require_alias": { - "description": "If `true`, the request's actions must target an index alias.", - "type": "boolean" + "examples": { + "RollupSearchRequestExample1": { + "description": "Search rolled up data stored in `sensor_rollup` with `GET /sensor_rollup/_rollup_search`", + "value": "{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}" + } } } - } - ] - }, - "_global.bulk.OperationBase": { - "type": "object", - "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "if_primary_term": { - "type": "number" - }, - "if_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "terminated_early": { + "type": "boolean" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" + } + } + }, + "required": [ + "took", + "timed_out", + "_shards", + "hits" + ] + }, + "examples": { + "RollupSearchResponseExample1": { + "description": "An abbreviated response from `GET /sensor_rollup/_rollup_search` with a `max` aggregation on a `temperature` field. The response provides some metadata about the request (`took`, `_shards`), the search hits (which is always empty for rollup searches), and the aggregation response.\n", + "value": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : {} ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}" + } + } + } + } } - } - }, - "_global.bulk.CreateOperation": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.bulk.WriteOperation" - }, + }, + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /{index}/_rollup_search\n
\n ", + "
\n POST\n /{index}/_rollup_search\n
\n " + ], + "x-api": "rollup_search.rollup", + "x-category": "management", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] }, - "_global.bulk.UpdateOperation": { - "allOf": [ + "post": { + "tags": [ + "rollup" + ], + "summary": "Search rolled-up data", + "description": "The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\nFor more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/getting-started-api#historical-only-search-example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-search.html" + }, + "operationId": "rollup-rollup-search-1", + "parameters": [ { - "$ref": "#/components/schemas/_global.bulk.OperationBase" + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams and indices used to limit the request.\nThis parameter has the following rules:\n\n* At least one data stream, index, or wildcard expression must be specified. This target can include a rollup or non-rollup index. For data streams, the stream's backing indices can only serve as non-rollup indices. Omitting the parameter or using `_all` are not permitted.\n* Multiple non-rollup indices may be specified.\n* Only one rollup index may be specified. If more than one are supplied, an exception occurs.\n* Wildcard expressions (`*`) may be used. If they match more than one rollup index, an exception occurs. However, you can use an expression to match multiple non-rollup indices or data streams.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, { - "type": "object", - "properties": { - "require_alias": { - "description": "If `true`, the request's actions must target an index alias.", - "type": "boolean" + "in": "query", + "name": "rest_total_hits_as_int", + "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-aggregation-limitations" + }, + "description": "Specifies aggregations.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-search-limitations" + }, + "description": "Specifies a DSL query that is subject to some limitations.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "size": { + "description": "Must be zero if set, as rollups work on pre-aggregated data.", + "type": "number" + } + } }, - "retry_on_conflict": { - "description": "The number of times an update should be retried in the case of a version conflict.", - "type": "number" + "examples": { + "RollupSearchRequestExample1": { + "description": "Search rolled up data stored in `sensor_rollup` with `GET /sensor_rollup/_rollup_search`", + "value": "{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}" + } } } - } - ] - }, - "_global.bulk.DeleteOperation": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.bulk.OperationBase" }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "terminated_early": { + "type": "boolean" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" + } + } + }, + "required": [ + "took", + "timed_out", + "_shards", + "hits" + ] + }, + "examples": { + "RollupSearchResponseExample1": { + "description": "An abbreviated response from `GET /sensor_rollup/_rollup_search` with a `max` aggregation on a `temperature` field. The response provides some metadata about the request (`took`, `_shards`), the search hits (which is always empty for rollup searches), and the aggregation response.\n", + "value": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : {} ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}" + } + } + } + } + } + }, + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /{index}/_rollup_search\n
\n ", + "
\n POST\n /{index}/_rollup_search\n
\n " + ], + "x-api": "rollup_search.rollup", + "x-category": "management", + "x-metaTags": [ { - "type": "object" + "content": "Elasticsearch", + "name": "product_name" } ] - }, - "_global.bulk.UpdateAction": { - "type": "object", - "properties": { - "detect_noop": { - "description": "If true, the `result` in the response is set to 'noop' when no changes to the document occur.", - "type": "boolean" - }, - "doc": { - "description": "A partial update to an existing document.", - "type": "object" - }, - "doc_as_upsert": { - "description": "Set to `true` to use the contents of `doc` as the value of `upsert`.", - "type": "boolean" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "scripted_upsert": { - "description": "Set to `true` to run the script whether or not the document exists.", - "type": "boolean" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "upsert": { - "description": "If the document does not already exist, the contents of `upsert` are inserted as a new document.\nIf the document exists, the `script` is run.", - "type": "object" + } + }, + "/_rollup/job/{id}/_start": { + "post": { + "tags": [ + "rollup" + ], + "summary": "Start rollup jobs", + "description": "If you try to start a job that does not exist, an exception occurs.\nIf you try to start a job that is already started, nothing happens.", + "operationId": "rollup-start-job", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Identifier for the rollup job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" } - } - }, - "_global.bulk.ResponseItem": { - "type": "object", - "properties": { - "_id": { - "description": "The document ID associated with the operation.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "started": { + "type": "boolean" + } + }, + "required": [ + "started" + ] + }, + "examples": { + "StartRollupJobResponseExample1": { + "description": "A successful response from `POST _rollup/job/sensor/_start`.", + "value": "{\n \"started\": true\n}" + } + } } - ] - }, - "_index": { - "description": "The name of the index associated with the operation.\nIf the operation targeted a data stream, this is the backing index into which the document was written.", - "type": "string" - }, - "status": { - "description": "The HTTP status code returned for the operation.", - "type": "number" - }, - "failure_store": { - "$ref": "#/components/schemas/_global.bulk.FailureStoreStatus" - }, - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" - }, - "_primary_term": { - "description": "The primary term assigned to the document for the operation.\nThis property is returned only for successful operations.", - "type": "number" - }, - "result": { - "description": "The result of the operation.\nSuccessful values are `created`, `deleted`, and `updated`.", - "type": "string" - }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" + } + } + }, + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n POST\n /_rollup/job/{id}/_start\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_rollup`\n" + ], + "x-api": "start_job.rollup", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_rollup/job/{id}/_stop": { + "post": { + "tags": [ + "rollup" + ], + "summary": "Stop rollup jobs", + "description": "If you try to stop a job that does not exist, an exception occurs.\nIf you try to stop a job that is already stopped, nothing happens.\n\nSince only a stopped job can be deleted, it can be useful to block the API until the indexer has fully stopped.\nThis is accomplished with the `wait_for_completion` query parameter, and optionally a timeout. For example:\n\n```\nPOST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s\n```\nThe parameter blocks the API call from returning until either the job has moved to STOPPED or the specified time has elapsed.\nIf the specified time elapses without the job moving to STOPPED, a timeout exception occurs.", + "operationId": "rollup-stop-job", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Identifier for the rollup job.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" }, - "forced_refresh": { - "type": "boolean" + { + "in": "query", + "name": "timeout", + "description": "If `wait_for_completion` is `true`, the API blocks for (at maximum) the specified duration while waiting for the job to stop.\nIf more than `timeout` time has passed, the API throws a timeout exception.\nNOTE: Even if a timeout occurs, the stop request is still processing and eventually moves the job to STOPPED.\nThe timeout simply means the API call itself timed out while waiting for the status change.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, - "get": { - "$ref": "#/components/schemas/_types.InlineGetDictUserDefined" + { + "in": "query", + "name": "wait_for_completion", + "description": "If set to `true`, causes the API to block until the indexer state completely stops.\nIf set to `false`, the API returns immediately and the indexer is stopped asynchronously in the background.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stopped": { + "type": "boolean" + } + }, + "required": [ + "stopped" + ] + } + } + } } }, - "required": [ - "_index", - "status" - ] - }, - "_global.bulk.FailureStoreStatus": { - "type": "string", - "enum": [ - "not_applicable_or_unknown", - "used", - "not_enabled", - "failed" + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n POST\n /_rollup/job/{id}/_stop\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_rollup`\n" + ], + "x-api": "stop_job.rollup", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "_types.InlineGetDictUserDefined": { - "type": "object", - "properties": { - "fields": { - "type": "object", - "additionalProperties": { - "type": "object" + } + }, + "/_scripts/painless/_execute": { + "get": { + "tags": [ + "script" + ], + "summary": "Run a script", + "description": "Runs a script and returns a result.\nUse this API to build and test scripts, such as when defining a script for a runtime field.\nThis API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster.\n\nThe API uses several _contexts_, which control how scripts are run, what variables are available at runtime, and what the return type is.\n\nEach context requires a script, but additional parameters depend on the context you're using for that script.", + "operationId": "scripts-painless-execute", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "context": { + "description": "The context that the script should run in.\nNOTE: Result ordering in the field contexts is not guaranteed.", + "default": "painless_test", + "allOf": [ + { + "$ref": "#/components/schemas/_global.scripts_painless_execute.PainlessContext" + } + ] + }, + "context_setup": { + "description": "Additional parameters for the `context`.\nNOTE: This parameter is required for all contexts except `painless_test`, which is the default if no value is provided for `context`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.scripts_painless_execute.PainlessContextSetup" + } + ] + }, + "script": { + "description": "The Painless script to run.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + } + }, + "examples": { + "ExecutePainlessScriptRequestExample1": { + "summary": "Test context", + "description": "Run `POST /_scripts/painless/_execute`. The `painless_test` context is the default context. It runs scripts without additional parameters. The only variable that is available is `params`, which can be used to access user defined values. The result of the script is always converted to a string.\n", + "value": "{\n \"script\": {\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100.0,\n \"total\": 1000.0\n }\n }\n}" + }, + "ExecutePainlessScriptRequestExample2": { + "summary": "Filter context", + "description": "Run `POST /_scripts/painless/_execute` with a `filter` context. It treats scripts as if they were run inside a script query. For testing purposes, a document must be provided so that it will be temporarily indexed in-memory and is accessible from the script. More precisely, the `_source`, stored fields, and doc values of such a document are available to the script being tested.\n", + "value": "{\n \"script\": {\n \"source\": \"doc['field'].value.length() <= params.max_length\",\n \"params\": {\n \"max_length\": 4\n }\n },\n \"context\": \"filter\",\n \"context_setup\": {\n \"index\": \"my-index-000001\",\n \"document\": {\n \"field\": \"four\"\n }\n }\n}" + }, + "ExecutePainlessScriptRequestExample3": { + "summary": "Score context", + "description": "Run `POST /_scripts/painless/_execute` with a `score` context. It treats scripts as if they were run inside a `script_score` function in a `function_score` query.\n", + "value": "{\n \"script\": {\n \"source\": \"doc['rank'].value / params.max_rank\",\n \"params\": {\n \"max_rank\": 5.0\n }\n },\n \"context\": \"score\",\n \"context_setup\": {\n \"index\": \"my-index-000001\",\n \"document\": {\n \"rank\": 4\n }\n }\n}" + } + } } }, - "found": { - "type": "boolean" - }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "_primary_term": { - "type": "number" - }, - "_routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "_source": { - "type": "object", - "additionalProperties": { - "type": "object" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "type": "object" + } + }, + "required": [ + "result" + ] + }, + "examples": { + "ExecutePainlessScriptResponseExample1": { + "summary": "Test context", + "description": "A successful response from `POST /_scripts/painless/_execute` with a `painless_test` context.", + "value": "{\n \"result\": \"0.1\"\n}" + }, + "ExecutePainlessScriptResponseExample2": { + "summary": "Filter context", + "description": "A successful response from `POST /_scripts/painless/_execute` with a `filter` context.", + "value": "{\n \"result\": true\n}" + }, + "ExecutePainlessScriptResponseExample3": { + "summary": "Score context", + "description": "A successful response from `POST /_scripts/painless/_execute` with a `score` context.", + "value": "{\n \"result\": 0.8\n}" + } + } + } } } }, - "required": [ - "found" + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_scripts/painless/_execute\n
\n ", + "
\n POST\n /_scripts/painless/_execute\n
\n " + ], + "x-api": "scripts_painless_execute", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] }, - "_types.Names": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Name" + "post": { + "tags": [ + "script" + ], + "summary": "Run a script", + "description": "Runs a script and returns a result.\nUse this API to build and test scripts, such as when defining a script for a runtime field.\nThis API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster.\n\nThe API uses several _contexts_, which control how scripts are run, what variables are available at runtime, and what the return type is.\n\nEach context requires a script, but additional parameters depend on the context you're using for that script.", + "operationId": "scripts-painless-execute-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "context": { + "description": "The context that the script should run in.\nNOTE: Result ordering in the field contexts is not guaranteed.", + "default": "painless_test", + "allOf": [ + { + "$ref": "#/components/schemas/_global.scripts_painless_execute.PainlessContext" + } + ] + }, + "context_setup": { + "description": "Additional parameters for the `context`.\nNOTE: This parameter is required for all contexts except `painless_test`, which is the default if no value is provided for `context`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.scripts_painless_execute.PainlessContextSetup" + } + ] + }, + "script": { + "description": "The Painless script to run.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + } + }, + "examples": { + "ExecutePainlessScriptRequestExample1": { + "summary": "Test context", + "description": "Run `POST /_scripts/painless/_execute`. The `painless_test` context is the default context. It runs scripts without additional parameters. The only variable that is available is `params`, which can be used to access user defined values. The result of the script is always converted to a string.\n", + "value": "{\n \"script\": {\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100.0,\n \"total\": 1000.0\n }\n }\n}" + }, + "ExecutePainlessScriptRequestExample2": { + "summary": "Filter context", + "description": "Run `POST /_scripts/painless/_execute` with a `filter` context. It treats scripts as if they were run inside a script query. For testing purposes, a document must be provided so that it will be temporarily indexed in-memory and is accessible from the script. More precisely, the `_source`, stored fields, and doc values of such a document are available to the script being tested.\n", + "value": "{\n \"script\": {\n \"source\": \"doc['field'].value.length() <= params.max_length\",\n \"params\": {\n \"max_length\": 4\n }\n },\n \"context\": \"filter\",\n \"context_setup\": {\n \"index\": \"my-index-000001\",\n \"document\": {\n \"field\": \"four\"\n }\n }\n}" + }, + "ExecutePainlessScriptRequestExample3": { + "summary": "Score context", + "description": "Run `POST /_scripts/painless/_execute` with a `score` context. It treats scripts as if they were run inside a `script_score` function in a `function_score` query.\n", + "value": "{\n \"script\": {\n \"source\": \"doc['rank'].value / params.max_rank\",\n \"params\": {\n \"max_rank\": 5.0\n }\n },\n \"context\": \"score\",\n \"context_setup\": {\n \"index\": \"my-index-000001\",\n \"document\": {\n \"rank\": 4\n }\n }\n}" + } + } + } }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Name" + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "type": "object" + } + }, + "required": [ + "result" + ] + }, + "examples": { + "ExecutePainlessScriptResponseExample1": { + "summary": "Test context", + "description": "A successful response from `POST /_scripts/painless/_execute` with a `painless_test` context.", + "value": "{\n \"result\": \"0.1\"\n}" + }, + "ExecutePainlessScriptResponseExample2": { + "summary": "Filter context", + "description": "A successful response from `POST /_scripts/painless/_execute` with a `filter` context.", + "value": "{\n \"result\": true\n}" + }, + "ExecutePainlessScriptResponseExample3": { + "summary": "Score context", + "description": "A successful response from `POST /_scripts/painless/_execute` with a `score` context.", + "value": "{\n \"result\": 0.8\n}" + } + } + } } } + }, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_scripts/painless/_execute\n
\n ", + "
\n POST\n /_scripts/painless/_execute\n
\n " + ], + "x-api": "scripts_painless_execute", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } ] - }, - "cat.aliases.AliasesRecord": { - "type": "object", - "properties": { - "alias": { - "description": "alias name", - "type": "string" + } + }, + "/_search": { + "get": { + "tags": [ + "search" + ], + "summary": "Run a search", + "description": "Get search hits that match the query defined in the request.\nYou can provide search queries using the `q` query string parameter or the request body.\nIf both are specified, only the query parameter is used.\n\nIf the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.\nTo search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices.\n\n**Search slicing**\n\nWhen paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties.\nBy default the splitting is done first on the shards, then locally on each shard.\nThe local splitting partitions the shard into contiguous ranges based on Lucene document IDs.\n\nFor instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.\n\nIMPORTANT: The same point-in-time ID should be used for all slices.\nIf different PIT IDs are used, slices can overlap and miss documents.\nThis situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-search.html" + }, + "operationId": "search", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If `true` and there are shard request timeouts or shard failures, the request returns partial results.\nIf `false`, it returns an error with no partial results.\n\nTo override the default behavior, you can set the `search.default_allow_partial_results` cluster setting to `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "filter": { - "description": "filter", - "type": "string" + { + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "routing.index": { - "description": "index routing", - "type": "string" + { + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "routing.search": { - "description": "search routing", - "type": "string" + { + "in": "query", + "name": "batched_reduce_size", + "description": "The number of shard results that should be reduced at once on the coordinating node.\nIf the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "is_write_index": { - "description": "write index", - "type": "string" - } - } - }, - "_types.NodeIds": { - "oneOf": [ { - "$ref": "#/components/schemas/_types.NodeId" + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.NodeId" - } - } - ] - }, - "_types.Bytes": { - "type": "string", - "enum": [ - "b", - "kb", - "mb", - "gb", - "tb", - "pb" - ] - }, - "cat.allocation.AllocationRecord": { - "type": "object", - "properties": { - "shards": { - "description": "Number of primary and replica shards assigned to the node.", - "type": "string" + "in": "query", + "name": "default_operator", + "description": "The default operator for the query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, - "shards.undesired": { - "description": "Amount of shards that are scheduled to be moved elsewhere in the cluster or -1 other than desired balance allocator is used", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "df", + "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "write_load.forecast": { - "description": "Sum of index write load forecasts", - "oneOf": [ - { - "$ref": "#/components/schemas/_spec_utils.Stringifieddouble" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "docvalue_fields", + "description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "disk.indices.forecast": { - "description": "Sum of shard size forecasts", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.ByteSize" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "disk.indices": { - "description": "Disk space used by the node’s shards. Does not include disk space for the translog or unassigned shards.\nIMPORTANT: This metric double-counts disk space for hard-linked files, such as those created when shrinking, splitting, or cloning an index.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.ByteSize" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "disk.used": { - "description": "Total disk space in use.\nElasticsearch retrieves this metric from the node’s operating system (OS).\nThe metric includes disk space for: Elasticsearch, including the translog and unassigned shards; the node’s operating system; any other applications or files on the node.\nUnlike `disk.indices`, this metric does not double-count disk space for hard-linked files.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.ByteSize" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, - "disk.avail": { - "description": "Free disk space available to Elasticsearch.\nElasticsearch retrieves this metric from the node’s operating system.\nDisk-based shard allocation uses this metric to assign shards to nodes based on available disk space.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.ByteSize" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "explain", + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "disk.total": { - "description": "Total disk space for the node, including in-use and available space.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.ByteSize" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded or aliased indices will be ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "disk.percent": { - "description": "Total percentage of disk space in use. Calculated as `disk.used / disk.total`.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Percentage" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "host": { - "description": "Network host for the node. Set using the `network.host` setting.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Host" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "include_named_queries_score", + "description": "If `true`, the response includes the score contribution from any named queries.\n\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "ip": { - "description": "IP address and port for the node.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Ip" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "node": { - "description": "Name for the node. Set using the `node.name` setting.", - "type": "string" + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "The number of concurrent shard requests per node that the search runs concurrently.\nThis value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "node.role": { - "description": "Node roles", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - } - } - }, - "_spec_utils.Stringifieddouble": { - "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", - "oneOf": [ { - "type": "number" + "in": "query", + "name": "preference", + "description": "The nodes and shards used for the search.\nBy default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness.\nValid values are:\n\n* `_only_local` to run the search only on shards on the local node.\n* `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method.\n* `_only_nodes:,` to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method.\n* `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method.\n* `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`.\n* `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, { - "type": "string" - } - ] - }, - "_types.ByteSize": { - "oneOf": [ + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.\nThis filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint).\nWhen unspecified, the pre-filter phase is executed if any of these conditions is met:\n\n* The request targets more than 128 shards.\n* The request targets one or more read-only index.\n* The primary sort of the query targets an indexed field.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { - "type": "number" + "in": "query", + "name": "request_cache", + "description": "If `true`, the caching of search results is enabled for requests where `size` is `0`.\nIt defaults to index level settings.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { - "type": "string" - } - ] - }, - "_types.Percentage": { - "oneOf": [ + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, { - "type": "string" + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.\nBy default, this value cannot exceed `1d` (24 hours).\nYou can change this limit by using the `search.max_keep_alive` cluster-level setting.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "number" - } - ] - }, - "_types.Host": { - "type": "string" - }, - "_types.Ip": { - "type": "string" - }, - "cat.component_templates.ComponentTemplate": { - "type": "object", - "properties": { - "name": { - "type": "string" + "in": "query", + "name": "search_type", + "description": "Indicates how distributed term frequencies are calculated for relevance scoring.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, - "version": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, + { + "in": "query", + "name": "stats", + "description": "Specific `tag` of the request for logging and statistical purposes.", + "deprecated": false, + "schema": { + "type": "array", + "items": { "type": "string" } - ] + }, + "style": "form" }, - "alias_count": { - "type": "string" + { + "in": "query", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "mapping_count": { - "type": "string" + { + "in": "query", + "name": "suggest_field", + "description": "The field to use for suggestions.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, - "settings_count": { - "type": "string" + { + "in": "query", + "name": "suggest_mode", + "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SuggestMode" + }, + "style": "form" }, - "metadata_count": { - "type": "string" + { + "in": "query", + "name": "suggest_size", + "description": "The number of suggestions to return.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "included_in": { - "type": "string" - } - }, - "required": [ - "name", - "version", - "alias_count", - "mapping_count", - "settings_count", - "metadata_count", - "included_in" - ] - }, - "cat.count.CountRecord": { - "type": "object", - "properties": { - "epoch": { - "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitSeconds" + { + "in": "query", + "name": "suggest_text", + "description": "The source text for which the suggestions should be returned.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "timestamp": { - "$ref": "#/components/schemas/_types.TimeOfDay" + { + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.\nIf set to `0` (default), the query does not terminate early.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "count": { - "description": "the document count", - "type": "string" - } - } - }, - "_spec_utils.StringifiedEpochTimeUnitSeconds": { - "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", - "oneOf": [ { - "$ref": "#/components/schemas/_types.EpochTimeUnitSeconds" + "in": "query", + "name": "timeout", + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt defaults to no timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, { - "type": "string" - } - ] - }, - "_types.EpochTimeUnitSeconds": { - "allOf": [ + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, { - "$ref": "#/components/schemas/_types.UnitSeconds" - } - ] - }, - "_types.UnitSeconds": { - "description": "Time unit for seconds", - "type": "number" - }, - "_types.TimeOfDay": { - "description": "Time of day, expressed as HH:MM:SS", - "type": "string" - }, - "cat.fielddata.FielddataRecord": { - "type": "object", - "properties": { - "id": { - "description": "node id", - "type": "string" + "in": "query", + "name": "track_scores", + "description": "If `true`, the request calculates and returns document scores, even if the scores are not used for sorting.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "host": { - "description": "host name", - "type": "string" + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, aggregation and suggester names are be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "ip": { - "description": "ip address", - "type": "string" + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "node": { - "description": "node name", - "type": "string" + { + "in": "query", + "name": "version", + "description": "If `true`, the request returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "field": { - "description": "field name", - "type": "string" + { + "in": "query", + "name": "_source", + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nValid values are:\n\n* `true` to return the entire document source.\n* `false` to not return the document source.\n* `` to return the source fields that are specified as a comma-separated list that supports wildcard (`*`) patterns.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, - "size": { - "description": "field data usage", - "type": "string" - } - } - }, - "_types.TimeUnit": { - "type": "string", - "enum": [ - "nanos", - "micros", - "ms", - "s", - "m", - "h", - "d" - ] - }, - "cat.health.HealthRecord": { - "type": "object", - "properties": { - "epoch": { - "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitSeconds" + { + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "timestamp": { - "$ref": "#/components/schemas/_types.TimeOfDay" + { + "in": "query", + "name": "_source_exclude_vectors", + "description": "Whether vectors should be excluded from _source", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 9.2.0", + "style": "form" }, - "cluster": { - "description": "cluster name", - "type": "string" + { + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "status": { - "description": "health status", - "type": "string" + { + "in": "query", + "name": "seq_no_primary_term", + "description": "If `true`, the request returns the sequence number and primary term of the last modification of each hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "node.total": { - "description": "total number of nodes", - "type": "string" + { + "in": "query", + "name": "q", + "description": "A query in the Lucene query string syntax.\nQuery parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.\n\nIMPORTANT: This parameter overrides the query parameter in the request body.\nIf both parameters are specified, documents matching the query request body parameter are not returned.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "node.data": { - "description": "number of nodes that can store data", - "type": "string" + { + "in": "query", + "name": "size", + "description": "The number of hits to return.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "shards": { - "description": "total number of shards", - "type": "string" + { + "in": "query", + "name": "from", + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "pri": { - "description": "number of primary shards", - "type": "string" - }, - "relo": { - "description": "number of relocating nodes", - "type": "string" - }, - "init": { - "description": "number of initializing nodes", - "type": "string" - }, - "unassign.pri": { - "description": "number of unassigned primary shards", - "type": "string" - }, - "unassign": { - "description": "number of unassigned shards", - "type": "string" - }, - "pending_tasks": { - "description": "number of pending tasks", - "type": "string" - }, - "max_task_wait_time": { - "description": "wait time of longest task pending", - "type": "string" - }, - "active_shards_percent": { - "description": "active number of shards in percent", - "type": "string" + { + "in": "query", + "name": "sort", + "description": "A comma-separated list of `:` pairs.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" + }, + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "collapse": { + "description": "Collapses search results the values of the specified field.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "explain": { + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting" + }, + "description": "Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "default": "10000", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn" + }, + "description": "The approximate kNN search to run.", + "x-state": "Generally available; Added in 8.4.0", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.KnnSearch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.KnnSearch" + } + } + ] + }, + "rank": { + "description": "The Reciprocal Rank Fusion (RRF) to use.", + "x-state": "Generally available; Added in 8.8.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RankContainer" + } + ] + }, + "min_score": { + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in search results and results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "description": "Use the `post_filter` parameter to filter search results.\nThe search hits are filtered after the aggregations are calculated.\nA post filter has no impact on the aggregation results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, + "type": "boolean" + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl" + }, + "description": "The search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "retriever": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers" + }, + "description": "A retriever is a specification to describe top documents returned from a search.\nA retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.", + "x-state": "Generally available; Added in 8.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "description": "Used to retrieve the next page of hits using a set of sort values from the previous page.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, + "type": "number" + }, + "slice": { + "description": "Split a scrolled search into multiple slices that can be consumed independently.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "A comma-separated list of : pairs.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#source-filtering" + }, + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nIf the `stored_fields` property is specified, the `_source` property defaults to `false`.\nOtherwise, it defaults to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "suggest": { + "description": "Defines a suggester that provides similar looking terms based on a provided text.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + }, + "stored_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#stored-fields" + }, + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` property defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limit the search to a point in time (PIT).\nIf you provide a PIT, you cannot specify an `` in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/mapping/define-runtime-fields-in-search-request" + }, + "description": "One or more runtime fields in the search request.\nThese fields take precedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "SearchRequestExample1": { + "summary": "A simple term search", + "description": "Run `GET /my-index-000001/_search?from=40&size=20` to run a search.\n", + "value": "{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + "SearchRequestExample2": { + "summary": "A point in time search", + "description": "Run `POST /_search` to run a point in time search. The `id` parameter tells Elasticsearch to run the request using contexts from this open point in time. The `keep_alive` parameter tells Elasticsearch how long it should extend the time to live of the point in time.\n", + "value": "{\n \"size\": 100, \n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\", \n \"keep_alive\": \"1m\" \n }\n}" + }, + "SearchRequestExample3": { + "summary": "Search slicing", + "description": "When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently. The result from running the first `GET /_search` request returns documents belonging to the first slice (`id: 0`). If you run a second request with `id` set to `1', it returns documents in the second slice. Since the maximum number of slices is set to `2`, the union of the results is equivalent to the results of a point-in-time search without slicing.\n", + "value": "{\n \"slice\": {\n \"id\": 0, \n \"max\": 2 \n },\n \"query\": {\n \"match\": {\n \"message\": \"foo\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.search.ResponseBody" + }, + "examples": { + "SearchResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_search?from=40&size=20` with a simple term query.\n", + "value": "{\n \"took\": 5,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 20,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\": [\n {\n \"_index\": \"my-index-000001\",\n \"_id\": \"0\",\n \"_score\": 1.3862942,\n \"_source\": {\n \"@timestamp\": \"2099-11-15T14:12:12\",\n \"http\": {\n \"request\": {\n \"method\": \"get\"\n },\n \"response\": {\n \"status_code\": 200,\n \"bytes\": 1070000\n },\n \"version\": \"1.1\"\n },\n \"source\": {\n \"ip\": \"127.0.0.1\"\n },\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_search\n
\n ", + "
\n POST\n /_search\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" } - } - }, - "_types.HealthStatus": { - "type": "string", - "enum": [ - "green", - "GREEN", - "yellow", - "YELLOW", - "red", - "RED" ] }, - "cat.indices.IndicesRecord": { - "type": "object", - "properties": { - "health": { - "description": "current health status", - "type": "string" + "post": { + "tags": [ + "search" + ], + "summary": "Run a search", + "description": "Get search hits that match the query defined in the request.\nYou can provide search queries using the `q` query string parameter or the request body.\nIf both are specified, only the query parameter is used.\n\nIf the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.\nTo search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices.\n\n**Search slicing**\n\nWhen paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties.\nBy default the splitting is done first on the shards, then locally on each shard.\nThe local splitting partitions the shard into contiguous ranges based on Lucene document IDs.\n\nFor instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.\n\nIMPORTANT: The same point-in-time ID should be used for all slices.\nIf different PIT IDs are used, slices can overlap and miss documents.\nThis situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-search.html" + }, + "operationId": "search-1", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "status": { - "description": "open/close status", - "type": "string" + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If `true` and there are shard request timeouts or shard failures, the request returns partial results.\nIf `false`, it returns an error with no partial results.\n\nTo override the default behavior, you can set the `search.default_allow_partial_results` cluster setting to `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "index": { - "description": "index name", - "type": "string" + { + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "uuid": { - "description": "index uuid", - "type": "string" + { + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri": { - "description": "number of primary shards", - "type": "string" + { + "in": "query", + "name": "batched_reduce_size", + "description": "The number of shard results that should be reduced at once on the coordinating node.\nIf the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "rep": { - "description": "number of replica shards", - "type": "string" + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "docs.count": { - "description": "available docs", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "default_operator", + "description": "The default operator for the query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, - "docs.deleted": { - "description": "deleted docs", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "df", + "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "creation.date": { - "description": "index creation date (millisecond value)", - "type": "string" + { + "in": "query", + "name": "docvalue_fields", + "description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "creation.date.string": { - "description": "index creation date (as string)", - "type": "string" + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, - "store.size": { - "description": "store size of primaries & replicas", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "explain", + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.store.size": { - "description": "store size of primaries", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded or aliased indices will be ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "dataset.size": { - "description": "total size of dataset (including the cache for partially mounted indices)", - "x-state": "Added in 8.11.0", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "completion.size": { - "description": "size of completion", - "type": "string" + { + "in": "query", + "name": "include_named_queries_score", + "description": "If `true`, the response includes the score contribution from any named queries.\n\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.completion.size": { - "description": "size of completion", - "type": "string" + { + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "fielddata.memory_size": { - "description": "used fielddata cache", - "type": "string" + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "The number of concurrent shard requests per node that the search runs concurrently.\nThis value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "pri.fielddata.memory_size": { - "description": "used fielddata cache", - "type": "string" + { + "in": "query", + "name": "preference", + "description": "The nodes and shards used for the search.\nBy default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness.\nValid values are:\n\n* `_only_local` to run the search only on shards on the local node.\n* `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method.\n* `_only_nodes:,` to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method.\n* `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method.\n* `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`.\n* `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "fielddata.evictions": { - "description": "fielddata evictions", - "type": "string" - }, - "pri.fielddata.evictions": { - "description": "fielddata evictions", - "type": "string" - }, - "query_cache.memory_size": { - "description": "used query cache", - "type": "string" - }, - "pri.query_cache.memory_size": { - "description": "used query cache", - "type": "string" - }, - "query_cache.evictions": { - "description": "query cache evictions", - "type": "string" - }, - "pri.query_cache.evictions": { - "description": "query cache evictions", - "type": "string" - }, - "request_cache.memory_size": { - "description": "used request cache", - "type": "string" - }, - "pri.request_cache.memory_size": { - "description": "used request cache", - "type": "string" - }, - "request_cache.evictions": { - "description": "request cache evictions", - "type": "string" - }, - "pri.request_cache.evictions": { - "description": "request cache evictions", - "type": "string" - }, - "request_cache.hit_count": { - "description": "request cache hit count", - "type": "string" - }, - "pri.request_cache.hit_count": { - "description": "request cache hit count", - "type": "string" - }, - "request_cache.miss_count": { - "description": "request cache miss count", - "type": "string" - }, - "pri.request_cache.miss_count": { - "description": "request cache miss count", - "type": "string" - }, - "flush.total": { - "description": "number of flushes", - "type": "string" - }, - "pri.flush.total": { - "description": "number of flushes", - "type": "string" - }, - "flush.total_time": { - "description": "time spent in flush", - "type": "string" - }, - "pri.flush.total_time": { - "description": "time spent in flush", - "type": "string" - }, - "get.current": { - "description": "number of current get ops", - "type": "string" - }, - "pri.get.current": { - "description": "number of current get ops", - "type": "string" - }, - "get.time": { - "description": "time spent in get", - "type": "string" - }, - "pri.get.time": { - "description": "time spent in get", - "type": "string" - }, - "get.total": { - "description": "number of get ops", - "type": "string" - }, - "pri.get.total": { - "description": "number of get ops", - "type": "string" - }, - "get.exists_time": { - "description": "time spent in successful gets", - "type": "string" - }, - "pri.get.exists_time": { - "description": "time spent in successful gets", - "type": "string" - }, - "get.exists_total": { - "description": "number of successful gets", - "type": "string" - }, - "pri.get.exists_total": { - "description": "number of successful gets", - "type": "string" - }, - "get.missing_time": { - "description": "time spent in failed gets", - "type": "string" - }, - "pri.get.missing_time": { - "description": "time spent in failed gets", - "type": "string" - }, - "get.missing_total": { - "description": "number of failed gets", - "type": "string" - }, - "pri.get.missing_total": { - "description": "number of failed gets", - "type": "string" - }, - "indexing.delete_current": { - "description": "number of current deletions", - "type": "string" - }, - "pri.indexing.delete_current": { - "description": "number of current deletions", - "type": "string" - }, - "indexing.delete_time": { - "description": "time spent in deletions", - "type": "string" - }, - "pri.indexing.delete_time": { - "description": "time spent in deletions", - "type": "string" - }, - "indexing.delete_total": { - "description": "number of delete ops", - "type": "string" - }, - "pri.indexing.delete_total": { - "description": "number of delete ops", - "type": "string" - }, - "indexing.index_current": { - "description": "number of current indexing ops", - "type": "string" - }, - "pri.indexing.index_current": { - "description": "number of current indexing ops", - "type": "string" - }, - "indexing.index_time": { - "description": "time spent in indexing", - "type": "string" - }, - "pri.indexing.index_time": { - "description": "time spent in indexing", - "type": "string" - }, - "indexing.index_total": { - "description": "number of indexing ops", - "type": "string" - }, - "pri.indexing.index_total": { - "description": "number of indexing ops", - "type": "string" - }, - "indexing.index_failed": { - "description": "number of failed indexing ops", - "type": "string" - }, - "pri.indexing.index_failed": { - "description": "number of failed indexing ops", - "type": "string" - }, - "merges.current": { - "description": "number of current merges", - "type": "string" - }, - "pri.merges.current": { - "description": "number of current merges", - "type": "string" - }, - "merges.current_docs": { - "description": "number of current merging docs", - "type": "string" - }, - "pri.merges.current_docs": { - "description": "number of current merging docs", - "type": "string" - }, - "merges.current_size": { - "description": "size of current merges", - "type": "string" - }, - "pri.merges.current_size": { - "description": "size of current merges", - "type": "string" - }, - "merges.total": { - "description": "number of completed merge ops", - "type": "string" - }, - "pri.merges.total": { - "description": "number of completed merge ops", - "type": "string" - }, - "merges.total_docs": { - "description": "docs merged", - "type": "string" - }, - "pri.merges.total_docs": { - "description": "docs merged", - "type": "string" - }, - "merges.total_size": { - "description": "size merged", - "type": "string" - }, - "pri.merges.total_size": { - "description": "size merged", - "type": "string" + { + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.\nThis filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint).\nWhen unspecified, the pre-filter phase is executed if any of these conditions is met:\n\n* The request targets more than 128 shards.\n* The request targets one or more read-only index.\n* The primary sort of the query targets an indexed field.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "merges.total_time": { - "description": "time spent in merges", - "type": "string" + { + "in": "query", + "name": "request_cache", + "description": "If `true`, the caching of search results is enabled for requests where `size` is `0`.\nIt defaults to index level settings.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.merges.total_time": { - "description": "time spent in merges", - "type": "string" + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, - "refresh.total": { - "description": "total refreshes", - "type": "string" + { + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.\nBy default, this value cannot exceed `1d` (24 hours).\nYou can change this limit by using the `search.max_keep_alive` cluster-level setting.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, - "pri.refresh.total": { - "description": "total refreshes", - "type": "string" + { + "in": "query", + "name": "search_type", + "description": "Indicates how distributed term frequencies are calculated for relevance scoring.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, - "refresh.time": { - "description": "time spent in refreshes", - "type": "string" + { + "in": "query", + "name": "stats", + "description": "Specific `tag` of the request for logging and statistical purposes.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" }, - "pri.refresh.time": { - "description": "time spent in refreshes", - "type": "string" + { + "in": "query", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "refresh.external_total": { - "description": "total external refreshes", - "type": "string" + { + "in": "query", + "name": "suggest_field", + "description": "The field to use for suggestions.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, - "pri.refresh.external_total": { - "description": "total external refreshes", - "type": "string" + { + "in": "query", + "name": "suggest_mode", + "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SuggestMode" + }, + "style": "form" }, - "refresh.external_time": { - "description": "time spent in external refreshes", - "type": "string" + { + "in": "query", + "name": "suggest_size", + "description": "The number of suggestions to return.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "pri.refresh.external_time": { - "description": "time spent in external refreshes", - "type": "string" + { + "in": "query", + "name": "suggest_text", + "description": "The source text for which the suggestions should be returned.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "refresh.listeners": { - "description": "number of pending refresh listeners", - "type": "string" + { + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.\nIf set to `0` (default), the query does not terminate early.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "pri.refresh.listeners": { - "description": "number of pending refresh listeners", - "type": "string" + { + "in": "query", + "name": "timeout", + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt defaults to no timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, - "search.fetch_current": { - "description": "current fetch phase ops", - "type": "string" + { + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" }, - "pri.search.fetch_current": { - "description": "current fetch phase ops", - "type": "string" + { + "in": "query", + "name": "track_scores", + "description": "If `true`, the request calculates and returns document scores, even if the scores are not used for sorting.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "search.fetch_time": { - "description": "time spent in fetch phase", - "type": "string" + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, aggregation and suggester names are be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.search.fetch_time": { - "description": "time spent in fetch phase", - "type": "string" + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "search.fetch_total": { - "description": "total fetch ops", - "type": "string" + { + "in": "query", + "name": "version", + "description": "If `true`, the request returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.search.fetch_total": { - "description": "total fetch ops", - "type": "string" + { + "in": "query", + "name": "_source", + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nValid values are:\n\n* `true` to return the entire document source.\n* `false` to not return the document source.\n* `` to return the source fields that are specified as a comma-separated list that supports wildcard (`*`) patterns.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, - "search.open_contexts": { - "description": "open search contexts", - "type": "string" + { + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "pri.search.open_contexts": { - "description": "open search contexts", - "type": "string" + { + "in": "query", + "name": "_source_exclude_vectors", + "description": "Whether vectors should be excluded from _source", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 9.2.0", + "style": "form" }, - "search.query_current": { - "description": "current query phase ops", - "type": "string" + { + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "pri.search.query_current": { - "description": "current query phase ops", - "type": "string" + { + "in": "query", + "name": "seq_no_primary_term", + "description": "If `true`, the request returns the sequence number and primary term of the last modification of each hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "search.query_time": { - "description": "time spent in query phase", - "type": "string" + { + "in": "query", + "name": "q", + "description": "A query in the Lucene query string syntax.\nQuery parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.\n\nIMPORTANT: This parameter overrides the query parameter in the request body.\nIf both parameters are specified, documents matching the query request body parameter are not returned.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "pri.search.query_time": { - "description": "time spent in query phase", - "type": "string" + { + "in": "query", + "name": "size", + "description": "The number of hits to return.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "search.query_total": { - "description": "total query phase ops", - "type": "string" + { + "in": "query", + "name": "from", + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "pri.search.query_total": { - "description": "total query phase ops", - "type": "string" + { + "in": "query", + "name": "sort", + "description": "A comma-separated list of `:` pairs.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" + }, + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "collapse": { + "description": "Collapses search results the values of the specified field.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "explain": { + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting" + }, + "description": "Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "default": "10000", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn" + }, + "description": "The approximate kNN search to run.", + "x-state": "Generally available; Added in 8.4.0", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.KnnSearch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.KnnSearch" + } + } + ] + }, + "rank": { + "description": "The Reciprocal Rank Fusion (RRF) to use.", + "x-state": "Generally available; Added in 8.8.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RankContainer" + } + ] + }, + "min_score": { + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in search results and results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "description": "Use the `post_filter` parameter to filter search results.\nThe search hits are filtered after the aggregations are calculated.\nA post filter has no impact on the aggregation results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, + "type": "boolean" + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl" + }, + "description": "The search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "retriever": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers" + }, + "description": "A retriever is a specification to describe top documents returned from a search.\nA retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.", + "x-state": "Generally available; Added in 8.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "description": "Used to retrieve the next page of hits using a set of sort values from the previous page.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, + "type": "number" + }, + "slice": { + "description": "Split a scrolled search into multiple slices that can be consumed independently.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "A comma-separated list of : pairs.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#source-filtering" + }, + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nIf the `stored_fields` property is specified, the `_source` property defaults to `false`.\nOtherwise, it defaults to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "suggest": { + "description": "Defines a suggester that provides similar looking terms based on a provided text.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + }, + "stored_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#stored-fields" + }, + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` property defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limit the search to a point in time (PIT).\nIf you provide a PIT, you cannot specify an `` in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/mapping/define-runtime-fields-in-search-request" + }, + "description": "One or more runtime fields in the search request.\nThese fields take precedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "SearchRequestExample1": { + "summary": "A simple term search", + "description": "Run `GET /my-index-000001/_search?from=40&size=20` to run a search.\n", + "value": "{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + "SearchRequestExample2": { + "summary": "A point in time search", + "description": "Run `POST /_search` to run a point in time search. The `id` parameter tells Elasticsearch to run the request using contexts from this open point in time. The `keep_alive` parameter tells Elasticsearch how long it should extend the time to live of the point in time.\n", + "value": "{\n \"size\": 100, \n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\", \n \"keep_alive\": \"1m\" \n }\n}" + }, + "SearchRequestExample3": { + "summary": "Search slicing", + "description": "When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently. The result from running the first `GET /_search` request returns documents belonging to the first slice (`id: 0`). If you run a second request with `id` set to `1', it returns documents in the second slice. Since the maximum number of slices is set to `2`, the union of the results is equivalent to the results of a point-in-time search without slicing.\n", + "value": "{\n \"slice\": {\n \"id\": 0, \n \"max\": 2 \n },\n \"query\": {\n \"match\": {\n \"message\": \"foo\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.search.ResponseBody" + }, + "examples": { + "SearchResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_search?from=40&size=20` with a simple term query.\n", + "value": "{\n \"took\": 5,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 20,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\": [\n {\n \"_index\": \"my-index-000001\",\n \"_id\": \"0\",\n \"_score\": 1.3862942,\n \"_source\": {\n \"@timestamp\": \"2099-11-15T14:12:12\",\n \"http\": {\n \"request\": {\n \"method\": \"get\"\n },\n \"response\": {\n \"status_code\": 200,\n \"bytes\": 1070000\n },\n \"version\": \"1.1\"\n },\n \"source\": {\n \"ip\": \"127.0.0.1\"\n },\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_search\n
\n ", + "
\n POST\n /_search\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_search": { + "get": { + "tags": [ + "search" + ], + "summary": "Run a search", + "description": "Get search hits that match the query defined in the request.\nYou can provide search queries using the `q` query string parameter or the request body.\nIf both are specified, only the query parameter is used.\n\nIf the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.\nTo search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices.\n\n**Search slicing**\n\nWhen paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties.\nBy default the splitting is done first on the shards, then locally on each shard.\nThe local splitting partitions the shard into contiguous ranges based on Lucene document IDs.\n\nFor instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.\n\nIMPORTANT: The same point-in-time ID should be used for all slices.\nIf different PIT IDs are used, slices can overlap and miss documents.\nThis situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-search.html" + }, + "operationId": "search-2", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" }, - "search.scroll_current": { - "description": "open scroll contexts", - "type": "string" + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.search.scroll_current": { - "description": "open scroll contexts", - "type": "string" + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If `true` and there are shard request timeouts or shard failures, the request returns partial results.\nIf `false`, it returns an error with no partial results.\n\nTo override the default behavior, you can set the `search.default_allow_partial_results` cluster setting to `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "search.scroll_time": { - "description": "time scroll contexts held open", - "type": "string" + { + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "pri.search.scroll_time": { - "description": "time scroll contexts held open", - "type": "string" + { + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "search.scroll_total": { - "description": "completed scroll contexts", - "type": "string" + { + "in": "query", + "name": "batched_reduce_size", + "description": "The number of shard results that should be reduced at once on the coordinating node.\nIf the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "pri.search.scroll_total": { - "description": "completed scroll contexts", - "type": "string" + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "segments.count": { - "description": "number of segments", - "type": "string" + { + "in": "query", + "name": "default_operator", + "description": "The default operator for the query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" }, - "pri.segments.count": { - "description": "number of segments", - "type": "string" + { + "in": "query", + "name": "df", + "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "segments.memory": { - "description": "memory used by segments", - "type": "string" + { + "in": "query", + "name": "docvalue_fields", + "description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "pri.segments.memory": { - "description": "memory used by segments", - "type": "string" + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" }, - "segments.index_writer_memory": { - "description": "memory used by index writer", - "type": "string" + { + "in": "query", + "name": "explain", + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.segments.index_writer_memory": { - "description": "memory used by index writer", - "type": "string" + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded or aliased indices will be ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "segments.version_map_memory": { - "description": "memory used by version map", - "type": "string" + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.segments.version_map_memory": { - "description": "memory used by version map", - "type": "string" + { + "in": "query", + "name": "include_named_queries_score", + "description": "If `true`, the response includes the score contribution from any named queries.\n\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "segments.fixed_bitset_memory": { - "description": "memory used by fixed bit sets for nested object field types and export type filters for types referred in _parent fields", - "type": "string" + { + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.segments.fixed_bitset_memory": { - "description": "memory used by fixed bit sets for nested object field types and export type filters for types referred in _parent fields", - "type": "string" + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "The number of concurrent shard requests per node that the search runs concurrently.\nThis value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "warmer.current": { - "description": "current warmer ops", - "type": "string" + { + "in": "query", + "name": "preference", + "description": "The nodes and shards used for the search.\nBy default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness.\nValid values are:\n\n* `_only_local` to run the search only on shards on the local node.\n* `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method.\n* `_only_nodes:,` to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method.\n* `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method.\n* `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`.\n* `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "pri.warmer.current": { - "description": "current warmer ops", - "type": "string" + { + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.\nThis filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint).\nWhen unspecified, the pre-filter phase is executed if any of these conditions is met:\n\n* The request targets more than 128 shards.\n* The request targets one or more read-only index.\n* The primary sort of the query targets an indexed field.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "warmer.total": { - "description": "total warmer ops", - "type": "string" + { + "in": "query", + "name": "request_cache", + "description": "If `true`, the caching of search results is enabled for requests where `size` is `0`.\nIt defaults to index level settings.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "pri.warmer.total": { - "description": "total warmer ops", - "type": "string" + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" }, - "warmer.total_time": { - "description": "time spent in warmers", - "type": "string" + { + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.\nBy default, this value cannot exceed `1d` (24 hours).\nYou can change this limit by using the `search.max_keep_alive` cluster-level setting.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, - "pri.warmer.total_time": { - "description": "time spent in warmers", - "type": "string" + { + "in": "query", + "name": "search_type", + "description": "Indicates how distributed term frequencies are calculated for relevance scoring.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" }, - "suggest.current": { - "description": "number of current suggest ops", - "type": "string" + { + "in": "query", + "name": "stats", + "description": "Specific `tag` of the request for logging and statistical purposes.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" }, - "pri.suggest.current": { - "description": "number of current suggest ops", - "type": "string" - }, - "suggest.time": { - "description": "time spend in suggest", - "type": "string" - }, - "pri.suggest.time": { - "description": "time spend in suggest", - "type": "string" - }, - "suggest.total": { - "description": "number of suggest ops", - "type": "string" - }, - "pri.suggest.total": { - "description": "number of suggest ops", - "type": "string" - }, - "memory.total": { - "description": "total used memory", - "type": "string" - }, - "pri.memory.total": { - "description": "total user memory", - "type": "string" - }, - "search.throttled": { - "description": "indicates if the index is search throttled", - "type": "string" - }, - "bulk.total_operations": { - "description": "number of bulk shard ops", - "type": "string" - }, - "pri.bulk.total_operations": { - "description": "number of bulk shard ops", - "type": "string" - }, - "bulk.total_time": { - "description": "time spend in shard bulk", - "type": "string" - }, - "pri.bulk.total_time": { - "description": "time spend in shard bulk", - "type": "string" - }, - "bulk.total_size_in_bytes": { - "description": "total size in bytes of shard bulk", - "type": "string" - }, - "pri.bulk.total_size_in_bytes": { - "description": "total size in bytes of shard bulk", - "type": "string" - }, - "bulk.avg_time": { - "description": "average time spend in shard bulk", - "type": "string" - }, - "pri.bulk.avg_time": { - "description": "average time spend in shard bulk", - "type": "string" - }, - "bulk.avg_size_in_bytes": { - "description": "average size in bytes of shard bulk", - "type": "string" - }, - "pri.bulk.avg_size_in_bytes": { - "description": "average size in bytes of shard bulk", - "type": "string" - } - } - }, - "cat.master.MasterRecord": { - "type": "object", - "properties": { - "id": { - "description": "node id", - "type": "string" - }, - "host": { - "description": "host name", - "type": "string" - }, - "ip": { - "description": "ip address", - "type": "string" - }, - "node": { - "description": "node name", - "type": "string" - } - } - }, - "cat._types.CatDfaColumns": { - "oneOf": [ { - "$ref": "#/components/schemas/cat._types.CatDfaColumn" + "in": "query", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat._types.CatDfaColumn" - } - } - ] - }, - "cat._types.CatDfaColumn": { - "type": "string", - "enum": [ - "assignment_explanation", - "ae", - "create_time", - "ct", - "createTime", - "description", - "d", - "dest_index", - "di", - "destIndex", - "failure_reason", - "fr", - "failureReason", - "id", - "model_memory_limit", - "mml", - "modelMemoryLimit", - "node.address", - "na", - "nodeAddress", - "node.ephemeral_id", - "ne", - "nodeEphemeralId", - "node.id", - "ni", - "nodeId", - "node.name", - "nn", - "nodeName", - "progress", - "p", - "source_index", - "si", - "sourceIndex", - "state", - "s", - "type", - "t", - "version", - "v" - ] - }, - "cat.ml_data_frame_analytics.DataFrameAnalyticsRecord": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "type": { - "description": "The type of analysis that the job performs.", - "type": "string" - }, - "create_time": { - "description": "The time when the job was created.", - "type": "string" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "source_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "dest_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "description": { - "description": "A description of the job.", - "type": "string" - }, - "model_memory_limit": { - "description": "The approximate maximum amount of memory resources that are permitted for the job.", - "type": "string" - }, - "state": { - "description": "The current status of the job.", - "type": "string" - }, - "failure_reason": { - "description": "Messages about the reason why the job failed.", - "type": "string" + "in": "query", + "name": "suggest_field", + "description": "The field to use for suggestions.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" }, - "progress": { - "description": "The progress report for the job by phase.", - "type": "string" + { + "in": "query", + "name": "suggest_mode", + "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SuggestMode" + }, + "style": "form" }, - "assignment_explanation": { - "description": "Messages related to the selection of a node.", - "type": "string" + { + "in": "query", + "name": "suggest_size", + "description": "The number of suggestions to return.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "node.id": { - "$ref": "#/components/schemas/_types.Id" + { + "in": "query", + "name": "suggest_text", + "description": "The source text for which the suggestions should be returned.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "node.name": { - "$ref": "#/components/schemas/_types.Name" + { + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.\nIf set to `0` (default), the query does not terminate early.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "node.ephemeral_id": { - "$ref": "#/components/schemas/_types.Id" + { + "in": "query", + "name": "timeout", + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt defaults to no timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" }, - "node.address": { - "description": "The network address of the assigned node.", - "type": "string" - } - } - }, - "_types.VersionString": { - "type": "string" - }, - "cat._types.CatDatafeedColumns": { - "oneOf": [ { - "$ref": "#/components/schemas/cat._types.CatDatafeedColumn" + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat._types.CatDatafeedColumn" - } - } - ] - }, - "cat._types.CatDatafeedColumn": { - "type": "string", - "enum": [ - "ae", - "assignment_explanation", - "bc", - "buckets.count", - "bucketsCount", - "id", - "na", - "node.address", - "nodeAddress", - "ne", - "node.ephemeral_id", - "nodeEphemeralId", - "ni", - "node.id", - "nodeId", - "nn", - "node.name", - "nodeName", - "sba", - "search.bucket_avg", - "searchBucketAvg", - "sc", - "search.count", - "searchCount", - "seah", - "search.exp_avg_hour", - "searchExpAvgHour", - "st", - "search.time", - "searchTime", - "s", - "state" - ] - }, - "cat.ml_datafeeds.DatafeedsRecord": { - "type": "object", - "properties": { - "id": { - "description": "The datafeed identifier.", - "type": "string" + "in": "query", + "name": "track_scores", + "description": "If `true`, the request calculates and returns document scores, even if the scores are not used for sorting.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "state": { - "$ref": "#/components/schemas/ml._types.DatafeedState" + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, aggregation and suggester names are be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "assignment_explanation": { - "description": "For started datafeeds only, contains messages relating to the selection of a node.", - "type": "string" + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "buckets.count": { - "description": "The number of buckets processed.", - "type": "string" + { + "in": "query", + "name": "version", + "description": "If `true`, the request returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "search.count": { - "description": "The number of searches run by the datafeed.", - "type": "string" + { + "in": "query", + "name": "_source", + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nValid values are:\n\n* `true` to return the entire document source.\n* `false` to not return the document source.\n* `` to return the source fields that are specified as a comma-separated list that supports wildcard (`*`) patterns.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" }, - "search.time": { - "description": "The total time the datafeed spent searching, in milliseconds.", - "type": "string" + { + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "search.bucket_avg": { - "description": "The average search time per bucket, in milliseconds.", - "type": "string" + { + "in": "query", + "name": "_source_exclude_vectors", + "description": "Whether vectors should be excluded from _source", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 9.2.0", + "style": "form" }, - "search.exp_avg_hour": { - "description": "The exponential average search time per hour, in milliseconds.", - "type": "string" + { + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" }, - "node.id": { - "description": "The unique identifier of the assigned node.\nFor started datafeeds only, this information pertains to the node upon which the datafeed is started.", - "type": "string" + { + "in": "query", + "name": "seq_no_primary_term", + "description": "If `true`, the request returns the sequence number and primary term of the last modification of each hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, - "node.name": { - "description": "The name of the assigned node.\nFor started datafeeds only, this information pertains to the node upon which the datafeed is started.", - "type": "string" + { + "in": "query", + "name": "q", + "description": "A query in the Lucene query string syntax.\nQuery parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.\n\nIMPORTANT: This parameter overrides the query parameter in the request body.\nIf both parameters are specified, documents matching the query request body parameter are not returned.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" }, - "node.ephemeral_id": { - "description": "The ephemeral identifier of the assigned node.\nFor started datafeeds only, this information pertains to the node upon which the datafeed is started.", - "type": "string" + { + "in": "query", + "name": "size", + "description": "The number of hits to return.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, - "node.address": { - "description": "The network address of the assigned node.\nFor started datafeeds only, this information pertains to the node upon which the datafeed is started.", - "type": "string" - } - } - }, - "ml._types.DatafeedState": { - "type": "string", - "enum": [ - "started", - "stopped", - "starting", - "stopping" - ] - }, - "cat._types.CatAnonalyDetectorColumns": { - "oneOf": [ { - "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumn" + "in": "query", + "name": "from", + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumn" - } + "in": "query", + "name": "sort", + "description": "A comma-separated list of `:` pairs.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" } - ] - }, - "cat._types.CatAnomalyDetectorColumn": { - "type": "string", - "enum": [ - "assignment_explanation", - "ae", - "buckets.count", - "bc", - "bucketsCount", - "buckets.time.exp_avg", - "btea", - "bucketsTimeExpAvg", - "buckets.time.exp_avg_hour", - "bteah", - "bucketsTimeExpAvgHour", - "buckets.time.max", - "btmax", - "bucketsTimeMax", - "buckets.time.min", - "btmin", - "bucketsTimeMin", - "buckets.time.total", - "btt", - "bucketsTimeTotal", - "data.buckets", - "db", - "dataBuckets", - "data.earliest_record", - "der", - "dataEarliestRecord", - "data.empty_buckets", - "deb", - "dataEmptyBuckets", - "data.input_bytes", - "dib", - "dataInputBytes", + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" + }, + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "collapse": { + "description": "Collapses search results the values of the specified field.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "explain": { + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting" + }, + "description": "Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "default": "10000", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn" + }, + "description": "The approximate kNN search to run.", + "x-state": "Generally available; Added in 8.4.0", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.KnnSearch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.KnnSearch" + } + } + ] + }, + "rank": { + "description": "The Reciprocal Rank Fusion (RRF) to use.", + "x-state": "Generally available; Added in 8.8.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RankContainer" + } + ] + }, + "min_score": { + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in search results and results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "description": "Use the `post_filter` parameter to filter search results.\nThe search hits are filtered after the aggregations are calculated.\nA post filter has no impact on the aggregation results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, + "type": "boolean" + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl" + }, + "description": "The search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "retriever": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers" + }, + "description": "A retriever is a specification to describe top documents returned from a search.\nA retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.", + "x-state": "Generally available; Added in 8.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "description": "Used to retrieve the next page of hits using a set of sort values from the previous page.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, + "type": "number" + }, + "slice": { + "description": "Split a scrolled search into multiple slices that can be consumed independently.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "A comma-separated list of : pairs.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#source-filtering" + }, + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nIf the `stored_fields` property is specified, the `_source` property defaults to `false`.\nOtherwise, it defaults to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "suggest": { + "description": "Defines a suggester that provides similar looking terms based on a provided text.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + }, + "stored_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#stored-fields" + }, + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` property defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limit the search to a point in time (PIT).\nIf you provide a PIT, you cannot specify an `` in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/mapping/define-runtime-fields-in-search-request" + }, + "description": "One or more runtime fields in the search request.\nThese fields take precedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "SearchRequestExample1": { + "summary": "A simple term search", + "description": "Run `GET /my-index-000001/_search?from=40&size=20` to run a search.\n", + "value": "{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + "SearchRequestExample2": { + "summary": "A point in time search", + "description": "Run `POST /_search` to run a point in time search. The `id` parameter tells Elasticsearch to run the request using contexts from this open point in time. The `keep_alive` parameter tells Elasticsearch how long it should extend the time to live of the point in time.\n", + "value": "{\n \"size\": 100, \n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\", \n \"keep_alive\": \"1m\" \n }\n}" + }, + "SearchRequestExample3": { + "summary": "Search slicing", + "description": "When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently. The result from running the first `GET /_search` request returns documents belonging to the first slice (`id: 0`). If you run a second request with `id` set to `1', it returns documents in the second slice. Since the maximum number of slices is set to `2`, the union of the results is equivalent to the results of a point-in-time search without slicing.\n", + "value": "{\n \"slice\": {\n \"id\": 0, \n \"max\": 2 \n },\n \"query\": {\n \"match\": {\n \"message\": \"foo\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.search.ResponseBody" + }, + "examples": { + "SearchResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_search?from=40&size=20` with a simple term query.\n", + "value": "{\n \"took\": 5,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 20,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\": [\n {\n \"_index\": \"my-index-000001\",\n \"_id\": \"0\",\n \"_score\": 1.3862942,\n \"_source\": {\n \"@timestamp\": \"2099-11-15T14:12:12\",\n \"http\": {\n \"request\": {\n \"method\": \"get\"\n },\n \"response\": {\n \"status_code\": 200,\n \"bytes\": 1070000\n },\n \"version\": \"1.1\"\n },\n \"source\": {\n \"ip\": \"127.0.0.1\"\n },\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_search\n
\n ", + "
\n POST\n /{index}/_search\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "search" + ], + "summary": "Run a search", + "description": "Get search hits that match the query defined in the request.\nYou can provide search queries using the `q` query string parameter or the request body.\nIf both are specified, only the query parameter is used.\n\nIf the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.\nTo search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices.\n\n**Search slicing**\n\nWhen paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties.\nBy default the splitting is done first on the shards, then locally on each shard.\nThe local splitting partitions the shard into contiguous ranges based on Lucene document IDs.\n\nFor instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.\n\nIMPORTANT: The same point-in-time ID should be used for all slices.\nIf different PIT IDs are used, slices can overlap and miss documents.\nThis situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-search.html" + }, + "operationId": "search-3", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If `true` and there are shard request timeouts or shard failures, the request returns partial results.\nIf `false`, it returns an error with no partial results.\n\nTo override the default behavior, you can set the `search.default_allow_partial_results` cluster setting to `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "batched_reduce_size", + "description": "The number of shard results that should be reduced at once on the coordinating node.\nIf the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "default_operator", + "description": "The default operator for the query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" + }, + { + "in": "query", + "name": "df", + "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "docvalue_fields", + "description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, concrete, expanded or aliased indices will be ignored when frozen.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_named_queries_score", + "description": "If `true`, the response includes the score contribution from any named queries.\n\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "The number of concurrent shard requests per node that the search runs concurrently.\nThis value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The nodes and shards used for the search.\nBy default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness.\nValid values are:\n\n* `_only_local` to run the search only on shards on the local node.\n* `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method.\n* `_only_nodes:,` to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method.\n* `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method.\n* `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`.\n* `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "pre_filter_shard_size", + "description": "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.\nThis filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint).\nWhen unspecified, the pre-filter phase is executed if any of these conditions is met:\n\n* The request targets more than 128 shards.\n* The request targets one or more read-only index.\n* The primary sort of the query targets an indexed field.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "request_cache", + "description": "If `true`, the caching of search results is enabled for requests where `size` is `0`.\nIt defaults to index level settings.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.\nBy default, this value cannot exceed `1d` (24 hours).\nYou can change this limit by using the `search.max_keep_alive` cluster-level setting.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "Indicates how distributed term frequencies are calculated for relevance scoring.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "stats", + "description": "Specific `tag` of the request for logging and statistical purposes.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "stored_fields", + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "suggest_field", + "description": "The field to use for suggestions.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" + }, + { + "in": "query", + "name": "suggest_mode", + "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SuggestMode" + }, + "style": "form" + }, + { + "in": "query", + "name": "suggest_size", + "description": "The number of suggestions to return.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "suggest_text", + "description": "The source text for which the suggestions should be returned.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.\nIf set to `0` (default), the query does not terminate early.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt defaults to no timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, + { + "in": "query", + "name": "track_scores", + "description": "If `true`, the request calculates and returns document scores, even if the scores are not used for sorting.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, aggregation and suggester names are be prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "If `true`, the request returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source", + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nValid values are:\n\n* `true` to return the entire document source.\n* `false` to not return the document source.\n* `` to return the source fields that are specified as a comma-separated list that supports wildcard (`*`) patterns.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_exclude_vectors", + "description": "Whether vectors should be excluded from _source", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 9.2.0", + "style": "form" + }, + { + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "seq_no_primary_term", + "description": "If `true`, the request returns the sequence number and primary term of the last modification of each hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "q", + "description": "A query in the Lucene query string syntax.\nQuery parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.\n\nIMPORTANT: This parameter overrides the query parameter in the request body.\nIf both parameters are specified, documents matching the query request body parameter are not returned.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "The number of hits to return.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort", + "description": "A comma-separated list of `:` pairs.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" + }, + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "collapse": { + "description": "Collapses search results the values of the specified field.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "explain": { + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting" + }, + "description": "Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "default": "10000", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn" + }, + "description": "The approximate kNN search to run.", + "x-state": "Generally available; Added in 8.4.0", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.KnnSearch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.KnnSearch" + } + } + ] + }, + "rank": { + "description": "The Reciprocal Rank Fusion (RRF) to use.", + "x-state": "Generally available; Added in 8.8.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RankContainer" + } + ] + }, + "min_score": { + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in search results and results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "description": "Use the `post_filter` parameter to filter search results.\nThe search hits are filtered after the aggregations are calculated.\nA post filter has no impact on the aggregation results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, + "type": "boolean" + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl" + }, + "description": "The search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "retriever": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers" + }, + "description": "A retriever is a specification to describe top documents returned from a search.\nA retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.", + "x-state": "Generally available; Added in 8.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "description": "Used to retrieve the next page of hits using a set of sort values from the previous page.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, + "type": "number" + }, + "slice": { + "description": "Split a scrolled search into multiple slices that can be consumed independently.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "A comma-separated list of : pairs.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#source-filtering" + }, + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nIf the `stored_fields` property is specified, the `_source` property defaults to `false`.\nOtherwise, it defaults to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "suggest": { + "description": "Defines a suggester that provides similar looking terms based on a provided text.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + }, + "stored_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#stored-fields" + }, + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` property defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limit the search to a point in time (PIT).\nIf you provide a PIT, you cannot specify an `` in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/mapping/define-runtime-fields-in-search-request" + }, + "description": "One or more runtime fields in the search request.\nThese fields take precedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "SearchRequestExample1": { + "summary": "A simple term search", + "description": "Run `GET /my-index-000001/_search?from=40&size=20` to run a search.\n", + "value": "{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + "SearchRequestExample2": { + "summary": "A point in time search", + "description": "Run `POST /_search` to run a point in time search. The `id` parameter tells Elasticsearch to run the request using contexts from this open point in time. The `keep_alive` parameter tells Elasticsearch how long it should extend the time to live of the point in time.\n", + "value": "{\n \"size\": 100, \n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\", \n \"keep_alive\": \"1m\" \n }\n}" + }, + "SearchRequestExample3": { + "summary": "Search slicing", + "description": "When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently. The result from running the first `GET /_search` request returns documents belonging to the first slice (`id: 0`). If you run a second request with `id` set to `1', it returns documents in the second slice. Since the maximum number of slices is set to `2`, the union of the results is equivalent to the results of a point-in-time search without slicing.\n", + "value": "{\n \"slice\": {\n \"id\": 0, \n \"max\": 2 \n },\n \"query\": {\n \"match\": {\n \"message\": \"foo\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.search.ResponseBody" + }, + "examples": { + "SearchResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_search?from=40&size=20` with a simple term query.\n", + "value": "{\n \"took\": 5,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 20,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\": [\n {\n \"_index\": \"my-index-000001\",\n \"_id\": \"0\",\n \"_score\": 1.3862942,\n \"_source\": {\n \"@timestamp\": \"2099-11-15T14:12:12\",\n \"http\": {\n \"request\": {\n \"method\": \"get\"\n },\n \"response\": {\n \"status_code\": 200,\n \"bytes\": 1070000\n },\n \"version\": \"1.1\"\n },\n \"source\": {\n \"ip\": \"127.0.0.1\"\n },\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_search\n
\n ", + "
\n POST\n /{index}/_search\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_application/search_application/{name}": { + "get": { + "tags": [ + "search_application" + ], + "summary": "Get search application details", + "operationId": "search-application-get", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the search application", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/search_application._types.SearchApplication" + }, + "examples": { + "SearchApplicationGetResponseExample1": { + "description": "A sucessful response from `GET _application/search_application/my-app/`.", + "value": "{\n \"name\": \"my-app\",\n \"indices\": [ \"index1\", \"index2\" ],\n \"updated_at_millis\": 1682105622204,\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"lang\": \"mustache\",\n \"options\": {\n \"content_type\": \"application/json;charset=utf-8\"\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Beta; Added in 8.8.0", + "x-variations": [ + "
\n GET\n /_application/search_application/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_application`\n" + ], + "x-api": "get.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "search_application" + ], + "summary": "Create or update a search application", + "operationId": "search-application-put", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the search application to be created or updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "create", + "description": "If `true`, this request cannot replace or update existing Search Applications.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/search_application._types.SearchApplicationParameters" + }, + "examples": { + "SearchApplicationPutRequestExample1": { + "description": "Run `PUT _application/search_application/my-app` to create or update a search application called `my-app`. When the dictionary parameter is specified, the search application search API will perform the following parameter validation: it accepts only the `query_string` and `default_field` parameters; it verifies that `query_string` and `default_field` are both strings; it accepts `default_field` only if it takes the values title or description. If the parameters are not valid, the search application search API will return an error.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\" ],\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \"type\": \"string\"\n },\n \"default_field\": {\n \"type\": \"string\",\n \"enum\": [\n \"title\",\n \"description\"\n ]\n },\n \"additionalProperties\": false\n },\n \"required\": [\n \"query_string\"\n ]\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + } + }, + "required": [ + "result" + ] + } + } + } + } + }, + "x-state": "Beta; Added in 8.8.0", + "x-variations": [ + "
\n PUT\n /_application/search_application/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage_search_application`\n" + ], + "x-api": "put.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "search_application" + ], + "summary": "Delete a search application", + "description": "Remove a search application and its associated alias. Indices attached to the search application are not removed.", + "operationId": "search-application-delete", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the search application to delete.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Beta; Added in 8.8.0", + "x-variations": [ + "
\n DELETE\n /_application/search_application/{name}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage_search_application`\n" + ], + "x-api": "delete.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_application/analytics/{name}": { + "get": { + "tags": [ + "analytics" + ], + "summary": "Get behavioral analytics collections", + "operationId": "search-application-get-behavioral-analytics-1", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "A list of analytics collections to limit the returned information", + "required": true, + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" + } + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/search_application._types.AnalyticsCollection" + } + }, + "examples": { + "BehavioralAnalyticsGetResponseExample1": { + "description": "A successful response from `GET _application/analytics/my*`", + "value": "{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n }\n }\n}" + } + } + } + } + } + }, + "deprecated": true, + "x-state": "Technical preview; Added in 8.8.0", + "x-variations": [ + "
\n GET\n /_application/analytics/{name}\n
\n " + ], + "x-api": "get_behavioral_analytics.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "analytics" + ], + "summary": "Create a behavioral analytics collection", + "operationId": "search-application-put-behavioral-analytics", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the analytics collection to be created or updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/search_application.put_behavioral_analytics.AnalyticsAcknowledgeResponseBase" + } + } + } + } + }, + "deprecated": true, + "x-state": "Technical preview; Added in 8.8.0", + "x-variations": [ + "
\n PUT\n /_application/analytics/{name}\n
\n " + ], + "x-api": "put_behavioral_analytics.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "analytics" + ], + "summary": "Delete a behavioral analytics collection", + "description": "The associated data stream is also deleted.", + "operationId": "search-application-delete-behavioral-analytics", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the analytics collection to be deleted", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "deprecated": true, + "x-state": "Technical preview; Added in 8.8.0", + "x-variations": [ + "
\n DELETE\n /_application/analytics/{name}\n
\n " + ], + "x-api": "delete_behavioral_analytics.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_application/analytics": { + "get": { + "tags": [ + "analytics" + ], + "summary": "Get behavioral analytics collections", + "operationId": "search-application-get-behavioral-analytics", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/search_application._types.AnalyticsCollection" + } + }, + "examples": { + "BehavioralAnalyticsGetResponseExample1": { + "description": "A successful response from `GET _application/analytics/my*`", + "value": "{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n }\n }\n}" + } + } + } + } + } + }, + "deprecated": true, + "x-state": "Technical preview; Added in 8.8.0", + "x-variations": [ + "
\n GET\n /_application/analytics\n
\n " + ], + "x-api": "get_behavioral_analytics.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_application/search_application": { + "get": { + "tags": [ + "search_application" + ], + "summary": "Get search applications", + "description": "Get information about search applications.", + "operationId": "search-application-list", + "parameters": [ + { + "in": "query", + "name": "q", + "description": "Query in the Lucene query string syntax.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "Starting offset.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Specifies a max number of results to get.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/search_application._types.SearchApplication" + } + } + }, + "required": [ + "count", + "results" + ] + }, + "examples": { + "SearchApplicationsListResponseExample1": { + "description": "A succesful response from `GET _application/search_application?from=0&size=3&q=app*` returns the first three search applications whose names start with `app`.", + "value": "{\n \"count\": 2,\n \"results\": [\n {\n \"name\": \"app-1\",\n \"updated_at_millis\": 1690981129366\n },\n {\n \"name\": \"app-2\",\n \"updated_at_millis\": 1691501823939\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Beta; Added in 8.8.0", + "x-variations": [ + "
\n GET\n /_application/search_application\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_application`\n" + ], + "x-api": "list.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_application/analytics/{collection_name}/event/{event_type}": { + "post": { + "tags": [ + "analytics" + ], + "summary": "Create a behavioral analytics collection event", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/behavioral-analytics-event-reference.html", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-analytics-collection-event.html" + }, + "operationId": "search-application-post-behavioral-analytics-event", + "parameters": [ + { + "in": "path", + "name": "collection_name", + "description": "The name of the behavioral analytics collection.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "event_type", + "description": "The analytics event type.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/search_application._types.EventType" + }, + "style": "simple" + }, + { + "in": "query", + "name": "debug", + "description": "Whether the response type has to include more details", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "BehavioralAnalyticsEventPostRequestExample1": { + "description": "Run `POST _application/analytics/my_analytics_collection/event/search_click` to send a `search_click` event to an analytics collection called `my_analytics_collection`.", + "value": "{\n \"session\": {\n \"id\": \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"\n },\n \"user\": {\n \"id\": \"5f26f01a-bbee-4202-9298-81261067abbd\"\n },\n \"search\":{\n \"query\": \"search term\",\n \"results\": {\n \"items\": [\n {\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n ],\n \"total_results\": 10\n },\n \"sort\": {\n \"name\": \"relevance\"\n },\n \"search_application\": \"website\"\n },\n \"document\":{\n \"id\": \"123\",\n \"index\": \"products\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "accepted": { + "type": "boolean" + }, + "event": { + "type": "object" + } + }, + "required": [ + "accepted" + ] + } + } + } + } + }, + "deprecated": true, + "x-state": "Technical preview", + "x-variations": [ + "
\n POST\n /_application/analytics/{collection_name}/event/{event_type}\n
\n " + ], + "x-api": "post_behavioral_analytics_event.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_application/search_application/{name}/_render_query": { + "post": { + "tags": [ + "search_application" + ], + "summary": "Render a search application query", + "description": "Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified.\nIf a parameter used in the search template is not specified in `params`, the parameter's default value will be used.\nThe API returns the specific Elasticsearch query that would be generated and run by calling the search application search API.\n\nYou must have `read` privileges on the backing alias of the search application.", + "operationId": "search-application-render-query", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the search application to render teh query for.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "params": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "SearchApplicationsRenderQueryRequestExample1": { + "description": "Run `POST _application/search_application/my-app/_render_query` to generate a query for a search application called `my-app` that uses the search template.", + "value": "{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "SearchApplicationsRenderQueryResponseExample1": { + "description": "A successful response for generating a query for a search application. The `from`, `size`, and `explain` parameters were not specified in the request, so the default values specified in the search template are used.", + "value": "{\n \"from\": 0,\n \"size\": 10,\n \"query\": {\n \"multi_match\": {\n \"query\": \"my first query\",\n \"fields\": [\n \"description^1.0\",\n \"title^5.0\"\n ]\n }\n },\n \"explain\": false\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 8.9.0", + "x-variations": [ + "
\n POST\n /_application/search_application/{name}/_render_query\n
\n " + ], + "x-api": "render_query.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_application/search_application/{name}/_search": { + "get": { + "tags": [ + "search_application" + ], + "summary": "Run a search application search", + "description": "Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template.\nUnspecified template parameters are assigned their default values if applicable.", + "operationId": "search-application-search", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the search application to be searched.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Determines whether aggregation names are prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.14.0", + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "Query parameters specific to this request, which will override any defaults specified in the template.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "SearchApplicationsSearchRequestExample1": { + "description": "Use `POST _application/search_application/my-app/_search` to run a search against a search application called `my-app` that uses a search template.", + "value": "{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\", \"boost\": 1}\n ]\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.search.ResponseBody" + } + } + } + } + }, + "x-state": "Beta; Added in 8.8.0", + "x-variations": [ + "
\n GET\n /_application/search_application/{name}/_search\n
\n ", + "
\n POST\n /_application/search_application/{name}/_search\n
\n " + ], + "x-api": "search.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "search_application" + ], + "summary": "Run a search application search", + "description": "Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template.\nUnspecified template parameters are assigned their default values if applicable.", + "operationId": "search-application-search-1", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the search application to be searched.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Determines whether aggregation names are prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.14.0", + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "Query parameters specific to this request, which will override any defaults specified in the template.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "SearchApplicationsSearchRequestExample1": { + "description": "Use `POST _application/search_application/my-app/_search` to run a search against a search application called `my-app` that uses a search template.", + "value": "{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\", \"boost\": 1}\n ]\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.search.ResponseBody" + } + } + } + } + }, + "x-state": "Beta; Added in 8.8.0", + "x-variations": [ + "
\n GET\n /_application/search_application/{name}/_search\n
\n ", + "
\n POST\n /_application/search_application/{name}/_search\n
\n " + ], + "x-api": "search.search_application", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_mvt/{field}/{zoom}/{x}/{y}": { + "get": { + "tags": [ + "search" + ], + "summary": "Search a vector tile", + "description": "Search a vector tile for geospatial values.\nBefore using this API, you should be familiar with the Mapbox vector tile specification.\nThe API returns results as a binary mapbox vector tile.\n\nInternally, Elasticsearch translates a vector tile search API request into a search containing:\n\n* A `geo_bounding_box` query on the ``. The query uses the `//` tile as a bounding box.\n* A `geotile_grid` or `geohex_grid` aggregation on the ``. The `grid_agg` parameter determines the aggregation type. The aggregation uses the `//` tile as a bounding box.\n* Optionally, a `geo_bounds` aggregation on the ``. The search only includes this aggregation if the `exact_bounds` parameter is `true`.\n* If the optional parameter `with_labels` is `true`, the internal search will include a dynamic runtime field that calls the `getLabelPosition` function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label.\n\nThe API returns results as a binary Mapbox vector tile.\nMapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers:\n\n* A `hits` layer containing a feature for each `` value matching the `geo_bounding_box` query.\n* An `aggs` layer containing a feature for each cell of the `geotile_grid` or `geohex_grid`. The layer only contains features for cells with matching data.\n* A meta layer containing:\n * A feature containing a bounding box. By default, this is the bounding box of the tile.\n * Value ranges for any sub-aggregations on the `geotile_grid` or `geohex_grid`.\n * Metadata for the search.\n\nThe API only returns features that can display at its zoom level.\nFor example, if a polygon feature has no area at its zoom level, the API omits it.\nThe API returns errors as UTF-8 encoded JSON.\n\nIMPORTANT: You can specify several options for this API as either a query parameter or request body parameter.\nIf you specify both parameters, the query parameter takes precedence.\n\n**Grid precision for geotile**\n\nFor a `grid_agg` of `geotile`, you can use cells in the `aggs` layer as tiles for lower zoom levels.\n`grid_precision` represents the additional zoom levels available through these cells. The final precision is computed by as follows: ` + grid_precision`.\nFor example, if `` is 7 and `grid_precision` is 8, then the `geotile_grid` aggregation will use a precision of 15.\nThe maximum final precision is 29.\nThe `grid_precision` also determines the number of cells for the grid as follows: `(2^grid_precision) x (2^grid_precision)`.\nFor example, a value of 8 divides the tile into a grid of 256 x 256 cells.\nThe `aggs` layer only contains features for cells with matching data.\n\n**Grid precision for geohex**\n\nFor a `grid_agg` of `geohex`, Elasticsearch uses `` and `grid_precision` to calculate a final precision as follows: ` + grid_precision`.\n\nThis precision determines the H3 resolution of the hexagonal cells produced by the `geohex` aggregation.\nThe following table maps the H3 resolution for each precision.\nFor example, if `` is 3 and `grid_precision` is 3, the precision is 6.\nAt a precision of 6, hexagonal cells have an H3 resolution of 2.\nIf `` is 3 and `grid_precision` is 4, the precision is 7.\nAt a precision of 7, hexagonal cells have an H3 resolution of 3.\n\n| Precision | Unique tile bins | H3 resolution | Unique hex bins |\tRatio |\n| --------- | ---------------- | ------------- | ----------------| ----- |\n| 1 | 4 | 0 | 122 | 30.5 |\n| 2 | 16 | 0 | 122 | 7.625 |\n| 3 | 64 | 1 | 842 | 13.15625 |\n| 4 | 256 | 1 | 842 | 3.2890625 |\n| 5 | 1024 | 2 | 5882 | 5.744140625 |\n| 6 | 4096 | 2 | 5882 | 1.436035156 |\n| 7 | 16384 | 3 | 41162 | 2.512329102 |\n| 8 | 65536 | 3 | 41162 | 0.6280822754 |\n| 9 | 262144 | 4 | 288122 | 1.099098206 |\n| 10 | 1048576 | 4 | 288122 | 0.2747745514 |\n| 11 | 4194304 | 5 | 2016842 | 0.4808526039 |\n| 12 | 16777216 | 6 | 14117882 | 0.8414913416 |\n| 13 | 67108864 | 6 | 14117882 | 0.2103728354 |\n| 14 | 268435456 | 7 | 98825162 | 0.3681524172 |\n| 15 | 1073741824 | 8 | 691776122 | 0.644266719 |\n| 16 | 4294967296 | 8 | 691776122 | 0.1610666797 |\n| 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 |\n| 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 |\n| 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 |\n| 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 |\n| 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 |\n| 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 |\n| 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 |\n| 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 |\n| 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 |\n| 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 |\n| 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 |\n| 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 |\n| 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 |\n\nHexagonal cells don't align perfectly on a vector tile.\nSome cells may intersect more than one vector tile.\nTo compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level.\nElasticsearch uses the H3 resolution that is closest to the corresponding geotile density.\n\nLearn how to use the vector tile search API with practical examples in the [Vector tile search examples](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search) guide.", + "externalDocs": { + "url": "https://github.com/mapbox/vector-tile-spec/blob/master/README.md", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-vector-tile-api.html" + }, + "operationId": "search-mvt-1", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A list of indices, data streams, or aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.\nTo search a remote cluster, use the `:` syntax.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "path", + "name": "field", + "description": "A field that contains the geospatial data to return.\nIt must be a `geo_point` or `geo_shape` field.\nThe field must have doc values enabled. It cannot be a nested field.\n\nNOTE: Vector tiles do not natively support geometry collections.\nFor `geometrycollection` values in a `geo_shape` field, the API returns a hits layer feature for each element of the collection.\nThis behavior may change in a future release.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "simple" + }, + { + "in": "path", + "name": "zoom", + "description": "The zoom level of the vector tile to search. It accepts `0` to `29`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.ZoomLevel" + }, + "style": "simple" + }, + { + "in": "path", + "name": "x", + "description": "The X coordinate for the vector tile to search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.Coordinate" + }, + "style": "simple" + }, + { + "in": "path", + "name": "y", + "description": "The Y coordinate for the vector tile to search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.Coordinate" + }, + "style": "simple" + }, + { + "in": "query", + "name": "exact_bounds", + "description": "If `false`, the meta layer's feature is the bounding box of the tile.\nIf true, the meta layer's feature is a bounding box resulting from a\ngeo_bounds aggregation. The aggregation runs on values that intersect\nthe // tile with wrap_longitude set to false. The resulting\nbounding box may be larger than the vector tile.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "extent", + "description": "The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "grid_agg", + "description": "Aggregation used to create a grid for `field`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.GridAggregationType" + }, + "style": "form" + }, + { + "in": "query", + "name": "grid_precision", + "description": "Additional zoom levels available through the aggs layer. For example, if is 7\nand grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results\ndon't include the aggs layer.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "grid_type", + "description": "Determines the geometry type for features in the aggs layer. In the aggs layer,\neach feature represents a geotile_grid cell. If 'grid' each feature is a Polygon\nof the cells bounding box. If 'point' each feature is a Point that is the centroid\nof the cell.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.GridType" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, + { + "in": "query", + "name": "with_labels", + "description": "If `true`, the hits and aggs layers will contain additional point features representing\nsuggested label positions for the original features.\n\n* `Point` and `MultiPoint` features will have one of the points selected.\n* `Polygon` and `MultiPolygon` features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.\n* `LineString` features will likewise provide a roughly central point selected from the triangle-tree.\n* The aggregation results will provide one central point for each aggregation bucket.\n\nAll attributes from the original features will also be copied to the new label features.\nIn addition, the new features will be distinguishable using the tag `_mvt_label_position`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggs": { + "description": "Sub-aggregations for the geotile_grid.\n\nIt supports the following aggregation types:\n\n- `avg`\n- `boxplot`\n- `cardinality`\n- `extended stats`\n- `max`\n- `median absolute deviation`\n- `min`\n- `percentile`\n- `percentile-rank`\n- `stats`\n- `sum`\n- `value count`\n\nThe aggregation names can't start with `_mvt_`. The `_mvt_` prefix is reserved for internal aggregations.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "buffer": { + "description": "The size, in pixels, of a clipping buffer outside the tile. This allows renderers\nto avoid outline artifacts from geometries that extend past the extent of the tile.", + "default": 5.0, + "type": "number" + }, + "exact_bounds": { + "description": "If `false`, the meta layer's feature is the bounding box of the tile.\nIf `true`, the meta layer's feature is a bounding box resulting from a\n`geo_bounds` aggregation. The aggregation runs on values that intersect\nthe `//` tile with `wrap_longitude` set to `false`. The resulting\nbounding box may be larger than the vector tile.", + "default": false, + "type": "boolean" + }, + "extent": { + "description": "The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.", + "default": 4096.0, + "type": "number" + }, + "fields": { + "description": "The fields to return in the `hits` layer.\nIt supports wildcards (`*`).\nThis parameter does not support fields with array values. Fields with array\nvalues may return inconsistent results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "grid_agg": { + "description": "The aggregation used to create a grid for the `field`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search_mvt._types.GridAggregationType" + } + ] + }, + "grid_precision": { + "description": "Additional zoom levels available through the aggs layer. For example, if `` is `7`\nand `grid_precision` is `8`, you can zoom in up to level 15. Accepts 0-8. If 0, results\ndon't include the aggs layer.", + "default": 8.0, + "type": "number" + }, + "grid_type": { + "description": "Determines the geometry type for features in the aggs layer. In the aggs layer,\neach feature represents a `geotile_grid` cell. If `grid, each feature is a polygon\nof the cells bounding box. If `point`, each feature is a Point that is the centroid\nof the cell.", + "default": "grid", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search_mvt._types.GridType" + } + ] + }, + "query": { + "description": "The query DSL used to filter documents for the search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "runtime_mappings": { + "description": "Defines one or more runtime fields in the search request. These fields take\nprecedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "size": { + "description": "The maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", + "default": 10000.0, + "type": "number" + }, + "sort": { + "description": "Sort the features in the hits layer. By default, the API calculates a bounding\nbox for each feature. It sorts features based on this box's diagonal length,\nfrom longest to shortest.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "track_total_hits": { + "description": "The number of hits matching the query to count accurately. If `true`, the exact number\nof hits is returned at the cost of some performance. If `false`, the response does\nnot include the total number of hits matching the query.", + "default": "10000", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "with_labels": { + "description": "If `true`, the hits and aggs layers will contain additional point features representing\nsuggested label positions for the original features.\n\n* `Point` and `MultiPoint` features will have one of the points selected.\n* `Polygon` and `MultiPolygon` features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.\n* `LineString` features will likewise provide a roughly central point selected from the triangle-tree.\n* The aggregation results will provide one central point for each aggregation bucket.\n\nAll attributes from the original features will also be copied to the new label features.\nIn addition, the new features will be distinguishable using the tag `_mvt_label_position`.", + "type": "boolean" + } + } + }, + "examples": { + "SearchMvtRequestExample1": { + "description": "Run `GET museums/_mvt/location/13/4207/2692` to search an index for `location` values that intersect the `13/4207/2692` vector tile.\n", + "value": "{\n \"grid_agg\": \"geotile\",\n \"grid_precision\": 2,\n \"fields\": [\n \"name\",\n \"price\"\n ],\n \"query\": {\n \"term\": {\n \"included\": true\n }\n },\n \"aggs\": {\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.MapboxVectorTiles" + }, + "examples": { + "SearchMvtResponseExample1": { + "description": "A successful response from `GET museums/_mvt/location/13/4207/2692`. It returns results as a binary vector tile. When decoded into JSON, the tile contains the following data.\n", + "value": "{\n \"hits\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3208,\n 3864\n ]\n },\n \"properties\": {\n \"_id\": \"1\",\n \"_index\": \"museums\",\n \"name\": \"NEMO Science Museum\",\n \"price\": 1750\n },\n \"type\": 1\n },\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3429,\n 3496\n ]\n },\n \"properties\": {\n \"_id\": \"3\",\n \"_index\": \"museums\",\n \"name\": \"Nederlands Scheepvaartmuseum\",\n \"price\": 1650\n },\n \"type\": 1\n },\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3429,\n 3496\n ]\n },\n \"properties\": {\n \"_id\": \"4\",\n \"_index\": \"museums\",\n \"name\": \"Amsterdam Centre for Architecture\",\n \"price\": 0\n },\n \"type\": 1\n }\n ]\n },\n \"aggs\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 3072,\n 3072\n ],\n [\n 4096,\n 3072\n ],\n [\n 4096,\n 4096\n ],\n [\n 3072,\n 4096\n ],\n [\n 3072,\n 3072\n ]\n ]\n ]\n },\n \"properties\": {\n \"_count\": 3,\n \"max_price.value\": 1750.0,\n \"min_price.value\": 0.0,\n \"avg_price.value\": 1133.3333333333333\n },\n \"type\": 3\n }\n ]\n },\n \"meta\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 0,\n 0\n ],\n [\n 4096,\n 0\n ],\n [\n 4096,\n 4096\n ],\n [\n 0,\n 4096\n ],\n [\n 0,\n 0\n ]\n ]\n ]\n },\n \"properties\": {\n \"_shards.failed\": 0,\n \"_shards.skipped\": 0,\n \"_shards.successful\": 1,\n \"_shards.total\": 1,\n \"aggregations._count.avg\": 3.0,\n \"aggregations._count.count\": 1,\n \"aggregations._count.max\": 3.0,\n \"aggregations._count.min\": 3.0,\n \"aggregations._count.sum\": 3.0,\n \"aggregations.avg_price.avg\": 1133.3333333333333,\n \"aggregations.avg_price.count\": 1,\n \"aggregations.avg_price.max\": 1133.3333333333333,\n \"aggregations.avg_price.min\": 1133.3333333333333,\n \"aggregations.avg_price.sum\": 1133.3333333333333,\n \"aggregations.max_price.avg\": 1750.0,\n \"aggregations.max_price.count\": 1,\n \"aggregations.max_price.max\": 1750.0,\n \"aggregations.max_price.min\": 1750.0,\n \"aggregations.max_price.sum\": 1750.0,\n \"aggregations.min_price.avg\": 0.0,\n \"aggregations.min_price.count\": 1,\n \"aggregations.min_price.max\": 0.0,\n \"aggregations.min_price.min\": 0.0,\n \"aggregations.min_price.sum\": 0.0,\n \"hits.max_score\": 0.0,\n \"hits.total.relation\": \"eq\",\n \"hits.total.value\": 3,\n \"timed_out\": false,\n \"took\": 2\n },\n \"type\": 3\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.15.0", + "x-variations": [ + "
\n POST\n /{index}/_mvt/{field}/{zoom}/{x}/{y}\n
\n ", + "
\n GET\n /{index}/_mvt/{field}/{zoom}/{x}/{y}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search_mvt", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "search" + ], + "summary": "Search a vector tile", + "description": "Search a vector tile for geospatial values.\nBefore using this API, you should be familiar with the Mapbox vector tile specification.\nThe API returns results as a binary mapbox vector tile.\n\nInternally, Elasticsearch translates a vector tile search API request into a search containing:\n\n* A `geo_bounding_box` query on the ``. The query uses the `//` tile as a bounding box.\n* A `geotile_grid` or `geohex_grid` aggregation on the ``. The `grid_agg` parameter determines the aggregation type. The aggregation uses the `//` tile as a bounding box.\n* Optionally, a `geo_bounds` aggregation on the ``. The search only includes this aggregation if the `exact_bounds` parameter is `true`.\n* If the optional parameter `with_labels` is `true`, the internal search will include a dynamic runtime field that calls the `getLabelPosition` function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label.\n\nThe API returns results as a binary Mapbox vector tile.\nMapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers:\n\n* A `hits` layer containing a feature for each `` value matching the `geo_bounding_box` query.\n* An `aggs` layer containing a feature for each cell of the `geotile_grid` or `geohex_grid`. The layer only contains features for cells with matching data.\n* A meta layer containing:\n * A feature containing a bounding box. By default, this is the bounding box of the tile.\n * Value ranges for any sub-aggregations on the `geotile_grid` or `geohex_grid`.\n * Metadata for the search.\n\nThe API only returns features that can display at its zoom level.\nFor example, if a polygon feature has no area at its zoom level, the API omits it.\nThe API returns errors as UTF-8 encoded JSON.\n\nIMPORTANT: You can specify several options for this API as either a query parameter or request body parameter.\nIf you specify both parameters, the query parameter takes precedence.\n\n**Grid precision for geotile**\n\nFor a `grid_agg` of `geotile`, you can use cells in the `aggs` layer as tiles for lower zoom levels.\n`grid_precision` represents the additional zoom levels available through these cells. The final precision is computed by as follows: ` + grid_precision`.\nFor example, if `` is 7 and `grid_precision` is 8, then the `geotile_grid` aggregation will use a precision of 15.\nThe maximum final precision is 29.\nThe `grid_precision` also determines the number of cells for the grid as follows: `(2^grid_precision) x (2^grid_precision)`.\nFor example, a value of 8 divides the tile into a grid of 256 x 256 cells.\nThe `aggs` layer only contains features for cells with matching data.\n\n**Grid precision for geohex**\n\nFor a `grid_agg` of `geohex`, Elasticsearch uses `` and `grid_precision` to calculate a final precision as follows: ` + grid_precision`.\n\nThis precision determines the H3 resolution of the hexagonal cells produced by the `geohex` aggregation.\nThe following table maps the H3 resolution for each precision.\nFor example, if `` is 3 and `grid_precision` is 3, the precision is 6.\nAt a precision of 6, hexagonal cells have an H3 resolution of 2.\nIf `` is 3 and `grid_precision` is 4, the precision is 7.\nAt a precision of 7, hexagonal cells have an H3 resolution of 3.\n\n| Precision | Unique tile bins | H3 resolution | Unique hex bins |\tRatio |\n| --------- | ---------------- | ------------- | ----------------| ----- |\n| 1 | 4 | 0 | 122 | 30.5 |\n| 2 | 16 | 0 | 122 | 7.625 |\n| 3 | 64 | 1 | 842 | 13.15625 |\n| 4 | 256 | 1 | 842 | 3.2890625 |\n| 5 | 1024 | 2 | 5882 | 5.744140625 |\n| 6 | 4096 | 2 | 5882 | 1.436035156 |\n| 7 | 16384 | 3 | 41162 | 2.512329102 |\n| 8 | 65536 | 3 | 41162 | 0.6280822754 |\n| 9 | 262144 | 4 | 288122 | 1.099098206 |\n| 10 | 1048576 | 4 | 288122 | 0.2747745514 |\n| 11 | 4194304 | 5 | 2016842 | 0.4808526039 |\n| 12 | 16777216 | 6 | 14117882 | 0.8414913416 |\n| 13 | 67108864 | 6 | 14117882 | 0.2103728354 |\n| 14 | 268435456 | 7 | 98825162 | 0.3681524172 |\n| 15 | 1073741824 | 8 | 691776122 | 0.644266719 |\n| 16 | 4294967296 | 8 | 691776122 | 0.1610666797 |\n| 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 |\n| 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 |\n| 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 |\n| 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 |\n| 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 |\n| 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 |\n| 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 |\n| 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 |\n| 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 |\n| 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 |\n| 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 |\n| 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 |\n| 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 |\n\nHexagonal cells don't align perfectly on a vector tile.\nSome cells may intersect more than one vector tile.\nTo compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level.\nElasticsearch uses the H3 resolution that is closest to the corresponding geotile density.\n\nLearn how to use the vector tile search API with practical examples in the [Vector tile search examples](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search) guide.", + "externalDocs": { + "url": "https://github.com/mapbox/vector-tile-spec/blob/master/README.md", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-vector-tile-api.html" + }, + "operationId": "search-mvt", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A list of indices, data streams, or aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.\nTo search a remote cluster, use the `:` syntax.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "path", + "name": "field", + "description": "A field that contains the geospatial data to return.\nIt must be a `geo_point` or `geo_shape` field.\nThe field must have doc values enabled. It cannot be a nested field.\n\nNOTE: Vector tiles do not natively support geometry collections.\nFor `geometrycollection` values in a `geo_shape` field, the API returns a hits layer feature for each element of the collection.\nThis behavior may change in a future release.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "simple" + }, + { + "in": "path", + "name": "zoom", + "description": "The zoom level of the vector tile to search. It accepts `0` to `29`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.ZoomLevel" + }, + "style": "simple" + }, + { + "in": "path", + "name": "x", + "description": "The X coordinate for the vector tile to search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.Coordinate" + }, + "style": "simple" + }, + { + "in": "path", + "name": "y", + "description": "The Y coordinate for the vector tile to search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.Coordinate" + }, + "style": "simple" + }, + { + "in": "query", + "name": "exact_bounds", + "description": "If `false`, the meta layer's feature is the bounding box of the tile.\nIf true, the meta layer's feature is a bounding box resulting from a\ngeo_bounds aggregation. The aggregation runs on values that intersect\nthe // tile with wrap_longitude set to false. The resulting\nbounding box may be larger than the vector tile.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "extent", + "description": "The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "grid_agg", + "description": "Aggregation used to create a grid for `field`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.GridAggregationType" + }, + "style": "form" + }, + { + "in": "query", + "name": "grid_precision", + "description": "Additional zoom levels available through the aggs layer. For example, if is 7\nand grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results\ndon't include the aggs layer.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "grid_type", + "description": "Determines the geometry type for features in the aggs layer. In the aggs layer,\neach feature represents a geotile_grid cell. If 'grid' each feature is a Polygon\nof the cells bounding box. If 'point' each feature is a Point that is the centroid\nof the cell.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search_mvt._types.GridType" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, + { + "in": "query", + "name": "with_labels", + "description": "If `true`, the hits and aggs layers will contain additional point features representing\nsuggested label positions for the original features.\n\n* `Point` and `MultiPoint` features will have one of the points selected.\n* `Polygon` and `MultiPolygon` features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.\n* `LineString` features will likewise provide a roughly central point selected from the triangle-tree.\n* The aggregation results will provide one central point for each aggregation bucket.\n\nAll attributes from the original features will also be copied to the new label features.\nIn addition, the new features will be distinguishable using the tag `_mvt_label_position`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggs": { + "description": "Sub-aggregations for the geotile_grid.\n\nIt supports the following aggregation types:\n\n- `avg`\n- `boxplot`\n- `cardinality`\n- `extended stats`\n- `max`\n- `median absolute deviation`\n- `min`\n- `percentile`\n- `percentile-rank`\n- `stats`\n- `sum`\n- `value count`\n\nThe aggregation names can't start with `_mvt_`. The `_mvt_` prefix is reserved for internal aggregations.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "buffer": { + "description": "The size, in pixels, of a clipping buffer outside the tile. This allows renderers\nto avoid outline artifacts from geometries that extend past the extent of the tile.", + "default": 5.0, + "type": "number" + }, + "exact_bounds": { + "description": "If `false`, the meta layer's feature is the bounding box of the tile.\nIf `true`, the meta layer's feature is a bounding box resulting from a\n`geo_bounds` aggregation. The aggregation runs on values that intersect\nthe `//` tile with `wrap_longitude` set to `false`. The resulting\nbounding box may be larger than the vector tile.", + "default": false, + "type": "boolean" + }, + "extent": { + "description": "The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.", + "default": 4096.0, + "type": "number" + }, + "fields": { + "description": "The fields to return in the `hits` layer.\nIt supports wildcards (`*`).\nThis parameter does not support fields with array values. Fields with array\nvalues may return inconsistent results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "grid_agg": { + "description": "The aggregation used to create a grid for the `field`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search_mvt._types.GridAggregationType" + } + ] + }, + "grid_precision": { + "description": "Additional zoom levels available through the aggs layer. For example, if `` is `7`\nand `grid_precision` is `8`, you can zoom in up to level 15. Accepts 0-8. If 0, results\ndon't include the aggs layer.", + "default": 8.0, + "type": "number" + }, + "grid_type": { + "description": "Determines the geometry type for features in the aggs layer. In the aggs layer,\neach feature represents a `geotile_grid` cell. If `grid, each feature is a polygon\nof the cells bounding box. If `point`, each feature is a Point that is the centroid\nof the cell.", + "default": "grid", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search_mvt._types.GridType" + } + ] + }, + "query": { + "description": "The query DSL used to filter documents for the search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "runtime_mappings": { + "description": "Defines one or more runtime fields in the search request. These fields take\nprecedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "size": { + "description": "The maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", + "default": 10000.0, + "type": "number" + }, + "sort": { + "description": "Sort the features in the hits layer. By default, the API calculates a bounding\nbox for each feature. It sorts features based on this box's diagonal length,\nfrom longest to shortest.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "track_total_hits": { + "description": "The number of hits matching the query to count accurately. If `true`, the exact number\nof hits is returned at the cost of some performance. If `false`, the response does\nnot include the total number of hits matching the query.", + "default": "10000", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "with_labels": { + "description": "If `true`, the hits and aggs layers will contain additional point features representing\nsuggested label positions for the original features.\n\n* `Point` and `MultiPoint` features will have one of the points selected.\n* `Polygon` and `MultiPolygon` features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.\n* `LineString` features will likewise provide a roughly central point selected from the triangle-tree.\n* The aggregation results will provide one central point for each aggregation bucket.\n\nAll attributes from the original features will also be copied to the new label features.\nIn addition, the new features will be distinguishable using the tag `_mvt_label_position`.", + "type": "boolean" + } + } + }, + "examples": { + "SearchMvtRequestExample1": { + "description": "Run `GET museums/_mvt/location/13/4207/2692` to search an index for `location` values that intersect the `13/4207/2692` vector tile.\n", + "value": "{\n \"grid_agg\": \"geotile\",\n \"grid_precision\": 2,\n \"fields\": [\n \"name\",\n \"price\"\n ],\n \"query\": {\n \"term\": {\n \"included\": true\n }\n },\n \"aggs\": {\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.MapboxVectorTiles" + }, + "examples": { + "SearchMvtResponseExample1": { + "description": "A successful response from `GET museums/_mvt/location/13/4207/2692`. It returns results as a binary vector tile. When decoded into JSON, the tile contains the following data.\n", + "value": "{\n \"hits\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3208,\n 3864\n ]\n },\n \"properties\": {\n \"_id\": \"1\",\n \"_index\": \"museums\",\n \"name\": \"NEMO Science Museum\",\n \"price\": 1750\n },\n \"type\": 1\n },\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3429,\n 3496\n ]\n },\n \"properties\": {\n \"_id\": \"3\",\n \"_index\": \"museums\",\n \"name\": \"Nederlands Scheepvaartmuseum\",\n \"price\": 1650\n },\n \"type\": 1\n },\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3429,\n 3496\n ]\n },\n \"properties\": {\n \"_id\": \"4\",\n \"_index\": \"museums\",\n \"name\": \"Amsterdam Centre for Architecture\",\n \"price\": 0\n },\n \"type\": 1\n }\n ]\n },\n \"aggs\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 3072,\n 3072\n ],\n [\n 4096,\n 3072\n ],\n [\n 4096,\n 4096\n ],\n [\n 3072,\n 4096\n ],\n [\n 3072,\n 3072\n ]\n ]\n ]\n },\n \"properties\": {\n \"_count\": 3,\n \"max_price.value\": 1750.0,\n \"min_price.value\": 0.0,\n \"avg_price.value\": 1133.3333333333333\n },\n \"type\": 3\n }\n ]\n },\n \"meta\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 0,\n 0\n ],\n [\n 4096,\n 0\n ],\n [\n 4096,\n 4096\n ],\n [\n 0,\n 4096\n ],\n [\n 0,\n 0\n ]\n ]\n ]\n },\n \"properties\": {\n \"_shards.failed\": 0,\n \"_shards.skipped\": 0,\n \"_shards.successful\": 1,\n \"_shards.total\": 1,\n \"aggregations._count.avg\": 3.0,\n \"aggregations._count.count\": 1,\n \"aggregations._count.max\": 3.0,\n \"aggregations._count.min\": 3.0,\n \"aggregations._count.sum\": 3.0,\n \"aggregations.avg_price.avg\": 1133.3333333333333,\n \"aggregations.avg_price.count\": 1,\n \"aggregations.avg_price.max\": 1133.3333333333333,\n \"aggregations.avg_price.min\": 1133.3333333333333,\n \"aggregations.avg_price.sum\": 1133.3333333333333,\n \"aggregations.max_price.avg\": 1750.0,\n \"aggregations.max_price.count\": 1,\n \"aggregations.max_price.max\": 1750.0,\n \"aggregations.max_price.min\": 1750.0,\n \"aggregations.max_price.sum\": 1750.0,\n \"aggregations.min_price.avg\": 0.0,\n \"aggregations.min_price.count\": 1,\n \"aggregations.min_price.max\": 0.0,\n \"aggregations.min_price.min\": 0.0,\n \"aggregations.min_price.sum\": 0.0,\n \"hits.max_score\": 0.0,\n \"hits.total.relation\": \"eq\",\n \"hits.total.value\": 3,\n \"timed_out\": false,\n \"took\": 2\n },\n \"type\": 3\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.15.0", + "x-variations": [ + "
\n POST\n /{index}/_mvt/{field}/{zoom}/{x}/{y}\n
\n ", + "
\n GET\n /{index}/_mvt/{field}/{zoom}/{x}/{y}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search_mvt", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_search_shards": { + "get": { + "tags": [ + "search" + ], + "summary": "Get the search shards", + "description": "Get the indices and shards that a search request would be run against.\nThis information can be useful for working out issues or planning optimizations with routing and shard preferences.\nWhen filtered aliases are used, the filter is returned as part of the `indices` section.\n\nIf the Elasticsearch security features are enabled, you must have the `view_index_metadata` or `manage` index privilege for the target data stream, index, or alias.", + "operationId": "search-shards", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIT can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search_shards.SearchShardsNodeAttributes" + } + }, + "shards": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.NodeShard" + } + } + }, + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search_shards.ShardStoreIndex" + } + } + }, + "required": [ + "nodes", + "shards", + "indices" + ] + }, + "examples": { + "SearchShardsResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_search_shards`.", + "value": "{\n \"nodes\": {},\n \"indices\": {\n \"my-index-000001\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 0,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 1,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"Nwl0wbMBTHCWjEEbGYGapg\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"bU_KLGJISbW0RejwnwDPKw\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 4,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"DMs7_giNSwmdqVukF7UydA\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ]\n ]\n }" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_search_shards\n
\n ", + "
\n POST\n /_search_shards\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "search_shards", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "search" + ], + "summary": "Get the search shards", + "description": "Get the indices and shards that a search request would be run against.\nThis information can be useful for working out issues or planning optimizations with routing and shard preferences.\nWhen filtered aliases are used, the filter is returned as part of the `indices` section.\n\nIf the Elasticsearch security features are enabled, you must have the `view_index_metadata` or `manage` index privilege for the target data stream, index, or alias.", + "operationId": "search-shards-1", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIT can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search_shards.SearchShardsNodeAttributes" + } + }, + "shards": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.NodeShard" + } + } + }, + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search_shards.ShardStoreIndex" + } + } + }, + "required": [ + "nodes", + "shards", + "indices" + ] + }, + "examples": { + "SearchShardsResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_search_shards`.", + "value": "{\n \"nodes\": {},\n \"indices\": {\n \"my-index-000001\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 0,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 1,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"Nwl0wbMBTHCWjEEbGYGapg\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"bU_KLGJISbW0RejwnwDPKw\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 4,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"DMs7_giNSwmdqVukF7UydA\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ]\n ]\n }" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_search_shards\n
\n ", + "
\n POST\n /_search_shards\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "search_shards", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_search_shards": { + "get": { + "tags": [ + "search" + ], + "summary": "Get the search shards", + "description": "Get the indices and shards that a search request would be run against.\nThis information can be useful for working out issues or planning optimizations with routing and shard preferences.\nWhen filtered aliases are used, the filter is returned as part of the `indices` section.\n\nIf the Elasticsearch security features are enabled, you must have the `view_index_metadata` or `manage` index privilege for the target data stream, index, or alias.", + "operationId": "search-shards-2", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIT can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search_shards.SearchShardsNodeAttributes" + } + }, + "shards": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.NodeShard" + } + } + }, + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search_shards.ShardStoreIndex" + } + } + }, + "required": [ + "nodes", + "shards", + "indices" + ] + }, + "examples": { + "SearchShardsResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_search_shards`.", + "value": "{\n \"nodes\": {},\n \"indices\": {\n \"my-index-000001\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 0,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 1,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"Nwl0wbMBTHCWjEEbGYGapg\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"bU_KLGJISbW0RejwnwDPKw\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 4,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"DMs7_giNSwmdqVukF7UydA\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ]\n ]\n }" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_search_shards\n
\n ", + "
\n POST\n /{index}/_search_shards\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "search_shards", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "search" + ], + "summary": "Get the search shards", + "description": "Get the indices and shards that a search request would be run against.\nThis information can be useful for working out issues or planning optimizations with routing and shard preferences.\nWhen filtered aliases are used, the filter is returned as part of the `indices` section.\n\nIf the Elasticsearch security features are enabled, you must have the `view_index_metadata` or `manage` index privilege for the target data stream, index, or alias.", + "operationId": "search-shards-3", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request retrieves information from the local node only.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIT can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search_shards.SearchShardsNodeAttributes" + } + }, + "shards": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.NodeShard" + } + } + }, + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search_shards.ShardStoreIndex" + } + } + }, + "required": [ + "nodes", + "shards", + "indices" + ] + }, + "examples": { + "SearchShardsResponseExample1": { + "description": "An abbreviated response from `GET /my-index-000001/_search_shards`.", + "value": "{\n \"nodes\": {},\n \"indices\": {\n \"my-index-000001\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 0,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 1,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"Nwl0wbMBTHCWjEEbGYGapg\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"bU_KLGJISbW0RejwnwDPKw\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 4,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"DMs7_giNSwmdqVukF7UydA\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ]\n ]\n }" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_search_shards\n
\n ", + "
\n POST\n /{index}/_search_shards\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`\n" + ], + "x-api": "search_shards", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_search/template": { + "get": { + "tags": [ + "search" + ], + "summary": "Run a search with a search template", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-template-api.html" + }, + "operationId": "search-template", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "If `true`, the response includes additional details about score computation as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "profile", + "description": "If `true`, the query execution is profiled.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll", + "description": "Specifies how long a consistent view of the index\nshould be maintained for scrolled search.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "The type of the search operation.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If `true`, `hits.total` is rendered as an integer in the response.\nIf `false`, it is rendered as an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 7.0.0", + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "explain": { + "description": "If `true`, returns detailed information about score calculation as part of each hit.\nIf you specify both this and the `explain` query parameter, the API uses only the query parameter.", + "default": false, + "type": "boolean" + }, + "id": { + "description": "The ID of the search template to use. If no `source` is specified,\nthis parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "profile": { + "description": "If `true`, the query execution is profiled.", + "default": false, + "type": "boolean" + }, + "source": { + "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + }, + "examples": { + "SearchTemplateRequestExample1": { + "description": "Run `GET my-index/_search/template` to run a search with a search template.\n", + "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" + } + }, + "_clusters": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "max_score": { + "type": "number" + }, + "num_reduce_phases": { + "type": "number" + }, + "profile": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Profile" + } + ] + }, + "pit_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_scroll_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] + }, + "suggest": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Suggest" + } + } + }, + "terminated_early": { + "type": "boolean" + } + }, + "required": [ + "took", + "timed_out", + "_shards", + "hits" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 2.0.0", + "x-variations": [ + "
\n GET\n /_search/template\n
\n ", + "
\n POST\n /_search/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "search" + ], + "summary": "Run a search with a search template", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-template-api.html" + }, + "operationId": "search-template-1", + "parameters": [ + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "If `true`, the response includes additional details about score computation as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "profile", + "description": "If `true`, the query execution is profiled.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll", + "description": "Specifies how long a consistent view of the index\nshould be maintained for scrolled search.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "The type of the search operation.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If `true`, `hits.total` is rendered as an integer in the response.\nIf `false`, it is rendered as an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 7.0.0", + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "explain": { + "description": "If `true`, returns detailed information about score calculation as part of each hit.\nIf you specify both this and the `explain` query parameter, the API uses only the query parameter.", + "default": false, + "type": "boolean" + }, + "id": { + "description": "The ID of the search template to use. If no `source` is specified,\nthis parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "profile": { + "description": "If `true`, the query execution is profiled.", + "default": false, + "type": "boolean" + }, + "source": { + "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + }, + "examples": { + "SearchTemplateRequestExample1": { + "description": "Run `GET my-index/_search/template` to run a search with a search template.\n", + "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" + } + }, + "_clusters": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "max_score": { + "type": "number" + }, + "num_reduce_phases": { + "type": "number" + }, + "profile": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Profile" + } + ] + }, + "pit_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_scroll_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] + }, + "suggest": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Suggest" + } + } + }, + "terminated_early": { + "type": "boolean" + } + }, + "required": [ + "took", + "timed_out", + "_shards", + "hits" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 2.0.0", + "x-variations": [ + "
\n GET\n /_search/template\n
\n ", + "
\n POST\n /_search/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_search/template": { + "get": { + "tags": [ + "search" + ], + "summary": "Run a search with a search template", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-template-api.html" + }, + "operationId": "search-template-2", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "If `true`, the response includes additional details about score computation as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "profile", + "description": "If `true`, the query execution is profiled.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll", + "description": "Specifies how long a consistent view of the index\nshould be maintained for scrolled search.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "The type of the search operation.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If `true`, `hits.total` is rendered as an integer in the response.\nIf `false`, it is rendered as an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 7.0.0", + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "explain": { + "description": "If `true`, returns detailed information about score calculation as part of each hit.\nIf you specify both this and the `explain` query parameter, the API uses only the query parameter.", + "default": false, + "type": "boolean" + }, + "id": { + "description": "The ID of the search template to use. If no `source` is specified,\nthis parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "profile": { + "description": "If `true`, the query execution is profiled.", + "default": false, + "type": "boolean" + }, + "source": { + "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + }, + "examples": { + "SearchTemplateRequestExample1": { + "description": "Run `GET my-index/_search/template` to run a search with a search template.\n", + "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" + } + }, + "_clusters": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "max_score": { + "type": "number" + }, + "num_reduce_phases": { + "type": "number" + }, + "profile": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Profile" + } + ] + }, + "pit_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_scroll_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] + }, + "suggest": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Suggest" + } + } + }, + "terminated_early": { + "type": "boolean" + } + }, + "required": [ + "took", + "timed_out", + "_shards", + "hits" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 2.0.0", + "x-variations": [ + "
\n GET\n /{index}/_search/template\n
\n ", + "
\n POST\n /{index}/_search/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "search" + ], + "summary": "Run a search with a search template", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/search-templates", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-template-api.html" + }, + "operationId": "search-template-3", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "If `true`, the response includes additional details about score computation as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled.", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "profile", + "description": "If `true`, the query execution is profiled.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll", + "description": "Specifies how long a consistent view of the index\nshould be maintained for scrolled search.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "The type of the search operation.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "rest_total_hits_as_int", + "description": "If `true`, `hits.total` is rendered as an integer in the response.\nIf `false`, it is rendered as an object.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 7.0.0", + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "explain": { + "description": "If `true`, returns detailed information about score calculation as part of each hit.\nIf you specify both this and the `explain` query parameter, the API uses only the query parameter.", + "default": false, + "type": "boolean" + }, + "id": { + "description": "The ID of the search template to use. If no `source` is specified,\nthis parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "profile": { + "description": "If `true`, the query execution is profiled.", + "default": false, + "type": "boolean" + }, + "source": { + "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + }, + "examples": { + "SearchTemplateRequestExample1": { + "description": "Run `GET my-index/_search/template` to run a search with a search template.\n", + "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" + } + }, + "_clusters": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "max_score": { + "type": "number" + }, + "num_reduce_phases": { + "type": "number" + }, + "profile": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Profile" + } + ] + }, + "pit_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_scroll_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] + }, + "suggest": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Suggest" + } + } + }, + "terminated_early": { + "type": "boolean" + } + }, + "required": [ + "took", + "timed_out", + "_shards", + "hits" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 2.0.0", + "x-variations": [ + "
\n GET\n /{index}/_search/template\n
\n ", + "
\n POST\n /{index}/_search/template\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "search_template", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_searchable_snapshots/cache/stats": { + "get": { + "tags": [ + "searchable_snapshots" + ], + "summary": "Get cache statistics", + "description": "Get statistics about the shared cache for partially mounted indices.", + "externalDocs": { + "description": "Searchable snapshots", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/searchable-snapshots-api-cache-stats.html" + }, + "operationId": "searchable-snapshots-cache-stats", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/searchable_snapshots.cache_stats.Node" + } + } + }, + "required": [ + "nodes" + ] + }, + "examples": { + "CacheStatsResponseExample1": { + "description": "A successful response from `GET /_searchable_snapshots/cache/stats`.", + "value": "{\n \"nodes\" : {\n \"eerrtBMtQEisohZzxBLUSw\" : {\n \"shared_cache\" : {\n \"reads\" : 6051, // The number of cache region read operations. If reads > writes, the difference represents requests successfully served from the cache without accessing the snapshot repository.\n \"bytes_read_in_bytes\" : 5448829,\n \"writes\" : 37, // The number of cache region write operations. If reads == writes, every request required fetching data from the snapshot repository into the cache.\n \"bytes_written_in_bytes\" : 1208320,\n \"evictions\" : 5, // The number of cache region evictions. A low eviction count indicates the cache is effectively serving requests. Use this metric to evaluate cache sizing.\n \"num_regions\" : 65536,\n \"size_in_bytes\" : 1099511627776,\n \"region_size_in_bytes\" : 16777216 // The size of each cache region. A region is a contiguous byte range stored on local disk.\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_searchable_snapshots/cache/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "cache_stats.searchable_snapshots", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_searchable_snapshots/{node_id}/cache/stats": { + "get": { + "tags": [ + "searchable_snapshots" + ], + "summary": "Get cache statistics", + "description": "Get statistics about the shared cache for partially mounted indices.", + "externalDocs": { + "description": "Searchable snapshots", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/searchable-snapshots-api-cache-stats.html" + }, + "operationId": "searchable-snapshots-cache-stats-1", + "parameters": [ + { + "in": "path", + "name": "node_id", + "description": "The names of the nodes in the cluster to target.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/searchable_snapshots.cache_stats.Node" + } + } + }, + "required": [ + "nodes" + ] + }, + "examples": { + "CacheStatsResponseExample1": { + "description": "A successful response from `GET /_searchable_snapshots/cache/stats`.", + "value": "{\n \"nodes\" : {\n \"eerrtBMtQEisohZzxBLUSw\" : {\n \"shared_cache\" : {\n \"reads\" : 6051, // The number of cache region read operations. If reads > writes, the difference represents requests successfully served from the cache without accessing the snapshot repository.\n \"bytes_read_in_bytes\" : 5448829,\n \"writes\" : 37, // The number of cache region write operations. If reads == writes, every request required fetching data from the snapshot repository into the cache.\n \"bytes_written_in_bytes\" : 1208320,\n \"evictions\" : 5, // The number of cache region evictions. A low eviction count indicates the cache is effectively serving requests. Use this metric to evaluate cache sizing.\n \"num_regions\" : 65536,\n \"size_in_bytes\" : 1099511627776,\n \"region_size_in_bytes\" : 16777216 // The size of each cache region. A region is a contiguous byte range stored on local disk.\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_searchable_snapshots/{node_id}/cache/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "cache_stats.searchable_snapshots", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_searchable_snapshots/cache/clear": { + "post": { + "tags": [ + "searchable_snapshots" + ], + "summary": "Clear the cache", + "description": "Clear indices and data streams from the shared cache for partially mounted indices.", + "externalDocs": { + "description": "Searchable snapshots", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/searchable-snapshots-api-clear-cache.html" + }, + "operationId": "searchable-snapshots-clear-cache", + "parameters": [ + { + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Technical preview; Added in 7.10.0", + "x-variations": [ + "
\n POST\n /_searchable_snapshots/cache/clear\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage`\n" + ], + "x-api": "clear_cache.searchable_snapshots", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_searchable_snapshots/cache/clear": { + "post": { + "tags": [ + "searchable_snapshots" + ], + "summary": "Clear the cache", + "description": "Clear indices and data streams from the shared cache for partially mounted indices.", + "externalDocs": { + "description": "Searchable snapshots", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/searchable-snapshots-api-clear-cache.html" + }, + "operationId": "searchable-snapshots-clear-cache-1", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to clear from the cache.\nIt supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices.\n(This includes `_all` string or when no indices have been specified)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Technical preview; Added in 7.10.0", + "x-variations": [ + "
\n POST\n /{index}/_searchable_snapshots/cache/clear\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage`\n" + ], + "x-api": "clear_cache.searchable_snapshots", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/{snapshot}/_mount": { + "post": { + "tags": [ + "searchable_snapshots" + ], + "summary": "Mount a snapshot", + "description": "Mount a snapshot as a searchable snapshot index.\nDo not use this API for snapshots managed by index lifecycle management (ILM).\nManually mounting ILM-managed snapshots can interfere with ILM processes.", + "operationId": "searchable-snapshots-mount", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the repository containing the snapshot of the index to mount.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "snapshot", + "description": "The name of the snapshot of the index to mount.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If true, the request blocks until the operation is complete.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "storage", + "description": "The mount option for the searchable snapshot index.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index": { + "description": "The name of the index contained in the snapshot whose data is to be mounted.\nIf no `renamed_index` is specified, this name will also be used to create the new index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "renamed_index": { + "description": "The name of the index that will be created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "index_settings": { + "description": "The settings that should be added to the index when it is mounted.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "ignore_index_settings": { + "description": "The names of settings that should be removed from the index when it is mounted.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "index" + ] + }, + "examples": { + "SearchableSnapshotsMountSnapshotRequestExample1": { + "description": "Run `POST /_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true` to mount the index `my_docs` from an existing snapshot named `my_snapshot` stored in `my_repository` as a new index `docs`.\n", + "value": "{\n \"index\": \"my_docs\",\n \"renamed_index\": \"docs\",\n \"index_settings\": {\n \"index.number_of_replicas\": 0\n },\n \"ignore_index_settings\": [ \"index.refresh_interval\" ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "allOf": [ + { + "$ref": "#/components/schemas/searchable_snapshots.mount.MountedSnapshot" + } + ] + } + }, + "required": [ + "snapshot" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n POST\n /_snapshot/{repository}/{snapshot}/_mount\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage`\n" + ], + "x-api": "mount.searchable_snapshots", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_searchable_snapshots/stats": { + "get": { + "tags": [ + "searchable_snapshots" + ], + "summary": "Get searchable snapshot statistics", + "operationId": "searchable-snapshots-stats", + "parameters": [ + { + "in": "query", + "name": "level", + "description": "Return stats aggregated at cluster, index or shard level", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/searchable_snapshots._types.StatsLevel" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "type": "object" + }, + "total": { + "type": "object" + } + }, + "required": [ + "stats", + "total" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n GET\n /_searchable_snapshots/stats\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage`\n" + ], + "x-api": "stats.searchable_snapshots", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_searchable_snapshots/stats": { + "get": { + "tags": [ + "searchable_snapshots" + ], + "summary": "Get searchable snapshot statistics", + "operationId": "searchable-snapshots-stats-1", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams and indices to retrieve statistics for.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "level", + "description": "Return stats aggregated at cluster, index or shard level", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/searchable_snapshots._types.StatsLevel" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "type": "object" + }, + "total": { + "type": "object" + } + }, + "required": [ + "stats", + "total" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n GET\n /{index}/_searchable_snapshots/stats\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage`\n" + ], + "x-api": "stats.searchable_snapshots", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/profile/_activate": { + "post": { + "tags": [ + "security" + ], + "summary": "Activate a user profile", + "description": "Create or update a user profile on behalf of another user.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nThe calling application must have either an `access_token` or a combination of `username` and `password` for the user that the profile document is intended for.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nThis API creates or updates a profile document for end users with information that is extracted from the user's authentication object including `username`, `full_name,` `roles`, and the authentication realm.\nFor example, in the JWT `access_token` case, the profile user's `username` is extracted from the JWT token claim pointed to by the `claims.principal` setting of the JWT realm that authenticated the token.\n\nWhen updating a profile document, the API enables the document if it was disabled.\nAny updates do not change existing content for either the `labels` or `data` fields.", + "operationId": "security-activate-user-profile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "description": "The user's Elasticsearch access token or JWT.\nBoth `access` and `id` JWT token types are supported and they depend on the underlying JWT realm configuration.\nIf you specify the `access_token` grant type, this parameter is required.\nIt is not valid with other grant types.", + "type": "string" + }, + "grant_type": { + "description": "The type of grant.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.GrantType" + } + ] + }, + "password": { + "description": "The user's password.\nIf you specify the `password` grant type, this parameter is required.\nIt is not valid with other grant types.", + "type": "string" + }, + "username": { + "description": "The username that identifies the user.\nIf you specify the `password` grant type, this parameter is required.\nIt is not valid with other grant types.", + "type": "string" + } + }, + "required": [ + "grant_type" + ] + }, + "examples": { + "ActivateUserProfileRequestExample1": { + "description": "Run `POST /_security/profile/_activate` to activate a user profile.\n", + "value": "{\n \"grant_type\": \"password\",\n \"username\" : \"jacknich\",\n \"password\" : \"l0ng-r4nd0m-p@ssw0rd\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/security._types.UserProfileWithMetadata" + }, + "examples": { + "ActivateUserProfileResponseExample1": { + "description": "A successful response from `POST /_security/profile/_activate`.", + "value": "{\n \"uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n \"enabled\": true,\n \"last_synchronized\": 1642650651037,\n \"user\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"realm_name\": \"native\",\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\"\n },\n \"labels\": {},\n \"data\": {},\n \"_doc\": {\n \"_primary_term\": 88,\n \"_seq_no\": 66\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n POST\n /_security/profile/_activate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_user_profile`\n" + ], + "x-api": "activate_user_profile.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/_authenticate": { + "get": { + "tags": [ + "security" + ], + "summary": "Authenticate a user", + "description": "Authenticates a user and returns information about the authenticated user.\nInclude the user information in a [basic auth header](https://en.wikipedia.org/wiki/Basic_access_authentication).\nA successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user.\nIf the user cannot be authenticated, this API returns a 401 status code.", + "operationId": "security-authenticate", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_key": { + "allOf": [ + { + "$ref": "#/components/schemas/security.authenticate.AuthenticateApiKey" + } + ] + }, + "authentication_realm": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RealmInfo" + } + ] + }, + "email": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "full_name": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Name" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "lookup_realm": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RealmInfo" + } + ] + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "authentication_type": { + "type": "string" + }, + "token": { + "x-state": "Generally available; Added in 7.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/security.authenticate.Token" + } + ] + } + }, + "required": [ + "authentication_realm", + "lookup_realm", + "metadata", + "roles", + "username", + "enabled", + "authentication_type" + ] + }, + "examples": { + "SecurityAuthenticateResponseExample1": { + "description": "A successful response from `GET /_security/_authenticate`.", + "value": "{\n \"username\": \"rdeniro\",\n \"roles\": [\n \"admin\"\n ],\n \"full_name\": null,\n \"email\": null,\n \"metadata\": { },\n \"enabled\": true,\n \"authentication_realm\": {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"lookup_realm\": {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"authentication_type\": \"realm\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_security/_authenticate\n
\n " + ], + "x-api": "authenticate.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/role": { + "get": { + "tags": [ + "security" + ], + "summary": "Get roles", + "description": "Get roles in the native realm.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe get roles API cannot retrieve roles that are defined in roles files.", + "operationId": "security-get-role-1", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.get_role.Role" + } + }, + "examples": { + "SecurityGetRoleResponseExample1": { + "description": "A successful response from `GET /_security/role/my_admin_role`. The response contains information about the `my_admin_role` role in the native realm.\n", + "value": "{\n \"my_admin_role\": {\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\" : [ \"all\" ],\n \"indices\" : [\n {\n \"names\" : [ \"index1\", \"index2\" ],\n \"privileges\" : [ \"all\" ],\n \"allow_restricted_indices\" : false,\n \"field_security\" : {\n \"grant\" : [ \"title\", \"body\" ]}\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ \"other_user\" ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_security/role\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Bulk create or update roles", + "description": "The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe bulk create or update roles API cannot update roles that are defined in roles files.", + "operationId": "security-bulk-put-role", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "roles": { + "description": "A dictionary of role name to RoleDescriptor objects to add or update", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" + } + } + }, + "required": [ + "roles" + ] + }, + "examples": { + "SecurityBulkPutRoleRequestExample1": { + "summary": "Bulk role success", + "description": "Run `POST /_security/role` to add roles called `my_admin_role` and `my_user_role`.\n", + "value": "{\n \"roles\": {\n \"my_admin_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n }\n}" + }, + "SecurityBulkPutRoleRequestExample2": { + "summary": "Bulk role errors", + "description": "Because errors are handled individually for each role create or update, the API allows partial success. For example, `POST /_security/role` would throw an error for `my_admin_role` because the privilege `bad_cluster_privilege` doesn't exist, but would be successful for the `my_user_role`.\n", + "value": "{\n \"roles\": {\n \"my_admin_role\": {\n \"cluster\": [\n \"bad_cluster_privilege\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\"all\"],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n }\n}" + }, + "SecurityBulkPutRoleRequestExample3": { + "summary": "Role example 3", + "description": "Run `POST /_security/role/only_remote_access_role` to configure a role with remote indices and remote cluster privileges for a remote cluster.", + "value": "{\n \"remote_indices\": [\n {\n \"clusters\": [\"my_remote\"], \n \"names\": [\"logs*\"], \n \"privileges\": [\"read\", \"read_cross_cluster\", \"view_index_metadata\"] \n }\n ],\n \"remote_cluster\": [\n {\n \"clusters\": [\"my_remote\"], \n \"privileges\": [\"monitor_stats\"] \n }\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "description": "Array of created roles", + "type": "array", + "items": { + "type": "string" + } + }, + "updated": { + "description": "Array of updated roles", + "type": "array", + "items": { + "type": "string" + } + }, + "noop": { + "description": "Array of role names without any changes", + "type": "array", + "items": { + "type": "string" + } + }, + "errors": { + "description": "Present if any updates resulted in errors", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.BulkError" + } + ] + } + } + }, + "examples": { + "SecurityBulkPutRoleResponseExample1": { + "summary": "A successful response", + "description": "A successful response from `POST /_security/role/my_admin_role` returns a JSON structure that shows whether the role has been created, updated, or had no changes made.\n", + "value": "{\n \"created\": [ \n \"my_admin_role\", \n \"my_user_role\"\n ]\n}" + }, + "SecurityBulkPutRoleResponseExample2": { + "summary": "A partially successful response", + "description": "A partially successful response from `POST /_security/role`. Errors are handled individually for each role create or update, thus the API allows partial success. In this example, the creation of the `my_user_role` role succeeds and the `my_admin_role` role fails.\n", + "value": "{\n \"created\": [\n \"my_user_role\" \n ],\n \"errors\": { \n \"count\": 1, \n \"details\": {\n \"my_admin_role\": { \n \"type\": \"action_request_validation_exception\",\n \"reason\": \"Validation Failed: 1: unknown cluster privilege [bad_cluster_privilege]. a privilege must be either one of the predefined cluster privilege names [manage_own_api_key,manage_data_stream_global_retention,monitor_data_stream_global_retention,none,cancel_task,cross_cluster_replication,cross_cluster_search,delegate_pki,grant_api_key,manage_autoscaling,manage_index_templates,manage_logstash_pipelines,manage_oidc,manage_saml,manage_search_application,manage_search_query_rules,manage_search_synonyms,manage_service_account,manage_token,manage_user_profile,monitor_connector,monitor_enrich,monitor_inference,monitor_ml,monitor_rollup,monitor_snapshot,monitor_stats,monitor_text_structure,monitor_watcher,post_behavioral_analytics_event,read_ccr,read_connector_secrets,read_fleet_secrets,read_ilm,read_pipeline,read_security,read_slm,transport_client,write_connector_secrets,write_fleet_secrets,create_snapshot,manage_behavioral_analytics,manage_ccr,manage_connector,manage_enrich,manage_ilm,manage_inference,manage_ml,manage_rollup,manage_slm,manage_watcher,monitor_data_frame_transforms,monitor_transform,manage_api_key,manage_ingest_pipelines,manage_pipeline,manage_data_frame_transforms,manage_transform,manage_security,monitor,manage,all] or a pattern over one of the available cluster actions;\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n POST\n /_security/role\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "bulk_put_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "security" + ], + "summary": "Bulk delete roles", + "description": "The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe bulk delete roles API cannot delete roles that are defined in roles files.", + "operationId": "security-bulk-delete-role", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "names": { + "description": "An array of role names to delete", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "names" + ] + }, + "examples": { + "SecurityBulkDeleteRoleRequestExample1": { + "summary": "Bulk delete example 1", + "description": "Run DELETE /_security/role` to delete `my_admin_role` and `my_user_role` roles.\n", + "value": "{\n \"names\": [\"my_admin_role\", \"my_user_role\"]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleted": { + "description": "Array of deleted roles", + "type": "array", + "items": { + "type": "string" + } + }, + "not_found": { + "description": "Array of roles that could not be found", + "type": "array", + "items": { + "type": "string" + } + }, + "errors": { + "description": "Present if any deletes resulted in errors", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.BulkError" + } + ] + } + } + }, + "examples": { + "SecurityBulkDeleteRoleResponseExample1": { + "summary": "A successful response", + "description": "A successful response from `DELETE /_security/role`.", + "value": "{\n \"deleted\": [\n \"my_admin_role\",\n \"my_user_role\"\n ]\n}" + }, + "SecurityBulkDeleteRoleResponseExample2": { + "summary": "A response with not_found roles", + "description": "A partially successful response from `DELETE /_security/role`. If a role cannot be found, it appears in the `not_found` list in the response.\n", + "value": "{\n \"deleted\": [\n \"my_admin_role\"\n ],\n \"not_found\": [\n \"not_an_existing_role\"\n ]\n}" + }, + "SecurityBulkDeleteRoleResponseExample3": { + "summary": "A response with errors", + "description": "A partially successful response from `DELETE /_security/role`. If part of a request fails or is invalid, the response includes `errors`.\n", + "value": "{\n \"deleted\": [\n \"my_admin_role\"\n ],\n \"errors\": {\n \"count\": 1,\n \"details\": {\n \"superuser\": {\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"role [superuser] is reserved and cannot be deleted\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n DELETE\n /_security/role\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "bulk_delete_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/api_key/_bulk_update": { + "post": { + "tags": [ + "security" + ], + "summary": "Bulk update API keys", + "description": "Update the attributes for multiple API keys.\n\nIMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required.\n\nThis API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates.\n\nIt is not possible to update expired or invalidated API keys.\n\nThis API supports updates to API key access scope, metadata and expiration.\nThe access scope of each API key is derived from the `role_descriptors` you specify in the request and a snapshot of the owner user's permissions at the time of the request.\nThe snapshot of the owner's permissions is updated automatically on every call.\n\nIMPORTANT: If you don't specify `role_descriptors` in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified.\n\nA successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update.", + "operationId": "security-bulk-update-api-keys", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expiration": { + "description": "Expiration time for the API keys.\nBy default, API keys never expire.\nThis property can be omitted to leave the value unchanged.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "ids": { + "description": "The API key identifiers.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "metadata": { + "description": "Arbitrary nested metadata to associate with the API keys.\nWithin the `metadata` object, top-level keys beginning with an underscore (`_`) are reserved for system usage.\nAny information specified with this parameter fully replaces metadata previously associated with the API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "role_descriptors": { + "description": "The role descriptors to assign to the API keys.\nAn API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of permissions of the owner user.\nYou can assign new privileges by specifying them in this parameter.\nTo remove assigned privileges, supply the `role_descriptors` parameter as an empty object `{}`.\nIf an API key has no assigned privileges, it inherits the owner user's full permissions.\nThe snapshot of the owner's permissions is always updated, whether you supply the `role_descriptors` parameter.\nThe structure of a role descriptor is the same as the request for the create API keys API.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" + } + } + }, + "required": [ + "ids" + ] + }, + "examples": { + "SecurityBulkUpdateApiKeysRequestExample1": { + "description": "Assign new role descriptors and metadata and update the expiration time for two API keys.", + "value": "{\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\n \"production\"\n ]\n }\n },\n \"expiration\": \"30d\"\n}" + }, + "SecurityBulkUpdateApiKeysRequestExample2": { + "description": "Remove the previously assigned permissions for two API keys, making them inherit the owner user's full permissions.", + "value": "{\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"role_descriptors\": {}\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.BulkError" + } + ] + }, + "noops": { + "type": "array", + "items": { + "type": "string" + } + }, + "updated": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "noops", + "updated" + ] + }, + "examples": { + "SecurityBulkUpdateApiKeysResponseExample1": { + "description": "A successful response from updating two API keys.", + "value": "{\n \"updated\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"noops\": []\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.5.0", + "x-variations": [ + "
\n POST\n /_security/api_key/_bulk_update\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_own_api_key`\n" + ], + "x-api": "bulk_update_api_keys.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user/{username}/_password": { + "put": { + "tags": [ + "security" + ], + "summary": "Change passwords", + "description": "Change the passwords of users in the native realm and built-in users.", + "operationId": "security-change-password", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "The user whose password you want to change. If you do not specify this\nparameter, the password is changed for the current user.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "description": "The new password value. Passwords must be at least 6 characters long.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "password_hash": { + "description": "A hash of the new password value. This must be produced using the same\nhashing algorithm as has been configured for password storage. For more details,\nsee the explanation of the `xpack.security.authc.password_hashing.algorithm`\nsetting.", + "type": "string" + } + } + }, + "examples": { + "SecurityChangePasswordRequestExample1": { + "description": "Run `POST /_security/user/jacknich/_password` to update the password for the `jacknich` user.\n", + "value": "{\n \"password\" : \"new-test-password\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/{username}/_password\n
\n ", + "
\n POST\n /_security/user/{username}/_password\n
\n " + ], + "x-api": "change_password.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Change passwords", + "description": "Change the passwords of users in the native realm and built-in users.", + "operationId": "security-change-password-1", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "The user whose password you want to change. If you do not specify this\nparameter, the password is changed for the current user.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "description": "The new password value. Passwords must be at least 6 characters long.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "password_hash": { + "description": "A hash of the new password value. This must be produced using the same\nhashing algorithm as has been configured for password storage. For more details,\nsee the explanation of the `xpack.security.authc.password_hashing.algorithm`\nsetting.", + "type": "string" + } + } + }, + "examples": { + "SecurityChangePasswordRequestExample1": { + "description": "Run `POST /_security/user/jacknich/_password` to update the password for the `jacknich` user.\n", + "value": "{\n \"password\" : \"new-test-password\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/{username}/_password\n
\n ", + "
\n POST\n /_security/user/{username}/_password\n
\n " + ], + "x-api": "change_password.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user/_password": { + "put": { + "tags": [ + "security" + ], + "summary": "Change passwords", + "description": "Change the passwords of users in the native realm and built-in users.", + "operationId": "security-change-password-2", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "description": "The new password value. Passwords must be at least 6 characters long.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "password_hash": { + "description": "A hash of the new password value. This must be produced using the same\nhashing algorithm as has been configured for password storage. For more details,\nsee the explanation of the `xpack.security.authc.password_hashing.algorithm`\nsetting.", + "type": "string" + } + } + }, + "examples": { + "SecurityChangePasswordRequestExample1": { + "description": "Run `POST /_security/user/jacknich/_password` to update the password for the `jacknich` user.\n", + "value": "{\n \"password\" : \"new-test-password\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/_password\n
\n ", + "
\n POST\n /_security/user/_password\n
\n " + ], + "x-api": "change_password.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Change passwords", + "description": "Change the passwords of users in the native realm and built-in users.", + "operationId": "security-change-password-3", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "description": "The new password value. Passwords must be at least 6 characters long.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "password_hash": { + "description": "A hash of the new password value. This must be produced using the same\nhashing algorithm as has been configured for password storage. For more details,\nsee the explanation of the `xpack.security.authc.password_hashing.algorithm`\nsetting.", + "type": "string" + } + } + }, + "examples": { + "SecurityChangePasswordRequestExample1": { + "description": "Run `POST /_security/user/jacknich/_password` to update the password for the `jacknich` user.\n", + "value": "{\n \"password\" : \"new-test-password\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/_password\n
\n ", + "
\n POST\n /_security/user/_password\n
\n " + ], + "x-api": "change_password.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/api_key/{ids}/_clear_cache": { + "post": { + "tags": [ + "security" + ], + "summary": "Clear the API key cache", + "description": "Evict a subset of all entries from the API key cache.\nThe cache is also automatically cleared on state changes of the security index.", + "operationId": "security-clear-api-key-cache", + "parameters": [ + { + "in": "path", + "name": "ids", + "description": "Comma-separated list of API key IDs to evict from the API key cache.\nTo evict all API keys, use `*`.\nDoes not support other wildcard patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Ids" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.ClusterNode" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n POST\n /_security/api_key/{ids}/_clear_cache\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "clear_api_key_cache.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/privilege/{application}/_clear_cache": { + "post": { + "tags": [ + "security" + ], + "summary": "Clear the privileges cache", + "description": "Evict privileges from the native application privilege cache.\nThe cache is also automatically cleared for applications that have their privileges updated.", + "operationId": "security-clear-cached-privileges", + "parameters": [ + { + "in": "path", + "name": "application", + "description": "A comma-separated list of applications.\nTo clear all applications, use an asterism (`*`).\nIt does not support other wildcard patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.ClusterNode" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n POST\n /_security/privilege/{application}/_clear_cache\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "clear_cached_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/realm/{realms}/_clear_cache": { + "post": { + "tags": [ + "security" + ], + "summary": "Clear the user cache", + "description": "Evict users from the user cache.\nYou can completely clear the cache or evict specific users.\n\nUser credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request.\nThere are realm settings that you can use to configure the user cache.\nFor more information, refer to the documentation about controlling the user cache.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-user-cache", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-clear-cache.html" + }, + "operationId": "security-clear-cached-realms", + "parameters": [ + { + "in": "path", + "name": "realms", + "description": "A comma-separated list of realms.\nTo clear all realms, use an asterisk (`*`).\nIt does not support other wildcard patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "usernames", + "description": "A comma-separated list of the users to clear from the cache.\nIf you do not specify this parameter, the API evicts all users from the user cache.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.ClusterNode" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_security/realm/{realms}/_clear_cache\n
\n " + ], + "x-api": "clear_cached_realms.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/role/{name}/_clear_cache": { + "post": { + "tags": [ + "security" + ], + "summary": "Clear the roles cache", + "description": "Evict roles from the native role cache.", + "operationId": "security-clear-cached-roles", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "A comma-separated list of roles to evict from the role cache.\nTo evict all roles, use an asterisk (`*`).\nIt does not support other wildcard patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.ClusterNode" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_security/role/{name}/_clear_cache\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "clear_cached_roles.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache": { + "post": { + "tags": [ + "security" + ], + "summary": "Clear service account token caches", + "description": "Evict a subset of all entries from the service account token caches.\nTwo separate caches exist for service account tokens: one cache for tokens backed by the `service_tokens` file, and another for tokens backed by the `.security` index.\nThis API clears matching entries from both caches.\n\nThe cache for service account tokens backed by the `.security` index is cleared automatically on state changes of the security index.\nThe cache for tokens backed by the `service_tokens` file is cleared automatically on file changes.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-clear-service-token-caches.html" + }, + "operationId": "security-clear-cached-service-tokens", + "parameters": [ + { + "in": "path", + "name": "namespace", + "description": "The namespace, which is a top-level grouping of service accounts.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Namespace" + }, + "style": "simple" + }, + { + "in": "path", + "name": "service", + "description": "The name of the service, which must be unique within its namespace.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Service" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "A comma-separated list of token names to evict from the service account token caches.\nUse a wildcard (`*`) to evict all tokens that belong to a service account.\nIt does not support other wildcard patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.ClusterNode" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "clear_cached_service_tokens.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/api_key": { + "get": { + "tags": [ + "security" + ], + "summary": "Get API key information", + "description": "Retrieves information for one or more API keys.\nNOTE: If you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.\nIf you have `read_security`, `manage_api_key` or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.", + "operationId": "security-get-api-key", + "parameters": [ + { + "in": "query", + "name": "id", + "description": "An API key id.\nThis parameter cannot be used with any of `name`, `realm_name` or `username`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "form" + }, + { + "in": "query", + "name": "name", + "description": "An API key name.\nThis parameter cannot be used with any of `id`, `realm_name` or `username`.\nIt supports prefix search with wildcard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "form" + }, + { + "in": "query", + "name": "owner", + "description": "A boolean flag that can be used to query API keys owned by the currently authenticated user.\nThe `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "realm_name", + "description": "The name of an authentication realm.\nThis parameter cannot be used with either `id` or `name` or when `owner` flag is set to `true`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "form" + }, + { + "in": "query", + "name": "username", + "description": "The username of a user.\nThis parameter cannot be used with either `id` or `name` or when `owner` flag is set to `true`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "form" + }, + { + "in": "query", + "name": "with_limited_by", + "description": "Return the snapshot of the owner user's role descriptors\nassociated with the API key. An API key's actual\npermission is the intersection of its assigned role\ndescriptors and the owner user's role descriptors.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.5.0", + "style": "form" + }, + { + "in": "query", + "name": "active_only", + "description": "A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as `owner` or `name`. If `active_only` is false, the response will include both active and inactive (expired or invalidated) keys.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.10.0", + "style": "form" + }, + { + "in": "query", + "name": "with_profile_uid", + "description": "Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.14.0", + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApiKey" + } + } + }, + "required": [ + "api_keys" + ] + }, + "examples": { + "SecurityGetApiKeyResponseExample1": { + "summary": "Get a key by ID", + "description": "A successful response from `GET /_security/api_key?id=VuaCfGcBCdbkQm-e5aOx&with_limited_by=true`.", + "value": "{\n \"api_keys\": [ \n {\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\", \n \"name\": \"my-api-key\", \n \"creation\": 1548550550158, \n \"expiration\": 1548551550158, \n \"invalidated\": false, \n \"username\": \"myuser\", \n \"realm\": \"native1\", \n \"realm_type\": \"native\",\n \"metadata\": { \n \"application\": \"myapp\"\n },\n \"role_descriptors\": { }, \n \"limited_by\": [ \n {\n \"role-power-user\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n ]\n }\n ]\n}" + }, + "SecurityGetApiKeyResponseExample2": { + "summary": "Get all keys for a user", + "description": "A successful response from `GET /_security/api_key?username=myuser&realm_name=native1`. The response contains all API keys for the user `myuser` in the `native1` realm.\n", + "value": "{\n \"api_keys\": [\n {\n \"id\": \"0GF5GXsBCXxz2eDxWwFN\",\n \"name\": \"hadoop_myuser_key\",\n \"creation\": 1548550550158,\n \"expiration\": 1548551550158,\n \"invalidated\": false,\n \"username\": \"myuser\",\n \"realm\": \"native1\",\n \"realm_type\": \"native\",\n \"metadata\": {\n \"application\": \"myapp\"\n },\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n },\n {\n \"id\": \"6wHJmcQpReKBa42EHV5SBw\",\n \"name\": \"api-key-name-2\",\n \"creation\": 1548550550158,\n \"invalidated\": false,\n \"username\": \"user-y\",\n \"realm\": \"realm-2\",\n \"metadata\": {},\n \"role_descriptors\": { }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.7.0", + "x-variations": [ + "
\n GET\n /_security/api_key\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_own_api_key`,`read_security`\n" + ], + "x-api": "get_api_key.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "security" + ], + "summary": "Create an API key", + "description": "Create an API key for access without requiring basic authentication.\n\nIMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges.\nIf you specify privileges, the API returns an error.\n\nA successful request returns a JSON structure that contains the API key, its unique id, and its name.\nIf applicable, it also returns expiration information for the API key in milliseconds.\n\nNOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.\n\nThe API keys are created by the Elasticsearch API key service, which is automatically enabled.\nTo configure or turn off the API key service, refer to API key service setting documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#api-key-service-settings", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-api-key.html" + }, + "operationId": "security-create-api-key", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expiration": { + "description": "The expiration time for the API key.\nBy default, API keys never expire.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "name": { + "description": "A name for the API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "role_descriptors": { + "externalDocs": { + "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role" + }, + "description": "An array of role descriptors for this API key.\nWhen it is not specified or it is an empty array, the API key will have a point in time snapshot of permissions of the authenticated user.\nIf you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the authenticated user's permissions thereby limiting the access scope for API keys.\nThe structure of role descriptor is the same as the request for the create role API.\nFor more details, refer to the create or update roles API.\n\nNOTE: Due to the way in which this permission intersection is calculated, it is not possible to create an API key that is a child of another API key, unless the derived key is created without any privileges.\nIn this case, you must explicitly specify a role descriptor with no privileges.\nThe derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" + } + }, + "metadata": { + "description": "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.", + "x-state": "Generally available; Added in 7.13.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + } + } + }, + "examples": { + "SecurityCreateApiKeyRequestExample1": { + "description": "Run `POST /_security/api_key` to create an API key. If `expiration` is not provided, the API keys do not expire. If `role_descriptors` is not provided, the permissions of the authenticated user are applied.\n", + "value": "{\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\", \n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_key": { + "description": "Generated API key.", + "type": "string" + }, + "expiration": { + "description": "Expiration in milliseconds for the API key.", + "type": "number" + }, + "id": { + "description": "Unique ID for this API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "name": { + "description": "Specifies the name for this API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "encoded": { + "description": "API key credentials which is the base64-encoding of\nthe UTF-8 representation of `id` and `api_key` joined\nby a colon (`:`).", + "x-state": "Generally available; Added in 7.16.0", + "type": "string" + } + }, + "required": [ + "api_key", + "id", + "name", + "encoded" + ] + }, + "examples": { + "SecurityCreateApiKeyResponseExample1": { + "description": "A successful response from `POST /_security/api_key`.", + "value": "{\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\", \n \"name\": \"my-api-key\",\n \"expiration\": 1544068612110, \n \"api_key\": \"ui2lp2axTNmsyakw9tvNnw\", \n \"encoded\": \"VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw==\" \n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.7.0", + "x-variations": [ + "
\n PUT\n /_security/api_key\n
\n ", + "
\n POST\n /_security/api_key\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_own_api_key`\n" + ], + "x-api": "create_api_key.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Create an API key", + "description": "Create an API key for access without requiring basic authentication.\n\nIMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges.\nIf you specify privileges, the API returns an error.\n\nA successful request returns a JSON structure that contains the API key, its unique id, and its name.\nIf applicable, it also returns expiration information for the API key in milliseconds.\n\nNOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.\n\nThe API keys are created by the Elasticsearch API key service, which is automatically enabled.\nTo configure or turn off the API key service, refer to API key service setting documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#api-key-service-settings", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-api-key.html" + }, + "operationId": "security-create-api-key-1", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expiration": { + "description": "The expiration time for the API key.\nBy default, API keys never expire.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "name": { + "description": "A name for the API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "role_descriptors": { + "externalDocs": { + "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role" + }, + "description": "An array of role descriptors for this API key.\nWhen it is not specified or it is an empty array, the API key will have a point in time snapshot of permissions of the authenticated user.\nIf you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the authenticated user's permissions thereby limiting the access scope for API keys.\nThe structure of role descriptor is the same as the request for the create role API.\nFor more details, refer to the create or update roles API.\n\nNOTE: Due to the way in which this permission intersection is calculated, it is not possible to create an API key that is a child of another API key, unless the derived key is created without any privileges.\nIn this case, you must explicitly specify a role descriptor with no privileges.\nThe derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" + } + }, + "metadata": { + "description": "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.", + "x-state": "Generally available; Added in 7.13.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + } + } + }, + "examples": { + "SecurityCreateApiKeyRequestExample1": { + "description": "Run `POST /_security/api_key` to create an API key. If `expiration` is not provided, the API keys do not expire. If `role_descriptors` is not provided, the permissions of the authenticated user are applied.\n", + "value": "{\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\", \n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_key": { + "description": "Generated API key.", + "type": "string" + }, + "expiration": { + "description": "Expiration in milliseconds for the API key.", + "type": "number" + }, + "id": { + "description": "Unique ID for this API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "name": { + "description": "Specifies the name for this API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "encoded": { + "description": "API key credentials which is the base64-encoding of\nthe UTF-8 representation of `id` and `api_key` joined\nby a colon (`:`).", + "x-state": "Generally available; Added in 7.16.0", + "type": "string" + } + }, + "required": [ + "api_key", + "id", + "name", + "encoded" + ] + }, + "examples": { + "SecurityCreateApiKeyResponseExample1": { + "description": "A successful response from `POST /_security/api_key`.", + "value": "{\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\", \n \"name\": \"my-api-key\",\n \"expiration\": 1544068612110, \n \"api_key\": \"ui2lp2axTNmsyakw9tvNnw\", \n \"encoded\": \"VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw==\" \n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.7.0", + "x-variations": [ + "
\n PUT\n /_security/api_key\n
\n ", + "
\n POST\n /_security/api_key\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_own_api_key`\n" + ], + "x-api": "create_api_key.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "security" + ], + "summary": "Invalidate API keys", + "description": "This API invalidates API keys created by the create API key or grant API key APIs.\nInvalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted.\n\nTo use this API, you must have at least the `manage_security`, `manage_api_key`, or `manage_own_api_key` cluster privileges.\nThe `manage_security` privilege allows deleting any API key, including both REST and cross cluster API keys.\nThe `manage_api_key` privilege allows deleting any REST API key, but not cross cluster API keys.\nThe `manage_own_api_key` only allows deleting REST API keys that are owned by the user.\nIn addition, with the `manage_own_api_key` privilege, an invalidation request must be issued in one of the three formats:\n\n- Set the parameter `owner=true`.\n- Or, set both `username` and `realm_name` to match the user's identity.\n- Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the `ids` field.", + "operationId": "security-invalidate-api-key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "ids": { + "description": "A list of API key ids.\nThis parameter cannot be used with any of `name`, `realm_name`, or `username`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "name": { + "description": "An API key name.\nThis parameter cannot be used with any of `ids`, `realm_name` or `username`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "owner": { + "description": "Query API keys owned by the currently authenticated user.\nThe `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones.\n\nNOTE: At least one of `ids`, `name`, `username`, and `realm_name` must be specified if `owner` is `false`.", + "default": false, + "type": "boolean" + }, + "realm_name": { + "description": "The name of an authentication realm.\nThis parameter cannot be used with either `ids` or `name`, or when `owner` flag is set to `true`.", + "type": "string" + }, + "username": { + "description": "The username of a user.\nThis parameter cannot be used with either `ids` or `name` or when `owner` flag is set to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } + } + }, + "examples": { + "SecurityInvalidateApiKeyRequestExample1": { + "summary": "API keys by ID", + "description": "Run `DELETE /_security/api_key` to invalidate the API keys identified by ID.", + "value": "{\n \"ids\" : [ \"VuaCfGcBCdbkQm-e5aOx\" ]\n}" + }, + "SecurityInvalidateApiKeyRequestExample2": { + "summary": "API keys by name", + "description": "Run `DELETE /_security/api_key` to invalidate the API keys identified by name.", + "value": "{\n \"name\" : \"my-api-key\"\n}" + }, + "SecurityInvalidateApiKeyRequestExample3": { + "summary": "API keys by realm", + "description": "Run `DELETE /_security/api_key` to invalidate all API keys for the `native1` realm.", + "value": "{\n \"realm_name\" : \"native1\"\n}" + }, + "SecurityInvalidateApiKeyRequestExample4": { + "summary": "API keys by user", + "description": "Run `DELETE /_security/api_key` to invalidate all API keys for the user `myuser` in all realms.", + "value": "{\n \"username\" : \"myuser\"\n}" + }, + "SecurityInvalidateApiKeyRequestExample5": { + "summary": "API keys by ID and owner", + "description": "Run `DELETE /_security/api_key` to invalidate the API keys identified by ID if they are owned by the currently authenticated user.", + "value": "{\n \"ids\" : [\"VuaCfGcBCdbkQm-e5aOx\"],\n \"owner\" : \"true\"\n}" + }, + "SecurityInvalidateApiKeyRequestExample6": { + "summary": "API keys by user and realm", + "description": "Run `DELETE /_security/api_key` to invalidate all API keys for the user `myuser` in the `native1` realm .", + "value": "{\n \"username\" : \"myuser\",\n \"realm_name\" : \"native1\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error_count": { + "description": "The number of errors that were encountered when invalidating the API keys.", + "type": "number" + }, + "error_details": { + "description": "Details about the errors.\nThis field is not present in the response when `error_count` is `0`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ErrorCause" + } + }, + "invalidated_api_keys": { + "description": "The IDs of the API keys that were invalidated as part of this request.", + "type": "array", + "items": { + "type": "string" + } + }, + "previously_invalidated_api_keys": { + "description": "The IDs of the API keys that were already invalidated.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "error_count", + "invalidated_api_keys", + "previously_invalidated_api_keys" + ] + }, + "examples": { + "SecurityInvalidateApiKeyResponseExample1": { + "description": "A successful response from `DELETE /_security/api_key`.\n", + "value": "{\n \"invalidated_api_keys\": [ \n \"api-key-id-1\"\n ],\n \"previously_invalidated_api_keys\": [ \n \"api-key-id-2\",\n \"api-key-id-3\"\n ],\n \"error_count\": 2, \n \"error_details\": [ \n {\n \"type\": \"exception\",\n \"reason\": \"error occurred while invalidating api keys\",\n \"caused_by\": {\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"invalid api key id\"\n }\n },\n {\n \"type\": \"exception\",\n \"reason\": \"error occurred while invalidating api keys\",\n \"caused_by\": {\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"invalid api key id\"\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.7.0", + "x-variations": [ + "
\n DELETE\n /_security/api_key\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_api_key`,`manage_own_api_key`\n" + ], + "x-api": "invalidate_api_key.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/cross_cluster/api_key": { + "post": { + "tags": [ + "security" + ], + "summary": "Create a cross-cluster API key", + "description": "Create an API key of the `cross_cluster` type for the API key based remote cluster access.\nA `cross_cluster` API key cannot be used to authenticate through the REST interface.\n\nIMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error.\n\nCross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled.\n\nNOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the `access` property.\n\nA successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds.\n\nBy default, API keys never expire. You can specify expiration information when you create the API keys.\n\nCross-cluster API keys can only be updated with the update cross-cluster API key API.\nAttempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-api-key", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-cross-cluster-api-key.html" + }, + "operationId": "security-create-cross-cluster-api-key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access": { + "description": "The access to be granted to this API key.\nThe access is composed of permissions for cross-cluster search and cross-cluster replication.\nAt least one of them must be specified.\n\nNOTE: No explicit privileges should be specified for either search or replication access.\nThe creation process automatically converts the access specification to a role descriptor which has relevant privileges assigned accordingly.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.Access" + } + ] + }, + "expiration": { + "description": "Expiration time for the API key.\nBy default, API keys never expire.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "metadata": { + "description": "Arbitrary metadata that you want to associate with the API key.\nIt supports nested data structure.\nWithin the metadata object, keys beginning with `_` are reserved for system usage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "name": { + "description": "Specifies the name for this API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "certificate_identity": { + "description": "The certificate identity to associate with this API key.\nThis field is used to restrict the API key to connections authenticated by a specific TLS certificate.\nThe value should match the certificate's distinguished name (DN) pattern.", + "type": "string" + } + }, + "required": [ + "access", + "name" + ] + }, + "examples": { + "CreateCrossClusterApiKeyRequestExample1": { + "description": "Run `POST /_security/cross_cluster/api_key` to create a cross-cluster API key.\n", + "value": "{\n \"name\": \"my-cross-cluster-api-key\",\n \"expiration\": \"1d\", \n \"access\": {\n \"search\": [ \n {\n \"names\": [\"logs*\"]\n }\n ],\n \"replication\": [ \n {\n \"names\": [\"archive*\"]\n }\n ]\n },\n \"metadata\": {\n \"description\": \"phase one\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_key": { + "description": "Generated API key.", + "type": "string" + }, + "expiration": { + "description": "Expiration in milliseconds for the API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "id": { + "description": "Unique ID for this API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "name": { + "description": "Specifies the name for this API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "encoded": { + "description": "API key credentials which is the base64-encoding of\nthe UTF-8 representation of `id` and `api_key` joined\nby a colon (`:`).", + "type": "string" + } + }, + "required": [ + "api_key", + "id", + "name", + "encoded" + ] + }, + "examples": { + "CreateCrossClusterApiKeyResponseExample1": { + "description": "A successful response from `POST /_security/service/elastic/fleet-server/credential/token`.\n", + "value": "{\n \"created\": true,\n \"token\": {\n \"name\": \"Jk5J1HgBuyBK5TpDrdo4\",\n \"value\": \"AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ\"\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_security/cross_cluster/api_key\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "create_cross_cluster_api_key.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/service/{namespace}/{service}/credential/token/{name}": { + "put": { + "tags": [ + "security" + ], + "summary": "Create a service account token", + "description": "Create a service accounts token for access without requiring basic authentication.\n\nNOTE: Service account tokens never expire.\nYou must actively delete them if they are no longer needed.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-service-token.html" + }, + "operationId": "security-create-service-token", + "parameters": [ + { + "in": "path", + "name": "namespace", + "description": "The name of the namespace, which is a top-level grouping of service accounts.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Namespace" + }, + "style": "simple" + }, + { + "in": "path", + "name": "service", + "description": "The name of the service.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Service" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "The name for the service account token.\nIf omitted, a random name will be generated.\n\nToken names must be at least one and no more than 256 characters.\nThey can contain alphanumeric characters (a-z, A-Z, 0-9), dashes (`-`), and underscores (`_`), but cannot begin with an underscore.\n\nNOTE: Token names must be unique in the context of the associated service account.\nThey must also be globally unique with their fully qualified names, which are comprised of the service account principal and token name, such as `//`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/security.create_service_token.Token" + } + ] + } + }, + "required": [ + "created", + "token" + ] + }, + "examples": { + "CreateServiceTokenRequestExample1": { + "description": "A successful response from `POST /_security/service/elastic/fleet-server/credential/token/token1`. The response includes the service account token, its name, and its secret value as a bearer token.\n", + "value": "{\n \"created\": true,\n \"token\": {\n \"name\": \"token1\",\n \"value\": \"AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ\" \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/service/{namespace}/{service}/credential/token/{name}\n
\n ", + "
\n POST\n /_security/service/{namespace}/{service}/credential/token/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_service_account`\n" + ], + "x-api": "create_service_token.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Create a service account token", + "description": "Create a service accounts token for access without requiring basic authentication.\n\nNOTE: Service account tokens never expire.\nYou must actively delete them if they are no longer needed.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-service-token.html" + }, + "operationId": "security-create-service-token-1", + "parameters": [ + { + "in": "path", + "name": "namespace", + "description": "The name of the namespace, which is a top-level grouping of service accounts.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Namespace" + }, + "style": "simple" + }, + { + "in": "path", + "name": "service", + "description": "The name of the service.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Service" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "The name for the service account token.\nIf omitted, a random name will be generated.\n\nToken names must be at least one and no more than 256 characters.\nThey can contain alphanumeric characters (a-z, A-Z, 0-9), dashes (`-`), and underscores (`_`), but cannot begin with an underscore.\n\nNOTE: Token names must be unique in the context of the associated service account.\nThey must also be globally unique with their fully qualified names, which are comprised of the service account principal and token name, such as `//`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/security.create_service_token.Token" + } + ] + } + }, + "required": [ + "created", + "token" + ] + }, + "examples": { + "CreateServiceTokenRequestExample1": { + "description": "A successful response from `POST /_security/service/elastic/fleet-server/credential/token/token1`. The response includes the service account token, its name, and its secret value as a bearer token.\n", + "value": "{\n \"created\": true,\n \"token\": {\n \"name\": \"token1\",\n \"value\": \"AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ\" \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/service/{namespace}/{service}/credential/token/{name}\n
\n ", + "
\n POST\n /_security/service/{namespace}/{service}/credential/token/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_service_account`\n" + ], + "x-api": "create_service_token.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "security" + ], + "summary": "Delete service account tokens", + "description": "Delete service account tokens for a service in a specified namespace.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delete-service-token.html" + }, + "operationId": "security-delete-service-token", + "parameters": [ + { + "in": "path", + "name": "namespace", + "description": "The namespace, which is a top-level grouping of service accounts.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Namespace" + }, + "style": "simple" + }, + { + "in": "path", + "name": "service", + "description": "The service name.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Service" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "The name of the service account token.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "description": "If the service account token is successfully deleted, the request returns `{\"found\": true}`.\nOtherwise, the response will have status code 404 and `found` is set to `false`.", + "type": "boolean" + } + }, + "required": [ + "found" + ] + }, + "examples": { + "DeleteServiceTokenResponseExample1": { + "description": "A successful response from `DELETE /_security/service/elastic/fleet-server/credential/token/token42`.\n", + "value": "{\n \"found\" : true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n DELETE\n /_security/service/{namespace}/{service}/credential/token/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_service_account`\n" + ], + "x-api": "delete_service_token.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/service/{namespace}/{service}/credential/token": { + "post": { + "tags": [ + "security" + ], + "summary": "Create a service account token", + "description": "Create a service accounts token for access without requiring basic authentication.\n\nNOTE: Service account tokens never expire.\nYou must actively delete them if they are no longer needed.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-service-token.html" + }, + "operationId": "security-create-service-token-2", + "parameters": [ + { + "in": "path", + "name": "namespace", + "description": "The name of the namespace, which is a top-level grouping of service accounts.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Namespace" + }, + "style": "simple" + }, + { + "in": "path", + "name": "service", + "description": "The name of the service.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Service" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/security.create_service_token.Token" + } + ] + } + }, + "required": [ + "created", + "token" + ] + }, + "examples": { + "CreateServiceTokenRequestExample1": { + "description": "A successful response from `POST /_security/service/elastic/fleet-server/credential/token/token1`. The response includes the service account token, its name, and its secret value as a bearer token.\n", + "value": "{\n \"created\": true,\n \"token\": {\n \"name\": \"token1\",\n \"value\": \"AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ\" \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_security/service/{namespace}/{service}/credential/token\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_service_account`\n" + ], + "x-api": "create_service_token.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/delegate_pki": { + "post": { + "tags": [ + "security" + ], + "summary": "Delegate PKI authentication", + "description": "This API implements the exchange of an X509Certificate chain for an Elasticsearch access token.\nThe certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has `delegation.enabled` set to `true`.\nA successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw `username_pattern` of the respective realm.\n\nThis API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch.\n\nIMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated.\nThis is part of the TLS authentication process and it is delegated to the proxy that calls this API.\nThe proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/pki", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delegate-pki-authentication.html" + }, + "operationId": "security-delegate-pki", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "x509_certificate_chain": { + "description": "The X509Certificate chain, which is represented as an ordered string array.\nEach string in the array is a base64-encoded (Section 4 of RFC4648 - not base64url-encoded) of the certificate's DER encoding.\n\nThe first element is the target certificate that contains the subject distinguished name that is requesting access.\nThis may be followed by additional certificates; each subsequent certificate is used to certify the previous one.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "x509_certificate_chain" + ] + }, + "examples": { + "SecurityDelegatePkiRequestExample1": { + "description": "Delegate a one element certificate chain.", + "value": "{\n\"x509_certificate_chain\": [\"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "description": "An access token associated with the subject distinguished name of the client's certificate.", + "type": "string" + }, + "expires_in": { + "description": "The amount of time (in seconds) before the token expires.", + "type": "number" + }, + "type": { + "description": "The type of token.", + "type": "string" + }, + "authentication": { + "allOf": [ + { + "$ref": "#/components/schemas/security.delegate_pki.Authentication" + } + ] + } + }, + "required": [ + "access_token", + "expires_in", + "type" + ] + }, + "examples": { + "SecurityDelegatePkiResponseExample1": { + "description": "A successful response from delegating a one element certificate chain.", + "value": "{\n \"access_token\": \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\": \"Bearer\",\n \"expires_in\": 1200,\n \"authentication\": {\n \"username\": \"Elasticsearch Test Client\",\n \"roles\": [],\n \"full_name\": null,\n \"email\": null,\n \"metadata\": {\n \"pki_dn\": \"O=org, OU=Elasticsearch, CN=Elasticsearch Test Client\",\n \"pki_delegated_by_user\": \"test_admin\",\n \"pki_delegated_by_realm\": \"file\"\n },\n \"enabled\": true,\n \"authentication_realm\": {\n \"name\": \"pki1\",\n \"type\": \"pki\"\n },\n \"lookup_realm\": {\n \"name\": \"pki1\",\n \"type\": \"pki\"\n },\n \"authentication_type\": \"realm\"\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n POST\n /_security/delegate_pki\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `all`\n" + ], + "x-api": "delegate_pki.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/privilege/{application}/{name}": { + "get": { + "tags": [ + "security" + ], + "summary": "Get application privileges", + "description": "To use this API, you must have one of the following privileges:\n\n* The `read_security` cluster privilege (or a greater privilege such as `manage_security` or `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-privileges.html" + }, + "operationId": "security-get-privileges-2", + "parameters": [ + { + "in": "path", + "name": "application", + "description": "The name of the application.\nApplication privileges are always associated with exactly one application.\nIf you do not specify this parameter, the API returns information about all privileges for all applications.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "The name of the privilege.\nIf you do not specify this parameter, the API returns information about all privileges for the requested application.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.put_privileges.Actions" + } + } + }, + "examples": { + "SecurityGetPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/privilege/myapp/read`. The response contains information about the `read` privilege for the `app01` application.\n", + "value": "{\n \"myapp\": {\n \"read\": {\n \"application\": \"myapp\",\n \"name\": \"read\",\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n GET\n /_security/privilege/{application}/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "security" + ], + "summary": "Delete application privileges", + "description": "To use this API, you must have one of the following privileges:\n\n* The `manage_security` cluster privilege (or a greater privilege such as `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delete-privilege.html" + }, + "operationId": "security-delete-privileges", + "parameters": [ + { + "in": "path", + "name": "application", + "description": "The name of the application.\nApplication privileges are always associated with exactly one application.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "The name of the privilege.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.delete_privileges.FoundStatus" + } + } + }, + "examples": { + "SecurityDeletePrivilegesResponseExample1": { + "description": "A successful response from `DELETE /_security/privilege/myapp/read`. If the privilege is successfully deleted, `found` is set to `true`.\n", + "value": "{\n \"myapp\": {\n \"read\": {\n \"found\" : true\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n DELETE\n /_security/privilege/{application}/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "delete_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/role/{name}": { + "get": { + "tags": [ + "security" + ], + "summary": "Get roles", + "description": "Get roles in the native realm.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe get roles API cannot retrieve roles that are defined in roles files.", + "operationId": "security-get-role", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the role.\nYou can specify multiple roles as a comma-separated list.\nIf you do not specify this parameter, the API returns information about all roles.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.get_role.Role" + } + }, + "examples": { + "SecurityGetRoleResponseExample1": { + "description": "A successful response from `GET /_security/role/my_admin_role`. The response contains information about the `my_admin_role` role in the native realm.\n", + "value": "{\n \"my_admin_role\": {\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\" : [ \"all\" ],\n \"indices\" : [\n {\n \"names\" : [ \"index1\", \"index2\" ],\n \"privileges\" : [ \"all\" ],\n \"allow_restricted_indices\" : false,\n \"field_security\" : {\n \"grant\" : [ \"title\", \"body\" ]}\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ \"other_user\" ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_security/role/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "security" + ], + "summary": "Create or update roles", + "description": "The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.\nThe create or update roles API cannot update roles that are defined in roles files.\nFile-based role management is not available in Elastic Serverless.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-role.html" + }, + "operationId": "security-put-role", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "applications": { + "description": "A list of application privilege entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApplicationPrivileges" + } + }, + "cluster": { + "description": "A list of cluster privileges. These privileges define the cluster-level actions for users with this role.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "global": { + "description": "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.", + "x-state": "Generally available", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "indices": { + "description": "A list of indices permissions entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndicesPrivileges" + } + }, + "remote_indices": { + "description": "A list of remote indices permissions entries.\n\nNOTE: Remote indices are effective for remote clusters configured with the API key based model.\nThey have no effect for remote clusters configured with the certificate based model.", + "x-state": "Generally available; Added in 8.14.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" + } + }, + "remote_cluster": { + "description": "A list of remote cluster permissions entries.", + "x-state": "Generally available; Added in 8.15.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" + } + }, + "metadata": { + "description": "Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "run_as": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users" + }, + "description": "A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "description": "Optional description of the role descriptor", + "type": "string" + }, + "transient_metadata": { + "description": "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.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "SecurityPutRoleRequestExample1": { + "summary": "Role example 1", + "description": "Run `POST /_security/role/my_admin_role` to create a role.", + "value": "{\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [ \"index1\", \"index2\" ],\n \"privileges\": [\"all\"],\n \"field_security\" : { // optional\n \"grant\" : [ \"title\", \"body\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\" // optional\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [ \"admin\", \"read\" ],\n \"resources\": [ \"*\" ]\n }\n ],\n \"run_as\": [ \"other_user\" ], // optional\n \"metadata\" : { // optional\n \"version\" : 1\n }\n}" + }, + "SecurityPutRoleRequestExample2": { + "summary": "Role example 2", + "description": "Run `POST /_security/role/cli_or_drivers_minimal` to configure a role that can run SQL in JDBC.", + "value": "{\n \"cluster\": [\"cluster:monitor/main\"],\n \"indices\": [\n {\n \"names\": [\"test\"],\n \"privileges\": [\"read\", \"indices:admin/get\"]\n }\n ]\n}" + }, + "SecurityPutRoleRequestExample3": { + "summary": "Role example 3", + "description": "Run `POST /_security/role/only_remote_access_role` to configure a role with remote indices and remote cluster privileges for a remote cluster.", + "value": "{\n \"remote_indices\": [\n {\n \"clusters\": [\"my_remote\"], \n \"names\": [\"logs*\"], \n \"privileges\": [\"read\", \"read_cross_cluster\", \"view_index_metadata\"] \n }\n ],\n \"remote_cluster\": [\n {\n \"clusters\": [\"my_remote\"], \n \"privileges\": [\"monitor_stats\"] \n }\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "description": "When an existing role is updated, `created` is set to `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.CreatedStatus" + } + ] + } + }, + "required": [ + "role" + ] + }, + "examples": { + "SecurityPutRoleResponseExample1": { + "description": "A successful response from `POST /_security/role/my_admin_role`.", + "value": "{\n \"role\": {\n \"created\": true \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/role/{name}\n
\n ", + "
\n POST\n /_security/role/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Create or update roles", + "description": "The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.\nThe create or update roles API cannot update roles that are defined in roles files.\nFile-based role management is not available in Elastic Serverless.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-role.html" + }, + "operationId": "security-put-role-1", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "applications": { + "description": "A list of application privilege entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApplicationPrivileges" + } + }, + "cluster": { + "description": "A list of cluster privileges. These privileges define the cluster-level actions for users with this role.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "global": { + "description": "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.", + "x-state": "Generally available", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "indices": { + "description": "A list of indices permissions entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndicesPrivileges" + } + }, + "remote_indices": { + "description": "A list of remote indices permissions entries.\n\nNOTE: Remote indices are effective for remote clusters configured with the API key based model.\nThey have no effect for remote clusters configured with the certificate based model.", + "x-state": "Generally available; Added in 8.14.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" + } + }, + "remote_cluster": { + "description": "A list of remote cluster permissions entries.", + "x-state": "Generally available; Added in 8.15.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" + } + }, + "metadata": { + "description": "Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "run_as": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users" + }, + "description": "A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "description": "Optional description of the role descriptor", + "type": "string" + }, + "transient_metadata": { + "description": "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.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "SecurityPutRoleRequestExample1": { + "summary": "Role example 1", + "description": "Run `POST /_security/role/my_admin_role` to create a role.", + "value": "{\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [ \"index1\", \"index2\" ],\n \"privileges\": [\"all\"],\n \"field_security\" : { // optional\n \"grant\" : [ \"title\", \"body\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\" // optional\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [ \"admin\", \"read\" ],\n \"resources\": [ \"*\" ]\n }\n ],\n \"run_as\": [ \"other_user\" ], // optional\n \"metadata\" : { // optional\n \"version\" : 1\n }\n}" + }, + "SecurityPutRoleRequestExample2": { + "summary": "Role example 2", + "description": "Run `POST /_security/role/cli_or_drivers_minimal` to configure a role that can run SQL in JDBC.", + "value": "{\n \"cluster\": [\"cluster:monitor/main\"],\n \"indices\": [\n {\n \"names\": [\"test\"],\n \"privileges\": [\"read\", \"indices:admin/get\"]\n }\n ]\n}" + }, + "SecurityPutRoleRequestExample3": { + "summary": "Role example 3", + "description": "Run `POST /_security/role/only_remote_access_role` to configure a role with remote indices and remote cluster privileges for a remote cluster.", + "value": "{\n \"remote_indices\": [\n {\n \"clusters\": [\"my_remote\"], \n \"names\": [\"logs*\"], \n \"privileges\": [\"read\", \"read_cross_cluster\", \"view_index_metadata\"] \n }\n ],\n \"remote_cluster\": [\n {\n \"clusters\": [\"my_remote\"], \n \"privileges\": [\"monitor_stats\"] \n }\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "description": "When an existing role is updated, `created` is set to `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.CreatedStatus" + } + ] + } + }, + "required": [ + "role" + ] + }, + "examples": { + "SecurityPutRoleResponseExample1": { + "description": "A successful response from `POST /_security/role/my_admin_role`.", + "value": "{\n \"role\": {\n \"created\": true \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/role/{name}\n
\n ", + "
\n POST\n /_security/role/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "security" + ], + "summary": "Delete roles", + "description": "Delete roles in the native realm.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe delete roles API cannot remove roles that are defined in roles files.", + "operationId": "security-delete-role", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of the role.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "description": "If the role is successfully deleted, `found` is `true`.\nOtherwise, `found` is `false`.", + "type": "boolean" + } + }, + "required": [ + "found" + ] + }, + "examples": { + "SecurityDeleteRoleResponseExample1": { + "description": "A successful response from `DELETE /_security/role/my_admin_role`. If the role is successfully deleted, `found` is set to `true`.\n", + "value": "{\n \"found\" : true\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_security/role/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "delete_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/role_mapping/{name}": { + "get": { + "tags": [ + "security" + ], + "summary": "Get role mappings", + "description": "Role mappings define which roles are assigned to each user.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.\nThe get role mappings API cannot retrieve role mappings that are defined in role mapping files.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-role-mapping.html" + }, + "operationId": "security-get-role-mapping", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "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 comma-separated list. If you do not specify this parameter, the API returns information about all role mappings.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleMapping" + } + }, + "examples": { + "SecurityGetRoleMappingResponseExample1": { + "description": "A successful response from `GET /_security/role_mapping/mapping1`.", + "value": "{\n \"mapping1\": {\n \"enabled\": true,\n \"roles\": [\n \"user\"\n ],\n \"rules\": {\n \"field\": {\n \"username\": \"*\"\n }\n },\n \"metadata\": {}\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_security/role_mapping/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "get_role_mapping.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "security" + ], + "summary": "Create or update role mappings", + "description": "Role mappings define which roles are assigned to each user.\nEach mapping has rules that identify users and a list of roles that are granted to those users.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.\n\nNOTE: This API does not create roles. Rather, it maps users to existing roles.\nRoles can be created by using the create or update roles API or roles files.\n\n**Role templates**\n\nThe most common use for role mappings is to create a mapping from a known value on the user to a fixed role name.\nFor example, all users in the `cn=admin,dc=example,dc=com` LDAP group should be given the superuser role in Elasticsearch.\nThe `roles` field is used for this purpose.\n\nFor more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user.\nThe `role_templates` field is used for this purpose.\n\nNOTE: To use role templates successfully, the relevant scripting feature must be enabled.\nOtherwise, all attempts to create a role mapping with role templates fail.\n\nAll of the user fields that are available in the role mapping rules are also available in the role templates.\nThus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated.\n\nBy default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user.\nIf the format of the template is set to \"json\" then the template is expected to produce a JSON string or an array of JSON strings for the role names.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-role-mapping.html" + }, + "operationId": "security-put-role-mapping", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The distinct name that identifies the role mapping.\nThe 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.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "description": "Mappings that have `enabled` set to `false` are ignored when role mapping is performed.", + "type": "boolean" + }, + "metadata": { + "description": "Additional metadata that helps define which roles are assigned to each user.\nWithin the metadata object, keys beginning with `_` are reserved for system usage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "roles": { + "description": "A list of role names that are granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", + "type": "array", + "items": { + "type": "string" + } + }, + "role_templates": { + "description": "A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RoleTemplate" + } + }, + "rules": { + "description": "The rules that determine which users should be matched by the mapping.\nA rule is a logical condition that is expressed by using a JSON DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleMappingRule" + } + ] + }, + "run_as": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "SecurityPutRoleMappingRequestExample1": { + "summary": "Roles for all users", + "description": "Run `POST /_security/role_mapping/mapping1` to assign the `user` role to all users.\n", + "value": "{\n \"roles\": [ \"user\"],\n \"enabled\": true, \n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { \n \"version\" : 1\n }\n}" + }, + "SecurityPutRoleMappingRequestExample2": { + "summary": "Roles for specific users", + "description": "Run `POST /_security/role_mapping/mapping2` to assign the \"user\" and \"admin\" roles to specific users.\n", + "value": "{\n \"roles\": [ \"user\", \"admin\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"username\" : [ \"esadmin01\", \"esadmin02\" ] }\n }\n}" + }, + "SecurityPutRoleMappingRequestExample3": { + "summary": "Roles for specific realms", + "description": "Run `POST /_security/role_mapping/mapping3` to match users who authenticated against a specific realm.\n", + "value": "{\n \"roles\": [ \"ldap-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"realm.name\" : \"ldap1\" }\n }\n}" + }, + "SecurityPutRoleMappingRequestExample4": { + "summary": "Roles for specific groups", + "description": "Run `POST /_security/role_mapping/mapping4` to match any user where either the username is `esadmin` or the user is in the `cn=admin,dc=example,dc=com group`. This example is useful when the group names in your identity management system (such as Active Directory, or a SAML Identity Provider) do not have a one-to-one correspondence with the names of roles in Elasticsearch. The role mapping is the means by which you link a group name with a role name.\n", + "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample5": { + "summary": "Roles for multiple groups", + "description": "Run `POST /_security/role_mapping/mapping5` to use an array syntax for the groups field when there are multiple groups. This pattern matches any of the groups (rather than all of the groups).\n", + "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" + }, + "SecurityPutRoleMappingRequestExample6": { + "summary": "Templated roles for groups", + "description": "Run `POST /_security/role_mapping/mapping6` for rare cases when the names of your groups may be an exact match for the names of your Elasticsearch roles. This can be the case when your SAML Identity Provider includes its own \"group mapping\" feature and can be configured to release Elasticsearch role names in the user's SAML attributes. In these cases it is possible to use a template that treats the group names as role names.\nNOTE: This should only be done if you intend to define roles for all of the provided groups. Mapping a user to a large number of unnecessary or undefined roles is inefficient and can have a negative effect on system performance. If you only need to map a subset of the groups, you should do it by using explicit mappings.\nThe `tojson` mustache function is used to convert the list of group names into a valid JSON array. Because the template produces a JSON array, the `format` must be set to `json`.\n", + "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" + }, + "SecurityPutRoleMappingRequestExample7": { + "summary": "Users in a LDAP sub-tree and realm", + "description": "Run `POST /_security/role_mapping/mapping7` to match users within a particular LDAP sub-tree in a specific realm.\n", + "value": "{\n \"roles\": [ \"ldap-example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n { \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" } },\n { \"field\" : { \"realm.name\" : \"ldap1\" } }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample8": { + "summary": "Complex roles", + "description": "Run `POST /_security/role_mapping/mapping8` to assign rules that are complex and include wildcard matching. For example, this mapping matches any user where all of these conditions are met: the Distinguished Name matches the pattern `*,ou=admin,dc=example,dc=com`, or the `username` is `es-admin`, or the `username` is `es-system`; the user is in the `cn=people,dc=example,dc=com` group; the user does not have a `terminated_date`.\n", + "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [ \"es-admin\", \"es-system\" ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": null\n }\n }\n }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample9": { + "summary": "Templated roles", + "description": "Run `POST /_security/role_mapping/mapping9` to use templated roles to automatically map every user to their own custom role. In this example every user who authenticates using the `cloud-saml` realm will be automatically mapped to two roles: the `saml_user` role and a role that is their username prefixed with `_user_`. For example, the user `nwong` would be assigned the `saml_user` and `_user_nwong` roles.\n", + "value": "{\n \"rules\": { \"field\": { \"realm.name\": \"cloud-saml\" } },\n \"role_templates\": [\n { \"template\": { \"source\" : \"saml_user\" } }, \n { \"template\": { \"source\" : \"_user_{{username}}\" } }\n ],\n \"enabled\": true\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "role_mapping": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.CreatedStatus" + } + ] + } + }, + "required": [ + "role_mapping" + ] + }, + "examples": { + "SecurityPutRoleMappingResponseExample1": { + "description": "A successful response from `POST /_security/role_mapping/mapping1`.", + "value": "{\n \"role_mapping\" : {\n \"created\" : true \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n PUT\n /_security/role_mapping/{name}\n
\n ", + "
\n POST\n /_security/role_mapping/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_role_mapping.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Create or update role mappings", + "description": "Role mappings define which roles are assigned to each user.\nEach mapping has rules that identify users and a list of roles that are granted to those users.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.\n\nNOTE: This API does not create roles. Rather, it maps users to existing roles.\nRoles can be created by using the create or update roles API or roles files.\n\n**Role templates**\n\nThe most common use for role mappings is to create a mapping from a known value on the user to a fixed role name.\nFor example, all users in the `cn=admin,dc=example,dc=com` LDAP group should be given the superuser role in Elasticsearch.\nThe `roles` field is used for this purpose.\n\nFor more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user.\nThe `role_templates` field is used for this purpose.\n\nNOTE: To use role templates successfully, the relevant scripting feature must be enabled.\nOtherwise, all attempts to create a role mapping with role templates fail.\n\nAll of the user fields that are available in the role mapping rules are also available in the role templates.\nThus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated.\n\nBy default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user.\nIf the format of the template is set to \"json\" then the template is expected to produce a JSON string or an array of JSON strings for the role names.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-role-mapping.html" + }, + "operationId": "security-put-role-mapping-1", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The distinct name that identifies the role mapping.\nThe 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.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "description": "Mappings that have `enabled` set to `false` are ignored when role mapping is performed.", + "type": "boolean" + }, + "metadata": { + "description": "Additional metadata that helps define which roles are assigned to each user.\nWithin the metadata object, keys beginning with `_` are reserved for system usage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "roles": { + "description": "A list of role names that are granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", + "type": "array", + "items": { + "type": "string" + } + }, + "role_templates": { + "description": "A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RoleTemplate" + } + }, + "rules": { + "description": "The rules that determine which users should be matched by the mapping.\nA rule is a logical condition that is expressed by using a JSON DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleMappingRule" + } + ] + }, + "run_as": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "SecurityPutRoleMappingRequestExample1": { + "summary": "Roles for all users", + "description": "Run `POST /_security/role_mapping/mapping1` to assign the `user` role to all users.\n", + "value": "{\n \"roles\": [ \"user\"],\n \"enabled\": true, \n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { \n \"version\" : 1\n }\n}" + }, + "SecurityPutRoleMappingRequestExample2": { + "summary": "Roles for specific users", + "description": "Run `POST /_security/role_mapping/mapping2` to assign the \"user\" and \"admin\" roles to specific users.\n", + "value": "{\n \"roles\": [ \"user\", \"admin\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"username\" : [ \"esadmin01\", \"esadmin02\" ] }\n }\n}" + }, + "SecurityPutRoleMappingRequestExample3": { + "summary": "Roles for specific realms", + "description": "Run `POST /_security/role_mapping/mapping3` to match users who authenticated against a specific realm.\n", + "value": "{\n \"roles\": [ \"ldap-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"realm.name\" : \"ldap1\" }\n }\n}" + }, + "SecurityPutRoleMappingRequestExample4": { + "summary": "Roles for specific groups", + "description": "Run `POST /_security/role_mapping/mapping4` to match any user where either the username is `esadmin` or the user is in the `cn=admin,dc=example,dc=com group`. This example is useful when the group names in your identity management system (such as Active Directory, or a SAML Identity Provider) do not have a one-to-one correspondence with the names of roles in Elasticsearch. The role mapping is the means by which you link a group name with a role name.\n", + "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample5": { + "summary": "Roles for multiple groups", + "description": "Run `POST /_security/role_mapping/mapping5` to use an array syntax for the groups field when there are multiple groups. This pattern matches any of the groups (rather than all of the groups).\n", + "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" + }, + "SecurityPutRoleMappingRequestExample6": { + "summary": "Templated roles for groups", + "description": "Run `POST /_security/role_mapping/mapping6` for rare cases when the names of your groups may be an exact match for the names of your Elasticsearch roles. This can be the case when your SAML Identity Provider includes its own \"group mapping\" feature and can be configured to release Elasticsearch role names in the user's SAML attributes. In these cases it is possible to use a template that treats the group names as role names.\nNOTE: This should only be done if you intend to define roles for all of the provided groups. Mapping a user to a large number of unnecessary or undefined roles is inefficient and can have a negative effect on system performance. If you only need to map a subset of the groups, you should do it by using explicit mappings.\nThe `tojson` mustache function is used to convert the list of group names into a valid JSON array. Because the template produces a JSON array, the `format` must be set to `json`.\n", + "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" + }, + "SecurityPutRoleMappingRequestExample7": { + "summary": "Users in a LDAP sub-tree and realm", + "description": "Run `POST /_security/role_mapping/mapping7` to match users within a particular LDAP sub-tree in a specific realm.\n", + "value": "{\n \"roles\": [ \"ldap-example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n { \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" } },\n { \"field\" : { \"realm.name\" : \"ldap1\" } }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample8": { + "summary": "Complex roles", + "description": "Run `POST /_security/role_mapping/mapping8` to assign rules that are complex and include wildcard matching. For example, this mapping matches any user where all of these conditions are met: the Distinguished Name matches the pattern `*,ou=admin,dc=example,dc=com`, or the `username` is `es-admin`, or the `username` is `es-system`; the user is in the `cn=people,dc=example,dc=com` group; the user does not have a `terminated_date`.\n", + "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [ \"es-admin\", \"es-system\" ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": null\n }\n }\n }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample9": { + "summary": "Templated roles", + "description": "Run `POST /_security/role_mapping/mapping9` to use templated roles to automatically map every user to their own custom role. In this example every user who authenticates using the `cloud-saml` realm will be automatically mapped to two roles: the `saml_user` role and a role that is their username prefixed with `_user_`. For example, the user `nwong` would be assigned the `saml_user` and `_user_nwong` roles.\n", + "value": "{\n \"rules\": { \"field\": { \"realm.name\": \"cloud-saml\" } },\n \"role_templates\": [\n { \"template\": { \"source\" : \"saml_user\" } }, \n { \"template\": { \"source\" : \"_user_{{username}}\" } }\n ],\n \"enabled\": true\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "role_mapping": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.CreatedStatus" + } + ] + } + }, + "required": [ + "role_mapping" + ] + }, + "examples": { + "SecurityPutRoleMappingResponseExample1": { + "description": "A successful response from `POST /_security/role_mapping/mapping1`.", + "value": "{\n \"role_mapping\" : {\n \"created\" : true \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n PUT\n /_security/role_mapping/{name}\n
\n ", + "
\n POST\n /_security/role_mapping/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_role_mapping.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "security" + ], + "summary": "Delete role mappings", + "description": "Role mappings define which roles are assigned to each user.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.\nThe delete role mappings API cannot remove role mappings that are defined in role mapping files.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delete-role-mapping.html" + }, + "operationId": "security-delete-role-mapping", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The distinct name that identifies the role mapping.\nThe 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.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "description": "If the mapping is successfully deleted, `found` is `true`.\nOtherwise, `found` is `false`.", + "type": "boolean" + } + }, + "required": [ + "found" + ] + }, + "examples": { + "SecurityDeleteRoleMappingResponseExample1": { + "description": "A successful response from `DELETE /_security/role_mapping/mapping1`. If the mapping is successfully deleted, `found` is `true`.\n", + "value": "{\n \"found\" : true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n DELETE\n /_security/role_mapping/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "delete_role_mapping.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user/{username}": { + "get": { + "tags": [ + "security" + ], + "summary": "Get users", + "description": "Get information about users in the native realm and built-in users.", + "operationId": "security-get-user", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "An identifier for the user. You can specify multiple usernames as a comma-separated list. If you omit this parameter, the API retrieves information about all users.", + "required": true, + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Username" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Username" + } + } + ] + }, + "style": "simple" + }, + { + "in": "query", + "name": "with_profile_uid", + "description": "Determines whether to retrieve the user profile UID, if it exists, for the users.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.5.0", + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.User" + } + }, + "examples": { + "SecurityGetUserResponseExample1": { + "description": "A successful response from `GET /_security/user/jacknich?with_profile_uid=true`. It includes the user `profile_uid` as part of the response.\n", + "value": "{\n \"jacknich\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": { \"intelligence\" : 7 },\n \"enabled\": true,\n \"profile_uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_security/user/{username}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "security" + ], + "summary": "Create or update users", + "description": "Add and update users in the native realm.\nA password is required for adding a new user but is optional when updating an existing user.\nTo change a user's password without updating any other fields, use the change password API.", + "operationId": "security-put-user", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "An identifier for the user.\n\nNOTE: Usernames must be at least 1 and no more than 507 characters.\nThey can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block.\nLeading or trailing whitespace is not allowed.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "Valid values are `true`, `false`, and `wait_for`.\nThese values have the same meaning as in the index API, but the default value for this API is true.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + }, + "email": { + "description": "The email of the user.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "full_name": { + "description": "The full name of the user.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "metadata": { + "description": "Arbitrary metadata that you want to associate with the user.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "password": { + "description": "The user's password.\nPasswords must be at least 6 characters long.\nWhen adding a user, one of `password` or `password_hash` is required.\nWhen updating an existing user, the password is optional, so that other fields on the user (such as their roles) may be updated without modifying the user's password", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "password_hash": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#hashing-settings" + }, + "description": "A hash of the user's password.\nThis must be produced using the same hashing algorithm as has been configured for password storage.\nFor more details, see the explanation of the `xpack.security.authc.password_hashing.algorithm` setting in the user cache and password hash algorithm documentation.\nUsing this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons.\nThe `password` parameter and the `password_hash` parameter cannot be used in the same request.", + "type": "string" + }, + "roles": { + "description": "A set of roles the user has.\nThe roles determine the user's access permissions.\nTo create a user without any roles, specify an empty list (`[]`).", + "type": "array", + "items": { + "type": "string" + } + }, + "enabled": { + "description": "Specifies whether the user is enabled.", + "default": true, + "type": "boolean" + } + } + }, + "examples": { + "SecurityPutUserRequestExample1": { + "description": "Run `POST /_security/user/jacknich` to activate a user profile.", + "value": "{\n \"password\" : \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\" : [ \"admin\", \"other_role1\" ],\n \"full_name\" : \"Jack Nicholson\",\n \"email\" : \"jacknich@example.com\",\n \"metadata\" : {\n \"intelligence\" : 7\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "description": "A successful call returns a JSON structure that shows whether the user has been created or updated.\nWhen an existing user is updated, `created` is set to `false`.", + "type": "boolean" + } + }, + "required": [ + "created" + ] + }, + "examples": { + "SecurityPutUserResponseExample1": { + "description": "A successful response from `POST /_security/user/jacknich`. When an existing user is updated, `created` is set to `false`.\n", + "value": "{\n \"created\": true \n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/{username}\n
\n ", + "
\n POST\n /_security/user/{username}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Create or update users", + "description": "Add and update users in the native realm.\nA password is required for adding a new user but is optional when updating an existing user.\nTo change a user's password without updating any other fields, use the change password API.", + "operationId": "security-put-user-1", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "An identifier for the user.\n\nNOTE: Usernames must be at least 1 and no more than 507 characters.\nThey can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block.\nLeading or trailing whitespace is not allowed.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "Valid values are `true`, `false`, and `wait_for`.\nThese values have the same meaning as in the index API, but the default value for this API is true.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + }, + "email": { + "description": "The email of the user.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "full_name": { + "description": "The full name of the user.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "metadata": { + "description": "Arbitrary metadata that you want to associate with the user.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "password": { + "description": "The user's password.\nPasswords must be at least 6 characters long.\nWhen adding a user, one of `password` or `password_hash` is required.\nWhen updating an existing user, the password is optional, so that other fields on the user (such as their roles) may be updated without modifying the user's password", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "password_hash": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#hashing-settings" + }, + "description": "A hash of the user's password.\nThis must be produced using the same hashing algorithm as has been configured for password storage.\nFor more details, see the explanation of the `xpack.security.authc.password_hashing.algorithm` setting in the user cache and password hash algorithm documentation.\nUsing this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons.\nThe `password` parameter and the `password_hash` parameter cannot be used in the same request.", + "type": "string" + }, + "roles": { + "description": "A set of roles the user has.\nThe roles determine the user's access permissions.\nTo create a user without any roles, specify an empty list (`[]`).", + "type": "array", + "items": { + "type": "string" + } + }, + "enabled": { + "description": "Specifies whether the user is enabled.", + "default": true, + "type": "boolean" + } + } + }, + "examples": { + "SecurityPutUserRequestExample1": { + "description": "Run `POST /_security/user/jacknich` to activate a user profile.", + "value": "{\n \"password\" : \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\" : [ \"admin\", \"other_role1\" ],\n \"full_name\" : \"Jack Nicholson\",\n \"email\" : \"jacknich@example.com\",\n \"metadata\" : {\n \"intelligence\" : 7\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "description": "A successful call returns a JSON structure that shows whether the user has been created or updated.\nWhen an existing user is updated, `created` is set to `false`.", + "type": "boolean" + } + }, + "required": [ + "created" + ] + }, + "examples": { + "SecurityPutUserResponseExample1": { + "description": "A successful response from `POST /_security/user/jacknich`. When an existing user is updated, `created` is set to `false`.\n", + "value": "{\n \"created\": true \n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/{username}\n
\n ", + "
\n POST\n /_security/user/{username}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "security" + ], + "summary": "Delete users", + "description": "Delete users from the native realm.", + "operationId": "security-delete-user", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "An identifier for the user.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "description": "If the user is successfully deleted, the request returns `{\"found\": true}`.\nOtherwise, `found` is set to `false`.", + "type": "boolean" + } + }, + "required": [ + "found" + ] + }, + "examples": { + "SecurityDeleteUserResponseExample1": { + "description": "A successful response from `DELETE /_security/user/jacknich`.\n", + "value": "{\n \"found\" : true\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_security/user/{username}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "delete_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user/{username}/_disable": { + "put": { + "tags": [ + "security" + ], + "summary": "Disable users", + "description": "Disable users in the native realm.\nBy default, when you create users, they are enabled.\nYou can use this API to revoke a user's access to Elasticsearch.", + "operationId": "security-disable-user", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "An identifier for the user.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/{username}/_disable\n
\n ", + "
\n POST\n /_security/user/{username}/_disable\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "disable_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Disable users", + "description": "Disable users in the native realm.\nBy default, when you create users, they are enabled.\nYou can use this API to revoke a user's access to Elasticsearch.", + "operationId": "security-disable-user-1", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "An identifier for the user.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/{username}/_disable\n
\n ", + "
\n POST\n /_security/user/{username}/_disable\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "disable_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/profile/{uid}/_disable": { + "put": { + "tags": [ + "security" + ], + "summary": "Disable a user profile", + "description": "Disable user profiles so that they are not visible in user profile searches.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nWhen you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches.\nTo re-enable a disabled user profile, use the enable user profile API .", + "operationId": "security-disable-user-profile", + "parameters": [ + { + "in": "path", + "name": "uid", + "description": "Unique identifier for the user profile.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/security._types.UserProfileId" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', it does nothing with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n PUT\n /_security/profile/{uid}/_disable\n
\n ", + "
\n POST\n /_security/profile/{uid}/_disable\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_user_profile`\n" + ], + "x-api": "disable_user_profile.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Disable a user profile", + "description": "Disable user profiles so that they are not visible in user profile searches.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nWhen you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches.\nTo re-enable a disabled user profile, use the enable user profile API .", + "operationId": "security-disable-user-profile-1", + "parameters": [ + { + "in": "path", + "name": "uid", + "description": "Unique identifier for the user profile.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/security._types.UserProfileId" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', it does nothing with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n PUT\n /_security/profile/{uid}/_disable\n
\n ", + "
\n POST\n /_security/profile/{uid}/_disable\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_user_profile`\n" + ], + "x-api": "disable_user_profile.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user/{username}/_enable": { + "put": { + "tags": [ + "security" + ], + "summary": "Enable users", + "description": "Enable users in the native realm.\nBy default, when you create users, they are enabled.", + "operationId": "security-enable-user", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "An identifier for the user.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/{username}/_enable\n
\n ", + "
\n POST\n /_security/user/{username}/_enable\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "enable_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Enable users", + "description": "Enable users in the native realm.\nBy default, when you create users, they are enabled.", + "operationId": "security-enable-user-1", + "parameters": [ + { + "in": "path", + "name": "username", + "description": "An identifier for the user.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Username" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/user/{username}/_enable\n
\n ", + "
\n POST\n /_security/user/{username}/_enable\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "enable_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/profile/{uid}/_enable": { + "put": { + "tags": [ + "security" + ], + "summary": "Enable a user profile", + "description": "Enable user profiles to make them visible in user profile searches.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nWhen you activate a user profile, it's automatically enabled and visible in user profile searches.\nIf you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again.", + "operationId": "security-enable-user-profile", + "parameters": [ + { + "in": "path", + "name": "uid", + "description": "A unique identifier for the user profile.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/security._types.UserProfileId" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n PUT\n /_security/profile/{uid}/_enable\n
\n ", + "
\n POST\n /_security/profile/{uid}/_enable\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_user_profile`\n" + ], + "x-api": "enable_user_profile.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Enable a user profile", + "description": "Enable user profiles to make them visible in user profile searches.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nWhen you activate a user profile, it's automatically enabled and visible in user profile searches.\nIf you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again.", + "operationId": "security-enable-user-profile-1", + "parameters": [ + { + "in": "path", + "name": "uid", + "description": "A unique identifier for the user profile.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/security._types.UserProfileId" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n PUT\n /_security/profile/{uid}/_enable\n
\n ", + "
\n POST\n /_security/profile/{uid}/_enable\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_user_profile`\n" + ], + "x-api": "enable_user_profile.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/enroll/kibana": { + "get": { + "tags": [ + "security" + ], + "summary": "Enroll Kibana", + "description": "Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.\n\nNOTE: This API is currently intended for internal use only by Kibana.\nKibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled.", + "operationId": "security-enroll-kibana", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/security.enroll_kibana.Token" + } + ] + }, + "http_ca": { + "description": "The CA certificate used to sign the node certificates that Elasticsearch uses for TLS on the HTTP layer.\nThe certificate is returned as a Base64 encoded string of the ASN.1 DER encoding of the certificate.", + "type": "string" + } + }, + "required": [ + "token", + "http_ca" + ] + }, + "examples": { + "EnrollKibanaResponseExample1": { + "description": "A successful response from `GET /_security/enroll/kibana`.", + "value": "{\n \"token\" : {\n \"name\" : \"enroll-process-token-1629123923000\", \n \"value\": \"AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ\" \n },\n \"http_ca\" : \"MIIJlAIBAzVoGCSqGSIb3...vsDfsA3UZBAjEPfhubpQysAICAA=\", \n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.0.0", + "x-variations": [ + "
\n GET\n /_security/enroll/kibana\n
\n " + ], + "x-api": "enroll_kibana.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/enroll/node": { + "get": { + "tags": [ + "security" + ], + "summary": "Enroll a node", + "description": "Enroll a new node to allow it to join an existing cluster with security features enabled.\n\nThe response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster.\nThe response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster.", + "operationId": "security-enroll-node", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "http_ca_key": { + "description": "The CA private key that can be used by the new node in order to sign its certificate for the HTTP layer, as a Base64 encoded string of the ASN.1 DER encoding of the key.", + "type": "string" + }, + "http_ca_cert": { + "description": "The CA certificate that can be used by the new node in order to sign its certificate for the HTTP layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate.", + "type": "string" + }, + "transport_ca_cert": { + "description": "The CA certificate that is used to sign the TLS certificate for the transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate.", + "type": "string" + }, + "transport_key": { + "description": "The private key that the node can use for TLS for its transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the key.", + "type": "string" + }, + "transport_cert": { + "description": "The certificate that the node can use for TLS for its transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate.", + "type": "string" + }, + "nodes_addresses": { + "description": "A list of transport addresses in the form of `host:port` for the nodes that are already members of the cluster.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "http_ca_key", + "http_ca_cert", + "transport_ca_cert", + "transport_key", + "transport_cert", + "nodes_addresses" + ] + }, + "examples": { + "EnrollNodeResponseExample1": { + "description": "A successful response from `PGET /security/enroll/node`.", + "value": "{\n \"http_ca_key\" : \"MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqGSIb3DQ....vsDfsA3UZBAjEPfhubpQysAICCAA=\", \n \"http_ca_cert\" : \"MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqGSIb3DQ....vsDfsA3UZBAjEPfhubpQysAICCAA=\", \n \"transport_ca_cert\" : \"MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqG....vsDfsA3UZBAjEPfhubpQysAICCAA=\", \n \"transport_key\" : \"MIIEJgIBAzCCA98GCSqGSIb3DQEHAaCCA9AEggPMMIIDyDCCA8QGCSqGSIb3....YuEiOXvqZ6jxuVSQ0CAwGGoA==\", \n \"transport_cert\" : \"MIIEJgIBAzCCA98GCSqGSIb3DQEHAaCCA9AEggPMMIIDyDCCA8QGCSqGSIb3....YuEiOXvqZ6jxuVSQ0CAwGGoA==\", \n \"nodes_addresses\" : [ \n \"192.168.1.2:9300\"\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.0.0", + "x-variations": [ + "
\n GET\n /_security/enroll/node\n
\n " + ], + "x-api": "enroll_node.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/privilege/_builtin": { + "get": { + "tags": [ + "security" + ], + "summary": "Get builtin privileges", + "description": "Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-builtin-privileges.html" + }, + "operationId": "security-get-builtin-privileges", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cluster": { + "description": "The list of cluster privileges that are understood by this version of Elasticsearch.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "index": { + "description": "The list of index privileges that are understood by this version of Elasticsearch.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } + }, + "remote_cluster": { + "description": "The list of remote_cluster privileges that are understood by this version of Elasticsearch.", + "x-state": "Generally available; Added in 8.15.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteClusterPrivilege" + } + } + }, + "required": [ + "cluster", + "index", + "remote_cluster" + ] + }, + "examples": { + "SecurityGetBuiltinPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/privilege/_builtin`.", + "value": "{\n \"cluster\" : [\n \"all\",\n \"cancel_task\",\n \"create_snapshot\",\n \"cross_cluster_replication\",\n \"cross_cluster_search\",\n \"delegate_pki\",\n \"grant_api_key\",\n \"manage\",\n \"manage_api_key\",\n \"manage_autoscaling\",\n \"manage_behavioral_analytics\",\n \"manage_ccr\",\n \"manage_connector\",\n \"manage_data_frame_transforms\",\n \"manage_data_stream_global_retention\",\n \"manage_enrich\",\n \"manage_ilm\",\n \"manage_index_templates\",\n \"manage_inference\",\n \"manage_ingest_pipelines\",\n \"manage_logstash_pipelines\",\n \"manage_ml\",\n \"manage_oidc\",\n \"manage_own_api_key\",\n \"manage_pipeline\",\n \"manage_rollup\",\n \"manage_saml\",\n \"manage_search_application\",\n \"manage_search_query_rules\",\n \"manage_search_synonyms\",\n \"manage_security\",\n \"manage_service_account\",\n \"manage_slm\",\n \"manage_token\",\n \"manage_transform\",\n \"manage_user_profile\",\n \"manage_watcher\",\n \"monitor\",\n \"monitor_connector\",\n \"monitor_data_frame_transforms\",\n \"monitor_data_stream_global_retention\",\n \"monitor_enrich\",\n \"monitor_inference\",\n \"monitor_ml\",\n \"monitor_rollup\",\n \"monitor_snapshot\",\n \"monitor_stats\",\n \"monitor_text_structure\",\n \"monitor_transform\",\n \"monitor_watcher\",\n \"none\",\n \"post_behavioral_analytics_event\",\n \"read_ccr\",\n \"read_connector_secrets\",\n \"read_fleet_secrets\",\n \"read_ilm\",\n \"read_pipeline\",\n \"read_security\",\n \"read_slm\",\n \"transport_client\",\n \"write_connector_secrets\",\n \"write_fleet_secrets\"\n ],\n \"index\" : [\n \"all\",\n \"auto_configure\",\n \"create\",\n \"create_doc\",\n \"create_index\",\n \"cross_cluster_replication\",\n \"cross_cluster_replication_internal\",\n \"delete\",\n \"delete_index\",\n \"index\",\n \"maintenance\",\n \"manage\",\n \"manage_data_stream_lifecycle\",\n \"manage_follow_index\",\n \"manage_ilm\",\n \"manage_leader_index\",\n \"monitor\",\n \"none\",\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\",\n \"write\"\n ],\n \"remote_cluster\" : [\n \"monitor_enrich\",\n \"monitor_stats\"\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.3.0", + "x-variations": [ + "
\n GET\n /_security/privilege/_builtin\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "get_builtin_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/privilege": { + "get": { + "tags": [ + "security" + ], + "summary": "Get application privileges", + "description": "To use this API, you must have one of the following privileges:\n\n* The `read_security` cluster privilege (or a greater privilege such as `manage_security` or `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-privileges.html" + }, + "operationId": "security-get-privileges", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.put_privileges.Actions" + } + } + }, + "examples": { + "SecurityGetPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/privilege/myapp/read`. The response contains information about the `read` privilege for the `app01` application.\n", + "value": "{\n \"myapp\": {\n \"read\": {\n \"application\": \"myapp\",\n \"name\": \"read\",\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n GET\n /_security/privilege\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "security" + ], + "summary": "Create or update application privileges", + "description": "To use this API, you must have one of the following privileges:\n\n* The `manage_security` cluster privilege (or a greater privilege such as `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.\n\nApplication names are formed from a prefix, with an optional suffix that conform to the following rules:\n\n* The prefix must begin with a lowercase ASCII letter.\n* The prefix must contain only ASCII letters or digits.\n* The prefix must be at least 3 characters long.\n* If the suffix exists, it must begin with either a dash `-` or `_`.\n* The suffix cannot contain any of the following characters: `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, `,`, `*`.\n* No part of the name can contain whitespace.\n\nPrivilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters `_`, `-`, and `.`.\n\nAction names can contain any number of printable ASCII characters and must contain at least one of the following characters: `/`, `*`, `:`.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-privileges.html" + }, + "operationId": "security-put-privileges", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.put_privileges.Actions" + } + } + }, + "examples": { + "SecurityPutPrivilegesRequestExample1": { + "summary": "Add a privilege", + "description": "Run `PUT /_security/privilege` to add a single application privilege. The wildcard (`*`) means that this privilege grants access to all actions that start with `data:read/`. Elasticsearch does not assign any meaning to these actions. However, if the request includes an application privilege such as `data:read/users` or `data:read/settings`, the has privileges API respects the use of a wildcard and returns `true`.\n", + "value": "{\n \"myapp\": {\n \"read\": {\n \"actions\": [ \n \"data:read/*\" , \n \"action:login\" ],\n \"metadata\": { \n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" + }, + "SecurityPutPrivilegesRequestExample2": { + "summary": "Add multiple privileges", + "description": "Run `PUT /_security/privilege` to add multiple application privileges.\n", + "value": "{\n \"app01\": {\n \"read\": {\n \"actions\": [ \"action:login\", \"data:read/*\" ]\n },\n \"write\": {\n \"actions\": [ \"action:login\", \"data:write/*\" ]\n }\n },\n \"app02\": {\n \"all\": {\n \"actions\": [ \"*\" ]\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.CreatedStatus" + } + } + }, + "examples": { + "SecurityPutPrivilegesResponseExample1": { + "description": "A successful response from `PUT /_security/privilege`.", + "value": "{\n \"myapp\": {\n \"read\": {\n \"created\": true \n }\n }\n}" + }, + "SecurityPutPrivilegesResponseExample2": { + "description": "A successful response from `PUT /_security/privilege`. The `created` property indicates whether the privileges have been created or updated.\n", + "value": "{\n \"app02\": {\n \"all\": {\n \"created\": true\n }\n },\n \"app01\": {\n \"read\": {\n \"created\": true\n },\n \"write\": {\n \"created\": true\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n PUT\n /_security/privilege\n
\n ", + "
\n POST\n /_security/privilege\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Create or update application privileges", + "description": "To use this API, you must have one of the following privileges:\n\n* The `manage_security` cluster privilege (or a greater privilege such as `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.\n\nApplication names are formed from a prefix, with an optional suffix that conform to the following rules:\n\n* The prefix must begin with a lowercase ASCII letter.\n* The prefix must contain only ASCII letters or digits.\n* The prefix must be at least 3 characters long.\n* If the suffix exists, it must begin with either a dash `-` or `_`.\n* The suffix cannot contain any of the following characters: `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, `,`, `*`.\n* No part of the name can contain whitespace.\n\nPrivilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters `_`, `-`, and `.`.\n\nAction names can contain any number of printable ASCII characters and must contain at least one of the following characters: `/`, `*`, `:`.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-privileges.html" + }, + "operationId": "security-put-privileges-1", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.put_privileges.Actions" + } + } + }, + "examples": { + "SecurityPutPrivilegesRequestExample1": { + "summary": "Add a privilege", + "description": "Run `PUT /_security/privilege` to add a single application privilege. The wildcard (`*`) means that this privilege grants access to all actions that start with `data:read/`. Elasticsearch does not assign any meaning to these actions. However, if the request includes an application privilege such as `data:read/users` or `data:read/settings`, the has privileges API respects the use of a wildcard and returns `true`.\n", + "value": "{\n \"myapp\": {\n \"read\": {\n \"actions\": [ \n \"data:read/*\" , \n \"action:login\" ],\n \"metadata\": { \n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" + }, + "SecurityPutPrivilegesRequestExample2": { + "summary": "Add multiple privileges", + "description": "Run `PUT /_security/privilege` to add multiple application privileges.\n", + "value": "{\n \"app01\": {\n \"read\": {\n \"actions\": [ \"action:login\", \"data:read/*\" ]\n },\n \"write\": {\n \"actions\": [ \"action:login\", \"data:write/*\" ]\n }\n },\n \"app02\": {\n \"all\": {\n \"actions\": [ \"*\" ]\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.CreatedStatus" + } + } + }, + "examples": { + "SecurityPutPrivilegesResponseExample1": { + "description": "A successful response from `PUT /_security/privilege`.", + "value": "{\n \"myapp\": {\n \"read\": {\n \"created\": true \n }\n }\n}" + }, + "SecurityPutPrivilegesResponseExample2": { + "description": "A successful response from `PUT /_security/privilege`. The `created` property indicates whether the privileges have been created or updated.\n", + "value": "{\n \"app02\": {\n \"all\": {\n \"created\": true\n }\n },\n \"app01\": {\n \"read\": {\n \"created\": true\n },\n \"write\": {\n \"created\": true\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n PUT\n /_security/privilege\n
\n ", + "
\n POST\n /_security/privilege\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/privilege/{application}": { + "get": { + "tags": [ + "security" + ], + "summary": "Get application privileges", + "description": "To use this API, you must have one of the following privileges:\n\n* The `read_security` cluster privilege (or a greater privilege such as `manage_security` or `all`).\n* The \"Manage Application Privileges\" global privilege for the application being referenced in the request.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-privileges.html" + }, + "operationId": "security-get-privileges-1", + "parameters": [ + { + "in": "path", + "name": "application", + "description": "The name of the application.\nApplication privileges are always associated with exactly one application.\nIf you do not specify this parameter, the API returns information about all privileges for all applications.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.put_privileges.Actions" + } + } + }, + "examples": { + "SecurityGetPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/privilege/myapp/read`. The response contains information about the `read` privilege for the `app01` application.\n", + "value": "{\n \"myapp\": {\n \"read\": {\n \"application\": \"myapp\",\n \"name\": \"read\",\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n GET\n /_security/privilege/{application}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/role_mapping": { + "get": { + "tags": [ + "security" + ], + "summary": "Get role mappings", + "description": "Role mappings define which roles are assigned to each user.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.\nThe get role mappings API cannot retrieve role mappings that are defined in role mapping files.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-role-mapping.html" + }, + "operationId": "security-get-role-mapping-1", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleMapping" + } + }, + "examples": { + "SecurityGetRoleMappingResponseExample1": { + "description": "A successful response from `GET /_security/role_mapping/mapping1`.", + "value": "{\n \"mapping1\": {\n \"enabled\": true,\n \"roles\": [\n \"user\"\n ],\n \"rules\": {\n \"field\": {\n \"username\": \"*\"\n }\n },\n \"metadata\": {}\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_security/role_mapping\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "get_role_mapping.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/service/{namespace}/{service}": { + "get": { + "tags": [ + "security" + ], + "summary": "Get service accounts", + "description": "Get a list of service accounts that match the provided path parameters.\n\nNOTE: Currently, only the `elastic/fleet-server` service account is available.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-service-accounts.html" + }, + "operationId": "security-get-service-accounts", + "parameters": [ + { + "in": "path", + "name": "namespace", + "description": "The name of the namespace.\nOmit this parameter to retrieve information about all service accounts.\nIf you omit this parameter, you must also omit the `service` parameter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Namespace" + }, + "style": "simple" + }, + { + "in": "path", + "name": "service", + "description": "The service name.\nOmit this parameter to retrieve information about all service accounts that belong to the specified `namespace`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Service" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.get_service_accounts.RoleDescriptorWrapper" + } + }, + "examples": { + "GetServiceAccountsResponseExample1": { + "description": "A successful response from `GET /_security/service/elastic/fleet-server`. The response contains information about the `elastic/fleet-server` service account.\n", + "value": "{\n \"elastic/fleet-server\": {\n \"role_descriptor\": {\n \"cluster\": [\n \"monitor\",\n \"manage_own_api_key\",\n \"read_fleet_secrets\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"logs-*\",\n \"metrics-*\",\n \"traces-*\",\n \".logs-endpoint.diagnostic.collection-*\",\n \".logs-endpoint.action.responses-*\",\n \".logs-endpoint.heartbeat-*\"\n ],\n \"privileges\": [\n \"write\",\n \"create_index\",\n \"auto_configure\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \"profiling-*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \"traces-apm.sampled-*\"\n ],\n \"privileges\": [\n \"read\",\n \"monitor\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \".fleet-secrets*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-actions*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-agents*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-artifacts*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-enrollment-api-keys*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-policies*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-policies-leader*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-servers*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-fileds*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \"synthetics-*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"create_index\",\n \"auto_configure\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [\n {\n \"application\": \"kibana-*\",\n \"privileges\": [\n \"reserved_fleet-setup\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [],\n \"metadata\": {},\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_security/service/{namespace}/{service}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_service_account`\n" + ], + "x-api": "get_service_accounts.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/service/{namespace}": { + "get": { + "tags": [ + "security" + ], + "summary": "Get service accounts", + "description": "Get a list of service accounts that match the provided path parameters.\n\nNOTE: Currently, only the `elastic/fleet-server` service account is available.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-service-accounts.html" + }, + "operationId": "security-get-service-accounts-1", + "parameters": [ + { + "in": "path", + "name": "namespace", + "description": "The name of the namespace.\nOmit this parameter to retrieve information about all service accounts.\nIf you omit this parameter, you must also omit the `service` parameter.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Namespace" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.get_service_accounts.RoleDescriptorWrapper" + } + }, + "examples": { + "GetServiceAccountsResponseExample1": { + "description": "A successful response from `GET /_security/service/elastic/fleet-server`. The response contains information about the `elastic/fleet-server` service account.\n", + "value": "{\n \"elastic/fleet-server\": {\n \"role_descriptor\": {\n \"cluster\": [\n \"monitor\",\n \"manage_own_api_key\",\n \"read_fleet_secrets\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"logs-*\",\n \"metrics-*\",\n \"traces-*\",\n \".logs-endpoint.diagnostic.collection-*\",\n \".logs-endpoint.action.responses-*\",\n \".logs-endpoint.heartbeat-*\"\n ],\n \"privileges\": [\n \"write\",\n \"create_index\",\n \"auto_configure\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \"profiling-*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \"traces-apm.sampled-*\"\n ],\n \"privileges\": [\n \"read\",\n \"monitor\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \".fleet-secrets*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-actions*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-agents*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-artifacts*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-enrollment-api-keys*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-policies*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-policies-leader*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-servers*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-fileds*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \"synthetics-*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"create_index\",\n \"auto_configure\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [\n {\n \"application\": \"kibana-*\",\n \"privileges\": [\n \"reserved_fleet-setup\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [],\n \"metadata\": {},\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_security/service/{namespace}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_service_account`\n" + ], + "x-api": "get_service_accounts.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/service": { + "get": { + "tags": [ + "security" + ], + "summary": "Get service accounts", + "description": "Get a list of service accounts that match the provided path parameters.\n\nNOTE: Currently, only the `elastic/fleet-server` service account is available.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-service-accounts.html" + }, + "operationId": "security-get-service-accounts-2", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.get_service_accounts.RoleDescriptorWrapper" + } + }, + "examples": { + "GetServiceAccountsResponseExample1": { + "description": "A successful response from `GET /_security/service/elastic/fleet-server`. The response contains information about the `elastic/fleet-server` service account.\n", + "value": "{\n \"elastic/fleet-server\": {\n \"role_descriptor\": {\n \"cluster\": [\n \"monitor\",\n \"manage_own_api_key\",\n \"read_fleet_secrets\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"logs-*\",\n \"metrics-*\",\n \"traces-*\",\n \".logs-endpoint.diagnostic.collection-*\",\n \".logs-endpoint.action.responses-*\",\n \".logs-endpoint.heartbeat-*\"\n ],\n \"privileges\": [\n \"write\",\n \"create_index\",\n \"auto_configure\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \"profiling-*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \"traces-apm.sampled-*\"\n ],\n \"privileges\": [\n \"read\",\n \"monitor\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \".fleet-secrets*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-actions*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-agents*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-artifacts*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-enrollment-api-keys*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-policies*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-policies-leader*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-servers*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-fileds*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \"synthetics-*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"create_index\",\n \"auto_configure\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [\n {\n \"application\": \"kibana-*\",\n \"privileges\": [\n \"reserved_fleet-setup\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [],\n \"metadata\": {},\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_security/service\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_service_account`\n" + ], + "x-api": "get_service_accounts.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/service/{namespace}/{service}/credential": { + "get": { + "tags": [ + "security" + ], + "summary": "Get service account credentials", + "description": "To use this API, you must have at least the `read_security` cluster privilege (or a greater privilege such as `manage_service_account` or `manage_security`).\n\nThe response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster.\n\nNOTE: For tokens backed by the `service_tokens` file, the API collects them from all nodes of the cluster.\nTokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-service-credentials.html" + }, + "operationId": "security-get-service-credentials", + "parameters": [ + { + "in": "path", + "name": "namespace", + "description": "The name of the namespace.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Namespace" + }, + "style": "simple" + }, + { + "in": "path", + "name": "service", + "description": "The service name.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "service_account": { + "type": "string" + }, + "count": { + "type": "number" + }, + "tokens": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.Metadata" + } + }, + "nodes_credentials": { + "description": "Service account credentials collected from all nodes of the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/security.get_service_credentials.NodesCredentials" + } + ] + } + }, + "required": [ + "service_account", + "count", + "tokens", + "nodes_credentials" + ] + }, + "examples": { + "GetServiceCredentialsResponseExample1": { + "description": "A successful response from `GET /_security/service/elastic/fleet-server/credential`. The response contains all credentials for the `elastic/fleet-server` service account.\n", + "value": "{\n \"service_account\": \"elastic/fleet-server\",\n \"count\": 3,\n \"tokens\": {\n \"token1\": {}, \n \"token42\": {} \n },\n \"nodes_credentials\": { \n \"_nodes\": { \n \"total\": 3,\n \"successful\": 3,\n \"failed\": 0\n },\n \"file_tokens\": { \n \"my-token\": {\n \"nodes\": [ \"node0\", \"node1\" ] \n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n GET\n /_security/service/{namespace}/{service}/credential\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_service_credentials.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/settings": { + "get": { + "tags": [ + "security" + ], + "summary": "Get security index settings", + "description": "Get the user-configurable settings for the security internal index (`.security` and associated indices).\nOnly a subset of the index settings — those that are user-configurable—will be shown.\nThis includes:\n\n* `index.auto_expand_replicas`\n* `index.number_of_replicas`", + "operationId": "security-get-settings", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "security": { + "description": "Settings for the index used for most security configuration, including native realm users and roles configured with the API.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.SecuritySettings" + } + ] + }, + "security-profile": { + "description": "Settings for the index used to store profile information.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.SecuritySettings" + } + ] + }, + "security-tokens": { + "description": "Settings for the index used to store tokens.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.SecuritySettings" + } + ] + } + }, + "required": [ + "security", + "security-profile", + "security-tokens" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_security/settings\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_settings.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "security" + ], + "summary": "Update security index settings", + "description": "Update the user-configurable settings for the security internal index (`.security` and associated indices). Only a subset of settings are allowed to be modified. This includes `index.auto_expand_replicas` and `index.number_of_replicas`.\n\nNOTE: If `index.auto_expand_replicas` is set, `index.number_of_replicas` will be ignored during updates.\n\nIf a specific index is not in use on the system and settings are provided for it, the request will be rejected.\nThis API does not yet support configuring the settings for indices before they are in use.", + "operationId": "security-update-settings", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "security": { + "description": "Settings for the index used for most security configuration, including native realm users and roles configured with the API.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.SecuritySettings" + } + ] + }, + "security-profile": { + "description": "Settings for the index used to store profile information.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.SecuritySettings" + } + ] + }, + "security-tokens": { + "description": "Settings for the index used to store tokens.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.SecuritySettings" + } + ] + } + } + }, + "examples": { + "SecurityUpdateSettingsRequestExample1": { + "description": "Run `PUT /_security/settings` to modify the security settings.", + "value": "{\n \"security\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-tokens\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-profile\": {\n \"index.auto_expand_replicas\": \"0-all\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/settings\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "update_settings.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/stats": { + "get": { + "tags": [ + "security" + ], + "summary": "Get security stats", + "description": "Gather security usage statistics from all node(s) within the cluster.", + "operationId": "security-get-stats", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "description": "A map of node IDs to security statistics for that node.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.NodeSecurityStats" + } + } + }, + "required": [ + "nodes" + ] + }, + "examples": { + "SecurityStatsExample1": { + "description": "A successful response from `GET /_security/stats`.", + "value": "{\n \"nodes\": {\n \"CLeCBfYETO2mQ1R2Il5-SA\": {\n \"roles\": {\n \"dls\": {\n \"bit_set_cache\": {\n \"count\": 1,\n \"memory\": \"16b\",\n \"memory_in_bytes\": 16,\n \"hits\": 212,\n \"misses\": 1,\n \"evictions\": 0,\n \"hits_time_in_millis\": 5,\n \"misses_time_in_millis\": 0\n }\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 9.2.0", + "x-variations": [ + "
\n GET\n /_security/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "get_stats.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/oauth2/token": { + "post": { + "tags": [ + "security" + ], + "summary": "Get a token", + "description": "Create a bearer token for access without requiring basic authentication.\nThe tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface.\nAlternatively, you can explicitly enable the `xpack.security.authc.token.enabled` setting.\nWhen you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface.\n\nThe get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body.\n\nA successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available.\n\nThe tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used.\nThat time period is defined by the `xpack.security.authc.token.timeout` setting.\nIf you want to invalidate a token immediately, you can do so by using the invalidate token API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security-plus-https#encrypt-http-communication", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-token.html" + }, + "operationId": "security-get-token", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "grant_type": { + "description": "The type of grant.\nSupported grant types are: `password`, `_kerberos`, `client_credentials`, and `refresh_token`.", + "allOf": [ + { + "$ref": "#/components/schemas/security.get_token.AccessTokenGrantType" + } + ] + }, + "scope": { + "description": "The scope of the token.\nCurrently tokens are only issued for a scope of FULL regardless of the value sent with the request.", + "type": "string" + }, + "password": { + "description": "The user's password.\nIf you specify the `password` grant type, this parameter is required.\nThis parameter is not valid with any other supported grant type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "kerberos_ticket": { + "description": "The base64 encoded kerberos ticket.\nIf you specify the `_kerberos` grant type, this parameter is required.\nThis parameter is not valid with any other supported grant type.", + "type": "string" + }, + "refresh_token": { + "description": "The string that was returned when you created the token, which enables you to extend its life.\nIf you specify the `refresh_token` grant type, this parameter is required.\nThis parameter is not valid with any other supported grant type.", + "type": "string" + }, + "username": { + "description": "The username that identifies the user.\nIf you specify the `password` grant type, this parameter is required.\nThis parameter is not valid with any other supported grant type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } + } + }, + "examples": { + "GetUserAccessTokenRequestExample1": { + "summary": "A client_credentials grant type example", + "description": "Run `POST /_security/oauth2/token` to obtain a token using the `client_credentials` grant type, which simply creates a token as the authenticated user.\n", + "value": "{\n \"grant_type\" : \"client_credentials\"\n}" + }, + "GetUserAccessTokenRequestExample2": { + "summary": "A password grant type example", + "description": "Run `POST /_security/oauth2/token` to obtain a token for the `test_admin` user using the password grant type. This request needs to be made by an authenticated user with sufficient privileges that may or may not be the same as the one whose username is passed in the `username` parameter.\n", + "value": "{\n \"grant_type\" : \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "expires_in": { + "type": "number" + }, + "scope": { + "type": "string" + }, + "type": { + "type": "string" + }, + "refresh_token": { + "type": "string" + }, + "kerberos_authentication_response_token": { + "type": "string" + }, + "authentication": { + "allOf": [ + { + "$ref": "#/components/schemas/security.get_token.AuthenticatedUser" + } + ] + } + }, + "required": [ + "access_token", + "expires_in", + "type", + "authentication" + ] + }, + "examples": { + "GetUserAccessTokenResponseExample1": { + "summary": "A client_credentials grant type example", + "description": "A successful response from `POST /_security/oauth2/token`.", + "value": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"authentication\" : {\n \"username\" : \"test_admin\",\n \"roles\" : [\n \"superuser\"\n ],\n \"full_name\" : null,\n \"email\" : null,\n \"metadata\" : { },\n \"enabled\" : true,\n \"authentication_realm\" : {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"lookup_realm\" : {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"authentication_type\" : \"realm\"\n }\n}" + }, + "GetUserAccessTokenResponseExample2": { + "summary": "A password grant type example", + "description": "A successful response from `POST /_security/oauth2/token`.", + "value": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"authentication\" : {\n \"username\" : \"test_admin\",\n \"roles\" : [\n \"superuser\"\n ],\n \"full_name\" : null,\n \"email\" : null,\n \"metadata\" : { },\n \"enabled\" : true,\n \"authentication_realm\" : {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"lookup_realm\" : {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"authentication_type\" : \"realm\"\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n POST\n /_security/oauth2/token\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_token`\n" + ], + "x-api": "get_token.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "security" + ], + "summary": "Invalidate a token", + "description": "The access tokens returned by the get token API have a finite period of time for which they are valid.\nAfter that time period, they can no longer be used.\nThe time period is defined by the `xpack.security.authc.token.timeout` setting.\n\nThe refresh tokens returned by the get token API are only valid for 24 hours.\nThey can also be used exactly once.\nIf you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.\n\nNOTE: While all parameters are optional, at least one of them is required.\nMore specifically, either one of `token` or `refresh_token` parameters is required.\nIf none of these two are specified, then `realm_name` and/or `username` need to be specified.", + "operationId": "security-invalidate-token", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "description": "An access token.\nThis parameter cannot be used if any of `refresh_token`, `realm_name`, or `username` are used.", + "type": "string" + }, + "refresh_token": { + "description": "A refresh token.\nThis parameter cannot be used if any of `refresh_token`, `realm_name`, or `username` are used.", + "type": "string" + }, + "realm_name": { + "description": "The name of an authentication realm.\nThis parameter cannot be used with either `refresh_token` or `token`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "username": { + "description": "The username of a user.\nThis parameter cannot be used with either `refresh_token` or `token`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } + } + }, + "examples": { + "SecurityInvalidateTokenRequestExample1": { + "summary": "Invalidate an access token", + "description": "Run `DELETE /_security/oauth2/token` to invalidate an access token.\n", + "value": "{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"\n}" + }, + "SecurityInvalidateTokenRequestExample2": { + "summary": "Invalidate a refresh token", + "description": "Run `DELETE /_security/oauth2/token` to invalidate a refresh token.\n", + "value": "{\n \"refresh_token\" : \"vLBPvmAB6KvwvJZr27cS\"\n}" + }, + "SecurityInvalidateTokenRequestExample3": { + "summary": "Invalidate tokens by realm", + "description": "Run `DELETE /_security/oauth2/token` to invalidate all access tokens and refresh tokens for the `saml1` realm.", + "value": "{\n \"realm_name\" : \"saml1\"\n}" + }, + "SecurityInvalidateTokenRequestExample4": { + "summary": "Invalidate tokens by user", + "description": "Run `DELETE /_security/oauth2/token` to invalidate all access tokens and refresh tokens for the user `myuser` in all realms.", + "value": "{\n \"username\" : \"myuser\"\n}" + }, + "SecurityInvalidateTokenRequestExample5": { + "summary": "Invalidate tokens by user and realm", + "description": "Run `DELETE /_security/oauth2/token` to invalidate all access tokens and refresh tokens for the user `myuser` in the `saml1` realm.", + "value": "{\n \"username\" : \"myuser\",\n \"realm_name\" : \"saml1\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error_count": { + "description": "The number of errors that were encountered when invalidating the tokens.", + "type": "number" + }, + "error_details": { + "description": "Details about the errors.\nThis field is not present in the response when `error_count` is `0`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ErrorCause" + } + }, + "invalidated_tokens": { + "description": "The number of the tokens that were invalidated as part of this request.", + "type": "number" + }, + "previously_invalidated_tokens": { + "description": "The number of tokens that were already invalidated.", + "type": "number" + } + }, + "required": [ + "error_count", + "invalidated_tokens", + "previously_invalidated_tokens" + ] + }, + "examples": { + "SecurityInvalidateTokenResponseExample1": { + "description": "A partially successful response from `DELETE /_security/oauth2/token`. The response includes the number of the tokens that were invalidated, the number of errors that were encountered when invalidating the tokens, and details about these errors.\n", + "value": "{\n \"invalidated_tokens\":9, \n \"previously_invalidated_tokens\":15, \n \"error_count\":2, \n \"error_details\":[ \n {\n \"type\":\"exception\",\n \"reason\":\"Elasticsearch exception [type=exception, reason=foo]\",\n \"caused_by\":{\n \"type\":\"exception\",\n \"reason\":\"Elasticsearch exception [type=illegal_argument_exception, reason=bar]\"\n }\n },\n {\n \"type\":\"exception\",\n \"reason\":\"Elasticsearch exception [type=exception, reason=boo]\",\n \"caused_by\":{\n \"type\":\"exception\",\n \"reason\":\"Elasticsearch exception [type=illegal_argument_exception, reason=far]\"\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n DELETE\n /_security/oauth2/token\n
\n " + ], + "x-api": "invalidate_token.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user": { + "get": { + "tags": [ + "security" + ], + "summary": "Get users", + "description": "Get information about users in the native realm and built-in users.", + "operationId": "security-get-user-1", + "parameters": [ + { + "in": "query", + "name": "with_profile_uid", + "description": "Determines whether to retrieve the user profile UID, if it exists, for the users.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.5.0", + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.User" + } + }, + "examples": { + "SecurityGetUserResponseExample1": { + "description": "A successful response from `GET /_security/user/jacknich?with_profile_uid=true`. It includes the user `profile_uid` as part of the response.\n", + "value": "{\n \"jacknich\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": { \"intelligence\" : 7 },\n \"enabled\": true,\n \"profile_uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_security/user\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user/_privileges": { + "get": { + "tags": [ + "security" + ], + "summary": "Get user privileges", + "description": "Get the security privileges for the logged in user.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.\nTo check whether a user has a specific list of privileges, use the has privileges API.", + "operationId": "security-get-user-privileges", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApplicationPrivileges" + } + }, + "cluster": { + "type": "array", + "items": { + "type": "string" + } + }, + "remote_cluster": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" + } + }, + "global": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.GlobalPrivilege" + } + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserIndicesPrivileges" + } + }, + "remote_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteUserIndicesPrivileges" + } + }, + "run_as": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "applications", + "cluster", + "global", + "indices", + "run_as" + ] + }, + "examples": { + "SecurityGetUserPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/user/_privileges`.", + "value": "{\n \"cluster\" : [\n \"all\"\n ],\n \"global\" : [ ],\n \"indices\" : [\n {\n \"names\" : [\n \"*\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"allow_restricted_indices\" : true\n }\n ],\n \"applications\" : [\n {\n \"application\" : \"*\",\n \"privileges\" : [\n \"*\"\n ],\n \"resources\" : [\n \"*\"\n ]\n }\n ],\n \"run_as\" : [\n \"*\"\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n GET\n /_security/user/_privileges\n
\n " + ], + "x-api": "get_user_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/profile/{uid}": { + "get": { + "tags": [ + "security" + ], + "summary": "Get a user profile", + "description": "Get a user's profile using the unique profile ID.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", + "operationId": "security-get-user-profile", + "parameters": [ + { + "in": "path", + "name": "uid", + "description": "A unique identifier for the user profile.", + "required": true, + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/security._types.UserProfileId" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfileId" + } + } + ] + }, + "style": "simple" + }, + { + "in": "query", + "name": "data", + "description": "A comma-separated list of filters for the `data` field of the profile document.\nTo return all content use `data=*`.\nTo return a subset of content use `data=` to retrieve content nested under the specified ``.\nBy default returns no `data` content.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "profiles": { + "description": "A successful call returns the JSON representation of the user profile and its internal versioning numbers.\nThe API returns an empty object if no profile document is found for the provided `uid`.\nThe content of the data field is not returned by default to avoid deserializing a potential large payload.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfileWithMetadata" + } + }, + "errors": { + "allOf": [ + { + "$ref": "#/components/schemas/security.get_user_profile.GetUserProfileErrors" + } + ] + } + }, + "required": [ + "profiles" + ] + }, + "examples": { + "GetUserProfileResponseExample1": { + "summary": "Profile details for a UUID", + "description": "A successful response from `GET /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0`. By default, no content is returned in the `data` field.\n", + "value": "{\n \"profiles\": [\n {\n \"uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n \"enabled\": true,\n \"last_synchronized\": 1642650651037,\n \"user\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"realm_name\": \"native\",\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\"\n },\n \"labels\": {\n \"direction\": \"north\"\n },\n \"data\": {}, \n \"_doc\": {\n \"_primary_term\": 88,\n \"_seq_no\": 66\n }\n }\n ]\n}" + }, + "GetUserProfileResponseExample2": { + "summary": "Profile details for a UUID and data key", + "description": "A successful response from `GET /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0?data=app1.key1`.\n", + "value": "{\n \"profiles\": [\n {\n \"uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n \"enabled\": true,\n \"last_synchronized\": 1642650651037,\n \"user\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"realm_name\": \"native\",\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\"\n },\n \"labels\": {\n \"direction\": \"north\"\n },\n \"data\": {\n \"app1\": {\n \"key1\": \"value1\"\n }\n },\n \"_doc\": {\n \"_primary_term\": 88,\n \"_seq_no\": 66\n }\n }\n ]\n}" + }, + "GetUserProfileResponseExample3": { + "summary": "Profile details with errors", + "description": "A response that contains errors that occurred while retrieving user profiles.\n", + "value": "{\n \"profiles\": [],\n \"errors\": {\n \"count\": 1,\n \"details\": {\n \"u_FmxQt3gr1BBH5wpnz9HkouPj3Q710XkOgg1PWkwLPBW_5\": {\n \"type\": \"resource_not_found_exception\",\n \"reason\": \"profile document not found\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n GET\n /_security/profile/{uid}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "get_user_profile.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/api_key/grant": { + "post": { + "tags": [ + "security" + ], + "summary": "Grant an API key", + "description": "Create an API key on behalf of another user.\nThis API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API.\nThe caller must have authentication credentials for the user on whose behalf the API key will be created.\nIt is not possible to use this API to create an API key without that user's credentials.\nThe supported user authentication credential types are:\n\n* username and password\n* Elasticsearch access tokens\n* JWTs\n\nThe user, for whom the authentication credentials is provided, can optionally \"run as\" (impersonate) another user.\nIn this case, the API key will be created on behalf of the impersonated user.\n\nThis API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.\nThe API keys are created by the Elasticsearch API key service, which is automatically enabled.\n\nA successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.\nIf applicable, it also returns expiration information for the API key in milliseconds.\n\nBy default, API keys never expire. You can specify expiration information when you create the API keys.", + "operationId": "security-grant-api-key", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_key": { + "description": "The API key.", + "allOf": [ + { + "$ref": "#/components/schemas/security.grant_api_key.GrantApiKey" + } + ] + }, + "grant_type": { + "description": "The type of grant. Supported grant types are: `access_token`, `password`.", + "allOf": [ + { + "$ref": "#/components/schemas/security.grant_api_key.ApiKeyGrantType" + } + ] + }, + "access_token": { + "description": "The user's access token.\nIf you specify the `access_token` grant type, this parameter is required.\nIt is not valid with other grant types.", + "type": "string" + }, + "username": { + "description": "The user name that identifies the user.\nIf you specify the `password` grant type, this parameter is required.\nIt is not valid with other grant types.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + }, + "password": { + "description": "The user's password.\nIf you specify the `password` grant type, this parameter is required.\nIt is not valid with other grant types.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "run_as": { + "description": "The name of the user to be impersonated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } + }, + "required": [ + "api_key", + "grant_type" + ] + }, + "examples": { + "SecurityGrantApiKeyRequestExample1": { + "summary": "Grant an API key", + "description": "Run `POST /_security/api_key/grant` to create an API key on behalf of the `test_admin` user.\n", + "value": "{\n \"grant_type\": \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\",\n \"api_key\" : {\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n }\n}" + }, + "SecurityGrantApiKeyRequestExample2": { + "summary": "Grant an API key with run_as", + "description": "Run `POST /_security/api_key/grant`. The user (`test_admin`) whose credentials are provided can \"run as\" another user (`test_user`). The API key will be granted to the impersonated user (`test_user`).\n", + "value": "{\n \"grant_type\": \"password\",\n \"username\" : \"test_admin\", \n \"password\" : \"x-pack-test-password\", \n \"run_as\": \"test_user\", \n \"api_key\" : {\n \"name\": \"another-api-key\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_key": { + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "expiration": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "encoded": { + "type": "string" + } + }, + "required": [ + "api_key", + "id", + "name", + "encoded" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.9.0", + "x-variations": [ + "
\n POST\n /_security/api_key/grant\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `grant_api_key`\n" + ], + "x-api": "grant_api_key.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user/_has_privileges": { + "get": { + "tags": [ + "security" + ], + "summary": "Check user privileges", + "description": "Determine whether the specified user has a specified list of privileges.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-has-privileges.html" + }, + "operationId": "security-has-privileges", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "application": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.ApplicationPrivilegesCheck" + } + }, + "cluster": { + "description": "A list of the cluster privileges that you want to check.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "index": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.IndexPrivilegesCheck" + } + } + } + }, + "examples": { + "SecurityHasPrivilegesRequestExample1": { + "description": "Run `GET /_security/user/_has_privileges` to check whether the current user has a specific set of cluster, index, and application privileges.", + "value": "{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "application": { + "allOf": [ + { + "$ref": "#/components/schemas/security.has_privileges.ApplicationsPrivileges" + } + ] + }, + "cluster": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "has_all_requested": { + "type": "boolean" + }, + "index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.has_privileges.Privileges" + } + }, + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } + }, + "required": [ + "application", + "cluster", + "has_all_requested", + "index", + "username" + ] + }, + "examples": { + "SecurityHasPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/user/_has_privileges`, which lists the privileges for the `rdeniro` user.", + "value": "{\n \"username\": \"rdeniro\",\n \"has_all_requested\" : false,\n \"cluster\" : {\n \"monitor\" : true,\n \"manage\" : false\n },\n \"index\" : {\n \"suppliers\" : {\n \"read\" : true\n },\n \"products\" : {\n \"read\" : true\n },\n \"inventory\" : {\n \"read\" : true,\n \"write\" : false\n }\n },\n \"application\" : {\n \"inventory_manager\" : {\n \"product/1852563\" : {\n \"read\": false,\n \"data:write/inventory\": false\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n GET\n /_security/user/_has_privileges\n
\n ", + "
\n POST\n /_security/user/_has_privileges\n
\n " + ], + "x-api": "has_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Check user privileges", + "description": "Determine whether the specified user has a specified list of privileges.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-has-privileges.html" + }, + "operationId": "security-has-privileges-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "application": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.ApplicationPrivilegesCheck" + } + }, + "cluster": { + "description": "A list of the cluster privileges that you want to check.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "index": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.IndexPrivilegesCheck" + } + } + } + }, + "examples": { + "SecurityHasPrivilegesRequestExample1": { + "description": "Run `GET /_security/user/_has_privileges` to check whether the current user has a specific set of cluster, index, and application privileges.", + "value": "{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "application": { + "allOf": [ + { + "$ref": "#/components/schemas/security.has_privileges.ApplicationsPrivileges" + } + ] + }, + "cluster": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "has_all_requested": { + "type": "boolean" + }, + "index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.has_privileges.Privileges" + } + }, + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } + }, + "required": [ + "application", + "cluster", + "has_all_requested", + "index", + "username" + ] + }, + "examples": { + "SecurityHasPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/user/_has_privileges`, which lists the privileges for the `rdeniro` user.", + "value": "{\n \"username\": \"rdeniro\",\n \"has_all_requested\" : false,\n \"cluster\" : {\n \"monitor\" : true,\n \"manage\" : false\n },\n \"index\" : {\n \"suppliers\" : {\n \"read\" : true\n },\n \"products\" : {\n \"read\" : true\n },\n \"inventory\" : {\n \"read\" : true,\n \"write\" : false\n }\n },\n \"application\" : {\n \"inventory_manager\" : {\n \"product/1852563\" : {\n \"read\": false,\n \"data:write/inventory\": false\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n GET\n /_security/user/_has_privileges\n
\n ", + "
\n POST\n /_security/user/_has_privileges\n
\n " + ], + "x-api": "has_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/user/{user}/_has_privileges": { + "get": { + "tags": [ + "security" + ], + "summary": "Check user privileges", + "description": "Determine whether the specified user has a specified list of privileges.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-has-privileges.html" + }, + "operationId": "security-has-privileges-2", + "parameters": [ + { + "in": "path", + "name": "user", + "description": "Username", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "application": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.ApplicationPrivilegesCheck" + } + }, + "cluster": { + "description": "A list of the cluster privileges that you want to check.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "index": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.IndexPrivilegesCheck" + } + } + } + }, + "examples": { + "SecurityHasPrivilegesRequestExample1": { + "description": "Run `GET /_security/user/_has_privileges` to check whether the current user has a specific set of cluster, index, and application privileges.", + "value": "{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "application": { + "allOf": [ + { + "$ref": "#/components/schemas/security.has_privileges.ApplicationsPrivileges" + } + ] + }, + "cluster": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "has_all_requested": { + "type": "boolean" + }, + "index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.has_privileges.Privileges" + } + }, + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } + }, + "required": [ + "application", + "cluster", + "has_all_requested", + "index", + "username" + ] + }, + "examples": { + "SecurityHasPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/user/_has_privileges`, which lists the privileges for the `rdeniro` user.", + "value": "{\n \"username\": \"rdeniro\",\n \"has_all_requested\" : false,\n \"cluster\" : {\n \"monitor\" : true,\n \"manage\" : false\n },\n \"index\" : {\n \"suppliers\" : {\n \"read\" : true\n },\n \"products\" : {\n \"read\" : true\n },\n \"inventory\" : {\n \"read\" : true,\n \"write\" : false\n }\n },\n \"application\" : {\n \"inventory_manager\" : {\n \"product/1852563\" : {\n \"read\": false,\n \"data:write/inventory\": false\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n GET\n /_security/user/{user}/_has_privileges\n
\n ", + "
\n POST\n /_security/user/{user}/_has_privileges\n
\n " + ], + "x-api": "has_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Check user privileges", + "description": "Determine whether the specified user has a specified list of privileges.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/security-privileges", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-has-privileges.html" + }, + "operationId": "security-has-privileges-3", + "parameters": [ + { + "in": "path", + "name": "user", + "description": "Username", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "application": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.ApplicationPrivilegesCheck" + } + }, + "cluster": { + "description": "A list of the cluster privileges that you want to check.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "index": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.IndexPrivilegesCheck" + } + } + } + }, + "examples": { + "SecurityHasPrivilegesRequestExample1": { + "description": "Run `GET /_security/user/_has_privileges` to check whether the current user has a specific set of cluster, index, and application privileges.", + "value": "{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "application": { + "allOf": [ + { + "$ref": "#/components/schemas/security.has_privileges.ApplicationsPrivileges" + } + ] + }, + "cluster": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "has_all_requested": { + "type": "boolean" + }, + "index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.has_privileges.Privileges" + } + }, + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } + }, + "required": [ + "application", + "cluster", + "has_all_requested", + "index", + "username" + ] + }, + "examples": { + "SecurityHasPrivilegesResponseExample1": { + "description": "A successful response from `GET /_security/user/_has_privileges`, which lists the privileges for the `rdeniro` user.", + "value": "{\n \"username\": \"rdeniro\",\n \"has_all_requested\" : false,\n \"cluster\" : {\n \"monitor\" : true,\n \"manage\" : false\n },\n \"index\" : {\n \"suppliers\" : {\n \"read\" : true\n },\n \"products\" : {\n \"read\" : true\n },\n \"inventory\" : {\n \"read\" : true,\n \"write\" : false\n }\n },\n \"application\" : {\n \"inventory_manager\" : {\n \"product/1852563\" : {\n \"read\": false,\n \"data:write/inventory\": false\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.4.0", + "x-variations": [ + "
\n GET\n /_security/user/{user}/_has_privileges\n
\n ", + "
\n POST\n /_security/user/{user}/_has_privileges\n
\n " + ], + "x-api": "has_privileges.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/profile/_has_privileges": { + "get": { + "tags": [ + "security" + ], + "summary": "Check user profile privileges", + "description": "Determine whether the users associated with the specified user profile IDs have all the requested privileges.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/user-profiles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-has-privileges-user-profile.html" + }, + "operationId": "security-has-privileges-user-profile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uids": { + "description": "A list of profile IDs. The privileges are checked for associated users of the profiles.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfileId" + } + }, + "privileges": { + "description": "An object containing all the privileges to be checked.", + "allOf": [ + { + "$ref": "#/components/schemas/security.has_privileges_user_profile.PrivilegesCheck" + } + ] + } + }, + "required": [ + "uids", + "privileges" + ] + }, + "examples": { + "HasPrivilegesUserProfileRequestExample1": { + "description": "Run `POST /_security/profile/_has_privileges` to check whether the two users associated with the specified profiles have all the requested set of cluster, index, and application privileges.\n", + "value": "{\n \"uids\": [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n \"privileges\": {\n \"cluster\": [ \"monitor\", \"create_snapshot\", \"manage_ml\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"create_doc\"]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "has_privilege_uids": { + "description": "The subset of the requested profile IDs of the users that\nhave all the requested privileges.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfileId" + } + }, + "errors": { + "description": "The subset of the requested profile IDs for which an error\nwas encountered. It does not include the missing profile IDs\nor the profile IDs of the users that do not have all the\nrequested privileges. This field is absent if empty.", + "allOf": [ + { + "$ref": "#/components/schemas/security.has_privileges_user_profile.HasPrivilegesUserProfileErrors" + } + ] + } + }, + "required": [ + "has_privilege_uids" + ] + }, + "examples": { + "HasPrivilegesUserProfileResponseExample1": { + "description": "A response from `POST /_security/profile/_has_privileges` that indicates only one of the three users has all the privileges and one of them is not found.\n", + "value": "{\n \"has_privilege_uids\": [\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\"],\n \"errors\": {\n \"count\": 1,\n \"details\": {\n \"u_does-not-exist_0\": {\n \"type\": \"resource_not_found_exception\",\n \"reason\": \"profile document not found\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.3.0", + "x-variations": [ + "
\n GET\n /_security/profile/_has_privileges\n
\n ", + "
\n POST\n /_security/profile/_has_privileges\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "has_privileges_user_profile.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Check user profile privileges", + "description": "Determine whether the users associated with the specified user profile IDs have all the requested privileges.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/user-profiles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-has-privileges-user-profile.html" + }, + "operationId": "security-has-privileges-user-profile-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uids": { + "description": "A list of profile IDs. The privileges are checked for associated users of the profiles.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfileId" + } + }, + "privileges": { + "description": "An object containing all the privileges to be checked.", + "allOf": [ + { + "$ref": "#/components/schemas/security.has_privileges_user_profile.PrivilegesCheck" + } + ] + } + }, + "required": [ + "uids", + "privileges" + ] + }, + "examples": { + "HasPrivilegesUserProfileRequestExample1": { + "description": "Run `POST /_security/profile/_has_privileges` to check whether the two users associated with the specified profiles have all the requested set of cluster, index, and application privileges.\n", + "value": "{\n \"uids\": [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n \"privileges\": {\n \"cluster\": [ \"monitor\", \"create_snapshot\", \"manage_ml\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"create_doc\"]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "has_privilege_uids": { + "description": "The subset of the requested profile IDs of the users that\nhave all the requested privileges.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfileId" + } + }, + "errors": { + "description": "The subset of the requested profile IDs for which an error\nwas encountered. It does not include the missing profile IDs\nor the profile IDs of the users that do not have all the\nrequested privileges. This field is absent if empty.", + "allOf": [ + { + "$ref": "#/components/schemas/security.has_privileges_user_profile.HasPrivilegesUserProfileErrors" + } + ] + } + }, + "required": [ + "has_privilege_uids" + ] + }, + "examples": { + "HasPrivilegesUserProfileResponseExample1": { + "description": "A response from `POST /_security/profile/_has_privileges` that indicates only one of the three users has all the privileges and one of them is not found.\n", + "value": "{\n \"has_privilege_uids\": [\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\"],\n \"errors\": {\n \"count\": 1,\n \"details\": {\n \"u_does-not-exist_0\": {\n \"type\": \"resource_not_found_exception\",\n \"reason\": \"profile document not found\"\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.3.0", + "x-variations": [ + "
\n GET\n /_security/profile/_has_privileges\n
\n ", + "
\n POST\n /_security/profile/_has_privileges\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "has_privileges_user_profile.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/oidc/authenticate": { + "post": { + "tags": [ + "security" + ], + "summary": "Authenticate OpenID Connect", + "description": "Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.\n\nElasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.\nThese APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.", + "operationId": "security-oidc-authenticate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nonce": { + "description": "Associate a client session with an ID token and mitigate replay attacks.\nThis value needs to be the same as the one that was provided to the `/_security/oidc/prepare` API or the one that was generated by Elasticsearch and included in the response to that call.", + "type": "string" + }, + "realm": { + "description": "The name of the OpenID Connect realm.\nThis property is useful in cases where multiple realms are defined.", + "type": "string" + }, + "redirect_uri": { + "description": "The URL to which the OpenID Connect Provider redirected the User Agent in response to an authentication request after a successful authentication.\nThis URL must be provided as-is (URL encoded), taken from the body of the response or as the value of a location header in the response from the OpenID Connect Provider.", + "type": "string" + }, + "state": { + "description": "Maintain state between the authentication request and the response.\nThis value needs to be the same as the one that was provided to the `/_security/oidc/prepare` API or the one that was generated by Elasticsearch and included in the response to that call.", + "type": "string" + } + }, + "required": [ + "nonce", + "redirect_uri", + "state" + ] + }, + "examples": { + "OidcAuthenticateRequestExample1": { + "description": "Run `POST /_security/oidc/authenticate` to exchange the response that was returned from the OpenID Connect Provider after a successful authentication for an Elasticsearch access token and refresh token. This example is from an authentication that uses the authorization code grant flow.\n", + "value": "{\n \"redirect_uri\" : \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "description": "The Elasticsearch access token.", + "type": "string" + }, + "expires_in": { + "description": "The duration (in seconds) of the tokens.", + "type": "number" + }, + "refresh_token": { + "description": "The Elasticsearch refresh token.", + "type": "string" + }, + "type": { + "description": "The type of token.", + "type": "string" + } + }, + "required": [ + "access_token", + "expires_in", + "refresh_token", + "type" + ] + }, + "examples": { + "OidcAuthenticateResponseExample1": { + "description": "A successful response from `POST /_security/oidc/authenticate`. It contains the access and refresh tokens that were generated, the token duration (in seconds), and the type.\n", + "value": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_security/oidc/authenticate\n
\n " + ], + "x-api": "oidc_authenticate.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/oidc/logout": { + "post": { + "tags": [ + "security" + ], + "summary": "Logout of OpenID Connect", + "description": "Invalidate an access token and a refresh token that were generated as a response to the `/_security/oidc/authenticate` API.\n\nIf the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout.\n\nElasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.\nThese APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.", + "operationId": "security-oidc-logout", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "description": "The access token to be invalidated.", + "type": "string" + }, + "refresh_token": { + "description": "The refresh token to be invalidated.", + "type": "string" + } + }, + "required": [ + "token" + ] + }, + "examples": { + "OidcLogoutRequestExample1": { + "description": "Run `POST /_security/oidc/logout` to perform the logout.", + "value": "{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "redirect": { + "description": "A URI that points to the end session endpoint of the OpenID Connect Provider with all the parameters of the logout request as HTTP GET parameters.", + "type": "string" + } + }, + "required": [ + "redirect" + ] + }, + "examples": { + "OidcLogoutResponseExample1": { + "description": "A successful response from `POST /_security/oidc/logout`, which contains the URI pointing to the End Session Endpoint of the OpenID Connect Provider with all the parameters of the Logout Request as HTTP GET parameters.", + "value": "{\n \"redirect\" : \"https://op-provider.org/logout?id_token_hint=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&post_logout_redirect_uri=http%3A%2F%2Foidc-kibana.elastic.co%2Floggedout&state=lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_security/oidc/logout\n
\n " + ], + "x-api": "oidc_logout.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/oidc/prepare": { + "post": { + "tags": [ + "security" + ], + "summary": "Prepare OpenID connect authentication", + "description": "Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch.\n\nThe response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process.\n\nElasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.\nThese APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.", + "operationId": "security-oidc-prepare-authentication", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "iss": { + "description": "In the case of a third party initiated single sign on, this is the issuer identifier for the OP that the RP is to send the authentication request to.\nIt cannot be specified when *realm* is specified.\nOne of *realm* or *iss* is required.", + "type": "string" + }, + "login_hint": { + "description": "In the case of a third party initiated single sign on, it is a string value that is included in the authentication request as the *login_hint* parameter.\nThis parameter is not valid when *realm* is specified.", + "type": "string" + }, + "nonce": { + "description": "The value used to associate a client session with an ID token and to mitigate replay attacks.\nIf the caller of the API does not provide a value, Elasticsearch will generate one with sufficient entropy and return it in the response.", + "type": "string" + }, + "realm": { + "description": "The name of the OpenID Connect realm in Elasticsearch the configuration of which should be used in order to generate the authentication request.\nIt cannot be specified when *iss* is specified.\nOne of *realm* or *iss* is required.", + "type": "string" + }, + "state": { + "description": "The value used to maintain state between the authentication request and the response, typically used as a Cross-Site Request Forgery mitigation.\nIf the caller of the API does not provide a value, Elasticsearch will generate one with sufficient entropy and return it in the response.", + "type": "string" + } + } + }, + "examples": { + "OidcPrepareAuthenticationRequestExample1": { + "summary": "Prepare with realm", + "description": "Run `POST /_security/oidc/prepare` to generate an authentication request for the OpenID Connect Realm `oidc1`.\n", + "value": "{\n \"realm\" : \"oidc1\"\n}" + }, + "OidcPrepareAuthenticationRequestExample2": { + "summary": "Prepare with realm, state, and nonce", + "description": "Run `POST /_security/oidc/prepare` to generate an authentication request for the OpenID Connect Realm `oidc1`, where the values for the `state` and the `nonce` have been generated by the client.\n", + "value": "{\n \"realm\" : \"oidc1\",\n \"state\" : \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n \"nonce\" : \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\"\n}" + }, + "OidcPrepareAuthenticationRequestExample3": { + "summary": "Prepare by realm", + "description": "Run `POST /_security/oidc/prepare` to generate an authentication request for a third party initiated single sign on. Specify the issuer that should be used for matching the appropriate OpenID Connect Authentication realm.\n", + "value": "{\n \"iss\" : \"http://127.0.0.1:8080\",\n \"login_hint\": \"this_is_an_opaque_string\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nonce": { + "type": "string" + }, + "realm": { + "type": "string" + }, + "redirect": { + "description": "A URI that points to the authorization endpoint of the OpenID Connect Provider with all the parameters of the authentication request as HTTP GET parameters.", + "type": "string" + }, + "state": { + "type": "string" + } + }, + "required": [ + "nonce", + "realm", + "redirect", + "state" + ] + }, + "examples": { + "OidcPrepareAuthenticationResponseExample1": { + "description": "A successful response from `POST /_security/oidc/prepare`. It contains the URI pointing to the Authorization Endpoint of the OpenID Connect Provider with all the parameters of the Authentication Request as HTTP GET parameters.\n", + "value": "{\n \"redirect\" : \"http://127.0.0.1:8080/c2id-login?scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I&nonce=WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM&client_id=elasticsearch-rp\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_security/oidc/prepare\n
\n " + ], + "x-api": "oidc_prepare_authentication.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/_query/api_key": { + "get": { + "tags": [ + "security" + ], + "summary": "Find API keys with a query", + "description": "Get a paginated list of API keys and their information.\nYou can optionally filter the results with a query.\n\nTo use this API, you must have at least the `manage_own_api_key` or the `read_security` cluster privileges.\nIf you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.\nIf you have the `read_security`, `manage_api_key`, or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.\nRefer to the linked documentation for examples of how to find API keys:", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/query-api-keys", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-query-api-key.html" + }, + "operationId": "security-query-api-keys", + "parameters": [ + { + "in": "query", + "name": "with_limited_by", + "description": "Return the snapshot of the owner user's role descriptors associated with the API key.\nAn API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it).\nAn API key cannot retrieve any API key’s limited-by role descriptors (including itself) unless it has `manage_api_key` or higher privileges.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.5.0", + "style": "form" + }, + { + "in": "query", + "name": "with_profile_uid", + "description": "Determines whether to also retrieve the profile UID for the API key owner principal.\nIf it exists, the profile UID is returned under the `profile_uid` response field for each API key.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.14.0", + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Determines whether aggregation names are prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.14.0", + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "description": "Any aggregations to run over the corpus of returned API keys.\nAggregations and queries work together. Aggregations are computed only on the API keys that match the query.\nThis supports only a subset of aggregation types, namely: `terms`, `range`, `date_range`, `missing`,\n`cardinality`, `value_count`, `composite`, `filter`, and `filters`.\nAdditionally, aggregations only run over the same subset of fields that query works with.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregationContainer" + } + }, + "query": { + "description": "A query to filter which API keys to return.\nIf the query parameter is missing, it is equivalent to a `match_all` query.\nThe query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,\n`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.\nYou can query the following public information associated with an API key: `id`, `type`, `name`,\n`creation`, `expiration`, `invalidated`, `invalidation`, `username`, `realm`, and `metadata`.\n\nNOTE: The queryable string values associated with API keys are internally mapped as keywords.\nConsequently, if no `analyzer` parameter is specified for a `match` query, then the provided match query string is interpreted as a single keyword value.\nSuch a match query is hence equivalent to a `term` query.", + "allOf": [ + { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" + } + ] + }, + "from": { + "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "The sort definition.\nOther than `id`, all public fields of an API key are eligible for sorting.\nIn addition, sort can also be applied to the `_doc` field to sort by index order.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "size": { + "description": "The number of hits to return.\nIt must not be negative.\nThe `size` parameter can be set to `0`, in which case no API key matches are returned, only the aggregation results.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, + "type": "number" + }, + "search_after": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after" + }, + "description": "The search after definition.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + } + }, + "examples": { + "QueryApiKeysRequestExample1": { + "summary": "Query API keys by ID", + "description": "Run `GET /_security/_query/api_key?with_limited_by=true` to retrieve an API key by ID.", + "value": "{\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n}" + }, + "QueryApiKeysRequestExample2": { + "summary": "Query API keys with pagination", + "description": "Run `GET /_security/_query/api_key`. Use a `bool` query to issue complex logical conditions and use `from`, `size`, and `sort` to help paginate the result. For example, the API key name must begin with `app1-key-` and must not be `app1-key-01`. It must be owned by a username with the wildcard pattern `org-*-user` and the `environment` metadata field must have a `production` value. The offset to begin the search result is the twentieth (zero-based index) API key. The page size of the response is 10 API keys. The result is first sorted by creation date in descending order, then by name in ascending order.\n", + "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\" \n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\" \n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\" \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\" \n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\" \n }\n }\n ]\n }\n },\n \"from\": 20, \n \"size\": 10, \n \"sort\": [ \n { \"creation\": { \"order\": \"desc\", \"format\": \"date_time\" } },\n \"name\"\n ]\n}" + }, + "QueryApiKeysRequestExample3": { + "summary": "Query API keys by name", + "description": "Run `GET /_security/_query/api_key` to retrieve the API key by name.", + "value": "{\n \"query\": {\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "description": "The total number of API keys found.", + "type": "number" + }, + "count": { + "description": "The number of API keys returned in the response.", + "type": "number" + }, + "api_keys": { + "description": "A list of API key information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApiKey" + } + }, + "aggregations": { + "description": "The aggregations result, if requested.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregate" + } + } + }, + "required": [ + "total", + "count", + "api_keys" + ] + }, + "examples": { + "QueryApiKeysResponseExample1": { + "summary": "Query API keys by ID", + "description": "A successful response from `GET /_security/_query/api_key?with_limited_by=true`. The `limited_by` details are the owner user's permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key's effective permissions are an intersection of its assigned privileges and the owner user's permissions.\n", + "value": "{\n \"api_keys\": [\n {\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\",\n \"name\": \"application-key-1\",\n \"creation\": 1548550550158,\n \"expiration\": 1548551550158,\n \"invalidated\": false,\n \"username\": \"myuser\",\n \"realm\": \"native1\",\n \"realm_type\": \"native\",\n \"metadata\": {\n \"application\": \"my-application\"\n },\n \"role_descriptors\": { },\n \"limited_by\": [ \n {\n \"role-power-user\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample2": { + "summary": "Query API keys with pagination", + "description": "An abbreviated response from `GET /_security/_query/api_key` that contains a list of matched API keys along with their sort values. The first sort value is creation time, which is displayed in `date_time` format. The second sort value is the API key name.\n", + "value": "{\n \"total\": 100,\n \"count\": 10,\n \"api_keys\": [\n {\n \"id\": \"CLXgVnsBOGkf8IyjcXU7\",\n \"name\": \"app1-key-79\",\n \"creation\": 1629250154811,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:14.811Z\", \n \"app1-key-79\" \n ]\n },\n {\n \"id\": \"BrXgVnsBOGkf8IyjbXVB\",\n \"name\": \"app1-key-78\",\n \"creation\": 1629250153794,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:13.794Z\",\n \"app1-key-78\"\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample3": { + "summary": "Query all API keys", + "description": "A successful response from `GET /_security/_query/api_key`. It includes the role descriptors that are assigned to each API key when it was created or last updated. Note that an API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of the owner user's permissions. An empty role descriptors object means the API key inherits the owner user's permissions.\n", + "value": "{\n \"total\": 3,\n \"count\": 3,\n \"api_keys\": [ \n {\n \"id\": \"nkvrGXsB8w290t56q3Rg\",\n \"name\": \"my-api-key-1\",\n \"creation\": 1628227480421,\n \"expiration\": 1629091480421,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"realm_type\": \"reserved\",\n \"metadata\": {\n \"letter\": \"a\"\n },\n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n },\n {\n \"id\": \"oEvrGXsB8w290t5683TI\",\n \"name\": \"my-api-key-2\",\n \"creation\": 1628227498953,\n \"expiration\": 1628313898953,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"metadata\": {\n \"letter\": \"b\"\n },\n \"role_descriptors\": { } \n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.15.0", + "x-variations": [ + "
\n GET\n /_security/_query/api_key\n
\n ", + "
\n POST\n /_security/_query/api_key\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_own_api_key`,`read_security`\n" + ], + "x-api": "query_api_keys.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Find API keys with a query", + "description": "Get a paginated list of API keys and their information.\nYou can optionally filter the results with a query.\n\nTo use this API, you must have at least the `manage_own_api_key` or the `read_security` cluster privileges.\nIf you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.\nIf you have the `read_security`, `manage_api_key`, or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.\nRefer to the linked documentation for examples of how to find API keys:", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/query-api-keys", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-query-api-key.html" + }, + "operationId": "security-query-api-keys-1", + "parameters": [ + { + "in": "query", + "name": "with_limited_by", + "description": "Return the snapshot of the owner user's role descriptors associated with the API key.\nAn API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it).\nAn API key cannot retrieve any API key’s limited-by role descriptors (including itself) unless it has `manage_api_key` or higher privileges.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.5.0", + "style": "form" + }, + { + "in": "query", + "name": "with_profile_uid", + "description": "Determines whether to also retrieve the profile UID for the API key owner principal.\nIf it exists, the profile UID is returned under the `profile_uid` response field for each API key.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.14.0", + "style": "form" + }, + { + "in": "query", + "name": "typed_keys", + "description": "Determines whether aggregation names are prefixed by their respective types in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.14.0", + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "description": "Any aggregations to run over the corpus of returned API keys.\nAggregations and queries work together. Aggregations are computed only on the API keys that match the query.\nThis supports only a subset of aggregation types, namely: `terms`, `range`, `date_range`, `missing`,\n`cardinality`, `value_count`, `composite`, `filter`, and `filters`.\nAdditionally, aggregations only run over the same subset of fields that query works with.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregationContainer" + } + }, + "query": { + "description": "A query to filter which API keys to return.\nIf the query parameter is missing, it is equivalent to a `match_all` query.\nThe query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,\n`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.\nYou can query the following public information associated with an API key: `id`, `type`, `name`,\n`creation`, `expiration`, `invalidated`, `invalidation`, `username`, `realm`, and `metadata`.\n\nNOTE: The queryable string values associated with API keys are internally mapped as keywords.\nConsequently, if no `analyzer` parameter is specified for a `match` query, then the provided match query string is interpreted as a single keyword value.\nSuch a match query is hence equivalent to a `term` query.", + "allOf": [ + { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" + } + ] + }, + "from": { + "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "The sort definition.\nOther than `id`, all public fields of an API key are eligible for sorting.\nIn addition, sort can also be applied to the `_doc` field to sort by index order.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "size": { + "description": "The number of hits to return.\nIt must not be negative.\nThe `size` parameter can be set to `0`, in which case no API key matches are returned, only the aggregation results.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, + "type": "number" + }, + "search_after": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after" + }, + "description": "The search after definition.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + } + }, + "examples": { + "QueryApiKeysRequestExample1": { + "summary": "Query API keys by ID", + "description": "Run `GET /_security/_query/api_key?with_limited_by=true` to retrieve an API key by ID.", + "value": "{\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n}" + }, + "QueryApiKeysRequestExample2": { + "summary": "Query API keys with pagination", + "description": "Run `GET /_security/_query/api_key`. Use a `bool` query to issue complex logical conditions and use `from`, `size`, and `sort` to help paginate the result. For example, the API key name must begin with `app1-key-` and must not be `app1-key-01`. It must be owned by a username with the wildcard pattern `org-*-user` and the `environment` metadata field must have a `production` value. The offset to begin the search result is the twentieth (zero-based index) API key. The page size of the response is 10 API keys. The result is first sorted by creation date in descending order, then by name in ascending order.\n", + "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\" \n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\" \n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\" \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\" \n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\" \n }\n }\n ]\n }\n },\n \"from\": 20, \n \"size\": 10, \n \"sort\": [ \n { \"creation\": { \"order\": \"desc\", \"format\": \"date_time\" } },\n \"name\"\n ]\n}" + }, + "QueryApiKeysRequestExample3": { + "summary": "Query API keys by name", + "description": "Run `GET /_security/_query/api_key` to retrieve the API key by name.", + "value": "{\n \"query\": {\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "description": "The total number of API keys found.", + "type": "number" + }, + "count": { + "description": "The number of API keys returned in the response.", + "type": "number" + }, + "api_keys": { + "description": "A list of API key information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApiKey" + } + }, + "aggregations": { + "description": "The aggregations result, if requested.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregate" + } + } + }, + "required": [ + "total", + "count", + "api_keys" + ] + }, + "examples": { + "QueryApiKeysResponseExample1": { + "summary": "Query API keys by ID", + "description": "A successful response from `GET /_security/_query/api_key?with_limited_by=true`. The `limited_by` details are the owner user's permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key's effective permissions are an intersection of its assigned privileges and the owner user's permissions.\n", + "value": "{\n \"api_keys\": [\n {\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\",\n \"name\": \"application-key-1\",\n \"creation\": 1548550550158,\n \"expiration\": 1548551550158,\n \"invalidated\": false,\n \"username\": \"myuser\",\n \"realm\": \"native1\",\n \"realm_type\": \"native\",\n \"metadata\": {\n \"application\": \"my-application\"\n },\n \"role_descriptors\": { },\n \"limited_by\": [ \n {\n \"role-power-user\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample2": { + "summary": "Query API keys with pagination", + "description": "An abbreviated response from `GET /_security/_query/api_key` that contains a list of matched API keys along with their sort values. The first sort value is creation time, which is displayed in `date_time` format. The second sort value is the API key name.\n", + "value": "{\n \"total\": 100,\n \"count\": 10,\n \"api_keys\": [\n {\n \"id\": \"CLXgVnsBOGkf8IyjcXU7\",\n \"name\": \"app1-key-79\",\n \"creation\": 1629250154811,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:14.811Z\", \n \"app1-key-79\" \n ]\n },\n {\n \"id\": \"BrXgVnsBOGkf8IyjbXVB\",\n \"name\": \"app1-key-78\",\n \"creation\": 1629250153794,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:13.794Z\",\n \"app1-key-78\"\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample3": { + "summary": "Query all API keys", + "description": "A successful response from `GET /_security/_query/api_key`. It includes the role descriptors that are assigned to each API key when it was created or last updated. Note that an API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of the owner user's permissions. An empty role descriptors object means the API key inherits the owner user's permissions.\n", + "value": "{\n \"total\": 3,\n \"count\": 3,\n \"api_keys\": [ \n {\n \"id\": \"nkvrGXsB8w290t56q3Rg\",\n \"name\": \"my-api-key-1\",\n \"creation\": 1628227480421,\n \"expiration\": 1629091480421,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"realm_type\": \"reserved\",\n \"metadata\": {\n \"letter\": \"a\"\n },\n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n },\n {\n \"id\": \"oEvrGXsB8w290t5683TI\",\n \"name\": \"my-api-key-2\",\n \"creation\": 1628227498953,\n \"expiration\": 1628313898953,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"metadata\": {\n \"letter\": \"b\"\n },\n \"role_descriptors\": { } \n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.15.0", + "x-variations": [ + "
\n GET\n /_security/_query/api_key\n
\n ", + "
\n POST\n /_security/_query/api_key\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_own_api_key`,`read_security`\n" + ], + "x-api": "query_api_keys.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/_query/role": { + "get": { + "tags": [ + "security" + ], + "summary": "Find roles with a query", + "description": "Get roles in a paginated manner.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe query roles API does not retrieve roles that are defined in roles files, nor built-in ones.\nYou can optionally filter the results with a query.\nAlso, the results can be paginated and sorted.", + "operationId": "security-query-role", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "A query to filter which roles to return.\nIf the query parameter is missing, it is equivalent to a `match_all` query.\nThe query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,\n`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.\nYou can query the following information associated with roles: `name`, `description`, `metadata`,\n`applications.application`, `applications.privileges`, and `applications.resources`.", + "allOf": [ + { + "$ref": "#/components/schemas/security.query_role.RoleQueryContainer" + } + ] + }, + "from": { + "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "sort": { + "description": "The sort definition.\nYou can sort on `name`, `description`, `metadata`, `applications.application`, `applications.privileges`,\nand `applications.resources`.\nIn addition, sort can also be applied to the `_doc` field to sort by index order.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "size": { + "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, + "type": "number" + }, + "search_after": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after" + }, + "description": "The search after definition.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + } + }, + "examples": { + "QueryRolesRequestExample1": { + "summary": "Query roles by name", + "description": "Run `POST /_security/_query/role` to lists all roles, sorted by the role name.", + "value": "{\n \"sort\": [\"name\"]\n}" + }, + "QueryRolesRequestExample2": { + "summary": "Query roles by description", + "description": "Run `POST /_security/_query/role` to query only the user access role, given its description. It returns only the best matching role because `size` is set to `1`.\n", + "value": "{\n \"query\": {\n \"match\": {\n \"description\": {\n \"query\": \"user access\"\n }\n }\n },\n \"size\": 1 \n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "description": "The total number of roles found.", + "type": "number" + }, + "count": { + "description": "The number of roles returned in the response.", + "type": "number" + }, + "roles": { + "description": "A list of roles that match the query.\nThe returned role format is an extension of the role definition format.\nIt adds the `transient_metadata.enabled` and the `_sort` fields.\n`transient_metadata.enabled` is set to `false` in case the role is automatically disabled, for example when the role grants privileges that are not allowed by the installed license.\n`_sort` is present when the search query sorts on some field.\nIt contains the array of values that have been used for sorting.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security.query_role.QueryRole" + } + } + }, + "required": [ + "total", + "count", + "roles" + ] + }, + "examples": { + "QueryRolesResponseExample1": { + "summary": "Query roles by name", + "description": "A successful response from `POST /_security/_query/role`. It returns a JSON structure that contains the information retrieved for one or more roles.\n", + "value": "{\n \"total\": 2,\n \"count\": 2,\n \"roles\": [ \n {\n \"name\" : \"my_admin_role\",\n \"cluster\" : [\n \"all\"\n ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [\n \"other_user\"\n ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants full access to all management features within the cluster.\",\n \"_sort\" : [\n \"my_admin_role\"\n ]\n },\n {\n \"name\" : \"my_user_role\",\n \"cluster\" : [ ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants user access to some indicies.\",\n \"_sort\" : [\n \"my_user_role\"\n ]\n }\n ]\n}" + }, + "QueryRolesResponseExample2": { + "summary": "Query roles by description", + "description": "A successful response from `POST /_security/_query/role`.\n", + "value": "{\n \"total\": 2,\n \"count\": 1,\n \"roles\": [\n {\n \"name\" : \"my_user_role\",\n \"cluster\" : [ ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants user access to some indicies.\"\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n GET\n /_security/_query/role\n
\n ", + "
\n POST\n /_security/_query/role\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "query_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Find roles with a query", + "description": "Get roles in a paginated manner.\nThe role management APIs are generally the preferred way to manage roles, rather than using file-based role management.\nThe query roles API does not retrieve roles that are defined in roles files, nor built-in ones.\nYou can optionally filter the results with a query.\nAlso, the results can be paginated and sorted.", + "operationId": "security-query-role-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "A query to filter which roles to return.\nIf the query parameter is missing, it is equivalent to a `match_all` query.\nThe query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,\n`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.\nYou can query the following information associated with roles: `name`, `description`, `metadata`,\n`applications.application`, `applications.privileges`, and `applications.resources`.", + "allOf": [ + { + "$ref": "#/components/schemas/security.query_role.RoleQueryContainer" + } + ] + }, + "from": { + "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "sort": { + "description": "The sort definition.\nYou can sort on `name`, `description`, `metadata`, `applications.application`, `applications.privileges`,\nand `applications.resources`.\nIn addition, sort can also be applied to the `_doc` field to sort by index order.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "size": { + "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, + "type": "number" + }, + "search_after": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after" + }, + "description": "The search after definition.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + } + }, + "examples": { + "QueryRolesRequestExample1": { + "summary": "Query roles by name", + "description": "Run `POST /_security/_query/role` to lists all roles, sorted by the role name.", + "value": "{\n \"sort\": [\"name\"]\n}" + }, + "QueryRolesRequestExample2": { + "summary": "Query roles by description", + "description": "Run `POST /_security/_query/role` to query only the user access role, given its description. It returns only the best matching role because `size` is set to `1`.\n", + "value": "{\n \"query\": {\n \"match\": {\n \"description\": {\n \"query\": \"user access\"\n }\n }\n },\n \"size\": 1 \n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "description": "The total number of roles found.", + "type": "number" + }, + "count": { + "description": "The number of roles returned in the response.", + "type": "number" + }, + "roles": { + "description": "A list of roles that match the query.\nThe returned role format is an extension of the role definition format.\nIt adds the `transient_metadata.enabled` and the `_sort` fields.\n`transient_metadata.enabled` is set to `false` in case the role is automatically disabled, for example when the role grants privileges that are not allowed by the installed license.\n`_sort` is present when the search query sorts on some field.\nIt contains the array of values that have been used for sorting.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security.query_role.QueryRole" + } + } + }, + "required": [ + "total", + "count", + "roles" + ] + }, + "examples": { + "QueryRolesResponseExample1": { + "summary": "Query roles by name", + "description": "A successful response from `POST /_security/_query/role`. It returns a JSON structure that contains the information retrieved for one or more roles.\n", + "value": "{\n \"total\": 2,\n \"count\": 2,\n \"roles\": [ \n {\n \"name\" : \"my_admin_role\",\n \"cluster\" : [\n \"all\"\n ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [\n \"other_user\"\n ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants full access to all management features within the cluster.\",\n \"_sort\" : [\n \"my_admin_role\"\n ]\n },\n {\n \"name\" : \"my_user_role\",\n \"cluster\" : [ ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants user access to some indicies.\",\n \"_sort\" : [\n \"my_user_role\"\n ]\n }\n ]\n}" + }, + "QueryRolesResponseExample2": { + "summary": "Query roles by description", + "description": "A successful response from `POST /_security/_query/role`.\n", + "value": "{\n \"total\": 2,\n \"count\": 1,\n \"roles\": [\n {\n \"name\" : \"my_user_role\",\n \"cluster\" : [ ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants user access to some indicies.\"\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n GET\n /_security/_query/role\n
\n ", + "
\n POST\n /_security/_query/role\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "query_role.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/_query/user": { + "get": { + "tags": [ + "security" + ], + "summary": "Find users with a query", + "description": "Get information for users in a paginated manner.\nYou can optionally filter the results with a query.\n\nNOTE: As opposed to the get user API, built-in users are excluded from the result.\nThis API is only for native users.", + "operationId": "security-query-user", + "parameters": [ + { + "in": "query", + "name": "with_profile_uid", + "description": "Determines whether to retrieve the user profile UID, if it exists, for the users.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "A query to filter which users to return.\nIf the query parameter is missing, it is equivalent to a `match_all` query.\nThe query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,\n`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.\nYou can query the following information associated with user: `username`, `roles`, `enabled`, `full_name`, and `email`.", + "allOf": [ + { + "$ref": "#/components/schemas/security.query_user.UserQueryContainer" + } + ] + }, + "from": { + "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "The sort definition.\nFields eligible for sorting are: `username`, `roles`, `enabled`.\nIn addition, sort can also be applied to the `_doc` field to sort by index order.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "size": { + "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, + "type": "number" + }, + "search_after": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after" + }, + "description": "The search after definition", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + } + }, + "examples": { + "SecurityQueryUserRequestExample1": { + "summary": "Query users by role prefix", + "description": "Run `POST /_security/_query/user?with_profile_uid=true` to get users that have roles that are prefixed with `other`. It will also include the user `profile_uid` in the response.\n", + "value": "{\n \"query\": {\n \"prefix\": {\n \"roles\": \"other\"\n }\n }\n}" + }, + "SecurityQueryUserRequestExample2": { + "summary": "Query users with multiple conditions", + "description": "Run `POST /_security/_query/user`. Use a `bool` query to issue complex logical conditions: The `email` must end with `example.com`. The user must be enabled. The result will be filtered to only contain users with at least one role that contains the substring `other`. The offset to begin the search result is the second (zero-based index) user. The page size of the response is two users. The result is sorted by `username` in descending order.\n", + "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"wildcard\": {\n \"email\": \"*example.com\" \n }\n },\n {\n \"term\": {\n \"enabled\": true \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"roles\": \"*other*\" \n }\n }\n ]\n }\n },\n \"from\": 1, \n \"size\": 2, \n \"sort\": [\n { \"username\": { \"order\": \"desc\"} } \n ]\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "description": "The total number of users found.", + "type": "number" + }, + "count": { + "description": "The number of users returned in the response.", + "type": "number" + }, + "users": { + "description": "A list of users that match the query.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security.query_user.QueryUser" + } + } + }, + "required": [ + "total", + "count", + "users" + ] + }, + "examples": { + "SecurityQueryUserResponseExample1": { + "summary": "Query users by role prefix", + "description": "A successful response from `POST /_security/_query/user?with_profile_uid=true` that contains users that have roles that are prefixed with `other`. It also includes the user `profile_uid` in the response.\n", + "value": "{\n \"total\": 1,\n \"count\": 1,\n \"users\": [\n {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"profile_uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n }\n ]\n}" + }, + "SecurityQueryUserResponseExample2": { + "summary": "Query users with multiple conditions", + "description": "A successful response from `POST /_security/_query/user` that uses a `bool` query to issue complex logical conditions and uses `from`, `size`, and `sort` to help paginate the result. The sort value is `username`.\n", + "value": "{\n \"total\": 5,\n \"count\": 2,\n \"users\": [\n {\n \"username\": \"ray\",\n \"roles\": [\n \"other_role3\"\n ],\n \"full_name\": \"Ray Nicholson\",\n \"email\": \"rayn@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"_sort\": [\n \"ray\" \n ]\n },\n {\n \"username\": \"lorraine\",\n \"roles\": [\n \"other_role3\"\n ],\n \"full_name\": \"Lorraine Nicholson\",\n \"email\": \"lorraine@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"_sort\": [\n \"lorraine\"\n ]\n }\n ]\n}" + }, + "SecurityQueryUserResponseExample3": { + "summary": "Query all users", + "description": "A successful response from `GET /_security/_query/user`, which lists all users. It returns a JSON structure that contains the information retrieved from one or more users.\n", + "value": "{\n \"total\": 2,\n \"count\": 2,\n \"users\": [ \n {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true\n },\n {\n \"username\": \"sandrakn\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Sandra Knight\",\n \"email\": \"sandrakn@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.14.0", + "x-variations": [ + "
\n GET\n /_security/_query/user\n
\n ", + "
\n POST\n /_security/_query/user\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "query_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Find users with a query", + "description": "Get information for users in a paginated manner.\nYou can optionally filter the results with a query.\n\nNOTE: As opposed to the get user API, built-in users are excluded from the result.\nThis API is only for native users.", + "operationId": "security-query-user-1", + "parameters": [ + { + "in": "query", + "name": "with_profile_uid", + "description": "Determines whether to retrieve the user profile UID, if it exists, for the users.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "A query to filter which users to return.\nIf the query parameter is missing, it is equivalent to a `match_all` query.\nThe query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,\n`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.\nYou can query the following information associated with user: `username`, `roles`, `enabled`, `full_name`, and `email`.", + "allOf": [ + { + "$ref": "#/components/schemas/security.query_user.UserQueryContainer" + } + ] + }, + "from": { + "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "The sort definition.\nFields eligible for sorting are: `username`, `roles`, `enabled`.\nIn addition, sort can also be applied to the `_doc` field to sort by index order.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "size": { + "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, + "type": "number" + }, + "search_after": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after" + }, + "description": "The search after definition", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + } + }, + "examples": { + "SecurityQueryUserRequestExample1": { + "summary": "Query users by role prefix", + "description": "Run `POST /_security/_query/user?with_profile_uid=true` to get users that have roles that are prefixed with `other`. It will also include the user `profile_uid` in the response.\n", + "value": "{\n \"query\": {\n \"prefix\": {\n \"roles\": \"other\"\n }\n }\n}" + }, + "SecurityQueryUserRequestExample2": { + "summary": "Query users with multiple conditions", + "description": "Run `POST /_security/_query/user`. Use a `bool` query to issue complex logical conditions: The `email` must end with `example.com`. The user must be enabled. The result will be filtered to only contain users with at least one role that contains the substring `other`. The offset to begin the search result is the second (zero-based index) user. The page size of the response is two users. The result is sorted by `username` in descending order.\n", + "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"wildcard\": {\n \"email\": \"*example.com\" \n }\n },\n {\n \"term\": {\n \"enabled\": true \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"roles\": \"*other*\" \n }\n }\n ]\n }\n },\n \"from\": 1, \n \"size\": 2, \n \"sort\": [\n { \"username\": { \"order\": \"desc\"} } \n ]\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "description": "The total number of users found.", + "type": "number" + }, + "count": { + "description": "The number of users returned in the response.", + "type": "number" + }, + "users": { + "description": "A list of users that match the query.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security.query_user.QueryUser" + } + } + }, + "required": [ + "total", + "count", + "users" + ] + }, + "examples": { + "SecurityQueryUserResponseExample1": { + "summary": "Query users by role prefix", + "description": "A successful response from `POST /_security/_query/user?with_profile_uid=true` that contains users that have roles that are prefixed with `other`. It also includes the user `profile_uid` in the response.\n", + "value": "{\n \"total\": 1,\n \"count\": 1,\n \"users\": [\n {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"profile_uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n }\n ]\n}" + }, + "SecurityQueryUserResponseExample2": { + "summary": "Query users with multiple conditions", + "description": "A successful response from `POST /_security/_query/user` that uses a `bool` query to issue complex logical conditions and uses `from`, `size`, and `sort` to help paginate the result. The sort value is `username`.\n", + "value": "{\n \"total\": 5,\n \"count\": 2,\n \"users\": [\n {\n \"username\": \"ray\",\n \"roles\": [\n \"other_role3\"\n ],\n \"full_name\": \"Ray Nicholson\",\n \"email\": \"rayn@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"_sort\": [\n \"ray\" \n ]\n },\n {\n \"username\": \"lorraine\",\n \"roles\": [\n \"other_role3\"\n ],\n \"full_name\": \"Lorraine Nicholson\",\n \"email\": \"lorraine@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"_sort\": [\n \"lorraine\"\n ]\n }\n ]\n}" + }, + "SecurityQueryUserResponseExample3": { + "summary": "Query all users", + "description": "A successful response from `GET /_security/_query/user`, which lists all users. It returns a JSON structure that contains the information retrieved from one or more users.\n", + "value": "{\n \"total\": 2,\n \"count\": 2,\n \"users\": [ \n {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true\n },\n {\n \"username\": \"sandrakn\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Sandra Knight\",\n \"email\": \"sandrakn@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.14.0", + "x-variations": [ + "
\n GET\n /_security/_query/user\n
\n ", + "
\n POST\n /_security/_query/user\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "query_user.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/saml/authenticate": { + "post": { + "tags": [ + "security" + ], + "summary": "Authenticate SAML", + "description": "Submit a SAML response message to Elasticsearch for consumption.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThe SAML message that is submitted can be:\n\n* A response to a SAML authentication request that was previously created using the SAML prepare authentication API.\n* An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow.\n\nIn either case, the SAML message needs to be a base64 encoded XML document with a root element of ``.\n\nAfter successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.\nThis API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-authenticate.html" + }, + "operationId": "security-saml-authenticate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "description": "The SAML response as it was sent by the user's browser, usually a Base64 encoded XML document.", + "type": "string" + }, + "ids": { + "description": "A JSON array with all the valid SAML Request Ids that the caller of the API has for the current user.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + }, + "realm": { + "description": "The name of the realm that should authenticate the SAML response. Useful in cases where many SAML realms are defined.", + "type": "string" + } + }, + "required": [ + "content", + "ids" + ] + }, + "examples": { + "SamlAuthenticateRequestExample1": { + "description": "Run `POST /_security/saml/authenticate` to exchange a SAML Response indicating a successful authentication at the SAML IdP for an Elasticsearch access token and refresh token to be used in subsequent requests.\n", + "value": "{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : [\"4fee3b046395c4e751011e97f8900b5273d56685\"]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "description": "The access token that was generated by Elasticsearch.", + "type": "string" + }, + "username": { + "description": "The authenticated user's name.", + "type": "string" + }, + "expires_in": { + "description": "The amount of time (in seconds) left until the token expires.", + "type": "number" + }, + "refresh_token": { + "description": "The refresh token that was generated by Elasticsearch.", + "type": "string" + }, + "realm": { + "description": "The name of the realm where the user was authenticated.", + "type": "string" + }, + "in_response_to": { + "description": "The id of the request that initiated the authentication process.", + "type": "string" + } + }, + "required": [ + "access_token", + "username", + "expires_in", + "refresh_token", + "realm" + ] + }, + "examples": { + "SamlAuthenticateResponseExample1": { + "description": "A successful response from `POST /_security/saml/authenticate`.", + "value": "{\n \"access_token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"username\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"mJdXLtmvTUSpoLwMvdBt_w\",\n \"realm\": \"saml1\",\n \"in_response_to\": \"4fee3b046395c4e751011e97f8900b5273d56685\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_security/saml/authenticate\n
\n " + ], + "x-api": "saml_authenticate.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/saml/complete_logout": { + "post": { + "tags": [ + "security" + ], + "summary": "Logout of SAML completely", + "description": "Verifies the logout response sent from the SAML IdP.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThe SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout.\nThis API verifies the response by ensuring the content is relevant and validating its signature.\nAn empty response is returned if the verification process is successful.\nThe response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding.\nThe caller of this API must prepare the request accordingly so that this API can handle either of them.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-complete-logout.html" + }, + "operationId": "security-saml-complete-logout", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "realm": { + "description": "The name of the SAML realm in Elasticsearch for which the configuration is used to verify the logout response.", + "type": "string" + }, + "ids": { + "description": "A JSON array with all the valid SAML Request Ids that the caller of the API has for the current user.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + }, + "query_string": { + "description": "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.", + "type": "string" + }, + "content": { + "description": "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.", + "type": "string" + } + }, + "required": [ + "realm", + "ids" + ] + }, + "examples": { + "SamlCompleteLogoutRequestExample1": { + "summary": "HTTP-Redirect binding", + "description": "Run `POST /_security/saml/complete_logout` to verify the logout response sent by the SAML IdP using the HTTP-Redirect binding.\n", + "value": "{\n \"realm\": \"saml1\",\n \"ids\": [ \"_1c368075e0b3...\" ],\n \"query_string\": \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\"\n}" + }, + "SamlCompleteLogoutRequestExample2": { + "summary": "HTTP-Post binding", + "description": "Run `POST /_security/saml/complete_logout` to verify the logout response sent by the SAML IdP using the HTTP-Post binding.\n", + "value": "{\n \"realm\": \"saml1\",\n \"ids\": [ \"_1c368075e0b3...\" ],\n \"content\": \"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": {} + } + } + }, + "x-state": "Generally available; Added in 7.14.0", + "x-variations": [ + "
\n POST\n /_security/saml/complete_logout\n
\n " + ], + "x-api": "saml_complete_logout.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/saml/invalidate": { + "post": { + "tags": [ + "security" + ], + "summary": "Invalidate SAML", + "description": "Submit a SAML LogoutRequest message to Elasticsearch for consumption.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThe logout request comes from the SAML IdP during an IdP initiated Single Logout.\nThe custom web application can use this API to have Elasticsearch process the `LogoutRequest`.\nAfter successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message.\nThus the user can be redirected back to their IdP.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-invalidate.html" + }, + "operationId": "security-saml-invalidate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acs": { + "description": "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.", + "type": "string" + }, + "query_string": { + "description": "The query part of the URL that the user was redirected to by the SAML IdP to initiate the Single Logout.\nThis query should include a single parameter named `SAMLRequest` that contains a SAML logout request that is deflated and Base64 encoded.\nIf 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.\nIn 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.\nThe client application must not attempt to parse or process the string in any way.", + "type": "string" + }, + "realm": { + "description": "The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the `acs` parameter.", + "type": "string" + } + }, + "required": [ + "query_string" + ] + }, + "examples": { + "SamlInvalidateRequestExample1": { + "description": "Run `POST /_security/saml/invalidate` to invalidate all the tokens for realm `saml1` pertaining to the user that is identified in the SAML Logout Request.\n", + "value": "{\n \"query_string\" : \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" : \"saml1\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invalidated": { + "description": "The number of tokens that were invalidated as part of this logout.", + "type": "number" + }, + "realm": { + "description": "The realm name of the SAML realm in Elasticsearch that authenticated the user.", + "type": "string" + }, + "redirect": { + "description": "A SAML logout response as a parameter so that the user can be redirected back to the SAML IdP.", + "type": "string" + } + }, + "required": [ + "invalidated", + "realm", + "redirect" + ] + }, + "examples": { + "SamlInvalidateResponseExample1": { + "description": "A successful response from `POST /_security/saml/invalidate`.", + "value": "{\n \"redirect\" : \"https://my-idp.org/logout/SAMLResponse=....\",\n \"invalidated\" : 2,\n \"realm\" : \"saml1\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_security/saml/invalidate\n
\n " + ], + "x-api": "saml_invalidate.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/saml/logout": { + "post": { + "tags": [ + "security" + ], + "summary": "Logout of SAML", + "description": "Submits a request to invalidate an access token and refresh token.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThis API invalidates the tokens that were generated for a user by the SAML authenticate API.\nIf the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout).", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-logout.html" + }, + "operationId": "security-saml-logout", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "description": "The access token that was returned as a response to calling the SAML authenticate API.\nAlternatively, the most recent token that was received after refreshing the original one by using a `refresh_token`.", + "type": "string" + }, + "refresh_token": { + "description": "The refresh token that was returned as a response to calling the SAML authenticate API.\nAlternatively, the most recent refresh token that was received after refreshing the original access token.", + "type": "string" + } + }, + "required": [ + "token" + ] + }, + "examples": { + "SamlLogoutRequestExample1": { + "description": "Run `POST /_security/saml/logout` to invalidate the pair of tokens that were generated by calling the SAML authenticate API with a successful SAML response.\n", + "value": "{\n \"token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\" : \"mJdXLtmvTUSpoLwMvdBt_w\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "redirect": { + "description": "A URL that contains a SAML logout request as a parameter.\nYou can use this URL to be redirected back to the SAML IdP and to initiate Single Logout.", + "type": "string" + } + }, + "required": [ + "redirect" + ] + }, + "examples": { + "SamlLogoutResponseExample1": { + "description": "A successful response from `POST /_security/saml/logout`.", + "value": "{\n \"redirect\" : \"https://my-idp.org/logout/SAMLRequest=....\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_security/saml/logout\n
\n " + ], + "x-api": "saml_logout.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/saml/prepare": { + "post": { + "tags": [ + "security" + ], + "summary": "Prepare SAML authentication", + "description": "Create a SAML authentication request (``) as a URL string based on the configuration of the respective SAML realm in Elasticsearch.\n\nNOTE: This API is intended for use by custom web applications other than Kibana.\nIf you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.\n\nThis API returns a URL pointing to the SAML Identity Provider.\nYou can use the URL to redirect the browser of the user in order to continue the authentication process.\nThe URL includes a single parameter named `SAMLRequest`, which contains a SAML Authentication request that is deflated and Base64 encoded.\nIf the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named `SigAlg` and `Signature`.\nThese parameters contain the algorithm used for the signature and the signature value itself.\nIt also returns a random string that uniquely identifies this SAML Authentication request.\nThe caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-prepare-authentication.html" + }, + "operationId": "security-saml-prepare-authentication", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acs": { + "description": "The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch.\nThe realm is used to generate the authentication request. You must specify either this parameter or the `realm` parameter.", + "type": "string" + }, + "realm": { + "description": "The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request.\nYou must specify either this parameter or the `acs` parameter.", + "type": "string" + }, + "relay_state": { + "description": "A string that will be included in the redirect URL that this API returns as the `RelayState` query parameter.\nIf the Authentication Request is signed, this value is used as part of the signature computation.", + "type": "string" + } + } + }, + "examples": { + "SamlPrepareAuthenticationRequestExample1": { + "summary": "Prepare with a realm", + "description": "Run `POST /_security/saml/prepare` to generate a SAML authentication request for the SAML realm named `saml1`.\n", + "value": "{\n \"realm\" : \"saml1\"\n}" + }, + "SamlPrepareAuthenticationRequestExample2": { + "summary": "Prepare with an ACS", + "description": "Run `POST /_security/saml/prepare` to generate a SAML authentication request for the SAML realm with an Assertion Consuming Service (ACS) URL.\n", + "value": "{\n \"acs\" : \"https://kibana.org/api/security/saml/callback\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "A unique identifier for the SAML Request to be stored by the caller of the API.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "realm": { + "description": "The name of the Elasticsearch realm that was used to construct the authentication request.", + "type": "string" + }, + "redirect": { + "description": "The URL to redirect the user to.", + "type": "string" + } + }, + "required": [ + "id", + "realm", + "redirect" + ] + }, + "examples": { + "SAmlPrepareAuthenticationResponseExample1": { + "description": "A successful response from `POST /_security/saml/prepare`.", + "value": "{\n \"redirect\": \"https://my-idp.org/login?SAMLRequest=fVJdc6IwFP0rmbwDgUKLGbFDtc462%2B06FX3Yl50rBJsKCZsbrPbXL6J22hdfk%2FNx7zl3eL%2BvK7ITBqVWCfVdRolQuS6k2iR0mU2dmN6Phgh1FTQ8be2rehH%2FWoGWdESF%2FPST0NYorgElcgW1QG5zvkh%2FPfHAZbwx2upcV5SkiMLYzmqsFba1MAthdjIXy5enhL5a23DPOyo6W7kGBa7cwhZ2gO7G8OiW%2BR400kORt0bag7fzezAlk24eqcD2OxxlsNN5O3MdsW9c6CZnbq7rntF4d3s0D7BaHTZhIWN52P%2BcjiuGRbDU6cdj%2BEjJbJLQv4N4ADdhxBiEZbQuWclY4Q8iABbCXczCdSiKMAC%2FgyO2YqbQgrIJDZg%2FcFjsMD%2Fzb3gUcBa5sR%2F9oWR%2BzuJBqlPG14Jbn0DIf2TZ3Jn%2FXmSUrC5ddQB6bob37uZrJdeF4dIDHV3iuhb70Ptq83kOz53ubDLXlcwPJK0q%2FT42AqxIaAkVCkqm2tRgr49yfJGFU%2FZQ3hy3QyuUpd7obPv97kb%2FAQ%3D%3D\"}\",\n \"realm\": \"saml1\",\n \"id\": \"_989a34500a4f5bf0f00d195aa04a7804b4ed42a1\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_security/saml/prepare\n
\n " + ], + "x-api": "saml_prepare_authentication.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/saml/metadata/{realm_name}": { + "get": { + "tags": [ + "security" + ], + "summary": "Create SAML service provider metadata", + "description": "Generate SAML metadata for a SAML 2.0 Service Provider.\n\nThe SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file.\nThis API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch.", + "operationId": "security-saml-service-provider-metadata", + "parameters": [ + { + "in": "path", + "name": "realm_name", + "description": "The name of the SAML realm in Elasticsearch.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "metadata": { + "description": "An XML string that contains a SAML Service Provider's metadata for the realm.", + "type": "string" + } + }, + "required": [ + "metadata" + ] + }, + "examples": { + "SamlServiceProviderMetadataResponseExample1": { + "description": "A successful response from `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data`, which indicates that the request is acknowledged.\n", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.11.0", + "x-variations": [ + "
\n GET\n /_security/saml/metadata/{realm_name}\n
\n " + ], + "x-api": "saml_service_provider_metadata.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/profile/_suggest": { + "get": { + "tags": [ + "security" + ], + "summary": "Suggest a user profile", + "description": "Get suggestions for user profiles that match specified search criteria.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", + "operationId": "security-suggest-user-profiles", + "parameters": [ + { + "in": "query", + "name": "data", + "description": "A comma-separated list of filters for the `data` field of the profile document.\nTo return all content use `data=*`.\nTo return a subset of content, use `data=` to retrieve content nested under the specified ``.\nBy default, the API returns no `data` content.\nIt is an error to specify `data` as both the query parameter and the request body field.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "A query string used to match name-related fields in user profile documents.\nName-related fields are the user's `username`, `full_name`, and `email`.", + "type": "string" + }, + "size": { + "description": "The number of profiles to return.", + "default": 10.0, + "type": "number" + }, + "data": { + "description": "A comma-separated list of filters for the `data` field of the profile document.\nTo return all content use `data=*`.\nTo return a subset of content, use `data=` to retrieve content nested under the specified ``.\nBy default, the API returns no `data` content.\nIt is an error to specify `data` as both the query parameter and the request body field.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "hint": { + "description": "Extra search criteria to improve relevance of the suggestion result.\nProfiles matching the spcified hint are ranked higher in the response.\nProfiles not matching the hint aren't excluded from the response as long as the profile matches the `name` field query.", + "allOf": [ + { + "$ref": "#/components/schemas/security.suggest_user_profiles.Hint" + } + ] + } + } + }, + "examples": { + "SuggestUserProfilesRequestExample1": { + "description": "Run `POST /_security/profile/_suggest` to get suggestions for profile documents with name-related fields matching `jack`. It specifies both `uids` and `labels` hints for better relevance. The `labels` hint ranks profiles higher if their `direction` label matches either `north` or `east`.\n", + "value": "{\n \"name\": \"jack\", \n \"hint\": {\n \"uids\": [ \n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\"north\", \"east\"] \n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "description": "Metadata about the number of matching profiles.", + "allOf": [ + { + "$ref": "#/components/schemas/security.suggest_user_profiles.TotalUserProfiles" + } + ] + }, + "took": { + "description": "The number of milliseconds it took Elasticsearch to run the request.", + "type": "number" + }, + "profiles": { + "description": "A list of profile documents, ordered by relevance, that match the search criteria.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfile" + } + } + }, + "required": [ + "total", + "took", + "profiles" + ] + }, + "examples": { + "SuggestUserProfilesResponseExample1": { + "description": "A successful response from `GET /_security/saml/metadata/saml1`. It contains the SAML metadata that was generated for the SAML realm as an XML string.\n", + "value": "{\n \"metadata\" : \"\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n GET\n /_security/profile/_suggest\n
\n ", + "
\n POST\n /_security/profile/_suggest\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "suggest_user_profiles.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Suggest a user profile", + "description": "Get suggestions for user profiles that match specified search criteria.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.", + "operationId": "security-suggest-user-profiles-1", + "parameters": [ + { + "in": "query", + "name": "data", + "description": "A comma-separated list of filters for the `data` field of the profile document.\nTo return all content use `data=*`.\nTo return a subset of content, use `data=` to retrieve content nested under the specified ``.\nBy default, the API returns no `data` content.\nIt is an error to specify `data` as both the query parameter and the request body field.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "A query string used to match name-related fields in user profile documents.\nName-related fields are the user's `username`, `full_name`, and `email`.", + "type": "string" + }, + "size": { + "description": "The number of profiles to return.", + "default": 10.0, + "type": "number" + }, + "data": { + "description": "A comma-separated list of filters for the `data` field of the profile document.\nTo return all content use `data=*`.\nTo return a subset of content, use `data=` to retrieve content nested under the specified ``.\nBy default, the API returns no `data` content.\nIt is an error to specify `data` as both the query parameter and the request body field.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "hint": { + "description": "Extra search criteria to improve relevance of the suggestion result.\nProfiles matching the spcified hint are ranked higher in the response.\nProfiles not matching the hint aren't excluded from the response as long as the profile matches the `name` field query.", + "allOf": [ + { + "$ref": "#/components/schemas/security.suggest_user_profiles.Hint" + } + ] + } + } + }, + "examples": { + "SuggestUserProfilesRequestExample1": { + "description": "Run `POST /_security/profile/_suggest` to get suggestions for profile documents with name-related fields matching `jack`. It specifies both `uids` and `labels` hints for better relevance. The `labels` hint ranks profiles higher if their `direction` label matches either `north` or `east`.\n", + "value": "{\n \"name\": \"jack\", \n \"hint\": {\n \"uids\": [ \n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\"north\", \"east\"] \n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "description": "Metadata about the number of matching profiles.", + "allOf": [ + { + "$ref": "#/components/schemas/security.suggest_user_profiles.TotalUserProfiles" + } + ] + }, + "took": { + "description": "The number of milliseconds it took Elasticsearch to run the request.", + "type": "number" + }, + "profiles": { + "description": "A list of profile documents, ordered by relevance, that match the search criteria.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfile" + } + } + }, + "required": [ + "total", + "took", + "profiles" + ] + }, + "examples": { + "SuggestUserProfilesResponseExample1": { + "description": "A successful response from `GET /_security/saml/metadata/saml1`. It contains the SAML metadata that was generated for the SAML realm as an XML string.\n", + "value": "{\n \"metadata\" : \"\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n GET\n /_security/profile/_suggest\n
\n ", + "
\n POST\n /_security/profile/_suggest\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_security`\n" + ], + "x-api": "suggest_user_profiles.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/api_key/{id}": { + "put": { + "tags": [ + "security" + ], + "summary": "Update an API key", + "description": "Update attributes of an existing API key.\nThis API supports updates to an API key's access scope, expiration, and metadata.\n\nTo use this API, you must have at least the `manage_own_api_key` cluster privilege.\nUsers can only update API keys that they created or that were granted to them.\nTo update another user’s API key, use the `run_as` feature to submit a request on behalf of another user.\n\nIMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required.\n\nUse this API to update API keys created by the create API key or grant API Key APIs.\nIf you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead.\nIt's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API.\n\nThe access scope of an API key is derived from the `role_descriptors` you specify in the request and a snapshot of the owner user's permissions at the time of the request.\nThe snapshot of the owner's permissions is updated automatically on every call.\n\nIMPORTANT: If you don't specify `role_descriptors` in the request, a call to this API might still change the API key's access scope.\nThis change can occur if the owner user's permissions have changed since the API key was created or last modified.", + "operationId": "security-update-api-key", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the API key to update.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role_descriptors": { + "description": "The role descriptors to assign to this API key.\nThe API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user.\nYou can assign new privileges by specifying them in this parameter.\nTo remove assigned privileges, you can supply an empty `role_descriptors` parameter, that is to say, an empty object `{}`.\nIf an API key has no assigned privileges, it inherits the owner user's full permissions.\nThe snapshot of the owner's permissions is always updated, whether you supply the `role_descriptors` parameter or not.\nThe structure of a role descriptor is the same as the request for the create API keys API.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" + } + }, + "metadata": { + "description": "Arbitrary metadata that you want to associate with the API key.\nIt supports a nested data structure.\nWithin the metadata object, keys beginning with `_` are reserved for system usage.\nWhen specified, this value fully replaces the metadata previously associated with the API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "expiration": { + "description": "The expiration time for the API key.\nBy default, API keys never expire.\nThis property can be omitted to leave the expiration unchanged.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } + }, + "examples": { + "UpdateApiKeyRequestExample1": { + "summary": "Update role and metadata", + "description": "Run `PUT /_security/api_key/VuaCfGcBCdbkQm-e5aOx` to assign new role descriptors and metadata to an API key.\n", + "value": "{\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\"*\"],\n \"privileges\": [\"write\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\"production\"]\n }\n }\n}" + }, + "UpdateApiKeyRequestExample2": { + "summary": "Remove permissions", + "description": "Run `PUT /_security/api_key/VuaCfGcBCdbkQm-e5aOx` to remove the API key's previously assigned permissions. It will inherit the owner user's full permissions.\n", + "value": "{\n \"role_descriptors\": {}\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "updated": { + "description": "If `true`, the API key was updated.\nIf `false`, the API key didn't change because no change was detected.", + "type": "boolean" + } + }, + "required": [ + "updated" + ] + }, + "examples": { + "UpdateApiKeyResponseExample1": { + "summary": "Update role and metadata", + "description": "A successful response from `PUT /_security/api_key/VuaCfGcBCdbkQm-e5aOx`. The API key's effective permissions after the update will be the intersection of the supplied role descriptors and the owner user's permissions.\n", + "value": "{\n \"updated\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.4.0", + "x-variations": [ + "
\n PUT\n /_security/api_key/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_own_api_key`\n" + ], + "x-api": "update_api_key.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/cross_cluster/api_key/{id}": { + "put": { + "tags": [ + "security" + ], + "summary": "Update a cross-cluster API key", + "description": "Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.\n\nTo use this API, you must have at least the `manage_security` cluster privilege.\nUsers can only update API keys that they created.\nTo update another user's API key, use the `run_as` feature to submit a request on behalf of another user.\n\nIMPORTANT: It's not possible to use an API key as the authentication credential for this API.\nTo update an API key, the owner user's credentials are required.\n\nIt's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API.\n\nThis API supports updates to an API key's access scope, metadata, and expiration.\nThe owner user's information, such as the `username` and `realm`, is also updated automatically on every call.\n\nNOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API.\n\nTo learn more about how to use this API, refer to the [Update cross cluter API key API examples page](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-cc-api-key-examples).", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-api-key", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-update-cross-cluster-api-key.html" + }, + "operationId": "security-update-cross-cluster-api-key", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the cross-cluster API key to update.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access": { + "description": "The access to be granted to this API key.\nThe access is composed of permissions for cross cluster search and cross cluster replication.\nAt least one of them must be specified.\nWhen specified, the new access assignment fully replaces the previously assigned access.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.Access" + } + ] + }, + "expiration": { + "description": "The expiration time for the API key.\nBy default, API keys never expire. This property can be omitted to leave the value unchanged.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "metadata": { + "description": "Arbitrary metadata that you want to associate with the API key.\nIt supports nested data structure.\nWithin the metadata object, keys beginning with `_` are reserved for system usage.\nWhen specified, this information fully replaces metadata previously associated with the API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "certificate_identity": { + "description": "The certificate identity to associate with this API key.\nThis field is used to restrict the API key to connections authenticated by a specific TLS certificate.\nThe value should match the certificate's distinguished name (DN) pattern.\nWhen specified, this fully replaces any previously assigned certificate identity.\nTo clear an existing certificate identity, explicitly set this field to `null`.\nWhen omitted, the existing certificate identity remains unchanged.", + "type": "string" + } + }, + "required": [ + "access" + ] + }, + "examples": { + "UpdateCrossClusterApiKeyRequestExample1": { + "description": "Run `PUT /_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx` to update a cross-cluster API key, assigning it new access scope and metadata.\n", + "value": "{\n \"access\": {\n \"replication\": [\n {\n \"names\": [\"archive\"]\n }\n ]\n },\n \"metadata\": {\n \"application\": \"replication\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "updated": { + "description": "If `true`, the API key was updated.\nIf `false`, the API key didn’t change because no change was detected.", + "type": "boolean" + } + }, + "required": [ + "updated" + ] + }, + "examples": { + "UpdateCrossClusterApiKeyResponseExample1": { + "description": "A successful response from `PUT /_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx` that indicates that the API key was updated.\n", + "value": "{\n \"updated\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_security/cross_cluster/api_key/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "update_cross_cluster_api_key.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_security/profile/{uid}/_data": { + "put": { + "tags": [ + "security" + ], + "summary": "Update user profile data", + "description": "Update specific data for the user profile that is associated with a unique ID.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nTo use this API, you must have one of the following privileges:\n\n* The `manage_user_profile` cluster privilege.\n* The `update_profile_data` global privilege for the namespaces that are referenced in the request.\n\nThis API updates the `labels` and `data` fields of an existing user profile document with JSON objects.\nNew keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request.\n\nFor both labels and data, content is namespaced by the top-level fields.\nThe `update_profile_data` global privilege grants privileges for updating only the allowed namespaces.", + "operationId": "security-update-user-profile-data", + "parameters": [ + { + "in": "path", + "name": "uid", + "description": "A unique identifier for the user profile.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/security._types.UserProfileId" + }, + "style": "simple" + }, + { + "in": "query", + "name": "if_seq_no", + "description": "Only perform the operation if the document has this sequence number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SequenceNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "if_primary_term", + "description": "Only perform the operation if the document has this primary term.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "description": "Searchable data that you want to associate with the user profile.\nThis field supports a nested data structure.\nWithin the labels object, top-level keys cannot begin with an underscore (`_`) or contain a period (`.`).", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "data": { + "description": "Non-searchable data that you want to associate with the user profile.\nThis field supports a nested data structure.\nWithin the `data` object, top-level keys cannot begin with an underscore (`_`) or contain a period (`.`).\nThe data object is not searchable, but can be retrieved with the get user profile API.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "UpdateUserProfileDataRequestExample1": { + "description": "Run `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data` to update a profile document for the `u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0` user profile.\n", + "value": "{\n \"labels\": {\n \"direction\": \"east\"\n },\n \"data\": {\n \"app1\": {\n \"theme\": \"default\"\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "UpdateUserProfileDataResponseExample1": { + "description": "A successful response from `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data`, which indicates that the request is acknowledged.\n", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n PUT\n /_security/profile/{uid}/_data\n
\n ", + "
\n POST\n /_security/profile/{uid}/_data\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_user_profile`\n" + ], + "x-api": "update_user_profile_data.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Update user profile data", + "description": "Update specific data for the user profile that is associated with a unique ID.\n\nNOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.\nIndividual users and external applications should not call this API directly.\nElastic reserves the right to change or remove this feature in future releases without prior notice.\n\nTo use this API, you must have one of the following privileges:\n\n* The `manage_user_profile` cluster privilege.\n* The `update_profile_data` global privilege for the namespaces that are referenced in the request.\n\nThis API updates the `labels` and `data` fields of an existing user profile document with JSON objects.\nNew keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request.\n\nFor both labels and data, content is namespaced by the top-level fields.\nThe `update_profile_data` global privilege grants privileges for updating only the allowed namespaces.", + "operationId": "security-update-user-profile-data-1", + "parameters": [ + { + "in": "path", + "name": "uid", + "description": "A unique identifier for the user profile.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/security._types.UserProfileId" + }, + "style": "simple" + }, + { + "in": "query", + "name": "if_seq_no", + "description": "Only perform the operation if the document has this sequence number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SequenceNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "if_primary_term", + "description": "Only perform the operation if the document has this primary term.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "description": "Searchable data that you want to associate with the user profile.\nThis field supports a nested data structure.\nWithin the labels object, top-level keys cannot begin with an underscore (`_`) or contain a period (`.`).", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "data": { + "description": "Non-searchable data that you want to associate with the user profile.\nThis field supports a nested data structure.\nWithin the `data` object, top-level keys cannot begin with an underscore (`_`) or contain a period (`.`).\nThe data object is not searchable, but can be retrieved with the get user profile API.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "examples": { + "UpdateUserProfileDataRequestExample1": { + "description": "Run `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data` to update a profile document for the `u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0` user profile.\n", + "value": "{\n \"labels\": {\n \"direction\": \"east\"\n },\n \"data\": {\n \"app1\": {\n \"theme\": \"default\"\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "UpdateUserProfileDataResponseExample1": { + "description": "A successful response from `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data`, which indicates that the request is acknowledged.\n", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.2.0", + "x-variations": [ + "
\n PUT\n /_security/profile/{uid}/_data\n
\n ", + "
\n POST\n /_security/profile/{uid}/_data\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_user_profile`\n" + ], + "x-api": "update_user_profile_data.security", + "x-category": "security", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ingest/_simulate": { + "get": { + "tags": [ + "ingest" + ], + "summary": "Simulate data ingestion", + "description": "Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.\n\nThis API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.\n\nThe API runs the default and final pipeline for that index against a set of documents provided in the body of the request.\nIf a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.\nNo data is indexed into Elasticsearch.\nInstead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.\nThe transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.\n\nThis API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.\nThe simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.\n\nBy default, the pipeline definitions that are currently in the system are used.\nHowever, you can supply substitute pipeline definitions in the body of the request.\nThese will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.", + "operationId": "simulate-ingest", + "parameters": [ + { + "in": "query", + "name": "pipeline", + "description": "The pipeline to use as the default pipeline.\nThis value can be used to override the default pipeline of the index.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.PipelineName" + }, + "style": "form" + }, + { + "in": "query", + "name": "merge_type", + "description": "The mapping merge type if mapping overrides are being provided in mapping_addition.\nThe allowed values are one of index or template.\nThe index option merges mappings the way they would be merged into an existing index.\nThe template option merges mappings the way they would be merged into a template.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/simulate.ingest.MergeType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "Sample documents to test in the pipeline.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.Document" + } + }, + "component_template_substitutions": { + "description": "A map of component template names to substitute component template definition objects.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster._types.ComponentTemplateNode" + } + }, + "index_template_substitutions": { + "description": "A map of index template names to substitute index template definition objects.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexTemplate" + } + }, + "mapping_addition": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "pipeline_substitutions": { + "description": "Pipelines to test.\nIf you don’t specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulateIngestRequestExample1": { + "summary": "Existing pipeline definitions", + "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. Since both documents are being ingested into `my-index`, both pipelines are run using the pipeline definitions that are already in the system.", + "value": "{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + "SimulateIngestRequestExample2": { + "summary": "Pipeline substitions", + "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already defined in the system will run.", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" + }, + "SimulateIngestRequestExample3": { + "summary": "Component template substitutions", + "description": "In this example, imagine that the index `my-index` has a strict mapping with only the `foo` keyword field defined. Say that field mapping came from a component template named `my-mappings-template`. You want to test adding a new field, `bar`. So a substitute definition of `my-mappings-template` is provided in `component_template_substitutions`. The substitute `my-mappings-template` will be used in place of the existing mapping for `my-index` and in place of the `my-mappings-template` that is in the system.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"foo\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"bar\": \"rab\"\n }\n }\n ],\n \"component_template_substitutions\": {\n \"my-mappings_template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n },\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n}" + }, + "SimulateIngestRequestExample4": { + "summary": "Multiple substitutions", + "description": "The pipeline, component template, and index template substitutions replace the existing pipeline details for the duration of this request.", + "value": "{\n \"docs\": [\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field3\",\n \"value\": \"value3\"\n }\n }\n ]\n }\n },\n \"component_template_substitutions\": {\n \"my-component-template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": true,\n \"properties\": {\n \"field3\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"default_pipeline\": \"my-pipeline\"\n }\n }\n }\n }\n },\n \"index_template_substitutions\": {\n \"my-index-template\": {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"component_template_1\",\n \"component_template_2\"\n ]\n }\n },\n \"mapping_addition\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/simulate.ingest.SimulateIngestDocumentResult" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulateIngestResponseExample1": { + "summary": "Use an existing pipeline definition", + "description": "A successful response when the simulation uses pipeline definitions that are already in the system.", + "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"bar\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": \"-3,\",\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"rab\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" + }, + "SimulateIngestResponseExample2": { + "summary": "Use pipeline substitutions", + "description": "A successful response when the simulation uses pipeline substitutions.", + "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"BAR\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"RAB\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" + }, + "SimulateIngestResponseExample3": { + "summary": "Use pipeline substitutions", + "description": "A successful response when the simulation uses pipeline substitutions.", + "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"foo\": \"foo\"\n },\n \"executed_pipelines\": [],\n \"effective_mapping\": {\n \"_doc\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"bar\": \"rab\"\n },\n \"executed_pipelines\": [],\n \"effective_mapping\": {\n \"_doc\": {\n \"properties\": {\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_ingest/_simulate\n
\n ", + "
\n POST\n /_ingest/_simulate\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "ingest.simulate", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "ingest" + ], + "summary": "Simulate data ingestion", + "description": "Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.\n\nThis API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.\n\nThe API runs the default and final pipeline for that index against a set of documents provided in the body of the request.\nIf a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.\nNo data is indexed into Elasticsearch.\nInstead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.\nThe transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.\n\nThis API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.\nThe simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.\n\nBy default, the pipeline definitions that are currently in the system are used.\nHowever, you can supply substitute pipeline definitions in the body of the request.\nThese will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.", + "operationId": "simulate-ingest-1", + "parameters": [ + { + "in": "query", + "name": "pipeline", + "description": "The pipeline to use as the default pipeline.\nThis value can be used to override the default pipeline of the index.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.PipelineName" + }, + "style": "form" + }, + { + "in": "query", + "name": "merge_type", + "description": "The mapping merge type if mapping overrides are being provided in mapping_addition.\nThe allowed values are one of index or template.\nThe index option merges mappings the way they would be merged into an existing index.\nThe template option merges mappings the way they would be merged into a template.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/simulate.ingest.MergeType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "Sample documents to test in the pipeline.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.Document" + } + }, + "component_template_substitutions": { + "description": "A map of component template names to substitute component template definition objects.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster._types.ComponentTemplateNode" + } + }, + "index_template_substitutions": { + "description": "A map of index template names to substitute index template definition objects.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexTemplate" + } + }, + "mapping_addition": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "pipeline_substitutions": { + "description": "Pipelines to test.\nIf you don’t specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulateIngestRequestExample1": { + "summary": "Existing pipeline definitions", + "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. Since both documents are being ingested into `my-index`, both pipelines are run using the pipeline definitions that are already in the system.", + "value": "{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + "SimulateIngestRequestExample2": { + "summary": "Pipeline substitions", + "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already defined in the system will run.", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" + }, + "SimulateIngestRequestExample3": { + "summary": "Component template substitutions", + "description": "In this example, imagine that the index `my-index` has a strict mapping with only the `foo` keyword field defined. Say that field mapping came from a component template named `my-mappings-template`. You want to test adding a new field, `bar`. So a substitute definition of `my-mappings-template` is provided in `component_template_substitutions`. The substitute `my-mappings-template` will be used in place of the existing mapping for `my-index` and in place of the `my-mappings-template` that is in the system.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"foo\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"bar\": \"rab\"\n }\n }\n ],\n \"component_template_substitutions\": {\n \"my-mappings_template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n },\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n}" + }, + "SimulateIngestRequestExample4": { + "summary": "Multiple substitutions", + "description": "The pipeline, component template, and index template substitutions replace the existing pipeline details for the duration of this request.", + "value": "{\n \"docs\": [\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field3\",\n \"value\": \"value3\"\n }\n }\n ]\n }\n },\n \"component_template_substitutions\": {\n \"my-component-template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": true,\n \"properties\": {\n \"field3\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"default_pipeline\": \"my-pipeline\"\n }\n }\n }\n }\n },\n \"index_template_substitutions\": {\n \"my-index-template\": {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"component_template_1\",\n \"component_template_2\"\n ]\n }\n },\n \"mapping_addition\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/simulate.ingest.SimulateIngestDocumentResult" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulateIngestResponseExample1": { + "summary": "Use an existing pipeline definition", + "description": "A successful response when the simulation uses pipeline definitions that are already in the system.", + "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"bar\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": \"-3,\",\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"rab\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" + }, + "SimulateIngestResponseExample2": { + "summary": "Use pipeline substitutions", + "description": "A successful response when the simulation uses pipeline substitutions.", + "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"BAR\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"RAB\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" + }, + "SimulateIngestResponseExample3": { + "summary": "Use pipeline substitutions", + "description": "A successful response when the simulation uses pipeline substitutions.", + "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"foo\": \"foo\"\n },\n \"executed_pipelines\": [],\n \"effective_mapping\": {\n \"_doc\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"bar\": \"rab\"\n },\n \"executed_pipelines\": [],\n \"effective_mapping\": {\n \"_doc\": {\n \"properties\": {\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_ingest/_simulate\n
\n ", + "
\n POST\n /_ingest/_simulate\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "ingest.simulate", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ingest/{index}/_simulate": { + "get": { + "tags": [ + "ingest" + ], + "summary": "Simulate data ingestion", + "description": "Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.\n\nThis API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.\n\nThe API runs the default and final pipeline for that index against a set of documents provided in the body of the request.\nIf a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.\nNo data is indexed into Elasticsearch.\nInstead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.\nThe transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.\n\nThis API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.\nThe simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.\n\nBy default, the pipeline definitions that are currently in the system are used.\nHowever, you can supply substitute pipeline definitions in the body of the request.\nThese will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.", + "operationId": "simulate-ingest-2", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The index to simulate ingesting into.\nThis value can be overridden by specifying an index on each document.\nIf you specify this parameter in the request path, it is used for any documents that do not explicitly specify an index argument.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "query", + "name": "pipeline", + "description": "The pipeline to use as the default pipeline.\nThis value can be used to override the default pipeline of the index.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.PipelineName" + }, + "style": "form" + }, + { + "in": "query", + "name": "merge_type", + "description": "The mapping merge type if mapping overrides are being provided in mapping_addition.\nThe allowed values are one of index or template.\nThe index option merges mappings the way they would be merged into an existing index.\nThe template option merges mappings the way they would be merged into a template.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/simulate.ingest.MergeType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "Sample documents to test in the pipeline.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.Document" + } + }, + "component_template_substitutions": { + "description": "A map of component template names to substitute component template definition objects.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster._types.ComponentTemplateNode" + } + }, + "index_template_substitutions": { + "description": "A map of index template names to substitute index template definition objects.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexTemplate" + } + }, + "mapping_addition": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "pipeline_substitutions": { + "description": "Pipelines to test.\nIf you don’t specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulateIngestRequestExample1": { + "summary": "Existing pipeline definitions", + "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. Since both documents are being ingested into `my-index`, both pipelines are run using the pipeline definitions that are already in the system.", + "value": "{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + "SimulateIngestRequestExample2": { + "summary": "Pipeline substitions", + "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already defined in the system will run.", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" + }, + "SimulateIngestRequestExample3": { + "summary": "Component template substitutions", + "description": "In this example, imagine that the index `my-index` has a strict mapping with only the `foo` keyword field defined. Say that field mapping came from a component template named `my-mappings-template`. You want to test adding a new field, `bar`. So a substitute definition of `my-mappings-template` is provided in `component_template_substitutions`. The substitute `my-mappings-template` will be used in place of the existing mapping for `my-index` and in place of the `my-mappings-template` that is in the system.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"foo\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"bar\": \"rab\"\n }\n }\n ],\n \"component_template_substitutions\": {\n \"my-mappings_template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n },\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n}" + }, + "SimulateIngestRequestExample4": { + "summary": "Multiple substitutions", + "description": "The pipeline, component template, and index template substitutions replace the existing pipeline details for the duration of this request.", + "value": "{\n \"docs\": [\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field3\",\n \"value\": \"value3\"\n }\n }\n ]\n }\n },\n \"component_template_substitutions\": {\n \"my-component-template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": true,\n \"properties\": {\n \"field3\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"default_pipeline\": \"my-pipeline\"\n }\n }\n }\n }\n },\n \"index_template_substitutions\": {\n \"my-index-template\": {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"component_template_1\",\n \"component_template_2\"\n ]\n }\n },\n \"mapping_addition\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/simulate.ingest.SimulateIngestDocumentResult" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulateIngestResponseExample1": { + "summary": "Use an existing pipeline definition", + "description": "A successful response when the simulation uses pipeline definitions that are already in the system.", + "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"bar\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": \"-3,\",\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"rab\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" + }, + "SimulateIngestResponseExample2": { + "summary": "Use pipeline substitutions", + "description": "A successful response when the simulation uses pipeline substitutions.", + "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"BAR\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"RAB\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" + }, + "SimulateIngestResponseExample3": { + "summary": "Use pipeline substitutions", + "description": "A successful response when the simulation uses pipeline substitutions.", + "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"foo\": \"foo\"\n },\n \"executed_pipelines\": [],\n \"effective_mapping\": {\n \"_doc\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"bar\": \"rab\"\n },\n \"executed_pipelines\": [],\n \"effective_mapping\": {\n \"_doc\": {\n \"properties\": {\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_ingest/{index}/_simulate\n
\n ", + "
\n POST\n /_ingest/{index}/_simulate\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "ingest.simulate", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "ingest" + ], + "summary": "Simulate data ingestion", + "description": "Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.\n\nThis API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.\n\nThe API runs the default and final pipeline for that index against a set of documents provided in the body of the request.\nIf a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.\nNo data is indexed into Elasticsearch.\nInstead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.\nThe transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.\n\nThis API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.\nThe simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.\n\nBy default, the pipeline definitions that are currently in the system are used.\nHowever, you can supply substitute pipeline definitions in the body of the request.\nThese will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.", + "operationId": "simulate-ingest-3", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The index to simulate ingesting into.\nThis value can be overridden by specifying an index on each document.\nIf you specify this parameter in the request path, it is used for any documents that do not explicitly specify an index argument.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "query", + "name": "pipeline", + "description": "The pipeline to use as the default pipeline.\nThis value can be used to override the default pipeline of the index.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.PipelineName" + }, + "style": "form" + }, + { + "in": "query", + "name": "merge_type", + "description": "The mapping merge type if mapping overrides are being provided in mapping_addition.\nThe allowed values are one of index or template.\nThe index option merges mappings the way they would be merged into an existing index.\nThe template option merges mappings the way they would be merged into a template.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/simulate.ingest.MergeType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "Sample documents to test in the pipeline.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.Document" + } + }, + "component_template_substitutions": { + "description": "A map of component template names to substitute component template definition objects.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster._types.ComponentTemplateNode" + } + }, + "index_template_substitutions": { + "description": "A map of index template names to substitute index template definition objects.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexTemplate" + } + }, + "mapping_addition": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "pipeline_substitutions": { + "description": "Pipelines to test.\nIf you don’t specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ingest._types.Pipeline" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulateIngestRequestExample1": { + "summary": "Existing pipeline definitions", + "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. Since both documents are being ingested into `my-index`, both pipelines are run using the pipeline definitions that are already in the system.", + "value": "{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + "SimulateIngestRequestExample2": { + "summary": "Pipeline substitions", + "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already defined in the system will run.", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" + }, + "SimulateIngestRequestExample3": { + "summary": "Component template substitutions", + "description": "In this example, imagine that the index `my-index` has a strict mapping with only the `foo` keyword field defined. Say that field mapping came from a component template named `my-mappings-template`. You want to test adding a new field, `bar`. So a substitute definition of `my-mappings-template` is provided in `component_template_substitutions`. The substitute `my-mappings-template` will be used in place of the existing mapping for `my-index` and in place of the `my-mappings-template` that is in the system.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"foo\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"bar\": \"rab\"\n }\n }\n ],\n \"component_template_substitutions\": {\n \"my-mappings_template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n },\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n}" + }, + "SimulateIngestRequestExample4": { + "summary": "Multiple substitutions", + "description": "The pipeline, component template, and index template substitutions replace the existing pipeline details for the duration of this request.", + "value": "{\n \"docs\": [\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field3\",\n \"value\": \"value3\"\n }\n }\n ]\n }\n },\n \"component_template_substitutions\": {\n \"my-component-template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": true,\n \"properties\": {\n \"field3\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"default_pipeline\": \"my-pipeline\"\n }\n }\n }\n }\n },\n \"index_template_substitutions\": {\n \"my-index-template\": {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"component_template_1\",\n \"component_template_2\"\n ]\n }\n },\n \"mapping_addition\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/simulate.ingest.SimulateIngestDocumentResult" + } + } + }, + "required": [ + "docs" + ] + }, + "examples": { + "SimulateIngestResponseExample1": { + "summary": "Use an existing pipeline definition", + "description": "A successful response when the simulation uses pipeline definitions that are already in the system.", + "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"bar\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": \"-3,\",\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"rab\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" + }, + "SimulateIngestResponseExample2": { + "summary": "Use pipeline substitutions", + "description": "A successful response when the simulation uses pipeline substitutions.", + "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"BAR\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"RAB\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" + }, + "SimulateIngestResponseExample3": { + "summary": "Use pipeline substitutions", + "description": "A successful response when the simulation uses pipeline substitutions.", + "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"foo\": \"foo\"\n },\n \"executed_pipelines\": [],\n \"effective_mapping\": {\n \"_doc\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"bar\": \"rab\"\n },\n \"executed_pipelines\": [],\n \"effective_mapping\": {\n \"_doc\": {\n \"properties\": {\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 8.12.0", + "x-variations": [ + "
\n GET\n /_ingest/{index}/_simulate\n
\n ", + "
\n POST\n /_ingest/{index}/_simulate\n
\n " + ], + "x-req-auth": [ + "Index privileges: `index`\n" + ], + "x-api": "ingest.simulate", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/policy/{policy_id}": { + "get": { + "tags": [ + "slm" + ], + "summary": "Get policy information", + "description": "Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.", + "operationId": "slm-get-lifecycle", + "parameters": [ + { + "in": "path", + "name": "policy_id", + "description": "A comma-separated list of snapshot lifecycle policy identifiers.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/slm._types.SnapshotLifecycle" + } + }, + "examples": { + "GetSnapshotLifecycleResponseExample1": { + "description": "A successful response from `GET _slm/policy/daily-snapshots?human`.", + "value": "{\n \"daily-snapshots\": {\n \"version\": 1,\n \"modified_date\": \"2099-05-06T01:30:00.000Z\",\n \"modified_date_millis\": 4081757400000,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"stats\": {\n \"policy\": \"daily-snapshots\",\n \"snapshots_taken\": 0,\n \"snapshots_failed\": 0,\n \"snapshots_deleted\": 0,\n \"snapshot_deletion_failures\": 0\n },\n \"next_execution\": \"2099-05-07T01:30:00.000Z\",\n \"next_execution_millis\": 4081843800000\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n GET\n /_slm/policy/{policy_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "get_lifecycle.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "slm" + ], + "summary": "Create or update a policy", + "description": "Create or update a snapshot lifecycle policy.\nIf the policy already exists, this request increments the policy version.\nOnly the latest version of a policy is stored.", + "operationId": "slm-put-lifecycle", + "parameters": [ + { + "in": "path", + "name": "policy_id", + "description": "The identifier for the snapshot lifecycle policy you want to create or update.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "description": "Configuration for each snapshot created by the policy.", + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Configuration" + } + ] + }, + "name": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "repository": { + "description": "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.", + "type": "string" + }, + "retention": { + "description": "Retention rules used to retain and delete snapshots created by the policy.", + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Retention" + } + ] + }, + "schedule": { + "description": "Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.CronExpression" + } + ] + } + } + }, + "examples": { + "PutSnapshotLifecycleRequestExample1 copy": { + "summary": "Create a policy", + "description": "Run `PUT /_slm/policy/daily-snapshots` to create a lifecycle policy. The `schedule` is when the snapshot should be taken, in this case, 1:30am daily. The `retention` details specify to: keep snapshots for 30 days; always keep at least 5 successful snapshots, even if they're more than 30 days old; keep no more than 50 successful snapshots, even if they're less than 30 days old.\n", + "value": "{\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n}" + }, + "PutSnapshotLifecycleRequestExample2": { + "summary": "Create a policy with intevals", + "description": "Run `PUT /_slm/policy/hourly-snapshots` to create a lifecycle policy that uses interval scheduling. It creates a snapshot once every hour. The first snapshot will be created one hour after the policy is modified, with subsequent snapshots every hour afterward.\n", + "value": "{\n \"schedule\": \"1h\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"]\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n PUT\n /_slm/policy/{policy_id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "put_lifecycle.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "slm" + ], + "summary": "Delete a policy", + "description": "Delete a snapshot lifecycle policy definition.\nThis operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots.", + "operationId": "slm-delete-lifecycle", + "parameters": [ + { + "in": "path", + "name": "policy_id", + "description": "The id of the snapshot lifecycle policy to remove", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n DELETE\n /_slm/policy/{policy_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "delete_lifecycle.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/policy/{policy_id}/_execute": { + "put": { + "tags": [ + "slm" + ], + "summary": "Run a policy", + "description": "Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time.\nThe snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.", + "operationId": "slm-execute-lifecycle", + "parameters": [ + { + "in": "path", + "name": "policy_id", + "description": "The id of the snapshot lifecycle policy to be executed", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "snapshot_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + } + }, + "required": [ + "snapshot_name" + ] + }, + "examples": { + "ExecuteSnapshotLifecycleResponseExample1": { + "description": "Run `POST /_slm/policy/daily-snapshots/_execute` to take an immediate snapshot according to the `daily-snapshots` policy.\n", + "value": "{\n \"snapshot_name\": \"daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n PUT\n /_slm/policy/{policy_id}/_execute\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "execute_lifecycle.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/_execute_retention": { + "post": { + "tags": [ + "slm" + ], + "summary": "Run a retention policy", + "description": "Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.\nThe retention policy is normally applied according to its schedule.", + "operationId": "slm-execute-retention", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_slm/_execute_retention\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "execute_retention.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/policy": { + "get": { + "tags": [ + "slm" + ], + "summary": "Get policy information", + "description": "Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.", + "operationId": "slm-get-lifecycle-1", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/slm._types.SnapshotLifecycle" + } + }, + "examples": { + "GetSnapshotLifecycleResponseExample1": { + "description": "A successful response from `GET _slm/policy/daily-snapshots?human`.", + "value": "{\n \"daily-snapshots\": {\n \"version\": 1,\n \"modified_date\": \"2099-05-06T01:30:00.000Z\",\n \"modified_date_millis\": 4081757400000,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"stats\": {\n \"policy\": \"daily-snapshots\",\n \"snapshots_taken\": 0,\n \"snapshots_failed\": 0,\n \"snapshots_deleted\": 0,\n \"snapshot_deletion_failures\": 0\n },\n \"next_execution\": \"2099-05-07T01:30:00.000Z\",\n \"next_execution_millis\": 4081843800000\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n GET\n /_slm/policy\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "get_lifecycle.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/stats": { + "get": { + "tags": [ + "slm" + ], + "summary": "Get snapshot lifecycle management statistics", + "description": "Get global and policy-level statistics about actions taken by snapshot lifecycle management.", + "operationId": "slm-get-stats", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "retention_deletion_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "retention_deletion_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "retention_failed": { + "type": "number" + }, + "retention_runs": { + "type": "number" + }, + "retention_timed_out": { + "type": "number" + }, + "total_snapshots_deleted": { + "type": "number" + }, + "total_snapshot_deletion_failures": { + "type": "number" + }, + "total_snapshots_failed": { + "type": "number" + }, + "total_snapshots_taken": { + "type": "number" + }, + "policy_stats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/slm._types.SnapshotPolicyStats" + } + } + }, + "required": [ + "retention_deletion_time", + "retention_deletion_time_millis", + "retention_failed", + "retention_runs", + "retention_timed_out", + "total_snapshots_deleted", + "total_snapshot_deletion_failures", + "total_snapshots_failed", + "total_snapshots_taken", + "policy_stats" + ] + }, + "examples": { + "GetSnapshotLifecycleManagementStatsResponseExample1": { + "description": "A successful response from `GET /_slm/stats`.", + "value": "{\n \"retention_runs\": 13,\n \"retention_failed\": 0,\n \"retention_timed_out\": 0,\n \"retention_deletion_time\": \"1.4s\",\n \"retention_deletion_time_millis\": 1404,\n \"policy_stats\": [ ],\n \"total_snapshots_taken\": 1,\n \"total_snapshots_failed\": 1,\n \"total_snapshots_deleted\": 0,\n \"total_snapshot_deletion_failures\": 0\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n GET\n /_slm/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "get_stats.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/status": { + "get": { + "tags": [ + "slm" + ], + "summary": "Get the snapshot lifecycle management status", + "operationId": "slm-get-status", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "operation_mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.LifecycleOperationMode" + } + ] + } + }, + "required": [ + "operation_mode" + ] + }, + "examples": { + "GetSnapshotLifecycleManagementStatusResponseExample1": { + "description": "A successful response from `GET _slm/status`.", + "value": "{\n \"operation_mode\": \"RUNNING\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.6.0", + "x-variations": [ + "
\n GET\n /_slm/status\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `read_slm`\n" + ], + "x-api": "get_status.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/start": { + "post": { + "tags": [ + "slm" + ], + "summary": "Start snapshot lifecycle management", + "description": "Snapshot lifecycle management (SLM) starts automatically when a cluster is formed.\nManually starting SLM is necessary only if it has been stopped using the stop SLM API.", + "operationId": "slm-start", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "StartSnapshotLifecycleManagementResponseExample1": { + "description": "A successful response from `POST _slm/start`.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.6.0", + "x-variations": [ + "
\n POST\n /_slm/start\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "start.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/stop": { + "post": { + "tags": [ + "slm" + ], + "summary": "Stop snapshot lifecycle management", + "description": "Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.\nThis API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices.\nStopping SLM does not stop any snapshots that are in progress.\nYou can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.\n\nThe API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped.\nUse the get snapshot lifecycle management status API to see if SLM is running.", + "operationId": "slm-stop", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.6.0", + "x-variations": [ + "
\n POST\n /_slm/stop\n
\n " + ], + "x-api": "stop.slm", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/_cleanup": { + "post": { + "tags": [ + "snapshot" + ], + "summary": "Clean up the snapshot repository", + "description": "Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-cleanup", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clean-up-snapshot-repo-api.html" + }, + "operationId": "snapshot-cleanup-repository", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the snapshot repository to clean up.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "description": "Statistics for cleanup operations.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.cleanup_repository.CleanupRepositoryResults" + } + ] + } + }, + "required": [ + "results" + ] + }, + "examples": { + "SnapshotCleanupRepositoryResponseExample1": { + "description": "A successful response from `POST /_snapshot/my_repository/_cleanup`.", + "value": "{\n \"results\": {\n \"deleted_bytes\": 20,\n \"deleted_blobs\": 5\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n POST\n /_snapshot/{repository}/_cleanup\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "cleanup_repository.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}": { + "put": { + "tags": [ + "snapshot" + ], + "summary": "Clone a snapshot", + "description": "Clone part of all of a snapshot into another snapshot in the same repository.", + "operationId": "snapshot-clone", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the snapshot repository that both source and target snapshot belong to.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "snapshot", + "description": "The source snapshot name.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "target_snapshot", + "description": "The target snapshot name.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "indices": { + "description": "A comma-separated list of indices to include in the snapshot.\nMulti-target syntax is supported.", + "type": "string" + } + }, + "required": [ + "indices" + ] + }, + "examples": { + "SnapshotCloneRequestExample1": { + "description": "Run `PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot` to clone the `source_snapshot` into a new `target_snapshot`.", + "value": "{\n \"indices\": \"index_a,index_b\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.10.0", + "x-variations": [ + "
\n PUT\n /_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "clone.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/{snapshot}": { + "get": { + "tags": [ + "snapshot" + ], + "summary": "Get snapshot information", + "description": "NOTE: The `after` parameter and `next` field enable you to iterate through snapshots with some consistency guarantees regarding concurrent creation or deletion of snapshots.\nIt is guaranteed that any snapshot that exists at the beginning of the iteration and is not concurrently deleted will be seen during the iteration.\nSnapshots concurrently created may be seen during an iteration.", + "operationId": "snapshot-get", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "A comma-separated list of snapshot repository names used to limit the request.\nWildcard (`*`) expressions are supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "snapshot", + "description": "A comma-separated list of snapshot names to retrieve\nWildcards (`*`) are supported.\n\n* To get information about all snapshots in a registered repository, use a wildcard (`*`) or `_all`.\n* To get information about any snapshots that are currently running, use `_current`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "after", + "description": "An offset identifier to start pagination from as returned by the next field in the response body.", + "deprecated": false, + "schema": { + "type": "string" + }, + "x-state": "Generally available; Added in 7.14.0", + "style": "form" + }, + { + "in": "query", + "name": "from_sort_value", + "description": "The value of the current sort column at which to start retrieval.\nIt can be a string `snapshot-` or a repository name when sorting by snapshot or repository name.\nIt can be a millisecond time value or a number when sorting by `index-` or shard count.", + "deprecated": false, + "schema": { + "type": "string" + }, + "x-state": "Generally available; Added in 7.16.0", + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error for any snapshots that are unavailable.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "index_details", + "description": "If `true`, the response includes 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.\nThe default is `false`, meaning that this information is omitted.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 7.13.0", + "style": "form" + }, + { + "in": "query", + "name": "index_names", + "description": "If `true`, the response includes the name of each index in each snapshot.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.3.0", + "style": "form" + }, + { + "in": "query", + "name": "include_repository", + "description": "If `true`, the response includes the repository name in each snapshot.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "order", + "description": "The sort order.\nValid values are `asc` for ascending and `desc` for descending order.\nThe default behavior is ascending order.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SortOrder" + }, + "x-state": "Generally available; Added in 7.14.0", + "style": "form" + }, + { + "in": "query", + "name": "offset", + "description": "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.", + "deprecated": false, + "schema": { + "type": "number" + }, + "x-state": "Generally available; Added in 7.15.0", + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "The maximum number of snapshots to return.\nThe default is 0, which means to return all that match the request without limit.", + "deprecated": false, + "schema": { + "type": "number" + }, + "x-state": "Generally available; Added in 7.14.0", + "style": "form" + }, + { + "in": "query", + "name": "slm_policy_filter", + "description": "Filter snapshots by a comma-separated list of snapshot lifecycle management (SLM) policy names that snapshots belong to.\n\nYou can use wildcards (`*`) and combinations of wildcards followed by exclude patterns starting with `-`.\nFor example, the pattern `*,-policy-a-\\*` will return all snapshots except for those that were created by an SLM policy with a name starting with `policy-a-`.\nNote that the wildcard pattern `*` matches all snapshots created by an SLM policy but not those snapshots that were not created by an SLM policy.\nTo include snapshots that were not created by an SLM policy, you can use the special pattern `_none` that will match all snapshots without an SLM policy.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "x-state": "Generally available; Added in 7.16.0", + "style": "form" + }, + { + "in": "query", + "name": "sort", + "description": "The sort order for the result.\nThe default behavior is sorting by snapshot start time stamp.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/snapshot._types.SnapshotSort" + }, + "x-state": "Generally available; Added in 7.14.0", + "style": "form" + }, + { + "in": "query", + "name": "state", + "description": "Only return snapshots with a state found in the given comma-separated list of snapshot states.\nThe default is all snapshot states.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/snapshot._types.SnapshotState" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot._types.SnapshotState" + } + } + ] + }, + "x-state": "Generally available; Added in 9.1.0", + "style": "form" + }, + { + "in": "query", + "name": "verbose", + "description": "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.\n\nNOTE: The parameters `size`, `order`, `after`, `from_sort_value`, `offset`, `slm_policy_filter`, and `sort` are not supported when you set `verbose=false` and the sort order for requests with `verbose=false` is undefined.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "remaining": { + "description": "The number of remaining snapshots that were not returned due to size limits and that can be fetched by additional requests using the `next` field value.", + "x-state": "Generally available; Added in 7.15.0", + "type": "number" + }, + "total": { + "description": "The total number of snapshots that match the request when ignoring the size limit or `after` query parameter.", + "x-state": "Generally available; Added in 7.15.0", + "type": "number" + }, + "next": { + "description": "If the request contained a size limit and there might be more results, a `next` field will be added to the response.\nIt can be used as the `after` query parameter to fetch additional results.", + "type": "string" + }, + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot.get.SnapshotResponseItem" + } + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot._types.SnapshotInfo" + } + } + }, + "required": [ + "remaining", + "total" + ] + }, + "examples": { + "SnapshotGetResponseExample1": { + "description": "A successful response from `GET /_snapshot/my_repository/snapshot_*?sort=start_time&from_sort_value=1577833200000`. The response contains information for all snapshots with names starting with `snapshot_` and that started on or after timestamp `1577833200000` (Jan 1st 2020) when sorted by snapshot start time in the default ascending order.\n", + "value": "{\n \"snapshots\": [\n {\n \"snapshot\": \"snapshot_1\",\n \"uuid\": \"dKb54xw67gvdRctLCxSket\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-07-06T21:55:18.128Z\",\n \"start_time_in_millis\": 1593093628849,\n \"end_time\": \"2020-07-06T21:55:18.129Z\",\n \"end_time_in_millis\": 1593093628850,\n \"duration_in_millis\": 1,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n },\n {\n \"snapshot\": \"snapshot_2\",\n \"uuid\": \"vdRctLCxSketdKb54xw67g\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-07-06T21:55:18.130Z\",\n \"start_time_in_millis\": 1593093628851,\n \"end_time\": \"2020-07-06T21:55:18.130Z\",\n \"end_time_in_millis\": 1593093628851,\n \"duration_in_millis\": 0,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n },\n {\n \"snapshot\": \"snapshot_3\",\n \"uuid\": \"dRctdKb54xw67gvLCxSket\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-07-06T21:55:18.131Z\",\n \"start_time_in_millis\": 1593093628852,\n \"end_time\": \"2020-07-06T21:55:18.135Z\",\n \"end_time_in_millis\": 1593093628856,\n \"duration_in_millis\": 4,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n ],\n \"total\": 3,\n \"remaining\": 0\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_snapshot/{repository}/{snapshot}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" + ], + "x-api": "get.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "snapshot" + ], + "summary": "Create a snapshot", + "description": "Take a snapshot of a cluster or of data streams and indices.", + "externalDocs": { + "description": "\"Create", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-snapshot-api.html" + }, + "operationId": "snapshot-create", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the repository for the snapshot.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "snapshot", + "description": "The name of the snapshot.\nIt supportes date math.\nIt must be unique in the repository.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request returns a response when the snapshot is complete.\nIf `false`, the request returns a response when the snapshot initializes.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expand_wildcards": { + "description": "Determines how wildcard patterns in the `indices` parameter match data streams and indices.\nIt supports comma-separated values such as `open,hidden`.", + "default": "all", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ExpandWildcards" + } + ] + }, + "feature_states": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state" + }, + "description": "The feature states to include in the snapshot.\nEach feature state includes one or more system indices containing related data.\nYou can view a list of eligible features using the get features API.\n\nIf `include_global_state` is `true`, all current feature states are included by default.\nIf `include_global_state` is `false`, no feature states are included by default.\n\nNote that specifying an empty array will result in the default behavior.\nTo exclude all feature states, regardless of the `include_global_state` value, specify an array with only the value `none` (`[\"none\"]`).", + "type": "array", + "items": { + "type": "string" + } + }, + "ignore_unavailable": { + "description": "If `true`, the request ignores data streams and indices in `indices` that are missing or closed.\nIf `false`, the request returns an error for any data stream or index that is missing or closed.", + "default": false, + "type": "boolean" + }, + "include_global_state": { + "description": "If `true`, the current cluster state is included in the snapshot.\nThe cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies.\nIt also includes data stored in system indices, such as Watches and task records (configurable via `feature_states`).", + "default": true, + "type": "boolean" + }, + "indices": { + "description": "A comma-separated list of data streams and indices to include in the snapshot.\nIt supports a multi-target syntax.\nThe default is an empty array (`[]`), which includes all regular data streams and regular indices.\nTo exclude all data streams and indices, use `-*`.\n\nYou can't use this parameter to include or exclude system indices or system data streams from a snapshot.\nUse `feature_states` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "metadata": { + "description": "Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data.\nIt can have any contents but it must be less than 1024 bytes.\nThis information is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "partial": { + "description": "If `true`, it enables you to restore a partial snapshot of indices with unavailable shards.\nOnly shards that were successfully included in the snapshot will be restored.\nAll missing shards will be recreated as empty.\n\nIf `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.", + "default": false, + "type": "boolean" + } + } + }, + "examples": { + "SnapshotCreateRequestExample1": { + "description": "Run `PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true` to take a snapshot of `index_1` and `index_2`.", + "value": "{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "accepted": { + "description": "Equals `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false`", + "x-state": "Generally available; Added in 7.15.0", + "type": "boolean" + }, + "snapshot": { + "description": "Snapshot information. Present when the request had `wait_for_completion` set to `true`", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.SnapshotInfo" + } + ] + } + } + }, + "examples": { + "SnapshotCreateResponseExample1": { + "description": "A successful response from `PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true`.", + "value": "{\n \"snapshot\": {\n \"snapshot\": \"snapshot_2\",\n \"uuid\": \"vdRctLCxSketdKb54xw67g\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n },\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-06-25T14:00:28.850Z\",\n \"start_time_in_millis\": 1593093628850,\n \"end_time\": \"2020-06-25T14:00:28.850Z\",\n \"end_time_in_millis\": 1593094752018,\n \"duration_in_millis\": 0,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_snapshot/{repository}/{snapshot}\n
\n ", + "
\n POST\n /_snapshot/{repository}/{snapshot}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `create_snapshot`\n" + ], + "x-api": "create.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "snapshot" + ], + "summary": "Create a snapshot", + "description": "Take a snapshot of a cluster or of data streams and indices.", + "externalDocs": { + "description": "\"Create", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-snapshot-api.html" + }, + "operationId": "snapshot-create-1", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the repository for the snapshot.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "snapshot", + "description": "The name of the snapshot.\nIt supportes date math.\nIt must be unique in the repository.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request returns a response when the snapshot is complete.\nIf `false`, the request returns a response when the snapshot initializes.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expand_wildcards": { + "description": "Determines how wildcard patterns in the `indices` parameter match data streams and indices.\nIt supports comma-separated values such as `open,hidden`.", + "default": "all", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ExpandWildcards" + } + ] + }, + "feature_states": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state" + }, + "description": "The feature states to include in the snapshot.\nEach feature state includes one or more system indices containing related data.\nYou can view a list of eligible features using the get features API.\n\nIf `include_global_state` is `true`, all current feature states are included by default.\nIf `include_global_state` is `false`, no feature states are included by default.\n\nNote that specifying an empty array will result in the default behavior.\nTo exclude all feature states, regardless of the `include_global_state` value, specify an array with only the value `none` (`[\"none\"]`).", + "type": "array", + "items": { + "type": "string" + } + }, + "ignore_unavailable": { + "description": "If `true`, the request ignores data streams and indices in `indices` that are missing or closed.\nIf `false`, the request returns an error for any data stream or index that is missing or closed.", + "default": false, + "type": "boolean" + }, + "include_global_state": { + "description": "If `true`, the current cluster state is included in the snapshot.\nThe cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies.\nIt also includes data stored in system indices, such as Watches and task records (configurable via `feature_states`).", + "default": true, + "type": "boolean" + }, + "indices": { + "description": "A comma-separated list of data streams and indices to include in the snapshot.\nIt supports a multi-target syntax.\nThe default is an empty array (`[]`), which includes all regular data streams and regular indices.\nTo exclude all data streams and indices, use `-*`.\n\nYou can't use this parameter to include or exclude system indices or system data streams from a snapshot.\nUse `feature_states` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "metadata": { + "description": "Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data.\nIt can have any contents but it must be less than 1024 bytes.\nThis information is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "partial": { + "description": "If `true`, it enables you to restore a partial snapshot of indices with unavailable shards.\nOnly shards that were successfully included in the snapshot will be restored.\nAll missing shards will be recreated as empty.\n\nIf `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.", + "default": false, + "type": "boolean" + } + } + }, + "examples": { + "SnapshotCreateRequestExample1": { + "description": "Run `PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true` to take a snapshot of `index_1` and `index_2`.", + "value": "{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "accepted": { + "description": "Equals `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false`", + "x-state": "Generally available; Added in 7.15.0", + "type": "boolean" + }, + "snapshot": { + "description": "Snapshot information. Present when the request had `wait_for_completion` set to `true`", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.SnapshotInfo" + } + ] + } + } + }, + "examples": { + "SnapshotCreateResponseExample1": { + "description": "A successful response from `PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true`.", + "value": "{\n \"snapshot\": {\n \"snapshot\": \"snapshot_2\",\n \"uuid\": \"vdRctLCxSketdKb54xw67g\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n },\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-06-25T14:00:28.850Z\",\n \"start_time_in_millis\": 1593093628850,\n \"end_time\": \"2020-06-25T14:00:28.850Z\",\n \"end_time_in_millis\": 1593094752018,\n \"duration_in_millis\": 0,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_snapshot/{repository}/{snapshot}\n
\n ", + "
\n POST\n /_snapshot/{repository}/{snapshot}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `create_snapshot`\n" + ], + "x-api": "create.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "snapshot" + ], + "summary": "Delete snapshots", + "operationId": "snapshot-delete", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the repository to delete a snapshot from.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "snapshot", + "description": "A comma-separated list of snapshot names to delete.\nIt also accepts wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request returns a response when the matching snapshots are all deleted.\nIf `false`, the request returns a response as soon as the deletes are scheduled.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "SnapshotDeleteResponseExample1": { + "description": "A successful response from `DELETE /_snapshot/my_repository/snapshot_2,snapshot_3`. The request deletes `snapshot_2` and `snapshot_3` from the repository named `my_repository`.\n", + "value": "{\n \"acknowledged\" : true\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_snapshot/{repository}/{snapshot}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "delete.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}": { + "get": { + "tags": [ + "snapshot" + ], + "summary": "Get snapshot repository information", + "operationId": "snapshot-get-repository-1", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "A comma-separated list of snapshot repository names used to limit the request.\nWildcard (`*`) expressions are supported including combining wildcards with exclude patterns starting with `-`.\n\nTo get information about all snapshot repositories registered in the cluster, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "local", + "description": "If `true`, the request gets information from the local node only.\nIf `false`, the request gets information from the master node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/snapshot._types.Repository" + } + }, + "examples": { + "SnapshotGetRepositoryResponseExample1": { + "description": "A successful response from `GET /_snapshot/my_repository`.", + "value": "{\n \"my_repository\" : {\n \"type\" : \"fs\",\n \"uuid\" : \"0JLknrXbSUiVPuLakHjBrQ\",\n \"settings\" : {\n \"location\" : \"my_backup_location\"\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_snapshot/{repository}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" + ], + "x-api": "get_repository.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "snapshot" + ], + "summary": "Create or update a snapshot repository", + "description": "IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.\nTo register a snapshot repository, the cluster's global metadata must be writeable.\nEnsure there are no cluster blocks (for example, `cluster.blocks.read_only` and `clsuter.blocks.read_only_allow_delete` settings) that prevent write access.\n\nSeveral options for this API can be specified using a query parameter or a request body parameter.\nIf both parameters are specified, only the query parameter is used.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-snapshot-repo-api.html" + }, + "operationId": "snapshot-create-repository", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the snapshot repository to register or update.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "verify", + "description": "If `true`, the request verifies the repository is functional on all master and data nodes in the cluster.\nIf `false`, this verification is skipped.\nYou can also perform this verification with the verify snapshot repository API.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snapshot._types.Repository" + }, + "examples": { + "SnapshotCreateRepositoryRequestExample1": { + "summary": "A shared file system repository", + "description": "Run `PUT /_snapshot/my_repository` to create or update a shared file system snapshot repository.", + "value": "{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample2": { + "summary": "An Azure repository", + "description": "Run `PUT /_snapshot/my_repository` to create or update an Azure snapshot repository.", + "value": "{\n \"type\": \"azure\",\n \"settings\": {\n \"client\": \"secondary\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample3": { + "summary": "A Google Cloud Storage repository", + "description": "Run `PUT /_snapshot/my_gcs_repository` to create or update a Google Cloud Storage snapshot repository.", + "value": "{\n \"type\": \"gcs\",\n \"settings\": {\n \"bucket\": \"my_other_bucket\",\n \"base_path\": \"dev\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample4": { + "summary": "An S3 repository", + "description": "Run `PUT /_snapshot/my_s3_repository` to create or update an AWS S3 snapshot repository.", + "value": "{\n \"type\": \"s3\",\n \"settings\": {\n \"bucket\": \"my-bucket\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample5": { + "summary": "A source-only repository", + "description": "Run `PUT _snapshot/my_src_only_repository` to create or update a source-only snapshot repository.", + "value": "{\n \"type\": \"source\",\n \"settings\": {\n \"delegate_type\": \"fs\",\n \"location\": \"my_backup_repository\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample6": { + "summary": "A read-only URL repository", + "description": "Run `PUT _snapshot/my_read_only_url_repository` to create or update a read-only URL snapshot repository.", + "value": "{\n \"type\": \"url\",\n \"settings\": {\n \"url\": \"file:/mount/backups/my_fs_backup_location\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_snapshot/{repository}\n
\n ", + "
\n POST\n /_snapshot/{repository}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "create_repository.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "snapshot" + ], + "summary": "Create or update a snapshot repository", + "description": "IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.\nTo register a snapshot repository, the cluster's global metadata must be writeable.\nEnsure there are no cluster blocks (for example, `cluster.blocks.read_only` and `clsuter.blocks.read_only_allow_delete` settings) that prevent write access.\n\nSeveral options for this API can be specified using a query parameter or a request body parameter.\nIf both parameters are specified, only the query parameter is used.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-snapshot-repo-api.html" + }, + "operationId": "snapshot-create-repository-1", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the snapshot repository to register or update.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "verify", + "description": "If `true`, the request verifies the repository is functional on all master and data nodes in the cluster.\nIf `false`, this verification is skipped.\nYou can also perform this verification with the verify snapshot repository API.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snapshot._types.Repository" + }, + "examples": { + "SnapshotCreateRepositoryRequestExample1": { + "summary": "A shared file system repository", + "description": "Run `PUT /_snapshot/my_repository` to create or update a shared file system snapshot repository.", + "value": "{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample2": { + "summary": "An Azure repository", + "description": "Run `PUT /_snapshot/my_repository` to create or update an Azure snapshot repository.", + "value": "{\n \"type\": \"azure\",\n \"settings\": {\n \"client\": \"secondary\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample3": { + "summary": "A Google Cloud Storage repository", + "description": "Run `PUT /_snapshot/my_gcs_repository` to create or update a Google Cloud Storage snapshot repository.", + "value": "{\n \"type\": \"gcs\",\n \"settings\": {\n \"bucket\": \"my_other_bucket\",\n \"base_path\": \"dev\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample4": { + "summary": "An S3 repository", + "description": "Run `PUT /_snapshot/my_s3_repository` to create or update an AWS S3 snapshot repository.", + "value": "{\n \"type\": \"s3\",\n \"settings\": {\n \"bucket\": \"my-bucket\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample5": { + "summary": "A source-only repository", + "description": "Run `PUT _snapshot/my_src_only_repository` to create or update a source-only snapshot repository.", + "value": "{\n \"type\": \"source\",\n \"settings\": {\n \"delegate_type\": \"fs\",\n \"location\": \"my_backup_repository\"\n }\n}" + }, + "SnapshotCreateRepositoryRequestExample6": { + "summary": "A read-only URL repository", + "description": "Run `PUT _snapshot/my_read_only_url_repository` to create or update a read-only URL snapshot repository.", + "value": "{\n \"type\": \"url\",\n \"settings\": {\n \"url\": \"file:/mount/backups/my_fs_backup_location\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_snapshot/{repository}\n
\n ", + "
\n POST\n /_snapshot/{repository}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "create_repository.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "snapshot" + ], + "summary": "Delete snapshot repositories", + "description": "When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots.\nThe snapshots themselves are left untouched and in place.", + "operationId": "snapshot-delete-repository", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The ame of the snapshot repositories to unregister.\nWildcard (`*`) patterns are supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_snapshot/{repository}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "delete_repository.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot": { + "get": { + "tags": [ + "snapshot" + ], + "summary": "Get snapshot repository information", + "operationId": "snapshot-get-repository", + "parameters": [ + { + "in": "query", + "name": "local", + "description": "If `true`, the request gets information from the local node only.\nIf `false`, the request gets information from the master node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/snapshot._types.Repository" + } + }, + "examples": { + "SnapshotGetRepositoryResponseExample1": { + "description": "A successful response from `GET /_snapshot/my_repository`.", + "value": "{\n \"my_repository\" : {\n \"type\" : \"fs\",\n \"uuid\" : \"0JLknrXbSUiVPuLakHjBrQ\",\n \"settings\" : {\n \"location\" : \"my_backup_location\"\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_snapshot\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" + ], + "x-api": "get_repository.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/_analyze": { + "post": { + "tags": [ + "snapshot" + ], + "summary": "Analyze a snapshot repository", + "description": "Performs operations on a snapshot repository in order to check for incorrect behaviour.\n\nThere are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch.\nSome storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do.\nThis API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system.\n\nThe default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations.\nRun your first analysis with the default parameter values to check for simple problems.\nSome repositories may behave correctly when lightly loaded but incorrectly under production-like workloads.\nIf the first analysis is successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a `blob_count` of at least `2000`, a `max_blob_size` of at least `2gb`, a `max_total_data_size` of at least `1tb`, and a `register_operation_count` of at least `100`.\nAlways specify a generous timeout, possibly `1h` or longer, to allow time for each analysis to run to completion.\nSome repositories may behave correctly when accessed by a small number of Elasticsearch nodes but incorrectly when accessed concurrently by a production-scale cluster.\nPerform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once.\n\nIf the analysis fails, Elasticsearch detected that your repository behaved unexpectedly.\nThis usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support.\nIf so, this storage system is not suitable for use as a snapshot repository.\nRepository analysis triggers conditions that occur only rarely when taking snapshots in a production system.\nSnapshotting to unsuitable storage may appear to work correctly most of the time despite repository analysis failures.\nHowever your snapshot data is at risk if you store it in a snapshot repository that does not reliably pass repository analysis.\nYou can demonstrate that the analysis failure is due to an incompatible storage implementation by verifying that Elasticsearch does not detect the same problem when analysing the reference implementation of the storage protocol you are using.\nFor instance, if you are using storage that offers an API which the supplier claims to be compatible with AWS S3, verify that repositories in AWS S3 do not fail repository analysis.\nThis allows you to demonstrate to your storage supplier that a repository analysis failure must only be caused by an incompatibility with AWS S3 and cannot be attributed to a problem in Elasticsearch.\nPlease do not report Elasticsearch issues involving third-party storage systems unless you can demonstrate that the same issue exists when analysing a repository that uses the reference implementation of the same storage protocol.\nYou will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects.\n\nIf the analysis is successful, the API returns details of the testing process, optionally including how long each operation took.\nYou can use this information to determine the performance of your storage system.\nIf any operation fails or returns an incorrect result, the API returns an error.\nIf the API returns an error, it may not have removed all the data it wrote to the repository.\nThe error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs.\nYou should verify that this location has been cleaned up correctly.\nIf there is still leftover data at the specified location, you should manually remove it.\n\nIf the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled.\nSome clients are configured to close their connection if no response is received within a certain timeout.\nAn analysis takes a long time to complete so you might need to relax any such client-side timeouts.\nOn cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all.\nThe path to the leftover data is recorded in the Elasticsearch logs.\nYou should verify that this location has been cleaned up correctly.\nIf there is still leftover data at the specified location, you should manually remove it.\n\nIf the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed.\nThe analysis attempts to detect common bugs but it does not offer 100% coverage.\nAdditionally, it does not test the following:\n\n* Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster.\n* Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted.\n* Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results.\n\nIMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again.\nThis consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself.\nYou must ensure this load does not affect other users of these systems.\nAnalyses respect the repository settings `max_snapshot_bytes_per_sec` and `max_restore_bytes_per_sec` if available and the cluster setting `indices.recovery.max_bytes_per_sec` which you can use to limit the bandwidth they consume.\n\nNOTE: This API is intended for exploratory use by humans.\nYou should expect the request parameters and the response format to vary in future versions.\nThe response exposes immplementation details of the analysis which may change from version to version.\n\nNOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones.\nA storage system that passes repository analysis with one version of Elasticsearch may fail with a different version.\nThis indicates it behaves incorrectly in ways that the former version did not detect.\nYou must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch.\n\nNOTE: This API may not work correctly in a mixed-version cluster.\n\n*Implementation details*\n\nNOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions.\nThe request parameters and response format depend on details of the implementation so may also be different in newer versions.\n\nThe analysis comprises a number of blob-level tasks, as set by the `blob_count` parameter and a number of compare-and-exchange operations on linearizable registers, as set by the `register_operation_count` parameter.\nThese tasks are distributed over the data and master-eligible nodes in the cluster for execution.\n\nFor most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote.\nThe size of the blob is chosen randomly, according to the `max_blob_size` and `max_total_data_size` parameters.\nIf any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires.\n\nFor some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes.\nThese reads are permitted to fail, but must not return partial data.\nIf any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires.\n\nFor some blob-level tasks, the executing node will overwrite the blob while its peers are reading it.\nIn this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs.\nIf any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites.\n\nThe executing node will use a variety of different methods to write the blob.\nFor instance, where applicable, it will use both single-part and multi-part uploads.\nSimilarly, the reading nodes will use a variety of different methods to read the data back again.\nFor instance they may read the entire blob from start to end or may read only a subset of the data.\n\nFor some blob-level tasks, the executing node will cancel the write before it is complete.\nIn this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob.\n\nLinearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation.\nThis operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time.\nThe detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type.\nRepository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed.\nRepository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results.\nIf an operation fails due to contention, Elasticsearch retries the operation until it succeeds.\nMost of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob.\nSome operations also verify the behavior on small blobs with sizes other than 8 bytes.", + "operationId": "snapshot-repository-analyze", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the repository.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "blob_count", + "description": "The total number of blobs to write to the repository during the test.\nFor realistic experiments, set this parameter to at least `2000`.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "concurrency", + "description": "The number of operations to run concurrently during the test.\nFor realistic experiments, leave this parameter unset.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "detailed", + "description": "Indicates whether to return detailed results, including timing information for every operation performed during the analysis.\nIf false, it returns only a summary of the analysis.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "early_read_node_count", + "description": "The number of nodes on which to perform an early read operation while writing each blob.\nEarly read operations are only rarely performed.\nFor realistic experiments, leave this parameter unset.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_blob_size", + "description": "The maximum size of a blob to be written during the test.\nFor realistic experiments, set this parameter to at least `2gb`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_total_data_size", + "description": "An upper limit on the total size of all the blobs written during the test.\nFor realistic experiments, set this parameter to at least `1tb`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "style": "form" + }, + { + "in": "query", + "name": "rare_action_probability", + "description": "The probability of performing a rare action such as an early read, an overwrite, or an aborted write on each blob.\nFor realistic experiments, leave this parameter unset.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "rarely_abort_writes", + "description": "Indicates whether to rarely cancel writes before they complete.\nFor realistic experiments, leave this parameter unset.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "read_node_count", + "description": "The number of nodes on which to read a blob after writing.\nFor realistic experiments, leave this parameter unset.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "register_operation_count", + "description": "The minimum number of linearizable register operations to perform in total.\nFor realistic experiments, set this parameter to at least `100`.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "seed", + "description": "The seed for the pseudo-random number generator used to generate the list of operations performed during the test.\nTo repeat the same set of operations in multiple experiments, use the same seed in each experiment.\nNote that the operations are performed concurrently so might not always happen in the same order on each run.\nFor realistic experiments, leave this parameter unset.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period of time to wait for the test to complete.\nIf no response is received before the timeout expires, the test is cancelled and returns an error.\nFor realistic experiments, set this parameter sufficiently long to allow the test to complete.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "blob_count": { + "description": "The number of blobs written to the repository during the test.", + "type": "number" + }, + "blob_path": { + "description": "The path in the repository under which all the blobs were written during the test.", + "type": "string" + }, + "concurrency": { + "description": "The number of write operations performed concurrently during the test.", + "type": "number" + }, + "coordinating_node": { + "description": "The node that coordinated the analysis and performed the final cleanup.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.SnapshotNodeInfo" + } + ] + }, + "delete_elapsed": { + "description": "The time it took to delete all the blobs in the container.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "delete_elapsed_nanos": { + "description": "The time it took to delete all the blobs in the container, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "details": { + "description": "A description of every read and write operation performed during the test.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.DetailsInfo" + } + ] + }, + "early_read_node_count": { + "description": "The limit on the number of nodes on which early read operations were performed after writing each blob.", + "type": "number" + }, + "issues_detected": { + "description": "A list of correctness issues detected, which is empty if the API succeeded.\nIt is included to emphasize that a successful response does not guarantee correct behaviour in future.", + "type": "array", + "items": { + "type": "string" + } + }, + "listing_elapsed": { + "description": "The time it took to retrieve a list of all the blobs in the container.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "listing_elapsed_nanos": { + "description": "The time it took to retrieve a list of all the blobs in the container, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "max_blob_size": { + "description": "The limit on the size of a blob written during the test.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "max_blob_size_bytes": { + "description": "The limit, in bytes, on the size of a blob written during the test.", + "type": "number" + }, + "max_total_data_size": { + "description": "The limit on the total size of all blob written during the test.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "max_total_data_size_bytes": { + "description": "The limit, in bytes, on the total size of all blob written during the test.", + "type": "number" + }, + "rare_action_probability": { + "description": "The probability of performing rare actions during the test.", + "type": "number" + }, + "read_node_count": { + "description": "The limit on the number of nodes on which read operations were performed after writing each blob.", + "type": "number" + }, + "repository": { + "description": "The name of the repository that was the subject of the analysis.", + "type": "string" + }, + "seed": { + "description": "The seed for the pseudo-random number generator used to generate the operations used during the test.", + "type": "number" + }, + "summary": { + "description": "A collection of statistics that summarize the results of the test.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.SummaryInfo" + } + ] + } + }, + "required": [ + "blob_count", + "blob_path", + "concurrency", + "coordinating_node", + "delete_elapsed", + "delete_elapsed_nanos", + "details", + "early_read_node_count", + "issues_detected", + "listing_elapsed", + "listing_elapsed_nanos", + "max_blob_size", + "max_blob_size_bytes", + "max_total_data_size", + "max_total_data_size_bytes", + "rare_action_probability", + "read_node_count", + "repository", + "seed", + "summary" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.12.0", + "x-variations": [ + "
\n POST\n /_snapshot/{repository}/_analyze\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "repository_analyze.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/_verify_integrity": { + "post": { + "tags": [ + "snapshot" + ], + "summary": "Verify the repository integrity", + "description": "Verify the integrity of the contents of a snapshot repository.\n\nThis API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail.\n\nIf you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its `read_only` option to `true`, and use this API to verify its integrity.\nUntil you do so:\n\n* It may not be possible to restore some snapshots from this repository.\n* Searchable snapshots may report errors when searched or may have unassigned shards.\n* Taking snapshots into this repository may fail or may appear to succeed but have created a snapshot which cannot be restored.\n* Deleting snapshots from this repository may fail or may appear to succeed but leave the underlying data on disk.\n* Continuing to write to the repository while it is in an invalid state may causing additional damage to its contents.\n\nIf the API finds any problems with the integrity of the contents of your repository, Elasticsearch will not be able to repair the damage.\nThe only way to bring the repository back into a fully working state after its contents have been damaged is by restoring its contents from a repository backup which was taken before the damage occurred.\nYou must also identify what caused the damage and take action to prevent it from happening again.\n\nIf you cannot restore a repository backup, register a new repository and use this for all future snapshot operations.\nIn some cases it may be possible to recover some of the contents of a damaged repository, either by restoring as many of its snapshots as needed and taking new snapshots of the restored data, or by using the reindex API to copy data from any searchable snapshots mounted from the damaged repository.\n\nAvoid all operations which write to the repository while the verify repository integrity API is running.\nIf something changes the repository contents while an integrity verification is running then Elasticsearch may incorrectly report having detected some anomalies in its contents due to the concurrent writes.\nIt may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting.\n\nNOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions.\n\nNOTE: This API may not work correctly in a mixed-version cluster.\n\nThe default values for the parameters of this API are designed to limit the impact of the integrity verification on other activities in your cluster.\nFor instance, by default it will only use at most half of the `snapshot_meta` threads to verify the integrity of each snapshot, allowing other snapshot operations to use the other half of this thread pool.\nIf you modify these parameters to speed up the verification process, you risk disrupting other snapshot-related operations in your cluster.\nFor large repositories, consider setting up a separate single-node Elasticsearch cluster just for running the integrity verification API.\n\nThe response exposes implementation details of the analysis which may change from version to version.\nThe response body format is therefore not considered stable and may be different in newer versions.", + "operationId": "snapshot-repository-verify-integrity", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the snapshot repository.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "blob_thread_pool_concurrency", + "description": "If `verify_blob_contents` is `true`, this parameter specifies how many blobs to verify at once.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "index_snapshot_verification_concurrency", + "description": "The maximum number of index snapshots to verify concurrently within each index verification.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "index_verification_concurrency", + "description": "The number of indices to verify concurrently.\nThe default behavior is to use the entire `snapshot_meta` thread pool.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_bytes_per_sec", + "description": "If `verify_blob_contents` is `true`, this parameter specifies the maximum amount of data that Elasticsearch will read from the repository every second.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_failed_shard_snapshots", + "description": "The number of shard snapshot failures to track during integrity verification, in order to avoid excessive resource usage.\nIf your repository contains more than this number of shard snapshot failures, the verification will fail.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "meta_thread_pool_concurrency", + "description": "The maximum number of snapshot metadata operations to run concurrently.\nThe default behavior is to use at most half of the `snapshot_meta` thread pool at once.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "snapshot_verification_concurrency", + "description": "The number of snapshots to verify concurrently.\nThe default behavior is to use at most half of the `snapshot_meta` thread pool at once.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "verify_blob_contents", + "description": "Indicates whether to verify the checksum of every data blob in the repository.\nIf this feature is enabled, Elasticsearch will read the entire repository contents, which may be extremely slow and expensive.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Technical preview; Added in 8.16.0", + "x-variations": [ + "
\n POST\n /_snapshot/{repository}/_verify_integrity\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "repository_verify_integrity.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/{snapshot}/_restore": { + "post": { + "tags": [ + "snapshot" + ], + "summary": "Restore a snapshot", + "description": "Restore a snapshot of a cluster or data streams and indices.\n\nYou can restore a snapshot only to a running cluster with an elected master node.\nThe snapshot repository must be registered and available to the cluster.\nThe snapshot and cluster versions must be compatible.\n\nTo restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks.\n\nBefore you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API:\n\n```\nGET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\n```\n\nIf no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices.\n\nIf your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/restore-snapshot", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/restore-snapshot-api.html" + }, + "operationId": "snapshot-restore", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the repository to restore a snapshot from.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "snapshot", + "description": "The name of the snapshot to restore.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request returns a response when the restore operation completes.\nThe operation is complete when it finishes all attempts to recover primary shards for restored indices.\nThis applies even if one or more of the recovery attempts fail.\n\nIf `false`, the request returns a response when the restore operation initializes.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "feature_states": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state" + }, + "description": "The feature states to restore.\nIf `include_global_state` is `true`, the request restores all feature states in the snapshot by default.\nIf `include_global_state` is `false`, the request restores no feature states by default.\nNote that specifying an empty array will result in the default behavior.\nTo restore no feature states, regardless of the `include_global_state` value, specify an array containing only the value `none` (`[\"none\"]`).", + "type": "array", + "items": { + "type": "string" + } + }, + "ignore_index_settings": { + "description": "The index settings to not restore from the snapshot.\nYou can't use this option to ignore `index.number_of_shards`.\n\nFor data streams, this option applies only to restored backing indices.\nNew backing indices are configured using the data stream's matching index template.", + "type": "array", + "items": { + "type": "string" + } + }, + "ignore_unavailable": { + "description": "If `true`, the request ignores any index or data stream in indices that's missing from the snapshot.\nIf `false`, the request returns an error for any missing index or data stream.", + "default": false, + "type": "boolean" + }, + "include_aliases": { + "description": "If `true`, the request restores aliases for any restored data streams and indices.\nIf `false`, the request doesn’t restore aliases.", + "default": true, + "type": "boolean" + }, + "include_global_state": { + "description": "If `true`, restore the cluster state. The cluster state includes:\n\n* Persistent cluster settings\n* Index templates\n* Legacy index templates\n* Ingest pipelines\n* Index lifecycle management (ILM) policies\n* Stored scripts\n* For snapshots taken after 7.12.0, feature states\n\nIf `include_global_state` is `true`, the restore operation merges the legacy index templates in your cluster with the templates contained in the snapshot, replacing any existing ones whose name matches one in the snapshot.\nIt completely removes all persistent settings, non-legacy index templates, ingest pipelines, and ILM lifecycle policies that exist in your cluster and replaces them with the corresponding items from the snapshot.\n\nUse the `feature_states` parameter to configure how feature states are restored.\n\nIf `include_global_state` is `true` and a snapshot was created without a global state then the restore request will fail.", + "default": false, + "type": "boolean" + }, + "index_settings": { + "description": "Index settings to add or change in restored indices, including backing indices.\nYou can't use this option to change `index.number_of_shards`.\n\nFor data streams, this option applies only to restored backing indices.\nNew backing indices are configured using the data stream's matching index template.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "indices": { + "description": "A comma-separated list of indices and data streams to restore.\nIt supports a multi-target syntax.\nThe default behavior is all regular indices and regular data streams in the snapshot.\n\nYou can't use this parameter to restore system indices or system data streams.\nUse `feature_states` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "partial": { + "description": "If `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.\n\nIf true, it allows restoring a partial snapshot of indices with unavailable shards.\nOnly shards that were successfully included in the snapshot will be restored.\nAll missing shards will be recreated as empty.", + "default": false, + "type": "boolean" + }, + "rename_pattern": { + "externalDocs": { + "url": "https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#appendReplacement-java.lang.StringBuffer-java.lang.String-" + }, + "description": "A rename pattern to apply to restored data streams and indices.\nData streams and indices matching the rename pattern will be renamed according to `rename_replacement`.\n\nThe rename pattern is applied as defined by the regular expression that supports referencing the original text, according to the `appendReplacement` logic.", + "type": "string" + }, + "rename_replacement": { + "description": "The rename replacement string that is used with the `rename_pattern`.", + "type": "string" + } + } + }, + "examples": { + "SnapshotRestoreRequestExample1": { + "summary": "Restore with rename pattern", + "description": "Run `POST /_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true`. It restores `index_1` and `index_2` from `snapshot_2`. The `rename_pattern` and `rename_replacement` parameters indicate any index matching the regular expression `index_(.+)` will be renamed using the pattern `restored_index_$1`. For example, `index_1` will be renamed to `restored_index_1`.\n", + "value": "{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"rename_pattern\": \"index_(.+)\",\n \"rename_replacement\": \"restored_index_$1\",\n \"include_aliases\": false\n}" + }, + "SnapshotRestoreRequestExample2": { + "summary": "Restore in-place", + "description": "Close `index_1` then run `POST /_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true` to restore an index in-place. For example, you might want to perform this type of restore operation when no alternative options surface after the cluster allocation explain API reports `no_valid_shard_copy`.\n", + "value": "{\n \"indices\": \"index_1\"\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "accepted": { + "type": "boolean" + }, + "snapshot": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.restore.SnapshotRestore" + } + ] + } + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_snapshot/{repository}/{snapshot}/_restore\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "restore.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/_status": { + "get": { + "tags": [ + "snapshot" + ], + "summary": "Get the snapshot status", + "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nNote that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster.\nLoading the stats from the repository is an expensive operation (see the WARNING below).\nTherefore the stats values for such shards will be -1 even though the \"stage\" value will be \"DONE\", in order to minimize latency.\nA \"description\" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid.\nConsequently, the total stats for the index will be less than expected due to the missing values from these shards.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", + "operationId": "snapshot-status", + "parameters": [ + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error for any snapshots that are unavailable.\nIf `true`, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot._types.Status" + } + } + }, + "required": [ + "snapshots" + ] + }, + "examples": { + "SnapshotStatusResponseExample1": { + "summary": "All shard stats present", + "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. The response contains detailed status information for `snapshot_2` in the `my_repository` repository.\n", + "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"SUCCESS\",\n \"include_global_state\" : false,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326691,\n \"time_in_millis\" : 205\n },\n \"indices\" : {\n \"index_1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n }\n }\n }\n }\n }\n }\n ]\n}" + }, + "SnapshotStatusResponseExample2": { + "summary": "Missing shard stats", + "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. Note that in this example the stats for `index-2` shard `0` are missing, with explanatory details provided in the `description` field.\n", + "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"STARTED\",\n \"include_global_state\" : true,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 2\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674327,\n \"time_in_millis\" : 189\n },\n \"indices\" : {\n \"index-1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 0,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"STARTED\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"node\" : \"VJzy6aKJSVKwcfjIFBPXxw\"\n }\n }\n },\n \"index-2\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"total\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"total\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"description\" : \"Snapshot shard stats missing from a currently running snapshot due to a node leaving the cluster after completing the shard snapshot; retry once the snapshot has completed to load all shard stats from the repository.\"\n }\n }\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n GET\n /_snapshot/_status\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" + ], + "x-api": "status.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/_status": { + "get": { + "tags": [ + "snapshot" + ], + "summary": "Get the snapshot status", + "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nNote that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster.\nLoading the stats from the repository is an expensive operation (see the WARNING below).\nTherefore the stats values for such shards will be -1 even though the \"stage\" value will be \"DONE\", in order to minimize latency.\nA \"description\" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid.\nConsequently, the total stats for the index will be less than expected due to the missing values from these shards.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", + "operationId": "snapshot-status-1", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The snapshot repository name used to limit the request.\nIt supports wildcards (`*`) if `` isn't specified.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error for any snapshots that are unavailable.\nIf `true`, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot._types.Status" + } + } + }, + "required": [ + "snapshots" + ] + }, + "examples": { + "SnapshotStatusResponseExample1": { + "summary": "All shard stats present", + "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. The response contains detailed status information for `snapshot_2` in the `my_repository` repository.\n", + "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"SUCCESS\",\n \"include_global_state\" : false,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326691,\n \"time_in_millis\" : 205\n },\n \"indices\" : {\n \"index_1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n }\n }\n }\n }\n }\n }\n ]\n}" + }, + "SnapshotStatusResponseExample2": { + "summary": "Missing shard stats", + "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. Note that in this example the stats for `index-2` shard `0` are missing, with explanatory details provided in the `description` field.\n", + "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"STARTED\",\n \"include_global_state\" : true,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 2\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674327,\n \"time_in_millis\" : 189\n },\n \"indices\" : {\n \"index-1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 0,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"STARTED\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"node\" : \"VJzy6aKJSVKwcfjIFBPXxw\"\n }\n }\n },\n \"index-2\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"total\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"total\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"description\" : \"Snapshot shard stats missing from a currently running snapshot due to a node leaving the cluster after completing the shard snapshot; retry once the snapshot has completed to load all shard stats from the repository.\"\n }\n }\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n GET\n /_snapshot/{repository}/_status\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" + ], + "x-api": "status.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/{snapshot}/_status": { + "get": { + "tags": [ + "snapshot" + ], + "summary": "Get the snapshot status", + "description": "Get a detailed description of the current state for each shard participating in the snapshot.\n\nNote that this API should be used only to obtain detailed shard-level information for ongoing snapshots.\nIf this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.\n\nIf you omit the `` request path parameter, the request retrieves information only for currently running snapshots.\nThis usage is preferred.\nIf needed, you can specify `` and `` to retrieve information for specific snapshots, even if they're not currently running.\n\nNote that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster.\nLoading the stats from the repository is an expensive operation (see the WARNING below).\nTherefore the stats values for such shards will be -1 even though the \"stage\" value will be \"DONE\", in order to minimize latency.\nA \"description\" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid.\nConsequently, the total stats for the index will be less than expected due to the missing values from these shards.\n\nWARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.\nThe API requires a read from the repository for each shard in each snapshot.\nFor example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).\n\nDepending on the latency of your storage, such requests can take an extremely long time to return results.\nThese requests can also tax machine resources and, when using cloud storage, incur high processing costs.", + "operationId": "snapshot-status-2", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The snapshot repository name used to limit the request.\nIt supports wildcards (`*`) if `` isn't specified.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "snapshot", + "description": "A comma-separated list of snapshots to retrieve status for.\nThe default is currently running snapshots.\nWildcards (`*`) are not supported.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error for any snapshots that are unavailable.\nIf `true`, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot._types.Status" + } + } + }, + "required": [ + "snapshots" + ] + }, + "examples": { + "SnapshotStatusResponseExample1": { + "summary": "All shard stats present", + "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. The response contains detailed status information for `snapshot_2` in the `my_repository` repository.\n", + "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"SUCCESS\",\n \"include_global_state\" : false,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326691,\n \"time_in_millis\" : 205\n },\n \"indices\" : {\n \"index_1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n }\n }\n }\n }\n }\n }\n ]\n}" + }, + "SnapshotStatusResponseExample2": { + "summary": "Missing shard stats", + "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. Note that in this example the stats for `index-2` shard `0` are missing, with explanatory details provided in the `description` field.\n", + "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"STARTED\",\n \"include_global_state\" : true,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 2\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674327,\n \"time_in_millis\" : 189\n },\n \"indices\" : {\n \"index-1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 1,\n \"finalizing\" : 0,\n \"done\" : 0,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"STARTED\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"processed\" : {\n \"file_count\" : 2,\n \"size_in_bytes\" : 658\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 5412\n },\n \"start_time_in_millis\" : 1750452674379,\n \"time_in_millis\" : 0\n },\n \"node\" : \"VJzy6aKJSVKwcfjIFBPXxw\"\n }\n }\n },\n \"index-2\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"total\" : {\n \"file_count\" : 0,\n \"size_in_bytes\" : 0\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"total\" : {\n \"file_count\" : -1,\n \"size_in_bytes\" : -1\n },\n \"start_time_in_millis\" : 0,\n \"time_in_millis\" : 0\n },\n \"description\" : \"Snapshot shard stats missing from a currently running snapshot due to a node leaving the cluster after completing the shard snapshot; retry once the snapshot has completed to load all shard stats from the repository.\"\n }\n }\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.8.0", + "x-variations": [ + "
\n GET\n /_snapshot/{repository}/{snapshot}/_status\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_snapshot`\n" + ], + "x-api": "status.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_snapshot/{repository}/_verify": { + "post": { + "tags": [ + "snapshot" + ], + "summary": "Verify a snapshot repository", + "description": "Check for common misconfigurations in a snapshot repository.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-verification", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/verify-snapshot-repo-api.html" + }, + "operationId": "snapshot-verify-repository", + "parameters": [ + { + "in": "path", + "name": "repository", + "description": "The name of the snapshot repository to verify.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "description": "Information about the nodes connected to the snapshot repository.\nThe key is the ID of the node.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/snapshot.verify_repository.CompactNodeInfo" + } + } + }, + "required": [ + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_snapshot/{repository}/_verify\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "verify_repository.snapshot", + "x-category": "management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_sql/close": { + "post": { + "tags": [ + "sql" + ], + "summary": "Clear an SQL search cursor", + "operationId": "sql-clear-cursor", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cursor": { + "description": "Cursor to clear.", + "type": "string" + } + }, + "required": [ + "cursor" + ] + }, + "examples": { + "ClearSqlCursorRequestExample1": { + "description": "Run `POST _sql/close` to clear an SQL search cursor.", + "value": "{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "succeeded": { + "type": "boolean" + } + }, + "required": [ + "succeeded" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 6.3.0", + "x-variations": [ + "
\n POST\n /_sql/close\n
\n " + ], + "x-api": "clear_cursor.sql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_sql/async/delete/{id}": { + "delete": { + "tags": [ + "sql" + ], + "summary": "Delete an async SQL search", + "description": "Delete an async SQL search or a stored synchronous SQL search.\nIf the search is still running, the API cancels it.\n\nIf the Elasticsearch security features are enabled, only the following users can use this API to delete a search:\n\n* Users with the `cancel_task` cluster privilege.\n* The user who first submitted the search.", + "operationId": "sql-delete-async", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The identifier for the search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.15.0", + "x-variations": [ + "
\n DELETE\n /_sql/async/delete/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `cancel_task`\n" + ], + "x-api": "delete_async.sql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_sql/async/{id}": { + "get": { + "tags": [ + "sql" + ], + "summary": "Get async SQL search results", + "description": "Get the current status and available results for an async SQL search or stored synchronous SQL search.\n\nIf the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.", + "operationId": "sql-get-async", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The identifier for the search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "delimiter", + "description": "The separator for CSV results.\nThe API supports this parameter only for CSV responses.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "format", + "description": "The format for the response.\nYou must specify a format using this parameter or the `Accept` HTTP header.\nIf you specify both, the API uses this parameter.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "keep_alive", + "description": "The retention period for the search and its results.\nIt defaults to the `keep_alive` period for the original SQL search.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion_timeout", + "description": "The period to wait for complete results.\nIt defaults to no timeout, meaning the request waits for complete search results.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Identifier for the search.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-ID` HTTP header.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "is_running": { + "description": "If `true`, the search is still running.\nIf `false`, the search has finished.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", + "type": "boolean" + }, + "is_partial": { + "description": "If `true`, the response does not contain complete search results.\nIf `is_partial` is `true` and `is_running` is `true`, the search is still running.\nIf `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", + "type": "boolean" + }, + "columns": { + "description": "Column headings for the search results. Each object is a column.", + "type": "array", + "items": { + "$ref": "#/components/schemas/sql._types.Column" + } + }, + "cursor": { + "description": "The cursor for the next set of paginated results.\nFor CSV, TSV, and TXT responses, this value is returned in the `Cursor` HTTP header.", + "type": "string" + }, + "rows": { + "description": "The values for the search results.", + "type": "array", + "items": { + "$ref": "#/components/schemas/sql._types.Row" + } + } + }, + "required": [ + "id", + "is_running", + "is_partial", + "rows" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.15.0", + "x-variations": [ + "
\n GET\n /_sql/async/{id}\n
\n " + ], + "x-api": "get_async.sql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_sql/async/status/{id}": { + "get": { + "tags": [ + "sql" + ], + "summary": "Get the async SQL search status", + "description": "Get the current status of an async SQL search or a stored synchronous SQL search.", + "operationId": "sql-get-async-status", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The identifier for the search.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expiration_time_in_millis": { + "description": "The timestamp, in milliseconds since the Unix epoch, when Elasticsearch will delete the search and its results, even if the search is still running.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "id": { + "description": "The identifier for the search.", + "type": "string" + }, + "is_running": { + "description": "If `true`, the search is still running.\nIf `false`, the search has finished.", + "type": "boolean" + }, + "is_partial": { + "description": "If `true`, the response does not contain complete search results.\nIf `is_partial` is `true` and `is_running` is `true`, the search is still running.\nIf `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.", + "type": "boolean" + }, + "start_time_in_millis": { + "description": "The timestamp, in milliseconds since the Unix epoch, when the search started.\nThe API returns this property only for running searches.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "completion_status": { + "description": "The HTTP status code for the search.\nThe API returns this property only for completed searches.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + } + }, + "required": [ + "expiration_time_in_millis", + "id", + "is_running", + "is_partial", + "start_time_in_millis" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 7.15.0", + "x-variations": [ + "
\n GET\n /_sql/async/status/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "get_async_status.sql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_sql": { + "get": { + "tags": [ + "sql" + ], + "summary": "Get SQL search results", + "description": "Run an SQL request.", + "operationId": "sql-query-1", + "parameters": [ + { + "in": "query", + "name": "format", + "description": "The format for the response.\nYou can also specify a format using the `Accept` HTTP header.\nIf you specify both this parameter and the `Accept` HTTP header, this parameter takes precedence.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/sql.query.SqlFormat" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_partial_search_results": { + "description": "If `true`, the response has partial results when there are shard request timeouts or shard failures.\nIf `false`, the API returns an error with no partial results.", + "default": false, + "type": "boolean" + }, + "catalog": { + "description": "The default catalog (cluster) for queries.\nIf unspecified, the queries execute on the data in the local cluster only.", + "type": "string" + }, + "columnar": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-columnar" + }, + "description": "If `true`, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results.\nThe API supports this parameter only for CBOR, JSON, SMILE, and YAML responses.", + "default": false, + "type": "boolean" + }, + "cursor": { + "description": "The cursor used to retrieve a set of paginated results.\nIf you specify a cursor, the API only uses the `columnar` and `time_zone` request body parameters.\nIt ignores other request body parameters.", + "type": "string" + }, + "fetch_size": { + "description": "The maximum number of rows (or entries) to return in one response.", + "default": 1000.0, + "type": "number" + }, + "field_multi_value_leniency": { + "description": "If `false`, the API returns an exception when encountering multiple values for a field.\nIf `true`, the API is lenient and returns the first value from the array with no guarantee of consistent results.", + "default": false, + "type": "boolean" + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-filtering" + }, + "description": "The Elasticsearch query DSL for additional filtering.", + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "index_using_frozen": { + "description": "If `true`, the search can run on frozen indices.", + "default": false, + "type": "boolean" + }, + "keep_alive": { + "description": "The retention period for an async or saved synchronous search.", + "default": "5d", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "keep_on_completion": { + "description": "If `true`, Elasticsearch stores synchronous searches if you also specify the `wait_for_completion_timeout` parameter.\nIf `false`, Elasticsearch only stores async searches that don't finish before the `wait_for_completion_timeout`.", + "default": false, + "type": "boolean" + }, + "page_timeout": { + "description": "The minimum retention period for the scroll cursor.\nAfter this time period, a pagination request might fail because the scroll cursor is no longer available.\nSubsequent scroll requests prolong the lifetime of the scroll cursor by the duration of `page_timeout` in the scroll request.", + "default": "45s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "params": { + "description": "The values for parameters in the query.", + "type": "array", + "items": { + "type": "object" + } + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/sql/sql-spec" + }, + "description": "The SQL query to run.", + "type": "string" + }, + "request_timeout": { + "description": "The timeout before the request fails.", + "default": "90s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "runtime_mappings": { + "description": "One or more runtime fields for the search request.\nThese fields take precedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "time_zone": { + "externalDocs": { + "url": "https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html" + }, + "description": "The ISO-8601 time zone ID for the search.", + "default": "Z", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + }, + "wait_for_completion_timeout": { + "description": "The period to wait for complete results.\nIt defaults to no timeout, meaning the request waits for complete search results.\nIf the search doesn't finish within this period, the search becomes async.\n\nTo save a synchronous search, you must specify this parameter and the `keep_on_completion` parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } + }, + "examples": { + "QuerySqlRequestExample1": { + "description": "Run `POST _sql?format=txt` to get results for an SQL search.", + "value": "{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "columns": { + "description": "Column headings for the search results. Each object is a column.", + "type": "array", + "items": { + "$ref": "#/components/schemas/sql._types.Column" + } + }, + "cursor": { + "description": "The cursor for the next set of paginated results.\nFor CSV, TSV, and TXT responses, this value is returned in the `Cursor` HTTP header.", + "type": "string" + }, + "id": { + "description": "The identifier for the search.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-ID` HTTP header.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "is_running": { + "description": "If `true`, the search is still running.\nIf `false`, the search has finished.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", + "type": "boolean" + }, + "is_partial": { + "description": "If `true`, the response does not contain complete search results.\nIf `is_partial` is `true` and `is_running` is `true`, the search is still running.\nIf `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", + "type": "boolean" + }, + "rows": { + "description": "The values for the search results.", + "type": "array", + "items": { + "$ref": "#/components/schemas/sql._types.Row" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 6.3.0", + "x-variations": [ + "
\n POST\n /_sql\n
\n ", + "
\n GET\n /_sql\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "query.sql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "sql" + ], + "summary": "Get SQL search results", + "description": "Run an SQL request.", + "operationId": "sql-query", + "parameters": [ + { + "in": "query", + "name": "format", + "description": "The format for the response.\nYou can also specify a format using the `Accept` HTTP header.\nIf you specify both this parameter and the `Accept` HTTP header, this parameter takes precedence.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/sql.query.SqlFormat" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allow_partial_search_results": { + "description": "If `true`, the response has partial results when there are shard request timeouts or shard failures.\nIf `false`, the API returns an error with no partial results.", + "default": false, + "type": "boolean" + }, + "catalog": { + "description": "The default catalog (cluster) for queries.\nIf unspecified, the queries execute on the data in the local cluster only.", + "type": "string" + }, + "columnar": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-columnar" + }, + "description": "If `true`, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results.\nThe API supports this parameter only for CBOR, JSON, SMILE, and YAML responses.", + "default": false, + "type": "boolean" + }, + "cursor": { + "description": "The cursor used to retrieve a set of paginated results.\nIf you specify a cursor, the API only uses the `columnar` and `time_zone` request body parameters.\nIt ignores other request body parameters.", + "type": "string" + }, + "fetch_size": { + "description": "The maximum number of rows (or entries) to return in one response.", + "default": 1000.0, + "type": "number" + }, + "field_multi_value_leniency": { + "description": "If `false`, the API returns an exception when encountering multiple values for a field.\nIf `true`, the API is lenient and returns the first value from the array with no guarantee of consistent results.", + "default": false, + "type": "boolean" + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-filtering" + }, + "description": "The Elasticsearch query DSL for additional filtering.", + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "index_using_frozen": { + "description": "If `true`, the search can run on frozen indices.", + "default": false, + "type": "boolean" + }, + "keep_alive": { + "description": "The retention period for an async or saved synchronous search.", + "default": "5d", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "keep_on_completion": { + "description": "If `true`, Elasticsearch stores synchronous searches if you also specify the `wait_for_completion_timeout` parameter.\nIf `false`, Elasticsearch only stores async searches that don't finish before the `wait_for_completion_timeout`.", + "default": false, + "type": "boolean" + }, + "page_timeout": { + "description": "The minimum retention period for the scroll cursor.\nAfter this time period, a pagination request might fail because the scroll cursor is no longer available.\nSubsequent scroll requests prolong the lifetime of the scroll cursor by the duration of `page_timeout` in the scroll request.", + "default": "45s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "params": { + "description": "The values for parameters in the query.", + "type": "array", + "items": { + "type": "object" + } + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/sql/sql-spec" + }, + "description": "The SQL query to run.", + "type": "string" + }, + "request_timeout": { + "description": "The timeout before the request fails.", + "default": "90s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "runtime_mappings": { + "description": "One or more runtime fields for the search request.\nThese fields take precedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "time_zone": { + "externalDocs": { + "url": "https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html" + }, + "description": "The ISO-8601 time zone ID for the search.", + "default": "Z", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + }, + "wait_for_completion_timeout": { + "description": "The period to wait for complete results.\nIt defaults to no timeout, meaning the request waits for complete search results.\nIf the search doesn't finish within this period, the search becomes async.\n\nTo save a synchronous search, you must specify this parameter and the `keep_on_completion` parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + } + }, + "examples": { + "QuerySqlRequestExample1": { + "description": "Run `POST _sql?format=txt` to get results for an SQL search.", + "value": "{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "columns": { + "description": "Column headings for the search results. Each object is a column.", + "type": "array", + "items": { + "$ref": "#/components/schemas/sql._types.Column" + } + }, + "cursor": { + "description": "The cursor for the next set of paginated results.\nFor CSV, TSV, and TXT responses, this value is returned in the `Cursor` HTTP header.", + "type": "string" + }, + "id": { + "description": "The identifier for the search.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-ID` HTTP header.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "is_running": { + "description": "If `true`, the search is still running.\nIf `false`, the search has finished.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", + "type": "boolean" + }, + "is_partial": { + "description": "If `true`, the response does not contain complete search results.\nIf `is_partial` is `true` and `is_running` is `true`, the search is still running.\nIf `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", + "type": "boolean" + }, + "rows": { + "description": "The values for the search results.", + "type": "array", + "items": { + "$ref": "#/components/schemas/sql._types.Row" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 6.3.0", + "x-variations": [ + "
\n POST\n /_sql\n
\n ", + "
\n GET\n /_sql\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "query.sql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_sql/translate": { + "get": { + "tags": [ + "sql" + ], + "summary": "Translate SQL into Elasticsearch queries", + "description": "Translate an SQL search into a search API request containing Query DSL.\nIt accepts the same request body parameters as the SQL search API, excluding `cursor`.", + "operationId": "sql-translate-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fetch_size": { + "description": "The maximum number of rows (or entries) to return in one response.", + "default": 1000.0, + "type": "number" + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-filtering" + }, + "description": "The Elasticsearch query DSL for additional filtering.", + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "query": { + "description": "The SQL query to run.", + "type": "string" + }, + "time_zone": { + "externalDocs": { + "url": "https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html" + }, + "description": "The ISO-8601 time zone ID for the search.", + "default": "Z", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + } + }, + "required": [ + "query" + ] + }, + "examples": { + "TranslateSqlRequestExample1": { + "summary": "sql/apis/sql-translate-api.asciidoc:12", + "description": "", + "value": "{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "size": { + "type": "number" + }, + "_source": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "track_total_hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + } + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.3.0", + "x-variations": [ + "
\n POST\n /_sql/translate\n
\n ", + "
\n GET\n /_sql/translate\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "translate.sql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "sql" + ], + "summary": "Translate SQL into Elasticsearch queries", + "description": "Translate an SQL search into a search API request containing Query DSL.\nIt accepts the same request body parameters as the SQL search API, excluding `cursor`.", + "operationId": "sql-translate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fetch_size": { + "description": "The maximum number of rows (or entries) to return in one response.", + "default": 1000.0, + "type": "number" + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-filtering" + }, + "description": "The Elasticsearch query DSL for additional filtering.", + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "query": { + "description": "The SQL query to run.", + "type": "string" + }, + "time_zone": { + "externalDocs": { + "url": "https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html" + }, + "description": "The ISO-8601 time zone ID for the search.", + "default": "Z", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + } + }, + "required": [ + "query" + ] + }, + "examples": { + "TranslateSqlRequestExample1": { + "summary": "sql/apis/sql-translate-api.asciidoc:12", + "description": "", + "value": "{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "size": { + "type": "number" + }, + "_source": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "track_total_hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + } + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.3.0", + "x-variations": [ + "
\n POST\n /_sql/translate\n
\n ", + "
\n GET\n /_sql/translate\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "translate.sql", + "x-category": "common", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_ssl/certificates": { + "get": { + "tags": [ + "security" + ], + "summary": "Get SSL certificates", + "description": "Get information about the X.509 certificates that are used to encrypt communications in the cluster.\nThe API returns a list that includes certificates from all TLS contexts including:\n\n- Settings for transport and HTTP interfaces\n- TLS settings that are used within authentication realms\n- TLS settings for remote monitoring exporters\n\nThe list includes certificates that are used for configuring trust, such as those configured in the `xpack.security.transport.ssl.truststore` and `xpack.security.transport.ssl.certificate_authorities` settings.\nIt also includes certificates that are used for configuring server identity, such as `xpack.security.http.ssl.keystore` and `xpack.security.http.ssl.certificate settings`.\n\nThe list does not include certificates that are sourced from the default SSL context of the Java Runtime Environment (JRE), even if those certificates are in use within Elasticsearch.\n\nNOTE: When a PKCS#11 token is configured as the truststore of the JRE, the API returns all the certificates that are included in the PKCS#11 token irrespective of whether these are used in the Elasticsearch TLS configuration.\n\nIf Elasticsearch is configured to use a keystore or truststore, the API output includes all certificates in that store, even though some of the certificates might not be in active use within the cluster.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security#encrypt-internode-communication", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-ssl.html" + }, + "operationId": "ssl-certificates", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ssl.certificates.CertificateInformation" + } + }, + "examples": { + "GetCertificatesResponseExample1": { + "description": "A successful response from `GET /_ssl/certificates`, which provides information about the certificates on a single node of Elasticsearch.\n", + "value": "[\n {\n \"path\": \"certs/elastic-certificates.p12\",\n \"format\": \"PKCS12\",\n \"alias\": \"instance\",\n \"subject_dn\": \"CN=Elastic Certificate Tool Autogenerated CA\",\n \"serial_number\": \"a20f0ee901e8f69dc633ff633e5cd5437cdb4137\",\n \"has_private_key\": false,\n \"expiry\": \"2021-01-15T20:42:49.000Z\"\n },\n {\n \"path\": \"certs/elastic-certificates.p12\",\n \"format\": \"PKCS12\",\n \"alias\": \"ca\",\n \"subject_dn\": \"CN=Elastic Certificate Tool Autogenerated CA\",\n \"serial_number\": \"a20f0ee901e8f69dc633ff633e5cd5437cdb4137\",\n \"has_private_key\": false,\n \"expiry\": \"2021-01-15T20:42:49.000Z\"\n },\n {\n \"path\": \"certs/elastic-certificates.p12\",\n \"format\": \"PKCS12\",\n \"alias\": \"instance\",\n \"subject_dn\": \"CN=instance\",\n \"serial_number\": \"fc1905e1494dc5230218d079c47a617088f84ce0\",\n \"has_private_key\": true,\n \"expiry\": \"2021-01-15T20:44:32.000Z\"\n }\n]" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.2.0", + "x-variations": [ + "
\n GET\n /_ssl/certificates\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "certificates.ssl", + "x-category": "unknown", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_synonyms/{id}": { + "get": { + "tags": [ + "synonyms" + ], + "summary": "Get a synonym set", + "operationId": "synonyms-get-synonym", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The synonyms set identifier to retrieve.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "from", + "description": "The starting offset for query rules to retrieve.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "The max number of query rules to retrieve.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "description": "The total number of synonyms rules that the synonyms set contains.", + "type": "number" + }, + "synonyms_set": { + "description": "Synonym rule details.", + "type": "array", + "items": { + "$ref": "#/components/schemas/synonyms._types.SynonymRuleRead" + } + } + }, + "required": [ + "count", + "synonyms_set" + ] + }, + "examples": { + "SynonymsGetResponseExample1": { + "description": "A successful response from `GET _synonyms/my-synonyms-set`.", + "value": "{\n \"count\": 3,\n \"synonyms_set\": [\n {\n \"id\": \"test-1\",\n \"synonyms\": \"hello, hi\"\n },\n {\n \"id\": \"test-2\",\n \"synonyms\": \"bye, goodbye\"\n },\n {\n \"id\": \"test-3\",\n \"synonyms\": \"test => check\"\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n GET\n /_synonyms/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_synonyms`\n" + ], + "x-api": "get_synonym.synonyms", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "synonyms" + ], + "summary": "Create or update a synonym set", + "description": "Synonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.\n\nFor practical examples of how to create or update a synonyms set, refer to the External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/full-text/create-update-synonyms-api-example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-synonyms-set.html" + }, + "operationId": "synonyms-put-synonym", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the synonyms set to be created or updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "If `true`, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning.\nIf `false`, analyzers will not be reloaded with the new synonym set", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 9.1.0", + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "synonyms_set": { + "description": "The synonym rules definitions for the synonyms set.", + "oneOf": [ + { + "$ref": "#/components/schemas/synonyms._types.SynonymRule" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/synonyms._types.SynonymRule" + } + } + ] + } + }, + "required": [ + "synonyms_set" + ] + }, + "examples": { + "SynonymsPutRequestExample1": { + "description": "", + "value": "\n{\n \"synonyms_set\": {\n \"synonyms\" : \"hello, hi, howdy\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "description": "The update operation result.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + }, + "reload_analyzers_details": { + "description": "Updating a synonyms set can reload the associated analyzers in case refresh is set to true.\nThis information is the analyzers reloading result.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult" + } + ] + } + }, + "required": [ + "result" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n PUT\n /_synonyms/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_synonyms`\n" + ], + "x-api": "put_synonym.synonyms", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "synonyms" + ], + "summary": "Delete a synonym set", + "description": "You can only delete a synonyms set that is not in use by any index analyzer.\n\nSynonyms sets can be used in synonym graph token filters and synonym token filters.\nThese synonym filters can be used as part of search analyzers.\n\nAnalyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open).\nEven if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase.\n\nIf any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available.\nTo prevent that, synonyms sets that are used in analyzers can't be deleted.\nA delete request in this case will return a 400 response code.\n\nTo remove a synonyms set, you must first remove all indices that contain analyzers using it.\nYou can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data.\nOnce finished, you can delete the index.\nWhen the synonyms set is not used in analyzers, you will be able to delete it.", + "operationId": "synonyms-delete-synonym", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The synonyms set identifier to delete.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n DELETE\n /_synonyms/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_synonyms`\n" + ], + "x-api": "delete_synonym.synonyms", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_synonyms/{set_id}/{rule_id}": { + "get": { + "tags": [ + "synonyms" + ], + "summary": "Get a synonym rule", + "description": "Get a synonym rule from a synonym set.", + "operationId": "synonyms-get-synonym-rule", + "parameters": [ + { + "in": "path", + "name": "set_id", + "description": "The ID of the synonym set to retrieve the synonym rule from.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "path", + "name": "rule_id", + "description": "The ID of the synonym rule to retrieve.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/synonyms._types.SynonymRuleRead" + }, + "examples": { + "SynonymRuleGetResponseExample1": { + "description": "A successful response from `GET _synonyms/my-synonyms-set/test-1`.", + "value": "{\n \"id\": \"test-1\",\n \"synonyms\": \"hello, hi\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n GET\n /_synonyms/{set_id}/{rule_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_synonyms`\n" + ], + "x-api": "get_synonym_rule.synonyms", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "synonyms" + ], + "summary": "Create or update a synonym rule", + "description": "Create or update a synonym rule in a synonym set.\n\nIf any of the synonym rules included is invalid, the API returns an error.\n\nWhen you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.", + "operationId": "synonyms-put-synonym-rule", + "parameters": [ + { + "in": "path", + "name": "set_id", + "description": "The ID of the synonym set.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "path", + "name": "rule_id", + "description": "The ID of the synonym rule to be updated or created.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "If `true`, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning.\nIf `false`, analyzers will not be reloaded with the new synonym rule", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 9.1.0", + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "synonyms": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/text-analysis/analysis-synonym-graph-tokenfilter#analysis-synonym-graph-define-synonyms" + }, + "description": "The synonym rule information definition, which must be in Solr format.", + "allOf": [ + { + "$ref": "#/components/schemas/synonyms._types.SynonymString" + } + ] + } + }, + "required": [ + "synonyms" + ] + }, + "examples": { + "SynonymRulePutRequestExample1": { + "summary": "synonyms/apis/put-synonym-rule.asciidoc:107", + "description": "", + "value": "{\n \"synonyms\": \"hello, hi, howdy\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/synonyms._types.SynonymsUpdateResult" + }, + "examples": { + "SynonymRuleResponseExample1": { + "description": "A successful response from `PUT _synonyms/my-synonyms-set/test-1`.\n", + "value": "{\n \"result\": \"updated\",\n \"reload_analyzers_details\": {\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"reload_details\": [\n {\n \"index\": \"test-index\",\n \"reloaded_analyzers\": [\n \"my_search_analyzer\"\n ],\n \"reloaded_node_ids\": [\n \"1wYFZzq8Sxeu_Jvt9mlbkg\"\n ]\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n PUT\n /_synonyms/{set_id}/{rule_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_synonyms`\n" + ], + "x-api": "put_synonym_rule.synonyms", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "synonyms" + ], + "summary": "Delete a synonym rule", + "description": "Delete a synonym rule from a synonym set.", + "operationId": "synonyms-delete-synonym-rule", + "parameters": [ + { + "in": "path", + "name": "set_id", + "description": "The ID of the synonym set to update.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "path", + "name": "rule_id", + "description": "The ID of the synonym rule to delete.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "If `true`, the request will refresh the analyzers with the deleted synonym rule and wait for the new synonyms to be available before returning.\nIf `false`, analyzers will not be reloaded with the deleted synonym rule", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 9.1.0", + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/synonyms._types.SynonymsUpdateResult" + }, + "examples": { + "SynonymRuleDeleteResponseExample1": { + "description": "A successful response from `DELETE _synonyms/my-synonyms-set/test-1`. All analyzers using this synonyms set will be reloaded automatically to reflect the rule being deleted.\n", + "value": "{\n \"result\": \"deleted\",\n \"reload_analyzers_details\": {\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"reload_details\": [\n {\n \"index\": \"test-index\",\n \"reloaded_analyzers\": [\n \"my_search_analyzer\"\n ],\n \"reloaded_node_ids\": [\n \"1wYFZzq8Sxeu_Jvt9mlbkg\"\n ]\n }\n ]\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n DELETE\n /_synonyms/{set_id}/{rule_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_synonyms`\n" + ], + "x-api": "delete_synonym_rule.synonyms", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_synonyms": { + "get": { + "tags": [ + "synonyms" + ], + "summary": "Get all synonym sets", + "description": "Get a summary of all defined synonym sets.", + "operationId": "synonyms-get-synonyms-sets", + "parameters": [ + { + "in": "query", + "name": "from", + "description": "The starting offset for synonyms sets to retrieve.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "The maximum number of synonyms sets to retrieve.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "description": "The total number of synonyms sets defined.", + "type": "number" + }, + "results": { + "description": "The identifier and total number of defined synonym rules for each synonyms set.", + "type": "array", + "items": { + "$ref": "#/components/schemas/synonyms.get_synonyms_sets.SynonymsSetItem" + } + } + }, + "required": [ + "count", + "results" + ] + }, + "examples": { + "SynonymsSetsGetResponseExample1": { + "description": "A successful response from `GET _synonyms`.", + "value": "{\n \"count\": 3,\n \"results\": [\n {\n \"synonyms_set\": \"ecommerce-synonyms\",\n \"count\": 2\n },\n {\n \"synonyms_set\": \"my-synonyms-set\",\n \"count\": 3\n },\n {\n \"synonyms_set\": \"new-ecommerce-synonyms\",\n \"count\": 1\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.10.0", + "x-variations": [ + "
\n GET\n /_synonyms\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_search_synonyms`\n" + ], + "x-api": "get_synonyms_sets.synonyms", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_tasks/_cancel": { + "post": { + "tags": [ + "tasks" + ], + "summary": "Cancel a task", + "description": "WARNING: The task management API is new and should still be considered a beta feature.\nThe API may change in ways that are not backwards compatible.\n\nA task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away.\nIt is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation.\nThe get task information API will continue to list these cancelled tasks until they complete.\nThe cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.\n\nTo troubleshoot why a cancelled task does not complete promptly, use the get task information API with the `?detailed` parameter to identify the other tasks the system is running.\nYou can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.", + "operationId": "tasks-cancel", + "parameters": [ + { + "in": "query", + "name": "actions", + "description": "A comma-separated list or wildcard expression of actions that is used to limit the request.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "nodes", + "description": "A comma-separated list of node IDs or names that is used to limit the request.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "parent_task_id", + "description": "A parent task ID that is used to limit the tasks.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If true, the request blocks until all found tasks are complete.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tasks._types.TaskListResponseBase" + } + } + } + } + }, + "x-state": "Technical preview; Added in 2.3.0", + "x-variations": [ + "
\n POST\n /_tasks/_cancel\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "cancel.tasks", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_tasks/{task_id}/_cancel": { + "post": { + "tags": [ + "tasks" + ], + "summary": "Cancel a task", + "description": "WARNING: The task management API is new and should still be considered a beta feature.\nThe API may change in ways that are not backwards compatible.\n\nA task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away.\nIt is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation.\nThe get task information API will continue to list these cancelled tasks until they complete.\nThe cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.\n\nTo troubleshoot why a cancelled task does not complete promptly, use the get task information API with the `?detailed` parameter to identify the other tasks the system is running.\nYou can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.", + "operationId": "tasks-cancel-1", + "parameters": [ + { + "in": "path", + "name": "task_id", + "description": "The task identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.TaskId" + }, + "style": "simple" + }, + { + "in": "query", + "name": "actions", + "description": "A comma-separated list or wildcard expression of actions that is used to limit the request.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "nodes", + "description": "A comma-separated list of node IDs or names that is used to limit the request.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "parent_task_id", + "description": "A parent task ID that is used to limit the tasks.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If true, the request blocks until all found tasks are complete.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tasks._types.TaskListResponseBase" + } + } + } + } + }, + "x-state": "Technical preview; Added in 2.3.0", + "x-variations": [ + "
\n POST\n /_tasks/{task_id}/_cancel\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage`\n" + ], + "x-api": "cancel.tasks", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_tasks/{task_id}": { + "get": { + "tags": [ + "tasks" + ], + "summary": "Get task information", + "description": "Get information about a task currently running in the cluster.\n\nWARNING: The task management API is new and should still be considered a beta feature.\nThe API may change in ways that are not backwards compatible.\n\nIf the task identifier is not found, a 404 response code indicates that there are no resources that match the request.", + "operationId": "tasks-get", + "parameters": [ + { + "in": "path", + "name": "task_id", + "description": "The task identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request blocks until the task has completed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "completed": { + "type": "boolean" + }, + "task": { + "allOf": [ + { + "$ref": "#/components/schemas/tasks._types.TaskInfo" + } + ] + }, + "response": { + "type": "object" + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + } + }, + "required": [ + "completed", + "task" + ] + }, + "examples": { + "GetTaskResponseExample1": { + "summary": "Get cluster actions", + "description": "A successful response from `GET _tasks?actions=cluster:*`, which retrieves all cluster-related tasks.\n", + "value": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:124\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 124,\n \"type\" : \"direct\",\n \"action\" : \"cluster:monitor/tasks/lists[n]\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 47402,\n \"cancellable\" : false,\n \"parent_task_id\" : \"oTUltX4IQMOUUVeiohTt8A:123\"\n },\n \"oTUltX4IQMOUUVeiohTt8A:123\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 123,\n \"type\" : \"transport\",\n \"action\" : \"cluster:monitor/tasks/lists\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 236042,\n \"cancellable\" : false\n }\n }\n }\n }\n}" + }, + "GetTaskResponseExample2": { + "summary": "Get details about a delete by query", + "description": "A successful response from `GET _tasks?detailed=true&actions=*/delete/byquery`, which gets the status of a delete by query operation. The `status` object contains the actual status. `total` is the total number of operations that the reindex expects to perform. You can estimate the progress by adding the `updated`, `created`, and `deleted` fields. The request will finish when their sum is equal to the `total` field.\n", + "value": "{\n \"nodes\" : {\n \"r1A2WoRbTwKZ516z6NEs5A\" : {\n \"name\" : \"r1A2WoR\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"attributes\" : {\n \"testattr\" : \"test\",\n \"portsfile\" : \"true\"\n },\n \"tasks\" : {\n \"r1A2WoRbTwKZ516z6NEs5A:36619\" : {\n \"node\" : \"r1A2WoRbTwKZ516z6NEs5A\",\n \"id\" : 36619,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/write/delete/byquery\",\n \"status\" : { \n \"total\" : 6154,\n \"updated\" : 0,\n \"created\" : 0,\n \"deleted\" : 3500,\n \"batches\" : 36,\n \"version_conflicts\" : 0,\n \"noops\" : 0,\n \"retries\": 0,\n \"throttled_millis\": 0\n },\n \"description\" : \"\"\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 5.0.0", + "x-variations": [ + "
\n GET\n /_tasks/{task_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "get.tasks", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_tasks": { + "get": { + "tags": [ + "tasks" + ], + "summary": "Get all tasks", + "description": "Get information about the tasks currently running on one or more nodes in the cluster.\n\nWARNING: The task management API is new and should still be considered a beta feature.\nThe API may change in ways that are not backwards compatible.\n\n**Identifying running tasks**\n\nThe `X-Opaque-Id header`, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information.\nThis enables you to track certain calls or associate certain tasks with the client that started them.\nFor example:\n\n```\ncurl -i -H \"X-Opaque-Id: 123456\" \"http://localhost:9200/_tasks?group_by=parents\"\n```\n\nThe API returns the following result:\n\n```\nHTTP/1.1 200 OK\nX-Opaque-Id: 123456\ncontent-type: application/json; charset=UTF-8\ncontent-length: 831\n\n{\n \"tasks\" : {\n \"u5lcZHqcQhu-rUoFaqDphA:45\" : {\n \"node\" : \"u5lcZHqcQhu-rUoFaqDphA\",\n \"id\" : 45,\n \"type\" : \"transport\",\n \"action\" : \"cluster:monitor/tasks/lists\",\n \"start_time_in_millis\" : 1513823752749,\n \"running_time_in_nanos\" : 293139,\n \"cancellable\" : false,\n \"headers\" : {\n \"X-Opaque-Id\" : \"123456\"\n },\n \"children\" : [\n {\n \"node\" : \"u5lcZHqcQhu-rUoFaqDphA\",\n \"id\" : 46,\n \"type\" : \"direct\",\n \"action\" : \"cluster:monitor/tasks/lists[n]\",\n \"start_time_in_millis\" : 1513823752750,\n \"running_time_in_nanos\" : 92133,\n \"cancellable\" : false,\n \"parent_task_id\" : \"u5lcZHqcQhu-rUoFaqDphA:45\",\n \"headers\" : {\n \"X-Opaque-Id\" : \"123456\"\n }\n }\n ]\n }\n }\n }\n```\nIn this example, `X-Opaque-Id: 123456` is the ID as a part of the response header.\nThe `X-Opaque-Id` in the task `headers` is the ID for the task that was initiated by the REST request.\nThe `X-Opaque-Id` in the children `headers` is the child task of the task that was initiated by the REST request.", + "operationId": "tasks-list", + "parameters": [ + { + "in": "query", + "name": "actions", + "description": "A comma-separated list or wildcard expression of actions used to limit the request.\nFor example, you can use `cluser:*` to retrieve all cluster-related tasks.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "detailed", + "description": "If `true`, the response includes detailed information about the running tasks.\nThis information is useful to distinguish tasks from each other but is more costly to run.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "group_by", + "description": "A key that is used to group tasks in the response.\nThe task lists can be grouped either by nodes or by parent tasks.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/tasks._types.GroupBy" + }, + "style": "form" + }, + { + "in": "query", + "name": "nodes", + "description": "A comma-separated list of node IDs or names that is used to limit the returned information.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "form" + }, + { + "in": "query", + "name": "parent_task_id", + "description": "A parent task identifier that is used to limit returned information.\nTo return all tasks, omit this parameter or use a value of `-1`.\nIf the parent task is not found, the API does not return a 404 response code.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for each node to respond.\nIf a node does not respond before its timeout expires, the response does not include its information.\nHowever, timed out nodes are included in the `node_failures` property.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request blocks until the operation is complete.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tasks._types.TaskListResponseBase" + }, + "examples": { + "ListTasksResponseExample1": { + "description": "A successful response from `GET _tasks?actions=*search&detailed` The `detailed` parameter affects the `description` field, which contains human readable text that identifies the particular request that the task is performing. For example, it helps identify the search request being performed by a search task.\n", + "value": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:464\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 464,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/read/search\",\n \"description\" : \"indices[test], types[test], search_type[QUERY_THEN_FETCH], source[{\\\"query\\\":...}]\",\n \"start_time_in_millis\" : 1483478610008,\n \"running_time_in_nanos\" : 13991383,\n \"cancellable\" : true,\n \"cancelled\" : false\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Technical preview; Added in 2.3.0", + "x-variations": [ + "
\n GET\n /_tasks\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "list.tasks", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_terms_enum": { + "get": { + "tags": [ + "search" + ], + "summary": "Get terms in an index", + "description": "Discover terms that match a partial string in an index.\nThis API is designed for low-latency look-ups used in auto-complete scenarios.\n\n> info\n> The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", + "operationId": "terms-enum", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and index aliases to search.\nWildcard (`*`) expressions are supported.\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "field": { + "description": "The string to match at the start of indexed terms. If not provided, all terms in the field are considered.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "size": { + "description": "The number of matching terms to return.", + "default": 10.0, + "type": "number" + }, + "timeout": { + "description": "The maximum length of time to spend collecting results.\nIf the timeout is exceeded the `complete` flag set to `false` in the response and the results may be partial or empty.", + "default": "1s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "case_insensitive": { + "description": "When `true`, the provided search string is matched against index terms without case sensitivity.", + "default": false, + "type": "boolean" + }, + "index_filter": { + "description": "Filter an index shard if the provided query rewrites to `match_none`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "string": { + "description": "The string to match at the start of indexed terms.\nIf it is not provided, all terms in the field are considered.\n\n> info\n> The prefix string cannot be larger than the largest possible keyword value, which is Lucene's term byte-length limit of 32766.", + "type": "string" + }, + "search_after": { + "description": "The string after which terms in the index should be returned.\nIt allows for a form of pagination if the last result from one request is passed as the `search_after` parameter for a subsequent request.", + "type": "string" + } + }, + "required": [ + "field" + ] + }, + "examples": { + "TermsEnumRequestExample1": { + "description": "Run `POST stackoverflow/_terms_enum`.", + "value": "{\n \"field\" : \"tags\",\n \"string\" : \"kiba\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + }, + "complete": { + "description": "If `false`, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.", + "type": "boolean" + } + }, + "required": [ + "_shards", + "terms", + "complete" + ] + }, + "examples": { + "TermsEnumResponseExample1": { + "description": "A successful response from `POST stackoverflow/_terms_enum`.", + "value": "{\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"terms\": [\n \"kibana\"\n ],\n \"complete\" : true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.14.0", + "x-variations": [ + "
\n GET\n /{index}/_terms_enum\n
\n ", + "
\n POST\n /{index}/_terms_enum\n
\n " + ], + "x-api": "terms_enum", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "search" + ], + "summary": "Get terms in an index", + "description": "Discover terms that match a partial string in an index.\nThis API is designed for low-latency look-ups used in auto-complete scenarios.\n\n> info\n> The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", + "operationId": "terms-enum-1", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and index aliases to search.\nWildcard (`*`) expressions are supported.\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "field": { + "description": "The string to match at the start of indexed terms. If not provided, all terms in the field are considered.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "size": { + "description": "The number of matching terms to return.", + "default": 10.0, + "type": "number" + }, + "timeout": { + "description": "The maximum length of time to spend collecting results.\nIf the timeout is exceeded the `complete` flag set to `false` in the response and the results may be partial or empty.", + "default": "1s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "case_insensitive": { + "description": "When `true`, the provided search string is matched against index terms without case sensitivity.", + "default": false, + "type": "boolean" + }, + "index_filter": { + "description": "Filter an index shard if the provided query rewrites to `match_none`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "string": { + "description": "The string to match at the start of indexed terms.\nIf it is not provided, all terms in the field are considered.\n\n> info\n> The prefix string cannot be larger than the largest possible keyword value, which is Lucene's term byte-length limit of 32766.", + "type": "string" + }, + "search_after": { + "description": "The string after which terms in the index should be returned.\nIt allows for a form of pagination if the last result from one request is passed as the `search_after` parameter for a subsequent request.", + "type": "string" + } + }, + "required": [ + "field" + ] + }, + "examples": { + "TermsEnumRequestExample1": { + "description": "Run `POST stackoverflow/_terms_enum`.", + "value": "{\n \"field\" : \"tags\",\n \"string\" : \"kiba\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + }, + "complete": { + "description": "If `false`, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.", + "type": "boolean" + } + }, + "required": [ + "_shards", + "terms", + "complete" + ] + }, + "examples": { + "TermsEnumResponseExample1": { + "description": "A successful response from `POST stackoverflow/_terms_enum`.", + "value": "{\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"terms\": [\n \"kibana\"\n ],\n \"complete\" : true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.14.0", + "x-variations": [ + "
\n GET\n /{index}/_terms_enum\n
\n ", + "
\n POST\n /{index}/_terms_enum\n
\n " + ], + "x-api": "terms_enum", + "x-category": "search", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_termvectors/{id}": { + "get": { + "tags": [ + "document" + ], + "summary": "Get term vector information", + "description": "Get information and statistics about terms in the fields of a particular document.\n\nYou can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.\nYou can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body.\nFor example:\n\n```\nGET /my-index-000001/_termvectors/1?fields=message\n```\n\nFields can be specified using wildcards, similar to the multi match query.\n\nTerm vectors are real-time by default, not near real-time.\nThis can be changed by setting `realtime` parameter to `false`.\n\nYou can request three types of values: _term information_, _term statistics_, and _field statistics_.\nBy default, all term information and field statistics are returned for all fields but term statistics are excluded.\n\n**Term information**\n\n* term frequency in the field (always returned)\n* term positions (`positions: true`)\n* start and end offsets (`offsets: true`)\n* term payloads (`payloads: true`), as base64 encoded bytes\n\nIf the requested information wasn't stored in the index, it will be computed on the fly if possible.\nAdditionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.\n\n> warn\n> Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.\n\n**Behaviour**\n\nThe term and field statistics are not accurate.\nDeleted documents are not taken into account.\nThe information is only retrieved for the shard the requested document resides in.\nThe term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.\nBy default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.\nUse `routing` only to hit a particular shard.\nRefer to the linked documentation for detailed examples of how to use this API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/term-vectors-examples", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-termvectors.html" + }, + "operationId": "termvectors", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The name of the index that contains the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "description": "A unique identifier for the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "fields", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "field_statistics", + "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "offsets", + "description": "If `true`, the response includes term offsets.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "payloads", + "description": "If `true`, the response includes term payloads.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "positions", + "description": "If `true`, the response includes term positions.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "realtime", + "description": "If true, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "term_statistics", + "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "doc": { + "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", + "type": "object" + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query" + }, + "description": "Filter terms based on their tf-idf scores.\nThis could be useful in order find out a good characteristic vector of a document.\nThis feature works in a similar manner to the second phase of the More Like This Query.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.termvectors.Filter" + } + ] + }, + "per_field_analyzer": { + "description": "Override the default per-field analyzer.\nThis is useful in order to generate term vectors in any fashion, especially when using artificial documents.\nWhen providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "fields": { + "description": "A list of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "field_statistics": { + "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "default": true, + "type": "boolean" + }, + "offsets": { + "description": "If `true`, the response includes term offsets.", + "default": true, + "type": "boolean" + }, + "payloads": { + "description": "If `true`, the response includes term payloads.", + "default": true, + "type": "boolean" + }, + "positions": { + "description": "If `true`, the response includes term positions.", + "default": true, + "type": "boolean" + }, + "term_statistics": { + "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "default": false, + "type": "boolean" + }, + "routing": { + "description": "A custom value that is used to route operations to a specific shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "version": { + "description": "If `true`, returns the document version as part of a hit.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version_type": { + "description": "The version type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] + } + } + }, + "examples": { + "TermVectorsRequestExample1": { + "summary": "Return stored term vectors", + "description": "Run `GET /my-index-000001/_termvectors/1` to return all information and statistics for field `text` in document 1.\n", + "value": "{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + "TermVectorsRequestExample2": { + "summary": "Per-field analyzer", + "description": "Run `GET /my-index-000001/_termvectors/1` to set per-field analyzers. A different analyzer than the one at the field may be provided by using the `per_field_analyzer` parameter.\n", + "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n },\n \"fields\": [\"fullname\"],\n \"per_field_analyzer\" : {\n \"fullname\": \"keyword\"\n }\n}" + }, + "TermVectorsRequestExample3": { + "summary": "Terms filtering", + "description": "Run `GET /imdb/_termvectors` to filter the terms returned based on their tf-idf scores. It returns the three most \"interesting\" keywords from the artificial document having the given \"plot\" field value. Notice that the keyword \"Tony\" or any stop words are not part of the response, as their tf-idf must be too low.\n", + "value": "{\n \"doc\": {\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n \"term_statistics\": true,\n \"field_statistics\": true,\n \"positions\": false,\n \"offsets\": false,\n \"filter\": {\n \"max_num_terms\": 3,\n \"min_term_freq\": 1,\n \"min_doc_freq\": 1\n }\n}" + }, + "TermVectorsRequestExample4": { + "summary": "Generate term vectors on the fly", + "description": "Run `GET /my-index-000001/_termvectors/1`. Term vectors which are not explicitly stored in the index are automatically computed on the fly. This request returns all information and statistics for the fields in document 1, even though the terms haven't been explicitly stored in the index. Note that for the field text, the terms are not regenerated.\n", + "value": "{\n \"fields\" : [\"text\", \"some_field_without_term_vectors\"],\n \"offsets\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + "TermVectorsRequestExample5": { + "summary": "Artificial documents", + "description": "Run `GET /my-index-000001/_termvectors`. Term vectors can be generated for artificial documents, that is for documents not present in the index. If dynamic mapping is turned on (default), the document fields not in the original mapping will be dynamically created.\n", + "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "type": "boolean" + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "term_vectors": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.termvectors.TermVector" + } + }, + "took": { + "type": "number" + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "found", + "_index", + "took", + "_version" + ] + }, + "examples": { + "TermVectorsResponseExample1": { + "summary": "Return stored term vectors", + "description": "A successful response from `GET /my-index-000001/_termvectors/1`.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 4,\n \"doc_count\": 2,\n \"sum_ttf\": 6\n },\n \"terms\": {\n \"test\": {\n \"doc_freq\": 2,\n \"ttf\": 4,\n \"term_freq\": 3,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 4,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 1,\n \"start_offset\": 5,\n \"end_offset\": 9,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 2,\n \"start_offset\": 10,\n \"end_offset\": 14,\n \"payload\": \"d29yZA==\"\n }\n ]\n }\n }\n }\n }\n}" + }, + "TermVectorsResponseExample2": { + "summary": "Per-field analyzer", + "description": "A successful response from `GET /my-index-000001/_termvectors` with `per_field_analyzer` in the request body.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_version\": 0,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"fullname\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 2,\n \"doc_count\": 4,\n \"sum_ttf\": 4\n },\n \"terms\": {\n \"John Doe\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 8\n }\n ]\n }\n }\n }\n }\n}" + }, + "TermVectorsResponseExample3": { + "summary": "Terms filtering", + "description": "A successful response from `GET /my-index-000001/_termvectors` with a `filter` in the request body.", + "value": "{\n \"_index\": \"imdb\",\n \"_version\": 0,\n \"found\": true,\n \"term_vectors\": {\n \"plot\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 3384269,\n \"doc_count\": 176214,\n \"sum_ttf\": 3753460\n },\n \"terms\": {\n \"armored\": {\n \"doc_freq\": 27,\n \"ttf\": 27,\n \"term_freq\": 1,\n \"score\": 9.74725\n },\n \"industrialist\": {\n \"doc_freq\": 88,\n \"ttf\": 88,\n \"term_freq\": 1,\n \"score\": 8.590818\n },\n \"stark\": {\n \"doc_freq\": 44,\n \"ttf\": 47,\n \"term_freq\": 1,\n \"score\": 9.272792\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_termvectors/{id}\n
\n ", + "
\n POST\n /{index}/_termvectors/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "termvectors", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "document" + ], + "summary": "Get term vector information", + "description": "Get information and statistics about terms in the fields of a particular document.\n\nYou can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.\nYou can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body.\nFor example:\n\n```\nGET /my-index-000001/_termvectors/1?fields=message\n```\n\nFields can be specified using wildcards, similar to the multi match query.\n\nTerm vectors are real-time by default, not near real-time.\nThis can be changed by setting `realtime` parameter to `false`.\n\nYou can request three types of values: _term information_, _term statistics_, and _field statistics_.\nBy default, all term information and field statistics are returned for all fields but term statistics are excluded.\n\n**Term information**\n\n* term frequency in the field (always returned)\n* term positions (`positions: true`)\n* start and end offsets (`offsets: true`)\n* term payloads (`payloads: true`), as base64 encoded bytes\n\nIf the requested information wasn't stored in the index, it will be computed on the fly if possible.\nAdditionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.\n\n> warn\n> Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.\n\n**Behaviour**\n\nThe term and field statistics are not accurate.\nDeleted documents are not taken into account.\nThe information is only retrieved for the shard the requested document resides in.\nThe term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.\nBy default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.\nUse `routing` only to hit a particular shard.\nRefer to the linked documentation for detailed examples of how to use this API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/term-vectors-examples", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-termvectors.html" + }, + "operationId": "termvectors-1", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The name of the index that contains the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "description": "A unique identifier for the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "fields", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "field_statistics", + "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "offsets", + "description": "If `true`, the response includes term offsets.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "payloads", + "description": "If `true`, the response includes term payloads.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "positions", + "description": "If `true`, the response includes term positions.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "realtime", + "description": "If true, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "term_statistics", + "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "doc": { + "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", + "type": "object" + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query" + }, + "description": "Filter terms based on their tf-idf scores.\nThis could be useful in order find out a good characteristic vector of a document.\nThis feature works in a similar manner to the second phase of the More Like This Query.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.termvectors.Filter" + } + ] + }, + "per_field_analyzer": { + "description": "Override the default per-field analyzer.\nThis is useful in order to generate term vectors in any fashion, especially when using artificial documents.\nWhen providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "fields": { + "description": "A list of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "field_statistics": { + "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "default": true, + "type": "boolean" + }, + "offsets": { + "description": "If `true`, the response includes term offsets.", + "default": true, + "type": "boolean" + }, + "payloads": { + "description": "If `true`, the response includes term payloads.", + "default": true, + "type": "boolean" + }, + "positions": { + "description": "If `true`, the response includes term positions.", + "default": true, + "type": "boolean" + }, + "term_statistics": { + "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "default": false, + "type": "boolean" + }, + "routing": { + "description": "A custom value that is used to route operations to a specific shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "version": { + "description": "If `true`, returns the document version as part of a hit.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version_type": { + "description": "The version type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] + } + } + }, + "examples": { + "TermVectorsRequestExample1": { + "summary": "Return stored term vectors", + "description": "Run `GET /my-index-000001/_termvectors/1` to return all information and statistics for field `text` in document 1.\n", + "value": "{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + "TermVectorsRequestExample2": { + "summary": "Per-field analyzer", + "description": "Run `GET /my-index-000001/_termvectors/1` to set per-field analyzers. A different analyzer than the one at the field may be provided by using the `per_field_analyzer` parameter.\n", + "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n },\n \"fields\": [\"fullname\"],\n \"per_field_analyzer\" : {\n \"fullname\": \"keyword\"\n }\n}" + }, + "TermVectorsRequestExample3": { + "summary": "Terms filtering", + "description": "Run `GET /imdb/_termvectors` to filter the terms returned based on their tf-idf scores. It returns the three most \"interesting\" keywords from the artificial document having the given \"plot\" field value. Notice that the keyword \"Tony\" or any stop words are not part of the response, as their tf-idf must be too low.\n", + "value": "{\n \"doc\": {\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n \"term_statistics\": true,\n \"field_statistics\": true,\n \"positions\": false,\n \"offsets\": false,\n \"filter\": {\n \"max_num_terms\": 3,\n \"min_term_freq\": 1,\n \"min_doc_freq\": 1\n }\n}" + }, + "TermVectorsRequestExample4": { + "summary": "Generate term vectors on the fly", + "description": "Run `GET /my-index-000001/_termvectors/1`. Term vectors which are not explicitly stored in the index are automatically computed on the fly. This request returns all information and statistics for the fields in document 1, even though the terms haven't been explicitly stored in the index. Note that for the field text, the terms are not regenerated.\n", + "value": "{\n \"fields\" : [\"text\", \"some_field_without_term_vectors\"],\n \"offsets\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + "TermVectorsRequestExample5": { + "summary": "Artificial documents", + "description": "Run `GET /my-index-000001/_termvectors`. Term vectors can be generated for artificial documents, that is for documents not present in the index. If dynamic mapping is turned on (default), the document fields not in the original mapping will be dynamically created.\n", + "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "type": "boolean" + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "term_vectors": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.termvectors.TermVector" + } + }, + "took": { + "type": "number" + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "found", + "_index", + "took", + "_version" + ] + }, + "examples": { + "TermVectorsResponseExample1": { + "summary": "Return stored term vectors", + "description": "A successful response from `GET /my-index-000001/_termvectors/1`.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 4,\n \"doc_count\": 2,\n \"sum_ttf\": 6\n },\n \"terms\": {\n \"test\": {\n \"doc_freq\": 2,\n \"ttf\": 4,\n \"term_freq\": 3,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 4,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 1,\n \"start_offset\": 5,\n \"end_offset\": 9,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 2,\n \"start_offset\": 10,\n \"end_offset\": 14,\n \"payload\": \"d29yZA==\"\n }\n ]\n }\n }\n }\n }\n}" + }, + "TermVectorsResponseExample2": { + "summary": "Per-field analyzer", + "description": "A successful response from `GET /my-index-000001/_termvectors` with `per_field_analyzer` in the request body.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_version\": 0,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"fullname\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 2,\n \"doc_count\": 4,\n \"sum_ttf\": 4\n },\n \"terms\": {\n \"John Doe\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 8\n }\n ]\n }\n }\n }\n }\n}" + }, + "TermVectorsResponseExample3": { + "summary": "Terms filtering", + "description": "A successful response from `GET /my-index-000001/_termvectors` with a `filter` in the request body.", + "value": "{\n \"_index\": \"imdb\",\n \"_version\": 0,\n \"found\": true,\n \"term_vectors\": {\n \"plot\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 3384269,\n \"doc_count\": 176214,\n \"sum_ttf\": 3753460\n },\n \"terms\": {\n \"armored\": {\n \"doc_freq\": 27,\n \"ttf\": 27,\n \"term_freq\": 1,\n \"score\": 9.74725\n },\n \"industrialist\": {\n \"doc_freq\": 88,\n \"ttf\": 88,\n \"term_freq\": 1,\n \"score\": 8.590818\n },\n \"stark\": {\n \"doc_freq\": 44,\n \"ttf\": 47,\n \"term_freq\": 1,\n \"score\": 9.272792\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_termvectors/{id}\n
\n ", + "
\n POST\n /{index}/_termvectors/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "termvectors", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_termvectors": { + "get": { + "tags": [ + "document" + ], + "summary": "Get term vector information", + "description": "Get information and statistics about terms in the fields of a particular document.\n\nYou can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.\nYou can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body.\nFor example:\n\n```\nGET /my-index-000001/_termvectors/1?fields=message\n```\n\nFields can be specified using wildcards, similar to the multi match query.\n\nTerm vectors are real-time by default, not near real-time.\nThis can be changed by setting `realtime` parameter to `false`.\n\nYou can request three types of values: _term information_, _term statistics_, and _field statistics_.\nBy default, all term information and field statistics are returned for all fields but term statistics are excluded.\n\n**Term information**\n\n* term frequency in the field (always returned)\n* term positions (`positions: true`)\n* start and end offsets (`offsets: true`)\n* term payloads (`payloads: true`), as base64 encoded bytes\n\nIf the requested information wasn't stored in the index, it will be computed on the fly if possible.\nAdditionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.\n\n> warn\n> Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.\n\n**Behaviour**\n\nThe term and field statistics are not accurate.\nDeleted documents are not taken into account.\nThe information is only retrieved for the shard the requested document resides in.\nThe term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.\nBy default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.\nUse `routing` only to hit a particular shard.\nRefer to the linked documentation for detailed examples of how to use this API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/term-vectors-examples", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-termvectors.html" + }, + "operationId": "termvectors-2", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The name of the index that contains the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "query", + "name": "fields", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "field_statistics", + "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "offsets", + "description": "If `true`, the response includes term offsets.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "payloads", + "description": "If `true`, the response includes term payloads.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "positions", + "description": "If `true`, the response includes term positions.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "realtime", + "description": "If true, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "term_statistics", + "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "doc": { + "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", + "type": "object" + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query" + }, + "description": "Filter terms based on their tf-idf scores.\nThis could be useful in order find out a good characteristic vector of a document.\nThis feature works in a similar manner to the second phase of the More Like This Query.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.termvectors.Filter" + } + ] + }, + "per_field_analyzer": { + "description": "Override the default per-field analyzer.\nThis is useful in order to generate term vectors in any fashion, especially when using artificial documents.\nWhen providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "fields": { + "description": "A list of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "field_statistics": { + "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "default": true, + "type": "boolean" + }, + "offsets": { + "description": "If `true`, the response includes term offsets.", + "default": true, + "type": "boolean" + }, + "payloads": { + "description": "If `true`, the response includes term payloads.", + "default": true, + "type": "boolean" + }, + "positions": { + "description": "If `true`, the response includes term positions.", + "default": true, + "type": "boolean" + }, + "term_statistics": { + "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "default": false, + "type": "boolean" + }, + "routing": { + "description": "A custom value that is used to route operations to a specific shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "version": { + "description": "If `true`, returns the document version as part of a hit.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version_type": { + "description": "The version type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] + } + } + }, + "examples": { + "TermVectorsRequestExample1": { + "summary": "Return stored term vectors", + "description": "Run `GET /my-index-000001/_termvectors/1` to return all information and statistics for field `text` in document 1.\n", + "value": "{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + "TermVectorsRequestExample2": { + "summary": "Per-field analyzer", + "description": "Run `GET /my-index-000001/_termvectors/1` to set per-field analyzers. A different analyzer than the one at the field may be provided by using the `per_field_analyzer` parameter.\n", + "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n },\n \"fields\": [\"fullname\"],\n \"per_field_analyzer\" : {\n \"fullname\": \"keyword\"\n }\n}" + }, + "TermVectorsRequestExample3": { + "summary": "Terms filtering", + "description": "Run `GET /imdb/_termvectors` to filter the terms returned based on their tf-idf scores. It returns the three most \"interesting\" keywords from the artificial document having the given \"plot\" field value. Notice that the keyword \"Tony\" or any stop words are not part of the response, as their tf-idf must be too low.\n", + "value": "{\n \"doc\": {\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n \"term_statistics\": true,\n \"field_statistics\": true,\n \"positions\": false,\n \"offsets\": false,\n \"filter\": {\n \"max_num_terms\": 3,\n \"min_term_freq\": 1,\n \"min_doc_freq\": 1\n }\n}" + }, + "TermVectorsRequestExample4": { + "summary": "Generate term vectors on the fly", + "description": "Run `GET /my-index-000001/_termvectors/1`. Term vectors which are not explicitly stored in the index are automatically computed on the fly. This request returns all information and statistics for the fields in document 1, even though the terms haven't been explicitly stored in the index. Note that for the field text, the terms are not regenerated.\n", + "value": "{\n \"fields\" : [\"text\", \"some_field_without_term_vectors\"],\n \"offsets\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + "TermVectorsRequestExample5": { + "summary": "Artificial documents", + "description": "Run `GET /my-index-000001/_termvectors`. Term vectors can be generated for artificial documents, that is for documents not present in the index. If dynamic mapping is turned on (default), the document fields not in the original mapping will be dynamically created.\n", + "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "type": "boolean" + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "term_vectors": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.termvectors.TermVector" + } + }, + "took": { + "type": "number" + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "found", + "_index", + "took", + "_version" + ] + }, + "examples": { + "TermVectorsResponseExample1": { + "summary": "Return stored term vectors", + "description": "A successful response from `GET /my-index-000001/_termvectors/1`.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 4,\n \"doc_count\": 2,\n \"sum_ttf\": 6\n },\n \"terms\": {\n \"test\": {\n \"doc_freq\": 2,\n \"ttf\": 4,\n \"term_freq\": 3,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 4,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 1,\n \"start_offset\": 5,\n \"end_offset\": 9,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 2,\n \"start_offset\": 10,\n \"end_offset\": 14,\n \"payload\": \"d29yZA==\"\n }\n ]\n }\n }\n }\n }\n}" + }, + "TermVectorsResponseExample2": { + "summary": "Per-field analyzer", + "description": "A successful response from `GET /my-index-000001/_termvectors` with `per_field_analyzer` in the request body.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_version\": 0,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"fullname\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 2,\n \"doc_count\": 4,\n \"sum_ttf\": 4\n },\n \"terms\": {\n \"John Doe\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 8\n }\n ]\n }\n }\n }\n }\n}" + }, + "TermVectorsResponseExample3": { + "summary": "Terms filtering", + "description": "A successful response from `GET /my-index-000001/_termvectors` with a `filter` in the request body.", + "value": "{\n \"_index\": \"imdb\",\n \"_version\": 0,\n \"found\": true,\n \"term_vectors\": {\n \"plot\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 3384269,\n \"doc_count\": 176214,\n \"sum_ttf\": 3753460\n },\n \"terms\": {\n \"armored\": {\n \"doc_freq\": 27,\n \"ttf\": 27,\n \"term_freq\": 1,\n \"score\": 9.74725\n },\n \"industrialist\": {\n \"doc_freq\": 88,\n \"ttf\": 88,\n \"term_freq\": 1,\n \"score\": 8.590818\n },\n \"stark\": {\n \"doc_freq\": 44,\n \"ttf\": 47,\n \"term_freq\": 1,\n \"score\": 9.272792\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_termvectors\n
\n ", + "
\n POST\n /{index}/_termvectors\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "termvectors", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "document" + ], + "summary": "Get term vector information", + "description": "Get information and statistics about terms in the fields of a particular document.\n\nYou can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.\nYou can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body.\nFor example:\n\n```\nGET /my-index-000001/_termvectors/1?fields=message\n```\n\nFields can be specified using wildcards, similar to the multi match query.\n\nTerm vectors are real-time by default, not near real-time.\nThis can be changed by setting `realtime` parameter to `false`.\n\nYou can request three types of values: _term information_, _term statistics_, and _field statistics_.\nBy default, all term information and field statistics are returned for all fields but term statistics are excluded.\n\n**Term information**\n\n* term frequency in the field (always returned)\n* term positions (`positions: true`)\n* start and end offsets (`offsets: true`)\n* term payloads (`payloads: true`), as base64 encoded bytes\n\nIf the requested information wasn't stored in the index, it will be computed on the fly if possible.\nAdditionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.\n\n> warn\n> Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.\n\n**Behaviour**\n\nThe term and field statistics are not accurate.\nDeleted documents are not taken into account.\nThe information is only retrieved for the shard the requested document resides in.\nThe term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.\nBy default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.\nUse `routing` only to hit a particular shard.\nRefer to the linked documentation for detailed examples of how to use this API.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/term-vectors-examples", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-termvectors.html" + }, + "operationId": "termvectors-3", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The name of the index that contains the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "query", + "name": "fields", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "field_statistics", + "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "offsets", + "description": "If `true`, the response includes term offsets.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "payloads", + "description": "If `true`, the response includes term payloads.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "positions", + "description": "If `true`, the response includes term positions.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "realtime", + "description": "If true, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value that is used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "term_statistics", + "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "The version type.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionType" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "doc": { + "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", + "type": "object" + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query" + }, + "description": "Filter terms based on their tf-idf scores.\nThis could be useful in order find out a good characteristic vector of a document.\nThis feature works in a similar manner to the second phase of the More Like This Query.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.termvectors.Filter" + } + ] + }, + "per_field_analyzer": { + "description": "Override the default per-field analyzer.\nThis is useful in order to generate term vectors in any fashion, especially when using artificial documents.\nWhen providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "fields": { + "description": "A list of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "field_statistics": { + "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "default": true, + "type": "boolean" + }, + "offsets": { + "description": "If `true`, the response includes term offsets.", + "default": true, + "type": "boolean" + }, + "payloads": { + "description": "If `true`, the response includes term payloads.", + "default": true, + "type": "boolean" + }, + "positions": { + "description": "If `true`, the response includes term positions.", + "default": true, + "type": "boolean" + }, + "term_statistics": { + "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "default": false, + "type": "boolean" + }, + "routing": { + "description": "A custom value that is used to route operations to a specific shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "version": { + "description": "If `true`, returns the document version as part of a hit.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version_type": { + "description": "The version type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] + } + } + }, + "examples": { + "TermVectorsRequestExample1": { + "summary": "Return stored term vectors", + "description": "Run `GET /my-index-000001/_termvectors/1` to return all information and statistics for field `text` in document 1.\n", + "value": "{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + "TermVectorsRequestExample2": { + "summary": "Per-field analyzer", + "description": "Run `GET /my-index-000001/_termvectors/1` to set per-field analyzers. A different analyzer than the one at the field may be provided by using the `per_field_analyzer` parameter.\n", + "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n },\n \"fields\": [\"fullname\"],\n \"per_field_analyzer\" : {\n \"fullname\": \"keyword\"\n }\n}" + }, + "TermVectorsRequestExample3": { + "summary": "Terms filtering", + "description": "Run `GET /imdb/_termvectors` to filter the terms returned based on their tf-idf scores. It returns the three most \"interesting\" keywords from the artificial document having the given \"plot\" field value. Notice that the keyword \"Tony\" or any stop words are not part of the response, as their tf-idf must be too low.\n", + "value": "{\n \"doc\": {\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n \"term_statistics\": true,\n \"field_statistics\": true,\n \"positions\": false,\n \"offsets\": false,\n \"filter\": {\n \"max_num_terms\": 3,\n \"min_term_freq\": 1,\n \"min_doc_freq\": 1\n }\n}" + }, + "TermVectorsRequestExample4": { + "summary": "Generate term vectors on the fly", + "description": "Run `GET /my-index-000001/_termvectors/1`. Term vectors which are not explicitly stored in the index are automatically computed on the fly. This request returns all information and statistics for the fields in document 1, even though the terms haven't been explicitly stored in the index. Note that for the field text, the terms are not regenerated.\n", + "value": "{\n \"fields\" : [\"text\", \"some_field_without_term_vectors\"],\n \"offsets\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + "TermVectorsRequestExample5": { + "summary": "Artificial documents", + "description": "Run `GET /my-index-000001/_termvectors`. Term vectors can be generated for artificial documents, that is for documents not present in the index. If dynamic mapping is turned on (default), the document fields not in the original mapping will be dynamically created.\n", + "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "type": "boolean" + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "term_vectors": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.termvectors.TermVector" + } + }, + "took": { + "type": "number" + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "found", + "_index", + "took", + "_version" + ] + }, + "examples": { + "TermVectorsResponseExample1": { + "summary": "Return stored term vectors", + "description": "A successful response from `GET /my-index-000001/_termvectors/1`.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 4,\n \"doc_count\": 2,\n \"sum_ttf\": 6\n },\n \"terms\": {\n \"test\": {\n \"doc_freq\": 2,\n \"ttf\": 4,\n \"term_freq\": 3,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 4,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 1,\n \"start_offset\": 5,\n \"end_offset\": 9,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 2,\n \"start_offset\": 10,\n \"end_offset\": 14,\n \"payload\": \"d29yZA==\"\n }\n ]\n }\n }\n }\n }\n}" + }, + "TermVectorsResponseExample2": { + "summary": "Per-field analyzer", + "description": "A successful response from `GET /my-index-000001/_termvectors` with `per_field_analyzer` in the request body.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_version\": 0,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"fullname\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 2,\n \"doc_count\": 4,\n \"sum_ttf\": 4\n },\n \"terms\": {\n \"John Doe\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 8\n }\n ]\n }\n }\n }\n }\n}" + }, + "TermVectorsResponseExample3": { + "summary": "Terms filtering", + "description": "A successful response from `GET /my-index-000001/_termvectors` with a `filter` in the request body.", + "value": "{\n \"_index\": \"imdb\",\n \"_version\": 0,\n \"found\": true,\n \"term_vectors\": {\n \"plot\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 3384269,\n \"doc_count\": 176214,\n \"sum_ttf\": 3753460\n },\n \"terms\": {\n \"armored\": {\n \"doc_freq\": 27,\n \"ttf\": 27,\n \"term_freq\": 1,\n \"score\": 9.74725\n },\n \"industrialist\": {\n \"doc_freq\": 88,\n \"ttf\": 88,\n \"term_freq\": 1,\n \"score\": 8.590818\n },\n \"stark\": {\n \"doc_freq\": 44,\n \"ttf\": 47,\n \"term_freq\": 1,\n \"score\": 9.272792\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /{index}/_termvectors\n
\n ", + "
\n POST\n /{index}/_termvectors\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "termvectors", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_text_structure/find_field_structure": { + "get": { + "tags": [ + "text_structure" + ], + "summary": "Find the structure of a text field", + "description": "Find the structure of a text field in an Elasticsearch index.\n\nThis API provides a starting point for extracting further information from log messages already ingested into Elasticsearch.\nFor example, if you have ingested data into a very simple index that has just `@timestamp` and message fields, you can use this API to see what common structure exists in the message field.\n\nThe response from the API contains:\n\n* Sample messages.\n* Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields.\n* Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text.\n* Appropriate mappings for an Elasticsearch index, which you could use to ingest the text.\n\nAll this information can be calculated by the structure finder with no guidance.\nHowever, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.\n\nIf the structure finder produces unexpected results, specify the `explain` query parameter and an explanation will appear in the response.\nIt helps determine why the returned structure was chosen.", + "operationId": "text-structure-find-field-structure", + "parameters": [ + { + "in": "query", + "name": "column_names", + "description": "If `format` is set to `delimited`, you can specify the column names in a comma-separated list.\nIf this parameter is not specified, the structure finder uses the column names from the header row of the text.\nIf the text does not have a header row, columns are named \"column1\", \"column2\", \"column3\", for example.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "delimiter", + "description": "If you have set `format` to `delimited`, you can specify the character used to delimit the values in each row.\nOnly a single character is supported; the delimiter cannot have multiple characters.\nBy default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (`|`).\nIn this default scenario, all rows must have the same number of fields for the delimited format to be detected.\nIf you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "documents_to_sample", + "description": "The number of documents to include in the structural analysis.\nThe minimum value is 2.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.uint" + }, + "style": "form" + }, + { + "in": "query", + "name": "ecs_compatibility", + "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nThis setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.\nIf the structure finder identifies a common structure but has no idea of the meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output.\nThe intention in that situation is that a user who knows the meanings will rename the fields before using them.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "If `true`, the response includes a field named `explanation`, which is an array of strings that indicate how the structure finder produced its result.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "field", + "description": "The field that should be analyzed.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" + }, + { + "in": "query", + "name": "format", + "description": "The high level structure of the text.\nBy default, the API chooses the format.\nIn this default scenario, all rows must have the same number of fields for a delimited format to be detected.\nIf 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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/text_structure._types.FormatType" + }, + "style": "form" + }, + { + "in": "query", + "name": "grok_pattern", + "description": "If the format is `semi_structured_text`, you can specify a Grok pattern that is used to extract fields from every message in the text.\nThe name of the timestamp field in the Grok pattern must match what is specified in the `timestamp_field` parameter.\nIf that parameter is not specified, the name of the timestamp field in the Grok pattern must match \"timestamp\".\nIf `grok_pattern` is not specified, the structure finder creates a Grok pattern.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.GrokPattern" + }, + "style": "form" + }, + { + "in": "query", + "name": "index", + "description": "The name of the index that contains the analyzed field.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "form" + }, + { + "in": "query", + "name": "quote", + "description": "If the format is `delimited`, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character.\nOnly a single character is supported.\nIf this parameter is not specified, the default value is a double quote (`\"`).\nIf 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.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "should_trim_fields", + "description": "If the format is `delimited`, you can specify whether values between delimiters should have whitespace trimmed from them.\nIf this parameter is not specified and the delimiter is pipe (`|`), the default value is true.\nOtherwise, the default value is `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "should_parse_recursively", + "description": "If the format is `ndjson`, you can specify whether to parse nested JSON objects recursively.\nThe nested objects are parsed to a maximum depth equal to the default value of the `index.mapping.depth.limit` setting.\nAnything beyond that depth is parsed as an `object` type field.\nFor formats other than `ndjson`, this parameter is ignored.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The maximum amount of time that the structure analysis can take.\nIf the analysis is still running when the timeout expires, it will be stopped.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timestamp_field", + "description": "The name of the field that contains the primary timestamp of each record in the text.\nIn particular, if the text was ingested into an index, this is the field that would be used to populate the `@timestamp` field.\n\nIf the format is `semi_structured_text`, this field must match the name of the appropriate extraction in the `grok_pattern`.\nTherefore, for semi-structured text, it is best not to specify this parameter unless `grok_pattern` is also specified.\n\nFor structured text, if you specify this parameter, the field must exist within the text.\n\nIf this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field.\nFor structured text, it is not compulsory to have a timestamp in the text.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" + }, + { + "in": "query", + "name": "timestamp_format", + "description": "The Java time format of the timestamp field in the text.\nOnly a subset of Java time format letter groups are supported:\n\n* `a`\n* `d`\n* `dd`\n* `EEE`\n* `EEEE`\n* `H`\n* `HH`\n* `h`\n* `M`\n* `MM`\n* `MMM`\n* `MMMM`\n* `mm`\n* `ss`\n* `XX`\n* `XXX`\n* `yy`\n* `yyyy`\n* `zzz`\n\nAdditionally `S` letter groups (fractional seconds) of length one to nine are supported providing they occur after `ss` and are separated from the `ss` by a period (`.`), comma (`,`), or colon (`:`).\nSpacing and punctuation is also permitted with the exception a question mark (`?`), newline, and carriage return, together with literal text enclosed in single quotes.\nFor example, `MM/dd HH.mm.ss,SSSSSS 'in' yyyy` is a valid override format.\n\nOne valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full `grok_pattern`.\nAnother is when the timestamp format is one that the structure finder does not consider by default.\n\nIf this parameter is not specified, the structure finder chooses the best format from a built-in set.\n\nIf the special value `null` is specified, the structure finder will not look for a primary timestamp in the text.\nWhen the format is semi-structured text, this will result in the structure finder treating the text as single-line messages.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "charset": { + "type": "string" + }, + "ecs_compatibility": { + "allOf": [ + { + "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" + } + ] + }, + "field_stats": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/text_structure._types.FieldStat" + } + }, + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/text_structure._types.FormatType" + } + ] + }, + "grok_pattern": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GrokPattern" + } + ] + }, + "java_timestamp_formats": { + "type": "array", + "items": { + "type": "string" + } + }, + "joda_timestamp_formats": { + "type": "array", + "items": { + "type": "string" + } + }, + "ingest_pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.PipelineConfig" + } + ] + }, + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "multiline_start_pattern": { + "type": "string" + }, + "need_client_timezone": { + "type": "boolean" + }, + "num_lines_analyzed": { + "type": "number" + }, + "num_messages_analyzed": { + "type": "number" + }, + "sample_start": { + "type": "string" + }, + "timestamp_field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "charset", + "field_stats", + "format", + "ingest_pipeline", + "mappings", + "need_client_timezone", + "num_lines_analyzed", + "num_messages_analyzed", + "sample_start" + ] + }, + "examples": { + "FindFieldStructureResponseExample1": { + "description": "A successful response from `GET _text_structure/find_field_structure?index=test-logs&field=message`.", + "value": "{\n \"num_lines_analyzed\" : 22,\n \"num_messages_analyzed\" : 22,\n \"sample_start\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\\n[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\\n\",\n \"charset\" : \"UTF-8\",\n \"format\" : \"semi_structured_text\",\n \"multiline_start_pattern\" : \"^\\\\[\\\\b\\\\d{4}-\\\\d{2}-\\\\d{2}[T ]\\\\d{2}:\\\\d{2}\",\n \"grok_pattern\" : \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\",\n \"ecs_compatibility\" : \"disabled\",\n \"timestamp_field\" : \"timestamp\",\n \"joda_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true,\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"loglevel\" : {\n \"type\" : \"keyword\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by text structure finder\",\n \"processors\" : [\n {\n \"grok\" : {\n \"field\" : \"message\",\n \"patterns\" : [\n \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\"\n ],\n \"ecs_compatibility\" : \"disabled\"\n }\n },\n {\n \"date\" : {\n \"field\" : \"timestamp\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n },\n {\n \"remove\" : {\n \"field\" : \"timestamp\"\n }\n }\n ]\n },\n \"field_stats\" : {\n \"loglevel\" : {\n \"count\" : 22,\n \"cardinality\" : 1,\n \"top_hits\" : [\n {\n \"value\" : \"INFO\",\n \"count\" : 22\n }\n ]\n },\n \"message\" : {\n \"count\" : 22,\n \"cardinality\" : 22,\n \"top_hits\" : [\n {\n \"value\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"count\" : 1\n }\n ]\n },\n \"timestamp\" : {\n \"count\" : 22,\n \"cardinality\" : 14,\n \"earliest\" : \"2024-03-05T10:52:36,256\",\n \"latest\" : \"2024-03-05T10:52:49,199\",\n \"top_hits\" : [\n {\n \"value\" : \"2024-03-05T10:52:41,044\",\n \"count\" : 6\n },\n {\n \"value\" : \"2024-03-05T10:52:41,043\",\n \"count\" : 3\n },\n {\n \"value\" : \"2024-03-05T10:52:41,059\",\n \"count\" : 2\n },\n {\n \"value\" : \"2024-03-05T10:52:36,256\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,038\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,042\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:43,291\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:46,098\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,227\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,259\",\n \"count\" : 1\n }\n ]\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_text_structure/find_field_structure\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_text_structure`\n" + ], + "x-api": "find_field_structure.text_structure", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_text_structure/find_message_structure": { + "get": { + "tags": [ + "text_structure" + ], + "summary": "Find the structure of text messages", + "description": "Find the structure of a list of text messages.\nThe messages must contain data that is suitable to be ingested into Elasticsearch.\n\nThis API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.\nUse this API rather than the find text structure API if your input text has already been split up into separate messages by some other process.\n\nThe response from the API contains:\n\n* Sample messages.\n* Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields.\n* Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text.\nAppropriate mappings for an Elasticsearch index, which you could use to ingest the text.\n\nAll this information can be calculated by the structure finder with no guidance.\nHowever, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.\n\nIf the structure finder produces unexpected results, specify the `explain` query parameter and an explanation will appear in the response.\nIt helps determine why the returned structure was chosen.", + "operationId": "text-structure-find-message-structure", + "parameters": [ + { + "in": "query", + "name": "column_names", + "description": "If the format is `delimited`, you can specify the column names in a comma-separated list.\nIf this parameter is not specified, the structure finder uses the column names from the header row of the text.\nIf the text does not have a header role, columns are named \"column1\", \"column2\", \"column3\", for example.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "delimiter", + "description": "If you the format is `delimited`, you can specify the character used to delimit the values in each row.\nOnly a single character is supported; the delimiter cannot have multiple characters.\nBy default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (`|`).\nIn this default scenario, all rows must have the same number of fields for the delimited format to be detected.\nIf you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "ecs_compatibility", + "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nThis setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.\nIf the structure finder identifies a common structure but has no idea of meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output, with the intention that a user who knows the meanings rename these fields before using it.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "format", + "description": "The high level structure of the text.\nBy default, the API chooses the format.\nIn this default scenario, all rows must have the same number of fields for a delimited format to be detected.\nIf the format is `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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/text_structure._types.FormatType" + }, + "style": "form" + }, + { + "in": "query", + "name": "grok_pattern", + "description": "If the format is `semi_structured_text`, you can specify a Grok pattern that is used to extract fields from every message in the text.\nThe name of the timestamp field in the Grok pattern must match what is specified in the `timestamp_field` parameter.\nIf that parameter is not specified, the name of the timestamp field in the Grok pattern must match \"timestamp\".\nIf `grok_pattern` is not specified, the structure finder creates a Grok pattern.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.GrokPattern" + }, + "style": "form" + }, + { + "in": "query", + "name": "quote", + "description": "If the format is `delimited`, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character.\nOnly a single character is supported.\nIf this parameter is not specified, the default value is a double quote (`\"`).\nIf 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.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "should_trim_fields", + "description": "If the format is `delimited`, you can specify whether values between delimiters should have whitespace trimmed from them.\nIf this parameter is not specified and the delimiter is pipe (`|`), the default value is true.\nOtherwise, the default value is `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "should_parse_recursively", + "description": "If the format is `ndjson`, you can specify whether to parse nested JSON objects recursively.\nThe nested objects are parsed to a maximum depth equal to the default value of the `index.mapping.depth.limit` setting.\nAnything beyond that depth is parsed as an `object` type field.\nFor formats other than `ndjson`, this parameter is ignored.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The maximum amount of time that the structure analysis can take.\nIf the analysis is still running when the timeout expires, it will be stopped.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timestamp_field", + "description": "The name of the field that contains the primary timestamp of each record in the text.\nIn particular, if the text was ingested into an index, this is the field that would be used to populate the `@timestamp` field.\n\nIf the format is `semi_structured_text`, this field must match the name of the appropriate extraction in the `grok_pattern`.\nTherefore, for semi-structured text, it is best not to specify this parameter unless `grok_pattern` is also specified.\n\nFor structured text, if you specify this parameter, the field must exist within the text.\n\nIf this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field.\nFor structured text, it is not compulsory to have a timestamp in the text.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" + }, + { + "in": "query", + "name": "timestamp_format", + "description": "The Java time format of the timestamp field in the text.\nOnly a subset of Java time format letter groups are supported:\n\n* `a`\n* `d`\n* `dd`\n* `EEE`\n* `EEEE`\n* `H`\n* `HH`\n* `h`\n* `M`\n* `MM`\n* `MMM`\n* `MMMM`\n* `mm`\n* `ss`\n* `XX`\n* `XXX`\n* `yy`\n* `yyyy`\n* `zzz`\n\nAdditionally `S` letter groups (fractional seconds) of length one to nine are supported providing they occur after `ss` and are separated from the `ss` by a period (`.`), comma (`,`), or colon (`:`).\nSpacing and punctuation is also permitted with the exception a question mark (`?`), newline, and carriage return, together with literal text enclosed in single quotes.\nFor example, `MM/dd HH.mm.ss,SSSSSS 'in' yyyy` is a valid override format.\n\nOne valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full `grok_pattern`.\nAnother is when the timestamp format is one that the structure finder does not consider by default.\n\nIf this parameter is not specified, the structure finder chooses the best format from a built-in set.\n\nIf the special value `null` is specified, the structure finder will not look for a primary timestamp in the text.\nWhen the format is semi-structured text, this will result in the structure finder treating the text as single-line messages.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "messages": { + "description": "The list of messages you want to analyze.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "messages" + ] + }, + "examples": { + "FindMessageStructureRequestExample1": { + "description": "Run `POST _text_structure/find_message_structure` to analyze Elasticsearch log files.\n", + "value": "{\n \"messages\": [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "charset": { + "type": "string" + }, + "ecs_compatibility": { + "allOf": [ + { + "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" + } + ] + }, + "field_stats": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/text_structure._types.FieldStat" + } + }, + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/text_structure._types.FormatType" + } + ] + }, + "grok_pattern": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GrokPattern" + } + ] + }, + "java_timestamp_formats": { + "type": "array", + "items": { + "type": "string" + } + }, + "joda_timestamp_formats": { + "type": "array", + "items": { + "type": "string" + } + }, + "ingest_pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.PipelineConfig" + } + ] + }, + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "multiline_start_pattern": { + "type": "string" + }, + "need_client_timezone": { + "type": "boolean" + }, + "num_lines_analyzed": { + "type": "number" + }, + "num_messages_analyzed": { + "type": "number" + }, + "sample_start": { + "type": "string" + }, + "timestamp_field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "charset", + "field_stats", + "format", + "ingest_pipeline", + "mappings", + "need_client_timezone", + "num_lines_analyzed", + "num_messages_analyzed", + "sample_start" + ] + }, + "examples": { + "FindMessageStructureResponseExample1": { + "description": "A successful response from `POST _text_structure/find_message_structure`.", + "value": "{\n \"num_lines_analyzed\" : 22,\n \"num_messages_analyzed\" : 22,\n \"sample_start\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\\n[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\\n\",\n \"charset\" : \"UTF-8\",\n \"format\" : \"semi_structured_text\",\n \"multiline_start_pattern\" : \"^\\\\[\\\\b\\\\d{4}-\\\\d{2}-\\\\d{2}[T ]\\\\d{2}:\\\\d{2}\",\n \"grok_pattern\" : \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\",\n \"ecs_compatibility\" : \"disabled\",\n \"timestamp_field\" : \"timestamp\",\n \"joda_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true,\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"loglevel\" : {\n \"type\" : \"keyword\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by text structure finder\",\n \"processors\" : [\n {\n \"grok\" : {\n \"field\" : \"message\",\n \"patterns\" : [\n \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\"\n ],\n \"ecs_compatibility\" : \"disabled\"\n }\n },\n {\n \"date\" : {\n \"field\" : \"timestamp\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n },\n {\n \"remove\" : {\n \"field\" : \"timestamp\"\n }\n }\n ]\n },\n \"field_stats\" : {\n \"loglevel\" : {\n \"count\" : 22,\n \"cardinality\" : 1,\n \"top_hits\" : [\n {\n \"value\" : \"INFO\",\n \"count\" : 22\n }\n ]\n },\n \"message\" : {\n \"count\" : 22,\n \"cardinality\" : 22,\n \"top_hits\" : [\n {\n \"value\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"count\" : 1\n }\n ]\n },\n \"timestamp\" : {\n \"count\" : 22,\n \"cardinality\" : 14,\n \"earliest\" : \"2024-03-05T10:52:36,256\",\n \"latest\" : \"2024-03-05T10:52:49,199\",\n \"top_hits\" : [\n {\n \"value\" : \"2024-03-05T10:52:41,044\",\n \"count\" : 6\n },\n {\n \"value\" : \"2024-03-05T10:52:41,043\",\n \"count\" : 3\n },\n {\n \"value\" : \"2024-03-05T10:52:41,059\",\n \"count\" : 2\n },\n {\n \"value\" : \"2024-03-05T10:52:36,256\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,038\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,042\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:43,291\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:46,098\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,227\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,259\",\n \"count\" : 1\n }\n ]\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_text_structure/find_message_structure\n
\n ", + "
\n POST\n /_text_structure/find_message_structure\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_text_structure`\n" + ], + "x-api": "find_message_structure.text_structure", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "text_structure" + ], + "summary": "Find the structure of text messages", + "description": "Find the structure of a list of text messages.\nThe messages must contain data that is suitable to be ingested into Elasticsearch.\n\nThis API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.\nUse this API rather than the find text structure API if your input text has already been split up into separate messages by some other process.\n\nThe response from the API contains:\n\n* Sample messages.\n* Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields.\n* Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text.\nAppropriate mappings for an Elasticsearch index, which you could use to ingest the text.\n\nAll this information can be calculated by the structure finder with no guidance.\nHowever, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.\n\nIf the structure finder produces unexpected results, specify the `explain` query parameter and an explanation will appear in the response.\nIt helps determine why the returned structure was chosen.", + "operationId": "text-structure-find-message-structure-1", + "parameters": [ + { + "in": "query", + "name": "column_names", + "description": "If the format is `delimited`, you can specify the column names in a comma-separated list.\nIf this parameter is not specified, the structure finder uses the column names from the header row of the text.\nIf the text does not have a header role, columns are named \"column1\", \"column2\", \"column3\", for example.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "delimiter", + "description": "If you the format is `delimited`, you can specify the character used to delimit the values in each row.\nOnly a single character is supported; the delimiter cannot have multiple characters.\nBy default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (`|`).\nIn this default scenario, all rows must have the same number of fields for the delimited format to be detected.\nIf you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "ecs_compatibility", + "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nThis setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.\nIf the structure finder identifies a common structure but has no idea of meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output, with the intention that a user who knows the meanings rename these fields before using it.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "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.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "format", + "description": "The high level structure of the text.\nBy default, the API chooses the format.\nIn this default scenario, all rows must have the same number of fields for a delimited format to be detected.\nIf the format is `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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/text_structure._types.FormatType" + }, + "style": "form" + }, + { + "in": "query", + "name": "grok_pattern", + "description": "If the format is `semi_structured_text`, you can specify a Grok pattern that is used to extract fields from every message in the text.\nThe name of the timestamp field in the Grok pattern must match what is specified in the `timestamp_field` parameter.\nIf that parameter is not specified, the name of the timestamp field in the Grok pattern must match \"timestamp\".\nIf `grok_pattern` is not specified, the structure finder creates a Grok pattern.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.GrokPattern" + }, + "style": "form" + }, + { + "in": "query", + "name": "quote", + "description": "If the format is `delimited`, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character.\nOnly a single character is supported.\nIf this parameter is not specified, the default value is a double quote (`\"`).\nIf 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.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "should_trim_fields", + "description": "If the format is `delimited`, you can specify whether values between delimiters should have whitespace trimmed from them.\nIf this parameter is not specified and the delimiter is pipe (`|`), the default value is true.\nOtherwise, the default value is `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "should_parse_recursively", + "description": "If the format is `ndjson`, you can specify whether to parse nested JSON objects recursively.\nThe nested objects are parsed to a maximum depth equal to the default value of the `index.mapping.depth.limit` setting.\nAnything beyond that depth is parsed as an `object` type field.\nFor formats other than `ndjson`, this parameter is ignored.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The maximum amount of time that the structure analysis can take.\nIf the analysis is still running when the timeout expires, it will be stopped.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timestamp_field", + "description": "The name of the field that contains the primary timestamp of each record in the text.\nIn particular, if the text was ingested into an index, this is the field that would be used to populate the `@timestamp` field.\n\nIf the format is `semi_structured_text`, this field must match the name of the appropriate extraction in the `grok_pattern`.\nTherefore, for semi-structured text, it is best not to specify this parameter unless `grok_pattern` is also specified.\n\nFor structured text, if you specify this parameter, the field must exist within the text.\n\nIf this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field.\nFor structured text, it is not compulsory to have a timestamp in the text.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" + }, + { + "in": "query", + "name": "timestamp_format", + "description": "The Java time format of the timestamp field in the text.\nOnly a subset of Java time format letter groups are supported:\n\n* `a`\n* `d`\n* `dd`\n* `EEE`\n* `EEEE`\n* `H`\n* `HH`\n* `h`\n* `M`\n* `MM`\n* `MMM`\n* `MMMM`\n* `mm`\n* `ss`\n* `XX`\n* `XXX`\n* `yy`\n* `yyyy`\n* `zzz`\n\nAdditionally `S` letter groups (fractional seconds) of length one to nine are supported providing they occur after `ss` and are separated from the `ss` by a period (`.`), comma (`,`), or colon (`:`).\nSpacing and punctuation is also permitted with the exception a question mark (`?`), newline, and carriage return, together with literal text enclosed in single quotes.\nFor example, `MM/dd HH.mm.ss,SSSSSS 'in' yyyy` is a valid override format.\n\nOne valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full `grok_pattern`.\nAnother is when the timestamp format is one that the structure finder does not consider by default.\n\nIf this parameter is not specified, the structure finder chooses the best format from a built-in set.\n\nIf the special value `null` is specified, the structure finder will not look for a primary timestamp in the text.\nWhen the format is semi-structured text, this will result in the structure finder treating the text as single-line messages.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "messages": { + "description": "The list of messages you want to analyze.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "messages" + ] + }, + "examples": { + "FindMessageStructureRequestExample1": { + "description": "Run `POST _text_structure/find_message_structure` to analyze Elasticsearch log files.\n", + "value": "{\n \"messages\": [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "charset": { + "type": "string" + }, + "ecs_compatibility": { + "allOf": [ + { + "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" + } + ] + }, + "field_stats": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/text_structure._types.FieldStat" + } + }, + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/text_structure._types.FormatType" + } + ] + }, + "grok_pattern": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GrokPattern" + } + ] + }, + "java_timestamp_formats": { + "type": "array", + "items": { + "type": "string" + } + }, + "joda_timestamp_formats": { + "type": "array", + "items": { + "type": "string" + } + }, + "ingest_pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.PipelineConfig" + } + ] + }, + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "multiline_start_pattern": { + "type": "string" + }, + "need_client_timezone": { + "type": "boolean" + }, + "num_lines_analyzed": { + "type": "number" + }, + "num_messages_analyzed": { + "type": "number" + }, + "sample_start": { + "type": "string" + }, + "timestamp_field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "charset", + "field_stats", + "format", + "ingest_pipeline", + "mappings", + "need_client_timezone", + "num_lines_analyzed", + "num_messages_analyzed", + "sample_start" + ] + }, + "examples": { + "FindMessageStructureResponseExample1": { + "description": "A successful response from `POST _text_structure/find_message_structure`.", + "value": "{\n \"num_lines_analyzed\" : 22,\n \"num_messages_analyzed\" : 22,\n \"sample_start\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\\n[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\\n\",\n \"charset\" : \"UTF-8\",\n \"format\" : \"semi_structured_text\",\n \"multiline_start_pattern\" : \"^\\\\[\\\\b\\\\d{4}-\\\\d{2}-\\\\d{2}[T ]\\\\d{2}:\\\\d{2}\",\n \"grok_pattern\" : \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\",\n \"ecs_compatibility\" : \"disabled\",\n \"timestamp_field\" : \"timestamp\",\n \"joda_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true,\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"loglevel\" : {\n \"type\" : \"keyword\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by text structure finder\",\n \"processors\" : [\n {\n \"grok\" : {\n \"field\" : \"message\",\n \"patterns\" : [\n \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\"\n ],\n \"ecs_compatibility\" : \"disabled\"\n }\n },\n {\n \"date\" : {\n \"field\" : \"timestamp\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n },\n {\n \"remove\" : {\n \"field\" : \"timestamp\"\n }\n }\n ]\n },\n \"field_stats\" : {\n \"loglevel\" : {\n \"count\" : 22,\n \"cardinality\" : 1,\n \"top_hits\" : [\n {\n \"value\" : \"INFO\",\n \"count\" : 22\n }\n ]\n },\n \"message\" : {\n \"count\" : 22,\n \"cardinality\" : 22,\n \"top_hits\" : [\n {\n \"value\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"count\" : 1\n }\n ]\n },\n \"timestamp\" : {\n \"count\" : 22,\n \"cardinality\" : 14,\n \"earliest\" : \"2024-03-05T10:52:36,256\",\n \"latest\" : \"2024-03-05T10:52:49,199\",\n \"top_hits\" : [\n {\n \"value\" : \"2024-03-05T10:52:41,044\",\n \"count\" : 6\n },\n {\n \"value\" : \"2024-03-05T10:52:41,043\",\n \"count\" : 3\n },\n {\n \"value\" : \"2024-03-05T10:52:41,059\",\n \"count\" : 2\n },\n {\n \"value\" : \"2024-03-05T10:52:36,256\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,038\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,042\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:43,291\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:46,098\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,227\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,259\",\n \"count\" : 1\n }\n ]\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_text_structure/find_message_structure\n
\n ", + "
\n POST\n /_text_structure/find_message_structure\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_text_structure`\n" + ], + "x-api": "find_message_structure.text_structure", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_text_structure/find_structure": { + "post": { + "tags": [ + "text_structure" + ], + "summary": "Find the structure of a text file", + "description": "The text file must contain data that is suitable to be ingested into Elasticsearch.\n\nThis API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.\nUnlike other Elasticsearch endpoints, the data that is posted to this endpoint does not need to be UTF-8 encoded and in JSON format.\nIt must, however, be text; binary text formats are not currently supported.\nThe size is limited to the Elasticsearch HTTP receive buffer size, which defaults to 100 Mb.\n\nThe response from the API contains:\n\n* A couple of messages from the beginning of the text.\n* Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields.\n* Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text.\n* Appropriate mappings for an Elasticsearch index, which you could use to ingest the text.\n\nAll this information can be calculated by the structure finder with no guidance.\nHowever, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/find-text-structure-examples", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/find-structure.html" + }, + "operationId": "text-structure-find-structure", + "parameters": [ + { + "in": "query", + "name": "charset", + "description": "The text's character set.\nIt must be a character set that is supported by the JVM that Elasticsearch uses.\nFor example, `UTF-8`, `UTF-16LE`, `windows-1252`, or `EUC-JP`.\nIf this parameter is not specified, the structure finder chooses an appropriate character set.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "column_names", + "description": "If you have set format to `delimited`, you can specify the column names in a comma-separated list.\nIf this parameter is not specified, the structure finder uses the column names from the header row of the text.\nIf the text does not have a header role, columns are named \"column1\", \"column2\", \"column3\", for example.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "delimiter", + "description": "If you have set `format` to `delimited`, you can specify the character used to delimit the values in each row.\nOnly a single character is supported; the delimiter cannot have multiple characters.\nBy default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (`|`).\nIn this default scenario, all rows must have the same number of fields for the delimited format to be detected.\nIf you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "ecs_compatibility", + "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nValid values are `disabled` and `v1`.\nThis setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.\nIf the structure finder identifies a common structure but has no idea of meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output, with the intention that a user who knows the meanings rename these fields before using it.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "explain", + "description": "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.\nIf the structure finder produces unexpected results for some text, use this query parameter to help you determine why the returned structure was chosen.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "format", + "description": "The high level structure of the text.\nValid values are `ndjson`, `xml`, `delimited`, and `semi_structured_text`.\nBy default, the API chooses the format.\nIn this default scenario, all rows must have the same number of fields for a delimited format to be detected.\nIf 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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/text_structure.find_structure.FindStructureFormat" + }, + "style": "form" + }, + { + "in": "query", + "name": "grok_pattern", + "description": "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.\nThe name of the timestamp field in the Grok pattern must match what is specified in the `timestamp_field` parameter.\nIf that parameter is not specified, the name of the timestamp field in the Grok pattern must match \"timestamp\".\nIf `grok_pattern` is not specified, the structure finder creates a Grok pattern.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.GrokPattern" + }, + "style": "form" + }, + { + "in": "query", + "name": "has_header_row", + "description": "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.\nIf this parameter is not specified, the structure finder guesses based on the similarity of the first row of the text to other rows.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "line_merge_size_limit", + "description": "The maximum number of characters in a message when lines are merged to form messages while analyzing semi-structured text.\nIf 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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.uint" + }, + "style": "form" + }, + { + "in": "query", + "name": "lines_to_sample", + "description": "The number of lines to include in the structural analysis, starting from the beginning of the text.\nThe minimum is 2.\nIf 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.\n\nNOTE: The number of lines and the variation of the lines affects the speed of the analysis.\nFor example, if you upload text where the first 1000 lines are all variations on the same message, the analysis will find more commonality than would be seen with a bigger sample.\nIf possible, however, it is more efficient to upload sample text with more variety in the first 1000 lines than to request analysis of 100000 lines to achieve some variety.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.uint" + }, + "style": "form" + }, + { + "in": "query", + "name": "quote", + "description": "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.\nOnly a single character is supported.\nIf this parameter is not specified, the default value is a double quote (`\"`).\nIf 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.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "should_trim_fields", + "description": "If you have set `format` to `delimited`, you can specify whether values between delimiters should have whitespace trimmed from them.\nIf this parameter is not specified and the delimiter is pipe (`|`), the default value is `true`.\nOtherwise, the default value is `false`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "should_parse_recursively", + "description": "If the format is `ndjson`, you can specify whether to parse nested JSON objects recursively.\nThe nested objects are parsed to a maximum depth equal to the default value of the `index.mapping.depth.limit` setting.\nAnything beyond that depth is parsed as an `object` type field.\nFor formats other than `ndjson`, this parameter is ignored.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The maximum amount of time that the structure analysis can take.\nIf the analysis is still running when the timeout expires then it will be stopped.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timestamp_field", + "description": "The name of the field that contains the primary timestamp of each record in the text.\nIn particular, if the text were ingested into an index, this is the field that would be used to populate the `@timestamp` field.\n\nIf the `format` is `semi_structured_text`, this field must match the name of the appropriate extraction in the `grok_pattern`.\nTherefore, for semi-structured text, it is best not to specify this parameter unless `grok_pattern` is also specified.\n\nFor structured text, if you specify this parameter, the field must exist within the text.\n\nIf this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field.\nFor structured text, it is not compulsory to have a timestamp in the text.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Field" + }, + "style": "form" + }, + { + "in": "query", + "name": "timestamp_format", + "description": "The Java time format of the timestamp field in the text.\n\nOnly a subset of Java time format letter groups are supported:\n\n* `a`\n* `d`\n* `dd`\n* `EEE`\n* `EEEE`\n* `H`\n* `HH`\n* `h`\n* `M`\n* `MM`\n* `MMM`\n* `MMMM`\n* `mm`\n* `ss`\n* `XX`\n* `XXX`\n* `yy`\n* `yyyy`\n* `zzz`\n\nAdditionally `S` letter groups (fractional seconds) of length one to nine are supported providing they occur after `ss` and separated from the `ss` by a `.`, `,` or `:`.\nSpacing and punctuation is also permitted with the exception of `?`, newline and carriage return, together with literal text enclosed in single quotes.\nFor example, `MM/dd HH.mm.ss,SSSSSS 'in' yyyy` is a valid override format.\n\nOne valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full `grok_pattern`.\nAnother is when the timestamp format is one that the structure finder does not consider by default.\n\nIf this parameter is not specified, the structure finder chooses the best format from a built-in set.\n\nIf the special value `null` is specified the structure finder will not look for a primary timestamp in the text.\nWhen the format is semi-structured text this will result in the structure finder treating the text as single-line messages.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + }, + "examples": { + "FindStructureRequestExample1": { + "description": "Run `POST _text_structure/find_structure` to analyze newline-delimited JSON text.", + "value": "{\"name\": \"Leviathan Wakes\", \"author\": \"James S.A. Corey\", \"release_date\": \"2011-06-02\", \"page_count\": 561}\n{\"name\": \"Hyperion\", \"author\": \"Dan Simmons\", \"release_date\": \"1989-05-26\", \"page_count\": 482}\n{\"name\": \"Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1965-06-01\", \"page_count\": 604}\n{\"name\": \"Dune Messiah\", \"author\": \"Frank Herbert\", \"release_date\": \"1969-10-15\", \"page_count\": 331}\n{\"name\": \"Children of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1976-04-21\", \"page_count\": 408}\n{\"name\": \"God Emperor of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1981-05-28\", \"page_count\": 454}\n{\"name\": \"Consider Phlebas\", \"author\": \"Iain M. Banks\", \"release_date\": \"1987-04-23\", \"page_count\": 471}\n{\"name\": \"Pandora's Star\", \"author\": \"Peter F. Hamilton\", \"release_date\": \"2004-03-02\", \"page_count\": 768}\n{\"name\": \"Revelation Space\", \"author\": \"Alastair Reynolds\", \"release_date\": \"2000-03-15\", \"page_count\": 585}\n{\"name\": \"A Fire Upon the Deep\", \"author\": \"Vernor Vinge\", \"release_date\": \"1992-06-01\", \"page_count\": 613}\n{\"name\": \"Ender's Game\", \"author\": \"Orson Scott Card\", \"release_date\": \"1985-06-01\", \"page_count\": 324}\n{\"name\": \"1984\", \"author\": \"George Orwell\", \"release_date\": \"1985-06-01\", \"page_count\": 328}\n{\"name\": \"Fahrenheit 451\", \"author\": \"Ray Bradbury\", \"release_date\": \"1953-10-15\", \"page_count\": 227}\n{\"name\": \"Brave New World\", \"author\": \"Aldous Huxley\", \"release_date\": \"1932-06-01\", \"page_count\": 268}\n{\"name\": \"Foundation\", \"author\": \"Isaac Asimov\", \"release_date\": \"1951-06-01\", \"page_count\": 224}\n{\"name\": \"The Giver\", \"author\": \"Lois Lowry\", \"release_date\": \"1993-04-26\", \"page_count\": 208}\n{\"name\": \"Slaughterhouse-Five\", \"author\": \"Kurt Vonnegut\", \"release_date\": \"1969-06-01\", \"page_count\": 275}\n{\"name\": \"The Hitchhiker's Guide to the Galaxy\", \"author\": \"Douglas Adams\", \"release_date\": \"1979-10-12\", \"page_count\": 180}\n{\"name\": \"Snow Crash\", \"author\": \"Neal Stephenson\", \"release_date\": \"1992-06-01\", \"page_count\": 470}\n{\"name\": \"Neuromancer\", \"author\": \"William Gibson\", \"release_date\": \"1984-07-01\", \"page_count\": 271}\n{\"name\": \"The Handmaid's Tale\", \"author\": \"Margaret Atwood\", \"release_date\": \"1985-06-01\", \"page_count\": 311}\n{\"name\": \"Starship Troopers\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1959-12-01\", \"page_count\": 335}\n{\"name\": \"The Left Hand of Darkness\", \"author\": \"Ursula K. Le Guin\", \"release_date\": \"1969-06-01\", \"page_count\": 304}\n{\"name\": \"The Moon is a Harsh Mistress\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1966-04-01\", \"page_count\": 288}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "charset": { + "description": "The character encoding used to parse the text.", + "type": "string" + }, + "has_header_row": { + "type": "boolean" + }, + "has_byte_order_marker": { + "description": "For UTF character encodings, it indicates whether the text begins with a byte order marker.", + "type": "boolean" + }, + "format": { + "description": "Valid values include `ndjson`, `xml`, `delimited`, and `semi_structured_text`.", + "type": "string" + }, + "field_stats": { + "description": "The most common values of each field, plus basic numeric statistics for the numeric `page_count` field.\nThis information may provide clues that the data needs to be cleaned or transformed prior to use by other Elastic Stack functionality.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/text_structure._types.FieldStat" + } + }, + "sample_start": { + "description": "The first two messages in the text verbatim.\nThis may help diagnose parse errors or accidental uploads of the wrong text.", + "type": "string" + }, + "num_messages_analyzed": { + "description": "The number of distinct messages the lines contained.\nFor NDJSON, this value is the same as `num_lines_analyzed`.\nFor other text formats, messages can span several lines.", + "type": "number" + }, + "mappings": { + "description": "Some suitable mappings for an index into which the data could be ingested.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "quote": { + "type": "string" + }, + "delimiter": { + "type": "string" + }, + "need_client_timezone": { + "description": "If a timestamp format is detected that does not include a timezone, `need_client_timezone` is `true`.\nThe server that parses the text must therefore be told the correct timezone by the client.", + "type": "boolean" + }, + "num_lines_analyzed": { + "description": "The number of lines of the text that were analyzed.", + "type": "number" + }, + "column_names": { + "description": "If `format` is `delimited`, the `column_names` field lists the column names in the order they appear in the sample.", + "type": "array", + "items": { + "type": "string" + } + }, + "explanation": { + "type": "array", + "items": { + "type": "string" + } + }, + "grok_pattern": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GrokPattern" + } + ] + }, + "multiline_start_pattern": { + "type": "string" + }, + "exclude_lines_pattern": { + "type": "string" + }, + "java_timestamp_formats": { + "description": "The Java time formats recognized in the time fields.\nElasticsearch mappings and ingest pipelines use this format.", + "type": "array", + "items": { + "type": "string" + } + }, + "joda_timestamp_formats": { + "description": "Information that is used to tell Logstash how to parse timestamps.", + "type": "array", + "items": { + "type": "string" + } + }, + "timestamp_field": { + "description": "The field considered most likely to be the primary timestamp of each document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "should_trim_fields": { + "type": "boolean" + }, + "ingest_pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.PipelineConfig" + } + ] + } + }, + "required": [ + "charset", + "has_byte_order_marker", + "format", + "field_stats", + "sample_start", + "num_messages_analyzed", + "mappings", + "need_client_timezone", + "num_lines_analyzed", + "ingest_pipeline" + ] + }, + "examples": { + "FindStructureResponseExample1": { + "description": "A successful response from `POST _text_structure/find_structure`.", + "value": "{\n \"num_lines_analyzed\" : 24,\n \"num_messages_analyzed\" : 24,\n \"sample_start\" : \"{\\\"name\\\": \\\"Leviathan Wakes\\\", \\\"author\\\": \\\"James S.A. Corey\\\", \\\"release_date\\\": \\\"2011-06-02\\\", \\\"page_count\\\": 561}\\n{\\\"name\\\": \\\"Hyperion\\\", \\\"author\\\": \\\"Dan Simmons\\\", \\\"release_date\\\": \\\"1989-05-26\\\", \\\"page_count\\\": 482}\\n\",\n \"charset\" : \"UTF-8\",\n \"has_byte_order_marker\" : false,\n \"format\" : \"ndjson\",\n \"ecs_compatibility\" : \"disabled\",\n \"timestamp_field\" : \"release_date\",\n \"joda_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true,\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"author\" : {\n \"type\" : \"keyword\"\n },\n \"name\" : {\n \"type\" : \"keyword\"\n },\n \"page_count\" : {\n \"type\" : \"long\"\n },\n \"release_date\" : {\n \"type\" : \"date\",\n \"format\" : \"iso8601\"\n }\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by text structure finder\",\n \"processors\" : [\n {\n \"date\" : {\n \"field\" : \"release_date\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n }\n ]\n },\n \"field_stats\" : {\n \"author\" : {\n \"count\" : 24,\n \"cardinality\" : 20,\n \"top_hits\" : [\n {\n \"value\" : \"Frank Herbert\",\n \"count\" : 4\n },\n {\n \"value\" : \"Robert A. Heinlein\",\n \"count\" : 2\n },\n {\n \"value\" : \"Alastair Reynolds\",\n \"count\" : 1\n },\n {\n \"value\" : \"Aldous Huxley\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dan Simmons\",\n \"count\" : 1\n },\n {\n \"value\" : \"Douglas Adams\",\n \"count\" : 1\n },\n {\n \"value\" : \"George Orwell\",\n \"count\" : 1\n },\n {\n \"value\" : \"Iain M. Banks\",\n \"count\" : 1\n },\n {\n \"value\" : \"Isaac Asimov\",\n \"count\" : 1\n },\n {\n \"value\" : \"James S.A. Corey\",\n \"count\" : 1\n }\n ]\n },\n \"name\" : {\n \"count\" : 24,\n \"cardinality\" : 24,\n \"top_hits\" : [\n {\n \"value\" : \"1984\",\n \"count\" : 1\n },\n {\n \"value\" : \"A Fire Upon the Deep\",\n \"count\" : 1\n },\n {\n \"value\" : \"Brave New World\",\n \"count\" : 1\n },\n {\n \"value\" : \"Children of Dune\",\n \"count\" : 1\n },\n {\n \"value\" : \"Consider Phlebas\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dune\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dune Messiah\",\n \"count\" : 1\n },\n {\n \"value\" : \"Ender's Game\",\n \"count\" : 1\n },\n {\n \"value\" : \"Fahrenheit 451\",\n \"count\" : 1\n },\n {\n \"value\" : \"Foundation\",\n \"count\" : 1\n }\n ]\n },\n \"page_count\" : {\n \"count\" : 24,\n \"cardinality\" : 24,\n \"min_value\" : 180,\n \"max_value\" : 768,\n \"mean_value\" : 387.0833333333333,\n \"median_value\" : 329.5,\n \"top_hits\" : [\n {\n \"value\" : 180,\n \"count\" : 1\n },\n {\n \"value\" : 208,\n \"count\" : 1\n },\n {\n \"value\" : 224,\n \"count\" : 1\n },\n {\n \"value\" : 227,\n \"count\" : 1\n },\n {\n \"value\" : 268,\n \"count\" : 1\n },\n {\n \"value\" : 271,\n \"count\" : 1\n },\n {\n \"value\" : 275,\n \"count\" : 1\n },\n {\n \"value\" : 288,\n \"count\" : 1\n },\n {\n \"value\" : 304,\n \"count\" : 1\n },\n {\n \"value\" : 311,\n \"count\" : 1\n }\n ]\n },\n \"release_date\" : {\n \"count\" : 24,\n \"cardinality\" : 20,\n \"earliest\" : \"1932-06-01\",\n \"latest\" : \"2011-06-02\",\n \"top_hits\" : [\n {\n \"value\" : \"1985-06-01\",\n \"count\" : 3\n },\n {\n \"value\" : \"1969-06-01\",\n \"count\" : 2\n },\n {\n \"value\" : \"1992-06-01\",\n \"count\" : 2\n },\n {\n \"value\" : \"1932-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1951-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1953-10-15\",\n \"count\" : 1\n },\n {\n \"value\" : \"1959-12-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1965-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1966-04-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1969-10-15\",\n \"count\" : 1\n }\n ]\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.13.0", + "x-variations": [ + "
\n POST\n /_text_structure/find_structure\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_text_structure`\n" + ], + "x-api": "find_structure.text_structure", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_text_structure/test_grok_pattern": { + "get": { + "tags": [ + "text_structure" + ], + "summary": "Test a Grok pattern", + "description": "Test a Grok pattern on one or more lines of text.\nThe API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/scripting/grok", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/test-grok-pattern.html" + }, + "operationId": "text-structure-test-grok-pattern", + "parameters": [ + { + "in": "query", + "name": "ecs_compatibility", + "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nValid values are `disabled` and `v1`.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "grok_pattern": { + "description": "The Grok pattern to run on the text.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GrokPattern" + } + ] + }, + "text": { + "description": "The lines of text to run the Grok pattern on.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "grok_pattern", + "text" + ] + }, + "examples": { + "TestGrokPatternRequestExample1": { + "description": "Run `GET _text_structure/test_grok_pattern` to test a Grok pattern.", + "value": "{\n \"grok_pattern\": \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\": [\n \"Hello John Doe\",\n \"this does not match\"\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "matches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/text_structure.test_grok_pattern.MatchedText" + } + } + }, + "required": [ + "matches" + ] + }, + "examples": { + "TestGrokPatternResponseExample1": { + "description": "A successful response from `GET _text_structure/test_grok_pattern`.", + "value": "{\n \"matches\": [\n {\n \"matched\": true,\n \"fields\": {\n \"first_name\": [\n {\n \"match\": \"John\",\n \"offset\": 6,\n \"length\": 4\n }\n ],\n \"last_name\": [\n {\n \"match\": \"Doe\",\n \"offset\": 11,\n \"length\": 3\n }\n ]\n }\n },\n {\n \"matched\": false\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n GET\n /_text_structure/test_grok_pattern\n
\n ", + "
\n POST\n /_text_structure/test_grok_pattern\n
\n " + ], + "x-api": "test_grok_pattern.text_structure", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "text_structure" + ], + "summary": "Test a Grok pattern", + "description": "Test a Grok pattern on one or more lines of text.\nThe API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/scripting/grok", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/test-grok-pattern.html" + }, + "operationId": "text-structure-test-grok-pattern-1", + "parameters": [ + { + "in": "query", + "name": "ecs_compatibility", + "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nValid values are `disabled` and `v1`.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "grok_pattern": { + "description": "The Grok pattern to run on the text.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GrokPattern" + } + ] + }, + "text": { + "description": "The lines of text to run the Grok pattern on.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "grok_pattern", + "text" + ] + }, + "examples": { + "TestGrokPatternRequestExample1": { + "description": "Run `GET _text_structure/test_grok_pattern` to test a Grok pattern.", + "value": "{\n \"grok_pattern\": \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\": [\n \"Hello John Doe\",\n \"this does not match\"\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "matches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/text_structure.test_grok_pattern.MatchedText" + } + } + }, + "required": [ + "matches" + ] + }, + "examples": { + "TestGrokPatternResponseExample1": { + "description": "A successful response from `GET _text_structure/test_grok_pattern`.", + "value": "{\n \"matches\": [\n {\n \"matched\": true,\n \"fields\": {\n \"first_name\": [\n {\n \"match\": \"John\",\n \"offset\": 6,\n \"length\": 4\n }\n ],\n \"last_name\": [\n {\n \"match\": \"Doe\",\n \"offset\": 11,\n \"length\": 3\n }\n ]\n }\n },\n {\n \"matched\": false\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.13.0", + "x-variations": [ + "
\n GET\n /_text_structure/test_grok_pattern\n
\n ", + "
\n POST\n /_text_structure/test_grok_pattern\n
\n " + ], + "x-api": "test_grok_pattern.text_structure", + "x-category": "ai/ml", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/{transform_id}": { + "get": { + "tags": [ + "transform" + ], + "summary": "Get transforms", + "description": "Get configuration information for transforms.", + "operationId": "transform-get-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform. It can be a transform identifier or a\nwildcard expression. You can get information for all transforms by using\n`_all`, by specifying `*` as the ``, or by omitting the\n``.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no transforms that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf this parameter is false, the request returns a 404 status code when\nthere are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "Skips the specified number of transforms.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of transforms to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "exclude_generated", + "description": "Excludes fields that were automatically added when creating the\ntransform. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "transforms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/transform.get_transform.TransformSummary" + } + } + }, + "required": [ + "count", + "transforms" + ] + }, + "examples": { + "GetTransformResponseExample1": { + "description": "A successful response that contains configuration information for a transform.", + "value": "{\n \"count\": 1,\n \"transforms\": [\n {\n \"id\": \"ecommerce_transform1\",\n \"authorization\": {\n \"roles\": [\n \"superuser\"\n ]\n },\n \"version\": \"8.4.0\",\n \"create_time\": 1656023416565,\n \"source\": {\n \"index\": [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"settings\": {},\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n GET\n /_transform/{transform_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_transform`\n" + ], + "x-api": "get_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "transform" + ], + "summary": "Create a transform", + "description": "Creates a transform.\n\nA transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as\na data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a\nunique row per entity.\n\nYou must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If\nyou choose to use the pivot method for your transform, the entities are defined by the set of `group_by` fields in\nthe pivot object. If you choose to use the latest method, the entities are defined by the `unique_key` field values\nin the latest object.\n\nYou must have `create_index`, `index`, and `read` privileges on the destination index and `read` and\n`view_index_metadata` privileges on the source indices. When Elasticsearch security features are enabled, the\ntransform remembers which roles the user that created it had at the time of creation and uses those same roles. If\nthose roles do not have the required privileges on the source and destination indices, the transform fails when it\nattempts unauthorized operations.\n\nNOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any\n`.transform-internal*` indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do\nnot give users any privileges on `.transform-internal*` indices. If you used transforms prior to 7.5, also do not\ngive users any privileges on `.data-frame-internal*` indices.", + "operationId": "transform-put-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),\nhyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "defer_validation", + "description": "When the transform is created, a series of validations occur to ensure its success. For example, there is a\ncheck for the existence of the source indices and a check that the destination index is not part of the source\nindex pattern. You can use this parameter to skip the checks, for example when the source index does not exist\nuntil after the transform is created. The validations are always run when you start the transform, however, with\nthe exception of privilege checks.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dest": { + "description": "The destination for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Destination" + } + ] + }, + "description": { + "description": "Free text description of the transform.", + "type": "string" + }, + "frequency": { + "description": "The interval between checks for changes in the source indices when the transform is running continuously. Also\ndetermines the retry interval in the event of transient failures while the transform is searching or indexing.\nThe minimum value is `1s` and the maximum is `1h`.", + "default": "1m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "latest": { + "description": "The latest method transforms the data by finding the latest document for each unique key.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Latest" + } + ] + }, + "_meta": { + "description": "Defines optional transform metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "pivot": { + "description": "The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields\nand the aggregation to reduce the data.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Pivot" + } + ] + }, + "retention_policy": { + "description": "Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the\ndestination index.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + } + ] + }, + "settings": { + "description": "Defines optional transform settings.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Settings" + } + ] + }, + "source": { + "description": "The source of the data for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Source" + } + ] + }, + "sync": { + "description": "Defines the properties transforms require to run continuously.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.SyncContainer" + } + ] + } + }, + "required": [ + "dest", + "source" + ] + }, + "examples": { + "PutTransformRequestExample1": { + "summary": "A pivot transform", + "description": "Run `PUT _transform/ecommerce_transform1` to create a transform that uses the pivot method.", + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" + }, + "PutTransformRequestExample2": { + "summary": "A latest transform", + "description": "Run `PUT _transform/ecommerce_transform2` to create a transform that uses the latest method.", + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"latest\": {\n \"unique_key\": [\n \"customer_id\"\n ],\n \"sort\": \"order_date\"\n },\n \"description\": \"Latest order for each customer\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform2\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "PutTransformResponseExample1": { + "description": "A successful response when creating a transform.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.2.0", + "x-variations": [ + "
\n PUT\n /_transform/{transform_id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `create_index`,`read`,`index`,`view_index_metadata`\n", + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "put_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "transform" + ], + "summary": "Delete a transform", + "operationId": "transform-delete-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "force", + "description": "If this value is false, the transform must be stopped before it can be deleted. If true, the transform is\ndeleted regardless of its current state.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "delete_dest_index", + "description": "If this value is true, the destination index is deleted together with the transform. If false, the destination\nindex will not be deleted", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "DeleteTransformResponseExample1": { + "description": "A successful response when the transform is deleted.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n DELETE\n /_transform/{transform_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "delete_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/_node_stats": { + "get": { + "tags": [ + "transform" + ], + "summary": "Get node stats", + "description": "Get per-node information about transform usage.", + "operationId": "transform-get-node-stats", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transform.get_node_stats.TransformNodeFullStats" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.15.0", + "x-variations": [ + "
\n GET\n /_transform/_node_stats\n
\n " + ], + "x-api": "get_node_stats.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform": { + "get": { + "tags": [ + "transform" + ], + "summary": "Get transforms", + "description": "Get configuration information for transforms.", + "operationId": "transform-get-transform-1", + "parameters": [ + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no transforms that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf this parameter is false, the request returns a 404 status code when\nthere are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "Skips the specified number of transforms.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of transforms to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "exclude_generated", + "description": "Excludes fields that were automatically added when creating the\ntransform. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "transforms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/transform.get_transform.TransformSummary" + } + } + }, + "required": [ + "count", + "transforms" + ] + }, + "examples": { + "GetTransformResponseExample1": { + "description": "A successful response that contains configuration information for a transform.", + "value": "{\n \"count\": 1,\n \"transforms\": [\n {\n \"id\": \"ecommerce_transform1\",\n \"authorization\": {\n \"roles\": [\n \"superuser\"\n ]\n },\n \"version\": \"8.4.0\",\n \"create_time\": 1656023416565,\n \"source\": {\n \"index\": [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"settings\": {},\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n GET\n /_transform\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_transform`\n" + ], + "x-api": "get_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/{transform_id}/_stats": { + "get": { + "tags": [ + "transform" + ], + "summary": "Get transform stats", + "description": "Get usage information for transforms.", + "operationId": "transform-get-transform-stats", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform. It can be a transform identifier or a\nwildcard expression. You can get information for all transforms by using\n`_all`, by specifying `*` as the ``, or by omitting the\n``.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no transforms that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf this parameter is false, the request returns a 404 status code when\nthere are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "Skips the specified number of transforms.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Specifies the maximum number of transforms to obtain.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Controls the time to wait for the stats", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "transforms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/transform.get_transform_stats.TransformStats" + } + } + }, + "required": [ + "count", + "transforms" + ] + }, + "examples": { + "GetTransformStatsResponseExample1": { + "description": "A successful response that contains usage information for a transform.", + "value": "{\n \"count\": 1,\n \"transforms\": [\n {\n \"id\": \"ecommerce-customer-transform\",\n \"state\": \"started\",\n \"node\": {\n \"id\": \"cpTIGMsVQ8Gqwqlxxxxxxx\",\n \"name\": \"my.home\",\n \"ephemeral_id\": \"5-L21nFsQxxxxxxxxxx-xx\",\n \"transport_address\": \"127.0.0.1:9300\",\n \"attributes\": {}\n },\n \"stats\": {\n \"pages_processed\": 78,\n \"documents_processed\": 6027,\n \"documents_indexed\": 68,\n \"documents_deleted\": 22,\n \"delete_time_in_ms\": 214,\n \"trigger_count\": 168,\n \"index_time_in_ms\": 412,\n \"index_total\": 20,\n \"index_failures\": 0,\n \"search_time_in_ms\": 353,\n \"search_total\": 78,\n \"search_failures\": 0,\n \"processing_time_in_ms\": 8,\n \"processing_total\": 78,\n \"exponential_avg_checkpoint_duration_ms\": 97.30637923893185,\n \"exponential_avg_documents_indexed\": 2.2064915040974062,\n \"exponential_avg_documents_processed\": 179.89419945785045\n },\n \"checkpointing\": {\n \"last\": {\n \"checkpoint\": 20,\n \"timestamp_millis\": 1585344558220,\n \"time_upper_bound_millis\": 1585344498220\n },\n \"changes_last_detected_at\": 1585344558219\n },\n \"health\": {\n \"status\": \"green\"\n }\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n GET\n /_transform/{transform_id}/_stats\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`view_index_metadata`\n", + "Cluster privileges: `monitor_transform`\n" + ], + "x-api": "get_transform_stats.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/{transform_id}/_preview": { + "get": { + "tags": [ + "transform" + ], + "summary": "Preview a transform", + "description": "Generates a preview of the results that you will get when you create a transform with the same configuration.\n\nIt returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also\ngenerates a list of mappings and settings for the destination index. These values are determined based on the field\ntypes of the source index and the transform aggregations.", + "operationId": "transform-preview-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform\nconfiguration details in the request body.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the\ntimeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dest": { + "description": "The destination for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Destination" + } + ] + }, + "description": { + "description": "Free text description of the transform.", + "type": "string" + }, + "frequency": { + "description": "The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is 1s and the maximum is 1h.", + "default": "1m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "pivot": { + "description": "The pivot method transforms the data by aggregating and grouping it.\nThese objects define the group by fields and the aggregation to reduce\nthe data.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Pivot" + } + ] + }, + "source": { + "description": "The source of the data for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Source" + } + ] + }, + "settings": { + "description": "Defines optional transform settings.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Settings" + } + ] + }, + "sync": { + "description": "Defines the properties transforms require to run continuously.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.SyncContainer" + } + ] + }, + "retention_policy": { + "description": "Defines a retention policy for the transform. Data that meets the defined\ncriteria is deleted from the destination index.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + } + ] + }, + "latest": { + "description": "The latest method transforms the data by finding the latest document for\neach unique key.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Latest" + } + ] + } + } + }, + "examples": { + "PreviewTransformRequestExample1": { + "description": "Run `POST _transform/_preview` to preview a transform that uses the pivot method.", + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "generated_dest_index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexState" + } + ] + }, + "preview": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "generated_dest_index", + "preview" + ] + }, + "examples": { + "PreviewTransformResponseExample1": { + "description": "An abbreviated response from `POST _transform/_preview` that contains a preview a transform that uses the pivot method.", + "value": "{\n \"preview\": [\n {\n \"max_price\": 171,\n \"customer_id\": \"10\"\n },\n {\n \"max_price\": 233,\n \"customer_id\": \"11\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"12\"\n },\n {\n \"max_price\": 301,\n \"customer_id\": \"13\"\n },\n {\n \"max_price\": 176,\n \"customer_id\": \"14\"\n },\n {\n \"max_price\": 2250,\n \"customer_id\": \"15\"\n },\n {\n \"max_price\": 170,\n \"customer_id\": \"16\"\n },\n {\n \"max_price\": 243,\n \"customer_id\": \"17\"\n },\n {\n \"max_price\": 154,\n \"customer_id\": \"18\"\n },\n {\n \"max_price\": 393,\n \"customer_id\": \"19\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"20\"\n },\n {\n \"max_price\": 115,\n \"customer_id\": \"21\"\n },\n {\n \"max_price\": 192,\n \"customer_id\": \"22\"\n },\n {\n \"max_price\": 169,\n \"customer_id\": \"23\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"24\"\n },\n {\n \"max_price\": 278,\n \"customer_id\": \"25\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"26\"\n },\n {\n \"max_price\": 344,\n \"customer_id\": \"27\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"28\"\n },\n {\n \"max_price\": 177,\n \"customer_id\": \"29\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"30\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"31\"\n },\n {\n \"max_price\": 205,\n \"customer_id\": \"32\"\n },\n {\n \"max_price\": 215,\n \"customer_id\": \"33\"\n },\n {\n \"max_price\": 270,\n \"customer_id\": \"34\"\n },\n {\n \"max_price\": 184,\n \"customer_id\": \"36\"\n },\n {\n \"max_price\": 222,\n \"customer_id\": \"37\"\n },\n {\n \"max_price\": 370,\n \"customer_id\": \"38\"\n },\n {\n \"max_price\": 240,\n \"customer_id\": \"39\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"4\"\n },\n {\n \"max_price\": 229,\n \"customer_id\": \"41\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"42\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"43\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"44\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"45\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"46\"\n },\n {\n \"max_price\": 310,\n \"customer_id\": \"48\"\n },\n {\n \"max_price\": 223,\n \"customer_id\": \"49\"\n },\n {\n \"max_price\": 283,\n \"customer_id\": \"5\"\n },\n {\n \"max_price\": 185,\n \"customer_id\": \"50\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"51\"\n },\n {\n \"max_price\": 333,\n \"customer_id\": \"52\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"6\"\n },\n {\n \"max_price\": 144,\n \"customer_id\": \"7\"\n },\n {\n \"max_price\": 198,\n \"customer_id\": \"8\"\n },\n {\n \"max_price\": 210,\n \"customer_id\": \"9\"\n }\n ],\n \"generated_dest_index\": {\n \"mappings\": {\n \"_meta\": {\n \"_transform\": {\n \"transform\": \"transform-preview\",\n \"version\": {\n \"created\": \"10.0.0\"\n },\n \"creation_date_in_millis\": 1712948905889\n },\n \"created_by\": \"transform\"\n },\n \"properties\": {\n \"max_price\": {\n \"type\": \"half_float\"\n },\n \"customer_id\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"number_of_shards\": \"1\",\n \"auto_expand_replicas\": \"0-1\"\n }\n },\n \"aliases\": {}\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.2.0", + "x-variations": [ + "
\n GET\n /_transform/{transform_id}/_preview\n
\n ", + "
\n POST\n /_transform/{transform_id}/_preview\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`view_index_metadata`\n", + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "preview_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "transform" + ], + "summary": "Preview a transform", + "description": "Generates a preview of the results that you will get when you create a transform with the same configuration.\n\nIt returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also\ngenerates a list of mappings and settings for the destination index. These values are determined based on the field\ntypes of the source index and the transform aggregations.", + "operationId": "transform-preview-transform-1", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform\nconfiguration details in the request body.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the\ntimeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dest": { + "description": "The destination for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Destination" + } + ] + }, + "description": { + "description": "Free text description of the transform.", + "type": "string" + }, + "frequency": { + "description": "The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is 1s and the maximum is 1h.", + "default": "1m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "pivot": { + "description": "The pivot method transforms the data by aggregating and grouping it.\nThese objects define the group by fields and the aggregation to reduce\nthe data.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Pivot" + } + ] + }, + "source": { + "description": "The source of the data for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Source" + } + ] + }, + "settings": { + "description": "Defines optional transform settings.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Settings" + } + ] + }, + "sync": { + "description": "Defines the properties transforms require to run continuously.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.SyncContainer" + } + ] + }, + "retention_policy": { + "description": "Defines a retention policy for the transform. Data that meets the defined\ncriteria is deleted from the destination index.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + } + ] + }, + "latest": { + "description": "The latest method transforms the data by finding the latest document for\neach unique key.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Latest" + } + ] + } + } + }, + "examples": { + "PreviewTransformRequestExample1": { + "description": "Run `POST _transform/_preview` to preview a transform that uses the pivot method.", + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "generated_dest_index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexState" + } + ] + }, + "preview": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "generated_dest_index", + "preview" + ] + }, + "examples": { + "PreviewTransformResponseExample1": { + "description": "An abbreviated response from `POST _transform/_preview` that contains a preview a transform that uses the pivot method.", + "value": "{\n \"preview\": [\n {\n \"max_price\": 171,\n \"customer_id\": \"10\"\n },\n {\n \"max_price\": 233,\n \"customer_id\": \"11\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"12\"\n },\n {\n \"max_price\": 301,\n \"customer_id\": \"13\"\n },\n {\n \"max_price\": 176,\n \"customer_id\": \"14\"\n },\n {\n \"max_price\": 2250,\n \"customer_id\": \"15\"\n },\n {\n \"max_price\": 170,\n \"customer_id\": \"16\"\n },\n {\n \"max_price\": 243,\n \"customer_id\": \"17\"\n },\n {\n \"max_price\": 154,\n \"customer_id\": \"18\"\n },\n {\n \"max_price\": 393,\n \"customer_id\": \"19\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"20\"\n },\n {\n \"max_price\": 115,\n \"customer_id\": \"21\"\n },\n {\n \"max_price\": 192,\n \"customer_id\": \"22\"\n },\n {\n \"max_price\": 169,\n \"customer_id\": \"23\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"24\"\n },\n {\n \"max_price\": 278,\n \"customer_id\": \"25\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"26\"\n },\n {\n \"max_price\": 344,\n \"customer_id\": \"27\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"28\"\n },\n {\n \"max_price\": 177,\n \"customer_id\": \"29\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"30\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"31\"\n },\n {\n \"max_price\": 205,\n \"customer_id\": \"32\"\n },\n {\n \"max_price\": 215,\n \"customer_id\": \"33\"\n },\n {\n \"max_price\": 270,\n \"customer_id\": \"34\"\n },\n {\n \"max_price\": 184,\n \"customer_id\": \"36\"\n },\n {\n \"max_price\": 222,\n \"customer_id\": \"37\"\n },\n {\n \"max_price\": 370,\n \"customer_id\": \"38\"\n },\n {\n \"max_price\": 240,\n \"customer_id\": \"39\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"4\"\n },\n {\n \"max_price\": 229,\n \"customer_id\": \"41\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"42\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"43\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"44\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"45\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"46\"\n },\n {\n \"max_price\": 310,\n \"customer_id\": \"48\"\n },\n {\n \"max_price\": 223,\n \"customer_id\": \"49\"\n },\n {\n \"max_price\": 283,\n \"customer_id\": \"5\"\n },\n {\n \"max_price\": 185,\n \"customer_id\": \"50\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"51\"\n },\n {\n \"max_price\": 333,\n \"customer_id\": \"52\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"6\"\n },\n {\n \"max_price\": 144,\n \"customer_id\": \"7\"\n },\n {\n \"max_price\": 198,\n \"customer_id\": \"8\"\n },\n {\n \"max_price\": 210,\n \"customer_id\": \"9\"\n }\n ],\n \"generated_dest_index\": {\n \"mappings\": {\n \"_meta\": {\n \"_transform\": {\n \"transform\": \"transform-preview\",\n \"version\": {\n \"created\": \"10.0.0\"\n },\n \"creation_date_in_millis\": 1712948905889\n },\n \"created_by\": \"transform\"\n },\n \"properties\": {\n \"max_price\": {\n \"type\": \"half_float\"\n },\n \"customer_id\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"number_of_shards\": \"1\",\n \"auto_expand_replicas\": \"0-1\"\n }\n },\n \"aliases\": {}\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.2.0", + "x-variations": [ + "
\n GET\n /_transform/{transform_id}/_preview\n
\n ", + "
\n POST\n /_transform/{transform_id}/_preview\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`view_index_metadata`\n", + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "preview_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/_preview": { + "get": { + "tags": [ + "transform" + ], + "summary": "Preview a transform", + "description": "Generates a preview of the results that you will get when you create a transform with the same configuration.\n\nIt returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also\ngenerates a list of mappings and settings for the destination index. These values are determined based on the field\ntypes of the source index and the transform aggregations.", + "operationId": "transform-preview-transform-2", + "parameters": [ + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the\ntimeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dest": { + "description": "The destination for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Destination" + } + ] + }, + "description": { + "description": "Free text description of the transform.", + "type": "string" + }, + "frequency": { + "description": "The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is 1s and the maximum is 1h.", + "default": "1m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "pivot": { + "description": "The pivot method transforms the data by aggregating and grouping it.\nThese objects define the group by fields and the aggregation to reduce\nthe data.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Pivot" + } + ] + }, + "source": { + "description": "The source of the data for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Source" + } + ] + }, + "settings": { + "description": "Defines optional transform settings.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Settings" + } + ] + }, + "sync": { + "description": "Defines the properties transforms require to run continuously.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.SyncContainer" + } + ] + }, + "retention_policy": { + "description": "Defines a retention policy for the transform. Data that meets the defined\ncriteria is deleted from the destination index.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + } + ] + }, + "latest": { + "description": "The latest method transforms the data by finding the latest document for\neach unique key.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Latest" + } + ] + } + } + }, + "examples": { + "PreviewTransformRequestExample1": { + "description": "Run `POST _transform/_preview` to preview a transform that uses the pivot method.", + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "generated_dest_index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexState" + } + ] + }, + "preview": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "generated_dest_index", + "preview" + ] + }, + "examples": { + "PreviewTransformResponseExample1": { + "description": "An abbreviated response from `POST _transform/_preview` that contains a preview a transform that uses the pivot method.", + "value": "{\n \"preview\": [\n {\n \"max_price\": 171,\n \"customer_id\": \"10\"\n },\n {\n \"max_price\": 233,\n \"customer_id\": \"11\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"12\"\n },\n {\n \"max_price\": 301,\n \"customer_id\": \"13\"\n },\n {\n \"max_price\": 176,\n \"customer_id\": \"14\"\n },\n {\n \"max_price\": 2250,\n \"customer_id\": \"15\"\n },\n {\n \"max_price\": 170,\n \"customer_id\": \"16\"\n },\n {\n \"max_price\": 243,\n \"customer_id\": \"17\"\n },\n {\n \"max_price\": 154,\n \"customer_id\": \"18\"\n },\n {\n \"max_price\": 393,\n \"customer_id\": \"19\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"20\"\n },\n {\n \"max_price\": 115,\n \"customer_id\": \"21\"\n },\n {\n \"max_price\": 192,\n \"customer_id\": \"22\"\n },\n {\n \"max_price\": 169,\n \"customer_id\": \"23\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"24\"\n },\n {\n \"max_price\": 278,\n \"customer_id\": \"25\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"26\"\n },\n {\n \"max_price\": 344,\n \"customer_id\": \"27\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"28\"\n },\n {\n \"max_price\": 177,\n \"customer_id\": \"29\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"30\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"31\"\n },\n {\n \"max_price\": 205,\n \"customer_id\": \"32\"\n },\n {\n \"max_price\": 215,\n \"customer_id\": \"33\"\n },\n {\n \"max_price\": 270,\n \"customer_id\": \"34\"\n },\n {\n \"max_price\": 184,\n \"customer_id\": \"36\"\n },\n {\n \"max_price\": 222,\n \"customer_id\": \"37\"\n },\n {\n \"max_price\": 370,\n \"customer_id\": \"38\"\n },\n {\n \"max_price\": 240,\n \"customer_id\": \"39\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"4\"\n },\n {\n \"max_price\": 229,\n \"customer_id\": \"41\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"42\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"43\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"44\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"45\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"46\"\n },\n {\n \"max_price\": 310,\n \"customer_id\": \"48\"\n },\n {\n \"max_price\": 223,\n \"customer_id\": \"49\"\n },\n {\n \"max_price\": 283,\n \"customer_id\": \"5\"\n },\n {\n \"max_price\": 185,\n \"customer_id\": \"50\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"51\"\n },\n {\n \"max_price\": 333,\n \"customer_id\": \"52\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"6\"\n },\n {\n \"max_price\": 144,\n \"customer_id\": \"7\"\n },\n {\n \"max_price\": 198,\n \"customer_id\": \"8\"\n },\n {\n \"max_price\": 210,\n \"customer_id\": \"9\"\n }\n ],\n \"generated_dest_index\": {\n \"mappings\": {\n \"_meta\": {\n \"_transform\": {\n \"transform\": \"transform-preview\",\n \"version\": {\n \"created\": \"10.0.0\"\n },\n \"creation_date_in_millis\": 1712948905889\n },\n \"created_by\": \"transform\"\n },\n \"properties\": {\n \"max_price\": {\n \"type\": \"half_float\"\n },\n \"customer_id\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"number_of_shards\": \"1\",\n \"auto_expand_replicas\": \"0-1\"\n }\n },\n \"aliases\": {}\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.2.0", + "x-variations": [ + "
\n GET\n /_transform/_preview\n
\n ", + "
\n POST\n /_transform/_preview\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`view_index_metadata`\n", + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "preview_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "transform" + ], + "summary": "Preview a transform", + "description": "Generates a preview of the results that you will get when you create a transform with the same configuration.\n\nIt returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also\ngenerates a list of mappings and settings for the destination index. These values are determined based on the field\ntypes of the source index and the transform aggregations.", + "operationId": "transform-preview-transform-3", + "parameters": [ + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the\ntimeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dest": { + "description": "The destination for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Destination" + } + ] + }, + "description": { + "description": "Free text description of the transform.", + "type": "string" + }, + "frequency": { + "description": "The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is 1s and the maximum is 1h.", + "default": "1m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "pivot": { + "description": "The pivot method transforms the data by aggregating and grouping it.\nThese objects define the group by fields and the aggregation to reduce\nthe data.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Pivot" + } + ] + }, + "source": { + "description": "The source of the data for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Source" + } + ] + }, + "settings": { + "description": "Defines optional transform settings.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Settings" + } + ] + }, + "sync": { + "description": "Defines the properties transforms require to run continuously.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.SyncContainer" + } + ] + }, + "retention_policy": { + "description": "Defines a retention policy for the transform. Data that meets the defined\ncriteria is deleted from the destination index.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + } + ] + }, + "latest": { + "description": "The latest method transforms the data by finding the latest document for\neach unique key.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Latest" + } + ] + } + } + }, + "examples": { + "PreviewTransformRequestExample1": { + "description": "Run `POST _transform/_preview` to preview a transform that uses the pivot method.", + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "generated_dest_index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexState" + } + ] + }, + "preview": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "generated_dest_index", + "preview" + ] + }, + "examples": { + "PreviewTransformResponseExample1": { + "description": "An abbreviated response from `POST _transform/_preview` that contains a preview a transform that uses the pivot method.", + "value": "{\n \"preview\": [\n {\n \"max_price\": 171,\n \"customer_id\": \"10\"\n },\n {\n \"max_price\": 233,\n \"customer_id\": \"11\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"12\"\n },\n {\n \"max_price\": 301,\n \"customer_id\": \"13\"\n },\n {\n \"max_price\": 176,\n \"customer_id\": \"14\"\n },\n {\n \"max_price\": 2250,\n \"customer_id\": \"15\"\n },\n {\n \"max_price\": 170,\n \"customer_id\": \"16\"\n },\n {\n \"max_price\": 243,\n \"customer_id\": \"17\"\n },\n {\n \"max_price\": 154,\n \"customer_id\": \"18\"\n },\n {\n \"max_price\": 393,\n \"customer_id\": \"19\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"20\"\n },\n {\n \"max_price\": 115,\n \"customer_id\": \"21\"\n },\n {\n \"max_price\": 192,\n \"customer_id\": \"22\"\n },\n {\n \"max_price\": 169,\n \"customer_id\": \"23\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"24\"\n },\n {\n \"max_price\": 278,\n \"customer_id\": \"25\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"26\"\n },\n {\n \"max_price\": 344,\n \"customer_id\": \"27\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"28\"\n },\n {\n \"max_price\": 177,\n \"customer_id\": \"29\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"30\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"31\"\n },\n {\n \"max_price\": 205,\n \"customer_id\": \"32\"\n },\n {\n \"max_price\": 215,\n \"customer_id\": \"33\"\n },\n {\n \"max_price\": 270,\n \"customer_id\": \"34\"\n },\n {\n \"max_price\": 184,\n \"customer_id\": \"36\"\n },\n {\n \"max_price\": 222,\n \"customer_id\": \"37\"\n },\n {\n \"max_price\": 370,\n \"customer_id\": \"38\"\n },\n {\n \"max_price\": 240,\n \"customer_id\": \"39\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"4\"\n },\n {\n \"max_price\": 229,\n \"customer_id\": \"41\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"42\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"43\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"44\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"45\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"46\"\n },\n {\n \"max_price\": 310,\n \"customer_id\": \"48\"\n },\n {\n \"max_price\": 223,\n \"customer_id\": \"49\"\n },\n {\n \"max_price\": 283,\n \"customer_id\": \"5\"\n },\n {\n \"max_price\": 185,\n \"customer_id\": \"50\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"51\"\n },\n {\n \"max_price\": 333,\n \"customer_id\": \"52\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"6\"\n },\n {\n \"max_price\": 144,\n \"customer_id\": \"7\"\n },\n {\n \"max_price\": 198,\n \"customer_id\": \"8\"\n },\n {\n \"max_price\": 210,\n \"customer_id\": \"9\"\n }\n ],\n \"generated_dest_index\": {\n \"mappings\": {\n \"_meta\": {\n \"_transform\": {\n \"transform\": \"transform-preview\",\n \"version\": {\n \"created\": \"10.0.0\"\n },\n \"creation_date_in_millis\": 1712948905889\n },\n \"created_by\": \"transform\"\n },\n \"properties\": {\n \"max_price\": {\n \"type\": \"half_float\"\n },\n \"customer_id\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"number_of_shards\": \"1\",\n \"auto_expand_replicas\": \"0-1\"\n }\n },\n \"aliases\": {}\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.2.0", + "x-variations": [ + "
\n GET\n /_transform/_preview\n
\n ", + "
\n POST\n /_transform/_preview\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`view_index_metadata`\n", + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "preview_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/{transform_id}/_reset": { + "post": { + "tags": [ + "transform" + ], + "summary": "Reset a transform", + "description": "Before you can reset it, you must stop it; alternatively, use the `force` query parameter.\nIf the destination index was created by the transform, it is deleted.", + "operationId": "transform-reset-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),\nhyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "force", + "description": "If this value is `true`, the transform is reset regardless of its current state. If it's `false`, the transform\nmust be stopped before it can be reset.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "ResetTransformResponseExample1": { + "description": "A successful response when the transform is reset.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.1.0", + "x-variations": [ + "
\n POST\n /_transform/{transform_id}/_reset\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "reset_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/{transform_id}/_schedule_now": { + "post": { + "tags": [ + "transform" + ], + "summary": "Schedule a transform to start now", + "description": "Instantly run a transform to process data.\nIf you run this API, the transform will process the new data instantly,\nwithout waiting for the configured frequency interval. After the API is called,\nthe transform will be processed again at `now + frequency` unless the API\nis called again in the meantime.", + "operationId": "transform-schedule-now-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Controls the time to wait for the scheduling to take place", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "ScheduleNowTransformResponseExample1": { + "description": "A successful response when the transform is scheduled to run now.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.7.0", + "x-variations": [ + "
\n POST\n /_transform/{transform_id}/_schedule_now\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "schedule_now_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/set_upgrade_mode": { + "post": { + "tags": [ + "transform" + ], + "summary": "Set upgrade_mode for transform indices", + "description": "Sets a cluster wide upgrade_mode setting that prepares transform\nindices for an upgrade.\nWhen upgrading your cluster, in some circumstances you must restart your\nnodes and reindex your transform indices. In those circumstances,\nthere must be no transforms running. You can close the transforms,\ndo the upgrade, then open all the transforms again. Alternatively,\nyou can use this API to temporarily halt tasks associated with the transforms\nand prevent new transforms from opening. You can also use this API\nduring upgrades that do not require you to reindex your transform\nindices, though stopping transforms is not a requirement in that case.\nYou can see the current value for the upgrade_mode setting by using the get\ntransform info API.", + "operationId": "transform-set-upgrade-mode", + "parameters": [ + { + "in": "query", + "name": "enabled", + "description": "When `true`, it enables `upgrade_mode` which temporarily halts all\ntransform tasks and prohibits new transform tasks from\nstarting.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The time to wait for the request to be completed.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.18.0", + "x-variations": [ + "
\n POST\n /_transform/set_upgrade_mode\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "set_upgrade_mode.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/{transform_id}/_start": { + "post": { + "tags": [ + "transform" + ], + "summary": "Start a transform", + "description": "When you start a transform, it creates the destination index if it does not already exist. The `number_of_shards` is\nset to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform, it deduces the mapping\ndefinitions for the destination index from the source indices and the transform aggregations. If fields in the\ndestination index are derived from scripts (as in the case of `scripted_metric` or `bucket_script` aggregations),\nthe transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce\nmapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you\nstart the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings\nin a pivot transform.\n\nWhen the transform starts, a series of validations occur to ensure its success. If you deferred validation when you\ncreated the transform, they occur when you start the transform—​with the exception of privilege checks. When\nElasticsearch security features are enabled, the transform remembers which roles the user that created it had at the\ntime of creation and uses those same roles. If those roles do not have the required privileges on the source and\ndestination indices, the transform fails when it attempts unauthorized operations.", + "operationId": "transform-start-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "StartTransformResponseExample1": { + "description": "A successful response when a transform starts.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_transform/{transform_id}/_start\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`view_index_metadata`\n", + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "start_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/{transform_id}/_stop": { + "post": { + "tags": [ + "transform" + ], + "summary": "Stop transforms", + "description": "Stops one or more transforms.", + "operationId": "transform-stop-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform. To stop multiple transforms, use a comma-separated list or a wildcard expression.\nTo stop all transforms, use `_all` or `*` as the identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request: contains wildcard expressions and there are no transforms that match;\ncontains the `_all` string or no identifiers and there are no matches; contains wildcard expressions and there\nare only partial matches.\n\nIf it is true, the API returns a successful acknowledgement message when there are no matches. When there are\nonly partial matches, the API stops the appropriate transforms.\n\nIf it is false, the request returns a 404 status code when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "force", + "description": "If it is true, the API forcefully stops the transforms.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response when `wait_for_completion` is `true`. If no response is received before the\ntimeout expires, the request returns a timeout exception. However, the request continues processing and\neventually moves the transform to a STOPPED state.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_checkpoint", + "description": "If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false,\nthe transform stops as soon as possible.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns\nimmediately and the indexer is stopped asynchronously in the background.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "StopTransformResponseExample1": { + "description": "A successful response when a transform stops.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_transform/{transform_id}/_stop\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "stop_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/{transform_id}/_update": { + "post": { + "tags": [ + "transform" + ], + "summary": "Update a transform", + "description": "Updates certain properties of a transform.\n\nAll updated properties except `description` do not take effect until after the transform starts the next checkpoint,\nthus there is data consistency in each checkpoint. To use this API, you must have `read` and `view_index_metadata`\nprivileges for the source indices. You must also have `index` and `read` privileges for the destination index. When\nElasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the\ntime of update and runs with those privileges.", + "operationId": "transform-update-transform", + "parameters": [ + { + "in": "path", + "name": "transform_id", + "description": "Identifier for the transform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "defer_validation", + "description": "When true, deferrable validations are not run. This behavior may be\ndesired if the source index does not exist until after the transform is\ncreated.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the\ntimeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dest": { + "description": "The destination for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Destination" + } + ] + }, + "description": { + "description": "Free text description of the transform.", + "type": "string" + }, + "frequency": { + "description": "The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is 1s and the maximum is 1h.", + "default": "1m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "_meta": { + "description": "Defines optional transform metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "source": { + "description": "The source of the data for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Source" + } + ] + }, + "settings": { + "description": "Defines optional transform settings.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Settings" + } + ] + }, + "sync": { + "description": "Defines the properties transforms require to run continuously.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.SyncContainer" + } + ] + }, + "retention_policy": { + "description": "Defines a retention policy for the transform. Data that meets the defined\ncriteria is deleted from the destination index.", + "oneOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "examples": { + "UpdateTransformRequestExample1": { + "description": "Run `POST _transform/simple-kibana-ecomm-pivot/_update` to update a transform that uses the pivot method.", + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorization": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TransformAuthorization" + } + ] + }, + "create_time": { + "type": "number" + }, + "description": { + "type": "string" + }, + "dest": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.reindex.Destination" + } + ] + }, + "frequency": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "latest": { + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Latest" + } + ] + }, + "pivot": { + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Pivot" + } + ] + }, + "retention_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + } + ] + }, + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Settings" + } + ] + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.reindex.Source" + } + ] + }, + "sync": { + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.SyncContainer" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "_meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + } + }, + "required": [ + "create_time", + "description", + "dest", + "id", + "settings", + "source", + "version" + ] + }, + "examples": { + "UpdateTransformResponseExample1": { + "description": "A successful response when creating a transform.", + "value": "{\n \"id\": \"simple-kibana-ecomm-pivot\",\n \"authorization\": {\n \"roles\": [\n \"superuser\"\n ]\n },\n \"version\": \"10.0.0\",\n \"create_time\": 1712951576767,\n \"source\": {\n \"index\": [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"settings\": {},\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.2.0", + "x-variations": [ + "
\n POST\n /_transform/{transform_id}/_update\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`index`,`view_index_metadata`\n", + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "update_transform.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_transform/_upgrade": { + "post": { + "tags": [ + "transform" + ], + "summary": "Upgrade all transforms", + "description": "Transforms are compatible across minor versions and between supported major versions.\nHowever, over time, the format of transform configuration information may change.\nThis API identifies transforms that have a legacy configuration format and upgrades them to the latest version.\nIt also cleans up the internal data structures that store the transform state and checkpoints.\nThe upgrade does not affect the source and destination indices.\nThe upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged.\n\nIf a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue.\nResolve the issue then re-run the process again.\nA summary is returned when the upgrade is finished.\n\nTo ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster.\nYou may want to perform a recent cluster backup prior to the upgrade.", + "operationId": "transform-upgrade-transforms", + "parameters": [ + { + "in": "query", + "name": "dry_run", + "description": "When true, the request checks for updates but does not run them.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and\nreturns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "needs_update": { + "description": "The number of transforms that need to be upgraded.", + "type": "number" + }, + "no_action": { + "description": "The number of transforms that don’t require upgrading.", + "type": "number" + }, + "updated": { + "description": "The number of transforms that have been upgraded.", + "type": "number" + } + }, + "required": [ + "needs_update", + "no_action", + "updated" + ] + }, + "examples": { + "UpgradeTransformResponseExample1": { + "description": "A successful response contains a summary when all transforms are upgraded.", + "value": "{\n \"needs_update\": 0,\n \"updated\": 2,\n \"no_action\": 1\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.16.0", + "x-variations": [ + "
\n POST\n /_transform/_upgrade\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_transform`\n" + ], + "x-api": "upgrade_transforms.transform", + "x-category": "ingest", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_update/{id}": { + "post": { + "tags": [ + "document" + ], + "summary": "Update a document", + "description": "Update a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).\nFor usage examples such as partial updates, upserts, and scripted updates, see the External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-document", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-update.html" + }, + "operationId": "update", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The name of the target index.\nBy default, the index is created automatically if it doesn't exist.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "description": "A unique identifier for the document to be updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "if_primary_term", + "description": "Only perform the operation if the document has this primary term.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "if_seq_no", + "description": "Only perform the operation if the document has this sequence number.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SequenceNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_source_on_error", + "description": "True or false if to include the document source in the error message in case of parsing errors.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "lang", + "description": "The script language.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', it does nothing with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + }, + { + "in": "query", + "name": "require_alias", + "description": "If `true`, the destination must be an index alias.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "retry_on_conflict", + "description": "The number of times the operation should be retried when a conflict occurs.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for the following operations: dynamic mapping updates and waiting for active shards.\nElasticsearch waits for at least the timeout period before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of copies of each shard that must be active before proceeding with the operation.\nSet to 'all' or any positive integer up to the total number of shards in the index (`number_of_replicas`+1).\nThe default value of `1` means it waits for each primary shard to be active.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source", + "description": "If `false`, source retrieval is turned off.\nYou can also specify a comma-separated list of the fields you want to retrieve.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_excludes", + "description": "The source fields you want to exclude.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_includes", + "description": "The source fields you want to retrieve.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detect_noop": { + "description": "If `true`, the `result` in the response is set to `noop` (no operation) when there are no changes to the document.", + "default": true, + "type": "boolean" + }, + "doc": { + "description": "A partial update to an existing document.\nIf both `doc` and `script` are specified, `doc` is ignored.", + "type": "object" + }, + "doc_as_upsert": { + "description": "If `true`, use the contents of 'doc' as the value of 'upsert'.\nNOTE: Using ingest pipelines with `doc_as_upsert` is not supported.", + "default": false, + "type": "boolean" + }, + "script": { + "description": "The script to run to update the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "scripted_upsert": { + "description": "If `true`, run the script whether or not the document exists.", + "default": false, + "type": "boolean" + }, + "_source": { + "description": "If `false`, turn off source retrieval.\nYou can also specify a comma-separated list of the fields you want to retrieve.", + "default": "true", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "upsert": { + "description": "If the document does not already exist, the contents of 'upsert' are inserted as a new document.\nIf the document exists, the 'script' is run.", + "type": "object" + } + } + }, + "examples": { + "UpdateRequestExample1": { + "summary": "Update a counter with a script", + "description": "Run `POST test/_update/1` to increment a counter by using a script.", + "value": "{\n \"script\" : {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\" : {\n \"count\" : 4\n }\n }\n}" + }, + "UpdateRequestExample10": { + "summary": "Scripted upsert", + "description": "Run `POST test/_update/1` to perform a scripted upsert. When `scripted_upsert` is `true`, the script runs whether or not the document exists.\n", + "value": "{\n \"scripted_upsert\": true,\n \"script\": {\n \"source\": \"\"\"\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n \"\"\",\n \"params\": {\n \"count\": 4\n }\n },\n \"upsert\": {}\n}" + }, + "UpdateRequestExample11": { + "summary": "Doc as upsert", + "description": "Run `POST test/_update/1` to perform a doc as upsert. Instead of sending a partial `doc` plus an `upsert` doc, you can set `doc_as_upsert` to `true` to use the contents of `doc` as the `upsert` value.\n", + "value": "{\n \"doc\": {\n \"name\": \"new_name\"\n },\n \"doc_as_upsert\": true\n}" + }, + "UpdateRequestExample2": { + "summary": "Add a tag with a script", + "description": "Run `POST test/_update/1` to use a script to add a tag to a list of tags. In this example, it is just a list, so the tag is added even it exists.\n", + "value": "{\n \"script\": {\n \"source\": \"ctx._source.tags.add(params.tag)\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"blue\"\n }\n }\n}" + }, + "UpdateRequestExample3": { + "summary": "Remove a tag with a script", + "description": "Run `POST test/_update/1` to use a script to remove a tag from a list of tags. The Painless function to remove a tag takes the array index of the element you want to remove. To avoid a possible runtime error, you first need to make sure the tag exists. If the list contains duplicates of the tag, this script just removes one occurrence.\n", + "value": "{\n \"script\": {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"blue\"\n }\n }\n}" + }, + "UpdateRequestExample4": { + "summary": "Add fields with a script", + "description": "Run `POST test/_update/1` to use a script to add a field `new_field` to the document.\n", + "value": "{\n \"script\" : \"ctx._source.new_field = 'value_of_new_field'\"\n}" + }, + "UpdateRequestExample5": { + "summary": "Remove fields with a script", + "description": "Run `POST test/_update/1` to use a script to remove a field `new_field` from the document.\n", + "value": "{\n \"script\" : \"ctx._source.remove('new_field')\"\n}" + }, + "UpdateRequestExample6": { + "summary": "Remove subfields with a script", + "description": "Run `POST test/_update/1` to use a script to remove a subfield from an object field.\n", + "value": "{\n \"script\": \"ctx._source['my-object'].remove('my-subfield')\"\n}" + }, + "UpdateRequestExample7": { + "summary": "Change the operation with a script", + "description": "Run `POST test/_update/1` to change the operation that runs from within the script. For example, this request deletes the document if the `tags` field contains `green`, otherwise it does nothing (`noop`).\n", + "value": "{\n \"script\": {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"green\"\n }\n }\n}" + }, + "UpdateRequestExample8": { + "summary": "Update part of a document", + "description": "Run `POST test/_update/1` to do a partial update that adds a new field to the existing document.\n", + "value": "{\n \"doc\": {\n \"name\": \"new_name\"\n }\n}" + }, + "UpdateRequestExample9": { + "summary": "Upsert", + "description": "Run `POST test/_update/1` to perfom an upsert. If the document does not already exist, the contents of the upsert element are inserted as a new document. If the document exists, the script is run.\n", + "value": "{\n \"script\": {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\": {\n \"count\": 4\n }\n },\n \"upsert\": {\n \"counter\": 1\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.update.UpdateWriteResponseBase" + }, + "examples": { + "UpdateResponseExample1": { + "summary": "Detect noop updates", + "description": "By default updates that don't change anything detect that they don't change anything and return `\"result\": \"noop\"`.\n", + "value": "{\n \"_shards\": {\n \"total\": 0,\n \"successful\": 0,\n \"failed\": 0\n },\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"_primary_term\": 1,\n \"_seq_no\": 1,\n \"result\": \"noop\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /{index}/_update/{id}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `write`\n" + ], + "x-api": "update", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_update_by_query": { + "post": { + "tags": [ + "document" + ], + "summary": "Update documents", + "description": "Updates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Refreshing shards**\n\nSpecifying the `refresh` parameter refreshes all shards once the request completes.\nThis is different to the update API's `refresh` parameter, which causes only the shard\nthat received the request to be refreshed. Unlike the update API, it does not support\n`wait_for`.\n\n**Running update by query asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch\nperforms some preflight checks, launches the request, and returns a\n[task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) you can use to cancel or get the status of the task.\nElasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.\n\n**Waiting for active shards**\n\n`wait_for_active_shards` controls how many copies of a shard must be active\nbefore proceeding with the request. See [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards)\nfor details. `timeout` controls how long each write request waits for unavailable\nshards to become available. Both work exactly the way they work in the\n[Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). Update by query uses scrolled searches, so you can also\nspecify the `scroll` parameter to control how long it keeps the search context\nalive, for example `?scroll=10m`. The default is 5 minutes.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\nRefer to the linked documentation for examples of how to update documents using the `_update_by_query` API:", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-by-query-api", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-update-by-query.html" + }, + "operationId": "update-by-query", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "analyzer", + "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "analyze_wildcard", + "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "conflicts", + "description": "The preferred behavior when update by query hits version conflicts: `abort` or `proceed`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Conflicts" + }, + "style": "form" + }, + { + "in": "query", + "name": "default_operator", + "description": "The default operator for query string query: `and` or `or`.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "style": "form" + }, + { + "in": "query", + "name": "df", + "description": "The field to use as default where no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "from", + "description": "Skips the specified number of documents.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "lenient", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "max_docs", + "description": "The maximum number of documents to process.\nIt defaults to all documents.\nWhen set to a value less then or equal to `scroll_size` then a scroll will not be used to retrieve the results for the operation.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "pipeline", + "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "preference", + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "q", + "description": "A query in the Lucene query string syntax.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "refresh", + "description": "If `true`, Elasticsearch refreshes affected shards to make the operation visible to search after the request completes.\nThis is different than the update API's `refresh` parameter, which causes just the shard that received the request to be refreshed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "request_cache", + "description": "If `true`, the request cache is used for this request.\nIt defaults to the index-level setting.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "requests_per_second", + "description": "The throttle for this request in sub-requests per second.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "A custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll", + "description": "The period to retain the search context for scrolling.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "scroll_size", + "description": "The size of the scroll request that powers the operation.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_timeout", + "description": "An explicit timeout for each search request.\nBy default, there is no timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "search_type", + "description": "The type of the search operation. Available options include `query_then_fetch` and `dfs_query_then_fetch`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SearchType" + }, + "style": "form" + }, + { + "in": "query", + "name": "slices", + "description": "The number of slices this task should be divided into.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Slices" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort", + "description": "A comma-separated list of : pairs.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "stats", + "description": "The specific `tag` of the request for logging and statistical purposes.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "terminate_after", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period each update request waits for the following operations: dynamic mapping updates, waiting for active shards.\nBy default, it is one minute.\nThis guarantees Elasticsearch waits for at least the timeout before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "If `true`, returns the document version as part of a hit.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "Should the document increment the version number (internal) on hit or not (reindex)", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_active_shards", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe `timeout` parameter controls how long each write request waits for unavailable shards to become available.\nBoth work exactly the way they work in the bulk API.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.WaitForActiveShards" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request blocks until the operation is complete.\nIf `false`, Elasticsearch performs some preflight checks, launches the request, and returns a task ID that you can use to cancel or get the status of the task.\nElasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "max_docs": { + "description": "The maximum number of documents to update.", + "type": "number" + }, + "query": { + "description": "The documents to update using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "script": { + "description": "The script to run to update the document source or metadata when updating.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "slice": { + "description": "Slice the request manually using the provided slice ID and total number of slices.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "conflicts": { + "description": "The preferred behavior when update by query hits version conflicts: `abort` or `proceed`.", + "default": "abort", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Conflicts" + } + ] + } + } + }, + "examples": { + "UpdateByQueryRequestExample1": { + "summary": "Update selected documents", + "description": "Run `POST my-index-000001/_update_by_query?conflicts=proceed` to update documents that match a query.\n", + "value": "{\n \"query\": { \n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + "UpdateByQueryRequestExample2": { + "summary": "Update the document source", + "description": "Run `POST my-index-000001/_update_by_query` with a script to update the document source. It increments the `count` field for all documents with a `user.id` of `kimchy` in `my-index-000001`.\n", + "value": "{\n \"script\": {\n \"source\": \"ctx._source.count++\",\n \"lang\": \"painless\"\n },\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + "UpdateByQueryRequestExample3": { + "summary": "Slice manually", + "description": "Run `POST my-index-000001/_update_by_query` to slice an update by query manually. Provide a slice ID and total number of slices to each request.\n", + "value": "{\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}" + }, + "UpdateByQueryRequestExample4": { + "summary": "Slice automatically", + "description": "Run `POST my-index-000001/_update_by_query?refresh&slices=5` to use automatic slicing. It automatically parallelizes using sliced scroll to slice on `_id`.\n", + "value": "{\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "batches": { + "description": "The number of scroll responses pulled back by the update by query.", + "type": "number" + }, + "failures": { + "description": "Array of failures if there were any unrecoverable errors during the process.\nIf this is non-empty then the request ended because of those failures.\nUpdate by query is implemented using batches.\nAny failure causes the entire process to end, but all failures in the current batch are collected into the array.\nYou can use the `conflicts` option to prevent reindex from ending when version conflicts occur.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.BulkIndexByScrollFailure" + } + }, + "noops": { + "description": "The number of documents that were ignored because the script used for the update by query returned a noop value for `ctx.op`.", + "type": "number" + }, + "deleted": { + "description": "The number of documents that were successfully deleted.", + "type": "number" + }, + "requests_per_second": { + "description": "The number of requests per second effectively run during the update by query.", + "type": "number" + }, + "retries": { + "description": "The number of retries attempted by update by query.\n`bulk` is the number of bulk actions retried.\n`search` is the number of search actions retried.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Retries" + } + ] + }, + "slices": { + "description": "Status of each slice if the update by query was sliced", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ReindexStatus" + } + }, + "task": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TaskId" + } + ] + }, + "timed_out": { + "description": "If true, some requests timed out during the update by query.", + "type": "boolean" + }, + "took": { + "description": "The number of milliseconds from start to end of the whole operation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "total": { + "description": "The number of documents that were successfully processed.", + "type": "number" + }, + "updated": { + "description": "The number of documents that were successfully updated.", + "type": "number" + }, + "version_conflicts": { + "description": "The number of version conflicts that the update by query hit.", + "type": "number" + }, + "throttled": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttled_millis": { + "description": "The number of milliseconds the request slept to conform to `requests_per_second`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "throttled_until": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttled_until_millis": { + "description": "This field should always be equal to zero in an _update_by_query response.\nIt only has meaning when using the task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be run again in order to conform to `requests_per_second`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + } + } + } + } + } + } + }, + "x-state": "Generally available; Added in 2.4.0", + "x-variations": [ + "
\n POST\n /{index}/_update_by_query\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`,`write`\n" + ], + "x-api": "update_by_query", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_update_by_query/{task_id}/_rethrottle": { + "post": { + "tags": [ + "document" + ], + "summary": "Throttle an update by query operation", + "description": "Change the number of requests per second for a particular update by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", + "operationId": "update-by-query-rethrottle", + "parameters": [ + { + "in": "path", + "name": "task_id", + "description": "The ID for the task.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "requests_per_second", + "description": "The throttle for this request in sub-requests per second.\nTo turn off throttling, set it to `-1`.", + "required": true, + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.update_by_query_rethrottle.UpdateByQueryRethrottleNode" + } + } + }, + "required": [ + "nodes" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 6.5.0", + "x-variations": [ + "
\n POST\n /_update_by_query/{task_id}/_rethrottle\n
\n " + ], + "x-api": "update_by_query_rethrottle", + "x-category": "document management", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/watch/{watch_id}/_ack": { + "put": { + "tags": [ + "watcher" + ], + "summary": "Acknowledge a watch", + "description": "Acknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).\nTo demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/actions#example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-ack-watch.html" + }, + "operationId": "watcher-ack-watch", + "parameters": [ + { + "in": "path", + "name": "watch_id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WatchStatus" + } + ] + } + }, + "required": [ + "status" + ] + }, + "examples": { + "WatcherAckWatchResponseExample1": { + "description": "A successful response from `POST _watcher/watch/my_watch/_ack`.", + "value": "{\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:04:27.723Z\"\n },\n \"last_checked\": \"2015-05-26T18:04:27.753Z\",\n \"last_met_condition\": \"2015-05-26T18:04:27.763Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\" : {\n \"timestamp\": \"2015-05-26T18:04:27.713Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.733Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.773Z\",\n \"successful\": true\n }\n }\n },\n \"execution_state\": \"executed\",\n \"version\": 2\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{watch_id}/_ack\n
\n ", + "
\n POST\n /_watcher/watch/{watch_id}/_ack\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "ack_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "watcher" + ], + "summary": "Acknowledge a watch", + "description": "Acknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).\nTo demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/actions#example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-ack-watch.html" + }, + "operationId": "watcher-ack-watch-1", + "parameters": [ + { + "in": "path", + "name": "watch_id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WatchStatus" + } + ] + } + }, + "required": [ + "status" + ] + }, + "examples": { + "WatcherAckWatchResponseExample1": { + "description": "A successful response from `POST _watcher/watch/my_watch/_ack`.", + "value": "{\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:04:27.723Z\"\n },\n \"last_checked\": \"2015-05-26T18:04:27.753Z\",\n \"last_met_condition\": \"2015-05-26T18:04:27.763Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\" : {\n \"timestamp\": \"2015-05-26T18:04:27.713Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.733Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.773Z\",\n \"successful\": true\n }\n }\n },\n \"execution_state\": \"executed\",\n \"version\": 2\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{watch_id}/_ack\n
\n ", + "
\n POST\n /_watcher/watch/{watch_id}/_ack\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "ack_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/watch/{watch_id}/_ack/{action_id}": { + "put": { + "tags": [ + "watcher" + ], + "summary": "Acknowledge a watch", + "description": "Acknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).\nTo demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/actions#example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-ack-watch.html" + }, + "operationId": "watcher-ack-watch-2", + "parameters": [ + { + "in": "path", + "name": "watch_id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "action_id", + "description": "A comma-separated list of the action identifiers to acknowledge.\nIf you omit this parameter, all of the actions of the watch are acknowledged.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WatchStatus" + } + ] + } + }, + "required": [ + "status" + ] + }, + "examples": { + "WatcherAckWatchResponseExample1": { + "description": "A successful response from `POST _watcher/watch/my_watch/_ack`.", + "value": "{\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:04:27.723Z\"\n },\n \"last_checked\": \"2015-05-26T18:04:27.753Z\",\n \"last_met_condition\": \"2015-05-26T18:04:27.763Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\" : {\n \"timestamp\": \"2015-05-26T18:04:27.713Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.733Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.773Z\",\n \"successful\": true\n }\n }\n },\n \"execution_state\": \"executed\",\n \"version\": 2\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{watch_id}/_ack/{action_id}\n
\n ", + "
\n POST\n /_watcher/watch/{watch_id}/_ack/{action_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "ack_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "watcher" + ], + "summary": "Acknowledge a watch", + "description": "Acknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).\nTo demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/actions#example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-ack-watch.html" + }, + "operationId": "watcher-ack-watch-3", + "parameters": [ + { + "in": "path", + "name": "watch_id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "path", + "name": "action_id", + "description": "A comma-separated list of the action identifiers to acknowledge.\nIf you omit this parameter, all of the actions of the watch are acknowledged.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Names" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WatchStatus" + } + ] + } + }, + "required": [ + "status" + ] + }, + "examples": { + "WatcherAckWatchResponseExample1": { + "description": "A successful response from `POST _watcher/watch/my_watch/_ack`.", + "value": "{\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:04:27.723Z\"\n },\n \"last_checked\": \"2015-05-26T18:04:27.753Z\",\n \"last_met_condition\": \"2015-05-26T18:04:27.763Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\" : {\n \"timestamp\": \"2015-05-26T18:04:27.713Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.733Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.773Z\",\n \"successful\": true\n }\n }\n },\n \"execution_state\": \"executed\",\n \"version\": 2\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{watch_id}/_ack/{action_id}\n
\n ", + "
\n POST\n /_watcher/watch/{watch_id}/_ack/{action_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "ack_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/watch/{watch_id}/_activate": { + "put": { + "tags": [ + "watcher" + ], + "summary": "Activate a watch", + "description": "A watch can be either active or inactive.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-activate-watch.html" + }, + "operationId": "watcher-activate-watch", + "parameters": [ + { + "in": "path", + "name": "watch_id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActivationStatus" + } + ] + } + }, + "required": [ + "status" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{watch_id}/_activate\n
\n ", + "
\n POST\n /_watcher/watch/{watch_id}/_activate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "activate_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "watcher" + ], + "summary": "Activate a watch", + "description": "A watch can be either active or inactive.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-activate-watch.html" + }, + "operationId": "watcher-activate-watch-1", + "parameters": [ + { + "in": "path", + "name": "watch_id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActivationStatus" + } + ] + } + }, + "required": [ + "status" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{watch_id}/_activate\n
\n ", + "
\n POST\n /_watcher/watch/{watch_id}/_activate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "activate_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/watch/{watch_id}/_deactivate": { + "put": { + "tags": [ + "watcher" + ], + "summary": "Deactivate a watch", + "description": "A watch can be either active or inactive.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-deactivate-watch.html" + }, + "operationId": "watcher-deactivate-watch", + "parameters": [ + { + "in": "path", + "name": "watch_id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActivationStatus" + } + ] + } + }, + "required": [ + "status" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{watch_id}/_deactivate\n
\n ", + "
\n POST\n /_watcher/watch/{watch_id}/_deactivate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "deactivate_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "watcher" + ], + "summary": "Deactivate a watch", + "description": "A watch can be either active or inactive.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-deactivate-watch.html" + }, + "operationId": "watcher-deactivate-watch-1", + "parameters": [ + { + "in": "path", + "name": "watch_id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActivationStatus" + } + ] + } + }, + "required": [ + "status" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{watch_id}/_deactivate\n
\n ", + "
\n POST\n /_watcher/watch/{watch_id}/_deactivate\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "deactivate_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/watch/{id}": { + "get": { + "tags": [ + "watcher" + ], + "summary": "Get a watch", + "operationId": "watcher-get-watch", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "type": "boolean" + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WatchStatus" + } + ] + }, + "watch": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Watch" + } + ] + }, + "_primary_term": { + "type": "number" + }, + "_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "found", + "_id" + ] + }, + "examples": { + "GetWatchResponseExample1": { + "description": "A successful response from `GET _watcher/watch/my_watch`.", + "value": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"_version\": 1,\n \"status\": { \n \"version\": 1,\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:21:08.630Z\"\n },\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:21:08.630Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n }\n },\n \"watch\": {\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"trigger\": {\n \"schedule\": {\n \"hourly\": {\n \"minute\": [0, 5]\n }\n }\n },\n \"actions\": {\n \"test_index\": {\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.6.0", + "x-variations": [ + "
\n GET\n /_watcher/watch/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_watcher`\n" + ], + "x-api": "get_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "watcher" + ], + "summary": "Create or update a watch", + "description": "When a watch is registered, a new document that represents the watch is added to the `.watches` index and its trigger is immediately registered with the relevant trigger engine.\nTypically for the `schedule` trigger, the scheduler is the trigger engine.\n\nIMPORTANT: You must use Kibana or this API to create a watch.\nDo not add a watch directly to the `.watches` index by using the Elasticsearch index API.\nIf Elasticsearch security features are enabled, do not give users write privileges on the `.watches` index.\n\nWhen you add a watch you can also define its initial active state by setting the *active* parameter.\n\nWhen Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.\nIf the user is able to read index `a`, but not index `b`, the same will apply when the watch runs.", + "operationId": "watcher-put-watch", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The identifier for the watch.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "active", + "description": "The initial state of the watch.\nThe default value is `true`, which means the watch is active by default.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "if_primary_term", + "description": "Only update the watch if the last operation that has changed the watch has the specified primary term", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "if_seq_no", + "description": "Only update the watch if the last operation that has changed the watch has the specified sequence number", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SequenceNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "Explicit version number for concurrency control", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "actions": { + "description": "The list of actions that will be run if the condition matches.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.Action" + } + }, + "condition": { + "description": "The condition that defines if the actions should be run.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ConditionContainer" + } + ] + }, + "input": { + "description": "The input that defines the input that loads the data for the watch.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.InputContainer" + } + ] + }, + "metadata": { + "description": "Metadata JSON that will be copied into the history entries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "throttle_period": { + "description": "The minimum time between actions being run.\nThe default is 5 seconds.\nThis default can be changed in the config file with the setting `xpack.watcher.throttle.period.default_period`.\nIf both this value and the `throttle_period_in_millis` parameter are specified, Watcher uses the last parameter included in the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttle_period_in_millis": { + "description": "Minimum time in milliseconds between actions being run. Defaults to 5000. If both this value and the throttle_period parameter are specified, Watcher uses the last parameter included in the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "transform": { + "description": "The transform that processes the watch payload to prepare it for the watch actions.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransformContainer" + } + ] + }, + "trigger": { + "description": "The trigger that defines when the watch should run.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.TriggerContainer" + } + ] + } + } + }, + "examples": { + "WatcherPutWatchRequestExample1": { + "description": "Run `PUT _watcher/watch/my-watch` add a watch. The watch schedule triggers every minute. The watch search input looks for any 404 HTTP responses that occurred in the last five minutes. The watch condition checks if any search hits where found. When found, the watch action sends an email to an administrator.\n", + "value": "{\n \"trigger\" : {\n \"schedule\" : { \"cron\" : \"0 0/1 * * * ?\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [\n \"logstash*\"\n ],\n \"body\" : {\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\" : {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"email_admin\" : {\n \"email\" : {\n \"to\" : \"admin@domain.host.com\",\n \"subject\" : \"404 recently encountered\"\n }\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_primary_term": { + "type": "number" + }, + "_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "created", + "_id", + "_primary_term", + "_seq_no", + "_version" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{id}\n
\n ", + "
\n POST\n /_watcher/watch/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "put_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "watcher" + ], + "summary": "Create or update a watch", + "description": "When a watch is registered, a new document that represents the watch is added to the `.watches` index and its trigger is immediately registered with the relevant trigger engine.\nTypically for the `schedule` trigger, the scheduler is the trigger engine.\n\nIMPORTANT: You must use Kibana or this API to create a watch.\nDo not add a watch directly to the `.watches` index by using the Elasticsearch index API.\nIf Elasticsearch security features are enabled, do not give users write privileges on the `.watches` index.\n\nWhen you add a watch you can also define its initial active state by setting the *active* parameter.\n\nWhen Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.\nIf the user is able to read index `a`, but not index `b`, the same will apply when the watch runs.", + "operationId": "watcher-put-watch-1", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The identifier for the watch.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "active", + "description": "The initial state of the watch.\nThe default value is `true`, which means the watch is active by default.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "if_primary_term", + "description": "Only update the watch if the last operation that has changed the watch has the specified primary term", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "if_seq_no", + "description": "Only update the watch if the last operation that has changed the watch has the specified sequence number", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.SequenceNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "Explicit version number for concurrency control", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "actions": { + "description": "The list of actions that will be run if the condition matches.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.Action" + } + }, + "condition": { + "description": "The condition that defines if the actions should be run.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ConditionContainer" + } + ] + }, + "input": { + "description": "The input that defines the input that loads the data for the watch.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.InputContainer" + } + ] + }, + "metadata": { + "description": "Metadata JSON that will be copied into the history entries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "throttle_period": { + "description": "The minimum time between actions being run.\nThe default is 5 seconds.\nThis default can be changed in the config file with the setting `xpack.watcher.throttle.period.default_period`.\nIf both this value and the `throttle_period_in_millis` parameter are specified, Watcher uses the last parameter included in the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttle_period_in_millis": { + "description": "Minimum time in milliseconds between actions being run. Defaults to 5000. If both this value and the throttle_period parameter are specified, Watcher uses the last parameter included in the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "transform": { + "description": "The transform that processes the watch payload to prepare it for the watch actions.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransformContainer" + } + ] + }, + "trigger": { + "description": "The trigger that defines when the watch should run.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.TriggerContainer" + } + ] + } + } + }, + "examples": { + "WatcherPutWatchRequestExample1": { + "description": "Run `PUT _watcher/watch/my-watch` add a watch. The watch schedule triggers every minute. The watch search input looks for any 404 HTTP responses that occurred in the last five minutes. The watch condition checks if any search hits where found. When found, the watch action sends an email to an administrator.\n", + "value": "{\n \"trigger\" : {\n \"schedule\" : { \"cron\" : \"0 0/1 * * * ?\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [\n \"logstash*\"\n ],\n \"body\" : {\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\" : {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"email_admin\" : {\n \"email\" : {\n \"to\" : \"admin@domain.host.com\",\n \"subject\" : \"404 recently encountered\"\n }\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_primary_term": { + "type": "number" + }, + "_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "created", + "_id", + "_primary_term", + "_seq_no", + "_version" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{id}\n
\n ", + "
\n POST\n /_watcher/watch/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "put_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "watcher" + ], + "summary": "Delete a watch", + "description": "When the watch is removed, the document representing the watch in the `.watches` index is gone and it will never be run again.\n\nDeleting a watch does not delete any watch execution records related to this watch from the watch history.\n\nIMPORTANT: Deleting a watch must be done by using only this API.\nDo not delete the watch directly from the `.watches` index using the Elasticsearch delete document API\nWhen Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the `.watches` index.", + "operationId": "watcher-delete-watch", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "found": { + "type": "boolean" + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "found", + "_id", + "_version" + ] + }, + "examples": { + "DeleteWatchResponseExample1": { + "description": "A successful response from `DELETE _watcher/watch/my_watch`.", + "value": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_version\": 2\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n DELETE\n /_watcher/watch/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "delete_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/watch/{id}/_execute": { + "put": { + "tags": [ + "watcher" + ], + "summary": "Run a watch", + "description": "This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.\nRefer to the external documentation for examples of watch execution requests, including existing, customized, and inline watches.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/execute-watch", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-execute-watch.html" + }, + "operationId": "watcher-execute-watch", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "debug", + "description": "Defines whether the watch runs in debug mode.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "action_modes": { + "description": "Determines how to handle the watch actions as part of the watch execution.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.ActionExecutionMode" + } + }, + "alternative_input": { + "description": "When present, the watch uses this object as a payload instead of executing its own input.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "ignore_condition": { + "description": "When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter.", + "default": false, + "type": "boolean" + }, + "record_execution": { + "description": "When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time.\nIn addition, the status of the watch is updated, possibly throttling subsequent runs.\nThis can also be specified as an HTTP parameter.", + "default": false, + "type": "boolean" + }, + "simulated_actions": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SimulatedActions" + } + ] + }, + "trigger_data": { + "description": "This structure is parsed as the data of the trigger event that will be used during the watch execution.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ScheduleTriggerEvent" + } + ] + }, + "watch": { + "description": "When present, this watch is used instead of the one specified in the request.\nThis watch is not persisted to the index and `record_execution` cannot be set.", + "default": "null", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Watch" + } + ] + } + } + }, + "examples": { + "WatcherExecuteRequestExample1": { + "summary": "Run a watch", + "description": "Run `POST _watcher/watch/my_watch/_execute` to run a watch. The input defined in the watch is ignored and the `alternative_input` is used as the payload. The condition as defined by the watch is ignored and is assumed to evaluate to true. The `force_simulate` action forces the simulation of `my-action`. Forcing the simulation means that throttling is ignored and the watch is simulated by Watcher instead of being run normally.\n", + "value": "{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + "WatcherExecuteRequestExample2": { + "summary": "Run a watch with multiple action modes", + "description": "Run `POST _watcher/watch/my_watch/_execute` and set a different mode for each action.\n", + "value": "{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}" + }, + "WatcherExecuteRequestExample3": { + "summary": "Run a watch inline", + "description": "Run `POST _watcher/watch/_execute` to run a watch inline. All other settings for this API still apply when inlining a watch. In this example, while the inline watch defines a compare condition, during the execution this condition will be ignored.\n", + "value": "{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "description": "The watch record identifier as it would be stored in the `.watcher-history` index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "watch_record": { + "description": "The watch record document as it would be stored in the `.watcher-history` index.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher.execute_watch.WatchRecord" + } + ] + } + }, + "required": [ + "_id", + "watch_record" + ] + }, + "examples": { + "WatcherExecuteWatchResponseExample1": { + "description": "A successful response from `POST _watcher/watch/my_watch/_execute`.\n", + "value": "{\n \"_id\": \"my_watch_0-2015-06-02T23:17:55.124Z\", \n \"watch_record\": { \n \"@timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"watch_id\": \"my_watch\",\n \"node\": \"my_node\",\n \"messages\": [],\n \"trigger_event\": {\n \"type\": \"manual\",\n \"triggered_time\": \"2015-06-02T23:17:55.124Z\",\n \"manual\": {\n \"schedule\": {\n \"scheduled_time\": \"2015-06-02T23:17:55.124Z\"\n }\n }\n },\n \"state\": \"executed\",\n \"status\": {\n \"version\": 1,\n \"execution_state\": \"executed\",\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-06-02T23:17:55.111Z\"\n },\n \"last_checked\": \"2015-06-02T23:17:55.124Z\",\n \"last_met_condition\": \"2015-06-02T23:17:55.124Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n },\n \"last_successful_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n }\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"result\": { \n \"execution_time\": \"2015-06-02T23:17:55.124Z\",\n \"execution_duration\": 12608,\n \"input\": {\n \"type\": \"simple\",\n \"payload\": {\n \"foo\": \"bar\"\n },\n \"status\": \"success\"\n },\n \"condition\": {\n \"type\": \"always\",\n \"met\": true,\n \"status\": \"success\"\n },\n \"actions\": [\n {\n \"id\": \"test_index\",\n \"index\": {\n \"response\": {\n \"index\": \"test\",\n \"version\": 1,\n \"created\": true,\n \"result\": \"created\",\n \"id\": \"AVSHKzPa9zx62AzUzFXY\"\n }\n },\n \"status\": \"success\",\n \"type\": \"index\"\n }\n ]\n },\n \"user\": \"test_admin\" \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{id}/_execute\n
\n ", + "
\n POST\n /_watcher/watch/{id}/_execute\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "execute_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "watcher" + ], + "summary": "Run a watch", + "description": "This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.\nRefer to the external documentation for examples of watch execution requests, including existing, customized, and inline watches.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/execute-watch", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-execute-watch.html" + }, + "operationId": "watcher-execute-watch-1", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The watch identifier.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "debug", + "description": "Defines whether the watch runs in debug mode.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "action_modes": { + "description": "Determines how to handle the watch actions as part of the watch execution.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.ActionExecutionMode" + } + }, + "alternative_input": { + "description": "When present, the watch uses this object as a payload instead of executing its own input.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "ignore_condition": { + "description": "When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter.", + "default": false, + "type": "boolean" + }, + "record_execution": { + "description": "When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time.\nIn addition, the status of the watch is updated, possibly throttling subsequent runs.\nThis can also be specified as an HTTP parameter.", + "default": false, + "type": "boolean" + }, + "simulated_actions": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SimulatedActions" + } + ] + }, + "trigger_data": { + "description": "This structure is parsed as the data of the trigger event that will be used during the watch execution.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ScheduleTriggerEvent" + } + ] + }, + "watch": { + "description": "When present, this watch is used instead of the one specified in the request.\nThis watch is not persisted to the index and `record_execution` cannot be set.", + "default": "null", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Watch" + } + ] + } + } + }, + "examples": { + "WatcherExecuteRequestExample1": { + "summary": "Run a watch", + "description": "Run `POST _watcher/watch/my_watch/_execute` to run a watch. The input defined in the watch is ignored and the `alternative_input` is used as the payload. The condition as defined by the watch is ignored and is assumed to evaluate to true. The `force_simulate` action forces the simulation of `my-action`. Forcing the simulation means that throttling is ignored and the watch is simulated by Watcher instead of being run normally.\n", + "value": "{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + "WatcherExecuteRequestExample2": { + "summary": "Run a watch with multiple action modes", + "description": "Run `POST _watcher/watch/my_watch/_execute` and set a different mode for each action.\n", + "value": "{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}" + }, + "WatcherExecuteRequestExample3": { + "summary": "Run a watch inline", + "description": "Run `POST _watcher/watch/_execute` to run a watch inline. All other settings for this API still apply when inlining a watch. In this example, while the inline watch defines a compare condition, during the execution this condition will be ignored.\n", + "value": "{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "description": "The watch record identifier as it would be stored in the `.watcher-history` index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "watch_record": { + "description": "The watch record document as it would be stored in the `.watcher-history` index.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher.execute_watch.WatchRecord" + } + ] + } + }, + "required": [ + "_id", + "watch_record" + ] + }, + "examples": { + "WatcherExecuteWatchResponseExample1": { + "description": "A successful response from `POST _watcher/watch/my_watch/_execute`.\n", + "value": "{\n \"_id\": \"my_watch_0-2015-06-02T23:17:55.124Z\", \n \"watch_record\": { \n \"@timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"watch_id\": \"my_watch\",\n \"node\": \"my_node\",\n \"messages\": [],\n \"trigger_event\": {\n \"type\": \"manual\",\n \"triggered_time\": \"2015-06-02T23:17:55.124Z\",\n \"manual\": {\n \"schedule\": {\n \"scheduled_time\": \"2015-06-02T23:17:55.124Z\"\n }\n }\n },\n \"state\": \"executed\",\n \"status\": {\n \"version\": 1,\n \"execution_state\": \"executed\",\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-06-02T23:17:55.111Z\"\n },\n \"last_checked\": \"2015-06-02T23:17:55.124Z\",\n \"last_met_condition\": \"2015-06-02T23:17:55.124Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n },\n \"last_successful_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n }\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"result\": { \n \"execution_time\": \"2015-06-02T23:17:55.124Z\",\n \"execution_duration\": 12608,\n \"input\": {\n \"type\": \"simple\",\n \"payload\": {\n \"foo\": \"bar\"\n },\n \"status\": \"success\"\n },\n \"condition\": {\n \"type\": \"always\",\n \"met\": true,\n \"status\": \"success\"\n },\n \"actions\": [\n {\n \"id\": \"test_index\",\n \"index\": {\n \"response\": {\n \"index\": \"test\",\n \"version\": 1,\n \"created\": true,\n \"result\": \"created\",\n \"id\": \"AVSHKzPa9zx62AzUzFXY\"\n }\n },\n \"status\": \"success\",\n \"type\": \"index\"\n }\n ]\n },\n \"user\": \"test_admin\" \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/{id}/_execute\n
\n ", + "
\n POST\n /_watcher/watch/{id}/_execute\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "execute_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/watch/_execute": { + "put": { + "tags": [ + "watcher" + ], + "summary": "Run a watch", + "description": "This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.\nRefer to the external documentation for examples of watch execution requests, including existing, customized, and inline watches.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/execute-watch", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-execute-watch.html" + }, + "operationId": "watcher-execute-watch-2", + "parameters": [ + { + "in": "query", + "name": "debug", + "description": "Defines whether the watch runs in debug mode.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "action_modes": { + "description": "Determines how to handle the watch actions as part of the watch execution.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.ActionExecutionMode" + } + }, + "alternative_input": { + "description": "When present, the watch uses this object as a payload instead of executing its own input.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "ignore_condition": { + "description": "When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter.", + "default": false, + "type": "boolean" + }, + "record_execution": { + "description": "When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time.\nIn addition, the status of the watch is updated, possibly throttling subsequent runs.\nThis can also be specified as an HTTP parameter.", + "default": false, + "type": "boolean" + }, + "simulated_actions": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SimulatedActions" + } + ] + }, + "trigger_data": { + "description": "This structure is parsed as the data of the trigger event that will be used during the watch execution.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ScheduleTriggerEvent" + } + ] + }, + "watch": { + "description": "When present, this watch is used instead of the one specified in the request.\nThis watch is not persisted to the index and `record_execution` cannot be set.", + "default": "null", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Watch" + } + ] + } + } + }, + "examples": { + "WatcherExecuteRequestExample1": { + "summary": "Run a watch", + "description": "Run `POST _watcher/watch/my_watch/_execute` to run a watch. The input defined in the watch is ignored and the `alternative_input` is used as the payload. The condition as defined by the watch is ignored and is assumed to evaluate to true. The `force_simulate` action forces the simulation of `my-action`. Forcing the simulation means that throttling is ignored and the watch is simulated by Watcher instead of being run normally.\n", + "value": "{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + "WatcherExecuteRequestExample2": { + "summary": "Run a watch with multiple action modes", + "description": "Run `POST _watcher/watch/my_watch/_execute` and set a different mode for each action.\n", + "value": "{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}" + }, + "WatcherExecuteRequestExample3": { + "summary": "Run a watch inline", + "description": "Run `POST _watcher/watch/_execute` to run a watch inline. All other settings for this API still apply when inlining a watch. In this example, while the inline watch defines a compare condition, during the execution this condition will be ignored.\n", + "value": "{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "description": "The watch record identifier as it would be stored in the `.watcher-history` index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "watch_record": { + "description": "The watch record document as it would be stored in the `.watcher-history` index.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher.execute_watch.WatchRecord" + } + ] + } + }, + "required": [ + "_id", + "watch_record" + ] + }, + "examples": { + "WatcherExecuteWatchResponseExample1": { + "description": "A successful response from `POST _watcher/watch/my_watch/_execute`.\n", + "value": "{\n \"_id\": \"my_watch_0-2015-06-02T23:17:55.124Z\", \n \"watch_record\": { \n \"@timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"watch_id\": \"my_watch\",\n \"node\": \"my_node\",\n \"messages\": [],\n \"trigger_event\": {\n \"type\": \"manual\",\n \"triggered_time\": \"2015-06-02T23:17:55.124Z\",\n \"manual\": {\n \"schedule\": {\n \"scheduled_time\": \"2015-06-02T23:17:55.124Z\"\n }\n }\n },\n \"state\": \"executed\",\n \"status\": {\n \"version\": 1,\n \"execution_state\": \"executed\",\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-06-02T23:17:55.111Z\"\n },\n \"last_checked\": \"2015-06-02T23:17:55.124Z\",\n \"last_met_condition\": \"2015-06-02T23:17:55.124Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n },\n \"last_successful_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n }\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"result\": { \n \"execution_time\": \"2015-06-02T23:17:55.124Z\",\n \"execution_duration\": 12608,\n \"input\": {\n \"type\": \"simple\",\n \"payload\": {\n \"foo\": \"bar\"\n },\n \"status\": \"success\"\n },\n \"condition\": {\n \"type\": \"always\",\n \"met\": true,\n \"status\": \"success\"\n },\n \"actions\": [\n {\n \"id\": \"test_index\",\n \"index\": {\n \"response\": {\n \"index\": \"test\",\n \"version\": 1,\n \"created\": true,\n \"result\": \"created\",\n \"id\": \"AVSHKzPa9zx62AzUzFXY\"\n }\n },\n \"status\": \"success\",\n \"type\": \"index\"\n }\n ]\n },\n \"user\": \"test_admin\" \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/_execute\n
\n ", + "
\n POST\n /_watcher/watch/_execute\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "execute_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "watcher" + ], + "summary": "Run a watch", + "description": "This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.\nRefer to the external documentation for examples of watch execution requests, including existing, customized, and inline watches.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/execute-watch", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-execute-watch.html" + }, + "operationId": "watcher-execute-watch-3", + "parameters": [ + { + "in": "query", + "name": "debug", + "description": "Defines whether the watch runs in debug mode.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "action_modes": { + "description": "Determines how to handle the watch actions as part of the watch execution.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.ActionExecutionMode" + } + }, + "alternative_input": { + "description": "When present, the watch uses this object as a payload instead of executing its own input.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "ignore_condition": { + "description": "When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter.", + "default": false, + "type": "boolean" + }, + "record_execution": { + "description": "When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time.\nIn addition, the status of the watch is updated, possibly throttling subsequent runs.\nThis can also be specified as an HTTP parameter.", + "default": false, + "type": "boolean" + }, + "simulated_actions": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SimulatedActions" + } + ] + }, + "trigger_data": { + "description": "This structure is parsed as the data of the trigger event that will be used during the watch execution.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ScheduleTriggerEvent" + } + ] + }, + "watch": { + "description": "When present, this watch is used instead of the one specified in the request.\nThis watch is not persisted to the index and `record_execution` cannot be set.", + "default": "null", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Watch" + } + ] + } + } + }, + "examples": { + "WatcherExecuteRequestExample1": { + "summary": "Run a watch", + "description": "Run `POST _watcher/watch/my_watch/_execute` to run a watch. The input defined in the watch is ignored and the `alternative_input` is used as the payload. The condition as defined by the watch is ignored and is assumed to evaluate to true. The `force_simulate` action forces the simulation of `my-action`. Forcing the simulation means that throttling is ignored and the watch is simulated by Watcher instead of being run normally.\n", + "value": "{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + "WatcherExecuteRequestExample2": { + "summary": "Run a watch with multiple action modes", + "description": "Run `POST _watcher/watch/my_watch/_execute` and set a different mode for each action.\n", + "value": "{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}" + }, + "WatcherExecuteRequestExample3": { + "summary": "Run a watch inline", + "description": "Run `POST _watcher/watch/_execute` to run a watch inline. All other settings for this API still apply when inlining a watch. In this example, while the inline watch defines a compare condition, during the execution this condition will be ignored.\n", + "value": "{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "description": "The watch record identifier as it would be stored in the `.watcher-history` index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "watch_record": { + "description": "The watch record document as it would be stored in the `.watcher-history` index.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher.execute_watch.WatchRecord" + } + ] + } + }, + "required": [ + "_id", + "watch_record" + ] + }, + "examples": { + "WatcherExecuteWatchResponseExample1": { + "description": "A successful response from `POST _watcher/watch/my_watch/_execute`.\n", + "value": "{\n \"_id\": \"my_watch_0-2015-06-02T23:17:55.124Z\", \n \"watch_record\": { \n \"@timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"watch_id\": \"my_watch\",\n \"node\": \"my_node\",\n \"messages\": [],\n \"trigger_event\": {\n \"type\": \"manual\",\n \"triggered_time\": \"2015-06-02T23:17:55.124Z\",\n \"manual\": {\n \"schedule\": {\n \"scheduled_time\": \"2015-06-02T23:17:55.124Z\"\n }\n }\n },\n \"state\": \"executed\",\n \"status\": {\n \"version\": 1,\n \"execution_state\": \"executed\",\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-06-02T23:17:55.111Z\"\n },\n \"last_checked\": \"2015-06-02T23:17:55.124Z\",\n \"last_met_condition\": \"2015-06-02T23:17:55.124Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n },\n \"last_successful_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n }\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"result\": { \n \"execution_time\": \"2015-06-02T23:17:55.124Z\",\n \"execution_duration\": 12608,\n \"input\": {\n \"type\": \"simple\",\n \"payload\": {\n \"foo\": \"bar\"\n },\n \"status\": \"success\"\n },\n \"condition\": {\n \"type\": \"always\",\n \"met\": true,\n \"status\": \"success\"\n },\n \"actions\": [\n {\n \"id\": \"test_index\",\n \"index\": {\n \"response\": {\n \"index\": \"test\",\n \"version\": 1,\n \"created\": true,\n \"result\": \"created\",\n \"id\": \"AVSHKzPa9zx62AzUzFXY\"\n }\n },\n \"status\": \"success\",\n \"type\": \"index\"\n }\n ]\n },\n \"user\": \"test_admin\" \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/watch/_execute\n
\n ", + "
\n POST\n /_watcher/watch/_execute\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "execute_watch.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/settings": { + "get": { + "tags": [ + "watcher" + ], + "summary": "Get Watcher index settings", + "description": "Get settings for the Watcher internal index (`.watches`).\nOnly a subset of settings are shown, for example `index.auto_expand_replicas` and `index.number_of_replicas`.", + "operationId": "watcher-get-settings", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + } + }, + "required": [ + "index" + ] + }, + "examples": { + "WatcherGetSettingsResponseExample1": { + "description": "A successful response with two index settings.", + "value": "{\n \"index\": {\n \"auto_expand_replicas\": \"0-4\",\n \"number_of_replicas\": 0\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_watcher/settings\n
\n " + ], + "x-api": "get_settings.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "watcher" + ], + "summary": "Update Watcher index settings", + "description": "Update settings for the Watcher internal index (`.watches`).\nOnly a subset of settings can be modified.\nThis includes `index.auto_expand_replicas`, `index.number_of_replicas`, `index.routing.allocation.exclude.*`,\n`index.routing.allocation.include.*` and `index.routing.allocation.require.*`.\nModification of `index.routing.allocation.include._tier_preference` is an exception and is not allowed as the\nWatcher shards must always be in the `data_content` tier.", + "operationId": "watcher-update-settings", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "index.auto_expand_replicas": { + "type": "string" + }, + "index.number_of_replicas": { + "type": "number" + } + } + }, + "examples": { + "WatcherUpdateSettingsRequestExample1": { + "value": "{\n \"index.auto_expand_replicas\": \"0-4\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged" + ] + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /_watcher/settings\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "update_settings.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/_query/watches": { + "get": { + "tags": [ + "watcher" + ], + "summary": "Query watches", + "description": "Get all registered watches in a paginated manner and optionally filter watches by a query.\n\nNote that only the `_id` and `metadata.*` fields are queryable or sortable.", + "operationId": "watcher-query-watches", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "from": { + "description": "The offset from the first result to fetch.\nIt must be non-negative.", + "default": 0.0, + "type": "number" + }, + "size": { + "description": "The number of hits to return.\nIt must be non-negative.", + "default": 10.0, + "type": "number" + }, + "query": { + "description": "A query that filters the watches to be returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "One or more fields used to sort the search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "search_after": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after" + }, + "description": "Retrieve the next page of hits using a set of sort values from the previous page.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "description": "The total number of watches found.", + "type": "number" + }, + "watches": { + "description": "A list of watches based on the `from`, `size`, or `search_after` request body parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.QueryWatch" + } + } + }, + "required": [ + "count", + "watches" + ] + }, + "examples": { + "WatcherQueryWatchesResponseExample1": { + "description": "A successful response from `GET /_watcher/_query/watches`.", + "value": "{\n \"count\": 1,\n \"watches\": [\n {\n \"_id\": \"my_watch\",\n \"watch\": {\n \"trigger\": {\n \"schedule\": {\n \"hourly\": {\n \"minute\": [\n 0,\n 5\n ]\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"actions\": {\n \"test_index\": {\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n },\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:21:08.630Z\"\n },\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:21:08.630Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n },\n \"version\": -1\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.11.0", + "x-variations": [ + "
\n GET\n /_watcher/_query/watches\n
\n ", + "
\n POST\n /_watcher/_query/watches\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_watcher`\n" + ], + "x-api": "query_watches.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "watcher" + ], + "summary": "Query watches", + "description": "Get all registered watches in a paginated manner and optionally filter watches by a query.\n\nNote that only the `_id` and `metadata.*` fields are queryable or sortable.", + "operationId": "watcher-query-watches-1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "from": { + "description": "The offset from the first result to fetch.\nIt must be non-negative.", + "default": 0.0, + "type": "number" + }, + "size": { + "description": "The number of hits to return.\nIt must be non-negative.", + "default": 10.0, + "type": "number" + }, + "query": { + "description": "A query that filters the watches to be returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "One or more fields used to sort the search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "search_after": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after" + }, + "description": "Retrieve the next page of hits using a set of sort values from the previous page.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "description": "The total number of watches found.", + "type": "number" + }, + "watches": { + "description": "A list of watches based on the `from`, `size`, or `search_after` request body parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.QueryWatch" + } + } + }, + "required": [ + "count", + "watches" + ] + }, + "examples": { + "WatcherQueryWatchesResponseExample1": { + "description": "A successful response from `GET /_watcher/_query/watches`.", + "value": "{\n \"count\": 1,\n \"watches\": [\n {\n \"_id\": \"my_watch\",\n \"watch\": {\n \"trigger\": {\n \"schedule\": {\n \"hourly\": {\n \"minute\": [\n 0,\n 5\n ]\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"actions\": {\n \"test_index\": {\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n },\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:21:08.630Z\"\n },\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:21:08.630Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n },\n \"version\": -1\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.11.0", + "x-variations": [ + "
\n GET\n /_watcher/_query/watches\n
\n ", + "
\n POST\n /_watcher/_query/watches\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_watcher`\n" + ], + "x-api": "query_watches.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/_start": { + "post": { + "tags": [ + "watcher" + ], + "summary": "Start the watch service", + "description": "Start the Watcher service if it is not already running.", + "operationId": "watcher-start", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "WatcherStartResponseExample1": { + "description": "A successful response from `POST _watcher/_start`.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_watcher/_start\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "start.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/stats": { + "get": { + "tags": [ + "watcher" + ], + "summary": "Get Watcher statistics", + "description": "This API always returns basic metrics.\nYou retrieve more metrics by using the metric parameter.", + "operationId": "watcher-stats", + "parameters": [ + { + "in": "query", + "name": "emit_stacktraces", + "description": "Defines whether stack traces are generated for each watch that is running.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "metric", + "description": "Defines which additional metrics are included in the response.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/watcher.stats.WatcherMetric" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher.stats.WatcherMetric" + } + } + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "manually_stopped": { + "type": "boolean" + }, + "stats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher.stats.WatcherNodeStats" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "manually_stopped", + "stats" + ] + }, + "examples": { + "WatcherStatsResponseExample1": { + "summary": "Basic metrics", + "description": "A successful response from `GET _watcher/stats`.", + "value": "{\n \"watcher_state\": \"started\", \n \"watch_count\": 1, \n \"execution_thread_pool\": {\n \"size\": 1000, \n \"max_size\": 1 \n }\n}" + }, + "WatcherStatsResponseExample2": { + "summary": "Current watch metrics", + "description": "A successful response from `GET _watcher/stats?metric=current_watches`.", + "value": "{\n \"watcher_state\": \"started\",\n \"watch_count\": 2,\n \"execution_thread_pool\": {\n \"queue_size\": 1000,\n \"max_size\": 20\n },\n \"current_watches\": [ \n {\n \"watch_id\": \"slow_condition\", \n \"watch_record_id\": \"slow_condition_3-2015-05-13T07:42:32.179Z\", \n \"triggered_time\": \"2015-05-12T11:53:51.800Z\", \n \"execution_time\": \"2015-05-13T07:42:32.179Z\", \n \"execution_phase\": \"condition\" \n }\n ]\n}" + }, + "WatcherStatsResponseExample3": { + "summary": "Queued watch metrics", + "description": "An abbreviated response from `GET _watcher/stats/queued_watches`.", + "value": "{\n \"watcher_state\": \"started\",\n \"watch_count\": 10,\n \"execution_thread_pool\": {\n \"queue_size\": 1000,\n \"max_size\": 20\n },\n \"queued_watches\": [ \n {\n \"watch_id\": \"slow_condition4\", \n \"watch_record_id\": \"slow_condition4_223-2015-05-21T11:59:59.811Z\", \n \"triggered_time\": \"2015-05-21T11:59:59.811Z\", \n \"execution_time\": \"2015-05-21T11:59:59.811Z\" \n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_watcher/stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_watcher`\n" + ], + "x-api": "stats.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/stats/{metric}": { + "get": { + "tags": [ + "watcher" + ], + "summary": "Get Watcher statistics", + "description": "This API always returns basic metrics.\nYou retrieve more metrics by using the metric parameter.", + "operationId": "watcher-stats-1", + "parameters": [ + { + "in": "path", + "name": "metric", + "description": "Defines which additional metrics are included in the response.", + "required": true, + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/watcher.stats.WatcherMetric" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher.stats.WatcherMetric" + } + } + ] + }, + "style": "simple" + }, + { + "in": "query", + "name": "emit_stacktraces", + "description": "Defines whether stack traces are generated for each watch that is running.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "metric", + "description": "Defines which additional metrics are included in the response.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/watcher.stats.WatcherMetric" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher.stats.WatcherMetric" + } + } + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_nodes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] + }, + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "manually_stopped": { + "type": "boolean" + }, + "stats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher.stats.WatcherNodeStats" + } + } + }, + "required": [ + "_nodes", + "cluster_name", + "manually_stopped", + "stats" + ] + }, + "examples": { + "WatcherStatsResponseExample1": { + "summary": "Basic metrics", + "description": "A successful response from `GET _watcher/stats`.", + "value": "{\n \"watcher_state\": \"started\", \n \"watch_count\": 1, \n \"execution_thread_pool\": {\n \"size\": 1000, \n \"max_size\": 1 \n }\n}" + }, + "WatcherStatsResponseExample2": { + "summary": "Current watch metrics", + "description": "A successful response from `GET _watcher/stats?metric=current_watches`.", + "value": "{\n \"watcher_state\": \"started\",\n \"watch_count\": 2,\n \"execution_thread_pool\": {\n \"queue_size\": 1000,\n \"max_size\": 20\n },\n \"current_watches\": [ \n {\n \"watch_id\": \"slow_condition\", \n \"watch_record_id\": \"slow_condition_3-2015-05-13T07:42:32.179Z\", \n \"triggered_time\": \"2015-05-12T11:53:51.800Z\", \n \"execution_time\": \"2015-05-13T07:42:32.179Z\", \n \"execution_phase\": \"condition\" \n }\n ]\n}" + }, + "WatcherStatsResponseExample3": { + "summary": "Queued watch metrics", + "description": "An abbreviated response from `GET _watcher/stats/queued_watches`.", + "value": "{\n \"watcher_state\": \"started\",\n \"watch_count\": 10,\n \"execution_thread_pool\": {\n \"queue_size\": 1000,\n \"max_size\": 20\n },\n \"queued_watches\": [ \n {\n \"watch_id\": \"slow_condition4\", \n \"watch_record_id\": \"slow_condition4_223-2015-05-21T11:59:59.811Z\", \n \"triggered_time\": \"2015-05-21T11:59:59.811Z\", \n \"execution_time\": \"2015-05-21T11:59:59.811Z\" \n }\n ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_watcher/stats/{metric}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_watcher`\n" + ], + "x-api": "stats.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_watcher/_stop": { + "post": { + "tags": [ + "watcher" + ], + "summary": "Stop the watch service", + "description": "Stop the Watcher service if it is running.", + "operationId": "watcher-stop", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "WatcherStopResponseExample1": { + "description": "A successful response from `POST _watcher/_stop`.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n POST\n /_watcher/_stop\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_watcher`\n" + ], + "x-api": "stop.watcher", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_xpack": { + "get": { + "tags": [ + "xpack" + ], + "summary": "Get information", + "description": "The information provided by the API includes:\n\n* Build information including the build number and timestamp.\n* License information about the currently installed license.\n* Feature information for the features that are currently enabled and available under the current license.", + "operationId": "xpack-info", + "parameters": [ + { + "in": "query", + "name": "categories", + "description": "A comma-separated list of the information categories to include in the response.\nFor example, `build,license,features`.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/xpack.info.XPackCategory" + } + }, + "style": "form" + }, + { + "in": "query", + "name": "accept_enterprise", + "description": "If used, this otherwise ignored parameter must be set to true", + "deprecated": true, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "human", + "description": "Defines whether additional human-readable information is included in the response.\nIn particular, it adds descriptions and a tag line.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "build": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.BuildInformation" + } + ] + }, + "features": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Features" + } + ] + }, + "license": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.MinimalLicenseInformation" + } + ] + }, + "tagline": { + "type": "string" + } + }, + "required": [ + "build", + "features", + "license", + "tagline" + ] + }, + "examples": { + "XPackInfoResponseExample1": { + "description": "A successful response from `GET /_xpack`.", + "value": "{\n \"build\" : {\n \"hash\" : \"2798b1a3ce779b3611bb53a0082d4d741e4d3168\",\n \"date\" : \"2015-04-07T13:34:42Z\"\n },\n \"license\" : {\n \"uid\" : \"893361dc-9749-4997-93cb-xxx\",\n \"type\" : \"trial\",\n \"mode\" : \"trial\",\n \"status\" : \"active\",\n \"expiry_date_in_millis\" : 1542665112332\n },\n \"features\" : {\n \"ccr\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"aggregate_metric\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"analytics\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"archive\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"enrich\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"graph\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ilm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"logstash\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ml\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"esql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"monitoring\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"rollup\": {\n \"available\": true,\n \"enabled\": true\n },\n \"searchable_snapshots\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"security\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"slm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"spatial\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"eql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"sql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"transform\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"voting_only\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"watcher\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"data_streams\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"data_tiers\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"enterprise_search\": {\n \"available\": true,\n \"enabled\": true\n },\n \"universal_profiling\": {\n \"available\": true,\n \"enabled\": true\n },\n \"logsdb\": {\n \"available\": true,\n \"enabled\": false\n }\n },\n \"tagline\" : \"You know, for X\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_xpack\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "info.xpack", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_xpack/usage": { + "get": { + "tags": [ + "xpack" + ], + "summary": "Get usage information", + "description": "Get information about the features that are currently enabled and available under the current license.\nThe API also provides some usage statistics.", + "operationId": "xpack-usage", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "aggregate_metric": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "analytics": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Analytics" + } + ] + }, + "archive": { + "x-state": "Generally available; Added in 8.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Archive" + } + ] + }, + "watcher": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Watcher" + } + ] + }, + "ccr": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Ccr" + } + ] + }, + "data_frame": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "data_science": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "data_streams": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.DataStreams" + } + ] + }, + "data_tiers": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.DataTiers" + } + ] + }, + "enrich": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "eql": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Eql" + } + ] + }, + "flattened": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Flattened" + } + ] + }, + "graph": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "health_api": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.HealthStatistics" + } + ] + }, + "ilm": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Ilm" + } + ] + }, + "logstash": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "ml": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MachineLearning" + } + ] + }, + "monitoring": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Monitoring" + } + ] + }, + "rollup": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "runtime_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.RuntimeFieldTypes" + } + ] + }, + "spatial": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "searchable_snapshots": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.SearchableSnapshots" + } + ] + }, + "security": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Security" + } + ] + }, + "slm": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Slm" + } + ] + }, + "sql": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Sql" + } + ] + }, + "transform": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + }, + "vectors": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Vector" + } + ] + }, + "voting_only": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + } + ] + } + }, + "required": [ + "aggregate_metric", + "analytics", + "archive", + "watcher", + "ccr", + "data_tiers", + "eql", + "graph", + "ilm", + "logstash", + "ml", + "monitoring", + "rollup", + "spatial", + "searchable_snapshots", + "security", + "slm", + "sql", + "transform", + "voting_only" + ] + }, + "examples": { + "XPackUsageResponseExample1": { + "description": "An abbreviated response from `GET /_xpack/usage`.", + "value": "{\n \"security\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"monitoring\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"collection_enabled\" : false,\n \"enabled_exporters\" : {\n \"local\" : 1\n }\n },\n \"watcher\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"execution\" : {\n \"actions\" : {\n \"_all\" : {\n \"total\" : 0,\n \"total_time_in_ms\" : 0\n }\n }\n },\n \"watch\" : {\n \"input\" : {\n \"_all\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n },\n \"trigger\" : {\n \"_all\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n }\n },\n \"count\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n },\n \"graph\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ml\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"jobs\" : {\n \"_all\" : {\n \"count\" : 0,\n \"detectors\" : { },\n \"created_by\" : { },\n \"model_size\" : { },\n \"forecasts\" : {\n \"total\" : 0,\n \"forecasted_jobs\" : 0\n }\n }\n },\n \"datafeeds\" : {\n \"_all\" : {\n \"count\" : 0\n }\n },\n \"data_frame_analytics_jobs\" : {\n \"_all\" : {\n \"count\" : 0\n },\n \"analysis_counts\": { },\n \"memory_usage\": {\n \"peak_usage_bytes\": {\n \"min\": 0.0,\n \"max\": 0.0,\n \"avg\": 0.0,\n \"total\": 0.0\n }\n }\n },\n \"inference\" : {\n \"ingest_processors\" : {\n \"_all\" : {\n \"num_docs_processed\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n },\n \"pipelines\" : {\n \"count\" : 0\n },\n \"num_failures\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n },\n \"time_ms\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n }\n }\n },\n \"trained_models\" : {\n \"_all\" : {\n \"count\": 1\n },\n \"count\": {\n \"total\": 1,\n \"prepackaged\": 1,\n \"other\": 0\n },\n \"model_size_bytes\": {\n \"min\": 0.0,\n \"max\": 0.0,\n \"avg\": 0.0,\n \"total\": 0.0\n },\n \"estimated_operations\": {\n \"min\": 0.0,\n \"max\": 0.0,\n \"avg\": 0.0,\n \"total\": 0.0\n }\n },\n \"deployments\": {\n \"count\": 0,\n \"inference_counts\": {\n \"total\": 0.0,\n \"min\": 0.0,\n \"avg\": 0.0,\n \"max\": 0.0\n },\n \"stats_by_model\": [],\n \"model_sizes_bytes\": {\n \"total\": 0.0,\n \"min\": 0.0,\n \"avg\": 0.0,\n \"max\": 0.0\n },\n \"time_ms\": {\n \"avg\": 0.0\n }\n }\n },\n \"node_count\" : 1,\n \"memory\": {\n anomaly_detectors_memory_bytes: 0,\n data_frame_analytics_memory_bytes: 0,\n pytorch_inference_memory_bytes: 0,\n total_used_memory_bytes: 0\n }\n },\n \"inference\": {\n \"available\" : true,\n \"enabled\" : true,\n \"models\" : [ ]\n },\n \"logstash\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"eql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"esql\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"features\" : {\n \"eval\" : 0,\n \"stats\" : 0,\n \"dissect\": 0,\n \"grok\" : 0,\n \"limit\" : 0,\n \"where\" : 0,\n \"sort\" : 0,\n \"drop\" : 0,\n \"show\" : 0,\n \"rename\" : 0,\n \"mv_expand\" : 0,\n \"keep\" : 0,\n \"enrich\" : 0,\n \"from\" : 0,\n \"row\" : 0\n },\n \"queries\" : {\n \"rest\" : {\n \"total\" : 0,\n \"failed\" : 0\n },\n \"kibana\" : {\n \"total\" : 0,\n \"failed\" : 0\n },\n \"_all\" : {\n \"total\" : 0,\n \"failed\" : 0\n }\n }\n },\n \"sql\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"features\" : {\n \"having\" : 0,\n \"subselect\" : 0,\n \"limit\" : 0,\n \"orderby\" : 0,\n \"where\" : 0,\n \"join\" : 0,\n \"groupby\" : 0,\n \"command\" : 0,\n \"local\" : 0\n },\n \"queries\" : {\n \"rest\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"cli\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"canvas\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"jdbc\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc32\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc64\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"_all\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"translate\" : {\n \"count\" : 0\n }\n }\n },\n \"rollup\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ilm\" : {\n \"policy_count\" : 3,\n \"policy_stats\" : [ ]\n },\n \"slm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ccr\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"follower_indices_count\" : 0,\n \"auto_follow_patterns_count\" : 0\n },\n \"transform\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"voting_only\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"searchable_snapshots\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"indices_count\" : 0,\n \"full_copy_indices_count\" : 0,\n \"shared_cache_indices_count\" : 0\n },\n \"spatial\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"analytics\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"stats\": {\n \"boxplot_usage\" : 0,\n \"top_metrics_usage\" : 0,\n \"normalize_usage\" : 0,\n \"cumulative_cardinality_usage\" : 0,\n \"t_test_usage\" : 0,\n \"rate_usage\" : 0,\n \"string_stats_usage\" : 0,\n \"moving_percentiles_usage\" : 0,\n \"multi_terms_usage\" : 0\n }\n },\n \"data_streams\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"data_streams\" : 0,\n \"indices_count\" : 0\n },\n \"data_lifecycle\" : {\n \"available\": true,\n \"enabled\": true,\n \"count\": 0,\n \"default_rollover_used\": true,\n \"data_retention\": {\n \"configured_data_streams\": 0\n },\n \"effective_retention\": {\n \"retained_data_streams\": 0\n },\n \"global_retention\": {\n \"default\": {\n \"defined\": false\n },\n \"max\": {\n \"defined\": false\n }\n }\n },\n \"data_tiers\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"data_warm\" : {\n \"node_count\" : 0,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n },\n \"data_frozen\" : {\n \"node_count\" : 1,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n },\n \"data_cold\" : {\n \"node_count\" : 0,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n },\n \"data_content\" : {\n \"node_count\" : 0,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n },\n \"data_hot\" : {\n \"node_count\" : 0,\n \"index_count\" : 0,\n \"total_shard_count\" : 0,\n \"primary_shard_count\" : 0,\n \"doc_count\" : 0,\n \"total_size_bytes\" : 0,\n \"primary_size_bytes\" : 0,\n \"primary_shard_size_avg_bytes\" : 0,\n \"primary_shard_size_median_bytes\" : 0,\n \"primary_shard_size_mad_bytes\" : 0\n }\n },\n \"aggregate_metric\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"archive\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"indices_count\" : 0\n },\n \"health_api\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"invocations\": {\n \"total\": 0\n }\n },\n \"remote_clusters\": {\n \"size\": 0,\n \"mode\": {\n \"proxy\": 0,\n \"sniff\": 0\n },\n \"security\": {\n \"cert\": 0,\n \"api_key\": 0\n }\n },\n \"enterprise_search\" : {\n \"available\": true,\n \"enabled\": true,\n \"search_applications\" : {\n \"count\": 0\n },\n \"analytics_collections\": {\n \"count\": 0\n },\n \"query_rulesets\": {\n \"total_rule_count\": 0,\n \"total_count\": 0,\n \"min_rule_count\": 0,\n \"max_rule_count\": 0\n }\n },\n \"universal_profiling\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"logsdb\": {\n \"available\": true,\n \"enabled\": false,\n \"indices_count\": 0,\n \"indices_with_synthetic_source\": 0,\n \"num_docs\": 0,\n \"size_in_bytes\": 0,\n \"has_custom_cutoff_date\": false\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_xpack/usage\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`\n" + ], + "x-api": "usage.xpack", + "x-category": "info", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + } + }, + "components": { + "schemas": { + "_types.Id": { + "type": "string" + }, + "_types.AcknowledgedResponseBase": { + "type": "object", + "properties": { + "acknowledged": { + "description": "For a successful response, this value is always true. On failure, an exception is returned instead.", + "type": "boolean" + } + }, + "required": [ + "acknowledged" + ] + }, + "_types.Duration": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units" + }, + "description": "A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and\n`d` (days). Also accepts \"0\" without a unit and \"-1\" to indicate an unspecified value.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "-1" + ] + }, + { + "type": "string", + "enum": [ + "0" + ] + } + ] + }, + "async_search._types.AsyncSearchDocumentResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/async_search._types.AsyncSearchResponseBase" + }, + { + "type": "object", + "properties": { + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/async_search._types.AsyncSearch" + } + ] + } + }, + "required": [ + "response" + ] + } + ] + }, + "async_search._types.AsyncSearch": { + "type": "object", + "properties": { + "aggregations": { + "description": "Partial aggregations results, coming from the shards that have already completed running the query.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" + } + }, + "_clusters": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "max_score": { + "type": "number" + }, + "num_reduce_phases": { + "description": "Indicates how many reductions of the results have been performed.\nIf this number increases compared to the last retrieved results for a get asynch search request, you can expect additional results included in the search response.", + "type": "number" + }, + "profile": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Profile" + } + ] + }, + "pit_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_scroll_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] + }, + "_shards": { + "description": "Indicates how many shards have run the query.\nNote that in order for shard results to be included in the search response, they need to be reduced first.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "suggest": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Suggest" + } + } + }, + "terminated_early": { + "type": "boolean" + }, + "timed_out": { + "type": "boolean" + }, + "took": { + "type": "number" + } + }, + "required": [ + "hits", + "_shards", + "timed_out", + "took" + ] + }, + "_types.aggregations.Aggregate": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CardinalityAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.HdrPercentilesAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.HdrPercentileRanksAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.TDigestPercentilesAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.TDigestPercentileRanksAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.PercentilesBucketAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.MedianAbsoluteDeviationAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.MinAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.MaxAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.SumAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.AvgAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.WeightedAvgAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ValueCountAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.SimpleValueAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.DerivativeAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.BucketMetricValueAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ChangePointAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.StatsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.StatsBucketAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsBucketAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.CartesianBoundsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.CartesianCentroidAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.GeoBoundsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.GeoCentroidAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.HistogramAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.DateHistogramAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.AutoDateHistogramAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.VariableWidthHistogramAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.StringTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.LongTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.DoubleTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.UnmappedTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.LongRareTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.StringRareTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.UnmappedRareTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.MultiTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.MissingAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.NestedAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ReverseNestedAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.GlobalAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.FilterAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ChildrenAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ParentAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.SamplerAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.UnmappedSamplerAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.GeoHashGridAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.GeoTileGridAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.GeoHexGridAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.RangeAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.DateRangeAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.GeoDistanceAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.IpRangeAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.IpPrefixAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.FiltersAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.AdjacencyMatrixAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.SignificantLongTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.SignificantStringTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.UnmappedSignificantTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.TimeSeriesAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ScriptedMetricAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.TopHitsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.InferenceAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.StringStatsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.BoxPlotAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.TopMetricsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.TTestAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.RateAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.CumulativeCardinalityAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.MatrixStatsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.GeoLineAggregate" + } + ] + }, + "_types.aggregations.CardinalityAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.aggregations.AggregateBase": { + "type": "object", + "properties": { + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + } + } + }, + "_types.Metadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "_types.aggregations.HdrPercentilesAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.PercentilesAggregateBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "values": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Percentiles" + } + ] + } + }, + "required": [ + "values" + ] + } + ] + }, + "_types.aggregations.Percentiles": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.KeyedPercentiles" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.ArrayPercentilesItem" + } + } + ] + }, + "_types.aggregations.KeyedPercentiles": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + } + }, + "_types.aggregations.ArrayPercentilesItem": { + "type": "object", + "properties": { + "key": { + "type": "number" + }, + "value": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "value_as_string": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ] + }, + "_types.aggregations.HdrPercentileRanksAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TDigestPercentilesAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TDigestPercentileRanksAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.PercentilesBucketAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MedianAbsoluteDeviationAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SingleMetricAggregateBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The metric value. A missing value generally means that there was no data to aggregate,\nunless specified otherwise.", + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "value_as_string": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.aggregations.MinAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MaxAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SumAggregate": { + "description": "Sum aggregation result. `value` is always present and is zero if there were no values to process.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.AvgAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.WeightedAvgAggregate": { + "description": "Weighted average aggregation result. `value` is missing if the weight was set to zero.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.ValueCountAggregate": { + "description": "Value count aggregation result. `value` is always present.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SimpleValueAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.DerivativeAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object", + "properties": { + "normalized_value": { + "type": "number" + }, + "normalized_value_as_string": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.BucketMetricValueAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase" + }, + { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "keys" + ] + } + ] + }, + "_types.aggregations.ChangePointAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ChangeType" + } + ] + }, + "bucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ChangePointBucket" + } + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.aggregations.ChangeType": { + "type": "object", + "properties": { + "dip": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Dip" + } + ] + }, + "distribution_change": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.DistributionChange" + } + ] + }, + "indeterminable": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Indeterminable" + } + ] + }, + "non_stationary": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.NonStationary" + } + ] + }, + "spike": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Spike" + } + ] + }, + "stationary": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Stationary" + } + ] + }, + "step_change": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.StepChange" + } + ] + }, + "trend_change": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TrendChange" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.aggregations.Dip": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AbstractChangePoint" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.AbstractChangePoint": { + "type": "object", + "properties": { + "p_value": { + "type": "number" + }, + "change_point": { + "type": "number" + } + }, + "required": [ + "p_value", + "change_point" + ] + }, + "_types.aggregations.DistributionChange": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AbstractChangePoint" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.Indeterminable": { + "type": "object", + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ] + }, + "_types.aggregations.NonStationary": { + "type": "object", + "properties": { + "p_value": { + "type": "number" + }, + "r_value": { + "type": "number" + }, + "trend": { + "type": "string" + } + }, + "required": [ + "p_value", + "r_value", + "trend" + ] + }, + "_types.aggregations.Spike": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AbstractChangePoint" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.Stationary": { + "type": "object" + }, + "_types.aggregations.StepChange": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AbstractChangePoint" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TrendChange": { + "type": "object", + "properties": { + "p_value": { + "type": "number" + }, + "r_value": { + "type": "number" + }, + "change_point": { + "type": "number" + } + }, + "required": [ + "p_value", + "r_value", + "change_point" + ] + }, + "_types.aggregations.ChangePointBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + } + ] + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.FieldValue": { + "description": "A field value.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "_types.aggregations.MultiBucketBase": { + "description": "Base type for multi-bucket aggregation results that can hold sub-aggregations results.", + "type": "object", + "properties": { + "doc_count": { + "type": "number" + } + }, + "required": [ + "doc_count" + ] + }, + "_types.aggregations.StatsAggregate": { + "description": "Statistics aggregation result. `min`, `max` and `avg` are missing if there were no values to process\n(`count` is zero).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "min": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "max": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "avg": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "sum": { + "type": "number" + }, + "min_as_string": { + "type": "string" + }, + "max_as_string": { + "type": "string" + }, + "avg_as_string": { + "type": "string" + }, + "sum_as_string": { + "type": "string" + } + }, + "required": [ + "count", + "min", + "max", + "avg", + "sum" + ] + } + ] + }, + "_types.aggregations.StatsBucketAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.StatsAggregate" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.ExtendedStatsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.StatsAggregate" + }, + { + "type": "object", + "properties": { + "sum_of_squares": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "variance": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "variance_population": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "variance_sampling": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "std_deviation": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "std_deviation_population": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "std_deviation_sampling": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "std_deviation_bounds": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.StandardDeviationBounds" + } + ] + }, + "sum_of_squares_as_string": { + "type": "string" + }, + "variance_as_string": { + "type": "string" + }, + "variance_population_as_string": { + "type": "string" + }, + "variance_sampling_as_string": { + "type": "string" + }, + "std_deviation_as_string": { + "type": "string" + }, + "std_deviation_bounds_as_string": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.StandardDeviationBoundsAsString" + } + ] + } + }, + "required": [ + "sum_of_squares", + "variance", + "variance_population", + "variance_sampling", + "std_deviation", + "std_deviation_population", + "std_deviation_sampling" + ] + } + ] + }, + "_types.aggregations.StandardDeviationBounds": { + "type": "object", + "properties": { + "upper": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "lower": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "upper_population": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "lower_population": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "upper_sampling": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "lower_sampling": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + } + }, + "required": [ + "upper", + "lower", + "upper_population", + "lower_population", + "upper_sampling", + "lower_sampling" + ] + }, + "_types.aggregations.StandardDeviationBoundsAsString": { + "type": "object", + "properties": { + "upper": { + "type": "string" + }, + "lower": { + "type": "string" + }, + "upper_population": { + "type": "string" + }, + "lower_population": { + "type": "string" + }, + "upper_sampling": { + "type": "string" + }, + "lower_sampling": { + "type": "string" + } + }, + "required": [ + "upper", + "lower", + "upper_population", + "lower_population", + "upper_sampling", + "lower_sampling" + ] + }, + "_types.aggregations.ExtendedStatsBucketAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsAggregate" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.CartesianBoundsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "bounds": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TopLeftBottomRightGeoBounds" + } + ] + } + } + } + ] + }, + "_types.TopLeftBottomRightGeoBounds": { + "type": "object", + "properties": { + "top_left": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + }, + "bottom_right": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + } + }, + "required": [ + "top_left", + "bottom_right" + ] + }, + "_types.GeoLocation": { + "description": "A latitude/longitude as a 2 dimensional point. It can be represented in various ways:\n- as a `{lat, long}` object\n- as a geo hash value\n- as a `[lon, lat]` array\n- as a string in `\", \"` or WKT point formats", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.LatLonGeoLocation" + }, + { + "$ref": "#/components/schemas/_types.GeoHashLocation" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "string" + } + ] + }, + "_types.LatLonGeoLocation": { + "type": "object", + "properties": { + "lat": { + "description": "Latitude", + "type": "number" + }, + "lon": { + "description": "Longitude", + "type": "number" + } + }, + "required": [ + "lat", + "lon" + ] + }, + "_types.GeoHashLocation": { + "type": "object", + "properties": { + "geohash": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoHash" + } + ] + } + }, + "required": [ + "geohash" + ] + }, + "_types.GeoHash": { + "type": "string" + }, + "_types.aggregations.CartesianCentroidAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.CartesianPoint" + } + ] + } + }, + "required": [ + "count" + ] + } + ] + }, + "_types.CartesianPoint": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "_types.aggregations.GeoBoundsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "bounds": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoBounds" + } + ] + } + } + } + ] + }, + "_types.GeoBounds": { + "description": "A geo bounding box. It can be represented in various ways:\n- as 4 top/bottom/left/right coordinates\n- as 2 top_left / bottom_right points\n- as 2 top_right / bottom_left points\n- as a WKT bounding box", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.CoordsGeoBounds" + }, + { + "$ref": "#/components/schemas/_types.TopLeftBottomRightGeoBounds" + }, + { + "$ref": "#/components/schemas/_types.TopRightBottomLeftGeoBounds" + }, + { + "$ref": "#/components/schemas/_types.WktGeoBounds" + } + ] + }, + "_types.CoordsGeoBounds": { + "type": "object", + "properties": { + "top": { + "type": "number" + }, + "bottom": { + "type": "number" + }, + "left": { + "type": "number" + }, + "right": { + "type": "number" + } + }, + "required": [ + "top", + "bottom", + "left", + "right" + ] + }, + "_types.TopRightBottomLeftGeoBounds": { + "type": "object", + "properties": { + "top_right": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + }, + "bottom_left": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + } + }, + "required": [ + "top_right", + "bottom_left" + ] + }, + "_types.WktGeoBounds": { + "type": "object", + "properties": { + "wkt": { + "type": "string" + } + }, + "required": [ + "wkt" + ] + }, + "_types.aggregations.GeoCentroidAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + } + }, + "required": [ + "count" + ] + } + ] + }, + "_types.aggregations.HistogramAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseHistogramBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseHistogramBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsHistogramBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsHistogramBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.HistogramBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.HistogramBucket" + } + } + ] + }, + "_types.aggregations.HistogramBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key_as_string": { + "type": "string" + }, + "key": { + "type": "number" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.DateHistogramAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsDateHistogramBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsDateHistogramBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.DateHistogramBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.DateHistogramBucket" + } + } + ] + }, + "_types.aggregations.DateHistogramBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key_as_string": { + "type": "string" + }, + "key": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.EpochTimeUnitMillis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitMillis" + } + ] + }, + "_types.UnitMillis": { + "description": "Time unit for milliseconds", + "type": "number" + }, + "_types.aggregations.AutoDateHistogramAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket" + }, + { + "type": "object", + "properties": { + "interval": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationLarge" + } + ] + } + }, + "required": [ + "interval" + ] + } + ] + }, + "_types.DurationLarge": { + "description": "A date histogram interval. Similar to `Duration` with additional units: `w` (week), `M` (month), `q` (quarter) and\n`y` (year)", + "type": "string" + }, + "_types.aggregations.VariableWidthHistogramAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVariableWidthHistogramBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseVariableWidthHistogramBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsVariableWidthHistogramBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsVariableWidthHistogramBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.VariableWidthHistogramBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.VariableWidthHistogramBucket" + } + } + ] + }, + "_types.aggregations.VariableWidthHistogramBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "key": { + "type": "number" + }, + "max": { + "type": "number" + }, + "min_as_string": { + "type": "string" + }, + "key_as_string": { + "type": "string" + }, + "max_as_string": { + "type": "string" + } + }, + "required": [ + "min", + "key", + "max" + ] + } + ] + }, + "_types.aggregations.StringTermsAggregate": { + "description": "Result of a `terms` aggregation when the field is a string.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseStringTermsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TermsAggregateBaseStringTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseStringTermsBucket" + }, + { + "type": "object", + "properties": { + "doc_count_error_upper_bound": { + "type": "number" + }, + "sum_other_doc_count": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseStringTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsStringTermsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsStringTermsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.StringTermsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.StringTermsBucket" + } + } + ] + }, + "_types.aggregations.StringTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + } + ] + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.TermsBucketBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "doc_count_error_upper_bound": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.LongTermsAggregate": { + "description": "Result of a `terms` aggregation when the field is some kind of whole number like a integer, long, or a date.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseLongTermsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TermsAggregateBaseLongTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseLongTermsBucket" + }, + { + "type": "object", + "properties": { + "doc_count_error_upper_bound": { + "type": "number" + }, + "sum_other_doc_count": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseLongTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsLongTermsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsLongTermsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.LongTermsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.LongTermsBucket" + } + } + ] + }, + "_types.aggregations.LongTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "number" + }, + "key_as_string": { + "type": "string" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.DoubleTermsAggregate": { + "description": "Result of a `terms` aggregation when the field is some kind of decimal number like a float, double, or distance.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseDoubleTermsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TermsAggregateBaseDoubleTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseDoubleTermsBucket" + }, + { + "type": "object", + "properties": { + "doc_count_error_upper_bound": { + "type": "number" + }, + "sum_other_doc_count": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseDoubleTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsDoubleTermsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsDoubleTermsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.DoubleTermsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.DoubleTermsBucket" + } + } + ] + }, + "_types.aggregations.DoubleTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "number" + }, + "key_as_string": { + "type": "string" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.UnmappedTermsAggregate": { + "description": "Result of a `terms` aggregation when the field is unmapped. `buckets` is always empty.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseVoid" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TermsAggregateBaseVoid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVoid" + }, + { + "type": "object", + "properties": { + "doc_count_error_upper_bound": { + "type": "number" + }, + "sum_other_doc_count": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseVoid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsVoid" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsVoid": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_spec_utils.Void" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_spec_utils.Void" + } + } + ] + }, + "_spec_utils.Void": { + "description": "The absence of any type. This is commonly used in APIs that don't return a body.\n\nAlthough \"void\" is generally used for the unit type that has only one value, this is to be interpreted as\nthe bottom type that has no value at all. Most languages have a unit type, but few have a bottom type.\n\nSee https://en.m.wikipedia.org/wiki/Unit_type and https://en.m.wikipedia.org/wiki/Bottom_type", + "type": "object" + }, + "_types.aggregations.LongRareTermsAggregate": { + "description": "Result of the `rare_terms` aggregation when the field is some kind of whole number like a integer, long, or a date.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseLongRareTermsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseLongRareTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsLongRareTermsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsLongRareTermsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.LongRareTermsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.LongRareTermsBucket" + } + } + ] + }, + "_types.aggregations.LongRareTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "number" + }, + "key_as_string": { + "type": "string" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.StringRareTermsAggregate": { + "description": "Result of the `rare_terms` aggregation when the field is a string.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseStringRareTermsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseStringRareTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsStringRareTermsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsStringRareTermsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.StringRareTermsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.StringRareTermsBucket" + } + } + ] + }, + "_types.aggregations.StringRareTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "string" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.UnmappedRareTermsAggregate": { + "description": "Result of a `rare_terms` aggregation when the field is unmapped. `buckets` is always empty.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVoid" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiTermsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseMultiTermsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TermsAggregateBaseMultiTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseMultiTermsBucket" + }, + { + "type": "object", + "properties": { + "doc_count_error_upper_bound": { + "type": "number" + }, + "sum_other_doc_count": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseMultiTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsMultiTermsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsMultiTermsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.MultiTermsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.MultiTermsBucket" + } + } + ] + }, + "_types.aggregations.MultiTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.FieldValue" + } + }, + "key_as_string": { + "type": "string" + }, + "doc_count_error_upper_bound": { + "type": "number" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.MissingAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SingleBucketAggregateBase": { + "description": "Base type for single-bucket aggregation results that can hold sub-aggregations results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "doc_count": { + "type": "number" + } + }, + "required": [ + "doc_count" + ] + } + ] + }, + "_types.aggregations.NestedAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.ReverseNestedAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.GlobalAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.FilterAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.ChildrenAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.ParentAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SamplerAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.UnmappedSamplerAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.GeoHashGridAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseGeoHashGridBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseGeoHashGridBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsGeoHashGridBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsGeoHashGridBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.GeoHashGridBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.GeoHashGridBucket" + } + } + ] + }, + "_types.aggregations.GeoHashGridBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoHash" + } + ] + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.GeoTileGridAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseGeoTileGridBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseGeoTileGridBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsGeoTileGridBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsGeoTileGridBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.GeoTileGridBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.GeoTileGridBucket" + } + } + ] + }, + "_types.aggregations.GeoTileGridBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoTile" + } + ] + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.GeoTile": { + "description": "A map tile reference, represented as `{zoom}/{x}/{y}`", + "type": "string" + }, + "_types.aggregations.GeoHexGridAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseGeoHexGridBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseGeoHexGridBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsGeoHexGridBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsGeoHexGridBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.GeoHexGridBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.GeoHexGridBucket" + } + } + ] + }, + "_types.aggregations.GeoHexGridBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoHexCell" + } + ] + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.GeoHexCell": { + "description": "A map hex cell (H3) reference", + "type": "string" + }, + "_types.aggregations.RangeAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseRangeBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseRangeBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsRangeBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsRangeBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.RangeBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.RangeBucket" + } + } + ] + }, + "_types.aggregations.RangeBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "from": { + "type": "number" + }, + "to": { + "type": "number" + }, + "from_as_string": { + "type": "string" + }, + "to_as_string": { + "type": "string" + }, + "key": { + "description": "The bucket key. Present if the aggregation is _not_ keyed", + "type": "string" + } + } + } + ] + }, + "_types.aggregations.DateRangeAggregate": { + "description": "Result of a `date_range` aggregation. Same format as a for a `range` aggregation: `from` and `to`\nin `buckets` are milliseconds since the Epoch, represented as a floating point number.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.RangeAggregate" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.GeoDistanceAggregate": { + "description": "Result of a `geo_distance` aggregation. The unit for `from` and `to` is meters by default.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.RangeAggregate" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.IpRangeAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseIpRangeBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseIpRangeBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsIpRangeBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsIpRangeBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.IpRangeBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.IpRangeBucket" + } + } + ] + }, + "_types.aggregations.IpRangeBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.IpPrefixAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseIpPrefixBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseIpPrefixBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsIpPrefixBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsIpPrefixBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.IpPrefixBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.IpPrefixBucket" + } + } + ] + }, + "_types.aggregations.IpPrefixBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "is_ipv6": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "prefix_length": { + "type": "number" + }, + "netmask": { + "type": "string" + } + }, + "required": [ + "is_ipv6", + "key", + "prefix_length" + ] + } + ] + }, + "_types.aggregations.FiltersAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseFiltersBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseFiltersBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsFiltersBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsFiltersBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.FiltersBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.FiltersBucket" + } + } + ] + }, + "_types.aggregations.FiltersBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.AdjacencyMatrixAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseAdjacencyMatrixBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseAdjacencyMatrixBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsAdjacencyMatrixBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsAdjacencyMatrixBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AdjacencyMatrixBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.AdjacencyMatrixBucket" + } + } + ] + }, + "_types.aggregations.AdjacencyMatrixBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "string" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.SignificantLongTermsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SignificantTermsAggregateBaseSignificantLongTermsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SignificantTermsAggregateBaseSignificantLongTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseSignificantLongTermsBucket" + }, + { + "type": "object", + "properties": { + "bg_count": { + "type": "number" + }, + "doc_count": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseSignificantLongTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsSignificantLongTermsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsSignificantLongTermsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.SignificantLongTermsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.SignificantLongTermsBucket" + } + } + ] + }, + "_types.aggregations.SignificantLongTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SignificantTermsBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "number" + }, + "key_as_string": { + "type": "string" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.SignificantTermsBucketBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "bg_count": { + "type": "number" + } + }, + "required": [ + "score", + "bg_count" + ] + } + ] + }, + "_types.aggregations.SignificantStringTermsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SignificantTermsAggregateBaseSignificantStringTermsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SignificantTermsAggregateBaseSignificantStringTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseSignificantStringTermsBucket" + }, + { + "type": "object", + "properties": { + "bg_count": { + "type": "number" + }, + "doc_count": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseSignificantStringTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsSignificantStringTermsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsSignificantStringTermsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.SignificantStringTermsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.SignificantStringTermsBucket" + } + } + ] + }, + "_types.aggregations.SignificantStringTermsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SignificantTermsBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "string" + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.UnmappedSignificantTermsAggregate": { + "description": "Result of the `significant_terms` aggregation on an unmapped field. `buckets` is always empty.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SignificantTermsAggregateBaseVoid" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SignificantTermsAggregateBaseVoid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVoid" + }, + { + "type": "object", + "properties": { + "bg_count": { + "type": "number" + }, + "doc_count": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.CompositeAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseCompositeBucket" + }, + { + "type": "object", + "properties": { + "after_key": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregateKey" + } + ] + } + } + } + ] + }, + "_types.aggregations.CompositeAggregateKey": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.FieldValue" + } + }, + "_types.aggregations.MultiBucketAggregateBaseCompositeBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsCompositeBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsCompositeBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.CompositeBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.CompositeBucket" + } + } + ] + }, + "_types.aggregations.CompositeBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregateKey" + } + ] + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.FrequentItemSetsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseFrequentItemSetsBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseFrequentItemSetsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsFrequentItemSetsBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsFrequentItemSetsBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsBucket" + } + } + ] + }, + "_types.aggregations.FrequentItemSetsBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "support": { + "type": "number" + } + }, + "required": [ + "key", + "support" + ] + } + ] + }, + "_types.aggregations.TimeSeriesAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseTimeSeriesBucket" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MultiBucketAggregateBaseTimeSeriesBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsTimeSeriesBucket" + } + ] + } + }, + "required": [ + "buckets" + ] + } + ] + }, + "_types.aggregations.BucketsTimeSeriesBucket": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.TimeSeriesBucket" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.TimeSeriesBucket" + } + } + ] + }, + "_types.aggregations.TimeSeriesBucket": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" + }, + { + "type": "object", + "properties": { + "key": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.FieldValue" + } + } + }, + "required": [ + "key" + ] + } + ] + }, + "_types.aggregations.ScriptedMetricAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.aggregations.TopHitsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + } + }, + "required": [ + "hits" + ] + } + ] + }, + "_global.search._types.HitsMetadata": { + "type": "object", + "properties": { + "total": { + "description": "Total hit count information, present only if `track_total_hits` wasn't `false` in the search request.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TotalHits" + }, + { + "type": "number" + } + ] + }, + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Hit" + } + }, + "max_score": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + } + }, + "required": [ + "hits" + ] + }, + "_global.search._types.TotalHits": { + "type": "object", + "properties": { + "relation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TotalHitsRelation" + } + ] + }, + "value": { + "type": "number" + } + }, + "required": [ + "relation", + "value" + ] + }, + "_global.search._types.TotalHitsRelation": { + "type": "string", + "enum": [ + "eq", + "gte" + ] + }, + "_global.search._types.Hit": { + "type": "object", + "properties": { + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_score": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "_explanation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.explain.Explanation" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "highlight": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "inner_hits": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search._types.InnerHitsResult" + } + }, + "matched_queries": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + ] + }, + "_nested": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.NestedIdentity" + } + ] + }, + "_ignored": { + "type": "array", + "items": { + "type": "string" + } + }, + "ignored_field_values": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "_shard": { + "type": "string" + }, + "_node": { + "type": "string" + }, + "_routing": { + "type": "string" + }, + "_source": { + "type": "object" + }, + "_rank": { + "type": "number" + }, + "_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_primary_term": { + "type": "number" + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } + }, + "required": [ + "_index" + ] + }, + "_types.IndexName": { + "type": "string" + }, + "_global.explain.Explanation": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.explain.ExplanationDetail" + } + }, + "value": { + "type": "number" + } + }, + "required": [ + "description", + "details", + "value" + ] + }, + "_global.explain.ExplanationDetail": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.explain.ExplanationDetail" + } + }, + "value": { + "type": "number" + } + }, + "required": [ + "description", + "value" + ] + }, + "_global.search._types.InnerHitsResult": { + "type": "object", + "properties": { + "hits": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + } + }, + "required": [ + "hits" + ] + }, + "_global.search._types.NestedIdentity": { + "type": "object", + "properties": { + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "offset": { + "type": "number" + }, + "_nested": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.NestedIdentity" + } + ] + } + }, + "required": [ + "field", + "offset" + ] + }, + "_types.Field": { + "description": "Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.", + "type": "string" + }, + "_types.SequenceNumber": { + "type": "number" + }, + "_types.VersionNumber": { + "type": "number" + }, + "_types.SortResults": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.FieldValue" + } + }, + "_types.aggregations.InferenceAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + } + ] + }, + "feature_importance": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.InferenceFeatureImportance" + } + }, + "top_classes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.InferenceTopClassEntry" + } + }, + "warning": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.InferenceFeatureImportance": { + "type": "object", + "properties": { + "feature_name": { + "type": "string" + }, + "importance": { + "type": "number" + }, + "classes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.InferenceClassImportance" + } + } + }, + "required": [ + "feature_name" + ] + }, + "_types.aggregations.InferenceClassImportance": { + "type": "object", + "properties": { + "class_name": { + "type": "string" + }, + "importance": { + "type": "number" + } + }, + "required": [ + "class_name", + "importance" + ] + }, + "_types.aggregations.InferenceTopClassEntry": { + "type": "object", + "properties": { + "class_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + } + ] + }, + "class_probability": { + "type": "number" + }, + "class_score": { + "type": "number" + } + }, + "required": [ + "class_name", + "class_probability", + "class_score" + ] + }, + "_types.aggregations.StringStatsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "min_length": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "max_length": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "avg_length": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "entropy": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "distribution": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "min_length_as_string": { + "type": "string" + }, + "max_length_as_string": { + "type": "string" + }, + "avg_length_as_string": { + "type": "string" + } + }, + "required": [ + "count", + "min_length", + "max_length", + "avg_length", + "entropy" + ] + } + ] + }, + "_types.aggregations.BoxPlotAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + }, + "q1": { + "type": "number" + }, + "q2": { + "type": "number" + }, + "q3": { + "type": "number" + }, + "lower": { + "type": "number" + }, + "upper": { + "type": "number" + }, + "min_as_string": { + "type": "string" + }, + "max_as_string": { + "type": "string" + }, + "q1_as_string": { + "type": "string" + }, + "q2_as_string": { + "type": "string" + }, + "q3_as_string": { + "type": "string" + }, + "lower_as_string": { + "type": "string" + }, + "upper_as_string": { + "type": "string" + } + }, + "required": [ + "min", + "max", + "q1", + "q2", + "q3", + "lower", + "upper" + ] + } + ] + }, + "_types.aggregations.TopMetricsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "top": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.TopMetrics" + } + } + }, + "required": [ + "top" + ] + } + ] + }, + "_types.aggregations.TopMetrics": { + "type": "object", + "properties": { + "sort": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + }, + { + "nullable": true, + "type": "string" + } + ] + } + }, + "metrics": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "required": [ + "sort", + "metrics" + ] + }, + "_types.aggregations.TTestAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "value_as_string": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.aggregations.RateAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "value_as_string": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.aggregations.CumulativeCardinalityAggregate": { + "description": "Result of the `cumulative_cardinality` aggregation", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "value_as_string": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.aggregations.MatrixStatsAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "doc_count": { + "type": "number" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.MatrixStatsFields" + } + } + }, + "required": [ + "doc_count" + ] + } + ] + }, + "_types.aggregations.MatrixStatsFields": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "count": { + "type": "number" + }, + "mean": { + "type": "number" + }, + "variance": { + "type": "number" + }, + "skewness": { + "type": "number" + }, + "kurtosis": { + "type": "number" + }, + "covariance": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "correlation": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "name", + "count", + "mean", + "variance", + "skewness", + "kurtosis", + "covariance", + "correlation" + ] + }, + "_types.aggregations.GeoLineAggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "geometry": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLine" + } + ] + }, + "properties": { + "type": "object" + } + }, + "required": [ + "type", + "geometry", + "properties" + ] + } + ] + }, + "_types.GeoLine": { + "description": "A GeoJson GeoLine.", + "type": "object", + "properties": { + "type": { + "description": "Always `\"LineString\"`", + "type": "string" + }, + "coordinates": { + "description": "Array of `[lon, lat]` coordinates", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "required": [ + "type", + "coordinates" + ] + }, + "_types.ClusterStatistics": { + "type": "object", + "properties": { + "skipped": { + "type": "number" + }, + "successful": { + "type": "number" + }, + "total": { + "type": "number" + }, + "running": { + "type": "number" + }, + "partial": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "details": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ClusterDetails" + } + } + }, + "required": [ + "skipped", + "successful", + "total", + "running", + "partial", + "failed" + ] + }, + "_types.ClusterDetails": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterSearchStatus" + } + ] + }, + "indices": { + "type": "string" + }, + "took": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "timed_out": { + "type": "boolean" + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ShardFailure" + } + } + }, + "required": [ + "status", + "indices", + "timed_out" + ] + }, + "_types.ClusterSearchStatus": { + "type": "string", + "enum": [ + "running", + "successful", + "partial", + "skipped", + "failed" + ] + }, + "_types.DurationValueUnitMillis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitMillis" + } + ] + }, + "_types.ShardStatistics": { + "type": "object", + "properties": { + "failed": { + "description": "The number of shards the operation or search attempted to run on but failed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "successful": { + "description": "The number of shards the operation or search succeeded on.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "total": { + "description": "The number of shards the operation or search will run on overall.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ShardFailure" + } + }, + "skipped": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + } + }, + "required": [ + "failed", + "successful", + "total" + ] + }, + "_types.uint": { + "type": "number" + }, + "_types.ShardFailure": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "node": { + "type": "string" + }, + "reason": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + }, + "shard": { + "type": "number" + }, + "status": { + "type": "string" + }, + "primary": { + "type": "boolean" + } + }, + "required": [ + "reason" + ] + }, + "_types.ErrorCause": { + "description": "Cause and details about a request failure. This class defines the properties common to all error types.\nAdditional details are also provided, that depend on the error type.", + "type": "object", + "properties": { + "type": { + "description": "The type of error", + "type": "string" + }, + "reason": { + "description": "A human-readable explanation of the error, in English.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "stack_trace": { + "description": "The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.", + "type": "string" + }, + "caused_by": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + }, + "root_cause": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ErrorCause" + } + }, + "suppressed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ErrorCause" + } + } + }, + "required": [ + "type" + ] + }, + "_global.search._types.Profile": { + "type": "object", + "properties": { + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.ShardProfile" + } + } + }, + "required": [ + "shards" + ] + }, + "_global.search._types.ShardProfile": { + "type": "object", + "properties": { + "aggregations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.AggregationProfile" + } + }, + "cluster": { + "type": "string" + }, + "dfs": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.DfsProfile" + } + ] + }, + "fetch": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FetchProfile" + } + ] + }, + "id": { + "type": "string" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "node_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + }, + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.SearchProfile" + } + }, + "shard_id": { + "type": "number" + } + }, + "required": [ + "aggregations", + "cluster", + "id", + "index", + "node_id", + "searches", + "shard_id" + ] + }, + "_global.search._types.AggregationProfile": { + "type": "object", + "properties": { + "breakdown": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.AggregationBreakdown" + } + ] + }, + "description": { + "type": "string" + }, + "time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "type": { + "type": "string" + }, + "debug": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.AggregationProfileDebug" + } + ] + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.AggregationProfile" + } + } + }, + "required": [ + "breakdown", + "description", + "time_in_nanos", + "type" + ] + }, + "_global.search._types.AggregationBreakdown": { + "type": "object", + "properties": { + "build_aggregation": { + "type": "number" + }, + "build_aggregation_count": { + "type": "number" + }, + "build_leaf_collector": { + "type": "number" + }, + "build_leaf_collector_count": { + "type": "number" + }, + "collect": { + "type": "number" + }, + "collect_count": { + "type": "number" + }, + "initialize": { + "type": "number" + }, + "initialize_count": { + "type": "number" + }, + "post_collection": { + "type": "number" + }, + "post_collection_count": { + "type": "number" + }, + "reduce": { + "type": "number" + }, + "reduce_count": { + "type": "number" + } + }, + "required": [ + "build_aggregation", + "build_aggregation_count", + "build_leaf_collector", + "build_leaf_collector_count", + "collect", + "collect_count", + "initialize", + "initialize_count", + "reduce", + "reduce_count" + ] + }, + "_types.DurationValueUnitNanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitNanos" + } + ] + }, + "_types.UnitNanos": { + "description": "Time unit for nanoseconds", + "type": "number" + }, + "_global.search._types.AggregationProfileDebug": { + "type": "object", + "properties": { + "segments_with_multi_valued_ords": { + "type": "number" + }, + "collection_strategy": { + "type": "string" + }, + "segments_with_single_valued_ords": { + "type": "number" + }, + "total_buckets": { + "type": "number" + }, + "built_buckets": { + "type": "number" + }, + "result_strategy": { + "type": "string" + }, + "has_filter": { + "type": "boolean" + }, + "delegate": { + "type": "string" + }, + "delegate_debug": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.AggregationProfileDebug" + } + ] + }, + "chars_fetched": { + "type": "number" + }, + "extract_count": { + "type": "number" + }, + "extract_ns": { + "type": "number" + }, + "values_fetched": { + "type": "number" + }, + "collect_analyzed_ns": { + "type": "number" + }, + "collect_analyzed_count": { + "type": "number" + }, + "surviving_buckets": { + "type": "number" + }, + "ordinals_collectors_used": { + "type": "number" + }, + "ordinals_collectors_overhead_too_high": { + "type": "number" + }, + "string_hashing_collectors_used": { + "type": "number" + }, + "numeric_collectors_used": { + "type": "number" + }, + "empty_collectors_used": { + "type": "number" + }, + "deferred_aggregators": { + "type": "array", + "items": { + "type": "string" + } + }, + "segments_with_doc_count_field": { + "type": "number" + }, + "segments_with_deleted_docs": { + "type": "number" + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.AggregationProfileDelegateDebugFilter" + } + }, + "segments_counted": { + "type": "number" + }, + "segments_collected": { + "type": "number" + }, + "map_reducer": { + "type": "string" + }, + "brute_force_used": { + "type": "number" + }, + "dynamic_pruning_attempted": { + "type": "number" + }, + "dynamic_pruning_used": { + "type": "number" + }, + "skipped_due_to_no_data": { + "type": "number" + } + } + }, + "_global.search._types.AggregationProfileDelegateDebugFilter": { + "type": "object", + "properties": { + "results_from_metadata": { + "type": "number" + }, + "query": { + "type": "string" + }, + "specialized_for": { + "type": "string" + }, + "segments_counted_in_constant_time": { + "type": "number" + } + } + }, + "_global.search._types.DfsProfile": { + "type": "object", + "properties": { + "statistics": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.DfsStatisticsProfile" + } + ] + }, + "knn": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.DfsKnnProfile" + } + } + } + }, + "_global.search._types.DfsStatisticsProfile": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "breakdown": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.DfsStatisticsBreakdown" + } + ] + }, + "debug": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.DfsStatisticsProfile" + } + } + }, + "required": [ + "type", + "description", + "time_in_nanos", + "breakdown" + ] + }, + "_global.search._types.DfsStatisticsBreakdown": { + "type": "object", + "properties": { + "collection_statistics": { + "type": "number" + }, + "collection_statistics_count": { + "type": "number" + }, + "create_weight": { + "type": "number" + }, + "create_weight_count": { + "type": "number" + }, + "rewrite": { + "type": "number" + }, + "rewrite_count": { + "type": "number" + }, + "term_statistics": { + "type": "number" + }, + "term_statistics_count": { + "type": "number" + } + }, + "required": [ + "collection_statistics", + "collection_statistics_count", + "create_weight", + "create_weight_count", + "rewrite", + "rewrite_count", + "term_statistics", + "term_statistics_count" + ] + }, + "_global.search._types.DfsKnnProfile": { + "type": "object", + "properties": { + "vector_operations_count": { + "type": "number" + }, + "query": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.KnnQueryProfileResult" + } + }, + "rewrite_time": { + "type": "number" + }, + "collector": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.KnnCollectorResult" + } + } + }, + "required": [ + "query", + "rewrite_time", + "collector" + ] + }, + "_global.search._types.KnnQueryProfileResult": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "breakdown": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.KnnQueryProfileBreakdown" + } + ] + }, + "debug": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.KnnQueryProfileResult" + } + } + }, + "required": [ + "type", + "description", + "time_in_nanos", + "breakdown" + ] + }, + "_global.search._types.KnnQueryProfileBreakdown": { + "type": "object", + "properties": { + "advance": { + "type": "number" + }, + "advance_count": { + "type": "number" + }, + "build_scorer": { + "type": "number" + }, + "build_scorer_count": { + "type": "number" + }, + "compute_max_score": { + "type": "number" + }, + "compute_max_score_count": { + "type": "number" + }, + "count_weight": { + "type": "number" + }, + "count_weight_count": { + "type": "number" + }, + "create_weight": { + "type": "number" + }, + "create_weight_count": { + "type": "number" + }, + "match": { + "type": "number" + }, + "match_count": { + "type": "number" + }, + "next_doc": { + "type": "number" + }, + "next_doc_count": { + "type": "number" + }, + "score": { + "type": "number" + }, + "score_count": { + "type": "number" + }, + "set_min_competitive_score": { + "type": "number" + }, + "set_min_competitive_score_count": { + "type": "number" + }, + "shallow_advance": { + "type": "number" + }, + "shallow_advance_count": { + "type": "number" + } + }, + "required": [ + "advance", + "advance_count", + "build_scorer", + "build_scorer_count", + "compute_max_score", + "compute_max_score_count", + "count_weight", + "count_weight_count", + "create_weight", + "create_weight_count", + "match", + "match_count", + "next_doc", + "next_doc_count", + "score", + "score_count", + "set_min_competitive_score", + "set_min_competitive_score_count", + "shallow_advance", + "shallow_advance_count" + ] + }, + "_global.search._types.KnnCollectorResult": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.KnnCollectorResult" + } + } + }, + "required": [ + "name", + "reason", + "time_in_nanos" + ] + }, + "_global.search._types.FetchProfile": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "breakdown": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FetchProfileBreakdown" + } + ] + }, + "debug": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FetchProfileDebug" + } + ] + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.FetchProfile" + } + } + }, + "required": [ + "type", + "description", + "time_in_nanos", + "breakdown" + ] + }, + "_global.search._types.FetchProfileBreakdown": { + "type": "object", + "properties": { + "load_source": { + "type": "number" + }, + "load_source_count": { + "type": "number" + }, + "load_stored_fields": { + "type": "number" + }, + "load_stored_fields_count": { + "type": "number" + }, + "next_reader": { + "type": "number" + }, + "next_reader_count": { + "type": "number" + }, + "process_count": { + "type": "number" + }, + "process": { + "type": "number" + } + } + }, + "_global.search._types.FetchProfileDebug": { + "type": "object", + "properties": { + "stored_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "fast_path": { + "type": "number" + } + } + }, + "_types.NodeId": { + "type": "string" + }, + "_global.search._types.SearchProfile": { + "type": "object", + "properties": { + "collector": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Collector" + } + }, + "query": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.QueryProfile" + } + }, + "rewrite_time": { + "type": "number" + } + }, + "required": [ + "collector", + "query", + "rewrite_time" + ] + }, + "_global.search._types.Collector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Collector" + } + } + }, + "required": [ + "name", + "reason", + "time_in_nanos" + ] + }, + "_global.search._types.QueryProfile": { + "type": "object", + "properties": { + "breakdown": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.QueryBreakdown" + } + ] + }, + "description": { + "type": "string" + }, + "time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "type": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.QueryProfile" + } + } + }, + "required": [ + "breakdown", + "description", + "time_in_nanos", + "type" + ] + }, + "_global.search._types.QueryBreakdown": { + "type": "object", + "properties": { + "advance": { + "type": "number" + }, + "advance_count": { + "type": "number" + }, + "build_scorer": { + "type": "number" + }, + "build_scorer_count": { + "type": "number" + }, + "create_weight": { + "type": "number" + }, + "create_weight_count": { + "type": "number" + }, + "match": { + "type": "number" + }, + "match_count": { + "type": "number" + }, + "shallow_advance": { + "type": "number" + }, + "shallow_advance_count": { + "type": "number" + }, + "next_doc": { + "type": "number" + }, + "next_doc_count": { + "type": "number" + }, + "score": { + "type": "number" + }, + "score_count": { + "type": "number" + }, + "compute_max_score": { + "type": "number" + }, + "compute_max_score_count": { + "type": "number" + }, + "count_weight": { + "type": "number" + }, + "count_weight_count": { + "type": "number" + }, + "set_min_competitive_score": { + "type": "number" + }, + "set_min_competitive_score_count": { + "type": "number" + } + }, + "required": [ + "advance", + "advance_count", + "build_scorer", + "build_scorer_count", + "create_weight", + "create_weight_count", + "match", + "match_count", + "shallow_advance", + "shallow_advance_count", + "next_doc", + "next_doc_count", + "score", + "score_count", + "compute_max_score", + "compute_max_score_count", + "count_weight", + "count_weight_count", + "set_min_competitive_score", + "set_min_competitive_score_count" + ] + }, + "_types.ScrollId": { + "type": "string" + }, + "_global.search._types.Suggest": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.CompletionSuggest" + }, + { + "$ref": "#/components/schemas/_global.search._types.PhraseSuggest" + }, + { + "$ref": "#/components/schemas/_global.search._types.TermSuggest" + } + ] + }, + "_global.search._types.CompletionSuggest": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SuggestBase" + }, + { + "type": "object", + "properties": { + "options": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.CompletionSuggestOption" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.CompletionSuggestOption" + } + } + ] + } + }, + "required": [ + "options" + ] + } + ] + }, + "_global.search._types.CompletionSuggestOption": { + "type": "object", + "properties": { + "collate_match": { + "type": "boolean" + }, + "contexts": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Context" + } + } + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "_id": { + "type": "string" + }, + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "_routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "_score": { + "type": "number" + }, + "_source": { + "type": "object" + }, + "text": { + "type": "string" + }, + "score": { + "type": "number" + } + }, + "required": [ + "text" + ] + }, + "_global.search._types.Context": { + "description": "Text or location that we want similar documents for or a lookup to a document's field for the text.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + }, + "_types.Routing": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "_global.search._types.SuggestBase": { + "type": "object", + "properties": { + "length": { + "type": "number" + }, + "offset": { + "type": "number" + }, + "text": { + "type": "string" + } + }, + "required": [ + "length", + "offset", + "text" + ] + }, + "_global.search._types.PhraseSuggest": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SuggestBase" + }, + { + "type": "object", + "properties": { + "options": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PhraseSuggestOption" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.PhraseSuggestOption" + } + } + ] + } + }, + "required": [ + "options" + ] + } + ] + }, + "_global.search._types.PhraseSuggestOption": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "score": { + "type": "number" + }, + "highlighted": { + "type": "string" + }, + "collate_match": { + "type": "boolean" + } + }, + "required": [ + "text", + "score" + ] + }, + "_global.search._types.TermSuggest": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SuggestBase" + }, + { + "type": "object", + "properties": { + "options": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TermSuggestOption" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.TermSuggestOption" + } + } + ] + } + }, + "required": [ + "options" + ] + } + ] + }, + "_global.search._types.TermSuggestOption": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "score": { + "type": "number" + }, + "freq": { + "type": "number" + }, + "highlighted": { + "type": "string" + }, + "collate_match": { + "type": "boolean" + } + }, + "required": [ + "text", + "score", + "freq" + ] + }, + "async_search._types.AsyncSearchResponseBase": { + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "is_partial": { + "description": "When the query is no longer running, this property indicates whether the search failed or was successfully completed on all shards.\nWhile the query is running, `is_partial` is always set to `true`.", + "type": "boolean" + }, + "is_running": { + "description": "Indicates whether the search is still running or has completed.\n\n> info\n> If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though `is_running` is `false`.", + "type": "boolean" + }, + "expiration_time": { + "description": "Indicates when the async search will expire.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "expiration_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "start_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "start_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "completion_time": { + "description": "Indicates when the async search completed.\nIt is present only when the search has completed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "completion_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + } + }, + "required": [ + "is_partial", + "is_running", + "expiration_time_in_millis", + "start_time_in_millis" + ] + }, + "_types.DateTime": { + "description": "A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a\nnumber of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string\nrepresentation.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "async_search.status.StatusResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/async_search._types.AsyncSearchResponseBase" + }, + { + "type": "object", + "properties": { + "_shards": { + "description": "The number of shards that have run the query so far.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "_clusters": { + "description": "Metadata about clusters involved in the cross-cluster search.\nIt is not shown for local-only searches.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "completion_status": { + "description": "If the async search completed, this field shows the status code of the search.\nFor example, `200` indicates that the async search was successfully completed.\n`503` indicates that the async search was completed with an error.", + "type": "number" + } + }, + "required": [ + "_shards" + ] + } + ] + }, + "_types.Indices": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } + } + ] + }, + "_types.query_dsl.Operator": { + "type": "string", + "enum": [ + "and", + "AND", + "or", + "OR" + ] + }, + "_types.Fields": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Field" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + } + ] + }, + "_types.ExpandWildcards": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.ExpandWildcard" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ExpandWildcard" + } + } + ] + }, + "_types.ExpandWildcard": { + "type": "string", + "enum": [ + "all", + "open", + "closed", + "hidden", + "none" + ] + }, + "_types.SearchType": { + "type": "string", + "enum": [ + "query_then_fetch", + "dfs_query_then_fetch" + ] + }, + "_types.SuggestMode": { + "type": "string", + "enum": [ + "missing", + "popular", + "always" + ] + }, + "_global.search._types.TrackHits": { + "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "_global.search._types.SourceConfigParam": { + "description": "Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.\nUsed as a query parameter along with the `_source_includes` and `_source_excludes` parameters.", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "_types.aggregations.AggregationContainer": { + "allOf": [ + { + "type": "object", + "properties": { + "aggregations": { + "description": "Sub-aggregations for this aggregation.\nOnly applies to bucket aggregations.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + } + } + }, + { + "type": "object", + "properties": { + "adjacency_matrix": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-adjacency-matrix-aggregation" + }, + "description": "A bucket aggregation returning a form of adjacency matrix.\nThe request provides a collection of named filter expressions, similar to the `filters` aggregation.\nEach bucket in the response represents a non-empty cell in the matrix of intersecting filters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AdjacencyMatrixAggregation" + } + ] + }, + "auto_date_histogram": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-autodatehistogram-aggregation" + }, + "description": "A multi-bucket aggregation similar to the date histogram, except instead of providing an interval to use as the width of each bucket, a target number of buckets is provided.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AutoDateHistogramAggregation" + } + ] + }, + "avg": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-avg-aggregation" + }, + "description": "A single-value metrics aggregation that computes the average of numeric values that are extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AverageAggregation" + } + ] + }, + "avg_bucket": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-avg-bucket-aggregation" + }, + "description": "A sibling pipeline aggregation which calculates the mean value of a specified metric in a sibling aggregation.\nThe specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AverageBucketAggregation" + } + ] + }, + "boxplot": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-boxplot-aggregation" + }, + "description": "A metrics aggregation that computes a box plot of numeric values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BoxplotAggregation" + } + ] + }, + "bucket_script": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-script-aggregation" + }, + "description": "A parent pipeline aggregation which runs a script which can perform per bucket computations on metrics in the parent multi-bucket aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketScriptAggregation" + } + ] + }, + "bucket_selector": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-selector-aggregation" + }, + "description": "A parent pipeline aggregation which runs a script to determine whether the current bucket will be retained in the parent multi-bucket aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketSelectorAggregation" + } + ] + }, + "bucket_sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-sort-aggregation" + }, + "description": "A parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketSortAggregation" + } + ] + }, + "bucket_count_ks_test": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-count-ks-test-aggregation" + }, + "description": "A sibling pipeline aggregation which runs a two sample Kolmogorov–Smirnov test (\"K-S test\") against a provided distribution and the distribution implied by the documents counts in the configured sibling aggregation.", + "x-state": "Technical preview", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketKsAggregation" + } + ] + }, + "bucket_correlation": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-correlation-aggregation" + }, + "description": "A sibling pipeline aggregation which runs a correlation function on the configured sibling multi-bucket aggregation.", + "x-state": "Technical preview", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketCorrelationAggregation" + } + ] + }, + "cardinality": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-cardinality-aggregation" + }, + "description": "A single-value metrics aggregation that calculates an approximate count of distinct values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CardinalityAggregation" + } + ] + }, + "cartesian_bounds": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-cartesian-bounds-aggregation" + }, + "description": "A metric aggregation that computes the spatial bounding box containing all values for a Point or Shape field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CartesianBoundsAggregation" + } + ] + }, + "cartesian_centroid": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-cartesian-centroid-aggregation" + }, + "description": "A metric aggregation that computes the weighted centroid from all coordinate values for point and shape fields.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CartesianCentroidAggregation" + } + ] + }, + "categorize_text": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-categorize-text-aggregation" + }, + "description": "A multi-bucket aggregation that groups semi-structured text into buckets.", + "x-state": "Technical preview", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CategorizeTextAggregation" + } + ] + }, + "change_point": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-change-point-aggregation" + }, + "description": "A sibling pipeline that detects, spikes, dips, and change points in a metric.\nGiven a distribution of values provided by the sibling multi-bucket aggregation,\nthis aggregation indicates the bucket of any spike or dip and/or the bucket at which\nthe largest change in the distribution of values, if they are statistically significant.\nThere must be at least 22 bucketed values. Fewer than 1,000 is preferred.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ChangePointAggregation" + } + ] + }, + "children": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-children-aggregation" + }, + "description": "A single bucket aggregation that selects child documents that have the specified type, as defined in a `join` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ChildrenAggregation" + } + ] + }, + "composite": { + "description": "A multi-bucket aggregation that creates composite buckets from different sources.\nUnlike the other multi-bucket aggregations, you can use the `composite` aggregation to paginate *all* buckets from a multi-level aggregation efficiently.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregation" + } + ] + }, + "cumulative_cardinality": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-cumulative-cardinality-aggregation" + }, + "description": "A parent pipeline aggregation which calculates the cumulative cardinality in a parent `histogram` or `date_histogram` aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CumulativeCardinalityAggregation" + } + ] + }, + "cumulative_sum": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-cumulative-sum-aggregation" + }, + "description": "A parent pipeline aggregation which calculates the cumulative sum of a specified metric in a parent `histogram` or `date_histogram` aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CumulativeSumAggregation" + } + ] + }, + "date_histogram": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-datehistogram-aggregation" + }, + "description": "A multi-bucket values source based aggregation that can be applied on date values or date range values extracted from the documents.\nIt dynamically builds fixed size (interval) buckets over the values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.DateHistogramAggregation" + } + ] + }, + "date_range": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-daterange-aggregation" + }, + "description": "A multi-bucket value source based aggregation that enables the user to define a set of date ranges - each representing a bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.DateRangeAggregation" + } + ] + }, + "derivative": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-derivative-aggregation" + }, + "description": "A parent pipeline aggregation which calculates the derivative of a specified metric in a parent `histogram` or `date_histogram` aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.DerivativeAggregation" + } + ] + }, + "diversified_sampler": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-diversified-sampler-aggregation" + }, + "description": "A filtering aggregation used to limit any sub aggregations' processing to a sample of the top-scoring documents.\nSimilar to the `sampler` aggregation, but adds the ability to limit the number of matches that share a common value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.DiversifiedSamplerAggregation" + } + ] + }, + "extended_stats": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-extendedstats-aggregation" + }, + "description": "A multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsAggregation" + } + ] + }, + "extended_stats_bucket": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-extended-stats-bucket-aggregation" + }, + "description": "A sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedStatsBucketAggregation" + } + ] + }, + "frequent_item_sets": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-frequent-item-sets-aggregation" + }, + "description": "A bucket aggregation which finds frequent item sets, a form of association rules mining that identifies items that often occur together.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsAggregation" + } + ] + }, + "filter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-filter-aggregation" + }, + "description": "A single bucket aggregation that narrows the set of documents to those that match a query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "filters": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-filters-aggregation" + }, + "description": "A multi-bucket aggregation where each bucket contains the documents that match a query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FiltersAggregation" + } + ] + }, + "geo_bounds": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geobounds-aggregation" + }, + "description": "A metric aggregation that computes the geographic bounding box containing all values for a Geopoint or Geoshape field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoBoundsAggregation" + } + ] + }, + "geo_centroid": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geocentroid-aggregation" + }, + "description": "A metric aggregation that computes the weighted centroid from all coordinate values for geo fields.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoCentroidAggregation" + } + ] + }, + "geo_distance": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geodistance-aggregation" + }, + "description": "A multi-bucket aggregation that works on `geo_point` fields.\nEvaluates the distance of each document value from an origin point and determines the buckets it belongs to, based on ranges defined in the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoDistanceAggregation" + } + ] + }, + "geohash_grid": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geohashgrid-aggregation" + }, + "description": "A multi-bucket aggregation that groups `geo_point` and `geo_shape` values into buckets that represent a grid.\nEach cell is labeled using a geohash which is of user-definable precision.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoHashGridAggregation" + } + ] + }, + "geo_line": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geo-line" + }, + "description": "Aggregates all `geo_point` values within a bucket into a `LineString` ordered by the chosen sort field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoLineAggregation" + } + ] + }, + "geotile_grid": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geotilegrid-aggregation" + }, + "description": "A multi-bucket aggregation that groups `geo_point` and `geo_shape` values into buckets that represent a grid.\nEach cell corresponds to a map tile as used by many online map sites.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoTileGridAggregation" + } + ] + }, + "geohex_grid": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geohexgrid-aggregation" + }, + "description": "A multi-bucket aggregation that groups `geo_point` and `geo_shape` values into buckets that represent a grid.\nEach cell corresponds to a H3 cell index and is labeled using the H3Index representation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeohexGridAggregation" + } + ] + }, + "global": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-global-aggregation" + }, + "description": "Defines a single bucket of all the documents within the search execution context.\nThis context is defined by the indices and the document types you’re searching on, but is not influenced by the search query itself.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GlobalAggregation" + } + ] + }, + "histogram": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-histogram-aggregation" + }, + "description": "A multi-bucket values source based aggregation that can be applied on numeric values or numeric range values extracted from the documents.\nIt dynamically builds fixed size (interval) buckets over the values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.HistogramAggregation" + } + ] + }, + "ip_range": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-iprange-aggregation" + }, + "description": "A multi-bucket value source based aggregation that enables the user to define a set of IP ranges - each representing a bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.IpRangeAggregation" + } + ] + }, + "ip_prefix": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-ipprefix-aggregation" + }, + "description": "A bucket aggregation that groups documents based on the network or sub-network of an IP address.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.IpPrefixAggregation" + } + ] + }, + "inference": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-inference-bucket-aggregation" + }, + "description": "A parent pipeline aggregation which loads a pre-trained model and performs inference on the collated result fields from the parent bucket aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.InferenceAggregation" + } + ] + }, + "line": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoLineAggregation" + } + ] + }, + "matrix_stats": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-matrix-stats-aggregation" + }, + "description": "A numeric aggregation that computes the following statistics over a set of document fields: `count`, `mean`, `variance`, `skewness`, `kurtosis`, `covariance`, and `covariance`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MatrixStatsAggregation" + } + ] + }, + "max": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-max-aggregation" + }, + "description": "A single-value metrics aggregation that returns the maximum value among the numeric values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MaxAggregation" + } + ] + }, + "max_bucket": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-max-bucket-aggregation" + }, + "description": "A sibling pipeline aggregation which identifies the bucket(s) with the maximum value of a specified metric in a sibling aggregation and outputs both the value and the key(s) of the bucket(s).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MaxBucketAggregation" + } + ] + }, + "median_absolute_deviation": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-median-absolute-deviation-aggregation" + }, + "description": "A single-value aggregation that approximates the median absolute deviation of its search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MedianAbsoluteDeviationAggregation" + } + ] + }, + "min": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-min-aggregation" + }, + "description": "A single-value metrics aggregation that returns the minimum value among numeric values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MinAggregation" + } + ] + }, + "min_bucket": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-min-bucket-aggregation" + }, + "description": "A sibling pipeline aggregation which identifies the bucket(s) with the minimum value of a specified metric in a sibling aggregation and outputs both the value and the key(s) of the bucket(s).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MinBucketAggregation" + } + ] + }, + "missing": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-missing-aggregation" + }, + "description": "A field data based single bucket aggregation, that creates a bucket of all documents in the current document set context that are missing a field value (effectively, missing a field or having the configured NULL value set).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MissingAggregation" + } + ] + }, + "moving_avg": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregation" + } + ] + }, + "moving_percentiles": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-moving-percentiles-aggregation" + }, + "description": "Given an ordered series of percentiles, \"slides\" a window across those percentiles and computes cumulative percentiles.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MovingPercentilesAggregation" + } + ] + }, + "moving_fn": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-movfn-aggregation" + }, + "description": "Given an ordered series of data, \"slides\" a window across the data and runs a custom script on each window of data.\nFor convenience, a number of common functions are predefined such as `min`, `max`, and moving averages.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MovingFunctionAggregation" + } + ] + }, + "multi_terms": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-multi-terms-aggregation" + }, + "description": "A multi-bucket value source based aggregation where buckets are dynamically built - one per unique set of values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MultiTermsAggregation" + } + ] + }, + "nested": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-nested-aggregation" + }, + "description": "A special single bucket aggregation that enables aggregating nested documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.NestedAggregation" + } + ] + }, + "normalize": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-normalize-aggregation" + }, + "description": "A parent pipeline aggregation which calculates the specific normalized/rescaled value for a specific bucket value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.NormalizeAggregation" + } + ] + }, + "parent": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-parent-aggregation" + }, + "description": "A special single bucket aggregation that selects parent documents that have the specified type, as defined in a `join` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ParentAggregation" + } + ] + }, + "percentile_ranks": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-percentile-rank-aggregation" + }, + "description": "A multi-value metrics aggregation that calculates one or more percentile ranks over numeric values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentileRanksAggregation" + } + ] + }, + "percentiles": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-percentile-aggregation" + }, + "description": "A multi-value metrics aggregation that calculates one or more percentiles over numeric values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregation" + } + ] + }, + "percentiles_bucket": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-percentiles-bucket-aggregation" + }, + "description": "A sibling pipeline aggregation which calculates percentiles across all bucket of a specified metric in a sibling aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentilesBucketAggregation" + } + ] + }, + "range": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-range-aggregation" + }, + "description": "A multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.RangeAggregation" + } + ] + }, + "rare_terms": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-rare-terms-aggregation" + }, + "description": "A multi-bucket value source based aggregation which finds \"rare\" terms — terms that are at the long-tail of the distribution and are not frequent.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.RareTermsAggregation" + } + ] + }, + "rate": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-rate-aggregation" + }, + "description": "Calculates a rate of documents or a field in each bucket.\nCan only be used inside a `date_histogram` or `composite` aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.RateAggregation" + } + ] + }, + "reverse_nested": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-reverse-nested-aggregation" + }, + "description": "A special single bucket aggregation that enables aggregating on parent documents from nested documents.\nShould only be defined inside a `nested` aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ReverseNestedAggregation" + } + ] + }, + "random_sampler": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-random-sampler-aggregation" + }, + "description": "A single bucket aggregation that randomly includes documents in the aggregated results.\nSampling provides significant speed improvement at the cost of accuracy.", + "x-state": "Technical preview; Added in 8.1.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.RandomSamplerAggregation" + } + ] + }, + "sampler": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-sampler-aggregation" + }, + "description": "A filtering aggregation used to limit any sub aggregations' processing to a sample of the top-scoring documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SamplerAggregation" + } + ] + }, + "scripted_metric": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-scripted-metric-aggregation" + }, + "description": "A metric aggregation that uses scripts to provide a metric output.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ScriptedMetricAggregation" + } + ] + }, + "serial_diff": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-serialdiff-aggregation" + }, + "description": "An aggregation that subtracts values in a time series from themselves at different time lags or periods.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SerialDifferencingAggregation" + } + ] + }, + "significant_terms": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-significantterms-aggregation" + }, + "description": "Returns interesting or unusual occurrences of terms in a set.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SignificantTermsAggregation" + } + ] + }, + "significant_text": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-significanttext-aggregation" + }, + "description": "Returns interesting or unusual occurrences of free-text terms in a set.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SignificantTextAggregation" + } + ] + }, + "stats": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-stats-aggregation" + }, + "description": "A multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.StatsAggregation" + } + ] + }, + "stats_bucket": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-stats-bucket-aggregation" + }, + "description": "A sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.StatsBucketAggregation" + } + ] + }, + "string_stats": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-string-stats-aggregation" + }, + "description": "A multi-value metrics aggregation that computes statistics over string values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.StringStatsAggregation" + } + ] + }, + "sum": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-sum-aggregation" + }, + "description": "A single-value metrics aggregation that sums numeric values that are extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SumAggregation" + } + ] + }, + "sum_bucket": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-sum-bucket-aggregation" + }, + "description": "A sibling pipeline aggregation which calculates the sum of a specified metric across all buckets in a sibling aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SumBucketAggregation" + } + ] + }, + "terms": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-terms-aggregation" + }, + "description": "A multi-bucket value source based aggregation where buckets are dynamically built - one per unique value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregation" + } + ] + }, + "time_series": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-time-series-aggregation" + }, + "description": "The time series aggregation queries data created using a time series index.\nThis is typically data such as metrics or other data streams with a time component, and requires creating an index using the time series mode.", + "x-state": "Technical preview", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TimeSeriesAggregation" + } + ] + }, + "top_hits": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-top-hits-aggregation" + }, + "description": "A metric aggregation that returns the top matching documents per bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TopHitsAggregation" + } + ] + }, + "t_test": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-ttest-aggregation" + }, + "description": "A metrics aggregation that performs a statistical hypothesis test in which the test statistic follows a Student’s t-distribution under the null hypothesis on numeric values extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TTestAggregation" + } + ] + }, + "top_metrics": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-top-metrics" + }, + "description": "A metric aggregation that selects metrics from the document with the largest or smallest sort value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TopMetricsAggregation" + } + ] + }, + "value_count": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-valuecount-aggregation" + }, + "description": "A single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ValueCountAggregation" + } + ] + }, + "weighted_avg": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-weight-avg-aggregation" + }, + "description": "A single-value metrics aggregation that computes the weighted average of numeric values that are extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.WeightedAverageAggregation" + } + ] + }, + "variable_width_histogram": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-variablewidthhistogram-aggregation" + }, + "description": "A multi-bucket aggregation similar to the histogram, except instead of providing an interval to use as the width of each bucket, a target number of buckets is provided.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.VariableWidthHistogramAggregation" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_types.aggregations.AdjacencyMatrixAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "filters": { + "description": "Filters used to create buckets.\nAt least one filter is required.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + }, + "separator": { + "description": "Separator used to concatenate filter names. Defaults to &.", + "type": "string" + } + } + } + ] + }, + "_types.query_dsl.QueryContainer": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl" + }, + "description": "An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.", + "type": "object", + "properties": { + "bool": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-bool-query" + }, + "description": "matches documents matching boolean combinations of other queries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.BoolQuery" + } + ] + }, + "boosting": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-boosting-query" + }, + "description": "Returns documents matching a `positive` query while reducing the relevance score of documents that also match a `negative` query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.BoostingQuery" + } + ] + }, + "common": { + "deprecated": true, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.CommonTermsQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "combined_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-combined-fields-query" + }, + "description": "The `combined_fields` query supports searching multiple text fields as if their contents had been indexed into one combined field.", + "x-state": "Generally available; Added in 7.13.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.CombinedFieldsQuery" + } + ] + }, + "constant_score": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-constant-score-query" + }, + "description": "Wraps a filter query and returns every matching document with a relevance score equal to the `boost` parameter value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ConstantScoreQuery" + } + ] + }, + "dis_max": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-dis-max-query" + }, + "description": "Returns documents matching one or more wrapped queries, called query clauses or clauses.\nIf a returned document matches multiple query clauses, the `dis_max` query assigns the document the highest relevance score from any matching clause, plus a tie breaking increment for any additional matching subqueries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DisMaxQuery" + } + ] + }, + "distance_feature": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-distance-feature-query" + }, + "description": "Boosts the relevance score of documents closer to a provided origin date or point.\nFor example, you can use this query to give more weight to documents closer to a certain date or location.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQuery" + } + ] + }, + "exists": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-exists-query" + }, + "description": "Returns documents that contain an indexed value for a field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ExistsQuery" + } + ] + }, + "function_score": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-function-score-query" + }, + "description": "The `function_score` enables you to modify the score of documents that are retrieved by a query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreQuery" + } + ] + }, + "fuzzy": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-fuzzy-query" + }, + "description": "Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.FuzzyQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "geo_bounding_box": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query" + }, + "description": "Matches geo_point and geo_shape values that intersect a bounding box.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.GeoBoundingBoxQuery" + } + ] + }, + "geo_distance": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-distance-query" + }, + "description": "Matches `geo_point` and `geo_shape` values within a given distance of a geopoint.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.GeoDistanceQuery" + } + ] + }, + "geo_grid": { + "description": "Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.GeoGridQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "geo_polygon": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.GeoPolygonQuery" + } + ] + }, + "geo_shape": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-shape-query" + }, + "description": "Filter documents indexed using either the `geo_shape` or the `geo_point` type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.GeoShapeQuery" + } + ] + }, + "has_child": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-has-child-query" + }, + "description": "Returns parent documents whose joined child documents match a provided query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.HasChildQuery" + } + ] + }, + "has_parent": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-has-parent-query" + }, + "description": "Returns child documents whose joined parent document matches a provided query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.HasParentQuery" + } + ] + }, + "ids": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-ids-query" + }, + "description": "Returns documents based on their IDs.\nThis query uses document IDs stored in the `_id` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IdsQuery" + } + ] + }, + "intervals": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-intervals-query" + }, + "description": "Returns documents based on the order and proximity of matching terms.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-knn-query" + }, + "description": "Finds the k nearest vectors to a query vector, as measured by a similarity\nmetric. knn query finds nearest vectors through approximate search on indexed\ndense_vectors.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.KnnQuery" + } + ] + }, + "match": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query" + }, + "description": "Returns documents that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.MatchQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "match_all": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-all-query" + }, + "description": "Matches all documents, giving them all a `_score` of 1.0.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MatchAllQuery" + } + ] + }, + "match_bool_prefix": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-bool-prefix-query" + }, + "description": "Analyzes its input and constructs a `bool` query from the terms.\nEach term except the last is used in a `term` query.\nThe last term is used in a prefix query.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.MatchBoolPrefixQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "match_none": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-all-query#query-dsl-match-none-query" + }, + "description": "Matches no documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MatchNoneQuery" + } + ] + }, + "match_phrase": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase" + }, + "description": "Analyzes the text and creates a phrase query out of the analyzed text.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.MatchPhraseQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "match_phrase_prefix": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase-prefix" + }, + "description": "Returns documents that contain the words of a provided text, in the same order as provided.\nThe last term of the provided text is treated as a prefix, matching any words that begin with that term.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.MatchPhrasePrefixQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "more_like_this": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query" + }, + "description": "Returns documents that are \"like\" a given set of documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MoreLikeThisQuery" + } + ] + }, + "multi_match": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-multi-match-query" + }, + "description": "Enables you to search for a provided text, number, date or boolean value across multiple fields.\nThe provided text is analyzed before matching.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MultiMatchQuery" + } + ] + }, + "nested": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-nested-query" + }, + "description": "Wraps another query to search nested fields.\nIf an object matches the search, the nested query returns the root parent document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.NestedQuery" + } + ] + }, + "parent_id": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-parent-id-query" + }, + "description": "Returns child documents joined to a specific parent document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ParentIdQuery" + } + ] + }, + "percolate": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-percolate-query" + }, + "description": "Matches queries stored in an index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.PercolateQuery" + } + ] + }, + "pinned": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-pinned-query" + }, + "description": "Promotes selected documents to rank higher than those matching a given query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.PinnedQuery" + } + ] + }, + "prefix": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-prefix-query" + }, + "description": "Returns documents that contain a specific prefix in a provided field.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.PrefixQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "query_string": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-query-string-query" + }, + "description": "Returns documents based on a provided query string, using a parser with a strict syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryStringQuery" + } + ] + }, + "range": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-range-query" + }, + "description": "Returns documents that contain terms within a provided range.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.RangeQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "rank_feature": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-rank-feature-query" + }, + "description": "Boosts the relevance score of documents based on the numeric value of a `rank_feature` or `rank_features` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureQuery" + } + ] + }, + "regexp": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-regexp-query" + }, + "description": "Returns documents that contain terms matching a regular expression.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.RegexpQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "rule": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RuleQuery" + } + ] + }, + "script": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-script-query" + }, + "description": "Filters documents based on a provided script.\nThe script query is typically used in a filter context.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ScriptQuery" + } + ] + }, + "script_score": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-script-score-query" + }, + "description": "Uses a script to provide a custom score for returned documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ScriptScoreQuery" + } + ] + }, + "semantic": { + "description": "A semantic query to semantic_text field types", + "x-state": "Generally available; Added in 8.15.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SemanticQuery" + } + ] + }, + "shape": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-shape-query" + }, + "description": "Queries documents that contain fields indexed using the `shape` type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ShapeQuery" + } + ] + }, + "simple_query_string": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-simple-query-string-query" + }, + "description": "Returns documents based on a provided query string, using a parser with a limited but fault-tolerant syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringQuery" + } + ] + }, + "span_containing": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-containing-query" + }, + "description": "Returns matches which enclose another span query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanContainingQuery" + } + ] + }, + "span_field_masking": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-field-masking-query" + }, + "description": "Wrapper to allow span queries to participate in composite single-field span queries by _lying_ about their search field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanFieldMaskingQuery" + } + ] + }, + "span_first": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-first-query" + }, + "description": "Matches spans near the beginning of a field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanFirstQuery" + } + ] + }, + "span_multi": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-multi-term-query" + }, + "description": "Allows you to wrap a multi term query (one of `wildcard`, `fuzzy`, `prefix`, `range`, or `regexp` query) as a `span` query, so it can be nested.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanMultiTermQuery" + } + ] + }, + "span_near": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-near-query" + }, + "description": "Matches spans which are near one another.\nYou can specify `slop`, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanNearQuery" + } + ] + }, + "span_not": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-not-query" + }, + "description": "Removes matches which overlap with another span query or which are within x tokens before (controlled by the parameter `pre`) or y tokens after (controlled by the parameter `post`) another span query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanNotQuery" + } + ] + }, + "span_or": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-query" + }, + "description": "Matches the union of its span clauses.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanOrQuery" + } + ] + }, + "span_term": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-term-query" + }, + "description": "Matches spans containing a term.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.SpanTermQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "span_within": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-within-query" + }, + "description": "Returns matches which are enclosed inside another span query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanWithinQuery" + } + ] + }, + "sparse_vector": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-sparse-vector-query" + }, + "description": "Using input query vectors or a natural language processing model to convert a query into a list of token-weight pairs, queries against a sparse vector field.", + "x-state": "Generally available; Added in 8.15.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SparseVectorQuery" + } + ] + }, + "term": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-term-query" + }, + "description": "Returns documents that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.TermQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "terms": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-terms-query" + }, + "description": "Returns documents that contain one or more exact terms in a provided field.\nTo return a document, one or more terms must exactly match a field value, including whitespace and capitalization.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.TermsQuery" + } + ] + }, + "terms_set": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-terms-set-query" + }, + "description": "Returns documents that contain a minimum number of exact terms in a provided field.\nTo return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.TermsSetQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "text_expansion": { + "deprecated": true, + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-text-expansion-query" + }, + "description": "Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.", + "x-state": "Generally available; Added in 8.8.0", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.TextExpansionQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "weighted_tokens": { + "deprecated": true, + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-weighted-tokens-query" + }, + "description": "Supports returning text_expansion query results by sending in precomputed tokens with the query.", + "x-state": "Generally available; Added in 8.13.0", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.WeightedTokensQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "wildcard": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-wildcard-query" + }, + "description": "Returns documents that contain terms matching a wildcard pattern.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.WildcardQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "wrapper": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-wrapper-query" + }, + "description": "A query that accepts any other query as base64 encoded string.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.WrapperQuery" + } + ] + }, + "type": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.TypeQuery" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.query_dsl.BoolQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "filter": { + "description": "The clause (query) must appear in matching documents.\nHowever, unlike `must`, the score of the query will be ignored.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "minimum_should_match": { + "description": "Specifies the number or percentage of `should` clauses returned documents must match.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "must": { + "description": "The clause (query) must appear in matching documents and will contribute to the score.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "must_not": { + "description": "The clause (query) must not appear in the matching documents.\nBecause scoring is ignored, a score of `0` is returned for all documents.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "should": { + "description": "The clause (query) should appear in the matching document.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + } + } + } + ] + }, + "_types.MinimumShouldMatch": { + "description": "The minimum number of terms that should match as integer, percentage or range", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "_types.query_dsl.QueryBase": { + "type": "object", + "properties": { + "boost": { + "description": "Floating point number used to decrease or increase the relevance scores of the query.\nBoost values are relative to the default value of 1.0.\nA boost value between 0 and 1.0 decreases the relevance score.\nA value greater than 1.0 increases the relevance score.", + "default": 1.0, + "type": "number" + }, + "_name": { + "type": "string" + } + } + }, + "_types.query_dsl.BoostingQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "negative_boost": { + "description": "Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query.", + "type": "number" + }, + "negative": { + "description": "Query used to decrease the relevance score of matching documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "positive": { + "description": "Any returned documents must match this query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + }, + "required": [ + "negative_boost", + "negative", + "positive" + ] + } + ] + }, + "_types.query_dsl.CommonTermsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "type": "string" + }, + "cutoff_frequency": { + "type": "number" + }, + "high_freq_operator": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + } + ] + }, + "low_freq_operator": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + } + ] + }, + "minimum_should_match": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "query": { + "type": "string" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.CombinedFieldsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "fields": { + "description": "List of fields to search. Field wildcard patterns are allowed. Only `text` fields are supported, and they must all have the same search `analyzer`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "query": { + "description": "Text to search for in the provided `fields`.\nThe `combined_fields` query analyzes the provided text before performing a search.", + "type": "string" + }, + "auto_generate_synonyms_phrase_query": { + "description": "If true, match phrase queries are automatically created for multi-term synonyms.", + "default": true, + "type": "boolean" + }, + "operator": { + "description": "Boolean logic used to interpret text in the query value.", + "default": "or", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.CombinedFieldsOperator" + } + ] + }, + "minimum_should_match": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-minimum-should-match" + }, + "description": "Minimum number of clauses that must match for a document to be returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "zero_terms_query": { + "description": "Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter.", + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.CombinedFieldsZeroTerms" + } + ] + } + }, + "required": [ + "fields", + "query" + ] + } + ] + }, + "_types.query_dsl.CombinedFieldsOperator": { + "type": "string", + "enum": [ + "or", + "and" + ] + }, + "_types.query_dsl.CombinedFieldsZeroTerms": { + "type": "string", + "enum": [ + "none", + "all" + ] + }, + "_types.query_dsl.ConstantScoreQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "filter": { + "description": "Filter query you wish to run. Any returned documents must match this query.\nFilter queries do not calculate relevance scores.\nTo speed up performance, Elasticsearch automatically caches frequently used filter queries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + }, + "required": [ + "filter" + ] + } + ] + }, + "_types.query_dsl.DisMaxQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "queries": { + "description": "One or more query clauses.\nReturned documents must match one or more of these queries.\nIf a document matches multiple queries, Elasticsearch uses the highest relevance score.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + }, + "tie_breaker": { + "description": "Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.", + "default": 0.0, + "type": "number" + } + }, + "required": [ + "queries" + ] + } + ] + }, + "_types.query_dsl.DistanceFeatureQuery": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-distance-feature-query" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.UntypedDistanceFeatureQuery" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.GeoDistanceFeatureQuery" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.DateDistanceFeatureQuery" + } + ] + }, + "_types.query_dsl.UntypedDistanceFeatureQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBase" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.DistanceFeatureQueryBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "origin": { + "description": "Date or point of origin used to calculate distances.\nIf the `field` value is a `date` or `date_nanos` field, the `origin` value must be a date.\nDate Math, such as `now-1h`, is supported.\nIf the field value is a `geo_point` field, the `origin` value must be a geopoint.", + "type": "object" + }, + "pivot": { + "description": "Distance from the `origin` at which relevance scores receive half of the `boost` value.\nIf the `field` value is a `date` or `date_nanos` field, the `pivot` value must be a time unit, such as `1h` or `10d`. If the `field` value is a `geo_point` field, the `pivot` value must be a distance unit, such as `1km` or `12m`.", + "type": "object" + }, + "field": { + "description": "Name of the field used to calculate distances. This field must meet the following criteria:\nbe a `date`, `date_nanos` or `geo_point` field;\nhave an `index` mapping parameter value of `true`, which is the default;\nhave an `doc_values` mapping parameter value of `true`, which is the default.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "origin", + "pivot", + "field" + ] + } + ] + }, + "_types.query_dsl.GeoDistanceFeatureQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBaseGeoLocationDistance" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.DistanceFeatureQueryBaseGeoLocationDistance": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "origin": { + "description": "Date or point of origin used to calculate distances.\nIf the `field` value is a `date` or `date_nanos` field, the `origin` value must be a date.\nDate Math, such as `now-1h`, is supported.\nIf the field value is a `geo_point` field, the `origin` value must be a geopoint.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + }, + "pivot": { + "description": "Distance from the `origin` at which relevance scores receive half of the `boost` value.\nIf the `field` value is a `date` or `date_nanos` field, the `pivot` value must be a time unit, such as `1h` or `10d`. If the `field` value is a `geo_point` field, the `pivot` value must be a distance unit, such as `1km` or `12m`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Distance" + } + ] + }, + "field": { + "description": "Name of the field used to calculate distances. This field must meet the following criteria:\nbe a `date`, `date_nanos` or `geo_point` field;\nhave an `index` mapping parameter value of `true`, which is the default;\nhave an `doc_values` mapping parameter value of `true`, which is the default.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "origin", + "pivot", + "field" + ] + } + ] + }, + "_types.Distance": { + "type": "string" + }, + "_types.query_dsl.DateDistanceFeatureQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBaseDateMathDuration" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.DistanceFeatureQueryBaseDateMathDuration": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "origin": { + "description": "Date or point of origin used to calculate distances.\nIf the `field` value is a `date` or `date_nanos` field, the `origin` value must be a date.\nDate Math, such as `now-1h`, is supported.\nIf the field value is a `geo_point` field, the `origin` value must be a geopoint.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateMath" + } + ] + }, + "pivot": { + "description": "Distance from the `origin` at which relevance scores receive half of the `boost` value.\nIf the `field` value is a `date` or `date_nanos` field, the `pivot` value must be a time unit, such as `1h` or `10d`. If the `field` value is a `geo_point` field, the `pivot` value must be a distance unit, such as `1km` or `12m`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "field": { + "description": "Name of the field used to calculate distances. This field must meet the following criteria:\nbe a `date`, `date_nanos` or `geo_point` field;\nhave an `index` mapping parameter value of `true`, which is the default;\nhave an `doc_values` mapping parameter value of `true`, which is the default.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "origin", + "pivot", + "field" + ] + } + ] + }, + "_types.DateMath": { + "type": "string" + }, + "_types.query_dsl.ExistsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "Name of the field you wish to search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] + } + ] + }, + "_types.query_dsl.FunctionScoreQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "boost_mode": { + "description": "Defines how he newly computed score is combined with the score of the query", + "default": "multiply", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.FunctionBoostMode" + } + ] + }, + "functions": { + "description": "One or more functions that compute a new score for each document returned by the query.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreContainer" + } + }, + "max_boost": { + "description": "Restricts the new score to not exceed the provided limit.", + "type": "number" + }, + "min_score": { + "description": "Excludes documents that do not meet the provided score threshold.", + "type": "number" + }, + "query": { + "description": "A query that determines the documents for which a new score is computed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "score_mode": { + "description": "Specifies how the computed scores are combined", + "default": "multiply", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreMode" + } + ] + } + } + } + ] + }, + "_types.query_dsl.FunctionBoostMode": { + "type": "string", + "enum": [ + "multiply", + "replace", + "sum", + "avg", + "max", + "min" + ] + }, + "_types.query_dsl.FunctionScoreContainer": { + "allOf": [ + { + "type": "object", + "properties": { + "filter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "weight": { + "type": "number" + } + } + }, + { + "type": "object", + "properties": { + "exp": { + "description": "Function that scores a document with a exponential decay, depending on the distance of a numeric field value of the document from an origin.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DecayFunction" + } + ] + }, + "gauss": { + "description": "Function that scores a document with a normal decay, depending on the distance of a numeric field value of the document from an origin.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DecayFunction" + } + ] + }, + "linear": { + "description": "Function that scores a document with a linear decay, depending on the distance of a numeric field value of the document from an origin.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DecayFunction" + } + ] + }, + "field_value_factor": { + "description": "Function allows you to use a field from a document to influence the score.\nIt’s similar to using the script_score function, however, it avoids the overhead of scripting.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.FieldValueFactorScoreFunction" + } + ] + }, + "random_score": { + "description": "Generates scores that are uniformly distributed from 0 up to but not including 1.\nIn case you want scores to be reproducible, it is possible to provide a `seed` and `field`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RandomScoreFunction" + } + ] + }, + "script_score": { + "description": "Enables you to wrap another query and customize the scoring of it optionally with a computation derived from other numeric field values in the doc using a script expression.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ScriptScoreFunction" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_types.query_dsl.DecayFunction": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.UntypedDecayFunction" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.DateDecayFunction" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.NumericDecayFunction" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.GeoDecayFunction" + } + ] + }, + "_types.query_dsl.UntypedDecayFunction": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBase" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.DecayFunctionBase": { + "type": "object", + "properties": { + "multi_value_mode": { + "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.", + "default": "min", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode" + } + ] + } + } + }, + "_types.query_dsl.MultiValueMode": { + "type": "string", + "enum": [ + "min", + "max", + "avg", + "sum" + ] + }, + "_types.query_dsl.DateDecayFunction": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBaseDateMathDuration" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.DecayFunctionBaseDateMathDuration": { + "type": "object", + "properties": { + "multi_value_mode": { + "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.", + "default": "min", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode" + } + ] + } + } + }, + "_types.query_dsl.NumericDecayFunction": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBasedoubledouble" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.DecayFunctionBasedoubledouble": { + "type": "object", + "properties": { + "multi_value_mode": { + "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.", + "default": "min", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode" + } + ] + } + } + }, + "_types.query_dsl.GeoDecayFunction": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBaseGeoLocationDistance" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.DecayFunctionBaseGeoLocationDistance": { + "type": "object", + "properties": { + "multi_value_mode": { + "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.", + "default": "min", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode" + } + ] + } + } + }, + "_types.query_dsl.FieldValueFactorScoreFunction": { + "type": "object", + "properties": { + "field": { + "description": "Field to be extracted from the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "factor": { + "description": "Optional factor to multiply the field value with.", + "default": 1.0, + "type": "number" + }, + "missing": { + "description": "Value used if the document doesn’t have that field.\nThe modifier and factor are still applied to it as though it were read from the document.", + "type": "number" + }, + "modifier": { + "description": "Modifier to apply to the field value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.FieldValueFactorModifier" + } + ] + } + }, + "required": [ + "field" + ] + }, + "_types.query_dsl.FieldValueFactorModifier": { + "type": "string", + "enum": [ + "none", + "log", + "log1p", + "log2p", + "ln", + "ln1p", + "ln2p", + "square", + "sqrt", + "reciprocal" + ] + }, + "_types.query_dsl.RandomScoreFunction": { + "type": "object", + "properties": { + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "seed": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + } + }, + "_types.query_dsl.ScriptScoreFunction": { + "type": "object", + "properties": { + "script": { + "description": "A script that computes a score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + }, + "required": [ + "script" + ] + }, + "_types.Script": { + "type": "object", + "properties": { + "source": { + "description": "The script source.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + }, + "id": { + "description": "The `id` for a stored script.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "params": { + "description": "Specifies any named parameters that are passed into the script as variables.\nUse parameters instead of hard-coded values to decrease compile time.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "lang": { + "description": "Specifies the language the script is written in.", + "default": "painless", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptLanguage" + } + ] + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "_types.ScriptSource": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_global.search._types.SearchRequestBody" + } + ] + }, + "_global.search._types.SearchRequestBody": { + "type": "object", + "properties": { + "aggregations": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" + }, + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "collapse": { + "description": "Collapses search results the values of the specified field.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "explain": { + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting" + }, + "description": "Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "track_total_hits": { + "description": "Number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "default": "10000", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + } + ] + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn" + }, + "description": "The approximate kNN search to run.", + "x-state": "Generally available; Added in 8.4.0", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.KnnSearch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.KnnSearch" + } + } + ] + }, + "rank": { + "description": "The Reciprocal Rank Fusion (RRF) to use.", + "x-state": "Generally available; Added in 8.8.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RankContainer" + } + ] + }, + "min_score": { + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in search results or results collected by aggregations.", + "type": "number" + }, + "post_filter": { + "description": "Use the `post_filter` parameter to filter search results.\nThe search hits are filtered after the aggregations are calculated.\nA post filter has no impact on the aggregation results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, + "type": "boolean" + }, + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl" + }, + "description": "The search definition using the Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + }, + "retriever": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers" + }, + "description": "A retriever is a specification to describe top documents returned from a search.\nA retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.", + "x-state": "Generally available; Added in 8.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "search_after": { + "description": "Used to retrieve the next page of hits using a set of sort values from the previous page.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "size": { + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, + "type": "number" + }, + "slice": { + "description": "Split a scrolled search into multiple slices that can be consumed independently.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results" + }, + "description": "A comma-separated list of : pairs.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#source-filtering" + }, + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nIf the `stored_fields` property is specified, the `_source` property defaults to `false`.\nOtherwise, it defaults to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "fields": { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "suggest": { + "description": "Defines a suggester that provides similar looking terms based on a provided text.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Suggester" + } + ] + }, + "terminate_after": { + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, + "type": "number" + }, + "timeout": { + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + }, + "stored_fields": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#stored-fields" + }, + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` property defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "pit": { + "description": "Limit the search to a point in time (PIT).\nIf you provide a PIT, you cannot specify an `` in the request path.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" + } + ] + }, + "runtime_mappings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/mapping/define-runtime-fields-in-search-request" + }, + "description": "One or more runtime fields in the search request.\nThese fields take precedence over mapped fields with the same name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "_global.search._types.FieldCollapse": { + "type": "object", + "properties": { + "field": { + "description": "The field to collapse the result set on", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "inner_hits": { + "description": "The number of inner hits and their sort order", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.InnerHits" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.InnerHits" + } + } + ] + }, + "max_concurrent_group_searches": { + "description": "The number of concurrent requests allowed to retrieve the inner_hits per group", + "type": "number" + }, + "collapse": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + } + }, + "required": [ + "field" + ] + }, + "_global.search._types.InnerHits": { + "type": "object", + "properties": { + "name": { + "description": "The name for the particular inner hit definition in the response.\nUseful when a search request contains multiple inner hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "size": { + "description": "The maximum number of hits to return per `inner_hits`.", + "default": 3.0, + "type": "number" + }, + "from": { + "description": "Inner hit starting document offset.", + "default": 0.0, + "type": "number" + }, + "collapse": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + }, + "docvalue_fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "explain": { + "type": "boolean" + }, + "highlight": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "ignore_unmapped": { + "type": "boolean" + }, + "script_fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "seq_no_primary_term": { + "type": "boolean" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "sort": { + "description": "How the inner hits should be sorted per `inner_hits`.\nBy default, inner hits are sorted by score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "stored_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "track_scores": { + "default": false, + "type": "boolean" + }, + "version": { + "type": "boolean" + } + } + }, + "_types.Name": { + "type": "string" + }, + "_types.query_dsl.FieldAndFormat": { + "description": "A reference to a field with formatting instructions on how to return the value", + "type": "object", + "properties": { + "field": { + "description": "A wildcard pattern. The request returns values for field names matching this pattern.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "format": { + "description": "The format in which the values are returned.", + "type": "string" + }, + "include_unmapped": { + "type": "boolean" + } + }, + "required": [ + "field" + ] + }, + "_global.search._types.Highlight": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HighlightBase" + }, + { + "type": "object", + "properties": { + "encoder": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HighlighterEncoder" + } + ] + }, + "fields": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search._types.HighlightField" + }, + "minProperties": 1, + "maxProperties": 1 + }, + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.search._types.HighlightField" + }, + "minProperties": 1, + "maxProperties": 1 + } + } + ] + } + }, + "required": [ + "fields" + ] + } + ] + }, + "_global.search._types.HighlighterEncoder": { + "type": "string", + "enum": [ + "default", + "html" + ] + }, + "_global.search._types.HighlightField": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HighlightBase" + }, + { + "type": "object", + "properties": { + "fragment_offset": { + "type": "number" + }, + "matched_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + } + } + } + ] + }, + "_global.search._types.HighlightBase": { + "type": "object", + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HighlighterType" + } + ] + }, + "boundary_chars": { + "description": "A string that contains each boundary character.", + "default": ".,!? \\t\\n", + "type": "string" + }, + "boundary_max_scan": { + "description": "How far to scan for boundary characters.", + "default": 20.0, + "type": "number" + }, + "boundary_scanner": { + "description": "Specifies how to break the highlighted fragments: chars, sentence, or word.\nOnly valid for the unified and fvh highlighters.\nDefaults to `sentence` for the `unified` highlighter. Defaults to `chars` for the `fvh` highlighter.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.BoundaryScanner" + } + ] + }, + "boundary_scanner_locale": { + "description": "Controls which locale is used to search for sentence and word boundaries.\nThis parameter takes a form of a language tag, for example: `\"en-US\"`, `\"fr-FR\"`, `\"ja-JP\"`.", + "default": "Locale.ROOT", + "type": "string" + }, + "force_source": { + "deprecated": true, + "type": "boolean" + }, + "fragmenter": { + "description": "Specifies how text should be broken up in highlight snippets: `simple` or `span`.\nOnly valid for the `plain` highlighter.", + "default": "span", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HighlighterFragmenter" + } + ] + }, + "fragment_size": { + "description": "The size of the highlighted fragment in characters.", + "default": 100.0, + "type": "number" + }, + "highlight_filter": { + "type": "boolean" + }, + "highlight_query": { + "description": "Highlight matches for a query other than the search query.\nThis is especially useful if you use a rescore query because those are not taken into account by highlighting by default.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "max_fragment_length": { + "type": "number" + }, + "max_analyzed_offset": { + "description": "If set to a non-negative value, highlighting stops at this defined maximum limit.\nThe rest of the text is not processed, thus not highlighted and no error is returned\nThe `max_analyzed_offset` query setting does not override the `index.highlight.max_analyzed_offset` setting, which prevails when it’s set to lower value than the query setting.", + "type": "number" + }, + "no_match_size": { + "description": "The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.", + "default": 0.0, + "type": "number" + }, + "number_of_fragments": { + "description": "The maximum number of fragments to return.\nIf the number of fragments is set to `0`, no fragments are returned.\nInstead, the entire field contents are highlighted and returned.\nThis can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required.\nIf `number_of_fragments` is `0`, `fragment_size` is ignored.", + "default": 5.0, + "type": "number" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "order": { + "description": "Sorts highlighted fragments by score when set to `score`.\nBy default, fragments will be output in the order they appear in the field (order: `none`).\nSetting this option to `score` will output the most relevant fragments first.\nEach highlighter applies its own logic to compute relevancy scores.", + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HighlighterOrder" + } + ] + }, + "phrase_limit": { + "description": "Controls the number of matching phrases in a document that are considered.\nPrevents the `fvh` highlighter from analyzing too many phrases and consuming too much memory.\nWhen using `matched_fields`, `phrase_limit` phrases per matched field are considered. Raising the limit increases query time and consumes more memory.\nOnly supported by the `fvh` highlighter.", + "default": 256.0, + "type": "number" + }, + "post_tags": { + "description": "Use in conjunction with `pre_tags` to define the HTML tags to use for the highlighted text.\nBy default, highlighted text is wrapped in `` and `` tags.", + "type": "array", + "items": { + "type": "string" + } + }, + "pre_tags": { + "description": "Use in conjunction with `post_tags` to define the HTML tags to use for the highlighted text.\nBy default, highlighted text is wrapped in `` and `` tags.", + "type": "array", + "items": { + "type": "string" + } + }, + "require_field_match": { + "description": "By default, only fields that contains a query match are highlighted.\nSet to `false` to highlight all fields.", + "default": true, + "type": "boolean" + }, + "tags_schema": { + "description": "Set to `styled` to use the built-in tag schema.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HighlighterTagsSchema" + } + ] + } + } + }, + "_global.search._types.HighlighterType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "plain", + "fvh", + "unified" + ] + }, + { + "type": "string" + } + ] + }, + "_global.search._types.BoundaryScanner": { + "type": "string", + "enum": [ + "chars", + "sentence", + "word" + ] + }, + "_global.search._types.HighlighterFragmenter": { + "type": "string", + "enum": [ + "simple", + "span" + ] + }, + "_global.search._types.HighlighterOrder": { + "type": "string", + "enum": [ + "score" + ] + }, + "_global.search._types.HighlighterTagsSchema": { + "type": "string", + "enum": [ + "styled" + ] + }, + "_types.ScriptField": { + "type": "object", + "properties": { + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "ignore_failure": { + "type": "boolean" + } + }, + "required": [ + "script" + ] + }, + "_types.Sort": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.SortCombinations" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.SortCombinations" + } + } + ] + }, + "_types.SortCombinations": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Field" + }, + { + "$ref": "#/components/schemas/_types.SortOptions" + } + ] + }, + "_types.SortOptions": { + "type": "object", + "properties": { + "_score": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScoreSort" + } + ] + }, + "_doc": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScoreSort" + } + ] + }, + "_geo_distance": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoDistanceSort" + } + ] + }, + "_script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSort" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.ScoreSort": { + "type": "object", + "properties": { + "order": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortOrder" + } + ] + } + } + }, + "_types.SortOrder": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "_types.GeoDistanceSort": { + "type": "object", + "properties": { + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortMode" + } + ] + }, + "distance_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoDistanceType" + } + ] + }, + "ignore_unmapped": { + "type": "boolean" + }, + "order": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortOrder" + } + ] + }, + "unit": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DistanceUnit" + } + ] + }, + "nested": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NestedSortValue" + } + ] + } + } + }, + "_types.SortMode": { + "type": "string", + "enum": [ + "min", + "max", + "sum", + "avg", + "median" + ] + }, + "_types.GeoDistanceType": { + "type": "string", + "enum": [ + "arc", + "plane" + ] + }, + "_types.DistanceUnit": { + "type": "string", + "enum": [ + "in", + "ft", + "yd", + "mi", + "nmi", + "km", + "m", + "cm", + "mm" + ] + }, + "_types.NestedSortValue": { + "type": "object", + "properties": { + "filter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "max_children": { + "type": "number" + }, + "nested": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NestedSortValue" + } + ] + }, + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "path" + ] + }, + "_types.ScriptSort": { + "type": "object", + "properties": { + "order": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortOrder" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSortType" + } + ] + }, + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortMode" + } + ] + }, + "nested": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NestedSortValue" + } + ] + } + }, + "required": [ + "script" + ] + }, + "_types.ScriptSortType": { + "type": "string", + "enum": [ + "string", + "number", + "version" + ] + }, + "_global.search._types.SourceConfig": { + "description": "Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/_global.search._types.SourceFilter" + } + ] + }, + "_global.search._types.SourceFilter": { + "type": "object", + "properties": { + "exclude_vectors": { + "description": "If `true`, vector fields are excluded from the returned source.\n\nThis option takes precedence over `includes`: any vector field will\nremain excluded even if it matches an `includes` rule.", + "type": "boolean" + }, + "excludes": { + "description": "A list of fields to exclude from the returned source.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "includes": { + "description": "A list of fields to include in the returned source.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + } + } + }, + "_types.KnnSearch": { + "type": "object", + "properties": { + "field": { + "description": "The name of the vector field to search against", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "query_vector": { + "description": "The query vector", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryVector" + } + ] + }, + "query_vector_builder": { + "description": "The query vector builder. You must provide a query_vector_builder or query_vector, but not both.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryVectorBuilder" + } + ] + }, + "k": { + "description": "The final number of nearest neighbors to return as top hits", + "type": "number" + }, + "num_candidates": { + "description": "The number of nearest neighbor candidates to consider per shard", + "type": "number" + }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "x-state": "Generally available; Added in 9.2.0", + "type": "number" + }, + "boost": { + "description": "Boost value to apply to kNN scores", + "type": "number" + }, + "filter": { + "description": "Filters for the kNN search query", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "similarity": { + "description": "The minimum similarity for a vector to be considered a match", + "type": "number" + }, + "inner_hits": { + "description": "If defined, each search hit will contain inner hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.InnerHits" + } + ] + }, + "rescore_vector": { + "description": "Apply oversampling and rescoring to quantized vectors", + "x-state": "Generally available; Added in 8.18.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RescoreVector" + } + ] + }, + "_name": { + "type": "string" + } + }, + "required": [ + "field" + ] + }, + "_types.QueryVector": { + "type": "array", + "items": { + "type": "number" + } + }, + "_types.QueryVectorBuilder": { + "type": "object", + "properties": { + "text_embedding": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TextEmbedding" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.TextEmbedding": { + "type": "object", + "properties": { + "model_id": { + "description": "Model ID is required for all dense_vector fields but\nmay be inferred for semantic_text fields", + "x-state": "Generally available; Added in 8.18.0", + "type": "string" + }, + "model_text": { + "type": "string" + } + }, + "required": [ + "model_text" + ] + }, + "_types.RescoreVector": { + "type": "object", + "properties": { + "oversample": { + "description": "Applies the specified oversample factor to k on the approximate kNN search", + "type": "number" + } + }, + "required": [ + "oversample" + ] + }, + "_types.RankContainer": { + "type": "object", + "properties": { + "rrf": { + "description": "The reciprocal rank fusion parameters", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RrfRank" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.RrfRank": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RankBase" + }, + { + "type": "object", + "properties": { + "rank_constant": { + "description": "How much influence documents in individual result sets per query have over the final ranked result set", + "type": "number" + }, + "rank_window_size": { + "description": "Size of the individual result sets per query", + "type": "number" + } + } + } + ] + }, + "_types.RankBase": { + "type": "object" + }, + "_global.search._types.Rescore": { + "allOf": [ + { + "type": "object", + "properties": { + "window_size": { + "type": "number" + } + } + }, + { + "type": "object", + "properties": { + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.RescoreQuery" + } + ] + }, + "learning_to_rank": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.LearningToRank" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.ScriptRescore" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_global.search._types.RescoreQuery": { + "type": "object", + "properties": { + "rescore_query": { + "description": "The query to use for rescoring.\nThis query is only run on the Top-K results returned by the `query` and `post_filter` phases.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "query_weight": { + "description": "Relative importance of the original query versus the rescore query.", + "default": 1.0, + "type": "number" + }, + "rescore_query_weight": { + "description": "Relative importance of the rescore query versus the original query.", + "default": 1.0, + "type": "number" + }, + "score_mode": { + "description": "Determines how scores are combined.", + "default": "total", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.ScoreMode" + } + ] + } + }, + "required": [ + "rescore_query" + ] + }, + "_global.search._types.ScoreMode": { + "type": "string", + "enum": [ + "avg", + "max", + "min", + "multiply", + "total" + ] + }, + "_global.search._types.LearningToRank": { + "type": "object", + "properties": { + "model_id": { + "description": "The unique identifier of the trained model uploaded to Elasticsearch", + "type": "string" + }, + "params": { + "description": "Named parameters to be passed to the query templates used for feature", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "model_id" + ] + }, + "_global.search._types.ScriptRescore": { + "type": "object", + "properties": { + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + }, + "required": [ + "script" + ] + }, + "_types.RetrieverContainer": { + "type": "object", + "properties": { + "standard": { + "description": "A retriever that replaces the functionality of a traditional query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.StandardRetriever" + } + ] + }, + "knn": { + "description": "A retriever that replaces the functionality of a knn search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.KnnRetriever" + } + ] + }, + "rrf": { + "description": "A retriever that produces top documents from reciprocal rank fusion (RRF).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RRFRetriever" + } + ] + }, + "text_similarity_reranker": { + "description": "A retriever that reranks the top documents based on a reranking model using the InferenceAPI", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TextSimilarityReranker" + } + ] + }, + "rule": { + "description": "A retriever that replaces the functionality of a rule query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RuleRetriever" + } + ] + }, + "rescorer": { + "description": "A retriever that re-scores only the results produced by its child retriever.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RescorerRetriever" + } + ] + }, + "linear": { + "description": "A retriever that supports the combination of different retrievers through a weighted linear combination.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.LinearRetriever" + } + ] + }, + "pinned": { + "description": "A pinned retriever applies pinned documents to the underlying retriever.\nThis retriever will rewrite to a PinnedQueryBuilder.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.PinnedRetriever" + } + ] + }, + "diversify": { + "description": "A retriever that diversifies the results from its child retriever.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DiversifyRetriever" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.StandardRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "query": { + "description": "Defines a query to retrieve a set of top documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "search_after": { + "description": "Defines a search after object parameter used for pagination.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard.", + "type": "number" + }, + "sort": { + "description": "A sort object that that specifies the order of matching documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "collapse": { + "description": "Collapses the top documents by a specified key into a single top document per key.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.FieldCollapse" + } + ] + } + } + } + ] + }, + "_types.RetrieverBase": { + "type": "object", + "properties": { + "filter": { + "description": "Query to filter the documents that can match.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", + "type": "number" + }, + "_name": { + "description": "Retriever name.", + "type": "string" + } + } + }, + "_types.KnnRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the vector field to search against.", + "type": "string" + }, + "query_vector": { + "description": "Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryVector" + } + ] + }, + "query_vector_builder": { + "description": "Defines a model to build a query vector.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryVectorBuilder" + } + ] + }, + "k": { + "description": "Number of nearest neighbors to return as top hits.", + "type": "number" + }, + "num_candidates": { + "description": "Number of nearest neighbor candidates to consider per shard.", + "type": "number" + }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "x-state": "Generally available; Added in 9.2.0", + "type": "number" + }, + "similarity": { + "description": "The minimum similarity required for a document to be considered a match.", + "type": "number" + }, + "rescore_vector": { + "description": "Apply oversampling and rescoring to quantized vectors", + "x-state": "Generally available; Added in 8.18.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RescoreVector" + } + ] + } + }, + "required": [ + "field", + "k", + "num_candidates" + ] + } + ] + }, + "_types.RRFRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "retrievers": { + "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them. Each retriever can optionally include a weight parameter.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.RRFRetrieverEntry" + } + }, + "rank_constant": { + "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", + "type": "number" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result sets per query.", + "type": "number" + }, + "query": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "retrievers" + ] + } + ] + }, + "_types.RRFRetrieverEntry": { + "description": "Either a direct RetrieverContainer (backward compatible) or an RRFRetrieverComponent with weight.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + }, + { + "$ref": "#/components/schemas/_types.RRFRetrieverComponent" + } + ] + }, + "_types.RRFRetrieverComponent": { + "description": "Wraps a retriever with an optional weight for RRF scoring.", + "type": "object", + "properties": { + "retriever": { + "description": "The nested retriever configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "weight": { + "description": "Weight multiplier for this retriever's contribution to the RRF score. Higher values increase influence. Defaults to 1.0 if not specified. Must be non-negative.", + "default": 1.0, + "type": "number" + } + }, + "required": [ + "retriever" + ] + }, + "_types.TextSimilarityReranker": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "description": "The nested retriever which will produce the first-level results, that will later be used for reranking.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "rank_window_size": { + "description": "This value determines how many documents we will consider from the nested retriever.", + "type": "number" + }, + "inference_id": { + "description": "Unique identifier of the inference endpoint created using the inference API.", + "type": "string" + }, + "inference_text": { + "description": "The text snippet used as the basis for similarity comparison.", + "type": "string" + }, + "field": { + "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text.", + "type": "string" + }, + "chunk_rescorer": { + "description": "Whether to rescore on only the best matching chunks.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ChunkRescorer" + } + ] + } + }, + "required": [ + "retriever", + "inference_text", + "field" + ] + } + ] + }, + "_types.ChunkRescorer": { + "type": "object", + "properties": { + "size": { + "description": "The number of chunks per document to evaluate for reranking.", + "type": "number" + }, + "chunking_settings": { + "description": "Chunking settings to apply", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.ChunkRescorerChunkingSettings" + } + ] + } + } + }, + "_types.mapping.ChunkRescorerChunkingSettings": { + "type": "object", + "properties": { + "strategy": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies" + }, + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", + "default": "sentence", + "type": "string" + }, + "separator_group": { + "description": "Only applicable to the `recursive` strategy and required when using it.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "type": "string" + }, + "separators": { + "description": "Only applicable to the `recursive` strategy and required when using it.\n\nA list of strings used as possible split points when chunking text.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", + "type": "array", + "items": { + "type": "string" + } + }, + "max_chunk_size": { + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", + "default": 250.0, + "type": "number" + }, + "overlap": { + "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "default": 100.0, + "type": "number" + }, + "sentence_overlap": { + "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "default": 1.0, + "type": "number" + } + }, + "required": [ + "max_chunk_size" + ] + }, + "_types.RuleRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "ruleset_ids": { + "description": "The ruleset IDs containing the rules this retriever is evaluating against.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Id" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + } + ] + }, + "match_criteria": { + "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", + "type": "object" + }, + "retriever": { + "description": "The retriever whose results rules should be applied to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "rank_window_size": { + "description": "This value determines the size of the individual result set.", + "type": "number" + } + }, + "required": [ + "ruleset_ids", + "match_criteria", + "retriever" + ] + } + ] + }, + "_types.RescorerRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "description": "Inner retriever.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "rescore": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + } + }, + "required": [ + "retriever", + "rescore" + ] + } + ] + }, + "_types.LinearRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "retrievers": { + "description": "Inner retrievers.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.InnerRetriever" + } + }, + "rank_window_size": { + "type": "number" + }, + "query": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "normalizer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScoreNormalizer" + } + ] + } + } + } + ] + }, + "_types.InnerRetriever": { + "type": "object", + "properties": { + "retriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "weight": { + "type": "number" + }, + "normalizer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScoreNormalizer" + } + ] + } + }, + "required": [ + "retriever", + "weight", + "normalizer" + ] + }, + "_types.ScoreNormalizer": { + "type": "string", + "enum": [ + "none", + "minmax", + "l2_norm" + ] + }, + "_types.PinnedRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "description": "Inner retriever.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.SpecifiedDocument" + } + }, + "rank_window_size": { + "type": "number" + } + }, + "required": [ + "retriever" + ] + } + ] + }, + "_types.SpecifiedDocument": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + } + }, + "required": [ + "id" + ] + }, + "_types.DiversifyRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "type": { + "description": "The diversification strategy to apply.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DiversifyRetrieverTypes" + } + ] + }, + "field": { + "description": "The document field on which to diversify results on.", + "type": "string" + }, + "retriever": { + "description": "The nested retriever whose results will be diversified.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverContainer" + } + ] + }, + "size": { + "description": "The number of top documents to return after diversification.", + "type": "number" + }, + "rank_window_size": { + "description": "The number of top documents from the nested retriever to consider for diversification.", + "type": "number" + }, + "query_vector": { + "description": "The query vector used for diversification.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryVector" + } + ] + }, + "query_vector_builder": { + "description": "a dense vector query vector builder to use instead of a static query_vector", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryVectorBuilder" + } + ] + }, + "lambda": { + "description": "Controls the trade-off between relevance and diversity for MMR. A value of 0.0 focuses solely on diversity, while a value of 1.0 focuses solely on relevance. Required for MMR", + "type": "number" + } + }, + "required": [ + "type", + "field", + "retriever" + ] + } + ] + }, + "_types.DiversifyRetrieverTypes": { + "type": "string", + "enum": [ + "mmr" + ] + }, + "_types.SlicedScroll": { + "type": "object", + "properties": { + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "max": { + "type": "number" + } + }, + "required": [ + "id", + "max" + ] + }, + "_global.search._types.Suggester": { + "type": "object", + "properties": { + "text": { + "description": "Global suggest text, to avoid repetition when the same text is used in several suggesters", + "type": "string" + } + } + }, + "_global.search._types.PointInTimeReference": { + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "keep_alive": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } + }, + "required": [ + "id" + ] + }, + "_types.mapping.RuntimeFields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.RuntimeField" + } + }, + "_types.mapping.RuntimeField": { + "type": "object", + "properties": { + "fields": { + "description": "For type `composite`", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.CompositeSubField" + } + }, + "fetch_fields": { + "description": "For type `lookup`", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.mapping.RuntimeFieldFetchFields" + } + }, + "format": { + "description": "A custom format for `date` type runtime fields.", + "type": "string" + }, + "input_field": { + "description": "For type `lookup`", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "target_field": { + "description": "For type `lookup`", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "target_index": { + "description": "For type `lookup`", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "script": { + "description": "Painless script executed at query time.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "type": { + "description": "Field type, which can be: `boolean`, `composite`, `date`, `double`, `geo_point`, `ip`,`keyword`, `long`, or `lookup`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFieldType" + } + ] + } + }, + "required": [ + "type" + ] + }, + "_types.mapping.CompositeSubField": { + "type": "object", + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFieldType" + } + ] + } + }, + "required": [ + "type" + ] + }, + "_types.mapping.RuntimeFieldType": { + "type": "string", + "enum": [ + "boolean", + "composite", + "date", + "double", + "geo_point", + "geo_shape", + "ip", + "keyword", + "long", + "lookup" + ] + }, + "_types.mapping.RuntimeFieldFetchFields": { + "type": "object", + "properties": { + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "format": { + "type": "string" + } + }, + "required": [ + "field" + ] + }, + "_types.ScriptLanguage": { + "anyOf": [ + { + "type": "string", + "enum": [ + "painless", + "expression", + "mustache", + "java" + ] + }, + { + "type": "string" + } + ] + }, + "_types.query_dsl.FunctionScoreMode": { + "type": "string", + "enum": [ + "multiply", + "sum", + "avg", + "first", + "max", + "min" + ] + }, + "_types.query_dsl.FuzzyQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "max_expansions": { + "description": "Maximum number of variations created.", + "default": 50.0, + "type": "number" + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged when creating expansions.", + "default": 0.0, + "type": "number" + }, + "rewrite": { + "description": "Number of beginning characters left unchanged when creating expansions.", + "default": "constant_score", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "transpositions": { + "description": "Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).", + "default": true, + "type": "boolean" + }, + "fuzziness": { + "description": "Maximum edit distance allowed for matching.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fuzziness" + } + ] + }, + "value": { + "description": "Term you wish to find in the provided field.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.MultiTermQueryRewrite": { + "type": "string" + }, + "_types.Fuzziness": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "_types.query_dsl.GeoBoundingBoxQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "type": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.GeoExecution" + } + ] + }, + "validation_method": { + "description": "Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.\nSet to `COERCE` to also try to infer correct latitude or longitude.", + "default": "'strict'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.GeoValidationMethod" + } + ] + }, + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl.GeoExecution": { + "type": "string", + "enum": [ + "memory", + "indexed" + ] + }, + "_types.query_dsl.GeoValidationMethod": { + "type": "string", + "enum": [ + "coerce", + "ignore_malformed", + "strict" + ] + }, + "_types.query_dsl.GeoDistanceQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "distance": { + "description": "The radius of the circle centred on the specified location.\nPoints which fall into this circle are considered to be matches.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Distance" + } + ] + }, + "distance_type": { + "description": "How to compute the distance.\nSet to `plane` for a faster calculation that's inaccurate on long distances and close to the poles.", + "default": "'arc'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoDistanceType" + } + ] + }, + "validation_method": { + "description": "Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.\nSet to `COERCE` to also try to infer correct latitude or longitude.", + "default": "'strict'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.GeoValidationMethod" + } + ] + }, + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, + "type": "boolean" + } + }, + "required": [ + "distance" + ] + } + ] + }, + "_types.query_dsl.GeoGridQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "geotile": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoTile" + } + ] + }, + "geohash": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoHash" + } + ] + }, + "geohex": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoHexCell" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_types.query_dsl.GeoPolygonQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "validation_method": { + "default": "'strict'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.GeoValidationMethod" + } + ] + }, + "ignore_unmapped": { + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl.GeoShapeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl.HasChildQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "default": false, + "type": "boolean" + }, + "inner_hits": { + "description": "If defined, each search hit will contain inner hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.InnerHits" + } + ] + }, + "max_children": { + "description": "Maximum number of child documents that match the query allowed for a returned parent document.\nIf the parent document exceeds this limit, it is excluded from the search results.", + "type": "number" + }, + "min_children": { + "description": "Minimum number of child documents that match the query required to match the query for a returned parent document.\nIf the parent document does not meet this limit, it is excluded from the search results.", + "type": "number" + }, + "query": { + "description": "Query you wish to run on child documents of the `type` field.\nIf a child document matches the search, the query returns the parent document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "score_mode": { + "description": "Indicates how scores for matching child documents affect the root parent document’s relevance score.", + "default": "'none'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ChildScoreMode" + } + ] + }, + "type": { + "description": "Name of the child relationship mapped for the `join` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RelationName" + } + ] + } + }, + "required": [ + "query", + "type" + ] + } + ] + }, + "_types.query_dsl.ChildScoreMode": { + "type": "string", + "enum": [ + "none", + "avg", + "sum", + "max", + "min" + ] + }, + "_types.RelationName": { + "type": "string" + }, + "_types.query_dsl.HasParentQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.\nYou can use this parameter to query multiple indices that may not contain the `parent_type`.", + "default": false, + "type": "boolean" + }, + "inner_hits": { + "description": "If defined, each search hit will contain inner hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.InnerHits" + } + ] + }, + "parent_type": { + "description": "Name of the parent relationship mapped for the `join` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RelationName" + } + ] + }, + "query": { + "description": "Query you wish to run on parent documents of the `parent_type` field.\nIf a parent document matches the search, the query returns its child documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "score": { + "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", + "default": false, + "type": "boolean" + } + }, + "required": [ + "parent_type", + "query" + ] + } + ] + }, + "_types.query_dsl.IdsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "values": { + "description": "An array of document IDs.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + } + } + } + ] + }, + "_types.Ids": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Id" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + } + ] + }, + "_types.query_dsl.IntervalsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-intervals-query" + }, + "type": "object", + "properties": { + "all_of": { + "description": "Returns matches that span a combination of other rules.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" + } + ] + }, + "any_of": { + "description": "Returns intervals produced by any of its sub-rules.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" + } + ] + }, + "fuzzy": { + "description": "Matches terms that are similar to the provided term, within an edit distance defined by `fuzziness`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" + } + ] + }, + "match": { + "description": "Matches analyzed text.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" + } + ] + }, + "prefix": { + "description": "Matches terms that start with a specified set of characters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" + } + ] + }, + "range": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRange" + } + ] + }, + "regexp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRegexp" + } + ] + }, + "wildcard": { + "description": "Matches terms using a wildcard pattern.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_types.query_dsl.IntervalsAllOf": { + "type": "object", + "properties": { + "intervals": { + "description": "An array of rules to combine. All rules must produce a match in a document for the overall source to match.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + }, + "max_gaps": { + "description": "Maximum number of positions between the matching terms.\nIntervals produced by the rules further apart than this are not considered matches.", + "default": -1.0, + "type": "number" + }, + "ordered": { + "description": "If `true`, intervals produced by the rules should appear in the order in which they are specified.", + "default": false, + "type": "boolean" + }, + "filter": { + "description": "Rule used to filter returned intervals.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + } + ] + } + }, + "required": [ + "intervals" + ] + }, + "_types.query_dsl.IntervalsContainer": { + "type": "object", + "properties": { + "all_of": { + "description": "Returns matches that span a combination of other rules.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" + } + ] + }, + "any_of": { + "description": "Returns intervals produced by any of its sub-rules.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" + } + ] + }, + "fuzzy": { + "description": "Matches analyzed text.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" + } + ] + }, + "match": { + "description": "Matches analyzed text.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" + } + ] + }, + "prefix": { + "description": "Matches terms that start with a specified set of characters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" + } + ] + }, + "range": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRange" + } + ] + }, + "regexp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRegexp" + } + ] + }, + "wildcard": { + "description": "Matches terms using a wildcard pattern.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.query_dsl.IntervalsAnyOf": { + "type": "object", + "properties": { + "intervals": { + "description": "An array of rules to match.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + }, + "filter": { + "description": "Rule used to filter returned intervals.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + } + ] + } + }, + "required": [ + "intervals" + ] + }, + "_types.query_dsl.IntervalsFilter": { + "type": "object", + "properties": { + "after": { + "description": "Query used to return intervals that follow an interval from the `filter` rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + ] + }, + "before": { + "description": "Query used to return intervals that occur before an interval from the `filter` rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + ] + }, + "contained_by": { + "description": "Query used to return intervals contained by an interval from the `filter` rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + ] + }, + "containing": { + "description": "Query used to return intervals that contain an interval from the `filter` rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + ] + }, + "not_contained_by": { + "description": "Query used to return intervals that are **not** contained by an interval from the `filter` rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + ] + }, + "not_containing": { + "description": "Query used to return intervals that do **not** contain an interval from the `filter` rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + ] + }, + "not_overlapping": { + "description": "Query used to return intervals that do **not** overlap with an interval from the `filter` rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + ] + }, + "overlapping": { + "description": "Query used to return intervals that overlap with an interval from the `filter` rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + ] + }, + "script": { + "description": "Script used to return matching documents.\nThis script must return a boolean value: `true` or `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.query_dsl.IntervalsFuzzy": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to normalize the term.", + "type": "string" + }, + "fuzziness": { + "description": "Maximum edit distance allowed for matching.", + "default": "auto", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fuzziness" + } + ] + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged when creating expansions.", + "default": 0.0, + "type": "number" + }, + "term": { + "description": "The term to match.", + "type": "string" + }, + "transpositions": { + "description": "Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, + "type": "boolean" + }, + "use_field": { + "description": "If specified, match intervals from this field rather than the top-level field.\nThe `term` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "term" + ] + }, + "_types.query_dsl.IntervalsMatch": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze terms in the query.", + "type": "string" + }, + "max_gaps": { + "description": "Maximum number of positions between the matching terms.\nTerms further apart than this are not considered matches.", + "default": -1.0, + "type": "number" + }, + "ordered": { + "description": "If `true`, matching terms must appear in their specified order.", + "default": false, + "type": "boolean" + }, + "query": { + "description": "Text you wish to find in the provided field.", + "type": "string" + }, + "use_field": { + "description": "If specified, match intervals from this field rather than the top-level field.\nThe `term` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "filter": { + "description": "An optional interval filter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + } + ] + } + }, + "required": [ + "query" + ] + }, + "_types.query_dsl.IntervalsPrefix": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze the `prefix`.", + "type": "string" + }, + "prefix": { + "description": "Beginning characters of terms you wish to find in the top-level field.", + "type": "string" + }, + "use_field": { + "description": "If specified, match intervals from this field rather than the top-level field.\nThe `prefix` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "prefix" + ] + }, + "_types.query_dsl.IntervalsRange": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze the `prefix`.", + "type": "string" + }, + "gte": { + "description": "Lower term, either gte or gt must be provided.", + "type": "string" + }, + "gt": { + "description": "Lower term, either gte or gt must be provided.", + "type": "string" + }, + "lte": { + "description": "Upper term, either lte or lt must be provided.", + "type": "string" + }, + "lt": { + "description": "Upper term, either lte or lt must be provided.", + "type": "string" + }, + "use_field": { + "description": "If specified, match intervals from this field rather than the top-level field.\nThe `prefix` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + } + }, + "_types.query_dsl.IntervalsRegexp": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze the `prefix`.", + "type": "string" + }, + "pattern": { + "description": "Regex pattern.", + "type": "string" + }, + "use_field": { + "description": "If specified, match intervals from this field rather than the top-level field.\nThe `prefix` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "pattern" + ] + }, + "_types.query_dsl.IntervalsWildcard": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze the `pattern`.\nDefaults to the top-level field's analyzer.", + "type": "string" + }, + "pattern": { + "description": "Wildcard pattern used to find matching terms.", + "type": "string" + }, + "use_field": { + "description": "If specified, match intervals from this field rather than the top-level field.\nThe `pattern` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "pattern" + ] + }, + "_types.KnnQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the vector field to search against", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "query_vector": { + "description": "The query vector", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryVector" + } + ] + }, + "query_vector_builder": { + "description": "The query vector builder. You must provide a query_vector_builder or query_vector, but not both.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryVectorBuilder" + } + ] + }, + "num_candidates": { + "description": "The number of nearest neighbor candidates to consider per shard", + "type": "number" + }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "x-state": "Generally available; Added in 9.2.0", + "type": "number" + }, + "k": { + "description": "The final number of nearest neighbors to return as top hits", + "type": "number" + }, + "filter": { + "description": "Filters for the kNN search query", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "similarity": { + "description": "The minimum similarity for a vector to be considered a match", + "type": "number" + }, + "rescore_vector": { + "description": "Apply oversampling and rescoring to quantized vectors", + "x-state": "Generally available; Added in 8.18.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RescoreVector" + } + ] + } + }, + "required": [ + "field" + ] + } + ] + }, + "_types.query_dsl.MatchQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert the text in the query value into tokens.", + "type": "string" + }, + "auto_generate_synonyms_phrase_query": { + "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, + "type": "boolean" + }, + "cutoff_frequency": { + "deprecated": true, + "type": "number" + }, + "fuzziness": { + "description": "Maximum edit distance allowed for matching.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fuzziness" + } + ] + }, + "fuzzy_rewrite": { + "description": "Method used to rewrite the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "fuzzy_transpositions": { + "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, + "type": "boolean" + }, + "lenient": { + "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", + "default": false, + "type": "boolean" + }, + "max_expansions": { + "description": "Maximum number of terms to which the query will expand.", + "default": 50.0, + "type": "number" + }, + "minimum_should_match": { + "description": "Minimum number of clauses that must match for a document to be returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "operator": { + "description": "Boolean logic used to interpret text in the query value.", + "default": "'or'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + } + ] + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, + "type": "number" + }, + "query": { + "description": "Text, number, boolean value or date you wish to find in the provided field.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "zero_terms_query": { + "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.", + "default": "'none'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + } + ] + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.ZeroTermsQuery": { + "type": "string", + "enum": [ + "all", + "none" + ] + }, + "_types.query_dsl.MatchAllQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.MatchBoolPrefixQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert the text in the query value into tokens.", + "type": "string" + }, + "fuzziness": { + "description": "Maximum edit distance allowed for matching.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fuzziness" + } + ] + }, + "fuzzy_rewrite": { + "description": "Method used to rewrite the query.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "fuzzy_transpositions": { + "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": true, + "type": "boolean" + }, + "max_expansions": { + "description": "Maximum number of terms to which the query will expand.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": 50.0, + "type": "number" + }, + "minimum_should_match": { + "description": "Minimum number of clauses that must match for a document to be returned.\nApplied to the constructed bool query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "operator": { + "description": "Boolean logic used to interpret text in the query value.\nApplied to the constructed bool query.", + "default": "'or'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + } + ] + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged for fuzzy matching.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": 0.0, + "type": "number" + }, + "query": { + "description": "Terms you wish to find in the provided field.\nThe last term is used in a prefix query.", + "type": "string" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.MatchNoneQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.MatchPhraseQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert the text in the query value into tokens.", + "type": "string" + }, + "query": { + "description": "Query terms that are analyzed and turned into a phrase query.", + "type": "string" + }, + "slop": { + "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, + "type": "number" + }, + "zero_terms_query": { + "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.", + "default": "'none'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + } + ] + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.MatchPhrasePrefixQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert text in the query value into tokens.", + "type": "string" + }, + "max_expansions": { + "description": "Maximum number of terms to which the last provided term of the query value will expand.", + "default": 50.0, + "type": "number" + }, + "query": { + "description": "Text you wish to find in the provided field.", + "type": "string" + }, + "slop": { + "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, + "type": "number" + }, + "zero_terms_query": { + "description": "Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter.", + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + } + ] + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.MoreLikeThisQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis" + }, + "description": "The analyzer that is used to analyze the free form text.\nDefaults to the analyzer associated with the first field in fields.", + "type": "string" + }, + "boost_terms": { + "description": "Each term in the formed query could be further boosted by their tf-idf score.\nThis sets the boost factor to use when using this feature.\nDefaults to deactivated (0).", + "default": 0.0, + "type": "number" + }, + "fail_on_unsupported_field": { + "description": "Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (`text` or `keyword`).", + "default": true, + "type": "boolean" + }, + "fields": { + "description": "A list of fields to fetch and analyze the text from.\nDefaults to the `index.query.default_field` index setting, which has a default value of `*`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "include": { + "description": "Specifies whether the input documents should also be included in the search results returned.", + "default": false, + "type": "boolean" + }, + "like": { + "description": "Specifies free form text and/or a single or multiple documents for which you want to find similar documents.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Like" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.Like" + } + } + ] + }, + "max_doc_freq": { + "description": "The maximum document frequency above which the terms are ignored from the input document.", + "type": "number" + }, + "max_query_terms": { + "description": "The maximum number of query terms that can be selected.", + "default": 25.0, + "type": "number" + }, + "max_word_length": { + "description": "The maximum word length above which the terms are ignored.\nDefaults to unbounded (`0`).", + "default": 0.0, + "type": "number" + }, + "min_doc_freq": { + "description": "The minimum document frequency below which the terms are ignored from the input document.", + "default": 5.0, + "type": "number" + }, + "minimum_should_match": { + "description": "After the disjunctive query has been formed, this parameter controls the number of terms that must match.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "min_term_freq": { + "description": "The minimum term frequency below which the terms are ignored from the input document.", + "default": 2.0, + "type": "number" + }, + "min_word_length": { + "description": "The minimum word length below which the terms are ignored.", + "default": 0.0, + "type": "number" + }, + "routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "stop_words": { + "description": "An array of stop words.\nAny word in this set is ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] + }, + "unlike": { + "description": "Used in combination with `like` to exclude documents that match a set of terms.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Like" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.Like" + } + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version_type": { + "default": "'internal'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] + } + }, + "required": [ + "like" + ] + } + ] + }, + "_types.query_dsl.Like": { + "description": "Text that we want similar documents for or a lookup to a document's field for the text.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.LikeDocument" + } + ] + }, + "_types.query_dsl.LikeDocument": { + "type": "object", + "properties": { + "doc": { + "description": "A document not present in the index.", + "type": "object" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "_id": { + "description": "ID of a document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "description": "Index of a document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "per_field_analyzer": { + "description": "Overrides the default analyzer.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version_type": { + "default": "'internal'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] + } + } + }, + "_types.VersionType": { + "type": "string", + "enum": [ + "internal", + "external", + "external_gte" + ] + }, + "_types.analysis.StopWords": { + "description": "Language value, such as _arabic_ or _thai_. Defaults to _english_.\nEach language value corresponds to a predefined list of stop words in Lucene. See Stop words by language for supported language values and their stop words.\nAlso accepts an array of stop words.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWordLanguage" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "_types.analysis.StopWordLanguage": { + "type": "string", + "enum": [ + "_arabic_", + "_armenian_", + "_basque_", + "_bengali_", + "_brazilian_", + "_bulgarian_", + "_catalan_", + "_cjk_", + "_czech_", + "_danish_", + "_dutch_", + "_english_", + "_estonian_", + "_finnish_", + "_french_", + "_galician_", + "_german_", + "_greek_", + "_hindi_", + "_hungarian_", + "_indonesian_", + "_irish_", + "_italian_", + "_latvian_", + "_lithuanian_", + "_norwegian_", + "_persian_", + "_portuguese_", + "_romanian_", + "_russian_", + "_serbian_", + "_sorani_", + "_spanish_", + "_swedish_", + "_thai_", + "_turkish_", + "_none_" + ] + }, + "_types.query_dsl.MultiMatchQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert the text in the query value into tokens.", + "type": "string" + }, + "auto_generate_synonyms_phrase_query": { + "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, + "type": "boolean" + }, + "cutoff_frequency": { + "deprecated": true, + "type": "number" + }, + "fields": { + "description": "The fields to be queried.\nDefaults to the `index.query.default_field` index settings, which in turn defaults to `*`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "fuzziness": { + "description": "Maximum edit distance allowed for matching.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fuzziness" + } + ] + }, + "fuzzy_rewrite": { + "description": "Method used to rewrite the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "fuzzy_transpositions": { + "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": true, + "type": "boolean" + }, + "lenient": { + "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", + "default": false, + "type": "boolean" + }, + "max_expansions": { + "description": "Maximum number of terms to which the query will expand.", + "default": 50.0, + "type": "number" + }, + "minimum_should_match": { + "description": "Minimum number of clauses that must match for a document to be returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "operator": { + "description": "Boolean logic used to interpret text in the query value.", + "default": "'or'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + } + ] + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, + "type": "number" + }, + "query": { + "description": "Text, number, boolean value or date you wish to find in the provided field.", + "type": "string" + }, + "slop": { + "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, + "type": "number" + }, + "tie_breaker": { + "description": "Determines how scores for each per-term blended query and scores across groups are combined.", + "default": 0.0, + "type": "number" + }, + "type": { + "description": "How `the` multi_match query is executed internally.", + "default": "'best_fields'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.TextQueryType" + } + ] + }, + "zero_terms_query": { + "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.", + "default": "'none'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + } + ] + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.TextQueryType": { + "type": "string", + "enum": [ + "best_fields", + "most_fields", + "cross_fields", + "phrase", + "phrase_prefix", + "bool_prefix" + ] + }, + "_types.query_dsl.NestedQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped path and not return any documents instead of an error.", + "default": false, + "type": "boolean" + }, + "inner_hits": { + "description": "If defined, each search hit will contain inner hits.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.InnerHits" + } + ] + }, + "path": { + "description": "Path to the nested object you wish to search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "query": { + "description": "Query you wish to run on nested objects in the path.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "score_mode": { + "description": "How scores for matching child objects affect the root parent document’s relevance score.", + "default": "'avg'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ChildScoreMode" + } + ] + } + }, + "required": [ + "path", + "query" + ] + } + ] + }, + "_types.query_dsl.ParentIdQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "id": { + "description": "ID of the parent document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "default": false, + "type": "boolean" + }, + "type": { + "description": "Name of the child relationship mapped for the `join` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RelationName" + } + ] + } + } + } + ] + }, + "_types.query_dsl.PercolateQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "document": { + "description": "The source of the document being percolated.", + "type": "object" + }, + "documents": { + "description": "An array of sources of the documents being percolated.", + "type": "array", + "items": { + "type": "object" + } + }, + "field": { + "description": "Field that holds the indexed queries. The field must use the `percolator` mapping type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "id": { + "description": "The ID of a stored document to percolate.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "index": { + "description": "The index of a stored document to percolate.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "name": { + "description": "The suffix used for the `_percolator_document_slot` field when multiple `percolate` queries are specified.", + "type": "string" + }, + "preference": { + "description": "Preference used to fetch document to percolate.", + "type": "string" + }, + "routing": { + "description": "Routing used to fetch document to percolate.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "version": { + "description": "The expected version of a stored document to percolate.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } + }, + "required": [ + "field" + ] + } + ] + }, + "_types.query_dsl.PinnedQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-pinned-query" + }, + "allOf": [ + { + "type": "object", + "properties": { + "organic": { + "description": "Any choice of query used to rank documents which will be ranked below the \"pinned\" documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + }, + "required": [ + "organic" + ] + }, + { + "type": "object", + "properties": { + "ids": { + "description": "Document IDs listed in the order they are to appear in results.\nRequired if `docs` is not specified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "docs": { + "description": "Documents listed in the order they are to appear in results.\nRequired if `ids` is not specified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.PinnedDoc" + } + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + } + ] + }, + "_types.query_dsl.PinnedDoc": { + "type": "object", + "properties": { + "_id": { + "description": "The unique document ID.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "description": "The index that contains the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + } + }, + "required": [ + "_id" + ] + }, + "_types.query_dsl.PrefixQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "rewrite": { + "description": "Method used to rewrite the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "value": { + "description": "Beginning characters of terms you wish to find in the provided field.", + "type": "string" + }, + "case_insensitive": { + "description": "Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`.\nDefault is `false` which means the case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, + "x-state": "Generally available; Added in 7.10.0", + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.query_dsl.QueryStringQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "allow_leading_wildcard": { + "description": "If `true`, the wildcard characters `*` and `?` are allowed as the first character of the query string.", + "default": true, + "type": "boolean" + }, + "analyzer": { + "description": "Analyzer used to convert text in the query string into tokens.", + "type": "string" + }, + "analyze_wildcard": { + "description": "If `true`, the query attempts to analyze wildcard terms in the query string.", + "default": false, + "type": "boolean" + }, + "auto_generate_synonyms_phrase_query": { + "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, + "type": "boolean" + }, + "default_field": { + "description": "Default field to search if no field is provided in the query string.\nSupports wildcards (`*`).\nDefaults to the `index.query.default_field` index setting, which has a default value of `*`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "default_operator": { + "description": "Default boolean logic used to interpret text in the query string if no operators are specified.", + "default": "'or'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + } + ] + }, + "enable_position_increments": { + "description": "If `true`, enable position increments in queries constructed from a `query_string` search.", + "default": true, + "type": "boolean" + }, + "escape": { + "default": false, + "type": "boolean" + }, + "fields": { + "description": "Array of fields to search. Supports wildcards (`*`).", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "fuzziness": { + "description": "Maximum edit distance allowed for fuzzy matching.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fuzziness" + } + ] + }, + "fuzzy_max_expansions": { + "description": "Maximum number of terms to which the query expands for fuzzy matching.", + "default": 50.0, + "type": "number" + }, + "fuzzy_prefix_length": { + "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, + "type": "number" + }, + "fuzzy_rewrite": { + "description": "Method used to rewrite the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "fuzzy_transpositions": { + "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, + "type": "boolean" + }, + "lenient": { + "description": "If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.", + "default": false, + "type": "boolean" + }, + "max_determinized_states": { + "description": "Maximum number of automaton states required for the query.", + "default": 10000.0, + "type": "number" + }, + "minimum_should_match": { + "description": "Minimum number of clauses that must match for a document to be returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "phrase_slop": { + "description": "Maximum number of positions allowed between matching tokens for phrases.", + "default": 0.0, + "type": "number" + }, + "query": { + "description": "Query string you wish to parse and use for search.", + "type": "string" + }, + "quote_analyzer": { + "description": "Analyzer used to convert quoted text in the query string into tokens.\nFor quoted text, this parameter overrides the analyzer specified in the `analyzer` parameter.", + "type": "string" + }, + "quote_field_suffix": { + "description": "Suffix appended to quoted text in the query string.\nYou can use this suffix to use a different analysis method for exact matches.", + "type": "string" + }, + "rewrite": { + "description": "Method used to rewrite the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "tie_breaker": { + "description": "How to combine the queries generated from the individual search terms in the resulting `dis_max` query.", + "type": "number" + }, + "time_zone": { + "description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + }, + "type": { + "description": "Determines how the query matches and scores documents.", + "default": "'best_fields'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.TextQueryType" + } + ] + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.TimeZone": { + "type": "string" + }, + "_types.query_dsl.RangeQuery": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-range-query" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.UntypedRangeQuery" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.DateRangeQuery" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.NumberRangeQuery" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.TermRangeQuery" + } + ] + }, + "_types.query_dsl.UntypedRangeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RangeQueryBase" + }, + { + "type": "object", + "properties": { + "format": { + "description": "Date format used to convert `date` values in the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateFormat" + } + ] + }, + "time_zone": { + "description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert `date` values in the query to UTC.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + } + } + } + ] + }, + "_types.DateFormat": { + "type": "string" + }, + "_types.query_dsl.RangeQueryBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "relation": { + "description": "Indicates how the range query matches values for `range` fields.", + "default": "intersects", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RangeRelation" + } + ] + }, + "gt": { + "description": "Greater than.", + "type": "object" + }, + "gte": { + "description": "Greater than or equal to.", + "type": "object" + }, + "lt": { + "description": "Less than.", + "type": "object" + }, + "lte": { + "description": "Less than or equal to.", + "type": "object" + } + } + } + ] + }, + "_types.query_dsl.RangeRelation": { + "type": "string", + "enum": [ + "within", + "contains", + "intersects" + ] + }, + "_types.query_dsl.DateRangeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RangeQueryBaseDateMath" + }, + { + "type": "object", + "properties": { + "format": { + "description": "Date format used to convert `date` values in the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateFormat" + } + ] + }, + "time_zone": { + "description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert `date` values in the query to UTC.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + } + } + } + ] + }, + "_types.query_dsl.RangeQueryBaseDateMath": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "relation": { + "description": "Indicates how the range query matches values for `range` fields.", + "default": "intersects", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RangeRelation" + } + ] + }, + "gt": { + "description": "Greater than.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateMath" + } + ] + }, + "gte": { + "description": "Greater than or equal to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateMath" + } + ] + }, + "lt": { + "description": "Less than.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateMath" + } + ] + }, + "lte": { + "description": "Less than or equal to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateMath" + } + ] + } + } + } + ] + }, + "_types.query_dsl.NumberRangeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RangeQueryBasedouble" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.RangeQueryBasedouble": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "relation": { + "description": "Indicates how the range query matches values for `range` fields.", + "default": "intersects", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RangeRelation" + } + ] + }, + "gt": { + "description": "Greater than.", + "type": "number" + }, + "gte": { + "description": "Greater than or equal to.", + "type": "number" + }, + "lt": { + "description": "Less than.", + "type": "number" + }, + "lte": { + "description": "Less than or equal to.", + "type": "number" + } + } + } + ] + }, + "_types.query_dsl.TermRangeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RangeQueryBasestring" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.RangeQueryBasestring": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "relation": { + "description": "Indicates how the range query matches values for `range` fields.", + "default": "intersects", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RangeRelation" + } + ] + }, + "gt": { + "description": "Greater than.", + "type": "string" + }, + "gte": { + "description": "Greater than or equal to.", + "type": "string" + }, + "lt": { + "description": "Less than.", + "type": "string" + }, + "lte": { + "description": "Less than or equal to.", + "type": "string" + } + } + } + ] + }, + "_types.query_dsl.RankFeatureQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "`rank_feature` or `rank_features` field used to boost relevance scores.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "saturation": { + "description": "Saturation function used to boost relevance scores based on the value of the rank feature `field`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunctionSaturation" + } + ] + }, + "log": { + "description": "Logarithmic function used to boost relevance scores based on the value of the rank feature `field`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunctionLogarithm" + } + ] + }, + "linear": { + "description": "Linear function used to boost relevance scores based on the value of the rank feature `field`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunctionLinear" + } + ] + }, + "sigmoid": { + "description": "Sigmoid function used to boost relevance scores based on the value of the rank feature `field`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunctionSigmoid" + } + ] + } + }, + "required": [ + "field" + ] + } + ] + }, + "_types.query_dsl.RankFeatureFunctionSaturation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunction" + }, + { + "type": "object", + "properties": { + "pivot": { + "description": "Configurable pivot value so that the result will be less than 0.5.", + "type": "number" + } + } + } + ] + }, + "_types.query_dsl.RankFeatureFunction": { + "type": "object" + }, + "_types.query_dsl.RankFeatureFunctionLogarithm": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunction" + }, + { + "type": "object", + "properties": { + "scaling_factor": { + "description": "Configurable scaling factor.", + "type": "number" + } + }, + "required": [ + "scaling_factor" + ] + } + ] + }, + "_types.query_dsl.RankFeatureFunctionLinear": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunction" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.RankFeatureFunctionSigmoid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.RankFeatureFunction" + }, + { + "type": "object", + "properties": { + "pivot": { + "description": "Configurable pivot value so that the result will be less than 0.5.", + "type": "number" + }, + "exponent": { + "description": "Configurable Exponent.", + "type": "number" + } + }, + "required": [ + "pivot", + "exponent" + ] + } + ] + }, + "_types.query_dsl.RegexpQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "case_insensitive": { + "description": "Allows case insensitive matching of the regular expression value with the indexed field values when set to `true`.\nWhen `false`, case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, + "x-state": "Generally available; Added in 7.10.0", + "type": "boolean" + }, + "flags": { + "description": "Enables optional operators for the regular expression.", + "type": "string" + }, + "max_determinized_states": { + "description": "Maximum number of automaton states required for the query.", + "default": 10000.0, + "type": "number" + }, + "rewrite": { + "description": "Method used to rewrite the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "value": { + "description": "Regular expression for terms you wish to find in the provided field.", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.query_dsl.RuleQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "organic": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "ruleset_ids": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Id" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + } + ] + }, + "ruleset_id": { + "type": "string" + }, + "match_criteria": { + "type": "object" + } + }, + "required": [ + "organic", + "match_criteria" + ] + } + ] + }, + "_types.query_dsl.ScriptQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "script": { + "description": "Contains a script to run as a query.\nThis script must return a boolean value, `true` or `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + }, + "required": [ + "script" + ] + } + ] + }, + "_types.query_dsl.ScriptScoreQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "min_score": { + "description": "Documents with a score lower than this floating point number are excluded from the search results.", + "type": "number" + }, + "query": { + "description": "Query used to return documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "script": { + "description": "Script used to compute the score of documents returned by the query.\nImportant: final relevance scores from the `script_score` query cannot be negative.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + }, + "required": [ + "query", + "script" + ] + } + ] + }, + "_types.query_dsl.SemanticQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The field to query, which must be a semantic_text field type", + "type": "string" + }, + "query": { + "description": "The query text", + "type": "string" + } + }, + "required": [ + "field", + "query" + ] + } + ] + }, + "_types.query_dsl.ShapeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "When set to `true` the query ignores an unmapped field and will not match any documents.", + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl.SimpleQueryStringQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert text in the query string into tokens.", + "type": "string" + }, + "analyze_wildcard": { + "description": "If `true`, the query attempts to analyze wildcard terms in the query string.", + "default": false, + "type": "boolean" + }, + "auto_generate_synonyms_phrase_query": { + "description": "If `true`, the parser creates a match_phrase query for each multi-position token.", + "default": true, + "type": "boolean" + }, + "default_operator": { + "description": "Default boolean logic used to interpret text in the query string if no operators are specified.", + "default": "'or'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + } + ] + }, + "fields": { + "description": "Array of fields you wish to search.\nAccepts wildcard expressions.\nYou also can boost relevance scores for matches to particular fields using a caret (`^`) notation.\nDefaults to the `index.query.default_field index` setting, which has a default value of `*`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "flags": { + "description": "List of enabled operators for the simple query string syntax.", + "default": "ALL", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringFlags" + } + ] + }, + "fuzzy_max_expansions": { + "description": "Maximum number of terms to which the query expands for fuzzy matching.", + "default": 50.0, + "type": "number" + }, + "fuzzy_prefix_length": { + "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, + "type": "number" + }, + "fuzzy_transpositions": { + "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "type": "boolean" + }, + "lenient": { + "description": "If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.", + "default": false, + "type": "boolean" + }, + "minimum_should_match": { + "description": "Minimum number of clauses that must match for a document to be returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "query": { + "description": "Query string in the simple query string syntax you wish to parse and use for search.", + "type": "string" + }, + "quote_field_suffix": { + "description": "Suffix appended to quoted text in the query string.", + "type": "string" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.SimpleQueryStringFlags": { + "description": "Query flags can be either a single flag or a combination of flags, e.g. `OR|AND|PREFIX`", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.PipeSeparatedFlagsSimpleQueryStringFlag" + } + ] + }, + "_spec_utils.PipeSeparatedFlagsSimpleQueryStringFlag": { + "description": "A set of flags that can be represented as a single enum value or a set of values that are encoded\nas a pipe-separated string\n\nDepending on the target language, code generators can use this hint to generate language specific\nflags enum constructs and the corresponding (de-)serialization code.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringFlag" + }, + { + "type": "string" + } + ] + }, + "_types.query_dsl.SimpleQueryStringFlag": { + "type": "string", + "enum": [ + "NONE", + "AND", + "NOT", + "OR", + "PREFIX", + "PHRASE", + "PRECEDENCE", + "ESCAPE", + "WHITESPACE", + "FUZZY", + "NEAR", + "SLOP", + "ALL" + ] + }, + "_types.query_dsl.SpanContainingQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "big": { + "description": "Can be any span query.\nMatching spans from `big` that contain matches from `little` are returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + ] + }, + "little": { + "description": "Can be any span query.\nMatching spans from `big` that contain matches from `little` are returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + ] + } + }, + "required": [ + "big", + "little" + ] + } + ] + }, + "_types.query_dsl.SpanQuery": { + "type": "object", + "properties": { + "span_containing": { + "description": "Accepts a list of span queries, but only returns those spans which also match a second span query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanContainingQuery" + } + ] + }, + "span_field_masking": { + "description": "Allows queries like `span_near` or `span_or` across different fields.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanFieldMaskingQuery" + } + ] + }, + "span_first": { + "description": "Accepts another span query whose matches must appear within the first N positions of the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanFirstQuery" + } + ] + }, + "span_gap": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanGapQuery" + } + ] + }, + "span_multi": { + "description": "Wraps a `term`, `range`, `prefix`, `wildcard`, `regexp`, or `fuzzy` query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanMultiTermQuery" + } + ] + }, + "span_near": { + "description": "Accepts multiple span queries whose matches must be within the specified distance of each other, and possibly in the same order.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanNearQuery" + } + ] + }, + "span_not": { + "description": "Wraps another span query, and excludes any documents which match that query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanNotQuery" + } + ] + }, + "span_or": { + "description": "Combines multiple span queries and returns documents which match any of the specified queries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanOrQuery" + } + ] + }, + "span_term": { + "description": "The equivalent of the `term` query but for use with other span queries.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.SpanTermQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "span_within": { + "description": "The result from a single span query is returned as long is its span falls within the spans returned by a list of other span queries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanWithinQuery" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.query_dsl.SpanFieldMaskingQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + ] + } + }, + "required": [ + "field", + "query" + ] + } + ] + }, + "_types.query_dsl.SpanFirstQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "end": { + "description": "Controls the maximum end position permitted in a match.", + "type": "number" + }, + "match": { + "description": "Can be any other span type query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + ] + } + }, + "required": [ + "end", + "match" + ] + } + ] + }, + "_types.query_dsl.SpanGapQuery": { + "description": "Can only be used as a clause in a span_near query.", + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.query_dsl.SpanMultiTermQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "match": { + "description": "Should be a multi term query (one of `wildcard`, `fuzzy`, `prefix`, `range`, or `regexp` query).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + }, + "required": [ + "match" + ] + } + ] + }, + "_types.query_dsl.SpanNearQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "clauses": { + "description": "Array of one or more other span type queries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + }, + "in_order": { + "description": "Controls whether matches are required to be in-order.", + "type": "boolean" + }, + "slop": { + "description": "Controls the maximum number of intervening unmatched positions permitted.", + "type": "number" + } + }, + "required": [ + "clauses" + ] + } + ] + }, + "_types.query_dsl.SpanNotQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "dist": { + "description": "The number of tokens from within the include span that can’t have overlap with the exclude span.\nEquivalent to setting both `pre` and `post`.", + "type": "number" + }, + "exclude": { + "description": "Span query whose matches must not overlap those returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + ] + }, + "include": { + "description": "Span query whose matches are filtered.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + ] + }, + "post": { + "description": "The number of tokens after the include span that can’t have overlap with the exclude span.", + "default": 0.0, + "type": "number" + }, + "pre": { + "description": "The number of tokens before the include span that can’t have overlap with the exclude span.", + "default": 0.0, + "type": "number" + } + }, + "required": [ + "exclude", + "include" + ] + } + ] + }, + "_types.query_dsl.SpanOrQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "clauses": { + "description": "Array of one or more other span type queries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + } + }, + "required": [ + "clauses" + ] + } + ] + }, + "_types.query_dsl.SpanTermQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.query_dsl.SpanWithinQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "big": { + "description": "Can be any span query.\nMatching spans from `little` that are enclosed within `big` are returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + ] + }, + "little": { + "description": "Can be any span query.\nMatching spans from `little` that are enclosed within `big` are returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SpanQuery" + } + ] + } + }, + "required": [ + "big", + "little" + ] + } + ] + }, + "_types.query_dsl.SparseVectorQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-sparse-vector-query" + }, + "allOf": [ + { + "type": "object", + "properties": { + "field": { + "description": "The name of the field that contains the token-weight pairs to be searched against.\nThis field must be a mapped sparse_vector field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "query": { + "description": "The query text you want to use for search.\nIf inference_id is specified, query must also be specified.", + "type": "string" + }, + "prune": { + "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", + "x-state": "Generally available; Added in 8.15.0", + "type": "boolean" + }, + "pruning_config": { + "description": "Optional pruning configuration.\nIf enabled, this will omit non-significant tokens from the query in order to improve query performance.\nThis is only used if prune is set to true.\nIf prune is set to true but pruning_config is not specified, default values will be used.", + "x-state": "Generally available; Added in 8.15.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TokenPruningConfig" + } + ] + } + }, + "required": [ + "field" + ] + }, + { + "type": "object", + "properties": { + "query_vector": { + "description": "Dictionary of precomputed sparse vectors and their associated weights.\nOnly one of inference_id or query_vector may be supplied in a request.", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "inference_id": { + "description": "The inference ID to use to convert the query text into token-weight pairs.\nIt must be the same inference ID that was used to create the tokens from the input text.\nOnly one of inference_id and query_vector is allowed.\nIf inference_id is specified, query must also be specified.\nOnly one of inference_id or query_vector may be supplied in a request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + } + ] + }, + "_types.TokenPruningConfig": { + "type": "object", + "properties": { + "tokens_freq_ratio_threshold": { + "description": "Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.", + "default": 5.0, + "type": "number" + }, + "tokens_weight_threshold": { + "description": "Tokens whose weight is less than this threshold are considered nonsignificant and pruned.", + "default": 0.4, + "type": "number" + }, + "only_score_pruned_tokens": { + "description": "Whether to only score pruned tokens, vs only scoring kept tokens.", + "default": false, + "type": "boolean" + } + } + }, + "_types.query_dsl.TermQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "Term you wish to find in the provided field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + } + ] + }, + "case_insensitive": { + "description": "Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`.\nWhen `false`, the case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, + "x-state": "Generally available; Added in 7.10.0", + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.query_dsl.TermsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.TermsSetQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "minimum_should_match": { + "description": "Specification describing number of matching terms required to return a document.", + "x-state": "Generally available; Added in 8.10.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + } + ] + }, + "minimum_should_match_field": { + "description": "Numeric field containing the number of matching terms required to return a document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "minimum_should_match_script": { + "description": "Custom script containing the number of matching terms required to return a document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "terms": { + "description": "Array of terms you wish to find in the provided field.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.FieldValue" + } + } + }, + "required": [ + "terms" + ] + } + ] + }, + "_types.query_dsl.TextExpansionQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "model_id": { + "description": "The text expansion NLP model to use", + "type": "string" + }, + "model_text": { + "description": "The query text", + "type": "string" + }, + "pruning_config": { + "description": "Token pruning configurations", + "x-state": "Technical preview; Added in 8.13.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TokenPruningConfig" + } + ] + } + }, + "required": [ + "model_id", + "model_text" + ] + } + ] + }, + "_types.query_dsl.WeightedTokensQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "tokens": { + "description": "The tokens representing this query", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + } + ] + }, + "pruning_config": { + "description": "Token pruning configurations", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TokenPruningConfig" + } + ] + } + }, + "required": [ + "tokens" + ] + } + ] + }, + "_types.query_dsl.WildcardQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "case_insensitive": { + "description": "Allows case insensitive matching of the pattern with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping.", + "x-state": "Generally available; Added in 7.10.0", + "type": "boolean" + }, + "rewrite": { + "description": "Method used to rewrite the query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + } + ] + }, + "value": { + "description": "Wildcard pattern for terms you wish to find in the provided field. Required, when wildcard is not set.", + "type": "string" + }, + "wildcard": { + "description": "Wildcard pattern for terms you wish to find in the provided field. Required, when value is not set.", + "type": "string" + } + } + } + ] + }, + "_types.query_dsl.WrapperQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "query": { + "description": "A base64 encoded query.\nThe binary data format can be any of JSON, YAML, CBOR or SMILE encodings", + "type": "string" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.TypeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types.aggregations.BucketAggregationBase": { + "description": "Base type for bucket aggregations. These aggregations also accept sub-aggregations.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.Aggregation": { + "type": "object" + }, + "_types.aggregations.AutoDateHistogramAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "buckets": { + "description": "The target number of buckets.", + "default": 10.0, + "type": "number" + }, + "field": { + "description": "The field on which to run the aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "format": { + "description": "The date format used to format `key_as_string` in the response.\nIf no `format` is specified, the first date format specified in the field mapping is used.", + "type": "string" + }, + "minimum_interval": { + "description": "The minimum rounding interval.\nThis can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than `minimum_interval`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MinimumInterval" + } + ] + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "offset": { + "description": "Time zone specified as a ISO 8601 UTC offset.", + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "time_zone": { + "description": "Time zone ID.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + } + } + } + ] + }, + "_types.aggregations.MinimumInterval": { + "type": "string", + "enum": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + }, + "_types.aggregations.AverageAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.FormatMetricAggregationBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "format": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.MetricAggregationBase": { + "type": "object", + "properties": { + "field": { + "description": "The field on which to run the aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Missing" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + } + }, + "_types.aggregations.Missing": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "_types.aggregations.AverageBucketAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.PipelineAggregationBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketPathAggregation" + }, + { + "type": "object", + "properties": { + "format": { + "description": "`DecimalFormat` pattern for the output value.\nIf specified, the formatted value is returned in the aggregation’s `value_as_string` property.", + "type": "string" + }, + "gap_policy": { + "description": "Policy to apply when gaps are found in the data.", + "default": "skip", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GapPolicy" + } + ] + } + } + } + ] + }, + "_types.aggregations.GapPolicy": { + "type": "string", + "enum": [ + "skip", + "insert_zeros", + "keep_values" + ] + }, + "_types.aggregations.BucketPathAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + { + "type": "object", + "properties": { + "buckets_path": { + "description": "Path to the buckets that contain one set of values to correlate.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsPath" + } + ] + } + } + } + ] + }, + "_types.aggregations.BucketsPath": { + "description": "Buckets path can be expressed in different ways, and an aggregation may accept some or all of these\nforms depending on its type. Please refer to each aggregation's documentation to know what buckets\npath forms they accept.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ] + }, + "_types.aggregations.BoxplotAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "compression": { + "description": "Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.", + "type": "number" + }, + "execution_hint": { + "description": "The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).\nTo use an implementation optimized for accuracy, set this parameter to high_accuracy instead.", + "default": "default", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TDigestExecutionHint" + } + ] + } + } + } + ] + }, + "_types.aggregations.TDigestExecutionHint": { + "type": "string", + "enum": [ + "default", + "high_accuracy" + ] + }, + "_types.aggregations.BucketScriptAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "script": { + "description": "The script to run for this aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + } + } + ] + }, + "_types.aggregations.BucketSelectorAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "script": { + "description": "The script to run for this aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + } + } + ] + }, + "_types.aggregations.BucketSortAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + { + "type": "object", + "properties": { + "from": { + "description": "Buckets in positions prior to `from` will be truncated.", + "type": "number" + }, + "gap_policy": { + "description": "The policy to apply when gaps are found in the data.", + "default": "skip", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GapPolicy" + } + ] + }, + "size": { + "description": "The number of buckets to return.\nDefaults to all buckets of the parent aggregation.", + "type": "number" + }, + "sort": { + "description": "The list of fields to sort on.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + } + } + } + ] + }, + "_types.aggregations.BucketKsAggregation": { + "description": "A sibling pipeline aggregation which executes a two sample Kolmogorov–Smirnov test (referred\nto as a \"K-S test\" from now on) against a provided distribution, and the distribution implied\nby the documents counts in the configured sibling aggregation. Specifically, for some metric,\nassuming that the percentile intervals of the metric are known beforehand or have been computed\nby an aggregation, then one would use range aggregation for the sibling to compute the p-value\nof the distribution difference between the metric and the restriction of that metric to a subset\nof the documents. A natural use case is if the sibling aggregation range aggregation nested in a\nterms aggregation, in which case one compares the overall distribution of metric to its restriction\nto each term.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketPathAggregation" + }, + { + "type": "object", + "properties": { + "alternative": { + "description": "A list of string values indicating which K-S test alternative to calculate. The valid values\nare: \"greater\", \"less\", \"two_sided\". This parameter is key for determining the K-S statistic used\nwhen calculating the K-S test. Default value is all possible alternative hypotheses.", + "type": "array", + "items": { + "type": "string" + } + }, + "fractions": { + "description": "A list of doubles indicating the distribution of the samples with which to compare to the `buckets_path` results.\nIn typical usage this is the overall proportion of documents in each bucket, which is compared with the actual\ndocument proportions in each bucket from the sibling aggregation counts. The default is to assume that overall\ndocuments are uniformly distributed on these buckets, which they would be if one used equal percentiles of a\nmetric to define the bucket end points.", + "type": "array", + "items": { + "type": "number" + } + }, + "sampling_method": { + "description": "Indicates the sampling methodology when calculating the K-S test. Note, this is sampling of the returned values.\nThis determines the cumulative distribution function (CDF) points used comparing the two samples. Default is\n`upper_tail`, which emphasizes the upper end of the CDF points. Valid options are: `upper_tail`, `uniform`,\nand `lower_tail`.", + "type": "string" + } + } + } + ] + }, + "_types.aggregations.BucketCorrelationAggregation": { + "description": "A sibling pipeline aggregation which executes a correlation function on the configured sibling multi-bucket aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketPathAggregation" + }, + { + "type": "object", + "properties": { + "function": { + "description": "The correlation function to execute.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketCorrelationFunction" + } + ] + } + }, + "required": [ + "function" + ] + } + ] + }, + "_types.aggregations.BucketCorrelationFunction": { + "type": "object", + "properties": { + "count_correlation": { + "description": "The configuration to calculate a count correlation. This function is designed for determining the correlation of a term value and a given metric.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketCorrelationFunctionCountCorrelation" + } + ] + } + }, + "required": [ + "count_correlation" + ] + }, + "_types.aggregations.BucketCorrelationFunctionCountCorrelation": { + "type": "object", + "properties": { + "indicator": { + "description": "The indicator with which to correlate the configured `bucket_path` values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketCorrelationFunctionCountCorrelationIndicator" + } + ] + } + }, + "required": [ + "indicator" + ] + }, + "_types.aggregations.BucketCorrelationFunctionCountCorrelationIndicator": { + "type": "object", + "properties": { + "doc_count": { + "description": "The total number of documents that initially created the expectations. It’s required to be greater\nthan or equal to the sum of all values in the buckets_path as this is the originating superset of data\nto which the term values are correlated.", + "type": "number" + }, + "expectations": { + "description": "An array of numbers with which to correlate the configured `bucket_path` values.\nThe length of this value must always equal the number of buckets returned by the `bucket_path`.", + "type": "array", + "items": { + "type": "number" + } + }, + "fractions": { + "description": "An array of fractions to use when averaging and calculating variance. This should be used if\nthe pre-calculated data and the buckets_path have known gaps. The length of fractions, if provided,\nmust equal expectations.", + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "doc_count", + "expectations" + ] + }, + "_types.aggregations.CardinalityAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "precision_threshold": { + "description": "A unique count below which counts are expected to be close to accurate.\nThis allows to trade memory for accuracy.", + "default": 3000.0, + "type": "number" + }, + "rehash": { + "type": "boolean" + }, + "execution_hint": { + "description": "Mechanism by which cardinality aggregations is run.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CardinalityExecutionMode" + } + ] + } + } + } + ] + }, + "_types.aggregations.CardinalityExecutionMode": { + "type": "string", + "enum": [ + "global_ordinals", + "segment_ordinals", + "direct", + "save_memory_heuristic", + "save_time_heuristic" + ] + }, + "_types.aggregations.CartesianBoundsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.CartesianCentroidAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.CategorizeTextAggregation": { + "description": "A multi-bucket aggregation that groups semi-structured text into buckets. Each text\nfield is re-analyzed using a custom analyzer. The resulting tokens are then categorized\ncreating buckets of similarly formatted text values. This aggregation works best with machine\ngenerated text like system logs. Only the first 100 analyzed tokens are used to categorize the text.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The semi-structured text field to categorize.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "max_unique_tokens": { + "description": "The maximum number of unique tokens at any position up to max_matched_tokens. Must be larger than 1.\nSmaller values use less memory and create fewer categories. Larger values will use more memory and\ncreate narrower categories. Max allowed value is 100.", + "default": 50.0, + "type": "number" + }, + "max_matched_tokens": { + "description": "The maximum number of token positions to match on before attempting to merge categories. Larger\nvalues will use more memory and create narrower categories. Max allowed value is 100.", + "default": 5.0, + "type": "number" + }, + "similarity_threshold": { + "description": "The minimum percentage of tokens that must match for text to be added to the category bucket. Must\nbe between 1 and 100. The larger the value the narrower the categories. Larger values will increase memory\nusage and create narrower categories.", + "default": 50.0, + "type": "number" + }, + "categorization_filters": { + "description": "This property expects an array of regular expressions. The expressions are used to filter out matching\nsequences from the categorization field values. You can use this functionality to fine tune the categorization\nby excluding sequences from consideration when categories are defined. For example, you can exclude SQL\nstatements that appear in your log files. This property cannot be used at the same time as categorization_analyzer.\nIf you only want to define simple regular expression filters that are applied prior to tokenization, setting\nthis property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering,\nuse the categorization_analyzer property instead and include the filters as pattern_replace character filters.", + "type": "array", + "items": { + "type": "string" + } + }, + "categorization_analyzer": { + "externalDocs": { + "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-analyze" + }, + "description": "The categorization analyzer specifies how the text is analyzed and tokenized before being categorized.\nThe syntax is very similar to that used to define the analyzer in the analyze API. This property\ncannot be used at the same time as `categorization_filters`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CategorizeTextAnalyzer" + } + ] + }, + "shard_size": { + "description": "The number of categorization buckets to return from each shard before merging all the results.", + "type": "number" + }, + "size": { + "description": "The number of buckets to return.", + "default": 10.0, + "type": "number" + }, + "min_doc_count": { + "description": "The minimum number of documents in a bucket to be returned to the results.", + "type": "number" + }, + "shard_min_doc_count": { + "description": "The minimum number of documents in a bucket to be returned from the shard before merging.", + "type": "number" + } + }, + "required": [ + "field" + ] + } + ] + }, + "_types.aggregations.CategorizeTextAnalyzer": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_types.aggregations.CustomCategorizeTextAnalyzer" + } + ] + }, + "_types.aggregations.CustomCategorizeTextAnalyzer": { + "type": "object", + "properties": { + "char_filter": { + "type": "array", + "items": { + "type": "string" + } + }, + "tokenizer": { + "type": "string" + }, + "filter": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "_types.aggregations.ChangePointAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.ChildrenAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "type": { + "description": "The child type that should be selected.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RelationName" + } + ] + } + } + } + ] + }, + "_types.aggregations.CompositeAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "after": { + "description": "When paginating, use the `after_key` value returned in the previous response to retrieve the next page.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregateKey" + } + ] + }, + "size": { + "description": "The number of composite buckets that should be returned.", + "default": 10.0, + "type": "number" + }, + "sources": { + "description": "The value sources used to build composite buckets.\nKeys are returned in the order of the `sources` definition.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationSource" + }, + "minProperties": 1, + "maxProperties": 1 + } + } + } + } + ] + }, + "_types.aggregations.CompositeAggregationSource": { + "type": "object", + "properties": { + "terms": { + "description": "A terms aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeTermsAggregation" + } + ] + }, + "histogram": { + "description": "A histogram aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeHistogramAggregation" + } + ] + }, + "date_histogram": { + "description": "A date histogram aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeDateHistogramAggregation" + } + ] + }, + "geotile_grid": { + "description": "A geotile grid aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeGeoTileGridAggregation" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.aggregations.CompositeTermsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.CompositeAggregationBase": { + "type": "object", + "properties": { + "field": { + "description": "Either `field` or `script` must be present", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "missing_bucket": { + "type": "boolean" + }, + "missing_order": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MissingOrder" + } + ] + }, + "script": { + "description": "Either `field` or `script` must be present", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "value_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ValueType" + } + ] + }, + "order": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortOrder" + } + ] + } + } + }, + "_types.aggregations.MissingOrder": { + "type": "string", + "enum": [ + "first", + "last", + "default" + ] + }, + "_types.aggregations.ValueType": { + "type": "string", + "enum": [ + "string", + "long", + "double", + "number", + "date", + "date_nanos", + "ip", + "numeric", + "geo_point", + "boolean" + ] + }, + "_types.aggregations.CompositeHistogramAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationBase" + }, + { + "type": "object", + "properties": { + "interval": { + "type": "number" + } + }, + "required": [ + "interval" + ] + } + ] + }, + "_types.aggregations.CompositeDateHistogramAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationBase" + }, + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "calendar_interval": { + "description": "Either `calendar_interval` or `fixed_interval` must be present", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationLarge" + } + ] + }, + "fixed_interval": { + "description": "Either `calendar_interval` or `fixed_interval` must be present", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationLarge" + } + ] + }, + "offset": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_zone": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + } + } + } + ] + }, + "_types.aggregations.CompositeGeoTileGridAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregationBase" + }, + { + "type": "object", + "properties": { + "precision": { + "type": "number" + }, + "bounds": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoBounds" + } + ] + } + } + } + ] + }, + "_types.aggregations.CumulativeCardinalityAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.CumulativeSumAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.DateHistogramAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "calendar_interval": { + "description": "Calendar-aware interval.\nCan be specified using the unit name, such as `month`, or as a single unit quantity, such as `1M`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CalendarInterval" + } + ] + }, + "extended_bounds": { + "description": "Enables extending the bounds of the histogram beyond the data itself.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedBoundsFieldDateMath" + } + ] + }, + "hard_bounds": { + "description": "Limits the histogram to specified bounds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedBoundsFieldDateMath" + } + ] + }, + "field": { + "description": "The date field whose values are use to build a histogram.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "fixed_interval": { + "description": "Fixed intervals: a fixed number of SI units and never deviate, regardless of where they fall on the calendar.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "format": { + "description": "The date format used to format `key_as_string` in the response.\nIf no `format` is specified, the first date format specified in the field mapping is used.", + "type": "string" + }, + "interval": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "min_doc_count": { + "description": "Only returns buckets that have `min_doc_count` number of documents.\nBy default, all buckets between the first bucket that matches documents and the last one are returned.", + "type": "number" + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "offset": { + "description": "Changes the start value of each bucket by the specified positive (`+`) or negative offset (`-`) duration.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "order": { + "description": "The sort order of the returned buckets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateOrder" + } + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "time_zone": { + "description": "Time zone used for bucketing and rounding.\nDefaults to Coordinated Universal Time (UTC).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + }, + "keyed": { + "description": "Set to `true` to associate a unique string key with each bucket and return the ranges as a hash rather than an array.", + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.CalendarInterval": { + "type": "string", + "enum": [ + "second", + "1s", + "minute", + "1m", + "hour", + "1h", + "day", + "1d", + "week", + "1w", + "month", + "1M", + "quarter", + "1q", + "year", + "1y" + ] + }, + "_types.aggregations.ExtendedBoundsFieldDateMath": { + "type": "object", + "properties": { + "max": { + "description": "Maximum value for the bound.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FieldDateMath" + } + ] + }, + "min": { + "description": "Minimum value for the bound.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FieldDateMath" + } + ] + } + } + }, + "_types.aggregations.FieldDateMath": { + "description": "A date range limit, represented either as a DateMath expression or a number expressed\naccording to the target field's precision.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.DateMath" + }, + { + "type": "number" + } + ] + }, + "_types.aggregations.AggregateOrder": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.SortOrder" + }, + "minProperties": 1, + "maxProperties": 1 + }, + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.SortOrder" + }, + "minProperties": 1, + "maxProperties": 1 + } + } + ] + }, + "_types.aggregations.DateRangeAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The date field whose values are use to build ranges.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "format": { + "description": "The date format used to format `from` and `to` in the response.", + "type": "string" + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Missing" + } + ] + }, + "ranges": { + "description": "Array of date ranges.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.DateRangeExpression" + } + }, + "time_zone": { + "description": "Time zone used to convert dates from another time zone to UTC.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + }, + "keyed": { + "description": "Set to `true` to associate a unique string key with each bucket and returns the ranges as a hash rather than an array.", + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.DateRangeExpression": { + "type": "object", + "properties": { + "from": { + "description": "Start of the range (inclusive).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FieldDateMath" + } + ] + }, + "key": { + "description": "Custom key to return the range with.", + "type": "string" + }, + "to": { + "description": "End of the range (exclusive).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FieldDateMath" + } + ] + } + } + }, + "_types.aggregations.DerivativeAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.DiversifiedSamplerAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "execution_hint": { + "description": "The type of value used for de-duplication.", + "default": "global_ordinals", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.SamplerAggregationExecutionHint" + } + ] + }, + "max_docs_per_value": { + "description": "Limits how many documents are permitted per choice of de-duplicating value.", + "default": 1.0, + "type": "number" + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "shard_size": { + "description": "Limits how many top-scoring documents are collected in the sample processed on each shard.", + "default": 100.0, + "type": "number" + }, + "field": { + "description": "The field used to provide values used for de-duplication.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + } + } + ] + }, + "_types.aggregations.SamplerAggregationExecutionHint": { + "type": "string", + "enum": [ + "map", + "global_ordinals", + "bytes_hash" + ] + }, + "_types.aggregations.ExtendedStatsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object", + "properties": { + "sigma": { + "description": "The number of standard deviations above/below the mean to display.", + "type": "number" + } + } + } + ] + }, + "_types.aggregations.ExtendedStatsBucketAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "sigma": { + "description": "The number of standard deviations above/below the mean to display.", + "type": "number" + } + } + } + ] + }, + "_types.aggregations.FrequentItemSetsAggregation": { + "type": "object", + "properties": { + "fields": { + "description": "Fields to analyze.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.FrequentItemSetsField" + } + }, + "minimum_set_size": { + "description": "The minimum size of one item set.", + "default": 1.0, + "type": "number" + }, + "minimum_support": { + "description": "The minimum support of one item set.", + "default": 0.1, + "type": "number" + }, + "size": { + "description": "The number of top item sets to return.", + "default": 10.0, + "type": "number" + }, + "filter": { + "description": "Query that filters documents from analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + }, + "required": [ + "fields" + ] + }, + "_types.aggregations.FrequentItemSetsField": { + "type": "object", + "properties": { + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "exclude": { + "description": "Values to exclude.\nCan be regular expression strings or arrays of strings of exact terms.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsExclude" + } + ] + }, + "include": { + "description": "Values to include.\nCan be regular expression strings or arrays of strings of exact terms.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsInclude" + } + ] + } + }, + "required": [ + "field" + ] + }, + "_types.aggregations.TermsExclude": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "_types.aggregations.TermsInclude": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/_types.aggregations.TermsPartition" + } + ] + }, + "_types.aggregations.TermsPartition": { + "type": "object", + "properties": { + "num_partitions": { + "description": "The number of partitions.", + "type": "number" + }, + "partition": { + "description": "The partition number for this request.", + "type": "number" + } + }, + "required": [ + "num_partitions", + "partition" + ] + }, + "_types.aggregations.FiltersAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "filters": { + "description": "Collection of queries from which to build buckets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsQueryContainer" + } + ] + }, + "other_bucket": { + "description": "Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters.", + "type": "boolean" + }, + "other_bucket_key": { + "description": "The key with which the other bucket is returned.", + "default": "_other_", + "type": "string" + }, + "keyed": { + "description": "By default, the named filters aggregation returns the buckets as an object.\nSet to `false` to return the buckets as an array of objects.", + "default": true, + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.BucketsQueryContainer": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + } + ] + }, + "_types.aggregations.GeoBoundsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "wrap_longitude": { + "description": "Specifies whether the bounding box should be allowed to overlap the international date line.", + "default": true, + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.GeoCentroidAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + } + } + } + ] + }, + "_types.aggregations.GeoDistanceAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "distance_type": { + "description": "The distance calculation type.", + "default": "arc", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoDistanceType" + } + ] + }, + "field": { + "description": "A field of type `geo_point` used to evaluate the distance.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "origin": { + "description": "The origin used to evaluate the distance.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + }, + "ranges": { + "description": "An array of ranges used to bucket documents.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.AggregationRange" + } + }, + "unit": { + "description": "The distance unit.", + "default": "m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DistanceUnit" + } + ] + } + } + } + ] + }, + "_types.aggregations.AggregationRange": { + "type": "object", + "properties": { + "from": { + "description": "Start of the range (inclusive).", + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "key": { + "description": "Custom key to return the range with.", + "type": "string" + }, + "to": { + "description": "End of the range (exclusive).", + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "_types.aggregations.GeoHashGridAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "bounds": { + "description": "The bounding box to filter the points in each bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoBounds" + } + ] + }, + "field": { + "description": "Field containing indexed `geo_point` or `geo_shape` values.\nIf the field contains an array, `geohash_grid` aggregates all array values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "precision": { + "description": "The string length of the geohashes used to define cells/buckets in the results.", + "default": "5", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoHashPrecision" + } + ] + }, + "shard_size": { + "description": "Allows for more accurate counting of the top cells returned in the final result the aggregation.\nDefaults to returning `max(10,(size x number-of-shards))` buckets from each shard.", + "type": "number" + }, + "size": { + "description": "The maximum number of geohash buckets to return.", + "default": 10000.0, + "type": "number" + } + } + } + ] + }, + "_types.GeoHashPrecision": { + "description": "A precision that can be expressed as a geohash length between 1 and 12, or a distance measure like \"1km\", \"10m\".", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "_types.aggregations.GeoLineAggregation": { + "type": "object", + "properties": { + "point": { + "description": "The name of the geo_point field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoLinePoint" + } + ] + }, + "sort": { + "description": "The name of the numeric field to use as the sort key for ordering the points.\nWhen the `geo_line` aggregation is nested inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoLineSort" + } + ] + }, + "include_sort": { + "description": "When `true`, returns an additional array of the sort values in the feature properties.", + "type": "boolean" + }, + "sort_order": { + "description": "The order in which the line is sorted (ascending or descending).", + "default": "asc", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortOrder" + } + ] + }, + "size": { + "description": "The maximum length of the line represented in the aggregation.\nValid sizes are between 1 and 10000.", + "default": 10000.0, + "type": "number" + } + }, + "required": [ + "point" + ] + }, + "_types.aggregations.GeoLinePoint": { + "type": "object", + "properties": { + "field": { + "description": "The name of the geo_point field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] + }, + "_types.aggregations.GeoLineSort": { + "type": "object", + "properties": { + "field": { + "description": "The name of the numeric field to use as the sort key for ordering the points.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] + }, + "_types.aggregations.GeoTileGridAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "Field containing indexed `geo_point` or `geo_shape` values.\nIf the field contains an array, `geotile_grid` aggregates all array values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "precision": { + "description": "Integer zoom of the key used to define cells/buckets in the results.\nValues outside of the range [0,29] will be rejected.", + "default": "7", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoTilePrecision" + } + ] + }, + "shard_size": { + "description": "Allows for more accurate counting of the top cells returned in the final result the aggregation.\nDefaults to returning `max(10,(size x number-of-shards))` buckets from each shard.", + "type": "number" + }, + "size": { + "description": "The maximum number of buckets to return.", + "default": 10000.0, + "type": "number" + }, + "bounds": { + "description": "A bounding box to filter the geo-points or geo-shapes in each bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoBounds" + } + ] + } + } + } + ] + }, + "_types.GeoTilePrecision": { + "type": "number" + }, + "_types.aggregations.GeohexGridAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "Field containing indexed `geo_point` or `geo_shape` values.\nIf the field contains an array, `geohex_grid` aggregates all array values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "precision": { + "description": "Integer zoom of the key used to defined cells or buckets\nin the results. Value should be between 0-15.", + "default": 6.0, + "type": "number" + }, + "bounds": { + "description": "Bounding box used to filter the geo-points in each bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoBounds" + } + ] + }, + "size": { + "description": "Maximum number of buckets to return.", + "default": 10000.0, + "type": "number" + }, + "shard_size": { + "description": "Number of buckets returned from each shard.", + "type": "number" + } + }, + "required": [ + "field" + ] + } + ] + }, + "_types.aggregations.GlobalAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.HistogramAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "extended_bounds": { + "description": "Enables extending the bounds of the histogram beyond the data itself.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedBoundsdouble" + } + ] + }, + "hard_bounds": { + "description": "Limits the range of buckets in the histogram.\nIt is particularly useful in the case of open data ranges that can result in a very large number of buckets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ExtendedBoundsdouble" + } + ] + }, + "field": { + "description": "The name of the field to aggregate on.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "interval": { + "description": "The interval for the buckets.\nMust be a positive decimal.", + "type": "number" + }, + "min_doc_count": { + "description": "Only returns buckets that have `min_doc_count` number of documents.\nBy default, the response will fill gaps in the histogram with empty buckets.", + "type": "number" + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "type": "number" + }, + "offset": { + "description": "By default, the bucket keys start with 0 and then continue in even spaced steps of `interval`.\nThe bucket boundaries can be shifted by using the `offset` option.", + "type": "number" + }, + "order": { + "description": "The sort order of the returned buckets.\nBy default, the returned buckets are sorted by their key ascending.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateOrder" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "format": { + "type": "string" + }, + "keyed": { + "description": "If `true`, returns buckets as a hash instead of an array, keyed by the bucket keys.", + "default": false, + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.ExtendedBoundsdouble": { + "type": "object", + "properties": { + "max": { + "description": "Maximum value for the bound.", + "type": "number" + }, + "min": { + "description": "Minimum value for the bound.", + "type": "number" + } + } + }, + "_types.aggregations.IpRangeAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The date field whose values are used to build ranges.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ranges": { + "description": "Array of IP ranges.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.IpRangeAggregationRange" + } + } + } + } + ] + }, + "_types.aggregations.IpRangeAggregationRange": { + "type": "object", + "properties": { + "from": { + "description": "Start of the range.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "mask": { + "description": "IP range defined as a CIDR mask.", + "type": "string" + }, + "to": { + "description": "End of the range.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "_types.aggregations.IpPrefixAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The IP address field to aggregation on. The field mapping type must be `ip`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "prefix_length": { + "description": "Length of the network prefix. For IPv4 addresses the accepted range is [0, 32].\nFor IPv6 addresses the accepted range is [0, 128].", + "type": "number" + }, + "is_ipv6": { + "description": "Defines whether the prefix applies to IPv6 addresses.", + "default": false, + "type": "boolean" + }, + "append_prefix_length": { + "description": "Defines whether the prefix length is appended to IP address keys in the response.", + "default": false, + "type": "boolean" + }, + "keyed": { + "description": "Defines whether buckets are returned as a hash rather than an array in the response.", + "type": "boolean" + }, + "min_doc_count": { + "description": "Minimum number of documents in a bucket for it to be included in the response.", + "default": 1.0, + "type": "number" + } + }, + "required": [ + "field", + "prefix_length" + ] + } + ] + }, + "_types.aggregations.InferenceAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "model_id": { + "description": "The ID or alias for the trained model.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "inference_config": { + "description": "Contains the inference type and its options.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.InferenceConfigContainer" + } + ] + } + }, + "required": [ + "model_id" + ] + } + ] + }, + "_types.aggregations.InferenceConfigContainer": { + "type": "object", + "properties": { + "regression": { + "description": "Regression configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.RegressionInferenceOptions" + } + ] + }, + "classification": { + "description": "Classification configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ClassificationInferenceOptions" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "ml._types.RegressionInferenceOptions": { + "type": "object", + "properties": { + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "num_top_feature_importance_values": { + "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, + "type": "number" + } + } + }, + "ml._types.ClassificationInferenceOptions": { + "type": "object", + "properties": { + "num_top_classes": { + "description": "Specifies the number of top class predictions to return. Defaults to 0.", + "type": "number" + }, + "num_top_feature_importance_values": { + "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, + "type": "number" + }, + "prediction_field_type": { + "description": "Specifies the type of the predicted field to write. Acceptable values are: string, number, boolean. When boolean is provided 1.0 is transformed to true and 0.0 to false.", + "type": "string" + }, + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" + }, + "top_classes_results_field": { + "description": "Specifies the field to which the top classes are written. Defaults to top_classes.", + "type": "string" + } + } + }, + "_types.aggregations.MatrixStatsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MatrixAggregation" + }, + { + "type": "object", + "properties": { + "mode": { + "description": "Array value the aggregation will use for array or multi-valued fields.", + "default": "avg", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortMode" + } + ] + } + } + } + ] + }, + "_types.aggregations.MatrixAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + { + "type": "object", + "properties": { + "fields": { + "description": "An array of fields for computing the statistics.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "type": "object", + "additionalProperties": { + "type": "number" + } + } + } + } + ] + }, + "_types.aggregations.MaxAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MaxBucketAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MedianAbsoluteDeviationAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object", + "properties": { + "compression": { + "description": "Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.", + "default": 1000.0, + "type": "number" + }, + "execution_hint": { + "description": "The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).\nTo use an implementation optimized for accuracy, set this parameter to high_accuracy instead.", + "default": "default", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TDigestExecutionHint" + } + ] + } + } + } + ] + }, + "_types.aggregations.MinAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MinBucketAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.MissingAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "missing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Missing" + } + ] + } + } + } + ] + }, + "_types.aggregations.MovingAverageAggregation": { + "discriminator": { + "propertyName": "model", + "mapping": { + "ewma": "#/components/schemas/_types.aggregations.EwmaMovingAverageAggregation", + "holt": "#/components/schemas/_types.aggregations.HoltMovingAverageAggregation", + "holt_winters": "#/components/schemas/_types.aggregations.HoltWintersMovingAverageAggregation", + "linear": "#/components/schemas/_types.aggregations.LinearMovingAverageAggregation", + "simple": "#/components/schemas/_types.aggregations.SimpleMovingAverageAggregation" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.LinearMovingAverageAggregation" + }, + { + "$ref": "#/components/schemas/_types.aggregations.SimpleMovingAverageAggregation" + }, + { + "$ref": "#/components/schemas/_types.aggregations.EwmaMovingAverageAggregation" + }, + { + "$ref": "#/components/schemas/_types.aggregations.HoltMovingAverageAggregation" + }, + { + "$ref": "#/components/schemas/_types.aggregations.HoltWintersMovingAverageAggregation" + } + ] + }, + "_types.aggregations.LinearMovingAverageAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" + }, + { + "type": "object", + "properties": { + "model": { + "type": "string", + "enum": [ + "linear" + ] + }, + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EmptyObject" + } + ] + } + }, + "required": [ + "model", + "settings" + ] + } + ] + }, + "_types.EmptyObject": { + "description": "For empty Class assignments", + "type": "object" + }, + "_types.aggregations.MovingAverageAggregationBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "minimize": { + "type": "boolean" + }, + "predict": { + "type": "number" + }, + "window": { + "type": "number" + } + } + } + ] + }, + "_types.aggregations.SimpleMovingAverageAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" + }, + { + "type": "object", + "properties": { + "model": { + "type": "string", + "enum": [ + "simple" + ] + }, + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EmptyObject" + } + ] + } + }, + "required": [ + "model", + "settings" + ] + } + ] + }, + "_types.aggregations.EwmaMovingAverageAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" + }, + { + "type": "object", + "properties": { + "model": { + "type": "string", + "enum": [ + "ewma" + ] + }, + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.EwmaModelSettings" + } + ] + } + }, + "required": [ + "model", + "settings" + ] + } + ] + }, + "_types.aggregations.EwmaModelSettings": { + "type": "object", + "properties": { + "alpha": { + "type": "number" + } + } + }, + "_types.aggregations.HoltMovingAverageAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" + }, + { + "type": "object", + "properties": { + "model": { + "type": "string", + "enum": [ + "holt" + ] + }, + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.HoltLinearModelSettings" + } + ] + } + }, + "required": [ + "model", + "settings" + ] + } + ] + }, + "_types.aggregations.HoltLinearModelSettings": { + "type": "object", + "properties": { + "alpha": { + "type": "number" + }, + "beta": { + "type": "number" + } + } + }, + "_types.aggregations.HoltWintersMovingAverageAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MovingAverageAggregationBase" + }, + { + "type": "object", + "properties": { + "model": { + "type": "string", + "enum": [ + "holt_winters" + ] + }, + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.HoltWintersModelSettings" + } + ] + } + }, + "required": [ + "model", + "settings" + ] + } + ] + }, + "_types.aggregations.HoltWintersModelSettings": { + "type": "object", + "properties": { + "alpha": { + "type": "number" + }, + "beta": { + "type": "number" + }, + "gamma": { + "type": "number" + }, + "pad": { + "type": "boolean" + }, + "period": { + "type": "number" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.HoltWintersType" + } + ] + } + } + }, + "_types.aggregations.HoltWintersType": { + "type": "string", + "enum": [ + "add", + "mult" + ] + }, + "_types.aggregations.MovingPercentilesAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "window": { + "description": "The size of window to \"slide\" across the histogram.", + "type": "number" + }, + "shift": { + "description": "By default, the window consists of the last n values excluding the current bucket.\nIncreasing `shift` by 1, moves the starting window position by 1 to the right.", + "default": 0.0, + "type": "number" + }, + "keyed": { + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.MovingFunctionAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "script": { + "description": "The script that should be executed on each window of data.", + "type": "string" + }, + "shift": { + "description": "By default, the window consists of the last n values excluding the current bucket.\nIncreasing `shift` by 1, moves the starting window position by 1 to the right.", + "default": 0.0, + "type": "number" + }, + "window": { + "description": "The size of window to \"slide\" across the histogram.", + "type": "number" + } + } + } + ] + }, + "_types.aggregations.MultiTermsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "collect_mode": { + "description": "Specifies the strategy for data collection.", + "default": "breadth_first", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregationCollectMode" + } + ] + }, + "order": { + "description": "Specifies the sort order of the buckets.\nDefaults to sorting by descending document count.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateOrder" + } + ] + }, + "min_doc_count": { + "description": "The minimum number of documents in a bucket for it to be returned.", + "default": 1.0, + "type": "number" + }, + "shard_min_doc_count": { + "description": "The minimum number of documents in a bucket on each shard for it to be returned.", + "default": 1.0, + "type": "number" + }, + "shard_size": { + "description": "The number of candidate terms produced by each shard.\nBy default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.", + "type": "number" + }, + "show_term_doc_count_error": { + "description": "Calculates the doc count error on per term basis.", + "default": false, + "type": "boolean" + }, + "size": { + "description": "The number of term buckets should be returned out of the overall terms list.", + "default": 10.0, + "type": "number" + }, + "terms": { + "description": "The field from which to generate sets of terms.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.MultiTermLookup" + } + } + }, + "required": [ + "terms" + ] + } + ] + }, + "_types.aggregations.TermsAggregationCollectMode": { + "type": "string", + "enum": [ + "depth_first", + "breadth_first" + ] + }, + "_types.aggregations.MultiTermLookup": { + "type": "object", + "properties": { + "field": { + "description": "A fields from which to retrieve terms.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Missing" + } + ] + } + }, + "required": [ + "field" + ] + }, + "_types.aggregations.NestedAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "path": { + "description": "The path to the field of type `nested`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + } + } + ] + }, + "_types.aggregations.NormalizeAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "method": { + "description": "The specific method to apply.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.NormalizeMethod" + } + ] + } + } + } + ] + }, + "_types.aggregations.NormalizeMethod": { + "type": "string", + "enum": [ + "rescale_0_1", + "rescale_0_100", + "percent_of_sum", + "mean", + "z-score", + "softmax" + ] + }, + "_types.aggregations.ParentAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "type": { + "description": "The child type that should be selected.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RelationName" + } + ] + } + } + } + ] + }, + "_types.aggregations.PercentileRanksAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object", + "properties": { + "keyed": { + "description": "By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array.\nSet to `false` to disable this behavior.", + "default": true, + "type": "boolean" + }, + "values": { + "description": "An array of values for which to calculate the percentile ranks.", + "oneOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "hdr": { + "description": "Uses the alternative High Dynamic Range Histogram algorithm to calculate percentile ranks.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.HdrMethod" + } + ] + }, + "tdigest": { + "description": "Sets parameters for the default TDigest algorithm used to calculate percentile ranks.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TDigest" + } + ] + } + } + } + ] + }, + "_types.aggregations.HdrMethod": { + "type": "object", + "properties": { + "number_of_significant_value_digits": { + "description": "Specifies the resolution of values for the histogram in number of significant digits.", + "type": "number" + } + } + }, + "_types.aggregations.TDigest": { + "type": "object", + "properties": { + "compression": { + "description": "Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.", + "type": "number" + }, + "execution_hint": { + "description": "The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).\nTo use an implementation optimized for accuracy, set this parameter to high_accuracy instead.", + "default": "default", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TDigestExecutionHint" + } + ] + } + } + }, + "_types.aggregations.PercentilesAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object", + "properties": { + "keyed": { + "description": "By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array.\nSet to `false` to disable this behavior.", + "default": true, + "type": "boolean" + }, + "percents": { + "description": "The percentiles to calculate.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] + }, + "hdr": { + "description": "Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.HdrMethod" + } + ] + }, + "tdigest": { + "description": "Sets parameters for the default TDigest algorithm used to calculate percentiles.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TDigest" + } + ] + } + } + } + ] + }, + "_types.aggregations.PercentilesBucketAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "percents": { + "description": "The list of percentiles to calculate.", + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "_types.aggregations.RangeAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The date field whose values are use to build ranges.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "type": "number" + }, + "ranges": { + "description": "An array of ranges used to bucket documents.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.AggregationRange" + } + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "keyed": { + "description": "Set to `true` to associate a unique string key with each bucket and return the ranges as a hash rather than an array.", + "type": "boolean" + }, + "format": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.RareTermsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "exclude": { + "description": "Terms that should be excluded from the aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsExclude" + } + ] + }, + "field": { + "description": "The field from which to return rare terms.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "include": { + "description": "Terms that should be included in the aggregation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsInclude" + } + ] + }, + "max_doc_count": { + "description": "The maximum number of documents a term should appear in.", + "default": 1.0, + "type": "number" + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Missing" + } + ] + }, + "precision": { + "description": "The precision of the internal CuckooFilters.\nSmaller precision leads to better approximation, but higher memory usage.", + "default": 0.001, + "type": "number" + }, + "value_type": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.RateAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object", + "properties": { + "unit": { + "description": "The interval used to calculate the rate.\nBy default, the interval of the `date_histogram` is used.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CalendarInterval" + } + ] + }, + "mode": { + "description": "How the rate is calculated.", + "default": "sum", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.RateMode" + } + ] + } + } + } + ] + }, + "_types.aggregations.RateMode": { + "type": "string", + "enum": [ + "sum", + "value_count" + ] + }, + "_types.aggregations.ReverseNestedAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "path": { + "description": "Defines the nested object field that should be joined back to.\nThe default is empty, which means that it joins back to the root/main document level.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + } + } + ] + }, + "_types.aggregations.RandomSamplerAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "probability": { + "description": "The probability that a document will be included in the aggregated data.\nMust be greater than 0, less than 0.5, or exactly 1.\nThe lower the probability, the fewer documents are matched.", + "type": "number" + }, + "seed": { + "description": "The seed to generate the random sampling of documents.\nWhen a seed is provided, the random subset of documents is the same between calls.", + "type": "number" + }, + "shard_seed": { + "description": "When combined with seed, setting shard_seed ensures 100% consistent sampling over shards where data is exactly the same.", + "x-state": "Generally available; Added in 8.14.0", + "type": "number" + } + }, + "required": [ + "probability" + ] + } + ] + }, + "_types.aggregations.SamplerAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "shard_size": { + "description": "Limits how many top-scoring documents are collected in the sample processed on each shard.", + "default": 100.0, + "type": "number" + } + } + } + ] + }, + "_types.aggregations.ScriptedMetricAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "combine_script": { + "description": "Runs once on each shard after document collection is complete.\nAllows the aggregation to consolidate the state returned from each shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "init_script": { + "description": "Runs prior to any collection of documents.\nAllows the aggregation to set up any initial state.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "map_script": { + "description": "Run once per document collected.\nIf no `combine_script` is specified, the resulting state needs to be stored in the `state` object.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "params": { + "description": "A global object with script parameters for `init`, `map` and `combine` scripts.\nIt is shared between the scripts.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "reduce_script": { + "description": "Runs once on the coordinating node after all shards have returned their results.\nThe script is provided with access to a variable `states`, which is an array of the result of the `combine_script` on each shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + } + } + ] + }, + "_types.aggregations.SerialDifferencingAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object", + "properties": { + "lag": { + "description": "The historical bucket to subtract from the current value.\nMust be a positive, non-zero integer.", + "type": "number" + } + } + } + ] + }, + "_types.aggregations.SignificantTermsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "background_filter": { + "description": "A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "chi_square": { + "description": "Use Chi square, as described in \"Information Retrieval\", Manning et al., Chapter 13.5.2, as the significance score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ChiSquareHeuristic" + } + ] + }, + "exclude": { + "description": "Terms to exclude.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsExclude" + } + ] + }, + "execution_hint": { + "description": "Mechanism by which the aggregation should be executed: using field values directly or using global ordinals.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregationExecutionHint" + } + ] + }, + "field": { + "description": "The field from which to return significant terms.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "gnd": { + "description": "Use Google normalized distance as described in \"The Google Similarity Distance\", Cilibrasi and Vitanyi, 2007, as the significance score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GoogleNormalizedDistanceHeuristic" + } + ] + }, + "include": { + "description": "Terms to include.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsInclude" + } + ] + }, + "jlh": { + "description": "Use JLH score as the significance score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EmptyObject" + } + ] + }, + "min_doc_count": { + "description": "Only return terms that are found in more than `min_doc_count` hits.", + "default": 3.0, + "type": "number" + }, + "mutual_information": { + "description": "Use mutual information as described in \"Information Retrieval\", Manning et al., Chapter 13.5.1, as the significance score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MutualInformationHeuristic" + } + ] + }, + "percentage": { + "description": "A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentageScoreHeuristic" + } + ] + }, + "script_heuristic": { + "description": "Customized score, implemented via a script.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ScriptedHeuristic" + } + ] + }, + "p_value": { + "description": "Significant terms heuristic that calculates the p-value between the term existing in foreground and background sets.\n\nThe p-value is the probability of obtaining test results at least as extreme as\nthe results actually observed, under the assumption that the null hypothesis is\ncorrect. The p-value is calculated assuming that the foreground set and the\nbackground set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, with the null\nhypothesis that the probabilities are the same.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PValueHeuristic" + } + ] + }, + "shard_min_doc_count": { + "description": "Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the `min_doc_count`.\nTerms will only be considered if their local shard frequency within the set is higher than the `shard_min_doc_count`.", + "type": "number" + }, + "shard_size": { + "description": "Can be used to control the volumes of candidate terms produced by each shard.\nBy default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.", + "type": "number" + }, + "size": { + "description": "The number of buckets returned out of the overall terms list.", + "type": "number" + } + } + } + ] + }, + "_types.aggregations.ChiSquareHeuristic": { + "type": "object", + "properties": { + "background_is_superset": { + "description": "Set to `false` if you defined a custom background filter that represents a different set of documents that you want to compare to.", + "type": "boolean" + }, + "include_negatives": { + "description": "Set to `false` to filter out the terms that appear less often in the subset than in documents outside the subset.", + "type": "boolean" + } + }, + "required": [ + "background_is_superset", + "include_negatives" + ] + }, + "_types.aggregations.TermsAggregationExecutionHint": { + "type": "string", + "enum": [ + "map", + "global_ordinals", + "global_ordinals_hash", + "global_ordinals_low_cardinality" + ] + }, + "_types.aggregations.GoogleNormalizedDistanceHeuristic": { + "type": "object", + "properties": { + "background_is_superset": { + "description": "Set to `false` if you defined a custom background filter that represents a different set of documents that you want to compare to.", + "type": "boolean" + } + } + }, + "_types.aggregations.MutualInformationHeuristic": { + "type": "object", + "properties": { + "background_is_superset": { + "description": "Set to `false` if you defined a custom background filter that represents a different set of documents that you want to compare to.", + "type": "boolean" + }, + "include_negatives": { + "description": "Set to `false` to filter out the terms that appear less often in the subset than in documents outside the subset.", + "type": "boolean" + } + } + }, + "_types.aggregations.PercentageScoreHeuristic": { + "type": "object" + }, + "_types.aggregations.ScriptedHeuristic": { + "type": "object", + "properties": { + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + }, + "required": [ + "script" + ] + }, + "_types.aggregations.PValueHeuristic": { + "type": "object", + "properties": { + "background_is_superset": { + "type": "boolean" + }, + "normalize_above": { + "description": "Should the results be normalized when above the given value.\nAllows for consistent significance results at various scales.\nNote: `0` is a special value which means no normalization", + "default": 0.0, + "type": "number" + } + } + }, + "_types.aggregations.SignificantTextAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "background_filter": { + "description": "A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "chi_square": { + "description": "Use Chi square, as described in \"Information Retrieval\", Manning et al., Chapter 13.5.2, as the significance score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ChiSquareHeuristic" + } + ] + }, + "exclude": { + "description": "Values to exclude.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsExclude" + } + ] + }, + "execution_hint": { + "description": "Determines whether the aggregation will use field values directly or global ordinals.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregationExecutionHint" + } + ] + }, + "field": { + "description": "The field from which to return significant text.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "filter_duplicate_text": { + "description": "Whether to out duplicate text to deal with noisy data.", + "type": "boolean" + }, + "gnd": { + "description": "Use Google normalized distance as described in \"The Google Similarity Distance\", Cilibrasi and Vitanyi, 2007, as the significance score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GoogleNormalizedDistanceHeuristic" + } + ] + }, + "include": { + "description": "Values to include.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsInclude" + } + ] + }, + "jlh": { + "description": "Use JLH score as the significance score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EmptyObject" + } + ] + }, + "min_doc_count": { + "description": "Only return values that are found in more than `min_doc_count` hits.", + "default": 3.0, + "type": "number" + }, + "mutual_information": { + "description": "Use mutual information as described in \"Information Retrieval\", Manning et al., Chapter 13.5.1, as the significance score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MutualInformationHeuristic" + } + ] + }, + "percentage": { + "description": "A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PercentageScoreHeuristic" + } + ] + }, + "script_heuristic": { + "description": "Customized score, implemented via a script.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ScriptedHeuristic" + } + ] + }, + "shard_min_doc_count": { + "description": "Regulates the certainty a shard has if the values should actually be added to the candidate list or not with respect to the min_doc_count.\nValues will only be considered if their local shard frequency within the set is higher than the `shard_min_doc_count`.", + "type": "number" + }, + "shard_size": { + "description": "The number of candidate terms produced by each shard.\nBy default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.", + "type": "number" + }, + "size": { + "description": "The number of buckets returned out of the overall terms list.", + "type": "number" + }, + "source_fields": { + "description": "Overrides the JSON `_source` fields from which text will be analyzed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + } + } + } + ] + }, + "_types.aggregations.StatsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.StatsBucketAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.StringStatsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "show_distribution": { + "description": "Shows the probability distribution for all characters.", + "default": false, + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.SumAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.SumBucketAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.PipelineAggregationBase" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.TermsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "collect_mode": { + "description": "Determines how child aggregations should be calculated: breadth-first or depth-first.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregationCollectMode" + } + ] + }, + "exclude": { + "description": "Values to exclude.\nAccepts regular expressions and partitions.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsExclude" + } + ] + }, + "execution_hint": { + "description": "Determines whether the aggregation will use field values directly or global ordinals.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregationExecutionHint" + } + ] + }, + "field": { + "description": "The field from which to return terms.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "include": { + "description": "Values to include.\nAccepts regular expressions and partitions.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsInclude" + } + ] + }, + "min_doc_count": { + "description": "Only return values that are found in more than `min_doc_count` hits.", + "default": 1.0, + "type": "number" + }, + "missing": { + "description": "The value to apply to documents that do not have a value.\nBy default, documents without a value are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Missing" + } + ] + }, + "missing_order": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MissingOrder" + } + ] + }, + "missing_bucket": { + "type": "boolean" + }, + "value_type": { + "description": "Coerced unmapped fields into the specified type.", + "type": "string" + }, + "order": { + "description": "Specifies the sort order of the buckets.\nDefaults to sorting by descending document count.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.AggregateOrder" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "shard_min_doc_count": { + "description": "Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the `min_doc_count`.\nTerms will only be considered if their local shard frequency within the set is higher than the `shard_min_doc_count`.", + "type": "number" + }, + "shard_size": { + "description": "The number of candidate terms produced by each shard.\nBy default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.", + "type": "number" + }, + "show_term_doc_count_error": { + "description": "Set to `true` to return the `doc_count_error_upper_bound`, which is an upper bound to the error on the `doc_count` returned by each shard.", + "type": "boolean" + }, + "size": { + "description": "The number of buckets returned out of the overall terms list.", + "default": 10.0, + "type": "number" + }, + "format": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.TimeSeriesAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "size": { + "description": "The maximum number of results to return.", + "default": 10000.0, + "type": "number" + }, + "keyed": { + "description": "Set to `true` to associate a unique string key with each bucket and returns the ranges as a hash rather than an array.", + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.TopHitsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "docvalue_fields": { + "description": "Fields for which to return doc values.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "explain": { + "description": "If `true`, returns detailed information about score computation as part of a hit.", + "default": false, + "type": "boolean" + }, + "fields": { + "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + } + }, + "from": { + "description": "Starting document offset.", + "default": 0.0, + "type": "number" + }, + "highlight": { + "description": "Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Highlight" + } + ] + }, + "script_fields": { + "description": "Returns the result of one or more script evaluations for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "size": { + "description": "The maximum number of top matching hits to return per bucket.", + "default": 3.0, + "type": "number" + }, + "sort": { + "description": "Sort order of the top matching hits.\nBy default, the hits are sorted by the score of the main query.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "description": "Selects the fields of the source that are returned.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "stored_fields": { + "description": "Returns values for the specified stored fields (fields that use the `store` mapping option).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "track_scores": { + "description": "If `true`, calculates and returns document scores, even if the scores are not used for sorting.", + "default": false, + "type": "boolean" + }, + "version": { + "description": "If `true`, returns document version as part of a hit.", + "default": false, + "type": "boolean" + }, + "seq_no_primary_term": { + "description": "If `true`, returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + } + } + } + ] + }, + "_types.aggregations.TTestAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + { + "type": "object", + "properties": { + "a": { + "description": "Test population A.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TestPopulation" + } + ] + }, + "b": { + "description": "Test population B.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TestPopulation" + } + ] + }, + "type": { + "description": "The type of test.", + "default": "heteroscedastic", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TTestType" + } + ] + } + } + } + ] + }, + "_types.aggregations.TestPopulation": { + "type": "object", + "properties": { + "field": { + "description": "The field to aggregate.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "filter": { + "description": "A filter used to define a set of records to run unpaired t-test on.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + }, + "required": [ + "field" + ] + }, + "_types.aggregations.TTestType": { + "type": "string", + "enum": [ + "paired", + "homoscedastic", + "heteroscedastic" + ] + }, + "_types.aggregations.TopMetricsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "metrics": { + "description": "The fields of the top document to return.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TopMetricsValue" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.TopMetricsValue" + } + } + ] + }, + "size": { + "description": "The number of top documents from which to return metrics.", + "default": 1.0, + "type": "number" + }, + "sort": { + "description": "The sort order of the documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + } + } + } + ] + }, + "_types.aggregations.TopMetricsValue": { + "type": "object", + "properties": { + "field": { + "description": "A field to return as a metric.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] + }, + "_types.aggregations.ValueCountAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormattableMetricAggregation" + }, + { + "type": "object" + } + ] + }, + "_types.aggregations.FormattableMetricAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" + }, + { + "type": "object", + "properties": { + "format": { + "type": "string" + } + } + } + ] + }, + "_types.aggregations.WeightedAverageAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + { + "type": "object", + "properties": { + "format": { + "description": "A numeric response formatter.", + "type": "string" + }, + "value": { + "description": "Configuration for the field that provides the values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.WeightedAverageValue" + } + ] + }, + "value_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ValueType" + } + ] + }, + "weight": { + "description": "Configuration for the field or script that provides the weights.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.WeightedAverageValue" + } + ] + } + } + } + ] + }, + "_types.aggregations.WeightedAverageValue": { + "type": "object", + "properties": { + "field": { + "description": "The field from which to extract the values or weights.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "missing": { + "description": "A value or weight to use if the field is missing.", + "type": "number" + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + } + }, + "_types.aggregations.VariableWidthHistogramAggregation": { + "type": "object", + "properties": { + "field": { + "description": "The name of the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "buckets": { + "description": "The target number of buckets.", + "default": 10.0, + "type": "number" + }, + "shard_size": { + "description": "The number of buckets that the coordinating node will request from each shard.\nDefaults to `buckets * 50`.", + "type": "number" + }, + "initial_buffer": { + "description": "Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run.\nDefaults to `min(10 * shard_size, 50000)`.", + "type": "number" + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + } + }, + "_types.Refresh": { + "type": "string", + "enum": [ + "true", + "false", + "wait_for" + ] + }, + "_types.WaitForActiveShards": { + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/_types.WaitForActiveShardOptions" + } + ] + }, + "_types.WaitForActiveShardOptions": { + "type": "string", + "enum": [ + "all", + "index-setting" + ] + }, + "_global.bulk.OperationContainer": { + "type": "object", + "properties": { + "index": { + "description": "Index the specified document.\nIf the document exists, it replaces the document and increments the version.\nThe following line must contain the source data to be indexed.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.IndexOperation" + } + ] + }, + "create": { + "description": "Index the specified document if it does not already exist.\nThe following line must contain the source data to be indexed.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.CreateOperation" + } + ] + }, + "update": { + "description": "Perform a partial document update.\nThe following line must contain the partial document and update options.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.UpdateOperation" + } + ] + }, + "delete": { + "description": "Remove the specified document from the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.DeleteOperation" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_global.bulk.IndexOperation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.WriteOperation" + }, + { + "type": "object" + } + ] + }, + "_global.bulk.WriteOperation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.OperationBase" + }, + { + "type": "object", + "properties": { + "dynamic_templates": { + "description": "A map from the full name of fields to the name of dynamic templates.\nIt defaults to an empty map.\nIf a name matches a dynamic template, that template will be applied regardless of other match predicates defined in the template.\nIf a field is already defined in the mapping, then this parameter won't be used.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "pipeline": { + "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", + "type": "string" + }, + "require_alias": { + "description": "If `true`, the request's actions must target an index alias.", + "default": false, + "type": "boolean" + } + } + } + ] + }, + "_global.bulk.OperationBase": { + "type": "object", + "properties": { + "_id": { + "description": "The document ID.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "description": "The name of the index or index alias to perform the action on.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "routing": { + "description": "A custom value used to route operations to a specific shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "if_primary_term": { + "type": "number" + }, + "if_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] + } + } + }, + "_global.bulk.CreateOperation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.WriteOperation" + }, + { + "type": "object" + } + ] + }, + "_global.bulk.UpdateOperation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.OperationBase" + }, + { + "type": "object", + "properties": { + "require_alias": { + "description": "If `true`, the request's actions must target an index alias.", + "default": false, + "type": "boolean" + }, + "retry_on_conflict": { + "description": "The number of times an update should be retried in the case of a version conflict.", + "type": "number" + } + } + } + ] + }, + "_global.bulk.DeleteOperation": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.OperationBase" + }, + { + "type": "object" + } + ] + }, + "_global.bulk.UpdateAction": { + "type": "object", + "properties": { + "detect_noop": { + "description": "If true, the `result` in the response is set to 'noop' when no changes to the document occur.", + "default": true, + "type": "boolean" + }, + "doc": { + "description": "A partial update to an existing document.", + "type": "object" + }, + "doc_as_upsert": { + "description": "Set to `true` to use the contents of `doc` as the value of `upsert`.", + "default": false, + "type": "boolean" + }, + "script": { + "description": "The script to run to update the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "scripted_upsert": { + "description": "Set to `true` to run the script whether or not the document exists.", + "default": false, + "type": "boolean" + }, + "_source": { + "description": "If `false`, source retrieval is turned off.\nYou can also specify a comma-separated list of the fields you want to retrieve.", + "default": "true", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "upsert": { + "description": "If the document does not already exist, the contents of `upsert` are inserted as a new document.\nIf the document exists, the `script` is run.", + "type": "object" + } + } + }, + "_global.bulk.ResponseItem": { + "type": "object", + "properties": { + "_id": { + "description": "The document ID associated with the operation.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "_index": { + "description": "The name of the index associated with the operation.\nIf the operation targeted a data stream, this is the backing index into which the document was written.", + "type": "string" + }, + "status": { + "description": "The HTTP status code returned for the operation.", + "type": "number" + }, + "failure_store": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.FailureStoreStatus" + } + ] + }, + "error": { + "description": "Additional information about the failed operation.\nThe property is returned only for failed operations.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + }, + "_primary_term": { + "description": "The primary term assigned to the document for the operation.\nThis property is returned only for successful operations.", + "type": "number" + }, + "result": { + "description": "The result of the operation.\nSuccessful values are `created`, `deleted`, and `updated`.", + "type": "string" + }, + "_seq_no": { + "description": "The sequence number assigned to the document for the operation.\nSequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_shards": { + "description": "Shard information for the operation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "_version": { + "description": "The document version associated with the operation.\nThe document version is incremented each time the document is updated.\nThis property is returned only for successful actions.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "forced_refresh": { + "type": "boolean" + }, + "get": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.InlineGetDictUserDefined" + } + ] + } + }, + "required": [ + "_index", + "status" + ] + }, + "_global.bulk.FailureStoreStatus": { + "type": "string", + "enum": [ + "not_applicable_or_unknown", + "used", + "not_enabled", + "failed" + ] + }, + "_types.InlineGetDictUserDefined": { + "type": "object", + "properties": { + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "found": { + "type": "boolean" + }, + "_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_primary_term": { + "type": "number" + }, + "_routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "_source": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "found" + ] + }, + "_types.Names": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Name" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" + } + } + ] + }, + "cat._types.CatAliasesColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatAliasesColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatAliasesColumn" + } + } + ] + }, + "cat._types.CatAliasesColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "alias", + "a", + "index", + "i", + "idx", + "filter", + "f", + "fi", + "routing.index", + "ri", + "routingIndex", + "routing.search", + "rs", + "routingSearch", + "is_write_index", + "w", + "isWriteIndex" + ] + }, + { + "type": "string" + } + ] + }, + "cat.aliases.AliasesRecord": { + "type": "object", + "properties": { + "alias": { + "description": "alias name", + "type": "string" + }, + "index": { + "description": "index alias points to", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "filter": { + "description": "filter", + "type": "string" + }, + "routing.index": { + "description": "index routing", + "type": "string" + }, + "routing.search": { + "description": "search routing", + "type": "string" + }, + "is_write_index": { + "description": "write index", + "type": "string" + } + } + }, + "_types.NodeIds": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.NodeId" + } + } + ] + }, + "cat._types.CatAllocationColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatAllocationColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatAllocationColumn" + } + } + ] + }, + "cat._types.CatAllocationColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "shards", + "s", + "shards.undesired", + "write_load.forecast", + "wlf", + "writeLoadForecast", + "disk.indices.forecast", + "dif", + "diskIndicesForecast", + "disk.indices", + "di", + "diskIndices", + "disk.used", + "du", + "diskUsed", + "disk.avail", + "da", + "diskAvail", + "disk.total", + "dt", + "diskTotal", + "disk.percent", + "dp", + "diskPercent", + "host", + "h", + "ip", + "node", + "n", + "node.role", + "r", + "role", + "nodeRole" + ] + }, + { + "type": "string" + } + ] + }, + "cat.allocation.AllocationRecord": { + "type": "object", + "properties": { + "shards": { + "description": "Number of primary and replica shards assigned to the node.", + "type": "string" + }, + "shards.undesired": { + "description": "Amount of shards that are scheduled to be moved elsewhere in the cluster or -1 other than desired balance allocator is used", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "write_load.forecast": { + "description": "Sum of index write load forecasts", + "oneOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifieddouble" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "disk.indices.forecast": { + "description": "Sum of shard size forecasts", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "disk.indices": { + "description": "Disk space used by the node’s shards. Does not include disk space for the translog or unassigned shards.\nIMPORTANT: This metric double-counts disk space for hard-linked files, such as those created when shrinking, splitting, or cloning an index.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "disk.used": { + "description": "Total disk space in use.\nElasticsearch retrieves this metric from the node’s operating system (OS).\nThe metric includes disk space for: Elasticsearch, including the translog and unassigned shards; the node’s operating system; any other applications or files on the node.\nUnlike `disk.indices`, this metric does not double-count disk space for hard-linked files.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "disk.avail": { + "description": "Free disk space available to Elasticsearch.\nElasticsearch retrieves this metric from the node’s operating system.\nDisk-based shard allocation uses this metric to assign shards to nodes based on available disk space.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "disk.total": { + "description": "Total disk space for the node, including in-use and available space.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "disk.percent": { + "description": "Total percentage of disk space in use. Calculated as `disk.used / disk.total`.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "host": { + "description": "Network host for the node. Set using the `network.host` setting.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Host" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "ip": { + "description": "IP address and port for the node.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Ip" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "node": { + "description": "Name for the node. Set using the `node.name` setting.", + "type": "string" + }, + "node.role": { + "description": "Node roles", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "_spec_utils.Stringifieddouble": { + "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "_types.ByteSize": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "_types.Percentage": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "_types.Host": { + "type": "string" + }, + "_types.Ip": { + "type": "string" + }, + "cat._types.CatCircuitBreakerColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatCircuitBreakerColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatCircuitBreakerColumn" + } + } + ] + }, + "cat._types.CatCircuitBreakerColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "node_id", + "id", + "node_name", + "nn", + "breaker", + "br", + "limit", + "l", + "limit_bytes", + "lb", + "estimated", + "e", + "estimated_bytes", + "eb", + "tripped", + "t", + "overhead", + "o" + ] + }, + { + "type": "string" + } + ] + }, + "cat.circuit_breaker.CircuitBreakerRecord": { + "type": "object", + "properties": { + "node_id": { + "description": "Persistent node ID", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + }, + "node_name": { + "description": "Node name", + "type": "string" + }, + "breaker": { + "description": "Breaker name", + "type": "string" + }, + "limit": { + "description": "Limit size", + "type": "string" + }, + "limit_bytes": { + "description": "Limit size in bytes", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "estimated": { + "description": "Estimated size", + "type": "string" + }, + "estimated_bytes": { + "description": "Estimated size in bytes", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "tripped": { + "description": "Tripped count", + "type": "string" + }, + "overhead": { + "description": "Overhead", + "type": "string" + } + } + }, + "cat._types.CatComponentColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatComponentColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatComponentColumn" + } + } + ] + }, + "cat._types.CatComponentColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "name", + "n", + "version", + "v", + "alias_count", + "a", + "mapping_count", + "m", + "settings_count", + "s", + "metadata_count", + "me", + "included_in", + "i" + ] + }, + { + "type": "string" + } + ] + }, + "cat.component_templates.ComponentTemplate": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "alias_count": { + "type": "string" + }, + "mapping_count": { + "type": "string" + }, + "settings_count": { + "type": "string" + }, + "metadata_count": { + "type": "string" + }, + "included_in": { + "type": "string" + } + }, + "required": [ + "name", + "version", + "alias_count", + "mapping_count", + "settings_count", + "metadata_count", + "included_in" + ] + }, + "cat._types.CatCountColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatCountColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatCountColumn" + } + } + ] + }, + "cat._types.CatCountColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "epoch", + "t", + "time", + "timestamp", + "ts", + "hms", + "hhmmss", + "count", + "dc", + "docs.count", + "docsCount" + ] + }, + { + "type": "string" + } + ] + }, + "cat.count.CountRecord": { + "type": "object", + "properties": { + "epoch": { + "description": "seconds since 1970-01-01 00:00:00", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitSeconds" + } + ] + }, + "timestamp": { + "description": "time in HH:MM:SS", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeOfDay" + } + ] + }, + "count": { + "description": "the document count", + "type": "string" + } + } + }, + "_spec_utils.StringifiedEpochTimeUnitSeconds": { + "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitSeconds" + }, + { + "type": "string" + } + ] + }, + "_types.EpochTimeUnitSeconds": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitSeconds" + } + ] + }, + "_types.UnitSeconds": { + "description": "Time unit for seconds", + "type": "number" + }, + "_types.TimeOfDay": { + "description": "Time of day, expressed as HH:MM:SS", + "type": "string" + }, + "cat._types.CatFieldDataColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatFieldDataColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatFieldDataColumn" + } + } + ] + }, + "cat._types.CatFieldDataColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "id", + "host", + "h", + "ip", + "node", + "n", + "field", + "f", + "size", + "s" + ] + }, + { + "type": "string" + } + ] + }, + "cat.fielddata.FielddataRecord": { + "type": "object", + "properties": { + "id": { + "description": "node id", + "type": "string" + }, + "host": { + "description": "host name", + "type": "string" + }, + "ip": { + "description": "ip address", + "type": "string" + }, + "node": { + "description": "node name", + "type": "string" + }, + "field": { + "description": "field name", + "type": "string" + }, + "size": { + "description": "field data usage", + "type": "string" + } + } + }, + "cat._types.CatHealthColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatHealthColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatHealthColumn" + } + } + ] + }, + "cat._types.CatHealthColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "epoch", + "t", + "time", + "timestamp", + "ts", + "hms", + "hhmmss", + "cluster", + "cl", + "status", + "st", + "node.total", + "nt", + "nodeTotal", + "node.data", + "nd", + "nodeData", + "shards", + "t", + "sh", + "shards.total", + "shardsTotal", + "pri", + "p", + "shards.primary", + "shardsPrimary", + "relo", + "r", + "shards.relocating", + "shardsRelocating", + "init", + "i", + "shards.initializing", + "shardsInitializing", + "unassign", + "u", + "shards.unassigned", + "shardsUnassigned", + "unassign.pri", + "up", + "shards.unassigned.primary", + "shardsUnassignedPrimary", + "pending_tasks", + "pt", + "pendingTasks", + "max_task_wait_time", + "mtwt", + "maxTaskWaitTime", + "active_shards_percent", + "asp", + "activeShardsPercent" + ] + }, + { + "type": "string" + } + ] + }, + "cat.health.HealthRecord": { + "type": "object", + "properties": { + "epoch": { + "description": "seconds since 1970-01-01 00:00:00", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitSeconds" + } + ] + }, + "timestamp": { + "description": "time in HH:MM:SS", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeOfDay" + } + ] + }, + "cluster": { + "description": "cluster name", + "type": "string" + }, + "status": { + "description": "health status", + "type": "string" + }, + "node.total": { + "description": "total number of nodes", + "type": "string" + }, + "node.data": { + "description": "number of nodes that can store data", + "type": "string" + }, + "shards": { + "description": "total number of shards", + "type": "string" + }, + "pri": { + "description": "number of primary shards", + "type": "string" + }, + "relo": { + "description": "number of relocating nodes", + "type": "string" + }, + "init": { + "description": "number of initializing nodes", + "type": "string" + }, + "unassign.pri": { + "description": "number of unassigned primary shards", + "type": "string" + }, + "unassign": { + "description": "number of unassigned shards", + "type": "string" + }, + "pending_tasks": { + "description": "number of pending tasks", + "type": "string" + }, + "max_task_wait_time": { + "description": "wait time of longest task pending", + "type": "string" + }, + "active_shards_percent": { + "description": "active number of shards in percent", + "type": "string" + } + } + }, + "_types.HealthStatus": { + "type": "string", + "enum": [ + "green", + "GREEN", + "yellow", + "YELLOW", + "red", + "RED", + "unknown", + "unavailable" + ] + }, + "cat._types.CatIndicesColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatIndicesColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatIndicesColumn" + } + } + ] + }, + "cat._types.CatIndicesColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "health", + "h", + "status", + "s", + "index", + "i", + "idx", + "uuid", + "id", + "uuid", + "pri", + "p", + "shards.primary", + "shardsPrimary", + "rep", + "r", + "shards.replica", + "shardsReplica", + "docs.count", + "dc", + "docsCount", + "docs.deleted", + "dd", + "docsDeleted", + "creation.date", + "cd", + "creation.date.string", + "cds", + "store.size", + "ss", + "storeSize", + "pri.store.size", + "dataset.size", + "completion.size", + "cs", + "completionSize", + "pri.completion.size", + "fielddata.memory_size", + "fm", + "fielddataMemory", + "pri.fielddata.memory_size", + "fielddata.evictions", + "fe", + "fielddataEvictions", + "pri.fielddata.evictions", + "query_cache.memory_size", + "qcm", + "queryCacheMemory", + "pri.query_cache.memory_size", + "query_cache.evictions", + "qce", + "queryCacheEvictions", + "pri.query_cache.evictions", + "request_cache.memory_size", + "rcm", + "requestCacheMemory", + "pri.request_cache.memory_size", + "request_cache.evictions", + "rce", + "requestCacheEvictions", + "pri.request_cache.evictions", + "request_cache.hit_count", + "rchc", + "requestCacheHitCount", + "pri.request_cache.hit_count", + "request_cache.miss_count", + "rcmc", + "requestCacheMissCount", + "pri.request_cache.miss_count", + "flush.total", + "ft", + "flushTotal", + "pri.flush.total", + "flush.total_time", + "ftt", + "flushTotalTime", + "pri.flush.total_time", + "get.current", + "gc", + "getCurrent", + "pri.get.current", + "get.time", + "gti", + "getTime", + "pri.get.time", + "get.total", + "gto", + "getTotal", + "pri.get.total", + "get.exists_time", + "geti", + "getExistsTime", + "pri.get.exists_time", + "get.exists_total", + "geto", + "getExistsTotal", + "pri.get.exists_total", + "get.missing_time", + "gmti", + "getMissingTime", + "pri.get.missing_time", + "get.missing_total", + "gmto", + "getMissingTotal", + "pri.get.missing_total", + "indexing.delete_current", + "idc", + "indexingDeleteCurrent", + "pri.indexing.delete_current", + "indexing.delete_time", + "idti", + "indexingDeleteTime", + "pri.indexing.delete_time", + "indexing.delete_total", + "idto", + "indexingDeleteTotal", + "pri.indexing.delete_total", + "indexing.index_current", + "iic", + "indexingIndexCurrent", + "pri.indexing.index_current", + "indexing.index_time", + "iiti", + "indexingIndexTime", + "pri.indexing.index_time", + "indexing.index_total", + "iito", + "indexingIndexTotal", + "pri.indexing.index_total", + "indexing.index_failed", + "iif", + "indexingIndexFailed", + "pri.indexing.index_failed", + "indexing.index_failed_due_to_version_conflict", + "iifvc", + "indexingIndexFailedDueToVersionConflict", + "pri.indexing.index_failed_due_to_version_conflict", + "merges.current", + "mc", + "mergesCurrent", + "pri.merges.current", + "merges.current_docs", + "mcd", + "mergesCurrentDocs", + "pri.merges.current_docs", + "merges.current_size", + "mcs", + "mergesCurrentSize", + "pri.merges.current_size", + "merges.total", + "mt", + "mergesTotal", + "pri.merges.total", + "merges.total_docs", + "mtd", + "mergesTotalDocs", + "pri.merges.total_docs", + "merges.total_size", + "mts", + "mergesTotalSize", + "pri.merges.total_size", + "merges.total_time", + "mtt", + "mergesTotalTime", + "pri.merges.total_time", + "refresh.total", + "rto", + "refreshTotal", + "pri.refresh.total", + "refresh.time", + "rti", + "refreshTime", + "pri.refresh.time", + "refresh.external_total", + "rto", + "refreshTotal", + "pri.refresh.external_total", + "refresh.external_time", + "rti", + "refreshTime", + "pri.refresh.external_time", + "refresh.listeners", + "rli", + "refreshListeners", + "pri.refresh.listeners", + "search.fetch_current", + "sfc", + "searchFetchCurrent", + "pri.search.fetch_current", + "search.fetch_time", + "sfti", + "searchFetchTime", + "pri.search.fetch_time", + "search.fetch_total", + "sfto", + "searchFetchTotal", + "pri.search.fetch_total", + "search.open_contexts", + "so", + "searchOpenContexts", + "pri.search.open_contexts", + "search.query_current", + "sqc", + "searchQueryCurrent", + "pri.search.query_current", + "search.query_time", + "sqti", + "searchQueryTime", + "pri.search.query_time", + "search.query_total", + "sqto", + "searchQueryTotal", + "pri.search.query_total", + "search.scroll_current", + "scc", + "searchScrollCurrent", + "pri.search.scroll_current", + "search.scroll_time", + "scti", + "searchScrollTime", + "pri.search.scroll_time", + "search.scroll_total", + "scto", + "searchScrollTotal", + "pri.search.scroll_total", + "segments.count", + "sc", + "segmentsCount", + "pri.segments.count", + "segments.memory", + "sm", + "segmentsMemory", + "pri.segments.memory", + "segments.index_writer_memory", + "siwm", + "segmentsIndexWriterMemory", + "pri.segments.index_writer_memory", + "segments.version_map_memory", + "svmm", + "segmentsVersionMapMemory", + "pri.segments.version_map_memory", + "segments.fixed_bitset_memory", + "sfbm", + "fixedBitsetMemory", + "pri.segments.fixed_bitset_memory", + "warmer.current", + "wc", + "warmerCurrent", + "pri.warmer.current", + "warmer.total", + "wto", + "warmerTotal", + "pri.warmer.total", + "warmer.total_time", + "wtt", + "warmerTotalTime", + "pri.warmer.total_time", + "suggest.current", + "suc", + "suggestCurrent", + "pri.suggest.current", + "suggest.time", + "suti", + "suggestTime", + "pri.suggest.time", + "suggest.total", + "suto", + "suggestTotal", + "pri.suggest.total", + "memory.total", + "tm", + "memoryTotal", + "pri.memory.total", + "bulk.total_operations", + "bto", + "bulkTotalOperation", + "pri.bulk.total_operations", + "bulk.total_time", + "btti", + "bulkTotalTime", + "pri.bulk.total_time", + "bulk.total_size_in_bytes", + "btsi", + "bulkTotalSizeInBytes", + "pri.bulk.total_size_in_bytes", + "bulk.avg_time", + "bati", + "bulkAvgTime", + "pri.bulk.avg_time", + "bulk.avg_size_in_bytes", + "basi", + "bulkAvgSizeInBytes", + "pri.bulk.avg_size_in_bytes", + "dense_vector.value_count", + "dvc", + "denseVectorCount", + "pri.dense_vector.value_count", + "sparse_vector.value_count", + "svc", + "sparseVectorCount", + "pri.sparse_vector.value_count" + ] + }, + { + "type": "string" + } + ] + }, + "cat.indices.IndicesRecord": { + "type": "object", + "properties": { + "health": { + "description": "current health status", + "type": "string" + }, + "status": { + "description": "open/close status", + "type": "string" + }, + "index": { + "description": "index name", + "type": "string" + }, + "uuid": { + "description": "index uuid", + "type": "string" + }, + "pri": { + "description": "number of primary shards", + "type": "string" + }, + "rep": { + "description": "number of replica shards", + "type": "string" + }, + "docs.count": { + "description": "The number of documents in the index, including hidden nested documents.\nFor indices with `semantic_text` fields or other nested field types,\nthis count includes the internal nested documents.\nTo get the logical document count (excluding nested documents), use\nthe `_count` API or `_cat/count` API instead.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "docs.deleted": { + "description": "deleted docs", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "creation.date": { + "description": "index creation date (millisecond value)", + "type": "string" + }, + "creation.date.string": { + "description": "index creation date (as string)", + "type": "string" + }, + "store.size": { + "description": "store size of primaries & replicas", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "pri.store.size": { + "description": "store size of primaries", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "dataset.size": { + "description": "total size of dataset (including the cache for partially mounted indices)", + "x-state": "Generally available; Added in 8.11.0", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "completion.size": { + "description": "size of completion", + "type": "string" + }, + "pri.completion.size": { + "description": "size of completion", + "type": "string" + }, + "fielddata.memory_size": { + "description": "used fielddata cache", + "type": "string" + }, + "pri.fielddata.memory_size": { + "description": "used fielddata cache", + "type": "string" + }, + "fielddata.evictions": { + "description": "fielddata evictions", + "type": "string" + }, + "pri.fielddata.evictions": { + "description": "fielddata evictions", + "type": "string" + }, + "query_cache.memory_size": { + "description": "used query cache", + "type": "string" + }, + "pri.query_cache.memory_size": { + "description": "used query cache", + "type": "string" + }, + "query_cache.evictions": { + "description": "query cache evictions", + "type": "string" + }, + "pri.query_cache.evictions": { + "description": "query cache evictions", + "type": "string" + }, + "request_cache.memory_size": { + "description": "used request cache", + "type": "string" + }, + "pri.request_cache.memory_size": { + "description": "used request cache", + "type": "string" + }, + "request_cache.evictions": { + "description": "request cache evictions", + "type": "string" + }, + "pri.request_cache.evictions": { + "description": "request cache evictions", + "type": "string" + }, + "request_cache.hit_count": { + "description": "request cache hit count", + "type": "string" + }, + "pri.request_cache.hit_count": { + "description": "request cache hit count", + "type": "string" + }, + "request_cache.miss_count": { + "description": "request cache miss count", + "type": "string" + }, + "pri.request_cache.miss_count": { + "description": "request cache miss count", + "type": "string" + }, + "flush.total": { + "description": "number of flushes", + "type": "string" + }, + "pri.flush.total": { + "description": "number of flushes", + "type": "string" + }, + "flush.total_time": { + "description": "time spent in flush", + "type": "string" + }, + "pri.flush.total_time": { + "description": "time spent in flush", + "type": "string" + }, + "get.current": { + "description": "number of current get ops", + "type": "string" + }, + "pri.get.current": { + "description": "number of current get ops", + "type": "string" + }, + "get.time": { + "description": "time spent in get", + "type": "string" + }, + "pri.get.time": { + "description": "time spent in get", + "type": "string" + }, + "get.total": { + "description": "number of get ops", + "type": "string" + }, + "pri.get.total": { + "description": "number of get ops", + "type": "string" + }, + "get.exists_time": { + "description": "time spent in successful gets", + "type": "string" + }, + "pri.get.exists_time": { + "description": "time spent in successful gets", + "type": "string" + }, + "get.exists_total": { + "description": "number of successful gets", + "type": "string" + }, + "pri.get.exists_total": { + "description": "number of successful gets", + "type": "string" + }, + "get.missing_time": { + "description": "time spent in failed gets", + "type": "string" + }, + "pri.get.missing_time": { + "description": "time spent in failed gets", + "type": "string" + }, + "get.missing_total": { + "description": "number of failed gets", + "type": "string" + }, + "pri.get.missing_total": { + "description": "number of failed gets", + "type": "string" + }, + "indexing.delete_current": { + "description": "number of current deletions", + "type": "string" + }, + "pri.indexing.delete_current": { + "description": "number of current deletions", + "type": "string" + }, + "indexing.delete_time": { + "description": "time spent in deletions", + "type": "string" + }, + "pri.indexing.delete_time": { + "description": "time spent in deletions", + "type": "string" + }, + "indexing.delete_total": { + "description": "number of delete ops", + "type": "string" + }, + "pri.indexing.delete_total": { + "description": "number of delete ops", + "type": "string" + }, + "indexing.index_current": { + "description": "number of current indexing ops", + "type": "string" + }, + "pri.indexing.index_current": { + "description": "number of current indexing ops", + "type": "string" + }, + "indexing.index_time": { + "description": "time spent in indexing", + "type": "string" + }, + "pri.indexing.index_time": { + "description": "time spent in indexing", + "type": "string" + }, + "indexing.index_total": { + "description": "number of indexing ops", + "type": "string" + }, + "pri.indexing.index_total": { + "description": "number of indexing ops", + "type": "string" + }, + "indexing.index_failed": { + "description": "number of failed indexing ops", + "type": "string" + }, + "pri.indexing.index_failed": { + "description": "number of failed indexing ops", + "type": "string" + }, + "merges.current": { + "description": "number of current merges", + "type": "string" + }, + "pri.merges.current": { + "description": "number of current merges", + "type": "string" + }, + "merges.current_docs": { + "description": "number of current merging docs", + "type": "string" + }, + "pri.merges.current_docs": { + "description": "number of current merging docs", + "type": "string" + }, + "merges.current_size": { + "description": "size of current merges", + "type": "string" + }, + "pri.merges.current_size": { + "description": "size of current merges", + "type": "string" + }, + "merges.total": { + "description": "number of completed merge ops", + "type": "string" + }, + "pri.merges.total": { + "description": "number of completed merge ops", + "type": "string" + }, + "merges.total_docs": { + "description": "docs merged", + "type": "string" + }, + "pri.merges.total_docs": { + "description": "docs merged", + "type": "string" + }, + "merges.total_size": { + "description": "size merged", + "type": "string" + }, + "pri.merges.total_size": { + "description": "size merged", + "type": "string" + }, + "merges.total_time": { + "description": "time spent in merges", + "type": "string" + }, + "pri.merges.total_time": { + "description": "time spent in merges", + "type": "string" + }, + "refresh.total": { + "description": "total refreshes", + "type": "string" + }, + "pri.refresh.total": { + "description": "total refreshes", + "type": "string" + }, + "refresh.time": { + "description": "time spent in refreshes", + "type": "string" + }, + "pri.refresh.time": { + "description": "time spent in refreshes", + "type": "string" + }, + "refresh.external_total": { + "description": "total external refreshes", + "type": "string" + }, + "pri.refresh.external_total": { + "description": "total external refreshes", + "type": "string" + }, + "refresh.external_time": { + "description": "time spent in external refreshes", + "type": "string" + }, + "pri.refresh.external_time": { + "description": "time spent in external refreshes", + "type": "string" + }, + "refresh.listeners": { + "description": "number of pending refresh listeners", + "type": "string" + }, + "pri.refresh.listeners": { + "description": "number of pending refresh listeners", + "type": "string" + }, + "search.fetch_current": { + "description": "current fetch phase ops", + "type": "string" + }, + "pri.search.fetch_current": { + "description": "current fetch phase ops", + "type": "string" + }, + "search.fetch_time": { + "description": "time spent in fetch phase", + "type": "string" + }, + "pri.search.fetch_time": { + "description": "time spent in fetch phase", + "type": "string" + }, + "search.fetch_total": { + "description": "total fetch ops", + "type": "string" + }, + "pri.search.fetch_total": { + "description": "total fetch ops", + "type": "string" + }, + "search.open_contexts": { + "description": "open search contexts", + "type": "string" + }, + "pri.search.open_contexts": { + "description": "open search contexts", + "type": "string" + }, + "search.query_current": { + "description": "current query phase ops", + "type": "string" + }, + "pri.search.query_current": { + "description": "current query phase ops", + "type": "string" + }, + "search.query_time": { + "description": "time spent in query phase", + "type": "string" + }, + "pri.search.query_time": { + "description": "time spent in query phase", + "type": "string" + }, + "search.query_total": { + "description": "total query phase ops", + "type": "string" + }, + "pri.search.query_total": { + "description": "total query phase ops", + "type": "string" + }, + "search.scroll_current": { + "description": "open scroll contexts", + "type": "string" + }, + "pri.search.scroll_current": { + "description": "open scroll contexts", + "type": "string" + }, + "search.scroll_time": { + "description": "time scroll contexts held open", + "type": "string" + }, + "pri.search.scroll_time": { + "description": "time scroll contexts held open", + "type": "string" + }, + "search.scroll_total": { + "description": "completed scroll contexts", + "type": "string" + }, + "pri.search.scroll_total": { + "description": "completed scroll contexts", + "type": "string" + }, + "segments.count": { + "description": "number of segments", + "type": "string" + }, + "pri.segments.count": { + "description": "number of segments", + "type": "string" + }, + "segments.memory": { + "description": "memory used by segments", + "type": "string" + }, + "pri.segments.memory": { + "description": "memory used by segments", + "type": "string" + }, + "segments.index_writer_memory": { + "description": "memory used by index writer", + "type": "string" + }, + "pri.segments.index_writer_memory": { + "description": "memory used by index writer", + "type": "string" + }, + "segments.version_map_memory": { + "description": "memory used by version map", + "type": "string" + }, + "pri.segments.version_map_memory": { + "description": "memory used by version map", + "type": "string" + }, + "segments.fixed_bitset_memory": { + "description": "memory used by fixed bit sets for nested object field types and export type filters for types referred in _parent fields", + "type": "string" + }, + "pri.segments.fixed_bitset_memory": { + "description": "memory used by fixed bit sets for nested object field types and export type filters for types referred in _parent fields", + "type": "string" + }, + "warmer.current": { + "description": "current warmer ops", + "type": "string" + }, + "pri.warmer.current": { + "description": "current warmer ops", + "type": "string" + }, + "warmer.total": { + "description": "total warmer ops", + "type": "string" + }, + "pri.warmer.total": { + "description": "total warmer ops", + "type": "string" + }, + "warmer.total_time": { + "description": "time spent in warmers", + "type": "string" + }, + "pri.warmer.total_time": { + "description": "time spent in warmers", + "type": "string" + }, + "suggest.current": { + "description": "number of current suggest ops", + "type": "string" + }, + "pri.suggest.current": { + "description": "number of current suggest ops", + "type": "string" + }, + "suggest.time": { + "description": "time spend in suggest", + "type": "string" + }, + "pri.suggest.time": { + "description": "time spend in suggest", + "type": "string" + }, + "suggest.total": { + "description": "number of suggest ops", + "type": "string" + }, + "pri.suggest.total": { + "description": "number of suggest ops", + "type": "string" + }, + "memory.total": { + "description": "total used memory", + "type": "string" + }, + "pri.memory.total": { + "description": "total user memory", + "type": "string" + }, + "search.throttled": { + "description": "indicates if the index is search throttled", + "type": "string" + }, + "bulk.total_operations": { + "description": "number of bulk shard ops", + "type": "string" + }, + "pri.bulk.total_operations": { + "description": "number of bulk shard ops", + "type": "string" + }, + "bulk.total_time": { + "description": "time spend in shard bulk", + "type": "string" + }, + "pri.bulk.total_time": { + "description": "time spend in shard bulk", + "type": "string" + }, + "bulk.total_size_in_bytes": { + "description": "total size in bytes of shard bulk", + "type": "string" + }, + "pri.bulk.total_size_in_bytes": { + "description": "total size in bytes of shard bulk", + "type": "string" + }, + "bulk.avg_time": { + "description": "average time spend in shard bulk", + "type": "string" + }, + "pri.bulk.avg_time": { + "description": "average time spend in shard bulk", + "type": "string" + }, + "bulk.avg_size_in_bytes": { + "description": "average size in bytes of shard bulk", + "type": "string" + }, + "pri.bulk.avg_size_in_bytes": { + "description": "average size in bytes of shard bulk", + "type": "string" + } + } + }, + "cat._types.CatMasterColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatMasterColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatMasterColumn" + } + } + ] + }, + "cat._types.CatMasterColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "id", + "host", + "h", + "ip", + "node", + "n" + ] + }, + { + "type": "string" + } + ] + }, + "cat.master.MasterRecord": { + "type": "object", + "properties": { + "id": { + "description": "node id", + "type": "string" + }, + "host": { + "description": "host name", + "type": "string" + }, + "ip": { + "description": "ip address", + "type": "string" + }, + "node": { + "description": "node name", + "type": "string" + } + } + }, + "cat._types.CatDfaColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatDfaColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatDfaColumn" + } + } + ] + }, + "cat._types.CatDfaColumn": { + "type": "string", + "enum": [ + "assignment_explanation", + "ae", + "create_time", + "ct", + "createTime", + "description", + "d", + "dest_index", + "di", + "destIndex", + "failure_reason", + "fr", + "failureReason", + "id", + "model_memory_limit", + "mml", + "modelMemoryLimit", + "node.address", + "na", + "nodeAddress", + "node.ephemeral_id", + "ne", + "nodeEphemeralId", + "node.id", + "ni", + "nodeId", + "node.name", + "nn", + "nodeName", + "progress", + "p", + "source_index", + "si", + "sourceIndex", + "state", + "s", + "type", + "t", + "version", + "v" + ] + }, + "cat.ml_data_frame_analytics.DataFrameAnalyticsRecord": { + "type": "object", + "properties": { + "id": { + "description": "The identifier for the job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "type": { + "description": "The type of analysis that the job performs.", + "type": "string" + }, + "create_time": { + "description": "The time when the job was created.", + "type": "string" + }, + "version": { + "description": "The version of Elasticsearch when the job was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "source_index": { + "description": "The name of the source index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "dest_index": { + "description": "The name of the destination index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "description": { + "description": "A description of the job.", + "type": "string" + }, + "model_memory_limit": { + "description": "The approximate maximum amount of memory resources that are permitted for the job.", + "type": "string" + }, + "state": { + "description": "The current status of the job.", + "type": "string" + }, + "failure_reason": { + "description": "Messages about the reason why the job failed.", + "type": "string" + }, + "progress": { + "description": "The progress report for the job by phase.", + "type": "string" + }, + "assignment_explanation": { + "description": "Messages related to the selection of a node.", + "type": "string" + }, + "node.id": { + "description": "The unique identifier of the assigned node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "node.name": { + "description": "The name of the assigned node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "node.ephemeral_id": { + "description": "The ephemeral identifier of the assigned node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "node.address": { + "description": "The network address of the assigned node.", + "type": "string" + } + } + }, + "_types.VersionString": { + "type": "string" + }, + "cat._types.CatDatafeedColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatDatafeedColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatDatafeedColumn" + } + } + ] + }, + "cat._types.CatDatafeedColumn": { + "type": "string", + "enum": [ + "ae", + "assignment_explanation", + "bc", + "buckets.count", + "bucketsCount", + "id", + "na", + "node.address", + "nodeAddress", + "ne", + "node.ephemeral_id", + "nodeEphemeralId", + "ni", + "node.id", + "nodeId", + "nn", + "node.name", + "nodeName", + "sba", + "search.bucket_avg", + "searchBucketAvg", + "sc", + "search.count", + "searchCount", + "seah", + "search.exp_avg_hour", + "searchExpAvgHour", + "st", + "search.time", + "searchTime", + "s", + "state" + ] + }, + "cat.ml_datafeeds.DatafeedsRecord": { + "type": "object", + "properties": { + "id": { + "description": "The datafeed identifier.", + "type": "string" + }, + "state": { + "description": "The status of the datafeed.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedState" + } + ] + }, + "assignment_explanation": { + "description": "For started datafeeds only, contains messages relating to the selection of a node.", + "type": "string" + }, + "buckets.count": { + "description": "The number of buckets processed.", + "type": "string" + }, + "search.count": { + "description": "The number of searches run by the datafeed.", + "type": "string" + }, + "search.time": { + "description": "The total time the datafeed spent searching, in milliseconds.", + "type": "string" + }, + "search.bucket_avg": { + "description": "The average search time per bucket, in milliseconds.", + "type": "string" + }, + "search.exp_avg_hour": { + "description": "The exponential average search time per hour, in milliseconds.", + "type": "string" + }, + "node.id": { + "description": "The unique identifier of the assigned node.\nFor started datafeeds only, this information pertains to the node upon which the datafeed is started.", + "type": "string" + }, + "node.name": { + "description": "The name of the assigned node.\nFor started datafeeds only, this information pertains to the node upon which the datafeed is started.", + "type": "string" + }, + "node.ephemeral_id": { + "description": "The ephemeral identifier of the assigned node.\nFor started datafeeds only, this information pertains to the node upon which the datafeed is started.", + "type": "string" + }, + "node.address": { + "description": "The network address of the assigned node.\nFor started datafeeds only, this information pertains to the node upon which the datafeed is started.", + "type": "string" + } + } + }, + "ml._types.DatafeedState": { + "type": "string", + "enum": [ + "started", + "stopped", + "starting", + "stopping" + ] + }, + "cat._types.CatAnomalyDetectorColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumn" + } + } + ] + }, + "cat._types.CatAnomalyDetectorColumn": { + "type": "string", + "enum": [ + "assignment_explanation", + "ae", + "buckets.count", + "bc", + "bucketsCount", + "buckets.time.exp_avg", + "btea", + "bucketsTimeExpAvg", + "buckets.time.exp_avg_hour", + "bteah", + "bucketsTimeExpAvgHour", + "buckets.time.max", + "btmax", + "bucketsTimeMax", + "buckets.time.min", + "btmin", + "bucketsTimeMin", + "buckets.time.total", + "btt", + "bucketsTimeTotal", + "data.buckets", + "db", + "dataBuckets", + "data.earliest_record", + "der", + "dataEarliestRecord", + "data.empty_buckets", + "deb", + "dataEmptyBuckets", + "data.input_bytes", + "dib", + "dataInputBytes", "data.input_fields", "dif", "dataInputFields", @@ -60813,10 +122763,20 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/_types.Id" + "description": "The anomaly detection job identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, "state": { - "$ref": "#/components/schemas/ml._types.JobState" + "description": "The status of the anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobState" + } + ] }, "opened_time": { "description": "For open jobs only, the amount of time the job has been opened.", @@ -60835,7 +122795,12 @@ "type": "string" }, "data.input_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The number of bytes of input data posted to the anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "data.input_records": { "description": "The number of input documents posted to the anomaly detection job.", @@ -60890,13 +122855,28 @@ "type": "string" }, "model.bytes": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The number of bytes of memory used by the models.\nThis is the maximum value since the last time the model was persisted.\nIf the job is closed, this value indicates the latest size.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "model.memory_status": { - "$ref": "#/components/schemas/ml._types.MemoryStatus" + "description": "The status of the mathematical models.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.MemoryStatus" + } + ] }, "model.bytes_exceeded": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The number of bytes over the high limit for memory usage at the last allocation failure.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "model.memory_limit": { "description": "The upper limit for model memory usage, checked on increasing values.", @@ -60919,7 +122899,12 @@ "type": "string" }, "model.categorization_status": { - "$ref": "#/components/schemas/ml._types.CategorizationStatus" + "description": "The status of categorization for the job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CategorizationStatus" + } + ] }, "model.categorized_doc_count": { "description": "The number of documents that have had a field categorized.", @@ -61006,14 +122991,24 @@ "type": "string" }, "node.id": { - "$ref": "#/components/schemas/_types.NodeId" + "description": "The uniqe identifier of the assigned node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, "node.name": { "description": "The name of the assigned node.", "type": "string" }, "node.ephemeral_id": { - "$ref": "#/components/schemas/_types.NodeId" + "description": "The ephemeral identifier of the assigned node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, "node.address": { "description": "The network address of the assigned node.", @@ -61129,14 +123124,24 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/_types.Id" + "description": "The model identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, "created_by": { "description": "Information about the creator of the model.", "type": "string" }, "heap_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The estimated heap size to keep the model in memory.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "operations": { "description": "The estimated number of operations to use the model.\nThis number helps to measure the computational complexity of the model.", @@ -61147,10 +123152,20 @@ "type": "string" }, "create_time": { - "$ref": "#/components/schemas/_types.DateTime" + "description": "The time the model was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, "version": { - "$ref": "#/components/schemas/_types.VersionString" + "description": "The version of Elasticsearch when the model was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, "description": { "description": "A description of the model.", @@ -61193,10 +123208,52 @@ "type": "string" }, "type": { + "x-state": "Generally available; Added in 8.0.0", "type": "string" } } }, + "cat._types.CatNodeattrsColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatNodeattrsColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatNodeattrsColumn" + } + } + ] + }, + "cat._types.CatNodeattrsColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "node", + "id", + "id", + "nodeId", + "pid", + "p", + "host", + "h", + "ip", + "i", + "port", + "po", + "attr", + "attr.name", + "value", + "attr.value" + ] + }, + { + "type": "string" + } + ] + }, "cat.nodeattrs.NodeAttributesRecord": { "type": "object", "properties": { @@ -61360,6 +123417,8 @@ "l", "load_15m", "l", + "available_processors", + "ap", "mappings.total_count", "mtc", "mappingsTotalCount", @@ -61517,7 +123576,12 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/_types.Id" + "description": "The unique node identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, "pid": { "description": "The process identifier.", @@ -61536,7 +123600,12 @@ "type": "string" }, "version": { - "$ref": "#/components/schemas/_types.VersionString" + "description": "The Elasticsearch version.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, "flavor": { "description": "The Elasticsearch distribution flavor.", @@ -61555,23 +123624,48 @@ "type": "string" }, "disk.total": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The total disk space.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "disk.used": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The used disk space.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "disk.avail": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The available disk space.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "disk.used_percent": { - "$ref": "#/components/schemas/_types.Percentage" + "description": "The used disk space percentage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] }, "heap.current": { "description": "The used heap.", "type": "string" }, "heap.percent": { - "$ref": "#/components/schemas/_types.Percentage" + "description": "The used heap ratio.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] }, "heap.max": { "description": "The maximum configured heap.", @@ -61582,7 +123676,12 @@ "type": "string" }, "ram.percent": { - "$ref": "#/components/schemas/_types.Percentage" + "description": "The used machine memory ratio.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] }, "ram.max": { "description": "The total machine memory.", @@ -61593,7 +123692,12 @@ "type": "string" }, "file_desc.percent": { - "$ref": "#/components/schemas/_types.Percentage" + "description": "The used file descriptor ratio.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] }, "file_desc.max": { "description": "The maximum number of file descriptors.", @@ -61615,6 +123719,10 @@ "description": "The load average for the last fifteen minutes.", "type": "string" }, + "available_processors": { + "description": "The number of available processors (logical CPU cores available to the JVM).", + "type": "string" + }, "uptime": { "description": "The node uptime.", "type": "string" @@ -61628,7 +123736,12 @@ "type": "string" }, "name": { - "$ref": "#/components/schemas/_types.Name" + "description": "The node name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, "completion.size": { "description": "The size of completion.", @@ -61892,6 +124005,39 @@ } } }, + "cat._types.CatPendingTasksColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatPendingTasksColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatPendingTasksColumn" + } + } + ] + }, + "cat._types.CatPendingTasksColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "insertOrder", + "o", + "timeInQueue", + "t", + "priority", + "p", + "source", + "s" + ] + }, + { + "type": "string" + } + ] + }, "cat.pending_tasks.PendingTasksRecord": { "type": "object", "properties": { @@ -61913,21 +124059,70 @@ } } }, + "cat._types.CatPluginsColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatPluginsColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatPluginsColumn" + } + } + ] + }, + "cat._types.CatPluginsColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "id", + "name", + "n", + "component", + "c", + "version", + "v", + "description", + "d" + ] + }, + { + "type": "string" + } + ] + }, "cat.plugins.PluginsRecord": { "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/_types.NodeId" + "description": "The unique node identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, "name": { - "$ref": "#/components/schemas/_types.Name" + "description": "The node name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, "component": { "description": "The component name.", "type": "string" }, "version": { - "$ref": "#/components/schemas/_types.VersionString" + "description": "The component version.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, "description": { "description": "The plugin details.", @@ -61939,30 +124134,140 @@ } } }, + "cat._types.CatRecoveryColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatRecoveryColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatRecoveryColumn" + } + } + ] + }, + "cat._types.CatRecoveryColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "index", + "i", + "idx", + "shard", + "s", + "sh", + "start_time", + "start", + "start_time_millis", + "start_millis", + "stop_time", + "stop", + "stop_time_millis", + "stop_millis", + "time", + "t", + "ti", + "type", + "ty", + "stage", + "st", + "source_host", + "shost", + "source_node", + "snode", + "target_host", + "thost", + "target_node", + "tnode", + "repository", + "rep", + "snapshot", + "snap", + "files", + "f", + "files_recovered", + "fr", + "files_percent", + "fp", + "files_total", + "tf", + "bytes", + "b", + "bytes_recovered", + "br", + "bytes_percent", + "bp", + "bytes_total", + "tb", + "translog_ops", + "to", + "translog_ops_recovered", + "tor", + "translog_ops_percent", + "top" + ] + }, + { + "type": "string" + } + ] + }, "cat.recovery.RecoveryRecord": { "type": "object", "properties": { "index": { - "$ref": "#/components/schemas/_types.IndexName" + "description": "The index name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, "shard": { "description": "The shard name.", "type": "string" }, "start_time": { - "$ref": "#/components/schemas/_types.DateTime" + "description": "The recovery start time.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, "start_time_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "description": "The recovery start time in epoch milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, "stop_time": { - "$ref": "#/components/schemas/_types.DateTime" + "description": "The recovery stop time.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, "stop_time_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "description": "The recovery stop time in epoch milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, "time": { - "$ref": "#/components/schemas/_types.Duration" + "description": "The recovery time.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, "type": { "description": "The recovery type.", @@ -62005,7 +124310,12 @@ "type": "string" }, "files_percent": { - "$ref": "#/components/schemas/_types.Percentage" + "description": "The ratio of files recovered.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] }, "files_total": { "description": "The total number of files.", @@ -62020,7 +124330,12 @@ "type": "string" }, "bytes_percent": { - "$ref": "#/components/schemas/_types.Percentage" + "description": "The ratio of bytes recovered.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] }, "bytes_total": { "description": "The total number of bytes.", @@ -62035,7 +124350,12 @@ "type": "string" }, "translog_ops_percent": { - "$ref": "#/components/schemas/_types.Percentage" + "description": "The ratio of translog operations recovered.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] } } }, @@ -62052,11 +124372,63 @@ } } }, + "cat._types.CatSegmentsColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatSegmentsColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatSegmentsColumn" + } + } + ] + }, + "cat._types.CatSegmentsColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "index", + "i", + "idx", + "shard", + "s", + "sh", + "prirep", + "p", + "pr", + "primaryOrReplica", + "ip", + "segment", + "generation", + "docs.count", + "docs.deleted", + "size", + "size.memory", + "committed", + "searchable", + "version", + "compound", + "id" + ] + }, + { + "type": "string" + } + ] + }, "cat.segments.SegmentsRecord": { "type": "object", "properties": { "index": { - "$ref": "#/components/schemas/_types.IndexName" + "description": "The index name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, "shard": { "description": "The shard name.", @@ -62071,7 +124443,12 @@ "type": "string" }, "id": { - "$ref": "#/components/schemas/_types.NodeId" + "description": "The unique identifier of the node where it lives.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, "segment": { "description": "The segment name, which is derived from the segment generation and used internally to create file names in the directory of the shard.", @@ -62090,10 +124467,20 @@ "type": "string" }, "size": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The segment size in bytes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "size.memory": { - "$ref": "#/components/schemas/_types.ByteSize" + "description": "The segment memory in bytes.\nA value of `-1` indicates Elasticsearch was unable to compute this number.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "committed": { "description": "If `true`, the segment is synced to disk.\nSegments that are synced can survive a hard reboot.\nIf `false`, the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start.", @@ -62104,7 +124491,12 @@ "type": "string" }, "version": { - "$ref": "#/components/schemas/_types.VersionString" + "description": "The version of Lucene used to write the segment.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, "compound": { "description": "If `true`, the segment is stored in a compound file.\nThis means Lucene merged all files from the segment in a single file to save file descriptors.", @@ -62112,6 +124504,226 @@ } } }, + "cat._types.CatShardColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatShardColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatShardColumn" + } + } + ] + }, + "cat._types.CatShardColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "completion.size", + "cs", + "completionSize", + "dataset.size", + "dense_vector.value_count", + "dvc", + "denseVectorCount", + "docs", + "d", + "dc", + "fielddata.evictions", + "fe", + "fielddataEvictions", + "fielddata.memory_size", + "fm", + "fielddataMemory", + "flush.total", + "ft", + "flushTotal", + "flush.total_time", + "ftt", + "flushTotalTime", + "get.current", + "gc", + "getCurrent", + "get.exists_time", + "geti", + "getExistsTime", + "get.exists_total", + "geto", + "getExistsTotal", + "get.missing_time", + "gmti", + "getMissingTime", + "get.missing_total", + "gmto", + "getMissingTotal", + "get.time", + "gti", + "getTime", + "get.total", + "gto", + "getTotal", + "id", + "index", + "i", + "idx", + "indexing.delete_current", + "idc", + "indexingDeleteCurrent", + "indexing.delete_time", + "idti", + "indexingDeleteTime", + "indexing.delete_total", + "idto", + "indexingDeleteTotal", + "indexing.index_current", + "iic", + "indexingIndexCurrent", + "indexing.index_failed_due_to_version_conflict", + "iifvc", + "indexingIndexFailedDueToVersionConflict", + "indexing.index_failed", + "iif", + "indexingIndexFailed", + "indexing.index_time", + "iiti", + "indexingIndexTime", + "indexing.index_total", + "iito", + "indexingIndexTotal", + "ip", + "merges.current", + "mc", + "mergesCurrent", + "merges.current_docs", + "mcd", + "mergesCurrentDocs", + "merges.current_size", + "mcs", + "mergesCurrentSize", + "merges.total", + "mt", + "mergesTotal", + "merges.total_docs", + "mtd", + "mergesTotalDocs", + "merges.total_size", + "mts", + "mergesTotalSize", + "merges.total_time", + "mtt", + "mergesTotalTime", + "node", + "n", + "prirep", + "p", + "pr", + "primaryOrReplica", + "query_cache.evictions", + "qce", + "queryCacheEvictions", + "query_cache.memory_size", + "qcm", + "queryCacheMemory", + "recoverysource.type", + "rs", + "refresh.time", + "rti", + "refreshTime", + "refresh.total", + "rto", + "refreshTotal", + "search.fetch_current", + "sfc", + "searchFetchCurrent", + "search.fetch_time", + "sfti", + "searchFetchTime", + "search.fetch_total", + "sfto", + "searchFetchTotal", + "search.open_contexts", + "so", + "searchOpenContexts", + "search.query_current", + "sqc", + "searchQueryCurrent", + "search.query_time", + "sqti", + "searchQueryTime", + "search.query_total", + "sqto", + "searchQueryTotal", + "search.scroll_current", + "scc", + "searchScrollCurrent", + "search.scroll_time", + "scti", + "searchScrollTime", + "search.scroll_total", + "scto", + "searchScrollTotal", + "segments.count", + "sc", + "segmentsCount", + "segments.fixed_bitset_memory", + "sfbm", + "fixedBitsetMemory", + "segments.index_writer_memory", + "siwm", + "segmentsIndexWriterMemory", + "segments.memory", + "sm", + "segmentsMemory", + "segments.version_map_memory", + "svmm", + "segmentsVersionMapMemory", + "seq_no.global_checkpoint", + "sqg", + "globalCheckpoint", + "seq_no.local_checkpoint", + "sql", + "localCheckpoint", + "seq_no.max", + "sqm", + "maxSeqNo", + "shard", + "s", + "sh", + "dsparse_vector.value_count", + "svc", + "sparseVectorCount", + "state", + "st", + "store", + "sto", + "suggest.current", + "suc", + "suggestCurrent", + "suggest.time", + "suti", + "suggestTime", + "suggest.total", + "suto", + "suggestTotal", + "sync_id", + "unassigned.at", + "ua", + "unassigned.details", + "ud", + "unassigned.for", + "uf", + "unassigned.reason", + "ur" + ] + }, + { + "type": "string" + } + ] + }, "cat.shards.ShardsRecord": { "type": "object", "properties": { @@ -62157,35 +124769,7 @@ }, "dataset": { "description": "total size of dataset (including the cache for partially mounted indices)", - "x-state": "Added in 8.11.0", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "ip": { - "description": "The IP address of the node.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "id": { - "description": "The unique identifier for the node.", - "type": "string" - }, - "node": { - "description": "The name of node.", + "x-state": "Generally available; Added in 8.11.0", "oneOf": [ { "type": "string" @@ -62193,4355 +124777,3989 @@ { "nullable": true, "type": "string" - } - ] - }, - "sync_id": { - "description": "The sync identifier.", - "type": "string" - }, - "unassigned.reason": { - "description": "The reason for the last change to the state of an unassigned shard.\nIt does not explain why the shard is currently unassigned; use the cluster allocation explain API for that information.\nReturned values include:\n`ALLOCATION_FAILED`: Unassigned as a result of a failed allocation of the shard.\n`CLUSTER_RECOVERED`: Unassigned as a result of a full cluster recovery.\n`DANGLING_INDEX_IMPORTED`: Unassigned as a result of importing a dangling index.\n`EXISTING_INDEX_RESTORED`: Unassigned as a result of restoring into a closed index.\n`FORCED_EMPTY_PRIMARY`: The shard’s allocation was last modified by forcing an empty primary using the cluster reroute API.\n`INDEX_CLOSED`: Unassigned because the index was closed.\n`INDEX_CREATED`: Unassigned as a result of an API creation of an index.\n`INDEX_REOPENED`: Unassigned as a result of opening a closed index.\n`MANUAL_ALLOCATION`: The shard’s allocation was last modified by the cluster reroute API.\n`NEW_INDEX_RESTORED`: Unassigned as a result of restoring into a new index.\n`NODE_LEFT`: Unassigned as a result of the node hosting it leaving the cluster.\n`NODE_RESTARTING`: Similar to `NODE_LEFT`, except that the node was registered as restarting using the node shutdown API.\n`PRIMARY_FAILED`: The shard was initializing as a replica, but the primary shard failed before the initialization completed.\n`REALLOCATED_REPLICA`: A better replica location is identified and causes the existing replica allocation to be cancelled.\n`REINITIALIZED`: When a shard moves from started back to initializing.\n`REPLICA_ADDED`: Unassigned as a result of explicit addition of a replica.\n`REROUTE_CANCELLED`: Unassigned as a result of explicit cancel reroute command.", - "type": "string" - }, - "unassigned.at": { - "description": "The time at which the shard became unassigned in Coordinated Universal Time (UTC).", - "type": "string" - }, - "unassigned.for": { - "description": "The time at which the shard was requested to be unassigned in Coordinated Universal Time (UTC).", - "type": "string" - }, - "unassigned.details": { - "description": "Additional details as to why the shard became unassigned.\nIt does not explain why the shard is not assigned; use the cluster allocation explain API for that information.", - "type": "string" - }, - "recoverysource.type": { - "description": "The type of recovery source.", - "type": "string" - }, - "completion.size": { - "description": "The size of completion.", - "type": "string" - }, - "fielddata.memory_size": { - "description": "The used fielddata cache memory.", - "type": "string" - }, - "fielddata.evictions": { - "description": "The fielddata cache evictions.", - "type": "string" - }, - "query_cache.memory_size": { - "description": "The used query cache memory.", - "type": "string" - }, - "query_cache.evictions": { - "description": "The query cache evictions.", - "type": "string" - }, - "flush.total": { - "description": "The number of flushes.", - "type": "string" - }, - "flush.total_time": { - "description": "The time spent in flush.", - "type": "string" - }, - "get.current": { - "description": "The number of current get operations.", - "type": "string" - }, - "get.time": { - "description": "The time spent in get operations.", - "type": "string" - }, - "get.total": { - "description": "The number of get operations.", - "type": "string" - }, - "get.exists_time": { - "description": "The time spent in successful get operations.", - "type": "string" - }, - "get.exists_total": { - "description": "The number of successful get operations.", - "type": "string" - }, - "get.missing_time": { - "description": "The time spent in failed get operations.", - "type": "string" - }, - "get.missing_total": { - "description": "The number of failed get operations.", - "type": "string" - }, - "indexing.delete_current": { - "description": "The number of current deletion operations.", - "type": "string" - }, - "indexing.delete_time": { - "description": "The time spent in deletion operations.", - "type": "string" - }, - "indexing.delete_total": { - "description": "The number of delete operations.", - "type": "string" - }, - "indexing.index_current": { - "description": "The number of current indexing operations.", - "type": "string" - }, - "indexing.index_time": { - "description": "The time spent in indexing operations.", - "type": "string" - }, - "indexing.index_total": { - "description": "The number of indexing operations.", - "type": "string" - }, - "indexing.index_failed": { - "description": "The number of failed indexing operations.", - "type": "string" - }, - "merges.current": { - "description": "The number of current merge operations.", - "type": "string" - }, - "merges.current_docs": { - "description": "The number of current merging documents.", - "type": "string" - }, - "merges.current_size": { - "description": "The size of current merge operations.", - "type": "string" - }, - "merges.total": { - "description": "The number of completed merge operations.", - "type": "string" - }, - "merges.total_docs": { - "description": "The nuber of merged documents.", - "type": "string" - }, - "merges.total_size": { - "description": "The size of current merges.", - "type": "string" - }, - "merges.total_time": { - "description": "The time spent merging documents.", - "type": "string" - }, - "refresh.total": { - "description": "The total number of refreshes.", - "type": "string" - }, - "refresh.time": { - "description": "The time spent in refreshes.", - "type": "string" - }, - "refresh.external_total": { - "description": "The total nunber of external refreshes.", - "type": "string" - }, - "refresh.external_time": { - "description": "The time spent in external refreshes.", - "type": "string" - }, - "refresh.listeners": { - "description": "The number of pending refresh listeners.", - "type": "string" - }, - "search.fetch_current": { - "description": "The current fetch phase operations.", - "type": "string" - }, - "search.fetch_time": { - "description": "The time spent in fetch phase.", - "type": "string" - }, - "search.fetch_total": { - "description": "The total number of fetch operations.", - "type": "string" - }, - "search.open_contexts": { - "description": "The number of open search contexts.", - "type": "string" - }, - "search.query_current": { - "description": "The current query phase operations.", - "type": "string" - }, - "search.query_time": { - "description": "The time spent in query phase.", - "type": "string" - }, - "search.query_total": { - "description": "The total number of query phase operations.", - "type": "string" - }, - "search.scroll_current": { - "description": "The open scroll contexts.", - "type": "string" - }, - "search.scroll_time": { - "description": "The time scroll contexts were held open.", - "type": "string" - }, - "search.scroll_total": { - "description": "The number of completed scroll contexts.", - "type": "string" - }, - "segments.count": { - "description": "The number of segments.", - "type": "string" - }, - "segments.memory": { - "description": "The memory used by segments.", - "type": "string" - }, - "segments.index_writer_memory": { - "description": "The memory used by the index writer.", - "type": "string" - }, - "segments.version_map_memory": { - "description": "The memory used by the version map.", - "type": "string" - }, - "segments.fixed_bitset_memory": { - "description": "The memory used by fixed bit sets for nested object field types and export type filters for types referred in `_parent` fields.", - "type": "string" - }, - "seq_no.max": { - "description": "The maximum sequence number.", - "type": "string" - }, - "seq_no.local_checkpoint": { - "description": "The local checkpoint.", - "type": "string" - }, - "seq_no.global_checkpoint": { - "description": "The global checkpoint.", - "type": "string" - }, - "warmer.current": { - "description": "The number of current warmer operations.", - "type": "string" - }, - "warmer.total": { - "description": "The total number of warmer operations.", - "type": "string" - }, - "warmer.total_time": { - "description": "The time spent in warmer operations.", - "type": "string" + } + ] }, - "path.data": { - "description": "The shard data path.", - "type": "string" + "ip": { + "description": "The IP address of the node.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "path.state": { - "description": "The shard state path.", + "id": { + "description": "The unique identifier for the node.", "type": "string" }, - "bulk.total_operations": { - "description": "The number of bulk shard operations.", - "type": "string" + "node": { + "description": "The name of node.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "bulk.total_time": { - "description": "The time spent in shard bulk operations.", + "sync_id": { + "description": "The sync identifier.", "type": "string" }, - "bulk.total_size_in_bytes": { - "description": "The total size in bytes of shard bulk operations.", + "unassigned.reason": { + "description": "The reason for the last change to the state of an unassigned shard.\nIt does not explain why the shard is currently unassigned; use the cluster allocation explain API for that information.\nReturned values include:\n`ALLOCATION_FAILED`: Unassigned as a result of a failed allocation of the shard.\n`CLUSTER_RECOVERED`: Unassigned as a result of a full cluster recovery.\n`DANGLING_INDEX_IMPORTED`: Unassigned as a result of importing a dangling index.\n`EXISTING_INDEX_RESTORED`: Unassigned as a result of restoring into a closed index.\n`FORCED_EMPTY_PRIMARY`: The shard’s allocation was last modified by forcing an empty primary using the cluster reroute API.\n`INDEX_CLOSED`: Unassigned because the index was closed.\n`INDEX_CREATED`: Unassigned as a result of an API creation of an index.\n`INDEX_REOPENED`: Unassigned as a result of opening a closed index.\n`MANUAL_ALLOCATION`: The shard’s allocation was last modified by the cluster reroute API.\n`NEW_INDEX_RESTORED`: Unassigned as a result of restoring into a new index.\n`NODE_LEFT`: Unassigned as a result of the node hosting it leaving the cluster.\n`NODE_RESTARTING`: Similar to `NODE_LEFT`, except that the node was registered as restarting using the node shutdown API.\n`PRIMARY_FAILED`: The shard was initializing as a replica, but the primary shard failed before the initialization completed.\n`REALLOCATED_REPLICA`: A better replica location is identified and causes the existing replica allocation to be cancelled.\n`REINITIALIZED`: When a shard moves from started back to initializing.\n`REPLICA_ADDED`: Unassigned as a result of explicit addition of a replica.\n`REROUTE_CANCELLED`: Unassigned as a result of explicit cancel reroute command.", "type": "string" }, - "bulk.avg_time": { - "description": "The average time spent in shard bulk operations.", + "unassigned.at": { + "description": "The time at which the shard became unassigned in Coordinated Universal Time (UTC).", "type": "string" }, - "bulk.avg_size_in_bytes": { - "description": "The average size in bytes of shard bulk operations.", - "type": "string" - } - } - }, - "cat.snapshots.SnapshotsRecord": { - "type": "object", - "properties": { - "id": { - "description": "The unique identifier for the snapshot.", + "unassigned.for": { + "description": "The time at which the shard was requested to be unassigned in Coordinated Universal Time (UTC).", "type": "string" }, - "repository": { - "description": "The repository name.", + "unassigned.details": { + "description": "Additional details as to why the shard became unassigned.\nIt does not explain why the shard is not assigned; use the cluster allocation explain API for that information.", "type": "string" }, - "status": { - "description": "The state of the snapshot process.\nReturned values include:\n`FAILED`: The snapshot process failed.\n`INCOMPATIBLE`: The snapshot process is incompatible with the current cluster version.\n`IN_PROGRESS`: The snapshot process started but has not completed.\n`PARTIAL`: The snapshot process completed with a partial success.\n`SUCCESS`: The snapshot process completed with a full success.", + "recoverysource.type": { + "description": "The type of recovery source.", "type": "string" }, - "start_epoch": { - "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitSeconds" - }, - "start_time": { - "$ref": "#/components/schemas/watcher._types.ScheduleTimeOfDay" - }, - "end_epoch": { - "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitSeconds" - }, - "end_time": { - "$ref": "#/components/schemas/_types.TimeOfDay" - }, - "duration": { - "$ref": "#/components/schemas/_types.Duration" - }, - "indices": { - "description": "The number of indices in the snapshot.", + "completion.size": { + "description": "The size of completion.", "type": "string" }, - "successful_shards": { - "description": "The number of successful shards in the snapshot.", + "fielddata.memory_size": { + "description": "The used fielddata cache memory.", "type": "string" }, - "failed_shards": { - "description": "The number of failed shards in the snapshot.", + "fielddata.evictions": { + "description": "The fielddata cache evictions.", "type": "string" }, - "total_shards": { - "description": "The total number of shards in the snapshot.", + "query_cache.memory_size": { + "description": "The used query cache memory.", "type": "string" }, - "reason": { - "description": "The reason for any snapshot failures.", - "type": "string" - } - } - }, - "watcher._types.ScheduleTimeOfDay": { - "description": "A time of day, expressed either as `hh:mm`, `noon`, `midnight`, or an hour/minutes structure.", - "oneOf": [ - { + "query_cache.evictions": { + "description": "The query cache evictions.", "type": "string" }, - { - "$ref": "#/components/schemas/watcher._types.HourAndMinute" - } - ] - }, - "watcher._types.HourAndMinute": { - "type": "object", - "properties": { - "hour": { - "type": "array", - "items": { - "type": "number" - } - }, - "minute": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "hour", - "minute" - ] - }, - "cat.tasks.TasksRecord": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "action": { - "description": "The task action.", + "flush.total": { + "description": "The number of flushes.", "type": "string" }, - "task_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "parent_task_id": { - "description": "The parent task identifier.", + "flush.total_time": { + "description": "The time spent in flush.", "type": "string" }, - "type": { - "description": "The task type.", + "get.current": { + "description": "The number of current get operations.", "type": "string" }, - "start_time": { - "description": "The start time in milliseconds.", + "get.time": { + "description": "The time spent in get operations.", "type": "string" }, - "timestamp": { - "description": "The start time in `HH:MM:SS` format.", + "get.total": { + "description": "The number of get operations.", "type": "string" }, - "running_time_ns": { - "description": "The running time in nanoseconds.", + "get.exists_time": { + "description": "The time spent in successful get operations.", "type": "string" }, - "running_time": { - "description": "The running time.", + "get.exists_total": { + "description": "The number of successful get operations.", "type": "string" }, - "node_id": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "ip": { - "description": "The IP address for the node.", + "get.missing_time": { + "description": "The time spent in failed get operations.", "type": "string" }, - "port": { - "description": "The bound transport port for the node.", + "get.missing_total": { + "description": "The number of failed get operations.", "type": "string" }, - "node": { - "description": "The node name.", + "indexing.delete_current": { + "description": "The number of current deletion operations.", "type": "string" }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "x_opaque_id": { - "description": "The X-Opaque-ID header.", + "indexing.delete_time": { + "description": "The time spent in deletion operations.", "type": "string" }, - "description": { - "description": "The task action description.", + "indexing.delete_total": { + "description": "The number of delete operations.", "type": "string" - } - } - }, - "cat.templates.TemplatesRecord": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" }, - "index_patterns": { - "description": "The template index patterns.", + "indexing.index_current": { + "description": "The number of current indexing operations.", "type": "string" }, - "order": { - "description": "The template application order or priority number.", + "indexing.index_time": { + "description": "The time spent in indexing operations.", "type": "string" }, - "version": { - "description": "The template version.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.VersionString" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "composed_of": { - "description": "The component templates that comprise the index template.", - "type": "string" - } - } - }, - "cat.thread_pool.ThreadPoolRecord": { - "type": "object", - "properties": { - "node_name": { - "description": "The node name.", + "indexing.index_total": { + "description": "The number of indexing operations.", "type": "string" }, - "node_id": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "ephemeral_node_id": { - "description": "The ephemeral node identifier.", + "indexing.index_failed": { + "description": "The number of failed indexing operations.", "type": "string" }, - "pid": { - "description": "The process identifier.", + "merges.current": { + "description": "The number of current merge operations.", "type": "string" }, - "host": { - "description": "The host name for the current node.", + "merges.current_docs": { + "description": "The number of current merging documents.", "type": "string" }, - "ip": { - "description": "The IP address for the current node.", + "merges.current_size": { + "description": "The size of current merge operations.", "type": "string" }, - "port": { - "description": "The bound transport port for the current node.", + "merges.total": { + "description": "The number of completed merge operations.", "type": "string" }, - "name": { - "description": "The thread pool name.", + "merges.total_docs": { + "description": "The nuber of merged documents.", "type": "string" }, - "type": { - "description": "The thread pool type.\nReturned values include `fixed`, `fixed_auto_queue_size`, `direct`, and `scaling`.", + "merges.total_size": { + "description": "The size of current merges.", "type": "string" }, - "active": { - "description": "The number of active threads in the current thread pool.", + "merges.total_time": { + "description": "The time spent merging documents.", "type": "string" }, - "pool_size": { - "description": "The number of threads in the current thread pool.", + "refresh.total": { + "description": "The total number of refreshes.", "type": "string" }, - "queue": { - "description": "The number of tasks currently in queue.", + "refresh.time": { + "description": "The time spent in refreshes.", "type": "string" }, - "queue_size": { - "description": "The maximum number of tasks permitted in the queue.", + "refresh.external_total": { + "description": "The total nunber of external refreshes.", "type": "string" }, - "rejected": { - "description": "The number of rejected tasks.", + "refresh.external_time": { + "description": "The time spent in external refreshes.", "type": "string" }, - "largest": { - "description": "The highest number of active threads in the current thread pool.", + "refresh.listeners": { + "description": "The number of pending refresh listeners.", "type": "string" }, - "completed": { - "description": "The number of completed tasks.", + "search.fetch_current": { + "description": "The current fetch phase operations.", "type": "string" }, - "core": { - "description": "The core number of active threads allowed in a scaling thread pool.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "max": { - "description": "The maximum number of active threads allowed in a scaling thread pool.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "size": { - "description": "The number of active threads allowed in a fixed thread pool.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "keep_alive": { - "description": "The thread keep alive time.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - } - } - }, - "cat._types.CatTransformColumns": { - "oneOf": [ - { - "$ref": "#/components/schemas/cat._types.CatTransformColumn" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat._types.CatTransformColumn" - } - } - ] - }, - "cat._types.CatTransformColumn": { - "type": "string", - "enum": [ - "changes_last_detection_time", - "cldt", - "checkpoint", - "cp", - "checkpoint_duration_time_exp_avg", - "cdtea", - "checkpointTimeExpAvg", - "checkpoint_progress", - "c", - "checkpointProgress", - "create_time", - "ct", - "createTime", - "delete_time", - "dtime", - "description", - "d", - "dest_index", - "di", - "destIndex", - "documents_deleted", - "docd", - "documents_indexed", - "doci", - "docs_per_second", - "dps", - "documents_processed", - "docp", - "frequency", - "f", - "id", - "index_failure", - "if", - "index_time", - "itime", - "index_total", - "it", - "indexed_documents_exp_avg", - "idea", - "last_search_time", - "lst", - "lastSearchTime", - "max_page_search_size", - "mpsz", - "pages_processed", - "pp", - "pipeline", - "p", - "processed_documents_exp_avg", - "pdea", - "processing_time", - "pt", - "reason", - "r", - "search_failure", - "sf", - "search_time", - "stime", - "search_total", - "st", - "source_index", - "si", - "sourceIndex", - "state", - "s", - "transform_type", - "tt", - "trigger_count", - "tc", - "version", - "v" - ] - }, - "cat.transforms.TransformsRecord": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "state": { - "description": "The status of the transform.\nReturned values include:\n`aborting`: The transform is aborting.\n`failed: The transform failed. For more information about the failure, check the `reason` field.\n`indexing`: The transform is actively processing data and creating new documents.\n`started`: The transform is running but not actively indexing data.\n`stopped`: The transform is stopped.\n`stopping`: The transform is stopping.", + "search.fetch_time": { + "description": "The time spent in fetch phase.", "type": "string" }, - "checkpoint": { - "description": "The sequence number for the checkpoint.", + "search.fetch_total": { + "description": "The total number of fetch operations.", "type": "string" }, - "documents_processed": { - "description": "The number of documents that have been processed from the source index of the transform.", + "search.open_contexts": { + "description": "The number of open search contexts.", "type": "string" }, - "checkpoint_progress": { - "description": "The progress of the next checkpoint that is currently in progress.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "last_search_time": { - "description": "The timestamp of the last search in the source indices.\nThis field is shown only if the transform is running.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "changes_last_detection_time": { - "description": "The timestamp when changes were last detected in the source indices.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "create_time": { - "description": "The time the transform was created.", + "search.query_current": { + "description": "The current query phase operations.", "type": "string" }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "source_index": { - "description": "The source indices for the transform.", + "search.query_time": { + "description": "The time spent in query phase.", "type": "string" }, - "dest_index": { - "description": "The destination index for the transform.", + "search.query_total": { + "description": "The total number of query phase operations.", "type": "string" }, - "pipeline": { - "description": "The unique identifier for the ingest pipeline.", + "search.scroll_current": { + "description": "The open scroll contexts.", "type": "string" }, - "description": { - "description": "The description of the transform.", + "search.scroll_time": { + "description": "The time scroll contexts were held open.", "type": "string" }, - "transform_type": { - "description": "The type of transform: `batch` or `continuous`.", + "search.scroll_total": { + "description": "The number of completed scroll contexts.", "type": "string" }, - "frequency": { - "description": "The interval between checks for changes in the source indices when the transform is running continuously.", + "segments.count": { + "description": "The number of segments.", "type": "string" }, - "max_page_search_size": { - "description": "The initial page size that is used for the composite aggregation for each checkpoint.", + "segments.memory": { + "description": "The memory used by segments.", "type": "string" }, - "docs_per_second": { - "description": "The number of input documents per second.", + "segments.index_writer_memory": { + "description": "The memory used by the index writer.", "type": "string" }, - "reason": { - "description": "If a transform has a `failed` state, these details describe the reason for failure.", + "segments.version_map_memory": { + "description": "The memory used by the version map.", "type": "string" }, - "search_total": { - "description": "The total number of search operations on the source index for the transform.", + "segments.fixed_bitset_memory": { + "description": "The memory used by fixed bit sets for nested object field types and export type filters for types referred in `_parent` fields.", "type": "string" }, - "search_failure": { - "description": "The total number of search failures.", + "seq_no.max": { + "description": "The maximum sequence number.", "type": "string" }, - "search_time": { - "description": "The total amount of search time, in milliseconds.", + "seq_no.local_checkpoint": { + "description": "The local checkpoint.", "type": "string" }, - "index_total": { - "description": "The total number of index operations done by the transform.", + "seq_no.global_checkpoint": { + "description": "The global checkpoint.", "type": "string" }, - "index_failure": { - "description": "The total number of indexing failures.", + "warmer.current": { + "description": "The number of current warmer operations.", "type": "string" }, - "index_time": { - "description": "The total time spent indexing documents, in milliseconds.", + "warmer.total": { + "description": "The total number of warmer operations.", "type": "string" }, - "documents_indexed": { - "description": "The number of documents that have been indexed into the destination index for the transform.", + "warmer.total_time": { + "description": "The time spent in warmer operations.", "type": "string" }, - "delete_time": { - "description": "The total time spent deleting documents, in milliseconds.", + "path.data": { + "description": "The shard data path.", "type": "string" }, - "documents_deleted": { - "description": "The number of documents deleted from the destination index due to the retention policy for the transform.", + "path.state": { + "description": "The shard state path.", "type": "string" }, - "trigger_count": { - "description": "The number of times the transform has been triggered by the scheduler.\nFor example, the scheduler triggers the transform indexer to check for updates or ingest new data at an interval specified in the `frequency` property.", + "bulk.total_operations": { + "description": "The number of bulk shard operations.", "type": "string" }, - "pages_processed": { - "description": "The number of search or bulk index operations processed.\nDocuments are processed in batches instead of individually.", + "bulk.total_time": { + "description": "The time spent in shard bulk operations.", "type": "string" }, - "processing_time": { - "description": "The total time spent processing results, in milliseconds.", + "bulk.total_size_in_bytes": { + "description": "The total size in bytes of shard bulk operations.", "type": "string" }, - "checkpoint_duration_time_exp_avg": { - "description": "The exponential moving average of the duration of the checkpoint, in milliseconds.", + "bulk.avg_time": { + "description": "The average time spent in shard bulk operations.", "type": "string" }, - "indexed_documents_exp_avg": { - "description": "The exponential moving average of the number of new documents that have been indexed.", + "bulk.avg_size_in_bytes": { + "description": "The average size in bytes of shard bulk operations.", "type": "string" + } + } + }, + "cat._types.CatSnapshotsColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumn" }, - "processed_documents_exp_avg": { - "description": "The exponential moving average of the number of documents that have been processed.", + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumn" + } + } + ] + }, + "cat._types.CatSnapshotsColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "id", + "snapshot", + "repository", + "re", + "repo", + "status", + "s", + "start_epoch", + "ste", + "startEpoch", + "start_time", + "sti", + "startTime", + "end_epoch", + "ete", + "endEpoch", + "end_time", + "eti", + "endTime", + "duration", + "dur", + "indices", + "i", + "successful_shards", + "ss", + "failed_shards", + "fs", + "total_shards", + "ts", + "reason", + "r" + ] + }, + { "type": "string" } - } + ] }, - "indices._types.IndexSettings": { + "cat.snapshots.SnapshotsRecord": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - }, - "mode": { + "id": { + "description": "The unique identifier for the snapshot.", "type": "string" }, - "routing_path": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "soft_deletes": { - "$ref": "#/components/schemas/indices._types.SoftDeletes" - }, - "sort": { - "$ref": "#/components/schemas/indices._types.IndexSegmentSort" - }, - "number_of_shards": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "number_of_replicas": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "number_of_routing_shards": { - "type": "number" - }, - "check_on_startup": { - "$ref": "#/components/schemas/indices._types.IndexCheckOnStartup" - }, - "codec": { + "repository": { + "description": "The repository name.", "type": "string" }, - "routing_partition_size": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" - }, - "load_fixed_bitset_filters_eagerly": { - "type": "boolean" + "status": { + "description": "The state of the snapshot process.\nReturned values include:\n`FAILED`: The snapshot process failed.\n`INCOMPATIBLE`: The snapshot process is incompatible with the current cluster version.\n`IN_PROGRESS`: The snapshot process started but has not completed.\n`PARTIAL`: The snapshot process completed with a partial success.\n`SUCCESS`: The snapshot process completed with a full success.", + "type": "string" }, - "hidden": { - "oneOf": [ - { - "type": "boolean" - }, + "start_epoch": { + "description": "The Unix epoch time (seconds since 1970-01-01 00:00:00) at which the snapshot process started.", + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitSeconds" } ] }, - "auto_expand_replicas": { - "oneOf": [ - { - "type": "string" - }, + "start_time": { + "description": "The time (HH:MM:SS) at which the snapshot process started.", + "allOf": [ { - "$ref": "#/components/schemas/_spec_utils.NullValue" + "$ref": "#/components/schemas/watcher._types.ScheduleTimeOfDay" } ] }, - "merge": { - "$ref": "#/components/schemas/indices._types.Merge" - }, - "search": { - "$ref": "#/components/schemas/indices._types.SettingsSearch" - }, - "refresh_interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_result_window": { - "type": "number" - }, - "max_inner_result_window": { - "type": "number" - }, - "max_rescore_window": { - "type": "number" - }, - "max_docvalue_fields_search": { - "type": "number" - }, - "max_script_fields": { - "type": "number" - }, - "max_ngram_diff": { - "type": "number" - }, - "max_shingle_diff": { - "type": "number" - }, - "blocks": { - "$ref": "#/components/schemas/indices._types.IndexSettingBlocks" - }, - "max_refresh_listeners": { - "type": "number" - }, - "analyze": { - "$ref": "#/components/schemas/indices._types.SettingsAnalyze" - }, - "highlight": { - "$ref": "#/components/schemas/indices._types.SettingsHighlight" - }, - "max_terms_count": { - "type": "number" - }, - "max_regex_length": { - "type": "number" - }, - "routing": { - "$ref": "#/components/schemas/indices._types.IndexRouting" - }, - "gc_deletes": { - "$ref": "#/components/schemas/_types.Duration" - }, - "default_pipeline": { - "$ref": "#/components/schemas/_types.PipelineName" - }, - "final_pipeline": { - "$ref": "#/components/schemas/_types.PipelineName" - }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.IndexSettingsLifecycle" - }, - "provided_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "creation_date": { - "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitMillis" - }, - "creation_date_string": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "uuid": { - "$ref": "#/components/schemas/_types.Uuid" - }, - "version": { - "$ref": "#/components/schemas/indices._types.IndexVersioning" - }, - "verified_before_close": { - "oneOf": [ - { - "type": "boolean" - }, + "end_epoch": { + "description": "The Unix epoch time (seconds since 1970-01-01 00:00:00) at which the snapshot process ended.", + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitSeconds" } ] }, - "format": { - "oneOf": [ - { - "type": "string" - }, + "end_time": { + "description": "The time (HH:MM:SS) at which the snapshot process ended.", + "allOf": [ { - "type": "number" + "$ref": "#/components/schemas/_types.TimeOfDay" } ] }, - "max_slices_per_scroll": { - "type": "number" - }, - "translog": { - "$ref": "#/components/schemas/indices._types.Translog" - }, - "query_string": { - "$ref": "#/components/schemas/indices._types.SettingsQueryString" - }, - "priority": { - "oneOf": [ - { - "type": "number" - }, + "duration": { + "description": "The time it took the snapshot process to complete, in time units.", + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.Duration" } ] }, - "top_metrics_max_size": { - "type": "number" - }, - "analysis": { - "$ref": "#/components/schemas/indices._types.IndexSettingsAnalysis" - }, - "settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - }, - "time_series": { - "$ref": "#/components/schemas/indices._types.IndexSettingsTimeSeries" - }, - "queries": { - "$ref": "#/components/schemas/indices._types.Queries" - }, - "similarity": { - "description": "Configure custom similarity settings to customize how search results are scored.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.SettingsSimilarity" - } + "indices": { + "description": "The number of indices in the snapshot.", + "type": "string" }, - "mapping": { - "$ref": "#/components/schemas/indices._types.MappingLimitSettings" + "successful_shards": { + "description": "The number of successful shards in the snapshot.", + "type": "string" }, - "indexing.slowlog": { - "$ref": "#/components/schemas/indices._types.IndexingSlowlogSettings" + "failed_shards": { + "description": "The number of failed shards in the snapshot.", + "type": "string" }, - "indexing_pressure": { - "$ref": "#/components/schemas/indices._types.IndexingPressure" + "total_shards": { + "description": "The total number of shards in the snapshot.", + "type": "string" }, - "store": { - "$ref": "#/components/schemas/indices._types.Storage" + "reason": { + "description": "The reason for any snapshot failures.", + "type": "string" } } }, - "indices._types.SoftDeletes": { - "type": "object", - "properties": { - "enabled": { - "description": "Indicates whether soft deletes are enabled on the index.", - "type": "boolean" + "watcher._types.ScheduleTimeOfDay": { + "description": "A time of day, expressed either as `hh:mm`, `noon`, `midnight`, or an hour/minutes structure.", + "oneOf": [ + { + "type": "string" }, - "retention_lease": { - "$ref": "#/components/schemas/indices._types.RetentionLease" + { + "$ref": "#/components/schemas/watcher._types.HourAndMinute" } - } + ] }, - "indices._types.RetentionLease": { + "watcher._types.HourAndMinute": { "type": "object", "properties": { - "period": { - "$ref": "#/components/schemas/_types.Duration" + "hour": { + "type": "array", + "items": { + "type": "number" + } + }, + "minute": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ - "period" + "hour", + "minute" ] }, - "indices._types.IndexSegmentSort": { + "cat._types.CatTasksColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatTasksColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatTasksColumn" + } + } + ] + }, + "cat._types.CatTasksColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "id", + "action", + "ac", + "task_id", + "ti", + "parent_task_id", + "pti", + "type", + "ty", + "start_time", + "start", + "timestamp", + "ts", + "hms", + "hhmmss", + "running_time_ns", + "time", + "running_time", + "time", + "node_id", + "ni", + "ip", + "i", + "port", + "po", + "node", + "n", + "version", + "v", + "x_opaque_id", + "x" + ] + }, + { + "type": "string" + } + ] + }, + "cat.tasks.TasksRecord": { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types.Fields" - }, - "order": { - "description": "\n\nSupported values include: `asc` (or `ASC`), `desc` (or `DESC`)\n\n", - "oneOf": [ - { - "$ref": "#/components/schemas/indices._types.SegmentSortOrder" - }, + "id": { + "description": "The identifier of the task with the node.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices._types.SegmentSortOrder" - } + "$ref": "#/components/schemas/_types.Id" } ] }, - "mode": { - "description": "\n\nSupported values include: `min` (or `MIN`), `max` (or `MAX`)\n\n", - "oneOf": [ - { - "$ref": "#/components/schemas/indices._types.SegmentSortMode" - }, + "action": { + "description": "The task action.", + "type": "string" + }, + "task_id": { + "description": "The unique task identifier.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices._types.SegmentSortMode" - } + "$ref": "#/components/schemas/_types.Id" } ] }, - "missing": { - "description": "\n\nSupported values include: `_last`, `_first`\n\n", - "oneOf": [ - { - "$ref": "#/components/schemas/indices._types.SegmentSortMissing" - }, + "parent_task_id": { + "description": "The parent task identifier.", + "type": "string" + }, + "type": { + "description": "The task type.", + "type": "string" + }, + "start_time": { + "description": "The start time in milliseconds.", + "type": "string" + }, + "timestamp": { + "description": "The start time in `HH:MM:SS` format.", + "type": "string" + }, + "running_time_ns": { + "description": "The running time in nanoseconds.", + "type": "string" + }, + "running_time": { + "description": "The running time.", + "type": "string" + }, + "node_id": { + "description": "The unique node identifier.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices._types.SegmentSortMissing" - } + "$ref": "#/components/schemas/_types.NodeId" } ] - } - } - }, - "indices._types.SegmentSortOrder": { - "type": "string", - "enum": [ - "asc", - "ASC", - "desc", - "DESC" - ] - }, - "indices._types.SegmentSortMode": { - "type": "string", - "enum": [ - "min", - "MIN", - "max", - "MAX" - ] - }, - "indices._types.SegmentSortMissing": { - "type": "string", - "enum": [ - "_last", - "_first" - ] - }, - "indices._types.IndexCheckOnStartup": { - "type": "string", - "enum": [ - "true", - "false", - "checksum" - ] - }, - "_spec_utils.Stringifiedinteger": { - "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", - "oneOf": [ - { - "type": "number" }, - { + "ip": { + "description": "The IP address for the node.", "type": "string" - } - ] - }, - "_spec_utils.NullValue": { - "nullable": true, - "description": "A `null` value that is to be interpreted as an actual value, unless other uses of `null` that are equivalent\nto a missing value. It is used for exemple in settings, where using the `NullValue` for a setting will reset\nit to its default value.", - "type": "string" - }, - "indices._types.Merge": { - "type": "object", - "properties": { - "scheduler": { - "$ref": "#/components/schemas/indices._types.MergeScheduler" - } - } - }, - "indices._types.MergeScheduler": { - "type": "object", - "properties": { - "max_thread_count": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" }, - "max_merge_count": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" - } - } - }, - "indices._types.SettingsSearch": { - "type": "object", - "properties": { - "idle": { - "$ref": "#/components/schemas/indices._types.SearchIdle" + "port": { + "description": "The bound transport port for the node.", + "type": "string" }, - "slowlog": { - "$ref": "#/components/schemas/indices._types.SlowlogSettings" - } - } - }, - "indices._types.SearchIdle": { - "type": "object", - "properties": { - "after": { - "$ref": "#/components/schemas/_types.Duration" - } - } - }, - "indices._types.SlowlogSettings": { - "type": "object", - "properties": { - "level": { + "node": { + "description": "The node name.", "type": "string" }, - "source": { - "type": "number" + "version": { + "description": "The Elasticsearch version.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "reformat": { - "type": "boolean" + "x_opaque_id": { + "description": "The X-Opaque-ID header.", + "type": "string" }, - "threshold": { - "$ref": "#/components/schemas/indices._types.SlowlogTresholds" + "description": { + "description": "The task action description.", + "type": "string" } } }, - "indices._types.SlowlogTresholds": { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels" + "cat._types.CatTemplatesColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatTemplatesColumn" }, - "fetch": { - "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatTemplatesColumn" + } } - } + ] }, - "indices._types.SlowlogTresholdLevels": { - "type": "object", - "properties": { - "warn": { - "$ref": "#/components/schemas/_types.Duration" - }, - "info": { - "$ref": "#/components/schemas/_types.Duration" - }, - "debug": { - "$ref": "#/components/schemas/_types.Duration" + "cat._types.CatTemplatesColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "name", + "n", + "index_patterns", + "t", + "order", + "o", + "p", + "version", + "v", + "composed_of", + "c" + ] }, - "trace": { - "$ref": "#/components/schemas/_types.Duration" + { + "type": "string" } - } + ] }, - "indices._types.IndexSettingBlocks": { + "cat.templates.TemplatesRecord": { "type": "object", "properties": { - "read_only": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "name": { + "description": "The template name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "read_only_allow_delete": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "index_patterns": { + "description": "The template index patterns.", + "type": "string" }, - "read": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "order": { + "description": "The template application order or priority number.", + "type": "string" }, - "write": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "version": { + "description": "The template version.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "metadata": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "composed_of": { + "description": "The component templates that comprise the index template.", + "type": "string" } } }, - "_spec_utils.Stringifiedboolean": { - "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", + "cat._types.CatThreadPoolColumns": { "oneOf": [ { - "type": "boolean" + "$ref": "#/components/schemas/cat._types.CatThreadPoolColumn" }, { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatThreadPoolColumn" + } } ] }, - "indices._types.SettingsAnalyze": { - "type": "object", - "properties": { - "max_token_count": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" - } - } - }, - "indices._types.SettingsHighlight": { - "type": "object", - "properties": { - "max_analyzed_offset": { - "type": "number" - } - } - }, - "indices._types.IndexRouting": { - "type": "object", - "properties": { - "allocation": { - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocation" + "cat._types.CatThreadPoolColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "active", + "a", + "completed", + "c", + "core", + "cr", + "ephemeral_id", + "eid", + "host", + "h", + "ip", + "i", + "keep_alive", + "k", + "largest", + "l", + "max", + "mx", + "name", + "node_id", + "id", + "node_name", + "pid", + "p", + "pool_size", + "psz", + "port", + "po", + "queue", + "q", + "queue_size", + "qs", + "rejected", + "r", + "size", + "sz", + "type", + "t" + ] }, - "rebalance": { - "$ref": "#/components/schemas/indices._types.IndexRoutingRebalance" + { + "type": "string" } - } + ] }, - "indices._types.IndexRoutingAllocation": { + "cat.thread_pool.ThreadPoolRecord": { "type": "object", "properties": { - "enable": { - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationOptions" + "node_name": { + "description": "The node name.", + "type": "string" }, - "include": { - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationInclude" + "node_id": { + "description": "The persistent node identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, - "initial_recovery": { - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationInitialRecovery" + "ephemeral_node_id": { + "description": "The ephemeral node identifier.", + "type": "string" }, - "disk": { - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationDisk" - } - } - }, - "indices._types.IndexRoutingAllocationOptions": { - "type": "string", - "enum": [ - "all", - "primaries", - "new_primaries", - "none" - ] - }, - "indices._types.IndexRoutingAllocationInclude": { - "type": "object", - "properties": { - "_tier_preference": { + "pid": { + "description": "The process identifier.", "type": "string" }, - "_id": { - "$ref": "#/components/schemas/_types.Id" - } - } - }, - "indices._types.IndexRoutingAllocationInitialRecovery": { - "type": "object", - "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - } - } - }, - "indices._types.IndexRoutingAllocationDisk": { - "type": "object", - "properties": { - "threshold_enabled": { + "host": { + "description": "The host name for the current node.", + "type": "string" + }, + "ip": { + "description": "The IP address for the current node.", + "type": "string" + }, + "port": { + "description": "The bound transport port for the current node.", + "type": "string" + }, + "name": { + "description": "The thread pool name.", + "type": "string" + }, + "type": { + "description": "The thread pool type.\nReturned values include `fixed`, `fixed_auto_queue_size`, `direct`, and `scaling`.", + "type": "string" + }, + "active": { + "description": "The number of active threads in the current thread pool.", + "type": "string" + }, + "pool_size": { + "description": "The number of threads in the current thread pool.", + "type": "string" + }, + "queue": { + "description": "The number of tasks currently in queue.", + "type": "string" + }, + "queue_size": { + "description": "The maximum number of tasks permitted in the queue.", + "type": "string" + }, + "rejected": { + "description": "The number of rejected tasks.", + "type": "string" + }, + "largest": { + "description": "The highest number of active threads in the current thread pool.", + "type": "string" + }, + "completed": { + "description": "The number of completed tasks.", + "type": "string" + }, + "core": { + "description": "The core number of active threads allowed in a scaling thread pool.", "oneOf": [ { - "type": "boolean" + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "max": { + "description": "The maximum number of active threads allowed in a scaling thread pool.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "size": { + "description": "The number of active threads allowed in a fixed thread pool.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "keep_alive": { + "description": "The thread keep alive time.", + "oneOf": [ + { + "type": "string" }, { + "nullable": true, "type": "string" } ] } } }, - "indices._types.IndexRoutingRebalance": { - "type": "object", - "properties": { - "enable": { - "$ref": "#/components/schemas/indices._types.IndexRoutingRebalanceOptions" + "cat._types.CatTransformColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatTransformColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatTransformColumn" + } } - }, - "required": [ - "enable" ] }, - "indices._types.IndexRoutingRebalanceOptions": { + "cat._types.CatTransformColumn": { "type": "string", "enum": [ - "all", - "primaries", - "replicas", - "none" + "changes_last_detection_time", + "cldt", + "checkpoint", + "cp", + "checkpoint_duration_time_exp_avg", + "cdtea", + "checkpointTimeExpAvg", + "checkpoint_progress", + "c", + "checkpointProgress", + "create_time", + "ct", + "createTime", + "delete_time", + "dtime", + "description", + "d", + "dest_index", + "di", + "destIndex", + "documents_deleted", + "docd", + "documents_indexed", + "doci", + "docs_per_second", + "dps", + "documents_processed", + "docp", + "frequency", + "f", + "id", + "index_failure", + "if", + "index_time", + "itime", + "index_total", + "it", + "indexed_documents_exp_avg", + "idea", + "last_search_time", + "lst", + "lastSearchTime", + "max_page_search_size", + "mpsz", + "pages_processed", + "pp", + "pipeline", + "p", + "processed_documents_exp_avg", + "pdea", + "processing_time", + "pt", + "reason", + "r", + "search_failure", + "sf", + "search_time", + "stime", + "search_total", + "st", + "source_index", + "si", + "sourceIndex", + "state", + "s", + "transform_type", + "tt", + "trigger_count", + "tc", + "version", + "v" ] }, - "_types.PipelineName": { - "type": "string" - }, - "indices._types.IndexSettingsLifecycle": { + "cat.transforms.TransformsRecord": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "id": { + "description": "The transform identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "indexing_complete": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "state": { + "description": "The status of the transform.\nReturned values include:\n`aborting`: The transform is aborting.\n`failed: The transform failed. For more information about the failure, check the `reason` field.\n`indexing`: The transform is actively processing data and creating new documents.\n`started`: The transform is running but not actively indexing data.\n`stopped`: The transform is stopped.\n`stopping`: The transform is stopping.", + "type": "string" }, - "origination_date": { - "description": "If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting\nif you create a new index that contains old data and want to use the original creation date to calculate the index\nage. Specified as a Unix epoch value in milliseconds.", - "type": "number" + "checkpoint": { + "description": "The sequence number for the checkpoint.", + "type": "string" }, - "parse_origination_date": { - "description": "Set to true to parse the origination date from the index name. This origination date is used to calculate the index age\nfor its phase transitions. The index name must match the pattern ^.*-{date_format}-\\\\d+, where the date_format is\nyyyy.MM.dd and the trailing digits are optional. An index that was rolled over would normally match the full format,\nfor example logs-2016.10.31-000002). If the index name doesn’t match the pattern, index creation fails.", - "type": "boolean" + "documents_processed": { + "description": "The number of documents that have been processed from the source index of the transform.", + "type": "string" }, - "step": { - "$ref": "#/components/schemas/indices._types.IndexSettingsLifecycleStep" + "checkpoint_progress": { + "description": "The progress of the next checkpoint that is currently in progress.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "rollover_alias": { - "description": "The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action.\nWhen the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more\ninformation about rolling indices, see Rollover.", - "type": "string" + "last_search_time": { + "description": "The timestamp of the last search in the source indices.\nThis field is shown only if the transform is running.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "prefer_ilm": { - "description": "Preference for the system that manages a data stream backing index (preferring ILM when both ILM and DLM are\napplicable for an index).", + "changes_last_detection_time": { + "description": "The timestamp when changes were last detected in the source indices.", "oneOf": [ { - "type": "boolean" + "type": "string" }, { + "nullable": true, "type": "string" } ] - } - } - }, - "indices._types.IndexSettingsLifecycleStep": { - "type": "object", - "properties": { - "wait_time_threshold": { - "$ref": "#/components/schemas/_types.Duration" - } - } - }, - "_spec_utils.StringifiedEpochTimeUnitMillis": { - "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" }, - { + "create_time": { + "description": "The time the transform was created.", "type": "string" - } - ] - }, - "_types.Uuid": { - "type": "string" - }, - "indices._types.IndexVersioning": { - "type": "object", - "properties": { - "created": { - "$ref": "#/components/schemas/_types.VersionString" }, - "created_string": { + "version": { + "description": "The version of Elasticsearch that existed on the node when the transform was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "source_index": { + "description": "The source indices for the transform.", + "type": "string" + }, + "dest_index": { + "description": "The destination index for the transform.", + "type": "string" + }, + "pipeline": { + "description": "The unique identifier for the ingest pipeline.", + "type": "string" + }, + "description": { + "description": "The description of the transform.", + "type": "string" + }, + "transform_type": { + "description": "The type of transform: `batch` or `continuous`.", + "type": "string" + }, + "frequency": { + "description": "The interval between checks for changes in the source indices when the transform is running continuously.", + "type": "string" + }, + "max_page_search_size": { + "description": "The initial page size that is used for the composite aggregation for each checkpoint.", "type": "string" - } - } - }, - "indices._types.Translog": { - "type": "object", - "properties": { - "sync_interval": { - "$ref": "#/components/schemas/_types.Duration" }, - "durability": { - "$ref": "#/components/schemas/indices._types.TranslogDurability" + "docs_per_second": { + "description": "The number of input documents per second.", + "type": "string" }, - "flush_threshold_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "reason": { + "description": "If a transform has a `failed` state, these details describe the reason for failure.", + "type": "string" }, - "retention": { - "$ref": "#/components/schemas/indices._types.TranslogRetention" - } - } - }, - "indices._types.TranslogDurability": { - "type": "string", - "enum": [ - "request", - "REQUEST", - "async", - "ASYNC" - ] - }, - "indices._types.TranslogRetention": { - "type": "object", - "properties": { - "size": { - "$ref": "#/components/schemas/_types.ByteSize" + "search_total": { + "description": "The total number of search operations on the source index for the transform.", + "type": "string" }, - "age": { - "$ref": "#/components/schemas/_types.Duration" - } - } - }, - "indices._types.SettingsQueryString": { - "type": "object", - "properties": { - "lenient": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" - } - }, - "required": [ - "lenient" - ] - }, - "indices._types.IndexSettingsAnalysis": { - "type": "object", - "properties": { - "analyzer": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.analysis.Analyzer" - } + "search_failure": { + "description": "The total number of search failures.", + "type": "string" }, - "char_filter": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.analysis.CharFilter" - } + "search_time": { + "description": "The total amount of search time, in milliseconds.", + "type": "string" }, - "filter": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.analysis.TokenFilter" - } + "index_total": { + "description": "The total number of index operations done by the transform.", + "type": "string" }, - "normalizer": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.analysis.Normalizer" - } + "index_failure": { + "description": "The total number of indexing failures.", + "type": "string" }, - "tokenizer": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.analysis.Tokenizer" - } - } - } - }, - "_types.analysis.Analyzer": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/_types.analysis.CustomAnalyzer" + "index_time": { + "description": "The total time spent indexing documents, in milliseconds.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.FingerprintAnalyzer" + "documents_indexed": { + "description": "The number of documents that have been indexed into the destination index for the transform.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.KeywordAnalyzer" + "delete_time": { + "description": "The total time spent deleting documents, in milliseconds.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.NoriAnalyzer" + "documents_deleted": { + "description": "The number of documents deleted from the destination index due to the retention policy for the transform.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.PatternAnalyzer" + "trigger_count": { + "description": "The number of times the transform has been triggered by the scheduler.\nFor example, the scheduler triggers the transform indexer to check for updates or ingest new data at an interval specified in the `frequency` property.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.SimpleAnalyzer" + "pages_processed": { + "description": "The number of search or bulk index operations processed.\nDocuments are processed in batches instead of individually.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.StandardAnalyzer" + "processing_time": { + "description": "The total time spent processing results, in milliseconds.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.StopAnalyzer" + "checkpoint_duration_time_exp_avg": { + "description": "The exponential moving average of the duration of the checkpoint, in milliseconds.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.WhitespaceAnalyzer" + "indexed_documents_exp_avg": { + "description": "The exponential moving average of the number of new documents that have been indexed.", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.IcuAnalyzer" + "processed_documents_exp_avg": { + "description": "The exponential moving average of the number of documents that have been processed.", + "type": "string" + } + } + }, + "indices._types.IndexSettings": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.KuromojiAnalyzer" + "mode": { + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.SnowballAnalyzer" + "routing_path": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.ArabicAnalyzer" + "soft_deletes": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SoftDeletes" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.ArmenianAnalyzer" + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSegmentSort" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.BasqueAnalyzer" + "number_of_shards": { + "default": "1", + "x-state": "Generally available", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.BengaliAnalyzer" + "number_of_replicas": { + "default": "0", + "x-state": "Generally available", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.BrazilianAnalyzer" + "number_of_routing_shards": { + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.BulgarianAnalyzer" + "check_on_startup": { + "default": "false", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexCheckOnStartup" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.CatalanAnalyzer" + "codec": { + "default": "LZ4", + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.ChineseAnalyzer" + "routing_partition_size": { + "default": "1", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.CjkAnalyzer" + "load_fixed_bitset_filters_eagerly": { + "default": true, + "type": "boolean" }, - { - "$ref": "#/components/schemas/_types.analysis.CzechAnalyzer" + "hidden": { + "default": "false", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.DanishAnalyzer" + "auto_expand_replicas": { + "default": "false", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_spec_utils.NullValue" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.DutchAnalyzer" + "merge": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.Merge" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.EnglishAnalyzer" + "search": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SettingsSearch" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.EstonianAnalyzer" + "refresh_interval": { + "default": "1s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.FinnishAnalyzer" + "max_result_window": { + "default": 10000.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.FrenchAnalyzer" + "max_inner_result_window": { + "default": 100.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.GalicianAnalyzer" + "max_rescore_window": { + "default": 10000.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.GermanAnalyzer" + "max_docvalue_fields_search": { + "default": 100.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.GreekAnalyzer" + "max_script_fields": { + "default": 32.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.HindiAnalyzer" + "max_ngram_diff": { + "default": 1.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.HungarianAnalyzer" + "max_shingle_diff": { + "default": 3.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.IndonesianAnalyzer" + "blocks": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettingBlocks" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.IrishAnalyzer" + "max_refresh_listeners": { + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.ItalianAnalyzer" + "analyze": { + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices" + }, + "description": "Settings to define analyzers, tokenizers, token filters and character filters.\nRefer to the linked documentation for step-by-step examples of updating analyzers on existing indices.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SettingsAnalyze" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.LatvianAnalyzer" + "highlight": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SettingsHighlight" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.LithuanianAnalyzer" + "max_terms_count": { + "default": 65536.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.NorwegianAnalyzer" + "max_regex_length": { + "default": 1000.0, + "type": "number" }, - { - "$ref": "#/components/schemas/_types.analysis.PersianAnalyzer" + "routing": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRouting" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.PortugueseAnalyzer" + "gc_deletes": { + "default": "60s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.RomanianAnalyzer" + "default_pipeline": { + "default": "_none", + "allOf": [ + { + "$ref": "#/components/schemas/_types.PipelineName" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.RussianAnalyzer" + "final_pipeline": { + "default": "_none", + "allOf": [ + { + "$ref": "#/components/schemas/_types.PipelineName" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.SerbianAnalyzer" + "lifecycle": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettingsLifecycle" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.SoraniAnalyzer" + "provided_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.SpanishAnalyzer" + "creation_date": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.StringifiedEpochTimeUnitMillis" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.SwedishAnalyzer" + "creation_date_string": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.TurkishAnalyzer" + "uuid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.ThaiAnalyzer" - } - ] - }, - "_types.analysis.CustomAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "custom" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexVersioning" + } ] }, - "char_filter": { + "verified_before_close": { "oneOf": [ { - "type": "string" + "type": "boolean" }, { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } ] }, - "filter": { + "format": { "oneOf": [ { "type": "string" }, { - "type": "array", - "items": { - "type": "string" - } + "type": "number" } ] }, - "position_increment_gap": { - "type": "number" - }, - "position_offset_gap": { - "type": "number" - }, - "tokenizer": { - "type": "string" - } - }, - "required": [ - "type", - "tokenizer" - ] - }, - "_types.analysis.FingerprintAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "fingerprint" - ] - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "max_output_size": { - "description": "The maximum token size to emit. Tokens larger than this size will be discarded.\nDefaults to `255`", + "max_slices_per_scroll": { "type": "number" }, - "separator": { - "description": "The character to use to concatenate the terms.\nDefaults to a space.", - "type": "string" - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "description": "The path to a file containing stop words.", - "type": "string" - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.KeywordAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "keyword" - ] - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.NoriAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "nori" + "translog": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.Translog" + } ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "query_string": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SettingsQueryString" + } + ] }, - "decompound_mode": { - "$ref": "#/components/schemas/_types.analysis.NoriDecompoundMode" + "priority": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, - "stoptags": { - "type": "array", - "items": { - "type": "string" - } + "top_metrics_max_size": { + "type": "number" }, - "user_dictionary": { - "type": "string" - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.NoriDecompoundMode": { - "type": "string", - "enum": [ - "discard", - "none", - "mixed" - ] - }, - "_types.analysis.PatternAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "pattern" + "analysis": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettingsAnalysis" + } ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "flags": { - "description": "Java regular expression flags. Flags should be pipe-separated, eg \"CASE_INSENSITIVE|COMMENTS\".", - "type": "string" + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] }, - "lowercase": { - "description": "Should terms be lowercased or not.\nDefaults to `true`.", - "type": "boolean" + "time_series": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettingsTimeSeries" + } + ] }, - "pattern": { - "description": "A Java regular expression.\nDefaults to `\\W+`.", - "type": "string" + "queries": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.Queries" + } + ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "similarity": { + "description": "Configure custom similarity settings to customize how search results are scored.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.SettingsSimilarity" + } }, - "stopwords_path": { - "description": "The path to a file containing stop words.", - "type": "string" - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.SimpleAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "simple" + "mapping": { + "description": "Enable or disable dynamic mapping for an index.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MappingLimitSettings" + } ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.StandardAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "standard" + "indexing.slowlog": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexingSlowlogSettings" + } ] }, - "max_token_length": { - "description": "The maximum token length. If a token is seen that exceeds this length then it is split at `max_token_length` intervals.\nDefaults to `255`.", - "type": "number" - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "indexing_pressure": { + "description": "Configure indexing back pressure limits.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexingPressure" + } + ] }, - "stopwords_path": { - "description": "The path to a file containing stop words.", - "type": "string" + "store": { + "description": "The store module allows you to control how index data is stored and accessed on disk.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.Storage" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.StopAnalyzer": { + "indices._types.SoftDeletes": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "stop" - ] - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "enabled": { + "description": "Indicates whether soft deletes are enabled on the index.", + "default": true, + "type": "boolean" }, - "stopwords_path": { - "description": "The path to a file containing stop words.", - "type": "string" + "retention_lease": { + "description": "The maximum period to retain a shard history retention lease before it is considered expired.\nShard history retention leases ensure that soft deletes are retained during merges on the Lucene\nindex. If a soft delete is merged away before it can be replicated to a follower the following\nprocess will fail due to incomplete history on the leader.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.RetentionLease" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.WhitespaceAnalyzer": { + "indices._types.RetentionLease": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "whitespace" + "period": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } ] - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" } }, "required": [ - "type" + "period" ] }, - "_types.analysis.IcuAnalyzer": { + "indices._types.IndexSegmentSort": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "icu_analyzer" + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } ] }, - "method": { - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType" + "order": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.SegmentSortOrder" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.SegmentSortOrder" + } + } + ] }, "mode": { - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationMode" + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.SegmentSortMode" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.SegmentSortMode" + } + } + ] + }, + "missing": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.SegmentSortMissing" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.SegmentSortMissing" + } + } + ] } - }, - "required": [ - "type", - "method", - "mode" - ] + } }, - "_types.analysis.IcuNormalizationType": { + "indices._types.SegmentSortOrder": { "type": "string", "enum": [ - "nfc", - "nfkc", - "nfkc_cf" + "asc", + "ASC", + "desc", + "DESC" ] }, - "_types.analysis.IcuNormalizationMode": { + "indices._types.SegmentSortMode": { "type": "string", "enum": [ - "decompose", - "compose" - ] - }, - "_types.analysis.KuromojiAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "kuromoji" - ] - }, - "mode": { - "$ref": "#/components/schemas/_types.analysis.KuromojiTokenizationMode" - }, - "user_dictionary": { - "type": "string" - } - }, - "required": [ - "type", - "mode" + "min", + "MIN", + "max", + "MAX" ] }, - "_types.analysis.KuromojiTokenizationMode": { + "indices._types.SegmentSortMissing": { "type": "string", "enum": [ - "normal", - "search", - "extended" - ] - }, - "_types.analysis.SnowballAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "snowball" - ] - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "language": { - "$ref": "#/components/schemas/_types.analysis.SnowballLanguage" - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - } - }, - "required": [ - "type", - "language" + "_last", + "_first" ] }, - "_types.analysis.SnowballLanguage": { + "indices._types.IndexCheckOnStartup": { "type": "string", "enum": [ - "Arabic", - "Armenian", - "Basque", - "Catalan", - "Danish", - "Dutch", - "English", - "Estonian", - "Finnish", - "French", - "German", - "German2", - "Hungarian", - "Italian", - "Irish", - "Kp", - "Lithuanian", - "Lovins", - "Norwegian", - "Porter", - "Portuguese", - "Romanian", - "Russian", - "Serbian", - "Spanish", - "Swedish", - "Turkish" - ] - }, - "_types.analysis.ArabicAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "arabic" - ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.ArmenianAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "armenian" - ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.BasqueAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "basque" - ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "type" + "true", + "false", + "checksum" ] }, - "_types.analysis.BengaliAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "bengali" - ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "_spec_utils.Stringifiedinteger": { + "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", + "oneOf": [ + { + "type": "number" }, - "stopwords_path": { + { "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } - }, - "required": [ - "type" ] }, - "_types.analysis.BrazilianAnalyzer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "brazilian" - ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - } - }, - "required": [ - "type" - ] + "_spec_utils.NullValue": { + "nullable": true, + "description": "A `null` value that is to be interpreted as an actual value, unless other uses of `null` that are equivalent\nto a missing value. It is used for exemple in settings, where using the `NullValue` for a setting will reset\nit to its default value.", + "type": "string" }, - "_types.analysis.BulgarianAnalyzer": { + "indices._types.Merge": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "bulgarian" + "scheduler": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MergeScheduler" + } ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.CatalanAnalyzer": { + "indices._types.MergeScheduler": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "catalan" + "max_thread_count": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "max_merge_count": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.ChineseAnalyzer": { + "indices._types.SettingsSearch": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "chinese" + "idle": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SearchIdle" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" + "slowlog": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SlowlogSettings" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.CjkAnalyzer": { + "indices._types.SearchIdle": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "cjk" + "after": { + "default": "30s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.CzechAnalyzer": { + "indices._types.SlowlogSettings": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "czech" - ] + "level": { + "type": "string" }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "source": { + "type": "number" }, - "stopwords_path": { - "type": "string" + "reformat": { + "type": "boolean" }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "threshold": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SlowlogTresholds" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.DanishAnalyzer": { + "indices._types.SlowlogTresholds": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "danish" + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" + "fetch": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.DutchAnalyzer": { + "indices._types.SlowlogTresholdLevels": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "dutch" + "warn": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "info": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "stopwords_path": { - "type": "string" + "debug": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "trace": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.EnglishAnalyzer": { + "indices._types.IndexSettingBlocks": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "english" + "read_only": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "read_only_allow_delete": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] }, - "stopwords_path": { - "type": "string" + "read": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "write": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] + } + } + }, + "_spec_utils.Stringifiedboolean": { + "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" } - }, - "required": [ - "type" ] }, - "_types.analysis.EstonianAnalyzer": { + "indices._types.SettingsAnalyze": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "estonian" + "max_token_count": { + "default": "10000", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + } ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.FinnishAnalyzer": { + "indices._types.SettingsHighlight": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "finnish" + "max_analyzed_offset": { + "default": 1000000.0, + "type": "number" + } + } + }, + "indices._types.IndexRouting": { + "type": "object", + "properties": { + "allocation": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRoutingAllocation" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "rebalance": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRoutingRebalance" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.FrenchAnalyzer": { + "indices._types.IndexRoutingAllocation": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "french" + "enable": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationOptions" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "include": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationInclude" + } + ] }, - "stopwords_path": { - "type": "string" + "initial_recovery": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationInitialRecovery" + } + ] }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "disk": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationDisk" + } + ] } - }, - "required": [ - "type" + } + }, + "indices._types.IndexRoutingAllocationOptions": { + "type": "string", + "enum": [ + "all", + "primaries", + "new_primaries", + "none" ] }, - "_types.analysis.GalicianAnalyzer": { + "indices._types.IndexRoutingAllocationInclude": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "galician" - ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { + "_tier_preference": { "type": "string" }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.GermanAnalyzer": { + "indices._types.IndexRoutingAllocationInitialRecovery": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "german" + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.GreekAnalyzer": { + "indices._types.IndexRoutingAllocationDisk": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "greek" + "threshold_enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.HindiAnalyzer": { + "indices._types.IndexRoutingRebalance": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "hindi" + "enable": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRoutingRebalanceOptions" + } ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ - "type" + "enable" ] }, - "_types.analysis.HungarianAnalyzer": { + "indices._types.IndexRoutingRebalanceOptions": { + "type": "string", + "enum": [ + "all", + "primaries", + "replicas", + "none" + ] + }, + "_types.PipelineName": { + "type": "string" + }, + "indices._types.IndexSettingsLifecycle": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "hungarian" + "name": { + "description": "The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "indexing_complete": { + "description": "Indicates whether or not the index has been rolled over. Automatically set to true when ILM completes the rollover action.\nYou can explicitly set it to skip rollover.", + "default": "false", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] }, - "stopwords_path": { + "origination_date": { + "description": "If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting\nif you create a new index that contains old data and want to use the original creation date to calculate the index\nage. Specified as a Unix epoch value in milliseconds.", + "default": 0.0, + "type": "number" + }, + "parse_origination_date": { + "description": "Set to true to parse the origination date from the index name. This origination date is used to calculate the index age\nfor its phase transitions. The index name must match the pattern ^.*-{date_format}-\\\\d+, where the date_format is\nyyyy.MM.dd and the trailing digits are optional. An index that was rolled over would normally match the full format,\nfor example logs-2016.10.31-000002). If the index name doesn’t match the pattern, index creation fails.", + "type": "boolean" + }, + "step": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettingsLifecycleStep" + } + ] + }, + "rollover_alias": { + "description": "The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action.\nWhen the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more\ninformation about rolling indices, see Rollover.", + "default": "", "type": "string" }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "prefer_ilm": { + "description": "Preference for the system that manages a data stream backing index (preferring ILM when both ILM and DLM are\napplicable for an index).", + "default": "true", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.IndonesianAnalyzer": { + "indices._types.IndexSettingsLifecycleStep": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "indonesian" + "wait_time_threshold": { + "description": "Time to wait for the cluster to resolve allocation issues during an ILM shrink action. Must be greater than 1h (1 hour).\nSee Shard allocation for shrink.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } ] + } + } + }, + "_spec_utils.StringifiedEpochTimeUnitMillis": { + "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { + { "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } - }, - "required": [ - "type" ] }, - "_types.analysis.IrishAnalyzer": { + "_types.Uuid": { + "type": "string" + }, + "indices._types.IndexVersioning": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "irish" + "created": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { + "created_string": { "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.ItalianAnalyzer": { + "indices._types.Translog": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "italian" + "sync_interval": { + "description": "How often the translog is fsynced to disk and committed, regardless of write operations.\nValues less than 100ms are not allowed.", + "default": "5s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "durability": { + "description": "Whether or not to `fsync` and commit the translog after every index, delete, update, or bulk request.", + "default": "string", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.TranslogDurability" + } + ] }, - "stopwords_path": { - "type": "string" + "flush_threshold_size": { + "description": "The translog stores all operations that are not yet safely persisted in Lucene (i.e., are not\npart of a Lucene commit point). Although these operations are available for reads, they will need\nto be replayed if the shard was stopped and had to be recovered. This setting controls the\nmaximum total size of these operations, to prevent recoveries from taking too long. Once the\nmaximum size has been reached a flush will happen, generating a new Lucene commit point.", + "default": "512mb", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "retention": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.TranslogRetention" + } + ] } - }, - "required": [ - "type" + } + }, + "indices._types.TranslogDurability": { + "type": "string", + "enum": [ + "request", + "REQUEST", + "async", + "ASYNC" ] }, - "_types.analysis.LatvianAnalyzer": { + "indices._types.TranslogRetention": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "latvian" + "size": { + "description": "This controls the total size of translog files to keep for each shard. Keeping more translog files increases\nthe chance of performing an operation based sync when recovering a replica. If the translog files are not\nsufficient, replica recovery will fall back to a file based sync. This setting is ignored, and should not be\nset, if soft deletes are enabled. Soft deletes are enabled by default in indices created in Elasticsearch\nversions 7.0.0 and later.", + "default": "512mb", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "age": { + "description": "This controls the maximum duration for which translog files are kept by each shard. Keeping more\ntranslog files increases the chance of performing an operation based sync when recovering replicas. If\nthe translog files are not sufficient, replica recovery will fall back to a file based sync. This setting\nis ignored, and should not be set, if soft deletes are enabled. Soft deletes are enabled by default in\nindices created in Elasticsearch versions 7.0.0 and later.", + "default": "12h", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] } - }, - "required": [ - "type" - ] + } }, - "_types.analysis.LithuanianAnalyzer": { + "indices._types.SettingsQueryString": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "lithuanian" + "lenient": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ - "type" + "lenient" ] }, - "_types.analysis.NorwegianAnalyzer": { + "indices._types.IndexSettingsAnalysis": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "norwegian" - ] + "analyzer": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.analysis.Analyzer" + } }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "char_filter": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.analysis.CharFilter" + } }, - "stopwords_path": { - "type": "string" + "filter": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.analysis.TokenFilter" + } }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" + "normalizer": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.analysis.Normalizer" } + }, + "tokenizer": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.analysis.Tokenizer" + } + } + } + }, + "_types.analysis.Analyzer": { + "discriminator": { + "propertyName": "type", + "mapping": { + "arabic": "#/components/schemas/_types.analysis.ArabicAnalyzer", + "armenian": "#/components/schemas/_types.analysis.ArmenianAnalyzer", + "basque": "#/components/schemas/_types.analysis.BasqueAnalyzer", + "bengali": "#/components/schemas/_types.analysis.BengaliAnalyzer", + "brazilian": "#/components/schemas/_types.analysis.BrazilianAnalyzer", + "bulgarian": "#/components/schemas/_types.analysis.BulgarianAnalyzer", + "catalan": "#/components/schemas/_types.analysis.CatalanAnalyzer", + "chinese": "#/components/schemas/_types.analysis.ChineseAnalyzer", + "cjk": "#/components/schemas/_types.analysis.CjkAnalyzer", + "custom": "#/components/schemas/_types.analysis.CustomAnalyzer", + "czech": "#/components/schemas/_types.analysis.CzechAnalyzer", + "danish": "#/components/schemas/_types.analysis.DanishAnalyzer", + "dutch": "#/components/schemas/_types.analysis.DutchAnalyzer", + "english": "#/components/schemas/_types.analysis.EnglishAnalyzer", + "estonian": "#/components/schemas/_types.analysis.EstonianAnalyzer", + "fingerprint": "#/components/schemas/_types.analysis.FingerprintAnalyzer", + "finnish": "#/components/schemas/_types.analysis.FinnishAnalyzer", + "french": "#/components/schemas/_types.analysis.FrenchAnalyzer", + "galician": "#/components/schemas/_types.analysis.GalicianAnalyzer", + "german": "#/components/schemas/_types.analysis.GermanAnalyzer", + "greek": "#/components/schemas/_types.analysis.GreekAnalyzer", + "hindi": "#/components/schemas/_types.analysis.HindiAnalyzer", + "hungarian": "#/components/schemas/_types.analysis.HungarianAnalyzer", + "icu_analyzer": "#/components/schemas/_types.analysis.IcuAnalyzer", + "indonesian": "#/components/schemas/_types.analysis.IndonesianAnalyzer", + "irish": "#/components/schemas/_types.analysis.IrishAnalyzer", + "italian": "#/components/schemas/_types.analysis.ItalianAnalyzer", + "keyword": "#/components/schemas/_types.analysis.KeywordAnalyzer", + "kuromoji": "#/components/schemas/_types.analysis.KuromojiAnalyzer", + "latvian": "#/components/schemas/_types.analysis.LatvianAnalyzer", + "lithuanian": "#/components/schemas/_types.analysis.LithuanianAnalyzer", + "nori": "#/components/schemas/_types.analysis.NoriAnalyzer", + "norwegian": "#/components/schemas/_types.analysis.NorwegianAnalyzer", + "pattern": "#/components/schemas/_types.analysis.PatternAnalyzer", + "persian": "#/components/schemas/_types.analysis.PersianAnalyzer", + "portuguese": "#/components/schemas/_types.analysis.PortugueseAnalyzer", + "romanian": "#/components/schemas/_types.analysis.RomanianAnalyzer", + "russian": "#/components/schemas/_types.analysis.RussianAnalyzer", + "serbian": "#/components/schemas/_types.analysis.SerbianAnalyzer", + "simple": "#/components/schemas/_types.analysis.SimpleAnalyzer", + "snowball": "#/components/schemas/_types.analysis.SnowballAnalyzer", + "sorani": "#/components/schemas/_types.analysis.SoraniAnalyzer", + "spanish": "#/components/schemas/_types.analysis.SpanishAnalyzer", + "standard": "#/components/schemas/_types.analysis.StandardAnalyzer", + "stop": "#/components/schemas/_types.analysis.StopAnalyzer", + "swedish": "#/components/schemas/_types.analysis.SwedishAnalyzer", + "thai": "#/components/schemas/_types.analysis.ThaiAnalyzer", + "turkish": "#/components/schemas/_types.analysis.TurkishAnalyzer", + "whitespace": "#/components/schemas/_types.analysis.WhitespaceAnalyzer" } }, - "required": [ - "type" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.analysis.CustomAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.FingerprintAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.KeywordAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.NoriAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.PatternAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.SimpleAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.StandardAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.StopAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.WhitespaceAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.IcuAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.KuromojiAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.SnowballAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.ArabicAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.ArmenianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.BasqueAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.BengaliAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.BrazilianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.BulgarianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.CatalanAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.ChineseAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.CjkAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.CzechAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.DanishAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.DutchAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.EnglishAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.EstonianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.FinnishAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.FrenchAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.GalicianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.GermanAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.GreekAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.HindiAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.HungarianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.IndonesianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.IrishAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.ItalianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.LatvianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.LithuanianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.NorwegianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.PersianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.PortugueseAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.RomanianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.RussianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.SerbianAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.SoraniAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.SpanishAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.SwedishAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.TurkishAnalyzer" + }, + { + "$ref": "#/components/schemas/_types.analysis.ThaiAnalyzer" + } ] }, - "_types.analysis.PersianAnalyzer": { + "_types.analysis.CustomAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "persian" + "custom" ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "char_filter": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "stopwords_path": { + "filter": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "position_increment_gap": { + "type": "number" + }, + "position_offset_gap": { + "type": "number" + }, + "tokenizer": { "type": "string" } }, "required": [ - "type" + "type", + "tokenizer" ] }, - "_types.analysis.PortugueseAnalyzer": { + "_types.analysis.FingerprintAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "portuguese" + "fingerprint" + ] + }, + "version": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } ] }, + "max_output_size": { + "description": "The maximum token size to emit. Tokens larger than this size will be discarded.\nDefaults to `255`", + "default": 255.0, + "type": "number" + }, + "separator": { + "description": "The character to use to concatenate the terms.\nDefaults to a space.", + "type": "string" + }, "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "description": "A pre-defined stop words list like `_english_` or an array containing a list of stop words.\nDefaults to `_none_`.", + "default": "_none_", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, "stopwords_path": { + "description": "The path to a file containing stop words.", "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ "type" ] }, - "_types.analysis.RomanianAnalyzer": { + "_types.analysis.KeywordAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "romanian" + "keyword" ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "version": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] } }, "required": [ "type" ] }, - "_types.analysis.RussianAnalyzer": { + "_types.analysis.NoriAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "russian" + "nori" ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "version": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "stopwords_path": { - "type": "string" + "decompound_mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.NoriDecompoundMode" + } + ] }, - "stem_exclusion": { + "stoptags": { "type": "array", "items": { "type": "string" } + }, + "user_dictionary": { + "type": "string" } }, "required": [ "type" ] }, - "_types.analysis.SerbianAnalyzer": { + "_types.analysis.NoriDecompoundMode": { + "type": "string", + "enum": [ + "discard", + "none", + "mixed" + ] + }, + "_types.analysis.PatternAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "serbian" + "pattern" + ] + }, + "version": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } ] }, + "flags": { + "description": "Java regular expression flags. Flags should be pipe-separated, eg \"CASE_INSENSITIVE|COMMENTS\".", + "type": "string" + }, + "lowercase": { + "description": "Should terms be lowercased or not.\nDefaults to `true`.", + "default": true, + "type": "boolean" + }, + "pattern": { + "description": "A Java regular expression.\nDefaults to `\\W+`.", + "default": "\\W+", + "type": "string" + }, "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "description": "A pre-defined stop words list like `_english_` or an array containing a list of stop words.\nDefaults to `_none_`.", + "default": "_none_", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, "stopwords_path": { + "description": "The path to a file containing stop words.", "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ "type" ] }, - "_types.analysis.SoraniAnalyzer": { + "_types.analysis.SimpleAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "sorani" + "simple" ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "version": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] } }, "required": [ "type" ] }, - "_types.analysis.SpanishAnalyzer": { + "_types.analysis.StandardAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "spanish" + "standard" ] }, + "max_token_length": { + "description": "The maximum token length. If a token is seen that exceeds this length then it is split at `max_token_length` intervals.\nDefaults to `255`.", + "default": 255.0, + "type": "number" + }, "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "description": "A pre-defined stop words list like `_english_` or an array containing a list of stop words.\nDefaults to `_none_`.", + "default": "_none_", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, "stopwords_path": { + "description": "The path to a file containing stop words.", "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ "type" ] }, - "_types.analysis.SwedishAnalyzer": { + "_types.analysis.StopAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "swedish" + "stop" + ] + }, + "version": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } ] }, "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "description": "A pre-defined stop words list like `_english_` or an array containing a list of stop words.\nDefaults to `_none_`.", + "default": "_none_", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, "stopwords_path": { + "description": "The path to a file containing stop words.", "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ "type" ] }, - "_types.analysis.TurkishAnalyzer": { + "_types.analysis.WhitespaceAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "turkish" + "whitespace" ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "type": "string" - }, - "stem_exclusion": { - "type": "array", - "items": { - "type": "string" - } + "version": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] } }, "required": [ "type" ] }, - "_types.analysis.ThaiAnalyzer": { + "_types.analysis.IcuAnalyzer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "thai" + "icu_analyzer" ] }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" + "method": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType" + } + ] }, - "stopwords_path": { - "type": "string" + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuNormalizationMode" + } + ] } }, "required": [ - "type" + "type", + "method", + "mode" ] }, - "_types.analysis.CharFilter": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/text-analysis/character-filter-reference" - }, - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_types.analysis.CharFilterDefinition" - } + "_types.analysis.IcuNormalizationType": { + "type": "string", + "enum": [ + "nfc", + "nfkc", + "nfkc_cf" ] }, - "_types.analysis.CharFilterDefinition": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/_types.analysis.HtmlStripCharFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.MappingCharFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.PatternReplaceCharFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationCharFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.KuromojiIterationMarkCharFilter" - } + "_types.analysis.IcuNormalizationMode": { + "type": "string", + "enum": [ + "decompose", + "compose" ] }, - "_types.analysis.HtmlStripCharFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.CharFilterBase" + "_types.analysis.KuromojiAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "kuromoji" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "html_strip" - ] - }, - "escaped_tags": { - "type": "array", - "items": { - "type": "string" - } + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.KuromojiTokenizationMode" } - }, - "required": [ - "type" ] + }, + "user_dictionary": { + "type": "string" } + }, + "required": [ + "type" ] }, - "_types.analysis.CharFilterBase": { + "_types.analysis.KuromojiTokenizationMode": { + "type": "string", + "enum": [ + "normal", + "search", + "extended" + ] + }, + "_types.analysis.SnowballAnalyzer": { "type": "object", "properties": { - "version": { - "$ref": "#/components/schemas/_types.VersionString" - } - } - }, - "_types.analysis.MappingCharFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.CharFilterBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "mapping" - ] - }, - "mappings": { - "type": "array", - "items": { - "type": "string" - } - }, - "mappings_path": { - "type": "string" - } - }, - "required": [ - "type" + "type": { + "type": "string", + "enum": [ + "snowball" ] - } - ] - }, - "_types.analysis.PatternReplaceCharFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.CharFilterBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "pattern_replace" - ] - }, - "flags": { - "type": "string" - }, - "pattern": { - "type": "string" - }, - "replacement": { - "type": "string" + "version": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" } - }, - "required": [ - "type", - "pattern" ] - } - ] - }, - "_types.analysis.IcuNormalizationCharFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.CharFilterBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "icu_normalizer" - ] - }, - "mode": { - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationMode" - }, - "name": { - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType" - }, - "unicode_set_filter": { - "type": "string" + "language": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.SnowballLanguage" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.analysis.KuromojiIterationMarkCharFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.CharFilterBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "kuromoji_iteration_mark" - ] - }, - "normalize_kana": { - "type": "boolean" - }, - "normalize_kanji": { - "type": "boolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type", - "normalize_kana", - "normalize_kanji" ] } + }, + "required": [ + "type", + "language" ] }, - "_types.analysis.TokenFilter": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/text-analysis/token-filter-reference" - }, - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterDefinition" - } + "_types.analysis.SnowballLanguage": { + "type": "string", + "enum": [ + "Arabic", + "Armenian", + "Basque", + "Catalan", + "Danish", + "Dutch", + "English", + "Estonian", + "Finnish", + "French", + "German", + "German2", + "Hungarian", + "Italian", + "Irish", + "Kp", + "Lithuanian", + "Lovins", + "Norwegian", + "Porter", + "Portuguese", + "Romanian", + "Russian", + "Serbian", + "Spanish", + "Swedish", + "Turkish" ] }, - "_types.analysis.TokenFilterDefinition": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/_types.analysis.ApostropheTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.ArabicNormalizationTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.AsciiFoldingTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.CjkBigramTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.CjkWidthTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.ClassicTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.CommonGramsTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.ConditionTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.DecimalDigitTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.DelimitedPayloadTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.EdgeNGramTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.ElisionTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.FingerprintTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.FlattenGraphTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.GermanNormalizationTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.HindiNormalizationTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.HunspellTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.HyphenationDecompounderTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.IndicNormalizationTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.KeepTypesTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.KeepWordsTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.KeywordMarkerTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.KeywordRepeatTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.KStemTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.LengthTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.LimitTokenCountTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.LowercaseTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.MinHashTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.MultiplexerTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.NGramTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.NoriPartOfSpeechTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.PatternCaptureTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.PatternReplaceTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.PersianNormalizationTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.PorterStemTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.PredicateTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.RemoveDuplicatesTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.ReverseTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.ScandinavianFoldingTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.ScandinavianNormalizationTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.SerbianNormalizationTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.ShingleTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.SnowballTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.SoraniNormalizationTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.StemmerOverrideTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.StemmerTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.StopTokenFilter" - }, - { - "$ref": "#/components/schemas/_types.analysis.SynonymGraphTokenFilter" + "_types.analysis.ArabicAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "arabic" + ] }, - { - "$ref": "#/components/schemas/_types.analysis.SynonymTokenFilter" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.TrimTokenFilter" + "stopwords_path": { + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.TruncateTokenFilter" + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "_types.analysis.ArmenianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "armenian" + ] }, - { - "$ref": "#/components/schemas/_types.analysis.UniqueTokenFilter" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.UppercaseTokenFilter" + "stopwords_path": { + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.WordDelimiterGraphTokenFilter" + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "_types.analysis.BasqueAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "basque" + ] }, - { - "$ref": "#/components/schemas/_types.analysis.WordDelimiterTokenFilter" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.JaStopTokenFilter" + "stopwords_path": { + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.KuromojiStemmerTokenFilter" + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "_types.analysis.BengaliAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "bengali" + ] }, - { - "$ref": "#/components/schemas/_types.analysis.KuromojiReadingFormTokenFilter" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.KuromojiPartOfSpeechTokenFilter" + "stopwords_path": { + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.IcuCollationTokenFilter" + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "_types.analysis.BrazilianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brazilian" + ] }, - { - "$ref": "#/components/schemas/_types.analysis.IcuFoldingTokenFilter" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationTokenFilter" + "stopwords_path": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "_types.analysis.BulgarianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "bulgarian" + ] }, - { - "$ref": "#/components/schemas/_types.analysis.IcuTransformTokenFilter" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] }, - { - "$ref": "#/components/schemas/_types.analysis.PhoneticTokenFilter" + "stopwords_path": { + "type": "string" }, - { - "$ref": "#/components/schemas/_types.analysis.DictionaryDecompounderTokenFilter" + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.ApostropheTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.CatalanAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "catalan" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "apostrophe" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.TokenFilterBase": { + "_types.analysis.ChineseAnalyzer": { "type": "object", "properties": { - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "type": { + "type": "string", + "enum": [ + "chinese" + ] + }, + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] + }, + "stopwords_path": { + "type": "string" } - } + }, + "required": [ + "type" + ] }, - "_types.analysis.ArabicNormalizationTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.CjkAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "cjk" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "arabic_normalization" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" } + }, + "required": [ + "type" ] }, - "_types.analysis.AsciiFoldingTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.CzechAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "czech" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "asciifolding" - ] - }, - "preserve_original": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.CjkBigramTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.DanishAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "danish" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "cjk_bigram" - ] - }, - "ignored_scripts": { - "description": "Array of character scripts for which to disable bigrams.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.CjkBigramIgnoredScript" - } - }, - "output_unigrams": { - "description": "If `true`, emit tokens in both bigram and unigram form. If `false`, a CJK character is output in unigram form when it has no adjacent characters. Defaults to `false`.", - "type": "boolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" } + }, + "required": [ + "type" ] }, - "_types.analysis.CjkBigramIgnoredScript": { - "type": "string", - "enum": [ - "han", - "hangul", - "hiragana", - "katakana" + "_types.analysis.DutchAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dutch" + ] + }, + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" ] }, - "_types.analysis.CjkWidthTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.EnglishAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "english" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "cjk_width" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.ClassicTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.EstonianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "estonian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "classic" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" } + }, + "required": [ + "type" ] }, - "_types.analysis.CommonGramsTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.FinnishAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "finnish" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "common_grams" - ] - }, - "common_words": { - "description": "A list of tokens. The filter generates bigrams for these tokens.\nEither this or the `common_words_path` parameter is required.", - "type": "array", - "items": { - "type": "string" - } - }, - "common_words_path": { - "description": "Path to a file containing a list of tokens. The filter generates bigrams for these tokens.\nThis path must be absolute or relative to the `config` location. The file must be UTF-8 encoded. Each token in the file must be separated by a line break.\nEither this or the `common_words` parameter is required.", - "type": "string" - }, - "ignore_case": { - "description": "If `true`, matches for common words matching are case-insensitive. Defaults to `false`.", - "type": "boolean" - }, - "query_mode": { - "description": "If `true`, the filter excludes the following tokens from the output:\n- Unigrams for common words\n- Unigrams for terms followed by common words\nDefaults to `false`. We recommend enabling this parameter for search analyzers.", - "type": "boolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.ConditionTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.FrenchAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "french" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "condition" - ] - }, - "filter": { - "description": "Array of token filters. If a token matches the predicate script in the `script` parameter, these filters are applied to the token in the order provided.", - "type": "array", - "items": { - "type": "string" - } - }, - "script": { - "$ref": "#/components/schemas/_types.Script" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type", - "filter", - "script" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.DecimalDigitTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.GalicianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "galician" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "decimal_digit" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.DelimitedPayloadTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.GermanAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "german" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "delimited_payload" - ] - }, - "delimiter": { - "description": "Character used to separate tokens from payloads. Defaults to `|`.", - "type": "string" - }, - "encoding": { - "$ref": "#/components/schemas/_types.analysis.DelimitedPayloadEncoding" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.DelimitedPayloadEncoding": { - "type": "string", - "enum": [ - "int", - "float", - "identity" - ] - }, - "_types.analysis.EdgeNGramTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.GreekAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "greek" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "edge_ngram" - ] - }, - "max_gram": { - "description": "Maximum character length of a gram. For custom token filters, defaults to `2`. For the built-in edge_ngram filter, defaults to `1`.", - "type": "number" - }, - "min_gram": { - "description": "Minimum character length of a gram. Defaults to `1`.", - "type": "number" - }, - "side": { - "$ref": "#/components/schemas/_types.analysis.EdgeNGramSide" - }, - "preserve_original": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" } + }, + "required": [ + "type" ] }, - "_types.analysis.EdgeNGramSide": { - "type": "string", - "enum": [ - "front", - "back" - ] - }, - "_types.analysis.ElisionTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.HindiAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "hindi" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "elision" - ] - }, - "articles": { - "description": "List of elisions to remove.\nTo be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed.\nFor custom `elision` filters, either this parameter or `articles_path` must be specified.", - "type": "array", - "items": { - "type": "string" - } - }, - "articles_path": { - "description": "Path to a file that contains a list of elisions to remove.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each elision in the file must be separated by a line break.\nTo be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed.\nFor custom `elision` filters, either this parameter or `articles` must be specified.", - "type": "string" - }, - "articles_case": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.FingerprintTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.HungarianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "hungarian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "fingerprint" - ] - }, - "max_output_size": { - "description": "Maximum character length, including whitespace, of the output token. Defaults to `255`. Concatenated tokens longer than this will result in no token output.", - "type": "number" - }, - "separator": { - "description": "Character to use to concatenate the token stream input. Defaults to a space.", - "type": "string" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.FlattenGraphTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.IndonesianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "indonesian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "flatten_graph" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.GermanNormalizationTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.IrishAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "irish" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "german_normalization" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.HindiNormalizationTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.ItalianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "italian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "hindi_normalization" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.HunspellTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.LatvianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "latvian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "hunspell" - ] - }, - "dedup": { - "description": "If `true`, duplicate tokens are removed from the filter’s output. Defaults to `true`.", - "type": "boolean" - }, - "dictionary": { - "description": "One or more `.dic` files (e.g, `en_US.dic`, my_custom.dic) to use for the Hunspell dictionary.\nBy default, the `hunspell` filter uses all `.dic` files in the `<$ES_PATH_CONF>/hunspell/` directory specified using the `lang`, `language`, or `locale` parameter.", - "type": "string" - }, - "locale": { - "description": "Locale directory used to specify the `.aff` and `.dic` files for a Hunspell dictionary.", - "type": "string" - }, - "longest_only": { - "description": "If `true`, only the longest stemmed version of each token is included in the output. If `false`, all stemmed versions of the token are included. Defaults to `false`.", - "type": "boolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type", - "locale" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.HyphenationDecompounderTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.CompoundWordTokenFilterBase" + "_types.analysis.LithuanianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "lithuanian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "hyphenation_decompounder" - ] - }, - "hyphenation_patterns_path": { - "description": "Path to an Apache FOP (Formatting Objects Processor) XML hyphenation pattern file.\nThis path must be absolute or relative to the `config` location. Only FOP v1.2 compatible files are supported.", - "type": "string" - }, - "no_sub_matches": { - "description": "If `true`, do not match sub tokens in tokens that are in the word list. Defaults to `false`.", - "type": "boolean" - }, - "no_overlapping_matches": { - "description": "If `true`, do not allow overlapping tokens. Defaults to `false`.", - "type": "boolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type", - "hyphenation_patterns_path" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.CompoundWordTokenFilterBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.NorwegianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "norwegian" + ] }, - { - "type": "object", - "properties": { - "max_subword_size": { - "description": "Maximum subword character length. Longer subword tokens are excluded from the output. Defaults to `15`.", - "type": "number" - }, - "min_subword_size": { - "description": "Minimum subword character length. Shorter subword tokens are excluded from the output. Defaults to `2`.", - "type": "number" - }, - "min_word_size": { - "description": "Minimum word character length. Shorter word tokens are excluded from the output. Defaults to `5`.", - "type": "number" - }, - "only_longest_match": { - "description": "If `true`, only include the longest matching subword. Defaults to `false`.", - "type": "boolean" - }, - "word_list": { - "description": "A list of subwords to look for in the token stream. If found, the subword is included in the token output.\nEither this parameter or `word_list_path` must be specified.", - "type": "array", - "items": { - "type": "string" - } - }, - "word_list_path": { - "description": "Path to a file that contains a list of subwords to find in the token stream. If found, the subword is included in the token output.\nThis path must be absolute or relative to the config location, and the file must be UTF-8 encoded. Each token in the file must be separated by a line break.\nEither this parameter or `word_list` must be specified.", - "type": "string" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } + ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" } } + }, + "required": [ + "type" ] }, - "_types.analysis.IndicNormalizationTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.PersianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "persian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "indic_normalization" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" } + }, + "required": [ + "type" ] }, - "_types.analysis.KeepTypesTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.PortugueseAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "portuguese" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "keep_types" - ] - }, - "mode": { - "$ref": "#/components/schemas/_types.analysis.KeepTypesMode" - }, - "types": { - "description": "List of token types to keep or remove.", - "type": "array", - "items": { - "type": "string" - } + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type", - "types" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.KeepTypesMode": { - "type": "string", - "enum": [ - "include", - "exclude" - ] - }, - "_types.analysis.KeepWordsTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.RomanianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "romanian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "keep" - ] - }, - "keep_words": { - "description": "List of words to keep. Only tokens that match words in this list are included in the output.\nEither this parameter or `keep_words_path` must be specified.", - "type": "array", - "items": { - "type": "string" - } - }, - "keep_words_case": { - "description": "If `true`, lowercase all keep words. Defaults to `false`.", - "type": "boolean" - }, - "keep_words_path": { - "description": "Path to a file that contains a list of words to keep. Only tokens that match words in this list are included in the output.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each word in the file must be separated by a line break.\nEither this parameter or `keep_words` must be specified.", - "type": "string" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.KeywordMarkerTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.RussianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "russian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "keyword_marker" - ] - }, - "ignore_case": { - "description": "If `true`, matching for the `keywords` and `keywords_path` parameters ignores letter case. Defaults to `false`.", - "type": "boolean" - }, - "keywords": { - "description": "Array of keywords. Tokens that match these keywords are not stemmed.\nThis parameter, `keywords_path`, or `keywords_pattern` must be specified. You cannot specify this parameter and `keywords_pattern`.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "keywords_path": { - "description": "Path to a file that contains a list of keywords. Tokens that match these keywords are not stemmed.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each word in the file must be separated by a line break.\nThis parameter, `keywords`, or `keywords_pattern` must be specified. You cannot specify this parameter and `keywords_pattern`.", - "type": "string" - }, - "keywords_pattern": { - "description": "Java regular expression used to match tokens. Tokens that match this expression are marked as keywords and not stemmed.\nThis parameter, `keywords`, or `keywords_path` must be specified. You cannot specify this parameter and `keywords` or `keywords_pattern`.", - "type": "string" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.KeywordRepeatTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.SerbianAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "serbian" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "keyword_repeat" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.KStemTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.SoraniAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "sorani" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "kstem" - ] + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.LengthTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.SpanishAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "spanish" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "length" - ] - }, - "max": { - "description": "Maximum character length of a token. Longer tokens are excluded from the output. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`.", - "type": "number" - }, - "min": { - "description": "Minimum character length of a token. Shorter tokens are excluded from the output. Defaults to `0`.", - "type": "number" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.LimitTokenCountTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.SwedishAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "swedish" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "limit" - ] - }, - "consume_all_tokens": { - "description": "If `true`, the limit filter exhausts the token stream, even if the `max_token_count` has already been reached. Defaults to `false`.", - "type": "boolean" - }, - "max_token_count": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.LowercaseTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.TurkishAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "turkish" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "lowercase" - ] - }, - "language": { - "$ref": "#/components/schemas/_types.analysis.LowercaseTokenFilterLanguages" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" + }, + "stem_exclusion": { + "type": "array", + "items": { + "type": "string" + } } + }, + "required": [ + "type" ] }, - "_types.analysis.LowercaseTokenFilterLanguages": { - "type": "string", - "enum": [ - "greek", - "irish", - "turkish" - ] - }, - "_types.analysis.MinHashTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "_types.analysis.ThaiAnalyzer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "thai" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "min_hash" - ] - }, - "bucket_count": { - "description": "Number of buckets to which hashes are assigned. Defaults to `512`.", - "type": "number" - }, - "hash_count": { - "description": "Number of ways to hash each token in the stream. Defaults to `1`.", - "type": "number" - }, - "hash_set_size": { - "description": "Number of hashes to keep from each bucket. Defaults to `1`.\nHashes are retained by ascending size, starting with the bucket’s smallest hash first.", - "type": "number" - }, - "with_rotation": { - "description": "If `true`, the filter fills empty buckets with the value of the first non-empty bucket to its circular right if the `hash_set_size` is `1`. If the `bucket_count` argument is greater than 1, this parameter defaults to `true`. Otherwise, this parameter defaults to `false`.", - "type": "boolean" + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" } - }, - "required": [ - "type" ] + }, + "stopwords_path": { + "type": "string" } + }, + "required": [ + "type" ] }, - "_types.analysis.MultiplexerTokenFilter": { - "allOf": [ + "_types.analysis.CharFilter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/text-analysis/character-filter-reference" + }, + "oneOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "type": "string" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "multiplexer" - ] - }, - "filters": { - "description": "A list of token filters to apply to incoming tokens.", - "type": "array", - "items": { - "type": "string" - } - }, - "preserve_original": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" - } - }, - "required": [ - "type", - "filters" - ] + "$ref": "#/components/schemas/_types.analysis.CharFilterDefinition" } ] }, - "_types.analysis.NGramTokenFilter": { - "allOf": [ + "_types.analysis.CharFilterDefinition": { + "discriminator": { + "propertyName": "type", + "mapping": { + "html_strip": "#/components/schemas/_types.analysis.HtmlStripCharFilter", + "icu_normalizer": "#/components/schemas/_types.analysis.IcuNormalizationCharFilter", + "kuromoji_iteration_mark": "#/components/schemas/_types.analysis.KuromojiIterationMarkCharFilter", + "mapping": "#/components/schemas/_types.analysis.MappingCharFilter", + "pattern_replace": "#/components/schemas/_types.analysis.PatternReplaceCharFilter" + } + }, + "oneOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.HtmlStripCharFilter" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "ngram" - ] - }, - "max_gram": { - "description": "Maximum length of characters in a gram. Defaults to `2`.", - "type": "number" - }, - "min_gram": { - "description": "Minimum length of characters in a gram. Defaults to `1`.", - "type": "number" - }, - "preserve_original": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" - } - }, - "required": [ - "type" - ] + "$ref": "#/components/schemas/_types.analysis.MappingCharFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.PatternReplaceCharFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.IcuNormalizationCharFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KuromojiIterationMarkCharFilter" } ] }, - "_types.analysis.NoriPartOfSpeechTokenFilter": { + "_types.analysis.HtmlStripCharFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.CharFilterBase" }, { "type": "object", @@ -66549,11 +128767,10 @@ "type": { "type": "string", "enum": [ - "nori_part_of_speech" + "html_strip" ] }, - "stoptags": { - "description": "An array of part-of-speech tags that should be removed.", + "escaped_tags": { "type": "array", "items": { "type": "string" @@ -66566,10 +128783,22 @@ } ] }, - "_types.analysis.PatternCaptureTokenFilter": { + "_types.analysis.CharFilterBase": { + "type": "object", + "properties": { + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + } + } + }, + "_types.analysis.MappingCharFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.CharFilterBase" }, { "type": "object", @@ -66577,31 +128806,29 @@ "type": { "type": "string", "enum": [ - "pattern_capture" + "mapping" ] }, - "patterns": { - "description": "A list of regular expressions to match.", + "mappings": { "type": "array", "items": { "type": "string" } }, - "preserve_original": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + "mappings_path": { + "type": "string" } }, "required": [ - "type", - "patterns" + "type" ] } ] }, - "_types.analysis.PatternReplaceTokenFilter": { + "_types.analysis.PatternReplaceCharFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.CharFilterBase" }, { "type": "object", @@ -66612,16 +128839,13 @@ "pattern_replace" ] }, - "all": { - "description": "If `true`, all substrings matching the pattern parameter’s regular expression are replaced. If `false`, the filter replaces only the first matching substring in each token. Defaults to `true`.", - "type": "boolean" + "flags": { + "type": "string" }, "pattern": { - "description": "Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter.", "type": "string" }, "replacement": { - "description": "Replacement substring. Defaults to an empty substring (`\"\"`).", "type": "string" } }, @@ -66632,10 +128856,10 @@ } ] }, - "_types.analysis.PersianNormalizationTokenFilter": { + "_types.analysis.IcuNormalizationCharFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.CharFilterBase" }, { "type": "object", @@ -66643,29 +128867,25 @@ "type": { "type": "string", "enum": [ - "persian_normalization" + "icu_normalizer" ] - } - }, - "required": [ - "type" - ] - } - ] - }, - "_types.analysis.PorterStemTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "porter_stem" + }, + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuNormalizationMode" + } + ] + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType" + } ] + }, + "unicode_set_filter": { + "type": "string" } }, "required": [ @@ -66674,10 +128894,10 @@ } ] }, - "_types.analysis.PredicateTokenFilter": { + "_types.analysis.KuromojiIterationMarkCharFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.CharFilterBase" }, { "type": "object", @@ -66685,169 +128905,343 @@ "type": { "type": "string", "enum": [ - "predicate_token_filter" + "kuromoji_iteration_mark" ] }, - "script": { - "$ref": "#/components/schemas/_types.Script" + "normalize_kana": { + "type": "boolean" + }, + "normalize_kanji": { + "type": "boolean" } }, "required": [ "type", - "script" + "normalize_kana", + "normalize_kanji" ] } ] }, - "_types.analysis.RemoveDuplicatesTokenFilter": { - "allOf": [ + "_types.analysis.TokenFilter": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/text-analysis/token-filter-reference" + }, + "oneOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "type": "string" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "remove_duplicates" - ] - } - }, - "required": [ - "type" - ] + "$ref": "#/components/schemas/_types.analysis.TokenFilterDefinition" } ] }, - "_types.analysis.ReverseTokenFilter": { - "allOf": [ + "_types.analysis.TokenFilterDefinition": { + "discriminator": { + "propertyName": "type", + "mapping": { + "apostrophe": "#/components/schemas/_types.analysis.ApostropheTokenFilter", + "arabic_normalization": "#/components/schemas/_types.analysis.ArabicNormalizationTokenFilter", + "arabic_stem": "#/components/schemas/_types.analysis.ArabicStemTokenFilter", + "asciifolding": "#/components/schemas/_types.analysis.AsciiFoldingTokenFilter", + "bengali_normalization": "#/components/schemas/_types.analysis.BengaliNormalizationTokenFilter", + "brazilian_stem": "#/components/schemas/_types.analysis.BrazilianStemTokenFilter", + "cjk_bigram": "#/components/schemas/_types.analysis.CjkBigramTokenFilter", + "cjk_width": "#/components/schemas/_types.analysis.CjkWidthTokenFilter", + "classic": "#/components/schemas/_types.analysis.ClassicTokenFilter", + "common_grams": "#/components/schemas/_types.analysis.CommonGramsTokenFilter", + "condition": "#/components/schemas/_types.analysis.ConditionTokenFilter", + "czech_stem": "#/components/schemas/_types.analysis.CzechStemTokenFilter", + "decimal_digit": "#/components/schemas/_types.analysis.DecimalDigitTokenFilter", + "delimited_payload": "#/components/schemas/_types.analysis.DelimitedPayloadTokenFilter", + "dictionary_decompounder": "#/components/schemas/_types.analysis.DictionaryDecompounderTokenFilter", + "dutch_stem": "#/components/schemas/_types.analysis.DutchStemTokenFilter", + "edge_ngram": "#/components/schemas/_types.analysis.EdgeNGramTokenFilter", + "elision": "#/components/schemas/_types.analysis.ElisionTokenFilter", + "fingerprint": "#/components/schemas/_types.analysis.FingerprintTokenFilter", + "flatten_graph": "#/components/schemas/_types.analysis.FlattenGraphTokenFilter", + "french_stem": "#/components/schemas/_types.analysis.FrenchStemTokenFilter", + "german_normalization": "#/components/schemas/_types.analysis.GermanNormalizationTokenFilter", + "german_stem": "#/components/schemas/_types.analysis.GermanStemTokenFilter", + "hindi_normalization": "#/components/schemas/_types.analysis.HindiNormalizationTokenFilter", + "hunspell": "#/components/schemas/_types.analysis.HunspellTokenFilter", + "hyphenation_decompounder": "#/components/schemas/_types.analysis.HyphenationDecompounderTokenFilter", + "icu_collation": "#/components/schemas/_types.analysis.IcuCollationTokenFilter", + "icu_folding": "#/components/schemas/_types.analysis.IcuFoldingTokenFilter", + "icu_normalizer": "#/components/schemas/_types.analysis.IcuNormalizationTokenFilter", + "icu_transform": "#/components/schemas/_types.analysis.IcuTransformTokenFilter", + "indic_normalization": "#/components/schemas/_types.analysis.IndicNormalizationTokenFilter", + "ja_stop": "#/components/schemas/_types.analysis.JaStopTokenFilter", + "keep": "#/components/schemas/_types.analysis.KeepWordsTokenFilter", + "keep_types": "#/components/schemas/_types.analysis.KeepTypesTokenFilter", + "keyword_marker": "#/components/schemas/_types.analysis.KeywordMarkerTokenFilter", + "keyword_repeat": "#/components/schemas/_types.analysis.KeywordRepeatTokenFilter", + "kstem": "#/components/schemas/_types.analysis.KStemTokenFilter", + "kuromoji_part_of_speech": "#/components/schemas/_types.analysis.KuromojiPartOfSpeechTokenFilter", + "kuromoji_readingform": "#/components/schemas/_types.analysis.KuromojiReadingFormTokenFilter", + "kuromoji_stemmer": "#/components/schemas/_types.analysis.KuromojiStemmerTokenFilter", + "length": "#/components/schemas/_types.analysis.LengthTokenFilter", + "limit": "#/components/schemas/_types.analysis.LimitTokenCountTokenFilter", + "lowercase": "#/components/schemas/_types.analysis.LowercaseTokenFilter", + "min_hash": "#/components/schemas/_types.analysis.MinHashTokenFilter", + "multiplexer": "#/components/schemas/_types.analysis.MultiplexerTokenFilter", + "ngram": "#/components/schemas/_types.analysis.NGramTokenFilter", + "nori_part_of_speech": "#/components/schemas/_types.analysis.NoriPartOfSpeechTokenFilter", + "pattern_capture": "#/components/schemas/_types.analysis.PatternCaptureTokenFilter", + "pattern_replace": "#/components/schemas/_types.analysis.PatternReplaceTokenFilter", + "persian_normalization": "#/components/schemas/_types.analysis.PersianNormalizationTokenFilter", + "persian_stem": "#/components/schemas/_types.analysis.PersianStemTokenFilter", + "phonetic": "#/components/schemas/_types.analysis.PhoneticTokenFilter", + "porter_stem": "#/components/schemas/_types.analysis.PorterStemTokenFilter", + "predicate_token_filter": "#/components/schemas/_types.analysis.PredicateTokenFilter", + "remove_duplicates": "#/components/schemas/_types.analysis.RemoveDuplicatesTokenFilter", + "reverse": "#/components/schemas/_types.analysis.ReverseTokenFilter", + "russian_stem": "#/components/schemas/_types.analysis.RussianStemTokenFilter", + "scandinavian_folding": "#/components/schemas/_types.analysis.ScandinavianFoldingTokenFilter", + "scandinavian_normalization": "#/components/schemas/_types.analysis.ScandinavianNormalizationTokenFilter", + "serbian_normalization": "#/components/schemas/_types.analysis.SerbianNormalizationTokenFilter", + "shingle": "#/components/schemas/_types.analysis.ShingleTokenFilter", + "snowball": "#/components/schemas/_types.analysis.SnowballTokenFilter", + "sorani_normalization": "#/components/schemas/_types.analysis.SoraniNormalizationTokenFilter", + "stemmer": "#/components/schemas/_types.analysis.StemmerTokenFilter", + "stemmer_override": "#/components/schemas/_types.analysis.StemmerOverrideTokenFilter", + "stop": "#/components/schemas/_types.analysis.StopTokenFilter", + "synonym": "#/components/schemas/_types.analysis.SynonymTokenFilter", + "synonym_graph": "#/components/schemas/_types.analysis.SynonymGraphTokenFilter", + "trim": "#/components/schemas/_types.analysis.TrimTokenFilter", + "truncate": "#/components/schemas/_types.analysis.TruncateTokenFilter", + "unique": "#/components/schemas/_types.analysis.UniqueTokenFilter", + "uppercase": "#/components/schemas/_types.analysis.UppercaseTokenFilter", + "word_delimiter": "#/components/schemas/_types.analysis.WordDelimiterTokenFilter", + "word_delimiter_graph": "#/components/schemas/_types.analysis.WordDelimiterGraphTokenFilter" + } + }, + "oneOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.ApostropheTokenFilter" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "reverse" - ] - } - }, - "required": [ - "type" - ] - } - ] - }, - "_types.analysis.ScandinavianFoldingTokenFilter": { - "allOf": [ + "$ref": "#/components/schemas/_types.analysis.ArabicStemTokenFilter" + }, { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.ArabicNormalizationTokenFilter" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "scandinavian_folding" - ] - } - }, - "required": [ - "type" - ] - } - ] - }, - "_types.analysis.ScandinavianNormalizationTokenFilter": { - "allOf": [ + "$ref": "#/components/schemas/_types.analysis.AsciiFoldingTokenFilter" + }, { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.BengaliNormalizationTokenFilter" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "scandinavian_normalization" - ] - } - }, - "required": [ - "type" - ] - } - ] - }, - "_types.analysis.SerbianNormalizationTokenFilter": { - "allOf": [ + "$ref": "#/components/schemas/_types.analysis.BrazilianStemTokenFilter" + }, { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.CjkBigramTokenFilter" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "serbian_normalization" - ] - } - }, - "required": [ - "type" - ] - } - ] - }, - "_types.analysis.ShingleTokenFilter": { - "allOf": [ + "$ref": "#/components/schemas/_types.analysis.CjkWidthTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.ClassicTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.CommonGramsTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.ConditionTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.CzechStemTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.DecimalDigitTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.DelimitedPayloadTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.DutchStemTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.EdgeNGramTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.ElisionTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.FingerprintTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.FlattenGraphTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.FrenchStemTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.GermanNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.GermanStemTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.HindiNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.HunspellTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.HyphenationDecompounderTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.IndicNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KeepTypesTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KeepWordsTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KeywordMarkerTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KeywordRepeatTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KStemTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.LengthTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.LimitTokenCountTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.LowercaseTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.MinHashTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.MultiplexerTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.NGramTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.NoriPartOfSpeechTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.PatternCaptureTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.PatternReplaceTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.PersianNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.PersianStemTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.PorterStemTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.PredicateTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.RemoveDuplicatesTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.ReverseTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.RussianStemTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.ScandinavianFoldingTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.ScandinavianNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.SerbianNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.ShingleTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.SnowballTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.SoraniNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.StemmerOverrideTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.StemmerTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.StopTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.SynonymGraphTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.SynonymTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.TrimTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.TruncateTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.UniqueTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.UppercaseTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.WordDelimiterGraphTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.WordDelimiterTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.JaStopTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KuromojiStemmerTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KuromojiReadingFormTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.KuromojiPartOfSpeechTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.IcuFoldingTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.IcuNormalizationTokenFilter" + }, { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.IcuTransformTokenFilter" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "shingle" - ] - }, - "filler_token": { - "description": "String used in shingles as a replacement for empty positions that do not contain a token. This filler token is only used in shingles, not original unigrams. Defaults to an underscore (`_`).", - "type": "string" - }, - "max_shingle_size": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" - }, - "min_shingle_size": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" - }, - "output_unigrams": { - "description": "If `true`, the output includes the original input tokens. If `false`, the output only includes shingles; the original input tokens are removed. Defaults to `true`.", - "type": "boolean" - }, - "output_unigrams_if_no_shingles": { - "description": "If `true`, the output includes the original input tokens only if no shingles are produced; if shingles are produced, the output only includes shingles. Defaults to `false`.", - "type": "boolean" - }, - "token_separator": { - "description": "Separator used to concatenate adjacent tokens to form a shingle. Defaults to a space (`\" \"`).", - "type": "string" - } - }, - "required": [ - "type" - ] + "$ref": "#/components/schemas/_types.analysis.PhoneticTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.DictionaryDecompounderTokenFilter" } ] }, - "_types.analysis.SnowballTokenFilter": { + "_types.analysis.ApostropheTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -66858,11 +129252,8 @@ "type": { "type": "string", "enum": [ - "snowball" + "apostrophe" ] - }, - "language": { - "$ref": "#/components/schemas/_types.analysis.SnowballLanguage" } }, "required": [ @@ -66871,28 +129262,19 @@ } ] }, - "_types.analysis.SoraniNormalizationTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "sorani_normalization" - ] + "_types.analysis.TokenFilterBase": { + "type": "object", + "properties": { + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" } - }, - "required": [ - "type" ] } - ] + } }, - "_types.analysis.StemmerOverrideTokenFilter": { + "_types.analysis.ArabicStemTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -66903,19 +129285,8 @@ "type": { "type": "string", "enum": [ - "stemmer_override" + "arabic_stem" ] - }, - "rules": { - "description": "A list of mapping rules to use.", - "type": "array", - "items": { - "type": "string" - } - }, - "rules_path": { - "description": "A path (either relative to `config` location, or absolute) to a list of mappings.", - "type": "string" } }, "required": [ @@ -66924,7 +129295,7 @@ } ] }, - "_types.analysis.StemmerTokenFilter": { + "_types.analysis.ArabicNormalizationTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -66935,11 +129306,8 @@ "type": { "type": "string", "enum": [ - "stemmer" + "arabic_normalization" ] - }, - "language": { - "type": "string" } }, "required": [ @@ -66948,7 +129316,7 @@ } ] }, - "_types.analysis.StopTokenFilter": { + "_types.analysis.AsciiFoldingTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -66959,43 +129327,15 @@ "type": { "type": "string", "enum": [ - "stop" + "asciifolding" ] }, - "ignore_case": { - "description": "If `true`, stop word matching is case insensitive. For example, if `true`, a stop word of the matches and removes `The`, `THE`, or `the`. Defaults to `false`.", - "type": "boolean" - }, - "remove_trailing": { - "description": "If `true`, the last token of a stream is removed if it’s a stop word. Defaults to `true`.", - "type": "boolean" - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "stopwords_path": { - "description": "Path to a file that contains a list of stop words to remove.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each stop word in the file must be separated by a line break.", - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - }, - "_types.analysis.SynonymGraphTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.SynonymTokenFilterBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "synonym_graph" + "preserve_original": { + "description": "If `true`, emit both original tokens and folded tokens. Defaults to `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } ] } }, @@ -67005,72 +129345,18 @@ } ] }, - "_types.analysis.SynonymTokenFilterBase": { + "_types.analysis.BengaliNormalizationTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - { - "type": "object", - "properties": { - "expand": { - "description": "Expands definitions for equivalent synonym rules. Defaults to `true`.", - "type": "boolean" - }, - "format": { - "$ref": "#/components/schemas/_types.analysis.SynonymFormat" - }, - "lenient": { - "description": "If `true` ignores errors while parsing the synonym rules. It is important to note that only those synonym rules which cannot get parsed are ignored. Defaults to the value of the `updateable` setting.", - "type": "boolean" - }, - "synonyms": { - "description": "Used to define inline synonyms.", - "type": "array", - "items": { - "type": "string" - } - }, - "synonyms_path": { - "description": "Used to provide a synonym file. This path must be absolute or relative to the `config` location.", - "type": "string" - }, - "synonyms_set": { - "description": "Provide a synonym set created via Synonyms Management APIs.", - "type": "string" - }, - "tokenizer": { - "deprecated": true, - "description": "Controls the tokenizers that will be used to tokenize the synonym, this parameter is for backwards compatibility for indices that created before 6.0.", - "type": "string" - }, - "updateable": { - "description": "If `true` allows reloading search analyzers to pick up changes to synonym files. Only to be used for search analyzers. Defaults to `false`.", - "type": "boolean" - } - } - } - ] - }, - "_types.analysis.SynonymFormat": { - "type": "string", - "enum": [ - "solr", - "wordnet" - ] - }, - "_types.analysis.SynonymTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.SynonymTokenFilterBase" - }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "synonym" + "bengali_normalization" ] } }, @@ -67080,7 +129366,7 @@ } ] }, - "_types.analysis.TrimTokenFilter": { + "_types.analysis.BrazilianStemTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67091,7 +129377,7 @@ "type": { "type": "string", "enum": [ - "trim" + "brazilian_stem" ] } }, @@ -67101,7 +129387,7 @@ } ] }, - "_types.analysis.TruncateTokenFilter": { + "_types.analysis.CjkBigramTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67112,12 +129398,19 @@ "type": { "type": "string", "enum": [ - "truncate" + "cjk_bigram" ] }, - "length": { - "description": "Character limit for each token. Tokens exceeding this limit are truncated. Defaults to `10`.", - "type": "number" + "ignored_scripts": { + "description": "Array of character scripts for which to disable bigrams.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.CjkBigramIgnoredScript" + } + }, + "output_unigrams": { + "description": "If `true`, emit tokens in both bigram and unigram form. If `false`, a CJK character is output in unigram form when it has no adjacent characters. Defaults to `false`.", + "type": "boolean" } }, "required": [ @@ -67126,7 +129419,16 @@ } ] }, - "_types.analysis.UniqueTokenFilter": { + "_types.analysis.CjkBigramIgnoredScript": { + "type": "string", + "enum": [ + "han", + "hangul", + "hiragana", + "katakana" + ] + }, + "_types.analysis.CjkWidthTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67137,12 +129439,8 @@ "type": { "type": "string", "enum": [ - "unique" + "cjk_width" ] - }, - "only_on_same_position": { - "description": "If `true`, only remove duplicate tokens in the same position. Defaults to `false`.", - "type": "boolean" } }, "required": [ @@ -67151,7 +129449,7 @@ } ] }, - "_types.analysis.UppercaseTokenFilter": { + "_types.analysis.ClassicTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67162,7 +129460,7 @@ "type": { "type": "string", "enum": [ - "uppercase" + "classic" ] } }, @@ -67172,10 +129470,10 @@ } ] }, - "_types.analysis.WordDelimiterGraphTokenFilter": { + "_types.analysis.CommonGramsTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.WordDelimiterTokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -67183,15 +129481,26 @@ "type": { "type": "string", "enum": [ - "word_delimiter_graph" + "common_grams" ] }, - "adjust_offsets": { - "description": "If `true`, the filter adjusts the offsets of split or catenated tokens to better reflect their actual position in the token stream. Defaults to `true`.", + "common_words": { + "description": "A list of tokens. The filter generates bigrams for these tokens.\nEither this or the `common_words_path` parameter is required.", + "type": "array", + "items": { + "type": "string" + } + }, + "common_words_path": { + "description": "Path to a file containing a list of tokens. The filter generates bigrams for these tokens.\nThis path must be absolute or relative to the `config` location. The file must be UTF-8 encoded. Each token in the file must be separated by a line break.\nEither this or the `common_words` parameter is required.", + "type": "string" + }, + "ignore_case": { + "description": "If `true`, matches for common words matching are case-insensitive. Defaults to `false`.", "type": "boolean" }, - "ignore_keywords": { - "description": "If `true`, the filter skips tokens with a keyword attribute of true. Defaults to `false`.", + "query_mode": { + "description": "If `true`, the filter excludes the following tokens from the output:\n- Unigrams for common words\n- Unigrams for terms followed by common words\nDefaults to `false`. We recommend enabling this parameter for search analyzers.", "type": "boolean" } }, @@ -67201,7 +129510,7 @@ } ] }, - "_types.analysis.WordDelimiterTokenFilterBase": { + "_types.analysis.ConditionTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67209,89 +129518,37 @@ { "type": "object", "properties": { - "catenate_all": { - "description": "If `true`, the filter produces catenated tokens for chains of alphanumeric characters separated by non-alphabetic delimiters. Defaults to `false`.", - "type": "boolean" - }, - "catenate_numbers": { - "description": "If `true`, the filter produces catenated tokens for chains of numeric characters separated by non-alphabetic delimiters. Defaults to `false`.", - "type": "boolean" - }, - "catenate_words": { - "description": "If `true`, the filter produces catenated tokens for chains of alphabetical characters separated by non-alphabetic delimiters. Defaults to `false`.", - "type": "boolean" - }, - "generate_number_parts": { - "description": "If `true`, the filter includes tokens consisting of only numeric characters in the output. If `false`, the filter excludes these tokens from the output. Defaults to `true`.", - "type": "boolean" - }, - "generate_word_parts": { - "description": "If `true`, the filter includes tokens consisting of only alphabetical characters in the output. If `false`, the filter excludes these tokens from the output. Defaults to `true`.", - "type": "boolean" - }, - "preserve_original": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" - }, - "protected_words": { - "description": "Array of tokens the filter won’t split.", - "type": "array", - "items": { - "type": "string" - } - }, - "protected_words_path": { - "description": "Path to a file that contains a list of tokens the filter won’t split.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each token in the file must be separated by a line break.", - "type": "string" - }, - "split_on_case_change": { - "description": "If `true`, the filter splits tokens at letter case transitions. For example: camelCase -> [ camel, Case ]. Defaults to `true`.", - "type": "boolean" - }, - "split_on_numerics": { - "description": "If `true`, the filter splits tokens at letter-number transitions. For example: j2se -> [ j, 2, se ]. Defaults to `true`.", - "type": "boolean" - }, - "stem_english_possessive": { - "description": "If `true`, the filter removes the English possessive (`'s`) from the end of each token. For example: O'Neil's -> [ O, Neil ]. Defaults to `true`.", - "type": "boolean" + "type": { + "type": "string", + "enum": [ + "condition" + ] }, - "type_table": { - "description": "Array of custom type mappings for characters. This allows you to map non-alphanumeric characters as numeric or alphanumeric to avoid splitting on those characters.", + "filter": { + "description": "Array of token filters. If a token matches the predicate script in the `script` parameter, these filters are applied to the token in the order provided.", "type": "array", "items": { "type": "string" } }, - "type_table_path": { - "description": "Path to a file that contains custom type mappings for characters. This allows you to map non-alphanumeric characters as numeric or alphanumeric to avoid splitting on those characters.", - "type": "string" - } - } - } - ] - }, - "_types.analysis.WordDelimiterTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.WordDelimiterTokenFilterBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "word_delimiter" + "script": { + "description": "Predicate script used to apply token filters. If a token matches this script, the filters in the `filter` parameter are applied to the token.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } ] } }, "required": [ - "type" + "type", + "filter", + "script" ] } ] }, - "_types.analysis.JaStopTokenFilter": { + "_types.analysis.CzechStemTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67302,11 +129559,8 @@ "type": { "type": "string", "enum": [ - "ja_stop" + "czech_stem" ] - }, - "stopwords": { - "$ref": "#/components/schemas/_types.analysis.StopWords" } }, "required": [ @@ -67315,7 +129569,7 @@ } ] }, - "_types.analysis.KuromojiStemmerTokenFilter": { + "_types.analysis.DecimalDigitTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67326,21 +129580,17 @@ "type": { "type": "string", "enum": [ - "kuromoji_stemmer" + "decimal_digit" ] - }, - "minimum_length": { - "type": "number" } }, "required": [ - "type", - "minimum_length" + "type" ] } ] }, - "_types.analysis.KuromojiReadingFormTokenFilter": { + "_types.analysis.DelimitedPayloadTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67351,21 +129601,37 @@ "type": { "type": "string", "enum": [ - "kuromoji_readingform" + "delimited_payload" ] }, - "use_romaji": { - "type": "boolean" + "delimiter": { + "description": "Character used to separate tokens from payloads. Defaults to `|`.", + "type": "string" + }, + "encoding": { + "description": "Data type for the stored payload.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.DelimitedPayloadEncoding" + } + ] } }, "required": [ - "type", - "use_romaji" + "type" ] } ] }, - "_types.analysis.KuromojiPartOfSpeechTokenFilter": { + "_types.analysis.DelimitedPayloadEncoding": { + "type": "string", + "enum": [ + "int", + "float", + "identity" + ] + }, + "_types.analysis.DutchStemTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67376,24 +129642,17 @@ "type": { "type": "string", "enum": [ - "kuromoji_part_of_speech" + "dutch_stem" ] - }, - "stoptags": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ - "type", - "stoptags" + "type" ] } ] }, - "_types.analysis.IcuCollationTokenFilter": { + "_types.analysis.EdgeNGramTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67404,44 +129663,32 @@ "type": { "type": "string", "enum": [ - "icu_collation" + "edge_ngram" ] }, - "alternate": { - "$ref": "#/components/schemas/_types.analysis.IcuCollationAlternate" - }, - "case_first": { - "$ref": "#/components/schemas/_types.analysis.IcuCollationCaseFirst" - }, - "case_level": { - "type": "boolean" - }, - "country": { - "type": "string" - }, - "decomposition": { - "$ref": "#/components/schemas/_types.analysis.IcuCollationDecomposition" - }, - "hiragana_quaternary_mode": { - "type": "boolean" - }, - "language": { - "type": "string" - }, - "numeric": { - "type": "boolean" - }, - "rules": { - "type": "string" + "max_gram": { + "description": "Maximum character length of a gram. For custom token filters, defaults to `2`. For the built-in edge_ngram filter, defaults to `1`.", + "type": "number" }, - "strength": { - "$ref": "#/components/schemas/_types.analysis.IcuCollationStrength" + "min_gram": { + "description": "Minimum character length of a gram. Defaults to `1`.", + "type": "number" }, - "variable_top": { - "type": "string" + "side": { + "description": "Indicates whether to truncate tokens from the `front` or `back`. Defaults to `front`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.EdgeNGramSide" + } + ] }, - "variant": { - "type": "string" + "preserve_original": { + "description": "Emits original token when set to `true`. Defaults to `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] } }, "required": [ @@ -67450,38 +129697,14 @@ } ] }, - "_types.analysis.IcuCollationAlternate": { - "type": "string", - "enum": [ - "shifted", - "non-ignorable" - ] - }, - "_types.analysis.IcuCollationCaseFirst": { - "type": "string", - "enum": [ - "lower", - "upper" - ] - }, - "_types.analysis.IcuCollationDecomposition": { - "type": "string", - "enum": [ - "no", - "identical" - ] - }, - "_types.analysis.IcuCollationStrength": { + "_types.analysis.EdgeNGramSide": { "type": "string", "enum": [ - "primary", - "secondary", - "tertiary", - "quaternary", - "identical" + "front", + "back" ] }, - "_types.analysis.IcuFoldingTokenFilter": { + "_types.analysis.ElisionTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67492,46 +129715,36 @@ "type": { "type": "string", "enum": [ - "icu_folding" + "elision" ] }, - "unicode_set_filter": { + "articles": { + "description": "List of elisions to remove.\nTo be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed.\nFor custom `elision` filters, either this parameter or `articles_path` must be specified.", + "type": "array", + "items": { + "type": "string" + } + }, + "articles_path": { + "description": "Path to a file that contains a list of elisions to remove.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each elision in the file must be separated by a line break.\nTo be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed.\nFor custom `elision` filters, either this parameter or `articles` must be specified.", "type": "string" - } - }, - "required": [ - "type", - "unicode_set_filter" - ] - } - ] - }, - "_types.analysis.IcuNormalizationTokenFilter": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "icu_normalizer" - ] }, - "name": { - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType" + "articles_case": { + "description": "If `true`, elision matching is case insensitive. If `false`, elision matching is case sensitive. Defaults to `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] } }, "required": [ - "type", - "name" + "type" ] } ] }, - "_types.analysis.IcuTransformTokenFilter": { + "_types.analysis.FingerprintTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67542,31 +129755,25 @@ "type": { "type": "string", "enum": [ - "icu_transform" + "fingerprint" ] }, - "dir": { - "$ref": "#/components/schemas/_types.analysis.IcuTransformDirection" + "max_output_size": { + "description": "Maximum character length, including whitespace, of the output token. Defaults to `255`. Concatenated tokens longer than this will result in no token output.", + "type": "number" }, - "id": { + "separator": { + "description": "Character to use to concatenate the token stream input. Defaults to a space.", "type": "string" } }, "required": [ - "type", - "id" + "type" ] } ] }, - "_types.analysis.IcuTransformDirection": { - "type": "string", - "enum": [ - "forward", - "reverse" - ] - }, - "_types.analysis.PhoneticTokenFilter": { + "_types.analysis.FlattenGraphTokenFilter": { "allOf": [ { "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" @@ -67577,99 +129784,20 @@ "type": { "type": "string", "enum": [ - "phonetic" - ] - }, - "encoder": { - "$ref": "#/components/schemas/_types.analysis.PhoneticEncoder" - }, - "languageset": { - "description": "\n\nSupported values include: `any`, `common`, `cyrillic`, `english`, `french`, `german`, `hebrew`, `hungarian`, `polish`, `romanian`, `russian`, `spanish`\n\n", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.analysis.PhoneticLanguage" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.PhoneticLanguage" - } - } + "flatten_graph" ] - }, - "max_code_len": { - "type": "number" - }, - "name_type": { - "$ref": "#/components/schemas/_types.analysis.PhoneticNameType" - }, - "replace": { - "type": "boolean" - }, - "rule_type": { - "$ref": "#/components/schemas/_types.analysis.PhoneticRuleType" } }, "required": [ - "type", - "encoder" + "type" ] } ] }, - "_types.analysis.PhoneticEncoder": { - "type": "string", - "enum": [ - "metaphone", - "double_metaphone", - "soundex", - "refined_soundex", - "caverphone1", - "caverphone2", - "cologne", - "nysiis", - "koelnerphonetik", - "haasephonetik", - "beider_morse", - "daitch_mokotoff" - ] - }, - "_types.analysis.PhoneticLanguage": { - "type": "string", - "enum": [ - "any", - "common", - "cyrillic", - "english", - "french", - "german", - "hebrew", - "hungarian", - "polish", - "romanian", - "russian", - "spanish" - ] - }, - "_types.analysis.PhoneticNameType": { - "type": "string", - "enum": [ - "generic", - "ashkenazi", - "sephardic" - ] - }, - "_types.analysis.PhoneticRuleType": { - "type": "string", - "enum": [ - "approx", - "exact" - ] - }, - "_types.analysis.DictionaryDecompounderTokenFilter": { + "_types.analysis.FrenchStemTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.CompoundWordTokenFilterBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -67677,7 +129805,7 @@ "type": { "type": "string", "enum": [ - "dictionary_decompounder" + "french_stem" ] } }, @@ -67687,137 +129815,31 @@ } ] }, - "_types.analysis.Normalizer": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ + "_types.analysis.GermanNormalizationTokenFilter": { + "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.LowercaseNormalizer" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { - "$ref": "#/components/schemas/_types.analysis.CustomNormalizer" - } - ] - }, - "_types.analysis.LowercaseNormalizer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "lowercase" - ] - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.CustomNormalizer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "custom" + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "german_normalization" + ] + } + }, + "required": [ + "type" ] - }, - "char_filter": { - "type": "array", - "items": { - "type": "string" - } - }, - "filter": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "type" - ] - }, - "_types.analysis.Tokenizer": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/text-analysis/tokenizer-reference" - }, - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_types.analysis.TokenizerDefinition" - } - ] - }, - "_types.analysis.TokenizerDefinition": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/_types.analysis.CharGroupTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.ClassicTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.EdgeNGramTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.KeywordTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.LetterTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.LowercaseTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.NGramTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.PathHierarchyTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.PatternTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.SimplePatternTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.SimplePatternSplitTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.StandardTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.ThaiTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.UaxEmailUrlTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.WhitespaceTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.IcuTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.KuromojiTokenizer" - }, - { - "$ref": "#/components/schemas/_types.analysis.NoriTokenizer" } ] }, - "_types.analysis.CharGroupTokenizer": { + "_types.analysis.GermanStemTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -67825,38 +129847,20 @@ "type": { "type": "string", "enum": [ - "char_group" + "german_stem" ] - }, - "tokenize_on_chars": { - "type": "array", - "items": { - "type": "string" - } - }, - "max_token_length": { - "type": "number" } }, "required": [ - "type", - "tokenize_on_chars" + "type" ] } ] }, - "_types.analysis.TokenizerBase": { - "type": "object", - "properties": { - "version": { - "$ref": "#/components/schemas/_types.VersionString" - } - } - }, - "_types.analysis.ClassicTokenizer": { + "_types.analysis.HindiNormalizationTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -67864,11 +129868,8 @@ "type": { "type": "string", "enum": [ - "classic" + "hindi_normalization" ] - }, - "max_token_length": { - "type": "number" } }, "required": [ @@ -67877,10 +129878,10 @@ } ] }, - "_types.analysis.EdgeNGramTokenizer": { + "_types.analysis.HunspellTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -67888,46 +129889,37 @@ "type": { "type": "string", "enum": [ - "edge_ngram" + "hunspell" ] }, - "custom_token_chars": { - "type": "string" + "dedup": { + "description": "If `true`, duplicate tokens are removed from the filter’s output. Defaults to `true`.", + "type": "boolean" }, - "max_gram": { - "type": "number" + "dictionary": { + "description": "One or more `.dic` files (e.g, `en_US.dic`, my_custom.dic) to use for the Hunspell dictionary.\nBy default, the `hunspell` filter uses all `.dic` files in the `<$ES_PATH_CONF>/hunspell/` directory specified using the `lang`, `language`, or `locale` parameter.", + "type": "string" }, - "min_gram": { - "type": "number" + "locale": { + "description": "Locale directory used to specify the `.aff` and `.dic` files for a Hunspell dictionary.", + "type": "string" }, - "token_chars": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.TokenChar" - } + "longest_only": { + "description": "If `true`, only the longest stemmed version of each token is included in the output. If `false`, all stemmed versions of the token are included. Defaults to `false`.", + "type": "boolean" } }, "required": [ - "type" + "type", + "locale" ] } ] }, - "_types.analysis.TokenChar": { - "type": "string", - "enum": [ - "letter", - "digit", - "whitespace", - "punctuation", - "symbol", - "custom" - ] - }, - "_types.analysis.KeywordTokenizer": { + "_types.analysis.HyphenationDecompounderTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.CompoundWordTokenFilterBase" }, { "type": "object", @@ -67935,44 +129927,72 @@ "type": { "type": "string", "enum": [ - "keyword" + "hyphenation_decompounder" ] }, - "buffer_size": { - "type": "number" + "hyphenation_patterns_path": { + "description": "Path to an Apache FOP (Formatting Objects Processor) XML hyphenation pattern file.\nThis path must be absolute or relative to the `config` location. Only FOP v1.2 compatible files are supported.", + "type": "string" + }, + "no_sub_matches": { + "description": "If `true`, do not match sub tokens in tokens that are in the word list. Defaults to `false`.", + "type": "boolean" + }, + "no_overlapping_matches": { + "description": "If `true`, do not allow overlapping tokens. Defaults to `false`.", + "type": "boolean" } }, "required": [ - "type" + "type", + "hyphenation_patterns_path" ] } ] }, - "_types.analysis.LetterTokenizer": { + "_types.analysis.CompoundWordTokenFilterBase": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "letter" - ] + "max_subword_size": { + "description": "Maximum subword character length. Longer subword tokens are excluded from the output. Defaults to `15`.", + "type": "number" + }, + "min_subword_size": { + "description": "Minimum subword character length. Shorter subword tokens are excluded from the output. Defaults to `2`.", + "type": "number" + }, + "min_word_size": { + "description": "Minimum word character length. Shorter word tokens are excluded from the output. Defaults to `5`.", + "type": "number" + }, + "only_longest_match": { + "description": "If `true`, only include the longest matching subword. Defaults to `false`.", + "type": "boolean" + }, + "word_list": { + "description": "A list of subwords to look for in the token stream. If found, the subword is included in the token output.\nEither this parameter or `word_list_path` must be specified.", + "type": "array", + "items": { + "type": "string" + } + }, + "word_list_path": { + "description": "Path to a file that contains a list of subwords to find in the token stream. If found, the subword is included in the token output.\nThis path must be absolute or relative to the config location, and the file must be UTF-8 encoded. Each token in the file must be separated by a line break.\nEither this parameter or `word_list` must be specified.", + "type": "string" } - }, - "required": [ - "type" - ] + } } ] }, - "_types.analysis.LowercaseTokenizer": { + "_types.analysis.IndicNormalizationTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -67980,7 +130000,7 @@ "type": { "type": "string", "enum": [ - "lowercase" + "indic_normalization" ] } }, @@ -67990,10 +130010,10 @@ } ] }, - "_types.analysis.NGramTokenizer": { + "_types.analysis.KeepTypesTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68001,35 +130021,43 @@ "type": { "type": "string", "enum": [ - "ngram" + "keep_types" ] }, - "custom_token_chars": { - "type": "string" - }, - "max_gram": { - "type": "number" - }, - "min_gram": { - "type": "number" + "mode": { + "description": "Indicates whether to keep or remove the specified token types.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.KeepTypesMode" + } + ] }, - "token_chars": { + "types": { + "description": "List of token types to keep or remove.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.analysis.TokenChar" + "type": "string" } } }, "required": [ - "type" + "type", + "types" ] } ] }, - "_types.analysis.PathHierarchyTokenizer": { + "_types.analysis.KeepTypesMode": { + "type": "string", + "enum": [ + "include", + "exclude" + ] + }, + "_types.analysis.KeepWordsTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68037,23 +130065,23 @@ "type": { "type": "string", "enum": [ - "path_hierarchy" + "keep" ] }, - "buffer_size": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + "keep_words": { + "description": "List of words to keep. Only tokens that match words in this list are included in the output.\nEither this parameter or `keep_words_path` must be specified.", + "type": "array", + "items": { + "type": "string" + } }, - "delimiter": { - "type": "string" + "keep_words_case": { + "description": "If `true`, lowercase all keep words. Defaults to `false`.", + "type": "boolean" }, - "replacement": { + "keep_words_path": { + "description": "Path to a file that contains a list of words to keep. Only tokens that match words in this list are included in the output.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each word in the file must be separated by a line break.\nEither this parameter or `keep_words` must be specified.", "type": "string" - }, - "reverse": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" - }, - "skip": { - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" } }, "required": [ @@ -68062,10 +130090,10 @@ } ] }, - "_types.analysis.PatternTokenizer": { + "_types.analysis.KeywordMarkerTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68073,16 +130101,33 @@ "type": { "type": "string", "enum": [ - "pattern" + "keyword_marker" ] }, - "flags": { - "type": "string" + "ignore_case": { + "description": "If `true`, matching for the `keywords` and `keywords_path` parameters ignores letter case. Defaults to `false`.", + "type": "boolean" }, - "group": { - "type": "number" + "keywords": { + "description": "Array of keywords. Tokens that match these keywords are not stemmed.\nThis parameter, `keywords_path`, or `keywords_pattern` must be specified. You cannot specify this parameter and `keywords_pattern`.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "pattern": { + "keywords_path": { + "description": "Path to a file that contains a list of keywords. Tokens that match these keywords are not stemmed.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each word in the file must be separated by a line break.\nThis parameter, `keywords`, or `keywords_pattern` must be specified. You cannot specify this parameter and `keywords_pattern`.", + "type": "string" + }, + "keywords_pattern": { + "description": "Java regular expression used to match tokens. Tokens that match this expression are marked as keywords and not stemmed.\nThis parameter, `keywords`, or `keywords_path` must be specified. You cannot specify this parameter and `keywords` or `keywords_pattern`.", "type": "string" } }, @@ -68092,10 +130137,10 @@ } ] }, - "_types.analysis.SimplePatternTokenizer": { + "_types.analysis.KeywordRepeatTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68103,11 +130148,8 @@ "type": { "type": "string", "enum": [ - "simple_pattern" + "keyword_repeat" ] - }, - "pattern": { - "type": "string" } }, "required": [ @@ -68116,10 +130158,10 @@ } ] }, - "_types.analysis.SimplePatternSplitTokenizer": { + "_types.analysis.KStemTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68127,11 +130169,8 @@ "type": { "type": "string", "enum": [ - "simple_pattern_split" + "kstem" ] - }, - "pattern": { - "type": "string" } }, "required": [ @@ -68140,10 +130179,10 @@ } ] }, - "_types.analysis.StandardTokenizer": { + "_types.analysis.LengthTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68151,10 +130190,15 @@ "type": { "type": "string", "enum": [ - "standard" + "length" ] }, - "max_token_length": { + "max": { + "description": "Maximum character length of a token. Longer tokens are excluded from the output. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`.", + "type": "number" + }, + "min": { + "description": "Minimum character length of a token. Shorter tokens are excluded from the output. Defaults to `0`.", "type": "number" } }, @@ -68164,10 +130208,10 @@ } ] }, - "_types.analysis.ThaiTokenizer": { + "_types.analysis.LimitTokenCountTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68175,7 +130219,19 @@ "type": { "type": "string", "enum": [ - "thai" + "limit" + ] + }, + "consume_all_tokens": { + "description": "If `true`, the limit filter exhausts the token stream, even if the `max_token_count` has already been reached. Defaults to `false`.", + "type": "boolean" + }, + "max_token_count": { + "description": "Maximum number of tokens to keep. Once this limit is reached, any remaining tokens are excluded from the output. Defaults to `1`.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + } ] } }, @@ -68185,10 +130241,10 @@ } ] }, - "_types.analysis.UaxEmailUrlTokenizer": { + "_types.analysis.LowercaseTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68196,11 +130252,16 @@ "type": { "type": "string", "enum": [ - "uax_url_email" + "lowercase" ] }, - "max_token_length": { - "type": "number" + "language": { + "description": "Language-specific lowercase token filter to use.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.LowercaseTokenFilterLanguages" + } + ] } }, "required": [ @@ -68209,10 +130270,18 @@ } ] }, - "_types.analysis.WhitespaceTokenizer": { + "_types.analysis.LowercaseTokenFilterLanguages": { + "type": "string", + "enum": [ + "greek", + "irish", + "turkish" + ] + }, + "_types.analysis.MinHashTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68220,11 +130289,24 @@ "type": { "type": "string", "enum": [ - "whitespace" + "min_hash" ] }, - "max_token_length": { + "bucket_count": { + "description": "Number of buckets to which hashes are assigned. Defaults to `512`.", + "type": "number" + }, + "hash_count": { + "description": "Number of ways to hash each token in the stream. Defaults to `1`.", "type": "number" + }, + "hash_set_size": { + "description": "Number of hashes to keep from each bucket. Defaults to `1`.\nHashes are retained by ascending size, starting with the bucket’s smallest hash first.", + "type": "number" + }, + "with_rotation": { + "description": "If `true`, the filter fills empty buckets with the value of the first non-empty bucket to its circular right if the `hash_set_size` is `1`. If the `bucket_count` argument is greater than 1, this parameter defaults to `true`. Otherwise, this parameter defaults to `false`.", + "type": "boolean" } }, "required": [ @@ -68233,10 +130315,10 @@ } ] }, - "_types.analysis.IcuTokenizer": { + "_types.analysis.MultiplexerTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68244,24 +130326,36 @@ "type": { "type": "string", "enum": [ - "icu_tokenizer" + "multiplexer" ] }, - "rule_files": { - "type": "string" + "filters": { + "description": "A list of token filters to apply to incoming tokens.", + "type": "array", + "items": { + "type": "string" + } + }, + "preserve_original": { + "description": "If `true` (the default) then emit the original token in addition to the filtered tokens.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] } }, "required": [ "type", - "rule_files" + "filters" ] } ] }, - "_types.analysis.KuromojiTokenizer": { + "_types.analysis.NGramTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68269,45 +130363,36 @@ "type": { "type": "string", "enum": [ - "kuromoji_tokenizer" + "ngram" ] }, - "discard_punctuation": { - "type": "boolean" - }, - "mode": { - "$ref": "#/components/schemas/_types.analysis.KuromojiTokenizationMode" - }, - "nbest_cost": { + "max_gram": { + "description": "Maximum length of characters in a gram. Defaults to `2`.", "type": "number" }, - "nbest_examples": { - "type": "string" - }, - "user_dictionary": { - "type": "string" - }, - "user_dictionary_rules": { - "type": "array", - "items": { - "type": "string" - } + "min_gram": { + "description": "Minimum length of characters in a gram. Defaults to `1`.", + "type": "number" }, - "discard_compound_token": { - "type": "boolean" + "preserve_original": { + "description": "Emits original token when set to `true`. Defaults to `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] } }, "required": [ - "type", - "mode" + "type" ] } ] }, - "_types.analysis.NoriTokenizer": { + "_types.analysis.NoriPartOfSpeechTokenFilter": { "allOf": [ { - "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { "type": "object", @@ -68315,19 +130400,11 @@ "type": { "type": "string", "enum": [ - "nori_tokenizer" + "nori_part_of_speech" ] }, - "decompound_mode": { - "$ref": "#/components/schemas/_types.analysis.NoriDecompoundMode" - }, - "discard_punctuation": { - "type": "boolean" - }, - "user_dictionary": { - "type": "string" - }, - "user_dictionary_rules": { + "stoptags": { + "description": "An array of part-of-speech tags that should be removed.", "type": "array", "items": { "type": "string" @@ -68340,1714 +130417,1406 @@ } ] }, - "indices._types.IndexSettingsTimeSeries": { - "type": "object", - "properties": { - "end_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "start_time": { - "$ref": "#/components/schemas/_types.DateTime" - } - } - }, - "indices._types.Queries": { - "type": "object", - "properties": { - "cache": { - "$ref": "#/components/schemas/indices._types.CacheQueries" - } - } - }, - "indices._types.CacheQueries": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": [ - "enabled" - ] - }, - "indices._types.SettingsSimilarity": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/indices._types.SettingsSimilarityBm25" - }, - { - "$ref": "#/components/schemas/indices._types.SettingsSimilarityBoolean" - }, - { - "$ref": "#/components/schemas/indices._types.SettingsSimilarityDfi" - }, - { - "$ref": "#/components/schemas/indices._types.SettingsSimilarityDfr" - }, - { - "$ref": "#/components/schemas/indices._types.SettingsSimilarityIb" - }, - { - "$ref": "#/components/schemas/indices._types.SettingsSimilarityLmd" - }, + "_types.analysis.PatternCaptureTokenFilter": { + "allOf": [ { - "$ref": "#/components/schemas/indices._types.SettingsSimilarityLmj" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { - "$ref": "#/components/schemas/indices._types.SettingsSimilarityScripted" - } - ] - }, - "indices._types.SettingsSimilarityBm25": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "BM25" - ] - }, - "b": { - "type": "number" - }, - "discount_overlaps": { - "type": "boolean" - }, - "k1": { - "type": "number" - } - }, - "required": [ - "type" - ] - }, - "indices._types.SettingsSimilarityBoolean": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "boolean" - ] - } - }, - "required": [ - "type" - ] - }, - "indices._types.SettingsSimilarityDfi": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "DFI" - ] - }, - "independence_measure": { - "$ref": "#/components/schemas/_types.DFIIndependenceMeasure" - } - }, - "required": [ - "type", - "independence_measure" - ] - }, - "_types.DFIIndependenceMeasure": { - "type": "string", - "enum": [ - "standardized", - "saturated", - "chisquared" - ] - }, - "indices._types.SettingsSimilarityDfr": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "DFR" - ] - }, - "after_effect": { - "$ref": "#/components/schemas/_types.DFRAfterEffect" - }, - "basic_model": { - "$ref": "#/components/schemas/_types.DFRBasicModel" - }, - "normalization": { - "$ref": "#/components/schemas/_types.Normalization" - } - }, - "required": [ - "type", - "after_effect", - "basic_model", - "normalization" - ] - }, - "_types.DFRAfterEffect": { - "type": "string", - "enum": [ - "no", - "b", - "l" - ] - }, - "_types.DFRBasicModel": { - "type": "string", - "enum": [ - "be", - "d", - "g", - "if", - "in", - "ine", - "p" - ] - }, - "_types.Normalization": { - "type": "string", - "enum": [ - "no", - "h1", - "h2", - "h3", - "z" - ] - }, - "indices._types.SettingsSimilarityIb": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "IB" - ] - }, - "distribution": { - "$ref": "#/components/schemas/_types.IBDistribution" - }, - "lambda": { - "$ref": "#/components/schemas/_types.IBLambda" - }, - "normalization": { - "$ref": "#/components/schemas/_types.Normalization" - } - }, - "required": [ - "type", - "distribution", - "lambda", - "normalization" - ] - }, - "_types.IBDistribution": { - "type": "string", - "enum": [ - "ll", - "spl" - ] - }, - "_types.IBLambda": { - "type": "string", - "enum": [ - "df", - "ttf" - ] - }, - "indices._types.SettingsSimilarityLmd": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "LMDirichlet" - ] - }, - "mu": { - "type": "number" - } - }, - "required": [ - "type" - ] - }, - "indices._types.SettingsSimilarityLmj": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "LMJelinekMercer" - ] - }, - "lambda": { - "type": "number" - } - }, - "required": [ - "type" - ] - }, - "indices._types.SettingsSimilarityScripted": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "scripted" - ] - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "weight_script": { - "$ref": "#/components/schemas/_types.Script" - } - }, - "required": [ - "type", - "script" - ] - }, - "indices._types.MappingLimitSettings": { - "type": "object", - "properties": { - "coerce": { - "type": "boolean" - }, - "total_fields": { - "$ref": "#/components/schemas/indices._types.MappingLimitSettingsTotalFields" - }, - "depth": { - "$ref": "#/components/schemas/indices._types.MappingLimitSettingsDepth" - }, - "nested_fields": { - "$ref": "#/components/schemas/indices._types.MappingLimitSettingsNestedFields" - }, - "nested_objects": { - "$ref": "#/components/schemas/indices._types.MappingLimitSettingsNestedObjects" - }, - "field_name_length": { - "$ref": "#/components/schemas/indices._types.MappingLimitSettingsFieldNameLength" - }, - "dimension_fields": { - "$ref": "#/components/schemas/indices._types.MappingLimitSettingsDimensionFields" - }, - "source": { - "$ref": "#/components/schemas/indices._types.MappingLimitSettingsSourceFields" - }, - "ignore_malformed": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - } - } - }, - "indices._types.MappingLimitSettingsTotalFields": { - "type": "object", - "properties": { - "limit": { - "description": "The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit.\nThe limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance\ndegradations and memory issues, especially in clusters with a high load or few resources.", - "oneOf": [ - { - "type": "number" + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "pattern_capture" + ] }, - { - "type": "string" - } - ] - }, - "ignore_dynamic_beyond_limit": { - "description": "This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set\nto false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail\nwith the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail.\nInstead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false.\nThe fields that were not added to the mapping will be added to the _ignored field.", - "oneOf": [ - { - "type": "boolean" + "patterns": { + "description": "A list of regular expressions to match.", + "type": "array", + "items": { + "type": "string" + } }, - { - "type": "string" + "preserve_original": { + "description": "If set to `true` (the default) it will emit the original token.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] } + }, + "required": [ + "type", + "patterns" ] } - } - }, - "indices._types.MappingLimitSettingsDepth": { - "type": "object", - "properties": { - "limit": { - "description": "The maximum depth for a field, which is measured as the number of inner objects. For instance, if all fields are defined\nat the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc.", - "type": "number" - } - } - }, - "indices._types.MappingLimitSettingsNestedFields": { - "type": "object", - "properties": { - "limit": { - "description": "The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when\narrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this\nsetting limits the number of unique nested types per index.", - "type": "number" - } - } - }, - "indices._types.MappingLimitSettingsNestedObjects": { - "type": "object", - "properties": { - "limit": { - "description": "The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps\nto prevent out of memory errors when a document contains too many nested objects.", - "type": "number" - } - } - }, - "indices._types.MappingLimitSettingsFieldNameLength": { - "type": "object", - "properties": { - "limit": { - "description": "Setting for the maximum length of a field name. This setting isn’t really something that addresses mappings explosion but\nmight still be useful if you want to limit the field length. It usually shouldn’t be necessary to set this setting. The\ndefault is okay unless a user starts to add a huge number of fields with really long names. Default is `Long.MAX_VALUE` (no limit).", - "type": "number" - } - } - }, - "indices._types.MappingLimitSettingsDimensionFields": { - "type": "object", - "properties": { - "limit": { - "description": "[preview] This functionality is in technical preview and may be changed or removed in a future release.\nElastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", - "type": "number" - } - } - }, - "indices._types.MappingLimitSettingsSourceFields": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/indices._types.SourceMode" - } - }, - "required": [ - "mode" ] }, - "indices._types.SourceMode": { - "type": "string", - "enum": [ - "disabled", - "stored", - "synthetic" + "_types.analysis.PatternReplaceTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "pattern_replace" + ] + }, + "all": { + "description": "If `true`, all substrings matching the pattern parameter’s regular expression are replaced. If `false`, the filter replaces only the first matching substring in each token. Defaults to `true`.", + "type": "boolean" + }, + "flags": { + "type": "string" + }, + "pattern": { + "description": "Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter.", + "type": "string" + }, + "replacement": { + "description": "Replacement substring. Defaults to an empty substring (`\"\"`).", + "type": "string" + } + }, + "required": [ + "type", + "pattern" + ] + } ] }, - "indices._types.IndexingSlowlogSettings": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "source": { - "type": "number" - }, - "reformat": { - "type": "boolean" + "_types.analysis.PersianNormalizationTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "threshold": { - "$ref": "#/components/schemas/indices._types.IndexingSlowlogTresholds" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "persian_normalization" + ] + } + }, + "required": [ + "type" + ] } - } + ] }, - "indices._types.IndexingSlowlogTresholds": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels" + "_types.analysis.PersianStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "persian_stem" + ] + } + }, + "required": [ + "type" + ] } - } + ] }, - "indices._types.IndexingPressure": { - "type": "object", - "properties": { - "memory": { - "$ref": "#/components/schemas/indices._types.IndexingPressureMemory" + "_types.analysis.PorterStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "porter_stem" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "memory" ] }, - "indices._types.IndexingPressureMemory": { - "type": "object", - "properties": { - "limit": { - "description": "Number of outstanding bytes that may be consumed by indexing requests. When this limit is reached or exceeded,\nthe node will reject new coordinating and primary operations. When replica operations consume 1.5x this limit,\nthe node will reject new replica operations. Defaults to 10% of the heap.", - "type": "number" + "_types.analysis.PredicateTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "predicate_token_filter" + ] + }, + "script": { + "description": "Script containing a condition used to filter incoming tokens. Only tokens that match this script are included in the output.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + } + }, + "required": [ + "type", + "script" + ] } - } + ] }, - "indices._types.Storage": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/indices._types.StorageType" + "_types.analysis.RemoveDuplicatesTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "allow_mmap": { - "description": "You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap.\nThis is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This\nsetting is useful, for example, if you are in an environment where you can not control the ability to create a lot\nof memory maps so you need disable the ability to use memory-mapping.", - "type": "boolean" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "remove_duplicates" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "type" ] }, - "indices._types.StorageType": { - "anyOf": [ + "_types.analysis.ReverseTokenFilter": { + "allOf": [ { - "type": "string", - "enum": [ - "fs", - "niofs", - "mmapfs", - "hybridfs" - ] + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { - "type": "string" + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "reverse" + ] + } + }, + "required": [ + "type" + ] } ] }, - "ccr.follow_info.FollowerIndex": { - "type": "object", - "properties": { - "follower_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "leader_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "parameters": { - "$ref": "#/components/schemas/ccr.follow_info.FollowerIndexParameters" - }, - "remote_cluster": { - "$ref": "#/components/schemas/_types.Name" + "_types.analysis.RussianStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "status": { - "$ref": "#/components/schemas/ccr.follow_info.FollowerIndexStatus" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "russian_stem" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "follower_index", - "leader_index", - "remote_cluster", - "status" ] }, - "ccr.follow_info.FollowerIndexParameters": { - "type": "object", - "properties": { - "max_outstanding_read_requests": { - "description": "The maximum number of outstanding reads requests from the remote cluster.", - "type": "number" - }, - "max_outstanding_write_requests": { - "description": "The maximum number of outstanding write requests on the follower.", - "type": "number" - }, - "max_read_request_operation_count": { - "description": "The maximum number of operations to pull per read from the remote cluster.", - "type": "number" - }, - "max_read_request_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_retry_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_write_buffer_count": { - "description": "The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be\ndeferred until the number of queued operations goes below the limit.", - "type": "number" - }, - "max_write_buffer_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_write_request_operation_count": { - "description": "The maximum number of operations per bulk write request executed on the follower.", - "type": "number" - }, - "max_write_request_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "_types.analysis.ScandinavianFoldingTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "read_poll_timeout": { - "$ref": "#/components/schemas/_types.Duration" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scandinavian_folding" + ] + } + }, + "required": [ + "type" + ] } - } - }, - "ccr.follow_info.FollowerIndexStatus": { - "type": "string", - "enum": [ - "active", - "paused" ] }, - "ccr._types.FollowIndexStats": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "_types.analysis.ScandinavianNormalizationTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "shards": { - "description": "An array of shard-level following task statistics.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ccr._types.ShardStats" - } + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scandinavian_normalization" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "index", - "shards" ] }, - "ccr._types.ShardStats": { - "type": "object", - "properties": { - "bytes_read": { - "description": "The total of transferred bytes read from the leader.\nThis is only an estimate and does not account for compression if enabled.", - "type": "number" - }, - "failed_read_requests": { - "description": "The number of failed reads.", - "type": "number" - }, - "failed_write_requests": { - "description": "The number of failed bulk write requests on the follower.", - "type": "number" - }, - "fatal_exception": { - "$ref": "#/components/schemas/_types.ErrorCause" - }, - "follower_aliases_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "follower_global_checkpoint": { - "description": "The current global checkpoint on the follower.\nThe difference between the `leader_global_checkpoint` and the `follower_global_checkpoint` is an indication of how much the follower is lagging the leader.", - "type": "number" - }, - "follower_index": { - "description": "The name of the follower index.", - "type": "string" - }, - "follower_mapping_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "follower_max_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "follower_settings_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "last_requested_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "leader_global_checkpoint": { - "description": "The current global checkpoint on the leader known to the follower task.", - "type": "number" - }, - "leader_index": { - "description": "The name of the index in the leader cluster being followed.", - "type": "string" - }, - "leader_max_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "operations_read": { - "description": "The total number of operations read from the leader.", - "type": "number" - }, - "operations_written": { - "description": "The number of operations written on the follower.", - "type": "number" - }, - "outstanding_read_requests": { - "description": "The number of active read requests from the follower.", - "type": "number" - }, - "outstanding_write_requests": { - "description": "The number of active bulk write requests on the follower.", - "type": "number" - }, - "read_exceptions": { - "description": "An array of objects representing failed reads.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ccr._types.ReadException" - } - }, - "remote_cluster": { - "description": "The remote cluster containing the leader index.", - "type": "string" - }, - "shard_id": { - "description": "The numerical shard ID, with values from 0 to one less than the number of replicas.", - "type": "number" - }, - "successful_read_requests": { - "description": "The number of successful fetches.", - "type": "number" - }, - "successful_write_requests": { - "description": "The number of bulk write requests run on the follower.", - "type": "number" - }, - "time_since_last_read": { - "$ref": "#/components/schemas/_types.Duration" - }, - "time_since_last_read_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total_read_remote_exec_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_read_remote_exec_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total_read_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_read_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total_write_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_write_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "write_buffer_operation_count": { - "description": "The number of write operations queued on the follower.", - "type": "number" + "_types.analysis.SerbianNormalizationTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "write_buffer_size_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "serbian_normalization" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.ShingleTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "shingle" + ] + }, + "filler_token": { + "description": "String used in shingles as a replacement for empty positions that do not contain a token. This filler token is only used in shingles, not original unigrams. Defaults to an underscore (`_`).", + "type": "string" + }, + "max_shingle_size": { + "description": "Maximum number of tokens to concatenate when creating shingles. Defaults to `2`.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + } + ] + }, + "min_shingle_size": { + "description": "Minimum number of tokens to concatenate when creating shingles. Defaults to `2`.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + } + ] + }, + "output_unigrams": { + "description": "If `true`, the output includes the original input tokens. If `false`, the output only includes shingles; the original input tokens are removed. Defaults to `true`.", + "type": "boolean" + }, + "output_unigrams_if_no_shingles": { + "description": "If `true`, the output includes the original input tokens only if no shingles are produced; if shingles are produced, the output only includes shingles. Defaults to `false`.", + "type": "boolean" + }, + "token_separator": { + "description": "Separator used to concatenate adjacent tokens to form a shingle. Defaults to a space (`\" \"`).", + "type": "string" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "bytes_read", - "failed_read_requests", - "failed_write_requests", - "follower_aliases_version", - "follower_global_checkpoint", - "follower_index", - "follower_mapping_version", - "follower_max_seq_no", - "follower_settings_version", - "last_requested_seq_no", - "leader_global_checkpoint", - "leader_index", - "leader_max_seq_no", - "operations_read", - "operations_written", - "outstanding_read_requests", - "outstanding_write_requests", - "read_exceptions", - "remote_cluster", - "shard_id", - "successful_read_requests", - "successful_write_requests", - "time_since_last_read_millis", - "total_read_remote_exec_time_millis", - "total_read_time_millis", - "total_write_time_millis", - "write_buffer_operation_count", - "write_buffer_size_in_bytes" ] }, - "ccr._types.ReadException": { - "type": "object", - "properties": { - "exception": { - "$ref": "#/components/schemas/_types.ErrorCause" - }, - "from_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "_types.analysis.SnowballTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "retries": { - "description": "The number of times the batch has been retried.", - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "snowball" + ] + }, + "language": { + "description": "Controls the language used by the stemmer.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.SnowballLanguage" + } + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "exception", - "from_seq_no", - "retries" ] }, - "ccr.get_auto_follow_pattern.AutoFollowPattern": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "_types.analysis.SoraniNormalizationTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "pattern": { - "$ref": "#/components/schemas/ccr.get_auto_follow_pattern.AutoFollowPatternSummary" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "sorani_normalization" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "name", - "pattern" ] }, - "ccr.get_auto_follow_pattern.AutoFollowPatternSummary": { - "type": "object", - "properties": { - "active": { - "type": "boolean" - }, - "remote_cluster": { - "description": "The remote cluster containing the leader indices to match against.", - "type": "string" - }, - "follow_index_pattern": { - "$ref": "#/components/schemas/_types.IndexPattern" - }, - "leader_index_patterns": { - "$ref": "#/components/schemas/_types.IndexPatterns" - }, - "leader_index_exclusion_patterns": { - "$ref": "#/components/schemas/_types.IndexPatterns" + "_types.analysis.StemmerOverrideTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "max_outstanding_read_requests": { - "description": "The maximum number of outstanding reads requests from the remote cluster.", - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "stemmer_override" + ] + }, + "rules": { + "description": "A list of mapping rules to use.", + "type": "array", + "items": { + "type": "string" + } + }, + "rules_path": { + "description": "A path (either relative to `config` location, or absolute) to a list of mappings.", + "type": "string" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "active", - "remote_cluster", - "leader_index_patterns", - "leader_index_exclusion_patterns", - "max_outstanding_read_requests" ] }, - "_types.IndexPattern": { - "type": "string" - }, - "_types.IndexPatterns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexPattern" - } - }, - "ccr.stats.AutoFollowStats": { - "type": "object", - "properties": { - "auto_followed_clusters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ccr.stats.AutoFollowedCluster" - } - }, - "number_of_failed_follow_indices": { - "description": "The number of indices that the auto-follow coordinator failed to automatically follow.\nThe causes of recent failures are captured in the logs of the elected master node and in the `auto_follow_stats.recent_auto_follow_errors` field.", - "type": "number" - }, - "number_of_failed_remote_cluster_state_requests": { - "description": "The number of times that the auto-follow coordinator failed to retrieve the cluster state from a remote cluster registered in a collection of auto-follow patterns.", - "type": "number" - }, - "number_of_successful_follow_indices": { - "description": "The number of indices that the auto-follow coordinator successfully followed.", - "type": "number" + "_types.analysis.StemmerTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "recent_auto_follow_errors": { - "description": "An array of objects representing failures by the auto-follow coordinator.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ErrorCause" - } + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "stemmer" + ] + }, + "language": { + "type": "string" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "auto_followed_clusters", - "number_of_failed_follow_indices", - "number_of_failed_remote_cluster_state_requests", - "number_of_successful_follow_indices", - "recent_auto_follow_errors" ] }, - "ccr.stats.AutoFollowedCluster": { - "type": "object", - "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "last_seen_metadata_version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "_types.analysis.StopTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "time_since_last_check_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "stop" + ] + }, + "ignore_case": { + "description": "If `true`, stop word matching is case insensitive. For example, if `true`, a stop word of the matches and removes `The`, `THE`, or `the`. Defaults to `false`.", + "type": "boolean" + }, + "remove_trailing": { + "description": "If `true`, the last token of a stream is removed if it’s a stop word. Defaults to `true`.", + "type": "boolean" + }, + "stopwords": { + "description": "Language value, such as `_arabic_` or `_thai_`. Defaults to `_english_`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] + }, + "stopwords_path": { + "description": "Path to a file that contains a list of stop words to remove.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each stop word in the file must be separated by a line break.", + "type": "string" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "cluster_name", - "last_seen_metadata_version", - "time_since_last_check_millis" ] }, - "ccr.stats.FollowStats": { - "type": "object", - "properties": { - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ccr._types.FollowIndexStats" - } + "_types.analysis.SynonymGraphTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.SynonymTokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "synonym_graph" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "indices" ] }, - "_types.ScrollIds": { - "oneOf": [ + "_types.analysis.SynonymTokenFilterBase": { + "allOf": [ { - "$ref": "#/components/schemas/_types.ScrollId" + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ScrollId" + "type": "object", + "properties": { + "expand": { + "description": "Expands definitions for equivalent synonym rules. Defaults to `true`.", + "type": "boolean" + }, + "format": { + "description": "Sets the synonym rules format.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.SynonymFormat" + } + ] + }, + "lenient": { + "description": "If `true` ignores errors while parsing the synonym rules. It is important to note that only those synonym rules which cannot get parsed are ignored. Defaults to the value of the `updateable` setting.", + "type": "boolean" + }, + "synonyms": { + "description": "Used to define inline synonyms.", + "type": "array", + "items": { + "type": "string" + } + }, + "synonyms_path": { + "description": "Used to provide a synonym file. This path must be absolute or relative to the `config` location.", + "type": "string" + }, + "synonyms_set": { + "description": "Provide a synonym set created via Synonyms Management APIs.", + "type": "string" + }, + "tokenizer": { + "deprecated": true, + "description": "Controls the tokenizers that will be used to tokenize the synonym, this parameter is for backwards compatibility for indices that created before 6.0.", + "type": "string" + }, + "updateable": { + "description": "If `true` allows reloading search analyzers to pick up changes to synonym files. Only to be used for search analyzers. Defaults to `false`.", + "type": "boolean" + } } } ] }, - "cluster.allocation_explain.Decision": { + "_types.analysis.SynonymFormat": { "type": "string", "enum": [ - "yes", - "no", - "worse_balance", - "throttled", - "awaiting_info", - "allocation_delayed", - "no_valid_shard_copy", - "no_attempt" + "solr", + "wordnet" ] }, - "cluster.allocation_explain.AllocationDecision": { - "type": "object", - "properties": { - "decider": { - "type": "string" - }, - "decision": { - "$ref": "#/components/schemas/cluster.allocation_explain.AllocationExplainDecision" + "_types.analysis.SynonymTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.SynonymTokenFilterBase" }, - "explanation": { - "type": "string" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "synonym" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "decider", - "decision", - "explanation" ] }, - "cluster.allocation_explain.AllocationExplainDecision": { - "type": "string", - "enum": [ - "NO", - "YES", - "THROTTLE", - "ALWAYS" + "_types.analysis.TrimTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "trim" + ] + } + }, + "required": [ + "type" + ] + } ] }, - "cluster.allocation_explain.ClusterInfo": { - "type": "object", - "properties": { - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/cluster.allocation_explain.NodeDiskUsage" - } + "_types.analysis.TruncateTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "shard_sizes": { + { "type": "object", - "additionalProperties": { - "type": "number" - } + "properties": { + "type": { + "type": "string", + "enum": [ + "truncate" + ] + }, + "length": { + "description": "Character limit for each token. Tokens exceeding this limit are truncated. Defaults to `10`.", + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.UniqueTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "shard_data_set_sizes": { + { "type": "object", - "additionalProperties": { - "type": "string" - } + "properties": { + "type": { + "type": "string", + "enum": [ + "unique" + ] + }, + "only_on_same_position": { + "description": "If `true`, only remove duplicate tokens in the same position. Defaults to `false`.", + "type": "boolean" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.UppercaseTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "shard_paths": { + { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "reserved_sizes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.allocation_explain.ReservedSize" - } + "properties": { + "type": { + "type": "string", + "enum": [ + "uppercase" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.WordDelimiterGraphTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.WordDelimiterTokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "word_delimiter_graph" + ] + }, + "adjust_offsets": { + "description": "If `true`, the filter adjusts the offsets of split or catenated tokens to better reflect their actual position in the token stream. Defaults to `true`.", + "type": "boolean" + }, + "ignore_keywords": { + "description": "If `true`, the filter skips tokens with a keyword attribute of true. Defaults to `false`.", + "type": "boolean" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "nodes", - "shard_sizes", - "shard_paths", - "reserved_sizes" ] }, - "cluster.allocation_explain.NodeDiskUsage": { - "type": "object", - "properties": { - "node_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "least_available": { - "$ref": "#/components/schemas/cluster.allocation_explain.DiskUsage" + "_types.analysis.WordDelimiterTokenFilterBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "most_available": { - "$ref": "#/components/schemas/cluster.allocation_explain.DiskUsage" + { + "type": "object", + "properties": { + "catenate_all": { + "description": "If `true`, the filter produces catenated tokens for chains of alphanumeric characters separated by non-alphabetic delimiters. Defaults to `false`.", + "type": "boolean" + }, + "catenate_numbers": { + "description": "If `true`, the filter produces catenated tokens for chains of numeric characters separated by non-alphabetic delimiters. Defaults to `false`.", + "type": "boolean" + }, + "catenate_words": { + "description": "If `true`, the filter produces catenated tokens for chains of alphabetical characters separated by non-alphabetic delimiters. Defaults to `false`.", + "type": "boolean" + }, + "generate_number_parts": { + "description": "If `true`, the filter includes tokens consisting of only numeric characters in the output. If `false`, the filter excludes these tokens from the output. Defaults to `true`.", + "type": "boolean" + }, + "generate_word_parts": { + "description": "If `true`, the filter includes tokens consisting of only alphabetical characters in the output. If `false`, the filter excludes these tokens from the output. Defaults to `true`.", + "type": "boolean" + }, + "preserve_original": { + "description": "If `true`, the filter includes the original version of any split tokens in the output. This original version includes non-alphanumeric delimiters. Defaults to `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] + }, + "protected_words": { + "description": "Array of tokens the filter won’t split.", + "type": "array", + "items": { + "type": "string" + } + }, + "protected_words_path": { + "description": "Path to a file that contains a list of tokens the filter won’t split.\nThis path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each token in the file must be separated by a line break.", + "type": "string" + }, + "split_on_case_change": { + "description": "If `true`, the filter splits tokens at letter case transitions. For example: camelCase -> [ camel, Case ]. Defaults to `true`.", + "type": "boolean" + }, + "split_on_numerics": { + "description": "If `true`, the filter splits tokens at letter-number transitions. For example: j2se -> [ j, 2, se ]. Defaults to `true`.", + "type": "boolean" + }, + "stem_english_possessive": { + "description": "If `true`, the filter removes the English possessive (`'s`) from the end of each token. For example: O'Neil's -> [ O, Neil ]. Defaults to `true`.", + "type": "boolean" + }, + "type_table": { + "description": "Array of custom type mappings for characters. This allows you to map non-alphanumeric characters as numeric or alphanumeric to avoid splitting on those characters.", + "type": "array", + "items": { + "type": "string" + } + }, + "type_table_path": { + "description": "Path to a file that contains custom type mappings for characters. This allows you to map non-alphanumeric characters as numeric or alphanumeric to avoid splitting on those characters.", + "type": "string" + } + } } - }, - "required": [ - "node_name", - "least_available", - "most_available" ] }, - "cluster.allocation_explain.DiskUsage": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "total_bytes": { - "type": "number" - }, - "used_bytes": { - "type": "number" - }, - "free_bytes": { - "type": "number" - }, - "free_disk_percent": { - "type": "number" + "_types.analysis.WordDelimiterTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.WordDelimiterTokenFilterBase" }, - "used_disk_percent": { - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "word_delimiter" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "path", - "total_bytes", - "used_bytes", - "free_bytes", - "free_disk_percent", - "used_disk_percent" ] }, - "cluster.allocation_explain.ReservedSize": { - "type": "object", - "properties": { - "node_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "path": { - "type": "string" - }, - "total": { - "type": "number" + "_types.analysis.JaStopTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "shards": { - "type": "array", - "items": { - "type": "string" - } + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ja_stop" + ] + }, + "stopwords": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWords" + } + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "node_id", - "path", - "total", - "shards" ] }, - "cluster.allocation_explain.CurrentNode": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "roles": { - "$ref": "#/components/schemas/_types.NodeRoles" + "_types.analysis.KuromojiStemmerTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "attributes": { + { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" - }, - "weight_ranking": { - "type": "number" + "properties": { + "type": { + "type": "string", + "enum": [ + "kuromoji_stemmer" + ] + }, + "minimum_length": { + "type": "number" + } + }, + "required": [ + "type", + "minimum_length" + ] } - }, - "required": [ - "id", - "name", - "roles", - "attributes", - "transport_address", - "weight_ranking" - ] - }, - "_types.NodeRoles": { - "description": "* @doc_id node-roles", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.NodeRole" - } - }, - "_types.NodeRole": { - "type": "string", - "enum": [ - "master", - "data", - "data_cold", - "data_content", - "data_frozen", - "data_hot", - "data_warm", - "client", - "ingest", - "ml", - "voting_only", - "transform", - "remote_cluster_client", - "coordinating_only" ] }, - "_types.TransportAddress": { - "type": "string" - }, - "cluster.allocation_explain.NodeAllocationExplanation": { - "type": "object", - "properties": { - "deciders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.allocation_explain.AllocationDecision" - } + "_types.analysis.KuromojiReadingFormTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "node_attributes": { + { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "node_decision": { - "$ref": "#/components/schemas/cluster.allocation_explain.Decision" - }, - "node_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "node_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "roles": { - "$ref": "#/components/schemas/_types.NodeRoles" - }, - "store": { - "$ref": "#/components/schemas/cluster.allocation_explain.AllocationStore" - }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" - }, - "weight_ranking": { - "type": "number" + "properties": { + "type": { + "type": "string", + "enum": [ + "kuromoji_readingform" + ] + }, + "use_romaji": { + "type": "boolean" + } + }, + "required": [ + "type", + "use_romaji" + ] } - }, - "required": [ - "deciders", - "node_attributes", - "node_decision", - "node_id", - "node_name", - "roles", - "transport_address", - "weight_ranking" ] }, - "cluster.allocation_explain.AllocationStore": { - "type": "object", - "properties": { - "allocation_id": { - "type": "string" - }, - "found": { - "type": "boolean" - }, - "in_sync": { - "type": "boolean" - }, - "matching_size_in_bytes": { - "type": "number" - }, - "matching_sync_id": { - "type": "boolean" + "_types.analysis.KuromojiPartOfSpeechTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "store_exception": { - "type": "string" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "kuromoji_part_of_speech" + ] + }, + "stoptags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "stoptags" + ] } - }, - "required": [ - "allocation_id", - "found", - "in_sync", - "matching_size_in_bytes", - "matching_sync_id", - "store_exception" ] }, - "cluster.allocation_explain.UnassignedInformation": { - "type": "object", - "properties": { - "at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "last_allocation_status": { - "type": "string" - }, - "reason": { - "$ref": "#/components/schemas/cluster.allocation_explain.UnassignedInformationReason" - }, - "details": { - "type": "string" - }, - "failed_allocation_attempts": { - "type": "number" - }, - "delayed": { - "type": "boolean" + "_types.analysis.IcuCollationTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "allocation_status": { - "type": "string" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "icu_collation" + ] + }, + "alternate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationAlternate" + } + ] + }, + "caseFirst": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationCaseFirst" + } + ] + }, + "caseLevel": { + "type": "boolean" + }, + "country": { + "type": "string" + }, + "decomposition": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationDecomposition" + } + ] + }, + "hiraganaQuaternaryMode": { + "type": "boolean" + }, + "language": { + "type": "string" + }, + "numeric": { + "type": "boolean" + }, + "rules": { + "type": "string" + }, + "strength": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationStrength" + } + ] + }, + "variableTop": { + "type": "string" + }, + "variant": { + "type": "string" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "at", - "reason" ] }, - "cluster.allocation_explain.UnassignedInformationReason": { + "_types.analysis.IcuCollationAlternate": { "type": "string", "enum": [ - "INDEX_CREATED", - "CLUSTER_RECOVERED", - "INDEX_REOPENED", - "DANGLING_INDEX_IMPORTED", - "NEW_INDEX_RESTORED", - "EXISTING_INDEX_RESTORED", - "REPLICA_ADDED", - "ALLOCATION_FAILED", - "NODE_LEFT", - "REROUTE_CANCELLED", - "REINITIALIZED", - "REALLOCATED_REPLICA", - "PRIMARY_FAILED", - "FORCED_EMPTY_PRIMARY", - "MANUAL_ALLOCATION" + "shifted", + "non-ignorable" ] }, - "cluster._types.ComponentTemplate": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "component_template": { - "$ref": "#/components/schemas/cluster._types.ComponentTemplateNode" - } - }, - "required": [ - "name", - "component_template" + "_types.analysis.IcuCollationCaseFirst": { + "type": "string", + "enum": [ + "lower", + "upper" ] }, - "cluster._types.ComponentTemplateNode": { - "type": "object", - "properties": { - "template": { - "$ref": "#/components/schemas/cluster._types.ComponentTemplateSummary" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "deprecated": { - "type": "boolean" - } - }, - "required": [ - "template" + "_types.analysis.IcuCollationDecomposition": { + "type": "string", + "enum": [ + "no", + "identical" ] }, - "cluster._types.ComponentTemplateSummary": { - "type": "object", - "properties": { - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "settings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - } - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" + "_types.analysis.IcuCollationStrength": { + "type": "string", + "enum": [ + "primary", + "secondary", + "tertiary", + "quaternary", + "identical" + ] + }, + "_types.analysis.IcuFoldingTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "aliases": { + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.AliasDefinition" - } - }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" - }, - "data_stream_options": { - "x-state": "Added in 8.19.0", - "oneOf": [ - { - "$ref": "#/components/schemas/indices._types.DataStreamOptionsTemplate" + "properties": { + "type": { + "type": "string", + "enum": [ + "icu_folding" + ] }, - { - "nullable": true, + "unicode_set_filter": { "type": "string" } + }, + "required": [ + "type", + "unicode_set_filter" ] } - } + ] }, - "_types.mapping.TypeMapping": { - "type": "object", - "properties": { - "all_field": { - "$ref": "#/components/schemas/_types.mapping.AllField" - }, - "date_detection": { - "type": "boolean" - }, - "dynamic": { - "$ref": "#/components/schemas/_types.mapping.DynamicMapping" - }, - "dynamic_date_formats": { - "type": "array", - "items": { - "type": "string" - } - }, - "dynamic_templates": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.DynamicTemplate" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "_field_names": { - "$ref": "#/components/schemas/_types.mapping.FieldNamesField" - }, - "index_field": { - "$ref": "#/components/schemas/_types.mapping.IndexField" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "numeric_detection": { - "type": "boolean" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.Property" - } - }, - "_routing": { - "$ref": "#/components/schemas/_types.mapping.RoutingField" - }, - "_size": { - "$ref": "#/components/schemas/_types.mapping.SizeField" - }, - "_source": { - "$ref": "#/components/schemas/_types.mapping.SourceField" + "_types.analysis.IcuNormalizationTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "runtime": { + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.RuntimeField" - } - }, - "enabled": { - "type": "boolean" - }, - "subobjects": { - "$ref": "#/components/schemas/_types.mapping.Subobjects" - }, - "_data_stream_timestamp": { - "$ref": "#/components/schemas/_types.mapping.DataStreamTimestamp" + "properties": { + "type": { + "type": "string", + "enum": [ + "icu_normalizer" + ] + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType" + } + ] + } + }, + "required": [ + "type", + "name" + ] } - } + ] }, - "_types.mapping.AllField": { - "type": "object", - "properties": { - "analyzer": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "omit_norms": { - "type": "boolean" - }, - "search_analyzer": { - "type": "string" - }, - "similarity": { - "type": "string" - }, - "store": { - "type": "boolean" - }, - "store_term_vector_offsets": { - "type": "boolean" - }, - "store_term_vector_payloads": { - "type": "boolean" - }, - "store_term_vector_positions": { - "type": "boolean" + "_types.analysis.IcuTransformTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" }, - "store_term_vectors": { - "type": "boolean" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "icu_transform" + ] + }, + "dir": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuTransformDirection" + } + ] + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] } - }, - "required": [ - "analyzer", - "enabled", - "omit_norms", - "search_analyzer", - "similarity", - "store", - "store_term_vector_offsets", - "store_term_vector_payloads", - "store_term_vector_positions", - "store_term_vectors" ] }, - "_types.mapping.DynamicMapping": { + "_types.analysis.IcuTransformDirection": { "type": "string", "enum": [ - "strict", - "runtime", - "true", - "false" + "forward", + "reverse" ] }, - "_types.mapping.DynamicTemplate": { + "_types.analysis.PhoneticTokenFilter": { "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, { "type": "object", "properties": { - "match": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } + "type": { + "type": "string", + "enum": [ + "phonetic" ] }, - "path_match": { - "oneOf": [ - { - "type": "string" - }, + "encoder": { + "allOf": [ { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.analysis.PhoneticEncoder" } ] }, - "unmatch": { + "languageset": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.analysis.PhoneticLanguage" }, { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/_types.analysis.PhoneticLanguage" } } ] }, - "path_unmatch": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] + "max_code_len": { + "type": "number" }, - "match_mapping_type": { - "oneOf": [ - { - "type": "string" - }, + "name_type": { + "allOf": [ { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.analysis.PhoneticNameType" } ] }, - "unmatch_mapping_type": { - "oneOf": [ - { - "type": "string" - }, + "replace": { + "type": "boolean" + }, + "rule_type": { + "allOf": [ { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.analysis.PhoneticRuleType" } ] - }, - "match_pattern": { - "$ref": "#/components/schemas/_types.mapping.MatchType" } - } + }, + "required": [ + "type", + "encoder" + ] + } + ] + }, + "_types.analysis.PhoneticEncoder": { + "type": "string", + "enum": [ + "metaphone", + "double_metaphone", + "soundex", + "refined_soundex", + "caverphone1", + "caverphone2", + "cologne", + "nysiis", + "koelnerphonetik", + "haasephonetik", + "beider_morse", + "daitch_mokotoff" + ] + }, + "_types.analysis.PhoneticLanguage": { + "type": "string", + "enum": [ + "any", + "common", + "cyrillic", + "english", + "french", + "german", + "hebrew", + "hungarian", + "polish", + "romanian", + "russian", + "spanish" + ] + }, + "_types.analysis.PhoneticNameType": { + "type": "string", + "enum": [ + "generic", + "ashkenazi", + "sephardic" + ] + }, + "_types.analysis.PhoneticRuleType": { + "type": "string", + "enum": [ + "approx", + "exact" + ] + }, + "_types.analysis.DictionaryDecompounderTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.CompoundWordTokenFilterBase" }, { "type": "object", "properties": { - "mapping": { - "$ref": "#/components/schemas/_types.mapping.Property" - }, - "runtime": { - "$ref": "#/components/schemas/_types.mapping.RuntimeField" + "type": { + "type": "string", + "enum": [ + "dictionary_decompounder" + ] } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "type" + ] } ] }, - "_types.mapping.Property": { + "_types.analysis.Normalizer": { "discriminator": { - "propertyName": "type" + "propertyName": "type", + "mapping": { + "custom": "#/components/schemas/_types.analysis.CustomNormalizer", + "lowercase": "#/components/schemas/_types.analysis.LowercaseNormalizer" + } }, "oneOf": [ { - "$ref": "#/components/schemas/_types.mapping.BinaryProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.BooleanProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.DynamicProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.JoinProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.KeywordProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.MatchOnlyTextProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.PercolatorProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.RankFeatureProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.RankFeaturesProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.SearchAsYouTypeProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.TextProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.VersionProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.WildcardProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.DateNanosProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.DateProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.AggregateMetricDoubleProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.DenseVectorProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.FlattenedProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.NestedProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.ObjectProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.PassthroughObjectProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.SemanticTextProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.SparseVectorProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.CompletionProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.ConstantKeywordProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.CountedKeywordProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.FieldAliasProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.HistogramProperty" - }, - { - "$ref": "#/components/schemas/_types.mapping.IpProperty" + "$ref": "#/components/schemas/_types.analysis.LowercaseNormalizer" }, { - "$ref": "#/components/schemas/_types.mapping.Murmur3HashProperty" + "$ref": "#/components/schemas/_types.analysis.CustomNormalizer" + } + ] + }, + "_types.analysis.LowercaseNormalizer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "lowercase" + ] + } + }, + "required": [ + "type" + ] + }, + "_types.analysis.CustomNormalizer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ] }, - { - "$ref": "#/components/schemas/_types.mapping.TokenCountProperty" + "char_filter": { + "type": "array", + "items": { + "type": "string" + } }, + "filter": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "_types.analysis.Tokenizer": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/text-analysis/tokenizer-reference" + }, + "oneOf": [ { - "$ref": "#/components/schemas/_types.mapping.GeoPointProperty" + "type": "string" }, { - "$ref": "#/components/schemas/_types.mapping.GeoShapeProperty" - }, + "$ref": "#/components/schemas/_types.analysis.TokenizerDefinition" + } + ] + }, + "_types.analysis.TokenizerDefinition": { + "discriminator": { + "propertyName": "type", + "mapping": { + "char_group": "#/components/schemas/_types.analysis.CharGroupTokenizer", + "classic": "#/components/schemas/_types.analysis.ClassicTokenizer", + "edge_ngram": "#/components/schemas/_types.analysis.EdgeNGramTokenizer", + "icu_tokenizer": "#/components/schemas/_types.analysis.IcuTokenizer", + "keyword": "#/components/schemas/_types.analysis.KeywordTokenizer", + "kuromoji_tokenizer": "#/components/schemas/_types.analysis.KuromojiTokenizer", + "letter": "#/components/schemas/_types.analysis.LetterTokenizer", + "lowercase": "#/components/schemas/_types.analysis.LowercaseTokenizer", + "ngram": "#/components/schemas/_types.analysis.NGramTokenizer", + "nori_tokenizer": "#/components/schemas/_types.analysis.NoriTokenizer", + "path_hierarchy": "#/components/schemas/_types.analysis.PathHierarchyTokenizer", + "pattern": "#/components/schemas/_types.analysis.PatternTokenizer", + "simple_pattern": "#/components/schemas/_types.analysis.SimplePatternTokenizer", + "simple_pattern_split": "#/components/schemas/_types.analysis.SimplePatternSplitTokenizer", + "standard": "#/components/schemas/_types.analysis.StandardTokenizer", + "thai": "#/components/schemas/_types.analysis.ThaiTokenizer", + "uax_url_email": "#/components/schemas/_types.analysis.UaxEmailUrlTokenizer", + "whitespace": "#/components/schemas/_types.analysis.WhitespaceTokenizer" + } + }, + "oneOf": [ { - "$ref": "#/components/schemas/_types.mapping.PointProperty" + "$ref": "#/components/schemas/_types.analysis.CharGroupTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.ShapeProperty" + "$ref": "#/components/schemas/_types.analysis.ClassicTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.ByteNumberProperty" + "$ref": "#/components/schemas/_types.analysis.EdgeNGramTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.DoubleNumberProperty" + "$ref": "#/components/schemas/_types.analysis.KeywordTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.FloatNumberProperty" + "$ref": "#/components/schemas/_types.analysis.LetterTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.HalfFloatNumberProperty" + "$ref": "#/components/schemas/_types.analysis.LowercaseTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.IntegerNumberProperty" + "$ref": "#/components/schemas/_types.analysis.NGramTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.LongNumberProperty" + "$ref": "#/components/schemas/_types.analysis.PathHierarchyTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.ScaledFloatNumberProperty" + "$ref": "#/components/schemas/_types.analysis.PatternTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.ShortNumberProperty" + "$ref": "#/components/schemas/_types.analysis.SimplePatternTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.UnsignedLongNumberProperty" + "$ref": "#/components/schemas/_types.analysis.SimplePatternSplitTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.DateRangeProperty" + "$ref": "#/components/schemas/_types.analysis.StandardTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.DoubleRangeProperty" + "$ref": "#/components/schemas/_types.analysis.ThaiTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.FloatRangeProperty" + "$ref": "#/components/schemas/_types.analysis.UaxEmailUrlTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.IntegerRangeProperty" + "$ref": "#/components/schemas/_types.analysis.WhitespaceTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.IpRangeProperty" + "$ref": "#/components/schemas/_types.analysis.IcuTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.LongRangeProperty" + "$ref": "#/components/schemas/_types.analysis.KuromojiTokenizer" }, { - "$ref": "#/components/schemas/_types.mapping.IcuCollationProperty" + "$ref": "#/components/schemas/_types.analysis.NoriTokenizer" } ] }, - "_types.mapping.BinaryProperty": { + "_types.analysis.CharGroupTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", @@ -70055,129 +131824,127 @@ "type": { "type": "string", "enum": [ - "binary" + "char_group" ] + }, + "tokenize_on_chars": { + "type": "array", + "items": { + "type": "string" + } + }, + "max_token_length": { + "type": "number" } }, "required": [ - "type" + "type", + "tokenize_on_chars" ] } ] }, - "_types.mapping.DocValuesPropertyBase": { + "_types.analysis.TokenizerBase": { + "type": "object", + "properties": { + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + } + } + }, + "_types.analysis.ClassicTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "doc_values": { - "type": "boolean" + "type": { + "type": "string", + "enum": [ + "classic" + ] + }, + "max_token_length": { + "type": "number" } - } + }, + "required": [ + "type" + ] } ] }, - "_types.mapping.CorePropertyBase": { + "_types.analysis.EdgeNGramTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "copy_to": { - "$ref": "#/components/schemas/_types.Fields" + "type": { + "type": "string", + "enum": [ + "edge_ngram" + ] }, - "store": { - "type": "boolean" + "custom_token_chars": { + "type": "string" + }, + "max_gram": { + "type": "number" + }, + "min_gram": { + "type": "number" + }, + "token_chars": { + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.TokenChar" + } } - } + }, + "required": [ + "type" + ] } ] }, - "_types.mapping.PropertyBase": { - "type": "object", - "properties": { - "meta": { - "description": "Metadata about the field.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.Property" - } - }, - "ignore_above": { - "type": "number" - }, - "dynamic": { - "$ref": "#/components/schemas/_types.mapping.DynamicMapping" - }, - "fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.Property" - } - }, - "synthetic_source_keep": { - "$ref": "#/components/schemas/_types.mapping.SyntheticSourceKeepEnum" - } - } - }, - "_types.mapping.SyntheticSourceKeepEnum": { + "_types.analysis.TokenChar": { "type": "string", "enum": [ - "none", - "arrays", - "all" + "letter", + "digit", + "whitespace", + "punctuation", + "symbol", + "custom" ] }, - "_types.mapping.BooleanProperty": { + "_types.analysis.KeywordTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "boost": { - "type": "number" - }, - "fielddata": { - "$ref": "#/components/schemas/indices._types.NumericFielddata" - }, - "index": { - "type": "boolean" - }, - "null_value": { - "type": "boolean" - }, - "ignore_malformed": { - "type": "boolean" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "on_script_error": { - "$ref": "#/components/schemas/_types.mapping.OnScriptError" - }, - "time_series_dimension": { - "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", - "x-state": "Technical preview", - "type": "boolean" - }, "type": { "type": "string", "enum": [ - "boolean" + "keyword" ] + }, + "buffer_size": { + "default": 256.0, + "type": "number" } }, "required": [ @@ -70186,35 +131953,52 @@ } ] }, - "indices._types.NumericFielddata": { - "type": "object", - "properties": { - "format": { - "$ref": "#/components/schemas/indices._types.NumericFielddataFormat" + "_types.analysis.LetterTokenizer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "letter" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "format" - ] - }, - "indices._types.NumericFielddataFormat": { - "type": "string", - "enum": [ - "array", - "disabled" ] }, - "_types.mapping.OnScriptError": { - "type": "string", - "enum": [ - "fail", - "continue" + "_types.analysis.LowercaseTokenizer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "lowercase" + ] + } + }, + "required": [ + "type" + ] + } ] }, - "_types.mapping.DynamicProperty": { + "_types.analysis.NGramTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", @@ -70222,81 +132006,101 @@ "type": { "type": "string", "enum": [ - "{dynamic_type}" + "ngram" ] }, - "enabled": { - "type": "boolean" - }, - "null_value": { - "$ref": "#/components/schemas/_types.FieldValue" - }, - "boost": { - "type": "number" - }, - "coerce": { - "type": "boolean" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "on_script_error": { - "$ref": "#/components/schemas/_types.mapping.OnScriptError" - }, - "ignore_malformed": { - "type": "boolean" - }, - "time_series_metric": { - "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" - }, - "analyzer": { + "custom_token_chars": { "type": "string" }, - "eager_global_ordinals": { - "type": "boolean" - }, - "index": { - "type": "boolean" + "max_gram": { + "type": "number" }, - "index_options": { - "$ref": "#/components/schemas/_types.mapping.IndexOptions" + "min_gram": { + "type": "number" }, - "index_phrases": { - "type": "boolean" + "token_chars": { + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.TokenChar" + } + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.PathHierarchyTokenizer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "path_hierarchy" + ] }, - "index_prefixes": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.mapping.TextIndexPrefixes" - }, + "buffer_size": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" } ] }, - "norms": { - "type": "boolean" - }, - "position_increment_gap": { - "type": "number" - }, - "search_analyzer": { + "delimiter": { "type": "string" }, - "search_quote_analyzer": { + "replacement": { "type": "string" }, - "term_vector": { - "$ref": "#/components/schemas/_types.mapping.TermVectorOption" + "reverse": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean" + } + ] }, - "format": { + "skip": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" + } + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.PatternTokenizer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "pattern" + ] + }, + "flags": { "type": "string" }, - "precision_step": { + "group": { "type": "number" }, - "locale": { + "pattern": { "type": "string" } }, @@ -70306,84 +132110,46 @@ } ] }, - "_types.mapping.TimeSeriesMetricType": { - "type": "string", - "enum": [ - "gauge", - "counter", - "summary", - "histogram", - "position" - ] - }, - "_types.mapping.IndexOptions": { - "type": "string", - "enum": [ - "docs", - "freqs", - "positions", - "offsets" - ] - }, - "_types.mapping.TextIndexPrefixes": { - "type": "object", - "properties": { - "max_chars": { - "type": "number" + "_types.analysis.SimplePatternTokenizer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, - "min_chars": { - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "simple_pattern" + ] + }, + "pattern": { + "type": "string" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "max_chars", - "min_chars" - ] - }, - "_types.mapping.TermVectorOption": { - "type": "string", - "enum": [ - "no", - "yes", - "with_offsets", - "with_positions", - "with_positions_offsets", - "with_positions_offsets_payloads", - "with_positions_payloads" ] }, - "_types.mapping.JoinProperty": { + "_types.analysis.SimplePatternSplitTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "relations": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.RelationName" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.RelationName" - } - } - ] - } - }, - "eager_global_ordinals": { - "type": "boolean" - }, "type": { "type": "string", "enum": [ - "join" + "simple_pattern_split" ] + }, + "pattern": { + "type": "string" } }, "required": [ @@ -70392,64 +132158,42 @@ } ] }, - "_types.mapping.KeywordProperty": { + "_types.analysis.StandardTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "boost": { - "type": "number" - }, - "eager_global_ordinals": { - "type": "boolean" - }, - "index": { - "type": "boolean" - }, - "index_options": { - "$ref": "#/components/schemas/_types.mapping.IndexOptions" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "on_script_error": { - "$ref": "#/components/schemas/_types.mapping.OnScriptError" - }, - "normalizer": { - "type": "string" - }, - "norms": { - "type": "boolean" - }, - "null_value": { - "type": "string" - }, - "similarity": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } + "type": { + "type": "string", + "enum": [ + "standard" ] }, - "split_queries_on_whitespace": { - "type": "boolean" - }, - "time_series_dimension": { - "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", - "x-state": "Technical preview", - "type": "boolean" - }, + "max_token_length": { + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.ThaiTokenizer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" + }, + { + "type": "object", + "properties": { "type": { "type": "string", "enum": [ - "keyword" + "thai" ] } }, @@ -70459,41 +132203,10 @@ } ] }, - "_types.mapping.MatchOnlyTextProperty": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "match_only_text" - ] - }, - "fields": { - "description": "Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one\nfield for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.Property" - } - }, - "meta": { - "description": "Metadata about the field.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "copy_to": { - "$ref": "#/components/schemas/_types.Fields" - } - }, - "required": [ - "type" - ] - }, - "_types.mapping.PercolatorProperty": { + "_types.analysis.UaxEmailUrlTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", @@ -70501,8 +132214,11 @@ "type": { "type": "string", "enum": [ - "percolator" + "uax_url_email" ] + }, + "max_token_length": { + "type": "number" } }, "required": [ @@ -70511,22 +132227,22 @@ } ] }, - "_types.mapping.RankFeatureProperty": { + "_types.analysis.WhitespaceTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "positive_score_impact": { - "type": "boolean" - }, "type": { "type": "string", "enum": [ - "rank_feature" + "whitespace" ] + }, + "max_token_length": { + "type": "number" } }, "required": [ @@ -70535,160 +132251,113 @@ } ] }, - "_types.mapping.RankFeaturesProperty": { + "_types.analysis.IcuTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "positive_score_impact": { - "type": "boolean" - }, "type": { "type": "string", "enum": [ - "rank_features" + "icu_tokenizer" ] + }, + "rule_files": { + "type": "string" } }, "required": [ - "type" + "type", + "rule_files" ] } ] }, - "_types.mapping.SearchAsYouTypeProperty": { + "_types.analysis.KuromojiTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "analyzer": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "kuromoji_tokenizer" + ] }, - "index": { + "discard_punctuation": { "type": "boolean" }, - "index_options": { - "$ref": "#/components/schemas/_types.mapping.IndexOptions" + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.KuromojiTokenizationMode" + } + ] }, - "max_shingle_size": { + "nbest_cost": { "type": "number" }, - "norms": { - "type": "boolean" - }, - "search_analyzer": { + "nbest_examples": { "type": "string" }, - "search_quote_analyzer": { + "user_dictionary": { "type": "string" }, - "similarity": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "term_vector": { - "$ref": "#/components/schemas/_types.mapping.TermVectorOption" + "user_dictionary_rules": { + "type": "array", + "items": { + "type": "string" + } }, - "type": { - "type": "string", - "enum": [ - "search_as_you_type" - ] + "discard_compound_token": { + "type": "boolean" } }, "required": [ - "type" + "type", + "mode" ] } ] }, - "_types.mapping.TextProperty": { + "_types.analysis.NoriTokenizer": { "allOf": [ { - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" + "$ref": "#/components/schemas/_types.analysis.TokenizerBase" }, { "type": "object", "properties": { - "analyzer": { - "type": "string" - }, - "boost": { - "type": "number" - }, - "eager_global_ordinals": { - "type": "boolean" - }, - "fielddata": { - "type": "boolean" - }, - "fielddata_frequency_filter": { - "$ref": "#/components/schemas/indices._types.FielddataFrequencyFilter" - }, - "index": { - "type": "boolean" - }, - "index_options": { - "$ref": "#/components/schemas/_types.mapping.IndexOptions" - }, - "index_phrases": { - "type": "boolean" + "type": { + "type": "string", + "enum": [ + "nori_tokenizer" + ] }, - "index_prefixes": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.mapping.TextIndexPrefixes" - }, + "decompound_mode": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.analysis.NoriDecompoundMode" } ] }, - "norms": { + "discard_punctuation": { "type": "boolean" }, - "position_increment_gap": { - "type": "number" - }, - "search_analyzer": { - "type": "string" - }, - "search_quote_analyzer": { + "user_dictionary": { "type": "string" }, - "similarity": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "term_vector": { - "$ref": "#/components/schemas/_types.mapping.TermVectorOption" - }, - "type": { - "type": "string", - "enum": [ - "text" - ] + "user_dictionary_rules": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -70697,4797 +132366,4893 @@ } ] }, - "indices._types.FielddataFrequencyFilter": { + "indices._types.IndexSettingsTimeSeries": { "type": "object", "properties": { - "max": { - "type": "number" + "end_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "min": { + "start_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } + } + }, + "indices._types.Queries": { + "type": "object", + "properties": { + "cache": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.CacheQueries" + } + ] + } + } + }, + "indices._types.CacheQueries": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + }, + "indices._types.SettingsSimilarity": { + "discriminator": { + "propertyName": "type", + "mapping": { + "BM25": "#/components/schemas/indices._types.SettingsSimilarityBm25", + "DFI": "#/components/schemas/indices._types.SettingsSimilarityDfi", + "DFR": "#/components/schemas/indices._types.SettingsSimilarityDfr", + "IB": "#/components/schemas/indices._types.SettingsSimilarityIb", + "LMDirichlet": "#/components/schemas/indices._types.SettingsSimilarityLmd", + "LMJelinekMercer": "#/components/schemas/indices._types.SettingsSimilarityLmj", + "boolean": "#/components/schemas/indices._types.SettingsSimilarityBoolean", + "scripted": "#/components/schemas/indices._types.SettingsSimilarityScripted" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.SettingsSimilarityBm25" + }, + { + "$ref": "#/components/schemas/indices._types.SettingsSimilarityBoolean" + }, + { + "$ref": "#/components/schemas/indices._types.SettingsSimilarityDfi" + }, + { + "$ref": "#/components/schemas/indices._types.SettingsSimilarityDfr" + }, + { + "$ref": "#/components/schemas/indices._types.SettingsSimilarityIb" + }, + { + "$ref": "#/components/schemas/indices._types.SettingsSimilarityLmd" + }, + { + "$ref": "#/components/schemas/indices._types.SettingsSimilarityLmj" + }, + { + "$ref": "#/components/schemas/indices._types.SettingsSimilarityScripted" + } + ] + }, + "indices._types.SettingsSimilarityBm25": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "BM25" + ] + }, + "b": { "type": "number" }, - "min_segment_size": { + "discount_overlaps": { + "type": "boolean" + }, + "k1": { "type": "number" } }, "required": [ - "max", - "min", - "min_segment_size" + "type" ] }, - "_types.mapping.VersionProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + "indices._types.SettingsSimilarityBoolean": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean" + ] + } + }, + "required": [ + "type" + ] + }, + "indices._types.SettingsSimilarityDfi": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "DFI" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "version" - ] + "independence_measure": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DFIIndependenceMeasure" } - }, - "required": [ - "type" ] } + }, + "required": [ + "type", + "independence_measure" ] }, - "_types.mapping.WildcardProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + "_types.DFIIndependenceMeasure": { + "type": "string", + "enum": [ + "standardized", + "saturated", + "chisquared" + ] + }, + "indices._types.SettingsSimilarityDfr": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "DFR" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "wildcard" - ] - }, - "null_value": { - "type": "string" + "after_effect": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DFRAfterEffect" + } + ] + }, + "basic_model": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DFRBasicModel" + } + ] + }, + "normalization": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Normalization" + } + ] + } + }, + "required": [ + "type", + "after_effect", + "basic_model", + "normalization" + ] + }, + "_types.DFRAfterEffect": { + "type": "string", + "enum": [ + "no", + "b", + "l" + ] + }, + "_types.DFRBasicModel": { + "type": "string", + "enum": [ + "be", + "d", + "g", + "if", + "in", + "ine", + "p" + ] + }, + "_types.Normalization": { + "type": "string", + "enum": [ + "no", + "h1", + "h2", + "h3", + "z" + ] + }, + "indices._types.SettingsSimilarityIb": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "IB" + ] + }, + "distribution": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IBDistribution" + } + ] + }, + "lambda": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IBLambda" + } + ] + }, + "normalization": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Normalization" + } + ] + } + }, + "required": [ + "type", + "distribution", + "lambda", + "normalization" + ] + }, + "_types.IBDistribution": { + "type": "string", + "enum": [ + "ll", + "spl" + ] + }, + "_types.IBLambda": { + "type": "string", + "enum": [ + "df", + "ttf" + ] + }, + "indices._types.SettingsSimilarityLmd": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "LMDirichlet" + ] + }, + "mu": { + "type": "number" + } + }, + "required": [ + "type" + ] + }, + "indices._types.SettingsSimilarityLmj": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "LMJelinekMercer" + ] + }, + "lambda": { + "type": "number" + } + }, + "required": [ + "type" + ] + }, + "indices._types.SettingsSimilarityScripted": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scripted" + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.DateNanosProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "boost": { - "type": "number" - }, - "format": { - "type": "string" - }, - "ignore_malformed": { - "type": "boolean" - }, - "index": { - "type": "boolean" - }, - "script": { + "weight_script": { + "allOf": [ + { "$ref": "#/components/schemas/_types.Script" - }, - "on_script_error": { - "$ref": "#/components/schemas/_types.mapping.OnScriptError" - }, - "null_value": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "precision_step": { - "type": "number" - }, - "type": { - "type": "string", - "enum": [ - "date_nanos" - ] } - }, - "required": [ - "type" ] } + }, + "required": [ + "type", + "script" ] }, - "_types.mapping.DateProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + "indices._types.MappingLimitSettings": { + "description": "Mapping Limit Settings", + "type": "object", + "properties": { + "coerce": { + "type": "boolean" }, - { - "type": "object", - "properties": { - "boost": { - "type": "number" - }, - "fielddata": { - "$ref": "#/components/schemas/indices._types.NumericFielddata" - }, - "format": { - "type": "string" - }, - "ignore_malformed": { - "type": "boolean" - }, - "index": { + "total_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MappingLimitSettingsTotalFields" + } + ] + }, + "depth": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MappingLimitSettingsDepth" + } + ] + }, + "nested_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MappingLimitSettingsNestedFields" + } + ] + }, + "nested_objects": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MappingLimitSettingsNestedObjects" + } + ] + }, + "field_name_length": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MappingLimitSettingsFieldNameLength" + } + ] + }, + "dimension_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MappingLimitSettingsDimensionFields" + } + ] + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.MappingLimitSettingsSourceFields" + } + ] + }, + "ignore_malformed": { + "oneOf": [ + { "type": "boolean" }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "on_script_error": { - "$ref": "#/components/schemas/_types.mapping.OnScriptError" - }, - "null_value": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "precision_step": { - "type": "number" - }, - "locale": { + { "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "date" - ] } - }, - "required": [ - "type" ] } - ] + } }, - "_types.mapping.AggregateMetricDoubleProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "aggregate_metric_double" - ] + "indices._types.MappingLimitSettingsTotalFields": { + "type": "object", + "properties": { + "limit": { + "description": "The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit.\nThe limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance\ndegradations and memory issues, especially in clusters with a high load or few resources.", + "default": "1000", + "oneOf": [ + { + "type": "number" }, - "default_metric": { + { "type": "string" - }, - "metrics": { - "type": "array", - "items": { - "type": "string" - } - }, - "time_series_metric": { - "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" } - }, - "required": [ - "type", - "default_metric", - "metrics" ] - } - ] - }, - "_types.mapping.DenseVectorProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "dense_vector" - ] - }, - "dims": { - "description": "Number of vector dimensions. Can't exceed `4096`. If `dims` is not specified, it will be set to the length of\nthe first vector added to the field.", - "type": "number" - }, - "element_type": { - "$ref": "#/components/schemas/_types.mapping.DenseVectorElementType" - }, - "index": { - "description": "If `true`, you can search this field using the kNN search API.", + "ignore_dynamic_beyond_limit": { + "description": "This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set\nto false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail\nwith the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail.\nInstead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false.\nThe fields that were not added to the mapping will be added to the _ignored field.", + "default": "false", + "oneOf": [ + { "type": "boolean" }, - "index_options": { - "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptions" - }, - "similarity": { - "$ref": "#/components/schemas/_types.mapping.DenseVectorSimilarity" + { + "type": "string" } - }, - "required": [ - "type" ] } - ] - }, - "_types.mapping.DenseVectorElementType": { - "type": "string", - "enum": [ - "bit", - "byte", - "float" - ] + } }, - "_types.mapping.DenseVectorIndexOptions": { + "indices._types.MappingLimitSettingsDepth": { "type": "object", "properties": { - "confidence_interval": { - "description": "The confidence interval to use when quantizing the vectors. Can be any value between and including `0.90` and\n`1.0` or exactly `0`. When the value is `0`, this indicates that dynamic quantiles should be calculated for\noptimized quantization. When between `0.90` and `1.0`, this value restricts the values used when calculating\nthe quantization thresholds.\n\nFor example, a value of `0.95` will only use the middle `95%` of the values when calculating the quantization\nthresholds (e.g. the highest and lowest `2.5%` of values will be ignored).\n\nDefaults to `1/(dims + 1)` for `int8` quantized vectors and `0` for `int4` for dynamic quantile calculation.\n\nOnly applicable to `int8_hnsw`, `int4_hnsw`, `int8_flat`, and `int4_flat` index types.", + "limit": { + "description": "The maximum depth for a field, which is measured as the number of inner objects. For instance, if all fields are defined\nat the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc.", + "default": 20.0, "type": "number" - }, - "ef_construction": { - "description": "The number of candidates to track while assembling the list of nearest neighbors for each new node.\n\nOnly applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.", + } + } + }, + "indices._types.MappingLimitSettingsNestedFields": { + "type": "object", + "properties": { + "limit": { + "description": "The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when\narrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this\nsetting limits the number of unique nested types per index.", + "default": 50.0, "type": "number" - }, - "m": { - "description": "The number of neighbors each node will be connected to in the HNSW graph.\n\nOnly applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.", + } + } + }, + "indices._types.MappingLimitSettingsNestedObjects": { + "type": "object", + "properties": { + "limit": { + "description": "The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps\nto prevent out of memory errors when a document contains too many nested objects.", + "default": 10000.0, "type": "number" - }, - "type": { - "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptionsType" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptionsRescoreVector" } - }, - "required": [ - "type" - ] + } }, - "_types.mapping.DenseVectorIndexOptionsType": { - "type": "string", - "enum": [ - "bbq_flat", - "bbq_hnsw", - "flat", - "hnsw", - "int4_flat", - "int4_hnsw", - "int8_flat", - "int8_hnsw" - ] + "indices._types.MappingLimitSettingsFieldNameLength": { + "type": "object", + "properties": { + "limit": { + "description": "Setting for the maximum length of a field name. This setting isn’t really something that addresses mappings explosion but\nmight still be useful if you want to limit the field length. It usually shouldn’t be necessary to set this setting. The\ndefault is okay unless a user starts to add a huge number of fields with really long names. Default is `Long.MAX_VALUE` (no limit).", + "type": "number" + } + } }, - "_types.mapping.DenseVectorIndexOptionsRescoreVector": { + "indices._types.MappingLimitSettingsDimensionFields": { "type": "object", "properties": { - "oversample": { - "description": "The oversampling factor to use when searching for the nearest neighbor. This is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`.\nWhen provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors.\n\nvalid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling.", + "limit": { + "description": "[preview] This functionality is in technical preview and may be changed or removed in a future release.\nElastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", "type": "number" } + } + }, + "indices._types.MappingLimitSettingsSourceFields": { + "type": "object", + "properties": { + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SourceMode" + } + ] + } }, "required": [ - "oversample" + "mode" ] }, - "_types.mapping.DenseVectorSimilarity": { + "indices._types.SourceMode": { "type": "string", "enum": [ - "cosine", - "dot_product", - "l2_norm", - "max_inner_product" + "disabled", + "stored", + "synthetic" ] }, - "_types.mapping.FlattenedProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" + "indices._types.IndexingSlowlogSettings": { + "type": "object", + "properties": { + "level": { + "type": "string" }, - { - "type": "object", - "properties": { - "boost": { - "type": "number" - }, - "depth_limit": { - "type": "number" - }, - "doc_values": { - "type": "boolean" - }, - "eager_global_ordinals": { - "type": "boolean" - }, - "index": { - "type": "boolean" - }, - "index_options": { - "$ref": "#/components/schemas/_types.mapping.IndexOptions" - }, - "null_value": { - "type": "string" - }, - "similarity": { - "type": "string" - }, - "split_queries_on_whitespace": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "flattened" - ] + "source": { + "type": "number" + }, + "reformat": { + "type": "boolean" + }, + "threshold": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexingSlowlogTresholds" } - }, - "required": [ - "type" ] } - ] + } }, - "_types.mapping.NestedProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" - }, - { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "include_in_parent": { - "type": "boolean" - }, - "include_in_root": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "nested" - ] + "indices._types.IndexingSlowlogTresholds": { + "type": "object", + "properties": { + "index": { + "description": "The indexing slow log, similar in functionality to the search slow log. The log file name ends with `_index_indexing_slowlog.json`.\nLog and the thresholds are configured in the same way as the search slowlog.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels" } - }, - "required": [ - "type" ] } - ] + } }, - "_types.mapping.ObjectProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" - }, - { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "subobjects": { - "$ref": "#/components/schemas/_types.mapping.Subobjects" - }, - "type": { - "type": "string", - "enum": [ - "object" - ] + "indices._types.IndexingPressure": { + "type": "object", + "properties": { + "memory": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexingPressureMemory" } - } + ] } + }, + "required": [ + "memory" ] }, - "_types.mapping.Subobjects": { - "type": "string", - "enum": [ - "true", - "false" - ] + "indices._types.IndexingPressureMemory": { + "type": "object", + "properties": { + "limit": { + "description": "Number of outstanding bytes that may be consumed by indexing requests. When this limit is reached or exceeded,\nthe node will reject new coordinating and primary operations. When replica operations consume 1.5x this limit,\nthe node will reject new replica operations. Defaults to 10% of the heap.", + "type": "number" + } + } }, - "_types.mapping.PassthroughObjectProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" + "indices._types.Storage": { + "type": "object", + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.StorageType" + } + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "passthrough" - ] - }, - "enabled": { - "type": "boolean" - }, - "priority": { - "type": "number" - }, - "time_series_dimension": { - "type": "boolean" + "allow_mmap": { + "description": "You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap.\nThis is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This\nsetting is useful, for example, if you are in an environment where you can not control the ability to create a lot\nof memory maps so you need disable the ability to use memory-mapping.", + "type": "boolean" + }, + "stats_refresh_interval": { + "description": "How often store statistics are refreshed", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - } + ] } + }, + "required": [ + "type" ] }, - "_types.mapping.SemanticTextProperty": { - "type": "object", - "properties": { - "type": { + "indices._types.StorageType": { + "anyOf": [ + { "type": "string", "enum": [ - "semantic_text" + "fs", + "niofs", + "mmapfs", + "hybridfs" + ] + }, + { + "type": "string" + } + ] + }, + "ccr.follow_info.FollowerIndex": { + "type": "object", + "properties": { + "follower_index": { + "description": "The name of the follower index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } ] }, - "meta": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "leader_index": { + "description": "The name of the index in the leader cluster that is followed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "inference_id": { - "$ref": "#/components/schemas/_types.Id" + "parameters": { + "description": "An object that encapsulates cross-cluster replication parameters. If the follower index's status is paused, this object is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/ccr.follow_info.FollowerIndexParameters" + } + ] }, - "search_inference_id": { - "$ref": "#/components/schemas/_types.Id" + "remote_cluster": { + "description": "The remote cluster that contains the leader index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "chunking_settings": { - "$ref": "#/components/schemas/_types.mapping.ChunkingSettings" + "status": { + "description": "The status of the index following: `active` or `paused`.", + "allOf": [ + { + "$ref": "#/components/schemas/ccr.follow_info.FollowerIndexStatus" + } + ] } }, "required": [ - "type" + "follower_index", + "leader_index", + "remote_cluster", + "status" ] }, - "_types.mapping.ChunkingSettings": { + "ccr.follow_info.FollowerIndexParameters": { "type": "object", "properties": { - "strategy": { - "description": "The chunking strategy: `sentence` or `word`.", - "type": "string" - }, - "max_chunk_size": { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "max_outstanding_read_requests": { + "description": "The maximum number of outstanding reads requests from the remote cluster.", "type": "number" }, - "overlap": { - "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "max_outstanding_write_requests": { + "description": "The maximum number of outstanding write requests on the follower.", "type": "number" }, - "sentence_overlap": { - "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "max_read_request_operation_count": { + "description": "The maximum number of operations to pull per read from the remote cluster.", "type": "number" - } - }, - "required": [ - "strategy", - "max_chunk_size" - ] - }, - "_types.mapping.SparseVectorProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "sparse_vector" - ] + "max_read_request_size": { + "description": "The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.CompletionProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "analyzer": { - "type": "string" - }, - "contexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.mapping.SuggestContext" - } - }, - "max_input_length": { - "type": "number" - }, - "preserve_position_increments": { - "type": "boolean" - }, - "preserve_separators": { - "type": "boolean" - }, - "search_analyzer": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "completion" - ] + "max_retry_delay": { + "description": "The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when\nretrying.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.SuggestContext": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" }, - "path": { - "$ref": "#/components/schemas/_types.Field" + "max_write_buffer_count": { + "description": "The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be\ndeferred until the number of queued operations goes below the limit.", + "type": "number" }, - "type": { - "type": "string" + "max_write_buffer_size": { + "description": "The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will\nbe deferred until the total bytes of queued operations goes below the limit.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "precision": { - "oneOf": [ + "max_write_request_operation_count": { + "description": "The maximum number of operations per bulk write request executed on the follower.", + "type": "number" + }, + "max_write_request_size": { + "description": "The maximum total bytes of operations per bulk write request executed on the follower.", + "allOf": [ { - "type": "number" - }, + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "read_poll_timeout": { + "description": "The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.\nWhen the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.\nThen the follower will immediately attempt to read from the leader again.", + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.Duration" } ] } - }, - "required": [ - "name", - "type" + } + }, + "ccr.follow_info.FollowerIndexStatus": { + "type": "string", + "enum": [ + "active", + "paused" ] }, - "_types.mapping.ConstantKeywordProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" - }, - { - "type": "object", - "properties": { - "value": { - "type": "object" - }, - "type": { - "type": "string", - "enum": [ - "constant_keyword" - ] + "ccr._types.FollowIndexStats": { + "type": "object", + "properties": { + "index": { + "description": "The name of the follower index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - }, - "required": [ - "type" ] + }, + "shards": { + "description": "An array of shard-level following task statistics.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ccr._types.ShardStats" + } } + }, + "required": [ + "index", + "shards" ] }, - "_types.mapping.CountedKeywordProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" + "ccr._types.ShardStats": { + "type": "object", + "properties": { + "bytes_read": { + "description": "The total of transferred bytes read from the leader.\nThis is only an estimate and does not account for compression if enabled.", + "type": "number" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "counted_keyword" - ] - }, - "index": { - "type": "boolean" + "failed_read_requests": { + "description": "The number of failed reads.", + "type": "number" + }, + "failed_write_requests": { + "description": "The number of failed bulk write requests on the follower.", + "type": "number" + }, + "fatal_exception": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.FieldAliasProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - { - "type": "object", - "properties": { - "path": { - "$ref": "#/components/schemas/_types.Field" - }, - "type": { - "type": "string", - "enum": [ - "alias" - ] + "follower_aliases_version": { + "description": "The index aliases version the follower is synced up to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.HistogramProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - { - "type": "object", - "properties": { - "ignore_malformed": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "histogram" - ] + "follower_global_checkpoint": { + "description": "The current global checkpoint on the follower.\nThe difference between the `leader_global_checkpoint` and the `follower_global_checkpoint` is an indication of how much the follower is lagging the leader.", + "type": "number" + }, + "follower_index": { + "description": "The name of the follower index.", + "type": "string" + }, + "follower_mapping_version": { + "description": "The mapping version the follower is synced up to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.IpProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "boost": { - "type": "number" - }, - "index": { - "type": "boolean" - }, - "ignore_malformed": { - "type": "boolean" - }, - "null_value": { - "type": "string" - }, - "on_script_error": { - "$ref": "#/components/schemas/_types.mapping.OnScriptError" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "time_series_dimension": { - "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", - "x-state": "Technical preview", - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "ip" - ] + "follower_max_seq_no": { + "description": "The current maximum sequence number on the follower.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.Murmur3HashProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "murmur3" - ] + "follower_settings_version": { + "description": "The index settings version the follower is synced up to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.TokenCountProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "analyzer": { - "type": "string" - }, - "boost": { - "type": "number" - }, - "index": { - "type": "boolean" - }, - "null_value": { - "type": "number" - }, - "enable_position_increments": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "token_count" - ] + "last_requested_seq_no": { + "description": "The starting sequence number of the last batch of operations requested from the leader.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.GeoPointProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "ignore_malformed": { - "type": "boolean" - }, - "ignore_z_value": { - "type": "boolean" - }, - "null_value": { - "$ref": "#/components/schemas/_types.GeoLocation" - }, - "index": { - "type": "boolean" - }, - "on_script_error": { - "$ref": "#/components/schemas/_types.mapping.OnScriptError" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "type": { - "type": "string", - "enum": [ - "geo_point" - ] + "leader_global_checkpoint": { + "description": "The current global checkpoint on the leader known to the follower task.", + "type": "number" + }, + "leader_index": { + "description": "The name of the index in the leader cluster being followed.", + "type": "string" + }, + "leader_max_seq_no": { + "description": "The current maximum sequence number on the leader known to the follower task.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.GeoShapeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "coerce": { - "type": "boolean" - }, - "ignore_malformed": { - "type": "boolean" - }, - "ignore_z_value": { - "type": "boolean" - }, - "index": { - "type": "boolean" - }, - "orientation": { - "$ref": "#/components/schemas/_types.mapping.GeoOrientation" - }, - "strategy": { - "$ref": "#/components/schemas/_types.mapping.GeoStrategy" - }, - "type": { - "type": "string", - "enum": [ - "geo_shape" - ] + "operations_read": { + "description": "The total number of operations read from the leader.", + "type": "number" + }, + "operations_written": { + "description": "The number of operations written on the follower.", + "type": "number" + }, + "outstanding_read_requests": { + "description": "The number of active read requests from the follower.", + "type": "number" + }, + "outstanding_write_requests": { + "description": "The number of active bulk write requests on the follower.", + "type": "number" + }, + "read_exceptions": { + "description": "An array of objects representing failed reads.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ccr._types.ReadException" + } + }, + "remote_cluster": { + "description": "The remote cluster containing the leader index.", + "type": "string" + }, + "shard_id": { + "description": "The numerical shard ID, with values from 0 to one less than the number of replicas.", + "type": "number" + }, + "successful_read_requests": { + "description": "The number of successful fetches.", + "type": "number" + }, + "successful_write_requests": { + "description": "The number of bulk write requests run on the follower.", + "type": "number" + }, + "time_since_last_read": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.GeoOrientation": { - "type": "string", - "enum": [ - "right", - "RIGHT", - "counterclockwise", - "ccw", - "left", - "LEFT", - "clockwise", - "cw" - ] - }, - "_types.mapping.GeoStrategy": { - "type": "string", - "enum": [ - "recursive", - "term" - ] - }, - "_types.mapping.PointProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "ignore_malformed": { - "type": "boolean" - }, - "ignore_z_value": { - "type": "boolean" - }, - "null_value": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "point" - ] + "time_since_last_read_millis": { + "description": "The number of milliseconds since a read request was sent to the leader.\nWhen the follower is caught up to the leader, this number will increase up to the configured `read_poll_timeout` at which point another read request will be sent to the leader.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.ShapeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "coerce": { - "type": "boolean" - }, - "ignore_malformed": { - "type": "boolean" - }, - "ignore_z_value": { - "type": "boolean" - }, - "orientation": { - "$ref": "#/components/schemas/_types.mapping.GeoOrientation" - }, - "type": { - "type": "string", - "enum": [ - "shape" - ] + "total_read_remote_exec_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.ByteNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "byte" - ] - }, - "null_value": { - "$ref": "#/components/schemas/_types.byte" + "total_read_remote_exec_time_millis": { + "description": "The total time reads spent running on the remote cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.byte": { - "type": "number" - }, - "_types.mapping.NumberPropertyBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "boost": { - "type": "number" - }, - "coerce": { - "type": "boolean" - }, - "ignore_malformed": { - "type": "boolean" - }, - "index": { - "type": "boolean" - }, - "on_script_error": { - "$ref": "#/components/schemas/_types.mapping.OnScriptError" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "time_series_metric": { - "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" - }, - "time_series_dimension": { - "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", - "x-state": "Technical preview", - "type": "boolean" + "total_read_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - } - } - ] - }, - "_types.mapping.DoubleNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "double" - ] - }, - "null_value": { - "type": "number" + "total_read_time_millis": { + "description": "The total time reads were outstanding, measured from the time a read was sent to the leader to the time a reply was returned to the follower.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.FloatNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "float" - ] - }, - "null_value": { - "type": "number" + "total_write_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.HalfFloatNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "half_float" - ] - }, - "null_value": { - "type": "number" + "total_write_time_millis": { + "description": "The total time spent writing on the follower.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.IntegerNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "integer" - ] - }, - "null_value": { - "type": "number" + "write_buffer_operation_count": { + "description": "The number of write operations queued on the follower.", + "type": "number" + }, + "write_buffer_size_in_bytes": { + "description": "The total number of bytes of operations currently queued for writing.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - }, - "required": [ - "type" ] } + }, + "required": [ + "bytes_read", + "failed_read_requests", + "failed_write_requests", + "follower_aliases_version", + "follower_global_checkpoint", + "follower_index", + "follower_mapping_version", + "follower_max_seq_no", + "follower_settings_version", + "last_requested_seq_no", + "leader_global_checkpoint", + "leader_index", + "leader_max_seq_no", + "operations_read", + "operations_written", + "outstanding_read_requests", + "outstanding_write_requests", + "read_exceptions", + "remote_cluster", + "shard_id", + "successful_read_requests", + "successful_write_requests", + "time_since_last_read_millis", + "total_read_remote_exec_time_millis", + "total_read_time_millis", + "total_write_time_millis", + "write_buffer_operation_count", + "write_buffer_size_in_bytes" ] }, - "_types.mapping.LongNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "long" - ] - }, - "null_value": { - "type": "number" + "ccr._types.ReadException": { + "type": "object", + "properties": { + "exception": { + "description": "The exception that caused the read to fail.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.ScaledFloatNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "scaled_float" - ] - }, - "null_value": { - "type": "number" - }, - "scaling_factor": { - "type": "number" + "from_seq_no": { + "description": "The starting sequence number of the batch requested from the leader.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" } - }, - "required": [ - "type" ] + }, + "retries": { + "description": "The number of times the batch has been retried.", + "type": "number" } + }, + "required": [ + "exception", + "from_seq_no", + "retries" ] }, - "_types.mapping.ShortNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" + "ccr.get_auto_follow_pattern.AutoFollowPattern": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "short" - ] - }, - "null_value": { - "$ref": "#/components/schemas/_types.short" + "pattern": { + "allOf": [ + { + "$ref": "#/components/schemas/ccr.get_auto_follow_pattern.AutoFollowPatternSummary" } - }, - "required": [ - "type" ] } + }, + "required": [ + "name", + "pattern" ] }, - "_types.short": { - "type": "number" - }, - "_types.mapping.UnsignedLongNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" + "ccr.get_auto_follow_pattern.AutoFollowPatternSummary": { + "type": "object", + "properties": { + "active": { + "type": "boolean" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "unsigned_long" - ] - }, - "null_value": { - "$ref": "#/components/schemas/_types.ulong" + "remote_cluster": { + "description": "The remote cluster containing the leader indices to match against.", + "type": "string" + }, + "follow_index_pattern": { + "description": "The name of follower index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexPattern" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.ulong": { - "type": "number" - }, - "_types.mapping.DateRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, - { - "type": "object", - "properties": { - "format": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "date_range" - ] + "leader_index_patterns": { + "description": "An array of simple index patterns to match against indices in the remote cluster specified by the remote_cluster field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexPatterns" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.RangePropertyBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - { - "type": "object", - "properties": { - "boost": { - "type": "number" - }, - "coerce": { - "type": "boolean" - }, - "index": { - "type": "boolean" + "leader_index_exclusion_patterns": { + "description": "An array of simple index patterns that can be used to exclude indices from being auto-followed.", + "x-state": "Generally available; Added in 7.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexPatterns" } - } + ] + }, + "max_outstanding_read_requests": { + "description": "The maximum number of outstanding reads requests from the remote cluster.", + "type": "number" } + }, + "required": [ + "active", + "remote_cluster", + "leader_index_patterns", + "leader_index_exclusion_patterns", + "max_outstanding_read_requests" ] }, - "_types.mapping.DoubleRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" + "_types.IndexPattern": { + "type": "string" + }, + "_types.IndexPatterns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexPattern" + } + }, + "ccr.stats.AutoFollowStats": { + "type": "object", + "properties": { + "auto_followed_clusters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ccr.stats.AutoFollowedCluster" + } }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "double_range" - ] - } - }, - "required": [ - "type" - ] + "number_of_failed_follow_indices": { + "description": "The number of indices that the auto-follow coordinator failed to automatically follow.\nThe causes of recent failures are captured in the logs of the elected master node and in the `auto_follow_stats.recent_auto_follow_errors` field.", + "type": "number" + }, + "number_of_failed_remote_cluster_state_requests": { + "description": "The number of times that the auto-follow coordinator failed to retrieve the cluster state from a remote cluster registered in a collection of auto-follow patterns.", + "type": "number" + }, + "number_of_successful_follow_indices": { + "description": "The number of indices that the auto-follow coordinator successfully followed.", + "type": "number" + }, + "recent_auto_follow_errors": { + "description": "An array of objects representing failures by the auto-follow coordinator.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ErrorCause" + } } + }, + "required": [ + "auto_followed_clusters", + "number_of_failed_follow_indices", + "number_of_failed_remote_cluster_state_requests", + "number_of_successful_follow_indices", + "recent_auto_follow_errors" ] }, - "_types.mapping.FloatRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "float_range" - ] + "ccr.stats.AutoFollowedCluster": { + "type": "object", + "properties": { + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.IntegerRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "integer_range" - ] + "last_seen_metadata_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping.IpRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "ip_range" - ] + "time_since_last_check_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - }, - "required": [ - "type" ] } + }, + "required": [ + "cluster_name", + "last_seen_metadata_version", + "time_since_last_check_millis" ] }, - "_types.mapping.LongRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "long_range" - ] - } - }, - "required": [ - "type" - ] + "ccr.stats.FollowStats": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ccr._types.FollowIndexStats" + } } + }, + "required": [ + "indices" ] }, - "_types.mapping.IcuCollationProperty": { - "allOf": [ + "_types.ScrollIds": { + "oneOf": [ { - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + "$ref": "#/components/schemas/_types.ScrollId" }, { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "icu_collation_keyword" - ] - }, - "norms": { - "type": "boolean" - }, - "index_options": { - "$ref": "#/components/schemas/_types.mapping.IndexOptions" - }, - "index": { - "description": "Should the field be searchable?", - "type": "boolean" - }, - "null_value": { - "description": "Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing.", - "type": "string" - }, - "rules": { - "type": "string" - }, - "language": { - "type": "string" - }, - "country": { - "type": "string" - }, - "variant": { - "type": "string" - }, - "strength": { - "$ref": "#/components/schemas/_types.analysis.IcuCollationStrength" - }, - "decomposition": { - "$ref": "#/components/schemas/_types.analysis.IcuCollationDecomposition" - }, - "alternate": { - "$ref": "#/components/schemas/_types.analysis.IcuCollationAlternate" - }, - "case_level": { - "type": "boolean" - }, - "case_first": { - "$ref": "#/components/schemas/_types.analysis.IcuCollationCaseFirst" - }, - "numeric": { - "type": "boolean" - }, - "variable_top": { - "type": "string" - }, - "hiragana_quaternary_mode": { - "type": "boolean" - } - }, - "required": [ - "type" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ScrollId" + } } ] }, - "_types.mapping.MatchType": { + "cluster.allocation_explain.Decision": { "type": "string", "enum": [ - "simple", - "regex" + "yes", + "no", + "worse_balance", + "throttled", + "awaiting_info", + "allocation_delayed", + "no_valid_shard_copy", + "no_attempt" ] }, - "_types.mapping.FieldNamesField": { + "cluster.allocation_explain.AllocationDecision": { "type": "object", "properties": { - "enabled": { - "type": "boolean" + "decider": { + "type": "string" + }, + "decision": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.AllocationExplainDecision" + } + ] + }, + "explanation": { + "type": "string" } }, "required": [ - "enabled" + "decider", + "decision", + "explanation" ] }, - "_types.mapping.IndexField": { + "cluster.allocation_explain.AllocationExplainDecision": { + "type": "string", + "enum": [ + "NO", + "YES", + "THROTTLE", + "ALWAYS" + ] + }, + "cluster.allocation_explain.ClusterInfo": { "type": "object", "properties": { - "enabled": { - "type": "boolean" + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.allocation_explain.NodeDiskUsage" + } + }, + "shard_sizes": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "shard_data_set_sizes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "shard_paths": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "reserved_sizes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.allocation_explain.ReservedSize" + } } }, "required": [ - "enabled" + "nodes", + "shard_sizes", + "shard_paths", + "reserved_sizes" ] }, - "_types.mapping.RoutingField": { + "cluster.allocation_explain.NodeDiskUsage": { "type": "object", "properties": { - "required": { - "type": "boolean" + "node_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "least_available": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.DiskUsage" + } + ] + }, + "most_available": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.DiskUsage" + } + ] } }, "required": [ - "required" + "node_name", + "least_available", + "most_available" ] }, - "_types.mapping.SizeField": { + "cluster.allocation_explain.DiskUsage": { "type": "object", "properties": { - "enabled": { - "type": "boolean" + "path": { + "type": "string" + }, + "total_bytes": { + "type": "number" + }, + "used_bytes": { + "type": "number" + }, + "free_bytes": { + "type": "number" + }, + "free_disk_percent": { + "type": "number" + }, + "used_disk_percent": { + "type": "number" } }, "required": [ - "enabled" + "path", + "total_bytes", + "used_bytes", + "free_bytes", + "free_disk_percent", + "used_disk_percent" ] }, - "_types.mapping.SourceField": { + "cluster.allocation_explain.ReservedSize": { "type": "object", "properties": { - "compress": { - "type": "boolean" + "node_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "compress_threshold": { + "path": { "type": "string" }, - "enabled": { - "type": "boolean" - }, - "excludes": { - "type": "array", - "items": { - "type": "string" - } + "total": { + "type": "number" }, - "includes": { + "shards": { "type": "array", "items": { "type": "string" } - }, - "mode": { - "$ref": "#/components/schemas/_types.mapping.SourceFieldMode" - } - } - }, - "_types.mapping.SourceFieldMode": { - "type": "string", - "enum": [ - "disabled", - "stored", - "synthetic" - ] - }, - "_types.mapping.DataStreamTimestamp": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" } }, "required": [ - "enabled" + "node_id", + "path", + "total", + "shards" ] }, - "indices._types.AliasDefinition": { + "cluster.allocation_explain.CurrentNode": { "type": "object", "properties": { - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "index_routing": { - "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.", - "type": "string" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "is_write_index": { - "description": "If `true`, the index is the write index for the alias.", - "type": "boolean" + "roles": { + "x-state": "Generally available; Added in 8.11.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeRoles" + } + ] }, - "routing": { - "description": "Value used to route indexing and search operations to a specific shard.", - "type": "string" + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "search_routing": { - "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.", - "type": "string" + "transport_address": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] }, - "is_hidden": { - "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", - "type": "boolean" + "weight_ranking": { + "type": "number" } + }, + "required": [ + "id", + "name", + "roles", + "attributes", + "transport_address", + "weight_ranking" + ] + }, + "_types.NodeRoles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.NodeRole" } }, - "indices._types.DataStreamLifecycleWithRollover": { - "allOf": [ - { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycle" - }, - { - "type": "object", - "properties": { - "rollover": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleRolloverConditions" - } - } - } + "_types.NodeRole": { + "type": "string", + "enum": [ + "master", + "data", + "data_cold", + "data_content", + "data_frozen", + "data_hot", + "data_warm", + "client", + "ingest", + "ml", + "voting_only", + "transform", + "remote_cluster_client", + "coordinating_only" ] }, - "indices._types.DataStreamLifecycleRolloverConditions": { + "_types.TransportAddress": { + "type": "string" + }, + "cluster.allocation_explain.NodeAllocationExplanation": { "type": "object", "properties": { - "min_age": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_age": { - "type": "string" + "deciders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.allocation_explain.AllocationDecision" + } }, - "min_docs": { - "type": "number" + "node_attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "max_docs": { - "type": "number" + "node_decision": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.Decision" + } + ] }, - "min_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "node_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "max_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "node_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "min_primary_shard_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "roles": { + "x-state": "Generally available; Added in 8.11.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeRoles" + } + ] }, - "max_primary_shard_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "store": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.AllocationStore" + } + ] }, - "min_primary_shard_docs": { - "type": "number" + "transport_address": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] }, - "max_primary_shard_docs": { + "weight_ranking": { "type": "number" } - } + }, + "required": [ + "node_attributes", + "node_decision", + "node_id", + "node_name", + "roles", + "transport_address" + ] }, - "indices._types.DataStreamLifecycle": { + "cluster.allocation_explain.AllocationStore": { "type": "object", "properties": { - "data_retention": { - "$ref": "#/components/schemas/_types.Duration" + "allocation_id": { + "type": "string" }, - "downsampling": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleDownsampling" + "found": { + "type": "boolean" }, - "enabled": { - "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "in_sync": { "type": "boolean" - } - } - }, - "indices._types.DataStreamLifecycleDownsampling": { - "type": "object", - "properties": { - "rounds": { - "description": "The list of downsampling rounds to execute as part of this downsampling configuration", - "type": "array", - "items": { - "$ref": "#/components/schemas/indices._types.DownsamplingRound" - } + }, + "matching_size_in_bytes": { + "type": "number" + }, + "matching_sync_id": { + "type": "boolean" + }, + "store_exception": { + "type": "string" } }, "required": [ - "rounds" + "allocation_id", + "found", + "in_sync", + "matching_size_in_bytes", + "matching_sync_id", + "store_exception" ] }, - "indices._types.DownsamplingRound": { + "cluster.allocation_explain.UnassignedInformation": { "type": "object", "properties": { - "after": { - "$ref": "#/components/schemas/_types.Duration" + "at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "config": { - "$ref": "#/components/schemas/indices._types.DownsampleConfig" + "last_allocation_status": { + "type": "string" + }, + "reason": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.UnassignedInformationReason" + } + ] + }, + "details": { + "type": "string" + }, + "failed_allocation_attempts": { + "type": "number" + }, + "delayed": { + "type": "boolean" + }, + "allocation_status": { + "type": "string" } }, "required": [ - "after", - "config" + "at", + "reason" ] }, - "indices._types.DownsampleConfig": { - "type": "object", - "properties": { - "fixed_interval": { - "$ref": "#/components/schemas/_types.DurationLarge" - } - }, - "required": [ - "fixed_interval" + "cluster.allocation_explain.UnassignedInformationReason": { + "type": "string", + "enum": [ + "INDEX_CREATED", + "CLUSTER_RECOVERED", + "INDEX_REOPENED", + "DANGLING_INDEX_IMPORTED", + "NEW_INDEX_RESTORED", + "EXISTING_INDEX_RESTORED", + "REPLICA_ADDED", + "ALLOCATION_FAILED", + "NODE_LEFT", + "REROUTE_CANCELLED", + "REINITIALIZED", + "REALLOCATED_REPLICA", + "PRIMARY_FAILED", + "FORCED_EMPTY_PRIMARY", + "MANUAL_ALLOCATION" ] }, - "indices._types.DataStreamOptionsTemplate": { + "cluster._types.ComponentTemplate": { "type": "object", "properties": { - "failure_store": { - "oneOf": [ + "name": { + "allOf": [ { - "$ref": "#/components/schemas/indices._types.DataStreamFailureStoreTemplate" - }, + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "component_template": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/cluster._types.ComponentTemplateNode" } ] } - } + }, + "required": [ + "name", + "component_template" + ] }, - "indices._types.DataStreamFailureStoreTemplate": { + "cluster._types.ComponentTemplateNode": { "type": "object", "properties": { - "enabled": { - "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", - "oneOf": [ - { - "type": "boolean" - }, + "template": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/cluster._types.ComponentTemplateSummary" } ] }, - "lifecycle": { - "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", - "oneOf": [ - { - "$ref": "#/components/schemas/indices._types.FailureStoreLifecycleTemplate" - }, + "version": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.VersionNumber" } ] - } - } - }, - "indices._types.FailureStoreLifecycleTemplate": { - "type": "object", - "properties": { - "data_retention": { - "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Duration" - }, + }, + "_meta": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.Metadata" } ] }, - "enabled": { - "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "deprecated": { "type": "boolean" - } - } - }, - "_types.Level": { - "type": "string", - "enum": [ - "cluster", - "indices", - "shards" - ] - }, - "_types.WaitForEvents": { - "type": "string", - "enum": [ - "immediate", - "urgent", - "high", - "normal", - "low", - "languid" - ] - }, - "cluster.health.WaitForNodes": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "cluster.health.HealthResponseBody": { - "type": "object", - "properties": { - "active_primary_shards": { - "description": "The number of active primary shards.", - "type": "number" - }, - "active_shards": { - "description": "The total number of active primary and replica shards.", - "type": "number" - }, - "active_shards_percent": { - "description": "The ratio of active shards in the cluster expressed as a string formatted percentage.", - "type": "string" - }, - "active_shards_percent_as_number": { - "description": "The ratio of active shards in the cluster expressed as a percentage.", - "type": "number" - }, - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "delayed_unassigned_shards": { - "description": "The number of shards whose allocation has been delayed by the timeout settings.", - "type": "number" - }, - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/cluster.health.IndexHealthStats" - } - }, - "initializing_shards": { - "description": "The number of shards that are under initialization.", - "type": "number" - }, - "number_of_data_nodes": { - "description": "The number of nodes that are dedicated data nodes.", - "type": "number" - }, - "number_of_in_flight_fetch": { - "description": "The number of unfinished fetches.", - "type": "number" - }, - "number_of_nodes": { - "description": "The number of nodes within the cluster.", - "type": "number" - }, - "number_of_pending_tasks": { - "description": "The number of cluster-level changes that have not yet been executed.", - "type": "number" - }, - "relocating_shards": { - "description": "The number of shards that are under relocation.", - "type": "number" - }, - "status": { - "$ref": "#/components/schemas/_types.HealthStatus" - }, - "task_max_waiting_in_queue": { - "$ref": "#/components/schemas/_types.Duration" }, - "task_max_waiting_in_queue_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "created_date": { + "description": "Date and time when the component template was created. Only returned if the `human` query parameter is `true`.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "timed_out": { - "description": "If false the response returned within the period of time that is specified by the timeout parameter (30s by default)", - "type": "boolean" + "created_date_millis": { + "description": "Date and time when the component template was created, in milliseconds since the epoch.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "unassigned_primary_shards": { - "description": "The number of primary shards that are not allocated.", - "type": "number" + "modified_date": { + "description": "Date and time when the component template was last modified. Only returned if the `human` query parameter is `true`.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "unassigned_shards": { - "description": "The number of shards that are not allocated.", - "type": "number" + "modified_date_millis": { + "description": "Date and time when the component template was last modified, in milliseconds since the epoch.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] } }, "required": [ - "active_primary_shards", - "active_shards", - "active_shards_percent_as_number", - "cluster_name", - "delayed_unassigned_shards", - "initializing_shards", - "number_of_data_nodes", - "number_of_in_flight_fetch", - "number_of_nodes", - "number_of_pending_tasks", - "relocating_shards", - "status", - "task_max_waiting_in_queue_millis", - "timed_out", - "unassigned_primary_shards", - "unassigned_shards" + "template" ] }, - "cluster.health.IndexHealthStats": { + "cluster._types.ComponentTemplateSummary": { "type": "object", "properties": { - "active_primary_shards": { - "type": "number" - }, - "active_shards": { - "type": "number" - }, - "initializing_shards": { - "type": "number" + "_meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] }, - "number_of_replicas": { - "type": "number" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] }, - "number_of_shards": { - "type": "number" + "settings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } }, - "relocating_shards": { - "type": "number" + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] }, - "shards": { + "aliases": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/cluster.health.ShardHealthStats" + "$ref": "#/components/schemas/indices._types.AliasDefinition" } }, - "status": { - "$ref": "#/components/schemas/_types.HealthStatus" - }, - "unassigned_shards": { - "type": "number" + "lifecycle": { + "x-state": "Generally available; Added in 8.11.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + } + ] }, - "unassigned_primary_shards": { - "type": "number" + "data_stream_options": { + "x-state": "Generally available; Added in 8.19.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamOptions" + } + ] } - }, - "required": [ - "active_primary_shards", - "active_shards", - "initializing_shards", - "number_of_replicas", - "number_of_shards", - "relocating_shards", - "status", - "unassigned_shards", - "unassigned_primary_shards" - ] + } }, - "cluster.health.ShardHealthStats": { + "_types.mapping.TypeMapping": { "type": "object", "properties": { - "active_shards": { - "type": "number" - }, - "initializing_shards": { - "type": "number" + "all_field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.AllField" + } + ] }, - "primary_active": { + "date_detection": { "type": "boolean" }, - "relocating_shards": { - "type": "number" - }, - "status": { - "$ref": "#/components/schemas/_types.HealthStatus" - }, - "unassigned_shards": { - "type": "number" + "dynamic": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DynamicMapping" + } + ] }, - "unassigned_primary_shards": { - "type": "number" - } - }, - "required": [ - "active_shards", - "initializing_shards", - "primary_active", - "relocating_shards", - "status", - "unassigned_shards", - "unassigned_primary_shards" - ] - }, - "_types.ClusterInfoTargets": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.ClusterInfoTarget" + "dynamic_date_formats": { + "type": "array", + "items": { + "type": "string" + } }, - { + "dynamic_templates": { "type": "array", "items": { - "$ref": "#/components/schemas/_types.ClusterInfoTarget" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.DynamicTemplate" + }, + "minProperties": 1, + "maxProperties": 1 } - } - ] - }, - "_types.ClusterInfoTarget": { - "type": "string", - "enum": [ - "_all", - "http", - "ingest", - "thread_pool", - "script" - ] - }, - "nodes._types.Http": { - "type": "object", - "properties": { - "current_open": { - "description": "Current number of open HTTP connections for the node.", - "type": "number" }, - "total_opened": { - "description": "Total number of HTTP connections opened for the node.", - "type": "number" + "_field_names": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.FieldNamesField" + } + ] + }, + "index_field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.IndexField" + } + ] + }, + "_meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "numeric_detection": { + "type": "boolean" }, - "clients": { - "description": "Information on current and recently-closed HTTP client connections.\nClients that have been closed longer than the `http.client_stats.closed_channels.max_age` setting will not be represented here.", - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.Client" + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.Property" } }, - "routes": { - "description": "Detailed HTTP stats broken down by route", - "x-state": "Added in 8.12.0", + "_routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RoutingField" + } + ] + }, + "_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SizeField" + } + ] + }, + "_source": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SourceField" + } + ] + }, + "runtime": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.HttpRoute" + "$ref": "#/components/schemas/_types.mapping.RuntimeField" } + }, + "enabled": { + "type": "boolean" + }, + "subobjects": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.Subobjects" + } + ] + }, + "_data_stream_timestamp": { + "x-state": "Generally available; Added in 7.16.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DataStreamTimestamp" + } + ] } - }, - "required": [ - "routes" - ] + } }, - "nodes._types.Client": { + "_types.mapping.AllField": { "type": "object", "properties": { - "id": { - "description": "Unique ID for the HTTP client.", - "type": "number" - }, - "agent": { - "description": "Reported agent for the HTTP client.\nIf unavailable, this property is not included in the response.", + "analyzer": { "type": "string" }, - "local_address": { - "description": "Local address for the HTTP connection.", - "type": "string" + "enabled": { + "type": "boolean" }, - "remote_address": { - "description": "Remote address for the HTTP connection.", - "type": "string" + "omit_norms": { + "type": "boolean" }, - "last_uri": { - "description": "The URI of the client’s most recent request.", + "search_analyzer": { "type": "string" }, - "opened_time_millis": { - "description": "Time at which the client opened the connection.", - "type": "number" - }, - "closed_time_millis": { - "description": "Time at which the client closed the connection if the connection is closed.", - "type": "number" + "similarity": { + "type": "string" }, - "last_request_time_millis": { - "description": "Time of the most recent request from this client.", - "type": "number" + "store": { + "type": "boolean" }, - "request_count": { - "description": "Number of requests from this client.", - "type": "number" + "store_term_vector_offsets": { + "type": "boolean" }, - "request_size_bytes": { - "description": "Cumulative size in bytes of all requests from this client.", - "type": "number" + "store_term_vector_payloads": { + "type": "boolean" }, - "x_opaque_id": { - "description": "Value from the client’s `x-opaque-id` HTTP header.\nIf unavailable, this property is not included in the response.", - "type": "string" - } - } - }, - "nodes._types.HttpRoute": { - "type": "object", - "properties": { - "requests": { - "$ref": "#/components/schemas/nodes._types.HttpRouteRequests" + "store_term_vector_positions": { + "type": "boolean" }, - "responses": { - "$ref": "#/components/schemas/nodes._types.HttpRouteResponses" + "store_term_vectors": { + "type": "boolean" } }, "required": [ - "requests", - "responses" + "analyzer", + "enabled", + "omit_norms", + "search_analyzer", + "similarity", + "store", + "store_term_vector_offsets", + "store_term_vector_payloads", + "store_term_vector_positions", + "store_term_vectors" ] }, - "nodes._types.HttpRouteRequests": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "total_size_in_bytes": { - "type": "number" - }, - "size_histogram": { - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.SizeHttpHistogram" - } - } - }, - "required": [ - "count", - "total_size_in_bytes", - "size_histogram" + "_types.mapping.DynamicMapping": { + "type": "string", + "enum": [ + "strict", + "runtime", + "true", + "false" ] }, - "nodes._types.SizeHttpHistogram": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "ge_bytes": { - "type": "number" + "_types.mapping.DynamicTemplate": { + "allOf": [ + { + "type": "object", + "properties": { + "match": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "path_match": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "unmatch": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "path_unmatch": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "match_mapping_type": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "unmatch_mapping_type": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "match_pattern": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.MatchType" + } + ] + } + } }, - "lt_bytes": { - "type": "number" + { + "type": "object", + "properties": { + "mapping": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.Property" + } + ] + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeField" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 } - }, - "required": [ - "count" ] }, - "nodes._types.HttpRouteResponses": { - "type": "object", - "properties": { - "count": { - "type": "number" + "_types.mapping.Property": { + "discriminator": { + "propertyName": "type", + "mapping": { + "aggregate_metric_double": "#/components/schemas/_types.mapping.AggregateMetricDoubleProperty", + "alias": "#/components/schemas/_types.mapping.FieldAliasProperty", + "binary": "#/components/schemas/_types.mapping.BinaryProperty", + "boolean": "#/components/schemas/_types.mapping.BooleanProperty", + "byte": "#/components/schemas/_types.mapping.ByteNumberProperty", + "completion": "#/components/schemas/_types.mapping.CompletionProperty", + "constant_keyword": "#/components/schemas/_types.mapping.ConstantKeywordProperty", + "counted_keyword": "#/components/schemas/_types.mapping.CountedKeywordProperty", + "date": "#/components/schemas/_types.mapping.DateProperty", + "date_nanos": "#/components/schemas/_types.mapping.DateNanosProperty", + "date_range": "#/components/schemas/_types.mapping.DateRangeProperty", + "dense_vector": "#/components/schemas/_types.mapping.DenseVectorProperty", + "double": "#/components/schemas/_types.mapping.DoubleNumberProperty", + "double_range": "#/components/schemas/_types.mapping.DoubleRangeProperty", + "exponential_histogram": "#/components/schemas/_types.mapping.ExponentialHistogramProperty", + "flattened": "#/components/schemas/_types.mapping.FlattenedProperty", + "float": "#/components/schemas/_types.mapping.FloatNumberProperty", + "float_range": "#/components/schemas/_types.mapping.FloatRangeProperty", + "geo_point": "#/components/schemas/_types.mapping.GeoPointProperty", + "geo_shape": "#/components/schemas/_types.mapping.GeoShapeProperty", + "half_float": "#/components/schemas/_types.mapping.HalfFloatNumberProperty", + "histogram": "#/components/schemas/_types.mapping.HistogramProperty", + "icu_collation_keyword": "#/components/schemas/_types.mapping.IcuCollationProperty", + "integer": "#/components/schemas/_types.mapping.IntegerNumberProperty", + "integer_range": "#/components/schemas/_types.mapping.IntegerRangeProperty", + "ip": "#/components/schemas/_types.mapping.IpProperty", + "ip_range": "#/components/schemas/_types.mapping.IpRangeProperty", + "join": "#/components/schemas/_types.mapping.JoinProperty", + "keyword": "#/components/schemas/_types.mapping.KeywordProperty", + "long": "#/components/schemas/_types.mapping.LongNumberProperty", + "long_range": "#/components/schemas/_types.mapping.LongRangeProperty", + "match_only_text": "#/components/schemas/_types.mapping.MatchOnlyTextProperty", + "murmur3": "#/components/schemas/_types.mapping.Murmur3HashProperty", + "nested": "#/components/schemas/_types.mapping.NestedProperty", + "object": "#/components/schemas/_types.mapping.ObjectProperty", + "passthrough": "#/components/schemas/_types.mapping.PassthroughObjectProperty", + "percolator": "#/components/schemas/_types.mapping.PercolatorProperty", + "point": "#/components/schemas/_types.mapping.PointProperty", + "rank_feature": "#/components/schemas/_types.mapping.RankFeatureProperty", + "rank_features": "#/components/schemas/_types.mapping.RankFeaturesProperty", + "rank_vectors": "#/components/schemas/_types.mapping.RankVectorProperty", + "scaled_float": "#/components/schemas/_types.mapping.ScaledFloatNumberProperty", + "search_as_you_type": "#/components/schemas/_types.mapping.SearchAsYouTypeProperty", + "semantic_text": "#/components/schemas/_types.mapping.SemanticTextProperty", + "shape": "#/components/schemas/_types.mapping.ShapeProperty", + "short": "#/components/schemas/_types.mapping.ShortNumberProperty", + "sparse_vector": "#/components/schemas/_types.mapping.SparseVectorProperty", + "text": "#/components/schemas/_types.mapping.TextProperty", + "token_count": "#/components/schemas/_types.mapping.TokenCountProperty", + "unsigned_long": "#/components/schemas/_types.mapping.UnsignedLongNumberProperty", + "version": "#/components/schemas/_types.mapping.VersionProperty", + "wildcard": "#/components/schemas/_types.mapping.WildcardProperty", + "{dynamic_type}": "#/components/schemas/_types.mapping.DynamicProperty" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/_types.mapping.BinaryProperty" }, - "total_size_in_bytes": { - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.BooleanProperty" }, - "handling_time_histogram": { - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.TimeHttpHistogram" - } + { + "$ref": "#/components/schemas/_types.mapping.DynamicProperty" }, - "size_histogram": { - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.SizeHttpHistogram" - } - } - }, - "required": [ - "count", - "total_size_in_bytes", - "handling_time_histogram", - "size_histogram" - ] - }, - "nodes._types.TimeHttpHistogram": { - "type": "object", - "properties": { - "count": { - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.JoinProperty" }, - "ge_millis": { - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.KeywordProperty" }, - "lt_millis": { - "type": "number" - } - }, - "required": [ - "count" - ] - }, - "nodes._types.Ingest": { - "type": "object", - "properties": { - "pipelines": { - "description": "Contains statistics about ingest pipelines for the node.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.IngestStats" - } + { + "$ref": "#/components/schemas/_types.mapping.MatchOnlyTextProperty" }, - "total": { - "$ref": "#/components/schemas/nodes._types.IngestTotal" - } - } - }, - "nodes._types.IngestStats": { - "type": "object", - "properties": { - "count": { - "description": "Total number of documents ingested during the lifetime of this node.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.PercolatorProperty" }, - "current": { - "description": "Total number of documents currently being ingested.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.RankFeatureProperty" }, - "failed": { - "description": "Total number of failed ingest operations during the lifetime of this node.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.RankFeaturesProperty" }, - "processors": { - "description": "Total number of ingest processors.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.KeyedProcessor" - } - } + { + "$ref": "#/components/schemas/_types.mapping.SearchAsYouTypeProperty" }, - "time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + { + "$ref": "#/components/schemas/_types.mapping.TextProperty" }, - "ingested_as_first_pipeline_in_bytes": { - "description": "Total number of bytes of all documents ingested by the pipeline.\nThis field is only present on pipelines which are the first to process a document.\nThus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors.", - "x-state": "Added in 8.15.0", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.VersionProperty" }, - "produced_as_first_pipeline_in_bytes": { - "description": "Total number of bytes of all documents produced by the pipeline.\nThis field is only present on pipelines which are the first to process a document.\nThus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors.\nIn situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run.", - "x-state": "Added in 8.15.0", - "type": "number" - } - }, - "required": [ - "count", - "current", - "failed", - "processors", - "time_in_millis", - "ingested_as_first_pipeline_in_bytes", - "produced_as_first_pipeline_in_bytes" - ] - }, - "nodes._types.KeyedProcessor": { - "type": "object", - "properties": { - "stats": { - "$ref": "#/components/schemas/nodes._types.Processor" + { + "$ref": "#/components/schemas/_types.mapping.WildcardProperty" }, - "type": { - "type": "string" - } - } - }, - "nodes._types.Processor": { - "type": "object", - "properties": { - "count": { - "description": "Number of documents transformed by the processor.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.DateNanosProperty" }, - "current": { - "description": "Number of documents currently being transformed by the processor.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.DateProperty" }, - "failed": { - "description": "Number of failed operations for the processor.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.AggregateMetricDoubleProperty" }, - "time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - } - } - }, - "nodes._types.IngestTotal": { - "type": "object", - "properties": { - "count": { - "description": "Total number of documents ingested during the lifetime of this node.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.DenseVectorProperty" }, - "current": { - "description": "Total number of documents currently being ingested.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.FlattenedProperty" }, - "failed": { - "description": "Total number of failed ingest operations during the lifetime of this node.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.NestedProperty" }, - "time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - } - }, - "required": [ - "count", - "current", - "failed", - "time_in_millis" - ] - }, - "nodes._types.ThreadCount": { - "type": "object", - "properties": { - "active": { - "description": "Number of active threads in the thread pool.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.ObjectProperty" }, - "completed": { - "description": "Number of tasks completed by the thread pool executor.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.PassthroughObjectProperty" }, - "largest": { - "description": "Highest number of active threads in the thread pool.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.RankVectorProperty" }, - "queue": { - "description": "Number of tasks in queue for the thread pool.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.SemanticTextProperty" }, - "rejected": { - "description": "Number of tasks rejected by the thread pool executor.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.SparseVectorProperty" }, - "threads": { - "description": "Number of threads in the thread pool.", - "type": "number" - } - } - }, - "nodes._types.Scripting": { - "type": "object", - "properties": { - "cache_evictions": { - "description": "Total number of times the script cache has evicted old data.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.CompletionProperty" + }, + { + "$ref": "#/components/schemas/_types.mapping.ConstantKeywordProperty" + }, + { + "$ref": "#/components/schemas/_types.mapping.CountedKeywordProperty" + }, + { + "$ref": "#/components/schemas/_types.mapping.FieldAliasProperty" + }, + { + "$ref": "#/components/schemas/_types.mapping.HistogramProperty" + }, + { + "$ref": "#/components/schemas/_types.mapping.ExponentialHistogramProperty" }, - "compilations": { - "description": "Total number of inline script compilations performed by the node.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.IpProperty" }, - "compilations_history": { - "description": "Contains this recent history of script compilations.", - "type": "object", - "additionalProperties": { - "type": "number" - } + { + "$ref": "#/components/schemas/_types.mapping.Murmur3HashProperty" }, - "compilation_limit_triggered": { - "description": "Total number of times the script compilation circuit breaker has limited inline script compilations.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.TokenCountProperty" }, - "contexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.Context" - } - } - } - }, - "nodes._types.Context": { - "type": "object", - "properties": { - "context": { - "type": "string" + { + "$ref": "#/components/schemas/_types.mapping.GeoPointProperty" }, - "compilations": { - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.GeoShapeProperty" }, - "cache_evictions": { - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.PointProperty" }, - "compilation_limit_triggered": { - "type": "number" - } - } - }, - "cluster.pending_tasks.PendingTask": { - "type": "object", - "properties": { - "executing": { - "description": "Indicates whether the pending tasks are currently executing or not.", - "type": "boolean" + { + "$ref": "#/components/schemas/_types.mapping.ShapeProperty" }, - "insert_order": { - "description": "The number that represents when the task has been inserted into the task queue.", - "type": "number" + { + "$ref": "#/components/schemas/_types.mapping.ByteNumberProperty" }, - "priority": { - "description": "The priority of the pending task.\nThe valid priorities in descending priority order are: `IMMEDIATE` > `URGENT` > `HIGH` > `NORMAL` > `LOW` > `LANGUID`.", - "type": "string" + { + "$ref": "#/components/schemas/_types.mapping.DoubleNumberProperty" }, - "source": { - "description": "A general description of the cluster task that may include a reason and origin.", - "type": "string" + { + "$ref": "#/components/schemas/_types.mapping.FloatNumberProperty" }, - "time_in_queue": { - "$ref": "#/components/schemas/_types.Duration" + { + "$ref": "#/components/schemas/_types.mapping.HalfFloatNumberProperty" }, - "time_in_queue_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - } - }, - "required": [ - "executing", - "insert_order", - "priority", - "source", - "time_in_queue_millis" - ] - }, - "indices._types.IndexState": { - "type": "object", - "properties": { - "aliases": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" - } + { + "$ref": "#/components/schemas/_types.mapping.IntegerNumberProperty" }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" + { + "$ref": "#/components/schemas/_types.mapping.LongNumberProperty" }, - "settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" + { + "$ref": "#/components/schemas/_types.mapping.ScaledFloatNumberProperty" }, - "defaults": { - "$ref": "#/components/schemas/indices._types.IndexSettings" + { + "$ref": "#/components/schemas/_types.mapping.ShortNumberProperty" }, - "data_stream": { - "$ref": "#/components/schemas/_types.DataStreamName" + { + "$ref": "#/components/schemas/_types.mapping.UnsignedLongNumberProperty" }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycle" - } - } - }, - "indices._types.Alias": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + { + "$ref": "#/components/schemas/_types.mapping.DateRangeProperty" }, - "index_routing": { - "$ref": "#/components/schemas/_types.Routing" + { + "$ref": "#/components/schemas/_types.mapping.DoubleRangeProperty" }, - "is_hidden": { - "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", - "type": "boolean" + { + "$ref": "#/components/schemas/_types.mapping.FloatRangeProperty" }, - "is_write_index": { - "description": "If `true`, the index is the write index for the alias.", - "type": "boolean" + { + "$ref": "#/components/schemas/_types.mapping.IntegerRangeProperty" }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" + { + "$ref": "#/components/schemas/_types.mapping.IpRangeProperty" }, - "search_routing": { - "$ref": "#/components/schemas/_types.Routing" + { + "$ref": "#/components/schemas/_types.mapping.LongRangeProperty" + }, + { + "$ref": "#/components/schemas/_types.mapping.IcuCollationProperty" } - } + ] }, - "_types.DataStreamName": { - "type": "string" + "_types.mapping.BinaryProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "binary" + ] + } + }, + "required": [ + "type" + ] + } + ] }, - "cluster.remote_info.ClusterRemoteInfo": { - "discriminator": { - "propertyName": "mode" - }, - "oneOf": [ + "_types.mapping.DocValuesPropertyBase": { + "allOf": [ { - "$ref": "#/components/schemas/cluster.remote_info.ClusterRemoteSniffInfo" + "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" }, { - "$ref": "#/components/schemas/cluster.remote_info.ClusterRemoteProxyInfo" + "type": "object", + "properties": { + "doc_values": { + "type": "boolean" + } + } } ] }, - "cluster.remote_info.ClusterRemoteSniffInfo": { + "_types.mapping.CorePropertyBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" + }, + { + "type": "object", + "properties": { + "copy_to": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "store": { + "type": "boolean" + } + } + } + ] + }, + "_types.mapping.PropertyBase": { "type": "object", "properties": { - "mode": { - "description": "The connection mode for the remote cluster.", - "type": "string", - "enum": [ - "sniff" - ] + "meta": { + "description": "Metadata about the field.", + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "connected": { - "description": "If it is `true`, there is at least one open connection to the remote cluster.\nIf it is `false`, it means that the cluster no longer has an open connection to the remote cluster.\nIt does not necessarily mean that the remote cluster is down or unavailable, just that at some point a connection was lost.", - "type": "boolean" + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.Property" + } }, - "max_connections_per_cluster": { - "description": "The maximum number of connections maintained for the remote cluster when sniff mode is configured.", + "ignore_above": { "type": "number" }, - "num_nodes_connected": { - "description": "The number of connected nodes in the remote cluster when sniff mode is configured.", - "type": "number" + "dynamic": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DynamicMapping" + } + ] }, - "initial_connect_timeout": { - "$ref": "#/components/schemas/_types.Duration" + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.Property" + } }, - "skip_unavailable": { - "description": "If `true`, cross-cluster search skips the remote cluster when its nodes are unavailable during the search and ignores errors returned by the remote cluster.", - "type": "boolean" + "synthetic_source_keep": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SyntheticSourceKeepEnum" + } + ] + } + } + }, + "_types.mapping.SyntheticSourceKeepEnum": { + "type": "string", + "enum": [ + "none", + "arrays", + "all" + ] + }, + "_types.mapping.BooleanProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "seeds": { - "description": "The initial seed transport addresses of the remote cluster when sniff mode is configured.", - "type": "array", - "items": { - "type": "string" - } + { + "type": "object", + "properties": { + "boost": { + "type": "number" + }, + "fielddata": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.NumericFielddata" + } + ] + }, + "index": { + "type": "boolean" + }, + "null_value": { + "type": "boolean" + }, + "ignore_malformed": { + "type": "boolean" + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "on_script_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.OnScriptError" + } + ] + }, + "time_series_dimension": { + "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", + "x-state": "Technical preview", + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "boolean" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "mode", - "connected", - "max_connections_per_cluster", - "num_nodes_connected", - "initial_connect_timeout", - "skip_unavailable", - "seeds" ] }, - "cluster.remote_info.ClusterRemoteProxyInfo": { + "indices._types.NumericFielddata": { "type": "object", "properties": { - "mode": { - "description": "The connection mode for the remote cluster.", - "type": "string", - "enum": [ - "proxy" + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.NumericFielddataFormat" + } ] - }, - "connected": { - "description": "If it is `true`, there is at least one open connection to the remote cluster.\nIf it is `false`, it means that the cluster no longer has an open connection to the remote cluster.\nIt does not necessarily mean that the remote cluster is down or unavailable, just that at some point a connection was lost.", - "type": "boolean" - }, - "initial_connect_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "skip_unavailable": { - "description": "If `true`, cross-cluster search skips the remote cluster when its nodes are unavailable during the search and ignores errors returned by the remote cluster.", - "type": "boolean" - }, - "proxy_address": { - "description": "The address for remote connections when proxy mode is configured.", - "type": "string" - }, - "server_name": { - "type": "string" - }, - "num_proxy_sockets_connected": { - "description": "The number of open socket connections to the remote cluster when proxy mode is configured.", - "type": "number" - }, - "max_proxy_socket_connections": { - "description": "The maximum number of socket connections to the remote cluster when proxy mode is configured.", - "type": "number" - }, - "cluster_credentials": { - "description": "This field is present and has a value of `::es_redacted::` only when the remote cluster is configured with the API key based model. Otherwise, the field is not present.", - "type": "string" } }, "required": [ - "mode", - "connected", - "initial_connect_timeout", - "skip_unavailable", - "proxy_address", - "server_name", - "num_proxy_sockets_connected", - "max_proxy_socket_connections" + "format" ] }, - "_types.Metrics": { - "oneOf": [ + "indices._types.NumericFielddataFormat": { + "type": "string", + "enum": [ + "array", + "disabled" + ] + }, + "_types.mapping.OnScriptError": { + "type": "string", + "enum": [ + "fail", + "continue" + ] + }, + "_types.mapping.DynamicProperty": { + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, { - "type": "array", - "items": { - "type": "string" - } + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "{dynamic_type}" + ] + }, + "enabled": { + "type": "boolean" + }, + "null_value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + } + ] + }, + "boost": { + "type": "number" + }, + "coerce": { + "type": "boolean" + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "on_script_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.OnScriptError" + } + ] + }, + "ignore_malformed": { + "type": "boolean" + }, + "time_series_metric": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" + } + ] + }, + "analyzer": { + "type": "string" + }, + "eager_global_ordinals": { + "type": "boolean" + }, + "index": { + "type": "boolean" + }, + "index_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.IndexOptions" + } + ] + }, + "index_phrases": { + "type": "boolean" + }, + "index_prefixes": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TextIndexPrefixes" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "norms": { + "type": "boolean" + }, + "position_increment_gap": { + "type": "number" + }, + "search_analyzer": { + "type": "string" + }, + "search_quote_analyzer": { + "type": "string" + }, + "term_vector": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TermVectorOption" + } + ] + }, + "format": { + "type": "string" + }, + "precision_step": { + "type": "number" + }, + "locale": { + "type": "string" + } + }, + "required": [ + "type" + ] } ] }, - "cluster.reroute.Command": { - "type": "object", - "properties": { - "cancel": { - "$ref": "#/components/schemas/cluster.reroute.CommandCancelAction" - }, - "move": { - "$ref": "#/components/schemas/cluster.reroute.CommandMoveAction" - }, - "allocate_replica": { - "$ref": "#/components/schemas/cluster.reroute.CommandAllocateReplicaAction" - }, - "allocate_stale_primary": { - "$ref": "#/components/schemas/cluster.reroute.CommandAllocatePrimaryAction" - }, - "allocate_empty_primary": { - "$ref": "#/components/schemas/cluster.reroute.CommandAllocatePrimaryAction" - } - } + "_types.mapping.TimeSeriesMetricType": { + "type": "string", + "enum": [ + "gauge", + "counter", + "summary", + "histogram", + "position" + ] }, - "cluster.reroute.CommandCancelAction": { + "_types.mapping.IndexOptions": { + "type": "string", + "enum": [ + "docs", + "freqs", + "positions", + "offsets" + ] + }, + "_types.mapping.TextIndexPrefixes": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "shard": { + "max_chars": { "type": "number" }, - "node": { - "type": "string" - }, - "allow_primary": { - "type": "boolean" + "min_chars": { + "type": "number" } }, "required": [ - "index", - "shard", - "node" + "max_chars", + "min_chars" ] }, - "cluster.reroute.CommandMoveAction": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "shard": { - "type": "number" - }, - "from_node": { - "description": "The node to move the shard from", - "type": "string" + "_types.mapping.TermVectorOption": { + "type": "string", + "enum": [ + "no", + "yes", + "with_offsets", + "with_positions", + "with_positions_offsets", + "with_positions_offsets_payloads", + "with_positions_payloads" + ] + }, + "_types.mapping.JoinProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "to_node": { - "description": "The node to move the shard to", - "type": "string" + { + "type": "object", + "properties": { + "relations": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.RelationName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.RelationName" + } + } + ] + } + }, + "eager_global_ordinals": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "join" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "index", - "shard", - "from_node", - "to_node" ] }, - "cluster.reroute.CommandAllocateReplicaAction": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "shard": { - "type": "number" + "_types.mapping.KeywordProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "node": { - "type": "string" + { + "type": "object", + "properties": { + "boost": { + "type": "number" + }, + "eager_global_ordinals": { + "type": "boolean" + }, + "index": { + "type": "boolean" + }, + "index_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.IndexOptions" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "on_script_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.OnScriptError" + } + ] + }, + "normalizer": { + "type": "string" + }, + "norms": { + "type": "boolean" + }, + "null_value": { + "type": "string" + }, + "similarity": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "split_queries_on_whitespace": { + "type": "boolean" + }, + "time_series_dimension": { + "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", + "x-state": "Technical preview", + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "keyword" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "index", - "shard", - "node" ] }, - "cluster.reroute.CommandAllocatePrimaryAction": { + "_types.mapping.MatchOnlyTextProperty": { + "description": "A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field\neffectively stores data the same way as a text field that only indexes documents (index_options: docs) and\ndisables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries\nthat need positions such as the match_phrase query perform slower as they need to look at the _source document\nto verify whether a phrase matches. All queries return constant scores that are equal to 1.0.", "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "type": { + "type": "string", + "enum": [ + "match_only_text" + ] }, - "shard": { - "type": "number" + "fields": { + "description": "Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one\nfield for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.Property" + } }, - "node": { - "type": "string" + "meta": { + "description": "Metadata about the field.", + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "accept_data_loss": { - "description": "If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set to true", - "type": "boolean" + "copy_to": { + "description": "Allows you to copy the values of multiple fields into a group\nfield, which can then be queried as a single field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] } }, "required": [ - "index", - "shard", - "node", - "accept_data_loss" + "type" ] }, - "cluster.reroute.RerouteExplanation": { - "type": "object", - "properties": { - "command": { - "type": "string" - }, - "decisions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.reroute.RerouteDecision" - } + "_types.mapping.PercolatorProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "parameters": { - "$ref": "#/components/schemas/cluster.reroute.RerouteParameters" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "percolator" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "command", - "decisions", - "parameters" ] }, - "cluster.reroute.RerouteDecision": { - "type": "object", - "properties": { - "decider": { - "type": "string" - }, - "decision": { - "type": "string" + "_types.mapping.RankFeatureProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "explanation": { - "type": "string" + { + "type": "object", + "properties": { + "positive_score_impact": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "rank_feature" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "decider", - "decision", - "explanation" ] }, - "cluster.reroute.RerouteParameters": { - "type": "object", - "properties": { - "allow_primary": { - "type": "boolean" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "node": { - "$ref": "#/components/schemas/_types.NodeName" - }, - "shard": { - "type": "number" - }, - "from_node": { - "$ref": "#/components/schemas/_types.NodeName" + "_types.mapping.RankFeaturesProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "to_node": { - "$ref": "#/components/schemas/_types.NodeName" + { + "type": "object", + "properties": { + "positive_score_impact": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "rank_features" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "allow_primary", - "index", - "node", - "shard" ] }, - "cluster.stats.StatsResponseBase": { + "_types.mapping.SearchAsYouTypeProperty": { "allOf": [ { - "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" }, { "type": "object", "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" + "analyzer": { + "type": "string" }, - "cluster_uuid": { - "$ref": "#/components/schemas/_types.Uuid" + "index": { + "type": "boolean" }, - "indices": { - "$ref": "#/components/schemas/cluster.stats.ClusterIndices" + "index_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.IndexOptions" + } + ] }, - "nodes": { - "$ref": "#/components/schemas/cluster.stats.ClusterNodes" + "max_shingle_size": { + "type": "number" }, - "status": { - "$ref": "#/components/schemas/_types.HealthStatus" + "norms": { + "type": "boolean" }, - "timestamp": { - "description": "Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed.", - "type": "number" + "search_analyzer": { + "type": "string" }, - "ccs": { - "$ref": "#/components/schemas/cluster.stats.CCSStats" + "search_quote_analyzer": { + "type": "string" + }, + "similarity": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "term_vector": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TermVectorOption" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "search_as_you_type" + ] } }, "required": [ - "cluster_name", - "cluster_uuid", - "indices", - "nodes", - "status", - "timestamp", - "ccs" + "type" ] } ] }, - "cluster.stats.ClusterIndices": { - "type": "object", - "properties": { - "analysis": { - "$ref": "#/components/schemas/cluster.stats.CharFilterTypes" - }, - "completion": { - "$ref": "#/components/schemas/_types.CompletionStats" - }, - "count": { - "description": "Total number of indices with shards assigned to selected nodes.", - "type": "number" - }, - "docs": { - "$ref": "#/components/schemas/_types.DocStats" - }, - "fielddata": { - "$ref": "#/components/schemas/_types.FielddataStats" - }, - "query_cache": { - "$ref": "#/components/schemas/_types.QueryCacheStats" - }, - "segments": { - "$ref": "#/components/schemas/_types.SegmentsStats" - }, - "shards": { - "$ref": "#/components/schemas/cluster.stats.ClusterIndicesShards" - }, - "store": { - "$ref": "#/components/schemas/_types.StoreStats" - }, - "mappings": { - "$ref": "#/components/schemas/cluster.stats.FieldTypesMappings" - }, - "versions": { - "description": "Contains statistics about analyzers and analyzer components used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.IndicesVersions" - } - } - }, - "required": [ - "analysis", - "completion", - "count", - "docs", - "fielddata", - "query_cache", - "segments", - "shards", - "store", - "mappings" - ] - }, - "cluster.stats.CharFilterTypes": { - "type": "object", - "properties": { - "analyzer_types": { - "description": "Contains statistics about analyzer types used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } - }, - "built_in_analyzers": { - "description": "Contains statistics about built-in analyzers used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } - }, - "built_in_char_filters": { - "description": "Contains statistics about built-in character filters used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } - }, - "built_in_filters": { - "description": "Contains statistics about built-in token filters used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } - }, - "built_in_tokenizers": { - "description": "Contains statistics about built-in tokenizers used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } - }, - "char_filter_types": { - "description": "Contains statistics about character filter types used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } - }, - "filter_types": { - "description": "Contains statistics about token filter types used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } + "_types.mapping.TextProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" }, - "tokenizer_types": { - "description": "Contains statistics about tokenizer types used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } + { + "type": "object", + "properties": { + "analyzer": { + "type": "string" + }, + "boost": { + "type": "number" + }, + "eager_global_ordinals": { + "type": "boolean" + }, + "fielddata": { + "type": "boolean" + }, + "fielddata_frequency_filter": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.FielddataFrequencyFilter" + } + ] + }, + "index": { + "type": "boolean" + }, + "index_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.IndexOptions" + } + ] + }, + "index_phrases": { + "type": "boolean" + }, + "index_prefixes": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TextIndexPrefixes" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "norms": { + "type": "boolean" + }, + "position_increment_gap": { + "type": "number" + }, + "search_analyzer": { + "type": "string" + }, + "search_quote_analyzer": { + "type": "string" + }, + "similarity": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "term_vector": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TermVectorOption" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "text" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "analyzer_types", - "built_in_analyzers", - "built_in_char_filters", - "built_in_filters", - "built_in_tokenizers", - "char_filter_types", - "filter_types", - "tokenizer_types" ] }, - "cluster.stats.FieldTypes": { + "indices._types.FielddataFrequencyFilter": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "count": { - "description": "The number of occurrences of the field type in selected nodes.", - "type": "number" - }, - "index_count": { - "description": "The number of indices containing the field type in selected nodes.", - "type": "number" - }, - "indexed_vector_count": { - "description": "For dense_vector field types, number of indexed vector types in selected nodes.", - "type": "number" - }, - "indexed_vector_dim_max": { - "description": "For dense_vector field types, the maximum dimension of all indexed vector types in selected nodes.", + "max": { "type": "number" }, - "indexed_vector_dim_min": { - "description": "For dense_vector field types, the minimum dimension of all indexed vector types in selected nodes.", + "min": { "type": "number" }, - "script_count": { - "description": "The number of fields that declare a script.", + "min_segment_size": { "type": "number" } }, "required": [ - "name", - "count", - "index_count" + "max", + "min", + "min_segment_size" ] }, - "_types.CompletionStats": { - "type": "object", - "properties": { - "size_in_bytes": { - "description": "Total amount, in bytes, of memory used for completion across all shards assigned to selected nodes.", - "type": "number" - }, - "size": { - "$ref": "#/components/schemas/_types.ByteSize" + "_types.mapping.VersionProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "fields": { + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.FieldSizeUsage" - } - } - }, - "required": [ - "size_in_bytes" - ] - }, - "_types.FieldSizeUsage": { - "type": "object", - "properties": { - "size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "size_in_bytes": { - "type": "number" + "properties": { + "type": { + "type": "string", + "enum": [ + "version" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "size_in_bytes" ] }, - "_types.DocStats": { - "type": "object", - "properties": { - "count": { - "description": "Total number of non-deleted documents across all primary shards assigned to selected nodes.\nThis number is based on documents in Lucene segments and may include documents from nested fields.", - "type": "number" + "_types.mapping.WildcardProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "deleted": { - "description": "Total number of deleted documents across all primary shards assigned to selected nodes.\nThis number is based on documents in Lucene segments.\nElasticsearch reclaims the disk space of deleted Lucene documents when a segment is merged.", - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "wildcard" + ] + }, + "null_value": { + "x-state": "Generally available; Added in 7.15.0", + "type": "string" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "count" ] }, - "_types.FielddataStats": { - "type": "object", - "properties": { - "evictions": { - "type": "number" - }, - "memory_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "memory_size_in_bytes": { - "type": "number" + "_types.mapping.DateNanosProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "fields": { + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.FieldMemoryUsage" - } + "properties": { + "boost": { + "type": "number" + }, + "format": { + "type": "string" + }, + "ignore_malformed": { + "type": "boolean" + }, + "index": { + "type": "boolean" + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "on_script_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.OnScriptError" + } + ] + }, + "null_value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "precision_step": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "date_nanos" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "memory_size_in_bytes" ] }, - "_types.FieldMemoryUsage": { - "type": "object", - "properties": { - "memory_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "_types.mapping.DateProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "memory_size_in_bytes": { - "type": "number" + { + "type": "object", + "properties": { + "boost": { + "type": "number" + }, + "fielddata": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.NumericFielddata" + } + ] + }, + "format": { + "type": "string" + }, + "ignore_malformed": { + "type": "boolean" + }, + "index": { + "type": "boolean" + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "on_script_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.OnScriptError" + } + ] + }, + "null_value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "precision_step": { + "type": "number" + }, + "locale": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "date" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "memory_size_in_bytes" ] }, - "_types.QueryCacheStats": { - "type": "object", - "properties": { - "cache_count": { - "description": "Total number of entries added to the query cache across all shards assigned to selected nodes.\nThis number includes current and evicted entries.", - "type": "number" - }, - "cache_size": { - "description": "Total number of entries currently in the query cache across all shards assigned to selected nodes.", - "type": "number" - }, - "evictions": { - "description": "Total number of query cache evictions across all shards assigned to selected nodes.", - "type": "number" - }, - "hit_count": { - "description": "Total count of query cache hits across all shards assigned to selected nodes.", - "type": "number" - }, - "memory_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "memory_size_in_bytes": { - "description": "Total amount, in bytes, of memory used for the query cache across all shards assigned to selected nodes.", - "type": "number" - }, - "miss_count": { - "description": "Total count of query cache misses across all shards assigned to selected nodes.", - "type": "number" + "_types.mapping.AggregateMetricDoubleProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "total_count": { - "description": "Total count of hits and misses in the query cache across all shards assigned to selected nodes.", - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "aggregate_metric_double" + ] + }, + "default_metric": { + "type": "string" + }, + "ignore_malformed": { + "type": "boolean" + }, + "metrics": { + "type": "array", + "items": { + "type": "string" + } + }, + "time_series_metric": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" + } + ] + } + }, + "required": [ + "type", + "default_metric", + "metrics" + ] } - }, - "required": [ - "cache_count", - "cache_size", - "evictions", - "hit_count", - "memory_size_in_bytes", - "miss_count", - "total_count" ] }, - "_types.SegmentsStats": { - "type": "object", - "properties": { - "count": { - "description": "Total number of segments across all shards assigned to selected nodes.", - "type": "number" - }, - "doc_values_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "doc_values_memory_in_bytes": { - "description": "Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes.", - "type": "number" + "_types.mapping.DenseVectorProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "file_sizes": { - "description": "This object is not populated by the cluster stats API.\nTo get information on segment files, use the node stats API.", + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.stats.ShardFileSizeInfo" - } - }, - "fixed_bit_set": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "fixed_bit_set_memory_in_bytes": { - "description": "Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes.", - "type": "number" - }, - "index_writer_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "index_writer_max_memory_in_bytes": { - "type": "number" - }, - "index_writer_memory_in_bytes": { - "description": "Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes.", - "type": "number" - }, - "max_unsafe_auto_id_timestamp": { - "description": "Unix timestamp, in milliseconds, of the most recently retried indexing request.", - "type": "number" - }, - "memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "memory_in_bytes": { - "description": "Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes.", - "type": "number" - }, - "norms_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "norms_memory_in_bytes": { - "description": "Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes.", - "type": "number" - }, - "points_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "points_memory_in_bytes": { - "description": "Total amount, in bytes, of memory used for points across all shards assigned to selected nodes.", - "type": "number" - }, - "stored_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "stored_fields_memory_in_bytes": { - "description": "Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.", - "type": "number" - }, - "terms_memory_in_bytes": { - "description": "Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes.", - "type": "number" - }, - "terms_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "term_vectory_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "term_vectors_memory_in_bytes": { - "description": "Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes.", - "type": "number" - }, - "version_map_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "version_map_memory_in_bytes": { - "description": "Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes.", - "type": "number" + "properties": { + "type": { + "type": "string", + "enum": [ + "dense_vector" + ] + }, + "dims": { + "description": "Number of vector dimensions. Can't exceed `4096`. If `dims` is not specified, it will be set to the length of\nthe first vector added to the field.", + "type": "number" + }, + "element_type": { + "description": "The data type used to encode vectors. The supported data types are `float` (default), `byte`, and `bit`.", + "default": "float", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DenseVectorElementType" + } + ] + }, + "index": { + "description": "If `true`, you can search this field using the kNN search API.", + "default": true, + "type": "boolean" + }, + "index_options": { + "description": "An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters\nthat influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the\nexpense of slower indexing speed.\n\nThis parameter can only be specified when `index` is `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptions" + } + ] + }, + "similarity": { + "description": "The vector similarity metric to use in kNN search.\n\nDocuments are ranked by their vector field's similarity to the query vector. The `_score` of each document will\nbe derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds\nto a higher ranking.\n\nDefaults to `l2_norm` when `element_type` is `bit` otherwise defaults to `cosine`.\n\n`bit` vectors only support `l2_norm` as their similarity metric.\n\nThis parameter can only be specified when `index` is `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DenseVectorSimilarity" + } + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "count", - "doc_values_memory_in_bytes", - "file_sizes", - "fixed_bit_set_memory_in_bytes", - "index_writer_memory_in_bytes", - "max_unsafe_auto_id_timestamp", - "memory_in_bytes", - "norms_memory_in_bytes", - "points_memory_in_bytes", - "stored_fields_memory_in_bytes", - "terms_memory_in_bytes", - "term_vectors_memory_in_bytes", - "version_map_memory_in_bytes" ] }, - "indices.stats.ShardFileSizeInfo": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "size_in_bytes": { - "type": "number" - }, - "min_size_in_bytes": { - "type": "number" - }, - "max_size_in_bytes": { - "type": "number" - }, - "average_size_in_bytes": { - "type": "number" - }, - "count": { - "type": "number" - } - }, - "required": [ - "description", - "size_in_bytes" + "_types.mapping.DenseVectorElementType": { + "type": "string", + "enum": [ + "bit", + "byte", + "float", + "bfloat16" ] }, - "cluster.stats.ClusterIndicesShards": { + "_types.mapping.DenseVectorIndexOptions": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/cluster.stats.ClusterIndicesShardsIndex" - }, - "primaries": { - "description": "Number of primary shards assigned to selected nodes.", + "confidence_interval": { + "description": "The confidence interval to use when quantizing the vectors. Can be any value between and including `0.90` and\n`1.0` or exactly `0`. When the value is `0`, this indicates that dynamic quantiles should be calculated for\noptimized quantization. When between `0.90` and `1.0`, this value restricts the values used when calculating\nthe quantization thresholds.\n\nFor example, a value of `0.95` will only use the middle `95%` of the values when calculating the quantization\nthresholds (e.g. the highest and lowest `2.5%` of values will be ignored).\n\nDefaults to `1/(dims + 1)` for `int8` quantized vectors and `0` for `int4` for dynamic quantile calculation.\n\nOnly applicable to `int8_hnsw`, `int4_hnsw`, `int8_flat`, and `int4_flat` index types.", "type": "number" }, - "replication": { - "description": "Ratio of replica shards to primary shards across all selected nodes.", + "ef_construction": { + "description": "The number of candidates to track while assembling the list of nearest neighbors for each new node.\n\nOnly applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.", + "default": 100.0, "type": "number" }, - "total": { - "description": "Total number of shards assigned to selected nodes.", + "m": { + "description": "The number of neighbors each node will be connected to in the HNSW graph.\n\nOnly applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.", + "default": 16.0, "type": "number" - } - } - }, - "cluster.stats.ClusterIndicesShardsIndex": { - "type": "object", - "properties": { - "primaries": { - "$ref": "#/components/schemas/cluster.stats.ClusterShardMetrics" }, - "replication": { - "$ref": "#/components/schemas/cluster.stats.ClusterShardMetrics" + "type": { + "description": "The type of kNN algorithm to use.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptionsType" + } + ] }, - "shards": { - "$ref": "#/components/schemas/cluster.stats.ClusterShardMetrics" + "rescore_vector": { + "description": "The rescore vector options. This is only applicable to `bbq_disk`, `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`, `int4_flat`, and `int8_flat` index types.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptionsRescoreVector" + } + ] + }, + "on_disk_rescore": { + "description": "`true` if vector rescoring should be done on-disk\n\nOnly applicable to `bbq_disk`, `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`", + "default": false, + "x-state": "Technical preview; Added in 9.3.0", + "type": "boolean" } }, "required": [ - "primaries", - "replication", - "shards" + "type" ] }, - "cluster.stats.ClusterShardMetrics": { - "type": "object", - "properties": { - "avg": { - "description": "Mean number of shards in an index, counting only shards assigned to selected nodes.", - "type": "number" - }, - "max": { - "description": "Maximum number of shards in an index, counting only shards assigned to selected nodes.", - "type": "number" - }, - "min": { - "description": "Minimum number of shards in an index, counting only shards assigned to selected nodes.", - "type": "number" - } - }, - "required": [ - "avg", - "max", - "min" + "_types.mapping.DenseVectorIndexOptionsType": { + "type": "string", + "enum": [ + "bbq_flat", + "bbq_hnsw", + "bbq_disk", + "flat", + "hnsw", + "int4_flat", + "int4_hnsw", + "int8_flat", + "int8_hnsw" ] }, - "_types.StoreStats": { + "_types.mapping.DenseVectorIndexOptionsRescoreVector": { "type": "object", "properties": { - "size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "size_in_bytes": { - "description": "Total size, in bytes, of all shards assigned to selected nodes.", - "type": "number" - }, - "reserved": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "reserved_in_bytes": { - "description": "A prediction, in bytes, of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.", - "type": "number" - }, - "total_data_set_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "total_data_set_size_in_bytes": { - "description": "Total data set size, in bytes, of all shards assigned to selected nodes.\nThis includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices.", + "oversample": { + "description": "The oversampling factor to use when searching for the nearest neighbor. This is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`.\nWhen provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors.\n\nvalid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling.", "type": "number" } }, "required": [ - "size_in_bytes", - "reserved_in_bytes" + "oversample" ] }, - "cluster.stats.FieldTypesMappings": { - "type": "object", - "properties": { - "field_types": { - "description": "Contains statistics about field data types used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.FieldTypes" - } - }, - "runtime_field_types": { - "description": "Contains statistics about runtime field data types used in selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.RuntimeFieldTypes" - } - }, - "total_field_count": { - "description": "Total number of fields in all non-system indices.", - "type": "number" - }, - "total_deduplicated_field_count": { - "description": "Total number of fields in all non-system indices, accounting for mapping deduplication.", - "type": "number" - }, - "total_deduplicated_mapping_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "total_deduplicated_mapping_size_in_bytes": { - "description": "Total size of all mappings, in bytes, after deduplication and compression.", - "type": "number" - } - }, - "required": [ - "field_types" + "_types.mapping.DenseVectorSimilarity": { + "type": "string", + "enum": [ + "cosine", + "dot_product", + "l2_norm", + "max_inner_product" ] }, - "cluster.stats.RuntimeFieldTypes": { - "type": "object", - "properties": { - "chars_max": { - "description": "Maximum number of characters for a single runtime field script.", - "type": "number" - }, - "chars_total": { - "description": "Total number of characters for the scripts that define the current runtime field data type.", - "type": "number" - }, - "count": { - "description": "Number of runtime fields mapped to the field data type in selected nodes.", - "type": "number" - }, - "doc_max": { - "description": "Maximum number of accesses to doc_values for a single runtime field script", - "type": "number" - }, - "doc_total": { - "description": "Total number of accesses to doc_values for the scripts that define the current runtime field data type.", - "type": "number" - }, - "index_count": { - "description": "Number of indices containing a mapping of the runtime field data type in selected nodes.", - "type": "number" - }, - "lang": { - "description": "Script languages used for the runtime fields scripts.", - "type": "array", - "items": { - "type": "string" - } - }, - "lines_max": { - "description": "Maximum number of lines for a single runtime field script.", - "type": "number" - }, - "lines_total": { - "description": "Total number of lines for the scripts that define the current runtime field data type.", - "type": "number" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "scriptless_count": { - "description": "Number of runtime fields that don’t declare a script.", - "type": "number" - }, - "shadowed_count": { - "description": "Number of runtime fields that shadow an indexed field.", - "type": "number" - }, - "source_max": { - "description": "Maximum number of accesses to _source for a single runtime field script.", - "type": "number" + "_types.mapping.FlattenedProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "source_total": { - "description": "Total number of accesses to _source for the scripts that define the current runtime field data type.", - "type": "number" + { + "type": "object", + "properties": { + "boost": { + "type": "number" + }, + "depth_limit": { + "type": "number" + }, + "doc_values": { + "type": "boolean" + }, + "eager_global_ordinals": { + "type": "boolean" + }, + "index": { + "type": "boolean" + }, + "index_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.IndexOptions" + } + ] + }, + "null_value": { + "type": "string" + }, + "similarity": { + "type": "string" + }, + "split_queries_on_whitespace": { + "type": "boolean" + }, + "time_series_dimensions": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "enum": [ + "flattened" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "chars_max", - "chars_total", - "count", - "doc_max", - "doc_total", - "index_count", - "lang", - "lines_max", - "lines_total", - "name", - "scriptless_count", - "shadowed_count", - "source_max", - "source_total" ] }, - "cluster.stats.IndicesVersions": { - "type": "object", - "properties": { - "index_count": { - "type": "number" - }, - "primary_shard_count": { - "type": "number" - }, - "total_primary_bytes": { - "type": "number" + "_types.mapping.NestedProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "include_in_parent": { + "type": "boolean" + }, + "include_in_root": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "nested" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "index_count", - "primary_shard_count", - "total_primary_bytes", - "version" ] }, - "cluster.stats.ClusterNodes": { - "type": "object", - "properties": { - "count": { - "$ref": "#/components/schemas/cluster.stats.ClusterNodeCount" + "_types.mapping.ObjectProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" }, - "discovery_types": { - "description": "Contains statistics about the discovery types used by selected nodes.", + { "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "fs": { - "$ref": "#/components/schemas/cluster.stats.ClusterFileSystem" - }, - "indexing_pressure": { - "$ref": "#/components/schemas/cluster.stats.IndexingPressure" - }, - "ingest": { - "$ref": "#/components/schemas/cluster.stats.ClusterIngest" - }, - "jvm": { - "$ref": "#/components/schemas/cluster.stats.ClusterJvm" - }, - "network_types": { - "$ref": "#/components/schemas/cluster.stats.ClusterNetworkTypes" - }, - "os": { - "$ref": "#/components/schemas/cluster.stats.ClusterOperatingSystem" - }, - "packaging_types": { - "description": "Contains statistics about Elasticsearch distributions installed on selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.NodePackagingType" - } - }, - "plugins": { - "description": "Contains statistics about installed plugins and modules by selected nodes.\nIf no plugins or modules are installed, this array is empty.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.PluginStats" - } - }, - "process": { - "$ref": "#/components/schemas/cluster.stats.ClusterProcess" - }, - "versions": { - "description": "Array of Elasticsearch versions used on selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.VersionString" + "properties": { + "enabled": { + "type": "boolean" + }, + "subobjects": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.Subobjects" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "object" + ] + } } } - }, - "required": [ - "count", - "discovery_types", - "fs", - "indexing_pressure", - "ingest", - "jvm", - "network_types", - "os", - "packaging_types", - "plugins", - "process", - "versions" ] }, - "cluster.stats.ClusterNodeCount": { - "type": "object", - "properties": { - "coordinating_only": { - "type": "number" - }, - "data": { - "type": "number" - }, - "data_cold": { - "type": "number" - }, - "data_content": { - "type": "number" - }, - "data_frozen": { - "type": "number" - }, - "data_hot": { - "type": "number" - }, - "data_warm": { - "type": "number" - }, - "ingest": { - "type": "number" - }, - "master": { - "type": "number" - }, - "ml": { - "type": "number" - }, - "remote_cluster_client": { - "type": "number" - }, - "total": { - "type": "number" - }, - "transform": { - "type": "number" - }, - "voting_only": { - "type": "number" - } - }, - "required": [ - "coordinating_only", - "data", - "data_cold", - "data_content", - "data_hot", - "data_warm", - "ingest", - "master", - "ml", - "remote_cluster_client", - "total", - "transform", - "voting_only" + "_types.mapping.Subobjects": { + "type": "string", + "enum": [ + "true", + "false" ] }, - "cluster.stats.ClusterFileSystem": { - "type": "object", - "properties": { - "available_in_bytes": { - "description": "Total number of bytes available to JVM in file stores across all selected nodes.\nDepending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`.\nThis is the actual amount of free disk space the selected Elasticsearch nodes can use.", - "type": "number" - }, - "free_in_bytes": { - "description": "Total number of unallocated bytes in file stores across all selected nodes.", - "type": "number" + "_types.mapping.PassthroughObjectProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.CorePropertyBase" }, - "total_in_bytes": { - "description": "Total size, in bytes, of all file stores across all selected nodes.", - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "passthrough" + ] + }, + "enabled": { + "type": "boolean" + }, + "priority": { + "type": "number" + }, + "time_series_dimension": { + "type": "boolean" + } + } } - }, - "required": [ - "available_in_bytes", - "free_in_bytes", - "total_in_bytes" ] }, - "cluster.stats.IndexingPressure": { - "type": "object", - "properties": { - "memory": { - "$ref": "#/components/schemas/cluster.stats.IndexingPressureMemory" + "_types.mapping.RankVectorProperty": { + "description": "Technical preview", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "rank_vectors" + ] + }, + "element_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RankVectorElementType" + } + ] + }, + "dims": { + "type": "number" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "memory" ] }, - "cluster.stats.IndexingPressureMemory": { - "type": "object", - "properties": { - "current": { - "$ref": "#/components/schemas/cluster.stats.IndexingPressureMemorySummary" - }, - "limit_in_bytes": { - "type": "number" - }, - "total": { - "$ref": "#/components/schemas/cluster.stats.IndexingPressureMemorySummary" - } - }, - "required": [ - "current", - "limit_in_bytes", - "total" + "_types.mapping.RankVectorElementType": { + "type": "string", + "enum": [ + "byte", + "float", + "bit" ] }, - "cluster.stats.IndexingPressureMemorySummary": { + "_types.mapping.SemanticTextProperty": { "type": "object", "properties": { - "all_in_bytes": { - "type": "number" - }, - "combined_coordinating_and_primary_in_bytes": { - "type": "number" + "type": { + "type": "string", + "enum": [ + "semantic_text" + ] }, - "coordinating_in_bytes": { - "type": "number" + "meta": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "coordinating_rejections": { - "type": "number" + "inference_id": { + "description": "Inference endpoint that will be used to generate embeddings for the field.\nThis parameter cannot be updated. Use the Create inference API to create the endpoint.\nIf `search_inference_id` is specified, the inference endpoint will only be used at index time.", + "default": ".elser-2-elasticsearch", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "primary_in_bytes": { - "type": "number" + "search_inference_id": { + "description": "Inference endpoint that will be used to generate embeddings at query time.\nYou can update this parameter by using the Update mapping API. Use the Create inference API to create the endpoint.\nIf not specified, the inference endpoint defined by inference_id will be used at both index and query time.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "primary_rejections": { - "type": "number" + "index_options": { + "description": "Settings for index_options that override any defaults used by semantic_text, for example\nspecific quantization settings.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SemanticTextIndexOptions" + } + ] }, - "replica_in_bytes": { - "type": "number" + "chunking_settings": { + "description": "Settings for chunking text into smaller passages. If specified, these will override the\nchunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated,\nthey will not be applied to existing documents until they are reindexed.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.mapping.ChunkingSettings" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "replica_rejections": { - "type": "number" + "fields": { + "description": "Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one\nfield for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.Property" + } } }, "required": [ - "all_in_bytes", - "combined_coordinating_and_primary_in_bytes", - "coordinating_in_bytes", - "primary_in_bytes", - "replica_in_bytes" + "type" ] }, - "cluster.stats.ClusterIngest": { + "_types.mapping.SemanticTextIndexOptions": { "type": "object", "properties": { - "number_of_pipelines": { - "type": "number" + "dense_vector": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptions" + } + ] }, - "processor_stats": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/cluster.stats.ClusterProcessor" - } + "sparse_vector": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SparseVectorIndexOptions" + } + ] } - }, - "required": [ - "number_of_pipelines", - "processor_stats" - ] + } }, - "cluster.stats.ClusterProcessor": { + "_types.mapping.SparseVectorIndexOptions": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "current": { - "type": "number" - }, - "failed": { - "type": "number" - }, - "time": { - "$ref": "#/components/schemas/_types.Duration" + "prune": { + "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", + "x-state": "Generally available; Added in 8.19.0", + "type": "boolean" }, - "time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "pruning_config": { + "description": "Optional pruning configuration.\nIf enabled, this will omit non-significant tokens from the query in order to improve query performance.\nThis is only used if prune is set to true.\nIf prune is set to true but pruning_config is not specified, default values will be used.", + "x-state": "Generally available; Added in 8.19.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TokenPruningConfig" + } + ] } - }, - "required": [ - "count", - "current", - "failed", - "time_in_millis" - ] + } }, - "cluster.stats.ClusterJvm": { + "_types.mapping.ChunkingSettings": { "type": "object", "properties": { - "max_uptime_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "mem": { - "$ref": "#/components/schemas/cluster.stats.ClusterJvmMemory" + "strategy": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies" + }, + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", + "default": "sentence", + "type": "string" }, - "threads": { - "description": "Number of active threads in use by JVM across all selected nodes.", - "type": "number" + "separator_group": { + "description": "Only applicable to the `recursive` strategy and required when using it.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "type": "string" }, - "versions": { - "description": "Contains statistics about the JVM versions used by selected nodes.", + "separators": { + "description": "Only applicable to the `recursive` strategy and required when using it.\n\nA list of strings used as possible split points when chunking text.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", "type": "array", "items": { - "$ref": "#/components/schemas/cluster.stats.ClusterJvmVersion" + "type": "string" } - } - }, - "required": [ - "max_uptime_in_millis", - "mem", - "threads", - "versions" - ] - }, - "cluster.stats.ClusterJvmMemory": { - "type": "object", - "properties": { - "heap_max_in_bytes": { - "description": "Maximum amount of memory, in bytes, available for use by the heap across all selected nodes.", + }, + "max_chunk_size": { + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", + "default": 250.0, "type": "number" }, - "heap_used_in_bytes": { - "description": "Memory, in bytes, currently in use by the heap across all selected nodes.", + "overlap": { + "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "default": 100.0, + "type": "number" + }, + "sentence_overlap": { + "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "default": 1.0, "type": "number" } }, "required": [ - "heap_max_in_bytes", - "heap_used_in_bytes" + "strategy", + "max_chunk_size" ] }, - "cluster.stats.ClusterJvmVersion": { - "type": "object", - "properties": { - "bundled_jdk": { - "description": "Always `true`. All distributions come with a bundled Java Development Kit (JDK).", - "type": "boolean" - }, - "count": { - "description": "Total number of selected nodes using JVM.", - "type": "number" - }, - "using_bundled_jdk": { - "description": "If `true`, a bundled JDK is in use by JVM.", - "type": "boolean" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "vm_name": { - "description": "Name of the JVM.", - "type": "string" - }, - "vm_vendor": { - "description": "Vendor of the JVM.", - "type": "string" + "_types.mapping.SparseVectorProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "vm_version": { - "$ref": "#/components/schemas/_types.VersionString" + { + "type": "object", + "properties": { + "store": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "sparse_vector" + ] + }, + "index_options": { + "description": "Additional index options for the sparse vector field that controls the\ntoken pruning behavior of the sparse vector field.", + "x-state": "Generally available; Added in 8.19.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SparseVectorIndexOptions" + } + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "bundled_jdk", - "count", - "using_bundled_jdk", - "version", - "vm_name", - "vm_vendor", - "vm_version" ] }, - "cluster.stats.ClusterNetworkTypes": { - "type": "object", - "properties": { - "http_types": { - "description": "Contains statistics about the HTTP network types used by selected nodes.", - "type": "object", - "additionalProperties": { - "type": "number" - } + "_types.mapping.CompletionProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "transport_types": { - "description": "Contains statistics about the transport network types used by selected nodes.", + { "type": "object", - "additionalProperties": { - "type": "number" - } + "properties": { + "analyzer": { + "type": "string" + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.mapping.SuggestContext" + } + }, + "max_input_length": { + "type": "number" + }, + "preserve_position_increments": { + "type": "boolean" + }, + "preserve_separators": { + "type": "boolean" + }, + "search_analyzer": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "completion" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "http_types", - "transport_types" ] }, - "cluster.stats.ClusterOperatingSystem": { + "_types.mapping.SuggestContext": { "type": "object", "properties": { - "allocated_processors": { - "description": "Number of processors used to calculate thread pool size across all selected nodes.\nThis number can be set with the processors setting of a node and defaults to the number of processors reported by the operating system.\nIn both cases, this number will never be larger than 32.", - "type": "number" - }, - "architectures": { - "description": "Contains statistics about processor architectures (for example, x86_64 or aarch64) used by selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.ClusterOperatingSystemArchitecture" - } - }, - "available_processors": { - "description": "Number of processors available to JVM across all selected nodes.", - "type": "number" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "mem": { - "$ref": "#/components/schemas/cluster.stats.OperatingSystemMemoryInfo" + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "names": { - "description": "Contains statistics about operating systems used by selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.ClusterOperatingSystemName" - } + "type": { + "type": "string" }, - "pretty_names": { - "description": "Contains statistics about operating systems used by selected nodes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.stats.ClusterOperatingSystemPrettyName" - } + "precision": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] } }, "required": [ - "allocated_processors", - "available_processors", - "mem", - "names", - "pretty_names" + "name", + "type" ] }, - "cluster.stats.ClusterOperatingSystemArchitecture": { - "type": "object", - "properties": { - "arch": { - "description": "Name of an architecture used by one or more selected nodes.", - "type": "string" + "_types.mapping.ConstantKeywordProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "count": { - "description": "Number of selected nodes using the architecture.", - "type": "number" + { + "type": "object", + "properties": { + "value": { + "type": "object" + }, + "type": { + "type": "string", + "enum": [ + "constant_keyword" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "arch", - "count" ] }, - "cluster.stats.OperatingSystemMemoryInfo": { - "type": "object", - "properties": { - "adjusted_total_in_bytes": { - "description": "Total amount, in bytes, of memory across all selected nodes, but using the value specified using the `es.total_memory_bytes` system property instead of measured total memory for those nodes where that system property was set.", - "type": "number" - }, - "free_in_bytes": { - "description": "Amount, in bytes, of free physical memory across all selected nodes.", - "type": "number" - }, - "free_percent": { - "description": "Percentage of free physical memory across all selected nodes.", - "type": "number" + "_types.mapping.CountedKeywordProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "total_in_bytes": { - "description": "Total amount, in bytes, of physical memory across all selected nodes.", - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "counted_keyword" + ] + }, + "index": { + "type": "boolean" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping.FieldAliasProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "used_in_bytes": { - "description": "Amount, in bytes, of physical memory in use across all selected nodes.", - "type": "number" + { + "type": "object", + "properties": { + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "alias" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping.HistogramProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "used_percent": { - "description": "Percentage of physical memory in use across all selected nodes.", - "type": "number" + { + "type": "object", + "properties": { + "ignore_malformed": { + "type": "boolean" + }, + "time_series_metric": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "histogram" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "free_in_bytes", - "free_percent", - "total_in_bytes", - "used_in_bytes", - "used_percent" ] }, - "cluster.stats.ClusterOperatingSystemName": { - "type": "object", - "properties": { - "count": { - "description": "Number of selected nodes using the operating system.", - "type": "number" + "_types.mapping.ExponentialHistogramProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" }, - "name": { - "$ref": "#/components/schemas/_types.Name" + { + "type": "object", + "properties": { + "time_series_metric": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "exponential_histogram" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "count", - "name" ] }, - "cluster.stats.ClusterOperatingSystemPrettyName": { - "type": "object", - "properties": { - "count": { - "description": "Number of selected nodes using the operating system.", - "type": "number" + "_types.mapping.IpProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "pretty_name": { - "$ref": "#/components/schemas/_types.Name" + { + "type": "object", + "properties": { + "boost": { + "type": "number" + }, + "index": { + "type": "boolean" + }, + "ignore_malformed": { + "type": "boolean" + }, + "null_value": { + "type": "string" + }, + "on_script_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.OnScriptError" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "time_series_dimension": { + "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", + "x-state": "Technical preview", + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "ip" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "count", - "pretty_name" ] }, - "cluster.stats.NodePackagingType": { - "type": "object", - "properties": { - "count": { - "description": "Number of selected nodes using the distribution flavor and file type.", - "type": "number" - }, - "flavor": { - "description": "Type of Elasticsearch distribution. This is always `default`.", - "type": "string" + "_types.mapping.Murmur3HashProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "type": { - "description": "File type (such as `tar` or `zip`) used for the distribution package.", - "type": "string" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "murmur3" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "count", - "flavor", - "type" ] }, - "_types.PluginStats": { - "type": "object", - "properties": { - "classname": { - "type": "string" - }, - "description": { - "type": "string" - }, - "elasticsearch_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "extended_plugins": { - "type": "array", - "items": { - "type": "string" - } - }, - "has_native_controller": { - "type": "boolean" - }, - "java_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "_types.mapping.TokenCountProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "licensed": { - "type": "boolean" + { + "type": "object", + "properties": { + "analyzer": { + "type": "string" + }, + "boost": { + "type": "number" + }, + "index": { + "type": "boolean" + }, + "null_value": { + "type": "number" + }, + "enable_position_increments": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "token_count" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "classname", - "description", - "elasticsearch_version", - "extended_plugins", - "has_native_controller", - "java_version", - "name", - "version", - "licensed" ] }, - "cluster.stats.ClusterProcess": { - "type": "object", - "properties": { - "cpu": { - "$ref": "#/components/schemas/cluster.stats.ClusterProcessCpu" + "_types.mapping.GeoPointProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "open_file_descriptors": { - "$ref": "#/components/schemas/cluster.stats.ClusterProcessOpenFileDescriptors" + { + "type": "object", + "properties": { + "ignore_malformed": { + "type": "boolean" + }, + "ignore_z_value": { + "type": "boolean" + }, + "null_value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoLocation" + } + ] + }, + "index": { + "type": "boolean" + }, + "on_script_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.OnScriptError" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "geo_point" + ] + }, + "time_series_metric": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.GeoPointMetricType" + } + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "cpu", - "open_file_descriptors" ] }, - "cluster.stats.ClusterProcessCpu": { - "type": "object", - "properties": { - "percent": { - "description": "Percentage of CPU used across all selected nodes.\nReturns `-1` if not supported.", - "type": "number" - } - }, - "required": [ - "percent" + "_types.mapping.GeoPointMetricType": { + "type": "string", + "enum": [ + "gauge", + "counter", + "position" ] }, - "cluster.stats.ClusterProcessOpenFileDescriptors": { - "type": "object", - "properties": { - "avg": { - "description": "Average number of concurrently open file descriptors.\nReturns `-1` if not supported.", - "type": "number" - }, - "max": { - "description": "Maximum number of concurrently open file descriptors allowed across all selected nodes.\nReturns `-1` if not supported.", - "type": "number" + "_types.mapping.GeoShapeProperty": { + "description": "The `geo_shape` data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles\nand polygons.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "min": { - "description": "Minimum number of concurrently open file descriptors across all selected nodes.\nReturns -1 if not supported.", - "type": "number" + { + "type": "object", + "properties": { + "coerce": { + "type": "boolean" + }, + "ignore_malformed": { + "type": "boolean" + }, + "ignore_z_value": { + "type": "boolean" + }, + "index": { + "type": "boolean" + }, + "orientation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.GeoOrientation" + } + ] + }, + "strategy": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.GeoStrategy" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "geo_shape" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "avg", - "max", - "min" ] }, - "cluster.stats.CCSStats": { - "type": "object", - "properties": { - "clusters": { - "description": "Contains remote cluster settings and metrics collected from them.\nThe keys are cluster names, and the values are per-cluster data.\nOnly present if `include_remotes` option is set to true.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/cluster.stats.RemoteClusterInfo" - } - }, - "_search": { - "$ref": "#/components/schemas/cluster.stats.CCSUsageStats" - }, - "_esql": { - "$ref": "#/components/schemas/cluster.stats.CCSUsageStats" - } - }, - "required": [ - "_search" + "_types.mapping.GeoOrientation": { + "type": "string", + "enum": [ + "right", + "RIGHT", + "counterclockwise", + "ccw", + "left", + "LEFT", + "clockwise", + "cw" ] }, - "cluster.stats.RemoteClusterInfo": { - "type": "object", - "properties": { - "cluster_uuid": { - "description": "The UUID of the remote cluster.", - "type": "string" - }, - "mode": { - "description": "The connection mode used to communicate with the remote cluster.", - "type": "string" - }, - "skip_unavailable": { - "description": "The `skip_unavailable` setting used for this remote cluster.", - "type": "boolean" - }, - "transport_compress": { - "description": "Transport compression setting used for this remote cluster.", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/_types.HealthStatus" - }, - "version": { - "description": "The list of Elasticsearch versions used by the nodes on the remote cluster.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.VersionString" - } - }, - "nodes_count": { - "description": "The total count of nodes in the remote cluster.", - "type": "number" - }, - "shards_count": { - "description": "The total number of shards in the remote cluster.", - "type": "number" - }, - "indices_count": { - "description": "The total number of indices in the remote cluster.", - "type": "number" - }, - "indices_total_size_in_bytes": { - "description": "Total data set size, in bytes, of all shards assigned to selected nodes.", - "type": "number" - }, - "indices_total_size": { - "description": "Total data set size of all shards assigned to selected nodes, as a human-readable string.", - "type": "string" - }, - "max_heap_in_bytes": { - "description": "Maximum amount of memory, in bytes, available for use by the heap across the nodes of the remote cluster.", - "type": "number" - }, - "max_heap": { - "description": "Maximum amount of memory available for use by the heap across the nodes of the remote cluster, as a human-readable string.", - "type": "string" - }, - "mem_total_in_bytes": { - "description": "Total amount, in bytes, of physical memory across the nodes of the remote cluster.", - "type": "number" - }, - "mem_total": { - "description": "Total amount of physical memory across the nodes of the remote cluster, as a human-readable string.", - "type": "string" - } - }, - "required": [ - "cluster_uuid", - "mode", - "skip_unavailable", - "transport_compress", - "status", - "version", - "nodes_count", - "shards_count", - "indices_count", - "indices_total_size_in_bytes", - "max_heap_in_bytes", - "mem_total_in_bytes" + "_types.mapping.GeoStrategy": { + "type": "string", + "enum": [ + "recursive", + "term" ] }, - "cluster.stats.CCSUsageStats": { - "type": "object", - "properties": { - "total": { - "description": "The total number of cross-cluster search requests that have been executed by the cluster.", - "type": "number" - }, - "success": { - "description": "The total number of cross-cluster search requests that have been successfully executed by the cluster.", - "type": "number" - }, - "skipped": { - "description": "The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped.", - "type": "number" - }, - "took": { - "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" - }, - "took_mrt_true": { - "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" - }, - "took_mrt_false": { - "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" - }, - "remotes_per_search_max": { - "description": "The maximum number of remote clusters that were queried in a single cross-cluster search request.", - "type": "number" - }, - "remotes_per_search_avg": { - "description": "The average number of remote clusters that were queried in a single cross-cluster search request.", - "type": "number" + "_types.mapping.PointProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "failure_reasons": { - "description": "Statistics about the reasons for cross-cluster search request failures. The keys are the failure reason names and the values are the number of requests that failed for that reason.", + { "type": "object", - "additionalProperties": { - "type": "number" - } + "properties": { + "ignore_malformed": { + "type": "boolean" + }, + "ignore_z_value": { + "type": "boolean" + }, + "null_value": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping.ShapeProperty": { + "description": "The `shape` data type facilitates the indexing of and searching with arbitrary `x, y` cartesian shapes such as\nrectangles and polygons.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "features": { - "description": "The keys are the names of the search feature, and the values are the number of requests that used that feature. Single request can use more than one feature (e.g. both `async` and `wildcard`).", + { "type": "object", - "additionalProperties": { - "type": "number" - } + "properties": { + "coerce": { + "type": "boolean" + }, + "ignore_malformed": { + "type": "boolean" + }, + "ignore_z_value": { + "type": "boolean" + }, + "orientation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.GeoOrientation" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "shape" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping.ByteNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - "clients": { - "description": "Statistics about the clients that executed cross-cluster search requests. The keys are the names of the clients, and the values are the number of requests that were executed by that client. Only known clients (such as `kibana` or `elasticsearch`) are counted.", + { "type": "object", - "additionalProperties": { - "type": "number" - } + "properties": { + "type": { + "type": "string", + "enum": [ + "byte" + ] + }, + "null_value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.byte" + } + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.byte": { + "type": "number" + }, + "_types.mapping.NumberPropertyBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "clusters": { - "description": "Statistics about the clusters that were queried in cross-cluster search requests. The keys are cluster names, and the values are per-cluster telemetry data. This also includes the local cluster itself, which uses the name `(local)`.", + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/cluster.stats.CCSUsageClusterStats" + "properties": { + "boost": { + "type": "number" + }, + "coerce": { + "type": "boolean" + }, + "ignore_malformed": { + "type": "boolean" + }, + "index": { + "type": "boolean" + }, + "on_script_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.OnScriptError" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] + }, + "time_series_metric": { + "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", + "x-state": "Technical preview", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" + } + ] + }, + "time_series_dimension": { + "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", + "default": false, + "x-state": "Technical preview", + "type": "boolean" + } } } - }, - "required": [ - "total", - "success", - "skipped", - "took", - "remotes_per_search_max", - "remotes_per_search_avg", - "failure_reasons", - "features", - "clients", - "clusters" ] }, - "cluster.stats.CCSUsageTimeValue": { - "type": "object", - "properties": { - "max": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "avg": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "_types.mapping.DoubleNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - "p90": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "double" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "max", - "avg", - "p90" ] }, - "cluster.stats.CCSUsageClusterStats": { - "type": "object", - "properties": { - "total": { - "description": "The total number of successful (not skipped) cross-cluster search requests that were executed against this cluster. This may include requests where partial results were returned, but not requests in which the cluster has been skipped entirely.", - "type": "number" - }, - "skipped": { - "description": "The total number of cross-cluster search requests for which this cluster was skipped.", - "type": "number" + "_types.mapping.FloatNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - "took": { - "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "float" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "total", - "skipped", - "took" ] }, - "nodes._types.NodesResponseBase": { - "type": "object", - "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" + "_types.mapping.HalfFloatNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "half_float" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] } - } + ] }, - "_types.NodeStatistics": { - "type": "object", - "properties": { - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ErrorCause" - } - }, - "total": { - "description": "Total number of nodes selected by the request.", - "type": "number" - }, - "successful": { - "description": "Number of nodes that responded successfully to the request.", - "type": "number" + "_types.mapping.IntegerNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - "failed": { - "description": "Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.", - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "integer" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "total", - "successful", - "failed" ] }, - "_types.Result": { - "type": "string", - "enum": [ - "created", - "updated", - "deleted", - "not_found", - "noop" + "_types.mapping.LongNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "long" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] + } ] }, - "connector._types.Connector": { - "type": "object", - "properties": { - "api_key_id": { - "type": "string" - }, - "api_key_secret_id": { - "type": "string" - }, - "configuration": { - "$ref": "#/components/schemas/connector._types.ConnectorConfiguration" - }, - "custom_scheduling": { - "$ref": "#/components/schemas/connector._types.ConnectorCustomScheduling" - }, - "deleted": { - "type": "boolean" - }, - "description": { - "type": "string" + "_types.mapping.ScaledFloatNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - "error": { - "oneOf": [ - { - "type": "string" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scaled_float" + ] }, - { - "nullable": true, - "type": "string" + "null_value": { + "type": "number" + }, + "scaling_factor": { + "type": "number" } + }, + "required": [ + "type" ] + } + ] + }, + "_types.mapping.ShortNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - "features": { - "$ref": "#/components/schemas/connector._types.ConnectorFeatures" - }, - "filtering": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types.FilteringConfig" - } - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "index_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.IndexName" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "short" + ] }, - { - "nullable": true, - "type": "string" + "null_value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.short" + } + ] } + }, + "required": [ + "type" ] - }, - "is_native": { - "type": "boolean" - }, - "language": { - "type": "string" - }, - "last_access_control_sync_error": { - "type": "string" - }, - "last_access_control_sync_scheduled_at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "last_access_control_sync_status": { - "$ref": "#/components/schemas/connector._types.SyncStatus" - }, - "last_deleted_document_count": { - "type": "number" - }, - "last_incremental_sync_scheduled_at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "last_indexed_document_count": { - "type": "number" - }, - "last_seen": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "last_sync_error": { - "type": "string" - }, - "last_sync_scheduled_at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "last_sync_status": { - "$ref": "#/components/schemas/connector._types.SyncStatus" - }, - "last_synced": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "name": { - "type": "string" - }, - "pipeline": { - "$ref": "#/components/schemas/connector._types.IngestPipelineParams" - }, - "scheduling": { - "$ref": "#/components/schemas/connector._types.SchedulingConfiguration" - }, - "service_type": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/connector._types.ConnectorStatus" - }, - "sync_cursor": { - "type": "object" - }, - "sync_now": { - "type": "boolean" } - }, - "required": [ - "configuration", - "custom_scheduling", - "deleted", - "filtering", - "is_native", - "scheduling", - "status", - "sync_now" ] }, - "connector._types.ConnectorConfiguration": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/connector._types.ConnectorConfigProperties" - } + "_types.short": { + "type": "number" }, - "connector._types.ConnectorConfigProperties": { - "type": "object", - "properties": { - "category": { - "type": "string" - }, - "default_value": { - "$ref": "#/components/schemas/_types.ScalarValue" - }, - "depends_on": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types.Dependency" - } - }, - "display": { - "$ref": "#/components/schemas/connector._types.DisplayType" - }, - "label": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types.SelectOption" - } - }, - "order": { - "type": "number" - }, - "placeholder": { - "type": "string" - }, - "required": { - "type": "boolean" + "_types.mapping.UnsignedLongNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase" }, - "sensitive": { - "type": "boolean" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "unsigned_long" + ] + }, + "null_value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ulong" + } + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.ulong": { + "type": "number" + }, + "_types.mapping.DateRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, - "tooltip": { - "oneOf": [ - { + { + "type": "object", + "properties": { + "format": { "type": "string" }, - { - "nullable": true, - "type": "string" + "type": { + "type": "string", + "enum": [ + "date_range" + ] } + }, + "required": [ + "type" ] - }, - "type": { - "$ref": "#/components/schemas/connector._types.ConnectorFieldType" - }, - "ui_restrictions": { - "type": "array", - "items": { - "type": "string" - } - }, - "validations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types.Validation" - } - }, - "value": { - "type": "object" } - }, - "required": [ - "default_value", - "depends_on", - "display", - "label", - "options", - "required", - "sensitive", - "value" ] }, - "_types.ScalarValue": { - "description": "A scalar value.", - "oneOf": [ - { - "type": "number" - }, + "_types.mapping.RangePropertyBase": { + "allOf": [ { - "type": "number" + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, { - "type": "string" - }, + "type": "object", + "properties": { + "boost": { + "type": "number" + }, + "coerce": { + "type": "boolean" + }, + "index": { + "type": "boolean" + } + } + } + ] + }, + "_types.mapping.DoubleRangeProperty": { + "allOf": [ { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, { - "nullable": true, - "type": "string" + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "double_range" + ] + } + }, + "required": [ + "type" + ] } ] }, - "connector._types.Dependency": { - "type": "object", - "properties": { - "field": { - "type": "string" + "_types.mapping.FloatRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, - "value": { - "$ref": "#/components/schemas/_types.ScalarValue" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "float_range" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "field", - "value" - ] - }, - "connector._types.DisplayType": { - "type": "string", - "enum": [ - "textbox", - "textarea", - "numeric", - "toggle", - "dropdown" ] }, - "connector._types.SelectOption": { - "type": "object", - "properties": { - "label": { - "type": "string" + "_types.mapping.IntegerRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, - "value": { - "$ref": "#/components/schemas/_types.ScalarValue" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "integer_range" + ] + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "label", - "value" ] }, - "connector._types.ConnectorFieldType": { - "type": "string", - "enum": [ - "str", - "int", - "list", - "bool" - ] - }, - "connector._types.Validation": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types.LessThanValidation" - }, + "_types.mapping.IpRangeProperty": { + "allOf": [ { - "$ref": "#/components/schemas/connector._types.GreaterThanValidation" + "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, { - "$ref": "#/components/schemas/connector._types.ListTypeValidation" - }, + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ip_range" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping.LongRangeProperty": { + "allOf": [ { - "$ref": "#/components/schemas/connector._types.IncludedInValidation" + "$ref": "#/components/schemas/_types.mapping.RangePropertyBase" }, { - "$ref": "#/components/schemas/connector._types.RegexValidation" + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "long_range" + ] + } + }, + "required": [ + "type" + ] } ] }, - "connector._types.LessThanValidation": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "less_than" - ] + "_types.mapping.IcuCollationProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase" }, - "constraint": { - "type": "number" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "icu_collation_keyword" + ] + }, + "norms": { + "type": "boolean" + }, + "index_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.IndexOptions" + } + ] + }, + "index": { + "description": "Should the field be searchable?", + "type": "boolean" + }, + "null_value": { + "description": "Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing.", + "type": "string" + }, + "rules": { + "type": "string" + }, + "language": { + "type": "string" + }, + "country": { + "type": "string" + }, + "variant": { + "type": "string" + }, + "strength": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationStrength" + } + ] + }, + "decomposition": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationDecomposition" + } + ] + }, + "alternate": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationAlternate" + } + ] + }, + "case_level": { + "type": "boolean" + }, + "case_first": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.IcuCollationCaseFirst" + } + ] + }, + "numeric": { + "type": "boolean" + }, + "variable_top": { + "type": "string" + }, + "hiragana_quaternary_mode": { + "type": "boolean" + } + }, + "required": [ + "type" + ] } - }, - "required": [ - "type", - "constraint" ] }, - "connector._types.GreaterThanValidation": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "greater_than" - ] - }, - "constraint": { - "type": "number" - } - }, - "required": [ - "type", - "constraint" + "_types.mapping.MatchType": { + "type": "string", + "enum": [ + "simple", + "regex" ] }, - "connector._types.ListTypeValidation": { + "_types.mapping.FieldNamesField": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "list_type" - ] - }, - "constraint": { - "type": "string" + "enabled": { + "type": "boolean" } }, "required": [ - "type", - "constraint" + "enabled" ] }, - "connector._types.IncludedInValidation": { + "_types.mapping.IndexField": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "included_in" - ] - }, - "constraint": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ScalarValue" - } + "enabled": { + "type": "boolean" } }, "required": [ - "type", - "constraint" + "enabled" ] }, - "connector._types.RegexValidation": { + "_types.mapping.RoutingField": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "regex" - ] - }, - "constraint": { - "type": "string" + "required": { + "type": "boolean" } }, "required": [ - "type", - "constraint" + "required" ] }, - "connector._types.ConnectorCustomScheduling": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/connector._types.CustomScheduling" - } - }, - "connector._types.CustomScheduling": { + "_types.mapping.SizeField": { "type": "object", "properties": { - "configuration_overrides": { - "$ref": "#/components/schemas/connector._types.CustomSchedulingConfigurationOverrides" - }, "enabled": { "type": "boolean" - }, - "interval": { - "type": "string" - }, - "last_synced": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "name": { - "type": "string" } }, "required": [ - "configuration_overrides", - "enabled", - "interval", - "name" + "enabled" ] }, - "connector._types.CustomSchedulingConfigurationOverrides": { + "_types.mapping.SourceField": { "type": "object", "properties": { - "max_crawl_depth": { - "type": "number" + "compress": { + "type": "boolean" }, - "sitemap_discovery_disabled": { + "compress_threshold": { + "type": "string" + }, + "enabled": { "type": "boolean" }, - "domain_allowlist": { + "excludes": { "type": "array", "items": { "type": "string" } }, - "sitemap_urls": { + "includes": { "type": "array", "items": { "type": "string" } }, - "seed_urls": { - "type": "array", - "items": { - "type": "string" - } + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SourceFieldMode" + } + ] } } }, - "connector._types.ConnectorFeatures": { - "type": "object", - "properties": { - "document_level_security": { - "$ref": "#/components/schemas/connector._types.FeatureEnabled" - }, - "incremental_sync": { - "$ref": "#/components/schemas/connector._types.FeatureEnabled" - }, - "native_connector_api_keys": { - "$ref": "#/components/schemas/connector._types.FeatureEnabled" - }, - "sync_rules": { - "$ref": "#/components/schemas/connector._types.SyncRulesFeature" - } - } + "_types.mapping.SourceFieldMode": { + "type": "string", + "enum": [ + "disabled", + "stored", + "synthetic" + ] }, - "connector._types.FeatureEnabled": { + "_types.mapping.DataStreamTimestamp": { "type": "object", "properties": { "enabled": { @@ -75498,5422 +137263,6452 @@ "enabled" ] }, - "connector._types.SyncRulesFeature": { - "type": "object", - "properties": { - "advanced": { - "$ref": "#/components/schemas/connector._types.FeatureEnabled" - }, - "basic": { - "$ref": "#/components/schemas/connector._types.FeatureEnabled" - } - } - }, - "connector._types.FilteringConfig": { + "indices._types.AliasDefinition": { "type": "object", "properties": { - "active": { - "$ref": "#/components/schemas/connector._types.FilteringRules" + "filter": { + "description": "Query used to limit documents the alias can access.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "domain": { + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.", "type": "string" }, - "draft": { - "$ref": "#/components/schemas/connector._types.FilteringRules" - } - }, - "required": [ - "active", - "draft" - ] - }, - "connector._types.FilteringRules": { - "type": "object", - "properties": { - "advanced_snippet": { - "$ref": "#/components/schemas/connector._types.FilteringAdvancedSnippet" + "is_write_index": { + "description": "If `true`, the index is the write index for the alias.", + "default": false, + "type": "boolean" }, - "rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types.FilteringRule" - } + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.", + "type": "string" }, - "validation": { - "$ref": "#/components/schemas/connector._types.FilteringRulesValidation" + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.", + "type": "string" + }, + "is_hidden": { + "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", + "default": false, + "x-state": "Generally available; Added in 7.16.0", + "type": "boolean" } - }, - "required": [ - "advanced_snippet", - "rules", - "validation" - ] + } }, - "connector._types.FilteringAdvancedSnippet": { - "type": "object", - "properties": { - "created_at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "updated_at": { - "$ref": "#/components/schemas/_types.DateTime" + "indices._types.DataStreamLifecycleWithRollover": { + "description": "Data stream lifecycle with rollover can be used to display the configuration including the default rollover conditions,\nif asked.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycle" }, - "value": { - "type": "object" + { + "type": "object", + "properties": { + "rollover": { + "description": "The conditions which will trigger the rollover of a backing index as configured by the cluster setting `cluster.lifecycle.default.rollover`.\nThis property is an implementation detail and it will only be retrieved when the query param `include_defaults` is set to true.\nThe contents of this field are subject to change.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycleRolloverConditions" + } + ] + } + } } - }, - "required": [ - "value" ] }, - "connector._types.FilteringRule": { + "indices._types.DataStreamLifecycleRolloverConditions": { "type": "object", "properties": { - "created_at": { - "$ref": "#/components/schemas/_types.DateTime" + "min_age": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "field": { - "$ref": "#/components/schemas/_types.Field" + "max_age": { + "type": "string" }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "min_docs": { + "type": "number" }, - "order": { + "max_docs": { "type": "number" }, - "policy": { - "$ref": "#/components/schemas/connector._types.FilteringPolicy" + "min_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "rule": { - "$ref": "#/components/schemas/connector._types.FilteringRuleRule" + "max_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "updated_at": { - "$ref": "#/components/schemas/_types.DateTime" + "min_primary_shard_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "value": { - "type": "string" + "max_primary_shard_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "min_primary_shard_docs": { + "type": "number" + }, + "max_primary_shard_docs": { + "type": "number" } - }, - "required": [ - "field", - "id", - "order", - "policy", - "rule", - "value" - ] - }, - "connector._types.FilteringPolicy": { - "type": "string", - "enum": [ - "exclude", - "include" - ] - }, - "connector._types.FilteringRuleRule": { - "type": "string", - "enum": [ - "contains", - "ends_with", - "equals", - "regex", - "starts_with", - ">", - "<" - ] + } }, - "connector._types.FilteringRulesValidation": { + "indices._types.DataStreamLifecycle": { + "description": "Data stream lifecycle denotes that a data stream is managed by the data stream lifecycle and contains the configuration.", "type": "object", "properties": { - "errors": { + "data_retention": { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "downsampling": { + "description": "The list of downsampling rounds to execute as part of this downsampling configuration", "type": "array", "items": { - "$ref": "#/components/schemas/connector._types.FilteringValidation" + "$ref": "#/components/schemas/indices._types.DownsamplingRound" } }, - "state": { - "$ref": "#/components/schemas/connector._types.FilteringValidationState" + "downsampling_method": { + "description": "The method used to downsample the data. There are two options `aggregate` and `last_value`. It requires\n`downsampling` to be defined. Defaults to `aggregate`.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SamplingMethod" + } + ] + }, + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, + "type": "boolean" } - }, - "required": [ - "errors", - "state" - ] + } }, - "connector._types.FilteringValidation": { + "indices._types.DownsamplingRound": { "type": "object", "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } + "after": { + "description": "The duration since rollover when this downsampling round should execute", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "messages": { - "type": "array", - "items": { - "type": "string" - } + "fixed_interval": { + "description": "The downsample interval.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationLarge" + } + ] } }, "required": [ - "ids", - "messages" - ] - }, - "connector._types.FilteringValidationState": { - "type": "string", - "enum": [ - "edited", - "invalid", - "valid" + "after", + "fixed_interval" ] }, - "connector._types.SyncStatus": { + "indices._types.SamplingMethod": { "type": "string", "enum": [ - "canceling", - "canceled", - "completed", - "error", - "in_progress", - "pending", - "suspended" + "aggregate", + "last_value" ] }, - "connector._types.IngestPipelineParams": { + "indices._types.DataStreamOptions": { + "description": "Data stream options contain the configuration of data stream level features for a given data stream, for example,\nthe failure store configuration.", "type": "object", "properties": { - "extract_binary_content": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "reduce_whitespace": { - "type": "boolean" - }, - "run_ml_inference": { - "type": "boolean" + "failure_store": { + "description": "If defined, it specifies configuration for the failure store of this data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStore" + } + ] } - }, - "required": [ - "extract_binary_content", - "name", - "reduce_whitespace", - "run_ml_inference" - ] + } }, - "connector._types.SchedulingConfiguration": { + "indices._types.DataStreamFailureStore": { + "description": "Data stream failure store contains the configuration of the failure store for a given data stream.", "type": "object", "properties": { - "access_control": { - "$ref": "#/components/schemas/connector._types.ConnectorScheduling" - }, - "full": { - "$ref": "#/components/schemas/connector._types.ConnectorScheduling" + "enabled": { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "default": true, + "type": "boolean" }, - "incremental": { - "$ref": "#/components/schemas/connector._types.ConnectorScheduling" + "lifecycle": { + "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.FailureStoreLifecycle" + } + ] } } }, - "connector._types.ConnectorScheduling": { + "indices._types.FailureStoreLifecycle": { + "description": "The failure store lifecycle configures the data stream lifecycle configuration for failure indices.", "type": "object", "properties": { + "data_retention": { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" - }, - "interval": { - "description": "The interval is expressed using the crontab syntax", - "type": "string" } - }, - "required": [ - "enabled", - "interval" + } + }, + "_types.Level": { + "type": "string", + "enum": [ + "cluster", + "indices", + "shards" ] }, - "connector._types.ConnectorStatus": { + "_types.WaitForEvents": { "type": "string", "enum": [ - "created", - "needs_configuration", - "configured", - "connected", - "error" + "immediate", + "urgent", + "high", + "normal", + "low", + "languid" ] }, - "connector._types.ConnectorSyncJob": { + "cluster.health.WaitForNodes": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "cluster.health.HealthResponseBody": { "type": "object", "properties": { - "cancelation_requested_at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "canceled_at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "completed_at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "connector": { - "$ref": "#/components/schemas/connector._types.SyncJobConnectorReference" - }, - "created_at": { - "$ref": "#/components/schemas/_types.DateTime" + "active_primary_shards": { + "description": "The number of active primary shards.", + "type": "number" }, - "deleted_document_count": { + "active_shards": { + "description": "The total number of active primary and replica shards.", "type": "number" }, - "error": { + "active_shards_percent": { + "description": "The ratio of active shards in the cluster expressed as a string formatted percentage.", "type": "string" }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "indexed_document_count": { - "type": "number" - }, - "indexed_document_volume": { + "active_shards_percent_as_number": { + "description": "The ratio of active shards in the cluster expressed as a percentage.", "type": "number" }, - "job_type": { - "$ref": "#/components/schemas/connector._types.SyncJobType" + "cluster_name": { + "description": "The name of the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "last_seen": { - "$ref": "#/components/schemas/_types.DateTime" + "delayed_unassigned_shards": { + "description": "The number of shards whose allocation has been delayed by the timeout settings.", + "type": "number" }, - "metadata": { + "indices": { "type": "object", "additionalProperties": { - "type": "object" + "$ref": "#/components/schemas/cluster.health.IndexHealthStats" } }, - "started_at": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "status": { - "$ref": "#/components/schemas/connector._types.SyncStatus" - }, - "total_document_count": { + "initializing_shards": { + "description": "The number of shards that are under initialization.", "type": "number" }, - "trigger_method": { - "$ref": "#/components/schemas/connector._types.SyncJobTriggerMethod" - }, - "worker_hostname": { - "type": "string" - } - }, - "required": [ - "connector", - "created_at", - "deleted_document_count", - "id", - "indexed_document_count", - "indexed_document_volume", - "job_type", - "metadata", - "status", - "total_document_count", - "trigger_method" - ] - }, - "connector._types.SyncJobConnectorReference": { - "type": "object", - "properties": { - "configuration": { - "$ref": "#/components/schemas/connector._types.ConnectorConfiguration" + "number_of_data_nodes": { + "description": "The number of nodes that are dedicated data nodes.", + "type": "number" }, - "filtering": { - "$ref": "#/components/schemas/connector._types.FilteringRules" + "number_of_in_flight_fetch": { + "description": "The number of unfinished fetches.", + "type": "number" }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "number_of_nodes": { + "description": "The number of nodes within the cluster.", + "type": "number" }, - "index_name": { - "type": "string" + "number_of_pending_tasks": { + "description": "The number of cluster-level changes that have not yet been executed.", + "type": "number" }, - "language": { - "type": "string" + "relocating_shards": { + "description": "The number of shards that are under relocation.", + "type": "number" }, - "pipeline": { - "$ref": "#/components/schemas/connector._types.IngestPipelineParams" + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.HealthStatus" + } + ] }, - "service_type": { - "type": "string" + "task_max_waiting_in_queue": { + "description": "The time since the earliest initiated task is waiting for being performed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "sync_cursor": { - "type": "object" - } - }, - "required": [ - "configuration", - "filtering", - "id", - "index_name", - "service_type" - ] - }, - "connector._types.SyncJobType": { - "type": "string", - "enum": [ - "full", - "incremental", - "access_control" - ] - }, - "connector._types.SyncJobTriggerMethod": { - "type": "string", - "enum": [ - "on_demand", - "scheduled" - ] - }, - "_types.OpType": { - "type": "string", - "enum": [ - "index", - "create" - ] - }, - "_types.WriteResponseBase": { - "type": "object", - "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" + "task_max_waiting_in_queue_millis": { + "description": "The time expressed in milliseconds since the earliest initiated task is waiting for being performed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "timed_out": { + "description": "If false the response returned within the period of time that is specified by the timeout parameter (30s by default)", + "type": "boolean" }, - "_primary_term": { - "description": "The primary term assigned to the document for the indexing operation.", + "unassigned_primary_shards": { + "description": "The number of primary shards that are not allocated.", "type": "number" }, - "result": { - "$ref": "#/components/schemas/_types.Result" - }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "forced_refresh": { - "type": "boolean" + "unassigned_shards": { + "description": "The number of shards that are not allocated.", + "type": "number" } }, "required": [ - "_id", - "_index", - "result", - "_shards", - "_version" + "active_primary_shards", + "active_shards", + "active_shards_percent_as_number", + "cluster_name", + "delayed_unassigned_shards", + "initializing_shards", + "number_of_data_nodes", + "number_of_in_flight_fetch", + "number_of_nodes", + "number_of_pending_tasks", + "relocating_shards", + "status", + "task_max_waiting_in_queue_millis", + "timed_out", + "unassigned_primary_shards", + "unassigned_shards" ] }, - "dangling_indices.list_dangling_indices.DanglingIndex": { + "cluster.health.IndexHealthStats": { "type": "object", "properties": { - "index_name": { - "type": "string" - }, - "index_uuid": { - "type": "string" + "active_primary_shards": { + "type": "number" }, - "creation_date_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "active_shards": { + "type": "number" }, - "node_ids": { - "$ref": "#/components/schemas/_types.Ids" - } - }, - "required": [ - "index_name", - "index_uuid", - "creation_date_millis", - "node_ids" - ] - }, - "_types.Conflicts": { - "type": "string", - "enum": [ - "abort", - "proceed" - ] - }, - "_types.Slices": { - "description": "Slices configuration used to parallelize a process.", - "oneOf": [ - { + "initializing_shards": { "type": "number" }, - { - "$ref": "#/components/schemas/_types.SlicesCalculation" - } - ] - }, - "_types.SlicesCalculation": { - "type": "string", - "enum": [ - "auto" - ] - }, - "_types.BulkIndexByScrollFailure": { - "type": "object", - "properties": { - "cause": { - "$ref": "#/components/schemas/_types.ErrorCause" + "number_of_replicas": { + "type": "number" }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "number_of_shards": { + "type": "number" }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "relocating_shards": { + "type": "number" + }, + "shards": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.health.ShardHealthStats" + } }, "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.HealthStatus" + } + ] + }, + "unassigned_shards": { + "type": "number" + }, + "unassigned_primary_shards": { "type": "number" } }, "required": [ - "cause", - "id", - "index", - "status" + "active_primary_shards", + "active_shards", + "initializing_shards", + "number_of_replicas", + "number_of_shards", + "relocating_shards", + "status", + "unassigned_shards", + "unassigned_primary_shards" ] }, - "_types.Retries": { + "cluster.health.ShardHealthStats": { "type": "object", "properties": { - "bulk": { - "description": "The number of bulk actions retried.", + "active_shards": { "type": "number" }, - "search": { - "description": "The number of search actions retried.", + "initializing_shards": { + "type": "number" + }, + "primary_active": { + "type": "boolean" + }, + "relocating_shards": { + "type": "number" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.HealthStatus" + } + ] + }, + "unassigned_shards": { + "type": "number" + }, + "unassigned_primary_shards": { "type": "number" } }, "required": [ - "bulk", - "search" + "active_shards", + "initializing_shards", + "primary_active", + "relocating_shards", + "status", + "unassigned_shards", + "unassigned_primary_shards" ] }, - "_types.TaskId": { + "_types.ClusterInfoTargets": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.ClusterInfoTarget" }, { - "type": "number" + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ClusterInfoTarget" + } } ] }, - "tasks._types.TaskListResponseBase": { + "_types.ClusterInfoTarget": { + "type": "string", + "enum": [ + "_all", + "http", + "ingest", + "thread_pool", + "script" + ] + }, + "nodes._types.Http": { "type": "object", "properties": { - "node_failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ErrorCause" - } + "current_open": { + "description": "Current number of open HTTP connections for the node.", + "type": "number" }, - "task_failures": { + "total_opened": { + "description": "Total number of HTTP connections opened for the node.", + "type": "number" + }, + "clients": { + "description": "Information on current and recently-closed HTTP client connections.\nClients that have been closed longer than the `http.client_stats.closed_channels.max_age` setting will not be represented here.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.TaskFailure" + "$ref": "#/components/schemas/nodes._types.Client" } }, - "nodes": { - "description": "Task information grouped by node, if `group_by` was set to `node` (the default).", + "routes": { + "description": "Detailed HTTP stats broken down by route", + "x-state": "Generally available; Added in 8.12.0", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/tasks._types.NodeTasks" + "$ref": "#/components/schemas/nodes._types.HttpRoute" } - }, - "tasks": { - "$ref": "#/components/schemas/tasks._types.TaskInfos" } - } + }, + "required": [ + "routes" + ] }, - "_types.TaskFailure": { + "nodes._types.Client": { "type": "object", "properties": { - "task_id": { + "id": { + "description": "Unique ID for the HTTP client.", "type": "number" }, - "node_id": { - "$ref": "#/components/schemas/_types.NodeId" + "agent": { + "description": "Reported agent for the HTTP client.\nIf unavailable, this property is not included in the response.", + "type": "string" }, - "status": { + "local_address": { + "description": "Local address for the HTTP connection.", "type": "string" }, - "reason": { - "$ref": "#/components/schemas/_types.ErrorCause" + "remote_address": { + "description": "Remote address for the HTTP connection.", + "type": "string" + }, + "last_uri": { + "description": "The URI of the client’s most recent request.", + "type": "string" + }, + "opened_time_millis": { + "description": "Time at which the client opened the connection.", + "type": "number" + }, + "closed_time_millis": { + "description": "Time at which the client closed the connection if the connection is closed.", + "type": "number" + }, + "last_request_time_millis": { + "description": "Time of the most recent request from this client.", + "type": "number" + }, + "request_count": { + "description": "Number of requests from this client.", + "type": "number" + }, + "request_size_bytes": { + "description": "Cumulative size in bytes of all requests from this client.", + "type": "number" + }, + "x_opaque_id": { + "description": "Value from the client’s `x-opaque-id` HTTP header.\nIf unavailable, this property is not included in the response.", + "type": "string" + } + } + }, + "nodes._types.HttpRoute": { + "type": "object", + "properties": { + "requests": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.HttpRouteRequests" + } + ] + }, + "responses": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.HttpRouteResponses" + } + ] } }, "required": [ - "task_id", - "node_id", - "status", - "reason" + "requests", + "responses" ] }, - "tasks._types.NodeTasks": { + "nodes._types.HttpRouteRequests": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" - }, - "host": { - "$ref": "#/components/schemas/_types.Host" + "count": { + "type": "number" }, - "ip": { - "$ref": "#/components/schemas/_types.Ip" + "total_size_in_bytes": { + "type": "number" }, - "roles": { + "size_histogram": { "type": "array", "items": { - "type": "string" - } - }, - "attributes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "tasks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/tasks._types.TaskInfo" + "$ref": "#/components/schemas/nodes._types.SizeHttpHistogram" } } }, "required": [ - "tasks" + "count", + "total_size_in_bytes", + "size_histogram" ] }, - "tasks._types.TaskInfo": { + "nodes._types.SizeHttpHistogram": { "type": "object", "properties": { - "action": { - "type": "string" - }, - "cancelled": { - "type": "boolean" - }, - "cancellable": { - "type": "boolean" - }, - "description": { - "description": "Human readable text that identifies the particular request that the task is performing.\nFor example, it might identify the search request being performed by a search task.\nOther kinds of tasks have different descriptions, like `_reindex` which has the source and the destination, or `_bulk` which just has the number of requests and the destination indices.\nMany requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.", - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "id": { + "count": { "type": "number" }, - "node": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "running_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "running_time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "status": { - "description": "The internal status of the task, which varies from task to task.\nThe format also varies.\nWhile the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes.\nFields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.", - "type": "object" - }, - "type": { - "type": "string" + "ge_bytes": { + "type": "number" }, - "parent_task_id": { - "$ref": "#/components/schemas/_types.TaskId" + "lt_bytes": { + "type": "number" } }, "required": [ - "action", - "cancellable", - "headers", - "id", - "node", - "running_time_in_nanos", - "start_time_in_millis", - "type" + "count" ] }, - "tasks._types.TaskInfos": { - "oneOf": [ - { + "nodes._types.HttpRouteResponses": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "total_size_in_bytes": { + "type": "number" + }, + "handling_time_histogram": { "type": "array", "items": { - "$ref": "#/components/schemas/tasks._types.TaskInfo" - } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/tasks._types.ParentTaskInfo" + "$ref": "#/components/schemas/nodes._types.TimeHttpHistogram" } - } - ] - }, - "tasks._types.ParentTaskInfo": { - "allOf": [ - { - "$ref": "#/components/schemas/tasks._types.TaskInfo" }, - { - "type": "object", - "properties": { - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/tasks._types.TaskInfo" - } - } + "size_histogram": { + "type": "array", + "items": { + "$ref": "#/components/schemas/nodes._types.SizeHttpHistogram" } } + }, + "required": [ + "count", + "total_size_in_bytes", + "handling_time_histogram", + "size_histogram" ] }, - "enrich.execute_policy.ExecuteEnrichPolicyStatus": { + "nodes._types.TimeHttpHistogram": { "type": "object", "properties": { - "phase": { - "$ref": "#/components/schemas/enrich.execute_policy.EnrichPolicyPhase" + "count": { + "type": "number" }, - "step": { - "type": "string" + "ge_millis": { + "type": "number" + }, + "lt_millis": { + "type": "number" } }, "required": [ - "phase" - ] - }, - "enrich.execute_policy.EnrichPolicyPhase": { - "type": "string", - "enum": [ - "SCHEDULED", - "RUNNING", - "COMPLETE", - "FAILED", - "CANCELLED" + "count" ] }, - "enrich._types.Summary": { + "nodes._types.Ingest": { "type": "object", "properties": { - "config": { + "pipelines": { + "description": "Contains statistics about ingest pipelines for the node.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/enrich._types.Policy" - }, - "minProperties": 1, - "maxProperties": 1 + "$ref": "#/components/schemas/nodes._types.IngestStats" + } + }, + "total": { + "description": "Contains statistics about ingest operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.IngestTotal" + } + ] } - }, - "required": [ - "config" - ] + } }, - "enrich._types.Policy": { + "nodes._types.IngestStats": { "type": "object", "properties": { - "enrich_fields": { - "$ref": "#/components/schemas/_types.Fields" + "count": { + "description": "Total number of documents ingested during the lifetime of this node.", + "type": "number" }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "current": { + "description": "Total number of documents currently being ingested.", + "type": "number" }, - "match_field": { - "$ref": "#/components/schemas/_types.Field" + "failed": { + "description": "Total number of failed ingest operations during the lifetime of this node.", + "type": "number" }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "processors": { + "description": "Total number of ingest processors.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.KeyedProcessor" + } + } }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "time_in_millis": { + "description": "Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "elasticsearch_version": { - "type": "string" + "ingested_as_first_pipeline_in_bytes": { + "description": "Total number of bytes of all documents ingested by the pipeline.\nThis field is only present on pipelines which are the first to process a document.\nThus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors.", + "x-state": "Generally available; Added in 8.15.0", + "type": "number" + }, + "produced_as_first_pipeline_in_bytes": { + "description": "Total number of bytes of all documents produced by the pipeline.\nThis field is only present on pipelines which are the first to process a document.\nThus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors.\nIn situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run.", + "x-state": "Generally available; Added in 8.15.0", + "type": "number" } }, "required": [ - "enrich_fields", - "indices", - "match_field" + "count", + "current", + "failed", + "processors", + "time_in_millis", + "ingested_as_first_pipeline_in_bytes", + "produced_as_first_pipeline_in_bytes" ] }, - "enrich.stats.CoordinatorStats": { + "nodes._types.KeyedProcessor": { "type": "object", "properties": { - "executed_searches_total": { + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Processor" + } + ] + }, + "type": { + "type": "string" + } + } + }, + "nodes._types.Processor": { + "type": "object", + "properties": { + "count": { + "description": "Number of documents transformed by the processor.", "type": "number" }, - "node_id": { - "$ref": "#/components/schemas/_types.Id" + "current": { + "description": "Number of documents currently being transformed by the processor.", + "type": "number" }, - "queue_size": { + "failed": { + "description": "Number of failed operations for the processor.", "type": "number" }, - "remote_requests_current": { + "time_in_millis": { + "description": "Time, in milliseconds, spent by the processor transforming documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + } + } + }, + "nodes._types.IngestTotal": { + "type": "object", + "properties": { + "count": { + "description": "Total number of documents ingested during the lifetime of this node.", "type": "number" }, - "remote_requests_total": { + "current": { + "description": "Total number of documents currently being ingested.", + "type": "number" + }, + "failed": { + "description": "Total number of failed ingest operations during the lifetime of this node.", "type": "number" + }, + "time_in_millis": { + "description": "Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "executed_searches_total", - "node_id", - "queue_size", - "remote_requests_current", - "remote_requests_total" + "count", + "current", + "failed", + "time_in_millis" ] }, - "enrich.stats.ExecutingPolicy": { + "nodes._types.ThreadCount": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "active": { + "description": "Number of active threads in the thread pool.", + "type": "number" + }, + "completed": { + "description": "Number of tasks completed by the thread pool executor.", + "type": "number" + }, + "largest": { + "description": "Highest number of active threads in the thread pool.", + "type": "number" + }, + "queue": { + "description": "Number of tasks in queue for the thread pool.", + "type": "number" + }, + "rejected": { + "description": "Number of tasks rejected by the thread pool executor.", + "type": "number" }, - "task": { - "$ref": "#/components/schemas/tasks._types.TaskInfo" + "threads": { + "description": "Number of threads in the thread pool.", + "type": "number" } - }, - "required": [ - "name", - "task" - ] + } }, - "enrich.stats.CacheStats": { + "nodes._types.Scripting": { "type": "object", "properties": { - "node_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "count": { + "cache_evictions": { + "description": "Total number of times the script cache has evicted old data.", "type": "number" }, - "hits": { + "compilations": { + "description": "Total number of inline script compilations performed by the node.", "type": "number" }, - "hits_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "compilations_history": { + "description": "Contains this recent history of script compilations.", + "type": "object", + "additionalProperties": { + "type": "number" + } }, - "misses": { + "compilation_limit_triggered": { + "description": "Total number of times the script compilation circuit breaker has limited inline script compilations.", "type": "number" }, - "misses_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/nodes._types.Context" + } + } + } + }, + "nodes._types.Context": { + "type": "object", + "properties": { + "context": { + "type": "string" }, - "evictions": { + "compilations": { "type": "number" }, - "size_in_bytes": { + "cache_evictions": { + "type": "number" + }, + "compilation_limit_triggered": { "type": "number" } - }, - "required": [ - "node_id", - "count", - "hits", - "hits_time_in_millis", - "misses", - "misses_time_in_millis", - "evictions", - "size_in_bytes" - ] + } }, - "eql._types.EqlSearchResponseBase": { + "cluster.pending_tasks.PendingTask": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "is_partial": { - "description": "If true, the response does not contain complete search results.", + "executing": { + "description": "Indicates whether the pending tasks are currently executing or not.", "type": "boolean" }, - "is_running": { - "description": "If true, the search request is still executing.", - "type": "boolean" + "insert_order": { + "description": "The number that represents when the task has been inserted into the task queue.", + "type": "number" }, - "took": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "priority": { + "description": "The priority of the pending task.\nThe valid priorities in descending priority order are: `IMMEDIATE` > `URGENT` > `HIGH` > `NORMAL` > `LOW` > `LANGUID`.", + "type": "string" }, - "timed_out": { - "description": "If true, the request timed out before completion.", - "type": "boolean" + "source": { + "description": "A general description of the cluster task that may include a reason and origin.", + "type": "string" }, - "hits": { - "$ref": "#/components/schemas/eql._types.EqlHits" + "time_in_queue": { + "description": "The time since the task is waiting for being performed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "shard_failures": { - "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ShardFailure" - } + "time_in_queue_millis": { + "description": "The time expressed in milliseconds since the task is waiting for being performed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "hits" + "executing", + "insert_order", + "priority", + "source", + "time_in_queue_millis" ] }, - "eql._types.EqlHits": { + "indices.put_index_template.IndexTemplateMapping": { "type": "object", "properties": { - "total": { - "$ref": "#/components/schemas/_global.search._types.TotalHits" - }, - "events": { - "description": "Contains events matching the query. Each object represents a matching event.", - "type": "array", - "items": { - "$ref": "#/components/schemas/eql._types.HitsEvent" + "aliases": { + "description": "Aliases to add.\nIf the index template includes a `data_stream` object, these are data stream aliases.\nOtherwise, these are index aliases.\nData stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" } }, - "sequences": { - "description": "Contains event sequences matching the query. Each object represents a matching sequence. This parameter is only returned for EQL queries containing a sequence.", - "type": "array", - "items": { - "$ref": "#/components/schemas/eql._types.HitsSequence" - } + "mappings": { + "description": "Mapping for fields in the index.\nIf specified, this mapping can include field names, field data types, and mapping parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "settings": { + "description": "Configuration options for the index.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "lifecycle": { + "x-state": "Generally available; Added in 8.11.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycle" + } + ] + }, + "data_stream_options": { + "x-state": "Generally available; Added in 8.19.0", + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamOptionsTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] } } }, - "eql._types.HitsEvent": { + "indices._types.Alias": { "type": "object", "properties": { - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "filter": { + "description": "Query used to limit documents the alias can access.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "_id": { - "$ref": "#/components/schemas/_types.Id" + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] }, - "_source": { - "description": "Original JSON body passed for the event at index time.", - "type": "object" + "is_hidden": { + "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", + "default": false, + "type": "boolean" }, - "missing": { - "description": "Set to `true` for events in a timespan-constrained sequence that do not meet a given condition.", + "is_write_index": { + "description": "If `true`, the index is the write index for the alias.", + "default": false, "type": "boolean" }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "object" + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" } - } + ] + }, + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] } - }, - "required": [ - "_index", - "_id", - "_source" - ] + } }, - "eql._types.HitsSequence": { + "indices._types.DataStreamOptionsTemplate": { + "description": "Data stream options template contains the same information as DataStreamOptions but allows them to be set explicitly to null.", "type": "object", "properties": { - "events": { - "description": "Contains events matching the query. Each object represents a matching event.", - "type": "array", - "items": { - "$ref": "#/components/schemas/eql._types.HitsEvent" - } - }, - "join_keys": { - "description": "Shared field values used to constrain matches in the sequence. These are defined using the by keyword in the EQL query syntax.", - "type": "array", - "items": { - "type": "object" - } + "failure_store": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStoreTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] } - }, - "required": [ - "events" - ] - }, - "eql.search.ResultPosition": { - "type": "string", - "enum": [ - "tail", - "head" - ] - }, - "esql._types.EsqlFormat": { - "type": "string", - "enum": [ - "csv", - "json", - "tsv", - "txt", - "yaml", - "cbor", - "smile", - "arrow" - ] + } }, - "esql._types.TableValuesContainer": { + "indices._types.DataStreamFailureStoreTemplate": { + "description": "Template equivalent of DataStreamFailureStore that allows nullable values.", "type": "object", "properties": { - "integer": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.TableValuesIntegerValue" - } - }, - "keyword": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.TableValuesKeywordValue" - } - }, - "long": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.TableValuesLongValue" - } + "enabled": { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "default": "true", + "oneOf": [ + { + "type": "boolean" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "double": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.TableValuesLongDouble" - } + "lifecycle": { + "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.FailureStoreLifecycleTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] } - }, - "minProperties": 1, - "maxProperties": 1 + } }, - "esql._types.TableValuesIntegerValue": { - "oneOf": [ - { - "type": "number" + "indices._types.FailureStoreLifecycleTemplate": { + "description": "Template equivalent of FailureStoreLifecycle that allows nullable values.", + "type": "object", + "properties": { + "data_retention": { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + }, + { + "nullable": true, + "type": "string" + } + ] }, - { - "type": "array", - "items": { - "type": "number" - } + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, + "type": "boolean" } - ] + } }, - "esql._types.TableValuesKeywordValue": { + "cluster.remote_info.ClusterRemoteInfo": { + "discriminator": { + "propertyName": "mode", + "mapping": { + "proxy": "#/components/schemas/cluster.remote_info.ClusterRemoteProxyInfo", + "sniff": "#/components/schemas/cluster.remote_info.ClusterRemoteSniffInfo" + } + }, "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/cluster.remote_info.ClusterRemoteSniffInfo" }, { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/cluster.remote_info.ClusterRemoteProxyInfo" } ] }, - "esql._types.TableValuesLongValue": { - "oneOf": [ - { + "cluster.remote_info.ClusterRemoteSniffInfo": { + "type": "object", + "properties": { + "mode": { + "description": "The connection mode for the remote cluster.", + "type": "string", + "enum": [ + "sniff" + ] + }, + "connected": { + "description": "If it is `true`, there is at least one open connection to the remote cluster.\nIf it is `false`, it means that the cluster no longer has an open connection to the remote cluster.\nIt does not necessarily mean that the remote cluster is down or unavailable, just that at some point a connection was lost.", + "type": "boolean" + }, + "max_connections_per_cluster": { + "description": "The maximum number of connections maintained for the remote cluster when sniff mode is configured.", "type": "number" }, - { + "num_nodes_connected": { + "description": "The number of connected nodes in the remote cluster when sniff mode is configured.", + "type": "number" + }, + "initial_connect_timeout": { + "description": "The initial connect timeout for remote cluster connections.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "skip_unavailable": { + "description": "If `true`, cross-cluster search skips the remote cluster when its nodes are unavailable during the search and ignores errors returned by the remote cluster.", + "type": "boolean" + }, + "seeds": { + "description": "The initial seed transport addresses of the remote cluster when sniff mode is configured.", "type": "array", "items": { - "type": "number" + "type": "string" } } + }, + "required": [ + "mode", + "connected", + "max_connections_per_cluster", + "num_nodes_connected", + "initial_connect_timeout", + "skip_unavailable", + "seeds" ] }, - "esql._types.TableValuesLongDouble": { - "oneOf": [ - { + "cluster.remote_info.ClusterRemoteProxyInfo": { + "type": "object", + "properties": { + "mode": { + "description": "The connection mode for the remote cluster.", + "type": "string", + "enum": [ + "proxy" + ] + }, + "connected": { + "description": "If it is `true`, there is at least one open connection to the remote cluster.\nIf it is `false`, it means that the cluster no longer has an open connection to the remote cluster.\nIt does not necessarily mean that the remote cluster is down or unavailable, just that at some point a connection was lost.", + "type": "boolean" + }, + "initial_connect_timeout": { + "description": "The initial connect timeout for remote cluster connections.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "skip_unavailable": { + "description": "If `true`, cross-cluster search skips the remote cluster when its nodes are unavailable during the search and ignores errors returned by the remote cluster.", + "type": "boolean" + }, + "proxy_address": { + "description": "The address for remote connections when proxy mode is configured.", + "type": "string" + }, + "server_name": { + "type": "string" + }, + "num_proxy_sockets_connected": { + "description": "The number of open socket connections to the remote cluster when proxy mode is configured.", "type": "number" }, - { - "type": "array", - "items": { - "type": "number" - } + "max_proxy_socket_connections": { + "description": "The maximum number of socket connections to the remote cluster when proxy mode is configured.", + "type": "number" + }, + "cluster_credentials": { + "description": "This field is present and has a value of `::es_redacted::` only when the remote cluster is configured with the API key based model. Otherwise, the field is not present.", + "type": "string" } + }, + "required": [ + "mode", + "connected", + "initial_connect_timeout", + "skip_unavailable", + "proxy_address", + "server_name", + "num_proxy_sockets_connected", + "max_proxy_socket_connections" ] }, - "esql._types.AsyncEsqlResult": { - "allOf": [ - { - "$ref": "#/components/schemas/esql._types.EsqlResult" + "cluster.reroute.Command": { + "type": "object", + "properties": { + "cancel": { + "description": "Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, and node for the node to cancel the shard allocation on. This can be used to force resynchronization of existing replicas from the primary shard by cancelling them and allowing them to be reinitialized through the standard recovery process. By default only replica shard allocations can be cancelled. If it is necessary to cancel the allocation of a primary shard then the allow_primary flag must also be included in the request.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.reroute.CommandCancelAction" + } + ] }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "is_running": { - "type": "boolean" + "move": { + "description": "Move a started shard from one node to another node. Accepts index and shard for index name and shard number, from_node for the node to move the shard from, and to_node for the node to move the shard to.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.reroute.CommandMoveAction" + } + ] + }, + "allocate_replica": { + "description": "Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard number, and node to allocate the shard to. Takes allocation deciders into account.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.reroute.CommandAllocateReplicaAction" + } + ] + }, + "allocate_stale_primary": { + "description": "Allocate a primary shard to a node that holds a stale copy. Accepts the index and shard for index name and shard number, and node to allocate the shard to. Using this command may lead to data loss for the provided shard id. If a node which has the good copy of the data rejoins the cluster later on, that data will be deleted or overwritten with the data of the stale copy that was forcefully allocated with this command. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set to true.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.reroute.CommandAllocatePrimaryAction" + } + ] + }, + "allocate_empty_primary": { + "description": "Allocate an empty primary shard to a node. Accepts the index and shard for index name and shard number, and node to allocate the shard to. Using this command leads to a complete loss of all data that was indexed into this shard, if it was previously started. If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set to true.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.reroute.CommandAllocatePrimaryAction" } - }, - "required": [ - "is_running" ] } - ] + } }, - "esql._types.EsqlResult": { + "cluster.reroute.CommandCancelAction": { "type": "object", "properties": { - "took": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "is_partial": { - "type": "boolean" - }, - "all_columns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.EsqlColumnInfo" - } - }, - "columns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.EsqlColumnInfo" - } - }, - "values": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.FieldValue" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - } + ] }, - "_clusters": { - "$ref": "#/components/schemas/esql._types.EsqlClusterInfo" + "shard": { + "type": "number" }, - "profile": { - "description": "Profiling information. Present if `profile` was `true` in the request.\nThe contents of this field are currently unstable.", - "type": "object" + "node": { + "type": "string" + }, + "allow_primary": { + "type": "boolean" } }, "required": [ - "columns", - "values" + "index", + "shard", + "node" ] }, - "esql._types.EsqlColumnInfo": { + "cluster.reroute.CommandMoveAction": { "type": "object", "properties": { - "name": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "shard": { + "type": "number" + }, + "from_node": { + "description": "The node to move the shard from", "type": "string" }, - "type": { + "to_node": { + "description": "The node to move the shard to", "type": "string" } }, "required": [ - "name", - "type" + "index", + "shard", + "from_node", + "to_node" ] }, - "esql._types.EsqlClusterInfo": { + "cluster.reroute.CommandAllocateReplicaAction": { "type": "object", "properties": { - "total": { - "type": "number" - }, - "successful": { - "type": "number" - }, - "running": { - "type": "number" - }, - "skipped": { - "type": "number" - }, - "partial": { - "type": "number" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "failed": { + "shard": { "type": "number" }, - "details": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/esql._types.EsqlClusterDetails" - } + "node": { + "type": "string" } }, "required": [ - "total", - "successful", - "running", - "skipped", - "partial", - "failed", - "details" + "index", + "shard", + "node" ] }, - "esql._types.EsqlClusterDetails": { + "cluster.reroute.CommandAllocatePrimaryAction": { "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/esql._types.EsqlClusterStatus" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "indices": { - "type": "string" + "shard": { + "type": "number" }, - "took": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "node": { + "type": "string" }, - "_shards": { - "$ref": "#/components/schemas/esql._types.EsqlShardInfo" + "accept_data_loss": { + "description": "If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set to true", + "type": "boolean" } }, "required": [ - "status", - "indices" - ] - }, - "esql._types.EsqlClusterStatus": { - "type": "string", - "enum": [ - "running", - "successful", - "partial", - "skipped", - "failed" + "index", + "shard", + "node", + "accept_data_loss" ] }, - "esql._types.EsqlShardInfo": { + "cluster.reroute.RerouteExplanation": { "type": "object", "properties": { - "total": { - "type": "number" - }, - "successful": { - "type": "number" - }, - "skipped": { - "type": "number" - }, - "failed": { - "type": "number" + "command": { + "type": "string" }, - "failures": { + "decisions": { "type": "array", "items": { - "$ref": "#/components/schemas/esql._types.EsqlShardFailure" + "$ref": "#/components/schemas/cluster.reroute.RerouteDecision" } + }, + "parameters": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.reroute.RerouteParameters" + } + ] } }, "required": [ - "total" + "command", + "decisions", + "parameters" ] }, - "esql._types.EsqlShardFailure": { + "cluster.reroute.RerouteDecision": { "type": "object", "properties": { - "shard": { - "$ref": "#/components/schemas/_types.Id" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "decider": { + "type": "string" }, - "node": { - "$ref": "#/components/schemas/_types.NodeId" + "decision": { + "type": "string" }, - "reason": { - "$ref": "#/components/schemas/_types.ErrorCause" + "explanation": { + "type": "string" } }, "required": [ - "shard", - "index", - "reason" + "decider", + "decision", + "explanation" ] }, - "esql.list_queries.Body": { + "cluster.reroute.RerouteParameters": { "type": "object", "properties": { - "id": { - "type": "number" + "allow_primary": { + "type": "boolean" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, "node": { - "$ref": "#/components/schemas/_types.NodeId" + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeName" + } + ] }, - "start_time_millis": { + "shard": { "type": "number" }, - "running_time_nanos": { - "type": "number" + "from_node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeName" + } + ] }, - "query": { - "type": "string" + "to_node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeName" + } + ] } }, "required": [ - "id", + "allow_primary", + "index", "node", - "start_time_millis", - "running_time_nanos", - "query" + "shard" ] }, - "_types.InlineGet": { - "type": "object", - "properties": { - "fields": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "found": { - "type": "boolean" - }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "_primary_term": { - "type": "number" + "_types.NodeName": { + "type": "string" + }, + "cluster.state.ClusterStateMetrics": { + "oneOf": [ + { + "$ref": "#/components/schemas/cluster.state.ClusterStateMetric" }, - "_routing": { - "$ref": "#/components/schemas/_types.Routing" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.state.ClusterStateMetric" + } + } + ] + }, + "cluster.state.ClusterStateMetric": { + "type": "string", + "enum": [ + "_all", + "version", + "master_node", + "blocks", + "nodes", + "metadata", + "routing_table", + "routing_nodes", + "customs" + ] + }, + "cluster.stats.StatsResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.NodesResponseBase" }, - "_source": { - "type": "object" + { + "type": "object", + "properties": { + "cluster_name": { + "description": "Name of the cluster, based on the cluster name setting.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "cluster_uuid": { + "description": "Unique identifier for the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" + } + ] + }, + "indices": { + "description": "Contains statistics about indices with shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterIndices" + } + ] + }, + "nodes": { + "description": "Contains statistics about nodes selected by the request’s node filters.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterNodes" + } + ] + }, + "repositories": { + "description": "Contains stats on repository feature usage exposed in cluster stats for telemetry.", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "snapshots": { + "description": "Contains stats cluster snapshots.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterSnapshotStats" + } + ] + }, + "status": { + "description": "Health status of the cluster, based on the state of its primary and replica shards.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.HealthStatus" + } + ] + }, + "timestamp": { + "description": "Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed.", + "type": "number" + }, + "ccs": { + "description": "Cross-cluster stats", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.CCSStats" + } + ] + } + }, + "required": [ + "cluster_name", + "cluster_uuid", + "indices", + "nodes", + "repositories", + "snapshots", + "timestamp", + "ccs" + ] } - }, - "required": [ - "found" ] }, - "features._types.Feature": { + "cluster.stats.ClusterIndices": { "type": "object", "properties": { - "name": { - "type": "string" + "analysis": { + "description": "Contains statistics about analyzers and analyzer components used in selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.CharFilterTypes" + } + ] }, - "description": { - "type": "string" + "completion": { + "description": "Contains statistics about memory used for completion in selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.CompletionStats" + } + ] + }, + "count": { + "description": "Total number of indices with shards assigned to selected nodes.", + "type": "number" + }, + "docs": { + "description": "Contains counts for documents in selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DocStats" + } + ] + }, + "fielddata": { + "description": "Contains statistics about the field data cache of selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.FielddataStats" + } + ] + }, + "query_cache": { + "description": "Contains statistics about the query cache of selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryCacheStats" + } + ] + }, + "search": { + "description": "Holds a snapshot of the search usage statistics.\nUsed to hold the stats for a single node that's part of a ClusterStatsNodeResponse, as well as to\naccumulate stats for the entire cluster and return them as part of the ClusterStatsResponse.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.SearchUsageStats" + } + ] + }, + "segments": { + "description": "Contains statistics about segments in selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SegmentsStats" + } + ] + }, + "shards": { + "description": "Contains statistics about indices with shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterIndicesShards" + } + ] + }, + "store": { + "description": "Contains statistics about the size of shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.StoreStats" + } + ] + }, + "mappings": { + "description": "Contains statistics about field mappings in selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.FieldTypesMappings" + } + ] + }, + "versions": { + "description": "Contains statistics about analyzers and analyzer components used in selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.IndicesVersions" + } + }, + "dense_vector": { + "description": "Contains statistics about indexed dense vector", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.DenseVectorStats" + } + ] + }, + "sparse_vector": { + "description": "Contains statistics about indexed sparse vector", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.SparseVectorStats" + } + ] } }, "required": [ - "name", - "description" + "completion", + "count", + "docs", + "fielddata", + "query_cache", + "search", + "segments", + "shards", + "store", + "dense_vector", + "sparse_vector" ] }, - "_global.field_caps.FieldCapability": { + "cluster.stats.CharFilterTypes": { "type": "object", "properties": { - "aggregatable": { - "description": "Whether this field can be aggregated on all indices.", - "type": "boolean" - }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" - }, - "meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "non_aggregatable_indices": { - "$ref": "#/components/schemas/_types.Indices" - }, - "non_searchable_indices": { - "$ref": "#/components/schemas/_types.Indices" + "analyzer_types": { + "description": "Contains statistics about analyzer types used in selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.FieldTypes" + } }, - "searchable": { - "description": "Whether this field is indexed for search on all indices.", - "type": "boolean" + "built_in_analyzers": { + "description": "Contains statistics about built-in analyzers used in selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.FieldTypes" + } }, - "type": { - "type": "string" + "built_in_char_filters": { + "description": "Contains statistics about built-in character filters used in selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.FieldTypes" + } }, - "metadata_field": { - "description": "Whether this field is registered as a metadata field.", - "type": "boolean" + "built_in_filters": { + "description": "Contains statistics about built-in token filters used in selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.FieldTypes" + } }, - "time_series_dimension": { - "description": "Whether this field is used as a time series dimension.", - "x-state": "Technical preview", - "type": "boolean" + "built_in_tokenizers": { + "description": "Contains statistics about built-in tokenizers used in selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.FieldTypes" + } }, - "time_series_metric": { - "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" + "char_filter_types": { + "description": "Contains statistics about character filter types used in selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.FieldTypes" + } }, - "non_dimension_indices": { - "description": "If this list is present in response then some indices have the\nfield marked as a dimension and other indices, the ones in this list, do not.", - "x-state": "Technical preview", + "filter_types": { + "description": "Contains statistics about token filter types used in selected nodes.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/cluster.stats.FieldTypes" } }, - "metric_conflicts_indices": { - "description": "The list of indices where this field is present if these indices\ndon’t have the same `time_series_metric` value for this field.", - "x-state": "Technical preview", + "tokenizer_types": { + "description": "Contains statistics about tokenizer types used in selected nodes.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.IndexName" + "$ref": "#/components/schemas/cluster.stats.FieldTypes" + } + }, + "synonyms": { + "description": "Contains statistics about synonyms types used in selected nodes.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.stats.SynonymsStats" } } }, "required": [ - "aggregatable", - "searchable", - "type" - ] - }, - "_types.IndexAlias": { - "type": "string" - }, - "fleet._types.Checkpoint": { - "type": "number" - }, - "_global.msearch.RequestItem": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.msearch.MultisearchHeader" - }, - { - "$ref": "#/components/schemas/_global.search._types.SearchRequestBody" - } + "analyzer_types", + "built_in_analyzers", + "built_in_char_filters", + "built_in_filters", + "built_in_tokenizers", + "char_filter_types", + "filter_types", + "tokenizer_types", + "synonyms" ] }, - "_global.msearch.MultisearchHeader": { + "cluster.stats.FieldTypes": { "type": "object", "properties": { - "allow_no_indices": { - "type": "boolean" - }, - "expand_wildcards": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "ignore_unavailable": { - "type": "boolean" - }, - "index": { - "$ref": "#/components/schemas/_types.Indices" - }, - "preference": { - "type": "string" - }, - "request_cache": { - "type": "boolean" - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "search_type": { - "$ref": "#/components/schemas/_types.SearchType" - }, - "ccs_minimize_roundtrips": { - "type": "boolean" - }, - "allow_partial_search_results": { - "type": "boolean" + "name": { + "description": "The name for the field type in selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "ignore_throttled": { - "type": "boolean" - } - } - }, - "_global.msearch.ResponseItem": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.msearch.MultiSearchItem" + "count": { + "description": "The number of occurrences of the field type in selected nodes.", + "type": "number" }, - { - "$ref": "#/components/schemas/_types.ErrorResponseBase" - } - ] - }, - "_global.msearch.MultiSearchItem": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.search.ResponseBody" + "index_count": { + "description": "The number of indices containing the field type in selected nodes.", + "type": "number" }, - { - "type": "object", - "properties": { - "status": { - "type": "number" - } - } - } - ] - }, - "_global.search.ResponseBody": { - "type": "object", - "properties": { - "took": { - "description": "The number of milliseconds it took Elasticsearch to run the request.\nThis value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response.\nIt includes:\n\n* Communication time between the coordinating node and data nodes\n* Time the request spends in the search thread pool, queued for execution\n* Actual run time\n\nIt does not include:\n\n* Time needed to send the request to Elasticsearch\n* Time needed to serialize the JSON response\n* Time needed to send the response to a client", + "indexed_vector_count": { + "description": "For dense_vector field types, number of indexed vector types in selected nodes.", "type": "number" }, - "timed_out": { - "description": "If `true`, the request timed out before completion; returned results may be partial or empty.", - "type": "boolean" + "indexed_vector_dim_max": { + "description": "For dense_vector field types, the maximum dimension of all indexed vector types in selected nodes.", + "type": "number" }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" + "indexed_vector_dim_min": { + "description": "For dense_vector field types, the minimum dimension of all indexed vector types in selected nodes.", + "type": "number" }, - "hits": { - "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + "script_count": { + "description": "The number of fields that declare a script.", + "x-state": "Generally available; Added in 7.13.0", + "type": "number" }, - "aggregations": { + "vector_index_type_count": { + "description": "For dense_vector field types, count of mappings by index type", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.Aggregate" + "type": "number" } }, - "_clusters": { - "$ref": "#/components/schemas/_types.ClusterStatistics" - }, - "fields": { + "vector_similarity_type_count": { + "description": "For dense_vector field types, count of mappings by similarity", "type": "object", "additionalProperties": { - "type": "object" + "type": "number" } }, - "max_score": { - "type": "number" - }, - "num_reduce_phases": { - "type": "number" - }, - "profile": { - "$ref": "#/components/schemas/_global.search._types.Profile" - }, - "pit_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_scroll_id": { - "$ref": "#/components/schemas/_types.ScrollId" - }, - "suggest": { + "vector_element_type_count": { + "description": "For dense_vector field types, count of mappings by element type", "type": "object", "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Suggest" - } + "type": "number" } - }, - "terminated_early": { - "type": "boolean" } }, "required": [ - "took", - "timed_out", - "_shards", - "hits" + "name", + "count", + "index_count" ] }, - "_types.ErrorResponseBase": { + "cluster.stats.SynonymsStats": { "type": "object", "properties": { - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" + "count": { + "type": "number" }, - "status": { + "index_count": { "type": "number" } }, "required": [ - "error", - "status" + "count", + "index_count" ] }, - "_global.get.GetResult": { + "_types.CompletionStats": { "type": "object", "properties": { - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "size_in_bytes": { + "description": "Total amount, in bytes, of memory used for completion across all shards assigned to selected nodes.", + "type": "number" + }, + "size": { + "description": "Total amount of memory used for completion across all shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, "fields": { - "description": "If the `stored_fields` parameter is set to `true` and `found` is `true`, it contains the document fields stored in the index.", "type": "object", "additionalProperties": { - "type": "object" - } - }, - "_ignored": { - "type": "array", - "items": { - "type": "string" + "$ref": "#/components/schemas/_types.FieldSizeUsage" } - }, - "found": { - "description": "Indicates whether the document exists.", - "type": "boolean" - }, - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_primary_term": { - "description": "The primary term assigned to the document for the indexing operation.", - "type": "number" - }, - "_routing": { - "description": "The explicit routing, if set.", - "type": "string" - }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "_source": { - "description": "If `found` is `true`, it contains the document data formatted in JSON.\nIf the `_source` parameter is set to `false` or the `stored_fields` parameter is set to `true`, it is excluded.", - "type": "object" - }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" } }, "required": [ - "_index", - "found", - "_id" + "size_in_bytes" ] }, - "_types.StoredScript": { + "_types.FieldSizeUsage": { "type": "object", "properties": { - "lang": { - "$ref": "#/components/schemas/_types.ScriptLanguage" - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "source": { - "$ref": "#/components/schemas/_types.ScriptSource" + "size_in_bytes": { + "type": "number" } }, "required": [ - "lang", - "source" + "size_in_bytes" ] }, - "_global.get_script_context.Context": { + "_types.DocStats": { "type": "object", "properties": { - "methods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.get_script_context.ContextMethod" - } + "count": { + "description": "Total number of non-deleted documents across all primary shards assigned to selected nodes.\nThis number is based on documents in Lucene segments and may include documents from nested fields.", + "type": "number" }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "deleted": { + "description": "Total number of deleted documents across all primary shards assigned to selected nodes.\nThis number is based on documents in Lucene segments.\nElasticsearch reclaims the disk space of deleted Lucene documents when a segment is merged.", + "type": "number" + }, + "total_size_in_bytes": { + "description": "Returns the total size in bytes of all documents in this stats.\nThis value may be more reliable than store_stats.size_in_bytes in estimating the index size.", + "type": "number" + }, + "total_size": { + "description": "Human readable total_size_in_bytes", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] } }, "required": [ - "methods", - "name" + "count", + "total_size_in_bytes" ] }, - "_global.get_script_context.ContextMethod": { + "_types.FielddataStats": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "evictions": { + "type": "number" }, - "return_type": { - "type": "string" + "memory_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "params": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.get_script_context.ContextMethodParam" + "memory_size_in_bytes": { + "type": "number" + }, + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.FieldMemoryUsage" } + }, + "global_ordinals": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GlobalOrdinalsStats" + } + ] } }, "required": [ - "name", - "return_type", - "params" + "memory_size_in_bytes", + "global_ordinals" ] }, - "_global.get_script_context.ContextMethodParam": { + "_types.FieldMemoryUsage": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "memory_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "type": { - "type": "string" + "memory_size_in_bytes": { + "type": "number" } }, "required": [ - "name", - "type" + "memory_size_in_bytes" ] }, - "_global.get_script_languages.LanguageContext": { + "_types.GlobalOrdinalsStats": { "type": "object", "properties": { - "contexts": { - "type": "array", - "items": { - "type": "string" - } + "build_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitMillis" + } + ] }, - "language": { - "$ref": "#/components/schemas/_types.ScriptLanguage" + "build_time": { + "type": "string" + }, + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.GlobalOrdinalFieldStats" + } } }, "required": [ - "contexts", - "language" + "build_time_in_millis" ] }, - "graph._types.Hop": { + "_types.GlobalOrdinalFieldStats": { "type": "object", "properties": { - "connections": { - "$ref": "#/components/schemas/graph._types.Hop" + "build_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitMillis" + } + ] }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "build_time": { + "type": "string" }, - "vertices": { - "description": "Contains the fields you are interested in.", - "type": "array", - "items": { - "$ref": "#/components/schemas/graph._types.VertexDefinition" - } + "shard_max_value_count": { + "type": "number" } }, "required": [ - "vertices" + "build_time_in_millis", + "shard_max_value_count" ] }, - "graph._types.VertexDefinition": { + "_types.QueryCacheStats": { "type": "object", "properties": { - "exclude": { - "description": "Prevents the specified terms from being included in the results.", - "type": "array", - "items": { - "type": "string" - } + "cache_count": { + "description": "Total number of entries added to the query cache across all shards assigned to selected nodes.\nThis number includes current and evicted entries.", + "type": "number" }, - "field": { - "$ref": "#/components/schemas/_types.Field" + "cache_size": { + "description": "Total number of entries currently in the query cache across all shards assigned to selected nodes.", + "type": "number" }, - "include": { - "description": "Identifies the terms of interest that form the starting points from which you want to spider out.", - "type": "array", - "items": { - "$ref": "#/components/schemas/graph._types.VertexInclude" - } + "evictions": { + "description": "Total number of query cache evictions across all shards assigned to selected nodes.", + "type": "number" }, - "min_doc_count": { - "description": "Specifies how many documents must contain a pair of terms before it is considered to be a useful connection.\nThis setting acts as a certainty threshold.", + "hit_count": { + "description": "Total count of query cache hits across all shards assigned to selected nodes.", "type": "number" }, - "shard_min_doc_count": { - "description": "Controls how many documents on a particular shard have to contain a pair of terms before the connection is returned for global consideration.", + "memory_size": { + "description": "Total amount of memory used for the query cache across all shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "memory_size_in_bytes": { + "description": "Total amount, in bytes, of memory used for the query cache across all shards assigned to selected nodes.", "type": "number" }, - "size": { - "description": "Specifies the maximum number of vertex terms returned for each field.", + "miss_count": { + "description": "Total count of query cache misses across all shards assigned to selected nodes.", + "type": "number" + }, + "total_count": { + "description": "Total count of hits and misses in the query cache across all shards assigned to selected nodes.", "type": "number" } }, "required": [ - "field" + "cache_count", + "cache_size", + "evictions", + "hit_count", + "memory_size_in_bytes", + "miss_count", + "total_count" ] }, - "graph._types.VertexInclude": { + "cluster.stats.SearchUsageStats": { "type": "object", "properties": { - "boost": { + "total": { "type": "number" }, - "term": { - "type": "string" + "queries": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "rescorers": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "sections": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "retrievers": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "extended": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ExtendedSearchUsage" + } + ] } }, "required": [ - "term" + "total", + "queries", + "rescorers", + "sections", + "retrievers", + "extended" ] }, - "graph._types.ExploreControls": { + "cluster.stats.ExtendedSearchUsage": { "type": "object", "properties": { - "sample_diversity": { - "$ref": "#/components/schemas/graph._types.SampleDiversity" - }, - "sample_size": { - "description": "Each hop considers a sample of the best-matching documents on each shard.\nUsing samples improves the speed of execution and keeps exploration focused on meaningfully-connected terms.\nVery small values (less than 50) might not provide sufficient weight-of-evidence to identify significant connections between terms.\nVery large sample sizes can dilute the quality of the results and increase execution times.", - "type": "number" - }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" + "retrievers": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ExtendedRetrieversSearchUsage" + } + ] }, - "use_significance": { - "description": "Filters associated terms so only those that are significantly associated with your query are included.", - "type": "boolean" + "section": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ExtendedSectionSearchUsage" + } + ] } - }, - "required": [ - "use_significance" - ] + } }, - "graph._types.SampleDiversity": { + "cluster.stats.ExtendedRetrieversSearchUsage": { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "max_docs_per_value": { - "type": "number" + "text_similarity_reranker": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ExtendedTextSimilarityRetrieverUsage" + } + ] } - }, - "required": [ - "field", - "max_docs_per_value" - ] + } }, - "graph._types.Connection": { + "cluster.stats.ExtendedTextSimilarityRetrieverUsage": { "type": "object", "properties": { - "doc_count": { - "type": "number" - }, - "source": { - "type": "number" - }, - "target": { - "type": "number" - }, - "weight": { + "chunk_rescorer": { "type": "number" } - }, - "required": [ - "doc_count", - "source", - "target", - "weight" - ] + } + }, + "cluster.stats.ExtendedSectionSearchUsage": { + "type": "object", + "properties": { + "sort": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + } }, - "graph._types.Vertex": { + "_types.SegmentsStats": { "type": "object", "properties": { - "depth": { + "count": { + "description": "Total number of segments across all shards assigned to selected nodes.", "type": "number" }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "term": { - "type": "string" + "doc_values_memory": { + "description": "Total amount of memory used for doc values across all shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "weight": { + "doc_values_memory_in_bytes": { + "description": "Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes.", "type": "number" - } - }, - "required": [ - "depth", - "field", - "term", - "weight" - ] - }, - "_global.health_report.Indicators": { - "type": "object", - "properties": { - "master_is_stable": { - "$ref": "#/components/schemas/_global.health_report.MasterIsStableIndicator" }, - "shards_availability": { - "$ref": "#/components/schemas/_global.health_report.ShardsAvailabilityIndicator" + "file_sizes": { + "description": "This object is not populated by the cluster stats API.\nTo get information on segment files, use the node stats API.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.stats.ShardFileSizeInfo" + } }, - "disk": { - "$ref": "#/components/schemas/_global.health_report.DiskIndicator" + "fixed_bit_set": { + "description": "Total amount of memory used by fixed bit sets across all shards assigned to selected nodes.\nFixed bit sets are used for nested object field types and type filters for join fields.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "repository_integrity": { - "$ref": "#/components/schemas/_global.health_report.RepositoryIntegrityIndicator" + "fixed_bit_set_memory_in_bytes": { + "description": "Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes.", + "type": "number" }, - "data_stream_lifecycle": { - "$ref": "#/components/schemas/_global.health_report.DataStreamLifecycleIndicator" + "index_writer_memory": { + "description": "Total amount of memory used by all index writers across all shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "ilm": { - "$ref": "#/components/schemas/_global.health_report.IlmIndicator" + "index_writer_memory_in_bytes": { + "description": "Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes.", + "type": "number" }, - "slm": { - "$ref": "#/components/schemas/_global.health_report.SlmIndicator" + "max_unsafe_auto_id_timestamp": { + "description": "Unix timestamp, in milliseconds, of the most recently retried indexing request.", + "type": "number" }, - "shards_capacity": { - "$ref": "#/components/schemas/_global.health_report.ShardsCapacityIndicator" + "memory": { + "description": "Total amount of memory used for segments across all shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "file_settings": { - "$ref": "#/components/schemas/_global.health_report.FileSettingsIndicator" - } - } - }, - "_global.health_report.MasterIsStableIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" + "memory_in_bytes": { + "description": "Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes.", + "type": "number" }, - { - "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.MasterIsStableIndicatorDetails" + "norms_memory": { + "description": "Total amount of memory used for normalization factors across all shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - } - } - ] - }, - "_global.health_report.MasterIsStableIndicatorDetails": { - "type": "object", - "properties": { - "current_master": { - "$ref": "#/components/schemas/_global.health_report.IndicatorNode" + ] }, - "recent_masters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.health_report.IndicatorNode" - } + "norms_memory_in_bytes": { + "description": "Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes.", + "type": "number" }, - "exception_fetching_history": { - "$ref": "#/components/schemas/_global.health_report.MasterIsStableIndicatorExceptionFetchingHistory" + "points_memory": { + "description": "Total amount of memory used for points across all shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "cluster_formation": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.health_report.MasterIsStableIndicatorClusterFormationNode" - } - } - }, - "required": [ - "current_master", - "recent_masters" - ] - }, - "_global.health_report.IndicatorNode": { - "type": "object", - "properties": { - "name": { - "oneOf": [ + "points_memory_in_bytes": { + "description": "Total amount, in bytes, of memory used for points across all shards assigned to selected nodes.", + "type": "number" + }, + "stored_fields_memory_in_bytes": { + "description": "Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.", + "type": "number" + }, + "stored_fields_memory": { + "description": "Total amount of memory used for stored fields across all shards assigned to selected nodes.", + "allOf": [ { - "type": "string" - }, + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "terms_memory_in_bytes": { + "description": "Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes.", + "type": "number" + }, + "terms_memory": { + "description": "Total amount of memory used for terms across all shards assigned to selected nodes.", + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.ByteSize" } ] }, - "node_id": { - "oneOf": [ + "term_vectors_memory": { + "description": "Total amount of memory used for term vectors across all shards assigned to selected nodes.", + "allOf": [ { - "type": "string" - }, + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "term_vectors_memory_in_bytes": { + "description": "Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes.", + "type": "number" + }, + "version_map_memory": { + "description": "Total amount of memory used by all version maps across all shards assigned to selected nodes.", + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.ByteSize" } ] + }, + "version_map_memory_in_bytes": { + "description": "Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes.", + "type": "number" } }, "required": [ - "name", - "node_id" + "count", + "doc_values_memory_in_bytes", + "file_sizes", + "fixed_bit_set_memory_in_bytes", + "index_writer_memory_in_bytes", + "max_unsafe_auto_id_timestamp", + "memory_in_bytes", + "norms_memory_in_bytes", + "points_memory_in_bytes", + "stored_fields_memory_in_bytes", + "terms_memory_in_bytes", + "term_vectors_memory_in_bytes", + "version_map_memory_in_bytes" ] }, - "_global.health_report.MasterIsStableIndicatorExceptionFetchingHistory": { + "indices.stats.ShardFileSizeInfo": { "type": "object", "properties": { - "message": { + "description": { "type": "string" }, - "stack_trace": { - "type": "string" + "size_in_bytes": { + "type": "number" + }, + "min_size_in_bytes": { + "type": "number" + }, + "max_size_in_bytes": { + "type": "number" + }, + "average_size_in_bytes": { + "type": "number" + }, + "count": { + "type": "number" } }, "required": [ - "message", - "stack_trace" + "description", + "size_in_bytes" ] }, - "_global.health_report.MasterIsStableIndicatorClusterFormationNode": { + "cluster.stats.ClusterIndicesShards": { + "description": "Contains statistics about shards assigned to selected nodes.", "type": "object", "properties": { - "name": { - "type": "string" + "index": { + "description": "Contains statistics about shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterIndicesShardsIndex" + } + ] }, - "node_id": { - "type": "string" + "primaries": { + "description": "Number of primary shards assigned to selected nodes.", + "type": "number" }, - "cluster_formation_message": { - "type": "string" + "replication": { + "description": "Ratio of replica shards to primary shards across all selected nodes.", + "type": "number" + }, + "total": { + "description": "Total number of shards assigned to selected nodes.", + "type": "number" } - }, - "required": [ - "node_id", - "cluster_formation_message" - ] + } }, - "_global.health_report.BaseIndicator": { + "cluster.stats.ClusterIndicesShardsIndex": { "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/_global.health_report.IndicatorHealthStatus" - }, - "symptom": { - "type": "string" + "primaries": { + "description": "Contains statistics about the number of primary shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterShardMetrics" + } + ] }, - "impacts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.health_report.Impact" - } + "replication": { + "description": "Contains statistics about the number of replication shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterShardMetrics" + } + ] }, - "diagnosis": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.health_report.Diagnosis" - } + "shards": { + "description": "Contains statistics about the number of shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterShardMetrics" + } + ] } }, "required": [ - "status", - "symptom" - ] - }, - "_global.health_report.IndicatorHealthStatus": { - "type": "string", - "enum": [ - "green", - "yellow", - "red", - "unknown" + "primaries", + "replication", + "shards" ] }, - "_global.health_report.Impact": { + "cluster.stats.ClusterShardMetrics": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" + "avg": { + "description": "Mean number of shards in an index, counting only shards assigned to selected nodes.", + "type": "number" }, - "impact_areas": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.health_report.ImpactArea" - } + "max": { + "description": "Maximum number of shards in an index, counting only shards assigned to selected nodes.", + "type": "number" }, - "severity": { + "min": { + "description": "Minimum number of shards in an index, counting only shards assigned to selected nodes.", "type": "number" } }, "required": [ - "description", - "id", - "impact_areas", - "severity" - ] - }, - "_global.health_report.ImpactArea": { - "type": "string", - "enum": [ - "search", - "ingest", - "backup", - "deployment_management" + "avg", + "max", + "min" ] }, - "_global.health_report.Diagnosis": { + "_types.StoreStats": { "type": "object", "properties": { - "id": { - "type": "string" + "size": { + "description": "Total size of all shards assigned to selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "action": { - "type": "string" + "size_in_bytes": { + "description": "Total size, in bytes, of all shards assigned to selected nodes.", + "type": "number" }, - "affected_resources": { - "$ref": "#/components/schemas/_global.health_report.DiagnosisAffectedResources" + "reserved": { + "description": "A prediction of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "cause": { - "type": "string" + "reserved_in_bytes": { + "description": "A prediction, in bytes, of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.", + "type": "number" }, - "help_url": { - "type": "string" + "total_data_set_size": { + "description": "Total data set size of all shards assigned to selected nodes.\nThis includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_data_set_size_in_bytes": { + "description": "Total data set size, in bytes, of all shards assigned to selected nodes.\nThis includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices.", + "type": "number" } }, "required": [ - "id", - "action", - "affected_resources", - "cause", - "help_url" + "size_in_bytes", + "reserved_in_bytes" ] }, - "_global.health_report.DiagnosisAffectedResources": { + "cluster.stats.FieldTypesMappings": { "type": "object", "properties": { - "indices": { - "$ref": "#/components/schemas/_types.Indices" - }, - "nodes": { + "field_types": { + "description": "Contains statistics about field data types used in selected nodes.", "type": "array", "items": { - "$ref": "#/components/schemas/_global.health_report.IndicatorNode" + "$ref": "#/components/schemas/cluster.stats.FieldTypes" } }, - "slm_policies": { + "runtime_field_types": { + "description": "Contains statistics about runtime field data types used in selected nodes.", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/cluster.stats.RuntimeFieldTypes" } }, - "feature_states": { - "type": "array", - "items": { - "type": "string" - } + "total_field_count": { + "description": "Total number of fields in all non-system indices.", + "type": "number" }, - "snapshot_repositories": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "_global.health_report.ShardsAvailabilityIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" + "total_deduplicated_field_count": { + "description": "Total number of fields in all non-system indices, accounting for mapping deduplication.", + "type": "number" }, - { - "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.ShardsAvailabilityIndicatorDetails" + "total_deduplicated_mapping_size": { + "description": "Total size of all mappings after deduplication and compression.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } + ] + }, + "total_deduplicated_mapping_size_in_bytes": { + "description": "Total size of all mappings, in bytes, after deduplication and compression.", + "type": "number" + }, + "source_modes": { + "description": "Source mode usage count.", + "type": "object", + "additionalProperties": { + "type": "number" } } + }, + "required": [ + "field_types", + "runtime_field_types", + "source_modes" ] }, - "_global.health_report.ShardsAvailabilityIndicatorDetails": { + "cluster.stats.RuntimeFieldTypes": { "type": "object", "properties": { - "creating_primaries": { - "type": "number" - }, - "creating_replicas": { - "type": "number" - }, - "initializing_primaries": { + "chars_max": { + "description": "Maximum number of characters for a single runtime field script.", "type": "number" }, - "initializing_replicas": { + "chars_total": { + "description": "Total number of characters for the scripts that define the current runtime field data type.", "type": "number" }, - "restarting_primaries": { + "count": { + "description": "Number of runtime fields mapped to the field data type in selected nodes.", "type": "number" }, - "restarting_replicas": { + "doc_max": { + "description": "Maximum number of accesses to doc_values for a single runtime field script", "type": "number" }, - "started_primaries": { + "doc_total": { + "description": "Total number of accesses to doc_values for the scripts that define the current runtime field data type.", "type": "number" }, - "started_replicas": { + "index_count": { + "description": "Number of indices containing a mapping of the runtime field data type in selected nodes.", "type": "number" }, - "unassigned_primaries": { - "type": "number" + "lang": { + "description": "Script languages used for the runtime fields scripts.", + "type": "array", + "items": { + "type": "string" + } }, - "unassigned_replicas": { + "lines_max": { + "description": "Maximum number of lines for a single runtime field script.", "type": "number" - } - }, - "required": [ - "creating_primaries", - "creating_replicas", - "initializing_primaries", - "initializing_replicas", - "restarting_primaries", - "restarting_replicas", - "started_primaries", - "started_replicas", - "unassigned_primaries", - "unassigned_replicas" - ] - }, - "_global.health_report.DiskIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, - { - "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.DiskIndicatorDetails" - } - } - } - ] - }, - "_global.health_report.DiskIndicatorDetails": { - "type": "object", - "properties": { - "indices_with_readonly_block": { + "lines_total": { + "description": "Total number of lines for the scripts that define the current runtime field data type.", "type": "number" }, - "nodes_with_enough_disk_space": { + "name": { + "description": "Field data type used in selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "scriptless_count": { + "description": "Number of runtime fields that don’t declare a script.", "type": "number" }, - "nodes_over_high_watermark": { + "shadowed_count": { + "description": "Number of runtime fields that shadow an indexed field.", "type": "number" }, - "nodes_over_flood_stage_watermark": { + "source_max": { + "description": "Maximum number of accesses to _source for a single runtime field script.", "type": "number" }, - "nodes_with_unknown_disk_status": { + "source_total": { + "description": "Total number of accesses to _source for the scripts that define the current runtime field data type.", "type": "number" } }, "required": [ - "indices_with_readonly_block", - "nodes_with_enough_disk_space", - "nodes_over_high_watermark", - "nodes_over_flood_stage_watermark", - "nodes_with_unknown_disk_status" - ] - }, - "_global.health_report.RepositoryIntegrityIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" - }, - { - "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.RepositoryIntegrityIndicatorDetails" - } - } - } + "chars_max", + "chars_total", + "count", + "doc_max", + "doc_total", + "index_count", + "lang", + "lines_max", + "lines_total", + "name", + "scriptless_count", + "shadowed_count", + "source_max", + "source_total" ] }, - "_global.health_report.RepositoryIntegrityIndicatorDetails": { + "cluster.stats.IndicesVersions": { "type": "object", "properties": { - "total_repositories": { + "index_count": { "type": "number" }, - "corrupted_repositories": { + "primary_shard_count": { "type": "number" }, - "corrupted": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "_global.health_report.DataStreamLifecycleIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" + "total_primary_bytes": { + "type": "number" }, - { - "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.DataStreamLifecycleDetails" + "total_primary_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] } + }, + "required": [ + "index_count", + "primary_shard_count", + "total_primary_bytes", + "version" ] }, - "_global.health_report.DataStreamLifecycleDetails": { + "cluster.stats.DenseVectorStats": { "type": "object", "properties": { - "stagnating_backing_indices_count": { + "value_count": { "type": "number" }, - "total_backing_indices_in_error": { - "type": "number" - }, - "stagnating_backing_indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.health_report.StagnatingBackingIndices" - } + "off_heap": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.DenseVectorOffHeapStats" + } + ] } }, "required": [ - "stagnating_backing_indices_count", - "total_backing_indices_in_error" + "value_count" ] }, - "_global.health_report.StagnatingBackingIndices": { + "cluster.stats.DenseVectorOffHeapStats": { "type": "object", "properties": { - "index_name": { - "$ref": "#/components/schemas/_types.IndexName" + "total_size_bytes": { + "type": "number" }, - "first_occurrence_timestamp": { + "total_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_veb_size_bytes": { "type": "number" }, - "retry_count": { + "total_veb_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_vec_size_bytes": { "type": "number" - } - }, - "required": [ - "index_name", - "first_occurrence_timestamp", - "retry_count" - ] - }, - "_global.health_report.IlmIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, - { - "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.IlmIndicatorDetails" + "total_vec_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - } - } - ] - }, - "_global.health_report.IlmIndicatorDetails": { - "type": "object", - "properties": { - "ilm_status": { - "$ref": "#/components/schemas/_types.LifecycleOperationMode" + ] }, - "policies": { + "total_veq_size_bytes": { "type": "number" }, - "stagnating_indices": { + "total_veq_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_vex_size_bytes": { "type": "number" - } - }, - "required": [ - "ilm_status", - "policies", - "stagnating_indices" - ] - }, - "_types.LifecycleOperationMode": { - "type": "string", - "enum": [ - "RUNNING", - "STOPPING", - "STOPPED" - ] - }, - "_global.health_report.SlmIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, - { + "total_vex_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_cenif_size_bytes": { + "type": "number" + }, + "total_cenif_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_clivf_size_bytes": { + "type": "number" + }, + "total_clivf_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "fielddata": { "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.SlmIndicatorDetails" + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "number" } } } + }, + "required": [ + "total_size_bytes", + "total_veb_size_bytes", + "total_vec_size_bytes", + "total_veq_size_bytes", + "total_vex_size_bytes", + "total_cenif_size_bytes", + "total_clivf_size_bytes" ] }, - "_global.health_report.SlmIndicatorDetails": { + "cluster.stats.SparseVectorStats": { "type": "object", "properties": { - "slm_status": { - "$ref": "#/components/schemas/_types.LifecycleOperationMode" - }, - "policies": { + "value_count": { "type": "number" - }, - "unhealthy_policies": { - "$ref": "#/components/schemas/_global.health_report.SlmIndicatorUnhealthyPolicies" } }, "required": [ - "slm_status", - "policies" + "value_count" ] }, - "_global.health_report.SlmIndicatorUnhealthyPolicies": { + "cluster.stats.ClusterNodes": { "type": "object", "properties": { "count": { - "type": "number" + "description": "Contains counts for nodes selected by the request’s node filters.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterNodeCount" + } + ] }, - "invocations_since_last_success": { + "discovery_types": { + "description": "Contains statistics about the discovery types used by selected nodes.", "type": "object", "additionalProperties": { "type": "number" } - } - }, - "required": [ - "count" - ] - }, - "_global.health_report.ShardsCapacityIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, - { - "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.ShardsCapacityIndicatorDetails" + "fs": { + "description": "Contains statistics about file stores by selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterFileSystem" } + ] + }, + "indexing_pressure": { + "x-state": "Generally available; Added in 7.16.0", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.IndexingPressure" + } + ] + }, + "ingest": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterIngest" + } + ] + }, + "jvm": { + "description": "Contains statistics about the Java Virtual Machines (JVMs) used by selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterJvm" + } + ] + }, + "network_types": { + "description": "Contains statistics about the transport and HTTP networks used by selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterNetworkTypes" + } + ] + }, + "os": { + "description": "Contains statistics about the operating systems used by selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterOperatingSystem" + } + ] + }, + "packaging_types": { + "description": "Contains statistics about Elasticsearch distributions installed on selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.NodePackagingType" } - } - ] - }, - "_global.health_report.ShardsCapacityIndicatorDetails": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/_global.health_report.ShardsCapacityIndicatorTierDetail" }, - "frozen": { - "$ref": "#/components/schemas/_global.health_report.ShardsCapacityIndicatorTierDetail" + "plugins": { + "description": "Contains statistics about installed plugins and modules by selected nodes.\nIf no plugins or modules are installed, this array is empty.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.PluginStats" + } + }, + "process": { + "description": "Contains statistics about processes used by selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterProcess" + } + ] + }, + "versions": { + "description": "Array of Elasticsearch versions used on selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.VersionString" + } } }, "required": [ - "data", - "frozen" + "count", + "discovery_types", + "fs", + "indexing_pressure", + "ingest", + "jvm", + "network_types", + "os", + "packaging_types", + "plugins", + "process", + "versions" ] }, - "_global.health_report.ShardsCapacityIndicatorTierDetail": { + "cluster.stats.ClusterNodeCount": { "type": "object", "properties": { - "max_shards_in_cluster": { + "total": { "type": "number" }, - "current_used_shards": { + "coordinating_only": { "type": "number" - } - }, - "required": [ - "max_shards_in_cluster" - ] - }, - "_global.health_report.FileSettingsIndicator": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, - { - "type": "object", - "properties": { - "details": { - "$ref": "#/components/schemas/_global.health_report.FileSettingsIndicatorDetails" - } - } - } - ] - }, - "_global.health_report.FileSettingsIndicatorDetails": { - "type": "object", - "properties": { - "failure_streak": { + "data": { "type": "number" }, - "most_recent_failure": { - "type": "string" - } - }, - "required": [ - "failure_streak", - "most_recent_failure" - ] - }, - "ilm.explain_lifecycle.LifecycleExplain": { - "discriminator": { - "propertyName": "managed" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplainManaged" + "data_cold": { + "type": "number" }, - { - "$ref": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplainUnmanaged" - } - ] - }, - "ilm.explain_lifecycle.LifecycleExplainManaged": { - "type": "object", - "properties": { - "action": { - "$ref": "#/components/schemas/_types.Name" + "data_content": { + "type": "number" }, - "action_time": { - "$ref": "#/components/schemas/_types.DateTime" + "data_frozen": { + "x-state": "Generally available; Added in 7.13.0", + "type": "number" }, - "action_time_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "data_hot": { + "type": "number" }, - "age": { - "$ref": "#/components/schemas/_types.Duration" + "data_warm": { + "type": "number" }, - "failed_step": { - "$ref": "#/components/schemas/_types.Name" + "index": { + "type": "number" }, - "failed_step_retry_count": { + "ingest": { "type": "number" }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "master": { + "type": "number" }, - "index_creation_date": { - "$ref": "#/components/schemas/_types.DateTime" + "ml": { + "type": "number" }, - "index_creation_date_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "remote_cluster_client": { + "type": "number" }, - "is_auto_retryable_error": { - "type": "boolean" + "search": { + "type": "number" }, - "lifecycle_date": { - "$ref": "#/components/schemas/_types.DateTime" + "transform": { + "type": "number" }, - "lifecycle_date_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "voting_only": { + "type": "number" + } + }, + "required": [ + "total" + ] + }, + "cluster.stats.ClusterFileSystem": { + "type": "object", + "properties": { + "path": { + "type": "string" }, - "managed": { - "type": "string", - "enum": [ - "true" - ] + "mount": { + "type": "string" }, - "phase": { - "$ref": "#/components/schemas/_types.Name" + "type": { + "type": "string" }, - "phase_time": { - "$ref": "#/components/schemas/_types.DateTime" + "available_in_bytes": { + "description": "Total number of bytes available to JVM in file stores across all selected nodes.\nDepending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`.\nThis is the actual amount of free disk space the selected Elasticsearch nodes can use.", + "type": "number" }, - "phase_time_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "available": { + "description": "Total number of bytes available to JVM in file stores across all selected nodes.\nDepending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`.\nThis is the actual amount of free disk space the selected Elasticsearch nodes can use.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "policy": { - "$ref": "#/components/schemas/_types.Name" + "free_in_bytes": { + "description": "Total number, in bytes, of unallocated bytes in file stores across all selected nodes.", + "type": "number" }, - "previous_step_info": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "free": { + "description": "Total number of unallocated bytes in file stores across all selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "repository_name": { - "type": "string" + "total_in_bytes": { + "description": "Total size, in bytes, of all file stores across all selected nodes.", + "type": "number" }, - "snapshot_name": { - "type": "string" + "total": { + "description": "Total size of all file stores across all selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "shrink_index_name": { - "type": "string" + "low_watermark_free_space": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "step": { - "$ref": "#/components/schemas/_types.Name" + "low_watermark_free_space_in_bytes": { + "type": "number" }, - "step_info": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "high_watermark_free_space": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "step_time": { - "$ref": "#/components/schemas/_types.DateTime" + "high_watermark_free_space_in_bytes": { + "type": "number" }, - "step_time_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "flood_stage_free_space": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "phase_execution": { - "$ref": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplainPhaseExecution" + "flood_stage_free_space_in_bytes": { + "type": "number" }, - "time_since_index_creation": { - "$ref": "#/components/schemas/_types.Duration" + "frozen_flood_stage_free_space": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "frozen_flood_stage_free_space_in_bytes": { + "type": "number" } - }, - "required": [ - "index", - "managed" - ] + } }, - "ilm.explain_lifecycle.LifecycleExplainPhaseExecution": { + "cluster.stats.IndexingPressure": { "type": "object", "properties": { - "phase_definition": { - "$ref": "#/components/schemas/ilm._types.Phase" - }, - "policy": { - "$ref": "#/components/schemas/_types.Name" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "modified_date_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "memory": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.IndexingPressureMemory" + } + ] } }, "required": [ - "policy", - "version", - "modified_date_in_millis" + "memory" ] }, - "ilm._types.Phase": { + "nodes._types.IndexingPressureMemory": { "type": "object", "properties": { - "actions": { - "$ref": "#/components/schemas/ilm._types.Actions" + "limit": { + "description": "Configured memory limit for the indexing requests.\nReplica requests have an automatic limit that is 1.5x this value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "min_age": { - "$ref": "#/components/schemas/_types.Duration" + "limit_in_bytes": { + "description": "Configured memory limit, in bytes, for the indexing requests.\nReplica requests have an automatic limit that is 1.5x this value.", + "type": "number" + }, + "current": { + "description": "Contains statistics for current indexing load.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.PressureMemory" + } + ] + }, + "total": { + "description": "Contains statistics for the cumulative indexing load since the node started.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.PressureMemory" + } + ] } } }, - "ilm._types.Actions": { + "nodes._types.PressureMemory": { "type": "object", "properties": { - "allocate": { - "$ref": "#/components/schemas/ilm._types.AllocateAction" + "all": { + "description": "Memory consumed by indexing requests in the coordinating, primary, or replica stage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "delete": { - "$ref": "#/components/schemas/ilm._types.DeleteAction" + "all_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the coordinating, primary, or replica stage.", + "type": "number" }, - "downsample": { - "$ref": "#/components/schemas/ilm._types.DownsampleAction" + "combined_coordinating_and_primary": { + "description": "Memory consumed by indexing requests in the coordinating or primary stage.\nThis value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "freeze": { - "$ref": "#/components/schemas/_types.EmptyObject" + "combined_coordinating_and_primary_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the coordinating or primary stage.\nThis value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally.", + "type": "number" }, - "forcemerge": { - "$ref": "#/components/schemas/ilm._types.ForceMergeAction" + "coordinating": { + "description": "Memory consumed by indexing requests in the coordinating stage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "migrate": { - "$ref": "#/components/schemas/ilm._types.MigrateAction" + "coordinating_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the coordinating stage.", + "type": "number" }, - "readonly": { - "$ref": "#/components/schemas/_types.EmptyObject" + "primary": { + "description": "Memory consumed by indexing requests in the primary stage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "rollover": { - "$ref": "#/components/schemas/ilm._types.RolloverAction" + "primary_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the primary stage.", + "type": "number" }, - "set_priority": { - "$ref": "#/components/schemas/ilm._types.SetPriorityAction" + "replica": { + "description": "Memory consumed by indexing requests in the replica stage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "searchable_snapshot": { - "$ref": "#/components/schemas/ilm._types.SearchableSnapshotAction" + "replica_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the replica stage.", + "type": "number" }, - "shrink": { - "$ref": "#/components/schemas/ilm._types.ShrinkAction" + "coordinating_rejections": { + "description": "Number of indexing requests rejected in the coordinating stage.", + "type": "number" }, - "unfollow": { - "$ref": "#/components/schemas/_types.EmptyObject" + "primary_rejections": { + "description": "Number of indexing requests rejected in the primary stage.", + "type": "number" }, - "wait_for_snapshot": { - "$ref": "#/components/schemas/ilm._types.WaitForSnapshotAction" + "replica_rejections": { + "description": "Number of indexing requests rejected in the replica stage.", + "type": "number" + }, + "primary_document_rejections": { + "type": "number" + }, + "large_operation_rejections": { + "type": "number" } } }, - "ilm._types.AllocateAction": { + "cluster.stats.ClusterIngest": { "type": "object", "properties": { - "number_of_replicas": { - "type": "number" - }, - "total_shards_per_node": { + "number_of_pipelines": { "type": "number" }, - "include": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "exclude": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "require": { + "processor_stats": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/cluster.stats.ClusterProcessor" } } - } + }, + "required": [ + "number_of_pipelines", + "processor_stats" + ] }, - "ilm._types.DeleteAction": { + "cluster.stats.ClusterProcessor": { "type": "object", "properties": { - "delete_searchable_snapshot": { - "type": "boolean" + "count": { + "type": "number" + }, + "current": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } - } + }, + "required": [ + "count", + "current", + "failed", + "time_in_millis" + ] }, - "ilm._types.DownsampleAction": { + "cluster.stats.ClusterJvm": { "type": "object", "properties": { - "fixed_interval": { - "$ref": "#/components/schemas/_types.DurationLarge" + "max_uptime_in_millis": { + "description": "Uptime duration, in milliseconds, since JVM last started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "wait_timeout": { - "$ref": "#/components/schemas/_types.Duration" + "max_uptime": { + "description": "Uptime duration since JVM last started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "mem": { + "description": "Contains statistics about memory used by selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterJvmMemory" + } + ] + }, + "threads": { + "description": "Number of active threads in use by JVM across all selected nodes.", + "type": "number" + }, + "versions": { + "description": "Contains statistics about the JVM versions used by selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.ClusterJvmVersion" + } } }, "required": [ - "fixed_interval" + "max_uptime_in_millis", + "mem", + "threads", + "versions" ] }, - "ilm._types.ForceMergeAction": { + "cluster.stats.ClusterJvmMemory": { "type": "object", "properties": { - "max_num_segments": { + "heap_max_in_bytes": { + "description": "Maximum amount of memory, in bytes, available for use by the heap across all selected nodes.", "type": "number" }, - "index_codec": { - "type": "string" + "heap_max": { + "description": "Maximum amount of memory available for use by the heap across all selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "heap_used_in_bytes": { + "description": "Memory, in bytes, currently in use by the heap across all selected nodes.", + "type": "number" + }, + "heap_used": { + "description": "Memory currently in use by the heap across all selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] } }, "required": [ - "max_num_segments" + "heap_max_in_bytes", + "heap_used_in_bytes" ] }, - "ilm._types.MigrateAction": { + "cluster.stats.ClusterJvmVersion": { "type": "object", "properties": { - "enabled": { + "bundled_jdk": { + "description": "Always `true`. All distributions come with a bundled Java Development Kit (JDK).", "type": "boolean" - } - } - }, - "ilm._types.RolloverAction": { - "type": "object", - "properties": { - "max_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_primary_shard_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_age": { - "$ref": "#/components/schemas/_types.Duration" }, - "max_docs": { + "count": { + "description": "Total number of selected nodes using JVM.", "type": "number" }, - "max_primary_shard_docs": { - "type": "number" + "using_bundled_jdk": { + "description": "If `true`, a bundled JDK is in use by JVM.", + "type": "boolean" }, - "min_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "version": { + "description": "Version of JVM used by one or more selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "min_primary_shard_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "vm_name": { + "description": "Name of the JVM.", + "type": "string" }, - "min_age": { - "$ref": "#/components/schemas/_types.Duration" + "vm_vendor": { + "description": "Vendor of the JVM.", + "type": "string" }, - "min_docs": { - "type": "number" + "vm_version": { + "description": "Full version number of JVM.\nThe full version number includes a plus sign (+) followed by the build number.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + } + }, + "required": [ + "bundled_jdk", + "count", + "using_bundled_jdk", + "version", + "vm_name", + "vm_vendor", + "vm_version" + ] + }, + "cluster.stats.ClusterNetworkTypes": { + "type": "object", + "properties": { + "http_types": { + "description": "Contains statistics about the HTTP network types used by selected nodes.", + "type": "object", + "additionalProperties": { + "type": "number" + } }, - "min_primary_shard_docs": { - "type": "number" + "transport_types": { + "description": "Contains statistics about the transport network types used by selected nodes.", + "type": "object", + "additionalProperties": { + "type": "number" + } } - } + }, + "required": [ + "http_types", + "transport_types" + ] }, - "ilm._types.SetPriorityAction": { + "cluster.stats.ClusterOperatingSystem": { "type": "object", "properties": { - "priority": { + "allocated_processors": { + "description": "Number of processors used to calculate thread pool size across all selected nodes.\nThis number can be set with the processors setting of a node and defaults to the number of processors reported by the operating system.\nIn both cases, this number will never be larger than 32.", + "type": "number" + }, + "architectures": { + "description": "Contains statistics about processor architectures (for example, x86_64 or aarch64) used by selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.ClusterOperatingSystemArchitecture" + } + }, + "available_processors": { + "description": "Number of processors available to JVM across all selected nodes.", "type": "number" + }, + "mem": { + "description": "Contains statistics about memory used by selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.OperatingSystemMemoryInfo" + } + ] + }, + "names": { + "description": "Contains statistics about operating systems used by selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.ClusterOperatingSystemName" + } + }, + "pretty_names": { + "description": "Contains statistics about operating systems used by selected nodes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/cluster.stats.ClusterOperatingSystemPrettyName" + } } - } + }, + "required": [ + "allocated_processors", + "available_processors", + "mem", + "names", + "pretty_names" + ] }, - "ilm._types.SearchableSnapshotAction": { + "cluster.stats.ClusterOperatingSystemArchitecture": { "type": "object", "properties": { - "snapshot_repository": { + "arch": { + "description": "Name of an architecture used by one or more selected nodes.", "type": "string" }, - "force_merge_index": { - "type": "boolean" + "count": { + "description": "Number of selected nodes using the architecture.", + "type": "number" } }, "required": [ - "snapshot_repository" + "arch", + "count" ] }, - "ilm._types.ShrinkAction": { + "cluster.stats.OperatingSystemMemoryInfo": { "type": "object", "properties": { - "number_of_shards": { + "adjusted_total_in_bytes": { + "description": "Total amount, in bytes, of memory across all selected nodes, but using the value specified using the `es.total_memory_bytes` system property instead of measured total memory for those nodes where that system property was set.", + "x-state": "Generally available; Added in 7.16.0", "type": "number" }, - "max_primary_shard_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "adjusted_total": { + "description": "Total amount of memory across all selected nodes, but using the value specified using the `es.total_memory_bytes` system property instead of measured total memory for those nodes where that system property was set.", + "x-state": "Generally available; Added in 7.16.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "allow_write_after_shrink": { - "type": "boolean" - } - } - }, - "ilm._types.WaitForSnapshotAction": { - "type": "object", - "properties": { - "policy": { - "type": "string" + "free_in_bytes": { + "description": "Amount, in bytes, of free physical memory across all selected nodes.", + "type": "number" + }, + "free": { + "description": "Amount of free physical memory across all selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "free_percent": { + "description": "Percentage of free physical memory across all selected nodes.", + "type": "number" + }, + "total_in_bytes": { + "description": "Total amount, in bytes, of physical memory across all selected nodes.", + "type": "number" + }, + "total": { + "description": "Total amount of physical memory across all selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "used_in_bytes": { + "description": "Amount, in bytes, of physical memory in use across all selected nodes.", + "type": "number" + }, + "used": { + "description": "Amount of physical memory in use across all selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "used_percent": { + "description": "Percentage of physical memory in use across all selected nodes.", + "type": "number" } }, "required": [ - "policy" + "free_in_bytes", + "free_percent", + "total_in_bytes", + "used_in_bytes", + "used_percent" ] }, - "ilm.explain_lifecycle.LifecycleExplainUnmanaged": { + "cluster.stats.ClusterOperatingSystemName": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "count": { + "description": "Number of selected nodes using the operating system.", + "type": "number" }, - "managed": { - "type": "string", - "enum": [ - "false" + "name": { + "description": "Name of an operating system used by one or more selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } ] } }, "required": [ - "index", - "managed" + "count", + "name" ] }, - "ilm.get_lifecycle.Lifecycle": { + "cluster.stats.ClusterOperatingSystemPrettyName": { "type": "object", "properties": { - "modified_date": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "policy": { - "$ref": "#/components/schemas/ilm._types.Policy" + "count": { + "description": "Number of selected nodes using the operating system.", + "type": "number" }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "pretty_name": { + "description": "Human-readable name of an operating system used by one or more selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] } }, "required": [ - "modified_date", - "policy", - "version" + "count", + "pretty_name" ] }, - "ilm._types.Policy": { + "cluster.stats.NodePackagingType": { "type": "object", "properties": { - "phases": { - "$ref": "#/components/schemas/ilm._types.Phases" + "count": { + "description": "Number of selected nodes using the distribution flavor and file type.", + "type": "number" }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" + "flavor": { + "description": "Type of Elasticsearch distribution. This is always `default`.", + "type": "string" + }, + "type": { + "description": "File type (such as `tar` or `zip`) used for the distribution package.", + "type": "string" } }, "required": [ - "phases" + "count", + "flavor", + "type" ] }, - "ilm._types.Phases": { + "_types.PluginStats": { "type": "object", "properties": { - "cold": { - "$ref": "#/components/schemas/ilm._types.Phase" + "classname": { + "type": "string" }, - "delete": { - "$ref": "#/components/schemas/ilm._types.Phase" + "description": { + "type": "string" }, - "frozen": { - "$ref": "#/components/schemas/ilm._types.Phase" + "elasticsearch_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "hot": { - "$ref": "#/components/schemas/ilm._types.Phase" + "extended_plugins": { + "type": "array", + "items": { + "type": "string" + } }, - "warm": { - "$ref": "#/components/schemas/ilm._types.Phase" - } - } - }, - "ilm.move_to_step.StepKey": { - "type": "object", - "properties": { - "action": { - "description": "The optional action to which the index will be moved.", - "type": "string" + "has_native_controller": { + "type": "boolean" + }, + "java_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, "name": { - "description": "The optional step name to which the index will be moved.", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "phase": { - "type": "string" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "licensed": { + "type": "boolean" } }, "required": [ - "phase" - ] - }, - "indices.add_block.IndicesBlockOptions": { - "type": "string", - "enum": [ - "metadata", - "read", - "read_only", - "write" + "classname", + "description", + "elasticsearch_version", + "extended_plugins", + "has_native_controller", + "java_version", + "name", + "version", + "licensed" ] }, - "indices.add_block.IndicesBlockStatus": { + "cluster.stats.ClusterProcess": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.IndexName" + "cpu": { + "description": "Contains statistics about CPU used by selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterProcessCpu" + } + ] }, - "blocked": { - "type": "boolean" + "open_file_descriptors": { + "description": "Contains statistics about open file descriptors in selected nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.ClusterProcessOpenFileDescriptors" + } + ] } }, "required": [ - "name", - "blocked" + "cpu", + "open_file_descriptors" ] }, - "indices.analyze.TextToAnalyze": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } + "cluster.stats.ClusterProcessCpu": { + "type": "object", + "properties": { + "percent": { + "description": "Percentage of CPU used across all selected nodes.\nReturns `-1` if not supported.", + "type": "number" } + }, + "required": [ + "percent" ] }, - "indices.analyze.AnalyzeDetail": { + "cluster.stats.ClusterProcessOpenFileDescriptors": { "type": "object", "properties": { - "analyzer": { - "$ref": "#/components/schemas/indices.analyze.AnalyzerDetail" - }, - "charfilters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.analyze.CharFilterDetail" - } - }, - "custom_analyzer": { - "type": "boolean" + "avg": { + "description": "Average number of concurrently open file descriptors.\nReturns `-1` if not supported.", + "type": "number" }, - "tokenfilters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.analyze.TokenDetail" - } + "max": { + "description": "Maximum number of concurrently open file descriptors allowed across all selected nodes.\nReturns `-1` if not supported.", + "type": "number" }, - "tokenizer": { - "$ref": "#/components/schemas/indices.analyze.TokenDetail" + "min": { + "description": "Minimum number of concurrently open file descriptors across all selected nodes.\nReturns -1 if not supported.", + "type": "number" } }, "required": [ - "custom_analyzer" + "avg", + "max", + "min" ] }, - "indices.analyze.AnalyzerDetail": { + "cluster.stats.ClusterSnapshotStats": { "type": "object", "properties": { - "name": { - "type": "string" + "current_counts": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.SnapshotCurrentCounts" + } + ] }, - "tokens": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.analyze.ExplainAnalyzeToken" + "repositories": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.stats.PerRepositoryStats" } } }, "required": [ - "name", - "tokens" + "current_counts", + "repositories" ] }, - "indices.analyze.ExplainAnalyzeToken": { + "cluster.stats.SnapshotCurrentCounts": { "type": "object", "properties": { - "bytes": { - "type": "string" - }, - "end_offset": { + "snapshots": { + "description": "Snapshots currently in progress", "type": "number" }, - "keyword": { - "type": "boolean" - }, - "position": { + "shard_snapshots": { + "description": "Incomplete shard snapshots", "type": "number" }, - "positionLength": { + "snapshot_deletions": { + "description": "Snapshots deletions in progress", "type": "number" }, - "start_offset": { + "concurrent_operations": { + "description": "Sum of snapshots and snapshot_deletions", "type": "number" }, - "termFrequency": { + "cleanups": { + "description": "Cleanups in progress, not counted in concurrent_operations as they are not concurrent", "type": "number" - }, - "token": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "bytes", - "end_offset", - "position", - "positionLength", - "start_offset", - "termFrequency", - "token", - "type" - ] - }, - "indices.analyze.CharFilterDetail": { - "type": "object", - "properties": { - "filtered_text": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "type": "string" } }, "required": [ - "filtered_text", - "name" + "snapshots", + "shard_snapshots", + "snapshot_deletions", + "concurrent_operations", + "cleanups" ] }, - "indices.analyze.TokenDetail": { + "cluster.stats.PerRepositoryStats": { "type": "object", "properties": { - "name": { + "type": { "type": "string" }, - "tokens": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.analyze.ExplainAnalyzeToken" - } + "oldest_start_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitMillis" + } + ] + }, + "oldest_start_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateFormat" + } + ] + }, + "current_counts": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.RepositoryStatsCurrentCounts" + } + ] } }, "required": [ - "name", - "tokens" + "type", + "oldest_start_time_millis", + "current_counts" ] }, - "indices.analyze.AnalyzeToken": { + "cluster.stats.RepositoryStatsCurrentCounts": { "type": "object", "properties": { - "end_offset": { + "snapshots": { "type": "number" }, - "position": { + "clones": { "type": "number" }, - "positionLength": { + "finalizations": { "type": "number" }, - "start_offset": { + "deletions": { "type": "number" }, - "token": { - "type": "string" + "snapshot_deletions": { + "type": "number" }, - "type": { - "type": "string" + "active_deletions": { + "type": "number" + }, + "shards": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.RepositoryStatsShards" + } + ] } }, "required": [ - "end_offset", - "position", - "start_offset", - "token", - "type" + "snapshots", + "clones", + "finalizations", + "deletions", + "snapshot_deletions", + "active_deletions", + "shards" ] }, - "_types.ShardsOperationResponseBase": { - "type": "object", - "properties": { - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - } - } - }, - "indices.close.CloseIndexResult": { + "cluster.stats.RepositoryStatsShards": { "type": "object", "properties": { - "closed": { - "type": "boolean" + "total": { + "type": "number" }, - "shards": { + "complete": { + "type": "number" + }, + "incomplete": { + "type": "number" + }, + "states": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/indices.close.CloseShardResult" + "type": "number" } } }, "required": [ - "closed" + "total", + "complete", + "incomplete", + "states" ] }, - "indices.close.CloseShardResult": { + "cluster.stats.CCSStats": { "type": "object", "properties": { - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ShardFailure" + "clusters": { + "description": "Contains remote cluster settings and metrics collected from them.\nThe keys are cluster names, and the values are per-cluster data.\nOnly present if `include_remotes` option is set to true.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.stats.RemoteClusterInfo" } + }, + "_search": { + "description": "Information about cross-cluster search usage.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.CCSUsageStats" + } + ] + }, + "_esql": { + "description": "Information about ES|QL cross-cluster query usage.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.CCSUsageStats" + } + ] } }, "required": [ - "failures" + "_search" ] }, - "indices.create_from.CreateFrom": { + "cluster.stats.RemoteClusterInfo": { "type": "object", "properties": { - "mappings_override": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" + "cluster_uuid": { + "description": "The UUID of the remote cluster.", + "type": "string" }, - "settings_override": { - "$ref": "#/components/schemas/indices._types.IndexSettings" + "mode": { + "description": "The connection mode used to communicate with the remote cluster.", + "type": "string" }, - "remove_index_blocks": { - "description": "If index blocks should be removed when creating destination index (optional)", + "skip_unavailable": { + "description": "The `skip_unavailable` setting used for this remote cluster.", "type": "boolean" - } - } - }, - "indices.data_streams_stats.DataStreamsStatsItem": { - "type": "object", - "properties": { - "backing_indices": { - "description": "Current number of backing indices for the data stream.", + }, + "transport.compress": { + "description": "Transport compression setting used for this remote cluster.", + "type": "string" + }, + "status": { + "description": "Health status of the cluster, based on the state of its primary and replica shards.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.HealthStatus" + } + ] + }, + "version": { + "description": "The list of Elasticsearch versions used by the nodes on the remote cluster.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.VersionString" + } + }, + "nodes_count": { + "description": "The total count of nodes in the remote cluster.", "type": "number" }, - "data_stream": { - "$ref": "#/components/schemas/_types.Name" + "shards_count": { + "description": "The total number of shards in the remote cluster.", + "type": "number" }, - "maximum_timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "indices_count": { + "description": "The total number of indices in the remote cluster.", + "type": "number" }, - "store_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "indices_total_size_in_bytes": { + "description": "Total data set size, in bytes, of all shards assigned to selected nodes.", + "type": "number" }, - "store_size_bytes": { - "description": "Total size, in bytes, of all shards for the data stream’s backing indices.", + "indices_total_size": { + "description": "Total data set size of all shards assigned to selected nodes, as a human-readable string.", + "type": "string" + }, + "max_heap_in_bytes": { + "description": "Maximum amount of memory, in bytes, available for use by the heap across the nodes of the remote cluster.", "type": "number" - } - }, - "required": [ - "backing_indices", - "data_stream", - "maximum_timestamp", - "store_size_bytes" - ] - }, - "_types.IndicesResponseBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, - { - "type": "object", - "properties": { - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - } - } - } - ] - }, - "_types.DataStreamNames": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.DataStreamName" + "max_heap": { + "description": "Maximum amount of memory available for use by the heap across the nodes of the remote cluster, as a human-readable string.", + "type": "string" }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.DataStreamName" - } + "mem_total_in_bytes": { + "description": "Total amount, in bytes, of physical memory across the nodes of the remote cluster.", + "type": "number" + }, + "mem_total": { + "description": "Total amount of physical memory across the nodes of the remote cluster, as a human-readable string.", + "type": "string" } + }, + "required": [ + "cluster_uuid", + "mode", + "skip_unavailable", + "transport.compress", + "status", + "version", + "nodes_count", + "shards_count", + "indices_count", + "indices_total_size_in_bytes", + "max_heap_in_bytes", + "mem_total_in_bytes" ] }, - "indices.explain_data_lifecycle.DataStreamLifecycleExplain": { + "cluster.stats.CCSUsageStats": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "total": { + "description": "The total number of cross-cluster search requests that have been executed by the cluster.", + "type": "number" }, - "managed_by_lifecycle": { - "type": "boolean" + "success": { + "description": "The total number of cross-cluster search requests that have been successfully executed by the cluster.", + "type": "number" }, - "index_creation_date_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "skipped": { + "description": "The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped.", + "type": "number" }, - "time_since_index_creation": { - "$ref": "#/components/schemas/_types.Duration" + "took": { + "description": "Statistics about the time taken to execute cross-cluster search requests.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + } + ] }, - "rollover_date_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "took_mrt_true": { + "description": "Statistics about the time taken to execute cross-cluster search requests for which the `ccs_minimize_roundtrips` setting was set to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + } + ] }, - "time_since_rollover": { - "$ref": "#/components/schemas/_types.Duration" + "took_mrt_false": { + "description": "Statistics about the time taken to execute cross-cluster search requests for which the `ccs_minimize_roundtrips` setting was set to `false`.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + } + ] }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + "remotes_per_search_max": { + "description": "The maximum number of remote clusters that were queried in a single cross-cluster search request.", + "type": "number" }, - "generation_time": { - "$ref": "#/components/schemas/_types.Duration" + "remotes_per_search_avg": { + "description": "The average number of remote clusters that were queried in a single cross-cluster search request.", + "type": "number" + }, + "failure_reasons": { + "description": "Statistics about the reasons for cross-cluster search request failures. The keys are the failure reason names and the values are the number of requests that failed for that reason.", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "features": { + "description": "The keys are the names of the search feature, and the values are the number of requests that used that feature. Single request can use more than one feature (e.g. both `async` and `wildcard`).", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "clients": { + "description": "Statistics about the clients that executed cross-cluster search requests. The keys are the names of the clients, and the values are the number of requests that were executed by that client. Only known clients (such as `kibana` or `elasticsearch`) are counted.", + "type": "object", + "additionalProperties": { + "type": "number" + } }, - "error": { - "type": "string" + "clusters": { + "description": "Statistics about the clusters that were queried in cross-cluster search requests. The keys are cluster names, and the values are per-cluster telemetry data. This also includes the local cluster itself, which uses the name `(local)`.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.stats.CCSUsageClusterStats" + } } }, "required": [ - "index", - "managed_by_lifecycle" + "total", + "success", + "skipped", + "took", + "remotes_per_search_max", + "remotes_per_search_avg", + "failure_reasons", + "features", + "clients", + "clusters" ] }, - "indices.field_usage_stats.FieldsUsageBody": { + "cluster.stats.CCSUsageTimeValue": { "type": "object", "properties": { - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - } - }, - "required": [ - "_shards" - ] - }, - "indices.forcemerge._types.ForceMergeResponseBody": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + "max": { + "description": "The maximum time taken to execute a request, in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - { - "type": "object", - "properties": { - "task": { - "description": "task contains a task id returned when wait_for_completion=false,\nyou can use the task_id to get the status of the task at _tasks/", - "type": "string" + "avg": { + "description": "The average time taken to execute a request, in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - } - } - ] - }, - "indices.get.Features": { - "oneOf": [ - { - "$ref": "#/components/schemas/indices.get.Feature" + ] }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.get.Feature" - } + "p90": { + "description": "The 90th percentile of the time taken to execute requests, in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } + }, + "required": [ + "max", + "avg", + "p90" ] }, - "indices.get.Feature": { - "type": "string", - "enum": [ - "aliases", - "mappings", - "settings" - ] - }, - "indices.get_alias.IndexAliases": { + "cluster.stats.CCSUsageClusterStats": { "type": "object", "properties": { - "aliases": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.AliasDefinition" - } + "total": { + "description": "The total number of successful (not skipped) cross-cluster search requests that were executed against this cluster. This may include requests where partial results were returned, but not requests in which the cluster has been skipped entirely.", + "type": "number" + }, + "skipped": { + "description": "The total number of cross-cluster search requests for which this cluster was skipped.", + "type": "number" + }, + "took": { + "description": "Statistics about the time taken to execute requests against this cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + } + ] } }, "required": [ - "aliases" + "total", + "skipped", + "took" ] }, - "indices.get_data_lifecycle.DataStreamWithLifecycle": { + "nodes._types.NodesResponseBase": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.DataStreamName" - }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + "_nodes": { + "description": "Contains statistics about the number of nodes selected by the request’s node filters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" + } + ] } - }, - "required": [ - "name" - ] + } }, - "indices.get_data_lifecycle_stats.DataStreamStats": { + "_types.NodeStatistics": { + "description": "Contains statistics about the number of nodes selected by the request.", "type": "object", "properties": { - "backing_indices_in_error": { - "description": "The count of the backing indices for the data stream.", + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ErrorCause" + } + }, + "total": { + "description": "Total number of nodes selected by the request.", "type": "number" }, - "backing_indices_in_total": { - "description": "The count of the backing indices for the data stream that have encountered an error.", + "successful": { + "description": "Number of nodes that responded successfully to the request.", "type": "number" }, - "name": { - "$ref": "#/components/schemas/_types.DataStreamName" + "failed": { + "description": "Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.", + "type": "number" } }, "required": [ - "backing_indices_in_error", - "backing_indices_in_total", - "name" + "total", + "successful", + "failed" ] }, - "indices._types.DataStream": { + "_types.Result": { + "type": "string", + "enum": [ + "created", + "updated", + "deleted", + "not_found", + "noop" + ] + }, + "connector._types.Connector": { "type": "object", "properties": { - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" + "api_key_id": { + "type": "string" }, - "allow_custom_routing": { - "description": "If `true`, the data stream allows custom routing on write request.", - "type": "boolean" + "api_key_secret_id": { + "type": "string" }, - "failure_store": { - "$ref": "#/components/schemas/indices._types.FailureStore" + "configuration": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorConfiguration" + } + ] }, - "generation": { - "description": "Current generation for the data stream. This number acts as a cumulative count of the stream’s rollovers, starting at 1.", - "type": "number" + "custom_scheduling": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorCustomScheduling" + } + ] }, - "hidden": { - "description": "If `true`, the data stream is hidden.", + "deleted": { "type": "boolean" }, - "ilm_policy": { - "$ref": "#/components/schemas/_types.Name" + "description": { + "type": "string" }, - "next_generation_managed_by": { - "$ref": "#/components/schemas/indices._types.ManagedBy" + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "prefer_ilm": { - "description": "Indicates if ILM should take precedence over DSL in case both are configured to managed this data stream.", - "type": "boolean" + "features": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorFeatures" + } + ] }, - "indices": { - "description": "Array of objects containing information about the data stream’s backing indices.\nThe last item in this array contains information about the stream’s current write index.", + "filtering": { "type": "array", "items": { - "$ref": "#/components/schemas/indices._types.DataStreamIndex" + "$ref": "#/components/schemas/connector._types.FilteringConfig" } }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "name": { - "$ref": "#/components/schemas/_types.DataStreamName" + "index_name": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "replicated": { - "description": "If `true`, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.", + "is_native": { "type": "boolean" }, - "rollover_on_write": { - "description": "If `true`, the next write to this data stream will trigger a rollover first and the document will be indexed in the new backing index. If the rollover fails the indexing request will fail too.", - "type": "boolean" + "language": { + "type": "string" }, - "status": { - "$ref": "#/components/schemas/_types.HealthStatus" + "last_access_control_sync_error": { + "type": "string" }, - "system": { - "description": "If `true`, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.", - "type": "boolean" + "last_access_control_sync_scheduled_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "template": { - "$ref": "#/components/schemas/_types.Name" + "last_access_control_sync_status": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncStatus" + } + ] }, - "timestamp_field": { - "$ref": "#/components/schemas/indices._types.DataStreamTimestampField" + "last_deleted_document_count": { + "type": "number" }, - "index_mode": { - "$ref": "#/components/schemas/indices._types.IndexMode" - } - }, - "required": [ - "generation", - "hidden", - "next_generation_managed_by", - "prefer_ilm", - "indices", - "name", - "rollover_on_write", - "status", - "template", - "timestamp_field" - ] - }, - "indices._types.FailureStore": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" + "last_incremental_sync_scheduled_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices._types.DataStreamIndex" - } + "last_indexed_document_count": { + "type": "number" }, - "rollover_on_write": { - "type": "boolean" - } - }, - "required": [ - "enabled", - "indices", - "rollover_on_write" - ] - }, - "indices._types.DataStreamIndex": { - "type": "object", - "properties": { - "index_name": { - "$ref": "#/components/schemas/_types.IndexName" + "last_seen": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "index_uuid": { - "$ref": "#/components/schemas/_types.Uuid" + "last_sync_error": { + "type": "string" }, - "ilm_policy": { - "$ref": "#/components/schemas/_types.Name" + "last_sync_scheduled_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "managed_by": { - "$ref": "#/components/schemas/indices._types.ManagedBy" + "last_sync_status": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncStatus" + } + ] }, - "prefer_ilm": { - "description": "Indicates if ILM should take precedence over DSL in case both are configured to manage this index.", - "type": "boolean" + "last_synced": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "index_mode": { - "$ref": "#/components/schemas/indices._types.IndexMode" - } - }, - "required": [ - "index_name", - "index_uuid" - ] - }, - "indices._types.ManagedBy": { - "type": "string", - "enum": [ - "Index Lifecycle Management", - "Data stream lifecycle", - "Unmanaged" - ] - }, - "indices._types.IndexMode": { - "type": "string", - "enum": [ - "standard", - "time_series", - "logsdb", - "lookup" - ] - }, - "indices._types.DataStreamTimestampField": { - "type": "object", - "properties": { "name": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "name" - ] - }, - "indices.get_data_stream_options.DataStreamWithOptions": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.DataStreamName" + "type": "string" }, - "options": { - "$ref": "#/components/schemas/indices._types.DataStreamOptions" + "pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.IngestPipelineParams" + } + ] + }, + "scheduling": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SchedulingConfiguration" + } + ] + }, + "service_type": { + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorStatus" + } + ] + }, + "sync_cursor": { + "type": "object" + }, + "sync_now": { + "type": "boolean" } }, "required": [ - "name" + "configuration", + "custom_scheduling", + "deleted", + "filtering", + "is_native", + "scheduling", + "status", + "sync_now" ] }, - "indices._types.DataStreamOptions": { + "connector._types.ConnectorConfiguration": { "type": "object", - "properties": { - "failure_store": { - "$ref": "#/components/schemas/indices._types.DataStreamFailureStore" - } + "additionalProperties": { + "$ref": "#/components/schemas/connector._types.ConnectorConfigProperties" } }, - "indices._types.DataStreamFailureStore": { + "connector._types.ConnectorConfigProperties": { "type": "object", "properties": { - "enabled": { - "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", - "type": "boolean" + "category": { + "type": "string" }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.FailureStoreLifecycle" - } - } - }, - "indices._types.FailureStoreLifecycle": { - "type": "object", - "properties": { - "data_retention": { - "$ref": "#/components/schemas/_types.Duration" + "default_value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScalarValue" + } + ] }, - "enabled": { - "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", - "type": "boolean" - } - } - }, - "indices.get_field_mapping.TypeFieldMappings": { - "type": "object", - "properties": { - "mappings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.FieldMapping" + "depends_on": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types.Dependency" } - } - }, - "required": [ - "mappings" - ] - }, - "_types.mapping.FieldMapping": { - "type": "object", - "properties": { - "full_name": { - "type": "string" }, - "mapping": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.Property" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "full_name", - "mapping" - ] - }, - "indices.get_index_template.IndexTemplateItem": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "display": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.DisplayType" + } + ] }, - "index_template": { - "$ref": "#/components/schemas/indices._types.IndexTemplate" - } - }, - "required": [ - "name", - "index_template" - ] - }, - "indices._types.IndexTemplate": { - "type": "object", - "properties": { - "index_patterns": { - "$ref": "#/components/schemas/_types.Names" + "label": { + "type": "string" }, - "composed_of": { - "description": "An ordered list of component template names.\nComponent templates are merged in the order specified, meaning that the last component template specified has the highest precedence.", + "options": { "type": "array", "items": { - "$ref": "#/components/schemas/_types.Name" + "$ref": "#/components/schemas/connector._types.SelectOption" } }, - "template": { - "$ref": "#/components/schemas/indices._types.IndexTemplateSummary" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "priority": { - "description": "Priority to determine index template precedence when a new data stream or index is created.\nThe index template with the highest priority is chosen.\nIf no priority is specified the template is treated as though it is of priority 0 (lowest priority).\nThis number is not automatically generated by Elasticsearch.", + "order": { "type": "number" }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" + "placeholder": { + "type": "string" }, - "allow_auto_create": { + "required": { "type": "boolean" }, - "data_stream": { - "$ref": "#/components/schemas/indices._types.IndexTemplateDataStreamConfiguration" - }, - "deprecated": { - "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "sensitive": { "type": "boolean" }, - "ignore_missing_component_templates": { - "$ref": "#/components/schemas/_types.Names" - } - }, - "required": [ - "index_patterns", - "composed_of" - ] - }, - "indices._types.IndexTemplateSummary": { - "type": "object", - "properties": { - "aliases": { - "description": "Aliases to add.\nIf the index template includes a `data_stream` object, these are data stream aliases.\nOtherwise, these are index aliases.\nData stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" - } - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" - }, - "settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" - }, - "data_stream_options": { - "x-state": "Added in 8.19.0", + "tooltip": { "oneOf": [ { - "$ref": "#/components/schemas/indices._types.DataStreamOptionsTemplate" + "type": "string" }, { "nullable": true, "type": "string" } ] - } - } - }, - "indices._types.IndexTemplateDataStreamConfiguration": { - "type": "object", - "properties": { - "hidden": { - "description": "If true, the data stream is hidden.", - "type": "boolean" }, - "allow_custom_routing": { - "description": "If true, the data stream supports custom routing.", - "type": "boolean" - } - } - }, - "indices.get_mapping.IndexMappingRecord": { - "type": "object", - "properties": { - "item": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorFieldType" + } + ] }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" + "ui_restrictions": { + "type": "array", + "items": { + "type": "string" + } + }, + "validations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types.Validation" + } + }, + "value": { + "type": "object" } }, "required": [ - "mappings" + "default_value", + "depends_on", + "display", + "label", + "options", + "required", + "sensitive", + "value" ] }, - "indices.get_migrate_reindex_status.StatusInProgress": { - "type": "object", - "properties": { - "index": { - "type": "string" - }, - "total_doc_count": { + "_types.ScalarValue": { + "description": "A scalar value.", + "oneOf": [ + { "type": "number" }, - "reindexed_doc_count": { + { "type": "number" - } - }, - "required": [ - "index", - "total_doc_count", - "reindexed_doc_count" - ] - }, - "indices.get_migrate_reindex_status.StatusError": { - "type": "object", - "properties": { - "index": { - "type": "string" }, - "message": { + { "type": "string" - } - }, - "required": [ - "index", - "message" - ] - }, - "indices._types.TemplateMapping": { - "type": "object", - "properties": { - "aliases": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" - } - }, - "index_patterns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Name" - } - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" }, - "order": { - "type": "number" - }, - "settings": { - "type": "object", - "additionalProperties": { - "type": "object" - } + { + "type": "boolean" }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + { + "nullable": true, + "type": "string" } - }, - "required": [ - "aliases", - "index_patterns", - "mappings", - "order", - "settings" ] }, - "indices.migrate_reindex.MigrateReindex": { + "connector._types.Dependency": { "type": "object", "properties": { - "mode": { - "$ref": "#/components/schemas/indices.migrate_reindex.ModeEnum" + "field": { + "type": "string" }, - "source": { - "$ref": "#/components/schemas/indices.migrate_reindex.SourceIndex" + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScalarValue" + } + ] } }, "required": [ - "mode", - "source" + "field", + "value" ] }, - "indices.migrate_reindex.ModeEnum": { + "connector._types.DisplayType": { "type": "string", "enum": [ - "upgrade" + "textbox", + "textarea", + "numeric", + "toggle", + "dropdown" ] }, - "indices.migrate_reindex.SourceIndex": { + "connector._types.SelectOption": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "label": { + "type": "string" + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScalarValue" + } + ] } }, "required": [ - "index" + "label", + "value" ] }, - "indices.modify_data_stream.Action": { - "type": "object", - "properties": { - "add_backing_index": { - "$ref": "#/components/schemas/indices.modify_data_stream.IndexAndDataStreamAction" - }, - "remove_backing_index": { - "$ref": "#/components/schemas/indices.modify_data_stream.IndexAndDataStreamAction" - } - }, - "minProperties": 1, - "maxProperties": 1 + "connector._types.ConnectorFieldType": { + "type": "string", + "enum": [ + "str", + "int", + "list", + "bool" + ] }, - "indices.modify_data_stream.IndexAndDataStreamAction": { - "type": "object", - "properties": { - "data_stream": { - "$ref": "#/components/schemas/_types.DataStreamName" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "connector._types.Validation": { + "discriminator": { + "propertyName": "type", + "mapping": { + "greater_than": "#/components/schemas/connector._types.GreaterThanValidation", + "included_in": "#/components/schemas/connector._types.IncludedInValidation", + "less_than": "#/components/schemas/connector._types.LessThanValidation", + "list_type": "#/components/schemas/connector._types.ListTypeValidation", + "regex": "#/components/schemas/connector._types.RegexValidation" } }, - "required": [ - "data_stream", - "index" - ] - }, - "indices.put_index_template.IndexTemplateMapping": { - "type": "object", - "properties": { - "aliases": { - "description": "Aliases to add.\nIf the index template includes a `data_stream` object, these are data stream aliases.\nOtherwise, these are index aliases.\nData stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" - } + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types.LessThanValidation" }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" + { + "$ref": "#/components/schemas/connector._types.GreaterThanValidation" }, - "settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" + { + "$ref": "#/components/schemas/connector._types.ListTypeValidation" }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycle" - } - } - }, - "indices._types.DataStreamVisibility": { - "type": "object", - "properties": { - "hidden": { - "type": "boolean" + { + "$ref": "#/components/schemas/connector._types.IncludedInValidation" }, - "allow_custom_routing": { - "type": "boolean" - } - } - }, - "indices.recovery.RecoveryStatus": { - "type": "object", - "properties": { - "shards": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.recovery.ShardRecovery" - } + { + "$ref": "#/components/schemas/connector._types.RegexValidation" } - }, - "required": [ - "shards" ] }, - "indices.recovery.ShardRecovery": { + "connector._types.LessThanValidation": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "index": { - "$ref": "#/components/schemas/indices.recovery.RecoveryIndexStatus" - }, - "primary": { - "type": "boolean" - }, - "source": { - "$ref": "#/components/schemas/indices.recovery.RecoveryOrigin" - }, - "stage": { - "type": "string" - }, - "start": { - "$ref": "#/components/schemas/indices.recovery.RecoveryStartStatus" - }, - "start_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "stop_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "stop_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "target": { - "$ref": "#/components/schemas/indices.recovery.RecoveryOrigin" - }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "translog": { - "$ref": "#/components/schemas/indices.recovery.TranslogStatus" - }, "type": { - "type": "string" + "type": "string", + "enum": [ + "less_than" + ] }, - "verify_index": { - "$ref": "#/components/schemas/indices.recovery.VerifyIndex" + "constraint": { + "type": "number" } }, "required": [ - "id", - "index", - "primary", - "source", - "stage", - "start_time_in_millis", - "target", - "total_time_in_millis", - "translog", "type", - "verify_index" + "constraint" ] }, - "indices.recovery.RecoveryIndexStatus": { + "connector._types.GreaterThanValidation": { "type": "object", "properties": { - "bytes": { - "$ref": "#/components/schemas/indices.recovery.RecoveryBytes" - }, - "files": { - "$ref": "#/components/schemas/indices.recovery.RecoveryFiles" - }, - "size": { - "$ref": "#/components/schemas/indices.recovery.RecoveryBytes" - }, - "source_throttle_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "source_throttle_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "target_throttle_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "target_throttle_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" + "type": { + "type": "string", + "enum": [ + "greater_than" + ] }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "constraint": { + "type": "number" } }, "required": [ - "files", - "size", - "source_throttle_time_in_millis", - "target_throttle_time_in_millis", - "total_time_in_millis" + "type", + "constraint" ] }, - "indices.recovery.RecoveryBytes": { + "connector._types.ListTypeValidation": { "type": "object", "properties": { - "percent": { - "$ref": "#/components/schemas/_types.Percentage" - }, - "recovered": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "recovered_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "recovered_from_snapshot": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "recovered_from_snapshot_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "reused": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "reused_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "total": { - "$ref": "#/components/schemas/_types.ByteSize" + "type": { + "type": "string", + "enum": [ + "list_type" + ] }, - "total_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" + "constraint": { + "type": "string" } }, "required": [ - "percent", - "recovered_in_bytes", - "reused_in_bytes", - "total_in_bytes" + "type", + "constraint" ] }, - "indices.recovery.RecoveryFiles": { + "connector._types.IncludedInValidation": { "type": "object", "properties": { - "details": { + "type": { + "type": "string", + "enum": [ + "included_in" + ] + }, + "constraint": { "type": "array", "items": { - "$ref": "#/components/schemas/indices.recovery.FileDetails" + "$ref": "#/components/schemas/_types.ScalarValue" } - }, - "percent": { - "$ref": "#/components/schemas/_types.Percentage" - }, - "recovered": { - "type": "number" - }, - "reused": { - "type": "number" - }, - "total": { - "type": "number" } }, "required": [ - "percent", - "recovered", - "reused", - "total" + "type", + "constraint" ] }, - "indices.recovery.FileDetails": { + "connector._types.RegexValidation": { "type": "object", "properties": { - "length": { - "type": "number" + "type": { + "type": "string", + "enum": [ + "regex" + ] }, - "name": { + "constraint": { "type": "string" - }, - "recovered": { - "type": "number" } }, "required": [ - "length", - "name", - "recovered" + "type", + "constraint" ] }, - "indices.recovery.RecoveryOrigin": { + "connector._types.ConnectorCustomScheduling": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/connector._types.CustomScheduling" + } + }, + "connector._types.CustomScheduling": { "type": "object", "properties": { - "hostname": { - "type": "string" - }, - "host": { - "$ref": "#/components/schemas/_types.Host" + "configuration_overrides": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.CustomSchedulingConfigurationOverrides" + } + ] }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" + "enabled": { + "type": "boolean" }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "interval": { + "type": "string" }, - "ip": { - "$ref": "#/components/schemas/_types.Ip" + "last_synced": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, "name": { - "$ref": "#/components/schemas/_types.Name" + "type": "string" + } + }, + "required": [ + "configuration_overrides", + "enabled", + "interval", + "name" + ] + }, + "connector._types.CustomSchedulingConfigurationOverrides": { + "type": "object", + "properties": { + "max_crawl_depth": { + "type": "number" }, - "bootstrap_new_history_uuid": { + "sitemap_discovery_disabled": { "type": "boolean" }, - "repository": { - "$ref": "#/components/schemas/_types.Name" - }, - "snapshot": { - "$ref": "#/components/schemas/_types.Name" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "domain_allowlist": { + "type": "array", + "items": { + "type": "string" + } }, - "restoreUUID": { - "$ref": "#/components/schemas/_types.Uuid" + "sitemap_urls": { + "type": "array", + "items": { + "type": "string" + } }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "seed_urls": { + "type": "array", + "items": { + "type": "string" + } } } }, - "indices.recovery.RecoveryStartStatus": { + "connector._types.ConnectorFeatures": { "type": "object", "properties": { - "check_index_time": { - "$ref": "#/components/schemas/_types.Duration" + "document_level_security": { + "description": "Indicates whether document-level security is enabled.", + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FeatureEnabled" + } + ] }, - "check_index_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "incremental_sync": { + "description": "Indicates whether incremental syncs are enabled.", + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FeatureEnabled" + } + ] }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" + "native_connector_api_keys": { + "description": "Indicates whether managed connector API keys are enabled.", + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FeatureEnabled" + } + ] }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "sync_rules": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncRulesFeature" + } + ] } - }, - "required": [ - "check_index_time_in_millis", - "total_time_in_millis" - ] + } }, - "indices.recovery.TranslogStatus": { + "connector._types.FeatureEnabled": { "type": "object", "properties": { - "percent": { - "$ref": "#/components/schemas/_types.Percentage" - }, - "recovered": { - "type": "number" - }, - "total": { - "type": "number" - }, - "total_on_start": { - "type": "number" - }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "enabled": { + "type": "boolean" } }, "required": [ - "percent", - "recovered", - "total", - "total_on_start", - "total_time_in_millis" + "enabled" ] }, - "indices.recovery.VerifyIndex": { + "connector._types.SyncRulesFeature": { "type": "object", "properties": { - "check_index_time": { - "$ref": "#/components/schemas/_types.Duration" + "advanced": { + "description": "Indicates whether advanced sync rules are enabled.", + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FeatureEnabled" + } + ] }, - "check_index_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "basic": { + "description": "Indicates whether basic sync rules are enabled.", + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FeatureEnabled" + } + ] + } + } + }, + "connector._types.FilteringConfig": { + "type": "object", + "properties": { + "active": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringRules" + } + ] }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" + "domain": { + "type": "string" }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "draft": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringRules" + } + ] } }, "required": [ - "check_index_time_in_millis", - "total_time_in_millis" + "active", + "draft" ] }, - "indices.reload_search_analyzers.ReloadResult": { + "connector._types.FilteringRules": { "type": "object", "properties": { - "reload_details": { + "advanced_snippet": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringAdvancedSnippet" + } + ] + }, + "rules": { "type": "array", "items": { - "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadDetails" + "$ref": "#/components/schemas/connector._types.FilteringRule" } }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" + "validation": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringRulesValidation" + } + ] } }, "required": [ - "reload_details", - "_shards" + "advanced_snippet", + "rules", + "validation" ] }, - "indices.reload_search_analyzers.ReloadDetails": { + "connector._types.FilteringAdvancedSnippet": { "type": "object", "properties": { - "index": { - "type": "string" + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "reloaded_analyzers": { - "type": "array", - "items": { - "type": "string" - } + "updated_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "reloaded_node_ids": { - "type": "array", - "items": { - "type": "string" - } + "value": { + "type": "object" } }, "required": [ - "index", - "reloaded_analyzers", - "reloaded_node_ids" + "value" ] }, - "indices.resolve_cluster.ResolveClusterInfo": { + "connector._types.FilteringRule": { "type": "object", "properties": { - "connected": { - "description": "Whether the remote cluster is connected to the local (querying) cluster.", - "type": "boolean" + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "skip_unavailable": { - "description": "The `skip_unavailable` setting for a remote cluster.", - "type": "boolean" + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "matching_indices": { - "description": "Whether the index expression provided in the request matches any indices, aliases or data streams\non the cluster.", - "type": "boolean" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "error": { - "description": "Provides error messages that are likely to occur if you do a search with this index expression\non the specified cluster (for example, lack of security privileges to query an index).", - "type": "string" + "order": { + "type": "number" }, - "version": { - "$ref": "#/components/schemas/_types.ElasticsearchVersionMinInfo" + "policy": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringPolicy" + } + ] + }, + "rule": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringRuleRule" + } + ] + }, + "updated_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "value": { + "type": "string" } }, "required": [ - "connected", - "skip_unavailable" + "field", + "id", + "order", + "policy", + "rule", + "value" ] }, - "_types.ElasticsearchVersionMinInfo": { + "connector._types.FilteringPolicy": { + "type": "string", + "enum": [ + "exclude", + "include" + ] + }, + "connector._types.FilteringRuleRule": { + "type": "string", + "enum": [ + "contains", + "ends_with", + "equals", + "regex", + "starts_with", + ">", + "<" + ] + }, + "connector._types.FilteringRulesValidation": { "type": "object", "properties": { - "build_flavor": { - "type": "string" - }, - "minimum_index_compatibility_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "minimum_wire_compatibility_version": { - "$ref": "#/components/schemas/_types.VersionString" + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types.FilteringValidation" + } }, - "number": { - "type": "string" + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringValidationState" + } + ] } }, "required": [ - "build_flavor", - "minimum_index_compatibility_version", - "minimum_wire_compatibility_version", - "number" + "errors", + "state" ] }, - "indices.resolve_index.ResolveIndexItem": { + "connector._types.FilteringValidation": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "aliases": { + "ids": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/_types.Id" } }, - "attributes": { + "messages": { "type": "array", "items": { "type": "string" } - }, - "data_stream": { - "$ref": "#/components/schemas/_types.DataStreamName" } }, "required": [ - "name", - "attributes" + "ids", + "messages" ] }, - "indices.resolve_index.ResolveIndexAliasItem": { + "connector._types.FilteringValidationState": { + "type": "string", + "enum": [ + "edited", + "invalid", + "valid" + ] + }, + "connector._types.SyncStatus": { + "type": "string", + "enum": [ + "canceling", + "canceled", + "completed", + "error", + "in_progress", + "pending", + "suspended" + ] + }, + "connector._types.IngestPipelineParams": { "type": "object", "properties": { + "extract_binary_content": { + "type": "boolean" + }, "name": { - "$ref": "#/components/schemas/_types.Name" + "type": "string" }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "reduce_whitespace": { + "type": "boolean" + }, + "run_ml_inference": { + "type": "boolean" } }, "required": [ + "extract_binary_content", "name", - "indices" + "reduce_whitespace", + "run_ml_inference" ] }, - "indices.resolve_index.ResolveIndexDataStreamsItem": { + "connector._types.SchedulingConfiguration": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.DataStreamName" + "access_control": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorScheduling" + } + ] }, - "timestamp_field": { - "$ref": "#/components/schemas/_types.Field" + "full": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorScheduling" + } + ] }, - "backing_indices": { - "$ref": "#/components/schemas/_types.Indices" + "incremental": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorScheduling" + } + ] + } + } + }, + "connector._types.ConnectorScheduling": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "interval": { + "description": "The interval is expressed using the crontab syntax", + "type": "string" } }, "required": [ - "name", - "timestamp_field", - "backing_indices" + "enabled", + "interval" ] }, - "indices.rollover.RolloverConditions": { + "connector._types.ConnectorStatus": { + "type": "string", + "enum": [ + "created", + "needs_configuration", + "configured", + "connected", + "error" + ] + }, + "connector._types.ConnectorSyncJob": { "type": "object", "properties": { - "min_age": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_age": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_age_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "min_docs": { - "type": "number" - }, - "max_docs": { - "type": "number" - }, - "max_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "cancelation_requested_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "max_size_bytes": { - "type": "number" + "canceled_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "min_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "completed_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "min_size_bytes": { - "type": "number" + "connector": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncJobConnectorReference" + } + ] }, - "max_primary_shard_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "max_primary_shard_size_bytes": { + "deleted_document_count": { "type": "number" }, - "min_primary_shard_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "error": { + "type": "string" }, - "min_primary_shard_size_bytes": { - "type": "number" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "max_primary_shard_docs": { + "indexed_document_count": { "type": "number" }, - "min_primary_shard_docs": { - "type": "number" - } - } - }, - "indices.segments.IndexSegment": { - "type": "object", - "properties": { - "shards": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/indices.segments.ShardsSegment" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.segments.ShardsSegment" - } - } - ] - } - } - }, - "required": [ - "shards" - ] - }, - "indices.segments.ShardsSegment": { - "type": "object", - "properties": { - "num_committed_segments": { + "indexed_document_volume": { "type": "number" }, - "routing": { - "$ref": "#/components/schemas/indices.segments.ShardSegmentRouting" + "job_type": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncJobType" + } + ] }, - "num_search_segments": { - "type": "number" + "last_seen": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "segments": { + "metadata": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/indices.segments.Segment" + "type": "object" } - } - }, - "required": [ - "num_committed_segments", - "routing", - "num_search_segments", - "segments" - ] - }, - "indices.segments.ShardSegmentRouting": { - "type": "object", - "properties": { - "node": { - "type": "string" }, - "primary": { - "type": "boolean" + "started_at": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncStatus" + } + ] }, - "state": { + "total_document_count": { + "type": "number" + }, + "trigger_method": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.SyncJobTriggerMethod" + } + ] + }, + "worker_hostname": { "type": "string" } }, "required": [ - "node", - "primary", - "state" + "connector", + "created_at", + "deleted_document_count", + "id", + "indexed_document_count", + "indexed_document_volume", + "job_type", + "metadata", + "status", + "total_document_count", + "trigger_method" ] }, - "indices.segments.Segment": { + "connector._types.SyncJobConnectorReference": { "type": "object", "properties": { - "attributes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "committed": { - "type": "boolean" + "configuration": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.ConnectorConfiguration" + } + ] }, - "compound": { - "type": "boolean" + "filtering": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.FilteringRules" + } + ] }, - "deleted_docs": { - "type": "number" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "generation": { - "type": "number" + "index_name": { + "type": "string" }, - "search": { - "type": "boolean" + "language": { + "type": "string" }, - "size_in_bytes": { - "type": "number" + "pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/connector._types.IngestPipelineParams" + } + ] }, - "num_docs": { - "type": "number" + "service_type": { + "type": "string" }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "sync_cursor": { + "type": "object" } }, "required": [ - "attributes", - "committed", - "compound", - "deleted_docs", - "generation", - "search", - "size_in_bytes", - "num_docs", - "version" + "configuration", + "filtering", + "id", + "index_name", + "service_type" ] }, - "indices.shard_stores.ShardStoreStatus": { + "connector._types.SyncJobType": { "type": "string", "enum": [ - "green", - "yellow", - "red", - "all" + "full", + "incremental", + "access_control" ] }, - "indices.shard_stores.IndicesShardStores": { - "type": "object", - "properties": { - "shards": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.shard_stores.ShardStoreWrapper" - } - } - }, - "required": [ - "shards" + "connector._types.SyncJobTriggerMethod": { + "type": "string", + "enum": [ + "on_demand", + "scheduled" ] }, - "indices.shard_stores.ShardStoreWrapper": { + "_types.WriteResponseBase": { "type": "object", "properties": { - "stores": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.shard_stores.ShardStore" - } + "_id": { + "description": "The unique identifier for the added document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "description": "The name of the index the document was added to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "_primary_term": { + "description": "The primary term assigned to the document for the indexing operation.", + "type": "number" + }, + "result": { + "description": "The result of the indexing operation: `created` or `updated`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + }, + "_seq_no": { + "description": "The sequence number assigned to the document for the indexing operation.\nSequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_shards": { + "description": "Information about the replication process of the operation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + }, + "_version": { + "description": "The document version, which is incremented each time the document is updated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "failure_store": { + "description": "The role of the failure store in this document response", + "allOf": [ + { + "$ref": "#/components/schemas/_global.bulk.FailureStoreStatus" + } + ] + }, + "forced_refresh": { + "type": "boolean" } }, "required": [ - "stores" + "_id", + "_index", + "result", + "_shards", + "_version" ] }, - "indices.shard_stores.ShardStore": { + "dangling_indices.list_dangling_indices.DanglingIndex": { "type": "object", "properties": { - "allocation": { - "$ref": "#/components/schemas/indices.shard_stores.ShardStoreAllocation" + "index_name": { + "type": "string" }, - "allocation_id": { - "$ref": "#/components/schemas/_types.Id" + "index_uuid": { + "type": "string" }, - "store_exception": { - "$ref": "#/components/schemas/indices.shard_stores.ShardStoreException" + "creation_date_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "node_ids": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] } }, "required": [ - "allocation" + "index_name", + "index_uuid", + "creation_date_millis", + "node_ids" ] }, - "indices.shard_stores.ShardStoreAllocation": { + "_types.Conflicts": { "type": "string", "enum": [ - "primary", - "replica", - "unused" + "abort", + "proceed" ] }, - "indices.shard_stores.ShardStoreException": { - "type": "object", - "properties": { - "reason": { - "type": "string" + "_types.Slices": { + "description": "Slices configuration used to parallelize a process.", + "oneOf": [ + { + "type": "number" }, - "type": { - "type": "string" + { + "$ref": "#/components/schemas/_types.SlicesCalculation" } - }, - "required": [ - "reason", - "type" ] }, - "indices.simulate_template.Overlapping": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "index_patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "name", - "index_patterns" + "_types.SlicesCalculation": { + "type": "string", + "enum": [ + "auto" ] }, - "indices.simulate_template.Template": { + "_types.BulkIndexByScrollFailure": { "type": "object", "properties": { - "aliases": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" - } + "cause": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "status": { + "type": "number" } }, "required": [ - "aliases", - "mappings", - "settings" + "cause", + "id", + "index", + "status" ] }, - "indices.stats.IndicesStats": { + "_types.Retries": { "type": "object", "properties": { - "primaries": { - "$ref": "#/components/schemas/indices.stats.IndexStats" - }, - "shards": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.stats.ShardStats" - } - } - }, - "total": { - "$ref": "#/components/schemas/indices.stats.IndexStats" - }, - "uuid": { - "$ref": "#/components/schemas/_types.Uuid" - }, - "health": { - "$ref": "#/components/schemas/_types.HealthStatus" + "bulk": { + "description": "The number of bulk actions retried.", + "type": "number" }, - "status": { - "$ref": "#/components/schemas/indices.stats.IndexMetadataState" + "search": { + "description": "The number of search actions retried.", + "type": "number" } - } + }, + "required": [ + "bulk", + "search" + ] }, - "indices.stats.IndexStats": { + "_types.ReindexStatus": { "type": "object", "properties": { - "completion": { - "$ref": "#/components/schemas/_types.CompletionStats" - }, - "docs": { - "$ref": "#/components/schemas/_types.DocStats" + "slice_id": { + "description": "The slice ID", + "type": "number" }, - "fielddata": { - "$ref": "#/components/schemas/_types.FielddataStats" + "batches": { + "description": "The number of scroll responses pulled back by the reindex.", + "type": "number" }, - "flush": { - "$ref": "#/components/schemas/_types.FlushStats" + "created": { + "description": "The number of documents that were successfully created.", + "type": "number" }, - "get": { - "$ref": "#/components/schemas/_types.GetStats" + "deleted": { + "description": "The number of documents that were successfully deleted.", + "type": "number" }, - "indexing": { - "$ref": "#/components/schemas/_types.IndexingStats" + "noops": { + "description": "The number of documents that were ignored because the script used for the reindex returned a `noop` value for `ctx.op`.", + "type": "number" }, - "indices": { - "$ref": "#/components/schemas/indices.stats.IndicesStats" + "requests_per_second": { + "description": "The number of requests per second effectively executed during the reindex.", + "type": "number" }, - "merges": { - "$ref": "#/components/schemas/_types.MergesStats" + "retries": { + "description": "The number of retries attempted by reindex. `bulk` is the number of bulk actions retried and `search` is the number of search actions retried.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Retries" + } + ] }, - "query_cache": { - "$ref": "#/components/schemas/_types.QueryCacheStats" + "throttled": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "recovery": { - "$ref": "#/components/schemas/_types.RecoveryStats" + "throttled_millis": { + "description": "Number of milliseconds the request slept to conform to `requests_per_second`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "refresh": { - "$ref": "#/components/schemas/_types.RefreshStats" + "throttled_until": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "request_cache": { - "$ref": "#/components/schemas/_types.RequestCacheStats" + "throttled_until_millis": { + "description": "This field should always be equal to zero in a `_reindex` response.\nIt only has meaning when using the Task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be executed again in order to conform to `requests_per_second`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "search": { - "$ref": "#/components/schemas/_types.SearchStats" + "total": { + "description": "The number of documents that were successfully processed.", + "type": "number" }, - "segments": { - "$ref": "#/components/schemas/_types.SegmentsStats" + "updated": { + "description": "The number of documents that were successfully updated, for example, a document with same ID already existed prior to reindex updating it.", + "type": "number" }, - "store": { - "$ref": "#/components/schemas/_types.StoreStats" + "version_conflicts": { + "description": "The number of version conflicts that reindex hits.", + "type": "number" }, - "translog": { - "$ref": "#/components/schemas/_types.TranslogStats" + "cancelled": { + "description": "The reason for cancellation if the slice was canceled", + "type": "string" + } + }, + "required": [ + "batches", + "deleted", + "noops", + "requests_per_second", + "retries", + "throttled_millis", + "throttled_until_millis", + "total", + "version_conflicts" + ] + }, + "_types.TaskId": { + "type": "string" + }, + "tasks._types.TaskListResponseBase": { + "type": "object", + "properties": { + "node_failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ErrorCause" + } }, - "warmer": { - "$ref": "#/components/schemas/_types.WarmerStats" + "task_failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.TaskFailure" + } }, - "bulk": { - "$ref": "#/components/schemas/_types.BulkStats" + "nodes": { + "description": "Task information grouped by node, if `group_by` was set to `node` (the default).", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/tasks._types.NodeTasks" + } }, - "shard_stats": { - "$ref": "#/components/schemas/indices.stats.ShardsTotalStats" + "tasks": { + "description": "Either a flat list of tasks if `group_by` was set to `none`, or grouped by parents if\n`group_by` was set to `parents`.", + "allOf": [ + { + "$ref": "#/components/schemas/tasks._types.TaskInfos" + } + ] } } }, - "_types.FlushStats": { + "_types.TaskFailure": { "type": "object", "properties": { - "periodic": { + "task_id": { "type": "number" }, - "total": { - "type": "number" + "node_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" + "status": { + "type": "string" }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "reason": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] } }, "required": [ - "periodic", - "total", - "total_time_in_millis" + "task_id", + "node_id", + "status", + "reason" ] }, - "_types.GetStats": { + "tasks._types.NodeTasks": { "type": "object", "properties": { - "current": { - "type": "number" - }, - "exists_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "exists_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "exists_total": { - "type": "number" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, - "missing_time": { - "$ref": "#/components/schemas/_types.Duration" + "transport_address": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] }, - "missing_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" + } + ] }, - "missing_total": { - "type": "number" + "ip": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ip" + } + ] }, - "time": { - "$ref": "#/components/schemas/_types.Duration" + "roles": { + "type": "array", + "items": { + "type": "string" + } }, - "time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "total": { - "type": "number" + "tasks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/tasks._types.TaskInfo" + } } }, "required": [ - "current", - "exists_time_in_millis", - "exists_total", - "missing_time_in_millis", - "missing_total", - "time_in_millis", - "total" + "tasks" ] }, - "_types.IndexingStats": { + "tasks._types.TaskInfo": { "type": "object", "properties": { - "index_current": { - "type": "number" - }, - "delete_current": { - "type": "number" + "action": { + "type": "string" }, - "delete_time": { - "$ref": "#/components/schemas/_types.Duration" + "cancelled": { + "type": "boolean" }, - "delete_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "cancellable": { + "type": "boolean" }, - "delete_total": { - "type": "number" + "description": { + "description": "Human readable text that identifies the particular request that the task is performing.\nFor example, it might identify the search request being performed by a search task.\nOther kinds of tasks have different descriptions, like `_reindex` which has the source and the destination, or `_bulk` which just has the number of requests and the destination indices.\nMany requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.", + "type": "string" }, - "is_throttled": { - "type": "boolean" + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "noop_update_total": { + "id": { "type": "number" }, - "throttle_time": { - "$ref": "#/components/schemas/_types.Duration" + "node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, - "throttle_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "running_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "index_time": { - "$ref": "#/components/schemas/_types.Duration" + "running_time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] }, - "index_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "start_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "index_total": { - "type": "number" + "status": { + "description": "The internal status of the task, which varies from task to task.\nThe format also varies.\nWhile the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes.\nFields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.", + "type": "object" }, - "index_failed": { - "type": "number" + "type": { + "type": "string" }, - "types": { + "parent_task_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TaskId" + } + ] + } + }, + "required": [ + "action", + "cancellable", + "headers", + "id", + "node", + "running_time_in_nanos", + "start_time_in_millis", + "type" + ] + }, + "tasks._types.TaskInfos": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/tasks._types.TaskInfo" + } + }, + { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/_types.IndexingStats" + "$ref": "#/components/schemas/tasks._types.ParentTaskInfo" } + } + ] + }, + "tasks._types.ParentTaskInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/tasks._types.TaskInfo" }, - "write_load": { - "type": "number" - }, - "recent_write_load": { - "type": "number" - }, - "peak_write_load": { - "type": "number" + { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tasks._types.TaskInfo" + } + } + } } - }, - "required": [ - "index_current", - "delete_current", - "delete_time_in_millis", - "delete_total", - "is_throttled", - "noop_update_total", - "throttle_time_in_millis", - "index_time_in_millis", - "index_total", - "index_failed" ] }, - "_types.MergesStats": { + "enrich.execute_policy.ExecuteEnrichPolicyStatus": { "type": "object", "properties": { - "current": { - "type": "number" - }, - "current_docs": { - "type": "number" - }, - "current_size": { - "type": "string" - }, - "current_size_in_bytes": { - "type": "number" - }, - "total": { - "type": "number" - }, - "total_auto_throttle": { - "type": "string" - }, - "total_auto_throttle_in_bytes": { - "type": "number" - }, - "total_docs": { - "type": "number" + "phase": { + "allOf": [ + { + "$ref": "#/components/schemas/enrich.execute_policy.EnrichPolicyPhase" + } + ] }, - "total_size": { + "step": { "type": "string" - }, - "total_size_in_bytes": { - "type": "number" - }, - "total_stopped_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_stopped_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total_throttled_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_throttled_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } }, "required": [ - "current", - "current_docs", - "current_size_in_bytes", - "total", - "total_auto_throttle_in_bytes", - "total_docs", - "total_size_in_bytes", - "total_stopped_time_in_millis", - "total_throttled_time_in_millis", - "total_time_in_millis" + "phase" ] }, - "_types.RecoveryStats": { + "enrich.execute_policy.EnrichPolicyPhase": { + "type": "string", + "enum": [ + "SCHEDULED", + "RUNNING", + "COMPLETE", + "FAILED", + "CANCELLED" + ] + }, + "enrich._types.Summary": { "type": "object", "properties": { - "current_as_source": { - "type": "number" - }, - "current_as_target": { - "type": "number" - }, - "throttle_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttle_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "config": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/enrich._types.Policy" + }, + "minProperties": 1, + "maxProperties": 1 } }, "required": [ - "current_as_source", - "current_as_target", - "throttle_time_in_millis" + "config" ] }, - "_types.RefreshStats": { + "enrich._types.Policy": { "type": "object", "properties": { - "external_total": { - "type": "number" + "enrich_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] }, - "external_total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "indices": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "listeners": { - "type": "number" + "match_field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "total": { - "type": "number" + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "elasticsearch_version": { + "type": "string" } }, "required": [ - "external_total", - "external_total_time_in_millis", - "listeners", - "total", - "total_time_in_millis" + "enrich_fields", + "indices", + "match_field" ] }, - "_types.RequestCacheStats": { + "enrich.stats.CoordinatorStats": { "type": "object", "properties": { - "evictions": { + "executed_searches_total": { "type": "number" }, - "hit_count": { - "type": "number" + "node_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "memory_size": { - "type": "string" + "queue_size": { + "type": "number" }, - "memory_size_in_bytes": { + "remote_requests_current": { "type": "number" }, - "miss_count": { + "remote_requests_total": { "type": "number" } }, "required": [ - "evictions", - "hit_count", - "memory_size_in_bytes", - "miss_count" + "executed_searches_total", + "node_id", + "queue_size", + "remote_requests_current", + "remote_requests_total" ] }, - "_types.SearchStats": { + "enrich.stats.ExecutingPolicy": { "type": "object", "properties": { - "fetch_current": { - "type": "number" - }, - "fetch_time": { - "$ref": "#/components/schemas/_types.Duration" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "fetch_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "task": { + "allOf": [ + { + "$ref": "#/components/schemas/tasks._types.TaskInfo" + } + ] + } + }, + "required": [ + "name", + "task" + ] + }, + "enrich.stats.CacheStats": { + "type": "object", + "properties": { + "node_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "fetch_total": { + "count": { "type": "number" }, - "open_contexts": { + "hits": { "type": "number" }, - "query_current": { - "type": "number" + "hits_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "query_time": { - "$ref": "#/components/schemas/_types.Duration" + "misses": { + "type": "number" }, - "query_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "misses_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "query_total": { + "evictions": { "type": "number" }, - "scroll_current": { + "size_in_bytes": { "type": "number" + } + }, + "required": [ + "node_id", + "count", + "hits", + "hits_time_in_millis", + "misses", + "misses_time_in_millis", + "evictions", + "size_in_bytes" + ] + }, + "eql._types.EqlSearchResponseBase": { + "type": "object", + "properties": { + "id": { + "description": "Identifier for the search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "scroll_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "scroll_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "scroll_total": { - "type": "number" + "is_partial": { + "description": "If true, the response does not contain complete search results.", + "type": "boolean" }, - "suggest_current": { - "type": "number" + "is_running": { + "description": "If true, the search request is still executing.", + "type": "boolean" }, - "suggest_time": { - "$ref": "#/components/schemas/_types.Duration" + "took": { + "description": "Milliseconds it took Elasticsearch to execute the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "suggest_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "timed_out": { + "description": "If true, the request timed out before completion.", + "type": "boolean" }, - "suggest_total": { - "type": "number" + "hits": { + "description": "Contains matching events and sequences. Also contains related metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/eql._types.EqlHits" + } + ] }, - "groups": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.SearchStats" + "shard_failures": { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ShardFailure" } } }, "required": [ - "fetch_current", - "fetch_time_in_millis", - "fetch_total", - "query_current", - "query_time_in_millis", - "query_total", - "scroll_current", - "scroll_time_in_millis", - "scroll_total", - "suggest_current", - "suggest_time_in_millis", - "suggest_total" + "hits" ] }, - "_types.TranslogStats": { + "eql._types.EqlHits": { "type": "object", "properties": { - "earliest_last_modified_age": { - "type": "number" + "total": { + "description": "Metadata about the number of matching events or sequences.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.TotalHits" + } + ] }, - "operations": { - "type": "number" + "events": { + "description": "Contains events matching the query. Each object represents a matching event.", + "type": "array", + "items": { + "$ref": "#/components/schemas/eql._types.HitsEvent" + } }, - "size": { - "type": "string" + "sequences": { + "description": "Contains event sequences matching the query. Each object represents a matching sequence. This parameter is only returned for EQL queries containing a sequence.", + "type": "array", + "items": { + "$ref": "#/components/schemas/eql._types.HitsSequence" + } + } + } + }, + "eql._types.HitsEvent": { + "type": "object", + "properties": { + "_index": { + "description": "Name of the index containing the event.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "size_in_bytes": { - "type": "number" + "_id": { + "description": "Unique identifier for the event. This ID is only unique within the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "uncommitted_operations": { - "type": "number" + "_source": { + "description": "Original JSON body passed for the event at index time.", + "type": "object" }, - "uncommitted_size": { - "type": "string" + "missing": { + "description": "Set to `true` for events in a timespan-constrained sequence that do not meet a given condition.", + "type": "boolean" }, - "uncommitted_size_in_bytes": { - "type": "number" + "fields": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object" + } + } } }, "required": [ - "earliest_last_modified_age", - "operations", - "size_in_bytes", - "uncommitted_operations", - "uncommitted_size_in_bytes" + "_index", + "_id", + "_source" ] }, - "_types.WarmerStats": { + "eql._types.HitsSequence": { "type": "object", "properties": { - "current": { - "type": "number" - }, - "total": { - "type": "number" - }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" + "events": { + "description": "Contains events matching the query. Each object represents a matching event.", + "type": "array", + "items": { + "$ref": "#/components/schemas/eql._types.HitsEvent" + } }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "join_keys": { + "description": "Shared field values used to constrain matches in the sequence. These are defined using the by keyword in the EQL query syntax.", + "type": "array", + "items": { + "type": "object" + } } }, "required": [ - "current", - "total", - "total_time_in_millis" + "events" ] }, - "_types.BulkStats": { + "eql.search.ResultPosition": { + "type": "string", + "enum": [ + "tail", + "head" + ] + }, + "esql._types.EsqlFormat": { + "type": "string", + "enum": [ + "csv", + "json", + "tsv", + "txt", + "yaml", + "cbor", + "smile", + "arrow" + ] + }, + "esql._types.TableValuesContainer": { "type": "object", "properties": { - "total_operations": { - "type": "number" - }, - "total_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "total_size_in_bytes": { - "type": "number" - }, - "avg_time": { - "$ref": "#/components/schemas/_types.Duration" + "integer": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.TableValuesIntegerValue" + } }, - "avg_time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "keyword": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.TableValuesKeywordValue" + } }, - "avg_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "long": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.TableValuesLongValue" + } }, - "avg_size_in_bytes": { - "type": "number" + "double": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.TableValuesLongDouble" + } } }, - "required": [ - "total_operations", - "total_time_in_millis", - "total_size_in_bytes", - "avg_time_in_millis", - "avg_size_in_bytes" - ] + "minProperties": 1, + "maxProperties": 1 }, - "indices.stats.ShardsTotalStats": { - "type": "object", - "properties": { - "total_count": { + "esql._types.TableValuesIntegerValue": { + "oneOf": [ + { "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } } - }, - "required": [ - "total_count" ] }, - "indices.stats.ShardStats": { - "type": "object", - "properties": { - "commit": { - "$ref": "#/components/schemas/indices.stats.ShardCommit" - }, - "completion": { - "$ref": "#/components/schemas/_types.CompletionStats" - }, - "docs": { - "$ref": "#/components/schemas/_types.DocStats" - }, - "fielddata": { - "$ref": "#/components/schemas/_types.FielddataStats" - }, - "flush": { - "$ref": "#/components/schemas/_types.FlushStats" - }, - "get": { - "$ref": "#/components/schemas/_types.GetStats" - }, - "indexing": { - "$ref": "#/components/schemas/_types.IndexingStats" - }, - "mappings": { - "$ref": "#/components/schemas/indices.stats.MappingStats" - }, - "merges": { - "$ref": "#/components/schemas/_types.MergesStats" - }, - "shard_path": { - "$ref": "#/components/schemas/indices.stats.ShardPath" - }, - "query_cache": { - "$ref": "#/components/schemas/indices.stats.ShardQueryCache" - }, - "recovery": { - "$ref": "#/components/schemas/_types.RecoveryStats" - }, - "refresh": { - "$ref": "#/components/schemas/_types.RefreshStats" - }, - "request_cache": { - "$ref": "#/components/schemas/_types.RequestCacheStats" - }, - "retention_leases": { - "$ref": "#/components/schemas/indices.stats.ShardRetentionLeases" - }, - "routing": { - "$ref": "#/components/schemas/indices.stats.ShardRouting" - }, - "search": { - "$ref": "#/components/schemas/_types.SearchStats" - }, - "segments": { - "$ref": "#/components/schemas/_types.SegmentsStats" - }, - "seq_no": { - "$ref": "#/components/schemas/indices.stats.ShardSequenceNumber" - }, - "store": { - "$ref": "#/components/schemas/_types.StoreStats" - }, - "translog": { - "$ref": "#/components/schemas/_types.TranslogStats" - }, - "warmer": { - "$ref": "#/components/schemas/_types.WarmerStats" - }, - "bulk": { - "$ref": "#/components/schemas/_types.BulkStats" + "esql._types.TableValuesKeywordValue": { + "oneOf": [ + { + "type": "string" }, - "shards": { - "type": "object", - "additionalProperties": { - "type": "object" + { + "type": "array", + "items": { + "type": "string" } - }, - "shard_stats": { - "$ref": "#/components/schemas/indices.stats.ShardsTotalStats" - }, - "indices": { - "$ref": "#/components/schemas/indices.stats.IndicesStats" } - } + ] }, - "indices.stats.ShardCommit": { - "type": "object", - "properties": { - "generation": { + "esql._types.TableValuesLongValue": { + "oneOf": [ + { "type": "number" }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "num_docs": { + { + "type": "array", + "items": { + "type": "number" + } + } + ] + }, + "esql._types.TableValuesLongDouble": { + "oneOf": [ + { "type": "number" }, - "user_data": { - "type": "object", - "additionalProperties": { - "type": "string" + { + "type": "array", + "items": { + "type": "number" } } - }, - "required": [ - "generation", - "id", - "num_docs", - "user_data" ] }, - "indices.stats.MappingStats": { + "esql._types.AsyncEsqlResult": { + "allOf": [ + { + "$ref": "#/components/schemas/esql._types.EsqlResult" + }, + { + "type": "object", + "properties": { + "id": { + "description": "The ID of the async query, to be used in subsequent requests to check the status or retrieve results.\n\nAlso available in the `X-Elasticsearch-Async-Id` HTTP header.", + "type": "string" + }, + "is_running": { + "description": "Indicates whether the async query is still running or has completed.\n\nAlso available in the `X-Elasticsearch-Async-Is-Running` HTTP header.", + "type": "boolean" + } + }, + "required": [ + "is_running" + ] + } + ] + }, + "esql._types.EsqlResult": { "type": "object", "properties": { - "total_count": { - "type": "number" + "took": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "total_estimated_overhead": { - "$ref": "#/components/schemas/_types.ByteSize" + "is_partial": { + "type": "boolean" }, - "total_estimated_overhead_in_bytes": { - "type": "number" + "all_columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.EsqlColumnInfo" + } + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.EsqlColumnInfo" + } + }, + "values": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.FieldValue" + } + } + }, + "_clusters": { + "description": "Cross-cluster search information. Present if `include_ccs_metadata` was `true` in the request\nand a cross-cluster search was performed.", + "allOf": [ + { + "$ref": "#/components/schemas/esql._types.EsqlClusterInfo" + } + ] + }, + "profile": { + "description": "Profiling information. Present if `profile` was `true` in the request.\nThe contents of this field are currently unstable.", + "type": "object" } }, "required": [ - "total_count", - "total_estimated_overhead_in_bytes" + "columns", + "values" ] }, - "indices.stats.ShardPath": { + "esql._types.EsqlColumnInfo": { "type": "object", "properties": { - "data_path": { + "name": { "type": "string" }, - "is_custom_data_path": { - "type": "boolean" - }, - "state_path": { + "type": { "type": "string" } }, "required": [ - "data_path", - "is_custom_data_path", - "state_path" + "name", + "type" ] }, - "indices.stats.ShardQueryCache": { + "esql._types.EsqlClusterInfo": { "type": "object", "properties": { - "cache_count": { + "total": { "type": "number" }, - "cache_size": { + "successful": { "type": "number" }, - "evictions": { + "running": { "type": "number" }, - "hit_count": { + "skipped": { "type": "number" }, - "memory_size_in_bytes": { + "partial": { "type": "number" }, - "miss_count": { + "failed": { "type": "number" }, - "total_count": { - "type": "number" + "details": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql._types.EsqlClusterDetails" + } } }, "required": [ - "cache_count", - "cache_size", - "evictions", - "hit_count", - "memory_size_in_bytes", - "miss_count", - "total_count" + "total", + "successful", + "running", + "skipped", + "partial", + "failed", + "details" ] }, - "indices.stats.ShardRetentionLeases": { + "esql._types.EsqlClusterDetails": { "type": "object", "properties": { - "primary_term": { - "type": "number" + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/esql._types.EsqlClusterStatus" + } + ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "indices": { + "type": "string" }, - "leases": { + "took": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/esql._types.EsqlShardInfo" + } + ] + }, + "failures": { "type": "array", "items": { - "$ref": "#/components/schemas/indices.stats.ShardLease" + "$ref": "#/components/schemas/esql._types.EsqlShardFailure" } } }, "required": [ - "primary_term", - "version", - "leases" + "status", + "indices" ] }, - "indices.stats.ShardLease": { + "esql._types.EsqlClusterStatus": { + "type": "string", + "enum": [ + "running", + "successful", + "partial", + "skipped", + "failed" + ] + }, + "esql._types.EsqlShardInfo": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "total": { + "type": "number" }, - "retaining_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "successful": { + "type": "number" }, - "timestamp": { + "skipped": { "type": "number" }, - "source": { - "type": "string" + "failed": { + "type": "number" } }, "required": [ - "id", - "retaining_seq_no", - "timestamp", - "source" + "total" ] }, - "indices.stats.ShardRouting": { + "esql._types.EsqlShardFailure": { "type": "object", "properties": { - "node": { - "type": "string" - }, - "primary": { - "type": "boolean" + "shard": { + "type": "number" }, - "relocating_node": { + "index": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.IndexName" }, { "nullable": true, @@ -80921,18114 +143716,21240 @@ } ] }, - "state": { - "$ref": "#/components/schemas/indices.stats.ShardRoutingState" + "node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + }, + "reason": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] } }, "required": [ + "shard", + "index", + "reason" + ] + }, + "esql.list_queries.Body": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] + }, + "start_time_millis": { + "type": "number" + }, + "running_time_nanos": { + "type": "number" + }, + "query": { + "type": "string" + } + }, + "required": [ + "id", "node", - "primary", - "state" + "start_time_millis", + "running_time_nanos", + "query" ] }, - "indices.stats.ShardRoutingState": { - "type": "string", - "enum": [ - "UNASSIGNED", - "INITIALIZING", - "STARTED", - "RELOCATING" + "esql._types.ESQLParams": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.SingleOrMultiValue" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.NamedValue" + } + } + ] + }, + "esql._types.SingleOrMultiValue": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.FieldValue" + } + } ] }, - "indices.stats.ShardSequenceNumber": { + "esql._types.NamedValue": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql._types.SingleOrMultiValue" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.InlineGet": { "type": "object", "properties": { - "global_checkpoint": { - "type": "number" + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } }, - "local_checkpoint": { + "found": { + "type": "boolean" + }, + "_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_primary_term": { "type": "number" }, - "max_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "_routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "_source": { + "type": "object" } }, "required": [ - "global_checkpoint", - "local_checkpoint", - "max_seq_no" - ] - }, - "indices.stats.IndexMetadataState": { - "type": "string", - "enum": [ - "open", - "close" + "found" ] }, - "indices.update_aliases.Action": { + "features._types.Feature": { "type": "object", "properties": { - "add": { - "$ref": "#/components/schemas/indices.update_aliases.AddAction" - }, - "remove": { - "$ref": "#/components/schemas/indices.update_aliases.RemoveAction" + "name": { + "type": "string" }, - "remove_index": { - "$ref": "#/components/schemas/indices.update_aliases.RemoveIndexAction" + "description": { + "type": "string" } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "name", + "description" + ] }, - "indices.update_aliases.AddAction": { + "_global.field_caps.FieldCapability": { "type": "object", "properties": { - "alias": { - "$ref": "#/components/schemas/_types.IndexAlias" + "aggregatable": { + "description": "Whether this field can be aggregated on all indices.", + "type": "boolean" }, - "aliases": { - "description": "Aliases for the action.\nIndex alias names support date math.", - "oneOf": [ + "indices": { + "description": "The list of indices where this field has the same type family, or null if all indices have the same type family for the field.", + "allOf": [ { - "$ref": "#/components/schemas/_types.IndexAlias" - }, + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "meta": { + "description": "Merged metadata across all indices as a map of string keys to arrays of values. A value length of 1 indicates that all indices had the same value for this key, while a length of 2 or more indicates that not all indices had the same value for this key.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexAlias" - } + "$ref": "#/components/schemas/_types.Metadata" } ] }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "non_aggregatable_indices": { + "description": "The list of indices where this field is not aggregatable, or null if all indices have the same definition for the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "non_searchable_indices": { + "description": "The list of indices where this field is not searchable, or null if all indices have the same definition for the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "searchable": { + "description": "Whether this field is indexed for search on all indices.", + "type": "boolean" }, - "index_routing": { - "$ref": "#/components/schemas/_types.Routing" + "type": { + "type": "string" }, - "is_hidden": { - "description": "If `true`, the alias is hidden.", + "metadata_field": { + "description": "Whether this field is registered as a metadata field.", "type": "boolean" }, - "is_write_index": { - "description": "If `true`, sets the write index or data stream for the alias.", + "time_series_dimension": { + "description": "Whether this field is used as a time series dimension.", + "x-state": "Technical preview; Added in 8.0.0", "type": "boolean" }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" + "time_series_metric": { + "description": "Contains metric type if this fields is used as a time series\nmetrics, absent if the field is not used as metric.", + "x-state": "Technical preview; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType" + } + ] }, - "search_routing": { - "$ref": "#/components/schemas/_types.Routing" + "non_dimension_indices": { + "description": "If this list is present in response then some indices have the\nfield marked as a dimension and other indices, the ones in this list, do not.", + "x-state": "Technical preview; Added in 8.0.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } }, - "must_exist": { - "description": "If `true`, the alias must exist to perform the action.", - "type": "boolean" + "metric_conflicts_indices": { + "description": "The list of indices where this field is present if these indices\ndon’t have the same `time_series_metric` value for this field.", + "x-state": "Technical preview; Added in 8.0.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } } - } + }, + "required": [ + "aggregatable", + "searchable", + "type" + ] }, - "indices.update_aliases.RemoveAction": { + "_types.IndexAlias": { + "type": "string" + }, + "fleet._types.Checkpoint": { + "type": "number" + }, + "_global.msearch.RequestItem": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.msearch.MultisearchHeader" + }, + { + "$ref": "#/components/schemas/_global.search._types.SearchRequestBody" + } + ] + }, + "_global.msearch.MultisearchHeader": { + "description": "Contains parameters used to limit or change the subsequent search body request.", "type": "object", "properties": { - "alias": { - "$ref": "#/components/schemas/_types.IndexAlias" + "allow_no_indices": { + "type": "boolean" }, - "aliases": { - "description": "Aliases for the action.\nIndex alias names support date math.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.IndexAlias" - }, + "expand_wildcards": { + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexAlias" - } + "$ref": "#/components/schemas/_types.ExpandWildcards" } ] }, + "ignore_unavailable": { + "type": "boolean" + }, "index": { - "$ref": "#/components/schemas/_types.IndexName" + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "preference": { + "type": "string" }, - "must_exist": { - "description": "If `true`, the alias must exist to perform the action.", + "project_routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ProjectRouting" + } + ] + }, + "request_cache": { "type": "boolean" - } - } - }, - "indices.update_aliases.RemoveIndexAction": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] }, - "must_exist": { - "description": "If `true`, the alias must exist to perform the action.", + "search_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SearchType" + } + ] + }, + "ccs_minimize_roundtrips": { + "type": "boolean" + }, + "allow_partial_search_results": { + "type": "boolean" + }, + "ignore_throttled": { "type": "boolean" } } }, - "indices.validate_query.IndicesValidationExplanation": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "explanation": { - "type": "string" + "_types.ProjectRouting": { + "type": "string" + }, + "_global.msearch.ResponseItem": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.msearch.MultiSearchItem" }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + { + "$ref": "#/components/schemas/_types.ErrorResponseBase" + } + ] + }, + "_global.msearch.MultiSearchItem": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search.ResponseBody" }, - "valid": { - "type": "boolean" + { + "type": "object", + "properties": { + "status": { + "type": "number" + } + } } - }, - "required": [ - "index", - "valid" ] }, - "inference._types.RequestChatCompletion": { + "_global.search.ResponseBody": { "type": "object", "properties": { - "messages": { - "description": "A list of objects representing the conversation.\nRequests should generally only add new messages from the user (role `user`).\nThe other message roles (`assistant`, `system`, or `tool`) should generally only be copied from the response to a previous completion request, such that the messages array is built up throughout a conversation.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.Message" - } + "took": { + "description": "The number of milliseconds it took Elasticsearch to run the request.\nThis value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response.\nIt includes:\n\n* Communication time between the coordinating node and data nodes\n* Time the request spends in the search thread pool, queued for execution\n* Actual run time\n\nIt does not include:\n\n* Time needed to send the request to Elasticsearch\n* Time needed to serialize the JSON response\n* Time needed to send the response to a client", + "type": "number" }, - "model": { - "description": "The ID of the model to use.", - "type": "string" + "timed_out": { + "description": "If `true`, the request timed out before completion; returned results may be partial or empty.", + "type": "boolean" }, - "max_completion_tokens": { - "description": "The upper bound limit for the number of tokens that can be generated for a completion request.", - "type": "number" + "_shards": { + "description": "A count of shards used for the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] }, - "stop": { - "description": "A sequence of strings to control when the model should stop generating additional tokens.", - "type": "array", - "items": { - "type": "string" + "hits": { + "description": "The returned documents and metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.HitsMetadata" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.Aggregate" } }, - "temperature": { - "description": "The sampling temperature to use.", + "_clusters": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ClusterStatistics" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "max_score": { "type": "number" }, - "tool_choice": { - "$ref": "#/components/schemas/inference._types.CompletionToolType" + "num_reduce_phases": { + "type": "number" }, - "tools": { - "description": "A list of tools that the model can call.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.CompletionTool" + "profile": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Profile" + } + ] + }, + "pit_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_scroll_id": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results" + }, + "description": "The identifier for the search and its search context.\nYou can use this scroll ID with the scroll API to retrieve the next batch of search results for the request.\nThis property is returned only if the `scroll` query parameter is specified in the request.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScrollId" + } + ] + }, + "suggest": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Suggest" + } } }, - "top_p": { - "description": "Nucleus sampling, an alternative to sampling with temperature.", - "type": "number" + "terminated_early": { + "type": "boolean" } }, "required": [ - "messages" + "took", + "timed_out", + "_shards", + "hits" ] }, - "inference._types.Message": { + "_types.ErrorResponseBase": { + "description": "The response returned by Elasticsearch when request execution did not succeed.", "type": "object", "properties": { - "content": { - "$ref": "#/components/schemas/inference._types.MessageContent" - }, - "role": { - "description": "The role of the message author.", - "type": "string" - }, - "tool_call_id": { - "$ref": "#/components/schemas/_types.Id" + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] }, - "tool_calls": { - "description": "The tool calls generated by the model.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.ToolCall" - } + "status": { + "type": "number" } }, "required": [ - "role" + "error", + "status" ] }, - "inference._types.MessageContent": { - "oneOf": [ - { - "type": "string" + "_global.get.GetResult": { + "type": "object", + "properties": { + "_index": { + "description": "The name of the index the document belongs to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - { + "fields": { + "description": "If the `stored_fields` parameter is set to `true` and `found` is `true`, it contains the document fields stored in the index.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "_ignored": { "type": "array", "items": { - "$ref": "#/components/schemas/inference._types.ContentObject" + "type": "string" } - } - ] - }, - "inference._types.ContentObject": { - "type": "object", - "properties": { - "text": { - "description": "The text content.", - "type": "string" }, - "type": { - "description": "The type of content.", + "found": { + "description": "Indicates whether the document exists.", + "type": "boolean" + }, + "_id": { + "description": "The unique identifier for the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_primary_term": { + "description": "The primary term assigned to the document for the indexing operation.", + "type": "number" + }, + "_routing": { + "description": "The explicit routing, if set.", "type": "string" + }, + "_seq_no": { + "description": "The sequence number assigned to the document for the indexing operation.\nSequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + }, + "_source": { + "description": "If `found` is `true`, it contains the document data formatted in JSON.\nIf the `_source` parameter is set to `false` or the `stored_fields` parameter is set to `true`, it is excluded.", + "type": "object" + }, + "_version": { + "description": "The document version, which is ncremented each time the document is updated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] } }, "required": [ - "text", - "type" + "_index", + "found", + "_id" ] }, - "inference._types.ToolCall": { + "_types.StoredScript": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "lang": { + "description": "The language the script is written in.\nFor search templates, use `mustache`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptLanguage" + } + ] }, - "function": { - "$ref": "#/components/schemas/inference._types.ToolCallFunction" + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "type": { - "description": "The type of the tool call.", - "type": "string" + "source": { + "description": "The script source.\nFor search templates, an object containing the search template.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] } }, "required": [ - "id", - "function", - "type" + "lang", + "source" ] }, - "inference._types.ToolCallFunction": { + "_global.get_script_context.Context": { "type": "object", "properties": { - "arguments": { - "description": "The arguments to call the function with in JSON format.", - "type": "string" + "methods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.get_script_context.ContextMethod" + } }, "name": { - "description": "The name of the function to call.", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] } }, "required": [ - "arguments", + "methods", "name" ] }, - "inference._types.CompletionToolType": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/inference._types.CompletionToolChoice" - } - ] - }, - "inference._types.CompletionToolChoice": { + "_global.get_script_context.ContextMethod": { "type": "object", "properties": { - "type": { - "description": "The type of the tool.", + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "return_type": { "type": "string" }, - "function": { - "$ref": "#/components/schemas/inference._types.CompletionToolChoiceFunction" + "params": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.get_script_context.ContextMethodParam" + } } }, "required": [ - "type", - "function" + "name", + "return_type", + "params" ] }, - "inference._types.CompletionToolChoiceFunction": { + "_global.get_script_context.ContextMethodParam": { "type": "object", "properties": { "name": { - "description": "The name of the function to call.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "type": { "type": "string" } }, "required": [ - "name" + "name", + "type" ] }, - "inference._types.CompletionTool": { + "_global.get_script_languages.LanguageContext": { "type": "object", "properties": { - "type": { - "description": "The type of tool.", - "type": "string" + "contexts": { + "type": "array", + "items": { + "type": "string" + } }, - "function": { - "$ref": "#/components/schemas/inference._types.CompletionToolFunction" + "language": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptLanguage" + } + ] } }, "required": [ - "type", - "function" + "contexts", + "language" ] }, - "inference._types.CompletionToolFunction": { + "graph._types.Hop": { "type": "object", "properties": { - "description": { - "description": "A description of what the function does.\nThis is used by the model to choose when and how to call the function.", - "type": "string" - }, - "name": { - "description": "The name of the function.", - "type": "string" + "connections": { + "description": "Specifies one or more fields from which you want to extract terms that are associated with the specified vertices.", + "allOf": [ + { + "$ref": "#/components/schemas/graph._types.Hop" + } + ] }, - "parameters": { - "description": "The parameters the functional accepts. This should be formatted as a JSON object.", - "type": "object" + "query": { + "description": "An optional guiding query that constrains the Graph API as it explores connected terms.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "strict": { - "description": "Whether to enable schema adherence when generating the function call.", - "type": "boolean" + "vertices": { + "description": "Contains the fields you are interested in.", + "type": "array", + "items": { + "$ref": "#/components/schemas/graph._types.VertexDefinition" + } } }, "required": [ - "name" + "vertices" ] }, - "_types.StreamResult": { - "type": "object" - }, - "inference._types.TaskSettings": { - "type": "object" - }, - "inference._types.CompletionInferenceResult": { + "graph._types.VertexDefinition": { "type": "object", "properties": { - "completion": { + "exclude": { + "description": "Prevents the specified terms from being included in the results.", "type": "array", "items": { - "$ref": "#/components/schemas/inference._types.CompletionResult" + "type": "string" + } + }, + "field": { + "description": "Identifies a field in the documents of interest.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "include": { + "description": "Identifies the terms of interest that form the starting points from which you want to spider out.", + "type": "array", + "items": { + "$ref": "#/components/schemas/graph._types.VertexInclude" } + }, + "min_doc_count": { + "description": "Specifies how many documents must contain a pair of terms before it is considered to be a useful connection.\nThis setting acts as a certainty threshold.", + "default": 3.0, + "type": "number" + }, + "shard_min_doc_count": { + "description": "Controls how many documents on a particular shard have to contain a pair of terms before the connection is returned for global consideration.", + "default": 2.0, + "type": "number" + }, + "size": { + "description": "Specifies the maximum number of vertex terms returned for each field.", + "default": 5.0, + "type": "number" } }, "required": [ - "completion" + "field" ] }, - "inference._types.CompletionResult": { + "graph._types.VertexInclude": { "type": "object", "properties": { - "result": { + "boost": { + "type": "number" + }, + "term": { "type": "string" } }, "required": [ - "result" - ] - }, - "inference._types.TaskType": { - "type": "string", - "enum": [ - "sparse_embedding", - "text_embedding", - "rerank", - "completion", - "chat_completion" + "term" ] }, - "inference._types.DeleteInferenceEndpointResult": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - { - "type": "object", - "properties": { - "pipelines": { - "type": "array", - "items": { - "type": "string" - } + "graph._types.ExploreControls": { + "type": "object", + "properties": { + "sample_diversity": { + "description": "To avoid the top-matching documents sample being dominated by a single source of results, it is sometimes necessary to request diversity in the sample.\nYou can do this by selecting a single-value field and setting a maximum number of documents per value for that field.", + "allOf": [ + { + "$ref": "#/components/schemas/graph._types.SampleDiversity" } - }, - "required": [ - "pipelines" ] - } - ] - }, - "inference._types.InferenceEndpointInfo": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskType" + "sample_size": { + "description": "Each hop considers a sample of the best-matching documents on each shard.\nUsing samples improves the speed of execution and keeps exploration focused on meaningfully-connected terms.\nVery small values (less than 50) might not provide sufficient weight-of-evidence to identify significant connections between terms.\nVery large sample sizes can dilute the quality of the results and increase execution times.", + "default": 100.0, + "type": "number" + }, + "timeout": { + "description": "The length of time in milliseconds after which exploration will be halted and the results gathered so far are returned.\nThis timeout is honored on a best-effort basis.\nExecution might overrun this timeout if, for example, a long pause is encountered while FieldData is loaded for a field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "inference_id", - "task_type" ] + }, + "use_significance": { + "description": "Filters associated terms so only those that are significantly associated with your query are included.", + "type": "boolean" } + }, + "required": [ + "use_significance" ] }, - "inference._types.InferenceEndpoint": { + "graph._types.SampleDiversity": { "type": "object", "properties": { - "chunking_settings": { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - }, - "service": { - "description": "The service type", - "type": "string" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types.ServiceSettings" + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.TaskSettings" + "max_docs_per_value": { + "type": "number" } }, "required": [ - "service", - "service_settings" + "field", + "max_docs_per_value" ] }, - "inference._types.InferenceChunkingSettings": { + "graph._types.Connection": { "type": "object", "properties": { - "max_chunk_size": { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "doc_count": { "type": "number" }, - "overlap": { - "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "source": { "type": "number" }, - "sentence_overlap": { - "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "target": { "type": "number" }, - "strategy": { - "description": "The chunking strategy: `sentence` or `word`.", - "type": "string" + "weight": { + "type": "number" } - } - }, - "inference._types.ServiceSettings": { - "type": "object" + }, + "required": [ + "doc_count", + "source", + "target", + "weight" + ] }, - "inference._types.InferenceResult": { - "description": "InferenceResult is an aggregation of mutually exclusive variants", + "graph._types.Vertex": { "type": "object", "properties": { - "text_embedding_bytes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.TextEmbeddingByteResult" - } - }, - "text_embedding_bits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.TextEmbeddingByteResult" - } - }, - "text_embedding": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.TextEmbeddingResult" - } + "depth": { + "type": "number" }, - "sparse_embedding": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.SparseEmbeddingResult" - } + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "completion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.CompletionResult" - } + "term": { + "type": "string" }, - "rerank": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.RankedDocument" - } + "weight": { + "type": "number" } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "depth", + "field", + "term", + "weight" + ] }, - "inference._types.TextEmbeddingByteResult": { + "_global.health_report.Indicators": { "type": "object", "properties": { - "embedding": { - "$ref": "#/components/schemas/inference._types.DenseByteVector" + "master_is_stable": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.MasterIsStableIndicator" + } + ] + }, + "shards_availability": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.ShardsAvailabilityIndicator" + } + ] + }, + "disk": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.DiskIndicator" + } + ] + }, + "repository_integrity": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.RepositoryIntegrityIndicator" + } + ] + }, + "data_stream_lifecycle": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.DataStreamLifecycleIndicator" + } + ] + }, + "ilm": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.IlmIndicator" + } + ] + }, + "slm": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.SlmIndicator" + } + ] + }, + "shards_capacity": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.ShardsCapacityIndicator" + } + ] + }, + "file_settings": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.FileSettingsIndicator" + } + ] } - }, - "required": [ - "embedding" - ] - }, - "inference._types.DenseByteVector": { - "description": "Text Embedding results containing bytes are represented as Dense\nVectors of bytes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.byte" } }, - "inference._types.TextEmbeddingResult": { - "type": "object", - "properties": { - "embedding": { - "$ref": "#/components/schemas/inference._types.DenseVector" + "_global.health_report.MasterIsStableIndicator": { + "description": "MASTER_IS_STABLE", + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" + }, + { + "type": "object", + "properties": { + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.MasterIsStableIndicatorDetails" + } + ] + } + } } - }, - "required": [ - "embedding" ] }, - "inference._types.DenseVector": { - "description": "Text Embedding results are represented as Dense Vectors\nof floats.", - "type": "array", - "items": { - "type": "number" - } - }, - "inference._types.SparseEmbeddingResult": { + "_global.health_report.MasterIsStableIndicatorDetails": { "type": "object", "properties": { - "embedding": { - "$ref": "#/components/schemas/inference._types.SparseVector" + "current_master": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.IndicatorNode" + } + ] + }, + "recent_masters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.health_report.IndicatorNode" + } + }, + "exception_fetching_history": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.MasterIsStableIndicatorExceptionFetchingHistory" + } + ] + }, + "cluster_formation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.health_report.MasterIsStableIndicatorClusterFormationNode" + } } }, "required": [ - "embedding" + "current_master", + "recent_masters" ] }, - "inference._types.SparseVector": { - "description": "Sparse Embedding tokens are represented as a dictionary\nof string to double.", - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "inference._types.RankedDocument": { + "_global.health_report.IndicatorNode": { "type": "object", "properties": { - "index": { - "type": "number" - }, - "relevance_score": { - "type": "number" + "name": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, - "text": { - "type": "string" + "node_id": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] } }, "required": [ - "index", - "relevance_score" - ] - }, - "inference._types.AlibabaCloudTaskType": { - "type": "string", - "enum": [ - "completion", - "rerank", - "space_embedding", - "text_embedding" - ] - }, - "inference._types.AlibabaCloudServiceType": { - "type": "string", - "enum": [ - "alibabacloud-ai-search" + "name", + "node_id" ] }, - "inference._types.AlibabaCloudServiceSettings": { + "_global.health_report.MasterIsStableIndicatorExceptionFetchingHistory": { "type": "object", "properties": { - "api_key": { - "description": "A valid API key for the AlibabaCloud AI Search API.", - "type": "string" - }, - "host": { - "externalDocs": { - "url": "https://opensearch.console.aliyun.com/cn-shanghai/rag/api-key" - }, - "description": "The name of the host address used for the inference task.\nYou can find the host address in the API keys section of the documentation.", - "type": "string" - }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" - }, - "service_id": { - "description": "The name of the model service to use for the inference task.\nThe following service IDs are available for the `completion` task:\n\n* `ops-qwen-turbo`\n* `qwen-turbo`\n* `qwen-plus`\n* `qwen-max ÷ qwen-max-longcontext`\n\nThe following service ID is available for the `rerank` task:\n\n* `ops-bge-reranker-larger`\n\nThe following service ID is available for the `sparse_embedding` task:\n\n* `ops-text-sparse-embedding-001`\n\nThe following service IDs are available for the `text_embedding` task:\n\n`ops-text-embedding-001`\n`ops-text-embedding-zh-001`\n`ops-text-embedding-en-001`\n`ops-text-embedding-002`", + "message": { "type": "string" - }, - "workspace": { - "description": "The name of the workspace used for the inference task.", + }, + "stack_trace": { "type": "string" } }, "required": [ - "api_key", - "host", - "service_id", - "workspace" + "message", + "stack_trace" ] }, - "inference._types.RateLimitSetting": { + "_global.health_report.MasterIsStableIndicatorClusterFormationNode": { "type": "object", "properties": { - "requests_per_minute": { - "description": "The number of requests allowed per minute.", - "type": "number" + "name": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "cluster_formation_message": { + "type": "string" } - } + }, + "required": [ + "node_id", + "cluster_formation_message" + ] }, - "inference._types.AlibabaCloudTaskSettings": { + "_global.health_report.BaseIndicator": { "type": "object", "properties": { - "input_type": { - "description": "For a `sparse_embedding` or `text_embedding` task, specify the type of input passed to the model.\nValid values are:\n\n* `ingest` for storing document embeddings in a vector database.\n* `search` for storing embeddings of search queries run against a vector database to find relevant documents.", + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.IndicatorHealthStatus" + } + ] + }, + "symptom": { "type": "string" }, - "return_token": { - "description": "For a `sparse_embedding` task, it affects whether the token name will be returned in the response.\nIt defaults to `false`, which means only the token ID will be returned in the response.", - "type": "boolean" - } - } - }, - "inference._types.InferenceEndpointInfoAlibabaCloudAI": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "impacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.health_report.Impact" + } }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeAlibabaCloudAI" - } - }, - "required": [ - "inference_id", - "task_type" - ] + "diagnosis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.health_report.Diagnosis" + } } + }, + "required": [ + "status", + "symptom" ] }, - "inference._types.TaskTypeAlibabaCloudAI": { + "_global.health_report.IndicatorHealthStatus": { "type": "string", "enum": [ - "text_embedding", - "rerank", - "completion", - "sparse_embedding" + "green", + "yellow", + "red", + "unknown", + "unavailable" ] }, - "inference._types.AmazonBedrockTaskType": { - "type": "string", - "enum": [ - "completion", - "text_embedding" + "_global.health_report.Impact": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "impact_areas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.health_report.ImpactArea" + } + }, + "severity": { + "type": "number" + } + }, + "required": [ + "description", + "id", + "impact_areas", + "severity" ] }, - "inference._types.AmazonBedrockServiceType": { + "_global.health_report.ImpactArea": { "type": "string", "enum": [ - "amazonbedrock" + "search", + "ingest", + "backup", + "deployment_management" ] }, - "inference._types.AmazonBedrockServiceSettings": { + "_global.health_report.Diagnosis": { "type": "object", "properties": { - "access_key": { - "description": "A valid AWS access key that has permissions to use Amazon Bedrock and access to models for inference requests.", + "id": { "type": "string" }, - "model": { - "externalDocs": { - "url": "https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html" - }, - "description": "The base model ID or an ARN to a custom model based on a foundational model.\nThe base model IDs can be found in the Amazon Bedrock documentation.\nNote that the model ID must be available for the provider chosen and your IAM user must have access to the model.", + "action": { "type": "string" }, - "provider": { - "description": "The model provider for your deployment.\nNote that some providers may support only certain task types.\nSupported providers include:\n\n* `amazontitan` - available for `text_embedding` and `completion` task types\n* `anthropic` - available for `completion` task type only\n* `ai21labs` - available for `completion` task type only\n* `cohere` - available for `text_embedding` and `completion` task types\n* `meta` - available for `completion` task type only\n* `mistral` - available for `completion` task type only", - "type": "string" + "affected_resources": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.DiagnosisAffectedResources" + } + ] }, - "region": { - "externalDocs": { - "url": "https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html" - }, - "description": "The region that your model or ARN is deployed in.\nThe list of available regions per model can be found in the Amazon Bedrock documentation.", + "cause": { "type": "string" }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" - }, - "secret_key": { - "externalDocs": { - "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html" - }, - "description": "A valid AWS secret key that is paired with the `access_key`.\nFor informationg about creating and managing access and secret keys, refer to the AWS documentation.", + "help_url": { "type": "string" } }, "required": [ - "access_key", - "model", - "region", - "secret_key" + "id", + "action", + "affected_resources", + "cause", + "help_url" ] }, - "inference._types.AmazonBedrockTaskSettings": { + "_global.health_report.DiagnosisAffectedResources": { "type": "object", "properties": { - "max_new_tokens": { - "description": "For a `completion` task, it sets the maximum number for the output tokens to be generated.", - "type": "number" + "indices": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "temperature": { - "description": "For a `completion` task, it is a number between 0.0 and 1.0 that controls the apparent creativity of the results.\nAt temperature 0.0 the model is most deterministic, at temperature 1.0 most random.\nIt should not be used if `top_p` or `top_k` is specified.", - "type": "number" + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.health_report.IndicatorNode" + } }, - "top_k": { - "description": "For a `completion` task, it limits samples to the top-K most likely words, balancing coherence and variability.\nIt is only available for anthropic, cohere, and mistral providers.\nIt is an alternative to `temperature`; it should not be used if `temperature` is specified.", - "type": "number" + "slm_policies": { + "type": "array", + "items": { + "type": "string" + } }, - "top_p": { - "description": "For a `completion` task, it is a number in the range of 0.0 to 1.0, to eliminate low-probability tokens.\nTop-p uses nucleus sampling to select top tokens whose sum of likelihoods does not exceed a certain value, ensuring both variety and coherence.\nIt is an alternative to `temperature`; it should not be used if `temperature` is specified.", - "type": "number" + "feature_states": { + "type": "array", + "items": { + "type": "string" + } + }, + "snapshot_repositories": { + "type": "array", + "items": { + "type": "string" + } } } }, - "inference._types.InferenceEndpointInfoAmazonBedrock": { + "_global.health_report.ShardsAvailabilityIndicator": { + "description": "SHARDS_AVAILABILITY", "allOf": [ { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, { "type": "object", "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeAmazonBedrock" + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.ShardsAvailabilityIndicatorDetails" + } + ] } - }, - "required": [ - "inference_id", - "task_type" - ] + } } ] }, - "inference._types.TaskTypeAmazonBedrock": { - "type": "string", - "enum": [ - "text_embedding", - "completion" - ] - }, - "inference._types.AnthropicTaskType": { - "type": "string", - "enum": [ - "completion" - ] - }, - "inference._types.AnthropicServiceType": { - "type": "string", - "enum": [ - "anthropic" - ] - }, - "inference._types.AnthropicServiceSettings": { + "_global.health_report.ShardsAvailabilityIndicatorDetails": { "type": "object", "properties": { - "api_key": { - "description": "A valid API key for the Anthropic API.", - "type": "string" + "creating_primaries": { + "type": "number" }, - "model_id": { - "description": "The name of the model to use for the inference task.\nRefer to the Anthropic documentation for the list of supported models.", - "type": "string" + "creating_replicas": { + "type": "number" }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" - } - }, - "required": [ - "api_key", - "model_id" - ] - }, - "inference._types.AnthropicTaskSettings": { - "type": "object", - "properties": { - "max_tokens": { - "description": "For a `completion` task, it is the maximum number of tokens to generate before stopping.", + "initializing_primaries": { "type": "number" }, - "temperature": { - "externalDocs": { - "url": "https://docs.anthropic.com/en/api/messages" - }, - "description": "For a `completion` task, it is the amount of randomness injected into the response.\nFor more details about the supported range, refer to Anthropic documentation.", + "initializing_replicas": { "type": "number" }, - "top_k": { - "description": "For a `completion` task, it specifies to only sample from the top K options for each subsequent token.\nIt is recommended for advanced use cases only.\nYou usually only need to use `temperature`.", + "restarting_primaries": { "type": "number" }, - "top_p": { - "description": "For a `completion` task, it specifies to use Anthropic's nucleus sampling.\nIn nucleus sampling, Anthropic computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches the specified probability.\nYou should either alter `temperature` or `top_p`, but not both.\nIt is recommended for advanced use cases only.\nYou usually only need to use `temperature`.", + "restarting_replicas": { + "type": "number" + }, + "started_primaries": { + "type": "number" + }, + "started_replicas": { + "type": "number" + }, + "unassigned_primaries": { + "type": "number" + }, + "unassigned_replicas": { "type": "number" } }, "required": [ - "max_tokens" + "creating_primaries", + "creating_replicas", + "initializing_primaries", + "initializing_replicas", + "restarting_primaries", + "restarting_replicas", + "started_primaries", + "started_replicas", + "unassigned_primaries", + "unassigned_replicas" ] }, - "inference._types.InferenceEndpointInfoAnthropic": { + "_global.health_report.DiskIndicator": { + "description": "DISK", "allOf": [ { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, { "type": "object", "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeAnthropic" + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.DiskIndicatorDetails" + } + ] } - }, - "required": [ - "inference_id", - "task_type" - ] + } } ] }, - "inference._types.TaskTypeAnthropic": { - "type": "string", - "enum": [ - "completion" - ] - }, - "inference._types.AzureAiStudioTaskType": { - "type": "string", - "enum": [ - "completion", - "text_embedding" - ] - }, - "inference._types.AzureAiStudioServiceType": { - "type": "string", - "enum": [ - "azureaistudio" - ] - }, - "inference._types.AzureAiStudioServiceSettings": { + "_global.health_report.DiskIndicatorDetails": { "type": "object", "properties": { - "api_key": { - "externalDocs": { - "url": "https://ai.azure.com/" - }, - "description": "A valid API key of your Azure AI Studio model deployment.\nThis key can be found on the overview page for your deployment in the management section of your Azure AI Studio account.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", - "type": "string" + "indices_with_readonly_block": { + "type": "number" }, - "endpoint_type": { - "externalDocs": { - "url": "https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/deployments-overview#billing-for-deploying-and-inferencing-llms-in-azure-ai-studio" - }, - "description": "The type of endpoint that is available for deployment through Azure AI Studio: `token` or `realtime`.\nThe `token` endpoint type is for \"pay as you go\" endpoints that are billed per token.\nThe `realtime` endpoint type is for \"real-time\" endpoints that are billed per hour of usage.", - "type": "string" + "nodes_with_enough_disk_space": { + "type": "number" }, - "target": { - "description": "The target URL of your Azure AI Studio model deployment.\nThis can be found on the overview page for your deployment in the management section of your Azure AI Studio account.", - "type": "string" + "nodes_over_high_watermark": { + "type": "number" }, - "provider": { - "description": "The model provider for your deployment.\nNote that some providers may support only certain task types.\nSupported providers include:\n\n* `cohere` - available for `text_embedding` and `completion` task types\n* `databricks` - available for `completion` task type only\n* `meta` - available for `completion` task type only\n* `microsoft_phi` - available for `completion` task type only\n* `mistral` - available for `completion` task type only\n* `openai` - available for `text_embedding` and `completion` task types", - "type": "string" + "nodes_over_flood_stage_watermark": { + "type": "number" }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" + "nodes_with_unknown_disk_status": { + "type": "number" } }, "required": [ - "api_key", - "endpoint_type", - "target", - "provider" + "indices_with_readonly_block", + "nodes_with_enough_disk_space", + "nodes_over_high_watermark", + "nodes_over_flood_stage_watermark", + "nodes_with_unknown_disk_status" ] }, - "inference._types.AzureAiStudioTaskSettings": { + "_global.health_report.RepositoryIntegrityIndicator": { + "description": "REPOSITORY_INTEGRITY", + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" + }, + { + "type": "object", + "properties": { + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.RepositoryIntegrityIndicatorDetails" + } + ] + } + } + } + ] + }, + "_global.health_report.RepositoryIntegrityIndicatorDetails": { "type": "object", "properties": { - "do_sample": { - "description": "For a `completion` task, instruct the inference process to perform sampling.\nIt has no effect unless `temperature` or `top_p` is specified.", - "type": "number" - }, - "max_new_tokens": { - "description": "For a `completion` task, provide a hint for the maximum number of output tokens to be generated.", - "type": "number" - }, - "temperature": { - "description": "For a `completion` task, control the apparent creativity of generated completions with a sampling temperature.\nIt must be a number in the range of 0.0 to 2.0.\nIt should not be used if `top_p` is specified.", + "total_repositories": { "type": "number" }, - "top_p": { - "description": "For a `completion` task, make the model consider the results of the tokens with nucleus sampling probability.\nIt is an alternative value to `temperature` and must be a number in the range of 0.0 to 2.0.\nIt should not be used if `temperature` is specified.", + "corrupted_repositories": { "type": "number" }, - "user": { - "description": "For a `text_embedding` task, specify the user issuing the request.\nThis information can be used for abuse detection.", - "type": "string" + "corrupted": { + "type": "array", + "items": { + "type": "string" + } } } }, - "inference._types.InferenceEndpointInfoAzureAIStudio": { + "_global.health_report.DataStreamLifecycleIndicator": { + "description": "DATA_STREAM_LIFECYCLE", "allOf": [ { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, { "type": "object", "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeAzureAIStudio" + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.DataStreamLifecycleDetails" + } + ] } - }, - "required": [ - "inference_id", - "task_type" - ] + } } ] }, - "inference._types.TaskTypeAzureAIStudio": { - "type": "string", - "enum": [ - "text_embedding", - "completion" - ] - }, - "inference._types.AzureOpenAITaskType": { - "type": "string", - "enum": [ - "completion", - "text_embedding" - ] - }, - "inference._types.AzureOpenAIServiceType": { - "type": "string", - "enum": [ - "azureopenai" - ] - }, - "inference._types.AzureOpenAIServiceSettings": { + "_global.health_report.DataStreamLifecycleDetails": { "type": "object", "properties": { - "api_key": { - "externalDocs": { - "url": "https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#authentication" - }, - "description": "A valid API key for your Azure OpenAI account.\nYou must specify either `api_key` or `entra_id`.\nIf you do not provide either or you provide both, you will receive an error when you try to create your model.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", - "type": "string" - }, - "api_version": { - "description": "The Azure API version ID to use.\nIt is recommended to use the latest supported non-preview version.", - "type": "string" - }, - "deployment_id": { - "externalDocs": { - "url": "https://oai.azure.com/" - }, - "description": "The deployment name of your deployed models.\nYour Azure OpenAI deployments can be found though the Azure OpenAI Studio portal that is linked to your subscription.", - "type": "string" - }, - "entra_id": { - "externalDocs": { - "url": "https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#authentication" - }, - "description": "A valid Microsoft Entra token.\nYou must specify either `api_key` or `entra_id`.\nIf you do not provide either or you provide both, you will receive an error when you try to create your model.", - "type": "string" + "stagnating_backing_indices_count": { + "type": "number" }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" + "total_backing_indices_in_error": { + "type": "number" }, - "resource_name": { - "externalDocs": { - "url": "https://portal.azure.com/#view/HubsExtension/BrowseAll" - }, - "description": "The name of your Azure OpenAI resource.\nYou can find this from the list of resources in the Azure Portal for your subscription.", - "type": "string" + "stagnating_backing_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.health_report.StagnatingBackingIndices" + } } }, "required": [ - "api_version", - "deployment_id", - "resource_name" + "stagnating_backing_indices_count", + "total_backing_indices_in_error" ] }, - "inference._types.AzureOpenAITaskSettings": { + "_global.health_report.StagnatingBackingIndices": { "type": "object", "properties": { - "user": { - "description": "For a `completion` or `text_embedding` task, specify the user issuing the request.\nThis information can be used for abuse detection.", - "type": "string" + "index_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "first_occurrence_timestamp": { + "type": "number" + }, + "retry_count": { + "type": "number" } - } + }, + "required": [ + "index_name", + "first_occurrence_timestamp", + "retry_count" + ] }, - "inference._types.InferenceEndpointInfoAzureOpenAI": { + "_global.health_report.IlmIndicator": { + "description": "ILM", "allOf": [ { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, { "type": "object", "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeAzureOpenAI" + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.IlmIndicatorDetails" + } + ] } - }, - "required": [ - "inference_id", - "task_type" - ] + } } ] }, - "inference._types.TaskTypeAzureOpenAI": { - "type": "string", - "enum": [ - "text_embedding", - "completion" - ] - }, - "inference._types.CohereTaskType": { - "type": "string", - "enum": [ - "completion", - "rerank", - "text_embedding" - ] - }, - "inference._types.CohereServiceType": { - "type": "string", - "enum": [ - "cohere" - ] - }, - "inference._types.CohereServiceSettings": { + "_global.health_report.IlmIndicatorDetails": { "type": "object", "properties": { - "api_key": { - "externalDocs": { - "url": "https://dashboard.cohere.com/api-keys" - }, - "description": "A valid API key for your Cohere account.\nYou can find or create your Cohere API keys on the Cohere API key settings page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", - "type": "string" - }, - "embedding_type": { - "$ref": "#/components/schemas/inference._types.CohereEmbeddingType" - }, - "model_id": { - "description": "For a `completion`, `rerank`, or `text_embedding` task, the name of the model to use for the inference task.\n\n* For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).\n* For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).\n* For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).\n\nThe default value for a text embedding task is `embed-english-v2.0`.", - "type": "string" + "ilm_status": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.LifecycleOperationMode" + } + ] }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" + "policies": { + "type": "number" }, - "similarity": { - "$ref": "#/components/schemas/inference._types.CohereSimilarityType" + "stagnating_indices": { + "type": "number" } }, "required": [ - "api_key" + "ilm_status", + "policies", + "stagnating_indices" ] }, - "inference._types.CohereEmbeddingType": { + "_types.LifecycleOperationMode": { "type": "string", "enum": [ - "binary", - "bit", - "byte", - "float", - "int8" + "RUNNING", + "STOPPING", + "STOPPED" ] }, - "inference._types.CohereSimilarityType": { - "type": "string", - "enum": [ - "cosine", - "dot_product", - "l2_norm" + "_global.health_report.SlmIndicator": { + "description": "SLM", + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" + }, + { + "type": "object", + "properties": { + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.SlmIndicatorDetails" + } + ] + } + } + } ] }, - "inference._types.CohereTaskSettings": { + "_global.health_report.SlmIndicatorDetails": { "type": "object", "properties": { - "input_type": { - "$ref": "#/components/schemas/inference._types.CohereInputType" - }, - "return_documents": { - "description": "For a `rerank` task, return doc text within the results.", - "type": "boolean" + "slm_status": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.LifecycleOperationMode" + } + ] }, - "top_n": { - "description": "For a `rerank` task, the number of most relevant documents to return.\nIt defaults to the number of the documents.\nIf this inference endpoint is used in a `text_similarity_reranker` retriever query and `top_n` is set, it must be greater than or equal to `rank_window_size` in the query.", + "policies": { "type": "number" }, - "truncate": { - "$ref": "#/components/schemas/inference._types.CohereTruncateType" + "unhealthy_policies": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.SlmIndicatorUnhealthyPolicies" + } + ] } - } - }, - "inference._types.CohereInputType": { - "type": "string", - "enum": [ - "classification", - "clustering", - "ingest", - "search" + }, + "required": [ + "slm_status", + "policies" ] }, - "inference._types.CohereTruncateType": { - "type": "string", - "enum": [ - "END", - "NONE", - "START" + "_global.health_report.SlmIndicatorUnhealthyPolicies": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "invocations_since_last_success": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "count" ] }, - "inference._types.InferenceEndpointInfoCohere": { + "_global.health_report.ShardsCapacityIndicator": { + "description": "SHARDS_CAPACITY", "allOf": [ { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, { "type": "object", "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeCohere" + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.ShardsCapacityIndicatorDetails" + } + ] } - }, - "required": [ - "inference_id", - "task_type" - ] + } } ] }, - "inference._types.TaskTypeCohere": { - "type": "string", - "enum": [ - "text_embedding", - "rerank", - "completion" - ] - }, - "inference._types.ElasticsearchTaskType": { - "type": "string", - "enum": [ - "rerank", - "sparse_embedding", - "text_embedding" - ] - }, - "inference._types.ElasticsearchServiceType": { - "type": "string", - "enum": [ - "elasticsearch" - ] - }, - "inference._types.ElasticsearchServiceSettings": { + "_global.health_report.ShardsCapacityIndicatorDetails": { "type": "object", "properties": { - "adaptive_allocations": { - "$ref": "#/components/schemas/inference._types.AdaptiveAllocations" - }, - "deployment_id": { - "description": "The deployment identifier for a trained model deployment.\nWhen `deployment_id` is used the `model_id` is optional.", - "type": "string" - }, - "model_id": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/machine-learning/nlp/ml-nlp-import-model#ml-nlp-import-script" - }, - "description": "The name of the model to use for the inference task.\nIt can be the ID of a built-in model (for example, `.multilingual-e5-small` for E5) or a text embedding model that was uploaded by using the Eland client.", - "type": "string" - }, - "num_allocations": { - "description": "The total number of allocations that are assigned to the model across machine learning nodes.\nIncreasing this value generally increases the throughput.\nIf adaptive allocations are enabled, do not set this value because it's automatically set.", - "type": "number" + "data": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.ShardsCapacityIndicatorTierDetail" + } + ] }, - "num_threads": { - "description": "The number of threads used by each model allocation during inference.\nThis setting generally increases the speed per inference request.\nThe inference process is a compute-bound process; `threads_per_allocations` must not exceed the number of available allocated processors per node.\nThe value must be a power of 2.\nThe maximum value is 32.", - "type": "number" + "frozen": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.ShardsCapacityIndicatorTierDetail" + } + ] } }, "required": [ - "model_id", - "num_threads" + "data", + "frozen" ] }, - "inference._types.AdaptiveAllocations": { + "_global.health_report.ShardsCapacityIndicatorTierDetail": { "type": "object", "properties": { - "enabled": { - "description": "Turn on `adaptive_allocations`.", - "type": "boolean" - }, - "max_number_of_allocations": { - "description": "The maximum number of allocations to scale to.\nIf set, it must be greater than or equal to `min_number_of_allocations`.", + "max_shards_in_cluster": { "type": "number" }, - "min_number_of_allocations": { - "description": "The minimum number of allocations to scale to.\nIf set, it must be greater than or equal to 0.\nIf not defined, the deployment scales to 0.", + "current_used_shards": { "type": "number" } - } - }, - "inference._types.ElasticsearchTaskSettings": { - "type": "object", - "properties": { - "return_documents": { - "description": "For a `rerank` task, return the document instead of only the index.", - "type": "boolean" - } - } + }, + "required": [ + "max_shards_in_cluster" + ] }, - "inference._types.InferenceEndpointInfoElasticsearch": { + "_global.health_report.FileSettingsIndicator": { + "description": "FILE_SETTINGS", "allOf": [ { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "$ref": "#/components/schemas/_global.health_report.BaseIndicator" }, { "type": "object", "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeElasticsearch" + "details": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.health_report.FileSettingsIndicatorDetails" + } + ] } - }, - "required": [ - "inference_id", - "task_type" - ] + } } ] }, - "inference._types.TaskTypeElasticsearch": { - "type": "string", - "enum": [ - "sparse_embedding", - "text_embedding", - "rerank" - ] - }, - "inference._types.ElserTaskType": { - "type": "string", - "enum": [ - "sparse_embedding" - ] - }, - "inference._types.ElserServiceType": { - "type": "string", - "enum": [ - "elser" - ] - }, - "inference._types.ElserServiceSettings": { + "_global.health_report.FileSettingsIndicatorDetails": { "type": "object", "properties": { - "adaptive_allocations": { - "$ref": "#/components/schemas/inference._types.AdaptiveAllocations" - }, - "num_allocations": { - "description": "The total number of allocations this model is assigned across machine learning nodes.\nIncreasing this value generally increases the throughput.\nIf adaptive allocations is enabled, do not set this value because it's automatically set.", + "failure_streak": { "type": "number" }, - "num_threads": { - "description": "The number of threads used by each model allocation during inference.\nIncreasing this value generally increases the speed per inference request.\nThe inference process is a compute-bound process; `threads_per_allocations` must not exceed the number of available allocated processors per node.\nThe value must be a power of 2.\nThe maximum value is 32.\n\n> info\n> If you want to optimize your ELSER endpoint for ingest, set the number of threads to 1. If you want to optimize your ELSER endpoint for search, set the number of threads to greater than 1.", - "type": "number" + "most_recent_failure": { + "type": "string" } }, "required": [ - "num_allocations", - "num_threads" + "failure_streak", + "most_recent_failure" ] }, - "inference._types.InferenceEndpointInfoELSER": { - "allOf": [ + "ilm.explain_lifecycle.LifecycleExplain": { + "discriminator": { + "propertyName": "managed", + "mapping": { + "false": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplainUnmanaged", + "true": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplainManaged" + } + }, + "oneOf": [ { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "$ref": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplainManaged" }, { + "$ref": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplainUnmanaged" + } + ] + }, + "ilm.explain_lifecycle.LifecycleExplainManaged": { + "type": "object", + "properties": { + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "action_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "action_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "age": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "age_in_millis": { + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "failed_step": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "failed_step_retry_count": { + "type": "number" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "index_creation_date": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "index_creation_date_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "is_auto_retryable_error": { + "type": "boolean" + }, + "lifecycle_date": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "lifecycle_date_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "managed": { + "type": "string", + "enum": [ + "true" + ] + }, + "phase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "phase_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "phase_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "policy": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "previous_step_info": { "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeELSER" + "additionalProperties": { + "type": "object" + } + }, + "repository_name": { + "type": "string" + }, + "snapshot_name": { + "type": "string" + }, + "shrink_index_name": { + "type": "string" + }, + "step": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "step_info": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "step_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "step_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "phase_execution": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm.explain_lifecycle.LifecycleExplainPhaseExecution" + } + ] + }, + "time_since_index_creation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "inference_id", - "task_type" ] + }, + "skip": { + "type": "boolean" } + }, + "required": [ + "index", + "managed", + "skip" ] }, - "inference._types.TaskTypeELSER": { - "type": "string", - "enum": [ - "sparse_embedding" - ] - }, - "inference._types.GoogleAiStudioTaskType": { - "type": "string", - "enum": [ - "completion", - "text_embedding" - ] - }, - "inference._types.GoogleAiServiceType": { - "type": "string", - "enum": [ - "googleaistudio" - ] - }, - "inference._types.GoogleAiStudioServiceSettings": { + "ilm.explain_lifecycle.LifecycleExplainPhaseExecution": { "type": "object", "properties": { - "api_key": { - "description": "A valid API key of your Google Gemini account.", - "type": "string" + "phase_definition": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Phase" + } + ] }, - "model_id": { - "externalDocs": { - "url": "https://ai.google.dev/gemini-api/docs/models" - }, - "description": "The name of the model to use for the inference task.\nRefer to the Google documentation for the list of supported models.", - "type": "string" + "policy": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "modified_date_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] } }, "required": [ - "api_key", - "model_id" + "policy", + "version", + "modified_date_in_millis" ] }, - "inference._types.InferenceEndpointInfoGoogleAIStudio": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "ilm._types.Phase": { + "type": "object", + "properties": { + "actions": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Actions" + } + ] }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeGoogleAIStudio" + "min_age": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "inference_id", - "task_type" ] } - ] - }, - "inference._types.TaskTypeGoogleAIStudio": { - "type": "string", - "enum": [ - "text_embedding", - "completion" - ] - }, - "inference._types.GoogleVertexAITaskType": { - "type": "string", - "enum": [ - "rerank", - "text_embedding", - "completion", - "chat_completion" - ] - }, - "inference._types.GoogleVertexAIServiceType": { - "type": "string", - "enum": [ - "googlevertexai" - ] + } }, - "inference._types.GoogleVertexAIServiceSettings": { + "ilm._types.Actions": { "type": "object", "properties": { - "location": { - "externalDocs": { - "url": "https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations" - }, - "description": "The name of the location to use for the inference task.\nRefer to the Google documentation for the list of supported locations.", - "type": "string" + "allocate": { + "description": "Phases allowed: warm, cold.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.AllocateAction" + } + ] }, - "model_id": { - "externalDocs": { - "url": "https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api" - }, - "description": "The name of the model to use for the inference task.\nRefer to the Google documentation for the list of supported models.", - "type": "string" + "delete": { + "description": "Phases allowed: delete.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.DeleteAction" + } + ] }, - "project_id": { - "description": "The name of the project to use for the inference task.", - "type": "string" + "downsample": { + "description": "Phases allowed: hot, warm, cold.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.DownsampleAction" + } + ] }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" + "freeze": { + "deprecated": true, + "description": "The freeze action is a noop in 8.x", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EmptyObject" + } + ] }, - "service_account_json": { - "description": "A valid service account in JSON format for the Google Vertex AI API.", - "type": "string" + "forcemerge": { + "description": "Phases allowed: hot, warm.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.ForceMergeAction" + } + ] + }, + "migrate": { + "description": "Phases allowed: warm, cold.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.MigrateAction" + } + ] + }, + "readonly": { + "description": "Phases allowed: hot, warm, cold.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EmptyObject" + } + ] + }, + "rollover": { + "description": "Phases allowed: hot.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.RolloverAction" + } + ] + }, + "set_priority": { + "description": "Phases allowed: hot, warm, cold.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.SetPriorityAction" + } + ] + }, + "searchable_snapshot": { + "description": "Phases allowed: hot, cold, frozen.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.SearchableSnapshotAction" + } + ] + }, + "shrink": { + "description": "Phases allowed: hot, warm.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.ShrinkAction" + } + ] + }, + "unfollow": { + "description": "Phases allowed: hot, warm, cold, frozen.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EmptyObject" + } + ] + }, + "wait_for_snapshot": { + "description": "Phases allowed: delete.", + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.WaitForSnapshotAction" + } + ] } - }, - "required": [ - "location", - "model_id", - "project_id", - "service_account_json" - ] + } }, - "inference._types.GoogleVertexAITaskSettings": { + "ilm._types.AllocateAction": { "type": "object", "properties": { - "auto_truncate": { - "description": "For a `text_embedding` task, truncate inputs longer than the maximum token length automatically.", - "type": "boolean" + "number_of_replicas": { + "type": "number" }, - "top_n": { - "description": "For a `rerank` task, the number of the top N documents that should be returned.", + "total_shards_per_node": { "type": "number" - } - } - }, - "inference._types.InferenceEndpointInfoGoogleVertexAI": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - { + "include": { "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeGoogleVertexAI" - } - }, - "required": [ - "inference_id", - "task_type" - ] + "additionalProperties": { + "type": "string" + } + }, + "exclude": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "require": { + "type": "object", + "additionalProperties": { + "type": "string" + } } - ] - }, - "inference._types.TaskTypeGoogleVertexAI": { - "type": "string", - "enum": [ - "text_embedding", - "rerank" - ] - }, - "inference._types.HuggingFaceTaskType": { - "type": "string", - "enum": [ - "text_embedding" - ] - }, - "inference._types.HuggingFaceServiceType": { - "type": "string", - "enum": [ - "hugging_face" - ] + } }, - "inference._types.HuggingFaceServiceSettings": { + "ilm._types.DeleteAction": { "type": "object", "properties": { - "api_key": { - "externalDocs": { - "url": "https://huggingface.co/settings/tokens" - }, - "description": "A valid access token for your HuggingFace account.\nYou can create or find your access tokens on the HuggingFace settings page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", - "type": "string" - }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" - }, - "url": { - "description": "The URL endpoint to use for the requests.", - "type": "string" + "delete_searchable_snapshot": { + "type": "boolean" } - }, - "required": [ - "api_key", - "url" - ] + } }, - "inference._types.InferenceEndpointInfoHuggingFace": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "ilm._types.DownsampleAction": { + "type": "object", + "properties": { + "fixed_interval": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationLarge" + } + ] }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeHuggingFace" + "wait_timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "inference_id", - "task_type" ] } + }, + "required": [ + "fixed_interval" ] }, - "inference._types.TaskTypeHuggingFace": { - "type": "string", - "enum": [ - "text_embedding" - ] - }, - "inference._types.JinaAITaskType": { - "type": "string", - "enum": [ - "rerank", - "text_embedding" - ] - }, - "inference._types.JinaAIServiceType": { - "type": "string", - "enum": [ - "jinaai" - ] - }, - "inference._types.JinaAIServiceSettings": { + "ilm._types.ForceMergeAction": { "type": "object", "properties": { - "api_key": { - "externalDocs": { - "url": "https://jina.ai/embeddings/" - }, - "description": "A valid API key of your JinaAI account.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", - "type": "string" + "max_num_segments": { + "type": "number" }, - "model_id": { - "description": "The name of the model to use for the inference task.\nFor a `rerank` task, it is required.\nFor a `text_embedding` task, it is optional.", + "index_codec": { "type": "string" - }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" - }, - "similarity": { - "$ref": "#/components/schemas/inference._types.JinaAISimilarityType" } }, "required": [ - "api_key" - ] - }, - "inference._types.JinaAISimilarityType": { - "type": "string", - "enum": [ - "cosine", - "dot_product", - "l2_norm" + "max_num_segments" ] }, - "inference._types.JinaAITaskSettings": { + "ilm._types.MigrateAction": { "type": "object", "properties": { - "return_documents": { - "description": "For a `rerank` task, return the doc text within the results.", + "enabled": { "type": "boolean" - }, - "task": { - "$ref": "#/components/schemas/inference._types.JinaAITextEmbeddingTask" - }, - "top_n": { - "description": "For a `rerank` task, the number of most relevant documents to return.\nIt defaults to the number of the documents.\nIf this inference endpoint is used in a `text_similarity_reranker` retriever query and `top_n` is set, it must be greater than or equal to `rank_window_size` in the query.", - "type": "number" } } }, - "inference._types.JinaAITextEmbeddingTask": { - "type": "string", - "enum": [ - "classification", - "clustering", - "ingest", - "search" - ] - }, - "inference._types.InferenceEndpointInfoJinaAi": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "ilm._types.RolloverAction": { + "type": "object", + "properties": { + "max_size": { + "deprecated": true, + "description": "The `max_size` condition has been deprecated in 9.3.0 and `max_primary_shard_size` should be used instead", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeJinaAi" + "max_primary_shard_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - }, - "required": [ - "inference_id", - "task_type" ] - } - ] - }, - "inference._types.TaskTypeJinaAi": { - "type": "string", - "enum": [ - "text_embedding", - "rerank" - ] - }, - "inference._types.MistralTaskType": { - "type": "string", - "enum": [ - "text_embedding" - ] - }, - "inference._types.MistralServiceType": { - "type": "string", - "enum": [ - "mistral" - ] - }, - "inference._types.MistralServiceSettings": { - "type": "object", - "properties": { - "api_key": { - "externalDocs": { - "url": "https://console.mistral.ai/api-keys/" - }, - "description": "A valid API key of your Mistral account.\nYou can find your Mistral API keys or you can create a new one on the API Keys page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", - "type": "string" }, - "max_input_tokens": { - "description": "The maximum number of tokens per input before chunking occurs.", + "max_age": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max_docs": { "type": "number" }, - "model": { - "externalDocs": { - "url": "https://docs.mistral.ai/getting-started/models/" - }, - "description": "The name of the model to use for the inference task.\nRefer to the Mistral models documentation for the list of available text embedding models.", + "max_primary_shard_docs": { + "type": "number" + }, + "min_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "min_primary_shard_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "min_age": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "min_docs": { + "type": "number" + }, + "min_primary_shard_docs": { + "type": "number" + } + } + }, + "ilm._types.SetPriorityAction": { + "type": "object", + "properties": { + "priority": { + "type": "number" + } + } + }, + "ilm._types.SearchableSnapshotAction": { + "type": "object", + "properties": { + "snapshot_repository": { "type": "string" }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" + "force_merge_index": { + "type": "boolean" } }, "required": [ - "api_key", - "model" + "snapshot_repository" ] }, - "inference._types.InferenceEndpointInfoMistral": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "ilm._types.ShrinkAction": { + "type": "object", + "properties": { + "number_of_shards": { + "type": "number" }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeMistral" + "max_primary_shard_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - }, - "required": [ - "inference_id", - "task_type" ] + }, + "allow_write_after_shrink": { + "type": "boolean" } - ] - }, - "inference._types.TaskTypeMistral": { - "type": "string", - "enum": [ - "text_embedding" - ] - }, - "inference._types.OpenAITaskType": { - "type": "string", - "enum": [ - "chat_completion", - "completion", - "text_embedding" - ] - }, - "inference._types.OpenAIServiceType": { - "type": "string", - "enum": [ - "openai" - ] + } }, - "inference._types.OpenAIServiceSettings": { + "ilm._types.WaitForSnapshotAction": { "type": "object", "properties": { - "api_key": { - "externalDocs": { - "url": "https://platform.openai.com/api-keys" - }, - "description": "A valid API key of your OpenAI account.\nYou can find your OpenAI API keys in your OpenAI account under the API keys section.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", - "type": "string" - }, - "dimensions": { - "description": "The number of dimensions the resulting output embeddings should have.\nIt is supported only in `text-embedding-3` and later models.\nIf it is not set, the OpenAI defined default for the model is used.", - "type": "number" - }, - "model_id": { - "externalDocs": { - "url": "https://platform.openai.com/docs/guides/embeddings/what-are-embeddings" - }, - "description": "The name of the model to use for the inference task.\nRefer to the OpenAI documentation for the list of available text embedding models.", - "type": "string" - }, - "organization_id": { - "description": "The unique identifier for your organization.\nYou can find the Organization ID in your OpenAI account under *Settings > Organizations*.", - "type": "string" - }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" - }, - "url": { - "description": "The URL endpoint to use for the requests.\nIt can be changed for testing purposes.", + "policy": { "type": "string" } }, "required": [ - "api_key", - "model_id" + "policy" ] }, - "inference._types.OpenAITaskSettings": { + "ilm.explain_lifecycle.LifecycleExplainUnmanaged": { "type": "object", "properties": { - "user": { - "description": "For a `completion` or `text_embedding` task, specify the user issuing the request.\nThis information can be used for abuse detection.", - "type": "string" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "managed": { + "type": "string", + "enum": [ + "false" + ] } - } + }, + "required": [ + "index", + "managed" + ] }, - "inference._types.InferenceEndpointInfoOpenAI": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "ilm.get_lifecycle.Lifecycle": { + "type": "object", + "properties": { + "modified_date": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeOpenAI" + "policy": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Policy" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" } - }, - "required": [ - "inference_id", - "task_type" ] } + }, + "required": [ + "modified_date", + "policy", + "version" ] }, - "inference._types.TaskTypeOpenAI": { - "type": "string", - "enum": [ - "text_embedding", - "chat_completion", - "completion" - ] - }, - "inference._types.VoyageAITaskType": { - "type": "string", - "enum": [ - "text_embedding", - "rerank" - ] - }, - "inference._types.VoyageAIServiceType": { - "type": "string", - "enum": [ - "voyageai" - ] - }, - "inference._types.VoyageAIServiceSettings": { + "ilm._types.Policy": { "type": "object", "properties": { - "dimensions": { - "externalDocs": { - "url": "https://docs.voyageai.com/docs/embeddings" - }, - "description": "The number of dimensions for resulting output embeddings.\nThis setting maps to `output_dimension` in the VoyageAI documentation.\nOnly for the `text_embedding` task type.", - "type": "number" - }, - "model_id": { - "externalDocs": { - "url": "https://docs.voyageai.com/docs/reranker" - }, - "description": "The name of the model to use for the inference task.\nRefer to the VoyageAI documentation for the list of available text embedding and rerank models.", - "type": "string" - }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" + "phases": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Phases" + } + ] }, - "embedding_type": { - "externalDocs": { - "url": "https://docs.voyageai.com/docs/embeddings" - }, - "description": "The data type for the embeddings to be returned.\nThis setting maps to `output_dtype` in the VoyageAI documentation.\nPermitted values: float, int8, bit.\n`int8` is a synonym of `byte` in the VoyageAI documentation.\n`bit` is a synonym of `binary` in the VoyageAI documentation.\nOnly for the `text_embedding` task type.", - "type": "number" + "_meta": { + "description": "Arbitrary metadata that is not automatically generated or used by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] } }, "required": [ - "model_id" + "phases" ] }, - "inference._types.VoyageAITaskSettings": { + "ilm._types.Phases": { "type": "object", "properties": { - "input_type": { - "description": "Type of the input text.\nPermitted values: `ingest` (maps to `document` in the VoyageAI documentation), `search` (maps to `query` in the VoyageAI documentation).\nOnly for the `text_embedding` task type.", - "type": "string" + "cold": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Phase" + } + ] }, - "return_documents": { - "description": "Whether to return the source documents in the response.\nOnly for the `rerank` task type.", - "type": "boolean" + "delete": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Phase" + } + ] }, - "top_k": { - "description": "The number of most relevant documents to return.\nIf not specified, the reranking results of all documents will be returned.\nOnly for the `rerank` task type.", - "type": "number" + "frozen": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Phase" + } + ] }, - "truncation": { - "description": "Whether to truncate the input texts to fit within the context length.", - "type": "boolean" - } - } - }, - "inference._types.InferenceEndpointInfoVoyageAI": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + "hot": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Phase" + } + ] }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeVoyageAI" + "warm": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Phase" } - }, - "required": [ - "inference_id", - "task_type" ] } - ] - }, - "inference._types.TaskTypeVoyageAI": { - "type": "string", - "enum": [ - "text_embedding", - "rerank" - ] - }, - "inference._types.WatsonxTaskType": { - "type": "string", - "enum": [ - "text_embedding" - ] - }, - "inference._types.WatsonxServiceType": { - "type": "string", - "enum": [ - "watsonxai" - ] + } }, - "inference._types.WatsonxServiceSettings": { + "ilm.move_to_step.StepKey": { "type": "object", "properties": { - "api_key": { - "externalDocs": { - "url": "https://cloud.ibm.com/iam/apikeys" - }, - "description": "A valid API key of your Watsonx account.\nYou can find your Watsonx API keys or you can create a new one on the API keys page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", - "type": "string" - }, - "api_version": { - "externalDocs": { - "url": "https://cloud.ibm.com/apidocs/watsonx-ai#active-version-dates" - }, - "description": "A version parameter that takes a version date in the format of `YYYY-MM-DD`.\nFor the active version data parameters, refer to the Wastonx documentation.", - "type": "string" - }, - "model_id": { - "externalDocs": { - "url": "https://www.ibm.com/products/watsonx-ai/foundation-models" - }, - "description": "The name of the model to use for the inference task.\nRefer to the IBM Embedding Models section in the Watsonx documentation for the list of available text embedding models.", + "action": { + "description": "The optional action to which the index will be moved.", "type": "string" }, - "project_id": { - "description": "The identifier of the IBM Cloud project to use for the inference task.", + "name": { + "description": "The optional step name to which the index will be moved.", "type": "string" }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types.RateLimitSetting" - }, - "url": { - "description": "The URL of the inference endpoint that you created on Watsonx.", + "phase": { "type": "string" } }, "required": [ - "api_key", - "api_version", - "model_id", - "project_id", - "url" + "phase" ] }, - "inference._types.InferenceEndpointInfoWatsonx": { - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" - }, - { - "type": "object", - "properties": { - "inference_id": { - "description": "The inference Id", - "type": "string" - }, - "task_type": { - "$ref": "#/components/schemas/inference._types.TaskTypeWatsonx" - } - }, - "required": [ - "inference_id", - "task_type" - ] - } + "_types.OpType": { + "type": "string", + "enum": [ + "index", + "create" ] }, - "inference._types.TaskTypeWatsonx": { + "indices._types.IndicesBlockOptions": { "type": "string", "enum": [ - "text_embedding" + "metadata", + "read", + "read_only", + "write" ] }, - "inference._types.RerankedInferenceResult": { + "indices.add_block.AddIndicesBlockStatus": { "type": "object", "properties": { - "rerank": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.RankedDocument" - } + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "blocked": { + "type": "boolean" } }, "required": [ - "rerank" + "name", + "blocked" ] }, - "inference._types.SparseEmbeddingInferenceResult": { - "type": "object", - "properties": { - "sparse_embedding": { + "indices.analyze.TextToAnalyze": { + "oneOf": [ + { + "type": "string" + }, + { "type": "array", "items": { - "$ref": "#/components/schemas/inference._types.SparseEmbeddingResult" + "type": "string" } } - }, - "required": [ - "sparse_embedding" ] }, - "inference._types.TextEmbeddingInferenceResult": { - "description": "TextEmbeddingInferenceResult is an aggregation of mutually exclusive text_embedding variants", + "indices.analyze.AnalyzeDetail": { "type": "object", "properties": { - "text_embedding_bytes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.TextEmbeddingByteResult" - } + "analyzer": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.AnalyzerDetail" + } + ] }, - "text_embedding_bits": { + "charfilters": { "type": "array", "items": { - "$ref": "#/components/schemas/inference._types.TextEmbeddingByteResult" + "$ref": "#/components/schemas/indices.analyze.CharFilterDetail" } }, - "text_embedding": { + "custom_analyzer": { + "type": "boolean" + }, + "tokenfilters": { "type": "array", "items": { - "$ref": "#/components/schemas/inference._types.TextEmbeddingResult" + "$ref": "#/components/schemas/indices.analyze.TokenDetail" } + }, + "tokenizer": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.analyze.TokenDetail" + } + ] } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "custom_analyzer" + ] }, - "_types.ElasticsearchVersionInfo": { + "indices.analyze.AnalyzerDetail": { "type": "object", "properties": { - "build_date": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "build_flavor": { - "description": "The build flavor. For example, `default`.", - "type": "string" - }, - "build_hash": { - "description": "The Elasticsearch Git commit's SHA hash.", - "type": "string" - }, - "build_snapshot": { - "description": "Indicates whether the Elasticsearch build was a snapshot.", - "type": "boolean" - }, - "build_type": { - "description": "The build type that corresponds to how Elasticsearch was installed.\nFor example, `docker`, `rpm`, or `tar`.", + "name": { "type": "string" }, - "lucene_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "minimum_index_compatibility_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "minimum_wire_compatibility_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "number": { - "description": "The Elasticsearch version number.", - "type": "string" + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.analyze.ExplainAnalyzeToken" + } } }, "required": [ - "build_date", - "build_flavor", - "build_hash", - "build_snapshot", - "build_type", - "lucene_version", - "minimum_index_compatibility_version", - "minimum_wire_compatibility_version", - "number" + "name", + "tokens" ] }, - "ingest.geo_ip_stats.GeoIpDownloadStatistics": { + "indices.analyze.ExplainAnalyzeToken": { "type": "object", "properties": { - "successful_downloads": { - "description": "Total number of successful database downloads.", - "type": "number" + "bytes": { + "type": "string" }, - "failed_downloads": { - "description": "Total number of failed database downloads.", + "end_offset": { "type": "number" }, - "total_download_time": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "keyword": { + "type": "boolean" }, - "databases_count": { - "description": "Current number of databases available for use.", + "position": { "type": "number" }, - "skipped_updates": { - "description": "Total number of database updates skipped.", + "positionLength": { "type": "number" }, - "expired_databases": { - "description": "Total number of databases not updated after 30 days", + "start_offset": { + "type": "number" + }, + "termFrequency": { "type": "number" + }, + "token": { + "type": "string" + }, + "type": { + "type": "string" } }, "required": [ - "successful_downloads", - "failed_downloads", - "total_download_time", - "databases_count", - "skipped_updates", - "expired_databases" + "bytes", + "end_offset", + "position", + "positionLength", + "start_offset", + "termFrequency", + "token", + "type" ] }, - "ingest.geo_ip_stats.GeoIpNodeDatabases": { + "indices.analyze.CharFilterDetail": { "type": "object", "properties": { - "databases": { - "description": "Downloaded databases for the node.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest.geo_ip_stats.GeoIpNodeDatabaseName" - } - }, - "files_in_temp": { - "description": "Downloaded database files, including related license files. Elasticsearch stores these files in the node’s temporary directory: $ES_TMPDIR/geoip-databases/.", + "filtered_text": { "type": "array", "items": { "type": "string" } + }, + "name": { + "type": "string" } }, "required": [ - "databases", - "files_in_temp" + "filtered_text", + "name" ] }, - "ingest.geo_ip_stats.GeoIpNodeDatabaseName": { + "indices.analyze.TokenDetail": { "type": "object", "properties": { "name": { - "$ref": "#/components/schemas/_types.Name" + "type": "string" + }, + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.analyze.ExplainAnalyzeToken" + } } }, "required": [ - "name" + "name", + "tokens" ] }, - "ingest.get_geoip_database.DatabaseConfigurationMetadata": { + "indices.analyze.AnalyzeToken": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "end_offset": { + "type": "number" }, - "version": { + "position": { "type": "number" }, - "modified_date_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "positionLength": { + "type": "number" }, - "database": { - "$ref": "#/components/schemas/ingest._types.DatabaseConfiguration" + "start_offset": { + "type": "number" + }, + "token": { + "type": "string" + }, + "type": { + "type": "string" } }, "required": [ - "id", - "version", - "modified_date_millis", - "database" + "end_offset", + "position", + "start_offset", + "token", + "type" ] }, - "ingest._types.DatabaseConfiguration": { - "description": "The configuration necessary to identify which IP geolocation provider to use to download a database, as well as any provider-specific configuration necessary for such downloading.\nAt present, the only supported providers are `maxmind` and `ipinfo`, and the `maxmind` provider requires that an `account_id` (string) is configured.\nA provider (either `maxmind` or `ipinfo`) must be specified. The web and local providers can be returned as read only configurations.", - "allOf": [ - { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "_types.ShardsOperationResponseBase": { + "type": "object", + "properties": { + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" } - }, - "required": [ - "name" ] + } + } + }, + "indices.close.CloseIndexResult": { + "type": "object", + "properties": { + "closed": { + "type": "boolean" }, - { + "shards": { "type": "object", - "properties": { - "maxmind": { - "$ref": "#/components/schemas/ingest._types.Maxmind" - }, - "ipinfo": { - "$ref": "#/components/schemas/ingest._types.Ipinfo" - } - }, - "minProperties": 1, - "maxProperties": 1 + "additionalProperties": { + "$ref": "#/components/schemas/indices.close.CloseShardResult" + } } + }, + "required": [ + "closed" ] }, - "ingest._types.Maxmind": { + "indices.close.CloseShardResult": { "type": "object", "properties": { - "account_id": { - "$ref": "#/components/schemas/_types.Id" + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ShardFailure" + } } }, "required": [ - "account_id" + "failures" ] }, - "ingest._types.Ipinfo": { - "type": "object" + "_types.DataStreamName": { + "type": "string" }, - "ingest.get_ip_location_database.DatabaseConfigurationMetadata": { + "indices.create_from.CreateFrom": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "mappings_override": { + "description": "Mappings overrides to be applied to the destination index (optional)", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "settings_override": { + "description": "Settings overrides to be applied to the destination index (optional)", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] }, - "modified_date_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "remove_index_blocks": { + "description": "If index blocks should be removed when creating destination index (optional)", + "default": true, + "type": "boolean" + } + } + }, + "indices.data_streams_stats.DataStreamsStatsItem": { + "type": "object", + "properties": { + "backing_indices": { + "description": "Current number of backing indices for the data stream.", + "type": "number" }, - "modified_date": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "data_stream": { + "description": "Name of the data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "database": { - "$ref": "#/components/schemas/ingest._types.DatabaseConfigurationFull" + "maximum_timestamp": { + "description": "The data stream’s highest `@timestamp` value, converted to milliseconds since the Unix epoch.\nNOTE: This timestamp is provided as a best effort.\nThe data stream may contain `@timestamp` values higher than this if one or more of the following conditions are met:\nThe stream contains closed backing indices;\nBacking indices with a lower generation contain higher `@timestamp` values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "store_size": { + "description": "Total size of all shards for the data stream’s backing indices.\nThis parameter is only returned if the `human` query parameter is `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "store_size_bytes": { + "description": "Total size, in bytes, of all shards for the data stream’s backing indices.", + "type": "number" } }, "required": [ - "id", - "version", - "database" + "backing_indices", + "data_stream", + "maximum_timestamp", + "store_size_bytes" ] }, - "ingest._types.DatabaseConfigurationFull": { + "_types.IndicesResponseBase": { "allOf": [ + { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] } - }, - "required": [ - "name" - ] + } + } + ] + }, + "indices.delete_alias.IndicesAliasesResponseBody": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, { "type": "object", "properties": { - "web": { - "$ref": "#/components/schemas/ingest._types.Web" - }, - "local": { - "$ref": "#/components/schemas/ingest._types.Local" - }, - "maxmind": { - "$ref": "#/components/schemas/ingest._types.Maxmind" - }, - "ipinfo": { - "$ref": "#/components/schemas/ingest._types.Ipinfo" + "errors": { + "type": "boolean" } - }, - "minProperties": 1, - "maxProperties": 1 + } } ] }, - "ingest._types.Web": { - "type": "object" + "_types.DataStreamNames": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.DataStreamName" + } + } + ] }, - "ingest._types.Local": { + "indices._types.DownsampleConfig": { "type": "object", "properties": { - "type": { - "type": "string" + "fixed_interval": { + "description": "The interval at which to aggregate the original time series index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationLarge" + } + ] + }, + "sampling_method": { + "description": "The sampling method used to reduce the documents; it can be either `aggregate` or `last_value`. Defaults to `aggregate`.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.SamplingMethod" + } + ] } }, "required": [ - "type" + "fixed_interval" ] }, - "ingest._types.Pipeline": { + "indices.explain_data_lifecycle.DataStreamLifecycleExplain": { "type": "object", "properties": { - "description": { - "description": "Description of the ingest pipeline.", - "type": "string" - }, - "on_failure": { - "description": "Processors to run immediately after a processor failure.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.ProcessorContainer" - } - }, - "processors": { - "description": "Processors used to perform transformations on documents before indexing.\nProcessors run sequentially in the order specified.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.ProcessorContainer" - } - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "deprecated": { - "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "managed_by_lifecycle": { "type": "boolean" }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - } - } - }, - "ingest._types.ProcessorContainer": { - "type": "object", - "properties": { - "append": { - "$ref": "#/components/schemas/ingest._types.AppendProcessor" - }, - "attachment": { - "$ref": "#/components/schemas/ingest._types.AttachmentProcessor" - }, - "bytes": { - "$ref": "#/components/schemas/ingest._types.BytesProcessor" - }, - "circle": { - "$ref": "#/components/schemas/ingest._types.CircleProcessor" - }, - "community_id": { - "$ref": "#/components/schemas/ingest._types.CommunityIDProcessor" - }, - "convert": { - "$ref": "#/components/schemas/ingest._types.ConvertProcessor" - }, - "csv": { - "$ref": "#/components/schemas/ingest._types.CsvProcessor" - }, - "date": { - "$ref": "#/components/schemas/ingest._types.DateProcessor" - }, - "date_index_name": { - "$ref": "#/components/schemas/ingest._types.DateIndexNameProcessor" - }, - "dissect": { - "$ref": "#/components/schemas/ingest._types.DissectProcessor" - }, - "dot_expander": { - "$ref": "#/components/schemas/ingest._types.DotExpanderProcessor" - }, - "drop": { - "$ref": "#/components/schemas/ingest._types.DropProcessor" - }, - "enrich": { - "$ref": "#/components/schemas/ingest._types.EnrichProcessor" - }, - "fail": { - "$ref": "#/components/schemas/ingest._types.FailProcessor" - }, - "fingerprint": { - "$ref": "#/components/schemas/ingest._types.FingerprintProcessor" - }, - "foreach": { - "$ref": "#/components/schemas/ingest._types.ForeachProcessor" - }, - "ip_location": { - "$ref": "#/components/schemas/ingest._types.IpLocationProcessor" - }, - "geo_grid": { - "$ref": "#/components/schemas/ingest._types.GeoGridProcessor" - }, - "geoip": { - "$ref": "#/components/schemas/ingest._types.GeoIpProcessor" - }, - "grok": { - "$ref": "#/components/schemas/ingest._types.GrokProcessor" - }, - "gsub": { - "$ref": "#/components/schemas/ingest._types.GsubProcessor" - }, - "html_strip": { - "$ref": "#/components/schemas/ingest._types.HtmlStripProcessor" - }, - "inference": { - "$ref": "#/components/schemas/ingest._types.InferenceProcessor" - }, - "join": { - "$ref": "#/components/schemas/ingest._types.JoinProcessor" - }, - "json": { - "$ref": "#/components/schemas/ingest._types.JsonProcessor" - }, - "kv": { - "$ref": "#/components/schemas/ingest._types.KeyValueProcessor" - }, - "lowercase": { - "$ref": "#/components/schemas/ingest._types.LowercaseProcessor" - }, - "network_direction": { - "$ref": "#/components/schemas/ingest._types.NetworkDirectionProcessor" - }, - "pipeline": { - "$ref": "#/components/schemas/ingest._types.PipelineProcessor" - }, - "redact": { - "$ref": "#/components/schemas/ingest._types.RedactProcessor" - }, - "registered_domain": { - "$ref": "#/components/schemas/ingest._types.RegisteredDomainProcessor" - }, - "remove": { - "$ref": "#/components/schemas/ingest._types.RemoveProcessor" - }, - "rename": { - "$ref": "#/components/schemas/ingest._types.RenameProcessor" - }, - "reroute": { - "$ref": "#/components/schemas/ingest._types.RerouteProcessor" - }, - "script": { - "$ref": "#/components/schemas/ingest._types.ScriptProcessor" - }, - "set": { - "$ref": "#/components/schemas/ingest._types.SetProcessor" - }, - "set_security_user": { - "$ref": "#/components/schemas/ingest._types.SetSecurityUserProcessor" - }, - "sort": { - "$ref": "#/components/schemas/ingest._types.SortProcessor" - }, - "split": { - "$ref": "#/components/schemas/ingest._types.SplitProcessor" - }, - "terminate": { - "$ref": "#/components/schemas/ingest._types.TerminateProcessor" - }, - "trim": { - "$ref": "#/components/schemas/ingest._types.TrimProcessor" - }, - "uppercase": { - "$ref": "#/components/schemas/ingest._types.UppercaseProcessor" - }, - "urldecode": { - "$ref": "#/components/schemas/ingest._types.UrlDecodeProcessor" - }, - "uri_parts": { - "$ref": "#/components/schemas/ingest._types.UriPartsProcessor" + "index_creation_date_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "user_agent": { - "$ref": "#/components/schemas/ingest._types.UserAgentProcessor" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "ingest._types.AppendProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "time_since_index_creation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "value": { - "description": "The value to be appended. Supports template snippets.", - "oneOf": [ - { - "type": "object" - }, - { - "type": "array", - "items": { - "type": "object" - } - } - ] - }, - "allow_duplicates": { - "description": "If `false`, the processor does not append values already present in the field.", - "type": "boolean" + "rollover_date_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } - }, - "required": [ - "field", - "value" ] - } - ] - }, - "ingest._types.ProcessorBase": { - "type": "object", - "properties": { - "description": { - "description": "Description of the processor.\nUseful for describing the purpose of the processor or its configuration.", - "type": "string" }, - "if": { - "$ref": "#/components/schemas/_types.Script" + "time_since_rollover": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "ignore_failure": { - "description": "Ignore failures for the processor.", - "type": "boolean" + "lifecycle": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + } + ] }, - "on_failure": { - "description": "Handle failures for the processor.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.ProcessorContainer" - } + "generation_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "tag": { - "description": "Identifier for the processor.\nUseful for debugging and metrics.", + "error": { "type": "string" } - } + }, + "required": [ + "index", + "managed_by_lifecycle" + ] }, - "ingest._types.AttachmentProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and field does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "indexed_chars": { - "description": "The number of chars being used for extraction to prevent huge fields.\nUse `-1` for no limit.", - "type": "number" - }, - "indexed_chars_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "properties": { - "description": "Array of properties to select to be stored.\nCan be `content`, `title`, `name`, `author`, `keywords`, `date`, `content_type`, `content_length`, `language`.", - "type": "array", - "items": { - "type": "string" - } - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "remove_binary": { - "description": "If true, the binary field will be removed from the document", - "type": "boolean" - }, - "resource_name": { - "description": "Field containing the name of the resource to decode.\nIf specified, the processor passes this resource name to the underlying Tika library to enable Resource Name Based Detection.", - "type": "string" + "indices.field_usage_stats.FieldsUsageBody": { + "type": "object", + "properties": { + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" } - }, - "required": [ - "field" ] } + }, + "required": [ + "_shards" ] }, - "ingest._types.BytesProcessor": { + "indices.forcemerge._types.ForceMergeResponseBody": { "allOf": [ { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" }, { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "task": { + "description": "task contains a task id returned when wait_for_completion=false,\nyou can use the task_id to get the status of the task at _tasks/", + "type": "string" } - }, - "required": [ - "field" - ] + } } ] }, - "ingest._types.CircleProcessor": { - "allOf": [ + "indices.get.Features": { + "oneOf": [ { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "$ref": "#/components/schemas/indices.get.Feature" }, { - "type": "object", - "properties": { - "error_distance": { - "description": "The difference between the resulting inscribed distance from center to side and the circle’s radius (measured in meters for `geo_shape`, unit-less for `shape`).", - "type": "number" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "shape_type": { - "$ref": "#/components/schemas/ingest._types.ShapeType" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "error_distance", - "field", - "shape_type" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get.Feature" + } } ] }, - "ingest._types.ShapeType": { + "indices.get.Feature": { "type": "string", "enum": [ - "geo_shape", - "shape" + "aliases", + "mappings", + "settings" ] }, - "ingest._types.CommunityIDProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { + "indices._types.IndexState": { + "type": "object", + "properties": { + "aliases": { "type": "object", - "properties": { - "source_ip": { - "$ref": "#/components/schemas/_types.Field" - }, - "source_port": { - "$ref": "#/components/schemas/_types.Field" - }, - "destination_ip": { - "$ref": "#/components/schemas/_types.Field" - }, - "destination_port": { - "$ref": "#/components/schemas/_types.Field" - }, - "iana_number": { - "$ref": "#/components/schemas/_types.Field" - }, - "icmp_type": { - "$ref": "#/components/schemas/_types.Field" - }, - "icmp_code": { - "$ref": "#/components/schemas/_types.Field" - }, - "transport": { - "$ref": "#/components/schemas/_types.Field" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "seed": { - "description": "Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The\nseed can prevent hash collisions between network domains, such as a staging\nand production network that use the same addressing scheme.", - "type": "number" - }, - "ignore_missing": { - "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", - "type": "boolean" + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "defaults": { + "description": "Default settings, included when the request's `include_default` is `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "data_stream": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" + } + ] + }, + "lifecycle": { + "description": "Data stream lifecycle applicable if this is a data stream.", + "x-state": "Generally available; Added in 8.11.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycle" } + ] + } + } + }, + "indices.get_alias._types.IndexAliases": { + "type": "object", + "properties": { + "aliases": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.AliasDefinition" } } + }, + "required": [ + "aliases" ] }, - "ingest._types.ConvertProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.get_data_lifecycle.DataStreamWithLifecycle": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" + } + ] }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "type": { - "$ref": "#/components/schemas/ingest._types.ConvertType" + "lifecycle": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" } - }, - "required": [ - "field", - "type" ] } + }, + "required": [ + "name" ] }, - "ingest._types.ConvertType": { - "type": "string", - "enum": [ - "integer", - "long", - "double", - "float", - "boolean", - "ip", - "string", - "auto" - ] - }, - "ingest._types.CsvProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.get_data_lifecycle_stats.DataStreamStats": { + "type": "object", + "properties": { + "backing_indices_in_error": { + "description": "The count of the backing indices for the data stream.", + "type": "number" }, - { - "type": "object", - "properties": { - "empty_value": { - "description": "Value used to fill empty fields.\nEmpty fields are skipped if this is not provided.\nAn empty field is one with no value (2 consecutive separators) or empty quotes (`\"\"`).", - "type": "object" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "quote": { - "description": "Quote used in CSV, has to be single character string.", - "type": "string" - }, - "separator": { - "description": "Separator used in CSV, has to be single character string.", - "type": "string" - }, - "target_fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "trim": { - "description": "Trim whitespaces in unquoted fields.", - "type": "boolean" + "backing_indices_in_total": { + "description": "The count of the backing indices for the data stream that have encountered an error.", + "type": "number" + }, + "name": { + "description": "The name of the data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" } - }, - "required": [ - "field", - "target_fields" ] } + }, + "required": [ + "backing_indices_in_error", + "backing_indices_in_total", + "name" ] }, - "ingest._types.DateProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices._types.DataStream": { + "type": "object", + "properties": { + "_meta": { + "description": "Custom metadata for the stream, copied from the `_meta` object of the stream’s matching index template.\nIf empty, the response omits this property.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "formats": { - "description": "An array of the expected date formats.\nCan be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.", - "type": "array", - "items": { - "type": "string" - } - }, - "locale": { - "description": "The locale to use when parsing the date, relevant when parsing month names or week days.\nSupports template snippets.", - "type": "string" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "timezone": { - "description": "The timezone to use when parsing the date.\nSupports template snippets.", - "type": "string" - }, - "output_format": { - "description": "The format to use when writing the date to target_field. Must be a valid\njava time pattern.", - "type": "string" + "allow_custom_routing": { + "description": "If `true`, the data stream allows custom routing on write request.", + "type": "boolean" + }, + "failure_store": { + "description": "Information about failure store backing indices", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.FailureStore" + } + ] + }, + "generation": { + "description": "Current generation for the data stream. This number acts as a cumulative count of the stream’s rollovers, starting at 1.", + "type": "number" + }, + "hidden": { + "description": "If `true`, the data stream is hidden.", + "type": "boolean" + }, + "ilm_policy": { + "description": "Name of the current ILM lifecycle policy in the stream’s matching index template.\nThis lifecycle policy is set in the `index.lifecycle.name` setting.\nIf the template does not include a lifecycle policy, this property is not included in the response.\nNOTE: A data stream’s backing indices may be assigned different lifecycle policies. To retrieve the lifecycle policy for individual backing indices, use the get index settings API.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "next_generation_managed_by": { + "description": "Name of the lifecycle system that'll manage the next generation of the data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.ManagedBy" + } + ] + }, + "prefer_ilm": { + "description": "Indicates if ILM should take precedence over DSL in case both are configured to managed this data stream.", + "type": "boolean" + }, + "indices": { + "description": "Array of objects containing information about the data stream’s backing indices.\nThe last item in this array contains information about the stream’s current write index.", + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.DataStreamIndex" + } + }, + "lifecycle": { + "description": "Contains the configuration for the data stream lifecycle of this data stream.", + "x-state": "Generally available; Added in 8.11.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + } + ] + }, + "name": { + "description": "Name of the data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" + } + ] + }, + "replicated": { + "description": "If `true`, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.", + "type": "boolean" + }, + "rollover_on_write": { + "description": "If `true`, the next write to this data stream will trigger a rollover first and the document will be indexed in the new backing index. If the rollover fails the indexing request will fail too.", + "type": "boolean" + }, + "settings": { + "description": "The settings specific to this data stream that will take precedence over the settings in the matching index\ntemplate.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "mappings": { + "description": "The mappings specific to this data stream that will take precedence over the mappings in the matching index\ntemplate.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "status": { + "description": "Health status of the data stream.\nThis health status is based on the state of the primary and replica shards of the stream’s backing indices.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.HealthStatus" + } + ] + }, + "system": { + "description": "If `true`, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.", + "x-state": "Generally available; Added in 7.10.0", + "type": "boolean" + }, + "template": { + "description": "Name of the index template used to create the data stream’s backing indices.\nThe template’s index pattern must match the name of this data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "timestamp_field": { + "description": "Information about the `@timestamp` field in the data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamTimestampField" + } + ] + }, + "index_mode": { + "description": "The index mode for the data stream that will be used for newly created backing indices.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexMode" } - }, - "required": [ - "field", - "formats" ] } + }, + "required": [ + "generation", + "hidden", + "next_generation_managed_by", + "prefer_ilm", + "indices", + "name", + "rollover_on_write", + "settings", + "status", + "template", + "timestamp_field" ] }, - "ingest._types.DateIndexNameProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices._types.FailureStore": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" }, - { - "type": "object", - "properties": { - "date_formats": { - "description": "An array of the expected date formats for parsing dates / timestamps in the document being preprocessed.\nCan be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.", - "type": "array", - "items": { - "type": "string" - } - }, - "date_rounding": { - "description": "How to round the date when formatting the date into the index name. Valid values are:\n`y` (year), `M` (month), `w` (week), `d` (day), `h` (hour), `m` (minute) and `s` (second).\nSupports template snippets.", - "type": "string" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "index_name_format": { - "description": "The format to be used when printing the parsed date into the index name.\nA valid java time pattern is expected here.\nSupports template snippets.", - "type": "string" - }, - "index_name_prefix": { - "description": "A prefix of the index name to be prepended before the printed date.\nSupports template snippets.", - "type": "string" - }, - "locale": { - "description": "The locale to use when parsing the date from the document being preprocessed, relevant when parsing month names or week days.", - "type": "string" - }, - "timezone": { - "description": "The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names.", - "type": "string" - } - }, - "required": [ - "date_rounding", - "field" - ] + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.DataStreamIndex" + } + }, + "rollover_on_write": { + "type": "boolean" } + }, + "required": [ + "enabled", + "indices", + "rollover_on_write" ] }, - "ingest._types.DissectProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices._types.DataStreamIndex": { + "type": "object", + "properties": { + "index_name": { + "description": "Name of the backing index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - { - "type": "object", - "properties": { - "append_separator": { - "description": "The character(s) that separate the appended fields.", - "type": "string" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "pattern": { - "description": "The pattern to apply to the field.", - "type": "string" + "index_uuid": { + "description": "Universally unique identifier (UUID) for the index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" } - }, - "required": [ - "field", - "pattern" ] - } - ] - }, - "ingest._types.DotExpanderProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "override": { - "description": "Controls the behavior when there is already an existing nested object that conflicts with the expanded field.\nWhen `false`, the processor will merge conflicts by combining the old and the new values into an array.\nWhen `true`, the value from the expanded field will overwrite the existing value.", - "type": "boolean" - }, - "path": { - "description": "The field that contains the field to expand.\nOnly required if the field to expand is part another object field, because the `field` option can only understand leaf fields.", - "type": "string" + "ilm_policy": { + "description": "Name of the current ILM lifecycle policy configured for this backing index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.DropProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object" - } - ] - }, - "ingest._types.EnrichProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "managed_by": { + "description": "Name of the lifecycle system that's currently managing this backing index.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.ManagedBy" + } + ] }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "max_matches": { - "description": "The maximum number of matched documents to include under the configured target field.\nThe `target_field` will be turned into a json array if `max_matches` is higher than 1, otherwise `target_field` will become a json object.\nIn order to avoid documents getting too large, the maximum allowed value is 128.", - "type": "number" - }, - "override": { - "description": "If processor will update fields with pre-existing non-null-valued field.\nWhen set to `false`, such fields will not be touched.", - "type": "boolean" - }, - "policy_name": { - "description": "The name of the enrich policy to use.", - "type": "string" - }, - "shape_relation": { - "$ref": "#/components/schemas/_types.GeoShapeRelation" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "prefer_ilm": { + "description": "Indicates if ILM should take precedence over DSL in case both are configured to manage this index.", + "type": "boolean" + }, + "index_mode": { + "description": "The index mode of this backing index of the data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexMode" } - }, - "required": [ - "field", - "policy_name", - "target_field" ] } + }, + "required": [ + "index_name", + "index_uuid" ] }, - "_types.GeoShapeRelation": { + "indices._types.ManagedBy": { "type": "string", "enum": [ - "intersects", - "disjoint", - "within", - "contains" + "Index Lifecycle Management", + "Data stream lifecycle", + "Unmanaged" ] }, - "ingest._types.FailProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { - "type": "object", - "properties": { - "message": { - "description": "The error message thrown by the processor.\nSupports template snippets.", - "type": "string" - } - }, - "required": [ - "message" - ] - } + "indices._types.IndexMode": { + "type": "string", + "enum": [ + "standard", + "time_series", + "logsdb", + "lookup" ] }, - "ingest._types.FingerprintProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { - "type": "object", - "properties": { - "fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "target_field": { + "indices._types.DataStreamTimestampField": { + "type": "object", + "properties": { + "name": { + "description": "Name of the timestamp field for the data stream, which must be `@timestamp`. The `@timestamp` field must be included in every document indexed to the data stream.", + "allOf": [ + { "$ref": "#/components/schemas/_types.Field" - }, - "salt": { - "description": "Salt value for the hash function.", - "type": "string" - }, - "method": { - "$ref": "#/components/schemas/ingest._types.FingerprintDigest" - }, - "ignore_missing": { - "description": "If true, the processor ignores any missing fields. If all fields are\nmissing, the processor silently exits without modifying the document.", - "type": "boolean" } - }, - "required": [ - "fields" ] } + }, + "required": [ + "name" ] }, - "ingest._types.FingerprintDigest": { - "type": "string", - "enum": [ - "MD5", - "SHA-1", - "SHA-256", - "SHA-512", - "MurmurHash3" - ] - }, - "ingest._types.ForeachProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.get_data_stream_mappings.DataStreamMappings": { + "type": "object", + "properties": { + "name": { + "description": "The name of the data stream.", + "type": "string" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true`, the processor silently exits without changing the document if the `field` is `null` or missing.", - "type": "boolean" - }, - "processor": { - "$ref": "#/components/schemas/ingest._types.ProcessorContainer" + "mappings": { + "description": "The settings specific to this data stream", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "effective_mappings": { + "description": "The settings specific to this data stream merged with the settings from its template. These `effective_settings`\nare the settings that will be used when a new index is created for this data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" } - }, - "required": [ - "field", - "processor" ] } + }, + "required": [ + "name", + "mappings", + "effective_mappings" ] }, - "ingest._types.IpLocationProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.get_data_stream_options.DataStreamWithOptions": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" + } + ] }, - { - "type": "object", - "properties": { - "database_file": { - "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", - "type": "string" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "first_only": { - "description": "If `true`, only the first found IP location data will be returned, even if the field contains an array.", - "type": "boolean" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "properties": { - "description": "Controls what properties are added to the `target_field` based on the IP location lookup.", - "type": "array", - "items": { - "type": "string" - } - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "download_database_on_pipeline_creation": { - "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", - "type": "boolean" + "options": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamOptions" } - }, - "required": [ - "field" ] } + }, + "required": [ + "name" ] }, - "ingest._types.GeoGridProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.get_data_stream_settings.DataStreamSettings": { + "type": "object", + "properties": { + "name": { + "description": "The name of the data stream.", + "type": "string" }, - { - "type": "object", - "properties": { - "field": { - "description": "The field to interpret as a geo-tile.=\nThe field format is determined by the `tile_type`.", - "type": "string" - }, - "tile_type": { - "$ref": "#/components/schemas/ingest._types.GeoGridTileType" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "parent_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "children_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "non_children_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "precision_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "target_format": { - "$ref": "#/components/schemas/ingest._types.GeoGridTargetFormat" + "settings": { + "description": "The settings specific to this data stream", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "effective_settings": { + "description": "The settings specific to this data stream merged with the settings from its template. These `effective_settings`\nare the settings that will be used when a new index is created for this data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" } - }, - "required": [ - "field", - "tile_type" ] } + }, + "required": [ + "name", + "settings", + "effective_settings" ] }, - "ingest._types.GeoGridTileType": { - "type": "string", - "enum": [ - "geotile", - "geohex", - "geohash" + "indices.get_field_mapping.TypeFieldMappings": { + "type": "object", + "properties": { + "mappings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.FieldMapping" + } + } + }, + "required": [ + "mappings" ] }, - "ingest._types.GeoGridTargetFormat": { - "type": "string", - "enum": [ - "geojson", - "wkt" + "_types.mapping.FieldMapping": { + "type": "object", + "properties": { + "full_name": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping.Property" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "required": [ + "full_name", + "mapping" ] }, - "ingest._types.GeoIpProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.get_index_template.IndexTemplateItem": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - { - "type": "object", - "properties": { - "database_file": { - "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", - "type": "string" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "first_only": { - "description": "If `true`, only the first found geoip data will be returned, even if the field contains an array.", - "type": "boolean" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "properties": { - "description": "Controls what properties are added to the `target_field` based on the geoip lookup.", - "type": "array", - "items": { - "type": "string" - } - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "download_database_on_pipeline_creation": { - "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", - "type": "boolean" + "index_template": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexTemplate" } - }, - "required": [ - "field" ] } + }, + "required": [ + "name", + "index_template" ] }, - "ingest._types.GrokProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices._types.IndexTemplate": { + "type": "object", + "properties": { + "index_patterns": { + "description": "Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Names" + } + ] }, - { - "type": "object", - "properties": { - "ecs_compatibility": { - "description": "Must be disabled or v1. If v1, the processor uses patterns with Elastic\nCommon Schema (ECS) field names.", - "type": "string" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "pattern_definitions": { - "description": "A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor.\nPatterns matching existing names will override the pre-existing definition.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "patterns": { - "description": "An ordered list of grok expression to match and extract named captures with.\nReturns on the first expression in the list that matches.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.GrokPattern" - } - }, - "trace_match": { - "description": "When `true`, `_ingest._grok_match_index` will be inserted into your matched document’s metadata with the index into the pattern found in `patterns` that matched.", - "type": "boolean" + "composed_of": { + "description": "An ordered list of component template names.\nComponent templates are merged in the order specified, meaning that the last component template specified has the highest precedence.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" + } + }, + "template": { + "description": "Template to be applied.\nIt may optionally include an `aliases`, `mappings`, or `settings` configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexTemplateSummary" + } + ] + }, + "version": { + "description": "Version number used to manage index templates externally.\nThis number is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "priority": { + "description": "Priority to determine index template precedence when a new data stream or index is created.\nThe index template with the highest priority is chosen.\nIf no priority is specified the template is treated as though it is of priority 0 (lowest priority).\nThis number is not automatically generated by Elasticsearch.", + "type": "number" + }, + "_meta": { + "description": "Optional user metadata about the index template. May have any contents.\nThis map is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "allow_auto_create": { + "type": "boolean" + }, + "data_stream": { + "description": "If this object is included, the template is used to create data streams and their backing indices.\nSupports an empty object.\nData streams require a matching index template with a `data_stream` object.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexTemplateDataStreamConfiguration" + } + ] + }, + "deprecated": { + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "x-state": "Generally available; Added in 8.12.0", + "type": "boolean" + }, + "ignore_missing_component_templates": { + "description": "A list of component template names that are allowed to be absent.", + "x-state": "Generally available; Added in 8.7.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Names" + } + ] + }, + "created_date": { + "description": "Date and time when the index template was created. Only returned if the `human` query parameter is `true`.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "created_date_millis": { + "description": "Date and time when the index template was created, in milliseconds since the epoch.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "modified_date": { + "description": "Date and time when the index template was last modified. Only returned if the `human` query parameter is `true`.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" } - }, - "required": [ - "field", - "patterns" ] - } - ] - }, - "_types.GrokPattern": { - "type": "string" - }, - "ingest._types.GsubProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "pattern": { - "description": "The pattern to be replaced.", - "type": "string" - }, - "replacement": { - "description": "The string to replace the matching patterns with.", - "type": "string" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "modified_date_millis": { + "description": "Date and time when the index template was last modified, in milliseconds since the epoch.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } - }, - "required": [ - "field", - "pattern", - "replacement" ] } + }, + "required": [ + "index_patterns", + "composed_of" ] }, - "ingest._types.HtmlStripProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { + "indices._types.IndexTemplateSummary": { + "type": "object", + "properties": { + "aliases": { + "description": "Aliases to add.\nIf the index template includes a `data_stream` object, these are data stream aliases.\nOtherwise, these are index aliases.\nData stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.", "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document,", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } + }, + "mappings": { + "description": "Mapping for fields in the index.\nIf specified, this mapping can include field names, field data types, and mapping parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.InferenceProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "model_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "field_map": { - "description": "Maps the document field names to the known field names of the model.\nThis mapping takes precedence over any default mappings provided in the model configuration.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "inference_config": { - "$ref": "#/components/schemas/ingest._types.InferenceConfig" - }, - "input_output": { - "description": "Input fields for inference and output (destination) fields for the inference results.\nThis option is incompatible with the target_field and field_map options.", - "oneOf": [ - { - "$ref": "#/components/schemas/ingest._types.InputConfig" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.InputConfig" - } - } - ] - }, - "ignore_missing": { - "description": "If true and any of the input fields defined in input_ouput are missing\nthen those missing fields are quietly ignored, otherwise a missing field causes a failure.\nOnly applies when using input_output configurations to explicitly list the input fields.", - "type": "boolean" + "settings": { + "description": "Configuration options for the index.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "lifecycle": { + "x-state": "Generally available; Added in 8.11.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + } + ] + }, + "data_stream_options": { + "x-state": "Generally available; Added in 8.19.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamOptions" } - }, - "required": [ - "model_id" ] } - ] + } }, - "ingest._types.InferenceConfig": { + "indices._types.IndexTemplateDataStreamConfiguration": { "type": "object", "properties": { - "regression": { - "$ref": "#/components/schemas/ingest._types.InferenceConfigRegression" + "hidden": { + "description": "If true, the data stream is hidden.", + "default": false, + "type": "boolean" }, - "classification": { - "$ref": "#/components/schemas/ingest._types.InferenceConfigClassification" + "allow_custom_routing": { + "description": "If true, the data stream supports custom routing.", + "default": false, + "type": "boolean" } - }, - "minProperties": 1, - "maxProperties": 1 + } }, - "ingest._types.InferenceConfigRegression": { + "indices.get_mapping.IndexMappingRecord": { "type": "object", "properties": { - "results_field": { - "$ref": "#/components/schemas/_types.Field" + "item": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] }, - "num_top_feature_importance_values": { - "description": "Specifies the maximum number of feature importance values per document.", - "type": "number" + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] } - } + }, + "required": [ + "mappings" + ] }, - "ingest._types.InferenceConfigClassification": { + "indices.get_migrate_reindex_status.StatusInProgress": { "type": "object", "properties": { - "num_top_classes": { - "description": "Specifies the number of top class predictions to return.", - "type": "number" + "index": { + "type": "string" }, - "num_top_feature_importance_values": { - "description": "Specifies the maximum number of feature importance values per document.", + "total_doc_count": { "type": "number" }, - "results_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "top_classes_results_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "prediction_field_type": { - "description": "Specifies the type of the predicted field to write.\nValid values are: `string`, `number`, `boolean`.", - "type": "string" + "reindexed_doc_count": { + "type": "number" } - } + }, + "required": [ + "index", + "total_doc_count", + "reindexed_doc_count" + ] }, - "ingest._types.InputConfig": { + "indices.get_migrate_reindex_status.StatusError": { "type": "object", "properties": { - "input_field": { + "index": { "type": "string" }, - "output_field": { + "message": { "type": "string" } }, "required": [ - "input_field", - "output_field" + "index", + "message" ] }, - "ingest._types.JoinProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { + "indices._types.TemplateMapping": { + "type": "object", + "properties": { + "aliases": { "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "separator": { - "description": "The separator character.", - "type": "string" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "field", - "separator" - ] - } - ] - }, - "ingest._types.JsonProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } }, - { - "type": "object", - "properties": { - "add_to_root": { - "description": "Flag that forces the parsed JSON to be added at the top level of the document.\n`target_field` must not be set when this option is chosen.", - "type": "boolean" - }, - "add_to_root_conflict_strategy": { - "$ref": "#/components/schemas/ingest._types.JsonProcessorConflictStrategy" - }, - "allow_duplicate_keys": { - "description": "When set to `true`, the JSON parser will not fail if the JSON contains duplicate keys.\nInstead, the last encountered value for any duplicate key wins.", - "type": "boolean" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "index_patterns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" + } + }, + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.JsonProcessorConflictStrategy": { - "type": "string", - "enum": [ - "replace", - "merge" - ] - }, - "ingest._types.KeyValueProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { + "order": { + "type": "number" + }, + "settings": { "type": "object", - "properties": { - "exclude_keys": { - "description": "List of keys to exclude from document.", - "type": "array", - "items": { - "type": "string" - } - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "field_split": { - "description": "Regex pattern to use for splitting key-value pairs.", - "type": "string" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "include_keys": { - "description": "List of keys to filter and insert into document.\nDefaults to including all keys.", - "type": "array", - "items": { - "type": "string" - } - }, - "prefix": { - "description": "Prefix to be added to extracted keys.", - "type": "string" - }, - "strip_brackets": { - "description": "If `true`. strip brackets `()`, `<>`, `[]` as well as quotes `'` and `\"` from extracted values.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "trim_key": { - "description": "String of characters to trim from extracted keys.", - "type": "string" - }, - "trim_value": { - "description": "String of characters to trim from extracted values.", - "type": "string" - }, - "value_split": { - "description": "Regex pattern to use for splitting the key from the value within a key-value pair.", - "type": "string" + "additionalProperties": { + "type": "object" + } + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" } - }, - "required": [ - "field", - "field_split", - "value_split" ] } + }, + "required": [ + "aliases", + "index_patterns", + "mappings", + "order", + "settings" ] }, - "ingest._types.LowercaseProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "indices.migrate_reindex.MigrateReindex": { + "type": "object", + "properties": { + "mode": { + "description": "Reindex mode. Currently only 'upgrade' is supported.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.migrate_reindex.ModeEnum" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.NetworkDirectionProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "source_ip": { - "$ref": "#/components/schemas/_types.Field" - }, - "destination_ip": { - "$ref": "#/components/schemas/_types.Field" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "internal_networks": { - "description": "List of internal networks. Supports IPv4 and IPv6 addresses and ranges in\nCIDR notation. Also supports the named ranges listed below. These may be\nconstructed with template snippets. Must specify only one of\ninternal_networks or internal_networks_field.", - "type": "array", - "items": { - "type": "string" - } - }, - "internal_networks_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", - "type": "boolean" + "source": { + "description": "The source index or data stream (only data streams are currently supported).", + "allOf": [ + { + "$ref": "#/components/schemas/indices.migrate_reindex.SourceIndex" } - } + ] } + }, + "required": [ + "mode", + "source" ] }, - "ingest._types.PipelineProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "ignore_missing_pipeline": { - "description": "Whether to ignore missing pipelines instead of failing.", - "type": "boolean" - } - }, - "required": [ - "name" - ] - } + "indices.migrate_reindex.ModeEnum": { + "type": "string", + "enum": [ + "upgrade" ] }, - "ingest._types.RedactProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "patterns": { - "description": "A list of grok expressions to match and redact named captures with", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.GrokPattern" - } - }, - "pattern_definitions": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "prefix": { - "description": "Start a redacted section with this token", - "type": "string" - }, - "suffix": { - "description": "End a redacted section with this token", - "type": "string" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "skip_if_unlicensed": { - "description": "If `true` and the current license does not support running redact processors, then the processor quietly exits without modifying the document", - "type": "boolean" - }, - "trace_redact": { - "description": "If `true` then ingest metadata `_ingest._redact._is_redacted` is set to `true` if the document has been redacted", - "type": "boolean" + "indices.migrate_reindex.SourceIndex": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - }, - "required": [ - "field", - "patterns" ] } + }, + "required": [ + "index" ] }, - "ingest._types.RegisteredDomainProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.modify_data_stream.Action": { + "type": "object", + "properties": { + "add_backing_index": { + "description": "Adds an existing index as a backing index for a data stream.\nThe index is hidden as part of this operation.\nWARNING: Adding indices with the `add_backing_index` action can potentially result in improper data stream behavior.\nThis should be considered an expert level API.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.modify_data_stream.IndexAndDataStreamAction" + } + ] }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", - "type": "boolean" + "remove_backing_index": { + "description": "Removes a backing index from a data stream.\nThe index is unhidden as part of this operation.\nA data stream’s write index cannot be removed.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.modify_data_stream.IndexAndDataStreamAction" } - }, - "required": [ - "field" ] } - ] + }, + "minProperties": 1, + "maxProperties": 1 }, - "ingest._types.RemoveProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.modify_data_stream.IndexAndDataStreamAction": { + "type": "object", + "properties": { + "data_stream": { + "description": "Data stream targeted by the action.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" + } + ] }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Fields" - }, - "keep": { - "$ref": "#/components/schemas/_types.Fields" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" + "index": { + "description": "Index for the action.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - }, - "required": [ - "field" ] } + }, + "required": [ + "data_stream", + "index" ] }, - "ingest._types.RenameProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.put_data_stream_mappings.UpdatedDataStreamMappings": { + "type": "object", + "properties": { + "name": { + "description": "The data stream name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "applied_to_data_stream": { + "description": "If the mappings were successfully applied to the data stream (or would have been, if running in `dry_run`\nmode), it is `true`. If an error occurred, it is `false`.", + "type": "boolean" + }, + "error": { + "description": "A message explaining why the mappings could not be applied to the data stream.", + "type": "string" + }, + "mappings": { + "description": "The mappings that are specfic to this data stream that will override any mappings from the matching index template.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] + }, + "effective_mappings": { + "description": "The mappings that are effective on this data stream, taking into account the mappings from the matching index\ntemplate and the mappings specific to this data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" } - }, - "required": [ - "field", - "target_field" ] } + }, + "required": [ + "name", + "applied_to_data_stream" ] }, - "ingest._types.RerouteProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.put_data_stream_settings.UpdatedDataStreamSettings": { + "type": "object", + "properties": { + "name": { + "description": "The data stream name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - { - "type": "object", - "properties": { - "destination": { - "description": "A static value for the target. Can’t be set when the dataset or namespace option is set.", - "type": "string" - }, - "dataset": { - "description": "Field references or a static value for the dataset part of the data stream name.\nIn addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.\nExample values are nginx.access and nginx.error.\n\nSupports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).\nWhen resolving field references, the processor replaces invalid characters with _. Uses the part\nof the index name as a fallback if all field references resolve to a null, missing, or non-string value.\n\ndefault {{data_stream.dataset}}", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "namespace": { - "description": "Field references or a static value for the namespace part of the data stream name. See the criteria for\nindex names for allowed characters. Must be no longer than 100 characters.\n\nSupports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).\nWhen resolving field references, the processor replaces invalid characters with _. Uses the part\nof the index name as a fallback if all field references resolve to a null, missing, or non-string value.\n\ndefault {{data_stream.namespace}}", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] + "applied_to_data_stream": { + "description": "If the settings were successfully applied to the data stream (or would have been, if running in `dry_run`\nmode), it is `true`. If an error occurred, it is `false`.", + "type": "boolean" + }, + "error": { + "description": "A message explaining why the settings could not be applied to the data stream.", + "type": "string" + }, + "settings": { + "description": "The settings that are specfic to this data stream that will override any settings from the matching index template.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" } - } + ] + }, + "effective_settings": { + "description": "The settings that are effective on this data stream, taking into account the settings from the matching index\ntemplate and the settings specific to this data stream.", + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] + }, + "index_settings_results": { + "description": "Information about whether and where each setting was applied.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.put_data_stream_settings.IndexSettingResults" + } + ] } + }, + "required": [ + "name", + "applied_to_data_stream", + "settings", + "effective_settings", + "index_settings_results" ] }, - "ingest._types.ScriptProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.put_data_stream_settings.IndexSettingResults": { + "type": "object", + "properties": { + "applied_to_data_stream_only": { + "description": "The list of settings that were applied to the data stream but not to backing indices. These will be applied to\nthe write index the next time the data stream is rolled over.", + "type": "array", + "items": { + "type": "string" + } }, - { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "lang": { - "$ref": "#/components/schemas/_types.ScriptLanguage" - }, - "params": { - "description": "Object containing parameters for the script.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "source": { - "$ref": "#/components/schemas/_types.ScriptSource" - } + "applied_to_data_stream_and_backing_indices": { + "description": "The list of settings that were applied to the data stream and to all of its backing indices. These settings will\nalso be applied to the write index the next time the data stream is rolled over.", + "type": "array", + "items": { + "type": "string" + } + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.put_data_stream_settings.DataStreamSettingsError" } } + }, + "required": [ + "applied_to_data_stream_only", + "applied_to_data_stream_and_backing_indices" ] }, - "ingest._types.SetProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" - }, - { - "type": "object", - "properties": { - "copy_from": { - "$ref": "#/components/schemas/_types.Field" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_empty_value": { - "description": "If `true` and `value` is a template snippet that evaluates to `null` or the empty string, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "media_type": { - "description": "The media type for encoding `value`.\nApplies only when value is a template snippet.\nMust be one of `application/json`, `text/plain`, or `application/x-www-form-urlencoded`.", - "type": "string" - }, - "override": { - "description": "If `true` processor will update fields with pre-existing non-null-valued field.\nWhen set to `false`, such fields will not be touched.", - "type": "boolean" - }, - "value": { - "description": "The value to be set for the field.\nSupports template snippets.\nMay specify only one of `value` or `copy_from`.", - "type": "object" + "indices.put_data_stream_settings.DataStreamSettingsError": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - }, - "required": [ - "field" ] + }, + "error": { + "description": "A message explaining why the settings could not be applied to specific indices.", + "type": "string" } + }, + "required": [ + "index", + "error" ] }, - "ingest._types.SetSecurityUserProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices._types.DataStreamVisibility": { + "type": "object", + "properties": { + "hidden": { + "type": "boolean" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "properties": { - "description": "Controls what user related properties are added to the field.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "field" - ] + "allow_custom_routing": { + "type": "boolean" + } + } + }, + "indices.recovery.RecoveryStatus": { + "type": "object", + "properties": { + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.recovery.ShardRecovery" + } } + }, + "required": [ + "shards" ] }, - "ingest._types.SortProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.recovery.ShardRecovery": { + "type": "object", + "properties": { + "id": { + "type": "number" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "order": { - "$ref": "#/components/schemas/_types.SortOrder" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.RecoveryIndexStatus" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.SplitProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "preserve_trailing": { - "description": "Preserves empty trailing fields, if any.", - "type": "boolean" - }, - "separator": { - "description": "A regex which matches the separator, for example, `,` or `\\s+`.", - "type": "string" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "primary": { + "type": "boolean" + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.RecoveryOrigin" } - }, - "required": [ - "field", - "separator" ] - } - ] - }, - "ingest._types.TerminateProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object" + "stage": { + "type": "string" + }, + "start": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.RecoveryStartStatus" + } + ] + }, + "start_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "start_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "stop_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "stop_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.RecoveryOrigin" + } + ] + }, + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "translog": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.TranslogStatus" + } + ] + }, + "type": { + "type": "string" + }, + "verify_index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.VerifyIndex" + } + ] } + }, + "required": [ + "id", + "index", + "primary", + "source", + "stage", + "start_time_in_millis", + "target", + "total_time_in_millis", + "translog", + "type", + "verify_index" ] }, - "ingest._types.TrimProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" + "indices.recovery.RecoveryIndexStatus": { + "type": "object", + "properties": { + "bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.RecoveryBytes" + } + ] }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "files": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.RecoveryFiles" + } + ] + }, + "size": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.recovery.RecoveryBytes" + } + ] + }, + "source_throttle_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.UppercaseProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "source_throttle_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.UrlDecodeProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "target_throttle_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.UriPartsProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "keep_original": { - "description": "If `true`, the processor copies the unparsed URI to `.original`.", - "type": "boolean" - }, - "remove_if_successful": { - "description": "If `true`, the processor removes the `field` after parsing the URI string.\nIf parsing fails, the processor does not remove the `field`.", - "type": "boolean" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" + "target_throttle_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.UserAgentProcessor": { - "allOf": [ - { - "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "ignore_missing": { - "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", - "type": "boolean" - }, - "regex_file": { - "description": "The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the `regexes.yaml` from uap-core it ships with.", - "type": "string" - }, - "target_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "properties": { - "description": "Controls what properties are added to `target_field`.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.UserAgentProperty" - } - }, - "extract_device_type": { - "description": "Extracts device type from the user agent string on a best-effort basis.", - "x-beta": true, - "type": "boolean" + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "field" ] - } - ] - }, - "ingest._types.UserAgentProperty": { - "type": "string", - "enum": [ - "name", - "os", - "device", - "original", - "version" - ] - }, - "ingest._types.Document": { - "type": "object", - "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" }, - "_source": { - "description": "JSON body for the document.", - "type": "object" + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "_source" + "files", + "size", + "source_throttle_time_in_millis", + "target_throttle_time_in_millis", + "total_time_in_millis" ] }, - "ingest._types.SimulateDocumentResult": { + "indices.recovery.RecoveryBytes": { "type": "object", "properties": { - "doc": { - "$ref": "#/components/schemas/ingest._types.DocumentSimulation" + "percent": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] }, - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" + "recovered": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "processor_results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.PipelineProcessorResult" - } - } - } - }, - "ingest._types.DocumentSimulation": { - "type": "object", - "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" + "recovered_in_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "recovered_from_snapshot": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "_ingest": { - "$ref": "#/components/schemas/ingest._types.Ingest" + "recovered_from_snapshot_in_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "_routing": { - "description": "Value used to send the document to a specific primary shard.", - "type": "string" + "reused": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "_source": { - "description": "JSON body for the document.", - "type": "object", - "additionalProperties": { - "type": "object" - } + "reused_in_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "_version": { - "$ref": "#/components/schemas/_spec_utils.StringifiedVersionNumber" + "total": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "_version_type": { - "$ref": "#/components/schemas/_types.VersionType" + "total_in_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] } }, "required": [ - "_id", - "_index", - "_ingest", - "_source" + "percent", + "recovered_in_bytes", + "reused_in_bytes", + "total_in_bytes" ] }, - "ingest._types.Ingest": { + "indices.recovery.RecoveryFiles": { "type": "object", "properties": { - "_redact": { - "$ref": "#/components/schemas/ingest._types.Redact" + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.recovery.FileDetails" + } }, - "timestamp": { - "$ref": "#/components/schemas/_types.DateTime" + "percent": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] }, - "pipeline": { - "$ref": "#/components/schemas/_types.Name" + "recovered": { + "type": "number" + }, + "reused": { + "type": "number" + }, + "total": { + "type": "number" } }, "required": [ - "timestamp" + "percent", + "recovered", + "reused", + "total" ] }, - "ingest._types.Redact": { + "indices.recovery.FileDetails": { "type": "object", "properties": { - "_is_redacted": { - "description": "indicates if document has been redacted", - "type": "boolean" - } - }, - "required": [ - "_is_redacted" - ] - }, - "_spec_utils.StringifiedVersionNumber": { - "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.VersionNumber" + "length": { + "type": "number" }, - { + "name": { "type": "string" + }, + "recovered": { + "type": "number" } + }, + "required": [ + "length", + "name", + "recovered" ] }, - "ingest._types.PipelineProcessorResult": { + "indices.recovery.RecoveryOrigin": { "type": "object", "properties": { - "doc": { - "$ref": "#/components/schemas/ingest._types.DocumentSimulation" - }, - "tag": { - "type": "string" - }, - "processor_type": { + "hostname": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/ingest._types.PipelineSimulationStatusOptions" - }, - "description": { - "type": "string" + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" + } + ] }, - "ignored_error": { - "$ref": "#/components/schemas/_types.ErrorCause" + "transport_address": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] }, - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" - } - } - }, - "ingest._types.PipelineSimulationStatusOptions": { - "type": "string", - "enum": [ - "success", - "error", - "error_ignored", - "skipped", - "dropped" - ] - }, - "license.get.LicenseInformation": { - "type": "object", - "properties": { - "expiry_date": { - "$ref": "#/components/schemas/_types.DateTime" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "expiry_date_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "ip": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ip" + } + ] }, - "issue_date": { - "$ref": "#/components/schemas/_types.DateTime" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "issue_date_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "bootstrap_new_history_uuid": { + "type": "boolean" }, - "issued_to": { - "type": "string" + "repository": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "issuer": { - "type": "string" + "snapshot": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "max_nodes": { - "oneOf": [ + "version": { + "allOf": [ { - "type": "number" - }, + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "restoreUUID": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.Uuid" } ] }, - "max_resource_units": { - "oneOf": [ + "index": { + "allOf": [ { - "type": "number" - }, + "$ref": "#/components/schemas/_types.IndexName" + } + ] + } + } + }, + "indices.recovery.RecoveryStartStatus": { + "type": "object", + "properties": { + "check_index_time": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.Duration" } ] }, - "status": { - "$ref": "#/components/schemas/license._types.LicenseStatus" - }, - "type": { - "$ref": "#/components/schemas/license._types.LicenseType" + "check_index_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "uid": { - "$ref": "#/components/schemas/_types.Uuid" + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "start_date_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "issue_date", - "issue_date_in_millis", - "issued_to", - "issuer", - "max_nodes", - "status", - "type", - "uid", - "start_date_in_millis" - ] - }, - "license._types.LicenseStatus": { - "type": "string", - "enum": [ - "active", - "valid", - "invalid", - "expired" - ] - }, - "license._types.LicenseType": { - "type": "string", - "enum": [ - "missing", - "trial", - "basic", - "standard", - "dev", - "silver", - "gold", - "platinum", - "enterprise" + "check_index_time_in_millis", + "total_time_in_millis" ] }, - "license._types.License": { + "indices.recovery.TranslogStatus": { "type": "object", "properties": { - "expiry_date_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "issue_date_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "start_date_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "issued_to": { - "type": "string" - }, - "issuer": { - "type": "string" - }, - "max_nodes": { - "oneOf": [ - { - "type": "number" - }, + "percent": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.Percentage" } ] }, - "max_resource_units": { + "recovered": { "type": "number" }, - "signature": { - "type": "string" + "total": { + "type": "number" }, - "type": { - "$ref": "#/components/schemas/license._types.LicenseType" + "total_on_start": { + "type": "number" }, - "uid": { - "type": "string" - } - }, - "required": [ - "expiry_date_in_millis", - "issue_date_in_millis", - "issued_to", - "issuer", - "signature", - "type", - "uid" - ] - }, - "license.post.Acknowledgement": { - "type": "object", - "properties": { - "license": { - "type": "array", - "items": { - "type": "string" - } + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "message": { - "type": "string" + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "license", - "message" + "percent", + "recovered", + "total", + "total_on_start", + "total_time_in_millis" ] }, - "logstash._types.Pipeline": { + "indices.recovery.VerifyIndex": { "type": "object", "properties": { - "description": { - "description": "A description of the pipeline.\nThis description is not used by Elasticsearch or Logstash.", - "type": "string" - }, - "last_modified": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "pipeline": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/logstash/configuration-file-structure" - }, - "description": "The configuration for the pipeline.", - "type": "string" + "check_index_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "pipeline_metadata": { - "$ref": "#/components/schemas/logstash._types.PipelineMetadata" + "check_index_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "pipeline_settings": { - "$ref": "#/components/schemas/logstash._types.PipelineSettings" + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "username": { - "description": "The user who last updated the pipeline.", - "type": "string" + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "description", - "last_modified", - "pipeline", - "pipeline_metadata", - "pipeline_settings", - "username" + "check_index_time_in_millis", + "total_time_in_millis" ] }, - "logstash._types.PipelineMetadata": { + "indices.reload_search_analyzers.ReloadResult": { "type": "object", "properties": { - "type": { - "type": "string" + "reload_details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadDetails" + } }, - "version": { - "type": "string" + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] } }, "required": [ - "type", - "version" + "reload_details", + "_shards" ] }, - "logstash._types.PipelineSettings": { + "indices.reload_search_analyzers.ReloadDetails": { "type": "object", "properties": { - "pipeline.workers": { - "description": "The number of workers that will, in parallel, execute the filter and output stages of the pipeline.", - "type": "number" - }, - "pipeline.batch.size": { - "description": "The maximum number of events an individual worker thread will collect from inputs before attempting to execute its filters and outputs.", - "type": "number" - }, - "pipeline.batch.delay": { - "description": "When creating pipeline event batches, how long in milliseconds to wait for each event before dispatching an undersized batch to pipeline workers.", - "type": "number" - }, - "queue.type": { - "description": "The internal queuing model to use for event buffering.", + "index": { "type": "string" }, - "queue.max_bytes": { - "description": "The total capacity of the queue (`queue.type: persisted`) in number of bytes.", - "type": "string" + "reloaded_analyzers": { + "type": "array", + "items": { + "type": "string" + } }, - "queue.checkpoint.writes": { - "description": "The maximum number of written events before forcing a checkpoint when persistent queues are enabled (`queue.type: persisted`).", - "type": "number" + "reloaded_node_ids": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "pipeline.workers", - "pipeline.batch.size", - "pipeline.batch.delay", - "queue.type", - "queue.max_bytes", - "queue.checkpoint.writes" + "index", + "reloaded_analyzers", + "reloaded_node_ids" ] }, - "_global.mget.Operation": { + "indices.remove_block.RemoveIndicesBlockStatus": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types.Fields" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "unblocked": { + "type": "boolean" }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" + "exception": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] } }, "required": [ - "_id" - ] - }, - "_global.mget.ResponseItem": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.get.GetResult" - }, - { - "$ref": "#/components/schemas/_global.mget.MultiGetError" - } + "name" ] }, - "_global.mget.MultiGetError": { + "indices.resolve_cluster.ResolveClusterInfo": { + "description": "Provides information about each cluster request relevant to doing a cross-cluster search.", "type": "object", "properties": { - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" + "connected": { + "description": "Whether the remote cluster is connected to the local (querying) cluster.", + "type": "boolean" }, - "_id": { - "$ref": "#/components/schemas/_types.Id" + "skip_unavailable": { + "description": "The `skip_unavailable` setting for a remote cluster.", + "type": "boolean" }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "matching_indices": { + "description": "Whether the index expression provided in the request matches any indices, aliases or data streams\non the cluster.", + "type": "boolean" + }, + "error": { + "description": "Provides error messages that are likely to occur if you do a search with this index expression\non the specified cluster (for example, lack of security privileges to query an index).", + "type": "string" + }, + "version": { + "description": "Provides version information about the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ElasticsearchVersionMinInfo" + } + ] } }, "required": [ - "error", - "_id", - "_index" + "connected", + "skip_unavailable" ] }, - "migration.deprecations.Deprecation": { + "_types.ElasticsearchVersionMinInfo": { + "description": "Reduced (minimal) info ElasticsearchVersion", "type": "object", "properties": { - "details": { - "description": "Optional details about the deprecation warning.", + "build_flavor": { "type": "string" }, - "level": { - "$ref": "#/components/schemas/migration.deprecations.DeprecationLevel" + "minimum_index_compatibility_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "message": { - "description": "Descriptive information about the deprecation warning.", - "type": "string" + "minimum_wire_compatibility_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "url": { - "description": "A link to the breaking change documentation, where you can find more information about this change.", + "number": { "type": "string" - }, - "resolve_during_rolling_upgrade": { - "type": "boolean" - }, - "_meta": { - "type": "object", - "additionalProperties": { - "type": "object" - } } }, "required": [ - "level", - "message", - "url", - "resolve_during_rolling_upgrade" - ] - }, - "migration.deprecations.DeprecationLevel": { - "type": "string", - "enum": [ - "none", - "info", - "warning", - "critical" + "build_flavor", + "minimum_index_compatibility_version", + "minimum_wire_compatibility_version", + "number" ] }, - "migration.get_feature_upgrade_status.MigrationFeature": { + "indices.resolve_index.ResolveIndexItem": { "type": "object", "properties": { - "feature_name": { - "type": "string" - }, - "minimum_index_version": { - "$ref": "#/components/schemas/_types.VersionString" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "migration_status": { - "$ref": "#/components/schemas/migration.get_feature_upgrade_status.MigrationStatus" + "aliases": { + "type": "array", + "items": { + "type": "string" + } }, - "indices": { + "attributes": { "type": "array", "items": { - "$ref": "#/components/schemas/migration.get_feature_upgrade_status.MigrationFeatureIndexInfo" + "type": "string" } + }, + "data_stream": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" + } + ] + }, + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexMode" + } + ] } }, "required": [ - "feature_name", - "minimum_index_version", - "migration_status", - "indices" - ] - }, - "migration.get_feature_upgrade_status.MigrationStatus": { - "type": "string", - "enum": [ - "NO_MIGRATION_NEEDED", - "MIGRATION_NEEDED", - "IN_PROGRESS", - "ERROR" + "name", + "attributes" ] }, - "migration.get_feature_upgrade_status.MigrationFeatureIndexInfo": { + "indices.resolve_index.ResolveIndexAliasItem": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "failure_cause": { - "$ref": "#/components/schemas/_types.ErrorCause" + "indices": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] } }, "required": [ - "index", - "version" + "name", + "indices" ] }, - "migration.post_feature_upgrade.MigrationFeature": { + "indices.resolve_index.ResolveIndexDataStreamsItem": { "type": "object", "properties": { - "feature_name": { - "type": "string" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DataStreamName" + } + ] + }, + "timestamp_field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "backing_indices": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] } }, "required": [ - "feature_name" + "name", + "timestamp_field", + "backing_indices" ] }, - "ml._types.AnalysisConfig": { + "indices.rollover.RolloverConditions": { "type": "object", "properties": { - "bucket_span": { - "$ref": "#/components/schemas/_types.Duration" + "min_age": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "categorization_analyzer": { - "$ref": "#/components/schemas/ml._types.CategorizationAnalyzer" + "max_age": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "categorization_field_name": { - "$ref": "#/components/schemas/_types.Field" + "max_age_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "categorization_filters": { - "description": "If `categorization_field_name` is specified, you can also define optional filters. This property expects an array of regular expressions. The expressions are used to filter out matching sequences from the categorization field values. You can use this functionality to fine tune the categorization by excluding sequences from consideration when categories are defined. For example, you can exclude SQL statements that appear in your log files. This property cannot be used at the same time as `categorization_analyzer`. If you only want to define simple regular expression filters that are applied prior to tokenization, setting this property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering, use the `categorization_analyzer` property instead and include the filters as pattern_replace character filters. The effect is exactly the same.", - "type": "array", - "items": { - "type": "string" - } + "min_docs": { + "type": "number" }, - "detectors": { - "description": "Detector configuration objects specify which data fields a job analyzes. They also specify which analytical functions are used. You can specify multiple detectors for a job. If the detectors array does not contain at least one detector, no analysis can occur and an error is returned.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Detector" - } + "max_docs": { + "type": "number" }, - "influencers": { - "description": "A comma separated list of influencer field names. Typically these can be the by, over, or partition fields that are used in the detector configuration. You might also want to use a field name that is not specifically named in a detector, but is available as part of the input data. When you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" - } + "max_size": { + "deprecated": true, + "description": "The `max_size` condition has been deprecated in 9.3.0 and `max_primary_shard_size` should be used instead", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "latency": { - "$ref": "#/components/schemas/_types.Duration" + "max_size_bytes": { + "type": "number" }, - "model_prune_window": { - "$ref": "#/components/schemas/_types.Duration" + "min_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "multivariate_by_fields": { - "description": "This functionality is reserved for internal use. It is not supported for use in customer environments and is not subject to the support SLA of official GA features. If set to `true`, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold. For example, suppose CPU and memory usage on host A is usually highly correlated with the same metrics on host B. Perhaps this correlation occurs because they are running a load-balanced application. If you enable this property, anomalies will be reported when, for example, CPU usage on host A is high and the value of CPU usage on host B is low. That is to say, you’ll see an anomaly when the CPU of host A is unusual given the CPU of host B. To use the `multivariate_by_fields` property, you must also specify `by_field_name` in your detector.", - "type": "boolean" + "min_size_bytes": { + "type": "number" + }, + "max_primary_shard_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "max_primary_shard_size_bytes": { + "type": "number" + }, + "min_primary_shard_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "min_primary_shard_size_bytes": { + "type": "number" + }, + "max_primary_shard_docs": { + "type": "number" + }, + "min_primary_shard_docs": { + "type": "number" + } + } + }, + "indices.segments.IndexSegment": { + "type": "object", + "properties": { + "shards": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices.segments.ShardsSegment" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.segments.ShardsSegment" + } + } + ] + } + } + }, + "required": [ + "shards" + ] + }, + "indices.segments.ShardsSegment": { + "type": "object", + "properties": { + "num_committed_segments": { + "type": "number" + }, + "routing": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.segments.ShardSegmentRouting" + } + ] }, - "per_partition_categorization": { - "$ref": "#/components/schemas/ml._types.PerPartitionCategorization" + "num_search_segments": { + "type": "number" }, - "summary_count_field_name": { - "$ref": "#/components/schemas/_types.Field" + "segments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.segments.Segment" + } } }, "required": [ - "detectors" - ] - }, - "ml._types.CategorizationAnalyzer": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ml._types.CategorizationAnalyzerDefinition" - } + "num_committed_segments", + "routing", + "num_search_segments", + "segments" ] }, - "ml._types.CategorizationAnalyzerDefinition": { + "indices.segments.ShardSegmentRouting": { "type": "object", "properties": { - "char_filter": { - "description": "One or more character filters. In addition to the built-in character filters, other plugins can provide more character filters. If this property is not specified, no character filters are applied prior to categorization. If you are customizing some other aspect of the analyzer and you need to achieve the equivalent of `categorization_filters` (which are not permitted when some other aspect of the analyzer is customized), add them here as pattern replace character filters.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.CharFilter" - } + "node": { + "type": "string" }, - "filter": { - "description": "One or more token filters. In addition to the built-in token filters, other plugins can provide more token filters. If this property is not specified, no token filters are applied prior to categorization.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.TokenFilter" - } + "primary": { + "type": "boolean" }, - "tokenizer": { - "$ref": "#/components/schemas/_types.analysis.Tokenizer" + "state": { + "type": "string" } - } + }, + "required": [ + "node", + "primary", + "state" + ] }, - "ml._types.Detector": { + "indices.segments.Segment": { "type": "object", "properties": { - "by_field_name": { - "$ref": "#/components/schemas/_types.Field" - }, - "custom_rules": { - "description": "Custom rules enable you to customize the way detectors operate. For example, a rule may dictate conditions under which results should be skipped. Kibana refers to custom rules as job rules.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DetectionRule" + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" } }, - "detector_description": { - "description": "A description of the detector.", - "type": "string" + "committed": { + "type": "boolean" }, - "detector_index": { - "description": "A unique identifier for the detector. This identifier is based on the order of the detectors in the `analysis_config`, starting at zero. If you specify a value for this property, it is ignored.", - "type": "number" + "compound": { + "type": "boolean" }, - "exclude_frequent": { - "$ref": "#/components/schemas/ml._types.ExcludeFrequent" + "deleted_docs": { + "type": "number" }, - "field_name": { - "$ref": "#/components/schemas/_types.Field" + "generation": { + "type": "number" }, - "function": { - "description": "The analysis function that is used. For example, `count`, `rare`, `mean`, `min`, `max`, or `sum`.", - "type": "string" + "search": { + "type": "boolean" }, - "over_field_name": { - "$ref": "#/components/schemas/_types.Field" + "size_in_bytes": { + "type": "number" }, - "partition_field_name": { - "$ref": "#/components/schemas/_types.Field" + "num_docs": { + "type": "number" }, - "use_null": { - "description": "Defines whether a new series is used as the null series when there is no value for the by or partition fields.", - "type": "boolean" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] } - } + }, + "required": [ + "attributes", + "committed", + "compound", + "deleted_docs", + "generation", + "search", + "size_in_bytes", + "num_docs", + "version" + ] }, - "ml._types.DetectionRule": { + "indices.shard_stores.ShardStoreStatus": { + "type": "string", + "enum": [ + "green", + "yellow", + "red", + "all" + ] + }, + "indices.shard_stores.IndicesShardStores": { "type": "object", "properties": { - "actions": { - "description": "The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined.\n\nSupported values include:\n - `skip_result`: The result will not be created. Unless you also specify `skip_model_update`, the model will be updated as usual with the corresponding series value.\n - `skip_model_update`: The value for that series will not be used to update the model. Unless you also specify `skip_result`, the results will be created as usual. This action is suitable when certain values are expected to be consistently anomalous and they affect the model in a way that negatively impacts the rest of the results.\n\n", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.RuleAction" - } - }, - "conditions": { - "description": "An array of numeric conditions when the rule applies. A rule must either have a non-empty scope or at least one condition. Multiple conditions are combined together with a logical AND.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.RuleCondition" - } - }, - "scope": { - "description": "A scope of series where the rule applies. A rule must either have a non-empty scope or at least one condition. By default, the scope includes all series. Scoping is allowed for any of the fields that are also specified in `by_field_name`, `over_field_name`, or `partition_field_name`.", + "shards": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/ml._types.FilterRef" + "$ref": "#/components/schemas/indices.shard_stores.ShardStoreWrapper" } } - } - }, - "ml._types.RuleAction": { - "type": "string", - "enum": [ - "skip_result", - "skip_model_update" + }, + "required": [ + "shards" ] }, - "ml._types.RuleCondition": { + "indices.shard_stores.ShardStoreWrapper": { "type": "object", "properties": { - "applies_to": { - "$ref": "#/components/schemas/ml._types.AppliesTo" - }, - "operator": { - "$ref": "#/components/schemas/ml._types.ConditionOperator" - }, - "value": { - "description": "The value that is compared against the `applies_to` field using the operator.", - "type": "number" + "stores": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.shard_stores.ShardStore" + } } }, "required": [ - "applies_to", - "operator", - "value" - ] - }, - "ml._types.AppliesTo": { - "type": "string", - "enum": [ - "actual", - "typical", - "diff_from_typical", - "time" - ] - }, - "ml._types.ConditionOperator": { - "type": "string", - "enum": [ - "gt", - "gte", - "lt", - "lte" + "stores" ] }, - "ml._types.FilterRef": { + "indices.shard_stores.ShardStore": { "type": "object", "properties": { - "filter_id": { - "$ref": "#/components/schemas/_types.Id" + "allocation": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.shard_stores.ShardStoreAllocation" + } + ] }, - "filter_type": { - "$ref": "#/components/schemas/ml._types.FilterType" + "allocation_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "store_exception": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.shard_stores.ShardStoreException" + } + ] } }, "required": [ - "filter_id" - ] - }, - "ml._types.FilterType": { - "type": "string", - "enum": [ - "include", - "exclude" + "allocation" ] }, - "ml._types.ExcludeFrequent": { + "indices.shard_stores.ShardStoreAllocation": { "type": "string", "enum": [ - "all", - "none", - "by", - "over" + "primary", + "replica", + "unused" ] }, - "ml._types.PerPartitionCategorization": { + "indices.shard_stores.ShardStoreException": { "type": "object", "properties": { - "enabled": { - "description": "To enable this setting, you must also set the `partition_field_name` property to the same value in every detector that uses the keyword `mlcategory`. Otherwise, job creation fails.", - "type": "boolean" + "reason": { + "type": "string" }, - "stop_on_warn": { - "description": "This setting can be set to true only if per-partition categorization is enabled. If true, both categorization and subsequent anomaly detection stops for partitions where the categorization status changes to warn. This setting makes it viable to have a job where it is expected that categorization works well for some partitions but not others; you do not pay the cost of bad categorization forever in the partitions where it works badly.", - "type": "boolean" + "type": { + "type": "string" } - } + }, + "required": [ + "reason", + "type" + ] }, - "ml._types.DataframeEvaluationContainer": { + "indices.simulate_template.Overlapping": { "type": "object", "properties": { - "classification": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationClassification" - }, - "outlier_detection": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationOutlierDetection" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "regression": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegression" + "index_patterns": { + "type": "array", + "items": { + "type": "string" + } } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "name", + "index_patterns" + ] }, - "ml._types.DataframeEvaluationClassification": { + "indices.simulate_template.Template": { "type": "object", "properties": { - "actual_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "predicted_field": { - "$ref": "#/components/schemas/_types.Field" + "aliases": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types.Alias" + } }, - "top_classes_field": { - "$ref": "#/components/schemas/_types.Field" + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] }, - "metrics": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationClassificationMetrics" + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + ] } }, "required": [ - "actual_field" + "aliases", + "mappings", + "settings" ] }, - "ml._types.DataframeEvaluationClassificationMetrics": { - "allOf": [ + "_types.CommonStatsFlags": { + "oneOf": [ { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationMetrics" + "$ref": "#/components/schemas/_types.CommonStatsFlag" }, { - "type": "object", - "properties": { - "accuracy": { - "description": "Accuracy of predictions (per-class and overall).", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "multiclass_confusion_matrix": { - "description": "Multiclass confusion matrix.", - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.CommonStatsFlag" } } ] }, - "ml._types.DataframeEvaluationMetrics": { + "_types.CommonStatsFlag": { + "type": "string", + "enum": [ + "_all", + "store", + "indexing", + "get", + "search", + "merge", + "flush", + "refresh", + "query_cache", + "fielddata", + "docs", + "warmer", + "completion", + "segments", + "translog", + "request_cache", + "recovery", + "bulk", + "shard_stats", + "mappings", + "dense_vector", + "sparse_vector" + ] + }, + "indices.stats.IndicesStats": { "type": "object", "properties": { - "auc_roc": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationClassificationMetricsAucRoc" + "primaries": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndexStats" + } + ] }, - "precision": { - "description": "Precision of predictions (per-class and average).", + "shards": { "type": "object", "additionalProperties": { - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.stats.ShardStats" + } } }, - "recall": { - "description": "Recall of predictions (per-class and average).", - "type": "object", - "additionalProperties": { - "type": "object" - } + "total": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndexStats" + } + ] + }, + "uuid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" + } + ] + }, + "health": { + "x-state": "Generally available; Added in 8.1.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.HealthStatus" + } + ] + }, + "status": { + "x-state": "Generally available; Added in 8.1.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndexMetadataState" + } + ] } } }, - "ml._types.DataframeEvaluationClassificationMetricsAucRoc": { + "indices.stats.IndexStats": { "type": "object", "properties": { - "class_name": { - "$ref": "#/components/schemas/_types.Name" + "completion": { + "description": "Contains statistics about completions across all shards assigned to the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.CompletionStats" + } + ] }, - "include_curve": { - "description": "Whether or not the curve should be returned in addition to the score. Default value is false.", - "type": "boolean" + "docs": { + "description": "Contains statistics about documents across all primary shards assigned to the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DocStats" + } + ] + }, + "fielddata": { + "description": "Contains statistics about the field data cache across all shards assigned to the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.FielddataStats" + } + ] + }, + "flush": { + "description": "Contains statistics about flush operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.FlushStats" + } + ] + }, + "get": { + "description": "Contains statistics about get operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GetStats" + } + ] + }, + "indexing": { + "description": "Contains statistics about indexing operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexingStats" + } + ] + }, + "indices": { + "description": "Contains statistics about indices operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndicesStats" + } + ] + }, + "merges": { + "description": "Contains statistics about merge operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.MergesStats" + } + ] + }, + "query_cache": { + "description": "Contains statistics about the query cache across all shards assigned to the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.QueryCacheStats" + } + ] + }, + "recovery": { + "description": "Contains statistics about recovery operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RecoveryStats" + } + ] + }, + "refresh": { + "description": "Contains statistics about refresh operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RefreshStats" + } + ] + }, + "request_cache": { + "description": "Contains statistics about the request cache across all shards assigned to the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.RequestCacheStats" + } + ] + }, + "search": { + "description": "Contains statistics about search operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SearchStats" + } + ] + }, + "segments": { + "description": "Contains statistics about segments across all shards assigned to the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SegmentsStats" + } + ] + }, + "store": { + "description": "Contains statistics about the size of shards assigned to the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.StoreStats" + } + ] + }, + "translog": { + "description": "Contains statistics about transaction log operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TranslogStats" + } + ] + }, + "warmer": { + "description": "Contains statistics about index warming operations for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.WarmerStats" + } + ] + }, + "bulk": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.BulkStats" + } + ] + }, + "shard_stats": { + "x-state": "Generally available; Added in 7.15.0", + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardsTotalStats" + } + ] } } }, - "ml._types.DataframeEvaluationOutlierDetection": { + "_types.FlushStats": { "type": "object", "properties": { - "actual_field": { - "$ref": "#/components/schemas/_types.Field" + "periodic": { + "type": "number" }, - "predicted_probability_field": { - "$ref": "#/components/schemas/_types.Field" + "total": { + "type": "number" }, - "metrics": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationOutlierDetectionMetrics" - } - }, - "required": [ - "actual_field", - "predicted_probability_field" - ] - }, - "ml._types.DataframeEvaluationOutlierDetectionMetrics": { - "allOf": [ - { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationMetrics" + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - { - "type": "object", - "properties": { - "confusion_matrix": { - "description": "Accuracy of predictions (per-class and overall).", - "type": "object", - "additionalProperties": { - "type": "object" - } + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - } + ] } + }, + "required": [ + "periodic", + "total", + "total_time_in_millis" ] }, - "ml._types.DataframeEvaluationRegression": { + "_types.GetStats": { "type": "object", "properties": { - "actual_field": { - "$ref": "#/components/schemas/_types.Field" + "current": { + "type": "number" }, - "predicted_field": { - "$ref": "#/components/schemas/_types.Field" + "exists_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "metrics": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegressionMetrics" + "exists_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "exists_total": { + "type": "number" + }, + "missing_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "missing_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "missing_total": { + "type": "number" + }, + "time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "total": { + "type": "number" } }, "required": [ - "actual_field", - "predicted_field" + "current", + "exists_time_in_millis", + "exists_total", + "missing_time_in_millis", + "missing_total", + "time_in_millis", + "total" ] }, - "ml._types.DataframeEvaluationRegressionMetrics": { + "_types.IndexingStats": { "type": "object", "properties": { - "mse": { - "description": "Average squared difference between the predicted values and the actual (ground truth) value. For more information, read this wiki article.", - "type": "object", - "additionalProperties": { - "type": "object" - } + "index_current": { + "type": "number" }, - "msle": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegressionMetricsMsle" + "delete_current": { + "type": "number" }, - "huber": { - "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegressionMetricsHuber" + "delete_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "r_squared": { - "description": "Proportion of the variance in the dependent variable that is predictable from the independent variables.", + "delete_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "delete_total": { + "type": "number" + }, + "is_throttled": { + "type": "boolean" + }, + "noop_update_total": { + "type": "number" + }, + "throttle_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttle_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "index_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "index_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "index_total": { + "type": "number" + }, + "index_failed": { + "type": "number" + }, + "types": { "type": "object", "additionalProperties": { - "type": "object" + "$ref": "#/components/schemas/_types.IndexingStats" } - } - } - }, - "ml._types.DataframeEvaluationRegressionMetricsMsle": { - "type": "object", - "properties": { - "offset": { - "description": "Defines the transition point at which you switch from minimizing quadratic error to minimizing quadratic log error. Defaults to 1.", + }, + "write_load": { "type": "number" - } - } - }, - "ml._types.DataframeEvaluationRegressionMetricsHuber": { - "type": "object", - "properties": { - "delta": { - "description": "Approximates 1/2 (prediction - actual)2 for values much less than delta and approximates a straight line with slope delta for values much larger than delta. Defaults to 1. Delta needs to be greater than 0.", + }, + "recent_write_load": { + "type": "number" + }, + "peak_write_load": { "type": "number" } - } + }, + "required": [ + "index_current", + "delete_current", + "delete_time_in_millis", + "delete_total", + "is_throttled", + "noop_update_total", + "throttle_time_in_millis", + "index_time_in_millis", + "index_total", + "index_failed" + ] }, - "ml.evaluate_data_frame.DataframeClassificationSummary": { + "_types.MergesStats": { "type": "object", "properties": { - "auc_roc": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationSummaryAucRoc" + "current": { + "type": "number" }, - "accuracy": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryAccuracy" + "current_docs": { + "type": "number" }, - "multiclass_confusion_matrix": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryMulticlassConfusionMatrix" + "current_size": { + "type": "string" }, - "precision": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryPrecision" + "current_size_in_bytes": { + "type": "number" }, - "recall": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryRecall" - } - } - }, - "ml.evaluate_data_frame.DataframeEvaluationSummaryAucRoc": { - "allOf": [ - { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + "total": { + "type": "number" }, - { - "type": "object", - "properties": { - "curve": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationSummaryAucRocCurveItem" - } + "total_auto_throttle": { + "type": "string" + }, + "total_auto_throttle_in_bytes": { + "type": "number" + }, + "total_docs": { + "type": "number" + }, + "total_size": { + "type": "string" + }, + "total_size_in_bytes": { + "type": "number" + }, + "total_stopped_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - } + ] + }, + "total_stopped_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "total_throttled_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_throttled_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } + }, + "required": [ + "current", + "current_docs", + "current_size_in_bytes", + "total", + "total_auto_throttle_in_bytes", + "total_docs", + "total_size_in_bytes", + "total_stopped_time_in_millis", + "total_throttled_time_in_millis", + "total_time_in_millis" ] }, - "ml.evaluate_data_frame.DataframeEvaluationSummaryAucRocCurveItem": { + "_types.RecoveryStats": { "type": "object", "properties": { - "tpr": { + "current_as_source": { "type": "number" }, - "fpr": { + "current_as_target": { "type": "number" }, - "threshold": { - "type": "number" + "throttle_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttle_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "tpr", - "fpr", - "threshold" + "current_as_source", + "current_as_target", + "throttle_time_in_millis" ] }, - "ml.evaluate_data_frame.DataframeEvaluationValue": { + "_types.RefreshStats": { "type": "object", "properties": { - "value": { + "external_total": { + "type": "number" + }, + "external_total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "listeners": { + "type": "number" + }, + "total": { "type": "number" + }, + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "value" + "external_total", + "external_total_time_in_millis", + "listeners", + "total", + "total_time_in_millis" ] }, - "ml.evaluate_data_frame.DataframeClassificationSummaryAccuracy": { + "_types.RequestCacheStats": { "type": "object", "properties": { - "classes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationClass" - } + "evictions": { + "type": "number" }, - "overall_accuracy": { + "hit_count": { + "type": "number" + }, + "memory_size": { + "type": "string" + }, + "memory_size_in_bytes": { + "type": "number" + }, + "miss_count": { "type": "number" } }, "required": [ - "classes", - "overall_accuracy" + "evictions", + "hit_count", + "memory_size_in_bytes", + "miss_count" ] }, - "ml.evaluate_data_frame.DataframeEvaluationClass": { - "allOf": [ - { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + "_types.SearchStats": { + "type": "object", + "properties": { + "fetch_current": { + "type": "number" }, - { - "type": "object", - "properties": { - "class_name": { - "$ref": "#/components/schemas/_types.Name" + "fetch_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "required": [ - "class_name" ] - } - ] - }, - "ml.evaluate_data_frame.DataframeClassificationSummaryMulticlassConfusionMatrix": { - "type": "object", - "properties": { - "confusion_matrix": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.ConfusionMatrixItem" + }, + "fetch_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "fetch_total": { + "type": "number" + }, + "open_contexts": { + "type": "number" + }, + "query_current": { + "type": "number" + }, + "query_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "query_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "query_total": { + "type": "number" + }, + "scroll_current": { + "type": "number" + }, + "scroll_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "scroll_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "scroll_total": { + "type": "number" + }, + "suggest_current": { + "type": "number" + }, + "suggest_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "suggest_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "suggest_total": { + "type": "number" + }, + "recent_search_load": { + "type": "number" + }, + "groups": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.SearchStats" } - }, - "other_actual_class_count": { - "type": "number" } }, "required": [ - "confusion_matrix", - "other_actual_class_count" + "fetch_current", + "fetch_time_in_millis", + "fetch_total", + "query_current", + "query_time_in_millis", + "query_total", + "scroll_current", + "scroll_time_in_millis", + "scroll_total", + "suggest_current", + "suggest_time_in_millis", + "suggest_total" ] }, - "ml.evaluate_data_frame.ConfusionMatrixItem": { + "_types.TranslogStats": { "type": "object", "properties": { - "actual_class": { - "$ref": "#/components/schemas/_types.Name" + "earliest_last_modified_age": { + "type": "number" }, - "actual_class_doc_count": { + "operations": { "type": "number" }, - "predicted_classes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.ConfusionMatrixPrediction" - } + "size": { + "type": "string" }, - "other_predicted_class_doc_count": { + "size_in_bytes": { "type": "number" - } - }, - "required": [ - "actual_class", - "actual_class_doc_count", - "predicted_classes", - "other_predicted_class_doc_count" - ] - }, - "ml.evaluate_data_frame.ConfusionMatrixPrediction": { - "type": "object", - "properties": { - "predicted_class": { - "$ref": "#/components/schemas/_types.Name" }, - "count": { + "uncommitted_operations": { "type": "number" - } - }, - "required": [ - "predicted_class", - "count" - ] - }, - "ml.evaluate_data_frame.DataframeClassificationSummaryPrecision": { - "type": "object", - "properties": { - "classes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationClass" - } }, - "avg_precision": { - "type": "number" - } - }, - "required": [ - "classes", - "avg_precision" - ] - }, - "ml.evaluate_data_frame.DataframeClassificationSummaryRecall": { - "type": "object", - "properties": { - "classes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationClass" - } + "uncommitted_size": { + "type": "string" }, - "avg_recall": { + "uncommitted_size_in_bytes": { "type": "number" } }, "required": [ - "classes", - "avg_recall" + "earliest_last_modified_age", + "operations", + "size_in_bytes", + "uncommitted_operations", + "uncommitted_size_in_bytes" ] }, - "ml.evaluate_data_frame.DataframeOutlierDetectionSummary": { - "type": "object", - "properties": { - "auc_roc": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationSummaryAucRoc" - }, - "precision": { - "description": "Set the different thresholds of the outlier score at where the metric is calculated.", - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "recall": { - "description": "Set the different thresholds of the outlier score at where the metric is calculated.", - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "confusion_matrix": { - "description": "Set the different thresholds of the outlier score at where the metrics (`tp` - true positive, `fp` - false positive, `tn` - true negative, `fn` - false negative) are calculated.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.ConfusionMatrixThreshold" - } - } - } - }, - "ml.evaluate_data_frame.ConfusionMatrixThreshold": { + "_types.WarmerStats": { "type": "object", "properties": { - "tp": { - "description": "True Positive", + "current": { "type": "number" }, - "fp": { - "description": "False Positive", + "total": { "type": "number" }, - "tn": { - "description": "True Negative", - "type": "number" + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "fn": { - "description": "False Negative", - "type": "number" + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "tp", - "fp", - "tn", - "fn" + "current", + "total", + "total_time_in_millis" ] }, - "ml.evaluate_data_frame.DataframeRegressionSummary": { + "_types.BulkStats": { "type": "object", "properties": { - "huber": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + "total_operations": { + "type": "number" }, - "mse": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + "total_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "msle": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + "total_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "r_squared": { - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" - } - } - }, - "ml._types.DataframeAnalyticsSource": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.Indices" + "total_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "total_size_in_bytes": { + "type": "number" }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + "avg_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "_source": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" - } - }, - "required": [ - "index" - ] - }, - "ml._types.DataframeAnalysisAnalyzedFields": { - "type": "object", - "properties": { - "includes": { - "description": "An array of strings that defines the fields that will be excluded from the analysis. You do not need to add fields with unsupported data types to excludes, these fields are excluded from the analysis automatically.", - "type": "array", - "items": { - "type": "string" - } + "avg_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "excludes": { - "description": "An array of strings that defines the fields that will be included in the analysis.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "ml._types.DataframeAnalyticsDestination": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "avg_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "results_field": { - "$ref": "#/components/schemas/_types.Field" + "avg_size_in_bytes": { + "type": "number" } }, "required": [ - "index" + "total_operations", + "total_time_in_millis", + "total_size_in_bytes", + "avg_time_in_millis", + "avg_size_in_bytes" ] }, - "ml._types.DataframeAnalysisContainer": { + "indices.stats.ShardsTotalStats": { "type": "object", "properties": { - "classification": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisClassification" - }, - "outlier_detection": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisOutlierDetection" - }, - "regression": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisRegression" + "total_count": { + "type": "number" } }, - "minProperties": 1, - "maxProperties": 1 - }, - "ml._types.DataframeAnalysisClassification": { - "allOf": [ - { - "$ref": "#/components/schemas/ml._types.DataframeAnalysis" - }, - { - "type": "object", - "properties": { - "class_assignment_objective": { - "type": "string" - }, - "num_top_classes": { - "description": "Defines the number of categories for which the predicted probabilities are reported. It must be non-negative or -1. If it is -1 or greater than the total number of categories, probabilities are reported for all categories; if you have a large number of categories, there could be a significant effect on the size of your destination index. NOTE: To use the AUC ROC evaluation method, `num_top_classes` must be set to -1 or a value greater than or equal to the total number of categories.", - "type": "number" - } - } - } + "required": [ + "total_count" ] }, - "ml._types.DataframeAnalysis": { + "indices.stats.ShardStats": { "type": "object", "properties": { - "alpha": { - "description": "Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero.", - "type": "number" + "commit": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardCommit" + } + ] }, - "dependent_variable": { - "description": "Defines which field of the document is to be predicted. It must match one of the fields in the index being used to train. If this field is missing from a document, then that document will not be used for training, but a prediction with the trained model will be generated for it. It is also known as continuous target variable.\nFor classification analysis, the data type of the field must be numeric (`integer`, `short`, `long`, `byte`), categorical (`ip` or `keyword`), or `boolean`. There must be no more than 30 different values in this field.\nFor regression analysis, the data type of the field must be numeric.", - "type": "string" + "completion": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.CompletionStats" + } + ] }, - "downsample_factor": { - "description": "Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1.", - "type": "number" + "docs": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DocStats" + } + ] }, - "early_stopping_enabled": { - "description": "Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable.", - "type": "boolean" + "fielddata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.FielddataStats" + } + ] }, - "eta": { - "description": "Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between 0.001 and 1.", - "type": "number" + "flush": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.FlushStats" + } + ] }, - "eta_growth_rate_per_tree": { - "description": "Advanced configuration option. Specifies the rate at which `eta` increases for each new tree that is added to the forest. For example, a rate of 1.05 increases `eta` by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between 0.5 and 2.", - "type": "number" + "get": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.GetStats" + } + ] }, - "feature_bag_fraction": { - "description": "Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization.", - "type": "number" + "indexing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexingStats" + } + ] }, - "feature_processors": { - "description": "Advanced configuration option. A collection of feature preprocessors that modify one or more included fields. The analysis uses the resulting one or more features instead of the original document field. However, these features are ephemeral; they are not stored in the destination index. Multiple `feature_processors` entries can refer to the same document fields. Automatic categorical feature encoding still occurs for the fields that are unprocessed by a custom processor or that have categorical values. Use this property only if you want to override the automatic feature encoding of the specified fields.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessor" - } + "mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.MappingStats" + } + ] }, - "gamma": { - "description": "Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value.", - "type": "number" + "merges": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.MergesStats" + } + ] }, - "lambda": { - "description": "Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value.", - "type": "number" + "shard_path": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardPath" + } + ] }, - "max_optimization_rounds_per_hyperparameter": { - "description": "Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization.", - "type": "number" + "query_cache": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardQueryCache" + } + ] }, - "max_trees": { - "description": "Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization.", - "type": "number" + "recovery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RecoveryStats" + } + ] }, - "num_top_feature_importance_values": { - "description": "Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs.", - "type": "number" + "refresh": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RefreshStats" + } + ] }, - "prediction_field_name": { - "$ref": "#/components/schemas/_types.Field" + "request_cache": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RequestCacheStats" + } + ] }, - "randomize_seed": { - "description": "Defines the seed for the random generator that is used to pick training data. By default, it is randomly generated. Set it to a specific value to use the same training data each time you start a job (assuming other related parameters such as `source` and `analyzed_fields` are the same).", - "type": "number" + "retention_leases": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardRetentionLeases" + } + ] }, - "soft_tree_depth_limit": { - "description": "Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with the `soft_tree_depth_tolerance` to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.", - "type": "number" + "routing": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardRouting" + } + ] }, - "soft_tree_depth_tolerance": { - "description": "Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceeds `soft_tree_depth_limit`. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01.", - "type": "number" + "search": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SearchStats" + } + ] }, - "training_percent": { - "$ref": "#/components/schemas/_types.Percentage" - } - }, - "required": [ - "dependent_variable" - ] - }, - "ml._types.DataframeAnalysisFeatureProcessor": { - "type": "object", - "properties": { - "frequency_encoding": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorFrequencyEncoding" + "segments": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SegmentsStats" + } + ] }, - "multi_encoding": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorMultiEncoding" + "seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardSequenceNumber" + } + ] }, - "n_gram_encoding": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorNGramEncoding" + "store": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.StoreStats" + } + ] }, - "one_hot_encoding": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorOneHotEncoding" + "translog": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TranslogStats" + } + ] }, - "target_mean_encoding": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorTargetMeanEncoding" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "ml._types.DataframeAnalysisFeatureProcessorFrequencyEncoding": { - "type": "object", - "properties": { - "feature_name": { - "$ref": "#/components/schemas/_types.Name" + "warmer": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.WarmerStats" + } + ] }, - "field": { - "$ref": "#/components/schemas/_types.Field" + "bulk": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.BulkStats" + } + ] }, - "frequency_map": { - "description": "The resulting frequency map for the field value. If the field value is missing from the frequency_map, the resulting value is 0.", + "shards": { + "x-state": "Generally available; Added in 7.15.0", "type": "object", "additionalProperties": { - "type": "number" - } - } - }, - "required": [ - "feature_name", - "field", - "frequency_map" - ] - }, - "ml._types.DataframeAnalysisFeatureProcessorMultiEncoding": { - "type": "object", - "properties": { - "processors": { - "description": "The ordered array of custom processors to execute. Must be more than 1.", - "type": "array", - "items": { - "type": "number" + "type": "object" } + }, + "shard_stats": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardsTotalStats" + } + ] + }, + "indices": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.IndicesStats" + } + ] } - }, - "required": [ - "processors" - ] + } }, - "ml._types.DataframeAnalysisFeatureProcessorNGramEncoding": { + "indices.stats.ShardCommit": { "type": "object", "properties": { - "feature_prefix": { - "description": "The feature name prefix. Defaults to ngram__.", - "type": "string" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "length": { - "description": "Specifies the length of the n-gram substring. Defaults to 50. Must be greater than 0.", + "generation": { "type": "number" }, - "n_grams": { - "description": "Specifies which n-grams to gather. It’s an array of integer values where the minimum value is 1, and a maximum value is 5.", - "type": "array", - "items": { - "type": "number" - } + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "start": { - "description": "Specifies the zero-indexed start of the n-gram substring. Negative values are allowed for encoding n-grams of string suffixes. Defaults to 0.", + "num_docs": { "type": "number" }, - "custom": { - "type": "boolean" + "user_data": { + "type": "object", + "additionalProperties": { + "type": "string" + } } }, "required": [ - "field", - "n_grams" + "generation", + "id", + "num_docs", + "user_data" ] }, - "ml._types.DataframeAnalysisFeatureProcessorOneHotEncoding": { + "indices.stats.MappingStats": { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" + "total_count": { + "type": "number" }, - "hot_map": { - "description": "The one hot map mapping the field value with the column name.", - "type": "string" + "total_estimated_overhead": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_estimated_overhead_in_bytes": { + "type": "number" } }, "required": [ - "field", - "hot_map" + "total_count", + "total_estimated_overhead_in_bytes" ] }, - "ml._types.DataframeAnalysisFeatureProcessorTargetMeanEncoding": { + "indices.stats.ShardPath": { "type": "object", "properties": { - "default_value": { - "description": "The default value if field value is not found in the target_map.", - "type": "number" - }, - "feature_name": { - "$ref": "#/components/schemas/_types.Name" + "data_path": { + "type": "string" }, - "field": { - "$ref": "#/components/schemas/_types.Field" + "is_custom_data_path": { + "type": "boolean" }, - "target_map": { - "description": "The field value to target mean transition map.", - "type": "object", - "additionalProperties": { - "type": "object" - } + "state_path": { + "type": "string" } }, "required": [ - "default_value", - "feature_name", - "field", - "target_map" + "data_path", + "is_custom_data_path", + "state_path" ] }, - "ml._types.DataframeAnalysisOutlierDetection": { + "indices.stats.ShardQueryCache": { "type": "object", "properties": { - "compute_feature_influence": { - "description": "Specifies whether the feature influence calculation is enabled.", - "type": "boolean" + "cache_count": { + "type": "number" }, - "feature_influence_threshold": { - "description": "The minimum outlier score that a document needs to have in order to calculate its feature influence score. Value range: 0-1.", + "cache_size": { "type": "number" }, - "method": { - "description": "The method that outlier detection uses. Available methods are `lof`, `ldof`, `distance_kth_nn`, `distance_knn`, and `ensemble`. The default value is ensemble, which means that outlier detection uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score.", - "type": "string" + "evictions": { + "type": "number" }, - "n_neighbors": { - "description": "Defines the value for how many nearest neighbors each method of outlier detection uses to calculate its outlier score. When the value is not set, different values are used for different ensemble members. This default behavior helps improve the diversity in the ensemble; only override it if you are confident that the value you choose is appropriate for the data set.", + "hit_count": { "type": "number" }, - "outlier_fraction": { - "description": "The proportion of the data set that is assumed to be outlying prior to outlier detection. For example, 0.05 means it is assumed that 5% of values are real outliers and 95% are inliers.", + "memory_size_in_bytes": { "type": "number" }, - "standardization_enabled": { - "description": "If true, the following operation is performed on the columns before computing outlier scores: `(x_i - mean(x_i)) / sd(x_i)`.", - "type": "boolean" - } - } - }, - "ml._types.DataframeAnalysisRegression": { - "allOf": [ - { - "$ref": "#/components/schemas/ml._types.DataframeAnalysis" + "miss_count": { + "type": "number" }, - { - "type": "object", - "properties": { - "loss_function": { - "description": "The loss function used during regression. Available options are `mse` (mean squared error), `msle` (mean squared logarithmic error), `huber` (Pseudo-Huber loss).", - "type": "string" - }, - "loss_function_parameter": { - "description": "A positive number that is used as a parameter to the `loss_function`.", - "type": "number" - } - } + "total_count": { + "type": "number" } + }, + "required": [ + "cache_count", + "cache_size", + "evictions", + "hit_count", + "memory_size_in_bytes", + "miss_count", + "total_count" ] }, - "ml._types.DataframeAnalyticsFieldSelection": { + "indices.stats.ShardRetentionLeases": { "type": "object", "properties": { - "is_included": { - "description": "Whether the field is selected to be included in the analysis.", - "type": "boolean" - }, - "is_required": { - "description": "Whether the field is required.", - "type": "boolean" + "primary_term": { + "type": "number" }, - "feature_type": { - "description": "The feature type of this field for the analysis. May be categorical or numerical.", - "type": "string" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] }, - "mapping_types": { - "description": "The mapping types of the field.", + "leases": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/indices.stats.ShardLease" } + } + }, + "required": [ + "primary_term", + "version", + "leases" + ] + }, + "indices.stats.ShardLease": { + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "name": { - "$ref": "#/components/schemas/_types.Field" + "retaining_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] }, - "reason": { - "description": "The reason a field is not selected to be included in the analysis.", + "timestamp": { + "type": "number" + }, + "source": { "type": "string" } }, "required": [ - "is_included", - "is_required", - "mapping_types", - "name" + "id", + "retaining_seq_no", + "timestamp", + "source" ] }, - "ml._types.DataframeAnalyticsMemoryEstimation": { + "indices.stats.ShardRouting": { "type": "object", "properties": { - "expected_memory_with_disk": { - "description": "Estimated memory usage under the assumption that overflowing to disk is allowed during data frame analytics. expected_memory_with_disk is usually smaller than expected_memory_without_disk as using disk allows to limit the main memory needed to perform data frame analytics.", + "node": { "type": "string" }, - "expected_memory_without_disk": { - "description": "Estimated memory usage under the assumption that the whole data frame analytics should happen in memory (i.e. without overflowing to disk).", - "type": "string" + "primary": { + "type": "boolean" + }, + "relocating_node": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardRoutingState" + } + ] } }, "required": [ - "expected_memory_with_disk", - "expected_memory_without_disk" + "node", + "primary", + "state" ] }, - "ml._types.Page": { + "indices.stats.ShardRoutingState": { + "type": "string", + "enum": [ + "UNASSIGNED", + "INITIALIZING", + "STARTED", + "RELOCATING" + ] + }, + "indices.stats.ShardSequenceNumber": { "type": "object", "properties": { - "from": { - "description": "Skips the specified number of items.", + "global_checkpoint": { "type": "number" }, - "size": { - "description": "Specifies the maximum number of items to obtain.", + "local_checkpoint": { "type": "number" + }, + "max_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] } - } + }, + "required": [ + "global_checkpoint", + "local_checkpoint", + "max_seq_no" + ] }, - "ml._types.BucketSummary": { + "indices.stats.IndexMetadataState": { + "type": "string", + "enum": [ + "open", + "close" + ] + }, + "indices.update_aliases.Action": { "type": "object", "properties": { - "anomaly_score": { - "description": "The maximum anomaly score, between 0-100, for any of the bucket influencers. This is an overall, rate-limited\nscore for the job. All the anomaly records in the bucket contribute to this score. This value might be updated as\nnew data is analyzed.", - "type": "number" - }, - "bucket_influencers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.BucketInfluencer" - } - }, - "bucket_span": { - "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" - }, - "event_count": { - "description": "The number of input data records processed in this bucket.", - "type": "number" - }, - "initial_anomaly_score": { - "description": "The maximum anomaly score for any of the bucket influencers. This is the initial value that was calculated at the\ntime the bucket was processed.", - "type": "number" - }, - "is_interim": { - "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", - "type": "boolean" - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "processing_time_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "result_type": { - "description": "Internal. This value is always set to bucket.", - "type": "string" + "add": { + "description": "Adds a data stream or index to an alias.\nIf the alias doesn’t exist, the `add` action creates it.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.update_aliases.AddAction" + } + ] }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "remove": { + "description": "Removes a data stream or index from an alias.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.update_aliases.RemoveAction" + } + ] }, - "timestamp_string": { - "$ref": "#/components/schemas/_types.DateTime" + "remove_index": { + "description": "Deletes an index.\nYou cannot use this action on aliases or data streams.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.update_aliases.RemoveIndexAction" + } + ] } }, - "required": [ - "anomaly_score", - "bucket_influencers", - "bucket_span", - "event_count", - "initial_anomaly_score", - "is_interim", - "job_id", - "processing_time_ms", - "result_type", - "timestamp" - ] + "minProperties": 1, + "maxProperties": 1 }, - "ml._types.BucketInfluencer": { + "indices.update_aliases.AddAction": { "type": "object", "properties": { - "anomaly_score": { - "description": "A normalized score between 0-100, which is calculated for each bucket influencer. This score might be updated as\nnewer data is analyzed.", - "type": "number" + "alias": { + "description": "Alias for the action.\nIndex alias names support date math.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexAlias" + } + ] }, - "bucket_span": { - "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" + "aliases": { + "description": "Aliases for the action.\nIndex alias names support date math.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexAlias" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexAlias" + } + } + ] }, - "influencer_field_name": { - "$ref": "#/components/schemas/_types.Field" + "filter": { + "description": "Query used to limit documents the alias can access.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "initial_anomaly_score": { - "description": "The score between 0-100 for each bucket influencer. This score is the initial value that was calculated at the\ntime the bucket was processed.", - "type": "number" + "index": { + "description": "Data stream or index for the action.\nSupports wildcards (`*`).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "is_interim": { - "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", - "type": "boolean" + "indices": { + "description": "Data streams or indices for the action.\nSupports wildcards (`*`).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] }, - "probability": { - "description": "The probability that the bucket has this behavior, in the range 0 to 1. This value can be held to a high precision\nof over 300 decimal places, so the `anomaly_score` is provided as a human-readable and friendly interpretation of\nthis.", - "type": "number" + "is_hidden": { + "description": "If `true`, the alias is hidden.", + "default": false, + "type": "boolean" }, - "raw_anomaly_score": { - "description": "Internal.", - "type": "number" + "is_write_index": { + "description": "If `true`, sets the write index or data stream for the alias.", + "type": "boolean" }, - "result_type": { - "description": "Internal. This value is always set to `bucket_influencer`.", - "type": "string" + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] }, - "timestamp_string": { - "$ref": "#/components/schemas/_types.DateTime" - } - }, - "required": [ - "anomaly_score", - "bucket_span", - "influencer_field_name", - "initial_anomaly_score", - "is_interim", - "job_id", - "probability", - "raw_anomaly_score", - "result_type", - "timestamp" - ] - }, - "_types.DurationValueUnitSeconds": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.UnitSeconds" + "must_exist": { + "description": "If `true`, the alias must exist to perform the action.", + "default": false, + "type": "boolean" } - ] + } }, - "ml._types.CalendarEvent": { + "indices.update_aliases.RemoveAction": { "type": "object", "properties": { - "calendar_id": { - "$ref": "#/components/schemas/_types.Id" + "alias": { + "description": "Alias for the action.\nIndex alias names support date math.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexAlias" + } + ] }, - "event_id": { - "$ref": "#/components/schemas/_types.Id" + "aliases": { + "description": "Aliases for the action.\nIndex alias names support date math.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexAlias" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexAlias" + } + } + ] }, - "description": { - "description": "A description of the scheduled event.", - "type": "string" + "index": { + "description": "Data stream or index for the action.\nSupports wildcards (`*`).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "end_time": { - "$ref": "#/components/schemas/_types.DateTime" + "indices": { + "description": "Data streams or indices for the action.\nSupports wildcards (`*`).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "start_time": { - "$ref": "#/components/schemas/_types.DateTime" + "must_exist": { + "description": "If `true`, the alias must exist to perform the action.", + "default": false, + "type": "boolean" + } + } + }, + "indices.update_aliases.RemoveIndexAction": { + "type": "object", + "properties": { + "index": { + "description": "Data stream or index for the action.\nSupports wildcards (`*`).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "skip_result": { - "description": "When true the model will not create results for this calendar period.", - "type": "boolean" + "indices": { + "description": "Data streams or indices for the action.\nSupports wildcards (`*`).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "skip_model_update": { - "description": "When true the model will not be updated for this calendar period.", + "must_exist": { + "description": "If `true`, the alias must exist to perform the action.", + "default": false, "type": "boolean" - }, - "force_time_shift": { - "description": "Shift time by this many seconds. For example adjust time for daylight savings changes", - "type": "number" } - }, - "required": [ - "description", - "end_time", - "start_time" - ] + } }, - "ml.get_calendars.Calendar": { + "indices.validate_query.IndicesValidationExplanation": { "type": "object", "properties": { - "calendar_id": { - "$ref": "#/components/schemas/_types.Id" + "error": { + "type": "string" }, - "description": { - "description": "A description of the calendar.", + "explanation": { "type": "string" }, - "job_ids": { - "description": "An array of anomaly detection job identifiers.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "valid": { + "type": "boolean" } }, "required": [ - "calendar_id", - "job_ids" + "index", + "valid" ] }, - "_types.CategoryId": { - "type": "string" - }, - "ml._types.Category": { + "inference._types.RequestChatCompletion": { "type": "object", "properties": { - "category_id": { - "$ref": "#/components/schemas/_types.ulong" - }, - "examples": { - "description": "A list of examples of actual values that matched the category.", + "messages": { + "description": "A list of objects representing the conversation.\nRequests should generally only add new messages from the user (role `user`).\nThe other message roles (`assistant`, `system`, or `tool`) should generally only be copied from the response to a previous completion request, such that the messages array is built up throughout a conversation.", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/inference._types.Message" } }, - "grok_pattern": { - "$ref": "#/components/schemas/_types.GrokPattern" - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "max_matching_length": { - "$ref": "#/components/schemas/_types.ulong" - }, - "partition_field_name": { - "description": "If per-partition categorization is enabled, this property identifies the field used to segment the categorization. It is not present when per-partition categorization is disabled.", - "type": "string" - }, - "partition_field_value": { - "description": "If per-partition categorization is enabled, this property identifies the value of the partition_field_name for the category. It is not present when per-partition categorization is disabled.", - "type": "string" - }, - "regex": { - "description": "A regular expression that is used to search for values that match the category.", - "type": "string" - }, - "terms": { - "description": "A space separated list of the common tokens that are matched in values of the category.", + "model": { + "description": "The ID of the model to use. By default, the model ID is set to the value included when creating the inference endpoint.", "type": "string" }, - "num_matches": { - "description": "The number of messages that have been matched by this category. This is only guaranteed to have the latest accurate count after a job _flush or _close", + "max_completion_tokens": { + "description": "The upper bound limit for the number of tokens that can be generated for a completion request.", "type": "number" }, - "preferred_to_categories": { - "description": "A list of category_id entries that this current category encompasses. Any new message that is processed by the categorizer will match against this category and not any of the categories in this list. This is only guaranteed to have the latest accurate list of categories after a job _flush or _close", + "stop": { + "description": "A sequence of strings to control when the model should stop generating additional tokens.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.Id" + "type": "string" } }, - "p": { - "type": "string" + "temperature": { + "description": "The sampling temperature to use.", + "type": "number" }, - "result_type": { - "type": "string" + "tool_choice": { + "description": "Controls which tool is called by the model.\nString representation: One of `auto`, `none`, or `requrired`. `auto` allows the model to choose between calling tools and generating a message. `none` causes the model to not call any tools. `required` forces the model to call one or more tools.\nExample (object representation):\n```\n{\n \"tool_choice\": {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\"\n }\n }\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CompletionToolType" + } + ] }, - "mlcategory": { - "type": "string" + "tools": { + "description": "A list of tools that the model can call.\nExample:\n```\n{\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_price_of_item\",\n \"description\": \"Get the current price of an item\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"id\": \"12345\"\n },\n \"unit\": {\n \"type\": \"currency\"\n }\n }\n }\n }\n }\n ]\n}\n```", + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.CompletionTool" + } + }, + "top_p": { + "description": "Nucleus sampling, an alternative to sampling with temperature.", + "type": "number" } }, "required": [ - "category_id", - "examples", - "job_id", - "max_matching_length", - "regex", - "terms", - "result_type", - "mlcategory" + "messages" ] }, - "ml._types.DataframeAnalyticsSummary": { + "inference._types.Message": { + "description": "An object representing part of the conversation.", "type": "object", "properties": { - "allow_lazy_start": { - "type": "boolean" - }, - "analysis": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" - }, - "analyzed_fields": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" - }, - "authorization": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsAuthorization" - }, - "create_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "description": { - "type": "string" - }, - "dest": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "max_num_threads": { - "type": "number" + "content": { + "description": "The content of the message.\n\nString example:\n```\n{\n \"content\": \"Some string\"\n}\n```\n\nObject example:\n```\n{\n \"content\": [\n {\n \"text\": \"Some text\",\n \"type\": \"text\"\n }\n ]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.MessageContent" + } + ] }, - "model_memory_limit": { + "role": { + "description": "The role of the message author. Valid values are `user`, `assistant`, `system`, and `tool`.", "type": "string" }, - "source": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "tool_call_id": { + "description": "Only for `tool` role messages. The tool call that this message is responding to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" + "tool_calls": { + "description": "Only for `assistant` role messages. The tool calls generated by the model. If it's specified, the `content` field is optional.\nExample:\n```\n{\n \"tool_calls\": [\n {\n \"id\": \"call_KcAjWtAww20AihPHphUh46Gd\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\":\\\"Boston, MA\\\"}\"\n }\n }\n ]\n}\n```", + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.ToolCall" + } } }, "required": [ - "analysis", - "dest", - "id", - "source" + "role" ] }, - "ml._types.DataframeAnalyticsAuthorization": { - "type": "object", - "properties": { - "api_key": { - "$ref": "#/components/schemas/ml._types.ApiKeyAuthorization" + "inference._types.MessageContent": { + "oneOf": [ + { + "type": "string" }, - "roles": { - "description": "If a user ID was used for the most recent update to the job, its roles at the time of the update are listed in the response.", + { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/inference._types.ContentObject" } - }, - "service_account": { - "description": "If a service account was used for the most recent update to the job, the account name is listed in the response.", - "type": "string" } - } + ] }, - "ml._types.ApiKeyAuthorization": { + "inference._types.ContentObject": { + "description": "An object style representation of a single portion of a conversation.", "type": "object", "properties": { - "id": { - "description": "The identifier for the API key.", + "text": { + "description": "The text content.", "type": "string" }, - "name": { - "description": "The name of the API key.", + "type": { + "description": "The type of content.", "type": "string" } }, "required": [ - "id", - "name" + "text", + "type" ] }, - "ml._types.DataframeAnalytics": { + "inference._types.ToolCall": { + "description": "A tool call generated by the model.", "type": "object", "properties": { - "analysis_stats": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsContainer" - }, - "assignment_explanation": { - "description": "For running jobs only, contains messages relating to the selection of a node to run the job.", - "type": "string" - }, - "data_counts": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsDataCounts" - }, "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "memory_usage": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsMemoryUsage" - }, - "node": { - "$ref": "#/components/schemas/_types.NodeAttributes" + "description": "The identifier of the tool call.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "progress": { - "description": "The progress report of the data frame analytics job by phase.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsProgress" - } + "function": { + "description": "The function that the model called.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ToolCallFunction" + } + ] }, - "state": { - "$ref": "#/components/schemas/ml._types.DataframeState" + "type": { + "description": "The type of the tool call.", + "type": "string" } }, "required": [ - "data_counts", "id", - "memory_usage", - "progress", - "state" + "function", + "type" ] }, - "ml._types.DataframeAnalyticsStatsContainer": { - "type": "object", - "properties": { - "classification_stats": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsHyperparameters" - }, - "outlier_detection_stats": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsOutlierDetection" - }, - "regression_stats": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsHyperparameters" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "ml._types.DataframeAnalyticsStatsHyperparameters": { + "inference._types.ToolCallFunction": { + "description": "The function that the model called.", "type": "object", "properties": { - "hyperparameters": { - "$ref": "#/components/schemas/ml._types.Hyperparameters" - }, - "iteration": { - "description": "The number of iterations on the analysis.", - "type": "number" - }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "timing_stats": { - "$ref": "#/components/schemas/ml._types.TimingStats" + "arguments": { + "description": "The arguments to call the function with in JSON format.", + "type": "string" }, - "validation_loss": { - "$ref": "#/components/schemas/ml._types.ValidationLoss" + "name": { + "description": "The name of the function to call.", + "type": "string" } }, "required": [ - "hyperparameters", - "iteration", - "timestamp", - "timing_stats", - "validation_loss" + "arguments", + "name" ] }, - "ml._types.Hyperparameters": { - "type": "object", - "properties": { - "alpha": { - "description": "Advanced configuration option.\nMachine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly.\nThis parameter affects loss calculations by acting as a multiplier of the tree depth.\nHigher alpha values result in shallower trees and faster training times.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be greater than or equal to zero.", - "type": "number" - }, - "lambda": { - "description": "Advanced configuration option.\nRegularization parameter to prevent overfitting on the training data set.\nMultiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest.\nA high lambda value causes training to favor small leaf weights.\nThis behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable.\nA small lambda value results in large individual trees and slower training.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be a nonnegative value.", - "type": "number" - }, - "gamma": { - "description": "Advanced configuration option.\nRegularization parameter to prevent overfitting on the training data set.\nMultiplies a linear penalty associated with the size of individual trees in the forest.\nA high gamma value causes training to prefer small trees.\nA small gamma value results in larger individual trees and slower training.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be a nonnegative value.", - "type": "number" - }, - "eta": { - "description": "Advanced configuration option.\nThe shrinkage applied to the weights.\nSmaller values result in larger forests which have a better generalization error.\nHowever, larger forests cause slower training.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be a value between `0.001` and `1`.", - "type": "number" - }, - "eta_growth_rate_per_tree": { - "description": "Advanced configuration option.\nSpecifies the rate at which `eta` increases for each new tree that is added to the forest.\nFor example, a rate of 1.05 increases `eta` by 5% for each extra tree.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be between `0.5` and `2`.", - "type": "number" - }, - "feature_bag_fraction": { - "description": "Advanced configuration option.\nDefines the fraction of features that will be used when selecting a random bag for each candidate split.\nBy default, this value is calculated during hyperparameter optimization.", - "type": "number" - }, - "downsample_factor": { - "description": "Advanced configuration option.\nControls the fraction of data that is used to compute the derivatives of the loss function for tree training.\nA small value results in the use of a small fraction of the data.\nIf this value is set to be less than 1, accuracy typically improves.\nHowever, too small a value may result in poor convergence for the ensemble and so require more trees.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be greater than zero and less than or equal to 1.", - "type": "number" - }, - "max_attempts_to_add_tree": { - "description": "If the algorithm fails to determine a non-trivial tree (more than a single leaf), this parameter determines how many of such consecutive failures are tolerated.\nOnce the number of attempts exceeds the threshold, the forest training stops.", - "type": "number" - }, - "max_optimization_rounds_per_hyperparameter": { - "description": "Advanced configuration option.\nA multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure.\nThe maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter.\nBy default, this value is calculated during hyperparameter optimization.", - "type": "number" - }, - "max_trees": { - "description": "Advanced configuration option.\nDefines the maximum number of decision trees in the forest.\nThe maximum value is 2000.\nBy default, this value is calculated during hyperparameter optimization.", - "type": "number" - }, - "num_folds": { - "description": "The maximum number of folds for the cross-validation procedure.", - "type": "number" - }, - "num_splits_per_feature": { - "description": "Determines the maximum number of splits for every feature that can occur in a decision tree when the tree is trained.", - "type": "number" - }, - "soft_tree_depth_limit": { - "description": "Advanced configuration option.\nMachine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly.\nThis soft limit combines with the `soft_tree_depth_tolerance` to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be greater than or equal to 0.", - "type": "number" + "inference._types.CompletionToolType": { + "oneOf": [ + { + "type": "string" }, - "soft_tree_depth_tolerance": { - "description": "Advanced configuration option.\nThis option controls how quickly the regularized loss increases when the tree depth exceeds `soft_tree_depth_limit`.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be greater than or equal to 0.01.", - "type": "number" + { + "$ref": "#/components/schemas/inference._types.CompletionToolChoice" } - } + ] }, - "ml._types.TimingStats": { + "inference._types.CompletionToolChoice": { + "description": "Controls which tool is called by the model.", "type": "object", "properties": { - "elapsed_time": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "type": { + "description": "The type of the tool.", + "type": "string" }, - "iteration_time": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "function": { + "description": "The tool choice function.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CompletionToolChoiceFunction" + } + ] } }, "required": [ - "elapsed_time" + "type", + "function" ] }, - "ml._types.ValidationLoss": { + "inference._types.CompletionToolChoiceFunction": { + "description": "The tool choice function.", "type": "object", "properties": { - "fold_values": { - "description": "Validation loss values for every added decision tree during the forest growing procedure.", - "type": "array", - "items": { - "type": "string" - } - }, - "loss_type": { - "description": "The type of the loss metric. For example, binomial_logistic.", + "name": { + "description": "The name of the function to call.", "type": "string" } }, "required": [ - "fold_values", - "loss_type" + "name" ] }, - "ml._types.DataframeAnalyticsStatsOutlierDetection": { + "inference._types.CompletionTool": { + "description": "A list of tools that the model can call.", "type": "object", "properties": { - "parameters": { - "$ref": "#/components/schemas/ml._types.OutlierDetectionParameters" - }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "type": { + "description": "The type of tool.", + "type": "string" }, - "timing_stats": { - "$ref": "#/components/schemas/ml._types.TimingStats" + "function": { + "description": "The function definition.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CompletionToolFunction" + } + ] } }, "required": [ - "parameters", - "timestamp", - "timing_stats" + "type", + "function" ] }, - "ml._types.OutlierDetectionParameters": { + "inference._types.CompletionToolFunction": { + "description": "The completion tool function definition.", "type": "object", "properties": { - "compute_feature_influence": { - "description": "Specifies whether the feature influence calculation is enabled.", - "type": "boolean" - }, - "feature_influence_threshold": { - "description": "The minimum outlier score that a document needs to have in order to calculate its feature influence score.\nValue range: 0-1", - "type": "number" - }, - "method": { - "description": "The method that outlier detection uses.\nAvailable methods are `lof`, `ldof`, `distance_kth_nn`, `distance_knn`, and `ensemble`.\nThe default value is ensemble, which means that outlier detection uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score.", + "description": { + "description": "A description of what the function does.\nThis is used by the model to choose when and how to call the function.", "type": "string" }, - "n_neighbors": { - "description": "Defines the value for how many nearest neighbors each method of outlier detection uses to calculate its outlier score.\nWhen the value is not set, different values are used for different ensemble members.\nThis default behavior helps improve the diversity in the ensemble; only override it if you are confident that the value you choose is appropriate for the data set.", - "type": "number" + "name": { + "description": "The name of the function.", + "type": "string" }, - "outlier_fraction": { - "description": "The proportion of the data set that is assumed to be outlying prior to outlier detection.\nFor example, 0.05 means it is assumed that 5% of values are real outliers and 95% are inliers.", - "type": "number" + "parameters": { + "description": "The parameters the functional accepts. This should be formatted as a JSON object.", + "type": "object" }, - "standardization_enabled": { - "description": "If `true`, the following operation is performed on the columns before computing outlier scores: (x_i - mean(x_i)) / sd(x_i).", + "strict": { + "description": "Whether to enable schema adherence when generating the function call.", "type": "boolean" } - } - }, - "ml._types.DataframeAnalyticsStatsDataCounts": { - "type": "object", - "properties": { - "skipped_docs_count": { - "description": "The number of documents that are skipped during the analysis because they contained values that are not supported by the analysis. For example, outlier detection does not support missing fields so it skips documents with missing fields. Likewise, all types of analysis skip documents that contain arrays with more than one element.", - "type": "number" - }, - "test_docs_count": { - "description": "The number of documents that are not used for training the model and can be used for testing.", - "type": "number" - }, - "training_docs_count": { - "description": "The number of documents that are used for training the model.", - "type": "number" - } }, "required": [ - "skipped_docs_count", - "test_docs_count", - "training_docs_count" + "name" ] }, - "ml._types.DataframeAnalyticsStatsMemoryUsage": { - "type": "object", - "properties": { - "memory_reestimate_bytes": { - "description": "This value is present when the status is hard_limit and it is a new estimate of how much memory the job needs.", - "type": "number" - }, - "peak_usage_bytes": { - "description": "The number of bytes used at the highest peak of memory usage.", - "type": "number" - }, - "status": { - "description": "The memory usage status.", - "type": "string" - }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - } - }, - "required": [ - "peak_usage_bytes", - "status" - ] + "_types.StreamResult": { + "type": "object" }, - "_types.NodeAttributes": { + "inference._types.TaskSettings": { + "type": "object" + }, + "inference._types.CompletionInferenceResult": { + "description": "Defines the completion result.", "type": "object", "properties": { - "attributes": { - "description": "Lists node attributes.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "ephemeral_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "id": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "name": { - "$ref": "#/components/schemas/_types.NodeName" - }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" + "completion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.CompletionResult" + } } }, "required": [ - "attributes", - "ephemeral_id", - "name", - "transport_address" + "completion" ] }, - "ml._types.DataframeAnalyticsStatsProgress": { + "inference._types.CompletionResult": { + "description": "The completion result object", "type": "object", "properties": { - "phase": { - "description": "Defines the phase of the data frame analytics job.", + "result": { "type": "string" - }, - "progress_percent": { - "description": "The progress that the data frame analytics job has made expressed in percentage.", - "type": "number" } }, "required": [ - "phase", - "progress_percent" + "result" ] }, - "ml._types.DataframeState": { + "inference._types.TaskType": { "type": "string", "enum": [ - "started", - "stopped", - "starting", - "stopping", - "failed" + "sparse_embedding", + "text_embedding", + "rerank", + "completion", + "chat_completion", + "embedding" ] }, - "ml._types.DatafeedStats": { + "inference._types.DeleteInferenceEndpointResult": { + "description": "Acknowledged response. For dry_run, contains the list of pipelines which reference the inference endpoint", + "allOf": [ + { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + { + "type": "object", + "properties": { + "pipelines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "pipelines" + ] + } + ] + }, + "inference._types.RequestEmbedding": { "type": "object", "properties": { - "assignment_explanation": { - "description": "For started datafeeds only, contains messages relating to the selection of a node.", - "type": "string" - }, - "datafeed_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "node": { - "$ref": "#/components/schemas/ml._types.DiscoveryNodeCompact" - }, - "state": { - "$ref": "#/components/schemas/ml._types.DatafeedState" + "input": { + "description": "Inference input.\nEither a string, an array of strings, a `content` object, or an array of `content` objects.\n\nstring example:\n```\n\"input\": \"Some text\"\n```\nstring array example:\n```\n\"input\": [\"Some text\", \"Some more text\"]\n```\n`content` object example:\n```\n\"input\": {\n \"content\": {\n \"type\": \"image\",\n \"format\": \"base64\",\n \"value\": \"data:image/jpg;base64,...\"\n }\n }\n```\n`content` object array example:\n```\n\"input\": [\n {\n \"content\": {\n \"type\": \"text\",\n \"format\": \"text\",\n \"value\": \"Some text to generate an embedding\"\n }\n },\n {\n \"content\": {\n \"type\": \"image\",\n \"format\": \"base64\",\n \"value\": \"data:image/jpg;base64,...\"\n }\n }\n]\n```", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.EmbeddingInput" + } + ] }, - "timing_stats": { - "$ref": "#/components/schemas/ml._types.DatafeedTimingStats" + "input_type": { + "description": "The input data type for the embedding model. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\n\nNot all models support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "type": "string" }, - "running_state": { - "$ref": "#/components/schemas/ml._types.DatafeedRunningState" + "task_settings": { + "description": "Task settings for the individual inference request. These settings are specific to the you specified and override the task settings specified when initializing the service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] } }, "required": [ - "datafeed_id", - "state" + "input" ] }, - "ml._types.DiscoveryNodeCompact": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "ephemeral_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "inference._types.EmbeddingInput": { + "description": "Inference input.\nEither a string, an array of strings, a `content` object, or an array of `content` objects.", + "oneOf": [ + { + "$ref": "#/components/schemas/inference._types.EmbeddingStringInput" }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" + { + "$ref": "#/components/schemas/inference._types.EmbeddingContentInput" + } + ] + }, + "inference._types.EmbeddingStringInput": { + "description": "Allows specifying text-only inputs for the `embedding` task.", + "oneOf": [ + { + "type": "string" }, - "attributes": { - "type": "object", - "additionalProperties": { + { + "type": "array", + "items": { "type": "string" } } + ] + }, + "inference._types.EmbeddingContentInput": { + "description": "Allows specifying multimodal inputs for the `embedding` task.", + "oneOf": [ + { + "$ref": "#/components/schemas/inference._types.EmbeddingContentObject" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.EmbeddingContentObject" + } + } + ] + }, + "inference._types.EmbeddingContentObject": { + "description": "A wrapper object which contains the fields required to specify multimodal inputs", + "type": "object", + "properties": { + "content": { + "description": "An object containing the input data for the model to embed", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.EmbeddingContentObjectContents" + } + ] + } }, "required": [ - "name", - "ephemeral_id", - "id", - "transport_address", - "attributes" + "content" ] }, - "ml._types.DatafeedTimingStats": { + "inference._types.EmbeddingContentObjectContents": { + "description": "An object containing the input data for the model to embed.", "type": "object", "properties": { - "bucket_count": { - "description": "The number of buckets processed.", - "type": "number" - }, - "exponential_average_search_time_per_hour_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" - }, - "exponential_average_calculation_context": { - "$ref": "#/components/schemas/ml._types.ExponentialAverageCalculationContext" - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "search_count": { - "description": "The number of searches run by the datafeed.", - "type": "number" + "type": { + "description": "The type of input to embed.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.EmbeddingContentType" + } + ] }, - "total_search_time_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "format": { + "description": "The format of the input. For the `text` type this defaults to `text`. For the `image` type, this defaults to `base64`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.EmbeddingContentFormat" + } + ] }, - "average_search_time_per_bucket_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "value": { + "description": "The value of the input to embed.", + "type": "string" } }, "required": [ - "bucket_count", - "exponential_average_search_time_per_hour_ms", - "job_id", - "search_count", - "total_search_time_ms" + "type", + "value" ] }, - "_types.DurationValueUnitFloatMillis": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.UnitFloatMillis" - } + "inference._types.EmbeddingContentType": { + "type": "string", + "enum": [ + "text", + "image" ] }, - "_types.UnitFloatMillis": { - "description": "Time unit for fractional milliseconds", - "type": "number" + "inference._types.EmbeddingContentFormat": { + "type": "string", + "enum": [ + "text", + "base64" + ] }, - "ml._types.ExponentialAverageCalculationContext": { + "inference._types.EmbeddingInferenceResult": { + "description": "EmbeddingInferenceResult is an aggregation of mutually exclusive embeddings variants", "type": "object", "properties": { - "incremental_metric_value_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "embeddings_bytes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult" + } }, - "latest_timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "embeddings_bits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult" + } }, - "previous_exponential_average_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "embeddings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.DenseEmbeddingResult" + } + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "inference._types.DenseEmbeddingByteResult": { + "description": "The dense embedding result object for byte representation", + "type": "object", + "properties": { + "embedding": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.DenseByteVector" + } + ] } }, "required": [ - "incremental_metric_value_ms" + "embedding" ] }, - "ml._types.DatafeedRunningState": { + "inference._types.DenseByteVector": { + "description": "Dense Embedding results containing bytes are represented as Dense\nVectors of bytes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.byte" + } + }, + "inference._types.DenseEmbeddingResult": { + "description": "The dense embedding result object for float representation", "type": "object", "properties": { - "real_time_configured": { - "description": "Indicates if the datafeed is \"real-time\"; meaning that the datafeed has no configured `end` time.", - "type": "boolean" - }, - "real_time_running": { - "description": "Indicates whether the datafeed has finished running on the available past data.\nFor datafeeds without a configured `end` time, this means that the datafeed is now running on \"real-time\" data.", - "type": "boolean" - }, - "search_interval": { - "$ref": "#/components/schemas/ml._types.RunningStateSearchInterval" + "embedding": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.DenseVector" + } + ] } }, "required": [ - "real_time_configured", - "real_time_running" + "embedding" ] }, - "ml._types.RunningStateSearchInterval": { + "inference._types.DenseVector": { + "description": "Dense Embedding results are represented as Dense Vectors\nof floats.", + "type": "array", + "items": { + "type": "number" + } + }, + "inference._types.InferenceEndpointInfo": { + "description": "Represents an inference endpoint as returned by the GET API", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskType" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.InferenceEndpoint": { + "description": "Configuration options when storing the inference endpoint", "type": "object", "properties": { - "end": { - "$ref": "#/components/schemas/_types.Duration" + "chunking_settings": { + "description": "The chunking configuration object.\nApplies only to the `embedding`, `sparse_embedding` and `text_embedding` task types.\nNot applicable to the `rerank`, `completion`, or `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] }, - "end_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "service": { + "description": "The service type", + "type": "string" }, - "start": { - "$ref": "#/components/schemas/_types.Duration" + "service_settings": { + "description": "Settings specific to the service", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ServiceSettings" + } + ] }, - "start_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "task_settings": { + "description": "Task settings specific to the service and task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskSettings" + } + ] } }, "required": [ - "end_ms", - "start_ms" + "service", + "service_settings" ] }, - "ml._types.Datafeed": { + "inference._types.InferenceChunkingSettings": { + "description": "Chunking configuration object", "type": "object", "properties": { - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "authorization": { - "$ref": "#/components/schemas/ml._types.DatafeedAuthorization" + "max_chunk_size": { + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", + "default": 250.0, + "type": "number" }, - "chunking_config": { - "$ref": "#/components/schemas/ml._types.ChunkingConfig" + "overlap": { + "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "default": 100.0, + "type": "number" }, - "datafeed_id": { - "$ref": "#/components/schemas/_types.Id" + "sentence_overlap": { + "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "default": 1.0, + "type": "number" }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" + "separator_group": { + "description": "Only applicable to the `recursive` strategy and required when using it.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "type": "string" }, - "indices": { + "separators": { + "description": "Only applicable to the `recursive` strategy and required when using it.\n\nA list of strings used as possible split points when chunking text.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", "type": "array", "items": { "type": "string" } }, - "indexes": { + "strategy": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies" + }, + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", + "default": "sentence", + "type": "string" + } + } + }, + "inference._types.ServiceSettings": { + "type": "object" + }, + "inference._types.InferenceResult": { + "description": "InferenceResult is an aggregation of mutually exclusive variants", + "type": "object", + "properties": { + "embeddings_bytes": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult" } }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "max_empty_searches": { - "type": "number" + "embeddings_bits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult" + } }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "embeddings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.DenseEmbeddingResult" + } }, - "query_delay": { - "$ref": "#/components/schemas/_types.Duration" + "text_embedding_bytes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult" + } }, - "script_fields": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" + "text_embedding_bits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult" } }, - "scroll_size": { - "type": "number" + "text_embedding": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.DenseEmbeddingResult" + } }, - "delayed_data_check_config": { - "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" + "sparse_embedding": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.SparseEmbeddingResult" + } }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + "completion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.CompletionResult" + } }, - "indices_options": { - "$ref": "#/components/schemas/_types.IndicesOptions" + "rerank": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.RankedDocument" + } } }, - "required": [ - "datafeed_id", - "indices", - "job_id", - "query", - "delayed_data_check_config" - ] + "minProperties": 1, + "maxProperties": 1 }, - "ml._types.DatafeedAuthorization": { + "inference._types.SparseEmbeddingResult": { "type": "object", "properties": { - "api_key": { - "$ref": "#/components/schemas/ml._types.ApiKeyAuthorization" - }, - "roles": { - "description": "If a user ID was used for the most recent update to the datafeed, its roles at the time of the update are listed in the response.", - "type": "array", - "items": { - "type": "string" - } + "is_truncated": { + "description": "Indicates if the text input was truncated in the request sent to the service", + "type": "boolean" }, - "service_account": { - "description": "If a service account was used for the most recent update to the datafeed, the account name is listed in the response.", - "type": "string" + "embedding": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.SparseVector" + } + ] } + }, + "required": [ + "is_truncated", + "embedding" + ] + }, + "inference._types.SparseVector": { + "description": "Sparse Embedding tokens are represented as a dictionary\nof string to double.", + "type": "object", + "additionalProperties": { + "type": "number" } }, - "ml._types.ChunkingConfig": { + "inference._types.RankedDocument": { + "description": "The rerank result object representing a single ranked document\nid: the original index of the document in the request\nrelevance_score: the relevance_score of the document relative to the query\ntext: Optional, the text of the document, if requested", "type": "object", "properties": { - "mode": { - "$ref": "#/components/schemas/ml._types.ChunkingMode" + "index": { + "type": "number" }, - "time_span": { - "$ref": "#/components/schemas/_types.Duration" + "relevance_score": { + "type": "number" + }, + "text": { + "type": "string" } }, "required": [ - "mode" + "index", + "relevance_score" ] }, - "ml._types.ChunkingMode": { + "inference._types.Ai21TaskType": { "type": "string", "enum": [ - "auto", - "manual", - "off" + "completion", + "chat_completion" ] }, - "ml._types.DelayedDataCheckConfig": { + "inference._types.Ai21ServiceType": { + "type": "string", + "enum": [ + "ai21" + ] + }, + "inference._types.Ai21ServiceSettings": { "type": "object", "properties": { - "check_window": { - "$ref": "#/components/schemas/_types.Duration" + "model_id": { + "externalDocs": { + "url": "https://docs.ai21.com/docs/jamba-foundation-models" + }, + "description": "The name of the model to use for the inference task.\nRefer to the AI21 models documentation for the list of supported models and versions.\nService has been tested and confirmed to be working for `completion` and `chat_completion` tasks with the following models:\n* `jamba-mini`\n* `jamba-large`", + "type": "string" }, - "enabled": { - "description": "Specifies whether the datafeed periodically checks for delayed data.", - "type": "boolean" + "api_key": { + "description": "A valid API key for accessing AI21 API.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", + "type": "string" + }, + "rate_limit": { + "externalDocs": { + "url": "https://docs.ai21.com/reference/api-rate-limits" + }, + "description": "This setting helps to minimize the number of rate limit errors returned from the AI21 API.\nBy default, the `ai21` service sets the number of requests allowed per minute to 200. Please refer to AI21 documentation for more details.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "enabled" + "model_id" + ] + }, + "inference._types.RateLimitSetting": { + "description": "This setting helps to minimize the number of rate limit errors returned from the service.", + "type": "object", + "properties": { + "requests_per_minute": { + "description": "The number of requests allowed per minute.\nBy default, the number of requests allowed per minute is set by each service as follows:\n\n* `alibabacloud-ai-search` service: `1000`\n* `amazonbedrock` service: `240`\n* `anthropic` service: `50`\n* `azureaistudio` service: `240`\n* `azureopenai` service and task type `text_embedding`: `1440`\n* `azureopenai` service and task types `completion` or `chat_completion`: `120`\n* `cohere` service: `10000`\n* `contextualai` service: `1000`\n* `elastic` service and task type `chat_completion`: `240`\n* `googleaistudio` service: `360`\n* `googlevertexai` service: `30000`\n* `hugging_face` service: `3000`\n* `jinaai` service: `2000`\n* `llama` service: `3000`\n* `mistral` service: `240`\n* `openai` service and task type `text_embedding`: `3000`\n* `openai` service and task type `completion`: `500`\n* `openshift_ai` service: `3000`\n* `voyageai` service: `2000`\n* `watsonxai` service: `120`", + "type": "number" + } + } + }, + "inference._types.InferenceEndpointInfoAi21": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeAi21" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.TaskTypeAi21": { + "type": "string", + "enum": [ + "completion", + "chat_completion" + ] + }, + "inference._types.AlibabaCloudTaskType": { + "type": "string", + "enum": [ + "completion", + "rerank", + "sparse_embedding", + "text_embedding" ] }, - "_types.IndicesOptions": { + "inference._types.AlibabaCloudServiceType": { + "type": "string", + "enum": [ + "alibabacloud-ai-search" + ] + }, + "inference._types.AlibabaCloudServiceSettings": { "type": "object", "properties": { - "allow_no_indices": { - "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only\nmissing or closed indices. This behavior applies even if the request targets other open indices. For example,\na request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", - "type": "boolean" + "api_key": { + "description": "A valid API key for the AlibabaCloud AI Search API.", + "type": "string" }, - "expand_wildcards": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "host": { + "externalDocs": { + "url": "https://opensearch.console.aliyun.com/cn-shanghai/rag/api-key" + }, + "description": "The name of the host address used for the inference task.\nYou can find the host address in the API keys section of the documentation.", + "type": "string" }, - "ignore_unavailable": { - "description": "If true, missing or closed indices are not included in the response.", - "type": "boolean" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from AlibabaCloud AI Search.\nBy default, the `alibabacloud-ai-search` service sets the number of requests allowed per minute to `1000`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "ignore_throttled": { - "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", - "type": "boolean" - } - } - }, - "ml._types.Filter": { - "type": "object", - "properties": { - "description": { - "description": "A description of the filter.", + "service_id": { + "description": "The name of the model service to use for the inference task.\nThe following service IDs are available for the `completion` task:\n\n* `ops-qwen-turbo`\n* `qwen-turbo`\n* `qwen-plus`\n* `qwen-max ÷ qwen-max-longcontext`\n\nThe following service ID is available for the `rerank` task:\n\n* `ops-bge-reranker-larger`\n\nThe following service ID is available for the `sparse_embedding` task:\n\n* `ops-text-sparse-embedding-001`\n\nThe following service IDs are available for the `text_embedding` task:\n\n`ops-text-embedding-001`\n`ops-text-embedding-zh-001`\n`ops-text-embedding-en-001`\n`ops-text-embedding-002`", "type": "string" }, - "filter_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "items": { - "description": "An array of strings which is the filter item list.", - "type": "array", - "items": { - "type": "string" - } + "workspace": { + "description": "The name of the workspace used for the inference task.", + "type": "string" } }, "required": [ - "filter_id", - "items" + "api_key", + "host", + "service_id", + "workspace" ] }, - "ml._types.Influencer": { + "inference._types.AlibabaCloudTaskSettings": { "type": "object", "properties": { - "bucket_span": { - "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" - }, - "influencer_score": { - "description": "A normalized score between 0-100, which is based on the probability of the influencer in this bucket aggregated\nacross detectors. Unlike `initial_influencer_score`, this value is updated by a re-normalization process as new\ndata is analyzed.", - "type": "number" - }, - "influencer_field_name": { - "$ref": "#/components/schemas/_types.Field" - }, - "influencer_field_value": { - "description": "The entity that influenced, contributed to, or was to blame for the anomaly.", + "input_type": { + "description": "For a `sparse_embedding` or `text_embedding` task, specify the type of input passed to the model.\nValid values are:\n\n* `ingest` for storing document embeddings in a vector database.\n* `search` for storing embeddings of search queries run against a vector database to find relevant documents.", "type": "string" }, - "initial_influencer_score": { - "description": "A normalized score between 0-100, which is based on the probability of the influencer aggregated across detectors.\nThis is the initial value that was calculated at the time the bucket was processed.", - "type": "number" - }, - "is_interim": { - "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", + "return_token": { + "description": "For a `sparse_embedding` task, it affects whether the token name will be returned in the response.\nIt defaults to `false`, which means only the token ID will be returned in the response.", "type": "boolean" + } + } + }, + "inference._types.InferenceEndpointInfoAlibabaCloudAI": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "probability": { - "description": "The probability that the influencer has this behavior, in the range 0 to 1. This value can be held to a high\nprecision of over 300 decimal places, so the `influencer_score` is provided as a human-readable and friendly\ninterpretation of this value.", - "type": "number" - }, - "result_type": { - "description": "Internal. This value is always set to `influencer`.", - "type": "string" - }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "foo": { - "description": "Additional influencer properties are added, depending on the fields being analyzed. For example, if it’s\nanalyzing `user_name` as an influencer, a field `user_name` is added to the result document. This\ninformation enables you to filter the anomaly results more easily.", - "type": "string" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeAlibabaCloudAI" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "bucket_span", - "influencer_score", - "influencer_field_name", - "influencer_field_value", - "initial_influencer_score", - "is_interim", - "job_id", - "probability", - "result_type", - "timestamp" ] }, - "ml._types.JobStats": { + "inference._types.TaskTypeAlibabaCloudAI": { + "type": "string", + "enum": [ + "text_embedding", + "rerank", + "completion", + "sparse_embedding" + ] + }, + "inference._types.AmazonBedrockTaskType": { + "type": "string", + "enum": [ + "chat_completion", + "completion", + "text_embedding" + ] + }, + "inference._types.AmazonBedrockServiceType": { + "type": "string", + "enum": [ + "amazonbedrock" + ] + }, + "inference._types.AmazonBedrockServiceSettings": { "type": "object", "properties": { - "assignment_explanation": { - "description": "For open anomaly detection jobs only, contains messages relating to the selection of a node to run the job.", + "access_key": { + "description": "A valid AWS access key that has permissions to use Amazon Bedrock and access to models for inference requests.", "type": "string" }, - "data_counts": { - "$ref": "#/components/schemas/ml._types.DataCounts" - }, - "forecasts_stats": { - "$ref": "#/components/schemas/ml._types.JobForecastStatistics" - }, - "job_id": { - "description": "Identifier for the anomaly detection job.", + "model": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html" + }, + "description": "The base model ID or an ARN to a custom model based on a foundational model.\nThe base model IDs can be found in the Amazon Bedrock documentation.\nNote that the model ID must be available for the provider chosen and your IAM user must have access to the model.", "type": "string" }, - "model_size_stats": { - "$ref": "#/components/schemas/ml._types.ModelSizeStats" - }, - "node": { - "$ref": "#/components/schemas/ml._types.DiscoveryNodeCompact" - }, - "open_time": { - "$ref": "#/components/schemas/_types.DateTime" + "provider": { + "description": "The model provider for your deployment.\nNote that some providers may support only certain task types.\nSupported providers include:\n\n* `amazontitan` - available for `text_embedding` and `completion` task types\n* `anthropic` - available for `chat_completion` and `completion` task types\n* `ai21labs` - available for `chat_completion` and `completion` task types\n* `cohere` - available for `chat_completion`, `completion` and `text_embedding` task types\n* `meta` - available for `chat_completion` and `completion` task types\n* `mistral` - available for `chat_completion` and `completion` task types", + "type": "string" }, - "state": { - "$ref": "#/components/schemas/ml._types.JobState" + "region": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html" + }, + "description": "The region that your model or ARN is deployed in.\nThe list of available regions per model can be found in the Amazon Bedrock documentation.", + "type": "string" }, - "timing_stats": { - "$ref": "#/components/schemas/ml._types.JobTimingStats" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Amazon Bedrock.\nBy default, the `amazonbedrock` service sets the number of requests allowed per minute to 240.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "deleting": { - "description": "Indicates that the process of deleting the job is in progress but not yet completed. It is only reported when `true`.", - "type": "boolean" + "secret_key": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html" + }, + "description": "A valid AWS secret key that is paired with the `access_key`.\nFor informationg about creating and managing access and secret keys, refer to the AWS documentation.", + "type": "string" } }, "required": [ - "data_counts", - "forecasts_stats", - "job_id", - "model_size_stats", - "state", - "timing_stats" + "access_key", + "model", + "region", + "secret_key" ] }, - "ml._types.DataCounts": { + "inference._types.AmazonBedrockTaskSettings": { "type": "object", "properties": { - "bucket_count": { - "type": "number" - }, - "earliest_record_timestamp": { - "type": "number" - }, - "empty_bucket_count": { - "type": "number" - }, - "input_bytes": { - "type": "number" - }, - "input_field_count": { + "max_new_tokens": { + "description": "For `chat_completion` and `completion` tasks, it sets the maximum number for the output tokens to be generated.", + "default": 64.0, "type": "number" }, - "input_record_count": { + "temperature": { + "description": "For `chat_completion` and `completion` tasks, it is a number between 0.0 and 1.0 that controls the apparent creativity of the results.\nAt temperature 0.0 the model is most deterministic, at temperature 1.0 most random.\nIt should not be used if `top_p` or `top_k` is specified.", "type": "number" }, - "invalid_date_count": { + "top_k": { + "description": "For `chat_completion` and `completion` tasks, it limits samples to the top-K most likely words, balancing coherence and variability.\nIt is only available for anthropic, cohere, and mistral providers.\nIt is an alternative to `temperature`; it should not be used if `temperature` is specified.", "type": "number" }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "last_data_time": { + "top_p": { + "description": "For `chat_completion` and `completion` tasks, it is a number in the range of 0.0 to 1.0, to eliminate low-probability tokens.\nTop-p uses nucleus sampling to select top tokens whose sum of likelihoods does not exceed a certain value, ensuring both variety and coherence.\nIt is an alternative to `temperature`; it should not be used if `temperature` is specified.", "type": "number" + } + } + }, + "inference._types.InferenceEndpointInfoAmazonBedrock": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "latest_empty_bucket_timestamp": { - "type": "number" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeAmazonBedrock" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.TaskTypeAmazonBedrock": { + "type": "string", + "enum": [ + "chat_completion", + "completion", + "text_embedding" + ] + }, + "inference._types.TaskTypeAmazonSageMaker": { + "type": "string", + "enum": [ + "text_embedding", + "completion", + "chat_completion", + "sparse_embedding", + "rerank" + ] + }, + "inference._types.AmazonSageMakerServiceType": { + "type": "string", + "enum": [ + "amazon_sagemaker" + ] + }, + "inference._types.AmazonSageMakerServiceSettings": { + "type": "object", + "properties": { + "access_key": { + "description": "A valid AWS access key that has permissions to use Amazon SageMaker and access to models for invoking requests.", + "type": "string" }, - "latest_record_timestamp": { - "type": "number" + "endpoint_name": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The name of the SageMaker endpoint.", + "type": "string" }, - "latest_sparse_bucket_timestamp": { - "type": "number" + "api": { + "description": "The API format to use when calling SageMaker.\nElasticsearch will convert the POST _inference request to this data format when invoking the SageMaker endpoint.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerApi" + } + ] }, - "latest_bucket_timestamp": { - "type": "number" + "region": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The region that your endpoint or Amazon Resource Name (ARN) is deployed in.\nThe list of available regions per model can be found in the Amazon SageMaker documentation.", + "type": "string" }, - "log_time": { - "type": "number" + "secret_key": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html" + }, + "description": "A valid AWS secret key that is paired with the `access_key`.\nFor information about creating and managing access and secret keys, refer to the AWS documentation.", + "type": "string" }, - "missing_field_count": { - "type": "number" + "target_model": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The model ID when calling a multi-model endpoint.", + "type": "string" }, - "out_of_order_timestamp_count": { - "type": "number" + "target_container_hostname": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The container to directly invoke when calling a multi-container endpoint.", + "type": "string" }, - "processed_field_count": { - "type": "number" + "inference_component_name": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The inference component to directly invoke when calling a multi-component endpoint.", + "type": "string" }, - "processed_record_count": { + "batch_size": { + "description": "The maximum number of inputs in each batch. This value is used by inference ingestion pipelines\nwhen processing semantic values. It correlates to the number of times the SageMaker endpoint is\ninvoked (one per batch of input).", + "default": 256.0, "type": "number" }, - "sparse_bucket_count": { + "dimensions": { + "description": "The number of dimensions returned by the text embedding models. If this value is not provided, then\nit is guessed by making invoking the endpoint for the `text_embedding` task.", "type": "number" } }, "required": [ - "bucket_count", - "empty_bucket_count", - "input_bytes", - "input_field_count", - "input_record_count", - "invalid_date_count", - "job_id", - "missing_field_count", - "out_of_order_timestamp_count", - "processed_field_count", - "processed_record_count", - "sparse_bucket_count" + "access_key", + "endpoint_name", + "api", + "region", + "secret_key" ] }, - "ml._types.JobForecastStatistics": { + "inference._types.AmazonSageMakerApi": { + "type": "string", + "enum": [ + "openai", + "elastic" + ] + }, + "inference._types.AmazonSageMakerTaskSettings": { "type": "object", "properties": { - "memory_bytes": { - "$ref": "#/components/schemas/ml._types.JobStatistics" + "custom_attributes": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The AWS custom attributes passed verbatim through to the model running in the SageMaker Endpoint.\nValues will be returned in the `X-elastic-sagemaker-custom-attributes` header.", + "type": "string" }, - "processing_time_ms": { - "$ref": "#/components/schemas/ml._types.JobStatistics" + "enable_explanations": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The optional JMESPath expression used to override the EnableExplanations provided during endpoint creation.", + "type": "string" }, - "records": { - "$ref": "#/components/schemas/ml._types.JobStatistics" + "inference_id": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The capture data ID when enabled in the endpoint.", + "type": "string" }, - "status": { - "type": "object", - "additionalProperties": { - "type": "number" - } + "session_id": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The stateful session identifier for a new or existing session.\nNew sessions will be returned in the `X-elastic-sagemaker-new-session-id` header.\nClosed sessions will be returned in the `X-elastic-sagemaker-closed-session-id` header.", + "type": "string" }, - "total": { - "type": "number" + "target_variant": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "Specifies the variant when running with multi-variant Endpoints.", + "type": "string" + } + } + }, + "inference._types.InferenceEndpointInfoAmazonSageMaker": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "forecasted_jobs": { - "type": "number" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeAmazonSageMaker" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "total", - "forecasted_jobs" ] }, - "ml._types.JobStatistics": { + "inference._types.AnthropicTaskType": { + "type": "string", + "enum": [ + "completion" + ] + }, + "inference._types.AnthropicServiceType": { + "type": "string", + "enum": [ + "anthropic" + ] + }, + "inference._types.AnthropicServiceSettings": { "type": "object", "properties": { - "avg": { - "type": "number" - }, - "max": { - "type": "number" + "api_key": { + "description": "A valid API key for the Anthropic API.", + "type": "string" }, - "min": { - "type": "number" + "model_id": { + "description": "The name of the model to use for the inference task.\nRefer to the Anthropic documentation for the list of supported models.", + "type": "string" }, - "total": { - "type": "number" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Anthropic.\nBy default, the `anthropic` service sets the number of requests allowed per minute to 50.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "avg", - "max", - "min", - "total" + "api_key", + "model_id" ] }, - "ml._types.ModelSizeStats": { + "inference._types.AnthropicTaskSettings": { "type": "object", "properties": { - "bucket_allocation_failures_count": { - "type": "number" - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "log_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "memory_status": { - "$ref": "#/components/schemas/ml._types.MemoryStatus" - }, - "model_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "model_bytes_exceeded": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "model_bytes_memory_limit": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "output_memory_allocator_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "peak_model_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "assignment_memory_basis": { - "type": "string" - }, - "result_type": { - "type": "string" - }, - "total_by_field_count": { - "type": "number" - }, - "total_over_field_count": { - "type": "number" - }, - "total_partition_field_count": { - "type": "number" - }, - "categorization_status": { - "$ref": "#/components/schemas/ml._types.CategorizationStatus" - }, - "categorized_doc_count": { - "type": "number" - }, - "dead_category_count": { - "type": "number" - }, - "failed_category_count": { - "type": "number" - }, - "frequent_category_count": { + "max_tokens": { + "description": "For a `completion` task, it is the maximum number of tokens to generate before stopping.", "type": "number" }, - "rare_category_count": { + "temperature": { + "externalDocs": { + "url": "https://docs.anthropic.com/en/api/messages" + }, + "description": "For a `completion` task, it is the amount of randomness injected into the response.\nFor more details about the supported range, refer to Anthropic documentation.", "type": "number" }, - "total_category_count": { + "top_k": { + "description": "For a `completion` task, it specifies to only sample from the top K options for each subsequent token.\nIt is recommended for advanced use cases only.\nYou usually only need to use `temperature`.", "type": "number" }, - "timestamp": { + "top_p": { + "description": "For a `completion` task, it specifies to use Anthropic's nucleus sampling.\nIn nucleus sampling, Anthropic computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches the specified probability.\nYou should either alter `temperature` or `top_p`, but not both.\nIt is recommended for advanced use cases only.\nYou usually only need to use `temperature`.", "type": "number" } }, "required": [ - "bucket_allocation_failures_count", - "job_id", - "log_time", - "memory_status", - "model_bytes", - "result_type", - "total_by_field_count", - "total_over_field_count", - "total_partition_field_count", - "categorization_status", - "categorized_doc_count", - "dead_category_count", - "failed_category_count", - "frequent_category_count", - "rare_category_count", - "total_category_count" + "max_tokens" ] }, - "ml._types.JobTimingStats": { + "inference._types.InferenceEndpointInfoAnthropic": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeAnthropic" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.TaskTypeAnthropic": { + "type": "string", + "enum": [ + "completion" + ] + }, + "inference._types.AzureAiStudioTaskType": { + "type": "string", + "enum": [ + "completion", + "rerank", + "text_embedding" + ] + }, + "inference._types.AzureAiStudioServiceType": { + "type": "string", + "enum": [ + "azureaistudio" + ] + }, + "inference._types.AzureAiStudioServiceSettings": { "type": "object", "properties": { - "average_bucket_processing_time_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" - }, - "bucket_count": { - "type": "number" - }, - "exponential_average_bucket_processing_time_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" - }, - "exponential_average_bucket_processing_time_per_hour_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "api_key": { + "externalDocs": { + "url": "https://ai.azure.com/" + }, + "description": "A valid API key of your Azure AI Studio model deployment.\nThis key can be found on the overview page for your deployment in the management section of your Azure AI Studio account.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", + "type": "string" }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" + "endpoint_type": { + "externalDocs": { + "url": "https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/deployments-overview#billing-for-deploying-and-inferencing-llms-in-azure-ai-studio" + }, + "description": "The type of endpoint that is available for deployment through Azure AI Studio: `token` or `realtime`.\nThe `token` endpoint type is for \"pay as you go\" endpoints that are billed per token.\nThe `realtime` endpoint type is for \"real-time\" endpoints that are billed per hour of usage.", + "type": "string" }, - "total_bucket_processing_time_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "target": { + "description": "The target URL of your Azure AI Studio model deployment.\nThis can be found on the overview page for your deployment in the management section of your Azure AI Studio account.", + "type": "string" }, - "maximum_bucket_processing_time_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "provider": { + "description": "The model provider for your deployment.\nNote that some providers may support only certain task types.\nSupported providers include:\n\n* `cohere` - available for `text_embedding`, `rerank` and `completion` task types\n* `databricks` - available for `completion` task type only\n* `meta` - available for `completion` task type only\n* `microsoft_phi` - available for `completion` task type only\n* `mistral` - available for `completion` task type only\n* `openai` - available for `text_embedding` and `completion` task types", + "type": "string" }, - "minimum_bucket_processing_time_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Azure AI Studio.\nBy default, the `azureaistudio` service sets the number of requests allowed per minute to 240.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "bucket_count", - "exponential_average_bucket_processing_time_per_hour_ms", - "job_id", - "total_bucket_processing_time_ms" + "api_key", + "endpoint_type", + "target", + "provider" ] }, - "ml._types.Job": { + "inference._types.AzureAiStudioTaskSettings": { "type": "object", "properties": { - "allow_lazy_open": { - "description": "Advanced configuration option.\nSpecifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node.", - "type": "boolean" - }, - "analysis_config": { - "$ref": "#/components/schemas/ml._types.AnalysisConfig" - }, - "analysis_limits": { - "$ref": "#/components/schemas/ml._types.AnalysisLimits" - }, - "background_persist_interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "blocked": { - "$ref": "#/components/schemas/ml._types.JobBlocked" - }, - "create_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "custom_settings": { - "$ref": "#/components/schemas/ml._types.CustomSettings" - }, - "daily_model_snapshot_retention_after_days": { - "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies a period of time (in days) after which only the first snapshot per day is retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nValid values range from 0 to `model_snapshot_retention_days`.", + "do_sample": { + "description": "For a `completion` task, instruct the inference process to perform sampling.\nIt has no effect unless `temperature` or `top_p` is specified.", "type": "number" }, - "data_description": { - "$ref": "#/components/schemas/ml._types.DataDescription" + "max_new_tokens": { + "description": "For a `completion` task, provide a hint for the maximum number of output tokens to be generated.", + "default": 64.0, + "type": "number" }, - "datafeed_config": { - "$ref": "#/components/schemas/ml._types.Datafeed" + "temperature": { + "description": "For a `completion` task, control the apparent creativity of generated completions with a sampling temperature.\nIt must be a number in the range of 0.0 to 2.0.\nIt should not be used if `top_p` is specified.", + "type": "number" }, - "deleting": { - "description": "Indicates that the process of deleting the job is in progress but not yet completed.\nIt is only reported when `true`.", - "type": "boolean" + "top_p": { + "description": "For a `completion` task, make the model consider the results of the tokens with nucleus sampling probability.\nIt is an alternative value to `temperature` and must be a number in the range of 0.0 to 2.0.\nIt should not be used if `temperature` is specified.", + "type": "number" }, - "description": { - "description": "A description of the job.", + "user": { + "description": "For a `text_embedding` task, specify the user issuing the request.\nThis information can be used for abuse detection.", "type": "string" }, - "finished_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "groups": { - "description": "A list of job groups.\nA job can belong to no groups or many.", - "type": "array", - "items": { - "type": "string" - } + "return_documents": { + "description": "For a `rerank` task, return doc text within the results.", + "type": "boolean" }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" + "top_n": { + "description": "For a `rerank` task, the number of most relevant documents to return.\nIt defaults to the number of the documents.", + "type": "number" + } + } + }, + "inference._types.InferenceEndpointInfoAzureAIStudio": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "job_type": { - "description": "Reserved for future use, currently set to `anomaly_detector`.", + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeAzureAIStudio" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.TaskTypeAzureAIStudio": { + "type": "string", + "enum": [ + "text_embedding", + "completion", + "rerank" + ] + }, + "inference._types.AzureOpenAITaskType": { + "type": "string", + "enum": [ + "completion", + "chat_completion", + "text_embedding" + ] + }, + "inference._types.AzureOpenAIServiceType": { + "type": "string", + "enum": [ + "azureopenai" + ] + }, + "inference._types.AzureOpenAIServiceSettings": { + "type": "object", + "properties": { + "api_key": { + "externalDocs": { + "url": "https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#authentication" + }, + "description": "A valid API key for your Azure OpenAI account.\nYou must specify either `api_key` or `entra_id`.\nIf you do not provide either or you provide both, you will receive an error when you try to create your model.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", "type": "string" }, - "job_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "model_plot_config": { - "$ref": "#/components/schemas/ml._types.ModelPlotConfig" - }, - "model_snapshot_id": { - "$ref": "#/components/schemas/_types.Id" + "api_version": { + "description": "The Azure API version ID to use.\nIt is recommended to use the latest supported non-preview version.", + "type": "string" }, - "model_snapshot_retention_days": { - "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies the maximum period of time (in days) that snapshots are retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nBy default, snapshots ten days older than the newest snapshot are deleted.", - "type": "number" + "deployment_id": { + "externalDocs": { + "url": "https://oai.azure.com/" + }, + "description": "The deployment name of your deployed models.\nYour Azure OpenAI deployments can be found though the Azure OpenAI Studio portal that is linked to your subscription.", + "type": "string" }, - "renormalization_window_days": { - "description": "Advanced configuration option.\nThe period over which adjustments to the score are applied, as new data is seen.\nThe default value is the longer of 30 days or 100 `bucket_spans`.", - "type": "number" + "entra_id": { + "externalDocs": { + "url": "https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#authentication" + }, + "description": "A valid Microsoft Entra token.\nYou must specify either `api_key` or `entra_id`.\nIf you do not provide either or you provide both, you will receive an error when you try to create your model.", + "type": "string" }, - "results_index_name": { - "$ref": "#/components/schemas/_types.IndexName" + "rate_limit": { + "externalDocs": { + "url": "https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits" + }, + "description": "This setting helps to minimize the number of rate limit errors returned from Azure.\nThe `azureopenai` service sets a default number of requests allowed per minute depending on the task type.\nFor `text_embedding`, it is set to `1440`.\nFor `completion` and `chat_completion`, it is set to `120`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "results_retention_days": { - "description": "Advanced configuration option.\nThe period of time (in days) that results are retained.\nAge is calculated relative to the timestamp of the latest bucket result.\nIf 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.\nThe default value is null, which means all results are retained.\nAnnotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results.\nAnnotations added by users are retained forever.", - "type": "number" + "resource_name": { + "externalDocs": { + "url": "https://portal.azure.com/#view/HubsExtension/BrowseAll" + }, + "description": "The name of your Azure OpenAI resource.\nYou can find this from the list of resources in the Azure Portal for your subscription.", + "type": "string" } }, "required": [ - "allow_lazy_open", - "analysis_config", - "data_description", - "job_id", - "model_snapshot_retention_days", - "results_index_name" + "api_version", + "deployment_id", + "resource_name" ] }, - "ml._types.AnalysisLimits": { + "inference._types.AzureOpenAITaskSettings": { "type": "object", "properties": { - "categorization_examples_limit": { - "description": "The maximum number of examples stored per category in memory and in the results data store. If you increase this value, more examples are available, however it requires that you have more storage available. If you set this value to 0, no examples are stored. NOTE: The `categorization_examples_limit` applies only to analysis that uses categorization.", - "type": "number" - }, - "model_memory_limit": { - "$ref": "#/components/schemas/_types.ByteSize" + "user": { + "description": "For a `completion`, `chat_completion` or `text_embedding` task, specify the user issuing the request.\nThis information can be used for abuse detection.", + "type": "string" } } }, - "ml._types.JobBlocked": { - "type": "object", - "properties": { - "reason": { - "$ref": "#/components/schemas/ml._types.JobBlockedReason" + "inference._types.InferenceEndpointInfoAzureOpenAI": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "task_id": { - "$ref": "#/components/schemas/_types.TaskId" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeAzureOpenAI" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "reason" ] }, - "ml._types.JobBlockedReason": { + "inference._types.TaskTypeAzureOpenAI": { "type": "string", "enum": [ - "delete", - "reset", - "revert" + "text_embedding", + "completion", + "chat_completion" ] }, - "ml._types.CustomSettings": { - "description": "Custom metadata about the job", - "type": "object" + "inference._types.CohereTaskType": { + "type": "string", + "enum": [ + "completion", + "rerank", + "text_embedding" + ] }, - "ml._types.DataDescription": { + "inference._types.CohereServiceType": { + "type": "string", + "enum": [ + "cohere" + ] + }, + "inference._types.CohereServiceSettings": { "type": "object", "properties": { - "format": { - "description": "Only JSON format is supported at this time.", + "api_key": { + "externalDocs": { + "url": "https://dashboard.cohere.com/api-keys" + }, + "description": "A valid API key for your Cohere account.\nYou can find or create your Cohere API keys on the Cohere API key settings page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", "type": "string" }, - "time_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "time_format": { - "description": "The time format, which can be `epoch`, `epoch_ms`, or a custom pattern. The value `epoch` refers to UNIX or Epoch time (the number of seconds since 1 Jan 1970). The value `epoch_ms` indicates that time is measured in milliseconds since the epoch. The `epoch` and `epoch_ms` time formats accept either integer or real values. Custom patterns must conform to the Java DateTimeFormatter class. When you use date-time formatting patterns, it is recommended that you provide the full date, time and time zone. For example: `yyyy-MM-dd'T'HH:mm:ssX`. If the pattern that you specify is not sufficient to produce a complete timestamp, job creation fails.", - "type": "string" + "embedding_type": { + "description": "For a `text_embedding` task, the types of embeddings you want to get back.\nUse `binary` for binary embeddings, which are encoded as bytes with signed int8 precision.\nUse `bit` for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of `binary`).\nUse `byte` for signed int8 embeddings (this is a synonym of `int8`).\nUse `float` for the default float embeddings.\nUse `int8` for signed int8 embeddings.", + "default": "float", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CohereEmbeddingType" + } + ] }, - "field_delimiter": { + "model_id": { + "description": "For a `completion`, `rerank`, or `text_embedding` task, the name of the model to use for the inference task.\n\n* For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).\n* For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).\n* For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).", "type": "string" - } - } - }, - "ml._types.ModelPlotConfig": { - "type": "object", - "properties": { - "annotations_enabled": { - "description": "If true, enables calculation and storage of the model change annotations for each entity that is being analyzed.", - "type": "boolean" }, - "enabled": { - "description": "If true, enables calculation and storage of the model bounds for each entity that is being analyzed.", - "type": "boolean" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Cohere.\nBy default, the `cohere` service sets the number of requests allowed per minute to 10000.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "terms": { - "$ref": "#/components/schemas/_types.Field" + "similarity": { + "description": "The similarity measure.\nIf the `embedding_type` is `float`, the default value is `dot_product`.\nIf the `embedding_type` is `int8` or `byte`, the default value is `cosine`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CohereSimilarityType" + } + ] } - } + }, + "required": [ + "api_key", + "model_id" + ] }, - "ml.get_memory_stats.Memory": { + "inference._types.CohereEmbeddingType": { + "type": "string", + "enum": [ + "binary", + "bit", + "byte", + "float", + "int8" + ] + }, + "inference._types.CohereSimilarityType": { + "type": "string", + "enum": [ + "cosine", + "dot_product", + "l2_norm" + ] + }, + "inference._types.CohereTaskSettings": { "type": "object", "properties": { - "attributes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "jvm": { - "$ref": "#/components/schemas/ml.get_memory_stats.JvmStats" - }, - "mem": { - "$ref": "#/components/schemas/ml.get_memory_stats.MemStats" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "input_type": { + "description": "For a `text_embedding` task, the type of input passed to the model.\nValid values are:\n\n* `classification`: Use it for embeddings passed through a text classifier.\n* `clustering`: Use it for the embeddings run through a clustering algorithm.\n* `ingest`: Use it for storing document embeddings in a vector database.\n* `search`: Use it for storing embeddings of search queries run against a vector database to find relevant documents.\n\nIMPORTANT: The `input_type` field is required when using embedding models `v3` and higher.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CohereInputType" + } + ] }, - "roles": { - "description": "Roles assigned to the node.", - "type": "array", - "items": { - "type": "string" - } + "return_documents": { + "description": "For a `rerank` task, return doc text within the results.", + "type": "boolean" }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" + "top_n": { + "description": "For a `rerank` task, the number of most relevant documents to return.\nIt defaults to the number of the documents.\nIf this inference endpoint is used in a `text_similarity_reranker` retriever query and `top_n` is set, it must be greater than or equal to `rank_window_size` in the query.", + "type": "number" }, - "ephemeral_id": { - "$ref": "#/components/schemas/_types.Id" + "truncate": { + "description": "For a `text_embedding` task, the method to handle inputs longer than the maximum token length.\nValid values are:\n\n* `END`: When the input exceeds the maximum input token length, the end of the input is discarded.\n* `NONE`: When the input exceeds the maximum input token length, an error is returned.\n* `START`: When the input exceeds the maximum input token length, the start of the input is discarded.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CohereTruncateType" + } + ] } }, "required": [ - "attributes", - "jvm", - "mem", - "name", - "roles", - "transport_address", - "ephemeral_id" + "input_type" ] }, - "ml.get_memory_stats.JvmStats": { - "type": "object", - "properties": { - "heap_max": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "heap_max_in_bytes": { - "description": "Maximum amount of memory, in bytes, available for use by the heap.", - "type": "number" - }, - "java_inference": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "java_inference_in_bytes": { - "description": "Amount of Java heap, in bytes, currently being used for caching inference models.", - "type": "number" - }, - "java_inference_max": { - "$ref": "#/components/schemas/_types.ByteSize" + "inference._types.CohereInputType": { + "type": "string", + "enum": [ + "classification", + "clustering", + "ingest", + "search" + ] + }, + "inference._types.CohereTruncateType": { + "type": "string", + "enum": [ + "END", + "NONE", + "START" + ] + }, + "inference._types.InferenceEndpointInfoCohere": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "java_inference_max_in_bytes": { - "description": "Maximum amount of Java heap, in bytes, to be used for caching inference models.", - "type": "number" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeCohere" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "heap_max_in_bytes", - "java_inference_in_bytes", - "java_inference_max_in_bytes" ] }, - "ml.get_memory_stats.MemStats": { + "inference._types.TaskTypeCohere": { + "type": "string", + "enum": [ + "text_embedding", + "rerank", + "completion" + ] + }, + "inference._types.TaskTypeContextualAI": { + "type": "string", + "enum": [ + "rerank" + ] + }, + "inference._types.ContextualAIServiceType": { + "type": "string", + "enum": [ + "contextualai" + ] + }, + "inference._types.ContextualAIServiceSettings": { "type": "object", "properties": { - "adjusted_total": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "adjusted_total_in_bytes": { - "description": "If the amount of physical memory has been overridden using the `es.total_memory_bytes` system property\nthen this reports the overridden value in bytes. Otherwise it reports the same value as `total_in_bytes`.", - "type": "number" - }, - "total": { - "$ref": "#/components/schemas/_types.ByteSize" + "api_key": { + "description": "A valid API key for your Contexutual AI account.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", + "type": "string" }, - "total_in_bytes": { - "description": "Total amount of physical memory in bytes.", - "type": "number" + "model_id": { + "description": "The name of the model to use for the inference task.\nRefer to the Contextual AI documentation for the list of available rerank models.", + "type": "string" }, - "ml": { - "$ref": "#/components/schemas/ml.get_memory_stats.MemMlStats" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Contextual AI.\nThe `contextualai` service sets a default number of requests allowed per minute depending on the task type.\nFor `rerank`, it is set to `1000`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "adjusted_total_in_bytes", - "total_in_bytes", - "ml" + "api_key", + "model_id" ] }, - "ml.get_memory_stats.MemMlStats": { + "inference._types.ContextualAITaskSettings": { "type": "object", "properties": { - "anomaly_detectors": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "anomaly_detectors_in_bytes": { - "description": "Amount of native memory, in bytes, set aside for anomaly detection jobs.", - "type": "number" - }, - "data_frame_analytics": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "data_frame_analytics_in_bytes": { - "description": "Amount of native memory, in bytes, set aside for data frame analytics jobs.", - "type": "number" - }, - "max": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_in_bytes": { - "description": "Maximum amount of native memory (separate to the JVM heap), in bytes, that may be used by machine learning native processes.", - "type": "number" - }, - "native_code_overhead": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "native_code_overhead_in_bytes": { - "description": "Amount of native memory, in bytes, set aside for loading machine learning native code shared libraries.", - "type": "number" + "instruction": { + "description": "Instructions for the reranking model. Refer to \nOnly for the `rerank` task type.", + "type": "string" }, - "native_inference": { - "$ref": "#/components/schemas/_types.ByteSize" + "return_documents": { + "description": "Whether to return the source documents in the response.\nOnly for the `rerank` task type.", + "default": false, + "type": "boolean" }, - "native_inference_in_bytes": { - "description": "Amount of native memory, in bytes, set aside for trained models that have a PyTorch model_type.", + "top_k": { + "description": "The number of most relevant documents to return.\nIf not specified, the reranking results of all documents will be returned.\nOnly for the `rerank` task type.", "type": "number" } - }, - "required": [ - "anomaly_detectors_in_bytes", - "data_frame_analytics_in_bytes", - "max_in_bytes", - "native_code_overhead_in_bytes", - "native_inference_in_bytes" - ] + } }, - "ml._types.ModelSnapshotUpgrade": { - "type": "object", - "properties": { - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "snapshot_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "state": { - "$ref": "#/components/schemas/ml._types.SnapshotUpgradeState" - }, - "node": { - "$ref": "#/components/schemas/ml._types.DiscoveryNode" + "inference._types.InferenceEndpointInfoContextualAi": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "assignment_explanation": { - "type": "string" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeContextualAI" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "job_id", - "snapshot_id", - "state", - "node", - "assignment_explanation" ] }, - "ml._types.SnapshotUpgradeState": { + "inference._types.CustomTaskType": { "type": "string", "enum": [ - "loading_old_state", - "saving_new_state", - "stopped", - "failed" + "text_embedding", + "sparse_embedding", + "rerank", + "completion" ] }, - "ml._types.DiscoveryNode": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ml._types.DiscoveryNodeContent" - }, - "minProperties": 1, - "maxProperties": 1 + "inference._types.CustomServiceType": { + "type": "string", + "enum": [ + "custom" + ] }, - "ml._types.DiscoveryNodeContent": { + "inference._types.CustomServiceSettings": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "ephemeral_id": { - "$ref": "#/components/schemas/_types.Id" + "batch_size": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/semantic-text#auto-text-chunking" + }, + "description": "Specifies the batch size used for the semantic_text field. If the field is not provided, the default is 10.\nThe batch size is the maximum number of inputs in a single request to the upstream service.\nThe chunk within the batch are controlled by the selected chunking strategy for the semantic_text field.", + "type": "number" }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" + "headers": { + "description": "Specifies the HTTP header parameters – such as `Authentication` or `Content-Type` – that are required to access the custom service.\nFor example:\n```\n\"headers\":{\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n}\n```", + "type": "object" }, - "external_id": { - "type": "string" + "input_type": { + "description": "Specifies the input type translation values that are used to replace the `${input_type}` template in the request body.\nFor example:\n```\n\"input_type\": {\n \"translation\": {\n \"ingest\": \"do_ingest\",\n \"search\": \"do_search\"\n },\n \"default\": \"a_default\"\n},\n```\nIf the subsequent inference requests come from a search context, the `search` key will be used and the template will be replaced with `do_search`.\nIf it comes from the ingest context `do_ingest` is used. If it's a different context that is not specified, the default value will be used. If no default is specified an empty string is used.\n`translation` can be:\n* `classification`\n* `clustering`\n* `ingest`\n* `search`", + "type": "object" }, - "attributes": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "query_parameters": { + "description": "Specifies the query parameters as a list of tuples. The arrays inside the `query_parameters` must have two items, a key and a value.\nFor example:\n```\n\"query_parameters\":[\n [\"param_key\", \"some_value\"],\n [\"param_key\", \"another_value\"],\n [\"other_key\", \"other_value\"]\n]\n```\nIf the base url is `https://www.elastic.co` it results in: `https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value`.", + "type": "object" }, - "roles": { - "type": "array", - "items": { - "type": "string" - } + "request": { + "description": "The request configuration object.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CustomRequestParams" + } + ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "response": { + "description": "The response configuration object.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CustomResponseParams" + } + ] }, - "min_index_version": { - "type": "number" + "secret_parameters": { + "description": "Specifies secret parameters, like `api_key` or `api_token`, that are required to access the custom service.\nFor example:\n```\n\"secret_parameters\":{\n \"api_key\":\"\"\n}\n```", + "type": "object" }, - "max_index_version": { - "type": "number" + "url": { + "description": "The URL endpoint to use for the requests.", + "type": "string" } }, "required": [ - "ephemeral_id", - "transport_address", - "external_id", - "attributes", - "roles", - "version", - "min_index_version", - "max_index_version" + "request", + "response", + "secret_parameters" ] }, - "ml._types.ModelSnapshot": { + "inference._types.CustomRequestParams": { "type": "object", "properties": { - "description": { - "description": "An optional description of the job.", + "content": { + "description": "The body structure of the request. It requires passing in the string-escaped result of the JSON format HTTP request body.\nFor example:\n```\n\"request\": \"{\\\"input\\\":${input}}\"\n```\n> info\n> The content string needs to be a single line except when using the Kibana console.", "type": "string" - }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "latest_record_time_stamp": { - "description": "The timestamp of the latest processed record.", - "type": "number" - }, - "latest_result_time_stamp": { - "description": "The timestamp of the latest bucket result.", - "type": "number" - }, - "min_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "model_size_stats": { - "$ref": "#/components/schemas/ml._types.ModelSizeStats" - }, - "retain": { - "description": "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. The default value is false.", - "type": "boolean" - }, - "snapshot_doc_count": { - "description": "For internal use only.", - "type": "number" - }, - "snapshot_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "timestamp": { - "description": "The creation timestamp for the snapshot.", - "type": "number" } }, "required": [ - "job_id", - "min_version", - "retain", - "snapshot_doc_count", - "snapshot_id", - "timestamp" + "content" ] }, - "ml._types.OverallBucket": { + "inference._types.CustomResponseParams": { "type": "object", "properties": { - "bucket_span": { - "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" - }, - "is_interim": { - "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", - "type": "boolean" - }, - "jobs": { - "description": "An array of objects that contain the max_anomaly_score per job_id.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.OverallBucketJob" - } - }, - "overall_score": { - "description": "The top_n average of the maximum bucket anomaly_score per job.", - "type": "number" - }, - "result_type": { - "description": "Internal. This is always set to overall_bucket.", - "type": "string" - }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "timestamp_string": { - "$ref": "#/components/schemas/_types.DateTime" + "json_parser": { + "description": "Specifies the JSON parser that is used to parse the response from the custom service.\nDifferent task types require different json_parser parameters.\nFor example:\n```\n# text_embedding\n# For a response like this:\n\n{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"index\": 0,\n \"embedding\": [\n 0.014539449,\n -0.015288644\n ]\n }\n ],\n \"model\": \"text-embedding-ada-002-v2\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n}\n\n# Elasticsearch supports the following embedding types:\n* float\n* byte\n* bit (or binary)\n\nTo specify the embedding type for the response, the `embedding_type`\nfield should be added in the `json_parser` object. Here's an example:\n\"response\":{\n \"json_parser\":{\n \"text_embeddings\":\"$.data[*].embedding[*]\",\n \"embedding_type\":\"bit\"\n }\n}\n\nIf `embedding_type` is not specified, it defaults to `float`.\n\n# sparse_embedding\n# For a response like this:\n\n{\n \"request_id\": \"75C50B5B-E79E-4930-****-F48DBB392231\",\n \"latency\": 22,\n \"usage\": {\n \"token_count\": 11\n },\n \"result\": {\n \"sparse_embeddings\": [\n {\n \"index\": 0,\n \"embedding\": [\n {\n \"token_id\": 6,\n \"weight\": 0.101\n },\n {\n \"token_id\": 163040,\n \"weight\": 0.28417\n }\n ]\n }\n ]\n }\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"token_path\":\"$.result.sparse_embeddings[*].embedding[*].token_id\",\n \"weight_path\":\"$.result.sparse_embeddings[*].embedding[*].weight\"\n }\n}\n\n# rerank\n# For a response like this:\n\n{\n \"results\": [\n {\n \"index\": 3,\n \"relevance_score\": 0.999071,\n \"document\": \"abc\"\n },\n {\n \"index\": 4,\n \"relevance_score\": 0.7867867,\n \"document\": \"123\"\n },\n {\n \"index\": 0,\n \"relevance_score\": 0.32713068,\n \"document\": \"super\"\n }\n ],\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"reranked_index\":\"$.result.scores[*].index\", // optional\n \"relevance_score\":\"$.result.scores[*].score\",\n \"document_text\":\"xxx\" // optional\n }\n}\n\n# completion\n# For a response like this:\n\n{\n \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n \"object\": \"chat.completion\",\n \"created\": 1741569952,\n \"model\": \"gpt-4.1-2025-04-14\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ]\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"completion_result\":\"$.choices[*].message.content\"\n }\n}", + "type": "object" } }, "required": [ - "bucket_span", - "is_interim", - "jobs", - "overall_score", - "result_type", - "timestamp" + "json_parser" ] }, - "ml._types.OverallBucketJob": { + "inference._types.CustomTaskSettings": { "type": "object", "properties": { - "job_id": { - "$ref": "#/components/schemas/_types.Id" + "parameters": { + "description": "Specifies parameters that are required to run the custom service. The parameters depend on the model your custom service uses.\nFor example:\n```\n\"task_settings\":{\n \"parameters\":{\n \"input_type\":\"query\",\n \"return_token\":true\n }\n}\n```", + "type": "object" + } + } + }, + "inference._types.InferenceEndpointInfoCustom": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "max_anomaly_score": { - "type": "number" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeCustom" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "job_id", - "max_anomaly_score" ] }, - "ml._types.Anomaly": { + "inference._types.TaskTypeCustom": { + "type": "string", + "enum": [ + "text_embedding", + "sparse_embedding", + "rerank", + "completion" + ] + }, + "inference._types.TaskTypeDeepSeek": { + "type": "string", + "enum": [ + "completion", + "chat_completion" + ] + }, + "inference._types.DeepSeekServiceType": { + "type": "string", + "enum": [ + "deepseek" + ] + }, + "inference._types.DeepSeekServiceSettings": { "type": "object", "properties": { - "actual": { - "description": "The actual value for the bucket.", - "type": "array", - "items": { - "type": "number" - } - }, - "anomaly_score_explanation": { - "$ref": "#/components/schemas/ml._types.AnomalyExplanation" - }, - "bucket_span": { - "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" - }, - "by_field_name": { - "description": "The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split.", - "type": "string" - }, - "by_field_value": { - "description": "The value of `by_field_name`.", - "type": "string" - }, - "causes": { - "description": "For population analysis, an over field must be specified in the detector. This property contains an array of anomaly records that are the causes for the anomaly that has been identified for the over field. This sub-resource contains the most anomalous records for the `over_field_name`. For scalability reasons, a maximum of the 10 most significant causes of the anomaly are returned. As part of the core analytical modeling, these low-level anomaly records are aggregated for their parent over field record. The `causes` resource contains similar elements to the record resource, namely `actual`, `typical`, `geo_results.actual_point`, `geo_results.typical_point`, `*_field_name` and `*_field_value`. Probability and scores are not applicable to causes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.AnomalyCause" - } - }, - "detector_index": { - "description": "A unique identifier for the detector.", - "type": "number" - }, - "field_name": { - "description": "Certain functions require a field to operate on, for example, `sum()`. For those functions, this value is the name of the field to be analyzed.", - "type": "string" - }, - "function": { - "description": "The function in which the anomaly occurs, as specified in the detector configuration. For example, `max`.", - "type": "string" - }, - "function_description": { - "description": "The description of the function in which the anomaly occurs, as specified in the detector configuration.", - "type": "string" - }, - "geo_results": { - "$ref": "#/components/schemas/ml._types.GeoResults" - }, - "influencers": { - "description": "If influencers were specified in the detector configuration, this array contains influencers that contributed to or were to blame for an anomaly.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Influence" - } - }, - "initial_record_score": { - "description": "A normalized score between 0-100, which is based on the probability of the anomalousness of this record. This is the initial value that was calculated at the time the bucket was processed.", - "type": "number" - }, - "is_interim": { - "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", - "type": "boolean" - }, - "job_id": { - "description": "Identifier for the anomaly detection job.", - "type": "string" - }, - "over_field_name": { - "description": "The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits.", - "type": "string" - }, - "over_field_value": { - "description": "The value of `over_field_name`.", - "type": "string" - }, - "partition_field_name": { - "description": "The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field.", + "api_key": { + "externalDocs": { + "url": "https://api-docs.deepseek.com/" + }, + "description": "A valid API key for your DeepSeek account.\nYou can find or create your DeepSeek API keys on the DeepSeek API key page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", "type": "string" }, - "partition_field_value": { - "description": "The value of `partition_field_name`.", + "model_id": { + "description": "For a `completion` or `chat_completion` task, the name of the model to use for the inference task.\n\nFor the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing).", "type": "string" }, - "probability": { - "description": "The probability of the individual anomaly occurring, in the range 0 to 1. For example, `0.0000772031`. This value can be held to a high precision of over 300 decimal places, so the `record_score` is provided as a human-readable and friendly interpretation of this.", - "type": "number" - }, - "record_score": { - "description": "A normalized score between 0-100, which is based on the probability of the anomalousness of this record. Unlike `initial_record_score`, this value will be updated by a re-normalization process as new data is analyzed.", - "type": "number" - }, - "result_type": { - "description": "Internal. This is always set to `record`.", + "url": { + "description": "The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`.", "type": "string" - }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "typical": { - "description": "The typical value for the bucket, according to analytical modeling.", - "type": "array", - "items": { - "type": "number" - } } }, "required": [ - "bucket_span", - "detector_index", - "initial_record_score", - "is_interim", - "job_id", - "probability", - "record_score", - "result_type", - "timestamp" + "api_key", + "model_id" ] }, - "ml._types.AnomalyExplanation": { - "type": "object", - "properties": { - "anomaly_characteristics_impact": { - "description": "Impact from the duration and magnitude of the detected anomaly relative to the historical average.", - "type": "number" - }, - "anomaly_length": { - "description": "Length of the detected anomaly in the number of buckets.", - "type": "number" - }, - "anomaly_type": { - "description": "Type of the detected anomaly: `spike` or `dip`.", - "type": "string" - }, - "high_variance_penalty": { - "description": "Indicates reduction of anomaly score for the bucket with large confidence intervals. If a bucket has large confidence intervals, the score is reduced.", - "type": "boolean" - }, - "incomplete_bucket_penalty": { - "description": "If the bucket contains fewer samples than expected, the score is reduced.", - "type": "boolean" - }, - "lower_confidence_bound": { - "description": "Lower bound of the 95% confidence interval.", - "type": "number" - }, - "multi_bucket_impact": { - "description": "Impact of the deviation between actual and typical values in the past 12 buckets.", - "type": "number" - }, - "single_bucket_impact": { - "description": "Impact of the deviation between actual and typical values in the current bucket.", - "type": "number" - }, - "typical_value": { - "description": "Typical (expected) value for this bucket.", - "type": "number" + "inference._types.InferenceEndpointInfoDeepSeek": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "upper_confidence_bound": { - "description": "Upper bound of the 95% confidence interval.", - "type": "number" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeDeepSeek" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - } + ] + }, + "inference._types.ElasticsearchTaskType": { + "type": "string", + "enum": [ + "rerank", + "sparse_embedding", + "text_embedding" + ] }, - "ml._types.AnomalyCause": { + "inference._types.ElasticsearchServiceType": { + "type": "string", + "enum": [ + "elasticsearch" + ] + }, + "inference._types.ElasticsearchServiceSettings": { "type": "object", "properties": { - "actual": { - "type": "array", - "items": { - "type": "number" - } - }, - "by_field_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "by_field_value": { - "type": "string" - }, - "correlated_by_field_value": { - "type": "string" - }, - "field_name": { - "$ref": "#/components/schemas/_types.Field" + "adaptive_allocations": { + "description": "Adaptive allocations configuration details.\nIf `enabled` is true, the number of allocations of the model is set based on the current load the process gets.\nWhen the load is high, a new model allocation is automatically created, respecting the value of `max_number_of_allocations` if it's set.\nWhen the load is low, a model allocation is automatically removed, respecting the value of `min_number_of_allocations` if it's set.\nIf `enabled` is true, do not set the number of allocations manually.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AdaptiveAllocations" + } + ] }, - "function": { + "deployment_id": { + "description": "The deployment identifier for a trained model deployment.\nWhen `deployment_id` is used the `model_id` is optional.", "type": "string" }, - "function_description": { + "model_id": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/machine-learning/nlp/ml-nlp-import-model#ml-nlp-import-script" + }, + "description": "The name of the model to use for the inference task.\nIt can be the ID of a built-in model (for example, `.multilingual-e5-small` for E5) or a text embedding model that was uploaded by using the Eland client.", "type": "string" }, - "geo_results": { - "$ref": "#/components/schemas/ml._types.GeoResults" - }, - "influencers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Influence" - } - }, - "over_field_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "over_field_value": { - "type": "string" + "num_allocations": { + "description": "The total number of allocations that are assigned to the model across machine learning nodes.\nIncreasing this value generally increases the throughput.\nIf adaptive allocations are enabled, do not set this value because it's automatically set.", + "type": "number" }, - "partition_field_name": { - "type": "string" + "num_threads": { + "description": "The number of threads used by each model allocation during inference.\nThis setting generally increases the speed per inference request.\nThe inference process is a compute-bound process; `threads_per_allocations` must not exceed the number of available allocated processors per node.\nThe value must be a power of 2.\nThe maximum value is 32.", + "type": "number" }, - "partition_field_value": { + "long_document_strategy": { + "description": "Available only for the `rerank` task type using the Elastic reranker model.\nControls the strategy used for processing long documents during inference.\n\nPossible values:\n- `truncate` (default): Processes only the beginning of each document.\n- `chunk`: Splits long documents into smaller parts (chunks) before inference.\n\nWhen `long_document_strategy` is set to `chunk`, Elasticsearch splits each document into smaller parts but still returns a single score per document.\nThat score reflects the highest relevance score among all chunks.", + "x-state": "Technical preview", "type": "string" }, - "probability": { + "max_chunks_per_doc": { + "description": "Only for the `rerank` task type.\nLimits the number of chunks per document that are sent for inference when chunking is enabled.\nIf not set, all chunks generated for the document are processed.", + "x-state": "Technical preview", "type": "number" - }, - "typical": { - "type": "array", - "items": { - "type": "number" - } } }, "required": [ - "probability" + "model_id", + "num_threads" ] }, - "ml._types.GeoResults": { + "inference._types.AdaptiveAllocations": { "type": "object", "properties": { - "actual_point": { - "description": "The actual value for the bucket formatted as a `geo_point`.", - "type": "string" + "enabled": { + "description": "Turn on `adaptive_allocations`.", + "default": false, + "type": "boolean" }, - "typical_point": { - "description": "The typical value for the bucket formatted as a `geo_point`.", - "type": "string" + "max_number_of_allocations": { + "description": "The maximum number of allocations to scale to.\nIf set, it must be greater than or equal to `min_number_of_allocations`.", + "type": "number" + }, + "min_number_of_allocations": { + "description": "The minimum number of allocations to scale to.\nIf set, it must be greater than or equal to 0.\nIf not defined, the deployment scales to 0.", + "type": "number" } } }, - "ml._types.Influence": { + "inference._types.ElasticsearchTaskSettings": { "type": "object", "properties": { - "influencer_field_name": { - "type": "string" + "return_documents": { + "description": "For a `rerank` task, return the document instead of only the index.", + "default": true, + "type": "boolean" + } + } + }, + "inference._types.InferenceEndpointInfoElasticsearch": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "influencer_field_values": { - "type": "array", - "items": { - "type": "string" - } + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeElasticsearch" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "influencer_field_name", - "influencer_field_values" ] }, - "ml._types.Include": { + "inference._types.TaskTypeElasticsearch": { "type": "string", "enum": [ - "definition", - "feature_importance_baseline", - "hyperparameters", - "total_feature_importance", - "definition_status" + "sparse_embedding", + "text_embedding", + "rerank" ] }, - "ml._types.TrainedModelConfig": { + "inference._types.ElserTaskType": { + "type": "string", + "enum": [ + "sparse_embedding" + ] + }, + "inference._types.ElserServiceType": { + "type": "string", + "enum": [ + "elser" + ] + }, + "inference._types.ElserServiceSettings": { "type": "object", "properties": { - "model_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "model_type": { - "$ref": "#/components/schemas/ml._types.TrainedModelType" - }, - "tags": { - "description": "A comma delimited string of tags. A trained model can have many tags, or none.", - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "compressed_definition": { - "type": "string" - }, - "created_by": { - "description": "Information on the creator of the trained model.", - "type": "string" - }, - "create_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "default_field_map": { - "description": "Any field map described in the inference configuration takes precedence.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "description": { - "description": "The free-text description of the trained model.", - "type": "string" + "adaptive_allocations": { + "description": "Adaptive allocations configuration details.\nIf `enabled` is true, the number of allocations of the model is set based on the current load the process gets.\nWhen the load is high, a new model allocation is automatically created, respecting the value of `max_number_of_allocations` if it's set.\nWhen the load is low, a model allocation is automatically removed, respecting the value of `min_number_of_allocations` if it's set.\nIf `enabled` is true, do not set the number of allocations manually.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AdaptiveAllocations" + } + ] }, - "estimated_heap_memory_usage_bytes": { - "description": "The estimated heap usage in bytes to keep the trained model in memory.", + "num_allocations": { + "description": "The total number of allocations this model is assigned across machine learning nodes.\nIncreasing this value generally increases the throughput.\nIf adaptive allocations is enabled, do not set this value because it's automatically set.", "type": "number" }, - "estimated_operations": { - "description": "The estimated number of operations to use the trained model.", + "num_threads": { + "description": "The number of threads used by each model allocation during inference.\nIncreasing this value generally increases the speed per inference request.\nThe inference process is a compute-bound process; `threads_per_allocations` must not exceed the number of available allocated processors per node.\nThe value must be a power of 2.\nThe maximum value is 32.\n\n> info\n> If you want to optimize your ELSER endpoint for ingest, set the number of threads to 1. If you want to optimize your ELSER endpoint for search, set the number of threads to greater than 1.", "type": "number" + } + }, + "required": [ + "num_allocations", + "num_threads" + ] + }, + "inference._types.InferenceEndpointInfoELSER": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "fully_defined": { - "description": "True if the full model definition is present.", - "type": "boolean" - }, - "inference_config": { - "$ref": "#/components/schemas/ml._types.InferenceConfigCreateContainer" - }, - "input": { - "$ref": "#/components/schemas/ml._types.TrainedModelConfigInput" - }, - "license_level": { - "description": "The license level of the trained model.", + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeELSER" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.TaskTypeELSER": { + "type": "string", + "enum": [ + "sparse_embedding" + ] + }, + "inference._types.GoogleAiStudioTaskType": { + "type": "string", + "enum": [ + "completion", + "text_embedding" + ] + }, + "inference._types.GoogleAiServiceType": { + "type": "string", + "enum": [ + "googleaistudio" + ] + }, + "inference._types.GoogleAiStudioServiceSettings": { + "type": "object", + "properties": { + "api_key": { + "description": "A valid API key of your Google Gemini account.", "type": "string" }, - "metadata": { - "$ref": "#/components/schemas/ml._types.TrainedModelConfigMetadata" - }, - "model_size_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "model_package": { - "$ref": "#/components/schemas/ml._types.ModelPackageConfig" - }, - "location": { - "$ref": "#/components/schemas/ml._types.TrainedModelLocation" - }, - "platform_architecture": { + "model_id": { + "externalDocs": { + "url": "https://ai.google.dev/gemini-api/docs/models" + }, + "description": "The name of the model to use for the inference task.\nRefer to the Google documentation for the list of supported models.", "type": "string" }, - "prefix_strings": { - "$ref": "#/components/schemas/ml._types.TrainedModelPrefixStrings" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Google AI Studio.\nBy default, the `googleaistudio` service sets the number of requests allowed per minute to 360.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "model_id", - "tags", - "input" + "api_key", + "model_id" ] }, - "ml._types.TrainedModelType": { + "inference._types.InferenceEndpointInfoGoogleAIStudio": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeGoogleAIStudio" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.TaskTypeGoogleAIStudio": { "type": "string", "enum": [ - "tree_ensemble", - "lang_ident", - "pytorch" + "text_embedding", + "completion" ] }, - "ml._types.InferenceConfigCreateContainer": { - "description": "Inference configuration provided when storing the model config", + "inference._types.GoogleVertexAITaskType": { + "type": "string", + "enum": [ + "rerank", + "text_embedding", + "completion", + "chat_completion" + ] + }, + "inference._types.GoogleVertexAIServiceType": { + "type": "string", + "enum": [ + "googlevertexai" + ] + }, + "inference._types.GoogleVertexAIServiceSettings": { "type": "object", "properties": { - "regression": { - "$ref": "#/components/schemas/ml._types.RegressionInferenceOptions" - }, - "classification": { - "$ref": "#/components/schemas/ml._types.ClassificationInferenceOptions" + "provider": { + "description": "The name of the Google Model Garden Provider for `completion` and `chat_completion` tasks.\nIn order for a Google Model Garden endpoint to be used `provider` must be defined and be other than `google`.\nModes:\n- Google Model Garden (third-party models): set `provider` to a supported non-`google` value and provide `url` and/or `streaming_url`.\n- Google Vertex AI: omit `provider` or set it to `google`. In this mode, do not set `url` or `streaming_url` and Elastic will construct the endpoint url from `location`, `model_id`, and `project_id` parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.GoogleModelGardenProvider" + } + ] }, - "text_classification": { - "$ref": "#/components/schemas/ml._types.TextClassificationInferenceOptions" + "url": { + "description": "The URL for non-streaming `completion` requests to a Google Model Garden provider endpoint.\nIf both `url` and `streaming_url` are provided, each is used for its respective mode.\nIf `streaming_url` is not provided, `url` is also used for streaming `completion` and `chat_completion`.\nIf `provider` is not provided or set to `google` (Google Vertex AI), do not set `url` (or `streaming_url`).\nAt least one of `url` or `streaming_url` must be provided for Google Model Garden endpoint usage.\nCertain providers require separate URLs for streaming and non-streaming operations (e.g., Anthropic, Mistral, AI21). Others support both operation types through a single URL (e.g., Meta, Hugging Face).\nInformation on constructing the URL for various providers can be found in the Google Model Garden documentation for the model, or on the endpoint’s `Sample request` page. The request examples also illustrate the proper formatting for the `url`.", + "type": "string" }, - "zero_shot_classification": { - "$ref": "#/components/schemas/ml._types.ZeroShotClassificationInferenceOptions" + "streaming_url": { + "description": "The URL for streaming `completion` and `chat_completion` requests to a Google Model Garden provider endpoint.\nIf both `streaming_url` and `url` are provided, each is used for its respective mode.\nIf `url` is not provided, `streaming_url` is also used for non-streaming `completion` requests.\nIf `provider` is not provided or set to `google` (Google Vertex AI), do not set `streaming_url` (or `url`).\nAt least one of `streaming_url` or `url` must be provided for Google Model Garden endpoint usage.\nCertain providers require separate URLs for streaming and non-streaming operations (e.g., Anthropic, Mistral, AI21). Others support both operation types through a single URL (e.g., Meta, Hugging Face).\nInformation on constructing the URL for various providers can be found in the Google Model Garden documentation for the model, or on the endpoint’s `Sample request` page. The request examples also illustrate the proper formatting for the `streaming_url`.", + "type": "string" }, - "fill_mask": { - "$ref": "#/components/schemas/ml._types.FillMaskInferenceOptions" + "location": { + "externalDocs": { + "url": "https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations" + }, + "description": "The name of the location to use for the inference task for the Google Vertex AI inference task.\nFor Google Vertex AI, when `provider` is omitted or `google` `location` is mandatory.\nFor Google Model Garden's `completion` and `chat_completion` tasks, when `provider` is a supported non-`google` value - `location` is ignored.\nRefer to the Google documentation for the list of supported locations.", + "type": "string" }, - "learning_to_rank": { - "$ref": "#/components/schemas/ml._types.LearningToRankConfig" + "model_id": { + "externalDocs": { + "url": "https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api" + }, + "description": "The name of the model to use for the inference task.\nFor Google Vertex AI `model_id` is mandatory.\nFor Google Model Garden's `completion` and `chat_completion` tasks, when `provider` is a supported non-`google` value - `model_id` will be used for some providers that require it, otherwise - ignored.\nRefer to the Google documentation for the list of supported models for Google Vertex AI.", + "type": "string" }, - "ner": { - "$ref": "#/components/schemas/ml._types.NerInferenceOptions" + "project_id": { + "description": "The name of the project to use for the Google Vertex AI inference task.\nFor Google Vertex AI `project_id` is mandatory.\nFor Google Model Garden's `completion` and `chat_completion` tasks, when `provider` is a supported non-`google` value - `project_id` is ignored.", + "type": "string" }, - "pass_through": { - "$ref": "#/components/schemas/ml._types.PassThroughInferenceOptions" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Google Vertex AI.\nBy default, the `googlevertexai` service sets the number of requests allowed per minute to 30.000.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "text_embedding": { - "$ref": "#/components/schemas/ml._types.TextEmbeddingInferenceOptions" + "service_account_json": { + "description": "A valid service account in JSON format for the Google Vertex AI API.", + "type": "string" }, - "text_expansion": { - "$ref": "#/components/schemas/ml._types.TextExpansionInferenceOptions" + "dimensions": { + "externalDocs": { + "url": "https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/get-text-embeddings" + }, + "description": "For a `text_embedding` task, the number of dimensions the resulting output embeddings should have.\nBy default, the model's standard output dimension is used.\nRefer to the Google documentation for more information.", + "type": "number" }, - "question_answering": { - "$ref": "#/components/schemas/ml._types.QuestionAnsweringInferenceOptions" + "max_batch_size": { + "description": "Only applicable for the `text_embedding` task type.\nControls the batch size of chunked inference requests sent to Google Vertex AI.\n\nSetting this parameter lower reduces the risk of exceeding token limits but may result in more API calls. Setting it higher increases throughput but may risk hitting token limits.\n\nTo estimate a safe `max_batch_size` value, you can use it together with the `max_chunk_size` parameter using the following formula:\n`max_batch_size ≈ max_chunk_size × 1.3 × 512 ÷ 20000`\n\nWhere:\n- `1.3` is an approximate tokens-per-word ratio\n- `512` is the maximum number of chunks that can be generated per document\n- `20000` is the Google Vertex AI token limit per request\n\nThis estimate assumes the worst-case scenario with a document generating the maximum 512 chunks.", + "default": 250.0, + "type": "number" } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "service_account_json" + ] }, - "ml._types.TextClassificationInferenceOptions": { + "inference._types.GoogleModelGardenProvider": { + "type": "string", + "enum": [ + "google", + "anthropic", + "meta", + "hugging_face", + "mistral", + "ai21" + ] + }, + "inference._types.GoogleVertexAITaskSettings": { "type": "object", "properties": { - "num_top_classes": { - "description": "Specifies the number of top class predictions to return. Defaults to 0.", - "type": "number" - }, - "tokenization": { - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" + "auto_truncate": { + "description": "For a `text_embedding` task, truncate inputs longer than the maximum token length automatically.", + "type": "boolean" }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" + "top_n": { + "description": "For a `rerank` task, the number of the top N documents that should be returned.", + "type": "number" }, - "classification_labels": { - "description": "Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labels", - "type": "array", - "items": { - "type": "string" - } + "thinking_config": { + "externalDocs": { + "url": "https://ai.google.dev/gemini-api/docs/thinking#set-budget" + }, + "description": "For a `completion` or `chat_completion` task, allows configuration of the thinking features for the model.\nRefer to the Google documentation for the allowable configurations for each model type.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.ThinkingConfig" + } + ] }, - "vocabulary": { - "$ref": "#/components/schemas/ml._types.Vocabulary" + "max_tokens": { + "externalDocs": { + "url": "https://docs.claude.com/en/api/messages#body-max-tokens" + }, + "description": "For `completion` and `chat_completion` tasks, specifies the `max_tokens` value for requests sent to the Google Model Garden `anthropic` provider.\nIf `provider` is not set to `anthropic`, this field is ignored.\nIf `max_tokens` is specified - it must be a positive integer. If not specified, the default value of 1024 is used.\nAnthropic models require `max_tokens` to be set for each request. Please refer to the Anthropic documentation for more information.", + "type": "number" } } }, - "ml._types.TokenizationConfigContainer": { - "description": "Tokenization options stored in inference configuration", + "inference._types.ThinkingConfig": { "type": "object", "properties": { - "bert": { - "$ref": "#/components/schemas/ml._types.NlpBertTokenizationConfig" - }, - "bert_ja": { - "$ref": "#/components/schemas/ml._types.NlpBertTokenizationConfig" - }, - "mpnet": { - "$ref": "#/components/schemas/ml._types.NlpBertTokenizationConfig" - }, - "roberta": { - "$ref": "#/components/schemas/ml._types.NlpRobertaTokenizationConfig" - }, - "xlm_roberta": { - "$ref": "#/components/schemas/ml._types.XlmRobertaTokenizationConfig" + "thinking_budget": { + "description": "Indicates the desired thinking budget in tokens.", + "type": "number" } - }, - "minProperties": 1, - "maxProperties": 1 + } }, - "ml._types.NlpBertTokenizationConfig": { + "inference._types.InferenceEndpointInfoGoogleVertexAI": { "allOf": [ { - "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig" + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, { - "type": "object" + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeGoogleVertexAI" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } ] }, - "ml._types.CommonTokenizationConfig": { + "inference._types.TaskTypeGoogleVertexAI": { + "type": "string", + "enum": [ + "chat_completion", + "completion", + "text_embedding", + "rerank" + ] + }, + "inference._types.GroqTaskType": { + "type": "string", + "enum": [ + "chat_completion" + ] + }, + "inference._types.GroqServiceType": { + "type": "string", + "enum": [ + "groq" + ] + }, + "inference._types.GroqServiceSettings": { "type": "object", "properties": { - "do_lower_case": { - "description": "Should the tokenizer lower case the text", - "type": "boolean" - }, - "max_sequence_length": { - "description": "Maximum input sequence length for the model", - "type": "number" - }, - "span": { - "description": "Tokenization spanning options. Special value of -1 indicates no spanning takes place", - "type": "number" + "model_id": { + "externalDocs": { + "url": "https://console.groq.com/docs/models" + }, + "description": "The name of the model to use for the inference task.\nRefer to the Groq model documentation for the list of supported models and versions.\nService has been tested and confirmed to be working for `completion` and `chat_completion` tasks with the following models:\n* `llama-3.3-70b-versatile`", + "type": "string" }, - "truncate": { - "$ref": "#/components/schemas/ml._types.TokenizationTruncate" + "api_key": { + "description": "A valid API key for accessing Groq API.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", + "type": "string" }, - "with_special_tokens": { - "description": "Is tokenization completed with special tokens", - "type": "boolean" + "rate_limit": { + "externalDocs": { + "url": "https://console.groq.com/docs/rate-limits" + }, + "description": "This setting helps to minimize the number of rate limit errors returned from the Groq API.\nBy default, the `groq` service sets the number of requests allowed per minute to 1000. Refer to Groq documentation for more details.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } - } - }, - "ml._types.TokenizationTruncate": { - "type": "string", - "enum": [ - "first", - "second", - "none" + }, + "required": [ + "model_id" ] }, - "ml._types.NlpRobertaTokenizationConfig": { + "inference._types.InferenceEndpointInfoGroq": { "allOf": [ { - "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig" + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, { "type": "object", "properties": { - "add_prefix_space": { - "description": "Should the tokenizer prefix input with a space character", - "type": "boolean" + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeGroq" + } + ] } - } + }, + "required": [ + "inference_id", + "task_type" + ] } ] }, - "ml._types.XlmRobertaTokenizationConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig" - }, - { - "type": "object" - } + "inference._types.TaskTypeGroq": { + "type": "string", + "enum": [ + "chat_completion" ] }, - "ml._types.Vocabulary": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - } - }, - "required": [ - "index" + "inference._types.HuggingFaceTaskType": { + "type": "string", + "enum": [ + "chat_completion", + "completion", + "rerank", + "text_embedding" ] }, - "ml._types.ZeroShotClassificationInferenceOptions": { - "type": "object", - "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" - }, - "hypothesis_template": { - "description": "Hypothesis template used when tokenizing labels for prediction", - "type": "string" - }, - "classification_labels": { - "description": "The zero shot classification labels indicating entailment, neutral, and contradiction\nMust contain exactly and only entailment, neutral, and contradiction", - "type": "array", - "items": { - "type": "string" - } - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" - }, - "multi_label": { - "description": "Indicates if more than one true label exists.", - "type": "boolean" - }, - "labels": { - "description": "The labels to predict.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "classification_labels" + "inference._types.HuggingFaceServiceType": { + "type": "string", + "enum": [ + "hugging_face" ] }, - "ml._types.FillMaskInferenceOptions": { + "inference._types.HuggingFaceServiceSettings": { "type": "object", "properties": { - "mask_token": { - "description": "The string/token which will be removed from incoming documents and replaced with the inference prediction(s).\nIn a response, this field contains the mask token for the specified model/tokenizer. Each model and tokenizer\nhas a predefined mask token which cannot be changed. Thus, it is recommended not to set this value in requests.\nHowever, if this field is present in a request, its value must match the predefined value for that model/tokenizer,\notherwise the request will fail.", + "api_key": { + "externalDocs": { + "url": "https://huggingface.co/settings/tokens" + }, + "description": "A valid access token for your HuggingFace account.\nYou can create or find your access tokens on the HuggingFace settings page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", "type": "string" }, - "num_top_classes": { - "description": "Specifies the number of top class predictions to return. Defaults to 0.", - "type": "number" - }, - "tokenization": { - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Hugging Face.\nBy default, the `hugging_face` service sets the number of requests allowed per minute to 3000 for all supported tasks.\nHugging Face does not publish a universal rate limit — actual limits may vary.\nIt is recommended to adjust this value based on the capacity and limits of your specific deployment environment.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "url": { + "externalDocs": { + "url": "https://huggingface.co/docs/inference-providers/en/tasks/chat-completion#conversational-large-language-models-llms" + }, + "description": "The URL endpoint to use for the requests.\nFor `completion` and `chat_completion` tasks, the deployed model must be compatible with the Hugging Face Chat Completion interface (see the linked external documentation for details). The endpoint URL for the request must include `/v1/chat/completions`.\nIf the model supports the OpenAI Chat Completion schema, a toggle should appear in the interface. Enabling this toggle doesn't change any model behavior, it reveals the full endpoint URL needed (which should include `/v1/chat/completions`) when configuring the inference endpoint in Elasticsearch. If the model doesn't support this schema, the toggle may not be shown.", "type": "string" }, - "vocabulary": { - "$ref": "#/components/schemas/ml._types.Vocabulary" + "model_id": { + "description": "The name of the HuggingFace model to use for the inference task.\nFor `completion` and `chat_completion` tasks, this field is optional but may be required for certain models — particularly when using serverless inference endpoints.\nFor the `text_embedding` task, this field should not be included. Otherwise, the request will fail.", + "type": "string" } }, "required": [ - "vocabulary" + "api_key", + "url" ] }, - "ml._types.LearningToRankConfig": { + "inference._types.HuggingFaceTaskSettings": { "type": "object", "properties": { - "default_params": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "feature_extractors": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ml._types.FeatureExtractor" - } - } + "return_documents": { + "description": "For a `rerank` task, return doc text within the results.", + "type": "boolean" }, - "num_top_feature_importance_values": { + "top_n": { + "description": "For a `rerank` task, the number of most relevant documents to return.\nIt defaults to the number of the documents.", "type": "number" } - }, - "required": [ - "num_top_feature_importance_values" - ] + } }, - "ml._types.FeatureExtractor": { + "inference._types.InferenceEndpointInfoHuggingFace": { "allOf": [ { - "$ref": "#/components/schemas/ml._types.QueryFeatureExtractor" + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeHuggingFace" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } ] }, - "ml._types.QueryFeatureExtractor": { - "type": "object", - "properties": { - "default_score": { - "type": "number" - }, - "feature_name": { - "type": "string" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - }, - "required": [ - "feature_name", - "query" + "inference._types.TaskTypeHuggingFace": { + "type": "string", + "enum": [ + "chat_completion", + "completion", + "rerank", + "text_embedding" ] }, - "ml._types.NerInferenceOptions": { + "inference._types.JinaAITaskType": { + "type": "string", + "enum": [ + "embedding", + "rerank", + "text_embedding" + ] + }, + "inference._types.JinaAIServiceType": { + "type": "string", + "enum": [ + "jinaai" + ] + }, + "inference._types.JinaAIServiceSettings": { "type": "object", "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "api_key": { + "externalDocs": { + "url": "https://jina.ai/embeddings/" + }, + "description": "A valid API key of your JinaAI account.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", "type": "string" }, - "classification_labels": { - "description": "The token classification labels. Must be IOB formatted tags", - "type": "array", - "items": { - "type": "string" - } + "model_id": { + "description": "The name of the model to use for the inference task.", + "type": "string" }, - "vocabulary": { - "$ref": "#/components/schemas/ml._types.Vocabulary" - } - } - }, - "ml._types.PassThroughInferenceOptions": { - "type": "object", - "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" + "rate_limit": { + "externalDocs": { + "url": "https://jina.ai/contact-sales/#rate-limit" + }, + "description": "This setting helps to minimize the number of rate limit errors returned from JinaAI.\nBy default, the `jinaai` service sets the number of requests allowed per minute to 2000 for all task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" + "similarity": { + "description": "For an `embedding` or `text_embedding` task, the similarity measure. One of cosine, dot_product, l2_norm.\nThe default values varies with the embedding type.\nFor example, a float embedding type uses a `dot_product` similarity measure by default.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.JinaAISimilarityType" + } + ] }, - "vocabulary": { - "$ref": "#/components/schemas/ml._types.Vocabulary" - } - } - }, - "ml._types.TextEmbeddingInferenceOptions": { - "type": "object", - "properties": { - "embedding_size": { - "description": "The number of dimensions in the embedding output", + "dimensions": { + "externalDocs": { + "url": "https://jina.ai/embeddings/" + }, + "description": "For an `embedding` or `text_embedding` task, the number of dimensions the resulting output embeddings should have.\nBy default, the model's standard output dimension is used.\nRefer to the Jina documentation for more information.", "type": "number" }, - "tokenization": { - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" + "element_type": { + "description": "For an `embedding` or `text_embedding` task, the data type returned by the model.\nUse `bit` for binary embeddings, which are encoded as bytes with signed int8 precision.\nUse `binary` for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of `bit`).\nUse `float` for the default float embeddings.", + "default": "float", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.JinaAIElementType" + } + ] }, - "vocabulary": { - "$ref": "#/components/schemas/ml._types.Vocabulary" + "multimodal_model": { + "description": "For the `embedding` task, whether the model supports multimodal inputs. If true, requests sent to the Jina model\nwill use the multimodal request format (a list of objects). If false, requests sent to the model will use the same\nformat as the `text_embedding` task (a list of strings). Setting this to `false` allows the `embedding` task to be\nused with models that do not support multimodal requests.", + "default": true, + "type": "boolean" } }, "required": [ - "vocabulary" + "api_key", + "model_id" ] }, - "ml._types.TextExpansionInferenceOptions": { - "type": "object", - "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" - }, - "vocabulary": { - "$ref": "#/components/schemas/ml._types.Vocabulary" - } - }, - "required": [ - "vocabulary" + "inference._types.JinaAISimilarityType": { + "type": "string", + "enum": [ + "cosine", + "dot_product", + "l2_norm" ] }, - "ml._types.QuestionAnsweringInferenceOptions": { + "inference._types.JinaAIElementType": { + "type": "string", + "enum": [ + "binary", + "bit", + "float" + ] + }, + "inference._types.JinaAITaskSettings": { "type": "object", "properties": { - "num_top_classes": { - "description": "Specifies the number of top class predictions to return. Defaults to 0.", - "type": "number" + "return_documents": { + "description": "For a `rerank` task, return the doc text within the results.", + "type": "boolean" }, - "tokenization": { - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" + "input_type": { + "description": "For an `embedding` or `text_embedding` task, the task passed to the model.\nValid values are:\n\n* `classification`: Use it for embeddings passed through a classifier.\n* `clustering`: Use it for the embeddings run through a clustering algorithm.\n* `ingest`: Use it for storing document embeddings in a vector database.\n* `search`: Use it for storing embeddings of search queries run against a vector database to find relevant documents.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.JinaAITextEmbeddingTask" + } + ] }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" + "late_chunking": { + "description": "For an `embedding` or `text_embedding` task, controls when text is split into chunks.\nWhen set to `true`, a request from Elasticsearch contains only chunks related to a single document. Instead of batching chunks across documents, Elasticsearch sends them in separate requests. This ensures that chunk embeddings retain context from the entire document, improving semantic quality.\n\nIf a document exceeds the model's context limits, or if the document contains non-text inputs (relevant when using the multimodal `embedding` task), late chunking is automatically disabled for that document only and standard chunking is used instead.\n\nIf not specified, defaults to `false`.", + "type": "boolean" }, - "max_answer_length": { - "description": "The maximum answer length to consider", + "top_n": { + "description": "For a `rerank` task, the number of most relevant documents to return.\nIt defaults to the number of the documents.\nIf this inference endpoint is used in a `text_similarity_reranker` retriever query and `top_n` is set, it must be greater than or equal to `rank_window_size` in the query.", "type": "number" } } }, - "ml._types.TrainedModelConfigInput": { - "type": "object", - "properties": { - "field_names": { - "description": "An array of input field names for the model.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" - } - } - }, - "required": [ - "field_names" + "inference._types.JinaAITextEmbeddingTask": { + "type": "string", + "enum": [ + "classification", + "clustering", + "ingest", + "search" ] }, - "ml._types.TrainedModelConfigMetadata": { - "type": "object", - "properties": { - "model_aliases": { - "type": "array", - "items": { - "type": "string" - } + "inference._types.InferenceEndpointInfoJinaAi": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "feature_importance_baseline": { - "description": "An object that contains the baseline for feature importance values. For regression analysis, it is a single value. For classification analysis, there is a value for each class.", + { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "hyperparameters": { - "description": "List of the available hyperparameters optimized during the fine_parameter_tuning phase as well as specified by the user.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Hyperparameter" - } - }, - "total_feature_importance": { - "description": "An array of the total feature importance for each feature used from the training data set. This array of objects is returned if data frame analytics trained the model and the request includes total_feature_importance in the include request parameter.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.TotalFeatureImportance" - } + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeJinaAi" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - } + ] }, - "ml._types.Hyperparameter": { + "inference._types.TaskTypeJinaAi": { + "type": "string", + "enum": [ + "embedding", + "text_embedding", + "rerank" + ] + }, + "inference._types.LlamaTaskType": { + "type": "string", + "enum": [ + "text_embedding", + "completion", + "chat_completion" + ] + }, + "inference._types.LlamaServiceType": { + "type": "string", + "enum": [ + "llama" + ] + }, + "inference._types.LlamaServiceSettings": { "type": "object", "properties": { - "absolute_importance": { - "description": "A positive number showing how much the parameter influences the variation of the loss function. For hyperparameters with values that are not specified by the user but tuned during hyperparameter optimization.", - "type": "number" + "url": { + "description": "The URL endpoint of the Llama stack endpoint.\nURL must contain:\n* For `text_embedding` task - `/v1/inference/embeddings`.\n* For `completion` and `chat_completion` tasks - `/v1/openai/v1/chat/completions`.", + "type": "string" }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "model_id": { + "externalDocs": { + "url": "https://llama-stack.readthedocs.io/en/latest/references/llama_cli_reference/download_models.html/" + }, + "description": "The name of the model to use for the inference task.\nRefer to the Llama downloading models documentation for different ways of getting a list of available models and downloading them.\nService has been tested and confirmed to be working with the following models:\n* For `text_embedding` task - `all-MiniLM-L6-v2`.\n* For `completion` and `chat_completion` tasks - `llama3.2:3b`.", + "type": "string" }, - "relative_importance": { - "description": "A number between 0 and 1 showing the proportion of influence on the variation of the loss function among all tuned hyperparameters. For hyperparameters with values that are not specified by the user but tuned during hyperparameter optimization.", + "max_input_tokens": { + "description": "For a `text_embedding` task, the maximum number of tokens per input before chunking occurs.", "type": "number" }, - "supplied": { - "description": "Indicates if the hyperparameter is specified by the user (true) or optimized (false).", - "type": "boolean" + "similarity": { + "description": "For a `text_embedding` task, the similarity measure. One of cosine, dot_product, l2_norm.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.LlamaSimilarityType" + } + ] }, - "value": { - "description": "The value of the hyperparameter, either optimized or specified by the user.", - "type": "number" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from the Llama API.\nBy default, the `llama` service sets the number of requests allowed per minute to 3000.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "name", - "supplied", - "value" + "url", + "model_id" ] }, - "ml._types.TotalFeatureImportance": { - "type": "object", - "properties": { - "feature_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "importance": { - "description": "A collection of feature importance statistics related to the training data set for this particular feature.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.TotalFeatureImportanceStatistics" - } + "inference._types.LlamaSimilarityType": { + "type": "string", + "enum": [ + "cosine", + "dot_product", + "l2_norm" + ] + }, + "inference._types.InferenceEndpointInfoLlama": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "classes": { - "description": "If the trained model is a classification model, feature importance statistics are gathered per target class value.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.TotalFeatureImportanceClass" - } + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeLlama" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "feature_name", - "importance", - "classes" ] }, - "ml._types.TotalFeatureImportanceStatistics": { + "inference._types.TaskTypeLlama": { + "type": "string", + "enum": [ + "text_embedding", + "chat_completion", + "completion" + ] + }, + "inference._types.MistralTaskType": { + "type": "string", + "enum": [ + "text_embedding", + "completion", + "chat_completion" + ] + }, + "inference._types.MistralServiceType": { + "type": "string", + "enum": [ + "mistral" + ] + }, + "inference._types.MistralServiceSettings": { "type": "object", "properties": { - "mean_magnitude": { - "description": "The average magnitude of this feature across all the training data. This value is the average of the absolute values of the importance for this feature.", - "type": "number" + "api_key": { + "externalDocs": { + "url": "https://console.mistral.ai/api-keys/" + }, + "description": "A valid API key of your Mistral account.\nYou can find your Mistral API keys or you can create a new one on the API Keys page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", + "type": "string" }, - "max": { - "description": "The maximum importance value across all the training data for this feature.", + "max_input_tokens": { + "description": "The maximum number of tokens per input before chunking occurs.", "type": "number" }, - "min": { - "description": "The minimum importance value across all the training data for this feature.", - "type": "number" + "model": { + "externalDocs": { + "url": "https://docs.mistral.ai/getting-started/models/" + }, + "description": "The name of the model to use for the inference task.\nRefer to the Mistral models documentation for the list of available models.", + "type": "string" + }, + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from the Mistral API.\nBy default, the `mistral` service sets the number of requests allowed per minute to 240.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "mean_magnitude", - "max", - "min" + "api_key", + "model" ] }, - "ml._types.TotalFeatureImportanceClass": { - "type": "object", - "properties": { - "class_name": { - "$ref": "#/components/schemas/_types.Name" + "inference._types.InferenceEndpointInfoMistral": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "importance": { - "description": "A collection of feature importance statistics related to the training data set for this particular feature.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.TotalFeatureImportanceStatistics" - } + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeMistral" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "class_name", - "importance" ] }, - "ml._types.ModelPackageConfig": { + "inference._types.TaskTypeMistral": { + "type": "string", + "enum": [ + "text_embedding", + "chat_completion", + "completion" + ] + }, + "inference._types.NvidiaTaskType": { + "type": "string", + "enum": [ + "chat_completion", + "completion", + "rerank", + "text_embedding" + ] + }, + "inference._types.NvidiaServiceType": { + "type": "string", + "enum": [ + "nvidia" + ] + }, + "inference._types.NvidiaServiceSettings": { "type": "object", "properties": { - "create_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "description": { - "type": "string" - }, - "inference_config": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "minimum_version": { - "type": "string" - }, - "model_repository": { + "api_key": { + "description": "A valid API key for your Nvidia endpoint.\nCan be found in `API Keys` section of Nvidia account settings.", "type": "string" }, - "model_type": { + "url": { + "description": "The URL of the Nvidia model endpoint. If not provided, the default endpoint URL is used depending on the task type:\n\n* For `text_embedding` task - `https://integrate.api.nvidia.com/v1/embeddings`.\n* For `completion` and `chat_completion` tasks - `https://integrate.api.nvidia.com/v1/chat/completions`.\n* For `rerank` task - `https://ai.api.nvidia.com/v1/retrieval/nvidia/reranking`.", "type": "string" }, - "packaged_model_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "platform_architecture": { + "model_id": { + "description": "The name of the model to use for the inference task.\nRefer to the model's documentation for the name if needed.\nService has been tested and confirmed to be working with the following models:\n\n* For `text_embedding` task - `nvidia/llama-3.2-nv-embedqa-1b-v2`.\n* For `completion` and `chat_completion` tasks - `microsoft/phi-3-mini-128k-instruct`.\n* For `rerank` task - `nv-rerank-qa-mistral-4b:1`.\nService doesn't support `text_embedding` task `baai/bge-m3` and `nvidia/nvclip` models due to them not recognizing the `input_type` parameter.", "type": "string" }, - "prefix_strings": { - "$ref": "#/components/schemas/ml._types.TrainedModelPrefixStrings" - }, - "size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "sha256": { - "type": "string" + "max_input_tokens": { + "description": "For a `text_embedding` task, the maximum number of tokens per input. Inputs exceeding this value are truncated prior to sending to the Nvidia API.", + "type": "number" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "similarity": { + "description": "For a `text_embedding` task, the similarity measure. One of cosine, dot_product, l2_norm.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.NvidiaSimilarityType" + } + ] }, - "vocabulary_file": { - "type": "string" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from the Nvidia API.\nBy default, the `nvidia` service sets the number of requests allowed per minute to 3000.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "packaged_model_id" + "api_key", + "model_id" ] }, - "ml._types.TrainedModelPrefixStrings": { + "inference._types.NvidiaSimilarityType": { + "type": "string", + "enum": [ + "cosine", + "dot_product", + "l2_norm" + ] + }, + "inference._types.NvidiaTaskSettings": { "type": "object", "properties": { - "ingest": { - "description": "String prepended to input at ingest", - "type": "string" + "input_type": { + "description": "For a `text_embedding` task, type of input sent to the Nvidia endpoint.\nValid values are:\n\n* `ingest`: Mapped to Nvidia's `passage` value in request. Used when generating embeddings during indexing.\n* `search`: Mapped to Nvidia's `query` value in request. Used when generating embeddings during querying.\n\nIMPORTANT: For Nvidia endpoints, if the `input_type` field is not specified, it defaults to `query`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.NvidiaInputType" + } + ] }, - "search": { - "description": "String prepended to input at search", - "type": "string" + "truncate": { + "description": "For a `text_embedding` task, the method used by the Nvidia model to handle inputs longer than the maximum token length.\nValid values are:\n\n* `END`: When the input exceeds the maximum input token length, the end of the input is discarded.\n* `NONE`: When the input exceeds the maximum input token length, an error is returned.\n* `START`: When the input exceeds the maximum input token length, the start of the input is discarded.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.CohereTruncateType" + } + ] } } }, - "ml._types.TrainedModelLocation": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/ml._types.TrainedModelLocationIndex" - } - }, - "required": [ - "index" - ] - }, - "ml._types.TrainedModelLocationIndex": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.IndexName" - } - }, - "required": [ - "name" + "inference._types.NvidiaInputType": { + "type": "string", + "enum": [ + "ingest", + "search" ] }, - "ml._types.TrainedModelStats": { - "type": "object", - "properties": { - "deployment_stats": { - "$ref": "#/components/schemas/ml._types.TrainedModelDeploymentStats" - }, - "inference_stats": { - "$ref": "#/components/schemas/ml._types.TrainedModelInferenceStats" + "inference._types.InferenceEndpointInfoNvidia": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "ingest": { - "description": "A collection of ingest stats for the model across all nodes.\nThe values are summations of the individual node statistics.\nThe format matches the ingest section in the nodes stats API.", + { "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "model_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "model_size_stats": { - "$ref": "#/components/schemas/ml._types.TrainedModelSizeStats" - }, - "pipeline_count": { - "description": "The number of ingest pipelines that currently refer to the model.", - "type": "number" + "properties": { + "inference_id": { + "description": "The inference ID", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeNvidia" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "model_id", - "model_size_stats", - "pipeline_count" ] }, - "ml._types.TrainedModelDeploymentStats": { + "inference._types.TaskTypeNvidia": { + "type": "string", + "enum": [ + "chat_completion", + "completion", + "rerank", + "text_embedding" + ] + }, + "inference._types.OpenAITaskType": { + "type": "string", + "enum": [ + "chat_completion", + "completion", + "text_embedding" + ] + }, + "inference._types.OpenAIServiceType": { + "type": "string", + "enum": [ + "openai" + ] + }, + "inference._types.OpenAIServiceSettings": { "type": "object", "properties": { - "adaptive_allocations": { - "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings" - }, - "allocation_status": { - "$ref": "#/components/schemas/ml._types.TrainedModelDeploymentAllocationStatus" - }, - "cache_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "deployment_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "error_count": { - "description": "The sum of `error_count` for all nodes in the deployment.", - "type": "number" + "api_key": { + "externalDocs": { + "url": "https://platform.openai.com/api-keys" + }, + "description": "A valid API key of your OpenAI account.\nYou can find your OpenAI API keys in your OpenAI account under the API keys section.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", + "type": "string" }, - "inference_count": { - "description": "The sum of `inference_count` for all nodes in the deployment.", + "dimensions": { + "description": "The number of dimensions the resulting output embeddings should have.\nIt is supported only in `text-embedding-3` and later models.\nIf it is not set, the OpenAI defined default for the model is used.", "type": "number" }, "model_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "nodes": { - "description": "The deployment stats for each node that currently has the model allocated.\nIn serverless, stats are reported for a single unnamed virtual node.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.TrainedModelDeploymentNodesStats" - } - }, - "number_of_allocations": { - "description": "The number of allocations requested.", - "type": "number" - }, - "peak_throughput_per_minute": { - "type": "number" - }, - "priority": { - "$ref": "#/components/schemas/ml._types.TrainingPriority" - }, - "queue_capacity": { - "description": "The number of inference requests that can be queued before new requests are rejected.", - "type": "number" - }, - "rejected_execution_count": { - "description": "The sum of `rejected_execution_count` for all nodes in the deployment.\nIndividual nodes reject an inference request if the inference queue is full.\nThe queue size is controlled by the `queue_capacity` setting in the start\ntrained model deployment API.", - "type": "number" - }, - "reason": { - "description": "The reason for the current deployment state. Usually only populated when\nthe model is not deployed to a node.", + "externalDocs": { + "url": "https://platform.openai.com/docs/guides/embeddings/what-are-embeddings" + }, + "description": "The name of the model to use for the inference task.\nRefer to the OpenAI documentation for the list of available text embedding models.", "type": "string" }, - "start_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "organization_id": { + "description": "The unique identifier for your organization.\nYou can find the Organization ID in your OpenAI account under *Settings > Organizations*.", + "type": "string" }, - "state": { - "$ref": "#/components/schemas/ml._types.DeploymentAssignmentState" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from OpenAI.\nThe `openai` service sets a default number of requests allowed per minute depending on the task type.\nFor `text_embedding`, it is set to `3000`.\nFor `completion`, it is set to `500`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "threads_per_allocation": { - "description": "The number of threads used be each allocation during inference.", - "type": "number" + "similarity": { + "description": "For a `text_embedding` task, the similarity measure. One of cosine, dot_product, l2_norm. Defaults to `dot_product`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.OpenAISimilarityType" + } + ] }, - "timeout_count": { - "description": "The sum of `timeout_count` for all nodes in the deployment.", - "type": "number" + "url": { + "description": "The URL endpoint to use for the requests.\nIt can be changed for testing purposes.", + "default": "https://api.openai.com/v1/embeddings.", + "type": "string" } }, "required": [ - "deployment_id", - "model_id", - "nodes", - "peak_throughput_per_minute", - "priority", - "start_time" + "api_key", + "model_id" ] }, - "ml._types.AdaptiveAllocationsSettings": { - "type": "object", - "properties": { - "enabled": { - "description": "If true, adaptive_allocations is enabled", - "type": "boolean" - }, - "min_number_of_allocations": { - "description": "Specifies the minimum number of allocations to scale to.\nIf set, it must be greater than or equal to 0.\nIf not defined, the deployment scales to 0.", - "type": "number" - }, - "max_number_of_allocations": { - "description": "Specifies the maximum number of allocations to scale to.\nIf set, it must be greater than or equal to min_number_of_allocations.", - "type": "number" - } - }, - "required": [ - "enabled" + "inference._types.OpenAISimilarityType": { + "type": "string", + "enum": [ + "cosine", + "dot_product", + "l2_norm" ] }, - "ml._types.TrainedModelDeploymentAllocationStatus": { + "inference._types.OpenAITaskSettings": { "type": "object", "properties": { - "allocation_count": { - "description": "The current number of nodes where the model is allocated.", - "type": "number" + "user": { + "description": "For a `completion` or `text_embedding` task, specify the user issuing the request.\nThis information can be used for abuse detection.", + "type": "string" }, - "state": { - "$ref": "#/components/schemas/ml._types.DeploymentAllocationState" + "headers": { + "description": "Specifies custom HTTP header parameters.\nFor example:\n```\n\"headers\":{\n \"Custom-Header\": \"Some-Value\",\n \"Another-Custom-Header\": \"Another-Value\"\n}\n```", + "type": "object" + } + } + }, + "inference._types.InferenceEndpointInfoOpenAI": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "target_allocation_count": { - "description": "The desired number of nodes for model allocation.", - "type": "number" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeOpenAI" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "allocation_count", - "state", - "target_allocation_count" ] }, - "ml._types.DeploymentAllocationState": { + "inference._types.TaskTypeOpenAI": { "type": "string", "enum": [ - "started", - "starting", - "fully_allocated" + "text_embedding", + "chat_completion", + "completion" ] }, - "ml._types.TrainedModelDeploymentNodesStats": { + "inference._types.OpenShiftAiTaskType": { + "type": "string", + "enum": [ + "text_embedding", + "completion", + "chat_completion", + "rerank" + ] + }, + "inference._types.OpenShiftAiServiceType": { + "type": "string", + "enum": [ + "openshift_ai" + ] + }, + "inference._types.OpenShiftAiServiceSettings": { "type": "object", "properties": { - "average_inference_time_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" - }, - "average_inference_time_ms_last_minute": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" - }, - "average_inference_time_ms_excluding_cache_hits": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" - }, - "error_count": { - "description": "The number of errors when evaluating the trained model.", - "type": "number" - }, - "inference_count": { - "description": "The total number of inference calls made against this node for this model.", - "type": "number" - }, - "inference_cache_hit_count": { - "type": "number" - }, - "inference_cache_hit_count_last_minute": { - "type": "number" - }, - "last_access": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "node": { - "$ref": "#/components/schemas/ml._types.DiscoveryNode" - }, - "number_of_allocations": { - "description": "The number of allocations assigned to this node.", - "type": "number" - }, - "number_of_pending_requests": { - "description": "The number of inference requests queued to be processed.", - "type": "number" - }, - "peak_throughput_per_minute": { - "type": "number" - }, - "rejected_execution_count": { - "description": "The number of inference requests that were not processed because the queue was full.", - "type": "number" + "api_key": { + "description": "A valid API key for your OpenShift AI endpoint.\nCan be found in `Token authentication` section of model related information.", + "type": "string" }, - "routing_state": { - "$ref": "#/components/schemas/ml._types.TrainedModelAssignmentRoutingStateAndReason" + "url": { + "description": "The URL of the OpenShift AI hosted model endpoint.", + "type": "string" }, - "start_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "model_id": { + "description": "The name of the model to use for the inference task.\nRefer to the hosted model's documentation for the name if needed.\nService has been tested and confirmed to be working with the following models:\n* For `text_embedding` task - `gritlm-7b`.\n* For `completion` and `chat_completion` tasks - `llama-31-8b-instruct`.\n* For `rerank` task - `bge-reranker-v2-m3`.", + "type": "string" }, - "threads_per_allocation": { - "description": "The number of threads used by each allocation during inference.", + "max_input_tokens": { + "description": "For a `text_embedding` task, the maximum number of tokens per input before chunking occurs.", "type": "number" }, - "throughput_last_minute": { - "type": "number" + "similarity": { + "description": "For a `text_embedding` task, the similarity measure. One of cosine, dot_product, l2_norm.\nIf not specified, the default dot_product value is used.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.OpenShiftAiSimilarityType" + } + ] }, - "timeout_count": { - "description": "The number of inference requests that timed out before being processed.", - "type": "number" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from the OpenShift AI API.\nBy default, the `openshift_ai` service sets the number of requests allowed per minute to 3000.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] } }, "required": [ - "peak_throughput_per_minute", - "routing_state", - "throughput_last_minute" + "api_key", + "url" + ] + }, + "inference._types.OpenShiftAiSimilarityType": { + "type": "string", + "enum": [ + "cosine", + "dot_product", + "l2_norm" ] }, - "ml._types.TrainedModelAssignmentRoutingStateAndReason": { + "inference._types.OpenShiftAiTaskSettings": { "type": "object", "properties": { - "reason": { - "description": "The reason for the current state. It is usually populated only when the\n`routing_state` is `failed`.", - "type": "string" + "return_documents": { + "description": "For a `rerank` task, whether to return the source documents in the response.", + "type": "boolean" }, - "routing_state": { - "$ref": "#/components/schemas/ml._types.RoutingState" + "top_n": { + "description": "For a `rerank` task, the number of most relevant documents to return.", + "type": "number" + } + } + }, + "inference._types.InferenceEndpointInfoOpenShiftAi": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeOpenShiftAi" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - }, - "required": [ - "routing_state" ] }, - "ml._types.RoutingState": { + "inference._types.TaskTypeOpenShiftAi": { "type": "string", "enum": [ - "failed", - "started", - "starting", - "stopped", - "stopping" + "text_embedding", + "chat_completion", + "completion", + "rerank" ] }, - "ml._types.TrainingPriority": { + "inference._types.VoyageAITaskType": { "type": "string", "enum": [ - "normal", - "low" + "text_embedding", + "rerank" ] }, - "ml._types.DeploymentAssignmentState": { + "inference._types.VoyageAIServiceType": { "type": "string", "enum": [ - "started", - "starting", - "stopping", - "failed" + "voyageai" ] }, - "ml._types.TrainedModelInferenceStats": { + "inference._types.VoyageAIServiceSettings": { "type": "object", "properties": { - "cache_miss_count": { - "description": "The number of times the model was loaded for inference and was not retrieved from the cache.\nIf this number is close to the `inference_count`, the cache is not being appropriately used.\nThis can be solved by increasing the cache size or its time-to-live (TTL).\nRefer to general machine learning settings for the appropriate settings.", + "dimensions": { + "externalDocs": { + "url": "https://docs.voyageai.com/docs/embeddings" + }, + "description": "The number of dimensions for resulting output embeddings.\nThis setting maps to `output_dimension` in the VoyageAI documentation.\nOnly for the `text_embedding` task type.", "type": "number" }, - "failure_count": { - "description": "The number of failures when using the model for inference.", - "type": "number" + "model_id": { + "externalDocs": { + "url": "https://docs.voyageai.com/docs/reranker" + }, + "description": "The name of the model to use for the inference task.\nRefer to the VoyageAI documentation for the list of available text embedding and rerank models.", + "type": "string" }, - "inference_count": { - "description": "The total number of times the model has been called for inference.\nThis is across all inference contexts, including all pipelines.", - "type": "number" + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from VoyageAI.\nThe `voyageai` service sets a default number of requests allowed per minute depending on the task type.\nFor both `text_embedding` and `rerank`, it is set to `2000`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] }, - "missing_all_fields_count": { - "description": "The number of inference calls where all the training features for the model were missing.", + "embedding_type": { + "externalDocs": { + "url": "https://docs.voyageai.com/docs/embeddings" + }, + "description": "The data type for the embeddings to be returned.\nThis setting maps to `output_dtype` in the VoyageAI documentation.\nPermitted values: float, int8, bit.\n`int8` is a synonym of `byte` in the VoyageAI documentation.\n`bit` is a synonym of `binary` in the VoyageAI documentation.\nOnly for the `text_embedding` task type.", "type": "number" - }, - "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - } - }, - "required": [ - "cache_miss_count", - "failure_count", - "inference_count", - "missing_all_fields_count", - "timestamp" - ] - }, - "ml._types.TrainedModelSizeStats": { - "type": "object", - "properties": { - "model_size_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "required_native_memory_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" } }, "required": [ - "model_size_bytes", - "required_native_memory_bytes" + "model_id" ] }, - "ml._types.InferenceConfigUpdateContainer": { + "inference._types.VoyageAITaskSettings": { "type": "object", "properties": { - "regression": { - "$ref": "#/components/schemas/ml._types.RegressionInferenceOptions" - }, - "classification": { - "$ref": "#/components/schemas/ml._types.ClassificationInferenceOptions" - }, - "text_classification": { - "$ref": "#/components/schemas/ml._types.TextClassificationInferenceUpdateOptions" - }, - "zero_shot_classification": { - "$ref": "#/components/schemas/ml._types.ZeroShotClassificationInferenceUpdateOptions" - }, - "fill_mask": { - "$ref": "#/components/schemas/ml._types.FillMaskInferenceUpdateOptions" - }, - "ner": { - "$ref": "#/components/schemas/ml._types.NerInferenceUpdateOptions" - }, - "pass_through": { - "$ref": "#/components/schemas/ml._types.PassThroughInferenceUpdateOptions" - }, - "text_embedding": { - "$ref": "#/components/schemas/ml._types.TextEmbeddingInferenceUpdateOptions" + "input_type": { + "description": "Type of the input text.\nPermitted values: `ingest` (maps to `document` in the VoyageAI documentation), `search` (maps to `query` in the VoyageAI documentation).\nOnly for the `text_embedding` task type.", + "type": "string" }, - "text_expansion": { - "$ref": "#/components/schemas/ml._types.TextExpansionInferenceUpdateOptions" + "return_documents": { + "description": "Whether to return the source documents in the response.\nOnly for the `rerank` task type.", + "default": false, + "type": "boolean" }, - "question_answering": { - "$ref": "#/components/schemas/ml._types.QuestionAnsweringInferenceUpdateOptions" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "ml._types.TextClassificationInferenceUpdateOptions": { - "type": "object", - "properties": { - "num_top_classes": { - "description": "Specifies the number of top class predictions to return. Defaults to 0.", + "top_k": { + "description": "The number of most relevant documents to return.\nIf not specified, the reranking results of all documents will be returned.\nOnly for the `rerank` task type.", "type": "number" }, - "tokenization": { - "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" - }, - "classification_labels": { - "description": "Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labels", - "type": "array", - "items": { - "type": "string" - } + "truncation": { + "description": "Whether to truncate the input texts to fit within the context length.", + "default": true, + "type": "boolean" } } }, - "ml._types.NlpTokenizationUpdateOptions": { - "type": "object", - "properties": { - "truncate": { - "$ref": "#/components/schemas/ml._types.TokenizationTruncate" + "inference._types.InferenceEndpointInfoVoyageAI": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "span": { - "description": "Span options to apply", - "type": "number" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeVoyageAI" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - } + ] }, - "ml._types.ZeroShotClassificationInferenceUpdateOptions": { - "type": "object", - "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" - }, - "multi_label": { - "description": "Update the configured multi label option. Indicates if more than one true label exists. Defaults to the configured value.", - "type": "boolean" - }, - "labels": { - "description": "The labels to predict.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" + "inference._types.TaskTypeVoyageAI": { + "type": "string", + "enum": [ + "text_embedding", + "rerank" ] }, - "ml._types.FillMaskInferenceUpdateOptions": { + "inference._types.WatsonxTaskType": { + "type": "string", + "enum": [ + "text_embedding", + "rerank", + "chat_completion", + "completion" + ] + }, + "inference._types.WatsonxServiceType": { + "type": "string", + "enum": [ + "watsonxai" + ] + }, + "inference._types.WatsonxServiceSettings": { "type": "object", "properties": { - "num_top_classes": { - "description": "Specifies the number of top class predictions to return. Defaults to 0.", - "type": "number" + "api_key": { + "externalDocs": { + "url": "https://cloud.ibm.com/iam/apikeys" + }, + "description": "A valid API key of your Watsonx account.\nYou can find your Watsonx API keys or you can create a new one on the API keys page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.", + "type": "string" }, - "tokenization": { - "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" + "api_version": { + "externalDocs": { + "url": "https://cloud.ibm.com/apidocs/watsonx-ai#active-version-dates" + }, + "description": "A version parameter that takes a version date in the format of `YYYY-MM-DD`.\nFor the active version data parameters, refer to the Wastonx documentation.", + "type": "string" }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "model_id": { + "externalDocs": { + "url": "https://www.ibm.com/products/watsonx-ai/foundation-models" + }, + "description": "The name of the model to use for the inference task.\nRefer to the IBM Embedding Models section in the Watsonx documentation for the list of available text embedding models.\nRefer to the IBM library - Foundation models in Watsonx.ai.", "type": "string" - } - } - }, - "ml._types.NerInferenceUpdateOptions": { - "type": "object", - "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "project_id": { + "description": "The identifier of the IBM Cloud project to use for the inference task.", "type": "string" - } - } - }, - "ml._types.PassThroughInferenceUpdateOptions": { - "type": "object", - "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "rate_limit": { + "description": "This setting helps to minimize the number of rate limit errors returned from Watsonx.\nBy default, the `watsonxai` service sets the number of requests allowed per minute to 120.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.RateLimitSetting" + } + ] + }, + "url": { + "description": "The URL of the inference endpoint that you created on Watsonx.", "type": "string" } - } + }, + "required": [ + "api_key", + "api_version", + "model_id", + "project_id", + "url" + ] }, - "ml._types.TextEmbeddingInferenceUpdateOptions": { - "type": "object", - "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" + "inference._types.InferenceEndpointInfoWatsonx": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "description": "The task type", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.TaskTypeWatsonx" + } + ] + } + }, + "required": [ + "inference_id", + "task_type" + ] } - } + ] }, - "ml._types.TextExpansionInferenceUpdateOptions": { + "inference._types.TaskTypeWatsonx": { + "type": "string", + "enum": [ + "text_embedding", + "chat_completion", + "completion" + ] + }, + "inference._types.RerankedInferenceResult": { + "description": "Defines the response for a rerank request.", "type": "object", "properties": { - "tokenization": { - "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" + "rerank": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.RankedDocument" + } } - } + }, + "required": [ + "rerank" + ] }, - "ml._types.QuestionAnsweringInferenceUpdateOptions": { + "inference._types.SparseEmbeddingInferenceResult": { + "description": "The response format for the sparse embedding request.", "type": "object", "properties": { - "question": { - "description": "The question to answer given the inference context", - "type": "string" - }, - "num_top_classes": { - "description": "Specifies the number of top class predictions to return. Defaults to 0.", - "type": "number" - }, - "tokenization": { - "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" - }, - "results_field": { - "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", - "type": "string" - }, - "max_answer_length": { - "description": "The maximum answer length to consider for extraction", - "type": "number" + "sparse_embedding": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types.SparseEmbeddingResult" + } } }, "required": [ - "question" + "sparse_embedding" ] }, - "ml._types.InferenceResponseResult": { + "inference._types.TextEmbeddingInferenceResult": { + "description": "TextEmbeddingInferenceResult is an aggregation of mutually exclusive text_embedding variants", "type": "object", "properties": { - "entities": { - "description": "If the model is trained for named entity recognition (NER) tasks, the response contains the recognized entities.", + "text_embedding_bytes": { "type": "array", "items": { - "$ref": "#/components/schemas/ml._types.TrainedModelEntities" + "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult" } }, - "is_truncated": { - "description": "Indicates whether the input text was truncated to meet the model's maximum sequence length limit. This property\nis present only when it is true.", - "type": "boolean" - }, - "predicted_value": { - "description": "If the model is trained for a text classification or zero shot classification task, the response is the\npredicted class.\nFor named entity recognition (NER) tasks, it contains the annotated text output.\nFor fill mask tasks, it contains the top prediction for replacing the mask token.\nFor text embedding tasks, it contains the raw numerical text embedding values.\nFor regression models, its a numerical value\nFor classification models, it may be an integer, double, boolean or string depending on prediction type", - "oneOf": [ - { - "$ref": "#/components/schemas/ml._types.PredictedValue" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.PredictedValue" - } - } - ] - }, - "predicted_value_sequence": { - "description": "For fill mask tasks, the response contains the input text sequence with the mask token replaced by the predicted\nvalue.\nAdditionally", - "type": "string" - }, - "prediction_probability": { - "description": "Specifies a probability for the predicted value.", - "type": "number" - }, - "prediction_score": { - "description": "Specifies a confidence score for the predicted value.", - "type": "number" - }, - "top_classes": { - "description": "For fill mask, text classification, and zero shot classification tasks, the response contains a list of top\nclass entries.", + "text_embedding_bits": { "type": "array", "items": { - "$ref": "#/components/schemas/ml._types.TopClassEntry" + "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult" } }, - "warning": { - "description": "If the request failed, the response contains the reason for the failure.", - "type": "string" - }, - "feature_importance": { - "description": "The feature importance for the inference results. Relevant only for classification or regression models", + "text_embedding": { "type": "array", "items": { - "$ref": "#/components/schemas/ml._types.TrainedModelInferenceFeatureImportance" + "$ref": "#/components/schemas/inference._types.DenseEmbeddingResult" } } - } + }, + "minProperties": 1, + "maxProperties": 1 }, - "ml._types.TrainedModelEntities": { + "_types.ElasticsearchVersionInfo": { "type": "object", "properties": { - "class_name": { + "build_date": { + "description": "The Elasticsearch Git commit's date.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "build_flavor": { + "description": "The build flavor. For example, `default`.", "type": "string" }, - "class_probability": { - "type": "number" + "build_hash": { + "description": "The Elasticsearch Git commit's SHA hash.", + "type": "string" }, - "entity": { + "build_snapshot": { + "description": "Indicates whether the Elasticsearch build was a snapshot.", + "type": "boolean" + }, + "build_type": { + "description": "The build type that corresponds to how Elasticsearch was installed.\nFor example, `docker`, `rpm`, or `tar`.", "type": "string" }, - "start_pos": { - "type": "number" + "lucene_version": { + "description": "The version number of Elasticsearch's underlying Lucene software.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "end_pos": { - "type": "number" + "minimum_index_compatibility_version": { + "description": "The minimum index version with which the responding node can read from disk.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "minimum_wire_compatibility_version": { + "description": "The minimum node version with which the responding node can communicate.\nAlso the minimum version from which you can perform a rolling upgrade.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "number": { + "description": "The Elasticsearch version number.\n\n::: IMPORTANT: For Serverless deployments, this static value is always `8.11.0` and is used solely for backward compatibility with legacy clients.\n Serverless environments are versionless and automatically upgraded, so this value can be safely ignored.", + "type": "string" } }, "required": [ - "class_name", - "class_probability", - "entity", - "start_pos", - "end_pos" - ] - }, - "ml._types.PredictedValue": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.ScalarValue" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ScalarValue" - } - } + "build_date", + "build_flavor", + "build_hash", + "build_snapshot", + "build_type", + "lucene_version", + "minimum_index_compatibility_version", + "minimum_wire_compatibility_version", + "number" ] }, - "ml._types.TopClassEntry": { + "ingest.geo_ip_stats.GeoIpDownloadStatistics": { "type": "object", "properties": { - "class_name": { - "type": "string" + "successful_downloads": { + "description": "Total number of successful database downloads.", + "type": "number" }, - "class_probability": { + "failed_downloads": { + "description": "Total number of failed database downloads.", "type": "number" }, - "class_score": { + "total_download_time": { + "description": "Total milliseconds spent downloading databases.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "databases_count": { + "description": "Current number of databases available for use.", + "type": "number" + }, + "skipped_updates": { + "description": "Total number of database updates skipped.", + "type": "number" + }, + "expired_databases": { + "description": "Total number of databases not updated after 30 days", "type": "number" } }, "required": [ - "class_name", - "class_probability", - "class_score" + "successful_downloads", + "failed_downloads", + "total_download_time", + "databases_count", + "skipped_updates", + "expired_databases" ] }, - "ml._types.TrainedModelInferenceFeatureImportance": { + "ingest.geo_ip_stats.GeoIpNodeDatabases": { + "description": "Downloaded databases for the node. The field key is the node ID.", "type": "object", "properties": { - "feature_name": { - "type": "string" - }, - "importance": { - "type": "number" + "databases": { + "description": "Downloaded databases for the node.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest.geo_ip_stats.GeoIpNodeDatabaseName" + } }, - "classes": { + "files_in_temp": { + "description": "Downloaded database files, including related license files. Elasticsearch stores these files in the node’s temporary directory: $ES_TMPDIR/geoip-databases/.", "type": "array", "items": { - "$ref": "#/components/schemas/ml._types.TrainedModelInferenceClassImportance" + "type": "string" } } }, "required": [ - "feature_name" + "databases", + "files_in_temp" ] }, - "ml._types.TrainedModelInferenceClassImportance": { + "ingest.geo_ip_stats.GeoIpNodeDatabaseName": { "type": "object", "properties": { - "class_name": { - "type": "string" - }, - "importance": { - "type": "number" + "name": { + "description": "Name of the database.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] } }, "required": [ - "class_name", - "importance" + "name" ] }, - "ml.info.Defaults": { + "ingest.get_geoip_database.DatabaseConfigurationMetadata": { "type": "object", "properties": { - "anomaly_detectors": { - "$ref": "#/components/schemas/ml.info.AnomalyDetectors" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "datafeeds": { - "$ref": "#/components/schemas/ml.info.Datafeeds" + "version": { + "type": "number" + }, + "modified_date_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "database": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DatabaseConfiguration" + } + ] } }, "required": [ - "anomaly_detectors", - "datafeeds" + "id", + "version", + "modified_date_millis", + "database" ] }, - "ml.info.AnomalyDetectors": { - "type": "object", - "properties": { - "categorization_analyzer": { - "$ref": "#/components/schemas/ml._types.CategorizationAnalyzer" - }, - "categorization_examples_limit": { - "type": "number" - }, - "model_memory_limit": { - "type": "string" - }, - "model_snapshot_retention_days": { - "type": "number" + "ingest._types.DatabaseConfiguration": { + "description": "The configuration necessary to identify which IP geolocation provider to use to download a database, as well as any provider-specific configuration necessary for such downloading.\nAt present, the only supported providers are `maxmind` and `ipinfo`, and the `maxmind` provider requires that an `account_id` (string) is configured.\nA provider (either `maxmind` or `ipinfo`) must be specified. The web and local providers can be returned as read only configurations.", + "allOf": [ + { + "type": "object", + "properties": { + "name": { + "description": "The provider-assigned name of the IP geolocation database to download.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + } + }, + "required": [ + "name" + ] }, - "daily_model_snapshot_retention_after_days": { - "type": "number" + { + "type": "object", + "properties": { + "maxmind": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Maxmind" + } + ] + }, + "ipinfo": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Ipinfo" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 } - }, - "required": [ - "categorization_analyzer", - "categorization_examples_limit", - "model_memory_limit", - "model_snapshot_retention_days", - "daily_model_snapshot_retention_after_days" ] }, - "ml.info.Datafeeds": { + "ingest._types.Maxmind": { "type": "object", "properties": { - "scroll_size": { - "type": "number" + "account_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] } }, "required": [ - "scroll_size" + "account_id" ] }, - "ml.info.Limits": { + "ingest._types.Ipinfo": { + "type": "object" + }, + "ingest.get_ip_location_database.DatabaseConfigurationMetadata": { "type": "object", "properties": { - "max_single_ml_node_processors": { - "type": "number" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "total_ml_processors": { - "type": "number" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] }, - "max_model_memory_limit": { - "$ref": "#/components/schemas/_types.ByteSize" + "modified_date_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "effective_max_model_memory_limit": { - "$ref": "#/components/schemas/_types.ByteSize" + "modified_date": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "total_ml_memory": { - "$ref": "#/components/schemas/_types.ByteSize" + "database": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DatabaseConfigurationFull" + } + ] } }, "required": [ - "total_ml_memory" + "id", + "version", + "database" ] }, - "ml.info.NativeCode": { + "ingest._types.DatabaseConfigurationFull": { + "allOf": [ + { + "type": "object", + "properties": { + "name": { + "description": "The provider-assigned name of the IP geolocation database to download.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + } + }, + "required": [ + "name" + ] + }, + { + "type": "object", + "properties": { + "web": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Web" + } + ] + }, + "local": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Local" + } + ] + }, + "maxmind": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Maxmind" + } + ] + }, + "ipinfo": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Ipinfo" + } + ] + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "ingest._types.Web": { + "type": "object" + }, + "ingest._types.Local": { "type": "object", "properties": { - "build_hash": { + "type": { "type": "string" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" } }, "required": [ - "build_hash", - "version" + "type" ] }, - "ml.preview_data_frame_analytics.DataframePreviewConfig": { + "ingest._types.Pipeline": { "type": "object", "properties": { - "source": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + "description": { + "description": "Description of the ingest pipeline.", + "type": "string" }, - "analysis": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + "on_failure": { + "description": "Processors to run immediately after a processor failure.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.ProcessorContainer" + } }, - "model_memory_limit": { - "type": "string" + "processors": { + "description": "Processors used to perform transformations on documents before indexing.\nProcessors run sequentially in the order specified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.ProcessorContainer" + } }, - "max_num_threads": { - "type": "number" + "version": { + "description": "Version number used by external systems to track ingest pipelines.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] }, - "analyzed_fields": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + "deprecated": { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "default": false, + "type": "boolean" + }, + "_meta": { + "description": "Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "created_date": { + "description": "Date and time when the pipeline was created. Only returned if the `human` query parameter is `true`.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "created_date_millis": { + "description": "Date and time when the pipeline was created, in milliseconds since the epoch.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "modified_date": { + "description": "Date and time when the pipeline was last modified. Only returned if the `human` query parameter is `true`.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "modified_date_millis": { + "description": "Date and time when the pipeline was last modified, in milliseconds since the epoch.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "field_access_pattern": { + "description": "Controls how processors in this pipeline should read and write data on a document's source.", + "default": "classic", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.FieldAccessPattern" + } + ] } - }, - "required": [ - "source", - "analysis" - ] + } }, - "ml._types.DatafeedConfig": { + "ingest._types.ProcessorContainer": { "type": "object", "properties": { - "aggregations": { - "description": "If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } + "append": { + "description": "Appends one or more values to an existing array if the field already exists and it is an array.\nConverts a scalar to an array and appends one or more values to it if the field exists and it is a scalar.\nCreates an array containing the provided values if the field doesn’t exist.\nAccepts a single value or an array of values.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.AppendProcessor" + } + ] }, - "chunking_config": { - "$ref": "#/components/schemas/ml._types.ChunkingConfig" + "attachment": { + "description": "The attachment processor lets Elasticsearch extract file attachments in common formats (such as PPT, XLS, and PDF) by using the Apache text extraction library Tika.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.AttachmentProcessor" + } + ] }, - "datafeed_id": { - "$ref": "#/components/schemas/_types.Id" + "bytes": { + "description": "Converts a human readable byte value (for example `1kb`) to its value in bytes (for example `1024`).\nIf the field is an array of strings, all members of the array will be converted.\nSupported human readable units are \"b\", \"kb\", \"mb\", \"gb\", \"tb\", \"pb\" case insensitive.\nAn error will occur if the field is not a supported format or resultant value exceeds 2^63.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.BytesProcessor" + } + ] }, - "delayed_data_check_config": { - "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" + "cef": { + "description": "Converts a CEF message into a structured format.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.CefProcessor" + } + ] }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" + "circle": { + "description": "Converts circle definitions of shapes to regular polygons which approximate them.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.CircleProcessor" + } + ] }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "community_id": { + "description": "Computes the Community ID for network flow data as defined in the\nCommunity ID Specification. You can use a community ID to correlate network\nevents related to a single flow.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.CommunityIDProcessor" + } + ] }, - "indices_options": { - "$ref": "#/components/schemas/_types.IndicesOptions" + "convert": { + "description": "Converts a field in the currently ingested document to a different type, such as converting a string to an integer.\nIf the field value is an array, all members will be converted.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ConvertProcessor" + } + ] }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" + "csv": { + "description": "Extracts fields from CSV line out of a single text field within a document.\nAny empty field in CSV will be skipped.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.CsvProcessor" + } + ] }, - "max_empty_searches": { - "description": "If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop after `frequency` times `max_empty_searches` of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped.", - "type": "number" + "date": { + "description": "Parses dates from fields, and then uses the date or timestamp as the timestamp for the document.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DateProcessor" + } + ] + }, + "date_index_name": { + "description": "The purpose of this processor is to point documents to the right time based index based on a date or timestamp field in a document by using the date math index name support.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DateIndexNameProcessor" + } + ] + }, + "dissect": { + "description": "Extracts structured fields out of a single text field by matching the text field against a delimiter-based pattern.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DissectProcessor" + } + ] + }, + "dot_expander": { + "description": "Expands a field with dots into an object field.\nThis processor allows fields with dots in the name to be accessible by other processors in the pipeline.\nOtherwise these fields can’t be accessed by any processor.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DotExpanderProcessor" + } + ] + }, + "drop": { + "description": "Drops the document without raising any errors.\nThis is useful to prevent the document from getting indexed based on some condition.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DropProcessor" + } + ] + }, + "enrich": { + "description": "The `enrich` processor can enrich documents with data from another index.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.EnrichProcessor" + } + ] + }, + "fail": { + "description": "Raises an exception.\nThis is useful for when you expect a pipeline to fail and want to relay a specific message to the requester.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.FailProcessor" + } + ] + }, + "fingerprint": { + "description": "Computes a hash of the document’s content. You can use this hash for\ncontent fingerprinting.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.FingerprintProcessor" + } + ] + }, + "foreach": { + "description": "Runs an ingest processor on each element of an array or object.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ForeachProcessor" + } + ] + }, + "ip_location": { + "description": "Currently an undocumented alias for GeoIP Processor.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.IpLocationProcessor" + } + ] + }, + "geo_grid": { + "description": "Converts geo-grid definitions of grid tiles or cells to regular bounding boxes or polygons which describe their shape.\nThis is useful if there is a need to interact with the tile shapes as spatially indexable fields.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.GeoGridProcessor" + } + ] + }, + "geoip": { + "description": "The `geoip` processor adds information about the geographical location of an IPv4 or IPv6 address.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.GeoIpProcessor" + } + ] + }, + "grok": { + "description": "Extracts structured fields out of a single text field within a document.\nYou choose which field to extract matched fields from, as well as the grok pattern you expect will match.\nA grok pattern is like a regular expression that supports aliased expressions that can be reused.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.GrokProcessor" + } + ] + }, + "gsub": { + "description": "Converts a string field by applying a regular expression and a replacement.\nIf the field is an array of string, all members of the array will be converted.\nIf any non-string values are encountered, the processor will throw an exception.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.GsubProcessor" + } + ] + }, + "html_strip": { + "description": "Removes HTML tags from the field.\nIf the field is an array of strings, HTML tags will be removed from all members of the array.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.HtmlStripProcessor" + } + ] + }, + "inference": { + "description": "Uses a pre-trained data frame analytics model or a model deployed for natural language processing tasks to infer against the data that is being ingested in the pipeline.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.InferenceProcessor" + } + ] + }, + "join": { + "description": "Joins each element of an array into a single string using a separator character between each element.\nThrows an error when the field is not an array.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.JoinProcessor" + } + ] }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "json": { + "description": "Parses a string containing JSON data into a structured object, string, or other value.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.JsonProcessor" + } + ] }, - "query_delay": { - "$ref": "#/components/schemas/_types.Duration" + "kv": { + "description": "This processor helps automatically parse messages (or specific event fields) which are of the `foo=bar` variety.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.KeyValueProcessor" + } + ] }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + "lowercase": { + "description": "Converts a string to its lowercase equivalent.\nIf the field is an array of strings, all members of the array will be converted.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.LowercaseProcessor" + } + ] }, - "script_fields": { - "description": "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.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } + "network_direction": { + "description": "Calculates the network direction given a source IP address, destination IP\naddress, and a list of internal networks.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.NetworkDirectionProcessor" + } + ] }, - "scroll_size": { - "description": "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.", - "type": "number" - } - } - }, - "ml._types.JobConfig": { - "type": "object", - "properties": { - "allow_lazy_open": { - "description": "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.", - "type": "boolean" + "pipeline": { + "description": "Executes another pipeline.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.PipelineProcessor" + } + ] }, - "analysis_config": { - "$ref": "#/components/schemas/ml._types.AnalysisConfig" + "redact": { + "description": "The Redact processor uses the Grok rules engine to obscure text in the input document matching the given Grok patterns.\nThe processor can be used to obscure Personal Identifying Information (PII) by configuring it to detect known patterns such as email or IP addresses.\nText that matches a Grok pattern is replaced with a configurable string such as `` where an email address is matched or simply replace all matches with the text `` if preferred.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.RedactProcessor" + } + ] }, - "analysis_limits": { - "$ref": "#/components/schemas/ml._types.AnalysisLimits" + "registered_domain": { + "description": "Extracts the registered domain (also known as the effective top-level\ndomain or eTLD), sub-domain, and top-level domain from a fully qualified\ndomain name (FQDN). Uses the registered domains defined in the Mozilla\nPublic Suffix List.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.RegisteredDomainProcessor" + } + ] }, - "background_persist_interval": { - "$ref": "#/components/schemas/_types.Duration" + "remove": { + "description": "Removes existing fields.\nIf one field doesn’t exist, an exception will be thrown.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.RemoveProcessor" + } + ] }, - "custom_settings": { - "$ref": "#/components/schemas/ml._types.CustomSettings" + "rename": { + "description": "Renames an existing field.\nIf the field doesn’t exist or the new name is already used, an exception will be thrown.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.RenameProcessor" + } + ] }, - "daily_model_snapshot_retention_after_days": { - "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies a period of time (in days) after which only the first snapshot per day is retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.", - "type": "number" + "reroute": { + "description": "Routes a document to another target index or data stream.\nWhen setting the `destination` option, the target is explicitly specified and the dataset and namespace options can’t be set.\nWhen the `destination` option is not set, this processor is in a data stream mode. Note that in this mode, the reroute processor can only be used on data streams that follow the data stream naming scheme.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.RerouteProcessor" + } + ] }, - "data_description": { - "$ref": "#/components/schemas/ml._types.DataDescription" + "script": { + "description": "Runs an inline or stored script on incoming documents.\nThe script runs in the `ingest` context.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ScriptProcessor" + } + ] }, - "datafeed_config": { - "$ref": "#/components/schemas/ml._types.DatafeedConfig" + "set": { + "description": "Adds a field with the specified value.\nIf the field already exists, its value will be replaced with the provided one.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.SetProcessor" + } + ] }, - "description": { - "description": "A description of the job.", - "type": "string" + "set_security_user": { + "description": "Sets user-related details (such as `username`, `roles`, `email`, `full_name`, `metadata`, `api_key`, `realm` and `authentication_type`) from the current authenticated user to the current document by pre-processing the ingest.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.SetSecurityUserProcessor" + } + ] }, - "groups": { - "description": "A list of job groups. A job can belong to no groups or many.", - "type": "array", - "items": { - "type": "string" - } + "sort": { + "description": "Sorts the elements of an array ascending or descending.\nHomogeneous arrays of numbers will be sorted numerically, while arrays of strings or heterogeneous arrays of strings + numbers will be sorted lexicographically.\nThrows an error when the field is not an array.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.SortProcessor" + } + ] }, - "job_id": { - "$ref": "#/components/schemas/_types.Id" + "split": { + "description": "Splits a field into an array using a separator character.\nOnly works on string fields.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.SplitProcessor" + } + ] }, - "job_type": { - "description": "Reserved for future use, currently set to `anomaly_detector`.", - "type": "string" + "terminate": { + "description": "Terminates the current ingest pipeline, causing no further processors to be run.\nThis will normally be executed conditionally, using the `if` option.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.TerminateProcessor" + } + ] }, - "model_plot_config": { - "$ref": "#/components/schemas/ml._types.ModelPlotConfig" + "trim": { + "description": "Trims whitespace from a field.\nIf the field is an array of strings, all members of the array will be trimmed.\nThis only works on leading and trailing whitespace.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.TrimProcessor" + } + ] }, - "model_snapshot_retention_days": { - "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies the maximum period of time (in days) that snapshots are retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nThe default value is `10`, which means snapshots ten days older than the newest snapshot are deleted.", - "type": "number" + "uppercase": { + "description": "Converts a string to its uppercase equivalent.\nIf the field is an array of strings, all members of the array will be converted.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.UppercaseProcessor" + } + ] }, - "renormalization_window_days": { - "description": "Advanced configuration option.\nThe period over which adjustments to the score are applied, as new data is seen.\nThe default value is the longer of 30 days or 100 `bucket_spans`.", - "type": "number" + "urldecode": { + "description": "URL-decodes a string.\nIf the field is an array of strings, all members of the array will be decoded.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.UrlDecodeProcessor" + } + ] }, - "results_index_name": { - "$ref": "#/components/schemas/_types.IndexName" + "uri_parts": { + "description": "Parses a Uniform Resource Identifier (URI) string and extracts its components as an object.\nThis URI object includes properties for the URI’s domain, path, fragment, port, query, scheme, user info, username, and password.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.UriPartsProcessor" + } + ] }, - "results_retention_days": { - "description": "Advanced configuration option.\nThe period of time (in days) that results are retained.\nAge is calculated relative to the timestamp of the latest bucket result.\nIf 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.\nThe default value is null, which means all results are retained.\nAnnotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results.\nAnnotations added by users are retained forever.", - "type": "number" + "user_agent": { + "description": "The `user_agent` processor extracts details from the user agent string a browser sends with its web requests.\nThis processor adds this information by default under the `user_agent` field.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.UserAgentProcessor" + } + ] } }, - "required": [ - "analysis_config", - "data_description" - ] + "minProperties": 1, + "maxProperties": 1 }, - "_types.HttpHeaders": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { + "ingest._types.AppendProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The field to be appended to.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "value": { + "description": "The value to be appended. Supports template snippets. May specify only one of `value` or `copy_from`.", + "oneOf": [ + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + }, + "media_type": { + "description": "The media type for encoding `value`.\nApplies only when value is a template snippet.\nMust be one of `application/json`, `text/plain`, or `application/x-www-form-urlencoded`.", + "default": "\"application/json\"", "type": "string" + }, + "copy_from": { + "description": "The origin field which will be appended to `field`, cannot set `value` simultaneously.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "allow_duplicates": { + "description": "If `false`, the processor does not append values already present in the field.", + "default": true, + "type": "boolean" + }, + "ignore_empty_values": { + "description": "If `true`, the processor will skip empty values from the source (e.g. empty strings, and null values),\nrather than appending them to the field.", + "default": false, + "type": "boolean" } - } - ] - } + }, + "required": [ + "field" + ] + } + ] }, - "ml._types.AnalysisConfigRead": { + "ingest._types.ProcessorBase": { "type": "object", "properties": { - "bucket_span": { - "$ref": "#/components/schemas/_types.Duration" - }, - "categorization_analyzer": { - "$ref": "#/components/schemas/ml._types.CategorizationAnalyzer" + "description": { + "description": "Description of the processor.\nUseful for describing the purpose of the processor or its configuration.", + "type": "string" }, - "categorization_field_name": { - "$ref": "#/components/schemas/_types.Field" + "if": { + "description": "Conditionally execute the processor.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] }, - "categorization_filters": { - "description": "If `categorization_field_name` is specified, you can also define optional filters.\nThis property expects an array of regular expressions.\nThe expressions are used to filter out matching sequences from the categorization field values.", - "type": "array", - "items": { - "type": "string" - } + "ignore_failure": { + "description": "Ignore failures for the processor.", + "type": "boolean" }, - "detectors": { - "description": "An array of detector configuration objects.\nDetector configuration objects specify which data fields a job analyzes.\nThey also specify which analytical functions are used.\nYou can specify multiple detectors for a job.", + "on_failure": { + "description": "Handle failures for the processor.", "type": "array", "items": { - "$ref": "#/components/schemas/ml._types.DetectorRead" + "$ref": "#/components/schemas/ingest._types.ProcessorContainer" } }, - "influencers": { - "description": "A comma separated list of influencer field names.\nTypically these can be the by, over, or partition fields that are used in the detector configuration.\nYou might also want to use a field name that is not specifically named in a detector, but is available as part of the input data.\nWhen you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" - } + "tag": { + "description": "Identifier for the processor.\nUseful for debugging and metrics.", + "type": "string" + } + } + }, + "ingest._types.AttachmentProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "model_prune_window": { - "$ref": "#/components/schemas/_types.Duration" + { + "type": "object", + "properties": { + "field": { + "description": "The field to get the base64 encoded field from.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and field does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "indexed_chars": { + "description": "The number of chars being used for extraction to prevent huge fields.\nUse `-1` for no limit.", + "default": 100000.0, + "type": "number" + }, + "indexed_chars_field": { + "description": "Field name from which you can overwrite the number of chars being used for extraction.", + "default": "null", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "properties": { + "description": "Array of properties to select to be stored.\nCan be `content`, `title`, `name`, `author`, `keywords`, `date`, `content_type`, `content_length`, `language`.", + "type": "array", + "items": { + "type": "string" + } + }, + "target_field": { + "description": "The field that will hold the attachment information.", + "default": "attachment", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "remove_binary": { + "description": "If true, the binary field will be removed from the document", + "default": false, + "type": "boolean" + }, + "resource_name": { + "description": "Field containing the name of the resource to decode.\nIf specified, the processor passes this resource name to the underlying Tika library to enable Resource Name Based Detection.", + "type": "string" + } + }, + "required": [ + "field" + ] + } + ] + }, + "ingest._types.BytesProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "latency": { - "$ref": "#/components/schemas/_types.Duration" + { + "type": "object", + "properties": { + "field": { + "description": "The field to convert.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to assign the converted value to.\nBy default, the field is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] + } + ] + }, + "ingest._types.CefProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "multivariate_by_fields": { - "description": "This functionality is reserved for internal use.\nIt is not supported for use in customer environments and is not subject to the support SLA of official GA features.\nIf set to `true`, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold.", - "type": "boolean" + { + "type": "object", + "properties": { + "field": { + "description": "The field containing the CEF message.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to assign the converted value to.\nBy default, the `target_field` is 'cef'", + "default": "'cef'", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_empty_values": { + "description": "If `true` and value is anempty string in extensions, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "timezone": { + "description": "The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names.", + "default": "UTC", + "type": "string" + } + }, + "required": [ + "field" + ] + } + ] + }, + "ingest._types.CircleProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "per_partition_categorization": { - "$ref": "#/components/schemas/ml._types.PerPartitionCategorization" + { + "type": "object", + "properties": { + "error_distance": { + "description": "The difference between the resulting inscribed distance from center to side and the circle’s radius (measured in meters for `geo_shape`, unit-less for `shape`).", + "type": "number" + }, + "field": { + "description": "The field to interpret as a circle. Either a string in WKT format or a map for GeoJSON.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "shape_type": { + "description": "Which field mapping type is to be used when processing the circle: `geo_shape` or `shape`.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ShapeType" + } + ] + }, + "target_field": { + "description": "The field to assign the polygon shape to\nBy default, the field is updated in-place.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "error_distance", + "field", + "shape_type" + ] + } + ] + }, + "ingest._types.ShapeType": { + "type": "string", + "enum": [ + "geo_shape", + "shape" + ] + }, + "ingest._types.CommunityIDProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "summary_count_field_name": { - "$ref": "#/components/schemas/_types.Field" + { + "type": "object", + "properties": { + "source_ip": { + "description": "Field containing the source IP address.", + "default": "source.ip", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "source_port": { + "description": "Field containing the source port.", + "default": "source.port", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "destination_ip": { + "description": "Field containing the destination IP address.", + "default": "destination.ip", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "destination_port": { + "description": "Field containing the destination port.", + "default": "destination.port", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "iana_number": { + "description": "Field containing the IANA number.", + "default": "network.iana_number", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "icmp_type": { + "description": "Field containing the ICMP type.", + "default": "icmp.type", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "icmp_code": { + "description": "Field containing the ICMP code.", + "default": "icmp.code", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "transport": { + "description": "Field containing the transport protocol name or number. Used only when the\niana_number field is not present. The following protocol names are currently\nsupported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp", + "default": "network.transport", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "target_field": { + "description": "Output field for the community ID.", + "default": "network.community_id", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "seed": { + "description": "Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The\nseed can prevent hash collisions between network domains, such as a staging\nand production network that use the same addressing scheme.", + "default": 0.0, + "type": "number" + }, + "ignore_missing": { + "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, + "type": "boolean" + } + } } - }, - "required": [ - "bucket_span", - "detectors", - "influencers" ] }, - "ml._types.DetectorRead": { - "type": "object", - "properties": { - "by_field_name": { - "$ref": "#/components/schemas/_types.Field" - }, - "custom_rules": { - "description": "An array of custom rule objects, which enable you to customize the way detectors operate.\nFor example, a rule may dictate to the detector conditions under which results should be skipped.\nKibana refers to custom rules as job rules.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DetectionRule" - } - }, - "detector_description": { - "description": "A description of the detector.", - "type": "string" - }, - "detector_index": { - "description": "A unique identifier for the detector.\nThis identifier is based on the order of the detectors in the `analysis_config`, starting at zero.", - "type": "number" - }, - "exclude_frequent": { - "$ref": "#/components/schemas/ml._types.ExcludeFrequent" - }, - "field_name": { - "$ref": "#/components/schemas/_types.Field" - }, - "function": { - "description": "The analysis function that is used.\nFor example, `count`, `rare`, `mean`, `min`, `max`, and `sum`.", - "type": "string" - }, - "over_field_name": { - "$ref": "#/components/schemas/_types.Field" - }, - "partition_field_name": { - "$ref": "#/components/schemas/_types.Field" + "ingest._types.ConvertProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "use_null": { - "description": "Defines whether a new series is used as the null series when there is no value for the by or partition fields.", - "type": "boolean" + { + "type": "object", + "properties": { + "field": { + "description": "The field whose value is to be converted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to assign the converted value to.\nBy default, the `field` is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "type": { + "description": "The type to convert the existing value to.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ConvertType" + } + ] + } + }, + "required": [ + "field", + "type" + ] } - }, - "required": [ - "function" ] }, - "ml.put_trained_model.Definition": { - "type": "object", - "properties": { - "preprocessors": { - "description": "Collection of preprocessors", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.put_trained_model.Preprocessor" - } - }, - "trained_model": { - "$ref": "#/components/schemas/ml.put_trained_model.TrainedModel" - } - }, - "required": [ - "trained_model" + "ingest._types.ConvertType": { + "type": "string", + "enum": [ + "integer", + "long", + "double", + "float", + "boolean", + "ip", + "string", + "auto" ] }, - "ml.put_trained_model.Preprocessor": { - "type": "object", - "properties": { - "frequency_encoding": { - "$ref": "#/components/schemas/ml.put_trained_model.FrequencyEncodingPreprocessor" - }, - "one_hot_encoding": { - "$ref": "#/components/schemas/ml.put_trained_model.OneHotEncodingPreprocessor" + "ingest._types.CsvProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "target_mean_encoding": { - "$ref": "#/components/schemas/ml.put_trained_model.TargetMeanEncodingPreprocessor" + { + "type": "object", + "properties": { + "empty_value": { + "description": "Value used to fill empty fields.\nEmpty fields are skipped if this is not provided.\nAn empty field is one with no value (2 consecutive separators) or empty quotes (`\"\"`).", + "type": "object" + }, + "field": { + "description": "The field to extract data from.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "type": "boolean" + }, + "quote": { + "description": "Quote used in CSV, has to be single character string.", + "default": "\"", + "type": "string" + }, + "separator": { + "description": "Separator used in CSV, has to be single character string.", + "default": ",", + "type": "string" + }, + "target_fields": { + "description": "The array of fields to assign extracted values to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "trim": { + "description": "Trim whitespaces in unquoted fields.", + "type": "boolean" + } + }, + "required": [ + "field", + "target_fields" + ] } - }, - "minProperties": 1, - "maxProperties": 1 + ] }, - "ml.put_trained_model.FrequencyEncodingPreprocessor": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "feature_name": { - "type": "string" + "ingest._types.DateProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "frequency_map": { + { "type": "object", - "additionalProperties": { - "type": "number" - } + "properties": { + "field": { + "description": "The field to get the date from.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "formats": { + "description": "An array of the expected date formats.\nCan be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.", + "type": "array", + "items": { + "type": "string" + } + }, + "locale": { + "description": "The locale to use when parsing the date, relevant when parsing month names or week days.\nSupports template snippets.", + "default": "ENGLISH", + "type": "string" + }, + "target_field": { + "description": "The field that will hold the parsed date.", + "default": "@timestamp", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "timezone": { + "description": "The timezone to use when parsing the date.\nSupports template snippets.", + "default": "UTC", + "type": "string" + }, + "output_format": { + "description": "The format to use when writing the date to target_field. Must be a valid\njava time pattern.", + "default": "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", + "type": "string" + } + }, + "required": [ + "field", + "formats" + ] } - }, - "required": [ - "field", - "feature_name", - "frequency_map" ] }, - "ml.put_trained_model.OneHotEncodingPreprocessor": { - "type": "object", - "properties": { - "field": { - "type": "string" + "ingest._types.DateIndexNameProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "hot_map": { + { "type": "object", - "additionalProperties": { - "type": "string" - } + "properties": { + "date_formats": { + "description": "An array of the expected date formats for parsing dates / timestamps in the document being preprocessed.\nCan be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.", + "type": "array", + "items": { + "type": "string" + } + }, + "date_rounding": { + "description": "How to round the date when formatting the date into the index name. Valid values are:\n`y` (year), `M` (month), `w` (week), `d` (day), `h` (hour), `m` (minute) and `s` (second).\nSupports template snippets.", + "type": "string" + }, + "field": { + "description": "The field to get the date or timestamp from.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "index_name_format": { + "description": "The format to be used when printing the parsed date into the index name.\nA valid java time pattern is expected here.\nSupports template snippets.", + "default": "yyyy-MM-dd", + "type": "string" + }, + "index_name_prefix": { + "description": "A prefix of the index name to be prepended before the printed date.\nSupports template snippets.", + "type": "string" + }, + "locale": { + "description": "The locale to use when parsing the date from the document being preprocessed, relevant when parsing month names or week days.", + "default": "ENGLISH", + "type": "string" + }, + "timezone": { + "description": "The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names.", + "default": "UTC", + "type": "string" + } + }, + "required": [ + "date_rounding", + "field" + ] } - }, - "required": [ - "field", - "hot_map" ] }, - "ml.put_trained_model.TargetMeanEncodingPreprocessor": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "feature_name": { - "type": "string" + "ingest._types.DissectProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "target_map": { + { "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "default_value": { - "type": "number" + "properties": { + "append_separator": { + "description": "The character(s) that separate the appended fields.", + "default": "\"\"", + "type": "string" + }, + "field": { + "description": "The field to dissect.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "pattern": { + "description": "The pattern to apply to the field.", + "type": "string" + } + }, + "required": [ + "field", + "pattern" + ] } - }, - "required": [ - "field", - "feature_name", - "target_map", - "default_value" ] }, - "ml.put_trained_model.TrainedModel": { - "type": "object", - "properties": { - "tree": { - "$ref": "#/components/schemas/ml.put_trained_model.TrainedModelTree" - }, - "tree_node": { - "$ref": "#/components/schemas/ml.put_trained_model.TrainedModelTreeNode" + "ingest._types.DotExpanderProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "ensemble": { - "$ref": "#/components/schemas/ml.put_trained_model.Ensemble" + { + "type": "object", + "properties": { + "field": { + "description": "The field to expand into an object field.\nIf set to `*`, all top-level fields will be expanded.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "override": { + "description": "Controls the behavior when there is already an existing nested object that conflicts with the expanded field.\nWhen `false`, the processor will merge conflicts by combining the old and the new values into an array.\nWhen `true`, the value from the expanded field will overwrite the existing value.", + "default": false, + "type": "boolean" + }, + "path": { + "description": "The field that contains the field to expand.\nOnly required if the field to expand is part another object field, because the `field` option can only understand leaf fields.", + "type": "string" + } + }, + "required": [ + "field" + ] } - } + ] }, - "ml.put_trained_model.TrainedModelTree": { - "type": "object", - "properties": { - "classification_labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "feature_names": { - "type": "array", - "items": { - "type": "string" - } - }, - "target_type": { - "type": "string" + "ingest._types.DropProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "tree_structure": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.put_trained_model.TrainedModelTreeNode" - } + { + "type": "object" } - }, - "required": [ - "feature_names", - "tree_structure" ] }, - "ml.put_trained_model.TrainedModelTreeNode": { - "type": "object", - "properties": { - "decision_type": { - "type": "string" - }, - "default_left": { - "type": "boolean" - }, - "leaf_value": { - "type": "number" - }, - "left_child": { - "type": "number" - }, - "node_index": { - "type": "number" - }, - "right_child": { - "type": "number" - }, - "split_feature": { - "type": "number" - }, - "split_gain": { - "type": "number" + "ingest._types.EnrichProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "threshold": { - "type": "number" + { + "type": "object", + "properties": { + "field": { + "description": "The field in the input document that matches the policies match_field used to retrieve the enrichment data.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "max_matches": { + "description": "The maximum number of matched documents to include under the configured target field.\nThe `target_field` will be turned into a json array if `max_matches` is higher than 1, otherwise `target_field` will become a json object.\nIn order to avoid documents getting too large, the maximum allowed value is 128.", + "default": 1.0, + "type": "number" + }, + "override": { + "description": "If processor will update fields with pre-existing non-null-valued field.\nWhen set to `false`, such fields will not be touched.", + "default": true, + "type": "boolean" + }, + "policy_name": { + "description": "The name of the enrich policy to use.", + "type": "string" + }, + "shape_relation": { + "description": "A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.\nThis option is only used for `geo_match` enrich policy types.", + "default": "INTERSECTS", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GeoShapeRelation" + } + ] + }, + "target_field": { + "description": "Field added to incoming documents to contain enrich data. This field contains both the `match_field` and `enrich_fields` specified in the enrich policy.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field", + "policy_name", + "target_field" + ] } - }, - "required": [ - "node_index" ] }, - "ml.put_trained_model.Ensemble": { - "type": "object", - "properties": { - "aggregate_output": { - "$ref": "#/components/schemas/ml.put_trained_model.AggregateOutput" - }, - "classification_labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "feature_names": { - "type": "array", - "items": { - "type": "string" - } - }, - "target_type": { - "type": "string" - }, - "trained_models": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.put_trained_model.TrainedModel" - } - } - }, - "required": [ - "trained_models" + "_types.GeoShapeRelation": { + "type": "string", + "enum": [ + "intersects", + "disjoint", + "within", + "contains" ] }, - "ml.put_trained_model.AggregateOutput": { - "type": "object", - "properties": { - "logistic_regression": { - "$ref": "#/components/schemas/ml.put_trained_model.Weights" - }, - "weighted_sum": { - "$ref": "#/components/schemas/ml.put_trained_model.Weights" - }, - "weighted_mode": { - "$ref": "#/components/schemas/ml.put_trained_model.Weights" + "ingest._types.FailProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "exponent": { - "$ref": "#/components/schemas/ml.put_trained_model.Weights" + { + "type": "object", + "properties": { + "message": { + "description": "The error message thrown by the processor.\nSupports template snippets.", + "type": "string" + } + }, + "required": [ + "message" + ] } - } + ] }, - "ml.put_trained_model.Weights": { - "type": "object", - "properties": { - "weights": { - "type": "number" + "ingest._types.FingerprintProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" + }, + { + "type": "object", + "properties": { + "fields": { + "description": "Array of fields to include in the fingerprint. For objects, the processor\nhashes both the field key and value. For other fields, the processor hashes\nonly the field value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "target_field": { + "description": "Output field for the fingerprint.", + "default": "fingerprint", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "salt": { + "description": "Salt value for the hash function.", + "type": "string" + }, + "method": { + "description": "The hash method used to compute the fingerprint. Must be one of MD5, SHA-1,\nSHA-256, SHA-512, or MurmurHash3.", + "default": "SHA-1", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.FingerprintDigest" + } + ] + }, + "ignore_missing": { + "description": "If true, the processor ignores any missing fields. If all fields are\nmissing, the processor silently exits without modifying the document.", + "default": false, + "type": "boolean" + } + }, + "required": [ + "fields" + ] } - }, - "required": [ - "weights" ] }, - "ml.put_trained_model.Input": { - "type": "object", - "properties": { - "field_names": { - "$ref": "#/components/schemas/_types.Names" - } - }, - "required": [ - "field_names" + "ingest._types.FingerprintDigest": { + "type": "string", + "enum": [ + "MD5", + "SHA-1", + "SHA-256", + "SHA-512", + "MurmurHash3" ] }, - "ml._types.TrainedModelAssignment": { - "type": "object", - "properties": { - "adaptive_allocations": { - "oneOf": [ - { - "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings" + "ingest._types.ForeachProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "Field containing array or object values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - { - "nullable": true, - "type": "string" + "ignore_missing": { + "description": "If `true`, the processor silently exits without changing the document if the `field` is `null` or missing.", + "default": false, + "type": "boolean" + }, + "processor": { + "description": "Ingest processor to run on each element.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorContainer" + } + ] } + }, + "required": [ + "field", + "processor" ] + } + ] + }, + "ingest._types.IpLocationProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "assignment_state": { - "$ref": "#/components/schemas/ml._types.DeploymentAssignmentState" - }, - "max_assigned_allocations": { - "type": "number" - }, - "reason": { - "type": "string" - }, - "routing_table": { - "description": "The allocation state for each node.", + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ml._types.TrainedModelAssignmentRoutingTable" - } - }, - "start_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "task_parameters": { - "$ref": "#/components/schemas/ml._types.TrainedModelAssignmentTaskParameters" + "properties": { + "database_file": { + "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "default": "GeoLite2-City.mmdb", + "type": "string" + }, + "field": { + "description": "The field to get the ip address from for the geographical lookup.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "first_only": { + "description": "If `true`, only the first found IP location data will be returned, even if the field contains an array.", + "default": true, + "type": "boolean" + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "properties": { + "description": "Controls what properties are added to the `target_field` based on the IP location lookup.", + "type": "array", + "items": { + "type": "string" + } + }, + "target_field": { + "description": "The field that will hold the geographical information looked up from the MaxMind database.", + "default": "geoip", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "download_database_on_pipeline_creation": { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "type": "boolean" + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "assignment_state", - "routing_table", - "start_time", - "task_parameters" ] }, - "ml._types.TrainedModelAssignmentRoutingTable": { - "type": "object", - "properties": { - "reason": { - "description": "The reason for the current state. It is usually populated only when the\n`routing_state` is `failed`.", - "type": "string" - }, - "routing_state": { - "$ref": "#/components/schemas/ml._types.RoutingState" - }, - "current_allocations": { - "description": "Current number of allocations.", - "type": "number" + "ingest._types.GeoGridProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "target_allocations": { - "description": "Target number of allocations.", - "type": "number" + { + "type": "object", + "properties": { + "field": { + "description": "The field to interpret as a geo-tile.=\nThe field format is determined by the `tile_type`.", + "type": "string" + }, + "tile_type": { + "description": "Three tile formats are understood: geohash, geotile and geohex.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.GeoGridTileType" + } + ] + }, + "target_field": { + "description": "The field to assign the polygon shape to, by default, the `field` is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "parent_field": { + "description": "If specified and a parent tile exists, save that tile address to this field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "children_field": { + "description": "If specified and children tiles exist, save those tile addresses to this field as an array of strings.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "non_children_field": { + "description": "If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "precision_field": { + "description": "If specified, save the tile precision (zoom) as an integer to this field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_format": { + "description": "Which format to save the generated polygon in.", + "default": "geojson", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.GeoGridTargetFormat" + } + ] + } + }, + "required": [ + "field", + "tile_type" + ] } - }, - "required": [ - "routing_state", - "current_allocations", - "target_allocations" ] }, - "ml._types.TrainedModelAssignmentTaskParameters": { - "type": "object", - "properties": { - "model_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "model_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "deployment_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "cache_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "number_of_allocations": { - "description": "The total number of allocations this model is assigned across ML nodes.", - "type": "number" - }, - "priority": { - "$ref": "#/components/schemas/ml._types.TrainingPriority" - }, - "per_deployment_memory_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "per_allocation_memory_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "queue_capacity": { - "description": "Number of inference requests are allowed in the queue at a time.", - "type": "number" + "ingest._types.GeoGridTileType": { + "type": "string", + "enum": [ + "geotile", + "geohex", + "geohash" + ] + }, + "ingest._types.GeoGridTargetFormat": { + "type": "string", + "enum": [ + "geojson", + "wkt" + ] + }, + "ingest._types.GeoIpProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "threads_per_allocation": { - "description": "Number of threads per allocation.", - "type": "number" + { + "type": "object", + "properties": { + "database_file": { + "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "default": "GeoLite2-City.mmdb", + "type": "string" + }, + "field": { + "description": "The field to get the ip address from for the geographical lookup.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "first_only": { + "description": "If `true`, only the first found geoip data will be returned, even if the field contains an array.", + "default": true, + "type": "boolean" + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "properties": { + "description": "Controls what properties are added to the `target_field` based on the geoip lookup.", + "type": "array", + "items": { + "type": "string" + } + }, + "target_field": { + "description": "The field that will hold the geographical information looked up from the MaxMind database.", + "default": "geoip", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "download_database_on_pipeline_creation": { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "type": "boolean" + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "model_bytes", - "model_id", - "deployment_id", - "number_of_allocations", - "priority", - "per_deployment_memory_bytes", - "per_allocation_memory_bytes", - "queue_capacity", - "threads_per_allocation" ] }, - "ml._types.AnalysisMemoryLimit": { - "type": "object", - "properties": { - "model_memory_limit": { - "description": "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.", - "type": "string" + "ingest._types.GrokProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" + }, + { + "type": "object", + "properties": { + "ecs_compatibility": { + "description": "Must be disabled or v1. If v1, the processor uses patterns with Elastic\nCommon Schema (ECS) field names.", + "default": "disabled", + "type": "string" + }, + "field": { + "description": "The field to use for grok expression parsing.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "pattern_definitions": { + "description": "A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor.\nPatterns matching existing names will override the pre-existing definition.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "patterns": { + "description": "An ordered list of grok expression to match and extract named captures with.\nReturns on the first expression in the list that matches.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.GrokPattern" + } + }, + "trace_match": { + "description": "When `true`, `_ingest._grok_match_index` will be inserted into your matched document’s metadata with the index into the pattern found in `patterns` that matched.", + "default": false, + "type": "boolean" + } + }, + "required": [ + "field", + "patterns" + ] } - }, - "required": [ - "model_memory_limit" ] }, - "ml._types.DetectorUpdate": { - "type": "object", - "properties": { - "detector_index": { - "description": "A unique identifier for the detector.\nThis identifier is based on the order of the detectors in the `analysis_config`, starting at zero.", - "type": "number" - }, - "description": { - "description": "A description of the detector.", - "type": "string" + "_types.GrokPattern": { + "type": "string" + }, + "ingest._types.GsubProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "custom_rules": { - "description": "An array of custom rule objects, which enable you to customize the way detectors operate.\nFor example, a rule may dictate to the detector conditions under which results should be skipped.\nKibana refers to custom rules as job rules.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DetectionRule" - } + { + "type": "object", + "properties": { + "field": { + "description": "The field to apply the replacement to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "pattern": { + "description": "The pattern to be replaced.", + "type": "string" + }, + "replacement": { + "description": "The string to replace the matching patterns with.", + "type": "string" + }, + "target_field": { + "description": "The field to assign the converted value to\nBy default, the `field` is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field", + "pattern", + "replacement" + ] } - }, - "required": [ - "detector_index" ] }, - "_global.msearch.MultiSearchResult": { - "type": "object", - "properties": { - "took": { - "type": "number" + "ingest._types.HtmlStripProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.msearch.ResponseItem" - } + { + "type": "object", + "properties": { + "field": { + "description": "The string-valued field to remove HTML tags from.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document,", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to assign the converted value to\nBy default, the `field` is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "took", - "responses" ] }, - "_global.msearch_template.RequestItem": { - "oneOf": [ + "ingest._types.InferenceProcessor": { + "allOf": [ { - "$ref": "#/components/schemas/_global.msearch.MultisearchHeader" + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, { - "$ref": "#/components/schemas/_global.msearch_template.TemplateConfig" + "type": "object", + "properties": { + "model_id": { + "description": "The ID or alias for the trained model, or the ID of the deployment.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "target_field": { + "description": "Field added to incoming documents to contain results objects.", + "default": "ml.inference.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "field_map": { + "description": "Maps the document field names to the known field names of the model.\nThis mapping takes precedence over any default mappings provided in the model configuration.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "inference_config": { + "description": "Contains the inference type and its options.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.InferenceConfig" + } + ] + }, + "input_output": { + "description": "Input fields for inference and output (destination) fields for the inference results.\nThis option is incompatible with the target_field and field_map options.", + "oneOf": [ + { + "$ref": "#/components/schemas/ingest._types.InputConfig" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.InputConfig" + } + } + ] + }, + "ignore_missing": { + "description": "If true and any of the input fields defined in input_ouput are missing\nthen those missing fields are quietly ignored, otherwise a missing field causes a failure.\nOnly applies when using input_output configurations to explicitly list the input fields.", + "type": "boolean" + } + }, + "required": [ + "model_id" + ] } ] }, - "_global.msearch_template.TemplateConfig": { + "ingest._types.InferenceConfig": { "type": "object", "properties": { - "explain": { - "description": "If `true`, returns detailed information about score calculation as part of each hit.", - "type": "boolean" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "params": { - "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "profile": { - "description": "If `true`, the query execution is profiled.", - "type": "boolean" + "regression": { + "description": "Regression configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.InferenceConfigRegression" + } + ] }, - "source": { - "$ref": "#/components/schemas/_types.ScriptSource" + "classification": { + "description": "Classification configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.InferenceConfigClassification" + } + ] } - } + }, + "minProperties": 1, + "maxProperties": 1 }, - "_global.mtermvectors.Operation": { + "ingest._types.InferenceConfigRegression": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "doc": { - "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", - "type": "object" - }, - "fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "field_statistics": { - "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", - "type": "boolean" - }, - "filter": { - "$ref": "#/components/schemas/_global.termvectors.Filter" - }, - "offsets": { - "description": "If `true`, the response includes term offsets.", - "type": "boolean" - }, - "payloads": { - "description": "If `true`, the response includes term payloads.", - "type": "boolean" - }, - "positions": { - "description": "If `true`, the response includes term positions.", - "type": "boolean" - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "term_statistics": { - "description": "If true, the response includes term frequency and document frequency.", - "type": "boolean" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction.", + "default": "_prediction", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" + "num_top_feature_importance_values": { + "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, + "type": "number" } } }, - "_global.termvectors.Filter": { + "ingest._types.InferenceConfigClassification": { "type": "object", "properties": { - "max_doc_freq": { - "description": "Ignore words which occur in more than this many docs.\nDefaults to unbounded.", - "type": "number" - }, - "max_num_terms": { - "description": "The maximum number of terms that must be returned per field.", - "type": "number" - }, - "max_term_freq": { - "description": "Ignore words with more than this frequency in the source doc.\nIt defaults to unbounded.", + "num_top_classes": { + "description": "Specifies the number of top class predictions to return.", + "default": 0.0, "type": "number" }, - "max_word_length": { - "description": "The maximum word length above which words will be ignored.\nDefaults to unbounded.", + "num_top_feature_importance_values": { + "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" }, - "min_doc_freq": { - "description": "Ignore terms which do not occur in at least this many docs.", - "type": "number" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction.", + "default": "_prediction", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "min_term_freq": { - "description": "Ignore words with less than this frequency in the source doc.", - "type": "number" + "top_classes_results_field": { + "description": "Specifies the field to which the top classes are written.", + "default": "top_classes", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "min_word_length": { - "description": "The minimum word length below which words will be ignored.", - "type": "number" + "prediction_field_type": { + "description": "Specifies the type of the predicted field to write.\nValid values are: `string`, `number`, `boolean`.", + "type": "string" } } }, - "_global.mtermvectors.TermVectorsResult": { + "ingest._types.InputConfig": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "took": { - "type": "number" - }, - "found": { - "type": "boolean" - }, - "term_vectors": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.termvectors.TermVector" - } + "input_field": { + "type": "string" }, - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" + "output_field": { + "type": "string" } }, "required": [ - "_index" + "input_field", + "output_field" ] }, - "_global.termvectors.TermVector": { - "type": "object", - "properties": { - "field_statistics": { - "$ref": "#/components/schemas/_global.termvectors.FieldStatistics" + "ingest._types.JoinProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "terms": { + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.termvectors.Term" - } + "properties": { + "field": { + "description": "Field containing array values to join.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "separator": { + "description": "The separator character.", + "type": "string" + }, + "target_field": { + "description": "The field to assign the joined value to.\nBy default, the field is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field", + "separator" + ] } - }, - "required": [ - "terms" ] }, - "_global.termvectors.FieldStatistics": { - "type": "object", - "properties": { - "doc_count": { - "type": "number" - }, - "sum_doc_freq": { - "type": "number" + "ingest._types.JsonProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "sum_ttf": { - "type": "number" + { + "type": "object", + "properties": { + "add_to_root": { + "description": "Flag that forces the parsed JSON to be added at the top level of the document.\n`target_field` must not be set when this option is chosen.", + "default": false, + "type": "boolean" + }, + "add_to_root_conflict_strategy": { + "description": "When set to `replace`, root fields that conflict with fields from the parsed JSON will be overridden.\nWhen set to `merge`, conflicting fields will be merged.\nOnly applicable `if add_to_root` is set to true.", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.JsonProcessorConflictStrategy" + } + ] + }, + "allow_duplicate_keys": { + "description": "When set to `true`, the JSON parser will not fail if the JSON contains duplicate keys.\nInstead, the last encountered value for any duplicate key wins.", + "default": false, + "type": "boolean" + }, + "field": { + "description": "The field to be parsed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "target_field": { + "description": "The field that the converted structured object will be written into.\nAny existing content in this field will be overwritten.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "doc_count", - "sum_doc_freq", - "sum_ttf" ] }, - "_global.termvectors.Term": { - "type": "object", - "properties": { - "doc_freq": { - "type": "number" + "ingest._types.JsonProcessorConflictStrategy": { + "type": "string", + "enum": [ + "replace", + "merge" + ] + }, + "ingest._types.KeyValueProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "score": { - "type": "number" + { + "type": "object", + "properties": { + "exclude_keys": { + "description": "List of keys to exclude from document.", + "type": "array", + "items": { + "type": "string" + } + }, + "field": { + "description": "The field to be parsed.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "field_split": { + "description": "Regex pattern to use for splitting key-value pairs.", + "type": "string" + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "include_keys": { + "description": "List of keys to filter and insert into document.\nDefaults to including all keys.", + "type": "array", + "items": { + "type": "string" + } + }, + "prefix": { + "description": "Prefix to be added to extracted keys.", + "default": "null", + "type": "string" + }, + "strip_brackets": { + "description": "If `true`. strip brackets `()`, `<>`, `[]` as well as quotes `'` and `\"` from extracted values.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to insert the extracted keys into.\nDefaults to the root of the document.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "trim_key": { + "description": "String of characters to trim from extracted keys.", + "type": "string" + }, + "trim_value": { + "description": "String of characters to trim from extracted values.", + "type": "string" + }, + "value_split": { + "description": "Regex pattern to use for splitting the key from the value within a key-value pair.", + "type": "string" + } + }, + "required": [ + "field", + "field_split", + "value_split" + ] + } + ] + }, + "ingest._types.LowercaseProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "term_freq": { - "type": "number" + { + "type": "object", + "properties": { + "field": { + "description": "The field to make lowercase.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to assign the converted value to.\nBy default, the field is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] + } + ] + }, + "ingest._types.NetworkDirectionProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "tokens": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.termvectors.Token" + { + "type": "object", + "properties": { + "source_ip": { + "description": "Field containing the source IP address.", + "default": "source.ip", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "destination_ip": { + "description": "Field containing the destination IP address.", + "default": "destination.ip", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "target_field": { + "description": "Output field for the network direction.", + "default": "network.direction", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "internal_networks": { + "description": "List of internal networks. Supports IPv4 and IPv6 addresses and ranges in\nCIDR notation. Also supports the named ranges listed below. These may be\nconstructed with template snippets. Must specify only one of\ninternal_networks or internal_networks_field.", + "type": "array", + "items": { + "type": "string" + } + }, + "internal_networks_field": { + "description": "A field on the given document to read the internal_networks configuration\nfrom.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, + "type": "boolean" + } } - }, - "ttf": { - "type": "number" } - }, - "required": [ - "term_freq" ] }, - "_global.termvectors.Token": { - "type": "object", - "properties": { - "end_offset": { - "type": "number" - }, - "payload": { - "type": "string" - }, - "position": { - "type": "number" + "ingest._types.PipelineProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "start_offset": { - "type": "number" + { + "type": "object", + "properties": { + "name": { + "description": "The name of the pipeline to execute.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "ignore_missing_pipeline": { + "description": "Whether to ignore missing pipelines instead of failing.", + "default": false, + "type": "boolean" + } + }, + "required": [ + "name" + ] } - }, - "required": [ - "position" ] }, - "nodes.clear_repositories_metering_archive.ResponseBase": { + "ingest._types.RedactProcessor": { "allOf": [ { - "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, { "type": "object", "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" + "field": { + "description": "The field to be redacted", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "nodes": { - "description": "Contains repositories metering information for the nodes selected by the request.", + "patterns": { + "description": "A list of grok expressions to match and redact named captures with", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.GrokPattern" + } + }, + "pattern_definitions": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.RepositoryMeteringInformation" + "type": "string" } + }, + "prefix": { + "description": "Start a redacted section with this token", + "default": "<", + "type": "string" + }, + "suffix": { + "description": "End a redacted section with this token", + "default": ">", + "type": "string" + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "skip_if_unlicensed": { + "description": "If `true` and the current license does not support running redact processors, then the processor quietly exits without modifying the document", + "default": false, + "type": "boolean" + }, + "trace_redact": { + "description": "If `true` then ingest metadata `_ingest._redact._is_redacted` is set to `true` if the document has been redacted", + "default": false, + "x-state": "Generally available; Added in 8.16.0", + "type": "boolean" } }, "required": [ - "cluster_name", - "nodes" + "field", + "patterns" ] } ] }, - "nodes._types.RepositoryMeteringInformation": { - "type": "object", - "properties": { - "repository_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "repository_type": { - "description": "Repository type.", - "type": "string" - }, - "repository_location": { - "$ref": "#/components/schemas/nodes._types.RepositoryLocation" - }, - "repository_ephemeral_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "repository_started_at": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "repository_stopped_at": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "archived": { - "description": "A flag that tells whether or not this object has been archived. When a repository is closed or updated the\nrepository metering information is archived and kept for a certain period of time. This allows retrieving the\nrepository metering information of previous repository instantiations.", - "type": "boolean" - }, - "cluster_version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "ingest._types.RegisteredDomainProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "request_counts": { - "$ref": "#/components/schemas/nodes._types.RequestCounts" + { + "type": "object", + "properties": { + "field": { + "description": "Field containing the source FQDN.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "target_field": { + "description": "Object field containing extracted domain components. If an empty string,\nthe processor adds components to the document’s root.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, + "type": "boolean" + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "repository_name", - "repository_type", - "repository_location", - "repository_ephemeral_id", - "repository_started_at", - "archived", - "request_counts" ] }, - "nodes._types.RepositoryLocation": { - "type": "object", - "properties": { - "base_path": { - "type": "string" - }, - "container": { - "description": "Container name (Azure)", - "type": "string" + "ingest._types.RemoveProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "bucket": { - "description": "Bucket name (GCP, S3)", - "type": "string" + { + "type": "object", + "properties": { + "field": { + "description": "Fields to be removed. Supports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "keep": { + "description": "Fields to be kept. When set, all fields other than those specified are removed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "base_path" ] }, - "nodes._types.RequestCounts": { - "type": "object", - "properties": { - "GetBlobProperties": { - "description": "Number of Get Blob Properties requests (Azure)", - "type": "number" - }, - "GetBlob": { - "description": "Number of Get Blob requests (Azure)", - "type": "number" - }, - "ListBlobs": { - "description": "Number of List Blobs requests (Azure)", - "type": "number" - }, - "PutBlob": { - "description": "Number of Put Blob requests (Azure)", - "type": "number" - }, - "PutBlock": { - "description": "Number of Put Block (Azure)", - "type": "number" - }, - "PutBlockList": { - "description": "Number of Put Block List requests", - "type": "number" - }, - "GetObject": { - "description": "Number of get object requests (GCP, S3)", - "type": "number" - }, - "ListObjects": { - "description": "Number of list objects requests (GCP, S3)", - "type": "number" - }, - "InsertObject": { - "description": "Number of insert object requests, including simple, multipart and resumable uploads. Resumable uploads\ncan perform multiple http requests to insert a single object but they are considered as a single request\nsince they are billed as an individual operation. (GCP)", - "type": "number" - }, - "PutObject": { - "description": "Number of PutObject requests (S3)", - "type": "number" - }, - "PutMultipartObject": { - "description": "Number of Multipart requests, including CreateMultipartUpload, UploadPart and CompleteMultipartUpload requests (S3)", - "type": "number" - } - } - }, - "nodes.get_repositories_metering_info.ResponseBase": { + "ingest._types.RenameProcessor": { "allOf": [ { - "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, { "type": "object", "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" + "field": { + "description": "The field to be renamed.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "nodes": { - "description": "Contains repositories metering information for the nodes selected by the request.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.RepositoryMeteringInformation" - } + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The new name of the field.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] } }, "required": [ - "cluster_name", - "nodes" + "field", + "target_field" ] } ] }, - "_types.ThreadType": { - "type": "string", - "enum": [ - "cpu", - "wait", - "block", - "gpu", - "mem" + "ingest._types.RerouteProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" + }, + { + "type": "object", + "properties": { + "destination": { + "description": "A static value for the target. Can’t be set when the dataset or namespace option is set.", + "type": "string" + }, + "dataset": { + "description": "Field references or a static value for the dataset part of the data stream name.\nIn addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.\nExample values are nginx.access and nginx.error.\n\nSupports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).\nWhen resolving field references, the processor replaces invalid characters with _. Uses the part\nof the index name as a fallback if all field references resolve to a null, missing, or non-string value.\n\ndefault {{data_stream.dataset}}", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "namespace": { + "description": "Field references or a static value for the namespace part of the data stream name. See the criteria for\nindex names for allowed characters. Must be no longer than 100 characters.\n\nSupports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).\nWhen resolving field references, the processor replaces invalid characters with _. Uses the part\nof the index name as a fallback if all field references resolve to a null, missing, or non-string value.\n\ndefault {{data_stream.namespace}}", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + } ] }, - "nodes.info.ResponseBase": { + "ingest._types.ScriptProcessor": { "allOf": [ { - "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, { "type": "object", "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" + "id": { + "description": "ID of a stored script.\nIf no `source` is specified, this parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "nodes": { + "lang": { + "description": "Script language.", + "default": "painless", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptLanguage" + } + ] + }, + "params": { + "description": "Object containing parameters for the script.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/nodes.info.NodeInfo" + "type": "object" } + }, + "source": { + "description": "Inline script.\nIf no `id` is specified, this parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + } + ] + }, + "ingest._types.SetProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" + }, + { + "type": "object", + "properties": { + "copy_from": { + "description": "The origin field which will be copied to `field`, cannot set `value` simultaneously.\nSupported data types are `boolean`, `number`, `array`, `object`, `string`, `date`, etc.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "field": { + "description": "The field to insert, upsert, or update.\nSupports template snippets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_empty_value": { + "description": "If `true` and `value` is a template snippet that evaluates to `null` or the empty string, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "media_type": { + "description": "The media type for encoding `value`.\nApplies only when value is a template snippet.\nMust be one of `application/json`, `text/plain`, or `application/x-www-form-urlencoded`.", + "default": "\"application/json\"", + "type": "string" + }, + "override": { + "description": "If `true` processor will update fields with pre-existing non-null-valued field.\nWhen set to `false`, such fields will not be touched.", + "default": true, + "type": "boolean" + }, + "value": { + "description": "The value to be set for the field.\nSupports template snippets.\nMay specify only one of `value` or `copy_from`.", + "type": "object" } }, "required": [ - "cluster_name", - "nodes" + "field" ] } ] }, - "nodes.info.NodeInfo": { - "type": "object", - "properties": { - "attributes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "build_flavor": { - "type": "string" - }, - "build_hash": { - "description": "Short hash of the last git commit in this release.", - "type": "string" - }, - "build_type": { - "type": "string" - }, - "host": { - "$ref": "#/components/schemas/_types.Host" - }, - "http": { - "$ref": "#/components/schemas/nodes.info.NodeInfoHttp" - }, - "ip": { - "$ref": "#/components/schemas/_types.Ip" - }, - "jvm": { - "$ref": "#/components/schemas/nodes.info.NodeJvmInfo" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "network": { - "$ref": "#/components/schemas/nodes.info.NodeInfoNetwork" - }, - "os": { - "$ref": "#/components/schemas/nodes.info.NodeOperatingSystemInfo" - }, - "plugins": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.PluginStats" - } - }, - "process": { - "$ref": "#/components/schemas/nodes.info.NodeProcessInfo" - }, - "roles": { - "$ref": "#/components/schemas/_types.NodeRoles" - }, - "settings": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettings" - }, - "thread_pool": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes.info.NodeThreadPoolInfo" - } - }, - "total_indexing_buffer": { - "description": "Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings.", - "type": "number" - }, - "total_indexing_buffer_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "transport": { - "$ref": "#/components/schemas/nodes.info.NodeInfoTransport" - }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "modules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.PluginStats" - } - }, - "ingest": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngest" + "ingest._types.SetSecurityUserProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "aggregations": { + { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes.info.NodeInfoAggregation" - } + "properties": { + "field": { + "description": "The field to store the user information into.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "properties": { + "description": "Controls what user related properties are added to the field.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "attributes", - "build_flavor", - "build_hash", - "build_type", - "host", - "ip", - "name", - "roles", - "transport_address", - "version" ] }, - "nodes.info.NodeInfoHttp": { - "type": "object", - "properties": { - "bound_address": { - "type": "array", - "items": { - "type": "string" - } - }, - "max_content_length": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "max_content_length_in_bytes": { - "type": "number" + "ingest._types.SortProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "publish_address": { - "type": "string" + { + "type": "object", + "properties": { + "field": { + "description": "The field to be sorted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "order": { + "description": "The sort order to use.\nAccepts `\"asc\"` or `\"desc\"`.", + "default": "asc", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortOrder" + } + ] + }, + "target_field": { + "description": "The field to assign the sorted value to.\nBy default, the field is updated in-place.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "bound_address", - "max_content_length_in_bytes", - "publish_address" ] }, - "nodes.info.NodeJvmInfo": { - "type": "object", - "properties": { - "gc_collectors": { - "type": "array", - "items": { - "type": "string" - } - }, - "mem": { - "$ref": "#/components/schemas/nodes.info.NodeInfoJvmMemory" - }, - "memory_pools": { - "type": "array", - "items": { - "type": "string" - } - }, - "pid": { - "type": "number" - }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "vm_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "vm_vendor": { - "type": "string" - }, - "vm_version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "using_bundled_jdk": { - "type": "boolean" + "ingest._types.SplitProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "using_compressed_ordinary_object_pointers": { - "oneOf": [ - { + { + "type": "object", + "properties": { + "field": { + "description": "The field to split.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, - { + "preserve_trailing": { + "description": "Preserves empty trailing fields, if any.", + "default": false, + "type": "boolean" + }, + "separator": { + "description": "A regex which matches the separator, for example, `,` or `\\s+`.", "type": "string" + }, + "target_field": { + "description": "The field to assign the split value to.\nBy default, the field is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] } + }, + "required": [ + "field", + "separator" ] - }, - "input_arguments": { - "type": "array", - "items": { - "type": "string" - } } - }, - "required": [ - "gc_collectors", - "mem", - "memory_pools", - "pid", - "start_time_in_millis", - "version", - "vm_name", - "vm_vendor", - "vm_version", - "using_bundled_jdk", - "input_arguments" ] }, - "nodes.info.NodeInfoJvmMemory": { - "type": "object", - "properties": { - "direct_max": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "direct_max_in_bytes": { - "type": "number" - }, - "heap_init": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "heap_init_in_bytes": { - "type": "number" - }, - "heap_max": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "heap_max_in_bytes": { - "type": "number" - }, - "non_heap_init": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "non_heap_init_in_bytes": { - "type": "number" - }, - "non_heap_max": { - "$ref": "#/components/schemas/_types.ByteSize" + "ingest._types.TerminateProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "non_heap_max_in_bytes": { - "type": "number" + { + "type": "object" } - }, - "required": [ - "direct_max_in_bytes", - "heap_init_in_bytes", - "heap_max_in_bytes", - "non_heap_init_in_bytes", - "non_heap_max_in_bytes" ] }, - "nodes.info.NodeInfoNetwork": { - "type": "object", - "properties": { - "primary_interface": { - "$ref": "#/components/schemas/nodes.info.NodeInfoNetworkInterface" + "ingest._types.TrimProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "refresh_interval": { - "type": "number" + { + "type": "object", + "properties": { + "field": { + "description": "The string-valued field to trim whitespace from.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to assign the trimmed value to.\nBy default, the field is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "primary_interface", - "refresh_interval" ] }, - "nodes.info.NodeInfoNetworkInterface": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "mac_address": { - "type": "string" + "ingest._types.UppercaseProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "name": { - "$ref": "#/components/schemas/_types.Name" + { + "type": "object", + "properties": { + "field": { + "description": "The field to make uppercase.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to assign the converted value to.\nBy default, the field is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "address", - "mac_address", - "name" ] }, - "nodes.info.NodeOperatingSystemInfo": { - "type": "object", - "properties": { - "arch": { - "description": "Name of the JVM architecture (ex: amd64, x86)", - "type": "string" - }, - "available_processors": { - "description": "Number of processors available to the Java virtual machine", - "type": "number" - }, - "allocated_processors": { - "description": "The number of processors actually used to calculate thread pool size. This number can be set with the node.processors setting of a node and defaults to the number of processors reported by the OS.", - "type": "number" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "pretty_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "refresh_interval_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "cpu": { - "$ref": "#/components/schemas/nodes.info.NodeInfoOSCPU" - }, - "mem": { - "$ref": "#/components/schemas/nodes.info.NodeInfoMemory" + "ingest._types.UrlDecodeProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "swap": { - "$ref": "#/components/schemas/nodes.info.NodeInfoMemory" + { + "type": "object", + "properties": { + "field": { + "description": "The field to decode.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "The field to assign the converted value to.\nBy default, the field is updated in-place.", + "default": "field", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "arch", - "available_processors", - "name", - "pretty_name", - "refresh_interval_in_millis", - "version" ] }, - "nodes.info.NodeInfoOSCPU": { - "type": "object", - "properties": { - "cache_size": { - "type": "string" - }, - "cache_size_in_bytes": { - "type": "number" - }, - "cores_per_socket": { - "type": "number" - }, - "mhz": { - "type": "number" - }, - "model": { - "type": "string" - }, - "total_cores": { - "type": "number" - }, - "total_sockets": { - "type": "number" + "ingest._types.UriPartsProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "vendor": { - "type": "string" + { + "type": "object", + "properties": { + "field": { + "description": "Field containing the URI string.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "keep_original": { + "description": "If `true`, the processor copies the unparsed URI to `.original`.", + "default": true, + "type": "boolean" + }, + "remove_if_successful": { + "description": "If `true`, the processor removes the `field` after parsing the URI string.\nIf parsing fails, the processor does not remove the `field`.", + "default": false, + "type": "boolean" + }, + "target_field": { + "description": "Output field for the URI object.", + "default": "url", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "cache_size", - "cache_size_in_bytes", - "cores_per_socket", - "mhz", - "model", - "total_cores", - "total_sockets", - "vendor" ] }, - "nodes.info.NodeInfoMemory": { - "type": "object", - "properties": { - "total": { - "type": "string" + "ingest._types.UserAgentProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.ProcessorBase" }, - "total_in_bytes": { - "type": "number" + { + "type": "object", + "properties": { + "field": { + "description": "The field containing the user agent string.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, + "type": "boolean" + }, + "regex_file": { + "description": "The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the `regexes.yaml` from uap-core it ships with.", + "type": "string" + }, + "target_field": { + "description": "The field that will be filled with the user agent details.", + "default": "user_agent", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "properties": { + "description": "Controls what properties are added to `target_field`.", + "default": [ + "name", + "os", + "device", + "original", + "version" + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.UserAgentProperty" + } + }, + "extract_device_type": { + "description": "Extracts device type from the user agent string on a best-effort basis.", + "default": false, + "x-state": "Beta; Added in 8.9.0", + "type": "boolean" + } + }, + "required": [ + "field" + ] } - }, - "required": [ - "total", - "total_in_bytes" ] }, - "nodes.info.NodeProcessInfo": { - "type": "object", - "properties": { - "id": { - "description": "Process identifier (PID)", - "type": "number" - }, - "mlockall": { - "description": "Indicates if the process address space has been successfully locked in memory", - "type": "boolean" - }, - "refresh_interval_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - } - }, - "required": [ - "id", - "mlockall", - "refresh_interval_in_millis" + "ingest._types.UserAgentProperty": { + "type": "string", + "enum": [ + "name", + "os", + "device", + "original", + "version" ] }, - "nodes.info.NodeInfoSettings": { + "ingest._types.FieldAccessPattern": { + "type": "string", + "enum": [ + "classic", + "flexible" + ] + }, + "ingest._types.Document": { "type": "object", "properties": { - "cluster": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsCluster" - }, - "node": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsNode" - }, - "path": { - "$ref": "#/components/schemas/nodes.info.NodeInfoPath" - }, - "repositories": { - "$ref": "#/components/schemas/nodes.info.NodeInfoRepositories" - }, - "discovery": { - "$ref": "#/components/schemas/nodes.info.NodeInfoDiscover" - }, - "action": { - "$ref": "#/components/schemas/nodes.info.NodeInfoAction" - }, - "client": { - "$ref": "#/components/schemas/nodes.info.NodeInfoClient" - }, - "http": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsHttp" - }, - "bootstrap": { - "$ref": "#/components/schemas/nodes.info.NodeInfoBootstrap" - }, - "transport": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsTransport" - }, - "network": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsNetwork" - }, - "xpack": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpack" - }, - "script": { - "$ref": "#/components/schemas/nodes.info.NodeInfoScript" + "_id": { + "description": "Unique identifier for the document.\nThis ID must be unique within the `_index`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "search": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSearch" + "_index": { + "description": "Name of the index containing the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "ingest": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsIngest" + "_source": { + "description": "JSON body for the document.", + "type": "object" } }, "required": [ - "cluster", - "node", - "http", - "transport" + "_source" ] }, - "nodes.info.NodeInfoSettingsCluster": { + "ingest._types.SimulateDocumentResult": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "routing": { - "$ref": "#/components/schemas/indices._types.IndexRouting" + "doc": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DocumentSimulation" + } + ] }, - "election": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsClusterElection" + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] }, - "initial_master_nodes": { + "processor_results": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ingest._types.PipelineProcessorResult" } - }, - "deprecation_indexing": { - "$ref": "#/components/schemas/nodes.info.DeprecationIndexing" - } - }, - "required": [ - "name", - "election" - ] - }, - "nodes.info.NodeInfoSettingsClusterElection": { - "type": "object", - "properties": { - "strategy": { - "$ref": "#/components/schemas/_types.Name" } - }, - "required": [ - "strategy" - ] + } }, - "nodes.info.DeprecationIndexing": { + "ingest._types.DocumentSimulation": { + "description": "The simulated document, with optional metadata.", "type": "object", "properties": { - "enabled": { - "oneOf": [ + "_id": { + "description": "Unique identifier for the document. This ID must be unique within the `_index`.", + "allOf": [ { - "type": "boolean" - }, + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "description": "Name of the index containing the document.", + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.IndexName" } ] - } - }, - "required": [ - "enabled" - ] - }, - "nodes.info.NodeInfoSettingsNode": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" }, - "attr": { + "_ingest": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Ingest" + } + ] + }, + "_routing": { + "description": "Value used to send the document to a specific primary shard.", + "type": "string" + }, + "_source": { + "description": "JSON body for the document.", "type": "object", "additionalProperties": { "type": "object" } }, - "max_local_storage_nodes": { - "type": "string" + "_version": { + "description": "", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.StringifiedVersionNumber" + } + ] + }, + "_version_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] } }, "required": [ - "name", - "attr" + "_id", + "_index", + "_ingest", + "_source" ] }, - "nodes.info.NodeInfoPath": { + "ingest._types.Ingest": { "type": "object", "properties": { - "logs": { - "type": "string" - }, - "home": { - "type": "string" - }, - "repo": { - "type": "array", - "items": { - "type": "string" - } + "_redact": { + "x-state": "Generally available; Added in 8.16.0", + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.Redact" + } + ] }, - "data": { - "oneOf": [ + "timestamp": { + "allOf": [ { - "type": "string" - }, + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "pipeline": { + "allOf": [ { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types.Name" } ] } - } + }, + "required": [ + "timestamp" + ] }, - "nodes.info.NodeInfoRepositories": { + "ingest._types.Redact": { "type": "object", "properties": { - "url": { - "$ref": "#/components/schemas/nodes.info.NodeInfoRepositoriesUrl" + "_is_redacted": { + "description": "indicates if document has been redacted", + "type": "boolean" } }, "required": [ - "url" + "_is_redacted" ] }, - "nodes.info.NodeInfoRepositoriesUrl": { - "type": "object", - "properties": { - "allowed_urls": { + "_spec_utils.StringifiedVersionNumber": { + "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + { "type": "string" } - }, - "required": [ - "allowed_urls" ] }, - "nodes.info.NodeInfoDiscover": { + "ingest._types.PipelineProcessorResult": { "type": "object", "properties": { - "seed_hosts": { - "type": "array", - "items": { - "type": "string" - } + "doc": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.DocumentSimulation" + } + ] }, - "type": { + "tag": { "type": "string" }, - "seed_providers": { - "type": "array", - "items": { - "type": "string" - } + "processor_type": { + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types.PipelineSimulationStatusOptions" + } + ] + }, + "description": { + "type": "string" + }, + "ignored_error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] } } }, - "nodes.info.NodeInfoAction": { - "type": "object", - "properties": { - "destructive_requires_name": { - "type": "string" - } - }, - "required": [ - "destructive_requires_name" + "ingest._types.PipelineSimulationStatusOptions": { + "type": "string", + "enum": [ + "success", + "error", + "error_ignored", + "skipped", + "dropped" ] }, - "nodes.info.NodeInfoClient": { + "license.get.LicenseInformation": { "type": "object", "properties": { - "type": { + "expiry_date": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "expiry_date_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "issue_date": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "issue_date_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "issued_to": { "type": "string" - } - }, - "required": [ - "type" - ] - }, - "nodes.info.NodeInfoSettingsHttp": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsHttpType" }, - "type.default": { + "issuer": { "type": "string" }, - "compression": { + "max_nodes": { "oneOf": [ { - "type": "boolean" + "type": "number" }, { + "nullable": true, "type": "string" } ] }, - "port": { + "max_resource_units": { "oneOf": [ { "type": "number" }, { + "nullable": true, "type": "string" } ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseStatus" + } + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseType" + } + ] + }, + "uid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" + } + ] + }, + "start_date_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] } }, "required": [ - "type" + "issue_date", + "issue_date_in_millis", + "issued_to", + "issuer", + "max_nodes", + "status", + "type", + "uid", + "start_date_in_millis" ] }, - "nodes.info.NodeInfoSettingsHttpType": { + "license._types.LicenseStatus": { + "type": "string", + "enum": [ + "active", + "valid", + "invalid", + "expired" + ] + }, + "license._types.LicenseType": { + "type": "string", + "enum": [ + "missing", + "trial", + "basic", + "standard", + "dev", + "silver", + "gold", + "platinum", + "enterprise" + ] + }, + "license._types.License": { "type": "object", "properties": { - "default": { + "expiry_date_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "issue_date_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "start_date_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "issued_to": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "max_nodes": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "max_resource_units": { + "type": "number" + }, + "signature": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseType" + } + ] + }, + "uid": { "type": "string" } }, "required": [ - "default" + "expiry_date_in_millis", + "issue_date_in_millis", + "issued_to", + "issuer", + "signature", + "type", + "uid" ] }, - "nodes.info.NodeInfoBootstrap": { + "license.post.Acknowledgement": { "type": "object", "properties": { - "memory_lock": { + "license": { + "type": "array", + "items": { + "type": "string" + } + }, + "message": { "type": "string" } }, "required": [ - "memory_lock" + "license", + "message" ] }, - "nodes.info.NodeInfoSettingsTransport": { + "logstash._types.Pipeline": { "type": "object", "properties": { - "type": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsTransportType" + "description": { + "description": "A description of the pipeline.\nThis description is not used by Elasticsearch or Logstash.", + "type": "string" }, - "type.default": { + "last_modified": { + "description": "The date the pipeline was last updated.\nIt must be in the `yyyy-MM-dd'T'HH:mm:ss.SSSZZ` strict_date_time format.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "pipeline": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/logstash/configuration-file-structure" + }, + "description": "The configuration for the pipeline.", "type": "string" }, - "features": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsTransportFeatures" + "pipeline_metadata": { + "description": "Optional metadata about the pipeline, which can have any contents.\nThis metadata is not generated or used by Elasticsearch or Logstash.", + "allOf": [ + { + "$ref": "#/components/schemas/logstash._types.PipelineMetadata" + } + ] + }, + "pipeline_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/logstash/logstash-settings-file" + }, + "description": "Settings for the pipeline.\nIt supports only flat keys in dot notation.", + "allOf": [ + { + "$ref": "#/components/schemas/logstash._types.PipelineSettings" + } + ] + }, + "username": { + "description": "The user who last updated the pipeline.", + "type": "string" } }, "required": [ - "type" + "description", + "last_modified", + "pipeline", + "pipeline_metadata", + "pipeline_settings", + "username" ] }, - "nodes.info.NodeInfoSettingsTransportType": { + "logstash._types.PipelineMetadata": { "type": "object", "properties": { - "default": { + "type": { + "type": "string" + }, + "version": { "type": "string" } }, "required": [ - "default" + "type", + "version" ] }, - "nodes.info.NodeInfoSettingsTransportFeatures": { + "logstash._types.PipelineSettings": { "type": "object", "properties": { - "x-pack": { + "pipeline.workers": { + "description": "The number of workers that will, in parallel, execute the filter and output stages of the pipeline.", + "type": "number" + }, + "pipeline.batch.size": { + "description": "The maximum number of events an individual worker thread will collect from inputs before attempting to execute its filters and outputs.", + "type": "number" + }, + "pipeline.batch.delay": { + "description": "When creating pipeline event batches, how long in milliseconds to wait for each event before dispatching an undersized batch to pipeline workers.", + "type": "number" + }, + "queue.type": { + "description": "The internal queuing model to use for event buffering.", + "type": "string" + }, + "queue.max_bytes": { + "description": "The total capacity of the queue (`queue.type: persisted`) in number of bytes.", "type": "string" + }, + "queue.checkpoint.writes": { + "description": "The maximum number of written events before forcing a checkpoint when persistent queues are enabled (`queue.type: persisted`).", + "type": "number" } }, "required": [ - "x-pack" + "pipeline.workers", + "pipeline.batch.size", + "pipeline.batch.delay", + "queue.type", + "queue.max_bytes", + "queue.checkpoint.writes" ] }, - "nodes.info.NodeInfoSettingsNetwork": { + "_global.mget.Operation": { "type": "object", "properties": { - "host": { - "oneOf": [ + "_id": { + "description": "The unique document ID.", + "allOf": [ { - "$ref": "#/components/schemas/_types.Host" - }, + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "description": "The index that contains the document.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Host" - } + "$ref": "#/components/schemas/_types.IndexName" } ] - } - } - }, - "nodes.info.NodeInfoXpack": { - "type": "object", - "properties": { - "license": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackLicense" }, - "security": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurity" + "routing": { + "description": "The key for the primary shard the document resides on. Required if routing is used during indexing.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] }, - "notification": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "_source": { + "description": "If `false`, excludes all _source fields.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] }, - "ml": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackMl" + "stored_fields": { + "description": "The stored fields you want to retrieve.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] } }, "required": [ - "security" + "_id" ] }, - "nodes.info.NodeInfoXpackLicense": { - "type": "object", - "properties": { - "self_generated": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackLicenseType" + "_global.mget.ResponseItem": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.get.GetResult" + }, + { + "$ref": "#/components/schemas/_global.mget.MultiGetError" } - }, - "required": [ - "self_generated" ] }, - "nodes.info.NodeInfoXpackLicenseType": { + "_global.mget.MultiGetError": { "type": "object", "properties": { - "type": { - "type": "string" + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + }, + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] } }, "required": [ - "type" + "error", + "_id", + "_index" ] }, - "nodes.info.NodeInfoXpackSecurity": { + "migration.deprecations.Deprecation": { "type": "object", "properties": { - "http": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecuritySsl" + "details": { + "description": "Optional details about the deprecation warning.", + "type": "string" }, - "enabled": { + "level": { + "description": "The level property describes the significance of the issue.", + "allOf": [ + { + "$ref": "#/components/schemas/migration.deprecations.DeprecationLevel" + } + ] + }, + "message": { + "description": "Descriptive information about the deprecation warning.", "type": "string" }, - "transport": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecuritySsl" + "url": { + "description": "A link to the breaking change documentation, where you can find more information about this change.", + "type": "string" }, - "authc": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthc" - } - }, - "required": [ - "enabled" - ] - }, - "nodes.info.NodeInfoXpackSecuritySsl": { - "type": "object", - "properties": { - "ssl": { + "resolve_during_rolling_upgrade": { + "type": "boolean" + }, + "_meta": { "type": "object", "additionalProperties": { - "type": "string" + "type": "object" } } }, "required": [ - "ssl" + "level", + "message", + "url", + "resolve_during_rolling_upgrade" ] }, - "nodes.info.NodeInfoXpackSecurityAuthc": { - "type": "object", - "properties": { - "realms": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcRealms" - }, - "token": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcToken" - } - } + "migration.deprecations.DeprecationLevel": { + "type": "string", + "enum": [ + "none", + "info", + "warning", + "critical" + ] }, - "nodes.info.NodeInfoXpackSecurityAuthcRealms": { + "migration.get_feature_upgrade_status.MigrationFeature": { "type": "object", "properties": { - "file": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcRealmsStatus" - } + "feature_name": { + "type": "string" }, - "native": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcRealmsStatus" - } + "minimum_index_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "pki": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcRealmsStatus" - } - } - } - }, - "nodes.info.NodeInfoXpackSecurityAuthcRealmsStatus": { - "type": "object", - "properties": { - "enabled": { - "type": "string" + "migration_status": { + "allOf": [ + { + "$ref": "#/components/schemas/migration.get_feature_upgrade_status.MigrationStatus" + } + ] }, - "order": { - "type": "string" + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.get_feature_upgrade_status.MigrationFeatureIndexInfo" + } } }, "required": [ - "order" + "feature_name", + "minimum_index_version", + "migration_status", + "indices" ] }, - "nodes.info.NodeInfoXpackSecurityAuthcToken": { - "type": "object", - "properties": { - "enabled": { - "type": "string" - } - }, - "required": [ - "enabled" + "migration.get_feature_upgrade_status.MigrationStatus": { + "type": "string", + "enum": [ + "NO_MIGRATION_NEEDED", + "MIGRATION_NEEDED", + "IN_PROGRESS", + "ERROR" ] }, - "nodes.info.NodeInfoXpackMl": { - "type": "object", - "properties": { - "use_auto_machine_memory_percent": { - "type": "boolean" - } - } - }, - "nodes.info.NodeInfoScript": { + "migration.get_feature_upgrade_status.MigrationFeatureIndexInfo": { "type": "object", "properties": { - "allowed_types": { - "type": "string" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "disable_max_compilations_rate": { - "type": "string" - } - }, - "required": [ - "allowed_types" - ] - }, - "nodes.info.NodeInfoSearch": { - "type": "object", - "properties": { - "remote": { - "$ref": "#/components/schemas/nodes.info.NodeInfoSearchRemote" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "failure_cause": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] } }, "required": [ - "remote" + "index", + "version" ] }, - "nodes.info.NodeInfoSearchRemote": { + "migration.post_feature_upgrade.MigrationFeature": { "type": "object", "properties": { - "connect": { + "feature_name": { "type": "string" } }, "required": [ - "connect" + "feature_name" ] }, - "nodes.info.NodeInfoSettingsIngest": { + "ml._types.AnalysisConfig": { "type": "object", "properties": { - "attachment": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "append": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "csv": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "convert": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "date": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "date_index_name": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "dot_expander": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "enrich": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "fail": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "foreach": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "json": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "user_agent": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "kv": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "geoip": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "grok": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "gsub": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "join": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "lowercase": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "remove": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "rename": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "script": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "set": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "sort": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - }, - "split": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "bucket_span": { + "description": "The size of the interval that the analysis is aggregated into, typically between `5m` and `1h`. This value should be either a whole number of days or equate to a\nwhole number of buckets in one day. If the anomaly detection job uses a datafeed with aggregations, this value must also be divisible by the interval of the date histogram aggregation.", + "default": "5m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "trim": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "categorization_analyzer": { + "description": "If `categorization_field_name` is specified, you can also define the analyzer that is used to interpret the categorization field. This property cannot be used at the same time as `categorization_filters`. The categorization analyzer specifies how the `categorization_field` is interpreted by the categorization process. The `categorization_analyzer` field can be specified either as a string or as an object. If it is a string, it must refer to a built-in analyzer or one added by another plugin.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CategorizationAnalyzer" + } + ] }, - "uppercase": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "categorization_field_name": { + "description": "If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by setting `by_field_name`, `over_field_name`, or `partition_field_name` to the keyword `mlcategory`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "urldecode": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "categorization_filters": { + "description": "If `categorization_field_name` is specified, you can also define optional filters. This property expects an array of regular expressions. The expressions are used to filter out matching sequences from the categorization field values. You can use this functionality to fine tune the categorization by excluding sequences from consideration when categories are defined. For example, you can exclude SQL statements that appear in your log files. This property cannot be used at the same time as `categorization_analyzer`. If you only want to define simple regular expression filters that are applied prior to tokenization, setting this property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering, use the `categorization_analyzer` property instead and include the filters as pattern_replace character filters. The effect is exactly the same.", + "type": "array", + "items": { + "type": "string" + } }, - "bytes": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "detectors": { + "description": "Detector configuration objects specify which data fields a job analyzes. They also specify which analytical functions are used. You can specify multiple detectors for a job. If the detectors array does not contain at least one detector, no analysis can occur and an error is returned.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Detector" + } }, - "dissect": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "influencers": { + "description": "A comma separated list of influencer field names. Typically these can be the by, over, or partition fields that are used in the detector configuration. You might also want to use a field name that is not specifically named in a detector, but is available as part of the input data. When you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } }, - "set_security_user": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "latency": { + "description": "The size of the window in which to expect data that is out of time order. If you specify a non-zero value, it must be greater than or equal to one second. NOTE: Latency is applicable only when you send data by using the post data API.", + "default": "0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "pipeline": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "model_prune_window": { + "description": "Advanced configuration option. Affects the pruning of models that have not been updated for the given time duration. The value must be set to a multiple of the `bucket_span`. If set too low, important information may be removed from the model. For jobs created in 8.1 and later, the default value is the greater of `30d` or 20 times `bucket_span`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "drop": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "multivariate_by_fields": { + "description": "This functionality is reserved for internal use. It is not supported for use in customer environments and is not subject to the support SLA of official GA features. If set to `true`, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold. For example, suppose CPU and memory usage on host A is usually highly correlated with the same metrics on host B. Perhaps this correlation occurs because they are running a load-balanced application. If you enable this property, anomalies will be reported when, for example, CPU usage on host A is high and the value of CPU usage on host B is low. That is to say, you’ll see an anomaly when the CPU of host A is unusual given the CPU of host B. To use the `multivariate_by_fields` property, you must also specify `by_field_name` in your detector.", + "type": "boolean" }, - "circle": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + "per_partition_categorization": { + "description": "Settings related to how categorization interacts with partition fields.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.PerPartitionCategorization" + } + ] }, - "inference": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" - } - } - }, - "nodes.info.NodeInfoIngestInfo": { - "type": "object", - "properties": { - "downloader": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestDownloader" + "summary_count_field_name": { + "description": "If this property is specified, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same `summary_count_field_name` applies to all detectors in the job. NOTE: The `summary_count_field_name` property cannot be used with the `metric` function.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] } }, "required": [ - "downloader" + "detectors" ] }, - "nodes.info.NodeInfoIngestDownloader": { - "type": "object", - "properties": { - "enabled": { + "ml._types.CategorizationAnalyzer": { + "oneOf": [ + { "type": "string" + }, + { + "$ref": "#/components/schemas/ml._types.CategorizationAnalyzerDefinition" } - }, - "required": [ - "enabled" ] }, - "nodes.info.NodeThreadPoolInfo": { + "ml._types.CategorizationAnalyzerDefinition": { "type": "object", "properties": { - "core": { - "type": "number" + "char_filter": { + "description": "One or more character filters. In addition to the built-in character filters, other plugins can provide more character filters. If this property is not specified, no character filters are applied prior to categorization. If you are customizing some other aspect of the analyzer and you need to achieve the equivalent of `categorization_filters` (which are not permitted when some other aspect of the analyzer is customized), add them here as pattern replace character filters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.CharFilter" + } }, - "keep_alive": { - "$ref": "#/components/schemas/_types.Duration" + "filter": { + "description": "One or more token filters. In addition to the built-in token filters, other plugins can provide more token filters. If this property is not specified, no token filters are applied prior to categorization.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.TokenFilter" + } }, - "max": { - "type": "number" + "tokenizer": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/text-analysis/tokenizer-reference" + }, + "description": "The name or definition of the tokenizer to use after character filters are applied. This property is compulsory if `categorization_analyzer` is specified as an object. Machine learning provides a tokenizer called `ml_standard` that tokenizes in a way that has been determined to produce good categorization results on a variety of log file formats for logs in English. If you want to use that tokenizer but change the character or token filters, specify \"tokenizer\": \"ml_standard\" in your `categorization_analyzer`. Additionally, the `ml_classic` tokenizer is available, which tokenizes in the same way as the non-customizable tokenizer in old versions of the product (before 6.2). `ml_classic` was the default categorization tokenizer in versions 6.2 to 7.13, so if you need categorization identical to the default for jobs created in these versions, specify \"tokenizer\": \"ml_classic\" in your `categorization_analyzer`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.Tokenizer" + } + ] + } + } + }, + "ml._types.Detector": { + "type": "object", + "properties": { + "by_field_name": { + "description": "The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "queue_size": { - "type": "number" + "custom_rules": { + "description": "Custom rules enable you to customize the way detectors operate. For example, a rule may dictate conditions under which results should be skipped. Kibana refers to custom rules as job rules.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DetectionRule" + } }, - "size": { + "detector_description": { + "description": "A description of the detector.", + "type": "string" + }, + "detector_index": { + "description": "A unique identifier for the detector. This identifier is based on the order of the detectors in the `analysis_config`, starting at zero. If you specify a value for this property, it is ignored.", "type": "number" }, - "type": { + "exclude_frequent": { + "description": "If set, frequent entities are excluded from influencing the anomaly results. Entities can be considered frequent over time or frequent in a population. If you are working with both over and by fields, you can set `exclude_frequent` to `all` for both fields, or to `by` or `over` for those specific fields.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ExcludeFrequent" + } + ] + }, + "field_name": { + "description": "The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field. The `field_name` cannot contain double quotes or backslashes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "function": { + "description": "The analysis function that is used. For example, `count`, `rare`, `mean`, `min`, `max`, or `sum`.", "type": "string" + }, + "over_field_name": { + "description": "The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "partition_field_name": { + "description": "The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "use_null": { + "description": "Defines whether a new series is used as the null series when there is no value for the by or partition fields.", + "default": false, + "type": "boolean" } - }, - "required": [ - "queue_size", - "type" - ] + } }, - "nodes.info.NodeInfoTransport": { + "ml._types.DetectionRule": { "type": "object", "properties": { - "bound_address": { + "actions": { + "description": "The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined.", + "default": [ + "skip_result" + ], "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ml._types.RuleAction" } }, - "publish_address": { - "type": "string" + "conditions": { + "description": "An array of numeric conditions when the rule applies. A rule must either have a non-empty scope or at least one condition. Multiple conditions are combined together with a logical AND.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.RuleCondition" + } }, - "profiles": { + "scope": { + "description": "A scope of series where the rule applies. A rule must either have a non-empty scope or at least one condition. By default, the scope includes all series. Scoping is allowed for any of the fields that are also specified in `by_field_name`, `over_field_name`, or `partition_field_name`.", "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/ml._types.FilterRef" } } - }, - "required": [ - "bound_address", - "publish_address", - "profiles" + } + }, + "ml._types.RuleAction": { + "type": "string", + "enum": [ + "skip_result", + "skip_model_update" ] }, - "nodes.info.NodeInfoIngest": { + "ml._types.RuleCondition": { "type": "object", "properties": { - "processors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes.info.NodeInfoIngestProcessor" - } + "applies_to": { + "description": "Specifies the result property to which the condition applies. If your detector uses `lat_long`, `metric`, `rare`, or `freq_rare` functions, you can only specify conditions that apply to time.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AppliesTo" + } + ] + }, + "operator": { + "description": "Specifies the condition operator. The available options are greater than, greater than or equals, less than, and less than or equals.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ConditionOperator" + } + ] + }, + "value": { + "description": "The value that is compared against the `applies_to` field using the operator.", + "type": "number" } }, "required": [ - "processors" + "applies_to", + "operator", + "value" ] }, - "nodes.info.NodeInfoIngestProcessor": { + "ml._types.AppliesTo": { + "type": "string", + "enum": [ + "actual", + "typical", + "diff_from_typical", + "time" + ] + }, + "ml._types.ConditionOperator": { + "type": "string", + "enum": [ + "gt", + "gte", + "lt", + "lte" + ] + }, + "ml._types.FilterRef": { "type": "object", "properties": { - "type": { - "type": "string" + "filter_id": { + "description": "The identifier for the filter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "filter_type": { + "description": "If set to `include`, the rule applies for values in the filter. If set to `exclude`, the rule applies for values not in the filter.", + "default": "include", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.FilterType" + } + ] } }, "required": [ - "type" + "filter_id" ] }, - "nodes.info.NodeInfoAggregation": { + "ml._types.FilterType": { + "type": "string", + "enum": [ + "include", + "exclude" + ] + }, + "ml._types.ExcludeFrequent": { + "type": "string", + "enum": [ + "all", + "none", + "by", + "over" + ] + }, + "ml._types.PerPartitionCategorization": { "type": "object", "properties": { - "types": { - "type": "array", - "items": { - "type": "string" - } + "enabled": { + "description": "To enable this setting, you must also set the `partition_field_name` property to the same value in every detector that uses the keyword `mlcategory`. Otherwise, job creation fails.", + "type": "boolean" + }, + "stop_on_warn": { + "description": "This setting can be set to true only if per-partition categorization is enabled. If true, both categorization and subsequent anomaly detection stops for partitions where the categorization status changes to warn. This setting makes it viable to have a job where it is expected that categorization works well for some partitions but not others; you do not pay the cost of bad categorization forever in the partitions where it works badly.", + "type": "boolean" } - }, - "required": [ - "types" - ] - }, - "_types.Password": { - "type": "string" + } }, - "nodes.reload_secure_settings.ResponseBase": { - "allOf": [ - { - "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + "ml._types.DataframeEvaluationContainer": { + "type": "object", + "properties": { + "classification": { + "description": "Classification evaluation evaluates the results of a classification analysis which outputs a prediction that identifies to which of the classes each document belongs.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationClassification" + } + ] }, - { - "type": "object", - "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.NodeReloadResult" - } + "outlier_detection": { + "description": "Outlier detection evaluates the results of an outlier detection analysis which outputs the probability that each document is an outlier.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationOutlierDetection" + } + ] + }, + "regression": { + "description": "Regression evaluation evaluates the results of a regression analysis which outputs a prediction of values.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegression" } - }, - "required": [ - "cluster_name", - "nodes" ] } - ] + }, + "minProperties": 1, + "maxProperties": 1 }, - "nodes._types.NodeReloadResult": { + "ml._types.DataframeEvaluationClassification": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "actual_field": { + "description": "The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "reload_exception": { - "$ref": "#/components/schemas/_types.ErrorCause" + "predicted_field": { + "description": "The field in the index which contains the predicted value, in other words the results of the classification analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "top_classes_field": { + "description": "The field of the index which is an array of documents of the form { \"class_name\": XXX, \"class_probability\": YYY }. This field must be defined as nested in the mappings.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "metrics": { + "description": "Specifies the metrics that are used for the evaluation.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationClassificationMetrics" + } + ] } }, "required": [ - "name" + "actual_field" ] }, - "nodes.stats.ResponseBase": { + "ml._types.DataframeEvaluationClassificationMetrics": { "allOf": [ { - "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + "$ref": "#/components/schemas/ml._types.DataframeEvaluationMetrics" }, { "type": "object", "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" + "accuracy": { + "description": "Accuracy of predictions (per-class and overall).", + "type": "object", + "additionalProperties": { + "type": "object" + } }, - "nodes": { + "multiclass_confusion_matrix": { + "description": "Multiclass confusion matrix.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.Stats" + "type": "object" } } - }, - "required": [ - "nodes" - ] + } } ] }, - "nodes._types.Stats": { + "ml._types.DataframeEvaluationMetrics": { "type": "object", "properties": { - "adaptive_selection": { - "description": "Statistics about adaptive replica selection.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.AdaptiveSelection" - } - }, - "breakers": { - "description": "Statistics about the field data circuit breaker.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.Breaker" - } - }, - "fs": { - "$ref": "#/components/schemas/nodes._types.FileSystem" - }, - "host": { - "$ref": "#/components/schemas/_types.Host" - }, - "http": { - "$ref": "#/components/schemas/nodes._types.Http" - }, - "ingest": { - "$ref": "#/components/schemas/nodes._types.Ingest" - }, - "ip": { - "description": "IP address and port for the node.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Ip" - }, + "auc_roc": { + "description": "The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve. It is calculated for a specific class (provided as \"class_name\") treated as positive.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Ip" - } + "$ref": "#/components/schemas/ml._types.DataframeEvaluationClassificationMetricsAucRoc" } ] }, - "jvm": { - "$ref": "#/components/schemas/nodes._types.Jvm" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "os": { - "$ref": "#/components/schemas/nodes._types.OperatingSystem" - }, - "process": { - "$ref": "#/components/schemas/nodes._types.Process" - }, - "roles": { - "$ref": "#/components/schemas/_types.NodeRoles" - }, - "script": { - "$ref": "#/components/schemas/nodes._types.Scripting" - }, - "script_cache": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/nodes._types.ScriptCache" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.ScriptCache" - } - } - ] - } - }, - "thread_pool": { - "description": "Statistics about each thread pool, including current size, queue and rejected tasks.", + "precision": { + "description": "Precision of predictions (per-class and average).", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.ThreadCount" + "type": "object" } }, - "timestamp": { - "type": "number" - }, - "transport": { - "$ref": "#/components/schemas/nodes._types.Transport" - }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" - }, - "attributes": { - "description": "Contains a list of attributes for the node.", + "recall": { + "description": "Recall of predictions (per-class and average).", "type": "object", "additionalProperties": { - "type": "string" + "type": "object" } - }, - "discovery": { - "$ref": "#/components/schemas/nodes._types.Discovery" - }, - "indexing_pressure": { - "$ref": "#/components/schemas/nodes._types.IndexingPressure" - }, - "indices": { - "$ref": "#/components/schemas/indices.stats.ShardStats" } } }, - "nodes._types.AdaptiveSelection": { + "ml._types.DataframeEvaluationClassificationMetricsAucRoc": { "type": "object", "properties": { - "avg_queue_size": { - "description": "The exponentially weighted moving average queue size of search requests on the keyed node.", - "type": "number" - }, - "avg_response_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "avg_response_time_ns": { - "description": "The exponentially weighted moving average response time, in nanoseconds, of search requests on the keyed node.", - "type": "number" - }, - "avg_service_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "avg_service_time_ns": { - "description": "The exponentially weighted moving average service time, in nanoseconds, of search requests on the keyed node.", - "type": "number" - }, - "outgoing_searches": { - "description": "The number of outstanding search requests to the keyed node from the node these stats are for.", - "type": "number" + "class_name": { + "description": "Name of the only class that is treated as positive during AUC ROC calculation. Other classes are treated as negative (\"one-vs-all\" strategy). All the evaluated documents must have class_name in the list of their top classes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "rank": { - "description": "The rank of this node; used for shard selection when routing search requests.", - "type": "string" + "include_curve": { + "description": "Whether or not the curve should be returned in addition to the score. Default value is false.", + "type": "boolean" } } }, - "nodes._types.Breaker": { + "ml._types.DataframeEvaluationOutlierDetection": { "type": "object", "properties": { - "estimated_size": { - "description": "Estimated memory used for the operation.", - "type": "string" - }, - "estimated_size_in_bytes": { - "description": "Estimated memory used, in bytes, for the operation.", - "type": "number" - }, - "limit_size": { - "description": "Memory limit for the circuit breaker.", - "type": "string" - }, - "limit_size_in_bytes": { - "description": "Memory limit, in bytes, for the circuit breaker.", - "type": "number" + "actual_field": { + "description": "The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "overhead": { - "description": "A constant that all estimates for the circuit breaker are multiplied with to calculate a final estimate.", - "type": "number" + "predicted_probability_field": { + "description": "The field of the index that defines the probability of whether the item belongs to the class in question or not. It’s the field that contains the results of the analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "tripped": { - "description": "Total number of times the circuit breaker has been triggered and prevented an out of memory error.", - "type": "number" + "metrics": { + "description": "Specifies the metrics that are used for the evaluation.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationOutlierDetectionMetrics" + } + ] } - } + }, + "required": [ + "actual_field", + "predicted_probability_field" + ] }, - "nodes._types.FileSystem": { - "type": "object", - "properties": { - "data": { - "description": "List of all file stores.", - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.DataPathStats" - } - }, - "timestamp": { - "description": "Last time the file stores statistics were refreshed.\nRecorded in milliseconds since the Unix Epoch.", - "type": "number" - }, - "total": { - "$ref": "#/components/schemas/nodes._types.FileSystemTotal" + "ml._types.DataframeEvaluationOutlierDetectionMetrics": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationMetrics" }, - "io_stats": { - "$ref": "#/components/schemas/nodes._types.IoStats" + { + "type": "object", + "properties": { + "confusion_matrix": { + "description": "Accuracy of predictions (per-class and overall).", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } } - } + ] }, - "nodes._types.DataPathStats": { + "ml._types.DataframeEvaluationRegression": { "type": "object", "properties": { - "available": { - "description": "Total amount of disk space available to this Java virtual machine on this file store.", - "type": "string" - }, - "available_in_bytes": { - "description": "Total number of bytes available to this Java virtual machine on this file store.", - "type": "number" - }, - "disk_queue": { - "type": "string" - }, - "disk_reads": { - "type": "number" - }, - "disk_read_size": { - "type": "string" - }, - "disk_read_size_in_bytes": { - "type": "number" - }, - "disk_writes": { - "type": "number" - }, - "disk_write_size": { - "type": "string" - }, - "disk_write_size_in_bytes": { - "type": "number" - }, - "free": { - "description": "Total amount of unallocated disk space in the file store.", - "type": "string" - }, - "free_in_bytes": { - "description": "Total number of unallocated bytes in the file store.", - "type": "number" - }, - "mount": { - "description": "Mount point of the file store (for example: `/dev/sda2`).", - "type": "string" - }, - "path": { - "description": "Path to the file store.", - "type": "string" - }, - "total": { - "description": "Total size of the file store.", - "type": "string" + "actual_field": { + "description": "The field of the index which contains the ground truth. The data type of this field must be numerical.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "total_in_bytes": { - "description": "Total size of the file store in bytes.", - "type": "number" + "predicted_field": { + "description": "The field in the index that contains the predicted value, in other words the results of the regression analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "type": { - "description": "Type of the file store (ex: ext4).", - "type": "string" + "metrics": { + "description": "Specifies the metrics that are used for the evaluation. For more information on mse, msle, and huber, consult the Jupyter notebook on regression loss functions.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegressionMetrics" + } + ] } - } + }, + "required": [ + "actual_field", + "predicted_field" + ] }, - "nodes._types.FileSystemTotal": { + "ml._types.DataframeEvaluationRegressionMetrics": { "type": "object", "properties": { - "available": { - "description": "Total disk space available to this Java virtual machine on all file stores.\nDepending on OS or process level restrictions, this might appear less than `free`.\nThis is the actual amount of free disk space the Elasticsearch node can utilise.", - "type": "string" - }, - "available_in_bytes": { - "description": "Total number of bytes available to this Java virtual machine on all file stores.\nDepending on OS or process level restrictions, this might appear less than `free_in_bytes`.\nThis is the actual amount of free disk space the Elasticsearch node can utilise.", - "type": "number" - }, - "free": { - "description": "Total unallocated disk space in all file stores.", - "type": "string" - }, - "free_in_bytes": { - "description": "Total number of unallocated bytes in all file stores.", - "type": "number" + "mse": { + "description": "Average squared difference between the predicted values and the actual (ground truth) value. For more information, read this wiki article.", + "type": "object", + "additionalProperties": { + "type": "object" + } }, - "total": { - "description": "Total size of all file stores.", - "type": "string" + "msle": { + "description": "Average squared difference between the logarithm of the predicted values and the logarithm of the actual (ground truth) value.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegressionMetricsMsle" + } + ] }, - "total_in_bytes": { - "description": "Total size of all file stores in bytes.", - "type": "number" - } - } - }, - "nodes._types.IoStats": { - "type": "object", - "properties": { - "devices": { - "description": "Array of disk metrics for each device that is backing an Elasticsearch data path.\nThese disk metrics are probed periodically and averages between the last probe and the current probe are computed.", - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.IoStatDevice" - } + "huber": { + "description": "Pseudo Huber loss function.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegressionMetricsHuber" + } + ] }, - "total": { - "$ref": "#/components/schemas/nodes._types.IoStatDevice" + "r_squared": { + "description": "Proportion of the variance in the dependent variable that is predictable from the independent variables.", + "type": "object", + "additionalProperties": { + "type": "object" + } } } }, - "nodes._types.IoStatDevice": { + "ml._types.DataframeEvaluationRegressionMetricsMsle": { "type": "object", "properties": { - "device_name": { - "description": "The Linux device name.", - "type": "string" - }, - "operations": { - "description": "The total number of read and write operations for the device completed since starting Elasticsearch.", - "type": "number" - }, - "read_kilobytes": { - "description": "The total number of kilobytes read for the device since starting Elasticsearch.", - "type": "number" - }, - "read_operations": { - "description": "The total number of read operations for the device completed since starting Elasticsearch.", - "type": "number" - }, - "write_kilobytes": { - "description": "The total number of kilobytes written for the device since starting Elasticsearch.", - "type": "number" - }, - "write_operations": { - "description": "The total number of write operations for the device completed since starting Elasticsearch.", + "offset": { + "description": "Defines the transition point at which you switch from minimizing quadratic error to minimizing quadratic log error. Defaults to 1.", "type": "number" } } }, - "nodes._types.Jvm": { + "ml._types.DataframeEvaluationRegressionMetricsHuber": { "type": "object", "properties": { - "buffer_pools": { - "description": "Contains statistics about JVM buffer pools for the node.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.NodeBufferPool" - } - }, - "classes": { - "$ref": "#/components/schemas/nodes._types.JvmClasses" - }, - "gc": { - "$ref": "#/components/schemas/nodes._types.GarbageCollector" - }, - "mem": { - "$ref": "#/components/schemas/nodes._types.JvmMemoryStats" - }, - "threads": { - "$ref": "#/components/schemas/nodes._types.JvmThreads" - }, - "timestamp": { - "description": "Last time JVM statistics were refreshed.", - "type": "number" - }, - "uptime": { - "description": "Human-readable JVM uptime.\nOnly returned if the `human` query parameter is `true`.", - "type": "string" - }, - "uptime_in_millis": { - "description": "JVM uptime in milliseconds.", + "delta": { + "description": "Approximates 1/2 (prediction - actual)2 for values much less than delta and approximates a straight line with slope delta for values much larger than delta. Defaults to 1. Delta needs to be greater than 0.", "type": "number" } } }, - "nodes._types.NodeBufferPool": { + "ml.evaluate_data_frame.DataframeClassificationSummary": { "type": "object", "properties": { - "count": { - "description": "Number of buffer pools.", - "type": "number" + "auc_roc": { + "description": "The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve.\nIt is calculated for a specific class (provided as \"class_name\") treated as positive.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationSummaryAucRoc" + } + ] }, - "total_capacity": { - "description": "Total capacity of buffer pools.", - "type": "string" + "accuracy": { + "description": "Accuracy of predictions (per-class and overall).", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryAccuracy" + } + ] }, - "total_capacity_in_bytes": { - "description": "Total capacity of buffer pools in bytes.", - "type": "number" + "multiclass_confusion_matrix": { + "description": "Multiclass confusion matrix.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryMulticlassConfusionMatrix" + } + ] }, - "used": { - "description": "Size of buffer pools.", - "type": "string" + "precision": { + "description": "Precision of predictions (per-class and average).", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryPrecision" + } + ] }, - "used_in_bytes": { - "description": "Size of buffer pools in bytes.", - "type": "number" + "recall": { + "description": "Recall of predictions (per-class and average).", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryRecall" + } + ] } } }, - "nodes._types.JvmClasses": { + "ml.evaluate_data_frame.DataframeEvaluationSummaryAucRoc": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + }, + { + "type": "object", + "properties": { + "curve": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationSummaryAucRocCurveItem" + } + } + } + } + ] + }, + "ml.evaluate_data_frame.DataframeEvaluationSummaryAucRocCurveItem": { "type": "object", "properties": { - "current_loaded_count": { - "description": "Number of classes currently loaded by JVM.", + "tpr": { "type": "number" }, - "total_loaded_count": { - "description": "Total number of classes loaded since the JVM started.", + "fpr": { "type": "number" }, - "total_unloaded_count": { - "description": "Total number of classes unloaded since the JVM started.", + "threshold": { "type": "number" } - } + }, + "required": [ + "tpr", + "fpr", + "threshold" + ] }, - "nodes._types.GarbageCollector": { + "ml.evaluate_data_frame.DataframeEvaluationValue": { "type": "object", "properties": { - "collectors": { - "description": "Contains statistics about JVM garbage collectors for the node.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.GarbageCollectorTotal" - } + "value": { + "type": "number" } - } + }, + "required": [ + "value" + ] }, - "nodes._types.GarbageCollectorTotal": { + "ml.evaluate_data_frame.DataframeClassificationSummaryAccuracy": { "type": "object", "properties": { - "collection_count": { - "description": "Total number of JVM garbage collectors that collect objects.", - "type": "number" - }, - "collection_time": { - "description": "Total time spent by JVM collecting objects.", - "type": "string" + "classes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationClass" + } }, - "collection_time_in_millis": { - "description": "Total time, in milliseconds, spent by JVM collecting objects.", + "overall_accuracy": { "type": "number" } - } + }, + "required": [ + "classes", + "overall_accuracy" + ] }, - "nodes._types.JvmMemoryStats": { + "ml.evaluate_data_frame.DataframeEvaluationClass": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + }, + { + "type": "object", + "properties": { + "class_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + } + }, + "required": [ + "class_name" + ] + } + ] + }, + "ml.evaluate_data_frame.DataframeClassificationSummaryMulticlassConfusionMatrix": { "type": "object", "properties": { - "heap_used_in_bytes": { - "description": "Memory, in bytes, currently in use by the heap.", - "type": "number" - }, - "heap_used_percent": { - "description": "Percentage of memory currently in use by the heap.", - "type": "number" - }, - "heap_committed_in_bytes": { - "description": "Amount of memory, in bytes, available for use by the heap.", - "type": "number" - }, - "heap_max_in_bytes": { - "description": "Maximum amount of memory, in bytes, available for use by the heap.", - "type": "number" - }, - "non_heap_used_in_bytes": { - "description": "Non-heap memory used, in bytes.", - "type": "number" + "confusion_matrix": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.evaluate_data_frame.ConfusionMatrixItem" + } }, - "non_heap_committed_in_bytes": { - "description": "Amount of non-heap memory available, in bytes.", + "other_actual_class_count": { "type": "number" - }, - "pools": { - "description": "Contains statistics about heap memory usage for the node.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.Pool" - } } - } + }, + "required": [ + "confusion_matrix", + "other_actual_class_count" + ] }, - "nodes._types.Pool": { + "ml.evaluate_data_frame.ConfusionMatrixItem": { "type": "object", "properties": { - "used_in_bytes": { - "description": "Memory, in bytes, used by the heap.", - "type": "number" + "actual_class": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "max_in_bytes": { - "description": "Maximum amount of memory, in bytes, available for use by the heap.", + "actual_class_doc_count": { "type": "number" }, - "peak_used_in_bytes": { - "description": "Largest amount of memory, in bytes, historically used by the heap.", - "type": "number" + "predicted_classes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.evaluate_data_frame.ConfusionMatrixPrediction" + } }, - "peak_max_in_bytes": { - "description": "Largest amount of memory, in bytes, historically used by the heap.", + "other_predicted_class_doc_count": { "type": "number" } - } + }, + "required": [ + "actual_class", + "actual_class_doc_count", + "predicted_classes", + "other_predicted_class_doc_count" + ] }, - "nodes._types.JvmThreads": { + "ml.evaluate_data_frame.ConfusionMatrixPrediction": { "type": "object", "properties": { + "predicted_class": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, "count": { - "description": "Number of active threads in use by JVM.", "type": "number" + } + }, + "required": [ + "predicted_class", + "count" + ] + }, + "ml.evaluate_data_frame.DataframeClassificationSummaryPrecision": { + "type": "object", + "properties": { + "classes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationClass" + } }, - "peak_count": { - "description": "Highest number of threads used by JVM.", + "avg_precision": { "type": "number" } - } + }, + "required": [ + "classes", + "avg_precision" + ] }, - "nodes._types.OperatingSystem": { + "ml.evaluate_data_frame.DataframeClassificationSummaryRecall": { "type": "object", "properties": { - "cpu": { - "$ref": "#/components/schemas/nodes._types.Cpu" - }, - "mem": { - "$ref": "#/components/schemas/nodes._types.ExtendedMemoryStats" - }, - "swap": { - "$ref": "#/components/schemas/nodes._types.MemoryStats" - }, - "cgroup": { - "$ref": "#/components/schemas/nodes._types.Cgroup" + "classes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationClass" + } }, - "timestamp": { + "avg_recall": { "type": "number" } - } + }, + "required": [ + "classes", + "avg_recall" + ] }, - "nodes._types.Cpu": { + "ml.evaluate_data_frame.DataframeOutlierDetectionSummary": { "type": "object", "properties": { - "percent": { - "type": "number" - }, - "sys": { - "$ref": "#/components/schemas/_types.Duration" - }, - "sys_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "total": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "user": { - "$ref": "#/components/schemas/_types.Duration" + "auc_roc": { + "description": "The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve.", + "default": "{\"include_curve\": false}", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationSummaryAucRoc" + } + ] }, - "user_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "precision": { + "description": "Set the different thresholds of the outlier score at where the metric is calculated.", + "type": "object", + "additionalProperties": { + "type": "number" + } }, - "load_average": { + "recall": { + "description": "Set the different thresholds of the outlier score at where the metric is calculated.", "type": "object", "additionalProperties": { "type": "number" } - } - } - }, - "nodes._types.ExtendedMemoryStats": { - "allOf": [ - { - "$ref": "#/components/schemas/nodes._types.MemoryStats" }, - { + "confusion_matrix": { + "description": "Set the different thresholds of the outlier score at where the metrics (`tp` - true positive, `fp` - false positive, `tn` - true negative, `fn` - false negative) are calculated.", "type": "object", - "properties": { - "free_percent": { - "description": "Percentage of free memory.", - "type": "number" - }, - "used_percent": { - "description": "Percentage of used memory.", - "type": "number" - } + "additionalProperties": { + "$ref": "#/components/schemas/ml.evaluate_data_frame.ConfusionMatrixThreshold" } } - ] + } }, - "nodes._types.MemoryStats": { + "ml.evaluate_data_frame.ConfusionMatrixThreshold": { "type": "object", "properties": { - "adjusted_total_in_bytes": { - "description": "If the amount of physical memory has been overridden using the `es`.`total_memory_bytes` system property then this reports the overridden value in bytes.\nOtherwise it reports the same value as `total_in_bytes`.", + "tp": { + "description": "True Positive", "type": "number" }, - "resident": { - "type": "string" - }, - "resident_in_bytes": { + "fp": { + "description": "False Positive", "type": "number" }, - "share": { - "type": "string" - }, - "share_in_bytes": { + "tn": { + "description": "True Negative", "type": "number" }, - "total_virtual": { - "type": "string" - }, - "total_virtual_in_bytes": { + "fn": { + "description": "False Negative", "type": "number" + } + }, + "required": [ + "tp", + "fp", + "tn", + "fn" + ] + }, + "ml.evaluate_data_frame.DataframeRegressionSummary": { + "type": "object", + "properties": { + "huber": { + "description": "Pseudo Huber loss function.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + } + ] }, - "total_in_bytes": { - "description": "Total amount of physical memory in bytes.", - "type": "number" + "mse": { + "description": "Average squared difference between the predicted values and the actual (`ground truth`) value.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + } + ] }, - "free_in_bytes": { - "description": "Amount of free physical memory in bytes.", - "type": "number" + "msle": { + "description": "Average squared difference between the logarithm of the predicted values and the logarithm of the actual (`ground truth`) value.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + } + ] }, - "used_in_bytes": { - "description": "Amount of used physical memory in bytes.", - "type": "number" + "r_squared": { + "description": "Proportion of the variance in the dependent variable that is predictable from the independent variables.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue" + } + ] } } }, - "nodes._types.Cgroup": { + "ml._types.DataframeAnalyticsSource": { "type": "object", "properties": { - "cpuacct": { - "$ref": "#/components/schemas/nodes._types.CpuAcct" + "index": { + "description": "Index or indices on which to perform the analysis. It can be a single index or index pattern as well as an array of indices or patterns. NOTE: If your source indices contain documents with the same IDs, only the document that is indexed last appears in the destination index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "cpu": { - "$ref": "#/components/schemas/nodes._types.CgroupCpu" + "query": { + "description": "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. By default, this property has the following value: {\"match_all\": {}}.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "memory": { - "$ref": "#/components/schemas/nodes._types.CgroupMemory" + "runtime_mappings": { + "description": "Definitions of runtime fields that will become part of the mapping of the destination index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "_source": { + "description": "Specify `includes` and/or `excludes patterns to select which fields will be present in the destination. Fields that are excluded cannot be included in the analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] } - } + }, + "required": [ + "index" + ] }, - "nodes._types.CpuAcct": { + "ml._types.DataframeAnalysisAnalyzedFields": { "type": "object", "properties": { - "control_group": { - "description": "The `cpuacct` control group to which the Elasticsearch process belongs.", - "type": "string" + "includes": { + "description": "An array of strings that defines the fields that will be excluded from the analysis. You do not need to add fields with unsupported data types to excludes, these fields are excluded from the analysis automatically.", + "type": "array", + "items": { + "type": "string" + } }, - "usage_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "excludes": { + "description": "An array of strings that defines the fields that will be included in the analysis.", + "type": "array", + "items": { + "type": "string" + } } } }, - "nodes._types.CgroupCpu": { + "ml._types.DataframeAnalyticsDestination": { "type": "object", "properties": { - "control_group": { - "description": "The `cpu` control group to which the Elasticsearch process belongs.", - "type": "string" - }, - "cfs_period_micros": { - "description": "The period of time, in microseconds, for how regularly all tasks in the same cgroup as the Elasticsearch process should have their access to CPU resources reallocated.", - "type": "number" - }, - "cfs_quota_micros": { - "description": "The total amount of time, in microseconds, for which all tasks in the same cgroup as the Elasticsearch process can run during one period `cfs_period_micros`.", - "type": "number" + "index": { + "description": "Defines the destination index to store the results of the data frame analytics job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "stat": { - "$ref": "#/components/schemas/nodes._types.CgroupCpuStat" + "results_field": { + "description": "Defines the name of the field in which to store the results of the analysis. Defaults to `ml`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] } - } + }, + "required": [ + "index" + ] }, - "nodes._types.CgroupCpuStat": { + "ml._types.DataframeAnalysisContainer": { "type": "object", "properties": { - "number_of_elapsed_periods": { - "description": "The number of reporting periods (as specified by `cfs_period_micros`) that have elapsed.", - "type": "number" + "classification": { + "description": "The configuration information necessary to perform classification.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisClassification" + } + ] }, - "number_of_times_throttled": { - "description": "The number of times all tasks in the same cgroup as the Elasticsearch process have been throttled.", - "type": "number" + "outlier_detection": { + "description": "The configuration information necessary to perform outlier detection. NOTE: Advanced parameters are for fine-tuning classification analysis. They are set automatically by hyperparameter optimization to give the minimum validation error. It is highly recommended to use the default values unless you fully understand the function of these parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisOutlierDetection" + } + ] }, - "time_throttled_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "regression": { + "description": "The configuration information necessary to perform regression. NOTE: Advanced parameters are for fine-tuning regression analysis. They are set automatically by hyperparameter optimization to give the minimum validation error. It is highly recommended to use the default values unless you fully understand the function of these parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisRegression" + } + ] } - } + }, + "minProperties": 1, + "maxProperties": 1 }, - "nodes._types.CgroupMemory": { - "type": "object", - "properties": { - "control_group": { - "description": "The `memory` control group to which the Elasticsearch process belongs.", - "type": "string" - }, - "limit_in_bytes": { - "description": "The maximum amount of user memory (including file cache) allowed for all tasks in the same cgroup as the Elasticsearch process.\nThis value can be too big to store in a `long`, so is returned as a string so that the value returned can exactly match what the underlying operating system interface returns.\nAny value that is too large to parse into a `long` almost certainly means no limit has been set for the cgroup.", - "type": "string" + "ml._types.DataframeAnalysisClassification": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysis" }, - "usage_in_bytes": { - "description": "The total current memory usage by processes in the cgroup, in bytes, by all tasks in the same cgroup as the Elasticsearch process.\nThis value is stored as a string for consistency with `limit_in_bytes`.", - "type": "string" + { + "type": "object", + "properties": { + "class_assignment_objective": { + "type": "string" + }, + "num_top_classes": { + "description": "Defines the number of categories for which the predicted probabilities are reported. It must be non-negative or -1. If it is -1 or greater than the total number of categories, probabilities are reported for all categories; if you have a large number of categories, there could be a significant effect on the size of your destination index. NOTE: To use the AUC ROC evaluation method, `num_top_classes` must be set to -1 or a value greater than or equal to the total number of categories.", + "default": 2.0, + "type": "number" + } + } } - } + ] }, - "nodes._types.Process": { + "ml._types.DataframeAnalysis": { "type": "object", "properties": { - "cpu": { - "$ref": "#/components/schemas/nodes._types.Cpu" + "alpha": { + "description": "Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero.", + "type": "number" }, - "mem": { - "$ref": "#/components/schemas/nodes._types.MemoryStats" + "dependent_variable": { + "description": "Defines which field of the document is to be predicted. It must match one of the fields in the index being used to train. If this field is missing from a document, then that document will not be used for training, but a prediction with the trained model will be generated for it. It is also known as continuous target variable.\nFor classification analysis, the data type of the field must be numeric (`integer`, `short`, `long`, `byte`), categorical (`ip` or `keyword`), or `boolean`. There must be no more than 30 different values in this field.\nFor regression analysis, the data type of the field must be numeric.", + "type": "string" }, - "open_file_descriptors": { - "description": "Number of opened file descriptors associated with the current or `-1` if not supported.", + "downsample_factor": { + "description": "Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1.", "type": "number" }, - "max_file_descriptors": { - "description": "Maximum number of file descriptors allowed on the system, or `-1` if not supported.", - "type": "number" + "early_stopping_enabled": { + "description": "Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable.", + "default": true, + "type": "boolean" }, - "timestamp": { - "description": "Last time the statistics were refreshed.\nRecorded in milliseconds since the Unix Epoch.", - "type": "number" - } - } - }, - "nodes._types.ScriptCache": { - "type": "object", - "properties": { - "cache_evictions": { - "description": "Total number of times the script cache has evicted old data.", + "eta": { + "description": "Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between 0.001 and 1.", "type": "number" }, - "compilation_limit_triggered": { - "description": "Total number of times the script compilation circuit breaker has limited inline script compilations.", + "eta_growth_rate_per_tree": { + "description": "Advanced configuration option. Specifies the rate at which `eta` increases for each new tree that is added to the forest. For example, a rate of 1.05 increases `eta` by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between 0.5 and 2.", "type": "number" }, - "compilations": { - "description": "Total number of inline script compilations performed by the node.", + "feature_bag_fraction": { + "description": "Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization.", "type": "number" }, - "context": { - "type": "string" - } - } - }, - "nodes._types.Transport": { - "type": "object", - "properties": { - "inbound_handling_time_histogram": { - "description": "The distribution of the time spent handling each inbound message on a transport thread, represented as a histogram.", - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.TransportHistogram" - } - }, - "outbound_handling_time_histogram": { - "description": "The distribution of the time spent sending each outbound transport message on a transport thread, represented as a histogram.", + "feature_processors": { + "description": "Advanced configuration option. A collection of feature preprocessors that modify one or more included fields. The analysis uses the resulting one or more features instead of the original document field. However, these features are ephemeral; they are not stored in the destination index. Multiple `feature_processors` entries can refer to the same document fields. Automatic categorical feature encoding still occurs for the fields that are unprocessed by a custom processor or that have categorical values. Use this property only if you want to override the automatic feature encoding of the specified fields.", "type": "array", "items": { - "$ref": "#/components/schemas/nodes._types.TransportHistogram" + "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessor" } }, - "rx_count": { - "description": "Total number of RX (receive) packets received by the node during internal cluster communication.", + "gamma": { + "description": "Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value.", "type": "number" }, - "rx_size": { - "description": "Size of RX packets received by the node during internal cluster communication.", - "type": "string" + "lambda": { + "description": "Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value.", + "type": "number" }, - "rx_size_in_bytes": { - "description": "Size, in bytes, of RX packets received by the node during internal cluster communication.", + "max_optimization_rounds_per_hyperparameter": { + "description": "Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization.", "type": "number" }, - "server_open": { - "description": "Current number of inbound TCP connections used for internal communication between nodes.", + "max_trees": { + "description": "Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization.", "type": "number" }, - "tx_count": { - "description": "Total number of TX (transmit) packets sent by the node during internal cluster communication.", + "num_top_feature_importance_values": { + "description": "Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs.", + "default": 0.0, "type": "number" }, - "tx_size": { - "description": "Size of TX packets sent by the node during internal cluster communication.", - "type": "string" + "prediction_field_name": { + "description": "Defines the name of the prediction field in the results. Defaults to `_prediction`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "tx_size_in_bytes": { - "description": "Size, in bytes, of TX packets sent by the node during internal cluster communication.", + "randomize_seed": { + "description": "Defines the seed for the random generator that is used to pick training data. By default, it is randomly generated. Set it to a specific value to use the same training data each time you start a job (assuming other related parameters such as `source` and `analyzed_fields` are the same).", "type": "number" }, - "total_outbound_connections": { - "description": "The cumulative number of outbound transport connections that this node has opened since it started.\nEach transport connection may comprise multiple TCP connections but is only counted once in this statistic.\nTransport connections are typically long-lived so this statistic should remain constant in a stable cluster.", + "soft_tree_depth_limit": { + "description": "Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with the `soft_tree_depth_tolerance` to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.", + "type": "number" + }, + "soft_tree_depth_tolerance": { + "description": "Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceeds `soft_tree_depth_limit`. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01.", "type": "number" + }, + "training_percent": { + "description": "Defines what percentage of the eligible documents that will be used for training. Documents that are ignored by the analysis (for example those that contain arrays with more than one value) won’t be included in the calculation for used percentage.", + "default": 100.0, + "allOf": [ + { + "$ref": "#/components/schemas/_types.Percentage" + } + ] } - } + }, + "required": [ + "dependent_variable" + ] }, - "nodes._types.TransportHistogram": { + "ml._types.DataframeAnalysisFeatureProcessor": { "type": "object", "properties": { - "count": { - "description": "The number of times a transport thread took a period of time within the bounds of this bucket to handle an inbound message.", - "type": "number" + "frequency_encoding": { + "description": "The configuration information necessary to perform frequency encoding.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorFrequencyEncoding" + } + ] }, - "lt_millis": { - "description": "The exclusive upper bound of the bucket in milliseconds.\nMay be omitted on the last bucket if this bucket has no upper bound.", - "type": "number" + "multi_encoding": { + "description": "The configuration information necessary to perform multi encoding. It allows multiple processors to be changed together. This way the output of a processor can then be passed to another as an input.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorMultiEncoding" + } + ] }, - "ge_millis": { - "description": "The inclusive lower bound of the bucket in milliseconds. May be omitted on the first bucket if this bucket has no lower bound.", - "type": "number" + "n_gram_encoding": { + "description": "The configuration information necessary to perform n-gram encoding. Features created by this encoder have the following name format: .. For example, if the feature_prefix is f, the feature name for the second unigram in a string is f.11.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorNGramEncoding" + } + ] + }, + "one_hot_encoding": { + "description": "The configuration information necessary to perform one hot encoding.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorOneHotEncoding" + } + ] + }, + "target_mean_encoding": { + "description": "The configuration information necessary to perform target mean encoding.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorTargetMeanEncoding" + } + ] } - } + }, + "minProperties": 1, + "maxProperties": 1 }, - "nodes._types.Discovery": { + "ml._types.DataframeAnalysisFeatureProcessorFrequencyEncoding": { "type": "object", "properties": { - "cluster_state_queue": { - "$ref": "#/components/schemas/nodes._types.ClusterStateQueue" + "feature_name": { + "description": "The resulting feature name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "published_cluster_states": { - "$ref": "#/components/schemas/nodes._types.PublishedClusterStates" + "field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "cluster_state_update": { - "description": "Contains low-level statistics about how long various activities took during cluster state updates while the node was the elected master.\nOmitted if the node is not master-eligible.\nEvery field whose name ends in `_time` within this object is also represented as a raw number of milliseconds in a field whose name ends in `_time_millis`.\nThe human-readable fields with a `_time` suffix are only returned if requested with the `?human=true` query parameter.", + "frequency_map": { + "description": "The resulting frequency map for the field value. If the field value is missing from the frequency_map, the resulting value is 0.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/nodes._types.ClusterStateUpdate" + "type": "number" } - }, - "serialized_cluster_states": { - "$ref": "#/components/schemas/nodes._types.SerializedClusterState" - }, - "cluster_applier_stats": { - "$ref": "#/components/schemas/nodes._types.ClusterAppliedStats" } - } + }, + "required": [ + "feature_name", + "field", + "frequency_map" + ] }, - "nodes._types.ClusterStateQueue": { + "ml._types.DataframeAnalysisFeatureProcessorMultiEncoding": { "type": "object", "properties": { - "total": { - "description": "Total number of cluster states in queue.", - "type": "number" - }, - "pending": { - "description": "Number of pending cluster states in queue.", - "type": "number" - }, - "committed": { - "description": "Number of committed cluster states in queue.", - "type": "number" + "processors": { + "description": "The ordered array of custom processors to execute. Must be more than 1.", + "type": "array", + "items": { + "type": "number" + } } - } + }, + "required": [ + "processors" + ] }, - "nodes._types.PublishedClusterStates": { + "ml._types.DataframeAnalysisFeatureProcessorNGramEncoding": { "type": "object", "properties": { - "full_states": { - "description": "Number of published cluster states.", - "type": "number" + "feature_prefix": { + "description": "The feature name prefix. Defaults to ngram__.", + "type": "string" }, - "incompatible_diffs": { - "description": "Number of incompatible differences between published cluster states.", + "field": { + "description": "The name of the text field to encode.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "length": { + "description": "Specifies the length of the n-gram substring. Defaults to 50. Must be greater than 0.", "type": "number" }, - "compatible_diffs": { - "description": "Number of compatible differences between published cluster states.", + "n_grams": { + "description": "Specifies which n-grams to gather. It’s an array of integer values where the minimum value is 1, and a maximum value is 5.", + "type": "array", + "items": { + "type": "number" + } + }, + "start": { + "description": "Specifies the zero-indexed start of the n-gram substring. Negative values are allowed for encoding n-grams of string suffixes. Defaults to 0.", "type": "number" + }, + "custom": { + "type": "boolean" } - } + }, + "required": [ + "field", + "n_grams" + ] }, - "nodes._types.ClusterStateUpdate": { + "ml._types.DataframeAnalysisFeatureProcessorOneHotEncoding": { "type": "object", "properties": { - "count": { - "description": "The number of cluster state update attempts that did not change the cluster state since the node started.", - "type": "number" - }, - "computation_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "computation_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "publication_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "publication_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "context_construction_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "context_construction_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "commit_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "commit_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "completion_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "completion_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "master_apply_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "master_apply_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "notification_time": { - "$ref": "#/components/schemas/_types.Duration" + "field": { + "description": "The name of the field to encode.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "notification_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "hot_map": { + "description": "The one hot map mapping the field value with the column name.", + "type": "string" } }, "required": [ - "count" + "field", + "hot_map" ] }, - "nodes._types.SerializedClusterState": { + "ml._types.DataframeAnalysisFeatureProcessorTargetMeanEncoding": { "type": "object", "properties": { - "full_states": { - "$ref": "#/components/schemas/nodes._types.SerializedClusterStateDetail" + "default_value": { + "description": "The default value if field value is not found in the target_map.", + "type": "number" }, - "diffs": { - "$ref": "#/components/schemas/nodes._types.SerializedClusterStateDetail" + "feature_name": { + "description": "The resulting feature name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "field": { + "description": "The name of the field to encode.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "target_map": { + "description": "The field value to target mean transition map.", + "type": "object", + "additionalProperties": { + "type": "object" + } } - } + }, + "required": [ + "default_value", + "feature_name", + "field", + "target_map" + ] }, - "nodes._types.SerializedClusterStateDetail": { + "ml._types.DataframeAnalysisOutlierDetection": { "type": "object", "properties": { - "count": { + "compute_feature_influence": { + "description": "Specifies whether the feature influence calculation is enabled.", + "default": true, + "type": "boolean" + }, + "feature_influence_threshold": { + "description": "The minimum outlier score that a document needs to have in order to calculate its feature influence score. Value range: 0-1.", + "default": 0.1, "type": "number" }, - "uncompressed_size": { + "method": { + "description": "The method that outlier detection uses. Available methods are `lof`, `ldof`, `distance_kth_nn`, `distance_knn`, and `ensemble`. The default value is ensemble, which means that outlier detection uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score.", + "default": "ensemble", "type": "string" }, - "uncompressed_size_in_bytes": { + "n_neighbors": { + "description": "Defines the value for how many nearest neighbors each method of outlier detection uses to calculate its outlier score. When the value is not set, different values are used for different ensemble members. This default behavior helps improve the diversity in the ensemble; only override it if you are confident that the value you choose is appropriate for the data set.", "type": "number" }, - "compressed_size": { - "type": "string" - }, - "compressed_size_in_bytes": { + "outlier_fraction": { + "description": "The proportion of the data set that is assumed to be outlying prior to outlier detection. For example, 0.05 means it is assumed that 5% of values are real outliers and 95% are inliers.", "type": "number" + }, + "standardization_enabled": { + "description": "If true, the following operation is performed on the columns before computing outlier scores: `(x_i - mean(x_i)) / sd(x_i)`.", + "default": true, + "type": "boolean" } } }, - "nodes._types.ClusterAppliedStats": { - "type": "object", - "properties": { - "recordings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types.Recording" + "ml._types.DataframeAnalysisRegression": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysis" + }, + { + "type": "object", + "properties": { + "loss_function": { + "description": "The loss function used during regression. Available options are `mse` (mean squared error), `msle` (mean squared logarithmic error), `huber` (Pseudo-Huber loss).", + "default": "mse", + "type": "string" + }, + "loss_function_parameter": { + "description": "A positive number that is used as a parameter to the `loss_function`.", + "type": "number" + } } } - } + ] }, - "nodes._types.Recording": { + "ml._types.DataframeAnalyticsFieldSelection": { "type": "object", "properties": { - "name": { + "is_included": { + "description": "Whether the field is selected to be included in the analysis.", + "type": "boolean" + }, + "is_required": { + "description": "Whether the field is required.", + "type": "boolean" + }, + "feature_type": { + "description": "The feature type of this field for the analysis. May be categorical or numerical.", "type": "string" }, - "cumulative_execution_count": { - "type": "number" + "mapping_types": { + "description": "The mapping types of the field.", + "type": "array", + "items": { + "type": "string" + } }, - "cumulative_execution_time": { - "$ref": "#/components/schemas/_types.Duration" + "name": { + "description": "The field name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "cumulative_execution_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "reason": { + "description": "The reason a field is not selected to be included in the analysis.", + "type": "string" } - } + }, + "required": [ + "is_included", + "is_required", + "mapping_types", + "name" + ] }, - "nodes._types.IndexingPressure": { + "ml._types.DataframeAnalyticsMemoryEstimation": { "type": "object", "properties": { - "memory": { - "$ref": "#/components/schemas/nodes._types.IndexingPressureMemory" + "expected_memory_with_disk": { + "description": "Estimated memory usage under the assumption that overflowing to disk is allowed during data frame analytics. expected_memory_with_disk is usually smaller than expected_memory_without_disk as using disk allows to limit the main memory needed to perform data frame analytics.", + "type": "string" + }, + "expected_memory_without_disk": { + "description": "Estimated memory usage under the assumption that the whole data frame analytics should happen in memory (i.e. without overflowing to disk).", + "type": "string" } - } + }, + "required": [ + "expected_memory_with_disk", + "expected_memory_without_disk" + ] }, - "nodes._types.IndexingPressureMemory": { + "ml._types.Page": { "type": "object", "properties": { - "limit": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "limit_in_bytes": { - "description": "Configured memory limit, in bytes, for the indexing requests.\nReplica requests have an automatic limit that is 1.5x this value.", + "from": { + "description": "Skips the specified number of items.", + "default": 0.0, "type": "number" }, - "current": { - "$ref": "#/components/schemas/nodes._types.PressureMemory" - }, - "total": { - "$ref": "#/components/schemas/nodes._types.PressureMemory" + "size": { + "description": "Specifies the maximum number of items to obtain.", + "default": 10000.0, + "type": "number" } } }, - "nodes._types.PressureMemory": { + "ml._types.BucketSummary": { "type": "object", "properties": { - "all": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "all_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the coordinating, primary, or replica stage.", + "anomaly_score": { + "description": "The maximum anomaly score, between 0-100, for any of the bucket influencers. This is an overall, rate-limited\nscore for the job. All the anomaly records in the bucket contribute to this score. This value might be updated as\nnew data is analyzed.", "type": "number" }, - "combined_coordinating_and_primary": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "combined_coordinating_and_primary_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the coordinating or primary stage.\nThis value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally.", - "type": "number" + "bucket_influencers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.BucketInfluencer" + } }, - "coordinating": { - "$ref": "#/components/schemas/_types.ByteSize" + "bucket_span": { + "description": "The length of the bucket in seconds. This value matches the bucket span that is specified in the job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" + } + ] }, - "coordinating_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the coordinating stage.", + "event_count": { + "description": "The number of input data records processed in this bucket.", "type": "number" }, - "primary": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "primary_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the primary stage.", + "initial_anomaly_score": { + "description": "The maximum anomaly score for any of the bucket influencers. This is the initial value that was calculated at the\ntime the bucket was processed.", "type": "number" }, - "replica": { - "$ref": "#/components/schemas/_types.ByteSize" + "is_interim": { + "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", + "type": "boolean" }, - "replica_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the replica stage.", - "type": "number" + "job_id": { + "description": "Identifier for the anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "coordinating_rejections": { - "description": "Number of indexing requests rejected in the coordinating stage.", - "type": "number" + "processing_time_ms": { + "description": "The amount of time, in milliseconds, that it took to analyze the bucket contents and calculate results.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "primary_rejections": { - "description": "Number of indexing requests rejected in the primary stage.", - "type": "number" + "result_type": { + "description": "Internal. This value is always set to bucket.", + "type": "string" }, - "replica_rejections": { - "description": "Number of indexing requests rejected in the replica stage.", - "type": "number" - } - } - }, - "nodes.usage.ResponseBase": { - "allOf": [ - { - "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + "timestamp": { + "description": "The start time of the bucket. This timestamp uniquely identifies the bucket. Events that occur exactly at the\ntimestamp of the bucket are included in the results for the bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - { - "type": "object", - "properties": { - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes.usage.NodeUsage" - } + "timestamp_string": { + "description": "The start time of the bucket. This timestamp uniquely identifies the bucket. Events that occur exactly at the\ntimestamp of the bucket are included in the results for the bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" } - }, - "required": [ - "cluster_name", - "nodes" ] } + }, + "required": [ + "anomaly_score", + "bucket_influencers", + "bucket_span", + "event_count", + "initial_anomaly_score", + "is_interim", + "job_id", + "processing_time_ms", + "result_type", + "timestamp" ] }, - "nodes.usage.NodeUsage": { + "ml._types.BucketInfluencer": { "type": "object", "properties": { - "rest_actions": { - "type": "object", - "additionalProperties": { - "type": "number" - } + "anomaly_score": { + "description": "A normalized score between 0-100, which is calculated for each bucket influencer. This score might be updated as\nnewer data is analyzed.", + "type": "number" }, - "since": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "bucket_span": { + "description": "The length of the bucket in seconds. This value matches the bucket span that is specified in the job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" + } + ] + }, + "influencer_field_name": { + "description": "The field name of the influencer.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "initial_anomaly_score": { + "description": "The score between 0-100 for each bucket influencer. This score is the initial value that was calculated at the\ntime the bucket was processed.", + "type": "number" + }, + "is_interim": { + "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", + "type": "boolean" + }, + "job_id": { + "description": "Identifier for the anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "probability": { + "description": "The probability that the bucket has this behavior, in the range 0 to 1. This value can be held to a high precision\nof over 300 decimal places, so the `anomaly_score` is provided as a human-readable and friendly interpretation of\nthis.", + "type": "number" + }, + "raw_anomaly_score": { + "description": "Internal.", + "type": "number" + }, + "result_type": { + "description": "Internal. This value is always set to `bucket_influencer`.", + "type": "string" }, "timestamp": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "description": "The start time of the bucket for which these results were calculated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "aggregations": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "timestamp_string": { + "description": "The start time of the bucket for which these results were calculated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] } }, "required": [ - "rest_actions", - "since", - "timestamp", - "aggregations" + "anomaly_score", + "bucket_span", + "influencer_field_name", + "initial_anomaly_score", + "is_interim", + "job_id", + "probability", + "raw_anomaly_score", + "result_type", + "timestamp" ] }, - "query_rules._types.QueryRule": { + "_types.DurationValueUnitSeconds": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitSeconds" + } + ] + }, + "ml._types.CalendarEvent": { "type": "object", "properties": { - "rule_id": { - "$ref": "#/components/schemas/_types.Id" + "calendar_id": { + "description": "A string that uniquely identifies a calendar.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "type": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleType" + "event_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "criteria": { - "description": "The criteria that must be met for the rule to be applied.\nIf multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.", - "oneOf": [ + "description": { + "description": "A description of the scheduled event.", + "type": "string" + }, + "end_time": { + "description": "The timestamp for the end of the scheduled event in milliseconds since the epoch or ISO 8601 format.", + "allOf": [ { - "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" - }, + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "start_time": { + "description": "The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" - } + "$ref": "#/components/schemas/_types.DateTime" } ] }, - "actions": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleActions" + "skip_result": { + "description": "When true the model will not create results for this calendar period.", + "default": true, + "type": "boolean" }, - "priority": { + "skip_model_update": { + "description": "When true the model will not be updated for this calendar period.", + "default": true, + "type": "boolean" + }, + "force_time_shift": { + "description": "Shift time by this many seconds. For example adjust time for daylight savings changes", "type": "number" } }, "required": [ - "rule_id", - "type", - "criteria", - "actions" - ] - }, - "query_rules._types.QueryRuleType": { - "type": "string", - "enum": [ - "pinned", - "exclude" + "description", + "end_time", + "start_time" ] }, - "query_rules._types.QueryRuleCriteria": { + "ml.get_calendars.Calendar": { "type": "object", "properties": { - "type": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteriaType" + "calendar_id": { + "description": "A string that uniquely identifies a calendar.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "metadata": { - "description": "The metadata field to match against.\nThis metadata will be used to match against `match_criteria` sent in the rule.\nIt is required for all criteria types except `always`.", + "description": { + "description": "A description of the calendar.", "type": "string" }, - "values": { - "description": "The values to match against the `metadata` field.\nOnly one value must match for the criteria to be met.\nIt is required for all criteria types except `always`.", + "job_ids": { + "description": "An array of anomaly detection job identifiers.", "type": "array", "items": { - "type": "object" + "$ref": "#/components/schemas/_types.Id" } } }, "required": [ - "type" + "calendar_id", + "job_ids" ] }, - "query_rules._types.QueryRuleCriteriaType": { - "type": "string", - "enum": [ - "global", - "exact", - "exact_fuzzy", - "fuzzy", - "prefix", - "suffix", - "contains", - "lt", - "lte", - "gt", - "gte", - "always" - ] + "_types.CategoryId": { + "type": "number" }, - "query_rules._types.QueryRuleActions": { + "ml._types.Category": { "type": "object", "properties": { - "ids": { - "description": "The unique document IDs of the documents to apply the rule to.\nOnly one of `ids` or `docs` may be specified and at least one must be specified.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } + "category_id": { + "description": "A unique identifier for the category. category_id is unique at the job level, even when per-partition categorization is enabled.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ulong" + } + ] }, - "docs": { - "description": "The documents to apply the rule to.\nOnly one of `ids` or `docs` may be specified and at least one must be specified.\nThere is a maximum value of 100 documents in a rule.\nYou can specify the following attributes for each document:\n\n* `_index`: The index of the document to pin.\n* `_id`: The unique document ID.", + "examples": { + "description": "A list of examples of actual values that matched the category.", "type": "array", "items": { - "$ref": "#/components/schemas/_types.query_dsl.PinnedDoc" + "type": "string" } - } - } - }, - "query_rules._types.QueryRuleset": { - "type": "object", - "properties": { - "ruleset_id": { - "$ref": "#/components/schemas/_types.Id" }, - "rules": { - "description": "Rules associated with the query ruleset.", + "grok_pattern": { + "description": "[experimental] A Grok pattern that could be used in Logstash or an ingest pipeline to extract fields from messages that match the category. This field is experimental and may be changed or removed in a future release. The Grok patterns that are found are not optimal, but are often a good starting point for manual tweaking.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.GrokPattern" + } + ] + }, + "job_id": { + "description": "Identifier for the anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "max_matching_length": { + "description": "The maximum length of the fields that matched the category. The value is increased by 10% to enable matching for similar fields that have not been analyzed.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ulong" + } + ] + }, + "partition_field_name": { + "description": "If per-partition categorization is enabled, this property identifies the field used to segment the categorization. It is not present when per-partition categorization is disabled.", + "type": "string" + }, + "partition_field_value": { + "description": "If per-partition categorization is enabled, this property identifies the value of the partition_field_name for the category. It is not present when per-partition categorization is disabled.", + "type": "string" + }, + "regex": { + "description": "A regular expression that is used to search for values that match the category.", + "type": "string" + }, + "terms": { + "description": "A space separated list of the common tokens that are matched in values of the category.", + "type": "string" + }, + "num_matches": { + "description": "The number of messages that have been matched by this category. This is only guaranteed to have the latest accurate count after a job _flush or _close", + "type": "number" + }, + "preferred_to_categories": { + "description": "A list of category_id entries that this current category encompasses. Any new message that is processed by the categorizer will match against this category and not any of the categories in this list. This is only guaranteed to have the latest accurate list of categories after a job _flush or _close", "type": "array", "items": { - "$ref": "#/components/schemas/query_rules._types.QueryRule" + "$ref": "#/components/schemas/_types.Id" } - } - }, - "required": [ - "ruleset_id", - "rules" - ] - }, - "query_rules.list_rulesets.QueryRulesetListItem": { - "type": "object", - "properties": { - "ruleset_id": { - "$ref": "#/components/schemas/_types.Id" }, - "rule_total_count": { - "description": "The number of rules associated with the ruleset.", - "type": "number" + "p": { + "type": "string" }, - "rule_criteria_types_counts": { - "description": "A map of criteria type (for example, `exact`) to the number of rules of that type.\n\nNOTE: The counts in `rule_criteria_types_counts` may be larger than the value of `rule_total_count` because a rule may have multiple criteria.", - "type": "object", - "additionalProperties": { - "type": "number" - } + "result_type": { + "type": "string" }, - "rule_type_counts": { - "description": "A map of rule type (for example, `pinned`) to the number of rules of that type.", - "type": "object", - "additionalProperties": { - "type": "number" - } + "mlcategory": { + "type": "string" } }, "required": [ - "ruleset_id", - "rule_total_count", - "rule_criteria_types_counts", - "rule_type_counts" + "category_id", + "examples", + "job_id", + "max_matching_length", + "regex", + "terms", + "result_type", + "mlcategory" ] }, - "query_rules.test.QueryRulesetMatchedRule": { + "ml._types.DataframeAnalyticsSummary": { "type": "object", "properties": { - "ruleset_id": { - "$ref": "#/components/schemas/_types.Id" + "allow_lazy_start": { + "type": "boolean" + }, + "analysis": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] + }, + "analyzed_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] + }, + "authorization": { + "description": "The security privileges that the job uses to run its queries. If Elastic Stack security features were disabled at the time of the most recent update to the job, this property is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsAuthorization" + } + ] + }, + "create_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "description": { + "type": "string" + }, + "dest": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" + } + ] }, - "rule_id": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "required": [ - "ruleset_id", - "rule_id" - ] - }, - "_global.rank_eval.RankEvalRequestItem": { - "type": "object", - "properties": { "id": { - "$ref": "#/components/schemas/_types.Id" + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "request": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalQuery" + "max_num_threads": { + "type": "number" }, - "ratings": { - "description": "List of document ratings", - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.rank_eval.DocumentRating" - } + "model_memory_limit": { + "type": "string" + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] }, - "template_id": { - "$ref": "#/components/schemas/_types.Id" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "params": { - "description": "The search template parameters.", - "type": "object", - "additionalProperties": { - "type": "object" - } + "_meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] } }, "required": [ + "analysis", + "dest", "id", - "ratings" + "source" ] }, - "_global.rank_eval.RankEvalQuery": { + "ml._types.DataframeAnalyticsAuthorization": { "type": "object", "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "api_key": { + "description": "If an API key was used for the most recent update to the job, its name and identifier are listed in the response.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ApiKeyAuthorization" + } + ] }, - "size": { - "type": "number" + "roles": { + "description": "If a user ID was used for the most recent update to the job, its roles at the time of the update are listed in the response.", + "type": "array", + "items": { + "type": "string" + } + }, + "service_account": { + "description": "If a service account was used for the most recent update to the job, the account name is listed in the response.", + "type": "string" } - }, - "required": [ - "query" - ] + } }, - "_global.rank_eval.DocumentRating": { + "ml._types.ApiKeyAuthorization": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "id": { + "description": "The identifier for the API key.", + "type": "string" }, - "rating": { - "description": "The document’s relevance with regard to this search request.", - "type": "number" + "name": { + "description": "The name of the API key.", + "type": "string" } }, "required": [ - "_id", - "_index", - "rating" + "id", + "name" ] }, - "_global.rank_eval.RankEvalMetric": { + "ml._types.DataframeAnalytics": { "type": "object", "properties": { - "precision": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricPrecision" - }, - "recall": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRecall" - }, - "mean_reciprocal_rank": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricMeanReciprocalRank" - }, - "dcg": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDiscountedCumulativeGain" + "analysis_stats": { + "description": "An object containing information about the analysis job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsContainer" + } + ] }, - "expected_reciprocal_rank": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricExpectedReciprocalRank" - } - } - }, - "_global.rank_eval.RankEvalMetricPrecision": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" + "assignment_explanation": { + "description": "For running jobs only, contains messages relating to the selection of a node to run the job.", + "type": "string" }, - { - "type": "object", - "properties": { - "ignore_unlabeled": { - "description": "Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant.", - "type": "boolean" + "data_counts": { + "description": "An object that provides counts for the quantity of documents skipped, used in training, or available for testing.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsDataCounts" } - } - } - ] - }, - "_global.rank_eval.RankEvalMetricRatingTreshold": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" + ] }, - { - "type": "object", - "properties": { - "relevant_rating_threshold": { - "description": "Sets the rating threshold above which documents are considered to be \"relevant\".", - "type": "number" + "id": { + "description": "The unique identifier of the data frame analytics job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - } - } - ] - }, - "_global.rank_eval.RankEvalMetricBase": { - "type": "object", - "properties": { - "k": { - "description": "Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.", - "type": "number" - } - } - }, - "_global.rank_eval.RankEvalMetricRecall": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" - }, - { - "type": "object" - } - ] - }, - "_global.rank_eval.RankEvalMetricMeanReciprocalRank": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" - }, - { - "type": "object" - } - ] - }, - "_global.rank_eval.RankEvalMetricDiscountedCumulativeGain": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" + ] }, - { - "type": "object", - "properties": { - "normalize": { - "description": "If set to true, this metric will calculate the Normalized DCG.", - "type": "boolean" + "memory_usage": { + "description": "An object describing memory usage of the analytics. It is present only after the job is started and memory usage is reported.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsMemoryUsage" } - } - } - ] - }, - "_global.rank_eval.RankEvalMetricExpectedReciprocalRank": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" + ] }, - { - "type": "object", - "properties": { - "maximum_relevance": { - "description": "The highest relevance grade used in the user-supplied relevance judgments.", - "type": "number" + "node": { + "description": "Contains properties for the node that runs the job. This information is available only for running jobs.", + "x-state": "Generally available", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeAttributes" } - }, - "required": [ - "maximum_relevance" ] - } - ] - }, - "_global.rank_eval.RankEvalMetricDetail": { - "type": "object", - "properties": { - "metric_score": { - "description": "The metric_score in the details section shows the contribution of this query to the global quality metric score", - "type": "number" - }, - "unrated_docs": { - "description": "The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents", - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.rank_eval.UnratedDocument" - } }, - "hits": { - "description": "The hits section shows a grouping of the search results with their supplied ratings", + "progress": { + "description": "The progress report of the data frame analytics job by phase.", "type": "array", "items": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalHitItem" + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsProgress" } }, - "metric_details": { - "description": "The metric_details give additional information about the calculated quality metric (e.g. how many of the retrieved documents were relevant). The content varies for each metric but allows for better interpretation of the results", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" + "state": { + "description": "The status of the data frame analytics job, which can be one of the following values: failed, started, starting, stopping, stopped.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeState" } - } + ] } }, "required": [ - "metric_score", - "unrated_docs", - "hits", - "metric_details" + "data_counts", + "id", + "memory_usage", + "progress", + "state" ] }, - "_global.rank_eval.UnratedDocument": { + "ml._types.DataframeAnalyticsStatsContainer": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" + "classification_stats": { + "description": "An object containing information about the classification analysis job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsHyperparameters" + } + ] }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "outlier_detection_stats": { + "description": "An object containing information about the outlier detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsOutlierDetection" + } + ] + }, + "regression_stats": { + "description": "An object containing information about the regression analysis.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsHyperparameters" + } + ] } }, - "required": [ - "_id", - "_index" - ] + "minProperties": 1, + "maxProperties": 1 }, - "_global.rank_eval.RankEvalHitItem": { + "ml._types.DataframeAnalyticsStatsHyperparameters": { "type": "object", "properties": { - "hit": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalHit" + "hyperparameters": { + "description": "An object containing the parameters of the classification analysis job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Hyperparameters" + } + ] }, - "rating": { - "oneOf": [ + "iteration": { + "description": "The number of iterations on the analysis.", + "type": "number" + }, + "timestamp": { + "description": "The timestamp when the statistics were reported in milliseconds since the epoch.", + "allOf": [ { - "type": "number" - }, + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "timing_stats": { + "description": "An object containing time statistics about the data frame analytics job.", + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/ml._types.TimingStats" + } + ] + }, + "validation_loss": { + "description": "An object containing information about validation loss.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ValidationLoss" } ] } }, "required": [ - "hit" + "hyperparameters", + "iteration", + "timestamp", + "timing_stats", + "validation_loss" ] }, - "_global.rank_eval.RankEvalHit": { + "ml._types.Hyperparameters": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" + "alpha": { + "description": "Advanced configuration option.\nMachine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly.\nThis parameter affects loss calculations by acting as a multiplier of the tree depth.\nHigher alpha values result in shallower trees and faster training times.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be greater than or equal to zero.", + "type": "number" }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "lambda": { + "description": "Advanced configuration option.\nRegularization parameter to prevent overfitting on the training data set.\nMultiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest.\nA high lambda value causes training to favor small leaf weights.\nThis behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable.\nA small lambda value results in large individual trees and slower training.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be a nonnegative value.", + "type": "number" }, - "_score": { + "gamma": { + "description": "Advanced configuration option.\nRegularization parameter to prevent overfitting on the training data set.\nMultiplies a linear penalty associated with the size of individual trees in the forest.\nA high gamma value causes training to prefer small trees.\nA small gamma value results in larger individual trees and slower training.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be a nonnegative value.", "type": "number" - } - }, - "required": [ - "_id", - "_index", - "_score" - ] - }, - "_global.reindex.Destination": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" }, - "op_type": { - "$ref": "#/components/schemas/_types.OpType" + "eta": { + "description": "Advanced configuration option.\nThe shrinkage applied to the weights.\nSmaller values result in larger forests which have a better generalization error.\nHowever, larger forests cause slower training.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be a value between `0.001` and `1`.", + "type": "number" }, - "pipeline": { - "description": "The name of the pipeline to use.", - "type": "string" + "eta_growth_rate_per_tree": { + "description": "Advanced configuration option.\nSpecifies the rate at which `eta` increases for each new tree that is added to the forest.\nFor example, a rate of 1.05 increases `eta` by 5% for each extra tree.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be between `0.5` and `2`.", + "type": "number" }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" + "feature_bag_fraction": { + "description": "Advanced configuration option.\nDefines the fraction of features that will be used when selecting a random bag for each candidate split.\nBy default, this value is calculated during hyperparameter optimization.", + "type": "number" }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" - } - }, - "required": [ - "index" - ] - }, - "_global.reindex.Source": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.Indices" + "downsample_factor": { + "description": "Advanced configuration option.\nControls the fraction of data that is used to compute the derivatives of the loss function for tree training.\nA small value results in the use of a small fraction of the data.\nIf this value is set to be less than 1, accuracy typically improves.\nHowever, too small a value may result in poor convergence for the ensemble and so require more trees.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be greater than zero and less than or equal to 1.", + "type": "number" }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "max_attempts_to_add_tree": { + "description": "If the algorithm fails to determine a non-trivial tree (more than a single leaf), this parameter determines how many of such consecutive failures are tolerated.\nOnce the number of attempts exceeds the threshold, the forest training stops.", + "type": "number" }, - "remote": { - "$ref": "#/components/schemas/_global.reindex.RemoteSource" + "max_optimization_rounds_per_hyperparameter": { + "description": "Advanced configuration option.\nA multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure.\nThe maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter.\nBy default, this value is calculated during hyperparameter optimization.", + "type": "number" }, - "size": { - "description": "The number of documents to index per batch.\nUse it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.", + "max_trees": { + "description": "Advanced configuration option.\nDefines the maximum number of decision trees in the forest.\nThe maximum value is 2000.\nBy default, this value is calculated during hyperparameter optimization.", "type": "number" }, - "slice": { - "$ref": "#/components/schemas/_types.SlicedScroll" + "num_folds": { + "description": "The maximum number of folds for the cross-validation procedure.", + "type": "number" }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" + "num_splits_per_feature": { + "description": "Determines the maximum number of splits for every feature that can occur in a decision tree when the tree is trained.", + "type": "number" }, - "_source": { - "$ref": "#/components/schemas/_types.Fields" + "soft_tree_depth_limit": { + "description": "Advanced configuration option.\nMachine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly.\nThis soft limit combines with the `soft_tree_depth_tolerance` to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be greater than or equal to 0.", + "type": "number" }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + "soft_tree_depth_tolerance": { + "description": "Advanced configuration option.\nThis option controls how quickly the regularized loss increases when the tree depth exceeds `soft_tree_depth_limit`.\nBy default, this value is calculated during hyperparameter optimization.\nIt must be greater than or equal to 0.01.", + "type": "number" + } + } + }, + "ml._types.TimingStats": { + "type": "object", + "properties": { + "elapsed_time": { + "description": "Runtime of the analysis in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "iteration_time": { + "description": "Runtime of the latest iteration of the analysis in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "index" + "elapsed_time" ] }, - "_global.reindex.RemoteSource": { + "ml._types.ValidationLoss": { "type": "object", "properties": { - "connect_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "headers": { - "description": "An object containing the headers of the request.", - "type": "object", - "additionalProperties": { + "fold_values": { + "description": "Validation loss values for every added decision tree during the forest growing procedure.", + "type": "array", + "items": { "type": "string" } }, - "host": { - "$ref": "#/components/schemas/_types.Host" - }, - "username": { - "$ref": "#/components/schemas/_types.Username" - }, - "password": { - "$ref": "#/components/schemas/_types.Password" - }, - "socket_timeout": { - "$ref": "#/components/schemas/_types.Duration" + "loss_type": { + "description": "The type of the loss metric. For example, binomial_logistic.", + "type": "string" } }, "required": [ - "host" - ] - }, - "_types.Username": { - "type": "string" - }, - "_global.reindex_rethrottle.ReindexNode": { - "allOf": [ - { - "$ref": "#/components/schemas/_spec_utils.BaseNode" - }, - { - "type": "object", - "properties": { - "tasks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.reindex_rethrottle.ReindexTask" - } - } - }, - "required": [ - "tasks" - ] - } + "fold_values", + "loss_type" ] }, - "_global.reindex_rethrottle.ReindexTask": { + "ml._types.DataframeAnalyticsStatsOutlierDetection": { "type": "object", "properties": { - "action": { - "type": "string" - }, - "cancellable": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "id": { - "type": "number" - }, - "node": { - "$ref": "#/components/schemas/_types.Name" - }, - "running_time_in_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "status": { - "$ref": "#/components/schemas/_global.reindex_rethrottle.ReindexStatus" + "parameters": { + "description": "The list of job parameters specified by the user or determined by algorithmic heuristics.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.OutlierDetectionParameters" + } + ] }, - "type": { - "type": "string" + "timestamp": { + "description": "The timestamp when the statistics were reported in milliseconds since the epoch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "headers": { - "$ref": "#/components/schemas/_types.HttpHeaders" + "timing_stats": { + "description": "An object containing time statistics about the data frame analytics job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TimingStats" + } + ] } - }, - "required": [ - "action", - "cancellable", - "description", - "id", - "node", - "running_time_in_nanos", - "start_time_in_millis", - "status", - "type", - "headers" + }, + "required": [ + "parameters", + "timestamp", + "timing_stats" ] }, - "_global.reindex_rethrottle.ReindexStatus": { + "ml._types.OutlierDetectionParameters": { "type": "object", "properties": { - "batches": { - "description": "The number of scroll responses pulled back by the reindex.", - "type": "number" + "compute_feature_influence": { + "description": "Specifies whether the feature influence calculation is enabled.", + "default": true, + "type": "boolean" }, - "created": { - "description": "The number of documents that were successfully created.", + "feature_influence_threshold": { + "description": "The minimum outlier score that a document needs to have in order to calculate its feature influence score.\nValue range: 0-1", + "default": 0.1, "type": "number" }, - "deleted": { - "description": "The number of documents that were successfully deleted.", - "type": "number" + "method": { + "description": "The method that outlier detection uses.\nAvailable methods are `lof`, `ldof`, `distance_kth_nn`, `distance_knn`, and `ensemble`.\nThe default value is ensemble, which means that outlier detection uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score.", + "type": "string" }, - "noops": { - "description": "The number of documents that were ignored because the script used for the reindex returned a `noop` value for `ctx.op`.", + "n_neighbors": { + "description": "Defines the value for how many nearest neighbors each method of outlier detection uses to calculate its outlier score.\nWhen the value is not set, different values are used for different ensemble members.\nThis default behavior helps improve the diversity in the ensemble; only override it if you are confident that the value you choose is appropriate for the data set.", "type": "number" }, - "requests_per_second": { - "description": "The number of requests per second effectively executed during the reindex.", + "outlier_fraction": { + "description": "The proportion of the data set that is assumed to be outlying prior to outlier detection.\nFor example, 0.05 means it is assumed that 5% of values are real outliers and 95% are inliers.", "type": "number" }, - "retries": { - "$ref": "#/components/schemas/_types.Retries" - }, - "throttled": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttled_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "throttled_until": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttled_until_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "standardization_enabled": { + "description": "If `true`, the following operation is performed on the columns before computing outlier scores: (x_i - mean(x_i)) / sd(x_i).", + "default": true, + "type": "boolean" + } + } + }, + "ml._types.DataframeAnalyticsStatsDataCounts": { + "type": "object", + "properties": { + "skipped_docs_count": { + "description": "The number of documents that are skipped during the analysis because they contained values that are not supported by the analysis. For example, outlier detection does not support missing fields so it skips documents with missing fields. Likewise, all types of analysis skip documents that contain arrays with more than one element.", + "type": "number" }, - "total": { - "description": "The number of documents that were successfully processed.", + "test_docs_count": { + "description": "The number of documents that are not used for training the model and can be used for testing.", "type": "number" }, - "updated": { - "description": "The number of documents that were successfully updated, for example, a document with same ID already existed prior to reindex updating it.", + "training_docs_count": { + "description": "The number of documents that are used for training the model.", + "type": "number" + } + }, + "required": [ + "skipped_docs_count", + "test_docs_count", + "training_docs_count" + ] + }, + "ml._types.DataframeAnalyticsStatsMemoryUsage": { + "type": "object", + "properties": { + "memory_reestimate_bytes": { + "description": "This value is present when the status is hard_limit and it is a new estimate of how much memory the job needs.", "type": "number" }, - "version_conflicts": { - "description": "The number of version conflicts that reindex hits.", + "peak_usage_bytes": { + "description": "The number of bytes used at the highest peak of memory usage.", "type": "number" + }, + "status": { + "description": "The memory usage status.", + "type": "string" + }, + "timestamp": { + "description": "The timestamp when memory usage was calculated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] } }, "required": [ - "batches", - "created", - "deleted", - "noops", - "requests_per_second", - "retries", - "throttled_millis", - "throttled_until_millis", - "total", - "updated", - "version_conflicts" + "peak_usage_bytes", + "status" ] }, - "_spec_utils.BaseNode": { + "_types.NodeAttributes": { "type": "object", "properties": { "attributes": { + "description": "Lists node attributes.", "type": "object", "additionalProperties": { "type": "string" } }, - "host": { - "$ref": "#/components/schemas/_types.Host" + "ephemeral_id": { + "description": "The ephemeral ID of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "ip": { - "$ref": "#/components/schemas/_types.Ip" + "id": { + "description": "The unique identifier of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + } + ] }, "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "roles": { - "$ref": "#/components/schemas/_types.NodeRoles" + "description": "The unique identifier of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeName" + } + ] }, "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" + "description": "The host and port where transport HTTP connections are accepted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] } }, "required": [ "attributes", - "host", - "ip", + "ephemeral_id", "name", "transport_address" ] }, - "rollup.get_jobs.RollupJob": { + "ml._types.DataframeAnalyticsStatsProgress": { "type": "object", "properties": { - "config": { - "$ref": "#/components/schemas/rollup.get_jobs.RollupJobConfiguration" - }, - "stats": { - "$ref": "#/components/schemas/rollup.get_jobs.RollupJobStats" + "phase": { + "description": "Defines the phase of the data frame analytics job.", + "type": "string" }, - "status": { - "$ref": "#/components/schemas/rollup.get_jobs.RollupJobStatus" + "progress_percent": { + "description": "The progress that the data frame analytics job has made expressed in percentage.", + "type": "number" } }, "required": [ - "config", - "stats", - "status" + "phase", + "progress_percent" ] }, - "rollup.get_jobs.RollupJobConfiguration": { + "ml._types.DataframeState": { + "type": "string", + "enum": [ + "started", + "stopped", + "starting", + "stopping", + "failed" + ] + }, + "ml._types.DatafeedStats": { "type": "object", "properties": { - "cron": { + "assignment_explanation": { + "description": "For started datafeeds only, contains messages relating to the selection of a node.", "type": "string" }, - "groups": { - "$ref": "#/components/schemas/rollup._types.Groupings" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "index_pattern": { - "type": "string" + "datafeed_id": { + "description": "A numerical character string that uniquely identifies the datafeed.\nThis identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.\nIt must start and end with alphanumeric characters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/components/schemas/rollup._types.FieldMetric" - } + "node": { + "description": "For started datafeeds only, this information pertains to the node upon which the datafeed is started.", + "x-state": "Generally available", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DiscoveryNodeCompact" + } + ] }, - "page_size": { - "type": "number" + "state": { + "description": "The status of the datafeed, which can be one of the following values: `starting`, `started`, `stopping`, `stopped`.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedState" + } + ] }, - "rollup_index": { - "$ref": "#/components/schemas/_types.IndexName" + "timing_stats": { + "description": "An object that provides statistical information about timing aspect of this datafeed.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedTimingStats" + } + ] }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" + "running_state": { + "description": "An object containing the running state for this datafeed.\nIt is only provided if the datafeed is started.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedRunningState" + } + ] } }, "required": [ - "cron", - "groups", - "id", - "index_pattern", - "metrics", - "page_size", - "rollup_index", - "timeout" + "datafeed_id", + "state" ] }, - "rollup._types.Groupings": { + "ml._types.DiscoveryNodeCompact": { + "description": "Alternative representation of DiscoveryNode used in ml.get_job_stats and ml.get_datafeed_stats", "type": "object", "properties": { - "date_histogram": { - "$ref": "#/components/schemas/rollup._types.DateHistogramGrouping" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "histogram": { - "$ref": "#/components/schemas/rollup._types.HistogramGrouping" + "ephemeral_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "terms": { - "$ref": "#/components/schemas/rollup._types.TermsGrouping" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "transport_address": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } } - } + }, + "required": [ + "name", + "ephemeral_id", + "id", + "transport_address", + "attributes" + ] }, - "rollup._types.DateHistogramGrouping": { + "ml._types.DatafeedTimingStats": { "type": "object", "properties": { - "delay": { - "$ref": "#/components/schemas/_types.Duration" + "bucket_count": { + "description": "The number of buckets processed.", + "type": "number" }, - "field": { - "$ref": "#/components/schemas/_types.Field" + "exponential_average_search_time_per_hour_ms": { + "description": "The exponential average search time per hour, in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] }, - "format": { - "type": "string" + "exponential_average_calculation_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ExponentialAverageCalculationContext" + } + ] }, - "interval": { - "$ref": "#/components/schemas/_types.Duration" + "job_id": { + "description": "Identifier for the anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "calendar_interval": { - "$ref": "#/components/schemas/_types.Duration" + "search_count": { + "description": "The number of searches run by the datafeed.", + "type": "number" }, - "fixed_interval": { - "$ref": "#/components/schemas/_types.Duration" + "total_search_time_ms": { + "description": "The total time the datafeed spent searching, in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" + "average_search_time_per_bucket_ms": { + "description": "The average search time per bucket, in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] } }, "required": [ - "field" + "bucket_count", + "exponential_average_search_time_per_hour_ms", + "job_id", + "search_count", + "total_search_time_ms" ] }, - "rollup._types.HistogramGrouping": { + "_types.DurationValueUnitFloatMillis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.UnitFloatMillis" + } + ] + }, + "_types.UnitFloatMillis": { + "description": "Time unit for fractional milliseconds", + "type": "number" + }, + "ml._types.ExponentialAverageCalculationContext": { "type": "object", "properties": { - "fields": { - "$ref": "#/components/schemas/_types.Fields" + "incremental_metric_value_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] }, - "interval": { - "description": "The interval of histogram buckets to be generated when rolling up.\nFor example, a value of `5` creates buckets that are five units wide (`0-5`, `5-10`, etc).\nNote that only one interval can be specified in the histogram group, meaning that all fields being grouped via the histogram must share the same interval.", - "type": "number" + "latest_timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "previous_exponential_average_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] } }, "required": [ - "fields", - "interval" + "incremental_metric_value_ms" ] }, - "rollup._types.TermsGrouping": { + "ml._types.DatafeedRunningState": { "type": "object", "properties": { - "fields": { - "$ref": "#/components/schemas/_types.Fields" + "real_time_configured": { + "description": "Indicates if the datafeed is \"real-time\"; meaning that the datafeed has no configured `end` time.", + "type": "boolean" + }, + "real_time_running": { + "description": "Indicates whether the datafeed has finished running on the available past data.\nFor datafeeds without a configured `end` time, this means that the datafeed is now running on \"real-time\" data.", + "type": "boolean" + }, + "search_interval": { + "description": "Provides the latest time interval the datafeed has searched.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.RunningStateSearchInterval" + } + ] } }, "required": [ - "fields" + "real_time_configured", + "real_time_running" ] }, - "rollup._types.FieldMetric": { + "ml._types.RunningStateSearchInterval": { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" + "end": { + "description": "The end time.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "metrics": { - "description": "An array of metrics to collect for the field. At least one metric must be configured.", - "type": "array", - "items": { - "$ref": "#/components/schemas/rollup._types.Metric" - } + "end_ms": { + "description": "The end time as an epoch in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "start": { + "description": "The start time.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "start_ms": { + "description": "The start time as an epoch in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "field", - "metrics" - ] - }, - "rollup._types.Metric": { - "type": "string", - "enum": [ - "min", - "max", - "sum", - "avg", - "value_count" + "end_ms", + "start_ms" ] }, - "rollup.get_jobs.RollupJobStats": { + "ml._types.Datafeed": { "type": "object", "properties": { - "documents_processed": { - "type": "number" + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } }, - "index_failures": { - "type": "number" + "authorization": { + "description": "The security privileges that the datafeed uses to run its queries. If Elastic Stack security features were disabled at the time of the most recent update to the datafeed, this property is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedAuthorization" + } + ] }, - "index_time_in_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "chunking_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ChunkingConfig" + } + ] }, - "index_total": { - "type": "number" + "datafeed_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "pages_processed": { - "type": "number" + "frequency": { + "description": "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. For example: `150s`. 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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "rollups_indexed": { - "type": "number" + "indices": { + "type": "array", + "items": { + "type": "string" + } }, - "search_failures": { - "type": "number" + "indexes": { + "type": "array", + "items": { + "type": "string" + } }, - "search_time_in_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "search_total": { + "max_empty_searches": { "type": "number" }, - "trigger_count": { + "query": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl" + }, + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "query_delay": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "script_fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "scroll_size": { "type": "number" }, - "processing_time_in_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "delayed_data_check_config": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" + } + ] + }, + "runtime_mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] }, - "processing_total": { - "type": "number" + "indices_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndicesOptions" + } + ] } }, "required": [ - "documents_processed", - "index_failures", - "index_time_in_ms", - "index_total", - "pages_processed", - "rollups_indexed", - "search_failures", - "search_time_in_ms", - "search_total", - "trigger_count", - "processing_time_in_ms", - "processing_total" + "datafeed_id", + "indices", + "job_id", + "query", + "delayed_data_check_config" ] }, - "rollup.get_jobs.RollupJobStatus": { + "ml._types.DatafeedAuthorization": { "type": "object", "properties": { - "current_position": { - "type": "object", - "additionalProperties": { - "type": "object" + "api_key": { + "description": "If an API key was used for the most recent update to the datafeed, its name and identifier are listed in the response.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ApiKeyAuthorization" + } + ] + }, + "roles": { + "description": "If a user ID was used for the most recent update to the datafeed, its roles at the time of the update are listed in the response.", + "type": "array", + "items": { + "type": "string" } }, - "job_state": { - "$ref": "#/components/schemas/rollup.get_jobs.IndexingJobState" + "service_account": { + "description": "If a service account was used for the most recent update to the datafeed, the account name is listed in the response.", + "type": "string" + } + } + }, + "ml._types.ChunkingConfig": { + "type": "object", + "properties": { + "mode": { + "description": "If the mode is `auto`, the chunk size is dynamically calculated;\nthis is the recommended value when the datafeed does not use aggregations.\nIf the mode is `manual`, chunking is applied according to the specified `time_span`;\nuse this mode when the datafeed uses aggregations. If the mode is `off`, no chunking is applied.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ChunkingMode" + } + ] }, - "upgraded_doc_id": { - "type": "boolean" + "time_span": { + "description": "The time span that each search will be querying. This setting is applicable only when the `mode` is set to `manual`.", + "default": "3h", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] } }, "required": [ - "job_state" + "mode" ] }, - "rollup.get_jobs.IndexingJobState": { + "ml._types.ChunkingMode": { "type": "string", "enum": [ - "started", - "indexing", - "stopping", - "stopped", - "aborting" + "auto", + "manual", + "off" ] }, - "rollup.get_rollup_caps.RollupCapabilities": { + "ml._types.DelayedDataCheckConfig": { "type": "object", "properties": { - "rollup_jobs": { - "description": "There can be multiple, independent jobs configured for a single index or index pattern. Each of these jobs may have different configurations, so the API returns a list of all the various configurations available.", - "type": "array", - "items": { - "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupCapabilitySummary" - } + "check_window": { + "description": "The window of time that is searched for late data. This window of time ends with the latest finalized bucket.\nIt defaults to null, which causes an appropriate `check_window` to be calculated when the real-time datafeed runs.\nIn particular, the default `check_window` span calculation is based on the maximum of `2h` or `8 * bucket_span`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "enabled": { + "description": "Specifies whether the datafeed periodically checks for delayed data.", + "type": "boolean" } }, "required": [ - "rollup_jobs" + "enabled" ] }, - "rollup.get_rollup_caps.RollupCapabilitySummary": { + "_types.IndicesOptions": { + "description": "Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded\nto actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices.", "type": "object", "properties": { - "fields": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupFieldSummary" - } - } + "allow_no_indices": { + "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only\nmissing or closed indices. This behavior applies even if the request targets other open indices. For example,\na request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "type": "boolean" }, - "index_pattern": { - "type": "string" + "expand_wildcards": { + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ExpandWildcards" + } + ] }, - "job_id": { - "type": "string" + "ignore_unavailable": { + "description": "If true, missing or closed indices are not included in the response.", + "default": false, + "type": "boolean" }, - "rollup_index": { - "type": "string" + "ignore_throttled": { + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "default": true, + "type": "boolean" } - }, - "required": [ - "fields", - "index_pattern", - "job_id", - "rollup_index" - ] + } }, - "rollup.get_rollup_caps.RollupFieldSummary": { + "ml._types.Filter": { "type": "object", "properties": { - "agg": { + "description": { + "description": "A description of the filter.", "type": "string" }, - "calendar_interval": { - "$ref": "#/components/schemas/_types.Duration" + "filter_id": { + "description": "A string that uniquely identifies a filter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" - } - }, - "required": [ - "agg" - ] - }, - "rollup.get_rollup_index_caps.IndexCapabilities": { - "type": "object", - "properties": { - "rollup_jobs": { + "items": { + "description": "An array of strings which is the filter item list.", "type": "array", "items": { - "$ref": "#/components/schemas/rollup.get_rollup_index_caps.RollupJobSummary" + "type": "string" } } }, "required": [ - "rollup_jobs" + "filter_id", + "items" ] }, - "rollup.get_rollup_index_caps.RollupJobSummary": { + "ml._types.Influencer": { "type": "object", "properties": { - "fields": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/rollup.get_rollup_index_caps.RollupJobSummaryField" + "bucket_span": { + "description": "The length of the bucket in seconds. This value matches the bucket span that is specified in the job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" } - } + ] }, - "index_pattern": { + "influencer_score": { + "description": "A normalized score between 0-100, which is based on the probability of the influencer in this bucket aggregated\nacross detectors. Unlike `initial_influencer_score`, this value is updated by a re-normalization process as new\ndata is analyzed.", + "type": "number" + }, + "influencer_field_name": { + "description": "The field name of the influencer.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "influencer_field_value": { + "description": "The entity that influenced, contributed to, or was to blame for the anomaly.", "type": "string" }, + "initial_influencer_score": { + "description": "A normalized score between 0-100, which is based on the probability of the influencer aggregated across detectors.\nThis is the initial value that was calculated at the time the bucket was processed.", + "type": "number" + }, + "is_interim": { + "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", + "type": "boolean" + }, "job_id": { - "$ref": "#/components/schemas/_types.Id" + "description": "Identifier for the anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "rollup_index": { - "$ref": "#/components/schemas/_types.IndexName" + "probability": { + "description": "The probability that the influencer has this behavior, in the range 0 to 1. This value can be held to a high\nprecision of over 300 decimal places, so the `influencer_score` is provided as a human-readable and friendly\ninterpretation of this value.", + "type": "number" + }, + "result_type": { + "description": "Internal. This value is always set to `influencer`.", + "type": "string" + }, + "timestamp": { + "description": "The start time of the bucket for which these results were calculated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "foo": { + "description": "Additional influencer properties are added, depending on the fields being analyzed. For example, if it’s\nanalyzing `user_name` as an influencer, a field `user_name` is added to the result document. This\ninformation enables you to filter the anomaly results more easily.", + "type": "string" } }, "required": [ - "fields", - "index_pattern", + "bucket_span", + "influencer_score", + "influencer_field_name", + "influencer_field_value", + "initial_influencer_score", + "is_interim", "job_id", - "rollup_index" + "probability", + "result_type", + "timestamp" ] }, - "rollup.get_rollup_index_caps.RollupJobSummaryField": { + "ml._types.JobStats": { "type": "object", "properties": { - "agg": { + "assignment_explanation": { + "description": "For open anomaly detection jobs only, contains messages relating to the selection of a node to run the job.", "type": "string" }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" + "data_counts": { + "description": "An object that describes the quantity of input to the job and any related error counts.\nThe `data_count` values are cumulative for the lifetime of a job.\nIf a model snapshot is reverted or old results are deleted, the job counts are not reset.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataCounts" + } + ] }, - "calendar_interval": { - "$ref": "#/components/schemas/_types.Duration" - } - }, - "required": [ - "agg" - ] - }, - "_global.scripts_painless_execute.PainlessContext": { - "type": "string", - "enum": [ - "painless_test", - "filter", - "score", - "boolean_field", - "date_field", - "double_field", - "geo_point_field", - "ip_field", - "keyword_field", - "long_field", - "composite_field" - ] - }, - "_global.scripts_painless_execute.PainlessContextSetup": { - "type": "object", - "properties": { - "document": { - "description": "Document that's temporarily indexed in-memory and accessible from the script.", - "type": "object" + "forecasts_stats": { + "description": "An object that provides statistical information about forecasts belonging to this job.\nSome statistics are omitted if no forecasts have been made.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobForecastStatistics" + } + ] }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "job_id": { + "description": "Identifier for the anomaly detection job.", + "type": "string" }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - }, - "required": [ - "document", - "index" - ] - }, - "search_application._types.SearchApplication": { - "allOf": [ - { - "$ref": "#/components/schemas/search_application._types.SearchApplicationParameters" + "model_size_stats": { + "description": "An object that provides information about the size and contents of the model.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelSizeStats" + } + ] }, - { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "updated_at_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "node": { + "description": "Contains properties for the node that runs the job.\nThis information is available only for open jobs.", + "x-state": "Generally available", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DiscoveryNodeCompact" } - }, - "required": [ - "name", - "updated_at_millis" ] - } - ] - }, - "search_application._types.SearchApplicationParameters": { - "type": "object", - "properties": { - "indices": { - "description": "Indices that are part of the Search Application.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } }, - "analytics_collection_name": { - "$ref": "#/components/schemas/_types.Name" + "open_time": { + "description": "For open jobs only, the elapsed time for which the job has been open.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "template": { - "$ref": "#/components/schemas/search_application._types.SearchApplicationTemplate" - } - }, - "required": [ - "indices" - ] - }, - "search_application._types.SearchApplicationTemplate": { - "type": "object", - "properties": { - "script": { - "$ref": "#/components/schemas/_types.Script" - } - }, - "required": [ - "script" - ] - }, - "search_application._types.AnalyticsCollection": { - "type": "object", - "properties": { - "event_data_stream": { - "$ref": "#/components/schemas/search_application._types.EventDataStream" + "state": { + "description": "The status of the anomaly detection job, which can be one of the following values: `closed`, `closing`, `failed`, `opened`, `opening`.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobState" + } + ] + }, + "timing_stats": { + "description": "An object that provides statistical information about timing aspect of this job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobTimingStats" + } + ] + }, + "deleting": { + "description": "Indicates that the process of deleting the job is in progress but not yet completed. It is only reported when `true`.", + "type": "boolean" } }, "required": [ - "event_data_stream" + "data_counts", + "forecasts_stats", + "job_id", + "model_size_stats", + "state", + "timing_stats" ] }, - "search_application._types.EventDataStream": { + "ml._types.DataCounts": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.IndexName" - } - }, - "required": [ - "name" - ] - }, - "search_application._types.EventType": { - "type": "string", - "enum": [ - "page_view", - "search", - "search_click" - ] - }, - "search_application.put_behavioral_analytics.AnalyticsAcknowledgeResponseBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "bucket_count": { + "type": "number" }, - { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "earliest_record_timestamp": { + "type": "number" + }, + "empty_bucket_count": { + "type": "number" + }, + "input_bytes": { + "type": "number" + }, + "input_field_count": { + "type": "number" + }, + "input_record_count": { + "type": "number" + }, + "invalid_date_count": { + "type": "number" + }, + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - }, - "required": [ - "name" ] + }, + "last_data_time": { + "type": "number" + }, + "latest_empty_bucket_timestamp": { + "type": "number" + }, + "latest_record_timestamp": { + "type": "number" + }, + "latest_sparse_bucket_timestamp": { + "type": "number" + }, + "latest_bucket_timestamp": { + "type": "number" + }, + "log_time": { + "type": "number" + }, + "missing_field_count": { + "type": "number" + }, + "out_of_order_timestamp_count": { + "type": "number" + }, + "processed_field_count": { + "type": "number" + }, + "processed_record_count": { + "type": "number" + }, + "sparse_bucket_count": { + "type": "number" } + }, + "required": [ + "bucket_count", + "empty_bucket_count", + "input_bytes", + "input_field_count", + "input_record_count", + "invalid_date_count", + "job_id", + "missing_field_count", + "out_of_order_timestamp_count", + "processed_field_count", + "processed_record_count", + "sparse_bucket_count" ] }, - "_global.search_mvt._types.ZoomLevel": { - "type": "number" - }, - "_global.search_mvt._types.Coordinate": { - "type": "number" - }, - "_global.search_mvt._types.GridAggregationType": { - "type": "string", - "enum": [ - "geotile", - "geohex" - ] - }, - "_global.search_mvt._types.GridType": { - "type": "string", - "enum": [ - "grid", - "point", - "centroid" - ] - }, - "_types.MapboxVectorTiles": { - "type": "object" - }, - "_global.search_shards.SearchShardsNodeAttributes": { + "ml._types.JobForecastStatistics": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.NodeName" - }, - "ephemeral_id": { - "$ref": "#/components/schemas/_types.Id" + "memory_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" + } + ] }, - "transport_address": { - "$ref": "#/components/schemas/_types.TransportAddress" + "processing_time_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" + } + ] }, - "external_id": { - "type": "string" + "records": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" + } + ] }, - "attributes": { - "description": "Lists node attributes.", + "status": { "type": "object", "additionalProperties": { - "type": "string" + "type": "number" } }, - "roles": { - "$ref": "#/components/schemas/_types.NodeRoles" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "min_index_version": { + "total": { "type": "number" }, - "max_index_version": { + "forecasted_jobs": { "type": "number" } }, "required": [ - "name", - "ephemeral_id", - "transport_address", - "external_id", - "attributes", - "roles", - "version", - "min_index_version", - "max_index_version" + "total", + "forecasted_jobs" ] }, - "_types.NodeShard": { + "ml._types.JobStatistics": { "type": "object", "properties": { - "state": { - "$ref": "#/components/schemas/indices.stats.ShardRoutingState" + "avg": { + "type": "number" }, - "primary": { - "type": "boolean" + "max": { + "type": "number" }, - "node": { - "$ref": "#/components/schemas/_types.NodeName" + "min": { + "type": "number" }, - "shard": { + "total": { + "type": "number" + } + }, + "required": [ + "avg", + "max", + "min", + "total" + ] + }, + "ml._types.ModelSizeStats": { + "type": "object", + "properties": { + "bucket_allocation_failures_count": { "type": "number" }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "allocation_id": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.Id" - } + "log_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "recovery_source": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.Id" - } + "memory_status": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.MemoryStatus" + } + ] }, - "unassigned_info": { - "$ref": "#/components/schemas/cluster.allocation_explain.UnassignedInformation" + "model_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "relocating_node": { - "oneOf": [ + "model_bytes_exceeded": { + "allOf": [ { - "$ref": "#/components/schemas/_types.NodeId" - }, + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "model_bytes_memory_limit": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.ByteSize" } ] }, - "relocation_failure_info": { - "$ref": "#/components/schemas/_types.RelocationFailureInfo" - } - }, - "required": [ - "state", - "primary", - "shard", - "index" - ] - }, - "_types.RelocationFailureInfo": { - "type": "object", - "properties": { - "failed_attempts": { + "output_memory_allocator_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "peak_model_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "assignment_memory_basis": { + "type": "string" + }, + "result_type": { + "type": "string" + }, + "total_by_field_count": { "type": "number" - } - }, - "required": [ - "failed_attempts" - ] - }, - "_global.search_shards.ShardStoreIndex": { - "type": "object", - "properties": { - "aliases": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Name" - } }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - }, - "searchable_snapshots.cache_stats.Node": { - "type": "object", - "properties": { - "shared_cache": { - "$ref": "#/components/schemas/searchable_snapshots.cache_stats.Shared" - } - }, - "required": [ - "shared_cache" - ] - }, - "searchable_snapshots.cache_stats.Shared": { - "type": "object", - "properties": { - "reads": { + "total_over_field_count": { "type": "number" }, - "bytes_read_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" + "total_partition_field_count": { + "type": "number" }, - "writes": { + "categorization_status": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CategorizationStatus" + } + ] + }, + "categorized_doc_count": { "type": "number" }, - "bytes_written_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" + "dead_category_count": { + "type": "number" }, - "evictions": { + "failed_category_count": { "type": "number" }, - "num_regions": { + "frequent_category_count": { "type": "number" }, - "size_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" + "rare_category_count": { + "type": "number" }, - "region_size_in_bytes": { - "$ref": "#/components/schemas/_types.ByteSize" + "total_category_count": { + "type": "number" + }, + "timestamp": { + "type": "number" } }, "required": [ - "reads", - "bytes_read_in_bytes", - "writes", - "bytes_written_in_bytes", - "evictions", - "num_regions", - "size_in_bytes", - "region_size_in_bytes" + "bucket_allocation_failures_count", + "job_id", + "log_time", + "memory_status", + "model_bytes", + "result_type", + "total_by_field_count", + "total_over_field_count", + "total_partition_field_count", + "categorization_status", + "categorized_doc_count", + "dead_category_count", + "failed_category_count", + "frequent_category_count", + "rare_category_count", + "total_category_count" ] }, - "searchable_snapshots.mount.MountedSnapshot": { + "ml._types.JobTimingStats": { "type": "object", "properties": { - "snapshot": { - "$ref": "#/components/schemas/_types.Name" + "average_bucket_processing_time_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "bucket_count": { + "type": "number" }, - "shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - } - }, - "required": [ - "snapshot", - "indices", - "shards" - ] - }, - "searchable_snapshots._types.StatsLevel": { - "type": "string", - "enum": [ - "cluster", - "indices", - "shards" - ] - }, - "security._types.GrantType": { - "type": "string", - "enum": [ - "password", - "access_token" - ] - }, - "security._types.UserProfileWithMetadata": { - "allOf": [ - { - "$ref": "#/components/schemas/security._types.UserProfile" + "exponential_average_bucket_processing_time_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] }, - { - "type": "object", - "properties": { - "last_synchronized": { - "type": "number" - }, - "_doc": { - "$ref": "#/components/schemas/security._types.UserProfileHitMetadata" + "exponential_average_bucket_processing_time_per_hour_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" } - }, - "required": [ - "last_synchronized", - "_doc" ] - } - ] - }, - "security._types.UserProfileHitMetadata": { - "type": "object", - "properties": { - "_primary_term": { - "type": "number" }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "total_bucket_processing_time_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] + }, + "maximum_bucket_processing_time_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] + }, + "minimum_bucket_processing_time_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] } }, "required": [ - "_primary_term", - "_seq_no" + "bucket_count", + "exponential_average_bucket_processing_time_per_hour_ms", + "job_id", + "total_bucket_processing_time_ms" ] }, - "security._types.UserProfile": { + "ml._types.Job": { "type": "object", "properties": { - "uid": { - "$ref": "#/components/schemas/security._types.UserProfileId" + "allow_lazy_open": { + "description": "Advanced configuration option.\nSpecifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node.", + "type": "boolean" }, - "user": { - "$ref": "#/components/schemas/security._types.UserProfileUser" + "analysis_config": { + "description": "The analysis configuration, which specifies how to analyze the data.\nAfter you create a job, you cannot change the analysis configuration; all the properties are informational.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisConfig" + } + ] }, - "data": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "analysis_limits": { + "description": "Limits can be applied for the resources required to hold the mathematical models in memory.\nThese limits are approximate and can be set per job.\nThey do not control the memory used by other processes, for example the Elasticsearch Java processes.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisLimits" + } + ] }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "background_persist_interval": { + "description": "Advanced configuration option.\nThe time between each periodic persistence of the model.\nThe default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time.\nThe smallest allowed value is 1 hour.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "enabled": { - "type": "boolean" - } - }, - "required": [ - "uid", - "user", - "data", - "labels" - ] - }, - "security._types.UserProfileId": { - "type": "string" - }, - "security._types.UserProfileUser": { - "type": "object", - "properties": { - "email": { - "oneOf": [ + "blocked": { + "allOf": [ { - "type": "string" - }, + "$ref": "#/components/schemas/ml._types.JobBlocked" + } + ] + }, + "create_time": { + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.DateTime" } ] }, - "full_name": { - "oneOf": [ + "custom_settings": { + "description": "Advanced configuration option.\nContains custom metadata about the job.", + "allOf": [ { - "$ref": "#/components/schemas/_types.Name" - }, + "$ref": "#/components/schemas/ml._types.CustomSettings" + } + ] + }, + "daily_model_snapshot_retention_after_days": { + "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies a period of time (in days) after which only the first snapshot per day is retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nValid values range from 0 to `model_snapshot_retention_days`.", + "default": 1.0, + "type": "number" + }, + "data_description": { + "description": "The data description defines the format of the input data when you send data to the job by using the post data API.\nNote that when configuring a datafeed, these properties are automatically set.\nWhen data is received via the post data API, it is not stored in Elasticsearch.\nOnly the results for anomaly detection are retained.", + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/ml._types.DataDescription" } ] }, - "realm_name": { - "$ref": "#/components/schemas/_types.Name" + "datafeed_config": { + "description": "The datafeed, which retrieves data from Elasticsearch for analysis by the job.\nYou can associate only one datafeed with each anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Datafeed" + } + ] }, - "realm_domain": { - "$ref": "#/components/schemas/_types.Name" + "deleting": { + "description": "Indicates that the process of deleting the job is in progress but not yet completed.\nIt is only reported when `true`.", + "type": "boolean" }, - "roles": { + "description": { + "description": "A description of the job.", + "type": "string" + }, + "finished_time": { + "description": "If the job closed or failed, this is the time the job finished, otherwise it is `null`.\nThis property is informational; you cannot change its value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "groups": { + "description": "A list of job groups.\nA job can belong to no groups or many.", "type": "array", "items": { "type": "string" } }, - "username": { - "$ref": "#/components/schemas/_types.Username" - } - }, - "required": [ - "realm_name", - "roles", - "username" - ] - }, - "security.authenticate.AuthenticateApiKey": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "job_id": { + "description": "Identifier for the anomaly detection job.\nThis identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.\nIt must start and end with alphanumeric characters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "job_type": { + "description": "Reserved for future use, currently set to `anomaly_detector`.", + "type": "string" + }, + "job_version": { + "description": "The machine learning configuration version number at which the the job was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "model_plot_config": { + "description": "This advanced configuration option stores model information along with the results.\nIt provides a more detailed view into anomaly detection.\nModel plot provides a simplified and indicative view of the model and its bounds.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelPlotConfig" + } + ] + }, + "model_snapshot_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "model_snapshot_retention_days": { + "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies the maximum period of time (in days) that snapshots are retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nBy default, snapshots ten days older than the newest snapshot are deleted.", + "type": "number" + }, + "renormalization_window_days": { + "description": "Advanced configuration option.\nThe period over which adjustments to the score are applied, as new data is seen.\nThe default value is the longer of 30 days or 100 `bucket_spans`.", + "type": "number" + }, + "results_index_name": { + "description": "A text string that affects the name of the machine learning results index.\nThe default value is `shared`, which generates an index named `.ml-anomalies-shared`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "results_retention_days": { + "description": "Advanced configuration option.\nThe period of time (in days) that results are retained.\nAge is calculated relative to the timestamp of the latest bucket result.\nIf 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.\nThe default value is null, which means all results are retained.\nAnnotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results.\nAnnotations added by users are retained forever.", + "type": "number" } }, "required": [ - "id" + "allow_lazy_open", + "analysis_config", + "data_description", + "job_id", + "model_snapshot_retention_days", + "results_index_name" ] }, - "security._types.RealmInfo": { + "ml._types.AnalysisLimits": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "categorization_examples_limit": { + "description": "The maximum number of examples stored per category in memory and in the results data store. If you increase this value, more examples are available, however it requires that you have more storage available. If you set this value to 0, no examples are stored. NOTE: The `categorization_examples_limit` applies only to analysis that uses categorization.", + "default": 4.0, + "type": "number" }, - "type": { - "type": "string" + "model_memory_limit": { + "description": "The approximate maximum amount of memory resources that are required for analytical processing. Once this limit is approached, data pruning becomes more aggressive. Upon exceeding this limit, new entities are not modeled. If the `xpack.ml.max_model_memory_limit` setting has a value greater than 0 and less than 1024mb, that value is used instead of the default. The default value is relatively small to ensure that high resource usage is a conscious decision. If you have jobs that are expected to analyze high cardinality fields, you will likely need to use a higher value. If you specify a number instead of a string, the units are assumed to be MiB. Specifying a string is recommended for clarity. If you specify a byte size unit of `b` or `kb` and the number does not equate to a discrete number of megabytes, it is rounded down to the closest MiB. The minimum valid value is 1 MiB. If you specify a value less than 1 MiB, an error occurs. If you specify a value for the `xpack.ml.max_model_memory_limit` setting, an error occurs when you try to create jobs that have `model_memory_limit` values greater than that setting value.", + "default": "1024mb", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] } - }, - "required": [ - "name", - "type" - ] + } }, - "security.authenticate.Token": { + "ml._types.JobBlocked": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "reason": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobBlockedReason" + } + ] }, - "type": { - "type": "string" + "task_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TaskId" + } + ] } }, "required": [ - "name" + "reason" ] }, - "security._types.BulkError": { - "type": "object", - "properties": { - "count": { - "description": "The number of errors", - "type": "number" - }, - "details": { - "description": "Details about the errors, keyed by role name", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ErrorCause" - } - } - }, - "required": [ - "count", - "details" + "ml._types.JobBlockedReason": { + "type": "string", + "enum": [ + "delete", + "reset", + "revert" ] }, - "security._types.RoleDescriptor": { + "ml._types.CustomSettings": { + "description": "Custom metadata about the job", + "type": "object" + }, + "ml._types.DataDescription": { "type": "object", "properties": { - "cluster": { - "description": "A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ClusterPrivilege" - } - }, - "indices": { - "description": "A list of indices permissions entries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.IndicesPrivileges" - } - }, - "remote_indices": { - "description": "A list of indices permissions for remote clusters.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" - } - }, - "remote_cluster": { - "description": "A list of cluster permissions for remote clusters.\nNOTE: This is limited a subset of the cluster permissions.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" - } + "format": { + "description": "Only JSON format is supported at this time.", + "type": "string" }, - "global": { - "description": "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.", - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.GlobalPrivilege" - } - }, + "time_field": { + "description": "The name of the field that contains the timestamp.", + "default": "time", + "allOf": [ { - "$ref": "#/components/schemas/security._types.GlobalPrivilege" + "$ref": "#/components/schemas/_types.Field" } ] }, - "applications": { - "description": "A list of application privilege entries", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ApplicationPrivileges" - } - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "run_as": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users" - }, - "description": "A list of users that the API keys can impersonate.\nNOTE: In Elastic Cloud Serverless, the run-as feature is disabled.\nFor API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "description": "Optional description of the role descriptor", + "time_format": { + "description": "The time format, which can be `epoch`, `epoch_ms`, or a custom pattern. The value `epoch` refers to UNIX or Epoch time (the number of seconds since 1 Jan 1970). The value `epoch_ms` indicates that time is measured in milliseconds since the epoch. The `epoch` and `epoch_ms` time formats accept either integer or real values. Custom patterns must conform to the Java DateTimeFormatter class. When you use date-time formatting patterns, it is recommended that you provide the full date, time and time zone. For example: `yyyy-MM-dd'T'HH:mm:ssX`. If the pattern that you specify is not sufficient to produce a complete timestamp, job creation fails.", + "default": "epoch", "type": "string" }, - "restriction": { - "$ref": "#/components/schemas/security._types.Restriction" - }, - "transient_metadata": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "field_delimiter": { + "type": "string" } } }, - "security._types.ClusterPrivilege": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "cancel_task", - "create_snapshot", - "cross_cluster_replication", - "cross_cluster_search", - "delegate_pki", - "grant_api_key", - "manage", - "manage_api_key", - "manage_autoscaling", - "manage_behavioral_analytics", - "manage_ccr", - "manage_data_frame_transforms", - "manage_data_stream_global_retention", - "manage_enrich", - "manage_esql", - "manage_ilm", - "manage_index_templates", - "manage_inference", - "manage_ingest_pipelines", - "manage_logstash_pipelines", - "manage_ml", - "manage_oidc", - "manage_own_api_key", - "manage_pipeline", - "manage_rollup", - "manage_saml", - "manage_search_application", - "manage_search_query_rules", - "manage_search_synonyms", - "manage_security", - "manage_service_account", - "manage_slm", - "manage_token", - "manage_transform", - "manage_user_profile", - "manage_watcher", - "monitor", - "monitor_data_frame_transforms", - "monitor_data_stream_global_retention", - "monitor_enrich", - "monitor_esql", - "monitor_inference", - "monitor_ml", - "monitor_rollup", - "monitor_snapshot", - "monitor_stats", - "monitor_text_structure", - "monitor_transform", - "monitor_watcher", - "none", - "post_behavioral_analytics_event", - "read_ccr", - "read_fleet_secrets", - "read_ilm", - "read_pipeline", - "read_security", - "read_slm", - "transport_client", - "write_connector_secrets", - "write_fleet_secrets" - ] + "ml._types.ModelPlotConfig": { + "type": "object", + "properties": { + "annotations_enabled": { + "description": "If true, enables calculation and storage of the model change annotations for each entity that is being analyzed.", + "default": true, + "x-state": "Generally available; Added in 7.9.0", + "type": "boolean" }, - { - "type": "string" + "enabled": { + "description": "If true, enables calculation and storage of the model bounds for each entity that is being analyzed.", + "default": false, + "type": "boolean" + }, + "terms": { + "description": "Limits data collection to this comma separated list of partition or by field values. If terms are not specified or it is an empty string, no filtering is applied. Wildcards are not supported. Only the specified terms can be viewed when using the Single Metric Viewer.", + "x-state": "Generally available; Added in 7.9.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] } - ] + } }, - "security._types.IndicesPrivileges": { + "ml.get_memory_stats.Memory": { "type": "object", "properties": { - "field_security": { - "$ref": "#/components/schemas/security._types.FieldSecurity" + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "names": { - "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "oneOf": [ + "jvm": { + "description": "Contains Java Virtual Machine (JVM) statistics for the node.", + "allOf": [ { - "$ref": "#/components/schemas/_types.IndexName" - }, + "$ref": "#/components/schemas/ml.get_memory_stats.JvmStats" + } + ] + }, + "mem": { + "description": "Contains statistics about memory usage for the node.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } + "$ref": "#/components/schemas/ml.get_memory_stats.MemStats" } ] }, - "privileges": { - "description": "The index level privileges that owners of the role have on the specified indices.", + "name": { + "description": "Human-readable identifier for the node. Based on the Node name setting setting.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "roles": { + "description": "Roles assigned to the node.", "type": "array", "items": { - "$ref": "#/components/schemas/security._types.IndexPrivilege" + "type": "string" } }, - "query": { - "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" + "transport_address": { + "description": "The host and port where transport HTTP connections are accepted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] }, - "allow_restricted_indices": { - "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", - "type": "boolean" + "ephemeral_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] } }, "required": [ - "names", - "privileges" + "attributes", + "jvm", + "mem", + "name", + "roles", + "transport_address", + "ephemeral_id" ] }, - "security._types.FieldSecurity": { + "ml.get_memory_stats.JvmStats": { "type": "object", "properties": { - "except": { - "$ref": "#/components/schemas/_types.Fields" + "heap_max": { + "description": "Maximum amount of memory available for use by the heap.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "grant": { - "$ref": "#/components/schemas/_types.Fields" - } - } - }, - "security._types.IndexPrivilege": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "auto_configure", - "create", - "create_doc", - "create_index", - "cross_cluster_replication", - "cross_cluster_replication_internal", - "delete", - "delete_index", - "index", - "maintenance", - "manage", - "manage_data_stream_lifecycle", - "manage_follow_index", - "manage_ilm", - "manage_leader_index", - "monitor", - "none", - "read", - "read_cross_cluster", - "view_index_metadata", - "write" + "heap_max_in_bytes": { + "description": "Maximum amount of memory, in bytes, available for use by the heap.", + "type": "number" + }, + "java_inference": { + "description": "Amount of Java heap currently being used for caching inference models.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } ] }, - { - "type": "string" - } - ] - }, - "security._types.IndicesPrivilegesQuery": { - "description": "While creating or updating a role you can provide either a JSON structure or a string to the API.\nHowever, the response provided by Elasticsearch will only be string with a json-as-text content.\n\nSince this is embedded in `IndicesPrivileges`, the same structure is used for clarity in both contexts.", - "oneOf": [ - { - "type": "string" + "java_inference_in_bytes": { + "description": "Amount of Java heap, in bytes, currently being used for caching inference models.", + "type": "number" }, - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "java_inference_max": { + "description": "Maximum amount of Java heap to be used for caching inference models.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - { - "$ref": "#/components/schemas/security._types.RoleTemplateQuery" + "java_inference_max_in_bytes": { + "description": "Maximum amount of Java heap, in bytes, to be used for caching inference models.", + "type": "number" } + }, + "required": [ + "heap_max_in_bytes", + "java_inference_in_bytes", + "java_inference_max_in_bytes" ] }, - "security._types.RoleTemplateQuery": { - "type": "object", - "properties": { - "template": { - "$ref": "#/components/schemas/security._types.RoleTemplateScript" - } - } - }, - "security._types.RoleTemplateScript": { + "ml.get_memory_stats.MemStats": { "type": "object", "properties": { - "source": { - "$ref": "#/components/schemas/security._types.RoleTemplateInlineQuery" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "adjusted_total": { + "description": "If the amount of physical memory has been overridden using the es.total_memory_bytes system property\nthen this reports the overridden value. Otherwise it reports the same value as total.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "params": { - "description": "Specifies any named parameters that are passed into the script as variables.\nUse parameters instead of hard-coded values to decrease compile time.", - "type": "object", - "additionalProperties": { - "type": "object" - } + "adjusted_total_in_bytes": { + "description": "If the amount of physical memory has been overridden using the `es.total_memory_bytes` system property\nthen this reports the overridden value in bytes. Otherwise it reports the same value as `total_in_bytes`.", + "type": "number" }, - "lang": { - "$ref": "#/components/schemas/_types.ScriptLanguage" + "total": { + "description": "Total amount of physical memory.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "security._types.RoleTemplateInlineQuery": { - "oneOf": [ - { - "type": "string" + "total_in_bytes": { + "description": "Total amount of physical memory in bytes.", + "type": "number" }, - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "ml": { + "description": "Contains statistics about machine learning use of native memory on the node.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.get_memory_stats.MemMlStats" + } + ] } + }, + "required": [ + "adjusted_total_in_bytes", + "total_in_bytes", + "ml" ] }, - "security._types.RemoteIndicesPrivileges": { + "ml.get_memory_stats.MemMlStats": { "type": "object", "properties": { - "clusters": { - "$ref": "#/components/schemas/_types.Names" + "anomaly_detectors": { + "description": "Amount of native memory set aside for anomaly detection jobs.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "field_security": { - "$ref": "#/components/schemas/security._types.FieldSecurity" + "anomaly_detectors_in_bytes": { + "description": "Amount of native memory, in bytes, set aside for anomaly detection jobs.", + "type": "number" }, - "names": { - "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "oneOf": [ + "data_frame_analytics": { + "description": "Amount of native memory set aside for data frame analytics jobs.", + "allOf": [ { - "$ref": "#/components/schemas/_types.IndexName" - }, + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "data_frame_analytics_in_bytes": { + "description": "Amount of native memory, in bytes, set aside for data frame analytics jobs.", + "type": "number" + }, + "max": { + "description": "Maximum amount of native memory (separate to the JVM heap) that may be used by machine learning native processes.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } + "$ref": "#/components/schemas/_types.ByteSize" } ] }, - "privileges": { - "description": "The index level privileges that owners of the role have on the specified indices.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.IndexPrivilege" - } + "max_in_bytes": { + "description": "Maximum amount of native memory (separate to the JVM heap), in bytes, that may be used by machine learning native processes.", + "type": "number" }, - "query": { - "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" + "native_code_overhead": { + "description": "Amount of native memory set aside for loading machine learning native code shared libraries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "native_code_overhead_in_bytes": { + "description": "Amount of native memory, in bytes, set aside for loading machine learning native code shared libraries.", + "type": "number" + }, + "native_inference": { + "description": "Amount of native memory set aside for trained models that have a PyTorch model_type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "allow_restricted_indices": { - "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", - "type": "boolean" + "native_inference_in_bytes": { + "description": "Amount of native memory, in bytes, set aside for trained models that have a PyTorch model_type.", + "type": "number" } }, "required": [ - "clusters", - "names", - "privileges" + "anomaly_detectors_in_bytes", + "data_frame_analytics_in_bytes", + "max_in_bytes", + "native_code_overhead_in_bytes", + "native_inference_in_bytes" ] }, - "security._types.RemoteClusterPrivileges": { + "ml._types.ModelSnapshotUpgrade": { "type": "object", "properties": { - "clusters": { - "$ref": "#/components/schemas/_types.Names" + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "privileges": { - "description": "The cluster level privileges that owners of the role have on the remote cluster.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteClusterPrivilege" - } + "snapshot_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.SnapshotUpgradeState" + } + ] + }, + "node": { + "x-state": "Generally available", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DiscoveryNode" + } + ] + }, + "assignment_explanation": { + "type": "string" } }, "required": [ - "clusters", - "privileges" + "job_id", + "snapshot_id", + "state", + "node", + "assignment_explanation" ] }, - "security._types.RemoteClusterPrivilege": { + "ml._types.SnapshotUpgradeState": { "type": "string", "enum": [ - "monitor_enrich", - "monitor_stats" - ] - }, - "security._types.GlobalPrivilege": { - "type": "object", - "properties": { - "application": { - "$ref": "#/components/schemas/security._types.ApplicationGlobalUserPrivileges" - } - }, - "required": [ - "application" - ] - }, - "security._types.ApplicationGlobalUserPrivileges": { - "type": "object", - "properties": { - "manage": { - "$ref": "#/components/schemas/security._types.ManageUserPrivileges" - } - }, - "required": [ - "manage" + "loading_old_state", + "saving_new_state", + "stopped", + "failed" ] }, - "security._types.ManageUserPrivileges": { + "ml._types.DiscoveryNode": { "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - } + "additionalProperties": { + "$ref": "#/components/schemas/ml._types.DiscoveryNodeContent" }, - "required": [ - "applications" - ] + "minProperties": 1, + "maxProperties": 1 }, - "security._types.ApplicationPrivileges": { + "ml._types.DiscoveryNodeContent": { "type": "object", "properties": { - "application": { - "description": "The name of the application to which this entry applies.", + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "ephemeral_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "transport_address": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] + }, + "external_id": { "type": "string" }, - "privileges": { - "description": "A list of strings, where each element is the name of an application privilege or action.", - "type": "array", - "items": { + "attributes": { + "type": "object", + "additionalProperties": { "type": "string" } }, - "resources": { - "description": "A list resources to which the privileges are applied.", + "roles": { "type": "array", "items": { "type": "string" } - } - }, - "required": [ - "application", - "privileges", - "resources" - ] - }, - "security._types.Restriction": { - "type": "object", - "properties": { - "workflows": { - "description": "A list of workflows to which the API key is restricted.\nNOTE: In order to use a role restriction, an API key must be created with a single role descriptor.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RestrictionWorkflow" - } - } - }, - "required": [ - "workflows" - ] - }, - "security._types.RestrictionWorkflow": { - "anyOf": [ - { - "type": "string", - "enum": [ - "search_application_query" + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } ] }, - { - "type": "string" - } - ] - }, - "security._types.ClusterNode": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "min_index_version": { + "type": "number" + }, + "max_index_version": { + "type": "number" } }, "required": [ - "name" + "ephemeral_id", + "transport_address", + "external_id", + "attributes", + "roles", + "version", + "min_index_version", + "max_index_version" ] }, - "_types.Namespace": { - "type": "string" - }, - "_types.Service": { - "type": "string" - }, - "security._types.Access": { + "ml._types.ModelSnapshot": { "type": "object", "properties": { - "replication": { - "description": "A list of indices permission entries for cross-cluster replication.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ReplicationAccess" - } + "description": { + "description": "An optional description of the job.", + "type": "string" }, - "search": { - "description": "A list of indices permission entries for cross-cluster search.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.SearchAccess" - } - } - } - }, - "security._types.ReplicationAccess": { - "type": "object", - "properties": { - "names": { - "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "oneOf": [ + "job_id": { + "description": "A numerical character string that uniquely identifies the job that the snapshot was created for.", + "allOf": [ { - "$ref": "#/components/schemas/_types.IndexName" - }, + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "latest_record_time_stamp": { + "description": "The timestamp of the latest processed record.", + "type": "number" + }, + "latest_result_time_stamp": { + "description": "The timestamp of the latest bucket result.", + "type": "number" + }, + "min_version": { + "description": "The minimum version required to be able to restore the model snapshot.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } + "$ref": "#/components/schemas/_types.VersionString" } ] }, - "allow_restricted_indices": { - "description": "This needs to be set to true if the patterns in the names field should cover system indices.", + "model_size_stats": { + "description": "Summary information describing the model.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelSizeStats" + } + ] + }, + "retain": { + "description": "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. The default value is false.", "type": "boolean" + }, + "snapshot_doc_count": { + "description": "For internal use only.", + "type": "number" + }, + "snapshot_id": { + "description": "A numerical character string that uniquely identifies the model snapshot.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "timestamp": { + "description": "The creation timestamp for the snapshot.", + "type": "number" } }, "required": [ - "names" + "job_id", + "min_version", + "retain", + "snapshot_doc_count", + "snapshot_id", + "timestamp" ] }, - "security._types.SearchAccess": { + "ml._types.OverallBucket": { "type": "object", "properties": { - "field_security": { - "$ref": "#/components/schemas/security._types.FieldSecurity" - }, - "names": { - "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.IndexName" - }, + "bucket_span": { + "description": "The length of the bucket in seconds. Matches the job with the longest bucket_span value.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } + "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" } ] }, - "query": { - "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" - }, - "allow_restricted_indices": { - "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "is_interim": { + "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", "type": "boolean" + }, + "jobs": { + "description": "An array of objects that contain the max_anomaly_score per job_id.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.OverallBucketJob" + } + }, + "overall_score": { + "description": "The top_n average of the maximum bucket anomaly_score per job.", + "type": "number" + }, + "result_type": { + "description": "Internal. This is always set to overall_bucket.", + "type": "string" + }, + "timestamp": { + "description": "The start time of the bucket for which these results were calculated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "timestamp_string": { + "description": "The start time of the bucket for which these results were calculated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] } }, "required": [ - "names" + "bucket_span", + "is_interim", + "jobs", + "overall_score", + "result_type", + "timestamp" ] }, - "security.create_service_token.Token": { + "ml._types.OverallBucketJob": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "value": { - "type": "string" + "max_anomaly_score": { + "type": "number" } }, "required": [ - "name", - "value" + "job_id", + "max_anomaly_score" ] }, - "security.delegate_pki.Authentication": { + "ml._types.Anomaly": { "type": "object", "properties": { - "username": { - "type": "string" - }, - "roles": { + "actual": { + "description": "The actual value for the bucket.", "type": "array", "items": { - "type": "string" + "type": "number" } }, - "full_name": { - "oneOf": [ - { - "type": "string" - }, + "anomaly_score_explanation": { + "description": "Information about the factors impacting the initial anomaly score.", + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/ml._types.AnomalyExplanation" } ] }, - "email": { - "oneOf": [ - { - "type": "string" - }, + "bucket_span": { + "description": "The length of the bucket in seconds. This value matches the `bucket_span` that is specified in the job.", + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/_types.DurationValueUnitSeconds" } ] }, - "token": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "enabled": { - "type": "boolean" - }, - "authentication_realm": { - "$ref": "#/components/schemas/security.delegate_pki.AuthenticationRealm" - }, - "lookup_realm": { - "$ref": "#/components/schemas/security.delegate_pki.AuthenticationRealm" + "by_field_name": { + "description": "The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split.", + "type": "string" }, - "authentication_type": { + "by_field_value": { + "description": "The value of `by_field_name`.", "type": "string" }, - "api_key": { - "type": "object", - "additionalProperties": { - "type": "string" + "causes": { + "description": "For population analysis, an over field must be specified in the detector. This property contains an array of anomaly records that are the causes for the anomaly that has been identified for the over field. This sub-resource contains the most anomalous records for the `over_field_name`. For scalability reasons, a maximum of the 10 most significant causes of the anomaly are returned. As part of the core analytical modeling, these low-level anomaly records are aggregated for their parent over field record. The `causes` resource contains similar elements to the record resource, namely `actual`, `typical`, `geo_results.actual_point`, `geo_results.typical_point`, `*_field_name` and `*_field_value`. Probability and scores are not applicable to causes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.AnomalyCause" } - } - }, - "required": [ - "username", - "roles", - "full_name", - "email", - "metadata", - "enabled", - "authentication_realm", - "lookup_realm", - "authentication_type" - ] - }, - "security.delegate_pki.AuthenticationRealm": { - "type": "object", - "properties": { - "name": { - "type": "string" }, - "type": { - "type": "string" + "detector_index": { + "description": "A unique identifier for the detector.", + "type": "number" }, - "domain": { - "type": "string" - } - }, - "required": [ - "name", - "type" - ] - }, - "security.delete_privileges.FoundStatus": { - "type": "object", - "properties": { - "found": { - "type": "boolean" - } - }, - "required": [ - "found" - ] - }, - "security.enroll_kibana.Token": { - "type": "object", - "properties": { - "name": { - "description": "The name of the bearer token for the `elastic/kibana` service account.", + "field_name": { + "description": "Certain functions require a field to operate on, for example, `sum()`. For those functions, this value is the name of the field to be analyzed.", "type": "string" }, - "value": { - "description": "The value of the bearer token for the `elastic/kibana` service account.\nUse this value to authenticate the service account with Elasticsearch.", + "function": { + "description": "The function in which the anomaly occurs, as specified in the detector configuration. For example, `max`.", "type": "string" - } - }, - "required": [ - "name", - "value" - ] - }, - "security._types.ApiKey": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "function_description": { + "description": "The description of the function in which the anomaly occurs, as specified in the detector configuration.", + "type": "string" }, - "type": { - "$ref": "#/components/schemas/security._types.ApiKeyType" + "geo_results": { + "description": "If the detector function is `lat_long`, this object contains comma delimited strings for the latitude and longitude of the actual and typical values.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.GeoResults" + } + ] }, - "creation": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "influencers": { + "description": "If influencers were specified in the detector configuration, this array contains influencers that contributed to or were to blame for an anomaly.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Influence" + } }, - "expiration": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "initial_record_score": { + "description": "A normalized score between 0-100, which is based on the probability of the anomalousness of this record. This is the initial value that was calculated at the time the bucket was processed.", + "type": "number" }, - "invalidated": { - "description": "Invalidation status for the API key.\nIf the key has been invalidated, it has a value of `true`. Otherwise, it is `false`.", + "is_interim": { + "description": "If true, this is an interim result. In other words, the results are calculated based on partial input data.", "type": "boolean" }, - "invalidation": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "username": { - "$ref": "#/components/schemas/_types.Username" + "job_id": { + "description": "Identifier for the anomaly detection job.", + "type": "string" }, - "realm": { - "description": "Realm name of the principal for which this API key was created.", + "over_field_name": { + "description": "The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits.", "type": "string" }, - "realm_type": { - "description": "Realm type of the principal for which this API key was created", + "over_field_value": { + "description": "The value of `over_field_name`.", "type": "string" }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "partition_field_name": { + "description": "The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field.", + "type": "string" }, - "role_descriptors": { - "description": "The role descriptors assigned to this API key when it was created or last updated.\nAn empty role descriptor means the API key inherits the owner user’s permissions.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleDescriptor" - } + "partition_field_value": { + "description": "The value of `partition_field_name`.", + "type": "string" }, - "limited_by": { - "description": "The owner user’s permissions associated with the API key.\nIt is a point-in-time snapshot captured at creation and subsequent updates.\nAn API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleDescriptor" - } - } + "probability": { + "description": "The probability of the individual anomaly occurring, in the range 0 to 1. For example, `0.0000772031`. This value can be held to a high precision of over 300 decimal places, so the `record_score` is provided as a human-readable and friendly interpretation of this.", + "type": "number" }, - "access": { - "$ref": "#/components/schemas/security._types.Access" + "record_score": { + "description": "A normalized score between 0-100, which is based on the probability of the anomalousness of this record. Unlike `initial_record_score`, this value will be updated by a re-normalization process as new data is analyzed.", + "type": "number" }, - "profile_uid": { - "description": "The profile uid for the API key owner principal, if requested and if it exists", + "result_type": { + "description": "Internal. This is always set to `record`.", "type": "string" }, - "_sort": { - "$ref": "#/components/schemas/_types.SortResults" + "timestamp": { + "description": "The start time of the bucket for which these results were calculated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "typical": { + "description": "The typical value for the bucket, according to analytical modeling.", + "type": "array", + "items": { + "type": "number" + } } }, "required": [ - "id", - "name", - "type", - "creation", - "invalidated", - "username", - "realm", - "metadata" - ] - }, - "security._types.ApiKeyType": { - "type": "string", - "enum": [ - "rest", - "cross_cluster" + "bucket_span", + "detector_index", + "initial_record_score", + "is_interim", + "job_id", + "probability", + "record_score", + "result_type", + "timestamp" ] }, - "security.put_privileges.Actions": { + "ml._types.AnomalyExplanation": { "type": "object", "properties": { - "actions": { - "type": "array", - "items": { - "type": "string" - } + "anomaly_characteristics_impact": { + "description": "Impact from the duration and magnitude of the detected anomaly relative to the historical average.", + "type": "number" }, - "application": { + "anomaly_length": { + "description": "Length of the detected anomaly in the number of buckets.", + "type": "number" + }, + "anomaly_type": { + "description": "Type of the detected anomaly: `spike` or `dip`.", "type": "string" }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "high_variance_penalty": { + "description": "Indicates reduction of anomaly score for the bucket with large confidence intervals. If a bucket has large confidence intervals, the score is reduced.", + "type": "boolean" }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "incomplete_bucket_penalty": { + "description": "If the bucket contains fewer samples than expected, the score is reduced.", + "type": "boolean" + }, + "lower_confidence_bound": { + "description": "Lower bound of the 95% confidence interval.", + "type": "number" + }, + "multi_bucket_impact": { + "description": "Impact of the deviation between actual and typical values in the past 12 buckets.", + "type": "number" + }, + "single_bucket_impact": { + "description": "Impact of the deviation between actual and typical values in the current bucket.", + "type": "number" + }, + "typical_value": { + "description": "Typical (expected) value for this bucket.", + "type": "number" + }, + "upper_confidence_bound": { + "description": "Upper bound of the 95% confidence interval.", + "type": "number" } - }, - "required": [ - "actions" - ] + } }, - "security.get_role.Role": { + "ml._types.AnomalyCause": { "type": "object", "properties": { - "cluster": { + "actual": { "type": "array", "items": { - "$ref": "#/components/schemas/security._types.ClusterPrivilege" + "type": "number" } }, - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.IndicesPrivileges" - } + "by_field_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "remote_indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" - } + "by_field_value": { + "type": "string" }, - "remote_cluster": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" - } + "correlated_by_field_value": { + "type": "string" }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "field_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "description": { + "function": { "type": "string" }, - "run_as": { - "type": "array", - "items": { - "type": "string" - } + "function_description": { + "type": "string" }, - "transient_metadata": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "geo_results": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.GeoResults" + } + ] }, - "applications": { + "influencers": { "type": "array", "items": { - "$ref": "#/components/schemas/security._types.ApplicationPrivileges" + "$ref": "#/components/schemas/ml._types.Influence" } }, - "role_templates": { + "over_field_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "over_field_value": { + "type": "string" + }, + "partition_field_name": { + "type": "string" + }, + "partition_field_value": { + "type": "string" + }, + "probability": { + "type": "number" + }, + "typical": { "type": "array", "items": { - "$ref": "#/components/schemas/security._types.RoleTemplate" - } - }, - "global": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } + "type": "number" } } }, "required": [ - "cluster", - "indices", - "metadata", - "applications" + "probability" ] }, - "security._types.RoleTemplate": { + "ml._types.GeoResults": { "type": "object", "properties": { - "format": { - "$ref": "#/components/schemas/security._types.TemplateFormat" + "actual_point": { + "description": "The actual value for the bucket formatted as a `geo_point`.", + "type": "string" }, - "template": { - "$ref": "#/components/schemas/_types.Script" + "typical_point": { + "description": "The typical value for the bucket formatted as a `geo_point`.", + "type": "string" } - }, - "required": [ - "template" - ] - }, - "security._types.TemplateFormat": { - "type": "string", - "enum": [ - "string", - "json" - ] + } }, - "security._types.RoleMapping": { + "ml._types.Influence": { "type": "object", "properties": { - "enabled": { - "type": "boolean" - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "influencer_field_name": { + "type": "string" }, - "roles": { + "influencer_field_values": { "type": "array", "items": { "type": "string" } - }, - "role_templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RoleTemplate" - } - }, - "rules": { - "$ref": "#/components/schemas/security._types.RoleMappingRule" } }, "required": [ - "enabled", - "metadata", - "rules" + "influencer_field_name", + "influencer_field_values" ] }, - "security._types.RoleMappingRule": { + "ml._types.Include": { + "type": "string", + "enum": [ + "definition", + "feature_importance_baseline", + "hyperparameters", + "total_feature_importance", + "definition_status" + ] + }, + "ml._types.TrainedModelConfig": { "type": "object", "properties": { - "any": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RoleMappingRule" - } + "model_id": { + "description": "Identifier for the trained model.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "all": { + "model_type": { + "description": "The model type", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelType" + } + ] + }, + "tags": { + "description": "A comma delimited string of tags. A trained model can have many tags, or none.", "type": "array", "items": { - "$ref": "#/components/schemas/security._types.RoleMappingRule" + "type": "string" } }, - "field": { + "version": { + "description": "The Elasticsearch version number in which the trained model was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "compressed_definition": { + "type": "string" + }, + "created_by": { + "description": "Information on the creator of the trained model.", + "type": "string" + }, + "create_time": { + "description": "The time when the trained model was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "default_field_map": { + "description": "Any field map described in the inference configuration takes precedence.", "type": "object", "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.FieldValue" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.FieldValue" - } - } - ] - }, - "minProperties": 1, - "maxProperties": 1 + "type": "string" + } }, - "except": { - "$ref": "#/components/schemas/security._types.RoleMappingRule" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "security.get_service_accounts.RoleDescriptorWrapper": { - "type": "object", - "properties": { - "role_descriptor": { - "$ref": "#/components/schemas/security._types.RoleDescriptorRead" + "description": { + "description": "The free-text description of the trained model.", + "type": "string" + }, + "estimated_heap_memory_usage_bytes": { + "description": "The estimated heap usage in bytes to keep the trained model in memory.", + "type": "number" + }, + "estimated_operations": { + "description": "The estimated number of operations to use the trained model.", + "type": "number" + }, + "fully_defined": { + "description": "True if the full model definition is present.", + "type": "boolean" + }, + "inference_config": { + "description": "The default configuration for inference. This can be either a regression, classification, or one of the many NLP focused configurations. It must match the underlying definition.trained_model's target_type. For pre-packaged models such as ELSER the config is not required.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.InferenceConfigCreateContainer" + } + ] + }, + "input": { + "description": "The input field names for the model definition.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelConfigInput" + } + ] + }, + "license_level": { + "description": "The license level of the trained model.", + "type": "string" + }, + "metadata": { + "description": "An object containing metadata about the trained model. For example, models created by data frame analytics contain analysis_config and input objects.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelConfigMetadata" + } + ] + }, + "model_size_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "model_package": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelPackageConfig" + } + ] + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelLocation" + } + ] + }, + "platform_architecture": { + "type": "string" + }, + "prefix_strings": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelPrefixStrings" + } + ] } }, "required": [ - "role_descriptor" + "model_id", + "tags", + "input" ] }, - "security._types.RoleDescriptorRead": { + "ml._types.TrainedModelType": { + "type": "string", + "enum": [ + "tree_ensemble", + "lang_ident", + "pytorch" + ] + }, + "ml._types.InferenceConfigCreateContainer": { + "description": "Inference configuration provided when storing the model config", "type": "object", "properties": { - "cluster": { - "description": "A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ClusterPrivilege" - } + "regression": { + "description": "Regression configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.RegressionInferenceOptions" + } + ] }, - "indices": { - "description": "A list of indices permissions entries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.IndicesPrivileges" - } + "classification": { + "description": "Classification configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ClassificationInferenceOptions" + } + ] }, - "remote_indices": { - "description": "A list of indices permissions for remote clusters.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" - } + "text_classification": { + "description": "Text classification configuration for inference.", + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TextClassificationInferenceOptions" + } + ] + }, + "zero_shot_classification": { + "description": "Zeroshot classification configuration for inference.", + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ZeroShotClassificationInferenceOptions" + } + ] + }, + "fill_mask": { + "description": "Fill mask configuration for inference.", + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.FillMaskInferenceOptions" + } + ] + }, + "learning_to_rank": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.LearningToRankConfig" + } + ] + }, + "ner": { + "description": "Named entity recognition configuration for inference.", + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NerInferenceOptions" + } + ] + }, + "pass_through": { + "description": "Pass through configuration for inference.", + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.PassThroughInferenceOptions" + } + ] }, - "remote_cluster": { - "description": "A list of cluster permissions for remote clusters.\nNOTE: This is limited a subset of the cluster permissions.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" - } + "text_embedding": { + "description": "Text embedding configuration for inference.", + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TextEmbeddingInferenceOptions" + } + ] }, - "global": { - "description": "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.", - "oneOf": [ + "text_expansion": { + "description": "Text expansion configuration for inference.", + "x-state": "Generally available; Added in 8.8.0", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.GlobalPrivilege" - } - }, + "$ref": "#/components/schemas/ml._types.TextExpansionInferenceOptions" + } + ] + }, + "question_answering": { + "description": "Question answering configuration for inference.", + "x-state": "Generally available; Added in 8.3.0", + "allOf": [ { - "$ref": "#/components/schemas/security._types.GlobalPrivilege" + "$ref": "#/components/schemas/ml._types.QuestionAnsweringInferenceOptions" } ] + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "ml._types.TextClassificationInferenceOptions": { + "description": "Text classification configuration options", + "type": "object", + "properties": { + "num_top_classes": { + "description": "Specifies the number of top class predictions to return. Defaults to 0.", + "type": "number" }, - "applications": { - "description": "A list of application privilege entries", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ApplicationPrivileges" - } + "tokenization": { + "description": "The tokenization options", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" + } + ] }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" }, - "run_as": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users" - }, - "description": "A list of users that the API keys can impersonate.", + "classification_labels": { + "description": "Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labels", "type": "array", "items": { "type": "string" } }, - "description": { - "description": "An optional description of the role descriptor.", - "type": "string" - }, - "restriction": { - "$ref": "#/components/schemas/security._types.Restriction" - }, - "transient_metadata": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "vocabulary": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Vocabulary" + } + ] } - }, - "required": [ - "cluster", - "indices" - ] + } }, - "security.get_service_credentials.NodesCredentials": { + "ml._types.TokenizationConfigContainer": { + "description": "Tokenization options stored in inference configuration", "type": "object", "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" + "bert": { + "description": "Indicates BERT tokenization and its options", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpBertTokenizationConfig" + } + ] }, - "file_tokens": { - "description": "File-backed tokens collected from all nodes", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.get_service_credentials.NodesCredentialsFileToken" - } + "bert_ja": { + "description": "Indicates BERT Japanese tokenization and its options", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpBertTokenizationConfig" + } + ] + }, + "mpnet": { + "description": "Indicates MPNET tokenization and its options", + "x-state": "Generally available; Added in 8.1.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpBertTokenizationConfig" + } + ] + }, + "roberta": { + "description": "Indicates RoBERTa tokenization and its options", + "x-state": "Generally available; Added in 8.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpRobertaTokenizationConfig" + } + ] + }, + "xlm_roberta": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.XlmRobertaTokenizationConfig" + } + ] } }, - "required": [ - "_nodes", - "file_tokens" - ] + "minProperties": 1, + "maxProperties": 1 }, - "security.get_service_credentials.NodesCredentialsFileToken": { - "type": "object", - "properties": { - "nodes": { - "type": "array", - "items": { - "type": "string" - } + "ml._types.NlpBertTokenizationConfig": { + "description": "BERT and MPNet tokenization configuration options", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig" + }, + { + "type": "object" } - }, - "required": [ - "nodes" ] }, - "security._types.SecuritySettings": { + "ml._types.CommonTokenizationConfig": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/indices._types.IndexSettings" + "do_lower_case": { + "description": "Should the tokenizer lower case the text", + "default": false, + "type": "boolean" + }, + "max_sequence_length": { + "description": "Maximum input sequence length for the model", + "default": 512.0, + "type": "number" + }, + "span": { + "description": "Tokenization spanning options. Special value of -1 indicates no spanning takes place", + "default": -1.0, + "type": "number" + }, + "truncate": { + "description": "Should tokenization input be automatically truncated before sending to the model for inference", + "default": "first", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TokenizationTruncate" + } + ] + }, + "with_special_tokens": { + "description": "Is tokenization completed with special tokens", + "default": true, + "type": "boolean" } } }, - "security.get_token.AccessTokenGrantType": { + "ml._types.TokenizationTruncate": { "type": "string", "enum": [ - "password", - "client_credentials", - "_kerberos", - "refresh_token" + "first", + "second", + "none" ] }, - "security.get_token.AuthenticatedUser": { + "ml._types.NlpRobertaTokenizationConfig": { + "description": "RoBERTa tokenization configuration options", "allOf": [ { - "$ref": "#/components/schemas/security._types.User" + "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig" }, { "type": "object", "properties": { - "authentication_realm": { - "$ref": "#/components/schemas/security.get_token.UserRealm" - }, - "lookup_realm": { - "$ref": "#/components/schemas/security.get_token.UserRealm" - }, - "authentication_provider": { - "$ref": "#/components/schemas/security.get_token.AuthenticationProvider" - }, - "authentication_type": { - "type": "string" + "add_prefix_space": { + "description": "Should the tokenizer prefix input with a space character", + "default": false, + "type": "boolean" } - }, - "required": [ - "authentication_realm", - "lookup_realm", - "authentication_type" - ] + } } ] }, - "security.get_token.UserRealm": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "ml._types.XlmRobertaTokenizationConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig" }, - "type": { - "type": "string" + { + "type": "object" } - }, - "required": [ - "name", - "type" ] }, - "security.get_token.AuthenticationProvider": { + "ml._types.Vocabulary": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] } }, "required": [ - "type", - "name" + "index" ] }, - "security._types.User": { + "ml._types.ZeroShotClassificationInferenceOptions": { + "description": "Zero shot classification configuration options", "type": "object", "properties": { - "email": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "full_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Name" - }, + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" } ] }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "hypothesis_template": { + "description": "Hypothesis template used when tokenizing labels for prediction", + "default": "\"This example is {}.\"", + "type": "string" }, - "roles": { + "classification_labels": { + "description": "The zero shot classification labels indicating entailment, neutral, and contradiction\nMust contain exactly and only entailment, neutral, and contradiction", "type": "array", "items": { "type": "string" } }, - "username": { - "$ref": "#/components/schemas/_types.Username" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" }, - "enabled": { + "multi_label": { + "description": "Indicates if more than one true label exists.", + "default": false, "type": "boolean" }, - "profile_uid": { - "$ref": "#/components/schemas/security._types.UserProfileId" + "labels": { + "description": "The labels to predict.", + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "metadata", - "roles", - "username", - "enabled" + "classification_labels" ] }, - "security._types.UserIndicesPrivileges": { + "ml._types.FillMaskInferenceOptions": { + "description": "Fill mask inference options", "type": "object", "properties": { - "field_security": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level" - }, - "description": "The document fields that the owners of the role have read access to.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.FieldSecurity" - } + "mask_token": { + "description": "The string/token which will be removed from incoming documents and replaced with the inference prediction(s).\nIn a response, this field contains the mask token for the specified model/tokenizer. Each model and tokenizer\nhas a predefined mask token which cannot be changed. Thus, it is recommended not to set this value in requests.\nHowever, if this field is present in a request, its value must match the predefined value for that model/tokenizer,\notherwise the request will fail.", + "type": "string" }, - "names": { - "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.IndexName" - }, + "num_top_classes": { + "description": "Specifies the number of top class predictions to return. Defaults to 0.", + "type": "number" + }, + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } + "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" } ] }, - "privileges": { - "description": "The index level privileges that owners of the role have on the specified indices.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.IndexPrivilege" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" + }, + "vocabulary": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Vocabulary" + } + ] + } + } + }, + "ml._types.LearningToRankConfig": { + "type": "object", + "properties": { + "default_params": { + "type": "object", + "additionalProperties": { + "type": "object" } }, - "query": { - "description": "Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role.", + "feature_extractors": { "type": "array", "items": { - "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ml._types.FeatureExtractor" + } } }, - "allow_restricted_indices": { - "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", - "type": "boolean" + "num_top_feature_importance_values": { + "type": "number" } }, "required": [ - "names", - "privileges", - "allow_restricted_indices" + "num_top_feature_importance_values" ] }, - "security._types.RemoteUserIndicesPrivileges": { + "ml._types.FeatureExtractor": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.QueryFeatureExtractor" + } + ] + }, + "ml._types.QueryFeatureExtractor": { "type": "object", "properties": { - "field_security": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level" - }, - "description": "The document fields that the owners of the role have read access to.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.FieldSecurity" - } + "default_score": { + "type": "number" }, - "names": { - "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "oneOf": [ + "feature_name": { + "type": "string" + }, + "query": { + "allOf": [ { - "$ref": "#/components/schemas/_types.IndexName" - }, + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } + }, + "required": [ + "feature_name", + "query" + ] + }, + "ml._types.NerInferenceOptions": { + "description": "Named entity recognition options", + "type": "object", + "properties": { + "tokenization": { + "description": "The tokenization options", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } + "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" } ] }, - "privileges": { - "description": "The index level privileges that owners of the role have on the specified indices.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.IndexPrivilege" - } - }, - "query": { - "description": "Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" - } - }, - "allow_restricted_indices": { - "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", - "type": "boolean" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" }, - "clusters": { + "classification_labels": { + "description": "The token classification labels. Must be IOB formatted tags", "type": "array", "items": { "type": "string" } + }, + "vocabulary": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Vocabulary" + } + ] } - }, - "required": [ - "names", - "privileges", - "allow_restricted_indices", - "clusters" - ] + } }, - "security.get_user_profile.GetUserProfileErrors": { + "ml._types.PassThroughInferenceOptions": { + "description": "Pass through configuration options", "type": "object", "properties": { - "count": { - "type": "number" + "tokenization": { + "description": "The tokenization options", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" + } + ] }, - "details": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ErrorCause" - } + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" + }, + "vocabulary": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Vocabulary" + } + ] } - }, - "required": [ - "count", - "details" - ] + } }, - "security.grant_api_key.GrantApiKey": { + "ml._types.TextEmbeddingInferenceOptions": { + "description": "Text embedding inference options", "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "expiration": { - "$ref": "#/components/schemas/_types.DurationLarge" + "embedding_size": { + "description": "The number of dimensions in the embedding output", + "type": "number" }, - "role_descriptors": { - "description": "The role descriptors for this API key.\nWhen it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token.\nIf you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token.", - "oneOf": [ + "tokenization": { + "description": "The tokenization options", + "allOf": [ { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleDescriptor" - } - }, + "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" + } + ] + }, + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" + }, + "vocabulary": { + "allOf": [ { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleDescriptor" - } - } + "$ref": "#/components/schemas/ml._types.Vocabulary" + } + ] + } + } + }, + "ml._types.TextExpansionInferenceOptions": { + "description": "Text expansion inference options", + "type": "object", + "properties": { + "tokenization": { + "description": "The tokenization options", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" } ] }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" + }, + "vocabulary": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.Vocabulary" + } + ] } - }, - "required": [ - "name" - ] - }, - "security.grant_api_key.ApiKeyGrantType": { - "type": "string", - "enum": [ - "access_token", - "password" - ] + } }, - "security.has_privileges.ApplicationPrivilegesCheck": { + "ml._types.QuestionAnsweringInferenceOptions": { + "description": "Question answering inference options", "type": "object", "properties": { - "application": { - "description": "The name of the application.", - "type": "string" + "num_top_classes": { + "description": "Specifies the number of top class predictions to return. Defaults to 0.", + "type": "number" }, - "privileges": { - "description": "A list of the privileges that you want to check for the specified resources.\nIt may be either application privilege names or the names of actions that are granted by those privileges", - "type": "array", - "items": { - "type": "string" - } + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer" + } + ] }, - "resources": { - "description": "A list of resource names against which the privileges should be checked.", - "type": "array", - "items": { - "type": "string" - } + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" + }, + "max_answer_length": { + "description": "The maximum answer length to consider", + "type": "number" } - }, - "required": [ - "application", - "privileges", - "resources" - ] + } }, - "security.has_privileges.IndexPrivilegesCheck": { + "ml._types.TrainedModelConfigInput": { "type": "object", "properties": { - "names": { - "$ref": "#/components/schemas/_types.Indices" - }, - "privileges": { - "description": "A list of the privileges that you want to check for the specified indices.", + "field_names": { + "description": "An array of input field names for the model.", "type": "array", "items": { - "$ref": "#/components/schemas/security._types.IndexPrivilege" + "$ref": "#/components/schemas/_types.Field" } - }, - "allow_restricted_indices": { - "description": "This needs to be set to `true` (default is `false`) if using wildcards or regexps for patterns that cover restricted indices.\nImplicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false.\nIf restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of `allow_restricted_indices`.", - "type": "boolean" } }, "required": [ - "names", - "privileges" + "field_names" ] }, - "security.has_privileges.ApplicationsPrivileges": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.has_privileges.ResourcePrivileges" - } - }, - "security.has_privileges.ResourcePrivileges": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.has_privileges.Privileges" - } - }, - "security.has_privileges.Privileges": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "security.has_privileges_user_profile.PrivilegesCheck": { + "ml._types.TrainedModelConfigMetadata": { "type": "object", "properties": { - "application": { + "model_aliases": { "type": "array", "items": { - "$ref": "#/components/schemas/security.has_privileges.ApplicationPrivilegesCheck" + "type": "string" } }, - "cluster": { - "description": "A list of the cluster privileges that you want to check.", + "feature_importance_baseline": { + "description": "An object that contains the baseline for feature importance values. For regression analysis, it is a single value. For classification analysis, there is a value for each class.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "hyperparameters": { + "description": "List of the available hyperparameters optimized during the fine_parameter_tuning phase as well as specified by the user.", "type": "array", "items": { - "$ref": "#/components/schemas/security._types.ClusterPrivilege" + "$ref": "#/components/schemas/ml._types.Hyperparameter" } }, - "index": { + "total_feature_importance": { + "description": "An array of the total feature importance for each feature used from the training data set. This array of objects is returned if data frame analytics trained the model and the request includes total_feature_importance in the include request parameter.", "type": "array", "items": { - "$ref": "#/components/schemas/security.has_privileges.IndexPrivilegesCheck" + "$ref": "#/components/schemas/ml._types.TotalFeatureImportance" } } } }, - "security.has_privileges_user_profile.HasPrivilegesUserProfileErrors": { + "ml._types.Hyperparameter": { "type": "object", "properties": { - "count": { + "absolute_importance": { + "description": "A positive number showing how much the parameter influences the variation of the loss function. For hyperparameters with values that are not specified by the user but tuned during hyperparameter optimization.", "type": "number" }, - "details": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ErrorCause" - } + "name": { + "description": "Name of the hyperparameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "relative_importance": { + "description": "A number between 0 and 1 showing the proportion of influence on the variation of the loss function among all tuned hyperparameters. For hyperparameters with values that are not specified by the user but tuned during hyperparameter optimization.", + "type": "number" + }, + "supplied": { + "description": "Indicates if the hyperparameter is specified by the user (true) or optimized (false).", + "type": "boolean" + }, + "value": { + "description": "The value of the hyperparameter, either optimized or specified by the user.", + "type": "number" } }, "required": [ - "count", - "details" + "name", + "supplied", + "value" ] }, - "security._types.CreatedStatus": { + "ml._types.TotalFeatureImportance": { "type": "object", "properties": { - "created": { - "type": "boolean" - } - }, - "required": [ - "created" - ] - }, - "security.query_api_keys.ApiKeyAggregationContainer": { - "allOf": [ - { - "type": "object", - "properties": { - "aggregations": { - "description": "Sub-aggregations for this aggregation.\nOnly applies to bucket aggregations.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregationContainer" - } - }, - "meta": { - "$ref": "#/components/schemas/_types.Metadata" + "feature_name": { + "description": "The feature for which this importance was calculated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } + ] + }, + "importance": { + "description": "A collection of feature importance statistics related to the training data set for this particular feature.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TotalFeatureImportanceStatistics" } }, - { - "type": "object", - "properties": { - "cardinality": { - "$ref": "#/components/schemas/_types.aggregations.CardinalityAggregation" - }, - "composite": { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregation" - }, - "date_range": { - "$ref": "#/components/schemas/_types.aggregations.DateRangeAggregation" - }, - "filter": { - "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" - }, - "filters": { - "$ref": "#/components/schemas/security.query_api_keys.ApiKeyFiltersAggregation" - }, - "missing": { - "$ref": "#/components/schemas/_types.aggregations.MissingAggregation" - }, - "range": { - "$ref": "#/components/schemas/_types.aggregations.RangeAggregation" - }, - "terms": { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregation" - }, - "value_count": { - "$ref": "#/components/schemas/_types.aggregations.ValueCountAggregation" - } - }, - "minProperties": 1, - "maxProperties": 1 + "classes": { + "description": "If the trained model is a classification model, feature importance statistics are gathered per target class value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TotalFeatureImportanceClass" + } } + }, + "required": [ + "feature_name", + "importance", + "classes" ] }, - "security.query_api_keys.ApiKeyQueryContainer": { + "ml._types.TotalFeatureImportanceStatistics": { "type": "object", "properties": { - "bool": { - "$ref": "#/components/schemas/_types.query_dsl.BoolQuery" - }, - "exists": { - "$ref": "#/components/schemas/_types.query_dsl.ExistsQuery" - }, - "ids": { - "$ref": "#/components/schemas/_types.query_dsl.IdsQuery" - }, - "match": { - "description": "Returns documents that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.MatchQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "match_all": { - "$ref": "#/components/schemas/_types.query_dsl.MatchAllQuery" - }, - "prefix": { - "description": "Returns documents that contain a specific prefix in a provided field.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.PrefixQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "range": { - "description": "Returns documents that contain terms within a provided range.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.RangeQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "simple_query_string": { - "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringQuery" - }, - "term": { - "description": "Returns documents that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.TermQuery" - }, - "minProperties": 1, - "maxProperties": 1 + "mean_magnitude": { + "description": "The average magnitude of this feature across all the training data. This value is the average of the absolute values of the importance for this feature.", + "type": "number" }, - "terms": { - "$ref": "#/components/schemas/_types.query_dsl.TermsQuery" + "max": { + "description": "The maximum importance value across all the training data for this feature.", + "type": "number" }, - "wildcard": { - "description": "Returns documents that contain terms matching a wildcard pattern.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.WildcardQuery" - }, - "minProperties": 1, - "maxProperties": 1 + "min": { + "description": "The minimum importance value across all the training data for this feature.", + "type": "number" } }, - "minProperties": 1, - "maxProperties": 1 - }, - "security.query_api_keys.ApiKeyFiltersAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" - }, - { - "type": "object", - "properties": { - "filters": { - "$ref": "#/components/schemas/_types.aggregations.BucketsApiKeyQueryContainer" - }, - "other_bucket": { - "description": "Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters.", - "type": "boolean" - }, - "other_bucket_key": { - "description": "The key with which the other bucket is returned.", - "type": "string" - }, - "keyed": { - "description": "By default, the named filters aggregation returns the buckets as an object.\nSet to `false` to return the buckets as an array of objects.", - "type": "boolean" - } - } - } + "required": [ + "mean_magnitude", + "max", + "min" ] }, - "_types.aggregations.BucketsApiKeyQueryContainer": { - "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" - } + "ml._types.TotalFeatureImportanceClass": { + "type": "object", + "properties": { + "class_name": { + "description": "The target class value. Could be a string, boolean, or number.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - { + "importance": { + "description": "A collection of feature importance statistics related to the training data set for this particular feature.", "type": "array", "items": { - "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" + "$ref": "#/components/schemas/ml._types.TotalFeatureImportanceStatistics" } } + }, + "required": [ + "class_name", + "importance" ] }, - "security.query_api_keys.ApiKeyAggregate": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.CardinalityAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.ValueCountAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.StringTermsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.LongTermsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.DoubleTermsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.UnmappedTermsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.MultiTermsAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.MissingAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.FilterAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.FiltersAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.RangeAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.DateRangeAggregate" - }, - { - "$ref": "#/components/schemas/_types.aggregations.CompositeAggregate" - } - ] - }, - "security.query_role.RoleQueryContainer": { + "ml._types.ModelPackageConfig": { "type": "object", "properties": { - "bool": { - "$ref": "#/components/schemas/_types.query_dsl.BoolQuery" - }, - "exists": { - "$ref": "#/components/schemas/_types.query_dsl.ExistsQuery" - }, - "ids": { - "$ref": "#/components/schemas/_types.query_dsl.IdsQuery" - }, - "match": { - "description": "Returns roles that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.MatchQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "match_all": { - "$ref": "#/components/schemas/_types.query_dsl.MatchAllQuery" - }, - "prefix": { - "description": "Returns roles that contain a specific prefix in a provided field.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.PrefixQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "range": { - "description": "Returns roles that contain terms within a provided range.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.RangeQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "simple_query_string": { - "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringQuery" - }, - "term": { - "description": "Returns roles that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.TermQuery" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "terms": { - "$ref": "#/components/schemas/_types.query_dsl.TermsQuery" - }, - "wildcard": { - "description": "Returns roles that contain terms matching a wildcard pattern.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.WildcardQuery" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "security.query_role.QueryRole": { - "allOf": [ - { - "$ref": "#/components/schemas/security._types.RoleDescriptor" - }, - { - "type": "object", - "properties": { - "_sort": { - "$ref": "#/components/schemas/_types.SortResults" - }, - "name": { - "description": "Name of the role.", - "type": "string" + "create_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } - }, - "required": [ - "name" ] - } - ] - }, - "security.query_user.UserQueryContainer": { - "type": "object", - "properties": { - "ids": { - "$ref": "#/components/schemas/_types.query_dsl.IdsQuery" - }, - "bool": { - "$ref": "#/components/schemas/_types.query_dsl.BoolQuery" }, - "exists": { - "$ref": "#/components/schemas/_types.query_dsl.ExistsQuery" + "description": { + "type": "string" }, - "match": { - "description": "Returns users that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.", + "inference_config": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.MatchQuery" - }, - "minProperties": 1, - "maxProperties": 1 + "type": "object" + } }, - "match_all": { - "$ref": "#/components/schemas/_types.query_dsl.MatchAllQuery" + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] }, - "prefix": { - "description": "Returns users that contain a specific prefix in a provided field.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.PrefixQuery" - }, - "minProperties": 1, - "maxProperties": 1 + "minimum_version": { + "type": "string" }, - "range": { - "description": "Returns users that contain terms within a provided range.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.RangeQuery" - }, - "minProperties": 1, - "maxProperties": 1 + "model_repository": { + "type": "string" }, - "simple_query_string": { - "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringQuery" + "model_type": { + "type": "string" }, - "term": { - "description": "Returns users that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.TermQuery" - }, - "minProperties": 1, - "maxProperties": 1 + "packaged_model_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "terms": { - "$ref": "#/components/schemas/_types.query_dsl.TermsQuery" + "platform_architecture": { + "type": "string" }, - "wildcard": { - "description": "Returns users that contain terms matching a wildcard pattern.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.query_dsl.WildcardQuery" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "security.query_user.QueryUser": { - "allOf": [ - { - "$ref": "#/components/schemas/security._types.User" + "prefix_strings": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelPrefixStrings" + } + ] }, - { - "type": "object", - "properties": { - "_sort": { - "$ref": "#/components/schemas/_types.SortResults" + "size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } + ] + }, + "sha256": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" } + }, + "vocabulary_file": { + "type": "string" } + }, + "required": [ + "packaged_model_id" ] }, - "security.suggest_user_profiles.Hint": { + "ml._types.TrainedModelPrefixStrings": { "type": "object", "properties": { - "uids": { - "description": "A list of profile UIDs to match against.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.UserProfileId" - } + "ingest": { + "description": "String prepended to input at ingest", + "type": "string" }, - "labels": { - "description": "A single key-value pair to match against the labels section\nof a profile. A profile is considered matching if it matches\nat least one of the strings.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } + "search": { + "description": "String prepended to input at search", + "type": "string" } } }, - "security.suggest_user_profiles.TotalUserProfiles": { + "ml._types.TrainedModelLocation": { "type": "object", "properties": { - "value": { - "type": "number" - }, - "relation": { - "$ref": "#/components/schemas/_types.RelationName" + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelLocationIndex" + } + ] } }, "required": [ - "value", - "relation" + "index" ] }, - "shutdown.get_node.NodeShutdownStatus": { + "ml._types.TrainedModelLocationIndex": { "type": "object", "properties": { - "node_id": { - "$ref": "#/components/schemas/_types.NodeId" - }, - "type": { - "$ref": "#/components/schemas/shutdown.get_node.ShutdownType" - }, - "reason": { - "type": "string" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + } + }, + "required": [ + "name" + ] + }, + "ml._types.TrainedModelStats": { + "type": "object", + "properties": { + "deployment_stats": { + "description": "A collection of deployment stats, which is present when the models are deployed.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelDeploymentStats" + } + ] }, - "shutdown_startedmillis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "inference_stats": { + "description": "A collection of inference stats fields.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelInferenceStats" + } + ] }, - "status": { - "$ref": "#/components/schemas/shutdown.get_node.ShutdownStatus" + "ingest": { + "description": "A collection of ingest stats for the model across all nodes.\nThe values are summations of the individual node statistics.\nThe format matches the ingest section in the nodes stats API.", + "type": "object", + "additionalProperties": { + "type": "object" + } }, - "shard_migration": { - "$ref": "#/components/schemas/shutdown.get_node.ShardMigrationStatus" + "model_id": { + "description": "The unique identifier of the trained model.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "persistent_tasks": { - "$ref": "#/components/schemas/shutdown.get_node.PersistentTaskStatus" + "model_size_stats": { + "description": "A collection of model size stats.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelSizeStats" + } + ] }, - "plugins": { - "$ref": "#/components/schemas/shutdown.get_node.PluginsStatus" + "pipeline_count": { + "description": "The number of ingest pipelines that currently refer to the model.", + "type": "number" } }, "required": [ - "node_id", - "type", - "reason", - "shutdown_startedmillis", - "status", - "shard_migration", - "persistent_tasks", - "plugins" - ] - }, - "shutdown.get_node.ShutdownType": { - "type": "string", - "enum": [ - "remove", - "restart" - ] - }, - "shutdown.get_node.ShutdownStatus": { - "type": "string", - "enum": [ - "not_started", - "in_progress", - "stalled", - "complete" + "model_id", + "model_size_stats", + "pipeline_count" ] }, - "shutdown.get_node.ShardMigrationStatus": { + "ml._types.TrainedModelDeploymentStats": { "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/shutdown.get_node.ShutdownStatus" + "adaptive_allocations": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings" + } + ] + }, + "allocation_status": { + "description": "The detailed allocation status for the deployment.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelDeploymentAllocationStatus" + } + ] + }, + "cache_size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "deployment_id": { + "description": "The unique identifier for the trained model deployment.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "error_count": { + "description": "The sum of `error_count` for all nodes in the deployment.", + "type": "number" + }, + "inference_count": { + "description": "The sum of `inference_count` for all nodes in the deployment.", + "type": "number" + }, + "model_id": { + "description": "The unique identifier for the trained model.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "nodes": { + "description": "The deployment stats for each node that currently has the model allocated.\nIn serverless, stats are reported for a single unnamed virtual node.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TrainedModelDeploymentNodesStats" + } + }, + "number_of_allocations": { + "description": "The number of allocations requested.", + "type": "number" + }, + "peak_throughput_per_minute": { + "type": "number" + }, + "priority": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainingPriority" + } + ] + }, + "queue_capacity": { + "description": "The number of inference requests that can be queued before new requests are rejected.", + "type": "number" + }, + "rejected_execution_count": { + "description": "The sum of `rejected_execution_count` for all nodes in the deployment.\nIndividual nodes reject an inference request if the inference queue is full.\nThe queue size is controlled by the `queue_capacity` setting in the start\ntrained model deployment API.", + "type": "number" + }, + "reason": { + "description": "The reason for the current deployment state. Usually only populated when\nthe model is not deployed to a node.", + "type": "string" + }, + "start_time": { + "description": "The epoch timestamp when the deployment started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "state": { + "description": "The overall state of the deployment.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DeploymentAssignmentState" + } + ] + }, + "threads_per_allocation": { + "description": "The number of threads used be each allocation during inference.", + "type": "number" + }, + "timeout_count": { + "description": "The sum of `timeout_count` for all nodes in the deployment.", + "type": "number" } }, "required": [ - "status" + "deployment_id", + "model_id", + "nodes", + "peak_throughput_per_minute", + "priority", + "start_time" ] }, - "shutdown.get_node.PersistentTaskStatus": { + "ml._types.AdaptiveAllocationsSettings": { "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/shutdown.get_node.ShutdownStatus" + "enabled": { + "description": "If true, adaptive_allocations is enabled", + "type": "boolean" + }, + "min_number_of_allocations": { + "description": "Specifies the minimum number of allocations to scale to.\nIf set, it must be greater than or equal to 0.\nIf not defined, the deployment scales to 0.", + "type": "number" + }, + "max_number_of_allocations": { + "description": "Specifies the maximum number of allocations to scale to.\nIf set, it must be greater than or equal to min_number_of_allocations.", + "type": "number" } }, "required": [ - "status" + "enabled" ] }, - "shutdown.get_node.PluginsStatus": { + "ml._types.TrainedModelDeploymentAllocationStatus": { "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/shutdown.get_node.ShutdownStatus" + "allocation_count": { + "description": "The current number of nodes where the model is allocated.", + "type": "number" + }, + "state": { + "description": "The detailed allocation state related to the nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DeploymentAllocationState" + } + ] + }, + "target_allocation_count": { + "description": "The desired number of nodes for model allocation.", + "type": "number" } }, "required": [ - "status" + "allocation_count", + "state", + "target_allocation_count" ] }, - "shutdown._types.Type": { + "ml._types.DeploymentAllocationState": { "type": "string", "enum": [ - "restart", - "remove", - "replace" + "started", + "starting", + "fully_allocated" ] }, - "simulate.ingest.SimulateIngestDocumentResult": { - "type": "object", - "properties": { - "doc": { - "$ref": "#/components/schemas/simulate.ingest.IngestDocumentSimulation" - } - } - }, - "simulate.ingest.IngestDocumentSimulation": { + "ml._types.TrainedModelDeploymentNodesStats": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" + "average_inference_time_ms": { + "description": "The average time for each inference call to complete on this node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "average_inference_time_ms_last_minute": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] }, - "_source": { - "description": "JSON body for the document.", - "type": "object", - "additionalProperties": { - "type": "object" - } + "average_inference_time_ms_excluding_cache_hits": { + "description": "The average time for each inference call to complete on this node, excluding cache", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] }, - "_version": { - "$ref": "#/components/schemas/_spec_utils.StringifiedVersionNumber" + "error_count": { + "description": "The number of errors when evaluating the trained model.", + "type": "number" }, - "executed_pipelines": { - "description": "A list of the names of the pipelines executed on this document.", - "type": "array", - "items": { - "type": "string" - } + "inference_count": { + "description": "The total number of inference calls made against this node for this model.", + "type": "number" }, - "ignored_fields": { - "description": "A list of the fields that would be ignored at the indexing step. For example, a field whose\nvalue is larger than the allowed limit would make it through all of the pipelines, but\nwould not be indexed into Elasticsearch.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" + "inference_cache_hit_count": { + "type": "number" + }, + "inference_cache_hit_count_last_minute": { + "type": "number" + }, + "last_access": { + "description": "The epoch time stamp of the last inference call for the model on this node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } - } + ] }, - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" - } - }, - "required": [ - "_id", - "_index", - "_source", - "_version", - "executed_pipelines" - ] - }, - "slm._types.SnapshotLifecycle": { - "type": "object", - "properties": { - "in_progress": { - "$ref": "#/components/schemas/slm._types.InProgress" + "node": { + "description": "Information pertaining to the node.", + "x-state": "Generally available", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DiscoveryNode" + } + ] }, - "last_failure": { - "$ref": "#/components/schemas/slm._types.Invocation" + "number_of_allocations": { + "description": "The number of allocations assigned to this node.", + "type": "number" }, - "last_success": { - "$ref": "#/components/schemas/slm._types.Invocation" + "number_of_pending_requests": { + "description": "The number of inference requests queued to be processed.", + "type": "number" }, - "modified_date": { - "$ref": "#/components/schemas/_types.DateTime" + "peak_throughput_per_minute": { + "type": "number" }, - "modified_date_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "rejected_execution_count": { + "description": "The number of inference requests that were not processed because the queue was full.", + "type": "number" }, - "next_execution": { - "$ref": "#/components/schemas/_types.DateTime" + "routing_state": { + "description": "The current routing state and reason for the current routing state for this allocation.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelAssignmentRoutingStateAndReason" + } + ] }, - "next_execution_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "start_time": { + "description": "The epoch timestamp when the allocation started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "policy": { - "$ref": "#/components/schemas/slm._types.Policy" + "threads_per_allocation": { + "description": "The number of threads used by each allocation during inference.", + "type": "number" }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "throughput_last_minute": { + "type": "number" }, - "stats": { - "$ref": "#/components/schemas/slm._types.Statistics" + "timeout_count": { + "description": "The number of inference requests that timed out before being processed.", + "type": "number" } }, "required": [ - "modified_date_millis", - "next_execution_millis", - "policy", - "version", - "stats" + "peak_throughput_per_minute", + "routing_state", + "throughput_last_minute" + ] + }, + "ml._types.TrainedModelAssignmentRoutingStateAndReason": { + "type": "object", + "properties": { + "reason": { + "description": "The reason for the current state. It is usually populated only when the\n`routing_state` is `failed`.", + "type": "string" + }, + "routing_state": { + "description": "The current routing state.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.RoutingState" + } + ] + } + }, + "required": [ + "routing_state" + ] + }, + "ml._types.RoutingState": { + "type": "string", + "enum": [ + "failed", + "started", + "starting", + "stopped", + "stopping" + ] + }, + "ml._types.TrainingPriority": { + "type": "string", + "enum": [ + "normal", + "low" + ] + }, + "ml._types.DeploymentAssignmentState": { + "type": "string", + "enum": [ + "started", + "starting", + "stopping", + "failed" ] }, - "slm._types.InProgress": { + "ml._types.TrainedModelInferenceStats": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "cache_miss_count": { + "description": "The number of times the model was loaded for inference and was not retrieved from the cache.\nIf this number is close to the `inference_count`, the cache is not being appropriately used.\nThis can be solved by increasing the cache size or its time-to-live (TTL).\nRefer to general machine learning settings for the appropriate settings.", + "type": "number" }, - "start_time_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "failure_count": { + "description": "The number of failures when using the model for inference.", + "type": "number" }, - "state": { - "type": "string" + "inference_count": { + "description": "The total number of times the model has been called for inference.\nThis is across all inference contexts, including all pipelines.", + "type": "number" }, - "uuid": { - "$ref": "#/components/schemas/_types.Uuid" + "missing_all_fields_count": { + "description": "The number of inference calls where all the training features for the model were missing.", + "type": "number" + }, + "timestamp": { + "description": "The time when the statistics were last updated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] } }, "required": [ - "name", - "start_time_millis", - "state", - "uuid" + "cache_miss_count", + "failure_count", + "inference_count", + "missing_all_fields_count", + "timestamp" ] }, - "slm._types.Invocation": { + "ml._types.TrainedModelSizeStats": { "type": "object", "properties": { - "snapshot_name": { - "$ref": "#/components/schemas/_types.Name" + "model_size_bytes": { + "description": "The size of the model in bytes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "time": { - "$ref": "#/components/schemas/_types.DateTime" + "required_native_memory_bytes": { + "description": "The amount of memory required to load the model in bytes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] } }, "required": [ - "snapshot_name", - "time" + "model_size_bytes", + "required_native_memory_bytes" ] }, - "slm._types.Policy": { + "ml._types.InferenceConfigUpdateContainer": { "type": "object", "properties": { - "config": { - "$ref": "#/components/schemas/slm._types.Configuration" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "repository": { - "type": "string" + "regression": { + "description": "Regression configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.RegressionInferenceOptions" + } + ] }, - "retention": { - "$ref": "#/components/schemas/slm._types.Retention" + "classification": { + "description": "Classification configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ClassificationInferenceOptions" + } + ] }, - "schedule": { - "$ref": "#/components/schemas/watcher._types.CronExpression" - } - }, - "required": [ - "name", - "repository", - "schedule" - ] - }, - "slm._types.Configuration": { - "type": "object", - "properties": { - "ignore_unavailable": { - "description": "If false, the snapshot fails if any data stream or index in indices is missing or closed. If true, the snapshot ignores missing or closed data streams and indices.", - "type": "boolean" + "text_classification": { + "description": "Text classification configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TextClassificationInferenceUpdateOptions" + } + ] }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "zero_shot_classification": { + "description": "Zeroshot classification configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ZeroShotClassificationInferenceUpdateOptions" + } + ] }, - "include_global_state": { - "description": "If true, the current global state is included in the snapshot.", - "type": "boolean" + "fill_mask": { + "description": "Fill mask configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.FillMaskInferenceUpdateOptions" + } + ] }, - "feature_states": { - "description": "A list of feature states to be included in this snapshot. A list of features available for inclusion in the snapshot and their descriptions be can be retrieved using the get features API.\nEach feature state includes one or more system indices containing data necessary for the function of that feature. Providing an empty array will include no feature states in the snapshot, regardless of the value of include_global_state. By default, all available feature states will be included in the snapshot if include_global_state is true, or no feature states if include_global_state is false.", - "type": "array", - "items": { - "type": "string" - } + "ner": { + "description": "Named entity recognition configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NerInferenceUpdateOptions" + } + ] }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "pass_through": { + "description": "Pass through configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.PassThroughInferenceUpdateOptions" + } + ] }, - "partial": { - "description": "If false, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available.", - "type": "boolean" - } - } - }, - "slm._types.Retention": { - "type": "object", - "properties": { - "expire_after": { - "$ref": "#/components/schemas/_types.Duration" + "text_embedding": { + "description": "Text embedding configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TextEmbeddingInferenceUpdateOptions" + } + ] }, - "max_count": { - "description": "Maximum number of snapshots to retain, even if the snapshots have not yet expired. If the number of snapshots in the repository exceeds this limit, the policy retains the most recent snapshots and deletes older snapshots.", - "type": "number" + "text_expansion": { + "description": "Text expansion configuration for inference.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TextExpansionInferenceUpdateOptions" + } + ] }, - "min_count": { - "description": "Minimum number of snapshots to retain, even if the snapshots have expired.", - "type": "number" + "question_answering": { + "description": "Question answering configuration for inference", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.QuestionAnsweringInferenceUpdateOptions" + } + ] } }, - "required": [ - "expire_after", - "max_count", - "min_count" - ] - }, - "watcher._types.CronExpression": { - "type": "string" + "minProperties": 1, + "maxProperties": 1 }, - "slm._types.Statistics": { + "ml._types.TextClassificationInferenceUpdateOptions": { "type": "object", "properties": { - "retention_deletion_time": { - "$ref": "#/components/schemas/_types.Duration" - }, - "retention_deletion_time_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "retention_failed": { - "type": "number" - }, - "retention_runs": { - "type": "number" - }, - "retention_timed_out": { - "type": "number" - }, - "policy": { - "$ref": "#/components/schemas/_types.Id" - }, - "total_snapshots_deleted": { + "num_top_classes": { + "description": "Specifies the number of top class predictions to return. Defaults to 0.", "type": "number" }, - "total_snapshot_deletion_failures": { - "type": "number" + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" + } + ] }, - "total_snapshots_failed": { - "type": "number" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" }, - "total_snapshots_taken": { - "type": "number" + "classification_labels": { + "description": "Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labels", + "type": "array", + "items": { + "type": "string" + } } } }, - "snapshot.cleanup_repository.CleanupRepositoryResults": { + "ml._types.NlpTokenizationUpdateOptions": { "type": "object", "properties": { - "deleted_blobs": { - "description": "The number of binary large objects (blobs) removed from the snapshot repository during cleanup operations.\nA non-zero value indicates that unreferenced blobs were found and subsequently cleaned up.", - "type": "number" + "truncate": { + "description": "Truncate options to apply", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TokenizationTruncate" + } + ] }, - "deleted_bytes": { - "description": "The number of bytes freed by cleanup operations.", + "span": { + "description": "Span options to apply", "type": "number" } - }, - "required": [ - "deleted_blobs", - "deleted_bytes" - ] + } }, - "snapshot._types.SnapshotInfo": { + "ml._types.ZeroShotClassificationInferenceUpdateOptions": { "type": "object", "properties": { - "data_streams": { - "type": "array", - "items": { - "type": "string" - } - }, - "duration": { - "$ref": "#/components/schemas/_types.Duration" - }, - "duration_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "end_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "end_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/snapshot._types.SnapshotShardFailure" - } - }, - "include_global_state": { - "type": "boolean" - }, - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } - }, - "index_details": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/snapshot._types.IndexDetails" - } - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "reason": { - "type": "string" - }, - "repository": { - "$ref": "#/components/schemas/_types.Name" - }, - "snapshot": { - "$ref": "#/components/schemas/_types.Name" - }, - "shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "start_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" + } + ] }, - "state": { + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", "type": "string" }, - "uuid": { - "$ref": "#/components/schemas/_types.Uuid" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" - }, - "version_id": { - "$ref": "#/components/schemas/_types.VersionNumber" + "multi_label": { + "description": "Update the configured multi label option. Indicates if more than one true label exists. Defaults to the configured value.", + "type": "boolean" }, - "feature_states": { + "labels": { + "description": "The labels to predict.", "type": "array", "items": { - "$ref": "#/components/schemas/snapshot._types.InfoFeatureState" + "type": "string" } } }, "required": [ - "data_streams", - "snapshot", - "uuid" + "labels" ] }, - "snapshot._types.SnapshotShardFailure": { + "ml._types.FillMaskInferenceUpdateOptions": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "node_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "reason": { - "type": "string" - }, - "shard_id": { + "num_top_classes": { + "description": "Specifies the number of top class predictions to return. Defaults to 0.", "type": "number" }, - "index_uuid": { - "$ref": "#/components/schemas/_types.Id" + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" + } + ] }, - "status": { + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", "type": "string" } - }, - "required": [ - "index", - "reason", - "shard_id", - "index_uuid", - "status" - ] + } }, - "snapshot._types.IndexDetails": { + "ml._types.NerInferenceUpdateOptions": { "type": "object", "properties": { - "shard_count": { - "type": "number" - }, - "size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "size_in_bytes": { - "type": "number" + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" + } + ] }, - "max_segments_per_shard": { - "type": "number" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" } - }, - "required": [ - "shard_count", - "size_in_bytes", - "max_segments_per_shard" - ] + } }, - "snapshot._types.InfoFeatureState": { + "ml._types.PassThroughInferenceUpdateOptions": { "type": "object", "properties": { - "feature_name": { - "type": "string" + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" + } + ] }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" } - }, - "required": [ - "feature_name", - "indices" - ] + } }, - "snapshot._types.Repository": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/snapshot._types.AzureRepository" - }, - { - "$ref": "#/components/schemas/snapshot._types.GcsRepository" - }, - { - "$ref": "#/components/schemas/snapshot._types.S3Repository" - }, - { - "$ref": "#/components/schemas/snapshot._types.SharedFileSystemRepository" - }, - { - "$ref": "#/components/schemas/snapshot._types.ReadOnlyUrlRepository" + "ml._types.TextEmbeddingInferenceUpdateOptions": { + "type": "object", + "properties": { + "tokenization": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" + } + ] }, - { - "$ref": "#/components/schemas/snapshot._types.SourceOnlyRepository" + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" } - ] + } }, - "snapshot._types.AzureRepository": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositoryBase" - }, - { - "type": "object", - "properties": { - "type": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/azure-repository" - }, - "description": "The Azure repository type.", - "type": "string", - "enum": [ - "azure" - ] - }, - "settings": { - "$ref": "#/components/schemas/snapshot._types.AzureRepositorySettings" + "ml._types.TextExpansionInferenceUpdateOptions": { + "type": "object", + "properties": { + "tokenization": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" } - }, - "required": [ - "type" ] + }, + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" } - ] + } }, - "snapshot._types.AzureRepositorySettings": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + "ml._types.QuestionAnsweringInferenceUpdateOptions": { + "type": "object", + "properties": { + "question": { + "description": "The question to answer given the inference context", + "type": "string" }, - { - "type": "object", - "properties": { - "base_path": { - "description": "The path to the repository data within the container.\nIt defaults to the root directory.\n\nNOTE: Don't set `base_path` when configuring a snapshot repository for Elastic Cloud Enterprise.\nElastic Cloud Enterprise automatically generates the `base_path` for each deployment so that multiple deployments can share the same bucket.", - "type": "string" - }, - "client": { - "description": "The name of the Azure repository client to use.", - "type": "string" - }, - "container": { - "description": "The Azure container.", - "type": "string" - }, - "delete_objects_max_size": { - "description": "The maxmimum batch size, between 1 and 256, used for `BlobBatch` requests.\nDefaults to 256 which is the maximum number supported by the Azure blob batch API.", - "type": "number" - }, - "location_mode": { - "description": "Either `primary_only` or `secondary_only`.\nNote that if you set it to `secondary_only`, it will force `readonly` to `true`.", - "type": "string" - }, - "max_concurrent_batch_deletes": { - "description": "The maximum number of concurrent batch delete requests that will be submitted for any individual bulk delete with `BlobBatch`.\nNote that the effective number of concurrent deletes is further limited by the Azure client connection and event loop thread limits.\nDefaults to 10, minimum is 1, maximum is 100.", - "type": "number" - }, - "readonly": { - "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", - "type": "boolean" + "num_top_classes": { + "description": "Specifies the number of top class predictions to return. Defaults to 0.", + "type": "number" + }, + "tokenization": { + "description": "The tokenization options to update when inferring", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.NlpTokenizationUpdateOptions" } - } + ] + }, + "results_field": { + "description": "The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.", + "type": "string" + }, + "max_answer_length": { + "description": "The maximum answer length to consider for extraction", + "type": "number" } + }, + "required": [ + "question" ] }, - "snapshot._types.RepositorySettingsBase": { + "ml._types.InferenceResponseResult": { "type": "object", "properties": { - "chunk_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "entities": { + "description": "If the model is trained for named entity recognition (NER) tasks, the response contains the recognized entities.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TrainedModelEntities" + } }, - "compress": { - "description": "When set to `true`, metadata files are stored in compressed format.\nThis setting doesn't affect index files that are already compressed by default.", + "is_truncated": { + "description": "Indicates whether the input text was truncated to meet the model's maximum sequence length limit. This property\nis present only when it is true.", "type": "boolean" }, - "max_restore_bytes_per_sec": { - "$ref": "#/components/schemas/_types.ByteSize" + "predicted_value": { + "description": "If the model is trained for a text classification or zero shot classification task, the response is the\npredicted class.\nFor named entity recognition (NER) tasks, it contains the annotated text output.\nFor fill mask tasks, it contains the top prediction for replacing the mask token.\nFor text embedding tasks, it contains the raw numerical text embedding values.\nFor regression models, its a numerical value\nFor classification models, it may be an integer, double, boolean or string depending on prediction type", + "oneOf": [ + { + "$ref": "#/components/schemas/ml._types.PredictedValue" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.PredictedValue" + } + } + ] }, - "max_snapshot_bytes_per_sec": { - "$ref": "#/components/schemas/_types.ByteSize" + "predicted_value_sequence": { + "description": "For fill mask tasks, the response contains the input text sequence with the mask token replaced by the predicted\nvalue.\nAdditionally", + "type": "string" + }, + "prediction_probability": { + "description": "Specifies a probability for the predicted value.", + "type": "number" + }, + "prediction_score": { + "description": "Specifies a confidence score for the predicted value.", + "type": "number" + }, + "top_classes": { + "description": "For fill mask, text classification, and zero shot classification tasks, the response contains a list of top\nclass entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TopClassEntry" + } + }, + "warning": { + "description": "If the request failed, the response contains the reason for the failure.", + "type": "string" + }, + "feature_importance": { + "description": "The feature importance for the inference results. Relevant only for classification or regression models", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TrainedModelInferenceFeatureImportance" + } } } }, - "snapshot._types.RepositoryBase": { + "ml._types.TrainedModelEntities": { "type": "object", "properties": { - "uuid": { - "$ref": "#/components/schemas/_types.Uuid" - } - } - }, - "snapshot._types.GcsRepository": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + "class_name": { + "type": "string" }, - { - "type": "object", - "properties": { - "type": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/google-cloud-storage-repository" - }, - "description": "The Google Cloud Storage repository type.", - "type": "string", - "enum": [ - "gcs" - ] - }, - "settings": { - "$ref": "#/components/schemas/snapshot._types.GcsRepositorySettings" - } - }, - "required": [ - "type", - "settings" - ] - } - ] - }, - "snapshot._types.GcsRepositorySettings": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + "class_probability": { + "type": "number" }, - { - "type": "object", - "properties": { - "bucket": { - "description": "The name of the bucket to be used for snapshots.", - "type": "string" - }, - "application_name": { - "deprecated": true, - "description": "The name used by the client when it uses the Google Cloud Storage service.", - "type": "string" - }, - "base_path": { - "description": "The path to the repository data within the bucket.\nIt defaults to the root of the bucket.\n\nNOTE: Don't set `base_path` when configuring a snapshot repository for Elastic Cloud Enterprise.\nElastic Cloud Enterprise automatically generates the `base_path` for each deployment so that multiple deployments can share the same bucket.", - "type": "string" - }, - "client": { - "description": "The name of the client to use to connect to Google Cloud Storage.", - "type": "string" - }, - "readonly": { - "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", - "type": "boolean" - } - }, - "required": [ - "bucket" - ] + "entity": { + "type": "string" + }, + "start_pos": { + "type": "number" + }, + "end_pos": { + "type": "number" } + }, + "required": [ + "class_name", + "class_probability", + "entity", + "start_pos", + "end_pos" ] }, - "snapshot._types.S3Repository": { - "allOf": [ + "ml._types.PredictedValue": { + "oneOf": [ { - "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + "$ref": "#/components/schemas/_types.ScalarValue" }, { - "type": "object", - "properties": { - "type": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository" - }, - "description": "The S3 repository type.", - "type": "string", - "enum": [ - "s3" - ] - }, - "settings": { - "$ref": "#/components/schemas/snapshot._types.S3RepositorySettings" - } - }, - "required": [ - "type", - "settings" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.ScalarValue" + } } ] }, - "snapshot._types.S3RepositorySettings": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + "ml._types.TopClassEntry": { + "type": "object", + "properties": { + "class_name": { + "type": "string" }, - { - "type": "object", - "properties": { - "bucket": { - "externalDocs": { - "url": "https://docs.aws.amazon.com/AmazonS3/latest/userguide/BucketRestrictions.html#bucketnamingrules" - }, - "description": "The name of the S3 bucket to use for snapshots.\nThe bucket name must adhere to Amazon's S3 bucket naming rules.", - "type": "string" - }, - "base_path": { - "description": "The path to the repository data within its bucket.\nIt defaults to an empty string, meaning that the repository is at the root of the bucket.\nThe value of this setting should not start or end with a forward slash (`/`).\n\nNOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise.\nElastic Cloud Enterprise automatically generates the `base_path` for each deployment so that multiple deployments may share the same bucket.", - "type": "string" - }, - "buffer_size": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "canned_acl": { - "externalDocs": { - "url": "https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl" - }, - "description": "The S3 repository supports all S3 canned ACLs: `private`, `public-read`, `public-read-write`, `authenticated-read`, `log-delivery-write`, `bucket-owner-read`, `bucket-owner-full-control`.\nYou could specify a canned ACL using the `canned_acl` setting.\nWhen the S3 repository creates buckets and objects, it adds the canned ACL into the buckets and objects.", - "type": "string" - }, - "client": { - "description": "The name of the S3 client to use to connect to S3.", - "type": "string" - }, - "delete_objects_max_size": { - "externalDocs": { - "url": "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html" - }, - "description": "The maxmimum batch size, between 1 and 1000, used for `DeleteObjects` requests.\nDefaults to 1000 which is the maximum number supported by the AWS DeleteObjects API.", - "type": "number" - }, - "get_register_retry_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_multipart_parts": { - "description": "The maximum number of parts that Elasticsearch will write during a multipart upload of a single object.\nFiles which are larger than `buffer_size × max_multipart_parts` will be chunked into several smaller objects.\nElasticsearch may also split a file across multiple objects to satisfy other constraints such as the `chunk_size` limit.\nDefaults to `10000` which is the maximum number of parts in a multipart upload in AWS S3.", - "type": "number" - }, - "max_multipart_upload_cleanup_size": { - "externalDocs": { - "url": "https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html" - }, - "description": "The maximum number of possibly-dangling multipart uploads to clean up in each batch of snapshot deletions.\nDefaults to 1000 which is the maximum number supported by the AWS ListMultipartUploads API.\nIf set to `0`, Elasticsearch will not attempt to clean up dangling multipart uploads.", - "type": "number" - }, - "readonly": { - "description": "If true, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", - "type": "boolean" - }, - "server_side_encryption": { - "description": "When set to `true`, files are encrypted on server side using an AES256 algorithm.", - "type": "boolean" - }, - "storage_class": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository#repository-s3-storage-classes" - }, - "description": "The S3 storage class for objects written to the repository.\nValues may be `standard`, `reduced_redundancy`, `standard_ia`, `onezone_ia`, and `intelligent_tiering`.", - "type": "string" - }, - "throttled_delete_retry.delay_increment": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttled_delete_retry.maximum_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttled_delete_retry.maximum_number_of_retries": { - "description": "The number times to retry a throttled snapshot deletion.\nThe default is 10 and the minimum value is 0 which will disable retries altogether.\nNote that if retries are enabled in the Azure client, each of these retries comprises that many client-level retries.", - "type": "number" - } - }, - "required": [ - "bucket" - ] + "class_probability": { + "type": "number" + }, + "class_score": { + "type": "number" } + }, + "required": [ + "class_name", + "class_probability", + "class_score" ] }, - "snapshot._types.SharedFileSystemRepository": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + "ml._types.TrainedModelInferenceFeatureImportance": { + "type": "object", + "properties": { + "feature_name": { + "type": "string" }, - { - "type": "object", - "properties": { - "type": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/shared-file-system-repository" - }, - "description": "The shared file system repository type.", - "type": "string", - "enum": [ - "fs" - ] - }, - "settings": { - "$ref": "#/components/schemas/snapshot._types.SharedFileSystemRepositorySettings" - } - }, - "required": [ - "type", - "settings" - ] + "importance": { + "type": "number" + }, + "classes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.TrainedModelInferenceClassImportance" + } } + }, + "required": [ + "feature_name" ] }, - "snapshot._types.SharedFileSystemRepositorySettings": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + "ml._types.TrainedModelInferenceClassImportance": { + "type": "object", + "properties": { + "class_name": { + "type": "string" }, - { - "type": "object", - "properties": { - "location": { - "description": "The location of the shared filesystem used to store and retrieve snapshots.\nThis location must be registered in the `path.repo` setting on all master and data nodes in the cluster.\nUnlike `path.repo`, this setting supports only a single file path.", - "type": "string" - }, - "max_number_of_snapshots": { - "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", - "type": "number" - }, - "readonly": { - "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", - "type": "boolean" - } - }, - "required": [ - "location" - ] + "importance": { + "type": "number" } + }, + "required": [ + "class_name", + "importance" ] }, - "snapshot._types.ReadOnlyUrlRepository": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositoryBase" - }, - { - "type": "object", - "properties": { - "type": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/read-only-url-repository" - }, - "description": "The read-only URL repository type.", - "type": "string", - "enum": [ - "url" - ] - }, - "settings": { - "$ref": "#/components/schemas/snapshot._types.ReadOnlyUrlRepositorySettings" + "ml.info.Defaults": { + "type": "object", + "properties": { + "anomaly_detectors": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.info.AnomalyDetectors" } - }, - "required": [ - "type", - "settings" ] - } - ] - }, - "snapshot._types.ReadOnlyUrlRepositorySettings": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" }, - { - "type": "object", - "properties": { - "http_max_retries": { - "description": "The maximum number of retries for HTTP and HTTPS URLs.", - "type": "number" - }, - "http_socket_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "max_number_of_snapshots": { - "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", - "type": "number" - }, - "url": { - "description": "The URL location of the root of the shared filesystem repository.\nThe following protocols are supported:\n\n* `file`\n* `ftp`\n* `http`\n* `https`\n* `jar`\n\nURLs using the HTTP, HTTPS, or FTP protocols must be explicitly allowed with the `repositories.url.allowed_urls` cluster setting.\nThis setting supports wildcards in the place of a host, path, query, or fragment in the URL.\n\nURLs using the file protocol must point to the location of a shared filesystem accessible to all master and data nodes in the cluster.\nThis location must be registered in the `path.repo` setting.\nYou don't need to register URLs using the FTP, HTTP, HTTPS, or JAR protocols in the `path.repo` setting.", - "type": "string" + "datafeeds": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.info.Datafeeds" } - }, - "required": [ - "url" ] } + }, + "required": [ + "anomaly_detectors", + "datafeeds" ] }, - "snapshot._types.SourceOnlyRepository": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositoryBase" - }, - { - "type": "object", - "properties": { - "type": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/source-only-repository" - }, - "description": "The source-only repository type.", - "type": "string", - "enum": [ - "source" - ] - }, - "settings": { - "$ref": "#/components/schemas/snapshot._types.SourceOnlyRepositorySettings" + "ml.info.AnomalyDetectors": { + "type": "object", + "properties": { + "categorization_analyzer": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CategorizationAnalyzer" } - }, - "required": [ - "type", - "settings" ] - } - ] - }, - "snapshot._types.SourceOnlyRepositorySettings": { - "allOf": [ - { - "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" }, - { - "type": "object", - "properties": { - "delegate_type": { - "description": "The delegated repository type. For valid values, refer to the `type` parameter.\nSource repositories can use `settings` properties for its delegated repository type.", - "type": "string" - }, - "max_number_of_snapshots": { - "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", - "type": "number" - }, - "read_only": { - "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", - "type": "boolean" - } - } + "categorization_examples_limit": { + "type": "number" + }, + "model_memory_limit": { + "type": "string" + }, + "model_snapshot_retention_days": { + "type": "number" + }, + "daily_model_snapshot_retention_after_days": { + "type": "number" } + }, + "required": [ + "categorization_analyzer", + "categorization_examples_limit", + "model_memory_limit", + "model_snapshot_retention_days", + "daily_model_snapshot_retention_after_days" ] }, - "snapshot._types.SnapshotSort": { - "type": "string", - "enum": [ - "start_time", - "duration", - "name", - "index_count", - "repository", - "shard_count", - "failed_shard_count" + "ml.info.Datafeeds": { + "type": "object", + "properties": { + "scroll_size": { + "type": "number" + } + }, + "required": [ + "scroll_size" ] }, - "snapshot.get.SnapshotResponseItem": { + "ml.info.Limits": { "type": "object", "properties": { - "repository": { - "$ref": "#/components/schemas/_types.Name" + "max_single_ml_node_processors": { + "type": "number" + }, + "total_ml_processors": { + "type": "number" + }, + "max_model_memory_limit": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/snapshot._types.SnapshotInfo" - } + "effective_max_model_memory_limit": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" + "total_ml_memory": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] } }, "required": [ - "repository" + "total_ml_memory" ] }, - "snapshot.repository_analyze.SnapshotNodeInfo": { + "ml.info.NativeCode": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "build_hash": { + "type": "string" }, - "name": { - "$ref": "#/components/schemas/_types.Name" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] } }, "required": [ - "id", - "name" + "build_hash", + "version" ] }, - "snapshot.repository_analyze.DetailsInfo": { + "ml.preview_data_frame_analytics.DataframePreviewConfig": { "type": "object", "properties": { - "blob": { - "$ref": "#/components/schemas/snapshot.repository_analyze.BlobDetails" - }, - "overwrite_elapsed": { - "$ref": "#/components/schemas/_types.Duration" - }, - "overwrite_elapsed_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "write_elapsed": { - "$ref": "#/components/schemas/_types.Duration" + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" + } + ] }, - "write_elapsed_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "analysis": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" + } + ] }, - "write_throttled": { - "$ref": "#/components/schemas/_types.Duration" + "model_memory_limit": { + "type": "string" }, - "write_throttled_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "max_num_threads": { + "type": "number" }, - "writer_node": { - "$ref": "#/components/schemas/snapshot.repository_analyze.SnapshotNodeInfo" + "analyzed_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" + } + ] } }, "required": [ - "blob", - "write_elapsed", - "write_elapsed_nanos", - "write_throttled", - "write_throttled_nanos", - "writer_node" + "source", + "analysis" ] }, - "snapshot.repository_analyze.BlobDetails": { + "ml._types.DatafeedConfig": { "type": "object", "properties": { - "name": { - "description": "The name of the blob.", - "type": "string" + "aggregations": { + "description": "If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } }, - "overwritten": { - "description": "Indicates whether the blob was overwritten while the read operations were ongoing.\n /**", - "type": "boolean" + "chunking_config": { + "description": "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 and is an advanced configuration option.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ChunkingConfig" + } + ] }, - "read_early": { - "type": "boolean" + "datafeed_id": { + "description": "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. The default value is the job identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "read_end": { - "description": "The position, in bytes, at which read operations completed.", - "type": "number" + "delayed_data_check_config": { + "description": "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` option 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.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig" + } + ] }, - "read_start": { - "description": "The position, in bytes, at which read operations started.", + "frequency": { + "description": "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. For example: `150s`. 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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "indices": { + "description": "An array of index names. Wildcards are supported. If any indices are in remote clusters, the machine learning nodes must have the `remote_cluster_client` role.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "indices_options": { + "description": "Specifies index expansion options that are used during search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndicesOptions" + } + ] + }, + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "max_empty_searches": { + "description": "If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop after `frequency` times `max_empty_searches` of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped.", "type": "number" }, - "reads": { - "$ref": "#/components/schemas/snapshot.repository_analyze.ReadBlobDetails" + "query": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "size": { - "$ref": "#/components/schemas/_types.ByteSize" + "query_delay": { + "description": "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.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "size_bytes": { - "description": "The size of the blob in bytes.", + "runtime_mappings": { + "description": "Specifies runtime fields for the datafeed search.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + }, + "script_fields": { + "description": "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.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" + } + }, + "scroll_size": { + "description": "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.", + "default": 1000.0, "type": "number" } - }, - "required": [ - "name", - "overwritten", - "read_early", - "read_end", - "read_start", - "reads", - "size", - "size_bytes" - ] + } }, - "snapshot.repository_analyze.ReadBlobDetails": { + "ml._types.JobConfig": { "type": "object", "properties": { - "before_write_complete": { - "description": "Indicates whether the read operation may have started before the write operation was complete.", + "allow_lazy_open": { + "description": "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.", + "default": false, "type": "boolean" }, - "elapsed": { - "$ref": "#/components/schemas/_types.Duration" + "analysis_config": { + "description": "The analysis configuration, which specifies how to analyze the data.\nAfter you create a job, you cannot change the analysis configuration; all the properties are informational.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisConfig" + } + ] }, - "elapsed_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "analysis_limits": { + "description": "Limits can be applied for the resources required to hold the mathematical models in memory.\nThese limits are approximate and can be set per job.\nThey do not control the memory used by other processes, for example the Elasticsearch Java processes.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.AnalysisLimits" + } + ] }, - "first_byte_time": { - "$ref": "#/components/schemas/_types.Duration" + "background_persist_interval": { + "description": "Advanced configuration option.\nThe time between each periodic persistence of the model.\nThe default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time.\nThe smallest allowed value is 1 hour.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "first_byte_time_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "custom_settings": { + "description": "Advanced configuration option.\nContains custom metadata about the job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CustomSettings" + } + ] }, - "found": { - "description": "Indicates whether the blob was found by the read operation.\nIf the read was started before the write completed or the write was ended before completion, it might be false.", - "type": "boolean" + "daily_model_snapshot_retention_after_days": { + "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies a period of time (in days) after which only the first snapshot per day is retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.", + "default": 1.0, + "type": "number" }, - "node": { - "$ref": "#/components/schemas/snapshot.repository_analyze.SnapshotNodeInfo" + "data_description": { + "description": "The data description defines the format of the input data when you send data to the job by using the post data API.\nNote that when configure a datafeed, these properties are automatically set.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DataDescription" + } + ] }, - "throttled": { - "$ref": "#/components/schemas/_types.Duration" + "datafeed_config": { + "description": "The datafeed, which retrieves data from Elasticsearch for analysis by the job.\nYou can associate only one datafeed with each anomaly detection job.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DatafeedConfig" + } + ] }, - "throttled_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "description": { + "description": "A description of the job.", + "type": "string" + }, + "groups": { + "description": "A list of job groups. A job can belong to no groups or many.", + "type": "array", + "items": { + "type": "string" + } + }, + "job_id": { + "description": "Identifier for the anomaly detection job.\nThis identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.\nIt must start and end with alphanumeric characters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "model_plot_config": { + "description": "This advanced configuration option stores model information along with the results.\nIt provides a more detailed view into anomaly detection.\nModel plot provides a simplified and indicative view of the model and its bounds.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ModelPlotConfig" + } + ] + }, + "model_snapshot_retention_days": { + "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies the maximum period of time (in days) that snapshots are retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nThe default value is `10`, which means snapshots ten days older than the newest snapshot are deleted.", + "default": 10.0, + "type": "number" + }, + "renormalization_window_days": { + "description": "Advanced configuration option.\nThe period over which adjustments to the score are applied, as new data is seen.\nThe default value is the longer of 30 days or 100 `bucket_spans`.", + "type": "number" + }, + "results_index_name": { + "description": "A text string that affects the name of the machine learning results index.\nThe default value is `shared`, which generates an index named `.ml-anomalies-shared`.", + "default": "shared", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "results_retention_days": { + "description": "Advanced configuration option.\nThe period of time (in days) that results are retained.\nAge is calculated relative to the timestamp of the latest bucket result.\nIf 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.\nThe default value is null, which means all results are retained.\nAnnotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results.\nAnnotations added by users are retained forever.", + "type": "number" } }, "required": [ - "first_byte_time_nanos", - "found", - "node" + "analysis_config", + "data_description" ] }, - "snapshot.repository_analyze.SummaryInfo": { + "_types.HttpHeaders": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "ml._types.AnalysisConfigRead": { "type": "object", "properties": { - "read": { - "$ref": "#/components/schemas/snapshot.repository_analyze.ReadSummaryInfo" + "bucket_span": { + "description": "The size of the interval that the analysis is aggregated into, typically between `5m` and `1h`.", + "default": "5m", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "write": { - "$ref": "#/components/schemas/snapshot.repository_analyze.WriteSummaryInfo" + "categorization_analyzer": { + "description": "If `categorization_field_name` is specified, you can also define the analyzer that is used to interpret the categorization field.\nThis property cannot be used at the same time as `categorization_filters`.\nThe categorization analyzer specifies how the `categorization_field` is interpreted by the categorization process.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.CategorizationAnalyzer" + } + ] + }, + "categorization_field_name": { + "description": "If this property is specified, the values of the specified field will be categorized.\nThe resulting categories must be used in a detector by setting `by_field_name`, `over_field_name`, or `partition_field_name` to the keyword `mlcategory`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "categorization_filters": { + "description": "If `categorization_field_name` is specified, you can also define optional filters.\nThis property expects an array of regular expressions.\nThe expressions are used to filter out matching sequences from the categorization field values.", + "type": "array", + "items": { + "type": "string" + } + }, + "detectors": { + "description": "An array of detector configuration objects.\nDetector configuration objects specify which data fields a job analyzes.\nThey also specify which analytical functions are used.\nYou can specify multiple detectors for a job.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DetectorRead" + } + }, + "influencers": { + "description": "A comma separated list of influencer field names.\nTypically these can be the by, over, or partition fields that are used in the detector configuration.\nYou might also want to use a field name that is not specifically named in a detector, but is available as part of the input data.\nWhen you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "model_prune_window": { + "description": "Advanced configuration option.\nAffects the pruning of models that have not been updated for the given time duration.\nThe value must be set to a multiple of the `bucket_span`.\nIf set too low, important information may be removed from the model.\nTypically, set to `30d` or longer.\nIf not set, model pruning only occurs if the model memory status reaches the soft limit or the hard limit.\nFor jobs created in 8.1 and later, the default value is the greater of `30d` or 20 times `bucket_span`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "latency": { + "description": "The size of the window in which to expect data that is out of time order.\nDefaults to no latency.\nIf you specify a non-zero value, it must be greater than or equal to one second.", + "default": "0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "multivariate_by_fields": { + "description": "This functionality is reserved for internal use.\nIt is not supported for use in customer environments and is not subject to the support SLA of official GA features.\nIf set to `true`, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold.", + "type": "boolean" + }, + "per_partition_categorization": { + "description": "Settings related to how categorization interacts with partition fields.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.PerPartitionCategorization" + } + ] + }, + "summary_count_field_name": { + "description": "If this property is specified, the data that is fed to the job is expected to be pre-summarized.\nThis property value is the name of the field that contains the count of raw data points that have been summarized.\nThe same `summary_count_field_name` applies to all detectors in the job.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] } }, "required": [ - "read", - "write" + "bucket_span", + "detectors", + "influencers" ] }, - "snapshot.repository_analyze.ReadSummaryInfo": { + "ml._types.DetectorRead": { "type": "object", "properties": { - "count": { - "description": "The number of read operations performed in the test.", - "type": "number" - }, - "max_wait": { - "$ref": "#/components/schemas/_types.Duration" + "by_field_name": { + "description": "The field used to split the data.\nIn particular, this property is used for analyzing the splits with respect to their own history.\nIt is used for finding unusual values in the context of the split.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "max_wait_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "custom_rules": { + "description": "An array of custom rule objects, which enable you to customize the way detectors operate.\nFor example, a rule may dictate to the detector conditions under which results should be skipped.\nKibana refers to custom rules as job rules.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.DetectionRule" + } }, - "total_elapsed": { - "$ref": "#/components/schemas/_types.Duration" + "detector_description": { + "description": "A description of the detector.", + "type": "string" }, - "total_elapsed_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "detector_index": { + "description": "A unique identifier for the detector.\nThis identifier is based on the order of the detectors in the `analysis_config`, starting at zero.", + "type": "number" }, - "total_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "exclude_frequent": { + "description": "Contains one of the following values: `all`, `none`, `by`, or `over`.\nIf set, frequent entities are excluded from influencing the anomaly results.\nEntities can be considered frequent over time or frequent in a population.\nIf you are working with both over and by fields, then you can set `exclude_frequent` to all for both fields, or to `by` or `over` for those specific fields.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ExcludeFrequent" + } + ] }, - "total_size_bytes": { - "description": "The total size of all the blobs or partial blobs read in the test, in bytes.", - "type": "number" + "field_name": { + "description": "The field that the detector uses in the function.\nIf you use an event rate function such as `count` or `rare`, do not specify this field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "total_throttled": { - "$ref": "#/components/schemas/_types.Duration" + "function": { + "description": "The analysis function that is used.\nFor example, `count`, `rare`, `mean`, `min`, `max`, and `sum`.", + "type": "string" }, - "total_throttled_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "over_field_name": { + "description": "The field used to split the data.\nIn particular, this property is used for analyzing the splits with respect to the history of all splits.\nIt is used for finding unusual values in the population of all splits.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "total_wait": { - "$ref": "#/components/schemas/_types.Duration" + "partition_field_name": { + "description": "The field used to segment the analysis.\nWhen you use this property, you have completely independent baselines for each value of this field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "total_wait_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + "use_null": { + "description": "Defines whether a new series is used as the null series when there is no value for the by or partition fields.", + "default": false, + "type": "boolean" } }, "required": [ - "count", - "max_wait", - "max_wait_nanos", - "total_elapsed", - "total_elapsed_nanos", - "total_size", - "total_size_bytes", - "total_throttled", - "total_throttled_nanos", - "total_wait", - "total_wait_nanos" + "function" ] }, - "snapshot.repository_analyze.WriteSummaryInfo": { + "ml.put_trained_model.Definition": { "type": "object", "properties": { - "count": { - "description": "The number of write operations performed in the test.", - "type": "number" - }, - "total_elapsed": { - "$ref": "#/components/schemas/_types.Duration" - }, - "total_elapsed_nanos": { - "$ref": "#/components/schemas/_types.DurationValueUnitNanos" - }, - "total_size": { - "$ref": "#/components/schemas/_types.ByteSize" + "preprocessors": { + "description": "Collection of preprocessors", + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.put_trained_model.Preprocessor" + } }, - "total_size_bytes": { - "description": "The total size of all the blobs written in the test, in bytes.", - "type": "number" + "trained_model": { + "description": "The definition of the trained model.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.TrainedModel" + } + ] + } + }, + "required": [ + "trained_model" + ] + }, + "ml.put_trained_model.Preprocessor": { + "type": "object", + "properties": { + "frequency_encoding": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.FrequencyEncodingPreprocessor" + } + ] }, - "total_throttled": { - "$ref": "#/components/schemas/_types.Duration" + "one_hot_encoding": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.OneHotEncodingPreprocessor" + } + ] }, - "total_throttled_nanos": { - "description": "The total time spent waiting due to the `max_snapshot_bytes_per_sec` throttle, in nanoseconds.", - "type": "number" + "target_mean_encoding": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.TargetMeanEncodingPreprocessor" + } + ] } }, - "required": [ - "count", - "total_elapsed", - "total_elapsed_nanos", - "total_size", - "total_size_bytes", - "total_throttled", - "total_throttled_nanos" - ] + "minProperties": 1, + "maxProperties": 1 }, - "snapshot.restore.SnapshotRestore": { + "ml.put_trained_model.FrequencyEncodingPreprocessor": { "type": "object", "properties": { - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.IndexName" - } + "field": { + "type": "string" }, - "snapshot": { + "feature_name": { "type": "string" }, - "shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" + "frequency_map": { + "type": "object", + "additionalProperties": { + "type": "number" + } } }, "required": [ - "indices", - "snapshot", - "shards" + "field", + "feature_name", + "frequency_map" ] }, - "snapshot._types.Status": { + "ml.put_trained_model.OneHotEncodingPreprocessor": { "type": "object", "properties": { - "include_global_state": { - "description": "Indicates whether the current cluster state is included in the snapshot.", - "type": "boolean" + "field": { + "type": "string" }, - "indices": { + "hot_map": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/snapshot._types.SnapshotIndexStats" + "type": "string" } - }, - "repository": { - "description": "The name of the repository that includes the snapshot.", - "type": "string" - }, - "shards_stats": { - "$ref": "#/components/schemas/snapshot._types.ShardsStats" - }, - "snapshot": { - "description": "The name of the snapshot.", - "type": "string" - }, - "state": { - "description": "The current snapshot state:\n\n* `FAILED`: The snapshot finished with an error and failed to store any data.\n* `STARTED`: The snapshot is currently running.\n* `SUCCESS`: The snapshot completed.", - "type": "string" - }, - "stats": { - "$ref": "#/components/schemas/snapshot._types.SnapshotStats" - }, - "uuid": { - "$ref": "#/components/schemas/_types.Uuid" } }, "required": [ - "include_global_state", - "indices", - "repository", - "shards_stats", - "snapshot", - "state", - "stats", - "uuid" + "field", + "hot_map" ] }, - "snapshot._types.SnapshotIndexStats": { + "ml.put_trained_model.TargetMeanEncodingPreprocessor": { "type": "object", "properties": { - "shards": { + "field": { + "type": "string" + }, + "feature_name": { + "type": "string" + }, + "target_map": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/snapshot._types.SnapshotShardsStatus" + "type": "number" } }, - "shards_stats": { - "$ref": "#/components/schemas/snapshot._types.ShardsStats" - }, - "stats": { - "$ref": "#/components/schemas/snapshot._types.SnapshotStats" + "default_value": { + "type": "number" } }, "required": [ - "shards", - "shards_stats", - "stats" + "field", + "feature_name", + "target_map", + "default_value" ] }, - "snapshot._types.SnapshotShardsStatus": { + "ml.put_trained_model.TrainedModel": { "type": "object", "properties": { - "stage": { - "$ref": "#/components/schemas/snapshot._types.ShardsStatsStage" + "tree": { + "description": "The definition for a binary decision tree.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.TrainedModelTree" + } + ] }, - "stats": { - "$ref": "#/components/schemas/snapshot._types.ShardsStatsSummary" + "tree_node": { + "description": "The definition of a node in a tree.\nThere are two major types of nodes: leaf nodes and not-leaf nodes.\n- Leaf nodes only need node_index and leaf_value defined.\n- All other nodes need split_feature, left_child, right_child, threshold, decision_type, and default_left defined.", + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.TrainedModelTreeNode" + } + ] + }, + "ensemble": { + "description": "The definition for an ensemble model", + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.Ensemble" + } + ] } - }, - "required": [ - "stage", - "stats" - ] - }, - "snapshot._types.ShardsStatsStage": { - "type": "string", - "enum": [ - "DONE", - "FAILURE", - "FINALIZE", - "INIT", - "STARTED" - ] + } }, - "snapshot._types.ShardsStatsSummary": { + "ml.put_trained_model.TrainedModelTree": { "type": "object", "properties": { - "incremental": { - "$ref": "#/components/schemas/snapshot._types.ShardsStatsSummaryItem" - }, - "total": { - "$ref": "#/components/schemas/snapshot._types.ShardsStatsSummaryItem" + "classification_labels": { + "type": "array", + "items": { + "type": "string" + } }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "feature_names": { + "type": "array", + "items": { + "type": "string" + } }, - "time": { - "$ref": "#/components/schemas/_types.Duration" + "target_type": { + "type": "string" }, - "time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "tree_structure": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.put_trained_model.TrainedModelTreeNode" + } } }, "required": [ - "incremental", - "total", - "start_time_in_millis", - "time_in_millis" + "feature_names", + "tree_structure" ] }, - "snapshot._types.ShardsStatsSummaryItem": { + "ml.put_trained_model.TrainedModelTreeNode": { "type": "object", "properties": { - "file_count": { - "type": "number" + "decision_type": { + "type": "string" }, - "size_in_bytes": { + "default_left": { + "type": "boolean" + }, + "leaf_value": { "type": "number" - } - }, - "required": [ - "file_count", - "size_in_bytes" - ] - }, - "snapshot._types.ShardsStats": { - "type": "object", - "properties": { - "done": { - "description": "The number of shards that initialized, started, and finalized successfully.", + }, + "left_child": { "type": "number" }, - "failed": { - "description": "The number of shards that failed to be included in the snapshot.", + "node_index": { "type": "number" }, - "finalizing": { - "description": "The number of shards that are finalizing but are not done.", + "right_child": { "type": "number" }, - "initializing": { - "description": "The number of shards that are still initializing.", + "split_feature": { "type": "number" }, - "started": { - "description": "The number of shards that have started but are not finalized.", + "split_gain": { "type": "number" }, - "total": { - "description": "The total number of shards included in the snapshot.", + "threshold": { "type": "number" } }, "required": [ - "done", - "failed", - "finalizing", - "initializing", - "started", - "total" + "node_index" ] }, - "snapshot._types.SnapshotStats": { + "ml.put_trained_model.Ensemble": { "type": "object", "properties": { - "incremental": { - "$ref": "#/components/schemas/snapshot._types.FileCountSnapshotStats" + "aggregate_output": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.AggregateOutput" + } + ] }, - "start_time_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "classification_labels": { + "type": "array", + "items": { + "type": "string" + } }, - "time": { - "$ref": "#/components/schemas/_types.Duration" + "feature_names": { + "type": "array", + "items": { + "type": "string" + } }, - "time_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "target_type": { + "type": "string" }, - "total": { - "$ref": "#/components/schemas/snapshot._types.FileCountSnapshotStats" + "trained_models": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml.put_trained_model.TrainedModel" + } } }, "required": [ - "incremental", - "start_time_in_millis", - "time_in_millis", - "total" + "trained_models" ] }, - "snapshot._types.FileCountSnapshotStats": { + "ml.put_trained_model.AggregateOutput": { "type": "object", "properties": { - "file_count": { - "type": "number" + "logistic_regression": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.Weights" + } + ] }, - "size_in_bytes": { - "type": "number" + "weighted_sum": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.Weights" + } + ] + }, + "weighted_mode": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.Weights" + } + ] + }, + "exponent": { + "allOf": [ + { + "$ref": "#/components/schemas/ml.put_trained_model.Weights" + } + ] } - }, - "required": [ - "file_count", - "size_in_bytes" - ] + } }, - "snapshot.verify_repository.CompactNodeInfo": { + "ml.put_trained_model.Weights": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" + "weights": { + "type": "number" } }, "required": [ - "name" + "weights" ] }, - "sql._types.Column": { + "ml.put_trained_model.Input": { "type": "object", "properties": { - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "type": { - "type": "string" + "field_names": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Names" + } + ] } }, "required": [ - "name", - "type" - ] - }, - "sql._types.Row": { - "type": "array", - "items": { - "type": "object" - } - }, - "sql.query.SqlFormat": { - "type": "string", - "enum": [ - "csv", - "json", - "tsv", - "txt", - "yaml", - "cbor", - "smile" + "field_names" ] }, - "ssl.certificates.CertificateInformation": { + "ml._types.TrainedModelAssignment": { "type": "object", "properties": { - "alias": { - "description": "If the path refers to a container file (a jks keystore, or a PKCS#12 file), it is the alias of the certificate.\nOtherwise, it is null.", + "adaptive_allocations": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings" }, { "nullable": true, @@ -99036,22303 +164957,16939 @@ } ] }, - "expiry": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "format": { - "description": "The format of the file.\nValid values include `jks`, `PKCS12`, and `PEM`.", - "type": "string" + "assignment_state": { + "description": "The overall assignment state.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.DeploymentAssignmentState" + } + ] }, - "has_private_key": { - "description": "Indicates whether Elasticsearch has access to the private key for this certificate.", - "type": "boolean" + "max_assigned_allocations": { + "type": "number" }, - "issuer": { - "description": "The Distinguished Name of the certificate's issuer.", + "reason": { "type": "string" }, - "path": { - "description": "The path to the certificate, as configured in the `elasticsearch.yml` file.", - "type": "string" + "routing_table": { + "description": "The allocation state for each node.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ml._types.TrainedModelAssignmentRoutingTable" + } }, - "serial_number": { - "description": "The hexadecimal representation of the certificate's serial number.", - "type": "string" + "start_time": { + "description": "The timestamp when the deployment started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] }, - "subject_dn": { - "description": "The Distinguished Name of the certificate's subject.", - "type": "string" + "task_parameters": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainedModelAssignmentTaskParameters" + } + ] } }, "required": [ - "alias", - "expiry", - "format", - "has_private_key", - "path", - "serial_number", - "subject_dn" + "assignment_state", + "routing_table", + "start_time", + "task_parameters" ] }, - "synonyms._types.SynonymsUpdateResult": { + "ml._types.TrainedModelAssignmentRoutingTable": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" + "reason": { + "description": "The reason for the current state. It is usually populated only when the\n`routing_state` is `failed`.", + "type": "string" }, - "reload_analyzers_details": { - "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult" - } - }, - "required": [ - "result" - ] - }, - "synonyms._types.SynonymRuleRead": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "routing_state": { + "description": "The current routing state.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.RoutingState" + } + ] }, - "synonyms": { - "$ref": "#/components/schemas/synonyms._types.SynonymString" - } - }, - "required": [ - "id", - "synonyms" - ] - }, - "synonyms._types.SynonymString": { - "type": "string" - }, - "synonyms.get_synonyms_sets.SynonymsSetItem": { - "type": "object", - "properties": { - "synonyms_set": { - "$ref": "#/components/schemas/_types.Id" + "current_allocations": { + "description": "Current number of allocations.", + "type": "number" }, - "count": { - "description": "Number of synonym rules that the synonym set contains", + "target_allocations": { + "description": "Target number of allocations.", "type": "number" } }, "required": [ - "synonyms_set", - "count" + "routing_state", + "current_allocations", + "target_allocations" ] }, - "synonyms._types.SynonymRule": { + "ml._types.TrainedModelAssignmentTaskParameters": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "model_bytes": { + "description": "The size of the trained model in bytes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "synonyms": { - "$ref": "#/components/schemas/synonyms._types.SynonymString" - } - }, - "required": [ - "synonyms" - ] - }, - "tasks._types.GroupBy": { - "type": "string", - "enum": [ - "nodes", - "parents", - "none" - ] - }, - "text_structure._types.EcsCompatibilityType": { - "type": "string", - "enum": [ - "disabled", - "v1" - ] - }, - "text_structure._types.FormatType": { - "type": "string", - "enum": [ - "delimited", - "ndjson", - "semi_structured_text", - "xml" - ] - }, - "text_structure._types.FieldStat": { - "type": "object", - "properties": { - "count": { - "type": "number" + "model_id": { + "description": "The unique identifier for the trained model.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "cardinality": { + "deployment_id": { + "description": "The unique identifier for the trained model deployment.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "cache_size": { + "description": "The size of the trained model cache.", + "x-state": "Generally available; Added in 8.4.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "number_of_allocations": { + "description": "The total number of allocations this model is assigned across ML nodes.", "type": "number" }, - "top_hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/text_structure._types.TopHit" - } + "priority": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TrainingPriority" + } + ] }, - "mean_value": { - "type": "number" + "per_deployment_memory_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "median_value": { - "type": "number" + "per_allocation_memory_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "max_value": { + "queue_capacity": { + "description": "Number of inference requests are allowed in the queue at a time.", "type": "number" }, - "min_value": { + "threads_per_allocation": { + "description": "Number of threads per allocation.", "type": "number" - }, - "earliest": { - "type": "string" - }, - "latest": { - "type": "string" } }, "required": [ - "count", - "cardinality", - "top_hits" + "model_bytes", + "model_id", + "deployment_id", + "number_of_allocations", + "priority", + "per_deployment_memory_bytes", + "per_allocation_memory_bytes", + "queue_capacity", + "threads_per_allocation" ] }, - "text_structure._types.TopHit": { + "ml._types.AnalysisMemoryLimit": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "value": { - "type": "object" + "model_memory_limit": { + "description": "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.", + "type": "string" } }, "required": [ - "count", - "value" + "model_memory_limit" ] }, - "ingest._types.PipelineConfig": { + "ml._types.DetectorUpdate": { "type": "object", "properties": { + "detector_index": { + "description": "A unique identifier for the detector.\nThis identifier is based on the order of the detectors in the `analysis_config`, starting at zero.", + "type": "number" + }, "description": { - "description": "Description of the ingest pipeline.", + "description": "A description of the detector.", "type": "string" }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "processors": { - "description": "Processors used to perform transformations on documents before indexing.\nProcessors run sequentially in the order specified.", + "custom_rules": { + "description": "An array of custom rule objects, which enable you to customize the way detectors operate.\nFor example, a rule may dictate to the detector conditions under which results should be skipped.\nKibana refers to custom rules as job rules.", "type": "array", "items": { - "$ref": "#/components/schemas/ingest._types.ProcessorContainer" + "$ref": "#/components/schemas/ml._types.DetectionRule" } } }, "required": [ - "processors" + "detector_index" ] }, - "text_structure.test_grok_pattern.MatchedText": { + "_global.msearch.MultiSearchResult": { "type": "object", "properties": { - "matched": { - "type": "boolean" + "took": { + "type": "number" }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/text_structure.test_grok_pattern.MatchedField" - } + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.msearch.ResponseItem" } } }, "required": [ - "matched" + "took", + "responses" ] }, - "text_structure.test_grok_pattern.MatchedField": { - "type": "object", - "properties": { - "match": { - "type": "string" - }, - "offset": { - "type": "number" + "_global.msearch_template.RequestItem": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.msearch.MultisearchHeader" }, - "length": { - "type": "number" + { + "$ref": "#/components/schemas/_global.msearch_template.TemplateConfig" } - }, - "required": [ - "match", - "offset", - "length" ] }, - "transform.get_transform.TransformSummary": { + "_global.msearch_template.TemplateConfig": { "type": "object", "properties": { - "authorization": { - "$ref": "#/components/schemas/ml._types.TransformAuthorization" + "explain": { + "description": "If `true`, returns detailed information about score calculation as part of each hit.", + "default": false, + "type": "boolean" }, - "create_time": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "id": { + "description": "The ID of the search template to use. If no `source` is specified,\nthis parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "create_time_string": { - "$ref": "#/components/schemas/_types.DateTime" + "params": { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "type": "object", + "additionalProperties": { + "type": "object" + } }, - "description": { - "description": "Free text description of the transform.", - "type": "string" + "profile": { + "description": "If `true`, the query execution is profiled.", + "default": false, + "type": "boolean" }, - "dest": { - "$ref": "#/components/schemas/_global.reindex.Destination" + "source": { + "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + } + } + }, + "_global.mtermvectors.Operation": { + "type": "object", + "properties": { + "_id": { + "description": "The ID of the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" + "_index": { + "description": "The index of the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "doc": { + "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", + "type": "object" }, - "latest": { - "$ref": "#/components/schemas/transform._types.Latest" + "fields": { + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.\nUsed as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] }, - "pivot": { - "$ref": "#/components/schemas/transform._types.Pivot" + "field_statistics": { + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "default": true, + "type": "boolean" }, - "retention_policy": { - "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + "filter": { + "description": "Filter terms based on their tf-idf scores.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.termvectors.Filter" + } + ] }, - "settings": { - "$ref": "#/components/schemas/transform._types.Settings" + "offsets": { + "description": "If `true`, the response includes term offsets.", + "default": true, + "type": "boolean" }, - "source": { - "$ref": "#/components/schemas/transform._types.Source" + "payloads": { + "description": "If `true`, the response includes term payloads.", + "default": true, + "type": "boolean" }, - "sync": { - "$ref": "#/components/schemas/transform._types.SyncContainer" + "positions": { + "description": "If `true`, the response includes term positions.", + "default": true, + "type": "boolean" + }, + "routing": { + "description": "Custom value used to route operations to a specific shard.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "term_statistics": { + "description": "If true, the response includes term frequency and document frequency.", + "default": false, + "type": "boolean" }, "version": { - "$ref": "#/components/schemas/_types.VersionString" + "description": "If `true`, returns the document version as part of a hit.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" + "version_type": { + "description": "Specific version type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] } - }, - "required": [ - "dest", - "id", - "source" - ] + } }, - "ml._types.TransformAuthorization": { + "_global.termvectors.Filter": { "type": "object", "properties": { - "api_key": { - "$ref": "#/components/schemas/ml._types.ApiKeyAuthorization" + "max_doc_freq": { + "description": "Ignore words which occur in more than this many docs.\nDefaults to unbounded.", + "type": "number" }, - "roles": { - "description": "If a user ID was used for the most recent update to the transform, its roles at the time of the update are listed in the response.", - "type": "array", - "items": { - "type": "string" - } + "max_num_terms": { + "description": "The maximum number of terms that must be returned per field.", + "default": 25.0, + "type": "number" }, - "service_account": { - "description": "If a service account was used for the most recent update to the transform, the account name is listed in the response.", - "type": "string" + "max_term_freq": { + "description": "Ignore words with more than this frequency in the source doc.\nIt defaults to unbounded.", + "type": "number" + }, + "max_word_length": { + "description": "The maximum word length above which words will be ignored.\nDefaults to unbounded.", + "default": 0.0, + "type": "number" + }, + "min_doc_freq": { + "description": "Ignore terms which do not occur in at least this many docs.", + "default": 1.0, + "type": "number" + }, + "min_term_freq": { + "description": "Ignore words with less than this frequency in the source doc.", + "default": 1.0, + "type": "number" + }, + "min_word_length": { + "description": "The minimum word length below which words will be ignored.", + "default": 0.0, + "type": "number" } } }, - "transform._types.Latest": { + "_global.mtermvectors.TermVectorsResult": { "type": "object", "properties": { - "sort": { - "$ref": "#/components/schemas/_types.Field" + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "unique_key": { - "description": "Specifies an array of one or more fields that are used to group the data.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Field" + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "took": { + "type": "number" + }, + "found": { + "type": "boolean" + }, + "term_vectors": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.termvectors.TermVector" } + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] } }, "required": [ - "sort", - "unique_key" + "_index" ] }, - "transform._types.Pivot": { + "_global.termvectors.TermVector": { "type": "object", "properties": { - "aggregations": { - "description": "Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket\nscript, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation,\nmin, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted\naverage.", + "field_statistics": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.termvectors.FieldStatistics" + } + ] + }, + "terms": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + "$ref": "#/components/schemas/_global.termvectors.Term" } + } + }, + "required": [ + "terms" + ] + }, + "_global.termvectors.FieldStatistics": { + "type": "object", + "properties": { + "doc_count": { + "type": "number" }, - "group_by": { - "description": "Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are\ncurrently supported: date histogram, geotile grid, histogram, terms.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/transform._types.PivotGroupByContainer" + "sum_doc_freq": { + "type": "number" + }, + "sum_ttf": { + "type": "number" + } + }, + "required": [ + "doc_count", + "sum_doc_freq", + "sum_ttf" + ] + }, + "_global.termvectors.Term": { + "type": "object", + "properties": { + "doc_freq": { + "type": "number" + }, + "score": { + "type": "number" + }, + "term_freq": { + "type": "number" + }, + "tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.termvectors.Token" } + }, + "ttf": { + "type": "number" } - } + }, + "required": [ + "term_freq" + ] }, - "transform._types.PivotGroupByContainer": { + "_global.termvectors.Token": { "type": "object", "properties": { - "date_histogram": { - "$ref": "#/components/schemas/_types.aggregations.DateHistogramAggregation" + "end_offset": { + "type": "number" }, - "geotile_grid": { - "$ref": "#/components/schemas/_types.aggregations.GeoTileGridAggregation" + "payload": { + "type": "string" }, - "histogram": { - "$ref": "#/components/schemas/_types.aggregations.HistogramAggregation" + "position": { + "type": "number" }, - "terms": { - "$ref": "#/components/schemas/_types.aggregations.TermsAggregation" + "start_offset": { + "type": "number" } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "position" + ] }, - "transform._types.RetentionPolicyContainer": { + "nodes.clear_repositories_metering_archive.ResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + }, + { + "type": "object", + "properties": { + "cluster_name": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/important-settings-configuration##_cluster_name_setting" + }, + "description": "Name of the cluster. Based on the `cluster.name` setting.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "description": "Contains repositories metering information for the nodes selected by the request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.RepositoryMeteringInformation" + } + } + }, + "required": [ + "cluster_name", + "nodes" + ] + } + ] + }, + "nodes._types.RepositoryMeteringInformation": { "type": "object", "properties": { - "time": { - "$ref": "#/components/schemas/transform._types.RetentionPolicy" + "repository_name": { + "description": "Repository name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "repository_type": { + "description": "Repository type.", + "type": "string" + }, + "repository_location": { + "description": "Represents an unique location within the repository.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.RepositoryLocation" + } + ] + }, + "repository_ephemeral_id": { + "description": "An identifier that changes every time the repository is updated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "repository_started_at": { + "description": "Time the repository was created or updated. Recorded in milliseconds since the Unix Epoch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "repository_stopped_at": { + "description": "Time the repository was deleted or updated. Recorded in milliseconds since the Unix Epoch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "archived": { + "description": "A flag that tells whether or not this object has been archived. When a repository is closed or updated the\nrepository metering information is archived and kept for a certain period of time. This allows retrieving the\nrepository metering information of previous repository instantiations.", + "type": "boolean" + }, + "cluster_version": { + "description": "The cluster state version when this object was archived, this field can be used as a logical timestamp to delete\nall the archived metrics up to an observed version. This field is only present for archived repository metering\ninformation objects. The main purpose of this field is to avoid possible race conditions during repository metering\ninformation deletions, i.e. deleting archived repositories metering information that we haven’t observed yet.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "request_counts": { + "description": "An object with the number of request performed against the repository grouped by request type.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.RequestCounts" + } + ] } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "repository_name", + "repository_type", + "repository_location", + "repository_ephemeral_id", + "repository_started_at", + "archived", + "request_counts" + ] }, - "transform._types.RetentionPolicy": { + "nodes._types.RepositoryLocation": { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" + "base_path": { + "type": "string" + }, + "container": { + "description": "Container name (Azure)", + "type": "string" }, - "max_age": { - "$ref": "#/components/schemas/_types.Duration" + "bucket": { + "description": "Bucket name (GCP, S3)", + "type": "string" } }, "required": [ - "field", - "max_age" + "base_path" ] }, - "transform._types.Settings": { + "nodes._types.RequestCounts": { "type": "object", "properties": { - "align_checkpoints": { - "description": "Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align\ncheckpoint ranges with the date histogram interval when date histogram is specified as a group source in the\ntransform config. As a result, less document updates in the destination index will be performed thus improving\noverall performance.", - "type": "boolean" + "GetBlobProperties": { + "description": "Number of Get Blob Properties requests (Azure)", + "type": "number" }, - "dates_as_epoch_millis": { - "description": "Defines if dates in the ouput should be written as ISO formatted string or as millis since epoch. epoch_millis was\nthe default for transforms created before version 7.11. For compatible output set this value to `true`.", - "type": "boolean" + "GetBlob": { + "description": "Number of Get Blob requests (Azure)", + "type": "number" }, - "deduce_mappings": { - "description": "Specifies whether the transform should deduce the destination index mappings from the transform configuration.", - "type": "boolean" + "ListBlobs": { + "description": "Number of List Blobs requests (Azure)", + "type": "number" }, - "docs_per_second": { - "description": "Specifies a limit on the number of input documents per second. This setting throttles the transform by adding a\nwait time between search requests. The default value is null, which disables throttling.", + "PutBlob": { + "description": "Number of Put Blob requests (Azure)", "type": "number" }, - "max_page_search_size": { - "description": "Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker\nexceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`.", + "PutBlock": { + "description": "Number of Put Block (Azure)", "type": "number" }, - "unattended": { - "description": "If `true`, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case\nof an error which means the transform never fails. Setting the number of retries other than infinite fails in\nvalidation.", - "type": "boolean" + "PutBlockList": { + "description": "Number of Put Block List requests", + "type": "number" + }, + "GetObject": { + "description": "Number of get object requests (GCP, S3)", + "type": "number" + }, + "ListObjects": { + "description": "Number of list objects requests (GCP, S3)", + "type": "number" + }, + "InsertObject": { + "description": "Number of insert object requests, including simple, multipart and resumable uploads. Resumable uploads\ncan perform multiple http requests to insert a single object but they are considered as a single request\nsince they are billed as an individual operation. (GCP)", + "type": "number" + }, + "PutObject": { + "description": "Number of PutObject requests (S3)", + "type": "number" + }, + "PutMultipartObject": { + "description": "Number of Multipart requests, including CreateMultipartUpload, UploadPart and CompleteMultipartUpload requests (S3)", + "type": "number" } } }, - "transform._types.Source": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.Indices" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "nodes.get_repositories_metering_info.ResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.NodesResponseBase" }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + { + "type": "object", + "properties": { + "cluster_name": { + "description": "Name of the cluster. Based on the `cluster.name` setting.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "description": "Contains repositories metering information for the nodes selected by the request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.RepositoryMeteringInformation" + } + } + }, + "required": [ + "cluster_name", + "nodes" + ] } - }, - "required": [ - "index" ] }, - "transform._types.SyncContainer": { - "type": "object", - "properties": { - "time": { - "$ref": "#/components/schemas/transform._types.TimeSync" + "_types.ThreadType": { + "type": "string", + "enum": [ + "cpu", + "wait", + "block", + "gpu", + "mem" + ] + }, + "nodes.info.NodesInfoMetrics": { + "oneOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodesInfoMetric" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/nodes.info.NodesInfoMetric" + } } - }, - "minProperties": 1, - "maxProperties": 1 + ] }, - "transform._types.TimeSync": { - "type": "object", - "properties": { - "delay": { - "$ref": "#/components/schemas/_types.Duration" + "nodes.info.NodesInfoMetric": { + "type": "string", + "enum": [ + "_all", + "_none", + "settings", + "os", + "process", + "jvm", + "thread_pool", + "transport", + "http", + "remote_cluster_server", + "plugins", + "ingest", + "aggregations", + "indices" + ] + }, + "nodes.info.ResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.NodesResponseBase" }, - "field": { - "$ref": "#/components/schemas/_types.Field" + { + "type": "object", + "properties": { + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes.info.NodeInfo" + } + } + }, + "required": [ + "cluster_name", + "nodes" + ] } - }, - "required": [ - "field" ] }, - "transform.get_transform_stats.TransformStats": { + "nodes.info.NodeInfo": { "type": "object", "properties": { - "checkpointing": { - "$ref": "#/components/schemas/transform.get_transform_stats.Checkpointing" - }, - "health": { - "$ref": "#/components/schemas/transform.get_transform_stats.TransformStatsHealth" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "node": { - "$ref": "#/components/schemas/_types.NodeAttributes" + "build_flavor": { + "type": "string" }, - "reason": { + "build_hash": { + "description": "Short hash of the last git commit in this release.", "type": "string" }, - "state": { + "build_type": { "type": "string" }, - "stats": { - "$ref": "#/components/schemas/transform.get_transform_stats.TransformIndexerStats" - } - }, - "required": [ - "checkpointing", - "id", - "state", - "stats" - ] - }, - "transform.get_transform_stats.Checkpointing": { - "type": "object", - "properties": { - "changes_last_detected_at": { - "type": "number" + "component_versions": { + "type": "object", + "additionalProperties": { + "type": "number" + } }, - "changes_last_detected_at_string": { - "$ref": "#/components/schemas/_types.DateTime" + "host": { + "description": "The node’s host name.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" + } + ] }, - "last": { - "$ref": "#/components/schemas/transform.get_transform_stats.CheckpointStats" + "http": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoHttp" + } + ] }, - "next": { - "$ref": "#/components/schemas/transform.get_transform_stats.CheckpointStats" + "index_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] }, - "operations_behind": { - "type": "number" + "ip": { + "description": "The node’s IP address.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ip" + } + ] }, - "last_search_time": { - "type": "number" + "jvm": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeJvmInfo" + } + ] }, - "last_search_time_string": { - "$ref": "#/components/schemas/_types.DateTime" - } - }, - "required": [ - "last" - ] - }, - "transform.get_transform_stats.CheckpointStats": { - "type": "object", - "properties": { - "checkpoint": { - "type": "number" + "name": { + "description": "The node's name", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "checkpoint_progress": { - "$ref": "#/components/schemas/transform.get_transform_stats.TransformProgress" + "os": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeOperatingSystemInfo" + } + ] }, - "timestamp": { - "$ref": "#/components/schemas/_types.DateTime" + "plugins": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.PluginStats" + } }, - "timestamp_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "process": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeProcessInfo" + } + ] }, - "time_upper_bound": { - "$ref": "#/components/schemas/_types.DateTime" + "roles": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeRoles" + } + ] }, - "time_upper_bound_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - } - }, - "required": [ - "checkpoint" - ] - }, - "transform.get_transform_stats.TransformProgress": { - "type": "object", - "properties": { - "docs_indexed": { - "type": "number" + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettings" + } + ] }, - "docs_processed": { - "type": "number" + "thread_pool": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes.info.NodeThreadPoolInfo" + } }, - "docs_remaining": { + "total_indexing_buffer": { + "description": "Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings.", "type": "number" }, - "percent_complete": { - "type": "number" + "total_indexing_buffer_in_bytes": { + "description": "Same as total_indexing_buffer, but expressed in bytes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "total_docs": { - "type": "number" - } - }, - "required": [ - "docs_indexed", - "docs_processed" - ] - }, - "transform.get_transform_stats.TransformStatsHealth": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/_types.HealthStatus" + "transport": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoTransport" + } + ] }, - "issues": { - "description": "If a non-healthy status is returned, contains a list of issues of the transform.", + "transport_address": { + "description": "Host and port where transport HTTP connections are accepted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] + }, + "transport_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "version": { + "description": "Elasticsearch version running on this node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "modules": { "type": "array", "items": { - "$ref": "#/components/schemas/transform.get_transform_stats.TransformHealthIssue" + "$ref": "#/components/schemas/_types.PluginStats" + } + }, + "ingest": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngest" + } + ] + }, + "aggregations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes.info.NodeInfoAggregation" } + }, + "remote_cluster_server": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.RemoveClusterServer" + } + ] } }, "required": [ - "status" + "attributes", + "build_flavor", + "build_hash", + "build_type", + "component_versions", + "host", + "index_version", + "ip", + "name", + "roles", + "transport_address", + "transport_version", + "version" ] }, - "transform.get_transform_stats.TransformHealthIssue": { + "nodes.info.NodeInfoHttp": { "type": "object", "properties": { - "type": { - "description": "The type of the issue", - "type": "string" - }, - "issue": { - "description": "A description of the issue", - "type": "string" + "bound_address": { + "type": "array", + "items": { + "type": "string" + } }, - "details": { - "description": "Details about the issue", - "type": "string" + "max_content_length": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "count": { - "description": "Number of times this issue has occurred since it started", + "max_content_length_in_bytes": { "type": "number" }, - "first_occurrence": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "first_occurence_string": { - "$ref": "#/components/schemas/_types.DateTime" + "publish_address": { + "type": "string" } }, "required": [ - "type", - "issue", - "count" + "bound_address", + "max_content_length_in_bytes", + "publish_address" ] }, - "transform.get_transform_stats.TransformIndexerStats": { + "nodes.info.NodeJvmInfo": { "type": "object", "properties": { - "delete_time_in_ms": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + "gc_collectors": { + "type": "array", + "items": { + "type": "string" + } }, - "documents_indexed": { - "type": "number" + "mem": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoJvmMemory" + } + ] }, - "documents_deleted": { - "type": "number" + "memory_pools": { + "type": "array", + "items": { + "type": "string" + } }, - "documents_processed": { + "pid": { "type": "number" }, - "exponential_avg_checkpoint_duration_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + "start_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "vm_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "vm_vendor": { + "type": "string" + }, + "vm_version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "using_bundled_jdk": { + "type": "boolean" + }, + "using_compressed_ordinary_object_pointers": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + }, + "input_arguments": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "gc_collectors", + "mem", + "memory_pools", + "pid", + "start_time_in_millis", + "version", + "vm_name", + "vm_vendor", + "vm_version", + "using_bundled_jdk", + "input_arguments" + ] + }, + "nodes.info.NodeInfoJvmMemory": { + "type": "object", + "properties": { + "direct_max": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "exponential_avg_documents_indexed": { + "direct_max_in_bytes": { "type": "number" }, - "exponential_avg_documents_processed": { - "type": "number" + "heap_init": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "index_failures": { + "heap_init_in_bytes": { "type": "number" }, - "index_time_in_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "index_total": { - "type": "number" + "heap_max": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "pages_processed": { + "heap_max_in_bytes": { "type": "number" }, - "processing_time_in_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "processing_total": { - "type": "number" + "non_heap_init": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "search_failures": { + "non_heap_init_in_bytes": { "type": "number" }, - "search_time_in_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "search_total": { - "type": "number" + "non_heap_max": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "trigger_count": { + "non_heap_max_in_bytes": { "type": "number" } }, "required": [ - "documents_indexed", - "documents_processed", - "exponential_avg_checkpoint_duration_ms", - "exponential_avg_documents_indexed", - "exponential_avg_documents_processed", - "index_failures", - "index_time_in_ms", - "index_total", - "pages_processed", - "processing_time_in_ms", - "processing_total", - "search_failures", - "search_time_in_ms", - "search_total", - "trigger_count" + "direct_max_in_bytes", + "heap_init_in_bytes", + "heap_max_in_bytes", + "non_heap_init_in_bytes", + "non_heap_max_in_bytes" ] }, - "transform._types.Destination": { + "nodes.info.NodeOperatingSystemInfo": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "pipeline": { - "description": "The unique identifier for an ingest pipeline.", + "arch": { + "description": "Name of the JVM architecture (ex: amd64, x86)", "type": "string" - } - } - }, - "_global.update.UpdateWriteResponseBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.WriteResponseBase" }, - { - "type": "object", - "properties": { - "get": { - "$ref": "#/components/schemas/_types.InlineGet" + "available_processors": { + "description": "Number of processors available to the Java virtual machine", + "type": "number" + }, + "allocated_processors": { + "description": "The number of processors actually used to calculate thread pool size. This number can be set with the node.processors setting of a node and defaults to the number of processors reported by the OS.", + "type": "number" + }, + "name": { + "description": "Name of the operating system (ex: Linux, Windows, Mac OS X)", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } - } - ] - }, - "_global.update_by_query_rethrottle.UpdateByQueryRethrottleNode": { - "allOf": [ - { - "$ref": "#/components/schemas/_spec_utils.BaseNode" + ] }, - { - "type": "object", - "properties": { - "tasks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/tasks._types.TaskInfo" - } + "pretty_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - }, - "required": [ - "tasks" ] - } - ] - }, - "watcher._types.WatchStatus": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/components/schemas/watcher._types.Actions" }, - "last_checked": { - "$ref": "#/components/schemas/_types.DateTime" + "refresh_interval_in_millis": { + "description": "Refresh interval for the OS statistics", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "last_met_condition": { - "$ref": "#/components/schemas/_types.DateTime" + "version": { + "description": "Version of the operating system", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] }, - "state": { - "$ref": "#/components/schemas/watcher._types.ActivationState" + "cpu": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoOSCPU" + } + ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "mem": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoMemory" + } + ] }, - "execution_state": { - "type": "string" + "swap": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoMemory" + } + ] } }, "required": [ - "actions", - "state", + "arch", + "available_processors", + "name", + "pretty_name", + "refresh_interval_in_millis", "version" ] }, - "watcher._types.Actions": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/watcher._types.ActionStatus" - } - }, - "watcher._types.ActionStatus": { + "nodes.info.NodeInfoOSCPU": { "type": "object", "properties": { - "ack": { - "$ref": "#/components/schemas/watcher._types.AcknowledgeState" + "cache_size": { + "type": "string" }, - "last_execution": { - "$ref": "#/components/schemas/watcher._types.ExecutionState" + "cache_size_in_bytes": { + "type": "number" }, - "last_successful_execution": { - "$ref": "#/components/schemas/watcher._types.ExecutionState" + "cores_per_socket": { + "type": "number" }, - "last_throttle": { - "$ref": "#/components/schemas/watcher._types.ThrottleState" - } - }, - "required": [ - "ack" - ] - }, - "watcher._types.AcknowledgeState": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/watcher._types.AcknowledgementOptions" + "mhz": { + "type": "number" }, - "timestamp": { - "$ref": "#/components/schemas/_types.DateTime" - } - }, - "required": [ - "state", - "timestamp" - ] - }, - "watcher._types.AcknowledgementOptions": { - "type": "string", - "enum": [ - "awaits_successful_execution", - "ackable", - "acked" - ] - }, - "watcher._types.ExecutionState": { - "type": "object", - "properties": { - "successful": { - "type": "boolean" + "model": { + "type": "string" }, - "timestamp": { - "$ref": "#/components/schemas/_types.DateTime" + "total_cores": { + "type": "number" }, - "reason": { + "total_sockets": { + "type": "number" + }, + "vendor": { "type": "string" } }, "required": [ - "successful", - "timestamp" + "cache_size", + "cache_size_in_bytes", + "cores_per_socket", + "mhz", + "model", + "total_cores", + "total_sockets", + "vendor" ] }, - "watcher._types.ThrottleState": { + "nodes.info.NodeInfoMemory": { "type": "object", "properties": { - "reason": { + "total": { "type": "string" }, - "timestamp": { - "$ref": "#/components/schemas/_types.DateTime" + "total_in_bytes": { + "type": "number" } }, "required": [ - "reason", - "timestamp" + "total", + "total_in_bytes" ] }, - "watcher._types.ActivationState": { + "nodes.info.NodeProcessInfo": { "type": "object", "properties": { - "active": { + "id": { + "description": "Process identifier (PID)", + "type": "number" + }, + "mlockall": { + "description": "Indicates if the process address space has been successfully locked in memory", "type": "boolean" }, - "timestamp": { - "$ref": "#/components/schemas/_types.DateTime" + "refresh_interval_in_millis": { + "description": "Refresh interval for the process statistics", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "active", - "timestamp" + "id", + "mlockall", + "refresh_interval_in_millis" ] }, - "watcher._types.ActivationStatus": { + "nodes.info.NodeInfoSettings": { "type": "object", "properties": { - "actions": { - "$ref": "#/components/schemas/watcher._types.Actions" + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsCluster" + } + ] }, - "state": { - "$ref": "#/components/schemas/watcher._types.ActivationState" + "node": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsNode" + } + ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - } - }, - "required": [ - "actions", - "state", - "version" - ] - }, - "watcher._types.ActionExecutionMode": { - "type": "string", - "enum": [ - "simulate", - "force_simulate", - "execute", - "force_execute", - "skip" - ] - }, - "watcher._types.SimulatedActions": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "type": "string" - } + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoPath" + } + ] }, - "all": { - "$ref": "#/components/schemas/watcher._types.SimulatedActions" + "repositories": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoRepositories" + } + ] }, - "use_all": { - "type": "boolean" - } - }, - "required": [ - "actions", - "all", - "use_all" - ] - }, - "watcher._types.ScheduleTriggerEvent": { - "type": "object", - "properties": { - "scheduled_time": { - "$ref": "#/components/schemas/_types.DateTime" + "discovery": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoDiscover" + } + ] }, - "triggered_time": { - "$ref": "#/components/schemas/_types.DateTime" - } - }, - "required": [ - "scheduled_time" - ] - }, - "watcher._types.Watch": { - "type": "object", - "properties": { - "actions": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/watcher._types.Action" - } + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoAction" + } + ] }, - "condition": { - "$ref": "#/components/schemas/watcher._types.ConditionContainer" + "client": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoClient" + } + ] }, - "input": { - "$ref": "#/components/schemas/watcher._types.InputContainer" + "http": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsHttp" + } + ] }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "bootstrap": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoBootstrap" + } + ] }, - "status": { - "$ref": "#/components/schemas/watcher._types.WatchStatus" + "transport": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsTransport" + } + ] }, - "throttle_period": { - "$ref": "#/components/schemas/_types.Duration" + "network": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsNetwork" + } + ] }, - "throttle_period_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "xpack": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpack" + } + ] }, - "transform": { - "$ref": "#/components/schemas/_types.TransformContainer" + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoScript" + } + ] }, - "trigger": { - "$ref": "#/components/schemas/watcher._types.TriggerContainer" + "search": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSearch" + } + ] + }, + "ingest": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsIngest" + } + ] } }, "required": [ - "actions", - "condition", - "input", - "trigger" + "cluster", + "node", + "http", + "transport" ] }, - "watcher._types.Action": { + "nodes.info.NodeInfoSettingsCluster": { "type": "object", "properties": { - "action_type": { - "$ref": "#/components/schemas/watcher._types.ActionType" - }, - "condition": { - "$ref": "#/components/schemas/watcher._types.ConditionContainer" - }, - "foreach": { - "type": "string" - }, - "max_iterations": { - "type": "number" - }, "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "throttle_period": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttle_period_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "transform": { - "$ref": "#/components/schemas/_types.TransformContainer" - }, - "index": { - "$ref": "#/components/schemas/watcher._types.IndexAction" - }, - "logging": { - "$ref": "#/components/schemas/watcher._types.LoggingAction" + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "email": { - "$ref": "#/components/schemas/watcher._types.EmailAction" + "routing": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexRouting" + } + ] }, - "pagerduty": { - "$ref": "#/components/schemas/watcher._types.PagerDutyAction" + "election": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsClusterElection" + } + ] }, - "slack": { - "$ref": "#/components/schemas/watcher._types.SlackAction" + "initial_master_nodes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] }, - "webhook": { - "$ref": "#/components/schemas/watcher._types.WebhookAction" - } - } - }, - "watcher._types.ActionType": { - "type": "string", - "enum": [ - "email", - "webhook", - "index", - "logging", - "slack", - "pagerduty" + "deprecation_indexing": { + "x-state": "Generally available; Added in 7.16.0", + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.DeprecationIndexing" + } + ] + } + }, + "required": [ + "name", + "election" ] }, - "watcher._types.ConditionContainer": { + "nodes.info.NodeInfoSettingsClusterElection": { "type": "object", "properties": { - "always": { - "$ref": "#/components/schemas/watcher._types.AlwaysCondition" - }, - "array_compare": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/watcher._types.ArrayCompareCondition" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "compare": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.FieldValue" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "minProperties": 1, - "maxProperties": 1 - }, - "never": { - "$ref": "#/components/schemas/watcher._types.NeverCondition" - }, - "script": { - "$ref": "#/components/schemas/watcher._types.ScriptCondition" + "strategy": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] } }, - "minProperties": 1, - "maxProperties": 1 - }, - "watcher._types.AlwaysCondition": { - "type": "object" + "required": [ + "strategy" + ] }, - "watcher._types.ArrayCompareCondition": { + "nodes.info.DeprecationIndexing": { "type": "object", "properties": { - "path": { - "type": "string" + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] } }, "required": [ - "path" + "enabled" ] }, - "watcher._types.NeverCondition": { - "type": "object" - }, - "watcher._types.ScriptCondition": { + "nodes.info.NodeInfoSettingsNode": { "type": "object", "properties": { - "lang": { - "$ref": "#/components/schemas/_types.ScriptLanguage" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "params": { + "attr": { "type": "object", "additionalProperties": { "type": "object" } }, - "source": { - "$ref": "#/components/schemas/_types.ScriptSource" - }, - "id": { + "max_local_storage_nodes": { "type": "string" } - } + }, + "required": [ + "name", + "attr" + ] }, - "_types.TransformContainer": { + "nodes.info.NodeInfoPath": { "type": "object", "properties": { - "chain": { + "logs": { + "type": "string" + }, + "home": { + "type": "string" + }, + "repo": { "type": "array", "items": { - "$ref": "#/components/schemas/_types.TransformContainer" + "type": "string" } }, - "script": { - "$ref": "#/components/schemas/_types.ScriptTransform" - }, - "search": { - "$ref": "#/components/schemas/_types.SearchTransform" + "data": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } - }, - "minProperties": 1, - "maxProperties": 1 + } }, - "_types.ScriptTransform": { + "nodes.info.NodeInfoRepositories": { "type": "object", "properties": { - "lang": { - "type": "string" - }, - "params": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "source": { - "$ref": "#/components/schemas/_types.ScriptSource" - }, - "id": { - "type": "string" + "url": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoRepositoriesUrl" + } + ] } - } + }, + "required": [ + "url" + ] }, - "_types.SearchTransform": { + "nodes.info.NodeInfoRepositoriesUrl": { "type": "object", "properties": { - "request": { - "$ref": "#/components/schemas/watcher._types.SearchInputRequestDefinition" - }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" + "allowed_urls": { + "type": "string" } }, "required": [ - "request", - "timeout" + "allowed_urls" ] }, - "watcher._types.SearchInputRequestDefinition": { + "nodes.info.NodeInfoDiscover": { "type": "object", "properties": { - "body": { - "$ref": "#/components/schemas/watcher._types.SearchInputRequestBody" + "seed_hosts": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] }, - "indices": { + "type": { + "type": "string" + }, + "seed_providers": { "type": "array", "items": { - "$ref": "#/components/schemas/_types.IndexName" + "type": "string" } - }, - "indices_options": { - "$ref": "#/components/schemas/_types.IndicesOptions" - }, - "search_type": { - "$ref": "#/components/schemas/_types.SearchType" - }, - "template": { - "$ref": "#/components/schemas/watcher._types.SearchTemplateRequestBody" - }, - "rest_total_hits_as_int": { - "type": "boolean" } } }, - "watcher._types.SearchInputRequestBody": { + "nodes.info.NodeInfoAction": { "type": "object", "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "destructive_requires_name": { + "type": "string" } }, "required": [ - "query" + "destructive_requires_name" ] }, - "watcher._types.SearchTemplateRequestBody": { + "nodes.info.NodeInfoClient": { "type": "object", "properties": { - "explain": { - "type": "boolean" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "params": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "profile": { - "type": "boolean" - }, - "source": { - "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. Also supports Mustache variables. If no id is specified, this\nparameter is required.", + "type": { "type": "string" } - } + }, + "required": [ + "type" + ] }, - "watcher._types.IndexAction": { + "nodes.info.NodeInfoSettingsHttp": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "doc_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "refresh": { - "$ref": "#/components/schemas/_types.Refresh" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsHttpType" + } + ] }, - "op_type": { - "$ref": "#/components/schemas/_types.OpType" + "type.default": { + "type": "string" }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" + "compression": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] }, - "execution_time_field": { - "$ref": "#/components/schemas/_types.Field" + "port": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] } }, "required": [ - "index" + "type" ] }, - "watcher._types.LoggingAction": { + "nodes.info.NodeInfoSettingsHttpType": { "type": "object", "properties": { - "level": { - "type": "string" - }, - "text": { - "type": "string" - }, - "category": { + "default": { "type": "string" } }, "required": [ - "text" + "default" ] }, - "watcher._types.EmailAction": { - "allOf": [ - { - "$ref": "#/components/schemas/watcher._types.Email" - }, - { - "type": "object" + "nodes.info.NodeInfoBootstrap": { + "type": "object", + "properties": { + "memory_lock": { + "type": "string" } + }, + "required": [ + "memory_lock" ] }, - "watcher._types.Email": { + "nodes.info.NodeInfoSettingsTransport": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "bcc": { - "oneOf": [ - { - "type": "string" - }, + "type": { + "allOf": [ { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsTransportType" } ] }, - "body": { - "$ref": "#/components/schemas/watcher._types.EmailBody" + "type.default": { + "type": "string" }, - "cc": { - "oneOf": [ - { - "type": "string" - }, + "features": { + "allOf": [ { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsTransportFeatures" } ] - }, - "from": { + } + }, + "required": [ + "type" + ] + }, + "nodes.info.NodeInfoSettingsTransportType": { + "type": "object", + "properties": { + "default": { "type": "string" - }, - "priority": { - "$ref": "#/components/schemas/watcher._types.EmailPriority" - }, - "reply_to": { + } + }, + "required": [ + "default" + ] + }, + "nodes.info.NodeInfoSettingsTransportFeatures": { + "type": "object", + "properties": { + "x-pack": { + "type": "string" + } + }, + "required": [ + "x-pack" + ] + }, + "nodes.info.NodeInfoSettingsNetwork": { + "type": "object", + "properties": { + "host": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.Host" }, { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/_types.Host" } } ] - }, - "sent_date": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "subject": { - "type": "string" - }, - "to": { - "oneOf": [ + } + } + }, + "nodes.info.NodeInfoXpack": { + "type": "object", + "properties": { + "license": { + "allOf": [ { - "type": "string" - }, + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackLicense" + } + ] + }, + "security": { + "allOf": [ { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurity" } ] }, - "attachments": { + "notification": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/watcher._types.EmailAttachmentContainer" + "type": "object" } + }, + "ml": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackMl" + } + ] } }, "required": [ - "subject", - "to" + "security" ] }, - "watcher._types.EmailBody": { + "nodes.info.NodeInfoXpackLicense": { "type": "object", "properties": { - "html": { - "type": "string" - }, - "text": { - "type": "string" + "self_generated": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackLicenseType" + } + ] } - } + }, + "required": [ + "self_generated" + ] }, - "watcher._types.EmailPriority": { - "type": "string", - "enum": [ - "lowest", - "low", - "normal", - "high", - "highest" + "nodes.info.NodeInfoXpackLicenseType": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" ] }, - "watcher._types.EmailAttachmentContainer": { + "nodes.info.NodeInfoXpackSecurity": { "type": "object", "properties": { "http": { - "$ref": "#/components/schemas/watcher._types.HttpEmailAttachment" + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecuritySsl" + } + ] }, - "reporting": { - "$ref": "#/components/schemas/watcher._types.ReportingEmailAttachment" + "enabled": { + "type": "string" }, - "data": { - "$ref": "#/components/schemas/watcher._types.DataEmailAttachment" + "transport": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecuritySsl" + } + ] + }, + "authc": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthc" + } + ] } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "enabled" + ] }, - "watcher._types.HttpEmailAttachment": { + "nodes.info.NodeInfoXpackSecuritySsl": { "type": "object", "properties": { - "content_type": { - "type": "string" - }, - "inline": { - "type": "boolean" + "ssl": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "ssl" + ] + }, + "nodes.info.NodeInfoXpackSecurityAuthc": { + "type": "object", + "properties": { + "realms": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcRealms" + } + ] }, - "request": { - "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcToken" + } + ] } } }, - "watcher._types.HttpInputRequestDefinition": { + "nodes.info.NodeInfoXpackSecurityAuthcRealms": { "type": "object", "properties": { - "auth": { - "$ref": "#/components/schemas/watcher._types.HttpInputAuthentication" - }, - "body": { - "type": "string" - }, - "connection_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "headers": { + "file": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcRealmsStatus" } }, - "host": { - "$ref": "#/components/schemas/_types.Host" - }, - "method": { - "$ref": "#/components/schemas/watcher._types.HttpInputMethod" + "native": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcRealmsStatus" + } }, - "params": { + "pki": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/nodes.info.NodeInfoXpackSecurityAuthcRealmsStatus" } - }, - "path": { - "type": "string" - }, - "port": { - "$ref": "#/components/schemas/_types.uint" - }, - "proxy": { - "$ref": "#/components/schemas/watcher._types.HttpInputProxy" - }, - "read_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "scheme": { - "$ref": "#/components/schemas/watcher._types.ConnectionScheme" - }, - "url": { - "type": "string" } } }, - "watcher._types.HttpInputAuthentication": { + "nodes.info.NodeInfoXpackSecurityAuthcRealmsStatus": { "type": "object", "properties": { - "basic": { - "$ref": "#/components/schemas/watcher._types.HttpInputBasicAuthentication" + "enabled": { + "type": "string" + }, + "order": { + "type": "string" } }, "required": [ - "basic" + "order" ] }, - "watcher._types.HttpInputBasicAuthentication": { + "nodes.info.NodeInfoXpackSecurityAuthcToken": { "type": "object", "properties": { - "password": { - "$ref": "#/components/schemas/_types.Password" - }, - "username": { - "$ref": "#/components/schemas/_types.Username" + "enabled": { + "type": "string" } }, "required": [ - "password", - "username" - ] - }, - "watcher._types.HttpInputMethod": { - "type": "string", - "enum": [ - "head", - "get", - "post", - "put", - "delete" + "enabled" ] }, - "watcher._types.HttpInputProxy": { + "nodes.info.NodeInfoXpackMl": { "type": "object", "properties": { - "host": { - "$ref": "#/components/schemas/_types.Host" - }, - "port": { - "$ref": "#/components/schemas/_types.uint" + "use_auto_machine_memory_percent": { + "type": "boolean" } - }, - "required": [ - "host", - "port" - ] - }, - "watcher._types.ConnectionScheme": { - "type": "string", - "enum": [ - "http", - "https" - ] + } }, - "watcher._types.ReportingEmailAttachment": { + "nodes.info.NodeInfoScript": { "type": "object", "properties": { - "url": { + "allowed_types": { "type": "string" }, - "inline": { - "type": "boolean" - }, - "retries": { - "type": "number" - }, - "interval": { - "$ref": "#/components/schemas/_types.Duration" - }, - "request": { - "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + "disable_max_compilations_rate": { + "type": "string" } }, "required": [ - "url" + "allowed_types" ] }, - "watcher._types.DataEmailAttachment": { + "nodes.info.NodeInfoSearch": { "type": "object", "properties": { - "format": { - "$ref": "#/components/schemas/watcher._types.DataAttachmentFormat" + "remote": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoSearchRemote" + } + ] } - } - }, - "watcher._types.DataAttachmentFormat": { - "type": "string", - "enum": [ - "json", - "yaml" + }, + "required": [ + "remote" ] }, - "watcher._types.PagerDutyAction": { - "allOf": [ - { - "$ref": "#/components/schemas/watcher._types.PagerDutyEvent" - }, - { - "type": "object" + "nodes.info.NodeInfoSearchRemote": { + "type": "object", + "properties": { + "connect": { + "type": "string" } + }, + "required": [ + "connect" ] }, - "watcher._types.PagerDutyEvent": { + "nodes.info.NodeInfoSettingsIngest": { "type": "object", "properties": { - "account": { - "type": "string" + "attachment": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] }, - "attach_payload": { - "type": "boolean" + "append": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] }, - "client": { - "type": "string" + "csv": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] }, - "client_url": { - "type": "string" + "convert": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] }, - "contexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher._types.PagerDutyContext" - } + "date": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] }, - "description": { - "type": "string" + "date_index_name": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] }, - "event_type": { - "$ref": "#/components/schemas/watcher._types.PagerDutyEventType" + "dot_expander": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] }, - "incident_key": { - "type": "string" + "enrich": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] }, - "proxy": { - "$ref": "#/components/schemas/watcher._types.PagerDutyEventProxy" + "fail": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "foreach": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "json": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "user_agent": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "kv": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "geoip": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "grok": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "gsub": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "join": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "lowercase": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "remove": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "rename": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "set": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "sort": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "split": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "trim": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "uppercase": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "urldecode": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "dissect": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "set_security_user": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "drop": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "circle": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + }, + "inference": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestInfo" + } + ] + } + } + }, + "nodes.info.NodeInfoIngestInfo": { + "type": "object", + "properties": { + "downloader": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestDownloader" + } + ] } }, "required": [ - "attach_payload", - "description", - "incident_key" + "downloader" ] }, - "watcher._types.PagerDutyContext": { + "nodes.info.NodeInfoIngestDownloader": { "type": "object", "properties": { - "href": { - "type": "string" - }, - "src": { + "enabled": { "type": "string" - }, - "type": { - "$ref": "#/components/schemas/watcher._types.PagerDutyContextType" } }, "required": [ - "type" - ] - }, - "watcher._types.PagerDutyContextType": { - "type": "string", - "enum": [ - "link", - "image" - ] - }, - "watcher._types.PagerDutyEventType": { - "type": "string", - "enum": [ - "trigger", - "resolve", - "acknowledge" + "enabled" ] }, - "watcher._types.PagerDutyEventProxy": { + "nodes.info.NodeThreadPoolInfo": { "type": "object", "properties": { - "host": { - "$ref": "#/components/schemas/_types.Host" + "core": { + "type": "number" }, - "port": { + "keep_alive": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max": { "type": "number" - } - } - }, - "watcher._types.SlackAction": { - "type": "object", - "properties": { - "account": { - "type": "string" }, - "message": { - "$ref": "#/components/schemas/watcher._types.SlackMessage" + "queue_size": { + "type": "number" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string" } }, "required": [ - "message" + "queue_size", + "type" ] }, - "watcher._types.SlackMessage": { + "nodes.info.NodeInfoTransport": { "type": "object", "properties": { - "attachments": { + "bound_address": { "type": "array", "items": { - "$ref": "#/components/schemas/watcher._types.SlackAttachment" + "type": "string" } }, - "dynamic_attachments": { - "$ref": "#/components/schemas/watcher._types.SlackDynamicAttachment" - }, - "from": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "text": { + "publish_address": { "type": "string" }, - "to": { - "type": "array", - "items": { + "profiles": { + "type": "object", + "additionalProperties": { "type": "string" } } }, "required": [ - "attachments", - "from", - "text", - "to" + "bound_address", + "publish_address", + "profiles" ] }, - "watcher._types.SlackAttachment": { + "nodes.info.NodeInfoIngest": { "type": "object", "properties": { - "author_icon": { - "type": "string" - }, - "author_link": { - "type": "string" - }, - "author_name": { - "type": "string" - }, - "color": { - "type": "string" - }, - "fallback": { - "type": "string" - }, - "fields": { + "processors": { "type": "array", "items": { - "$ref": "#/components/schemas/watcher._types.SlackAttachmentField" + "$ref": "#/components/schemas/nodes.info.NodeInfoIngestProcessor" } - }, - "footer": { - "type": "string" - }, - "footer_icon": { - "type": "string" - }, - "image_url": { - "type": "string" - }, - "pretext": { - "type": "string" - }, - "text": { - "type": "string" - }, - "thumb_url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "title_link": { - "type": "string" - }, - "ts": { - "$ref": "#/components/schemas/_types.EpochTimeUnitSeconds" } }, "required": [ - "author_name", - "title" + "processors" ] }, - "watcher._types.SlackAttachmentField": { + "nodes.info.NodeInfoIngestProcessor": { "type": "object", "properties": { - "short": { - "type": "boolean" - }, - "title": { - "type": "string" - }, - "value": { + "type": { "type": "string" } }, "required": [ - "short", - "title", - "value" + "type" + ] + }, + "nodes.info.NodeInfoAggregation": { + "type": "object", + "properties": { + "types": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "types" ] }, - "watcher._types.SlackDynamicAttachment": { + "nodes.info.RemoveClusterServer": { "type": "object", "properties": { - "attachment_template": { - "$ref": "#/components/schemas/watcher._types.SlackAttachment" + "bound_address": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.TransportAddress" + } }, - "list_path": { - "type": "string" + "publish_address": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] } }, "required": [ - "attachment_template", - "list_path" + "bound_address", + "publish_address" ] }, - "watcher._types.WebhookAction": { + "_types.Password": { + "type": "string" + }, + "nodes.reload_secure_settings.ResponseBase": { "allOf": [ { - "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + "$ref": "#/components/schemas/nodes._types.NodesResponseBase" }, { - "type": "object" + "type": "object", + "properties": { + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.NodeReloadResult" + } + } + }, + "required": [ + "cluster_name", + "nodes" + ] } ] }, - "watcher._types.InputContainer": { + "nodes._types.NodeReloadResult": { "type": "object", "properties": { - "chain": { - "$ref": "#/components/schemas/watcher._types.ChainInput" - }, - "http": { - "$ref": "#/components/schemas/watcher._types.HttpInput" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "search": { - "$ref": "#/components/schemas/watcher._types.SearchInput" + "reload_exception": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] }, - "simple": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "watcher._types.ChainInput": { - "type": "object", - "properties": { - "inputs": { + "secure_setting_names": { + "description": "The names of the secure settings that were reloaded.", "type": "array", "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/watcher._types.InputContainer" - }, - "minProperties": 1, - "maxProperties": 1 + "type": "string" } + }, + "keystore_path": { + "description": "The path to the keystore file.", + "type": "string" + }, + "keystore_digest": { + "description": "A SHA-256 hash of the keystore file contents.", + "type": "string" + }, + "keystore_last_modified_time": { + "description": "The last modification time of the keystore file.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] } }, "required": [ - "inputs" + "name" ] }, - "watcher._types.HttpInput": { - "type": "object", - "properties": { - "extract": { + "nodes.stats.NodeStatsMetrics": { + "oneOf": [ + { + "$ref": "#/components/schemas/nodes.stats.NodeStatsMetric" + }, + { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/nodes.stats.NodeStatsMetric" } - }, - "request": { - "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" - }, - "response_content_type": { - "$ref": "#/components/schemas/watcher._types.ResponseContentType" } - } + ] }, - "watcher._types.ResponseContentType": { + "nodes.stats.NodeStatsMetric": { "type": "string", "enum": [ - "json", - "yaml", - "text" + "_all", + "_none", + "indices", + "os", + "process", + "jvm", + "thread_pool", + "fs", + "transport", + "http", + "breaker", + "script", + "discovery", + "ingest", + "adaptive_selection", + "script_cache", + "indexing_pressure", + "repositories", + "allocations" ] }, - "watcher._types.SearchInput": { - "type": "object", - "properties": { - "extract": { - "type": "array", - "items": { - "type": "string" - } - }, - "request": { - "$ref": "#/components/schemas/watcher._types.SearchInputRequestDefinition" - }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" - } - }, - "required": [ - "request" + "_types.NodeStatsLevel": { + "type": "string", + "enum": [ + "node", + "indices", + "shards" ] }, - "watcher._types.TriggerContainer": { - "type": "object", - "properties": { - "schedule": { - "$ref": "#/components/schemas/watcher._types.ScheduleContainer" + "nodes.stats.ResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.NodesResponseBase" + }, + { + "type": "object", + "properties": { + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.Stats" + } + } + }, + "required": [ + "nodes" + ] } - }, - "minProperties": 1, - "maxProperties": 1 + ] }, - "watcher._types.ScheduleContainer": { + "nodes._types.Stats": { "type": "object", "properties": { - "timezone": { - "type": "string" + "adaptive_selection": { + "description": "Statistics about adaptive replica selection.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.AdaptiveSelection" + } }, - "cron": { - "$ref": "#/components/schemas/watcher._types.CronExpression" + "breakers": { + "description": "Statistics about the field data circuit breaker.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.Breaker" + } }, - "daily": { - "$ref": "#/components/schemas/watcher._types.DailySchedule" + "fs": { + "description": "File system information, data path, free disk space, read/write stats.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.FileSystem" + } + ] }, - "hourly": { - "$ref": "#/components/schemas/watcher._types.HourlySchedule" + "host": { + "description": "Network host for the node, based on the network host setting.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" + } + ] }, - "interval": { - "$ref": "#/components/schemas/_types.Duration" + "http": { + "description": "HTTP connection information.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Http" + } + ] }, - "monthly": { + "ingest": { + "description": "Statistics about ingest preprocessing.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Ingest" + } + ] + }, + "ip": { + "description": "IP address and port for the node.", "oneOf": [ { - "$ref": "#/components/schemas/watcher._types.TimeOfMonth" + "$ref": "#/components/schemas/_types.Ip" }, { "type": "array", "items": { - "$ref": "#/components/schemas/watcher._types.TimeOfMonth" + "$ref": "#/components/schemas/_types.Ip" } } ] }, - "weekly": { - "oneOf": [ + "jvm": { + "description": "JVM stats, memory pool information, garbage collection, buffer pools, number of loaded/unloaded classes.", + "allOf": [ { - "$ref": "#/components/schemas/watcher._types.TimeOfWeek" - }, + "$ref": "#/components/schemas/nodes._types.Jvm" + } + ] + }, + "name": { + "description": "Human-readable identifier for the node.\nBased on the node name setting.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher._types.TimeOfWeek" - } + "$ref": "#/components/schemas/_types.Name" } ] }, - "yearly": { - "oneOf": [ + "os": { + "description": "Operating system stats, load average, mem, swap.", + "allOf": [ { - "$ref": "#/components/schemas/watcher._types.TimeOfYear" - }, + "$ref": "#/components/schemas/nodes._types.OperatingSystem" + } + ] + }, + "process": { + "description": "Process statistics, memory consumption, cpu usage, open file descriptors.", + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher._types.TimeOfYear" + "$ref": "#/components/schemas/nodes._types.Process" + } + ] + }, + "roles": { + "description": "Roles assigned to the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeRoles" + } + ] + }, + "script": { + "description": "Contains script statistics for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Scripting" + } + ] + }, + "script_cache": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/nodes._types.ScriptCache" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/nodes._types.ScriptCache" + } } + ] + } + }, + "thread_pool": { + "description": "Statistics about each thread pool, including current size, queue and rejected tasks.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.ThreadCount" + } + }, + "timestamp": { + "type": "number" + }, + "transport": { + "description": "Transport statistics about sent and received bytes in cluster communication.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Transport" + } + ] + }, + "transport_address": { + "description": "Host and port for the transport layer, used for internal communication between nodes in a cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] + }, + "attributes": { + "description": "Contains a list of attributes for the node.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "discovery": { + "description": "Contains node discovery statistics for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Discovery" + } + ] + }, + "indexing_pressure": { + "description": "Contains indexing pressure statistics for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.IndexingPressure" + } + ] + }, + "indices": { + "description": "Indices stats about size, document count, indexing and deletion times, search times, field cache size, merges and flushes.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardStats" } ] } - }, - "minProperties": 1, - "maxProperties": 1 + } }, - "watcher._types.DailySchedule": { + "nodes._types.AdaptiveSelection": { "type": "object", "properties": { - "at": { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher._types.ScheduleTimeOfDay" - } + "avg_queue_size": { + "description": "The exponentially weighted moving average queue size of search requests on the keyed node.", + "type": "number" + }, + "avg_response_time": { + "description": "The exponentially weighted moving average response time of search requests on the keyed node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "avg_response_time_ns": { + "description": "The exponentially weighted moving average response time, in nanoseconds, of search requests on the keyed node.", + "type": "number" + }, + "avg_service_time": { + "description": "The exponentially weighted moving average service time of search requests on the keyed node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "avg_service_time_ns": { + "description": "The exponentially weighted moving average service time, in nanoseconds, of search requests on the keyed node.", + "type": "number" + }, + "outgoing_searches": { + "description": "The number of outstanding search requests to the keyed node from the node these stats are for.", + "type": "number" + }, + "rank": { + "description": "The rank of this node; used for shard selection when routing search requests.", + "type": "string" } - }, - "required": [ - "at" - ] + } }, - "watcher._types.HourlySchedule": { + "nodes._types.Breaker": { "type": "object", "properties": { - "minute": { - "type": "array", - "items": { - "type": "number" - } + "estimated_size": { + "description": "Estimated memory used for the operation.", + "type": "string" + }, + "estimated_size_in_bytes": { + "description": "Estimated memory used, in bytes, for the operation.", + "type": "number" + }, + "limit_size": { + "description": "Memory limit for the circuit breaker.", + "type": "string" + }, + "limit_size_in_bytes": { + "description": "Memory limit, in bytes, for the circuit breaker.", + "type": "number" + }, + "overhead": { + "description": "A constant that all estimates for the circuit breaker are multiplied with to calculate a final estimate.", + "type": "number" + }, + "tripped": { + "description": "Total number of times the circuit breaker has been triggered and prevented an out of memory error.", + "type": "number" } - }, - "required": [ - "minute" - ] + } }, - "watcher._types.TimeOfMonth": { + "nodes._types.FileSystem": { "type": "object", "properties": { - "at": { + "data": { + "description": "List of all file stores.", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/nodes._types.DataPathStats" } }, - "on": { - "type": "array", - "items": { - "type": "number" - } + "timestamp": { + "description": "Last time the file stores statistics were refreshed.\nRecorded in milliseconds since the Unix Epoch.", + "type": "number" + }, + "total": { + "description": "Contains statistics for all file stores of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.FileSystemTotal" + } + ] + }, + "io_stats": { + "description": "Contains I/O statistics for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.IoStats" + } + ] + } + } + }, + "nodes._types.DataPathStats": { + "type": "object", + "properties": { + "available": { + "description": "Total amount of disk space available to this Java virtual machine on this file store.", + "type": "string" + }, + "available_in_bytes": { + "description": "Total number of bytes available to this Java virtual machine on this file store.", + "type": "number" + }, + "disk_queue": { + "type": "string" + }, + "disk_reads": { + "type": "number" + }, + "disk_read_size": { + "type": "string" + }, + "disk_read_size_in_bytes": { + "type": "number" + }, + "disk_writes": { + "type": "number" + }, + "disk_write_size": { + "type": "string" + }, + "disk_write_size_in_bytes": { + "type": "number" + }, + "free": { + "description": "Total amount of unallocated disk space in the file store.", + "type": "string" + }, + "free_in_bytes": { + "description": "Total number of unallocated bytes in the file store.", + "type": "number" + }, + "mount": { + "description": "Mount point of the file store (for example: `/dev/sda2`).", + "type": "string" + }, + "path": { + "description": "Path to the file store.", + "type": "string" + }, + "total": { + "description": "Total size of the file store.", + "type": "string" + }, + "total_in_bytes": { + "description": "Total size of the file store in bytes.", + "type": "number" + }, + "type": { + "description": "Type of the file store (ex: ext4).", + "type": "string" } - }, - "required": [ - "at", - "on" - ] + } }, - "watcher._types.TimeOfWeek": { + "nodes._types.FileSystemTotal": { "type": "object", "properties": { - "at": { - "type": "array", - "items": { - "type": "string" - } + "available": { + "description": "Total disk space available to this Java virtual machine on all file stores.\nDepending on OS or process level restrictions, this might appear less than `free`.\nThis is the actual amount of free disk space the Elasticsearch node can utilise.", + "type": "string" }, - "on": { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher._types.Day" - } + "available_in_bytes": { + "description": "Total number of bytes available to this Java virtual machine on all file stores.\nDepending on OS or process level restrictions, this might appear less than `free_in_bytes`.\nThis is the actual amount of free disk space the Elasticsearch node can utilise.", + "type": "number" + }, + "free": { + "description": "Total unallocated disk space in all file stores.", + "type": "string" + }, + "free_in_bytes": { + "description": "Total number of unallocated bytes in all file stores.", + "type": "number" + }, + "total": { + "description": "Total size of all file stores.", + "type": "string" + }, + "total_in_bytes": { + "description": "Total size of all file stores in bytes.", + "type": "number" } - }, - "required": [ - "at", - "on" - ] - }, - "watcher._types.Day": { - "type": "string", - "enum": [ - "sunday", - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday" - ] + } }, - "watcher._types.TimeOfYear": { + "nodes._types.IoStats": { "type": "object", "properties": { - "at": { - "type": "array", - "items": { - "type": "string" - } - }, - "int": { + "devices": { + "description": "Array of disk metrics for each device that is backing an Elasticsearch data path.\nThese disk metrics are probed periodically and averages between the last probe and the current probe are computed.", "type": "array", "items": { - "$ref": "#/components/schemas/watcher._types.Month" + "$ref": "#/components/schemas/nodes._types.IoStatDevice" } }, - "on": { - "type": "array", - "items": { - "type": "number" - } + "total": { + "description": "The sum of the disk metrics for all devices that back an Elasticsearch data path.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.IoStatDevice" + } + ] } - }, - "required": [ - "at", - "int", - "on" - ] - }, - "watcher._types.Month": { - "type": "string", - "enum": [ - "january", - "february", - "march", - "april", - "may", - "june", - "july", - "august", - "september", - "october", - "november", - "december" - ] + } }, - "watcher.execute_watch.WatchRecord": { + "nodes._types.IoStatDevice": { "type": "object", "properties": { - "condition": { - "$ref": "#/components/schemas/watcher._types.ConditionContainer" + "device_name": { + "description": "The Linux device name.", + "type": "string" }, - "input": { - "$ref": "#/components/schemas/watcher._types.InputContainer" + "operations": { + "description": "The total number of read and write operations for the device completed since starting Elasticsearch.", + "type": "number" }, - "messages": { - "type": "array", - "items": { - "type": "string" - } + "read_kilobytes": { + "description": "The total number of kilobytes read for the device since starting Elasticsearch.", + "type": "number" }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" + "read_operations": { + "description": "The total number of read operations for the device completed since starting Elasticsearch.", + "type": "number" }, - "node": { - "type": "string" + "write_kilobytes": { + "description": "The total number of kilobytes written for the device since starting Elasticsearch.", + "type": "number" }, - "result": { - "$ref": "#/components/schemas/watcher._types.ExecutionResult" + "write_operations": { + "description": "The total number of write operations for the device completed since starting Elasticsearch.", + "type": "number" + } + } + }, + "nodes._types.Jvm": { + "type": "object", + "properties": { + "buffer_pools": { + "description": "Contains statistics about JVM buffer pools for the node.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.NodeBufferPool" + } }, - "state": { - "$ref": "#/components/schemas/watcher._types.ExecutionStatus" + "classes": { + "description": "Contains statistics about classes loaded by JVM for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.JvmClasses" + } + ] }, - "trigger_event": { - "$ref": "#/components/schemas/watcher._types.TriggerEventResult" + "gc": { + "description": "Contains statistics about JVM garbage collectors for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.GarbageCollector" + } + ] }, - "user": { - "$ref": "#/components/schemas/_types.Username" + "mem": { + "description": "Contains JVM memory usage statistics for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.JvmMemoryStats" + } + ] }, - "watch_id": { - "$ref": "#/components/schemas/_types.Id" + "threads": { + "description": "Contains statistics about JVM thread usage for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.JvmThreads" + } + ] }, - "status": { - "$ref": "#/components/schemas/watcher._types.WatchStatus" + "timestamp": { + "description": "Last time JVM statistics were refreshed.", + "type": "number" + }, + "uptime": { + "description": "Human-readable JVM uptime.\nOnly returned if the `human` query parameter is `true`.", + "type": "string" + }, + "uptime_in_millis": { + "description": "JVM uptime in milliseconds.", + "type": "number" } - }, - "required": [ - "condition", - "input", - "messages", - "node", - "result", - "state", - "trigger_event", - "user", - "watch_id" - ] + } }, - "watcher._types.ExecutionResult": { + "nodes._types.NodeBufferPool": { "type": "object", "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher._types.ExecutionResultAction" - } + "count": { + "description": "Number of buffer pools.", + "type": "number" }, - "condition": { - "$ref": "#/components/schemas/watcher._types.ExecutionResultCondition" + "total_capacity": { + "description": "Total capacity of buffer pools.", + "type": "string" }, - "execution_duration": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "total_capacity_in_bytes": { + "description": "Total capacity of buffer pools in bytes.", + "type": "number" }, - "execution_time": { - "$ref": "#/components/schemas/_types.DateTime" + "used": { + "description": "Size of buffer pools.", + "type": "string" }, - "input": { - "$ref": "#/components/schemas/watcher._types.ExecutionResultInput" + "used_in_bytes": { + "description": "Size of buffer pools in bytes.", + "type": "number" } - }, - "required": [ - "actions", - "condition", - "execution_duration", - "execution_time", - "input" - ] + } }, - "watcher._types.ExecutionResultAction": { + "nodes._types.JvmClasses": { "type": "object", "properties": { - "email": { - "$ref": "#/components/schemas/watcher._types.EmailResult" + "current_loaded_count": { + "description": "Number of classes currently loaded by JVM.", + "type": "number" }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "total_loaded_count": { + "description": "Total number of classes loaded since the JVM started.", + "type": "number" }, - "index": { - "$ref": "#/components/schemas/watcher._types.IndexResult" + "total_unloaded_count": { + "description": "Total number of classes unloaded since the JVM started.", + "type": "number" + } + } + }, + "nodes._types.GarbageCollector": { + "type": "object", + "properties": { + "collectors": { + "description": "Contains statistics about JVM garbage collectors for the node.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.GarbageCollectorTotal" + } + } + } + }, + "nodes._types.GarbageCollectorTotal": { + "type": "object", + "properties": { + "collection_count": { + "description": "Total number of JVM garbage collectors that collect objects.", + "type": "number" }, - "logging": { - "$ref": "#/components/schemas/watcher._types.LoggingResult" + "collection_time": { + "description": "Total time spent by JVM collecting objects.", + "type": "string" }, - "pagerduty": { - "$ref": "#/components/schemas/watcher._types.PagerDutyResult" + "collection_time_in_millis": { + "description": "Total time, in milliseconds, spent by JVM collecting objects.", + "type": "number" + } + } + }, + "nodes._types.JvmMemoryStats": { + "type": "object", + "properties": { + "heap_used_in_bytes": { + "description": "Memory, in bytes, currently in use by the heap.", + "type": "number" }, - "reason": { - "type": "string" + "heap_used_percent": { + "description": "Percentage of memory currently in use by the heap.", + "type": "number" }, - "slack": { - "$ref": "#/components/schemas/watcher._types.SlackResult" + "heap_committed_in_bytes": { + "description": "Amount of memory, in bytes, available for use by the heap.", + "type": "number" }, - "status": { - "$ref": "#/components/schemas/watcher._types.ActionStatusOptions" + "heap_max_in_bytes": { + "description": "Maximum amount of memory, in bytes, available for use by the heap.", + "type": "number" }, - "type": { - "$ref": "#/components/schemas/watcher._types.ActionType" + "heap_max": { + "description": "Maximum amount of memory, available for use by the heap.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] }, - "webhook": { - "$ref": "#/components/schemas/watcher._types.WebhookResult" + "non_heap_used_in_bytes": { + "description": "Non-heap memory used, in bytes.", + "type": "number" }, - "error": { - "$ref": "#/components/schemas/_types.ErrorCause" + "non_heap_committed_in_bytes": { + "description": "Amount of non-heap memory available, in bytes.", + "type": "number" + }, + "pools": { + "description": "Contains statistics about heap memory usage for the node.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.Pool" + } } - }, - "required": [ - "id", - "status", - "type" - ] + } }, - "watcher._types.EmailResult": { + "nodes._types.Pool": { "type": "object", "properties": { - "account": { - "type": "string" + "used_in_bytes": { + "description": "Memory, in bytes, used by the heap.", + "type": "number" }, - "message": { - "$ref": "#/components/schemas/watcher._types.Email" + "max_in_bytes": { + "description": "Maximum amount of memory, in bytes, available for use by the heap.", + "type": "number" }, - "reason": { - "type": "string" + "peak_used_in_bytes": { + "description": "Largest amount of memory, in bytes, historically used by the heap.", + "type": "number" + }, + "peak_max_in_bytes": { + "description": "Largest amount of memory, in bytes, historically used by the heap.", + "type": "number" } - }, - "required": [ - "message" - ] + } }, - "watcher._types.IndexResult": { + "nodes._types.JvmThreads": { "type": "object", "properties": { - "response": { - "$ref": "#/components/schemas/watcher._types.IndexResultSummary" + "count": { + "description": "Number of active threads in use by JVM.", + "type": "number" + }, + "peak_count": { + "description": "Highest number of threads used by JVM.", + "type": "number" } - }, - "required": [ - "response" - ] + } }, - "watcher._types.IndexResultSummary": { + "nodes._types.OperatingSystem": { "type": "object", "properties": { - "created": { - "type": "boolean" + "cpu": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Cpu" + } + ] }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "mem": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.ExtendedMemoryStats" + } + ] }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "swap": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.MemoryStats" + } + ] }, - "result": { - "$ref": "#/components/schemas/_types.Result" + "cgroup": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Cgroup" + } + ] }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - } - }, - "required": [ - "created", - "id", - "index", - "result", - "version" - ] - }, - "watcher._types.LoggingResult": { - "type": "object", - "properties": { - "logged_text": { - "type": "string" + "timestamp": { + "type": "number" } - }, - "required": [ - "logged_text" - ] + } }, - "watcher._types.PagerDutyResult": { + "nodes._types.Cpu": { "type": "object", "properties": { - "event": { - "$ref": "#/components/schemas/watcher._types.PagerDutyEvent" + "percent": { + "type": "number" }, - "reason": { - "type": "string" + "sys": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "request": { - "$ref": "#/components/schemas/watcher._types.HttpInputRequestResult" + "sys_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "response": { - "$ref": "#/components/schemas/watcher._types.HttpInputResponseResult" + "total": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "user_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "load_average": { + "type": "object", + "additionalProperties": { + "type": "number" + } } - }, - "required": [ - "event" - ] + } }, - "watcher._types.HttpInputRequestResult": { + "nodes._types.ExtendedMemoryStats": { "allOf": [ { - "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + "$ref": "#/components/schemas/nodes._types.MemoryStats" }, { - "type": "object" + "type": "object", + "properties": { + "free_percent": { + "description": "Percentage of free memory.", + "type": "number" + }, + "used_percent": { + "description": "Percentage of used memory.", + "type": "number" + } + } } ] }, - "watcher._types.HttpInputResponseResult": { + "nodes._types.MemoryStats": { "type": "object", "properties": { - "body": { + "adjusted_total_in_bytes": { + "description": "If the amount of physical memory has been overridden using the `es`.`total_memory_bytes` system property then this reports the overridden value in bytes.\nOtherwise it reports the same value as `total_in_bytes`.", + "type": "number" + }, + "resident": { + "type": "string" + }, + "resident_in_bytes": { + "type": "number" + }, + "share": { + "type": "string" + }, + "share_in_bytes": { + "type": "number" + }, + "total_virtual": { "type": "string" }, - "headers": { - "$ref": "#/components/schemas/_types.HttpHeaders" + "total_virtual_in_bytes": { + "type": "number" }, - "status": { + "total_in_bytes": { + "description": "Total amount of physical memory in bytes.", + "type": "number" + }, + "free_in_bytes": { + "description": "Amount of free physical memory in bytes.", + "type": "number" + }, + "used_in_bytes": { + "description": "Amount of used physical memory in bytes.", "type": "number" } - }, - "required": [ - "body", - "headers", - "status" - ] + } }, - "watcher._types.SlackResult": { + "nodes._types.Cgroup": { "type": "object", "properties": { - "account": { - "type": "string" + "cpuacct": { + "description": "Contains statistics about `cpuacct` control group for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.CpuAcct" + } + ] }, - "message": { - "$ref": "#/components/schemas/watcher._types.SlackMessage" + "cpu": { + "description": "Contains statistics about `cpu` control group for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.CgroupCpu" + } + ] + }, + "memory": { + "description": "Contains statistics about the memory control group for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.CgroupMemory" + } + ] } - }, - "required": [ - "message" - ] - }, - "watcher._types.ActionStatusOptions": { - "type": "string", - "enum": [ - "success", - "failure", - "simulated", - "throttled" - ] + } }, - "watcher._types.WebhookResult": { + "nodes._types.CpuAcct": { "type": "object", "properties": { - "request": { - "$ref": "#/components/schemas/watcher._types.HttpInputRequestResult" + "control_group": { + "description": "The `cpuacct` control group to which the Elasticsearch process belongs.", + "type": "string" }, - "response": { - "$ref": "#/components/schemas/watcher._types.HttpInputResponseResult" + "usage_nanos": { + "description": "The total CPU time, in nanoseconds, consumed by all tasks in the same cgroup as the Elasticsearch process.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] } - }, - "required": [ - "request" - ] + } }, - "watcher._types.ExecutionResultCondition": { + "nodes._types.CgroupCpu": { "type": "object", "properties": { - "met": { - "type": "boolean" + "control_group": { + "description": "The `cpu` control group to which the Elasticsearch process belongs.", + "type": "string" }, - "status": { - "$ref": "#/components/schemas/watcher._types.ActionStatusOptions" + "cfs_period_micros": { + "description": "The period of time, in microseconds, for how regularly all tasks in the same cgroup as the Elasticsearch process should have their access to CPU resources reallocated.", + "type": "number" }, - "type": { - "$ref": "#/components/schemas/watcher._types.ConditionType" + "cfs_quota_micros": { + "description": "The total amount of time, in microseconds, for which all tasks in the same cgroup as the Elasticsearch process can run during one period `cfs_period_micros`.", + "type": "number" + }, + "stat": { + "description": "Contains CPU statistics for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.CgroupCpuStat" + } + ] } - }, - "required": [ - "met", - "status", - "type" - ] - }, - "watcher._types.ConditionType": { - "type": "string", - "enum": [ - "always", - "never", - "script", - "compare", - "array_compare" - ] + } }, - "watcher._types.ExecutionResultInput": { + "nodes._types.CgroupCpuStat": { "type": "object", "properties": { - "payload": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "number_of_elapsed_periods": { + "description": "The number of reporting periods (as specified by `cfs_period_micros`) that have elapsed.", + "type": "number" }, - "status": { - "$ref": "#/components/schemas/watcher._types.ActionStatusOptions" + "number_of_times_throttled": { + "description": "The number of times all tasks in the same cgroup as the Elasticsearch process have been throttled.", + "type": "number" }, - "type": { - "$ref": "#/components/schemas/watcher._types.InputType" + "time_throttled_nanos": { + "description": "The total amount of time, in nanoseconds, for which all tasks in the same cgroup as the Elasticsearch process have been throttled.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] } - }, - "required": [ - "payload", - "status", - "type" - ] - }, - "watcher._types.InputType": { - "type": "string", - "enum": [ - "http", - "search", - "simple" - ] - }, - "watcher._types.ExecutionStatus": { - "type": "string", - "enum": [ - "awaits_execution", - "checking", - "execution_not_needed", - "throttled", - "executed", - "failed", - "deleted_while_queued", - "not_executed_already_queued" - ] + } }, - "watcher._types.TriggerEventResult": { + "nodes._types.CgroupMemory": { "type": "object", "properties": { - "manual": { - "$ref": "#/components/schemas/watcher._types.TriggerEventContainer" + "control_group": { + "description": "The `memory` control group to which the Elasticsearch process belongs.", + "type": "string" }, - "triggered_time": { - "$ref": "#/components/schemas/_types.DateTime" + "limit_in_bytes": { + "description": "The maximum amount of user memory (including file cache) allowed for all tasks in the same cgroup as the Elasticsearch process.\nThis value can be too big to store in a `long`, so is returned as a string so that the value returned can exactly match what the underlying operating system interface returns.\nAny value that is too large to parse into a `long` almost certainly means no limit has been set for the cgroup.", + "type": "string" }, - "type": { + "usage_in_bytes": { + "description": "The total current memory usage by processes in the cgroup, in bytes, by all tasks in the same cgroup as the Elasticsearch process.\nThis value is stored as a string for consistency with `limit_in_bytes`.", "type": "string" } - }, - "required": [ - "manual", - "triggered_time", - "type" - ] + } }, - "watcher._types.TriggerEventContainer": { + "nodes._types.Process": { "type": "object", "properties": { - "schedule": { - "$ref": "#/components/schemas/watcher._types.ScheduleTriggerEvent" + "cpu": { + "description": "Contains CPU statistics for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.Cpu" + } + ] + }, + "mem": { + "description": "Contains virtual memory statistics for the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.MemoryStats" + } + ] + }, + "open_file_descriptors": { + "description": "Number of opened file descriptors associated with the current or `-1` if not supported.", + "type": "number" + }, + "max_file_descriptors": { + "description": "Maximum number of file descriptors allowed on the system, or `-1` if not supported.", + "type": "number" + }, + "timestamp": { + "description": "Last time the statistics were refreshed.\nRecorded in milliseconds since the Unix Epoch.", + "type": "number" } - }, - "minProperties": 1, - "maxProperties": 1 + } }, - "watcher._types.QueryWatch": { + "nodes._types.ScriptCache": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "status": { - "$ref": "#/components/schemas/watcher._types.WatchStatus" + "cache_evictions": { + "description": "Total number of times the script cache has evicted old data.", + "type": "number" }, - "watch": { - "$ref": "#/components/schemas/watcher._types.Watch" + "compilation_limit_triggered": { + "description": "Total number of times the script compilation circuit breaker has limited inline script compilations.", + "type": "number" }, - "_primary_term": { + "compilations": { + "description": "Total number of inline script compilations performed by the node.", "type": "number" }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "context": { + "type": "string" } - }, - "required": [ - "_id" - ] - }, - "watcher.stats.WatcherMetric": { - "type": "string", - "enum": [ - "_all", - "all", - "queued_watches", - "current_watches", - "pending_watches" - ] + } }, - "watcher.stats.WatcherNodeStats": { + "nodes._types.Transport": { "type": "object", "properties": { - "current_watches": { - "description": "The current executing watches metric gives insight into the watches that are currently being executed by Watcher.\nAdditional information is shared per watch that is currently executing.\nThis information includes the `watch_id`, the time its execution started and its current execution phase.\nTo include this metric, the `metric` option should be set to `current_watches` or `_all`.\nIn addition you can also specify the `emit_stacktraces=true` parameter, which adds stack traces for each watch that is being run.\nThese stack traces can give you more insight into an execution of a watch.", + "inbound_handling_time_histogram": { + "description": "The distribution of the time spent handling each inbound message on a transport thread, represented as a histogram.", "type": "array", "items": { - "$ref": "#/components/schemas/watcher.stats.WatchRecordStats" + "$ref": "#/components/schemas/nodes._types.TransportHistogram" } }, - "execution_thread_pool": { - "$ref": "#/components/schemas/watcher._types.ExecutionThreadPool" - }, - "queued_watches": { - "description": "Watcher moderates the execution of watches such that their execution won't put too much pressure on the node and its resources.\nIf too many watches trigger concurrently and there isn't enough capacity to run them all, some of the watches are queued, waiting for the current running watches to finish.s\nThe queued watches metric gives insight on these queued watches.\n\nTo include this metric, the `metric` option should include `queued_watches` or `_all`.", + "outbound_handling_time_histogram": { + "description": "The distribution of the time spent sending each outbound transport message on a transport thread, represented as a histogram.", "type": "array", "items": { - "$ref": "#/components/schemas/watcher.stats.WatchRecordQueuedStats" + "$ref": "#/components/schemas/nodes._types.TransportHistogram" } }, - "watch_count": { - "description": "The number of watches currently registered.", + "rx_count": { + "description": "Total number of RX (receive) packets received by the node during internal cluster communication.", "type": "number" }, - "watcher_state": { - "$ref": "#/components/schemas/watcher.stats.WatcherState" + "rx_size": { + "description": "Size of RX packets received by the node during internal cluster communication.", + "type": "string" }, - "node_id": { - "$ref": "#/components/schemas/_types.Id" + "rx_size_in_bytes": { + "description": "Size, in bytes, of RX packets received by the node during internal cluster communication.", + "type": "number" + }, + "server_open": { + "description": "Current number of inbound TCP connections used for internal communication between nodes.", + "type": "number" + }, + "tx_count": { + "description": "Total number of TX (transmit) packets sent by the node during internal cluster communication.", + "type": "number" + }, + "tx_size": { + "description": "Size of TX packets sent by the node during internal cluster communication.", + "type": "string" + }, + "tx_size_in_bytes": { + "description": "Size, in bytes, of TX packets sent by the node during internal cluster communication.", + "type": "number" + }, + "total_outbound_connections": { + "description": "The cumulative number of outbound transport connections that this node has opened since it started.\nEach transport connection may comprise multiple TCP connections but is only counted once in this statistic.\nTransport connections are typically long-lived so this statistic should remain constant in a stable cluster.", + "type": "number" } - }, - "required": [ - "execution_thread_pool", - "watch_count", - "watcher_state", - "node_id" - ] + } }, - "watcher.stats.WatchRecordStats": { - "allOf": [ - { - "$ref": "#/components/schemas/watcher.stats.WatchRecordQueuedStats" + "nodes._types.TransportHistogram": { + "type": "object", + "properties": { + "count": { + "description": "The number of times a transport thread took a period of time within the bounds of this bucket to handle an inbound message.", + "type": "number" }, - { - "type": "object", - "properties": { - "execution_phase": { - "$ref": "#/components/schemas/watcher._types.ExecutionPhase" - }, - "triggered_time": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "executed_actions": { - "type": "array", - "items": { - "type": "string" - } - }, - "watch_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "watch_record_id": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "required": [ - "execution_phase", - "triggered_time", - "watch_id", - "watch_record_id" - ] + "lt_millis": { + "description": "The exclusive upper bound of the bucket in milliseconds.\nMay be omitted on the last bucket if this bucket has no upper bound.", + "type": "number" + }, + "ge_millis": { + "description": "The inclusive lower bound of the bucket in milliseconds. May be omitted on the first bucket if this bucket has no lower bound.", + "type": "number" } - ] - }, - "watcher._types.ExecutionPhase": { - "type": "string", - "enum": [ - "awaits_execution", - "started", - "input", - "condition", - "actions", - "watch_transform", - "aborted", - "finished" - ] + } }, - "watcher.stats.WatchRecordQueuedStats": { + "nodes._types.Discovery": { "type": "object", "properties": { - "execution_time": { - "$ref": "#/components/schemas/_types.DateTime" + "cluster_state_queue": { + "description": "Contains statistics for the cluster state queue of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.ClusterStateQueue" + } + ] + }, + "published_cluster_states": { + "description": "Contains statistics for the published cluster states of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.PublishedClusterStates" + } + ] + }, + "cluster_state_update": { + "description": "Contains low-level statistics about how long various activities took during cluster state updates while the node was the elected master.\nOmitted if the node is not master-eligible.\nEvery field whose name ends in `_time` within this object is also represented as a raw number of milliseconds in a field whose name ends in `_time_millis`.\nThe human-readable fields with a `_time` suffix are only returned if requested with the `?human=true` query parameter.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types.ClusterStateUpdate" + } + }, + "serialized_cluster_states": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.SerializedClusterState" + } + ] + }, + "cluster_applier_stats": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.ClusterAppliedStats" + } + ] } - }, - "required": [ - "execution_time" - ] + } }, - "watcher._types.ExecutionThreadPool": { + "nodes._types.ClusterStateQueue": { "type": "object", "properties": { - "max_size": { - "description": "The largest size of the execution thread pool, which indicates the largest number of concurrent running watches.", + "total": { + "description": "Total number of cluster states in queue.", "type": "number" }, - "queue_size": { - "description": "The number of watches that were triggered and are currently queued.", + "pending": { + "description": "Number of pending cluster states in queue.", + "type": "number" + }, + "committed": { + "description": "Number of committed cluster states in queue.", "type": "number" } - }, - "required": [ - "max_size", - "queue_size" - ] - }, - "watcher.stats.WatcherState": { - "type": "string", - "enum": [ - "stopped", - "starting", - "started", - "stopping" - ] - }, - "xpack.info.XPackCategory": { - "type": "string", - "enum": [ - "build", - "features", - "license" - ] + } }, - "xpack.info.BuildInformation": { + "nodes._types.PublishedClusterStates": { "type": "object", "properties": { - "date": { - "$ref": "#/components/schemas/_types.DateTime" + "full_states": { + "description": "Number of published cluster states.", + "type": "number" }, - "hash": { - "type": "string" + "incompatible_diffs": { + "description": "Number of incompatible differences between published cluster states.", + "type": "number" + }, + "compatible_diffs": { + "description": "Number of compatible differences between published cluster states.", + "type": "number" } - }, - "required": [ - "date", - "hash" - ] + } }, - "xpack.info.Features": { + "nodes._types.ClusterStateUpdate": { "type": "object", "properties": { - "aggregate_metric": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "analytics": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "ccr": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "data_streams": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "data_tiers": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "enrich": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "enterprise_search": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "eql": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "esql": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "graph": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "ilm": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "logstash": { - "$ref": "#/components/schemas/xpack.info.Feature" - }, - "logsdb": { - "$ref": "#/components/schemas/xpack.info.Feature" + "count": { + "description": "The number of cluster state update attempts that did not change the cluster state since the node started.", + "type": "number" }, - "ml": { - "$ref": "#/components/schemas/xpack.info.Feature" + "computation_time": { + "description": "The cumulative amount of time spent computing no-op cluster state updates since the node started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "monitoring": { - "$ref": "#/components/schemas/xpack.info.Feature" + "computation_time_millis": { + "description": "The cumulative amount of time, in milliseconds, spent computing no-op cluster state updates since the node started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "rollup": { - "$ref": "#/components/schemas/xpack.info.Feature" + "publication_time": { + "description": "The cumulative amount of time spent publishing cluster state updates which ultimately succeeded, which includes everything from the start of the publication (just after the computation of the new cluster state) until the publication has finished and the master node is ready to start processing the next state update.\nThis includes the time measured by `context_construction_time`, `commit_time`, `completion_time` and `master_apply_time`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "runtime_fields": { - "$ref": "#/components/schemas/xpack.info.Feature" + "publication_time_millis": { + "description": "The cumulative amount of time, in milliseconds, spent publishing cluster state updates which ultimately succeeded, which includes everything from the start of the publication (just after the computation of the new cluster state) until the publication has finished and the master node is ready to start processing the next state update.\nThis includes the time measured by `context_construction_time`, `commit_time`, `completion_time` and `master_apply_time`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "searchable_snapshots": { - "$ref": "#/components/schemas/xpack.info.Feature" + "context_construction_time": { + "description": "The cumulative amount of time spent constructing a publication context since the node started for publications that ultimately succeeded.\nThis statistic includes the time spent computing the difference between the current and new cluster state preparing a serialized representation of this difference.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "security": { - "$ref": "#/components/schemas/xpack.info.Feature" + "context_construction_time_millis": { + "description": "The cumulative amount of time, in milliseconds, spent constructing a publication context since the node started for publications that ultimately succeeded.\nThis statistic includes the time spent computing the difference between the current and new cluster state preparing a serialized representation of this difference.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "slm": { - "$ref": "#/components/schemas/xpack.info.Feature" + "commit_time": { + "description": "The cumulative amount of time spent waiting for a successful cluster state update to commit, which measures the time from the start of each publication until a majority of the master-eligible nodes have written the state to disk and confirmed the write to the elected master.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "spatial": { - "$ref": "#/components/schemas/xpack.info.Feature" + "commit_time_millis": { + "description": "The cumulative amount of time, in milliseconds, spent waiting for a successful cluster state update to commit, which measures the time from the start of each publication until a majority of the master-eligible nodes have written the state to disk and confirmed the write to the elected master.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "sql": { - "$ref": "#/components/schemas/xpack.info.Feature" + "completion_time": { + "description": "The cumulative amount of time spent waiting for a successful cluster state update to complete, which measures the time from the start of each publication until all the other nodes have notified the elected master that they have applied the cluster state.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "transform": { - "$ref": "#/components/schemas/xpack.info.Feature" + "completion_time_millis": { + "description": "The cumulative amount of time, in milliseconds, spent waiting for a successful cluster state update to complete, which measures the time from the start of each publication until all the other nodes have notified the elected master that they have applied the cluster state.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "universal_profiling": { - "$ref": "#/components/schemas/xpack.info.Feature" + "master_apply_time": { + "description": "The cumulative amount of time spent successfully applying cluster state updates on the elected master since the node started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "voting_only": { - "$ref": "#/components/schemas/xpack.info.Feature" + "master_apply_time_millis": { + "description": "The cumulative amount of time, in milliseconds, spent successfully applying cluster state updates on the elected master since the node started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] }, - "watcher": { - "$ref": "#/components/schemas/xpack.info.Feature" + "notification_time": { + "description": "The cumulative amount of time spent notifying listeners of a no-op cluster state update since the node started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "archive": { - "$ref": "#/components/schemas/xpack.info.Feature" + "notification_time_millis": { + "description": "The cumulative amount of time, in milliseconds, spent notifying listeners of a no-op cluster state update since the node started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, "required": [ - "aggregate_metric", - "analytics", - "ccr", - "data_streams", - "data_tiers", - "enrich", - "enterprise_search", - "eql", - "esql", - "graph", - "ilm", - "logstash", - "logsdb", - "ml", - "monitoring", - "rollup", - "searchable_snapshots", - "security", - "slm", - "spatial", - "sql", - "transform", - "universal_profiling", - "voting_only", - "watcher", - "archive" + "count" ] }, - "xpack.info.Feature": { + "nodes._types.SerializedClusterState": { "type": "object", "properties": { - "available": { - "type": "boolean" + "full_states": { + "description": "Number of published cluster states.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.SerializedClusterStateDetail" + } + ] }, - "description": { + "diffs": { + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.SerializedClusterStateDetail" + } + ] + } + } + }, + "nodes._types.SerializedClusterStateDetail": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "uncompressed_size": { "type": "string" }, - "enabled": { - "type": "boolean" + "uncompressed_size_in_bytes": { + "type": "number" }, - "native_code_info": { - "$ref": "#/components/schemas/xpack.info.NativeCodeInformation" + "compressed_size": { + "type": "string" + }, + "compressed_size_in_bytes": { + "type": "number" } - }, - "required": [ - "available", - "enabled" - ] + } }, - "xpack.info.NativeCodeInformation": { + "nodes._types.ClusterAppliedStats": { "type": "object", "properties": { - "build_hash": { - "type": "string" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionString" + "recordings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/nodes._types.Recording" + } } - }, - "required": [ - "build_hash", - "version" - ] + } }, - "xpack.info.MinimalLicenseInformation": { + "nodes._types.Recording": { "type": "object", "properties": { - "expiry_date_in_millis": { - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" - }, - "mode": { - "$ref": "#/components/schemas/license._types.LicenseType" + "name": { + "type": "string" }, - "status": { - "$ref": "#/components/schemas/license._types.LicenseStatus" + "cumulative_execution_count": { + "type": "number" }, - "type": { - "$ref": "#/components/schemas/license._types.LicenseType" + "cumulative_execution_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "uid": { - "type": "string" + "cumulative_execution_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } - }, - "required": [ - "expiry_date_in_millis", - "mode", - "status", - "type", - "uid" - ] + } }, - "xpack.usage.Base": { + "nodes._types.IndexingPressure": { "type": "object", "properties": { - "available": { - "type": "boolean" + "memory": { + "description": "Contains statistics for memory consumption from indexing load.", + "allOf": [ + { + "$ref": "#/components/schemas/nodes._types.IndexingPressureMemory" + } + ] + } + } + }, + "nodes.usage.NodesUsageMetrics": { + "oneOf": [ + { + "$ref": "#/components/schemas/nodes.usage.NodesUsageMetric" }, - "enabled": { - "type": "boolean" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/nodes.usage.NodesUsageMetric" + } } - }, - "required": [ - "available", - "enabled" ] }, - "xpack.usage.Analytics": { + "nodes.usage.NodesUsageMetric": { + "type": "string", + "enum": [ + "_all", + "rest_actions", + "aggregations" + ] + }, + "nodes.usage.ResponseBase": { "allOf": [ { - "$ref": "#/components/schemas/xpack.usage.Base" + "$ref": "#/components/schemas/nodes._types.NodesResponseBase" }, { "type": "object", "properties": { - "stats": { - "$ref": "#/components/schemas/xpack.usage.AnalyticsStatistics" + "cluster_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "nodes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes.usage.NodeUsage" + } } }, "required": [ - "stats" + "cluster_name", + "nodes" ] } ] }, - "xpack.usage.AnalyticsStatistics": { + "nodes.usage.NodeUsage": { "type": "object", "properties": { - "boxplot_usage": { - "type": "number" - }, - "cumulative_cardinality_usage": { - "type": "number" + "rest_actions": { + "description": "The total number of times each REST endpoint has been called on this node since the last restart.\n Note that the REST endpoint names are not considered stable.", + "type": "object", + "additionalProperties": { + "type": "number" + } }, - "string_stats_usage": { - "type": "number" + "since": { + "description": "The timestamp for when the collection of these statistics started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "top_metrics_usage": { - "type": "number" + "timestamp": { + "description": "The timestamp for when these statistics were collected.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] }, - "t_test_usage": { - "type": "number" + "aggregations": { + "description": "The total number of times search aggregations have been called on this node since the last restart.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": [ + "rest_actions", + "since", + "timestamp", + "aggregations" + ] + }, + "query_rules._types.QueryRule": { + "type": "object", + "properties": { + "rule_id": { + "description": "A unique identifier for the rule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "moving_percentiles_usage": { - "type": "number" + "type": { + "description": "The type of rule.\n`pinned` will identify and pin specific documents to the top of search results.\n`exclude` will exclude specific documents from search results.", + "allOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRuleType" + } + ] }, - "normalize_usage": { - "type": "number" + "criteria": { + "description": "The criteria that must be met for the rule to be applied.\nIf multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.", + "oneOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" + } + } + ] }, - "rate_usage": { - "type": "number" + "actions": { + "description": "The actions to take when the rule is matched.\nThe format of this action depends on the rule type.", + "allOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRuleActions" + } + ] }, - "multi_terms_usage": { + "priority": { "type": "number" } }, "required": [ - "boxplot_usage", - "cumulative_cardinality_usage", - "string_stats_usage", - "top_metrics_usage", - "t_test_usage", - "moving_percentiles_usage", - "normalize_usage", - "rate_usage" + "rule_id", + "type", + "criteria", + "actions" ] }, - "xpack.usage.Archive": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - { - "type": "object", - "properties": { - "indices_count": { - "type": "number" + "query_rules._types.QueryRuleType": { + "type": "string", + "enum": [ + "pinned", + "exclude" + ] + }, + "query_rules._types.QueryRuleCriteria": { + "type": "object", + "properties": { + "type": { + "description": "The type of criteria. The following criteria types are supported:\n\n* `always`: Matches all queries, regardless of input.\n* `contains`: Matches that contain this value anywhere in the field meet the criteria defined by the rule. Only applicable for string values.\n* `exact`: Only exact matches meet the criteria defined by the rule. Applicable for string or numerical values.\n* `fuzzy`: Exact matches or matches within the allowed Levenshtein Edit Distance meet the criteria defined by the rule. Only applicable for string values.\n* `gt`: Matches with a value greater than this value meet the criteria defined by the rule. Only applicable for numerical values.\n* `gte`: Matches with a value greater than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values.\n* `lt`: Matches with a value less than this value meet the criteria defined by the rule. Only applicable for numerical values.\n* `lte`: Matches with a value less than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values.\n* `prefix`: Matches that start with this value meet the criteria defined by the rule. Only applicable for string values.\n* `suffix`: Matches that end with this value meet the criteria defined by the rule. Only applicable for string values.", + "allOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteriaType" } - }, - "required": [ - "indices_count" ] + }, + "metadata": { + "description": "The metadata field to match against.\nThis metadata will be used to match against `match_criteria` sent in the rule.\nIt is required for all criteria types except `always`.", + "type": "string" + }, + "values": { + "description": "The values to match against the `metadata` field.\nOnly one value must match for the criteria to be met.\nIt is required for all criteria types except `always`.", + "type": "array", + "items": { + "type": "object" + } } + }, + "required": [ + "type" ] }, - "xpack.usage.Watcher": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" + "query_rules._types.QueryRuleCriteriaType": { + "type": "string", + "enum": [ + "global", + "exact", + "exact_fuzzy", + "fuzzy", + "prefix", + "suffix", + "contains", + "lt", + "lte", + "gt", + "gte", + "always" + ] + }, + "query_rules._types.QueryRuleActions": { + "type": "object", + "properties": { + "ids": { + "description": "The unique document IDs of the documents to apply the rule to.\nOnly one of `ids` or `docs` may be specified and at least one must be specified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } }, - { - "type": "object", - "properties": { - "execution": { - "$ref": "#/components/schemas/xpack.usage.WatcherActions" - }, - "watch": { - "$ref": "#/components/schemas/xpack.usage.WatcherWatch" - }, - "count": { - "$ref": "#/components/schemas/xpack.usage.Counter" + "docs": { + "description": "The documents to apply the rule to.\nOnly one of `ids` or `docs` may be specified and at least one must be specified.\nThere is a maximum value of 100 documents in a rule.\nYou can specify the following attributes for each document:\n\n* `_index`: The index of the document to pin.\n* `_id`: The unique document ID.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.PinnedDoc" + } + } + } + }, + "query_rules._types.QueryRuleset": { + "type": "object", + "properties": { + "ruleset_id": { + "description": "A unique identifier for the ruleset.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - }, - "required": [ - "execution", - "watch", - "count" ] + }, + "rules": { + "description": "Rules associated with the query ruleset.", + "type": "array", + "items": { + "$ref": "#/components/schemas/query_rules._types.QueryRule" + } } + }, + "required": [ + "ruleset_id", + "rules" ] }, - "xpack.usage.WatcherActions": { + "query_rules.list_rulesets.QueryRulesetListItem": { "type": "object", "properties": { - "actions": { + "ruleset_id": { + "description": "A unique identifier for the ruleset.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "rule_total_count": { + "description": "The number of rules associated with the ruleset.", + "type": "number" + }, + "rule_criteria_types_counts": { + "description": "A map of criteria type (for example, `exact`) to the number of rules of that type.\n\nNOTE: The counts in `rule_criteria_types_counts` may be larger than the value of `rule_total_count` because a rule may have multiple criteria.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.WatcherActionTotals" + "type": "number" + } + }, + "rule_type_counts": { + "description": "A map of rule type (for example, `pinned`) to the number of rules of that type.", + "type": "object", + "additionalProperties": { + "type": "number" } } }, "required": [ - "actions" + "ruleset_id", + "rule_total_count", + "rule_criteria_types_counts", + "rule_type_counts" ] }, - "xpack.usage.WatcherActionTotals": { + "query_rules.test.QueryRulesetMatchedRule": { "type": "object", "properties": { - "total": { - "$ref": "#/components/schemas/_types.Duration" + "ruleset_id": { + "description": "Ruleset unique identifier", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "total_time_in_ms": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "rule_id": { + "description": "Rule unique identifier within that ruleset", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] } }, "required": [ - "total", - "total_time_in_ms" + "ruleset_id", + "rule_id" ] }, - "xpack.usage.WatcherWatch": { + "_global.rank_eval.RankEvalRequestItem": { "type": "object", "properties": { - "input": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.Counter" - } + "id": { + "description": "The search request’s ID, used to group result details later.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "request": { + "description": "The query being evaluated.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalQuery" + } + ] }, - "condition": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.Counter" + "ratings": { + "description": "List of document ratings", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.DocumentRating" } }, - "action": { + "template_id": { + "description": "The search template Id", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "params": { + "description": "The search template parameters.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.Counter" + "type": "object" } - }, - "trigger": { - "$ref": "#/components/schemas/xpack.usage.WatcherWatchTrigger" } }, "required": [ - "input", - "trigger" + "id", + "ratings" ] }, - "xpack.usage.Counter": { + "_global.rank_eval.RankEvalQuery": { "type": "object", "properties": { - "active": { - "type": "number" + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "total": { + "size": { "type": "number" } }, "required": [ - "active", - "total" + "query" ] }, - "xpack.usage.WatcherWatchTrigger": { + "_global.rank_eval.DocumentRating": { "type": "object", "properties": { - "schedule": { - "$ref": "#/components/schemas/xpack.usage.WatcherWatchTriggerSchedule" + "_id": { + "description": "The document ID.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "_all": { - "$ref": "#/components/schemas/xpack.usage.Counter" + "_index": { + "description": "The document’s index. For data streams, this should be the document’s backing index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "rating": { + "description": "The document’s relevance with regard to this search request.", + "type": "number" } }, "required": [ - "_all" + "_id", + "_index", + "rating" ] }, - "xpack.usage.WatcherWatchTriggerSchedule": { + "_global.rank_eval.RankEvalMetric": { + "type": "object", + "properties": { + "precision": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricPrecision" + } + ] + }, + "recall": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRecall" + } + ] + }, + "mean_reciprocal_rank": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricMeanReciprocalRank" + } + ] + }, + "dcg": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDiscountedCumulativeGain" + } + ] + }, + "expected_reciprocal_rank": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricExpectedReciprocalRank" + } + ] + } + } + }, + "_global.rank_eval.RankEvalMetricPrecision": { + "description": "Precision at K (P@k)", "allOf": [ { - "$ref": "#/components/schemas/xpack.usage.Counter" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" }, { "type": "object", "properties": { - "cron": { - "$ref": "#/components/schemas/xpack.usage.Counter" - }, - "_all": { - "$ref": "#/components/schemas/xpack.usage.Counter" + "ignore_unlabeled": { + "description": "Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant.", + "default": false, + "type": "boolean" } - }, - "required": [ - "cron", - "_all" - ] + } } ] }, - "xpack.usage.Ccr": { + "_global.rank_eval.RankEvalMetricRatingTreshold": { "allOf": [ { - "$ref": "#/components/schemas/xpack.usage.Base" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" }, { "type": "object", "properties": { - "auto_follow_patterns_count": { - "type": "number" - }, - "follower_indices_count": { + "relevant_rating_threshold": { + "description": "Sets the rating threshold above which documents are considered to be \"relevant\".", + "default": 1.0, "type": "number" } - }, - "required": [ - "auto_follow_patterns_count", - "follower_indices_count" - ] + } } ] }, - "xpack.usage.DataStreams": { + "_global.rank_eval.RankEvalMetricBase": { + "type": "object", + "properties": { + "k": { + "description": "Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.", + "default": 10.0, + "type": "number" + } + } + }, + "_global.rank_eval.RankEvalMetricRecall": { + "description": "Recall at K (R@k)", "allOf": [ { - "$ref": "#/components/schemas/xpack.usage.Base" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" }, { - "type": "object", - "properties": { - "data_streams": { - "type": "number" - }, - "indices_count": { - "type": "number" - } - }, - "required": [ - "data_streams", - "indices_count" - ] + "type": "object" } ] }, - "xpack.usage.DataTiers": { + "_global.rank_eval.RankEvalMetricMeanReciprocalRank": { + "description": "Mean Reciprocal Rank", "allOf": [ { - "$ref": "#/components/schemas/xpack.usage.Base" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" }, { - "type": "object", - "properties": { - "data_warm": { - "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" - }, - "data_frozen": { - "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" - }, - "data_cold": { - "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" - }, - "data_content": { - "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" - }, - "data_hot": { - "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" - } - }, - "required": [ - "data_warm", - "data_cold", - "data_content", - "data_hot" - ] + "type": "object" } ] }, - "xpack.usage.DataTierPhaseStatistics": { - "type": "object", - "properties": { - "node_count": { - "type": "number" - }, - "index_count": { - "type": "number" - }, - "total_shard_count": { - "type": "number" - }, - "primary_shard_count": { - "type": "number" - }, - "doc_count": { - "type": "number" - }, - "total_size_bytes": { - "type": "number" - }, - "primary_size_bytes": { - "type": "number" - }, - "primary_shard_size_avg_bytes": { - "type": "number" - }, - "primary_shard_size_median_bytes": { - "type": "number" + "_global.rank_eval.RankEvalMetricDiscountedCumulativeGain": { + "description": "Discounted cumulative gain (DCG)", + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" }, - "primary_shard_size_mad_bytes": { - "type": "number" + { + "type": "object", + "properties": { + "normalize": { + "description": "If set to true, this metric will calculate the Normalized DCG.", + "default": false, + "type": "boolean" + } + } } - }, - "required": [ - "node_count", - "index_count", - "total_shard_count", - "primary_shard_count", - "doc_count", - "total_size_bytes", - "primary_size_bytes", - "primary_shard_size_avg_bytes", - "primary_shard_size_median_bytes", - "primary_shard_size_mad_bytes" ] }, - "xpack.usage.Eql": { + "_global.rank_eval.RankEvalMetricExpectedReciprocalRank": { + "description": "Expected Reciprocal Rank (ERR)", "allOf": [ { - "$ref": "#/components/schemas/xpack.usage.Base" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" }, { "type": "object", "properties": { - "features": { - "$ref": "#/components/schemas/xpack.usage.EqlFeatures" - }, - "queries": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.Query" - } + "maximum_relevance": { + "description": "The highest relevance grade used in the user-supplied relevance judgments.", + "type": "number" } }, "required": [ - "features", - "queries" + "maximum_relevance" ] } ] }, - "xpack.usage.EqlFeatures": { - "type": "object", - "properties": { - "join": { - "$ref": "#/components/schemas/_types.uint" - }, - "joins": { - "$ref": "#/components/schemas/xpack.usage.EqlFeaturesJoin" - }, - "keys": { - "$ref": "#/components/schemas/xpack.usage.EqlFeaturesKeys" - }, - "event": { - "$ref": "#/components/schemas/_types.uint" - }, - "pipes": { - "$ref": "#/components/schemas/xpack.usage.EqlFeaturesPipes" - }, - "sequence": { - "$ref": "#/components/schemas/_types.uint" - }, - "sequences": { - "$ref": "#/components/schemas/xpack.usage.EqlFeaturesSequences" - } - }, - "required": [ - "join", - "joins", - "keys", - "event", - "pipes", - "sequence", - "sequences" - ] - }, - "xpack.usage.EqlFeaturesJoin": { + "_global.rank_eval.RankEvalMetricDetail": { "type": "object", "properties": { - "join_queries_two": { - "$ref": "#/components/schemas/_types.uint" - }, - "join_queries_three": { - "$ref": "#/components/schemas/_types.uint" + "metric_score": { + "description": "The metric_score in the details section shows the contribution of this query to the global quality metric score", + "type": "number" }, - "join_until": { - "$ref": "#/components/schemas/_types.uint" + "unrated_docs": { + "description": "The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.UnratedDocument" + } }, - "join_queries_five_or_more": { - "$ref": "#/components/schemas/_types.uint" + "hits": { + "description": "The hits section shows a grouping of the search results with their supplied ratings", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalHitItem" + } }, - "join_queries_four": { - "$ref": "#/components/schemas/_types.uint" + "metric_details": { + "description": "The metric_details give additional information about the calculated quality metric (e.g. how many of the retrieved documents were relevant). The content varies for each metric but allows for better interpretation of the results", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } } }, "required": [ - "join_queries_two", - "join_queries_three", - "join_until", - "join_queries_five_or_more", - "join_queries_four" + "metric_score", + "unrated_docs", + "hits", + "metric_details" ] }, - "xpack.usage.EqlFeaturesKeys": { + "_global.rank_eval.UnratedDocument": { "type": "object", "properties": { - "join_keys_two": { - "$ref": "#/components/schemas/_types.uint" - }, - "join_keys_one": { - "$ref": "#/components/schemas/_types.uint" - }, - "join_keys_three": { - "$ref": "#/components/schemas/_types.uint" - }, - "join_keys_five_or_more": { - "$ref": "#/components/schemas/_types.uint" + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "join_keys_four": { - "$ref": "#/components/schemas/_types.uint" + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] } }, "required": [ - "join_keys_two", - "join_keys_one", - "join_keys_three", - "join_keys_five_or_more", - "join_keys_four" + "_id", + "_index" ] }, - "xpack.usage.EqlFeaturesPipes": { + "_global.rank_eval.RankEvalHitItem": { "type": "object", "properties": { - "pipe_tail": { - "$ref": "#/components/schemas/_types.uint" + "hit": { + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalHit" + } + ] }, - "pipe_head": { - "$ref": "#/components/schemas/_types.uint" + "rating": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] } }, "required": [ - "pipe_tail", - "pipe_head" + "hit" ] }, - "xpack.usage.EqlFeaturesSequences": { + "_global.rank_eval.RankEvalHit": { "type": "object", "properties": { - "sequence_queries_three": { - "$ref": "#/components/schemas/_types.uint" - }, - "sequence_queries_four": { - "$ref": "#/components/schemas/_types.uint" - }, - "sequence_queries_two": { - "$ref": "#/components/schemas/_types.uint" - }, - "sequence_until": { - "$ref": "#/components/schemas/_types.uint" + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "sequence_queries_five_or_more": { - "$ref": "#/components/schemas/_types.uint" + "_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] }, - "sequence_maxspan": { - "$ref": "#/components/schemas/_types.uint" + "_score": { + "type": "number" } }, "required": [ - "sequence_queries_three", - "sequence_queries_four", - "sequence_queries_two", - "sequence_until", - "sequence_queries_five_or_more", - "sequence_maxspan" + "_id", + "_index", + "_score" ] }, - "xpack.usage.Query": { + "_global.reindex.Destination": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "failed": { - "type": "number" - }, - "paging": { - "type": "number" - }, - "total": { - "type": "number" - } - } - }, - "xpack.usage.Flattened": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - { - "type": "object", - "properties": { - "field_count": { - "type": "number" + "index": { + "description": "The name of the data stream, index, or index alias you are copying to.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - }, - "required": [ - "field_count" ] - } - ] - }, - "xpack.usage.HealthStatistics": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" }, - { - "type": "object", - "properties": { - "invocations": { - "$ref": "#/components/schemas/xpack.usage.Invocations" + "op_type": { + "description": "If it is `create`, the operation will only index documents that do not already exist (also known as \"put if absent\").\n\nIMPORTANT: To reindex to a data stream destination, this argument must be `create`.", + "default": "index", + "allOf": [ + { + "$ref": "#/components/schemas/_types.OpType" } - }, - "required": [ - "invocations" ] - } - ] - }, - "xpack.usage.Invocations": { - "type": "object", - "properties": { - "total": { - "type": "number" - } - }, - "required": [ - "total" - ] - }, - "xpack.usage.Ilm": { - "type": "object", - "properties": { - "policy_count": { - "type": "number" }, - "policy_stats": { - "type": "array", - "items": { - "$ref": "#/components/schemas/xpack.usage.IlmPolicyStatistics" - } - } - }, - "required": [ - "policy_count", - "policy_stats" - ] - }, - "xpack.usage.IlmPolicyStatistics": { - "type": "object", - "properties": { - "indices_managed": { - "type": "number" + "pipeline": { + "description": "The name of the pipeline to use.", + "type": "string" }, - "phases": { - "$ref": "#/components/schemas/xpack.usage.Phases" + "routing": { + "description": "By default, a document's routing is preserved unless it's changed by the script.\nIf it is `keep`, the routing on the bulk request sent for each match is set to the routing on the match.\nIf it is `discard`, the routing on the bulk request sent for each match is set to `null`.\nIf it is `=value`, the routing on the bulk request sent for each match is set to all value specified after the equals sign (`=`).", + "default": "keep", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "version_type": { + "description": "The versioning to use for the indexing operation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionType" + } + ] } }, "required": [ - "indices_managed", - "phases" + "index" ] }, - "xpack.usage.Phases": { + "_global.reindex.Source": { "type": "object", "properties": { - "cold": { - "$ref": "#/components/schemas/xpack.usage.Phase" + "index": { + "description": "The name of the data stream, index, or alias you are copying from.\nIt accepts a comma-separated list to reindex from multiple sources.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] }, - "delete": { - "$ref": "#/components/schemas/xpack.usage.Phase" + "query": { + "description": "The documents to reindex, which is defined with Query DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] }, - "frozen": { - "$ref": "#/components/schemas/xpack.usage.Phase" + "remote": { + "description": "A remote instance of Elasticsearch that you want to index from.", + "x-state": "Generally available; Added in 5.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/_global.reindex.RemoteSource" + } + ] }, - "hot": { - "$ref": "#/components/schemas/xpack.usage.Phase" + "size": { + "description": "The number of documents to index per batch.\nUse it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.", + "default": 1000.0, + "type": "number" }, - "warm": { - "$ref": "#/components/schemas/xpack.usage.Phase" + "slice": { + "description": "Slice the reindex request manually using the provided slice ID and total number of slices.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SlicedScroll" + } + ] + }, + "sort": { + "deprecated": true, + "description": "A comma-separated list of `:` pairs to sort by before indexing.\nUse it in conjunction with `max_docs` to control what documents are reindexed.\n\nWARNING: Sort in reindex is deprecated.\nSorting in reindex was never guaranteed to index documents in order and prevents further development of reindex such as resilience and performance improvements.\nIf used in combination with `max_docs`, consider using a query filter instead.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Sort" + } + ] + }, + "_source": { + "description": "If `true`, reindex all source fields.\nSet it to a list to reindex select fields.", + "default": "true", + "allOf": [ + { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + } + ] + }, + "runtime_mappings": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] } - } + }, + "required": [ + "index" + ] }, - "xpack.usage.Phase": { + "_global.reindex.RemoteSource": { "type": "object", "properties": { - "actions": { - "type": "array", - "items": { + "connect_timeout": { + "description": "The remote connection timeout.", + "default": "30s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "headers": { + "description": "An object containing the headers of the request.", + "type": "object", + "additionalProperties": { "type": "string" } }, - "min_age": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + "host": { + "description": "The URL for the remote instance of Elasticsearch that you want to index from.\nThis information is required when you're indexing from remote.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" + } + ] + }, + "username": { + "description": "The username to use for authentication with the remote host (required when using basic auth).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + }, + "password": { + "description": "The password to use for authentication with the remote host (required when using basic auth).", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "api_key": { + "description": "The API key to use for authentication with the remote host (as an alternative to basic auth when the remote cluster is in Elastic Cloud).\n(It is not permitted to set this and also to set an `Authorization` header via `headers`.)", + "x-state": "Generally available; Added in 9.3.0", + "type": "string" + }, + "socket_timeout": { + "description": "The remote socket read timeout.", + "default": "30s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] } }, "required": [ - "actions", - "min_age" + "host" ] }, - "xpack.usage.MachineLearning": { + "_types.Username": { + "type": "string" + }, + "_global.reindex_rethrottle.ReindexNode": { "allOf": [ { - "$ref": "#/components/schemas/xpack.usage.Base" + "$ref": "#/components/schemas/_spec_utils.BaseNode" }, { "type": "object", "properties": { - "datafeeds": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.Datafeed" - } - }, - "jobs": { - "description": "Job usage statistics. The `_all` entry is always present and gathers statistics for all jobs.", + "tasks": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.JobUsage" + "$ref": "#/components/schemas/_global.reindex_rethrottle.ReindexTask" } - }, - "node_count": { - "type": "number" - }, - "data_frame_analytics_jobs": { - "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobs" - }, - "inference": { - "$ref": "#/components/schemas/xpack.usage.MlInference" } }, "required": [ - "datafeeds", - "jobs", - "node_count", - "data_frame_analytics_jobs", - "inference" + "tasks" ] } ] }, - "xpack.usage.Datafeed": { + "_global.reindex_rethrottle.ReindexTask": { "type": "object", "properties": { - "count": { + "action": { + "type": "string" + }, + "cancellable": { + "type": "boolean" + }, + "cancelled": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "id": { "type": "number" + }, + "node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "running_time_in_nanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "start_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ReindexStatus" + } + ] + }, + "type": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.HttpHeaders" + } + ] } }, "required": [ - "count" + "action", + "cancellable", + "cancelled", + "description", + "id", + "node", + "running_time_in_nanos", + "start_time_in_millis", + "status", + "type", + "headers" ] }, - "xpack.usage.JobUsage": { + "_spec_utils.BaseNode": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "created_by": { + "attributes": { "type": "object", "additionalProperties": { - "type": "number" + "type": "string" } }, - "detectors": { - "$ref": "#/components/schemas/ml._types.JobStatistics" + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" + } + ] }, - "forecasts": { - "$ref": "#/components/schemas/xpack.usage.MlJobForecasts" + "ip": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ip" + } + ] }, - "model_size": { - "$ref": "#/components/schemas/ml._types.JobStatistics" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "roles": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeRoles" + } + ] + }, + "transport_address": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] } }, "required": [ - "count", - "created_by", - "detectors", - "forecasts", - "model_size" + "attributes", + "host", + "ip", + "name", + "transport_address" ] }, - "xpack.usage.MlJobForecasts": { + "rollup.get_jobs.RollupJob": { "type": "object", "properties": { - "total": { - "type": "number" + "config": { + "description": "The rollup job configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/rollup.get_jobs.RollupJobConfiguration" + } + ] }, - "forecasted_jobs": { - "type": "number" + "stats": { + "description": "Transient statistics about the rollup job, such as how many documents have been processed and how many rollup summary docs have been indexed.\nThese stats are not persisted.\nIf a node is restarted, these stats are reset.", + "allOf": [ + { + "$ref": "#/components/schemas/rollup.get_jobs.RollupJobStats" + } + ] + }, + "status": { + "description": "The current status of the indexer for the rollup job.", + "allOf": [ + { + "$ref": "#/components/schemas/rollup.get_jobs.RollupJobStatus" + } + ] } }, "required": [ - "total", - "forecasted_jobs" + "config", + "stats", + "status" ] }, - "xpack.usage.MlDataFrameAnalyticsJobs": { + "rollup.get_jobs.RollupJobConfiguration": { "type": "object", "properties": { - "memory_usage": { - "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobsMemory" + "cron": { + "type": "string" }, - "_all": { - "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobsCount" + "groups": { + "allOf": [ + { + "$ref": "#/components/schemas/rollup._types.Groupings" + } + ] }, - "analysis_counts": { - "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobsAnalysis" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "stopped": { - "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobsCount" - } - }, - "required": [ - "_all" - ] - }, - "xpack.usage.MlDataFrameAnalyticsJobsMemory": { - "type": "object", - "properties": { - "peak_usage_bytes": { - "$ref": "#/components/schemas/ml._types.JobStatistics" - } - }, - "required": [ - "peak_usage_bytes" - ] - }, - "xpack.usage.MlDataFrameAnalyticsJobsCount": { - "type": "object", - "properties": { - "count": { + "index_pattern": { + "type": "string" + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/rollup._types.FieldMetric" + } + }, + "page_size": { "type": "number" + }, + "rollup_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] } }, "required": [ - "count" + "cron", + "groups", + "id", + "index_pattern", + "metrics", + "page_size", + "rollup_index", + "timeout" ] }, - "xpack.usage.MlDataFrameAnalyticsJobsAnalysis": { + "rollup._types.Groupings": { "type": "object", "properties": { - "classification": { - "type": "number" + "date_histogram": { + "description": "A date histogram group aggregates a date field into time-based buckets.\nThis group is mandatory; you currently cannot roll up documents without a timestamp and a `date_histogram` group.", + "allOf": [ + { + "$ref": "#/components/schemas/rollup._types.DateHistogramGrouping" + } + ] }, - "outlier_detection": { - "type": "number" + "histogram": { + "description": "The histogram group aggregates one or more numeric fields into numeric histogram intervals.", + "allOf": [ + { + "$ref": "#/components/schemas/rollup._types.HistogramGrouping" + } + ] }, - "regression": { - "type": "number" + "terms": { + "description": "The terms group can be used on keyword or numeric fields to allow bucketing via the terms aggregation at a later point.\nThe indexer enumerates and stores all values of a field for each time-period.\nThis can be potentially costly for high-cardinality groups such as IP addresses, especially if the time-bucket is particularly sparse.", + "allOf": [ + { + "$ref": "#/components/schemas/rollup._types.TermsGrouping" + } + ] } } }, - "xpack.usage.MlInference": { + "rollup._types.DateHistogramGrouping": { "type": "object", "properties": { - "ingest_processors": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.MlInferenceIngestProcessor" - } + "delay": { + "description": "How long to wait before rolling up new documents.\nBy default, the indexer attempts to roll up all data that is available.\nHowever, it is not uncommon for data to arrive out of order.\nThe indexer is unable to deal with data that arrives after a time-span has been rolled up.\nYou need to specify a delay that matches the longest period of time you expect out-of-order data to arrive.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "trained_models": { - "$ref": "#/components/schemas/xpack.usage.MlInferenceTrainedModels" + "field": { + "description": "The date field that is to be rolled up.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "deployments": { - "$ref": "#/components/schemas/xpack.usage.MlInferenceDeployments" - } - }, - "required": [ - "ingest_processors", - "trained_models" - ] - }, - "xpack.usage.MlInferenceIngestProcessor": { - "type": "object", - "properties": { - "num_docs_processed": { - "$ref": "#/components/schemas/xpack.usage.MlInferenceIngestProcessorCount" + "format": { + "type": "string" }, - "pipelines": { - "$ref": "#/components/schemas/xpack.usage.MlCounter" + "interval": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "num_failures": { - "$ref": "#/components/schemas/xpack.usage.MlInferenceIngestProcessorCount" + "calendar_interval": { + "description": "The interval of time buckets to be generated when rolling up.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] }, - "time_ms": { - "$ref": "#/components/schemas/xpack.usage.MlInferenceIngestProcessorCount" + "fixed_interval": { + "description": "The interval of time buckets to be generated when rolling up.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_zone": { + "description": "Defines what `time_zone` the rollup documents are stored as.\nUnlike raw data, which can shift timezones on the fly, rolled documents have to be stored with a specific timezone.\nBy default, rollup documents are stored in `UTC`.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] } }, "required": [ - "num_docs_processed", - "pipelines", - "num_failures", - "time_ms" + "field" ] }, - "xpack.usage.MlInferenceIngestProcessorCount": { + "rollup._types.HistogramGrouping": { "type": "object", "properties": { - "max": { - "type": "number" - }, - "sum": { - "type": "number" + "fields": { + "description": "The set of fields that you wish to build histograms for.\nAll fields specified must be some kind of numeric.\nOrder does not matter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] }, - "min": { + "interval": { + "description": "The interval of histogram buckets to be generated when rolling up.\nFor example, a value of `5` creates buckets that are five units wide (`0-5`, `5-10`, etc).\nNote that only one interval can be specified in the histogram group, meaning that all fields being grouped via the histogram must share the same interval.", "type": "number" } }, "required": [ - "max", - "sum", - "min" + "fields", + "interval" ] }, - "xpack.usage.MlCounter": { + "rollup._types.TermsGrouping": { "type": "object", "properties": { - "count": { - "type": "number" + "fields": { + "description": "The set of fields that you wish to collect terms for.\nThis array can contain fields that are both keyword and numerics.\nOrder does not matter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] } }, "required": [ - "count" + "fields" ] }, - "xpack.usage.MlInferenceTrainedModels": { + "rollup._types.FieldMetric": { "type": "object", "properties": { - "estimated_operations": { - "$ref": "#/components/schemas/ml._types.JobStatistics" - }, - "estimated_heap_memory_usage_bytes": { - "$ref": "#/components/schemas/ml._types.JobStatistics" - }, - "count": { - "$ref": "#/components/schemas/xpack.usage.MlInferenceTrainedModelsCount" - }, - "_all": { - "$ref": "#/components/schemas/xpack.usage.MlCounter" + "field": { + "description": "The field to collect metrics for. This must be a numeric of some kind.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] }, - "model_size_bytes": { - "$ref": "#/components/schemas/ml._types.JobStatistics" + "metrics": { + "description": "An array of metrics to collect for the field. At least one metric must be configured.", + "type": "array", + "items": { + "$ref": "#/components/schemas/rollup._types.Metric" + } } }, "required": [ - "_all" + "field", + "metrics" + ] + }, + "rollup._types.Metric": { + "type": "string", + "enum": [ + "min", + "max", + "sum", + "avg", + "value_count" ] }, - "xpack.usage.MlInferenceTrainedModelsCount": { + "rollup.get_jobs.RollupJobStats": { "type": "object", "properties": { - "total": { + "documents_processed": { "type": "number" }, - "prepackaged": { + "index_failures": { "type": "number" }, - "other": { + "index_time_in_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "index_total": { "type": "number" }, - "pass_through": { + "pages_processed": { "type": "number" }, - "regression": { + "rollups_indexed": { "type": "number" }, - "classification": { + "search_failures": { "type": "number" }, - "ner": { + "search_time_in_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "search_total": { "type": "number" }, - "text_embedding": { + "trigger_count": { + "type": "number" + }, + "processing_time_in_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "processing_total": { "type": "number" } }, "required": [ - "total", - "prepackaged", - "other" + "documents_processed", + "index_failures", + "index_time_in_ms", + "index_total", + "pages_processed", + "rollups_indexed", + "search_failures", + "search_time_in_ms", + "search_total", + "trigger_count", + "processing_time_in_ms", + "processing_total" ] }, - "xpack.usage.MlInferenceDeployments": { + "rollup.get_jobs.RollupJobStatus": { "type": "object", "properties": { - "count": { - "type": "number" - }, - "inference_counts": { - "$ref": "#/components/schemas/ml._types.JobStatistics" + "current_position": { + "type": "object", + "additionalProperties": { + "type": "object" + } }, - "model_sizes_bytes": { - "$ref": "#/components/schemas/ml._types.JobStatistics" + "job_state": { + "allOf": [ + { + "$ref": "#/components/schemas/rollup.get_jobs.IndexingJobState" + } + ] }, - "time_ms": { - "$ref": "#/components/schemas/xpack.usage.MlInferenceDeploymentsTimeMs" + "upgraded_doc_id": { + "type": "boolean" } }, "required": [ - "count", - "inference_counts", - "model_sizes_bytes", - "time_ms" + "job_state" ] }, - "xpack.usage.MlInferenceDeploymentsTimeMs": { + "rollup.get_jobs.IndexingJobState": { + "type": "string", + "enum": [ + "started", + "indexing", + "stopping", + "stopped", + "aborting" + ] + }, + "rollup.get_rollup_caps.RollupCapabilities": { "type": "object", "properties": { - "avg": { - "type": "number" + "rollup_jobs": { + "description": "There can be multiple, independent jobs configured for a single index or index pattern. Each of these jobs may have different configurations, so the API returns a list of all the various configurations available.", + "type": "array", + "items": { + "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupCapabilitySummary" + } } }, "required": [ - "avg" + "rollup_jobs" ] }, - "xpack.usage.Monitoring": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - { + "rollup.get_rollup_caps.RollupCapabilitySummary": { + "type": "object", + "properties": { + "fields": { "type": "object", - "properties": { - "collection_enabled": { - "type": "boolean" - }, - "enabled_exporters": { - "type": "object", - "additionalProperties": { - "type": "number" - } + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupFieldSummary" } - }, - "required": [ - "collection_enabled", - "enabled_exporters" - ] + } + }, + "index_pattern": { + "type": "string" + }, + "job_id": { + "type": "string" + }, + "rollup_index": { + "type": "string" } + }, + "required": [ + "fields", + "index_pattern", + "job_id", + "rollup_index" ] }, - "xpack.usage.RuntimeFieldTypes": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" + "rollup.get_rollup_caps.RollupFieldSummary": { + "type": "object", + "properties": { + "agg": { + "type": "string" }, - { - "type": "object", - "properties": { - "field_types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/xpack.usage.RuntimeFieldsType" - } + "calendar_interval": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_zone": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" } - }, - "required": [ - "field_types" ] } + }, + "required": [ + "agg" ] }, - "xpack.usage.RuntimeFieldsType": { + "rollup.get_rollup_index_caps.IndexCapabilities": { "type": "object", "properties": { - "chars_max": { - "type": "number" - }, - "chars_total": { - "type": "number" - }, - "count": { - "type": "number" - }, - "doc_max": { - "type": "number" - }, - "doc_total": { - "type": "number" - }, - "index_count": { - "type": "number" - }, - "lang": { + "rollup_jobs": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/rollup.get_rollup_index_caps.RollupJobSummary" } - }, - "lines_max": { - "type": "number" - }, - "lines_total": { - "type": "number" - }, - "name": { - "$ref": "#/components/schemas/_types.Field" - }, - "scriptless_count": { - "type": "number" - }, - "shadowed_count": { - "type": "number" - }, - "source_max": { - "type": "number" - }, - "source_total": { - "type": "number" } }, "required": [ - "chars_max", - "chars_total", - "count", - "doc_max", - "doc_total", - "index_count", - "lang", - "lines_max", - "lines_total", - "name", - "scriptless_count", - "shadowed_count", - "source_max", - "source_total" + "rollup_jobs" ] }, - "xpack.usage.SearchableSnapshots": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - { + "rollup.get_rollup_index_caps.RollupJobSummary": { + "type": "object", + "properties": { + "fields": { "type": "object", - "properties": { - "indices_count": { - "type": "number" - }, - "full_copy_indices_count": { - "type": "number" - }, - "shared_cache_indices_count": { - "type": "number" + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/rollup.get_rollup_index_caps.RollupJobSummaryField" + } + } + }, + "index_pattern": { + "type": "string" + }, + "job_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - }, - "required": [ - "indices_count" ] - } - ] - }, - "xpack.usage.Security": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" }, - { - "type": "object", - "properties": { - "api_key_service": { - "$ref": "#/components/schemas/xpack.usage.FeatureToggle" - }, - "anonymous": { - "$ref": "#/components/schemas/xpack.usage.FeatureToggle" - }, - "audit": { - "$ref": "#/components/schemas/xpack.usage.Audit" - }, - "fips_140": { - "$ref": "#/components/schemas/xpack.usage.FeatureToggle" - }, - "ipfilter": { - "$ref": "#/components/schemas/xpack.usage.IpFilter" - }, - "realms": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.Realm" - } - }, - "role_mapping": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.RoleMapping" - } - }, - "roles": { - "$ref": "#/components/schemas/xpack.usage.SecurityRoles" - }, - "ssl": { - "$ref": "#/components/schemas/xpack.usage.Ssl" - }, - "system_key": { - "$ref": "#/components/schemas/xpack.usage.FeatureToggle" - }, - "token_service": { - "$ref": "#/components/schemas/xpack.usage.FeatureToggle" - }, - "operator_privileges": { - "$ref": "#/components/schemas/xpack.usage.Base" + "rollup_index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - }, - "required": [ - "api_key_service", - "anonymous", - "audit", - "fips_140", - "ipfilter", - "realms", - "role_mapping", - "roles", - "ssl", - "token_service", - "operator_privileges" ] } + }, + "required": [ + "fields", + "index_pattern", + "job_id", + "rollup_index" ] }, - "xpack.usage.FeatureToggle": { + "rollup.get_rollup_index_caps.RollupJobSummaryField": { "type": "object", "properties": { - "enabled": { - "type": "boolean" + "agg": { + "type": "string" + }, + "time_zone": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TimeZone" + } + ] + }, + "calendar_interval": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] } }, "required": [ - "enabled" + "agg" ] }, - "xpack.usage.Audit": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.FeatureToggle" - }, - { - "type": "object", - "properties": { - "outputs": { - "type": "array", - "items": { - "type": "string" - } - } - } - } + "_global.scripts_painless_execute.PainlessContext": { + "type": "string", + "enum": [ + "painless_test", + "filter", + "score", + "boolean_field", + "date_field", + "double_field", + "geo_point_field", + "ip_field", + "keyword_field", + "long_field", + "composite_field" ] }, - "xpack.usage.IpFilter": { + "_global.scripts_painless_execute.PainlessContextSetup": { "type": "object", "properties": { - "http": { - "type": "boolean" + "document": { + "description": "Document that's temporarily indexed in-memory and accessible from the script.", + "type": "object" }, - "transport": { - "type": "boolean" + "index": { + "description": "Index containing a mapping that's compatible with the indexed document.\nYou may specify a remote index by prefixing the index with the remote cluster alias.\nFor example, `remote1:my_index` indicates that you want to run the painless script against the \"my_index\" index on the \"remote1\" cluster.\nThis request will be forwarded to the \"remote1\" cluster if you have configured a connection to that remote cluster.\n\nNOTE: Wildcards are not accepted in the index expression for this endpoint.\nThe expression `*:myindex` will return the error \"No such remote cluster\" and the expression `logs*` or `remote1:logs*` will return the error \"index not found\".", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "query": { + "description": "Use this parameter to specify a query for computing a score.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] } }, "required": [ - "http", - "transport" + "document", + "index" ] }, - "xpack.usage.Realm": { + "search_application._types.SearchApplication": { "allOf": [ { - "$ref": "#/components/schemas/xpack.usage.Base" + "$ref": "#/components/schemas/search_application._types.SearchApplicationParameters" }, { "type": "object", "properties": { "name": { - "type": "array", - "items": { - "type": "string" - } - }, - "order": { - "type": "array", - "items": { - "type": "number" - } - }, - "size": { - "type": "array", - "items": { - "type": "number" - } - }, - "cache": { - "type": "array", - "items": { - "$ref": "#/components/schemas/xpack.usage.RealmCache" - } - }, - "has_authorization_realms": { - "type": "array", - "items": { - "type": "boolean" - } - }, - "has_default_username_pattern": { - "type": "array", - "items": { - "type": "boolean" - } - }, - "has_truststore": { - "type": "array", - "items": { - "type": "boolean" - } + "description": "Search Application name", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] }, - "is_authentication_delegated": { - "type": "array", - "items": { - "type": "boolean" - } + "updated_at_millis": { + "description": "Last time the Search Application was updated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] } + }, + "required": [ + "name", + "updated_at_millis" + ] + } + ] + }, + "search_application._types.SearchApplicationParameters": { + "type": "object", + "properties": { + "indices": { + "description": "Indices that are part of the Search Application.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" } + }, + "analytics_collection_name": { + "description": "Analytics collection associated to the Search Application.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "template": { + "description": "Search template to use on search operations.", + "allOf": [ + { + "$ref": "#/components/schemas/search_application._types.SearchApplicationTemplate" + } + ] } + }, + "required": [ + "indices" ] }, - "xpack.usage.RealmCache": { + "search_application._types.SearchApplicationTemplate": { "type": "object", "properties": { - "size": { - "type": "number" + "script": { + "description": "The associated mustache template.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] } }, "required": [ - "size" + "script" ] }, - "xpack.usage.RoleMapping": { + "search_application._types.AnalyticsCollection": { "type": "object", "properties": { - "enabled": { - "type": "number" - }, - "size": { - "type": "number" + "event_data_stream": { + "description": "Data stream for the collection.", + "allOf": [ + { + "$ref": "#/components/schemas/search_application._types.EventDataStream" + } + ] } }, "required": [ - "enabled", - "size" + "event_data_stream" ] }, - "xpack.usage.SecurityRoles": { + "search_application._types.EventDataStream": { "type": "object", "properties": { - "native": { - "$ref": "#/components/schemas/xpack.usage.SecurityRolesNative" - }, - "dls": { - "$ref": "#/components/schemas/xpack.usage.SecurityRolesDls" - }, - "file": { - "$ref": "#/components/schemas/xpack.usage.SecurityRolesFile" + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] } }, "required": [ - "native", - "dls", - "file" + "name" ] }, - "xpack.usage.SecurityRolesNative": { - "type": "object", - "properties": { - "dls": { - "type": "boolean" - }, - "fls": { - "type": "boolean" + "search_application._types.EventType": { + "type": "string", + "enum": [ + "page_view", + "search", + "search_click" + ] + }, + "search_application.put_behavioral_analytics.AnalyticsAcknowledgeResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" }, - "size": { - "type": "number" + { + "type": "object", + "properties": { + "name": { + "description": "The name of the analytics collection created or updated", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + } + }, + "required": [ + "name" + ] } - }, - "required": [ - "dls", - "fls", - "size" ] }, - "xpack.usage.SecurityRolesDls": { - "type": "object", - "properties": { - "bit_set_cache": { - "$ref": "#/components/schemas/xpack.usage.SecurityRolesDlsBitSetCache" - } - }, - "required": [ - "bit_set_cache" + "_global.search_mvt._types.ZoomLevel": { + "type": "number" + }, + "_global.search_mvt._types.Coordinate": { + "type": "number" + }, + "_global.search_mvt._types.GridAggregationType": { + "type": "string", + "enum": [ + "geotile", + "geohex" ] }, - "xpack.usage.SecurityRolesDlsBitSetCache": { + "_global.search_mvt._types.GridType": { + "type": "string", + "enum": [ + "grid", + "point", + "centroid" + ] + }, + "_types.MapboxVectorTiles": { + "type": "object" + }, + "_global.search_shards.SearchShardsNodeAttributes": { "type": "object", "properties": { - "count": { - "type": "number" + "name": { + "description": "The human-readable identifier of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeName" + } + ] }, - "memory": { - "$ref": "#/components/schemas/_types.ByteSize" + "ephemeral_id": { + "description": "The ephemeral ID of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "memory_in_bytes": { - "$ref": "#/components/schemas/_types.ulong" + "transport_address": { + "description": "The host and port where transport HTTP connections are accepted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransportAddress" + } + ] + }, + "external_id": { + "x-state": "Generally available; Added in 8.3.0", + "type": "string" + }, + "attributes": { + "description": "Lists node attributes.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "roles": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeRoles" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "min_index_version": { + "type": "number" + }, + "max_index_version": { + "type": "number" } }, "required": [ - "count", - "memory_in_bytes" + "name", + "ephemeral_id", + "transport_address", + "external_id", + "attributes", + "roles", + "version", + "min_index_version", + "max_index_version" ] }, - "xpack.usage.SecurityRolesFile": { + "_types.NodeShard": { "type": "object", "properties": { - "dls": { - "type": "boolean" + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/indices.stats.ShardRoutingState" + } + ] }, - "fls": { + "primary": { "type": "boolean" }, - "size": { + "node": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeName" + } + ] + }, + "shard": { "type": "number" + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "allocation_id": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "recovery_source": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "unassigned_info": { + "allOf": [ + { + "$ref": "#/components/schemas/cluster.allocation_explain.UnassignedInformation" + } + ] + }, + "relocating_node": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.NodeId" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "relocation_failure_info": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RelocationFailureInfo" + } + ] } }, "required": [ - "dls", - "fls", - "size" + "state", + "primary", + "shard", + "index" ] }, - "xpack.usage.Ssl": { + "_types.RelocationFailureInfo": { "type": "object", "properties": { - "http": { - "$ref": "#/components/schemas/xpack.usage.FeatureToggle" - }, - "transport": { - "$ref": "#/components/schemas/xpack.usage.FeatureToggle" + "failed_attempts": { + "type": "number" } }, "required": [ - "http", - "transport" + "failed_attempts" ] }, - "xpack.usage.Slm": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - { - "type": "object", - "properties": { - "policy_count": { - "type": "number" - }, - "policy_stats": { - "$ref": "#/components/schemas/slm._types.Statistics" - } + "_global.search_shards.ShardStoreIndex": { + "type": "object", + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Name" } - } - ] - }, - "xpack.usage.Sql": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" }, - { - "type": "object", - "properties": { - "features": { - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "queries": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/xpack.usage.Query" - } + "filter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" } - }, - "required": [ - "features", - "queries" ] } - ] + } }, - "xpack.usage.Vector": { - "allOf": [ - { - "$ref": "#/components/schemas/xpack.usage.Base" - }, - { - "type": "object", - "properties": { - "dense_vector_dims_avg_count": { - "type": "number" - }, - "dense_vector_fields_count": { - "type": "number" - }, - "sparse_vector_fields_count": { - "type": "number" + "searchable_snapshots.cache_stats.Node": { + "type": "object", + "properties": { + "shared_cache": { + "allOf": [ + { + "$ref": "#/components/schemas/searchable_snapshots.cache_stats.Shared" } - }, - "required": [ - "dense_vector_dims_avg_count", - "dense_vector_fields_count" ] } + }, + "required": [ + "shared_cache" ] - } - }, - "responses": { - "async_search.submit-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/async_search._types.AsyncSearchDocumentResponseBase" - }, - "examples": { - "AsyncSearchSubmitResponseExample1": { - "description": "A successful response when performing search asynchronously.", - "value": "{\n \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n \"is_partial\" : true,\n \"is_running\" : true,\n \"start_time_in_millis\" : 1583945890986,\n \"expiration_time_in_millis\" : 1584377890986,\n \"response\" : {\n \"took\" : 1122,\n \"timed_out\" : false,\n \"num_reduce_phases\" : 0,\n \"_shards\" : {\n \"total\" : 562,\n \"successful\" : 3,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 157483,\n \"relation\" : \"gte\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n }\n }\n}" - } - } - } - } - }, - "bulk-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "description": "If `true`, one or more of the operations in the bulk request did not complete successfully.", - "type": "boolean" - }, - "items": { - "description": "The result of each operation in the bulk request, in the order they were submitted.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.bulk.ResponseItem" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "took": { - "description": "The length of time, in milliseconds, it took to process the bulk request.", - "type": "number" - }, - "ingest_took": { - "type": "number" - } - }, - "required": [ - "errors", - "items", - "took" - ] - }, - "examples": { - "BulkResponseExample1": { - "summary": "Multiple successful operations", - "value": "{\n \"took\": 30,\n \"errors\": false,\n \"items\": [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 0,\n \"_primary_term\": 1\n }\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"result\": \"not_found\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 404,\n \"_seq_no\" : 1,\n \"_primary_term\" : 2\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 2,\n \"_primary_term\" : 3\n }\n },\n {\n \"update\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"result\": \"updated\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 200,\n \"_seq_no\" : 3,\n \"_primary_term\" : 4\n }\n }\n ]\n}" - }, - "BulkResponseExample2": { - "summary": "Failed actions", - "description": "If you run `POST /_bulk` with operations that update non-existent documents, the operations cannot complete successfully. The API returns a response with an `errors` property value `true`. The response also includes an error object for any failed operations. The error object contains additional information about the failure, such as the error type and reason.\n", - "value": "{\n \"took\": 486,\n \"errors\": true,\n \"items\": [\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"5\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"6\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"create\": {\n \"_index\": \"index1\",\n \"_id\": \"7\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"status\": 201\n }\n }\n ]\n}" - }, - "BulkResponseExample3": { - "summary": "Filter for failed operations", - "description": "An example response from `POST /_bulk?filter_path=items.*.error`, which returns only information about failed operations.\n", - "value": "{\n \"items\": [\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n }\n ]\n}" - } - } - } - } }, - "cat.aliases-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.aliases.AliasesRecord" + "searchable_snapshots.cache_stats.Shared": { + "type": "object", + "properties": { + "reads": { + "type": "number" + }, + "bytes_read_in_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - }, - "examples": { - "CatAliasesResponseExample1": { - "description": "A successful response from `GET _cat/aliases?format=json&v=true`. This response shows that `alias2` has configured a filter and `alias3` and `alias4` have routing configurations.\n", - "value": "[\n {\n \"alias\": \"alias1\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"-\",\n \"routing.search\": \"-\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias1\",\n \"index\": \"test1\",\n \"filter\": \"*\",\n \"routing.index\": \"-\",\n \"routing.search\": \"-\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias3\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"1\",\n \"routing.search\": \"1\",\n \"is_write_index\": \"true\"\n },\n {\n \"alias\": \"alias4\",\n \"index\": \"test1\",\n \"filter\": \"-\",\n \"routing.index\": \"2\",\n \"routing.search\": \"1,2\",\n \"is_write_index\": \"true\"\n }\n]" + ] + }, + "writes": { + "type": "number" + }, + "bytes_written_in_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - } - } - } - }, - "cat.allocation-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.allocation.AllocationRecord" + ] + }, + "evictions": { + "type": "number" + }, + "num_regions": { + "type": "number" + }, + "size_in_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - }, - "examples": { - "CatAllocationResponseExample1": { - "description": "A successful response from `GET /_cat/allocation?v=true&format=json`. It shows a single shard is allocated to the one node available.\n", - "value": "[\n {\n \"shards\": \"1\",\n \"shards.undesired\": \"0\",\n \"write_load.forecast\": \"0.0\",\n \"disk.indices.forecast\": \"260b\",\n \"disk.indices\": \"260b\",\n \"disk.used\": \"47.3gb\",\n \"disk.avail\": \"43.4gb\",\n \"disk.total\": \"100.7gb\",\n \"disk.percent\": \"46\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"CSUXak2\",\n \"node.role\": \"himrst\"\n }\n]" + ] + }, + "region_size_in_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - } + ] } - } + }, + "required": [ + "reads", + "bytes_read_in_bytes", + "writes", + "bytes_written_in_bytes", + "evictions", + "num_regions", + "size_in_bytes", + "region_size_in_bytes" + ] }, - "cat.component_templates-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.component_templates.ComponentTemplate" - } - }, - "examples": { - "CatComponentTemplatesResponseExample1": { - "description": "A successful response from `GET _cat/component_templates/my-template-*?v=true&s=name&format=json`.\n", - "value": "[\n {\n \"name\": \"my-template-1\",\n \"version\": \"null\",\n \"alias_count\": \"0\",\n \"mapping_count\": \"0\",\n \"settings_count\": \"1\",\n \"metadata_count\": \"0\",\n \"included_in\": \"[my-index-template]\"\n },\n {\n \"name\": \"my-template-2\",\n \"version\": null,\n \"alias_count\": \"0\",\n \"mapping_count\": \"3\",\n \"settings_count\": \"0\",\n \"metadata_count\": \"0\",\n \"included_in\": \"[my-index-template]\"\n }\n]" + "searchable_snapshots.mount.MountedSnapshot": { + "type": "object", + "properties": { + "snapshot": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } - } - } - }, - "cat.count-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.count.CountRecord" + ] + }, + "indices": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" } - }, - "examples": { - "CatCountResponseExample1": { - "summary": "Single data stream or index count", - "description": "A successful response from `GET /_cat/count/my-index-000001?v=true&format=json`. It retrieves the document count for the `my-index-000001` data stream or index.\n", - "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"120\"\n }\n]" - }, - "CatCountResponseExample2": { - "summary": "All data streams and indices count", - "description": "A successful response from `GET /_cat/count?v=true&format=json`. It retrieves the document count for all data streams and indices in the cluster.\n", - "value": "[\n {\n \"epoch\": \"1475868259\",\n \"timestamp\": \"15:24:20\",\n \"count\": \"121\"\n }\n]" + ] + }, + "shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" } - } + ] } - } + }, + "required": [ + "snapshot", + "indices", + "shards" + ] }, - "cat.fielddata-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.fielddata.FielddataRecord" - } - }, - "examples": { - "CatFielddataResponseExample1": { - "summary": "Single field data", - "description": "A successful response from `GET /_cat/fielddata?v=true&fields=body&format=json`. You can specify an individual field in the request body or URL path. This example retrieves heap memory size information for the `body` field.\n", - "value": "[\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"body\",\n \"size\": \"544b\"\n }\n]" - }, - "CatFielddataResponseExample2": { - "summary": "Multiple fields data", - "description": "A successful response from `GET /_cat/fielddata/body,soul?v=true&format=json`. You can specify a comma-separated list of fields in the request body or URL path. This example retrieves heap memory size information for the `body` and `soul` fields. To get information for all fields, run `GET /_cat/fielddata?v=true`.\n", - "value": "[\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"1127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"body\",\n \"size\": \"544b\"\n },\n {\n \"id\": \"Nqk-6inXQq-OxUfOUI8jNQ\",\n \"host\": \"127.0.0.1\",\n \"ip\": \"127.0.0.1\",\n \"node\": \"Nqk-6in\",\n \"field\": \"soul\",\n \"size\": \"480b\"\n }\n]" - } - } - } - } + "searchable_snapshots._types.StatsLevel": { + "type": "string", + "enum": [ + "cluster", + "indices", + "shards" + ] }, - "cat.indices-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.indices.IndicesRecord" - } - }, - "examples": { - "CatIndicesResponseExample1": { - "description": "A successful response from `GET /_cat/indices/my-index-*?v=true&s=index&format=json`.\n", - "value": "[\n {\n \"health\": \"yellow\",\n \"status\": \"open\",\n \"index\": \"my-index-000001\",\n \"uuid\": \"u8FNjxh8Rfy_awN11oDKYQ\",\n \"pri\": \"1\",\n \"rep\": \"1\",\n \"docs.count\": \"1200\",\n \"docs.deleted\": \"0\",\n \"store.size\": \"88.1kb\",\n \"pri.store.size\": \"88.1kb\",\n \"dataset.size\": \"88.1kb\"\n },\n {\n \"health\": \"green\",\n \"status\": \"open\",\n \"index\": \"my-index-000002\",\n \"uuid\": \"nYFWZEO7TUiOjLQXBaYJpA \",\n \"pri\": \"1\",\n \"rep\": \"0\",\n \"docs.count\": \"0\",\n \"docs.deleted\": \"0\",\n \"store.size\": \"260b\",\n \"pri.store.size\": \"260b\",\n \"dataset.size\": \"260b\"\n }\n]" - } - } - } - } + "security._types.GrantType": { + "type": "string", + "enum": [ + "password", + "access_token" + ] }, - "cat.ml_data_frame_analytics-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.ml_data_frame_analytics.DataFrameAnalyticsRecord" + "security._types.UserProfileWithMetadata": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.UserProfile" + }, + { + "type": "object", + "properties": { + "last_synchronized": { + "type": "number" + }, + "_doc": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.UserProfileHitMetadata" + } + ] } }, - "examples": { - "CatDataframeanalyticsResponseExample1": { - "description": "A successful response from `GET _cat/ml/data_frame/analytics?v=true&format=json`.", - "value": "[\n {\n \"id\": \"classifier_job_1\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:09.594Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_2\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:14.479Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_3\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:16.928Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_4\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:19.127Z\",\n \"state\": \"stopped\"\n },\n {\n \"id\": \"classifier_job_5\",\n \"type\": \"classification\",\n \"create_time\": \"2020-02-12T11:49:21.349Z\",\n \"state\": \"stopped\"\n }\n]" - } - } + "required": [ + "last_synchronized", + "_doc" + ] } - } + ] }, - "cat.ml_datafeeds-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.ml_datafeeds.DatafeedsRecord" - } - }, - "examples": { - "CatDatafeedsResponseExample1": { - "description": "A successful response from `GET _cat/ml/datafeeds?v=true&format=json`.", - "value": "[\n {\n \"id\": \"datafeed-high_sum_total_sales\",\n \"state\": \"stopped\",\n \"buckets.count\": \"743\",\n \"search.count\": \"7\"\n },\n {\n \"id\": \"datafeed-low_request_rate\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1457\",\n \"search.count\": \"3\"\n },\n {\n \"id\": \"datafeed-response_code_rates\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1460\",\n \"search.count\": \"18\"\n },\n {\n \"id\": \"datafeed-url_scanning\",\n \"state\": \"stopped\",\n \"buckets.count\": \"1460\",\n \"search.count\": \"18\"\n }\n]" + "security._types.UserProfileHitMetadata": { + "type": "object", + "properties": { + "_primary_term": { + "type": "number" + }, + "_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" } - } + ] } - } + }, + "required": [ + "_primary_term", + "_seq_no" + ] }, - "cat.ml_jobs-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.ml_jobs.JobsRecord" + "security._types.UserProfile": { + "type": "object", + "properties": { + "uid": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.UserProfileId" } - }, - "examples": { - "CatJobsResponseExample1": { - "description": "A successful response from `GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json`.", - "value": "[\n {\n \"id\": \"high_sum_total_sales\",\n \"s\": \"closed\",\n \"dpr\": \"14022\",\n \"mb\": \"1.5mb\"\n },\n {\n \"id\": \"low_request_rate\",\n \"s\": \"closed\",\n \"dpr\": \"1216\",\n \"mb\": \"40.5kb\"\n },\n {\n \"id\": \"response_code_rates\",\n \"s\": \"closed\",\n \"dpr\": \"28146\",\n \"mb\": \"132.7kb\"\n },\n {\n \"id\": \"url_scanning\",\n \"s\": \"closed\",\n \"dpr\": \"28146\",\n \"mb\": \"501.6kb\"\n }\n]" + ] + }, + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.UserProfileUser" } + ] + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "object" } - } - } - }, - "cat.ml_trained_models-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.ml_trained_models.TrainedModelsRecord" - } - }, - "examples": { - "CatTrainedModelsResponseExample1": { - "description": "A successful response from `GET _cat/ml/trained_models?v=true&format=json`.", - "value": "[\n {\n \"id\": \"ddddd-1580216177138\",\n \"heap_size\": \"0b\",\n \"operations\": \"196\",\n \"create_time\": \"2025-03-25T00:01:38.662Z\",\n \"type\": \"pytorch\",\n \"ingest.pipelines\": \"0\",\n \"data_frame.id\": \"__none__\"\n },\n {\n \"id\": \"lang_ident_model_1\",\n \"heap_size\": \"1mb\",\n \"operations\": \"39629\",\n \"create_time\": \"2019-12-05T12:28:34.594Z\",\n \"type\": \"lang_ident\",\n \"ingest.pipelines\": \"0\",\n \"data_frame.id\": \"__none__\"\n }\n]" - } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "object" } + }, + "enabled": { + "type": "boolean" } - } + }, + "required": [ + "uid", + "user", + "data", + "labels" + ] }, - "cat.recovery-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.recovery.RecoveryRecord" - } - }, - "examples": { - "CatRecoveryResponseExample1": { - "summary": "No ongoing recoveries", - "description": "A successful response from `GET _cat/recovery?v=true&format=json`. In this example, the source and target nodes are the same because the recovery type is `store`, meaning they were read from local storage on node start.\n", - "value": "[\n {\n \"index\": \"my-index-000001 \",\n \"shard\": \"0\",\n \"time\": \"13ms\",\n \"type\": \"store\",\n \"stage\": \"done\",\n \"source_host\": \"n/a\",\n \"source_node\": \"n/a\",\n \"target_host\": \"127.0.0.1\",\n \"target_node\": \"node-0\",\n \"repository\": \"n/a\",\n \"snapshot\": \"n/a\",\n \"files\": \"0\",\n \"files_recovered\": \"0\",\n \"files_percent\": \"100.0%\",\n \"files_total\": \"13\",\n \"bytes\": \"0b\",\n \"bytes_recovered\": \"0b\",\n \"bytes_percent\": \"100.0%\",\n \"bytes_total\": \"9928b\",\n \"translog_ops\": \"0\",\n \"translog_ops_recovered\": \"0\",\n \"translog_ops_percent\": \"100.0%\"\n }\n]" + "security._types.UserProfileId": { + "type": "string" + }, + "security._types.UserProfileUser": { + "type": "object", + "properties": { + "email": { + "oneOf": [ + { + "type": "string" }, - "CatRecoveryResponseExample2": { - "summary": "A live shard recovery", - "description": "A successful response from `GET _cat/recovery?v=true&h=i,s,t,ty,st,shost,thost,f,fp,b,bp&format=json`. You can retrieve information about an ongoing recovery for example when you increase the replica count of an index and bring another node online to host the replicas. In this example, the recovery type is `peer`, meaning the shard recovered from another node. The `files` and `bytes` are real-time measurements.\n", - "value": "[\n {\n \"i\": \"my-index-000001\",\n \"s\": \"0\",\n \"t\": \"1252ms\",\n \"ty\": \"peer\",\n \"st\": \"done\",\n \"shost\": \"192.168.1.1\",\n \"thost\": \"192.168.1.1\",\n \"f\": \"0\",\n \"fp\": \"100.0%\",\n \"b\": \"0b\",\n \"bp\": \"100.0%\",\n }\n]" + { + "nullable": true, + "type": "string" + } + ] + }, + "full_name": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Name" }, - "CatRecoveryResponseExample3": { - "summary": "A snapshot recovery", - "description": "A successful response from `GET _cat/recovery?v=true&h=i,s,t,ty,st,rep,snap,f,fp,b,bp&format=json`. You can restore backups of an index using the snapshot and restore API. You can use the cat recovery API to get information about a snapshot recovery.\n", - "value": "[\n {\n \"i\": \"my-index-000001\",\n \"s\": \"0\",\n \"t\": \"1978ms\",\n \"ty\": \"snapshot\",\n \"st\": \"done\",\n \"rep\": \"my-repo\",\n \"snap\": \"snap-1\",\n \"f\": \"79\",\n \"fp\": \"8.0%\",\n \"b\": \"12086\",\n \"bp\": \"9.0%\"\n }\n]" + { + "nullable": true, + "type": "string" } - } - } - } - }, - "cat.segments-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.segments.SegmentsRecord" + ] + }, + "realm_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - }, - "examples": { - "CatSegmentsResponseExample1": { - "description": "A successful response from `GET /_cat/segments?v=true&format=json`.\n", - "value": "[\n {\n \"index\": \"test\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"ip\": \"127.0.0.1\",\n \"segment\": \"_0\",\n \"generation\": \"0\",\n \"docs.count\": \"1\",\n \"docs.deleted\": \"0\",\n \"size\": \"3kb\",\n \"size.memory\": \"0\",\n \"committed\": \"false\",\n \"searchable\": \"true\",\n \"version\": \"9.12.0\",\n \"compound\": \"true\"\n },\n {\n \"index\": \"test1\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"ip\": \"127.0.0.1\",\n \"segment\": \"_0\",\n \"generation\": \"0\",\n \"docs.count\": \"1\",\n \"docs.deleted\": \"0\",\n \"size\": \"3kb\",\n \"size.memory\": \"0\",\n \"committed\": \"false\",\n \"searchable\": \"true\",\n \"version\": \"9.12.0\",\n \"compound\": \"true\"\n }\n]" + ] + }, + "realm_domain": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } + ] + }, + "roles": { + "type": "array", + "items": { + "type": "string" } - } - } - }, - "cat.shards-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.shards.ShardsRecord" - } - }, - "examples": { - "CatShardsResponseExample1": { - "summary": "A single data stream or index", - "description": "A successful response from `GET _cat/shards?format=json`.\n", - "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n }\n]" - }, - "CatShardsResponseExample2": { - "summary": "A wildcard pattern", - "description": "A successful response from `GET _cat/shards/my-index-*?format=json`. It returns information for any data streams or indices beginning with `my-index-`.\n", - "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n }\n]" - }, - "CatShardsResponseExample3": { - "summary": "A relocating shard", - "description": "A successful response from `GET _cat/shards?format=json`. The `RELOCATING` value in the `state` column indicates the index shard is relocating.\n", - "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"RELOCATING\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA -> -> 192.168.56.30 bGG90GE\"\n }\n]" - }, - "CatShardsResponseExample4": { - "summary": "Shard states", - "description": "A successful response from `GET _cat/shards?format=json`. Before a shard is available for use, it goes through an `INITIALIZING` state. You can use the cat shards API to see which shards are initializing.\n", - "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"docs\": \"3014\",\n \"store\": \"31.1mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.10\",\n \"node\": \"H5dfFeA\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"INITIALIZING\",\n \"docs\": \"0\",\n \"store\": \"14.3mb\",\n \"dataset\": \"249b\",\n \"ip\": \"192.168.56.30\",\n \"node\": \"bGG90GE\"\n }\n]" - }, - "CatShardsResponseExample5": { - "summary": "Reasons for unassigned shards", - "description": "A successful response from `GET _cat/shards?h=index,shard,prirep,state,unassigned.reason&format=json`. It includes the `unassigned.reason` column, which indicates why a shard is unassigned.\n", - "value": "[\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"p\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.10 H5dfFeA\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.30 bGG90GE\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"STARTED\",\n \"unassigned.reason\": \"3014 31.1mb 192.168.56.20 I8hydUG\"\n },\n {\n \"index\": \"my-index-000001\",\n \"shard\": \"0\",\n \"prirep\": \"r\",\n \"state\": \"UNASSIGNED\",\n \"unassigned.reason\": \"ALLOCATION_FAILED\"\n }\n]" + }, + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" } - } + ] } - } + }, + "required": [ + "realm_name", + "roles", + "username" + ] }, - "cat.snapshots-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.snapshots.SnapshotsRecord" - } - }, - "examples": { - "CatSnapshotsResponseExample1": { - "description": "A successful response from `GET /_cat/snapshots/repo1?v=true&s=id&format=json`.\n", - "value": "[\n {\n \"id\": \"snap1\",\n \"repository\": \"repo1\",\n \"status\": \"FAILED\",\n \"start_epoch\": \"1445616705\",\n \"start_time\": \"18:11:45\",\n \"end_epoch\": \"1445616978\",\n \"end_time\": \"18:16:18\",\n \"duration\": \"4.6m\",\n \"indices\": \"1\",\n \"successful_shards\": \"4\",\n \"failed_shards\": \"1\",\n \"total_shards\": \"5\"\n },\n {\n \"id\": \"snap2\",\n \"repository\": \"repo1\",\n \"status\": \"SUCCESS\",\n \"start_epoch\": \"1445634298\",\n \"start_time\": \"23:04:58\",\n \"end_epoch\": \"1445634672\",\n \"end_time\": \"23:11:12\",\n \"duration\": \"6.2m\",\n \"indices\": \"2\",\n \"successful_shards\": \"10\",\n \"failed_shards\": \"0\",\n \"total_shards\": \"10\"\n }\n]" + "security.authenticate.AuthenticateApiKey": { + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - } - } - } - }, - "cat.templates-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.templates.TemplatesRecord" + ] + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - }, - "examples": { - "CatTemplatesResponseExample1": { - "description": "A successful response from `GET _cat/templates/my-template-*?v=true&s=name&format=json`.\n", - "value": "[\n {\n \"name\": \"my-template-0\",\n \"index_patterns\": \"[te*]\",\n \"order\": \"500\",\n \"version\": null,\n \"composed_of\": \"[]\"\n },\n {\n \"name\": \"my-template-1\",\n \"index_patterns\": \"[tea*]\",\n \"order\": \"501\",\n \"version\": null,\n \"composed_of\": \"[]\"\n },\n {\n \"name\": \"my-template-2\",\n \"index_patterns\": \"[teak*]\",\n \"order\": \"502\",\n \"version\": \"7\",\n \"composed_of\": \"[]\"\n }\n]" + ] + }, + "managed_by": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.ApiKeyManagedBy" } - } + ] + }, + "internal": { + "type": "boolean" } - } + }, + "required": [ + "id", + "managed_by" + ] }, - "cat.thread_pool-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.thread_pool.ThreadPoolRecord" - } - }, - "examples": { - "CatThreadPoolResponseExample1": { - "summary": "Default columns", - "description": "A successful response from `GET /_cat/thread_pool?format=json`.\n", - "value": "[\n {\n \"node_name\": \"node-0\",\n \"name\": \"analyze\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"fetch_shard_started\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"fetch_shard_store\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"flush\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n },\n {\n \"node_name\": \"node-0\",\n \"name\": \"write\",\n \"active\": \"0\",\n \"queue\": \"0\",\n \"rejected\": \"0\"\n }\n]" - }, - "CatThreadPoolResponseExample2": { - "summary": "Explicit columns", - "description": "A successful response from `GET /_cat/thread_pool/generic?v=true&h=id,name,active,rejected,completed&format=json`. It returns the `id`, `name`, `active`, `rejected`, and `completed` columns. It also limits returned information to the generic thread pool.\n", - "value": "[\n {\n \"id\": \"0EWUhXeBQtaVGlexUeVwMg\",\n \"name\": \"generic\",\n \"active\": \"0\",\n \"rejected\": \"0\",\n \"completed\": \"70\"\n }\n]" - } - } - } - } + "security._types.ApiKeyManagedBy": { + "type": "string", + "enum": [ + "cloud", + "elasticsearch" + ] }, - "cat.transforms-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cat.transforms.TransformsRecord" - } - }, - "examples": { - "CatTransformsResponseExample1": { - "description": "A successful response from `GET /_cat/transforms?v=true&format=json`.", - "value": "[\n {\n \"id\" : \"ecommerce_transform\",\n \"state\" : \"started\",\n \"checkpoint\" : \"1\",\n \"documents_processed\" : \"705\",\n \"checkpoint_progress\" : \"100.00\",\n \"changes_last_detection_time\" : null\n }\n]" + "security._types.RealmInfo": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } + ] + }, + "type": { + "type": "string" } - } + }, + "required": [ + "name", + "type" + ] }, - "ccr.get_auto_follow_pattern-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ccr.get_auto_follow_pattern.AutoFollowPattern" - } - } - }, - "required": [ - "patterns" - ] - }, - "examples": { - "GetAutoFollowPatternResponseExample1": { - "description": "A successful response from `GET /_ccr/auto_follow/my_auto_follow_pattern`, which gets auto-follow patterns.", - "value": "{\n \"patterns\": [\n {\n \"name\": \"my_auto_follow_pattern\",\n \"pattern\": {\n \"active\": true,\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"leader_index_exclusion_patterns\":\n [\n \"leader_index_001\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\"\n }\n }\n ]\n}" + "security.authenticate.Token": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } + ] + }, + "type": { + "x-state": "Generally available; Added in 7.14.0", + "type": "string" } - } + }, + "required": [ + "name" + ] }, - "clear_scroll-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "succeeded": { - "description": "If `true`, the request succeeded.\nThis does not indicate whether any scrolling search requests were cleared.", - "type": "boolean" - }, - "num_freed": { - "description": "The number of scrolling search requests cleared.", - "type": "number" - } - }, - "required": [ - "succeeded", - "num_freed" - ] + "security._types.BulkError": { + "type": "object", + "properties": { + "count": { + "description": "The number of errors", + "type": "number" + }, + "details": { + "description": "Details about the errors, keyed by role name", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ErrorCause" } } - } + }, + "required": [ + "count", + "details" + ] }, - "cluster.allocation_explain-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "allocate_explanation": { - "type": "string" - }, - "allocation_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "allocation_delay_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "can_allocate": { - "$ref": "#/components/schemas/cluster.allocation_explain.Decision" - }, - "can_move_to_other_node": { - "$ref": "#/components/schemas/cluster.allocation_explain.Decision" - }, - "can_rebalance_cluster": { - "$ref": "#/components/schemas/cluster.allocation_explain.Decision" - }, - "can_rebalance_cluster_decisions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.allocation_explain.AllocationDecision" - } - }, - "can_rebalance_to_other_node": { - "$ref": "#/components/schemas/cluster.allocation_explain.Decision" - }, - "can_remain_decisions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.allocation_explain.AllocationDecision" - } - }, - "can_remain_on_current_node": { - "$ref": "#/components/schemas/cluster.allocation_explain.Decision" - }, - "cluster_info": { - "$ref": "#/components/schemas/cluster.allocation_explain.ClusterInfo" - }, - "configured_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "configured_delay_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "current_node": { - "$ref": "#/components/schemas/cluster.allocation_explain.CurrentNode" - }, - "current_state": { - "type": "string" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "move_explanation": { - "type": "string" - }, - "node_allocation_decisions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster.allocation_explain.NodeAllocationExplanation" - } - }, - "primary": { - "type": "boolean" - }, - "rebalance_explanation": { - "type": "string" - }, - "remaining_delay": { - "$ref": "#/components/schemas/_types.Duration" - }, - "remaining_delay_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "shard": { - "type": "number" - }, - "unassigned_info": { - "$ref": "#/components/schemas/cluster.allocation_explain.UnassignedInformation" - }, - "note": { - "type": "string" - } - }, - "required": [ - "current_state", - "index", - "primary", - "shard" - ] - }, - "examples": { - "ClusterAllocationExplainResponseExample1": { - "summary": "Conflicting settings", - "description": "An example of an allocation explanation for an unassigned primary shard. In this example, a newly created index has an index setting that requires that it only be allocated to a node named `nonexistent_node`, which does not exist, so the index is unable to allocate.\n", - "value": "{\n \"index\" : \"my-index-000001\",\n \"shard\" : 0,\n \"primary\" : true,\n \"current_state\" : \"unassigned\",\n \"unassigned_info\" : {\n \"reason\" : \"INDEX_CREATED\",\n \"at\" : \"2017-01-04T18:08:16.600Z\",\n \"last_allocation_status\" : \"no\"\n },\n \"can_allocate\" : \"no\",\n \"allocate_explanation\" : \"Elasticsearch isn't allowed to allocate this shard to any of the nodes in the cluster. Choose a node to which you expect this shard to be allocated, find this node in the node-by-node explanation, and address the reasons which prevent Elasticsearch from allocating this shard there.\",\n \"node_allocation_decisions\" : [\n {\n \"node_id\" : \"8qt2rY-pT6KNZB3-hGfLnw\",\n \"node_name\" : \"node-0\",\n \"transport_address\" : \"127.0.0.1:9401\",\n \"roles\" : [\"data\", \"data_cold\", \"data_content\", \"data_frozen\", \"data_hot\", \"data_warm\", \"ingest\", \"master\", \"ml\", \"remote_cluster_client\", \"transform\"],\n \"node_attributes\" : {},\n \"node_decision\" : \"no\",\n \"weight_ranking\" : 1,\n \"deciders\" : [\n {\n \"decider\" : \"filter\",\n \"decision\" : \"NO\",\n \"explanation\" : \"node does not match index setting [index.routing.allocation.include] filters [_name:\\\"nonexistent_node\\\"]\"\n }\n ]\n }\n ]\n}" - }, - "ClusterAllocationExplainResponseExample2": { - "summary": "Maximum retries", - "description": "An example of an allocation explanation for an unassigned primary shard that has reached the maximum number of allocation retry attempts. After the maximum number of retries is reached, Elasticsearch stops attempting to allocate the shard in order to prevent infinite retries which may impact cluster performance.\n", - "value": "{\n \"index\" : \"my-index-000001\",\n \"shard\" : 0,\n \"primary\" : true,\n \"current_state\" : \"unassigned\",\n \"unassigned_info\" : {\n \"at\" : \"2017-01-04T18:03:28.464Z\",\n \"failed shard on node [mEKjwwzLT1yJVb8UxT6anw]: failed recovery, failure RecoveryFailedException\",\n \"reason\": \"ALLOCATION_FAILED\",\n \"failed_allocation_attempts\": 5,\n \"last_allocation_status\": \"no\",\n },\n \"can_allocate\": \"no\",\n \"allocate_explanation\": \"cannot allocate because allocation is not permitted to any of the nodes\",\n \"node_allocation_decisions\" : [\n {\n \"node_id\" : \"3sULLVJrRneSg0EfBB-2Ew\",\n \"node_name\" : \"node_t0\",\n \"transport_address\" : \"127.0.0.1:9400\",\n \"roles\" : [\"data_content\", \"data_hot\"],\n \"node_decision\" : \"no\",\n \"store\" : {\n \"matching_size\" : \"4.2kb\",\n \"matching_size_in_bytes\" : 4325\n },\n \"deciders\" : [\n {\n \"decider\": \"max_retry\",\n \"decision\" : \"NO\",\n \"explanation\": \"shard has exceeded the maximum number of retries [5] on failed allocation attempts - manually call [POST /_cluster/reroute?retry_failed] to retry, [unassigned_info[[reason=ALLOCATION_FAILED], at[2024-07-30T21:04:12.166Z], failed_attempts[5], failed_nodes[[mEKjwwzLT1yJVb8UxT6anw]], delayed=false, details[failed shard on node [mEKjwwzLT1yJVb8UxT6anw]: failed recovery, failure RecoveryFailedException], allocation_status[deciders_no]]]\"\n }\n ]\n }\n ]\n}" - } + "security._types.RoleDescriptor": { + "type": "object", + "properties": { + "cluster": { + "description": "A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" } - } - } - }, - "cluster.get_component_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "component_templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cluster._types.ComponentTemplate" - } + }, + "indices": { + "description": "A list of indices permissions entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndicesPrivileges" + } + }, + "remote_indices": { + "description": "A list of indices permissions for remote clusters.", + "x-state": "Generally available; Added in 8.14.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" + } + }, + "remote_cluster": { + "description": "A list of cluster permissions for remote clusters.\nNOTE: This is limited a subset of the cluster permissions.", + "x-state": "Generally available; Added in 8.15.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" + } + }, + "global": { + "description": "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.", + "x-state": "Generally available", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.GlobalPrivilege" } }, - "required": [ - "component_templates" - ] - } - } - } - }, - "cluster.health-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/cluster.health.HealthResponseBody" - }, - "examples": { - "ClusterHealthResponseExample1": { - "description": "A successful response from `GET _cluster/health`. It is the health status of a quiet single node cluster with a single index with one shard and one replica.\n", - "value": "{\n \"cluster_name\" : \"testcluster\",\n \"status\" : \"yellow\",\n \"timed_out\" : false,\n \"number_of_nodes\" : 1,\n \"number_of_data_nodes\" : 1,\n \"active_primary_shards\" : 1,\n \"active_shards\" : 1,\n \"relocating_shards\" : 0,\n \"initializing_shards\" : 0,\n \"unassigned_shards\" : 1,\n \"delayed_unassigned_shards\": 0,\n \"number_of_pending_tasks\" : 0,\n \"number_of_in_flight_fetch\": 0,\n \"task_max_waiting_in_queue_millis\": 0,\n \"active_shards_percent_as_number\": 50.0\n}" + { + "$ref": "#/components/schemas/security._types.GlobalPrivilege" } + ] + }, + "applications": { + "description": "A list of application privilege entries", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApplicationPrivileges" } - } - } - }, - "cluster.put_component_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "metadata": { + "description": "Optional meta-data. Within the metadata object, keys that begin with `_` are reserved for system usage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "run_as": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users" + }, + "description": "A list of users that the API keys can impersonate.\nNOTE: In Elastic Cloud Serverless, the run-as feature is disabled.\nFor API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", + "type": "array", + "items": { + "type": "string" } - } - } - }, - "cluster.state-200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "description": { + "description": "Optional description of the role descriptor", + "type": "string" + }, + "restriction": { + "description": "Restriction for when the role descriptor is allowed to be effective.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.Restriction" + } + ] + }, + "transient_metadata": { + "type": "object", + "additionalProperties": { "type": "object" } } } }, - "cluster.stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/cluster.stats.StatsResponseBase" - } + "security._types.ClusterPrivilege": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "cancel_task", + "create_snapshot", + "cross_cluster_replication", + "cross_cluster_search", + "delegate_pki", + "grant_api_key", + "manage", + "manage_api_key", + "manage_autoscaling", + "manage_behavioral_analytics", + "manage_ccr", + "manage_data_frame_transforms", + "manage_data_stream_global_retention", + "manage_enrich", + "manage_esql", + "manage_ilm", + "manage_index_templates", + "manage_inference", + "manage_ingest_pipelines", + "manage_logstash_pipelines", + "manage_ml", + "manage_oidc", + "manage_own_api_key", + "manage_pipeline", + "manage_rollup", + "manage_saml", + "manage_search_application", + "manage_search_query_rules", + "manage_search_synonyms", + "manage_security", + "manage_service_account", + "manage_slm", + "manage_token", + "manage_transform", + "manage_user_profile", + "manage_watcher", + "monitor", + "monitor_data_frame_transforms", + "monitor_data_stream_global_retention", + "monitor_enrich", + "monitor_esql", + "monitor_inference", + "monitor_ml", + "monitor_rollup", + "monitor_snapshot", + "monitor_stats", + "monitor_text_structure", + "monitor_transform", + "monitor_watcher", + "none", + "post_behavioral_analytics_event", + "read_ccr", + "read_fleet_secrets", + "read_ilm", + "read_pipeline", + "read_security", + "read_slm", + "transport_client", + "write_connector_secrets", + "write_fleet_secrets" + ] + }, + { + "type": "string" } - } + ] }, - "connector.put-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types.Result" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "required": [ - "result", - "id" - ] + "security._types.IndicesPrivileges": { + "type": "object", + "properties": { + "field_security": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level" }, - "examples": { - "ConnectorPutResponseExample1": { - "value": "{\n \"result\": \"created\",\n \"id\": \"my-connector\"\n}" + "description": "The document fields that the owners of the role have read access to.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.FieldSecurity" } - } - } - } - }, - "count-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - } + ] + }, + "names": { + "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" }, - "required": [ - "count", - "_shards" - ] - }, - "examples": { - "CountResponseExample1": { - "description": "A successful response from `GET /my-index-000001/_count?q=user:kimchy`.", - "value": "{\n \"count\": 1,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } } + ] + }, + "privileges": { + "description": "The index level privileges that owners of the role have on the specified indices.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndexPrivilege" } + }, + "query": { + "description": "A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" + } + ] + }, + "allow_restricted_indices": { + "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "default": false, + "x-state": "Generally available", + "type": "boolean" } - } + }, + "required": [ + "names", + "privileges" + ] }, - "create-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.WriteResponseBase" - } + "security._types.FieldSecurity": { + "type": "object", + "properties": { + "except": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "grant": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] } } }, - "enrich.get_policy-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "policies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/enrich._types.Summary" - } - } - }, - "required": [ - "policies" - ] - } + "security._types.IndexPrivilege": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "auto_configure", + "create", + "create_doc", + "create_index", + "cross_cluster_replication", + "cross_cluster_replication_internal", + "delete", + "delete_index", + "index", + "maintenance", + "manage", + "manage_data_stream_lifecycle", + "manage_follow_index", + "manage_ilm", + "manage_leader_index", + "monitor", + "none", + "read", + "read_cross_cluster", + "view_index_metadata", + "write" + ] + }, + { + "type": "string" } - } + ] }, - "eql.search-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/eql._types.EqlSearchResponseBase" - }, - "examples": { - "EqlSearchResponseExample2": { - "summary": "A successful response for performing search with an EQL query.", - "description": "", - "value": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 6,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"sequences\": [\n {\n \"join_keys\": [\n 2012\n ],\n \"events\": [\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"AtOJ4UjUBAAx3XR5kcCM\",\n \"_source\": {\n \"@timestamp\": \"2099-12-06T11:04:07.000Z\",\n \"event\": {\n \"category\": \"file\",\n \"id\": \"dGCHwoeS\",\n \"sequence\": 2\n },\n \"file\": {\n \"accessed\": \"2099-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"cmd.exe\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n }\n },\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"OQmfCaduce8zoHT93o4H\",\n \"_source\": {\n \"@timestamp\": \"2099-12-07T11:07:09.000Z\",\n \"event\": {\n \"category\": \"process\",\n \"id\": \"aR3NWVOs\",\n \"sequence\": 4\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"regsvr32.exe\",\n \"command_line\": \"regsvr32.exe /s /u /i:https://...RegSvr32.sct scrobj.dll\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\"\n }\n }\n }\n ]\n }\n ]\n }\n}" - } - } + "security._types.IndicesPrivilegesQuery": { + "description": "While creating or updating a role you can provide either a JSON structure or a string to the API.\nHowever, the response provided by Elasticsearch will only be string with a json-as-text content.\n\nSince this is embedded in `IndicesPrivileges`, the same structure is used for clarity in both contexts.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + { + "$ref": "#/components/schemas/security._types.RoleTemplateQuery" } - } + ] }, - "explain-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "matched": { - "type": "boolean" - }, - "explanation": { - "$ref": "#/components/schemas/_global.explain.ExplanationDetail" - }, - "get": { - "$ref": "#/components/schemas/_types.InlineGet" - } - }, - "required": [ - "_index", - "_id", - "matched" - ] + "security._types.RoleTemplateQuery": { + "type": "object", + "properties": { + "template": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level#templating-role-query" }, - "examples": { - "ExplainResponseExample1": { - "description": "A successful response from `GET /my-index-000001/_explain/0`.", - "value": "{\n \"_index\":\"my-index-000001\",\n \"_id\":\"0\",\n \"matched\":true,\n \"explanation\":{\n \"value\":1.6943598,\n \"description\":\"weight(message:elasticsearch in 0) [PerFieldSimilarity], result of:\",\n \"details\":[\n {\n \"value\":1.6943598,\n \"description\":\"score(freq=1.0), computed as boost * idf * tf from:\",\n \"details\":[\n {\n \"value\":2.2,\n \"description\":\"boost\",\n \"details\":[]\n },\n {\n \"value\":1.3862944,\n \"description\":\"idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\",\n \"details\":[\n {\n \"value\":1,\n \"description\":\"n, number of documents containing term\",\n \"details\":[]\n },\n {\n \"value\":5,\n \"description\":\"N, total number of documents with field\",\n \"details\":[]\n }\n ]\n },\n {\n \"value\":0.5555556,\n \"description\":\"tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\",\n \"details\":[\n {\n \"value\":1.0,\n \"description\":\"freq, occurrences of term within document\",\n \"details\":[]\n },\n {\n \"value\":1.2,\n \"description\":\"k1, term saturation parameter\",\n \"details\":[]\n },\n {\n \"value\":0.75,\n \"description\":\"b, length normalization parameter\",\n \"details\":[]\n },\n {\n \"value\":3.0,\n \"description\":\"dl, length of field\",\n \"details\":[]\n },\n {\n \"value\":5.4,\n \"description\":\"avgdl, average length of field\",\n \"details\":[]\n }\n ]\n }\n ]\n }\n ]\n }\n}" + "description": "When you create a role, you can specify a query that defines the document level security permissions. You can optionally\nuse Mustache templates in the role query to insert the username of the current authenticated user into the role.\nLike other places in Elasticsearch that support templating or scripting, you can specify inline, stored, or file-based\ntemplates and define custom parameters. You access the details for the current authenticated user through the _user parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleTemplateScript" } - } + ] } } }, - "field_caps-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "indices": { - "$ref": "#/components/schemas/_types.Indices" - }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.field_caps.FieldCapability" - } - } - } - }, - "required": [ - "indices", - "fields" - ] - }, - "examples": { - "FieldCapabilitiesResponseExample1": { - "summary": "Get two fields", - "description": "A successful response from `GET _field_caps?fields=rating,title`. The field `rating` is defined as a long in `index1` and `index2` and as a `keyword` in `index3` and `index4`. The field `rating` is not aggregatable in `index1`. The field `rating` is not searchable in `index4`. The field `title` is defined as text in all indices.\n", - "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" - }, - "FieldCapabilitiesResponseExample2": { - "summary": "Get unmapped fields", - "description": "A successful response from `GET _field_caps?fields=rating,title&include_unmapped`. The response contains an entry for each field that is present in some indices but not all. For example, the `rating` and `title` fields are unmapped in `index5`.\n", - "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + "security._types.RoleTemplateScript": { + "type": "object", + "properties": { + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleTemplateInlineQuery" } + ] + }, + "id": { + "description": "The `id` for a stored script.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "params": { + "description": "Specifies any named parameters that are passed into the script as variables.\nUse parameters instead of hard-coded values to decrease compile time.", + "type": "object", + "additionalProperties": { + "type": "object" } - } - } - }, - "fleet.msearch-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.msearch.ResponseItem" - } - } - }, - "required": [ - "docs" - ] - } - } - } - }, - "fleet.search-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "took": { - "type": "number" - }, - "timed_out": { - "type": "boolean" - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "hits": { - "$ref": "#/components/schemas/_global.search._types.HitsMetadata" - }, - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.Aggregate" - } - }, - "_clusters": { - "$ref": "#/components/schemas/_types.ClusterStatistics" - }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "max_score": { - "type": "number" - }, - "num_reduce_phases": { - "type": "number" - }, - "profile": { - "$ref": "#/components/schemas/_global.search._types.Profile" - }, - "pit_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_scroll_id": { - "$ref": "#/components/schemas/_types.ScrollId" - }, - "suggest": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Suggest" - } - } - }, - "terminated_early": { - "type": "boolean" - } - }, - "required": [ - "took", - "timed_out", - "_shards", - "hits" - ] - } - } - } - }, - "graph.explore-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "connections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/graph._types.Connection" - } - }, - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.ShardFailure" - } - }, - "timed_out": { - "type": "boolean" - }, - "took": { - "type": "number" - }, - "vertices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/graph._types.Vertex" - } - } - }, - "required": [ - "connections", - "failures", - "timed_out", - "took", - "vertices" - ] + }, + "lang": { + "description": "Specifies the language the script is written in.", + "default": "painless", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptLanguage" + } + ] + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" } } } }, - "health_report-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "cluster_name": { - "type": "string" - }, - "indicators": { - "$ref": "#/components/schemas/_global.health_report.Indicators" - }, - "status": { - "$ref": "#/components/schemas/_global.health_report.IndicatorHealthStatus" - } - }, - "required": [ - "cluster_name", - "indicators" - ] - } + "security._types.RoleTemplateInlineQuery": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" } - } + ] }, - "ilm.get_lifecycle-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ilm.get_lifecycle.Lifecycle" + "security._types.RemoteIndicesPrivileges": { + "description": "The subset of index level privileges that can be defined for remote clusters.", + "type": "object", + "properties": { + "clusters": { + "description": "A list of cluster aliases to which the permissions in this entry apply.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Names" } + ] + }, + "field_security": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level" }, - "examples": { - "GetLifecycleResponseExample1": { - "description": "A successful response when retrieving a lifecycle policy.", - "value": "{\n \"my_policy\": {\n \"version\": 1,\n \"modified_date\": 82392349,\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {\n \"delete_searchable_snapshot\": true\n }\n }\n }\n }\n },\n \"in_use_by\" : {\n \"indices\" : [],\n \"data_streams\" : [],\n \"composable_templates\" : []\n }\n }\n}" + "description": "The document fields that the owners of the role have read access to.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.FieldSecurity" } - } - } - } - }, - "index-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.WriteResponseBase" - }, - "examples": { - "IndexResponseExample1": { - "summary": "Automate document IDs", - "description": "A successful response from `POST my-index-000001/_doc/`, which contains an automated document ID.", - "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"W0tpsmIBdwcYyG50zbta\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"result\": \"created\"\n}" + ] + }, + "names": { + "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" }, - "IndexResponseExample2": { - "summary": "Define document IDs", - "description": "A successful response from `PUT my-index-000001/_doc/1`.", - "value": "{\n \"_shards\": {\n \"total\": 2,\n \"failed\": 0,\n \"successful\": 2\n },\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"result\": \"created\"\n}" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } } + ] + }, + "privileges": { + "description": "The index level privileges that owners of the role have on the specified indices.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndexPrivilege" } + }, + "query": { + "description": "A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" + } + ] + }, + "allow_restricted_indices": { + "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "default": false, + "x-state": "Generally available", + "type": "boolean" } - } + }, + "required": [ + "clusters", + "names", + "privileges" + ] }, - "indices.analyze-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "detail": { - "$ref": "#/components/schemas/indices.analyze.AnalyzeDetail" - }, - "tokens": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.analyze.AnalyzeToken" - } - } - } - }, - "examples": { - "indicesAnalyzeResponseExample7": { - "description": "A successful response for an analysis with `explain` set to `true`.", - "value": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": {\n \"name\": \"standard\",\n \"tokens\": [\n {\n \"token\": \"detailed\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n },\n \"tokenfilters\": [\n {\n \"name\": \"snowball\",\n \"tokens\": [\n {\n \"token\": \"detail\",\n \"start_offset\": 0,\n \"end_offset\": 8,\n \"type\": \"\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"output\",\n \"start_offset\": 9,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1,\n \"keyword\": false\n }\n ]\n }\n ]\n }\n}" + "security._types.RemoteClusterPrivileges": { + "description": "The subset of cluster level privileges that can be defined for remote clusters.", + "type": "object", + "properties": { + "clusters": { + "description": "A list of cluster aliases to which the permissions in this entry apply.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Names" } + ] + }, + "privileges": { + "description": "The cluster level privileges that owners of the role have on the remote cluster.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteClusterPrivilege" } } - } + }, + "required": [ + "clusters", + "privileges" + ] }, - "indices.clear_cache-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" - } + "security._types.RemoteClusterPrivilege": { + "type": "string", + "enum": [ + "monitor_enrich", + "monitor_stats" + ] + }, + "security._types.GlobalPrivilege": { + "type": "object", + "properties": { + "application": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.ApplicationGlobalUserPrivileges" + } + ] } - } + }, + "required": [ + "application" + ] }, - "indices.clone-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "shards_acknowledged": { - "type": "boolean" - } - }, - "required": [ - "acknowledged", - "index", - "shards_acknowledged" - ] - } + "security._types.ApplicationGlobalUserPrivileges": { + "type": "object", + "properties": { + "manage": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.ManageUserPrivileges" + } + ] } - } + }, + "required": [ + "manage" + ] }, - "indices.create_from-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "shards_acknowledged": { - "type": "boolean" - } - }, - "required": [ - "acknowledged", - "index", - "shards_acknowledged" - ] + "security._types.ManageUserPrivileges": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "type": "string" } } - } + }, + "required": [ + "applications" + ] }, - "indices.data_streams_stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "backing_indices": { - "description": "Total number of backing indices for the selected data streams.", - "type": "number" - }, - "data_stream_count": { - "description": "Total number of selected data streams.", - "type": "number" - }, - "data_streams": { - "description": "Contains statistics for the selected data streams.", - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.data_streams_stats.DataStreamsStatsItem" - } - }, - "total_store_sizes": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "total_store_size_bytes": { - "description": "Total size, in bytes, of all shards for the selected data streams.", - "type": "number" - } - }, - "required": [ - "_shards", - "backing_indices", - "data_stream_count", - "data_streams", - "total_store_size_bytes" - ] - }, - "examples": { - "indicesDataStreamStatsResponseExample1": { - "description": "A successful response for retrieving statistics for a data stream.", - "value": "{\n \"_shards\": {\n \"total\": 10,\n \"successful\": 5,\n \"failed\": 0\n },\n \"data_stream_count\": 2,\n \"backing_indices\": 5,\n \"total_store_size\": \"7kb\",\n \"total_store_size_bytes\": 7268,\n \"data_streams\": [\n {\n \"data_stream\": \"my-data-stream\",\n \"backing_indices\": 3,\n \"store_size\": \"3.7kb\",\n \"store_size_bytes\": 3772,\n \"maximum_timestamp\": 1607512028000\n },\n {\n \"data_stream\": \"my-data-stream-two\",\n \"backing_indices\": 2,\n \"store_size\": \"3.4kb\",\n \"store_size_bytes\": 3496,\n \"maximum_timestamp\": 1607425567000\n }\n ]\n}" - } + "security._types.ApplicationPrivileges": { + "type": "object", + "properties": { + "application": { + "description": "The name of the application to which this entry applies.", + "type": "string" + }, + "privileges": { + "description": "A list of strings, where each element is the name of an application privilege or action.", + "type": "array", + "items": { + "type": "string" } - } - } - }, - "indices.delete_alias-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "resources": { + "description": "A list resources to which the privileges are applied.", + "type": "array", + "items": { + "type": "string" } } - } - }, - "indices.exists_alias-200": { - "description": "", - "content": { - "application/json": {} - } + }, + "required": [ + "application", + "privileges", + "resources" + ] }, - "indices.flush-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" + "security._types.Restriction": { + "type": "object", + "properties": { + "workflows": { + "description": "A list of workflows to which the API key is restricted.\nNOTE: In order to use a role restriction, an API key must be created with a single role descriptor.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RestrictionWorkflow" } } - } + }, + "required": [ + "workflows" + ] }, - "indices.forcemerge-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/indices.forcemerge._types.ForceMergeResponseBody" - } + "security._types.RestrictionWorkflow": { + "anyOf": [ + { + "type": "string", + "enum": [ + "search_application_query" + ] + }, + { + "type": "string" } - } + ] }, - "indices.get_alias-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.get_alias.IndexAliases" + "security._types.ClusterNode": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } + ] } - } + }, + "required": [ + "name" + ] }, - "indices.get_data_stream-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data_streams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices._types.DataStream" - } - } - }, - "required": [ - "data_streams" - ] - }, - "examples": { - "indicesGetDataStreamResponseExample1": { - "description": "A successful response for retrieving information about a data stream.", - "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-my-data-stream-2099.03.07-000001\",\n \"index_uuid\": \"xCEhwsp8Tey0-FLNFYVwSg\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n },\n {\n \"index_name\": \".ds-my-data-stream-2099.03.08-000002\",\n \"index_uuid\": \"PA_JquKGSiKcAKBA8DJ5gw\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n }\n ],\n \"generation\": 2,\n \"_meta\": {\n \"my-meta-field\": \"foo\"\n },\n \"status\": \"GREEN\",\n \"next_generation_managed_by\": \"Index Lifecycle Management\",\n \"prefer_ilm\": true,\n \"template\": \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"hidden\": false,\n \"system\": false,\n \"allow_custom_routing\": false,\n \"replicated\": false,\n \"rollover_on_write\": false\n },\n {\n \"name\": \"my-data-stream-two\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-my-data-stream-two-2099.03.08-000001\",\n \"index_uuid\": \"3liBu2SYS5axasRt6fUIpA\",\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"Index Lifecycle Management\"\n }\n ],\n \"generation\": 1,\n \"_meta\": {\n \"my-meta-field\": \"foo\"\n },\n \"status\": \"YELLOW\",\n \"next_generation_managed_by\": \"Index Lifecycle Management\",\n \"prefer_ilm\": true,\n \"template\": \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"hidden\": false,\n \"system\": false,\n \"allow_custom_routing\": false,\n \"replicated\": false,\n \"rollover_on_write\": false\n }\n ]\n}" - } + "_types.Namespace": { + "type": "string" + }, + "_types.Service": { + "type": "string" + }, + "security._types.Access": { + "type": "object", + "properties": { + "replication": { + "description": "A list of indices permission entries for cross-cluster replication.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ReplicationAccess" + } + }, + "search": { + "description": "A list of indices permission entries for cross-cluster search.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.SearchAccess" } } } }, - "indices.get_field_mapping-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.get_field_mapping.TypeFieldMappings" - } - }, - "examples": { - "indicesGetFieldMappingResponseExample1": { - "summary": "A single field mapping", - "description": "A sucessful response from `GET publications/_mapping/field/title`, which returns the mapping of a field called `title`.\n", - "value": "{\n \"publications\": {\n \"mappings\": {\n \"title\": {\n \"full_name\": \"title\",\n \"mapping\": {\n \"title\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" - }, - "indicesGetFieldMappingResponseExample2": { - "summary": "Multiple field mappings", - "description": "A successful response from `GET publications/_mapping/field/author.id,abstract,name`. The get field mapping API also supports wildcard notation.\n", - "value": "{\n \"publications\": {\n \"mappings\": {\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" + "security._types.ReplicationAccess": { + "type": "object", + "properties": { + "names": { + "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" }, - "indicesGetFieldMappingResponseExample3": { - "summary": "Wildcards", - "description": "A successful response from `GET publications/_mapping/field/a*`.\n", - "value": "{\n \"publications\": {\n \"mappings\": {\n \"author.name\": {\n \"full_name\": \"author.name\",\n \"mapping\": {\n \"name\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n },\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } } - } + ] + }, + "allow_restricted_indices": { + "description": "This needs to be set to true if the patterns in the names field should cover system indices.", + "default": false, + "type": "boolean" } - } + }, + "required": [ + "names" + ] }, - "indices.get_index_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index_templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.get_index_template.IndexTemplateItem" - } - } + "security._types.SearchAccess": { + "type": "object", + "properties": { + "field_security": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level" + }, + "description": "The document fields that the owners of the role have read access to.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.FieldSecurity" + } + ] + }, + "names": { + "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" }, - "required": [ - "index_templates" - ] - } - } - } - }, - "indices.get_mapping-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.get_mapping.IndexMappingRecord" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } } - } - } - } - }, - "indices.get_settings-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.IndexState" + ] + }, + "query": { + "description": "A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" } - } + ] + }, + "allow_restricted_indices": { + "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "default": false, + "x-state": "Generally available", + "type": "boolean" } - } + }, + "required": [ + "names" + ] }, - "indices.get_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.TemplateMapping" + "security.create_service_token.Token": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } + ] + }, + "value": { + "type": "string" } - } + }, + "required": [ + "name", + "value" + ] }, - "indices.put_alias-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "security.delegate_pki.Authentication": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string" } - } - } - }, - "indices.put_index_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "full_name": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "email": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "token": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "authentication_realm": { + "allOf": [ + { + "$ref": "#/components/schemas/security.delegate_pki.AuthenticationRealm" + } + ] + }, + "lookup_realm": { + "allOf": [ + { + "$ref": "#/components/schemas/security.delegate_pki.AuthenticationRealm" + } + ] + }, + "authentication_type": { + "type": "string" + }, + "api_key": { + "type": "object", + "additionalProperties": { + "type": "string" } } - } + }, + "required": [ + "username", + "roles", + "full_name", + "email", + "metadata", + "enabled", + "authentication_realm", + "lookup_realm", + "authentication_type" + ] }, - "indices.put_mapping-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.IndicesResponseBase" - } + "security.delegate_pki.AuthenticationRealm": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "domain": { + "type": "string" } - } + }, + "required": [ + "name", + "type" + ] }, - "indices.put_settings-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } + "security.delete_privileges.FoundStatus": { + "type": "object", + "properties": { + "found": { + "type": "boolean" } - } + }, + "required": [ + "found" + ] }, - "indices.put_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } + "security.enroll_kibana.Token": { + "type": "object", + "properties": { + "name": { + "description": "The name of the bearer token for the `elastic/kibana` service account.", + "type": "string" + }, + "value": { + "description": "The value of the bearer token for the `elastic/kibana` service account.\nUse this value to authenticate the service account with Elasticsearch.", + "type": "string" } - } + }, + "required": [ + "name", + "value" + ] }, - "indices.recovery-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.recovery.RecoveryStatus" + "security._types.ApiKey": { + "type": "object", + "properties": { + "id": { + "description": "Id for the API key", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - }, - "examples": { - "indicesRecoveryResponseExample1": { - "summary": "Get segment information", - "description": "A successful response from `GET /_recovery?human`, which gets information about ongoing and completed shard recoveries for all data streams and indices in a cluster. This example includes information about a single index recovering a single shard. The source of the recovery is a snapshot repository and the target of the recovery is the `my_es_node` node. The response also includes the number and percentage of files and bytes recovered.\n", - "value": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"SNAPSHOT\",\n \"stage\" : \"INDEX\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:15:59.716\",\n \"start_time_in_millis\": 1393244159716,\n \"stop_time\" : \"0s\",\n \"stop_time_in_millis\" : 0,\n \"total_time\" : \"2.9m\",\n \"total_time_in_millis\" : 175576,\n \"source\" : {\n \"repository\" : \"my_repository\",\n \"snapshot\" : \"my_snapshot\",\n \"index\" : \"index1\",\n \"version\" : \"{version}\",\n \"restoreUUID\": \"PDh1ZAOaRbiGIVtCvZOMww\"\n },\n \"target\" : {\n \"id\" : \"ryqJ5lO5S4-lSFbGntkEkg\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"75.4mb\",\n \"total_in_bytes\" : 79063092,\n \"reused\" : \"0b\",\n \"reused_in_bytes\" : 0,\n \"recovered\" : \"65.7mb\",\n \"recovered_in_bytes\" : 68891939,\n \"recovered_from_snapshot\" : \"0b\",\n \"recovered_from_snapshot_in_bytes\" : 0,\n \"percent\" : \"87.1%\"\n },\n \"files\" : {\n \"total\" : 73,\n \"reused\" : 0,\n \"recovered\" : 69,\n \"percent\" : \"94.5%\"\n },\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 0,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n },\n \"verify_index\" : {\n \"check_index_time\" : \"0s\",\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n }\n } ]\n }\n}" - }, - "indicesRecoveryResponseExample2": { - "summary": "Get detailed recovery information", - "description": "A successful response from `GET _recovery?human&detailed=true`. The response includes a listing of any physical files recovered and their sizes. The response also includes timings in milliseconds of the various stages of recovery: index retrieval, translog replay, and index start time. This response indicates the recovery is done.\n", - "value": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"EXISTING_STORE\",\n \"stage\" : \"DONE\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:38:06.349\",\n \"start_time_in_millis\" : \"1393245486349\",\n \"stop_time\" : \"2014-02-24T12:38:08.464\",\n \"stop_time_in_millis\" : \"1393245488464\",\n \"total_time\" : \"2.1s\",\n \"total_time_in_millis\" : 2115,\n \"source\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"target\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"24.7mb\",\n \"total_in_bytes\" : 26001617,\n \"reused\" : \"24.7mb\",\n \"reused_in_bytes\" : 26001617,\n \"recovered\" : \"0b\",\n \"recovered_in_bytes\" : 0,\n \"recovered_from_snapshot\" : \"0b\",\n \"recovered_from_snapshot_in_bytes\" : 0,\n \"percent\" : \"100.0%\"\n },\n \"files\" : {\n \"total\" : 26,\n \"reused\" : 26,\n \"recovered\" : 0,\n \"percent\" : \"100.0%\",\n \"details\" : [ {\n \"name\" : \"segments.gen\",\n \"length\" : 20,\n \"recovered\" : 20\n }, {\n \"name\" : \"_0.cfs\",\n \"length\" : 135306,\n \"recovered\" : 135306,\n \"recovered_from_snapshot\": 0\n }, {\n \"name\" : \"segments_2\",\n \"length\" : 251,\n \"recovered\" : 251,\n \"recovered_from_snapshot\": 0\n }\n ]\n },\n \"total_time\" : \"2ms\",\n \"total_time_in_millis\" : 2,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 71,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"2.0s\",\n \"total_time_in_millis\" : 2025\n },\n \"verify_index\" : {\n \"check_index_time\" : 0,\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"88ms\",\n \"total_time_in_millis\" : 88\n }\n } ]\n }\n}" + ] + }, + "name": { + "description": "Name of the API key.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } - } - } - }, - "indices.refresh-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.ShardsOperationResponseBase" - } - } - } - }, - "indices.reload_search_analyzers-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult" - } - } - } - }, - "indices.resolve_cluster-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.resolve_cluster.ResolveClusterInfo" + ] + }, + "type": { + "description": "The type of the API key (e.g. `rest` or `cross_cluster`).", + "x-state": "Generally available; Added in 8.10.0", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.ApiKeyType" } - }, - "examples": { - "ResolveClusterResponseExample1": { - "summary": "Resolve with wildcards", - "description": "A successful response from `GET /_resolve/cluster/my-index*,clust*:my-index*`. Each cluster has its own response section. The cluster you sent the request to is labelled as \"(local)\".\n", - "value": "{\n \"(local)\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_one\": {\n \"connected\": true,\n \"skip_unavailable\": true,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_two\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n }\n}" - }, - "ResolveClusterResponseExample2": { - "summary": "Identify search problems", - "description": "A successful response from `GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s`. This type of request can be used to identify potential problems with your cross-cluster search. Note also that a `timeout` of 5 seconds is sent, which sets the maximum time the query will wait for remote clusters to respond. The local cluster has no index called `not_present`. Searching with `ignore_unavailable=false` would return a \"no such index\" error. The `cluster_one` remote cluster has no indices that match the pattern `my-index*`. There may be no indices that match the pattern or the index could be closed. The `cluster_two` remote cluster is not connected (the attempt to connect failed). Since this cluster is marked as `skip_unavailable=false`, you should probably exclude this cluster from the search by adding `-cluster_two:*` to the search index expression. For `cluster_three`, the error message indicates that this remote cluster did not respond within the 5-second timeout window specified, so it is also marked as not connected. The `oldcluster` remote cluster shows that it has matching indices, but no version information is included. This indicates that the cluster version predates the introduction of the `_resolve/cluster` API, so you may want to exclude it from your cross-cluster search.\n", - "value": "{\n \"(local)\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"error\": \"no such index [not_present]\"\n },\n \"cluster_one\": {\n \"connected\": true,\n \"skip_unavailable\": true,\n \"matching_indices\": false,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_two\": {\n \"connected\": false,\n \"skip_unavailable\": false\n },\n \"cluster_three\": {\n \"connected\": false,\n \"skip_unavailable\": false,\n \"error\": \"Request timed out before receiving a response from the remote cluster\"\n },\n \"oldcluster\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\": true\n }\n}" + ] + }, + "creation": { + "description": "Creation time for the API key in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } - } - } - } - }, - "indices.rollover-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "conditions": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "dry_run": { - "type": "boolean" - }, - "new_index": { - "type": "string" - }, - "old_index": { - "type": "string" - }, - "rolled_over": { - "type": "boolean" - }, - "shards_acknowledged": { - "type": "boolean" - } - }, - "required": [ - "acknowledged", - "conditions", - "dry_run", - "new_index", - "old_index", - "rolled_over", - "shards_acknowledged" - ] - }, - "examples": { - "indicesRolloverResponseExample1": { - "description": "An abbreviated response from `GET /_segments`.\n", - "value": "{\n \"_shards\": {},\n \"indices\": {\n \"test\": {\n \"shards\": {\n \"0\": [\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"zDC_RorJQCao9xf9pg3Fvw\"\n },\n \"num_committed_segments\": 0,\n \"num_search_segments\": 1,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 1,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 3800,\n \"committed\": false,\n \"search\": true,\n \"version\": \"7.0.0\",\n \"compound\": true,\n \"attributes\": {}\n }\n }\n }\n ]\n }\n }\n }\n}" + ] + }, + "expiration": { + "description": "Expiration time for the API key in milliseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "invalidated": { + "description": "Invalidation status for the API key.\nIf the key has been invalidated, it has a value of `true`. Otherwise, it is `false`.", + "type": "boolean" + }, + "invalidation": { + "description": "If the key has been invalidated, invalidation time in milliseconds.", + "x-state": "Generally available; Added in 8.12.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "username": { + "description": "Principal for which this API key was created", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + }, + "realm": { + "description": "Realm name of the principal for which this API key was created.", + "type": "string" + }, + "realm_type": { + "description": "Realm type of the principal for which this API key was created", + "x-state": "Generally available; Added in 8.14.0", + "type": "string" + }, + "metadata": { + "description": "Metadata of the API key", + "x-state": "Generally available; Added in 7.13.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" } + ] + }, + "role_descriptors": { + "description": "The role descriptors assigned to this API key when it was created or last updated.\nAn empty role descriptor means the API key inherits the owner user’s permissions.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" } - } - } - }, - "indices.segments-200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "limited_by": { + "description": "The owner user’s permissions associated with the API key.\nIt is a point-in-time snapshot captured at creation and subsequent updates.\nAn API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions.", + "x-state": "Generally available; Added in 8.5.0", + "type": "array", + "items": { "type": "object", - "properties": { - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.segments.IndexSegment" - } - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - } - }, - "required": [ - "indices", - "_shards" - ] - }, - "examples": { - "indicesSegmentsResponseExample1": { - "description": "A successful response for creating a new index for a data stream.", - "value": "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"old_index\": \".ds-my-data-stream-2099.05.06-000001\",\n \"new_index\": \".ds-my-data-stream-2099.05.07-000002\",\n \"rolled_over\": true,\n \"dry_run\": false,\n \"lazy\": false,\n \"conditions\": {\n \"[max_age: 7d]\": false,\n \"[max_docs: 1000]\": true,\n \"[max_primary_shard_size: 50gb]\": false,\n \"[max_primary_shard_docs: 2000]\": false\n }\n}" + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" } } - } - } - }, - "indices.shard_stores-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.shard_stores.IndicesShardStores" - } - } - }, - "required": [ - "indices" - ] - }, - "examples": { - "indicesShardStoresResponseExample1": { - "description": "An abbreviated response from `GET /_shard_stores?status=green`.\n", - "value": "{\n \"indices\": {\n \"my-index-000001\": {\n \"shards\": {\n \"0\": {\n \"stores\": [\n {\n \"sPa3OgxLSYGvQ4oPs-Tajw\": {\n \"name\": \"node_t0\",\n \"ephemeral_id\": \"9NlXRFGCT1m8tkvYCMK-8A\",\n \"transport_address\": \"local[1]\",\n \"external_id\": \"node_t0\",\n \"attributes\": {},\n \"roles\": [],\n \"version\": \"8.10.0\",\n \"min_index_version\": 7000099,\n \"max_index_version\": 8100099\n },\n \"allocation_id\": \"2iNySv_OQVePRX-yaRH_lQ\",\n \"allocation\": \"primary\",\n \"store_exception\": {}\n }\n ]\n }\n }\n }\n }\n}" + }, + "access": { + "description": "The access granted to cross-cluster API keys.\nThe access is composed of permissions for cross cluster search and cross cluster replication.\nAt least one of them must be specified.\nWhen specified, the new access assignment fully replaces the previously assigned access.", + "x-state": "Generally available; Added in 8.10.0", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.Access" + } + ] + }, + "certificate_identity": { + "description": "The certificate identity associated with a cross-cluster API key.\nRestricts the API key to connections authenticated by a specific TLS certificate.\nOnly applicable to cross-cluster API keys.", + "x-state": "Generally available; Added in 9.3.0", + "type": "string" + }, + "profile_uid": { + "description": "The profile uid for the API key owner principal, if requested and if it exists", + "x-state": "Generally available; Added in 8.14.0", + "type": "string" + }, + "_sort": { + "description": "Sorting values when using the `sort` parameter with the `security.query_api_keys` API.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" } - } + ] } - } + }, + "required": [ + "id", + "name", + "type", + "creation", + "invalidated", + "username", + "realm", + "metadata" + ] }, - "indices.shrink-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "shards_acknowledged": { - "type": "boolean" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - } - }, - "required": [ - "acknowledged", - "shards_acknowledged", - "index" - ] + "security._types.ApiKeyType": { + "type": "string", + "enum": [ + "rest", + "cross_cluster" + ] + }, + "security.put_privileges.Actions": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" } + }, + "application": { + "type": "string" + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] } - } + }, + "required": [ + "actions" + ] }, - "indices.simulate_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "overlapping": { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.simulate_template.Overlapping" - } - }, - "template": { - "$ref": "#/components/schemas/indices.simulate_template.Template" - } - }, - "required": [ - "template" - ] - }, - "examples": { - "indicesSimulateTemplateResponseExample2": { - "description": "A successful response from `POST /_index_template/_simulate` with a template configuration in the request body. The response shows any overlapping templates with a lower priority.\n", - "value": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_replicas\" : \"1\",\n \"routing\" : {\n \"allocation\" : {\n \"include\" : {\n \"_tier_preference\" : \"data_content\"\n }\n }\n }\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [\n {\n \"name\" : \"final-template\",\n \"index_patterns\" : [\n \"my-index-*\"\n ]\n }\n ]\n}" + "security.get_role.Role": { + "type": "object", + "properties": { + "cluster": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndicesPrivileges" + } + }, + "remote_indices": { + "x-state": "Generally available; Added in 8.14.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" + } + }, + "remote_cluster": { + "x-state": "Generally available; Added in 8.15.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" + } + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" } + ] + }, + "description": { + "type": "string" + }, + "run_as": { + "type": "array", + "items": { + "type": "string" } - } - } - }, - "indices.split-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "shards_acknowledged": { - "type": "boolean" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - } - }, - "required": [ - "acknowledged", - "shards_acknowledged", - "index" - ] + }, + "transient_metadata": { + "type": "object", + "additionalProperties": { + "type": "object" } - } - } - }, - "indices.stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.stats.IndicesStats" - } - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "_all": { - "$ref": "#/components/schemas/indices.stats.IndicesStats" - } - }, - "required": [ - "_shards", - "_all" - ] + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApplicationPrivileges" } - } - } - }, - "indices.validate_query-200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "role_templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RoleTemplate" + } + }, + "global": { + "x-state": "Generally available; Added in 8.0.0", + "type": "object", + "additionalProperties": { "type": "object", - "properties": { - "explanations": { + "additionalProperties": { + "type": "object", + "additionalProperties": { "type": "array", "items": { - "$ref": "#/components/schemas/indices.validate_query.IndicesValidationExplanation" + "type": "string" } - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "valid": { - "type": "boolean" - }, - "error": { - "type": "string" } - }, - "required": [ - "valid" - ] + } } } - } + }, + "required": [ + "cluster", + "indices", + "metadata", + "applications" + ] }, - "inference.delete-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.DeleteInferenceEndpointResult" - } + "security._types.RoleTemplate": { + "type": "object", + "properties": { + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.TemplateFormat" + } + ] + }, + "template": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Script" + } + ] } - } + }, + "required": [ + "template" + ] }, - "inference.get-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" - } - } - }, - "required": [ - "endpoints" - ] - } - } - } + "security._types.TemplateFormat": { + "type": "string", + "enum": [ + "string", + "json" + ] }, - "inference.inference-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceResult" + "security._types.RoleMapping": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "roles": { + "type": "array", + "items": { + "type": "string" } - } - } - }, - "inference.put-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" + }, + "role_templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RoleTemplate" } + }, + "rules": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleMappingRule" + } + ] } - } + }, + "required": [ + "enabled", + "metadata", + "rules" + ] }, - "inference.update-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo" + "security._types.RoleMappingRule": { + "type": "object", + "properties": { + "any": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RoleMappingRule" } - } - } - }, - "ingest.get_geoip_database-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "databases": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest.get_geoip_database.DatabaseConfigurationMetadata" - } - } - }, - "required": [ - "databases" - ] + }, + "all": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RoleMappingRule" } - } - } - }, - "ingest.get_ip_location_database-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "databases": { + }, + "field": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.FieldValue" + }, + { "type": "array", "items": { - "$ref": "#/components/schemas/ingest.get_ip_location_database.DatabaseConfigurationMetadata" + "$ref": "#/components/schemas/_types.FieldValue" } } - }, - "required": [ - "databases" ] - } - } - } - }, - "ingest.get_pipeline-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ingest._types.Pipeline" - } }, - "examples": { - "GetPipelineResponseExample1": { - "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}" + "minProperties": 1, + "maxProperties": 1 + }, + "except": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleMappingRule" } - } + ] } - } + }, + "minProperties": 1, + "maxProperties": 1 }, - "ingest.simulate-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.SimulateDocumentResult" - } - } - }, - "required": [ - "docs" - ] - }, - "examples": { - "SimulatePipelineResponseExample1": { - "description": "A successful response for running an ingest pipeline against a set of provided documents.", - "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}" + "security.get_service_accounts.RoleDescriptorWrapper": { + "type": "object", + "properties": { + "role_descriptor": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleDescriptorRead" } - } + ] } - } + }, + "required": [ + "role_descriptor" + ] }, - "license.post-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledge": { - "$ref": "#/components/schemas/license.post.Acknowledgement" - }, - "acknowledged": { - "type": "boolean" - }, - "license_status": { - "$ref": "#/components/schemas/license._types.LicenseStatus" + "security._types.RoleDescriptorRead": { + "type": "object", + "properties": { + "cluster": { + "description": "A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" + } + }, + "indices": { + "description": "A list of indices permissions entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndicesPrivileges" + } + }, + "remote_indices": { + "description": "A list of indices permissions for remote clusters.", + "x-state": "Generally available; Added in 8.14.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" + } + }, + "remote_cluster": { + "description": "A list of cluster permissions for remote clusters.\nNOTE: This is limited a subset of the cluster permissions.", + "x-state": "Generally available; Added in 8.15.0", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" + } + }, + "global": { + "description": "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.", + "x-state": "Generally available", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.GlobalPrivilege" } }, - "required": [ - "acknowledged", - "license_status" - ] - }, - "examples": { - "PostLicenseResponseExample1": { - "description": "If you update to a basic license and you previously had a license with more features, you receive this type of response. You must re-submit the API request and set the `acknowledge` parameter to `true`.", - "value": "{\n \"acknowledged\": false,\n \"license_status\": \"valid\",\n \"acknowledge\": {\n \"message\": \"\\\"\\\"\\\"This license update requires acknowledgement. To acknowledge the license, please read the following messages and update the license again, this time with the \\\"acknowledge=true\\\" parameter:\\\"\\\"\\\"\",\n \"watcher\": [\n \"Watcher will be disabled\"\n ],\n \"logstash\": [\n \"Logstash will no longer poll for centrally-managed pipelines\"\n ],\n \"security\": [\n \"The following X-Pack security functionality will be disabled ...\"\n ]\n }\n}" + { + "$ref": "#/components/schemas/security._types.GlobalPrivilege" } + ] + }, + "applications": { + "description": "A list of application privilege entries", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ApplicationPrivileges" } - } - } - }, - "logstash.get_pipeline-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/logstash._types.Pipeline" + }, + "metadata": { + "description": "Optional meta-data. Within the metadata object, keys that begin with `_` are reserved for system usage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" } + ] + }, + "run_as": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users" }, - "examples": { - "LogstashGetPipelineResponseExample1": { - "description": "A successful response from `GET _logstash/pipeline/my_pipeline`.\n", - "value": "{\n \"my_pipeline\": {\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": \"1\"\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n }\n}" - } + "description": "A list of users that the API keys can impersonate.", + "type": "array", + "items": { + "type": "string" } - } - } - }, - "mget-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "description": "The response includes a docs array that contains the documents in the order specified in the request.\nThe structure of the returned documents is similar to that returned by the get API.\nIf there is a failure getting a particular document, the error is included in place of the document.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.mget.ResponseItem" - } - } - }, - "required": [ - "docs" - ] + }, + "description": { + "description": "An optional description of the role descriptor.", + "type": "string" + }, + "restriction": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/role-restriction" + }, + "description": "A restriction for when the role descriptor is allowed to be effective.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.Restriction" + } + ] + }, + "transient_metadata": { + "type": "object", + "additionalProperties": { + "type": "object" } } - } - }, - "migration.deprecations-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "cluster_settings": { - "description": "Cluster-level deprecation warnings.", - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.deprecations.Deprecation" - } - }, - "index_settings": { - "description": "Index warnings are sectioned off per index and can be filtered using an index-pattern in the query.\nThis section includes warnings for the backing indices of data streams specified in the request path.", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.deprecations.Deprecation" - } - } - }, - "data_streams": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.deprecations.Deprecation" - } - } - }, - "node_settings": { - "description": "Node-level deprecation warnings.\nSince only a subset of your nodes might incorporate these settings, it is important to read the details section for more information about which nodes are affected.", - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.deprecations.Deprecation" - } - }, - "ml_settings": { - "description": "Machine learning-related deprecation warnings.", - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.deprecations.Deprecation" - } - }, - "templates": { - "description": "Template warnings are sectioned off per template and include deprecations for both component templates and\nindex templates.", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.deprecations.Deprecation" - } - } - }, - "ilm_policies": { - "description": "ILM policy warnings are sectioned off per policy.", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/migration.deprecations.Deprecation" - } - } - } - }, - "required": [ - "cluster_settings", - "index_settings", - "data_streams", - "node_settings", - "ml_settings", - "templates", - "ilm_policies" - ] - }, - "examples": { - "DeprecationInfoResponseExample1": { - "description": "An abbreviated response from `GET /_migration/deprecations`.\n", - "value": "{\n \"cluster_settings\": [\n {\n \"level\": \"critical\",\n \"message\": \"Cluster name cannot contain ':'\",\n \"url\": \"https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_cluster_name\",\n \"details\": \"This cluster is named [mycompany:logging], which contains the illegal character ':'.\"\n }\n ],\n \"node_settings\": [],\n \"index_settings\": {\n \"logs:apache\": [\n {\n \"level\": \"warning\",\n \"message\": \"Index name cannot contain ':'\",\n \"url\": \"https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_index_name\",\n \"details\": \"This index is named [logs:apache], which contains the illegal character ':'.\"\n }\n ]\n },\n \"ml_settings\": []\n}" + }, + "required": [ + "cluster", + "indices" + ] + }, + "security.get_service_credentials.NodesCredentials": { + "type": "object", + "properties": { + "_nodes": { + "description": "General status showing how nodes respond to the above collection request", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeStatistics" } + ] + }, + "file_tokens": { + "description": "File-backed tokens collected from all nodes", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.get_service_credentials.NodesCredentialsFileToken" } } - } + }, + "required": [ + "_nodes", + "file_tokens" + ] }, - "ml.delete_expired_data-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "deleted": { - "type": "boolean" - } - }, - "required": [ - "deleted" - ] - }, - "examples": { - "MlDeleteExpiredDataResponseExample1": { - "description": "A successful response when deleting expired and unused anomaly detection data.", - "value": "{\n \"deleted\": true\n}" - } + "security.get_service_credentials.NodesCredentialsFileToken": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "string" } } - } + }, + "required": [ + "nodes" + ] }, - "ml.delete_forecast-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "MlDeleteForecastResponseExample1": { - "description": "A successful response when deleting a forecast from an anomaly detection job.", - "value": "{\n \"acknowledged\": true\n}" + "security._types.SecuritySettings": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/indices._types.IndexSettings" } - } + ] } } }, - "ml.explain_data_frame_analytics-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "field_selection": { - "description": "An array of objects that explain selection for each field, sorted by the field names.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsFieldSelection" - } - }, - "memory_estimation": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsMemoryEstimation" - } - }, - "required": [ - "field_selection", - "memory_estimation" - ] - }, - "examples": { - "MlExplainDataFrameAnalyticsResponseExample1": { - "description": "A succesful response for explaining a data frame analytics job configuration.", - "value": "{\n \"field_selection\": [\n {\n \"field\": \"number_of_bedrooms\",\n \"mappings_types\": [\n \"integer\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"numerical\"\n },\n {\n \"field\": \"postcode\",\n \"mappings_types\": [\n \"text\"\n ],\n \"is_included\": false,\n \"is_required\": false,\n \"reason\": \"[postcode.keyword] is preferred because it is aggregatable\"\n },\n {\n \"field\": \"postcode.keyword\",\n \"mappings_types\": [\n \"keyword\"\n ],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"categorical\"\n },\n {\n \"field\": \"price\",\n \"mappings_types\": [\n \"float\"\n ],\n \"is_included\": true,\n \"is_required\": true,\n \"feature_type\": \"numerical\"\n }\n ],\n \"memory_estimation\": {\n \"expected_memory_without_disk\": \"128MB\",\n \"expected_memory_with_disk\": \"32MB\"\n }\n}" + "security._types.NodeSecurityStats": { + "type": "object", + "properties": { + "roles": { + "description": "Role statistics.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RolesStats" } - } + ] } - } + }, + "required": [ + "roles" + ] }, - "ml.get_buckets-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "buckets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.BucketSummary" - } - }, - "count": { - "type": "number" - } - }, - "required": [ - "buckets", - "count" - ] - } + "security._types.RolesStats": { + "type": "object", + "properties": { + "dls": { + "description": "Document-level security (DLS) statistics.", + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.SecurityRolesDls" + } + ] } - } + }, + "required": [ + "dls" + ] }, - "ml.get_calendars-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "calendars": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml.get_calendars.Calendar" - } - }, - "count": { - "type": "number" - } - }, - "required": [ - "calendars", - "count" - ] - } + "xpack.usage.SecurityRolesDls": { + "type": "object", + "properties": { + "bit_set_cache": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.SecurityRolesDlsBitSetCache" + } + ] } - } + }, + "required": [ + "bit_set_cache" + ] }, - "ml.get_categories-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Category" - } - }, - "count": { - "type": "number" - } - }, - "required": [ - "categories", - "count" - ] - } + "xpack.usage.SecurityRolesDlsBitSetCache": { + "type": "object", + "properties": { + "count": { + "description": "Number of entries in the cache.", + "type": "number" + }, + "memory": { + "description": "Human-readable amount of memory taken up by the cache.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "memory_in_bytes": { + "description": "Memory taken up by the cache in bytes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ulong" + } + ] + }, + "hits": { + "description": "Total number of cache hits.", + "x-state": "Generally available; Added in 9.2.0", + "type": "number" + }, + "misses": { + "description": "Total number of cache misses.", + "x-state": "Generally available; Added in 9.2.0", + "type": "number" + }, + "evictions": { + "description": "Total number of cache evictions.", + "x-state": "Generally available; Added in 9.2.0", + "type": "number" + }, + "hits_time_in_millis": { + "description": "Total combined time spent in cache for hits in milliseconds.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "misses_time_in_millis": { + "description": "Total combined time spent in cache for misses in milliseconds.", + "x-state": "Generally available; Added in 9.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } - } + }, + "required": [ + "count", + "memory_in_bytes", + "hits", + "misses", + "evictions", + "hits_time_in_millis", + "misses_time_in_millis" + ] }, - "ml.get_data_frame_analytics-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "data_frame_analytics": { - "description": "An array of data frame analytics job resources, which are sorted by the id value in ascending order.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSummary" - } - } - }, - "required": [ - "count", - "data_frame_analytics" - ] - } - } - } + "security.get_token.AccessTokenGrantType": { + "type": "string", + "enum": [ + "password", + "client_credentials", + "_kerberos", + "refresh_token" + ] }, - "ml.get_data_frame_analytics_stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "data_frame_analytics": { - "description": "An array of objects that contain usage information for data frame analytics jobs, which are sorted by the id value in ascending order.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DataframeAnalytics" + "security.get_token.AuthenticatedUser": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.User" + }, + { + "type": "object", + "properties": { + "authentication_realm": { + "allOf": [ + { + "$ref": "#/components/schemas/security.get_token.UserRealm" } - } + ] }, - "required": [ - "count", - "data_frame_analytics" - ] - } - } - } - }, - "ml.get_datafeed_stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "datafeeds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.DatafeedStats" + "lookup_realm": { + "allOf": [ + { + "$ref": "#/components/schemas/security.get_token.UserRealm" } - } + ] }, - "required": [ - "count", - "datafeeds" - ] - } - } - } - }, - "ml.get_datafeeds-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "datafeeds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Datafeed" + "authentication_provider": { + "allOf": [ + { + "$ref": "#/components/schemas/security.get_token.AuthenticationProvider" } - } + ] }, - "required": [ - "count", - "datafeeds" - ] - } + "authentication_type": { + "type": "string" + } + }, + "required": [ + "authentication_realm", + "lookup_realm", + "authentication_type" + ] } - } + ] }, - "ml.get_filters-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Filter" - } - } - }, - "required": [ - "count", - "filters" - ] - } + "security.get_token.UserRealm": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "type": { + "type": "string" } - } + }, + "required": [ + "name", + "type" + ] }, - "ml.get_influencers-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "influencers": { - "description": "Array of influencer objects", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Influencer" - } - } - }, - "required": [ - "count", - "influencers" - ] - } + "security.get_token.AuthenticationProvider": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] } - } + }, + "required": [ + "type", + "name" + ] }, - "ml.get_job_stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "jobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.JobStats" - } - } + "security._types.User": { + "type": "object", + "properties": { + "email": { + "oneOf": [ + { + "type": "string" }, - "required": [ - "count", - "jobs" - ] + { + "nullable": true, + "type": "string" + } + ] + }, + "full_name": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Name" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "roles": { + "type": "array", + "items": { + "type": "string" } + }, + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "profile_uid": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.UserProfileId" + } + ] } - } + }, + "required": [ + "metadata", + "roles", + "username", + "enabled" + ] }, - "ml.get_jobs-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "jobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Job" - } - } + "security._types.UserIndicesPrivileges": { + "type": "object", + "properties": { + "field_security": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level" + }, + "description": "The document fields that the owners of the role have read access to.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.FieldSecurity" + } + }, + "names": { + "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" }, - "required": [ - "count", - "jobs" - ] + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } + } + ] + }, + "privileges": { + "description": "The index level privileges that owners of the role have on the specified indices.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndexPrivilege" + } + }, + "query": { + "description": "Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" } + }, + "allow_restricted_indices": { + "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "type": "boolean" } - } + }, + "required": [ + "names", + "privileges", + "allow_restricted_indices" + ] }, - "ml.get_memory_stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" - }, - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" - }, - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ml.get_memory_stats.Memory" - } - } + "security._types.RemoteUserIndicesPrivileges": { + "type": "object", + "properties": { + "field_security": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level" + }, + "description": "The document fields that the owners of the role have read access to.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.FieldSecurity" + } + }, + "names": { + "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" }, - "required": [ - "_nodes", - "cluster_name", - "nodes" - ] + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } + } + ] + }, + "privileges": { + "description": "The index level privileges that owners of the role have on the specified indices.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndexPrivilege" + } + }, + "query": { + "description": "Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndicesPrivilegesQuery" + } + }, + "allow_restricted_indices": { + "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "type": "boolean" + }, + "clusters": { + "type": "array", + "items": { + "type": "string" } } - } + }, + "required": [ + "names", + "privileges", + "allow_restricted_indices", + "clusters" + ] }, - "ml.get_model_snapshots-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "model_snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.ModelSnapshot" - } - } - }, - "required": [ - "count", - "model_snapshots" - ] + "security.get_user_profile.GetUserProfileErrors": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "details": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ErrorCause" } } - } + }, + "required": [ + "count", + "details" + ] }, - "ml.get_overall_buckets-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "overall_buckets": { - "description": "Array of overall bucket objects", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.OverallBucket" - } + "security.grant_api_key.GrantApiKey": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "expiration": { + "description": "Expiration time for the API key. By default, API keys never expire.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationLarge" + } + ] + }, + "role_descriptors": { + "description": "The role descriptors for this API key.\nWhen it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token.\nIf you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" } }, - "required": [ - "count", - "overall_buckets" - ] - } - } - } - }, - "ml.get_records-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "records": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Anomaly" + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security._types.RoleDescriptor" } } - }, - "required": [ - "count", - "records" - ] - } + } + ] + }, + "metadata": { + "description": "Arbitrary metadata that you want to associate with the API key.\nIt supports nested data structure.\nWithin the `metadata` object, keys beginning with `_` are reserved for system usage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] } - } + }, + "required": [ + "name" + ] }, - "ml.get_trained_models-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "trained_model_configs": { - "description": "An array of trained model resources, which are sorted by the model_id value in ascending order.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.TrainedModelConfig" - } - } - }, - "required": [ - "count", - "trained_model_configs" - ] - } - } - } + "security.grant_api_key.ApiKeyGrantType": { + "type": "string", + "enum": [ + "access_token", + "password" + ] }, - "ml.get_trained_models_stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "description": "The total number of trained model statistics that matched the requested ID patterns. Could be higher than the number of items in the trained_model_stats array as the size of the array is restricted by the supplied size parameter.", - "type": "number" - }, - "trained_model_stats": { - "description": "An array of trained model statistics, which are sorted by the model_id value in ascending order.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.TrainedModelStats" - } - } - }, - "required": [ - "count", - "trained_model_stats" - ] + "security.has_privileges.ApplicationPrivilegesCheck": { + "type": "object", + "properties": { + "application": { + "description": "The name of the application.", + "type": "string" + }, + "privileges": { + "description": "A list of the privileges that you want to check for the specified resources.\nIt may be either application privilege names or the names of actions that are granted by those privileges", + "type": "array", + "items": { + "type": "string" } - } - } - }, - "ml.preview_data_frame_analytics-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "feature_values": { - "description": "An array of objects that contain feature name and value pairs. The features have been processed and indicate what will be sent to the model for training.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "required": [ - "feature_values" - ] + }, + "resources": { + "description": "A list of resource names against which the privileges should be checked.", + "type": "array", + "items": { + "type": "string" } } - } + }, + "required": [ + "application", + "privileges", + "resources" + ] }, - "ml.preview_datafeed-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object" + "security.has_privileges.IndexPrivilegesCheck": { + "type": "object", + "properties": { + "names": { + "description": "A list of indices.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" } + ] + }, + "privileges": { + "description": "A list of the privileges that you want to check for the specified indices.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.IndexPrivilege" } + }, + "allow_restricted_indices": { + "description": "This needs to be set to `true` (default is `false`) if using wildcards or regexps for patterns that cover restricted indices.\nImplicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false.\nIf restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of `allow_restricted_indices`.", + "type": "boolean" } - } + }, + "required": [ + "names", + "privileges" + ] }, - "msearch-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" - } - } + "security.has_privileges.ApplicationsPrivileges": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.has_privileges.ResourcePrivileges" } }, - "msearch_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_global.msearch.MultiSearchResult" - } - } + "security.has_privileges.ResourcePrivileges": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.has_privileges.Privileges" } }, - "mtermvectors-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.mtermvectors.TermVectorsResult" - } - } - }, - "required": [ - "docs" - ] - } - } + "security.has_privileges.Privileges": { + "type": "object", + "additionalProperties": { + "type": "boolean" } }, - "nodes.hot_threads-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" + "security.has_privileges_user_profile.PrivilegesCheck": { + "type": "object", + "properties": { + "application": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.ApplicationPrivilegesCheck" } - } - } - }, - "nodes.info-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/nodes.info.ResponseBase" - }, - "examples": { - "nodesInfoResponseExample1": { - "description": "An abbreviated response when requesting cluster nodes information.", - "value": "{\n \"_nodes\": {},\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"transport_version\": 100000298,\n \"index_version\": 100000074,\n \"component_versions\": {\n \"ml_config_version\": 100000162,\n \"transform_config_version\": 100000096\n },\n \"build_flavor\": \"default\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [\n \"master\",\n \"data\",\n \"ingest\"\n ],\n \"attributes\": {},\n \"plugins\": [\n {\n \"name\": \"analysis-icu\",\n \"version\": \"{version}\",\n \"description\": \"The ICU Analysis plugin integrates Lucene ICU\n module into elasticsearch, adding ICU relates analysis components.\",\n \"classname\":\n \"org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin\",\n \"has_native_controller\": false\n }\n ],\n \"modules\": [\n {\n \"name\": \"lang-painless\",\n \"version\": \"{version}\",\n \"description\": \"An easy, safe and fast scripting language for\n Elasticsearch\",\n \"classname\": \"org.elasticsearch.painless.PainlessPlugin\",\n \"has_native_controller\": false\n }\n ]\n }\n }\n}" - } + }, + "cluster": { + "description": "A list of the cluster privileges that you want to check.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.ClusterPrivilege" } - } - } - }, - "nodes.reload_secure_settings-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/nodes.reload_secure_settings.ResponseBase" - }, - "examples": { - "ReloadSecureSettingsResponseExample1": { - "description": "A successful response when reloading keystore on nodes in your cluster.", - "value": "{\n \"_nodes\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"cluster_name\": \"my_cluster\",\n \"nodes\": {\n \"pQHNt5rXTTWNvUgOrdynKg\": {\n \"name\": \"node-0\"\n }\n }\n}" - } + }, + "index": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.has_privileges.IndexPrivilegesCheck" } } } }, - "nodes.stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/nodes.stats.ResponseBase" + "security.has_privileges_user_profile.HasPrivilegesUserProfileErrors": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "details": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ErrorCause" } } - } + }, + "required": [ + "count", + "details" + ] }, - "nodes.usage-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/nodes.usage.ResponseBase" - } + "security._types.CreatedStatus": { + "type": "object", + "properties": { + "created": { + "type": "boolean" } - } + }, + "required": [ + "created" + ] }, - "put_script-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "security.query_api_keys.ApiKeyAggregationContainer": { + "allOf": [ + { + "type": "object", + "properties": { + "aggregations": { + "description": "Sub-aggregations for this aggregation.\nOnly applies to bucket aggregations.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregationContainer" + } + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + } } - } - } - }, - "rank_eval-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metric_score": { - "description": "The overall evaluation quality calculated by the defined metric", - "type": "number" - }, - "details": { - "description": "The details section contains one entry for every query in the original requests section, keyed by the search request id", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDetail" + }, + { + "type": "object", + "properties": { + "cardinality": { + "description": "A single-value metrics aggregation that calculates an approximate count of distinct values.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CardinalityAggregation" } - }, - "failures": { - "type": "object", - "additionalProperties": { - "type": "object" + ] + }, + "composite": { + "description": "A multi-bucket aggregation that creates composite buckets from different sources.\nUnlike the other multi-bucket aggregations, you can use the `composite` aggregation to paginate *all* buckets from a multi-level aggregation efficiently.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregation" } - } + ] }, - "required": [ - "metric_score", - "details", - "failures" - ] - } - } - } - }, - "render_search_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "template_output": { - "type": "object", - "additionalProperties": { - "type": "object" + "date_range": { + "description": "A multi-bucket value source based aggregation that enables the user to define a set of date ranges - each representing a bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.DateRangeAggregation" } - } + ] }, - "required": [ - "template_output" - ] - } - } - } - }, - "rollup.get_jobs-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "jobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/rollup.get_jobs.RollupJob" + "filter": { + "description": "A single bucket aggregation that narrows the set of documents to those that match a query.", + "allOf": [ + { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" } - } + ] }, - "required": [ - "jobs" - ] - }, - "examples": { - "GetRollupJobResponseExample1": { - "description": "A successful response from `GET _rollup/job/sensor`.", - "value": "{\n \"jobs\": [\n {\n \"config\": {\n \"id\": \"sensor\",\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"groups\": {\n \"date_histogram\": {\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\",\n \"field\": \"timestamp\",\n \"time_zone\": \"UTC\"\n },\n \"terms\": {\n \"fields\": [\n \"node\"\n ]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\n \"avg\"\n ]\n }\n ],\n \"timeout\": \"20s\",\n \"page_size\": 1000\n },\n \"status\": {\n \"job_state\": \"stopped\"\n },\n \"stats\": {\n \"pages_processed\": 0,\n \"documents_processed\": 0,\n \"rollups_indexed\": 0,\n \"trigger_count\": 0,\n \"index_failures\": 0,\n \"index_time_in_ms\": 0,\n \"index_total\": 0,\n \"search_failures\": 0,\n \"search_time_in_ms\": 0,\n \"search_total\": 0,\n \"processing_time_in_ms\": 0,\n \"processing_total\": 0\n }\n }\n ]\n}" + "filters": { + "description": "A multi-bucket aggregation where each bucket contains the documents that match a query.", + "allOf": [ + { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyFiltersAggregation" + } + ] + }, + "missing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MissingAggregation" + } + ] + }, + "range": { + "description": "A multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.RangeAggregation" + } + ] + }, + "terms": { + "description": "A multi-bucket value source based aggregation where buckets are dynamically built - one per unique value.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregation" + } + ] + }, + "value_count": { + "description": "A single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.ValueCountAggregation" + } + ] } - } + }, + "minProperties": 1, + "maxProperties": 1 } - } + ] }, - "rollup.get_rollup_caps-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupCapabilities" + "security.query_api_keys.ApiKeyQueryContainer": { + "type": "object", + "properties": { + "bool": { + "description": "Matches documents matching boolean combinations of other queries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.BoolQuery" + } + ] + }, + "exists": { + "description": "Returns documents that contain an indexed value for a field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ExistsQuery" + } + ] + }, + "ids": { + "description": "Returns documents based on their IDs.\nThis query uses document IDs stored in the `_id` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IdsQuery" } + ] + }, + "match": { + "description": "Returns documents that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.MatchQuery" }, - "examples": { - "GetRollupCapabilitiesResponseExample1": { - "description": "A successful response from `GET _rollup/data/sensor-*` for a rollup job that targets the index pattern `sensor-*`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.\n", - "value": "{\n \"sensor-*\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}" + "minProperties": 1, + "maxProperties": 1 + }, + "match_all": { + "description": "Matches all documents, giving them all a `_score` of 1.0.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MatchAllQuery" } - } - } - } - }, - "rollup.rollup_search-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "took": { - "type": "number" - }, - "timed_out": { - "type": "boolean" - }, - "terminated_early": { - "type": "boolean" - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "hits": { - "$ref": "#/components/schemas/_global.search._types.HitsMetadata" - }, - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.Aggregate" - } - } - }, - "required": [ - "took", - "timed_out", - "_shards", - "hits" - ] + ] + }, + "prefix": { + "description": "Returns documents that contain a specific prefix in a provided field.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.PrefixQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "range": { + "description": "Returns documents that contain terms within a provided range.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.RangeQuery" }, - "examples": { - "RollupSearchResponseExample1": { - "description": "An abbreviated response from `GET /sensor_rollup/_rollup_search` with a `max` aggregation on a `temperature` field. The response provides some metadata about the request (`took`, `_shards`), the search hits (which is always empty for rollup searches), and the aggregation response.\n", - "value": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : {} ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}" + "minProperties": 1, + "maxProperties": 1 + }, + "simple_query_string": { + "description": "Returns documents based on a provided query string, using a parser with a limited but fault-tolerant syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringQuery" } - } + ] + }, + "term": { + "description": "Returns documents that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.TermQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "terms": { + "description": "Returns documents that contain one or more exact terms in a provided field.\nTo return a document, one or more terms must exactly match a field value, including whitespace and capitalization.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.TermsQuery" + } + ] + }, + "wildcard": { + "description": "Returns documents that contain terms matching a wildcard pattern.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.WildcardQuery" + }, + "minProperties": 1, + "maxProperties": 1 } - } + }, + "minProperties": 1, + "maxProperties": 1 }, - "scripts_painless_execute-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "type": "object" - } + "security.query_api_keys.ApiKeyFiltersAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase" + }, + { + "type": "object", + "properties": { + "filters": { + "description": "Collection of queries from which to build buckets.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.BucketsApiKeyQueryContainer" + } + ] }, - "required": [ - "result" - ] - }, - "examples": { - "ExecutePainlessScriptResponseExample1": { - "summary": "Test context", - "description": "A successful response from `POST /_scripts/painless/_execute` with a `painless_test` context.", - "value": "{\n \"result\": \"0.1\"\n}" + "other_bucket": { + "description": "Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters.", + "type": "boolean" }, - "ExecutePainlessScriptResponseExample2": { - "summary": "Filter context", - "description": "A successful response from `POST /_scripts/painless/_execute` with a `filter` context.", - "value": "{\n \"result\": true\n}" + "other_bucket_key": { + "description": "The key with which the other bucket is returned.", + "default": "_other_", + "type": "string" }, - "ExecutePainlessScriptResponseExample3": { - "summary": "Score context", - "description": "A successful response from `POST /_scripts/painless/_execute` with a `score` context.", - "value": "{\n \"result\": 0.8\n}" + "keyed": { + "description": "By default, the named filters aggregation returns the buckets as an object.\nSet to `false` to return the buckets as an array of objects.", + "default": true, + "type": "boolean" } } } - } + ] }, - "scroll-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_global.search.ResponseBody" + "_types.aggregations.BucketsApiKeyQueryContainer": { + "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" } } - } + ] }, - "search-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_global.search.ResponseBody" - }, - "examples": { - "SearchResponseExample1": { - "description": "An abbreviated response from `GET /my-index-000001/_search?from=40&size=20` with a simple term query.\n", - "value": "{\n \"took\": 5,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 20,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\": [\n {\n \"_index\": \"my-index-000001\",\n \"_id\": \"0\",\n \"_score\": 1.3862942,\n \"_source\": {\n \"@timestamp\": \"2099-11-15T14:12:12\",\n \"http\": {\n \"request\": {\n \"method\": \"get\"\n },\n \"response\": {\n \"status_code\": 200,\n \"bytes\": 1070000\n },\n \"version\": \"1.1\"\n },\n \"source\": {\n \"ip\": \"127.0.0.1\"\n },\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n }\n ]\n }\n}" - } - } + "security.query_api_keys.ApiKeyAggregate": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.CardinalityAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.ValueCountAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.StringTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.LongTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.DoubleTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.UnmappedTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.MultiTermsAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.MissingAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.FilterAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.FiltersAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.RangeAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.DateRangeAggregate" + }, + { + "$ref": "#/components/schemas/_types.aggregations.CompositeAggregate" } - } + ] }, - "search_application.get_behavioral_analytics-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/search_application._types.AnalyticsCollection" + "security.query_role.RoleQueryContainer": { + "type": "object", + "properties": { + "bool": { + "description": "matches roles matching boolean combinations of other queries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.BoolQuery" } + ] + }, + "exists": { + "description": "Returns roles that contain an indexed value for a field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ExistsQuery" + } + ] + }, + "ids": { + "description": "Returns roles based on their IDs.\nThis query uses role document IDs stored in the `_id` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IdsQuery" + } + ] + }, + "match": { + "description": "Returns roles that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.MatchQuery" }, - "examples": { - "BehavioralAnalyticsGetResponseExample1": { - "description": "A successful response from `GET _application/analytics/my*`", - "value": "{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n }\n }\n}" + "minProperties": 1, + "maxProperties": 1 + }, + "match_all": { + "description": "Matches all roles, giving them all a `_score` of 1.0.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MatchAllQuery" } - } - } - } - }, - "search_application.search-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_global.search.ResponseBody" - } - } - } - }, - "search_mvt-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.MapboxVectorTiles" + ] + }, + "prefix": { + "description": "Returns roles that contain a specific prefix in a provided field.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.PrefixQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "range": { + "description": "Returns roles that contain terms within a provided range.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.RangeQuery" }, - "examples": { - "SearchMvtResponseExample1": { - "description": "A successful response from `GET museums/_mvt/location/13/4207/2692`. It returns results as a binary vector tile. When decoded into JSON, the tile contains the following data.\n", - "value": "{\n \"hits\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3208,\n 3864\n ]\n },\n \"properties\": {\n \"_id\": \"1\",\n \"_index\": \"museums\",\n \"name\": \"NEMO Science Museum\",\n \"price\": 1750\n },\n \"type\": 1\n },\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3429,\n 3496\n ]\n },\n \"properties\": {\n \"_id\": \"3\",\n \"_index\": \"museums\",\n \"name\": \"Nederlands Scheepvaartmuseum\",\n \"price\": 1650\n },\n \"type\": 1\n },\n {\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3429,\n 3496\n ]\n },\n \"properties\": {\n \"_id\": \"4\",\n \"_index\": \"museums\",\n \"name\": \"Amsterdam Centre for Architecture\",\n \"price\": 0\n },\n \"type\": 1\n }\n ]\n },\n \"aggs\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 3072,\n 3072\n ],\n [\n 4096,\n 3072\n ],\n [\n 4096,\n 4096\n ],\n [\n 3072,\n 4096\n ],\n [\n 3072,\n 3072\n ]\n ]\n ]\n },\n \"properties\": {\n \"_count\": 3,\n \"max_price.value\": 1750.0,\n \"min_price.value\": 0.0,\n \"avg_price.value\": 1133.3333333333333\n },\n \"type\": 3\n }\n ]\n },\n \"meta\": {\n \"extent\": 4096,\n \"version\": 2,\n \"features\": [\n {\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 0,\n 0\n ],\n [\n 4096,\n 0\n ],\n [\n 4096,\n 4096\n ],\n [\n 0,\n 4096\n ],\n [\n 0,\n 0\n ]\n ]\n ]\n },\n \"properties\": {\n \"_shards.failed\": 0,\n \"_shards.skipped\": 0,\n \"_shards.successful\": 1,\n \"_shards.total\": 1,\n \"aggregations._count.avg\": 3.0,\n \"aggregations._count.count\": 1,\n \"aggregations._count.max\": 3.0,\n \"aggregations._count.min\": 3.0,\n \"aggregations._count.sum\": 3.0,\n \"aggregations.avg_price.avg\": 1133.3333333333333,\n \"aggregations.avg_price.count\": 1,\n \"aggregations.avg_price.max\": 1133.3333333333333,\n \"aggregations.avg_price.min\": 1133.3333333333333,\n \"aggregations.avg_price.sum\": 1133.3333333333333,\n \"aggregations.max_price.avg\": 1750.0,\n \"aggregations.max_price.count\": 1,\n \"aggregations.max_price.max\": 1750.0,\n \"aggregations.max_price.min\": 1750.0,\n \"aggregations.max_price.sum\": 1750.0,\n \"aggregations.min_price.avg\": 0.0,\n \"aggregations.min_price.count\": 1,\n \"aggregations.min_price.max\": 0.0,\n \"aggregations.min_price.min\": 0.0,\n \"aggregations.min_price.sum\": 0.0,\n \"hits.max_score\": 0.0,\n \"hits.total.relation\": \"eq\",\n \"hits.total.value\": 3,\n \"timed_out\": false,\n \"took\": 2\n },\n \"type\": 3\n }\n ]\n }\n}" + "minProperties": 1, + "maxProperties": 1 + }, + "simple_query_string": { + "description": "Returns roles based on a provided query string, using a parser with a limited but fault-tolerant syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringQuery" } - } - } - } - }, - "search_shards-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.search_shards.SearchShardsNodeAttributes" - } - }, - "shards": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.NodeShard" - } - } - }, - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.search_shards.ShardStoreIndex" - } - } - }, - "required": [ - "nodes", - "shards", - "indices" - ] + ] + }, + "term": { + "description": "Returns roles that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.TermQuery" }, - "examples": { - "SearchShardsResponseExample1": { - "description": "An abbreviated response from `GET /my-index-000001/_search_shards`.", - "value": "{\n \"nodes\": {},\n \"indices\": {\n \"my-index-000001\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 0,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 1,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"Nwl0wbMBTHCWjEEbGYGapg\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"bU_KLGJISbW0RejwnwDPKw\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ],\n [\n {\n \"index\": \"my-index-000001\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"relocating_node\": null,\n \"primary\": true,\n \"shard\": 4,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"DMs7_giNSwmdqVukF7UydA\"},\n \"relocation_failure_info\" : {\n \"failed_attempts\" : 0\n }\n }\n ]\n ]\n }" + "minProperties": 1, + "maxProperties": 1 + }, + "terms": { + "description": "Returns roles that contain one or more exact terms in a provided field.\nTo return a document, one or more terms must exactly match a field value, including whitespace and capitalization.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.TermsQuery" } - } + ] + }, + "wildcard": { + "description": "Returns roles that contain terms matching a wildcard pattern.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.WildcardQuery" + }, + "minProperties": 1, + "maxProperties": 1 } - } + }, + "minProperties": 1, + "maxProperties": 1 }, - "search_template-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "took": { - "type": "number" - }, - "timed_out": { - "type": "boolean" - }, - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "hits": { - "$ref": "#/components/schemas/_global.search._types.HitsMetadata" - }, - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.Aggregate" - } - }, - "_clusters": { - "$ref": "#/components/schemas/_types.ClusterStatistics" - }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "max_score": { - "type": "number" - }, - "num_reduce_phases": { - "type": "number" - }, - "profile": { - "$ref": "#/components/schemas/_global.search._types.Profile" - }, - "pit_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_scroll_id": { - "$ref": "#/components/schemas/_types.ScrollId" - }, - "suggest": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Suggest" - } + "security.query_role.QueryRole": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleDescriptor" + }, + { + "type": "object", + "properties": { + "_sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" } - }, - "terminated_early": { - "type": "boolean" - } + ] }, - "required": [ - "took", - "timed_out", - "_shards", - "hits" - ] - } + "name": { + "description": "Name of the role.", + "type": "string" + } + }, + "required": [ + "name" + ] } - } + ] }, - "searchable_snapshots.cache_stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/searchable_snapshots.cache_stats.Node" - } - } - }, - "required": [ - "nodes" - ] + "security.query_user.UserQueryContainer": { + "type": "object", + "properties": { + "ids": { + "description": "Returns users based on their IDs.\nThis query uses the user document IDs stored in the `_id` field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.IdsQuery" + } + ] + }, + "bool": { + "description": "matches users matching boolean combinations of other queries.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.BoolQuery" + } + ] + }, + "exists": { + "description": "Returns users that contain an indexed value for a field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.ExistsQuery" + } + ] + }, + "match": { + "description": "Returns users that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.MatchQuery" }, - "examples": { - "CacheStatsResponseExample1": { - "description": "A successful response from `GET /_searchable_snapshots/cache/stats`.", - "value": "{\n \"nodes\" : {\n \"eerrtBMtQEisohZzxBLUSw\" : {\n \"shared_cache\" : {\n \"reads\" : 6051,\n \"bytes_read_in_bytes\" : 5448829,\n \"writes\" : 37,\n \"bytes_written_in_bytes\" : 1208320,\n \"evictions\" : 5,\n \"num_regions\" : 65536,\n \"size_in_bytes\" : 1099511627776,\n \"region_size_in_bytes\" : 16777216\n }\n }\n }\n}" + "minProperties": 1, + "maxProperties": 1 + }, + "match_all": { + "description": "Matches all users, giving them all a `_score` of 1.0.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.MatchAllQuery" } - } - } - } - }, - "searchable_snapshots.clear_cache-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } + ] + }, + "prefix": { + "description": "Returns users that contain a specific prefix in a provided field.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.PrefixQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "range": { + "description": "Returns users that contain terms within a provided range.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.RangeQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "simple_query_string": { + "description": "Returns users based on a provided query string, using a parser with a limited but fault-tolerant syntax.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.SimpleQueryStringQuery" + } + ] + }, + "term": { + "description": "Returns users that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.TermQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "terms": { + "description": "Returns users that contain one or more exact terms in a provided field.\nTo return a document, one or more terms must exactly match a field value, including whitespace and capitalization.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.TermsQuery" + } + ] + }, + "wildcard": { + "description": "Returns users that contain terms matching a wildcard pattern.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl.WildcardQuery" + }, + "minProperties": 1, + "maxProperties": 1 } - } + }, + "minProperties": 1, + "maxProperties": 1 }, - "searchable_snapshots.stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "stats": { - "type": "object" - }, - "total": { - "type": "object" - } - }, - "required": [ - "stats", - "total" - ] + "security.query_user.QueryUser": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.User" + }, + { + "type": "object", + "properties": { + "_sort": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SortResults" + } + ] + } } } - } + ] }, - "security.change_password-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" + "security.suggest_user_profiles.Hint": { + "type": "object", + "properties": { + "uids": { + "description": "A list of profile UIDs to match against.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.UserProfileId" } - } - } - }, - "security.create_api_key-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "api_key": { - "description": "Generated API key.", + }, + "labels": { + "description": "A single key-value pair to match against the labels section\nof a profile. A profile is considered matching if it matches\nat least one of the strings.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { "type": "string" }, - "expiration": { - "description": "Expiration in milliseconds for the API key.", - "type": "number" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "encoded": { - "description": "API key credentials which is the base64-encoding of\nthe UTF-8 representation of `id` and `api_key` joined\nby a colon (`:`).", - "type": "string" + { + "type": "array", + "items": { + "type": "string" + } } - }, - "required": [ - "api_key", - "id", - "name", - "encoded" ] - }, - "examples": { - "SecurityCreateApiKeyResponseExample1": { - "description": "A successful response from `POST /_security/api_key`.", - "value": "{\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\", \n \"name\": \"my-api-key\",\n \"expiration\": 1544068612110, \n \"api_key\": \"ui2lp2axTNmsyakw9tvNnw\", \n \"encoded\": \"VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw==\" \n}" - } } } } }, - "security.create_service_token-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "created": { - "type": "boolean" - }, - "token": { - "$ref": "#/components/schemas/security.create_service_token.Token" - } - }, - "required": [ - "created", - "token" - ] - }, - "examples": { - "CreateServiceTokenRequestExample1": { - "description": "A successful response from `POST /_security/service/elastic/fleet-server/credential/token/token1`. The response includes the service account token, its name, and its secret value as a bearer token.\n", - "value": "{\n \"created\": true,\n \"token\": {\n \"name\": \"token1\",\n \"value\": \"AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ\" \n }\n}" + "security.suggest_user_profiles.TotalUserProfiles": { + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "relation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RelationName" } - } + ] } - } + }, + "required": [ + "value", + "relation" + ] }, - "security.disable_user-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } + "simulate.ingest.MergeType": { + "type": "string", + "enum": [ + "index", + "template" + ] }, - "security.disable_user_profile-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } + "simulate.ingest.SimulateIngestDocumentResult": { + "type": "object", + "properties": { + "doc": { + "allOf": [ + { + "$ref": "#/components/schemas/simulate.ingest.IngestDocumentSimulation" + } + ] } } }, - "security.enable_user-200": { - "description": "", - "content": { - "application/json": { - "schema": { + "simulate.ingest.IngestDocumentSimulation": { + "description": "The results of ingest simulation on a single document. The _source of the document contains\nthe results after running all pipelines listed in executed_pipelines on the document. The\nlist of executed pipelines is derived from the pipelines that would be executed if this\ndocument had been ingested into _index.", + "type": "object", + "properties": { + "_id": { + "description": "Identifier for the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "_index": { + "description": "Name of the index that the document would be indexed into if this were not a simulation.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "_source": { + "description": "JSON body for the document.", + "type": "object", + "additionalProperties": { "type": "object" } - } - } - }, - "security.enable_user_profile-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - }, - "security.get_privileges-200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "_version": { + "description": "", + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.StringifiedVersionNumber" + } + ] + }, + "executed_pipelines": { + "description": "A list of the names of the pipelines executed on this document.", + "type": "array", + "items": { + "type": "string" + } + }, + "ignored_fields": { + "description": "A list of the fields that would be ignored at the indexing step. For example, a field whose\nvalue is larger than the allowed limit would make it through all of the pipelines, but\nwould not be indexed into Elasticsearch.", + "type": "array", + "items": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.put_privileges.Actions" - } - } - }, - "examples": { - "SecurityGetPrivilegesResponseExample1": { - "description": "A successful response from `GET /_security/privilege/myapp/read`. The response contains information about the `read` privilege for the `app01` application.\n", - "value": "{\n \"myapp\": {\n \"read\": {\n \"application\": \"myapp\",\n \"name\": \"read\",\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" + "type": "string" } } + }, + "error": { + "description": "Any error resulting from simulatng ingest on this doc. This can be an error generated by\nexecuting a processor, or a mapping validation error when simulating indexing the resulting\ndoc.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + }, + "effective_mapping": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.TypeMapping" + } + ] } - } + }, + "required": [ + "_id", + "_index", + "_source", + "_version", + "executed_pipelines" + ] }, - "security.get_role-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.get_role.Role" + "slm._types.SnapshotLifecycle": { + "type": "object", + "properties": { + "in_progress": { + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.InProgress" } - }, - "examples": { - "SecurityGetRoleResponseExample1": { - "description": "A successful response from `GET /_security/role/my_admin_role`. The response contains information about the `my_admin_role` role in the native realm.\n", - "value": "{\n \"my_admin_role\": {\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\" : [ \"all\" ],\n \"indices\" : [\n {\n \"names\" : [ \"index1\", \"index2\" ],\n \"privileges\" : [ \"all\" ],\n \"allow_restricted_indices\" : false,\n \"field_security\" : {\n \"grant\" : [ \"title\", \"body\" ]}\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ \"other_user\" ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n}" + ] + }, + "last_failure": { + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Invocation" } - } + ] + }, + "last_success": { + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Invocation" + } + ] + }, + "modified_date": { + "description": "The last time the policy was modified.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "modified_date_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "next_execution": { + "description": "The next time the policy will run.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "next_execution_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "policy": { + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Policy" + } + ] + }, + "version": { + "description": "The version of the snapshot policy.\nOnly the latest version is stored and incremented when the policy is updated.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Statistics" + } + ] } - } + }, + "required": [ + "modified_date_millis", + "next_execution_millis", + "policy", + "version", + "stats" + ] }, - "security.get_role_mapping-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleMapping" + "slm._types.InProgress": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - }, - "examples": { - "SecurityGetRoleMappingResponseExample1": { - "description": "A successful response from `GET /_security/role_mapping/mapping1`.", - "value": "{\n \"mapping1\": {\n \"enabled\": true,\n \"roles\": [\n \"user\"\n ],\n \"rules\": {\n \"field\": {\n \"username\": \"*\"\n }\n },\n \"metadata\": {}\n }\n}" + ] + }, + "start_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } - } + ] + }, + "state": { + "type": "string" + }, + "uuid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" + } + ] } - } + }, + "required": [ + "name", + "start_time_millis", + "state", + "uuid" + ] }, - "security.get_service_accounts-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.get_service_accounts.RoleDescriptorWrapper" + "slm._types.Invocation": { + "type": "object", + "properties": { + "snapshot_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - }, - "examples": { - "GetServiceAccountsResponseExample1": { - "description": "A successful response from `GET /_security/service/elastic/fleet-server`. The response contains information about the `elastic/fleet-server` service account.\n", - "value": "{\n \"elastic/fleet-server\": {\n \"role_descriptor\": {\n \"cluster\": [\n \"monitor\",\n \"manage_own_api_key\",\n \"read_fleet_secrets\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"logs-*\",\n \"metrics-*\",\n \"traces-*\",\n \".logs-endpoint.diagnostic.collection-*\",\n \".logs-endpoint.action.responses-*\",\n \".logs-endpoint.heartbeat-*\"\n ],\n \"privileges\": [\n \"write\",\n \"create_index\",\n \"auto_configure\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \"profiling-*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \"traces-apm.sampled-*\"\n ],\n \"privileges\": [\n \"read\",\n \"monitor\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": false\n },\n {\n \"names\": [\n \".fleet-secrets*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-actions*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-agents*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-artifacts*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-enrollment-api-keys*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-policies*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-policies-leader*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-servers*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \".fleet-fileds*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"monitor\",\n \"create_index\",\n \"auto_configure\",\n \"maintenance\"\n ],\n \"allow_restricted_indices\": true\n },\n {\n \"names\": [\n \"synthetics-*\"\n ],\n \"privileges\": [\n \"read\",\n \"write\",\n \"create_index\",\n \"auto_configure\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [\n {\n \"application\": \"kibana-*\",\n \"privileges\": [\n \"reserved_fleet-setup\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [],\n \"metadata\": {},\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n}" + ] + }, + "time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" } - } + ] } - } + }, + "required": [ + "snapshot_name", + "time" + ] }, - "security.get_user-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.User" + "slm._types.Policy": { + "type": "object", + "properties": { + "config": { + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Configuration" } - }, - "examples": { - "SecurityGetUserResponseExample1": { - "description": "A successful response from `GET /_security/user/jacknich?with_profile_uid=true`. It includes the user `profile_uid` as part of the response.\n", - "value": "{\n \"jacknich\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": { \"intelligence\" : 7 },\n \"enabled\": true,\n \"profile_uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n }\n}" + ] + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } + ] + }, + "repository": { + "type": "string" + }, + "retention": { + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Retention" + } + ] + }, + "schedule": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.CronExpression" + } + ] } - } + }, + "required": [ + "name", + "repository", + "schedule" + ] }, - "security.has_privileges-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "application": { - "$ref": "#/components/schemas/security.has_privileges.ApplicationsPrivileges" - }, - "cluster": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "has_all_requested": { - "type": "boolean" - }, - "index": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.has_privileges.Privileges" - } - }, - "username": { - "$ref": "#/components/schemas/_types.Username" - } - }, - "required": [ - "application", - "cluster", - "has_all_requested", - "index", - "username" - ] - }, - "examples": { - "SecurityHasPrivilegesResponseExample1": { - "description": "A successful response from `GET /_security/user/_has_privileges`, which lists the privileges for the `rdeniro` user.", - "value": "{\n \"username\": \"rdeniro\",\n \"has_all_requested\" : false,\n \"cluster\" : {\n \"monitor\" : true,\n \"manage\" : false\n },\n \"index\" : {\n \"suppliers\" : {\n \"read\" : true\n },\n \"products\" : {\n \"read\" : true\n },\n \"inventory\" : {\n \"read\" : true,\n \"write\" : false\n }\n },\n \"application\" : {\n \"inventory_manager\" : {\n \"product/1852563\" : {\n \"read\": false,\n \"data:write/inventory\": false\n }\n }\n }\n}" + "slm._types.Configuration": { + "type": "object", + "properties": { + "ignore_unavailable": { + "description": "If false, the snapshot fails if any data stream or index in indices is missing or closed. If true, the snapshot ignores missing or closed data streams and indices.", + "default": false, + "type": "boolean" + }, + "indices": { + "description": "A comma-separated list of data streams and indices to include in the snapshot. Multi-index syntax is supported.\nBy default, a snapshot includes all data streams and indices in the cluster. If this argument is provided, the snapshot only includes the specified data streams and clusters.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" } + ] + }, + "include_global_state": { + "description": "If true, the current global state is included in the snapshot.", + "default": true, + "type": "boolean" + }, + "feature_states": { + "description": "A list of feature states to be included in this snapshot. A list of features available for inclusion in the snapshot and their descriptions be can be retrieved using the get features API.\nEach feature state includes one or more system indices containing data necessary for the function of that feature. Providing an empty array will include no feature states in the snapshot, regardless of the value of include_global_state. By default, all available feature states will be included in the snapshot if include_global_state is true, or no feature states if include_global_state is false.", + "type": "array", + "items": { + "type": "string" } + }, + "metadata": { + "description": "Attaches arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. Metadata must be less than 1024 bytes.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "partial": { + "description": "If false, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available.", + "default": false, + "type": "boolean" } } }, - "security.has_privileges_user_profile-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "has_privilege_uids": { - "description": "The subset of the requested profile IDs of the users that\nhave all the requested privileges.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.UserProfileId" - } - }, - "errors": { - "$ref": "#/components/schemas/security.has_privileges_user_profile.HasPrivilegesUserProfileErrors" - } - }, - "required": [ - "has_privilege_uids" - ] - }, - "examples": { - "HasPrivilegesUserProfileResponseExample1": { - "description": "A response from `POST /_security/profile/_has_privileges` that indicates only one of the three users has all the privileges and one of them is not found.\n", - "value": "{\n \"has_privilege_uids\": [\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\"],\n \"errors\": {\n \"count\": 1,\n \"details\": {\n \"u_does-not-exist_0\": {\n \"type\": \"resource_not_found_exception\",\n \"reason\": \"profile document not found\"\n }\n }\n }\n}" + "slm._types.Retention": { + "type": "object", + "properties": { + "expire_after": { + "description": "Time period after which a snapshot is considered expired and eligible for deletion. SLM deletes expired snapshots based on the slm.retention_schedule.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - } + ] + }, + "max_count": { + "description": "Maximum number of snapshots to retain, even if the snapshots have not yet expired. If the number of snapshots in the repository exceeds this limit, the policy retains the most recent snapshots and deletes older snapshots.", + "type": "number" + }, + "min_count": { + "description": "Minimum number of snapshots to retain, even if the snapshots have expired.", + "type": "number" } - } + }, + "required": [ + "expire_after", + "max_count", + "min_count" + ] }, - "security.put_privileges-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.CreatedStatus" - } + "watcher._types.CronExpression": { + "type": "string" + }, + "slm._types.Statistics": { + "type": "object", + "properties": { + "retention_deletion_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "examples": { - "SecurityPutPrivilegesResponseExample1": { - "description": "A successful response from `PUT /_security/privilege`.", - "value": "{\n \"myapp\": {\n \"read\": {\n \"created\": true \n }\n }\n}" - }, - "SecurityPutPrivilegesResponseExample2": { - "description": "A successful response from `PUT /_security/privilege`. The `created` property indicates whether the privileges have been created or updated.\n", - "value": "{\n \"app02\": {\n \"all\": {\n \"created\": true\n }\n },\n \"app01\": {\n \"read\": {\n \"created\": true\n },\n \"write\": {\n \"created\": true\n }\n }\n}" + ] + }, + "retention_deletion_time_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - } - } - } - }, - "security.put_role-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "role": { - "$ref": "#/components/schemas/security._types.CreatedStatus" - } - }, - "required": [ - "role" - ] - }, - "examples": { - "SecurityPutRoleResponseExample1": { - "description": "A successful response from `POST /_security/role/my_admin_role`.", - "value": "{\n \"role\": {\n \"created\": true \n }\n}" + ] + }, + "retention_failed": { + "type": "number" + }, + "retention_runs": { + "type": "number" + }, + "retention_timed_out": { + "type": "number" + }, + "policy": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - } + ] + }, + "total_snapshots_deleted": { + "type": "number" + }, + "total_snapshot_deletion_failures": { + "type": "number" + }, + "total_snapshots_failed": { + "type": "number" + }, + "total_snapshots_taken": { + "type": "number" } } }, - "security.put_role_mapping-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "created": { - "type": "boolean" - }, - "role_mapping": { - "$ref": "#/components/schemas/security._types.CreatedStatus" - } - }, - "required": [ - "role_mapping" - ] - }, - "examples": { - "SecurityPutRoleMappingResponseExample1": { - "description": "A successful response from `POST /_security/role_mapping/mapping1`.", - "value": "{\n \"role_mapping\" : {\n \"created\" : true \n }\n}" - } - } + "slm._types.SnapshotPolicyStats": { + "type": "object", + "properties": { + "policy": { + "type": "string" + }, + "snapshots_taken": { + "type": "number" + }, + "snapshots_failed": { + "type": "number" + }, + "snapshots_deleted": { + "type": "number" + }, + "snapshot_deletion_failures": { + "type": "number" } - } + }, + "required": [ + "policy", + "snapshots_taken", + "snapshots_failed", + "snapshots_deleted", + "snapshot_deletion_failures" + ] }, - "security.put_user-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "created": { - "description": "A successful call returns a JSON structure that shows whether the user has been created or updated.\nWhen an existing user is updated, `created` is set to `false`.", - "type": "boolean" - } - }, - "required": [ - "created" - ] - }, - "examples": { - "SecurityPutUserResponseExample1": { - "description": "A successful response from `POST /_security/user/jacknich`. When an existing user is updated, `created` is set to `false`.\n", - "value": "{\n \"created\": true \n}" - } - } + "snapshot.cleanup_repository.CleanupRepositoryResults": { + "type": "object", + "properties": { + "deleted_blobs": { + "description": "The number of binary large objects (blobs) removed from the snapshot repository during cleanup operations.\nA non-zero value indicates that unreferenced blobs were found and subsequently cleaned up.", + "type": "number" + }, + "deleted_bytes": { + "description": "The number of bytes freed by cleanup operations.", + "type": "number" } - } + }, + "required": [ + "deleted_blobs", + "deleted_bytes" + ] }, - "security.query_api_keys-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "description": "The total number of API keys found.", - "type": "number" - }, - "count": { - "description": "The number of API keys returned in the response.", - "type": "number" - }, - "api_keys": { - "description": "A list of API key information.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ApiKey" - } - }, - "aggregations": { - "description": "The aggregations result, if requested.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregate" - } - } - }, - "required": [ - "total", - "count", - "api_keys" - ] - }, - "examples": { - "QueryApiKeysResponseExample1": { - "summary": "Query API keys by ID", - "description": "A successful response from `GET /_security/_query/api_key?with_limited_by=true`. The `limited_by` details are the owner user's permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key's effective permissions are an intersection of its assigned privileges and the owner user's permissions.\n", - "value": "{\n \"api_keys\": [\n {\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\",\n \"name\": \"application-key-1\",\n \"creation\": 1548550550158,\n \"expiration\": 1548551550158,\n \"invalidated\": false,\n \"username\": \"myuser\",\n \"realm\": \"native1\",\n \"realm_type\": \"native\",\n \"metadata\": {\n \"application\": \"my-application\"\n },\n \"role_descriptors\": { },\n \"limited_by\": [ \n {\n \"role-power-user\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n ]\n }\n ]\n}" - }, - "QueryApiKeysResponseExample2": { - "summary": "Query API keys with pagination", - "description": "An abbreviated response from `GET /_security/_query/api_key` that contains a list of matched API keys along with their sort values. The first sort value is creation time, which is displayed in `date_time` format. The second sort value is the API key name.\n", - "value": "{\n \"total\": 100,\n \"count\": 10,\n \"api_keys\": [\n {\n \"id\": \"CLXgVnsBOGkf8IyjcXU7\",\n \"name\": \"app1-key-79\",\n \"creation\": 1629250154811,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:14.811Z\", \n \"app1-key-79\" \n ]\n },\n {\n \"id\": \"BrXgVnsBOGkf8IyjbXVB\",\n \"name\": \"app1-key-78\",\n \"creation\": 1629250153794,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:13.794Z\",\n \"app1-key-78\"\n ]\n }\n ]\n}" - }, - "QueryApiKeysResponseExample3": { - "summary": "Query all API keys", - "description": "A successful response from `GET /_security/_query/api_key`. It includes the role descriptors that are assigned to each API key when it was created or last updated. Note that an API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of the owner user's permissions. An empty role descriptors object means the API key inherits the owner user's permissions.\n", - "value": "{\n \"total\": 3,\n \"count\": 3,\n \"api_keys\": [ \n {\n \"id\": \"nkvrGXsB8w290t56q3Rg\",\n \"name\": \"my-api-key-1\",\n \"creation\": 1628227480421,\n \"expiration\": 1629091480421,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"realm_type\": \"reserved\",\n \"metadata\": {\n \"letter\": \"a\"\n },\n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n },\n {\n \"id\": \"oEvrGXsB8w290t5683TI\",\n \"name\": \"my-api-key-2\",\n \"creation\": 1628227498953,\n \"expiration\": 1628313898953,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"metadata\": {\n \"letter\": \"b\"\n },\n \"role_descriptors\": { } \n }\n ]\n}" - } + "snapshot._types.SnapshotInfo": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "type": "string" } - } - } - }, - "security.query_role-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "description": "The total number of roles found.", - "type": "number" - }, - "count": { - "description": "The number of roles returned in the response.", - "type": "number" - }, - "roles": { - "description": "A list of roles that match the query.\nThe returned role format is an extension of the role definition format.\nIt adds the `transient_metadata.enabled` and the `_sort` fields.\n`transient_metadata.enabled` is set to `false` in case the role is automatically disabled, for example when the role grants privileges that are not allowed by the installed license.\n`_sort` is present when the search query sorts on some field.\nIt contains the array of values that have been used for sorting.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security.query_role.QueryRole" - } - } - }, - "required": [ - "total", - "count", - "roles" - ] - }, - "examples": { - "QueryRolesResponseExample1": { - "summary": "Query roles by name", - "description": "A successful response from `POST /_security/_query/role`. It returns a JSON structure that contains the information retrieved for one or more roles.\n", - "value": "{\n \"total\": 2,\n \"count\": 2,\n \"roles\": [ \n {\n \"name\" : \"my_admin_role\",\n \"cluster\" : [\n \"all\"\n ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [\n \"other_user\"\n ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants full access to all management features within the cluster.\",\n \"_sort\" : [\n \"my_admin_role\"\n ]\n },\n {\n \"name\" : \"my_user_role\",\n \"cluster\" : [ ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants user access to some indicies.\",\n \"_sort\" : [\n \"my_user_role\"\n ]\n }\n ]\n}" - }, - "QueryRolesResponseExample2": { - "summary": "Query roles by description", - "description": "A successful response from `POST /_security/_query/role`.\n", - "value": "{\n \"total\": 2,\n \"count\": 1,\n \"roles\": [\n {\n \"name\" : \"my_user_role\",\n \"cluster\" : [ ],\n \"indices\" : [\n {\n \"names\" : [\n \"index1\",\n \"index2\"\n ],\n \"privileges\" : [\n \"all\"\n ],\n \"field_security\" : {\n \"grant\" : [\n \"title\",\n \"body\"\n ]\n },\n \"allow_restricted_indices\" : false\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\" : {\n \"enabled\" : true\n },\n \"description\" : \"Grants user access to some indicies.\"\n }\n ]\n}" + }, + "duration": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "duration_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "end_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "end_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } + ] + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot._types.SnapshotShardFailure" + } + }, + "include_global_state": { + "type": "boolean" + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } + }, + "index_details": { + "x-state": "Generally available; Added in 7.13.0", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/snapshot._types.IndexDetails" } - } - } - }, - "security.query_user-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "description": "The total number of users found.", - "type": "number" - }, - "count": { - "description": "The number of users returned in the response.", - "type": "number" - }, - "users": { - "description": "A list of users that match the query.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security.query_user.QueryUser" - } - } - }, - "required": [ - "total", - "count", - "users" - ] - }, - "examples": { - "SecurityQueryUserResponseExample1": { - "summary": "Query users by role prefix", - "description": "A successful response from `POST /_security/_query/user?with_profile_uid=true` that contains users that have roles that are prefixed with `other`. It also includes the user `profile_uid` in the response.\n", - "value": "{\n \"total\": 1,\n \"count\": 1,\n \"users\": [\n {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"profile_uid\": \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n }\n ]\n}" - }, - "SecurityQueryUserResponseExample2": { - "summary": "Query users with multiple conditions", - "description": "A successful response from `POST /_security/_query/user` that uses a `bool` query to issue complex logical conditions and uses `from`, `size`, and `sort` to help paginate the result. The sort value is `username`.\n", - "value": "{\n \"total\": 5,\n \"count\": 2,\n \"users\": [\n {\n \"username\": \"ray\",\n \"roles\": [\n \"other_role3\"\n ],\n \"full_name\": \"Ray Nicholson\",\n \"email\": \"rayn@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"_sort\": [\n \"ray\" \n ]\n },\n {\n \"username\": \"lorraine\",\n \"roles\": [\n \"other_role3\"\n ],\n \"full_name\": \"Lorraine Nicholson\",\n \"email\": \"lorraine@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true,\n \"_sort\": [\n \"lorraine\"\n ]\n }\n ]\n}" - }, - "SecurityQueryUserResponseExample3": { - "summary": "Query all users", - "description": "A successful response from `GET /_security/_query/user`, which lists all users. It returns a JSON structure that contains the information retrieved from one or more users.\n", - "value": "{\n \"total\": 2,\n \"count\": 2,\n \"users\": [ \n {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true\n },\n {\n \"username\": \"sandrakn\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Sandra Knight\",\n \"email\": \"sandrakn@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n },\n \"enabled\": true\n }\n ]\n}" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" } - } - } - } - }, - "security.suggest_user_profiles-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "$ref": "#/components/schemas/security.suggest_user_profiles.TotalUserProfiles" - }, - "took": { - "description": "The number of milliseconds it took Elasticsearch to run the request.", - "type": "number" - }, - "profiles": { - "description": "A list of profile documents, ordered by relevance, that match the search criteria.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.UserProfile" - } - } - }, - "required": [ - "total", - "took", - "profiles" - ] - }, - "examples": { - "SuggestUserProfilesResponseExample1": { - "description": "A successful response from `GET /_security/saml/metadata/saml1`. It contains the SAML metadata that was generated for the SAML realm as an XML string.\n", - "value": "{\n \"metadata\" : \"\"\n}" + ] + }, + "reason": { + "type": "string" + }, + "repository": { + "x-state": "Generally available; Added in 7.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } - } - } - }, - "security.update_user_profile_data-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "UpdateUserProfileDataResponseExample1": { - "description": "A successful response from `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data`, which indicates that the request is acknowledged.\n", - "value": "{\n \"acknowledged\": true\n}" + ] + }, + "snapshot": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" } - } - } - } - }, - "shutdown.get_node-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/shutdown.get_node.NodeShutdownStatus" - } - } - }, - "required": [ - "nodes" - ] - }, - "examples": { - "ShutdownGetNodeResponseExample1": { - "description": "Get the status of shutdown preparations with `GET /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown`. The response shows information about the shutdown preparations, including the status of shard migration, task migration, and plugin cleanup\n", - "value": "{\n \"nodes\": [\n {\n \"node_id\": \"USpTGYaBSIKbgSUJR2Z9lg\",\n \"type\": \"RESTART\",\n \"reason\": \"Demonstrating how the node shutdown API works\",\n \"shutdown_startedmillis\": 1624406108685,\n \"allocation_delay\": \"10m\",\n \"status\": \"COMPLETE\",\n \"shard_migration\": {\n \"status\": \"COMPLETE\",\n \"shard_migrations_remaining\": 0,\n \"explanation\": \"no shard relocation is necessary for a node restart\"\n },\n \"persistent_tasks\": {\n \"status\": \"COMPLETE\"\n },\n \"plugins\": {\n \"status\": \"COMPLETE\"\n }\n }\n ]\n}" + ] + }, + "shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" } - } - } - } - }, - "simulate.ingest-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/simulate.ingest.SimulateIngestDocumentResult" - } - } - }, - "required": [ - "docs" - ] - }, - "examples": { - "SimulateIngestResponseExample1": { - "summary": "Use an existing pipeline definition", - "description": "A successful response when the simulation uses pipeline definitions that are already in the system.", - "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"bar\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": \"-3,\",\n \"_source\": {\n \"field1\": \"value1\",\n \"field2\": \"value2\",\n \"foo\": \"rab\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" - }, - "SimulateIngestResponseExample2": { - "summary": "Use pipeline substitutions", - "description": "A successful response when the simulation uses pipeline substitutions.", - "value": "{\n \"docs\": [\n {\n \"doc\": null,\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"BAR\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n },\n {\n \"doc\": null,\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"field2\": \"value2\",\n \"foo\": \"RAB\"\n },\n \"executed_pipelines\": [\n \"my-pipeline\",\n \"my-final-pipeline\"\n ]\n }\n ]\n}" - }, - "SimulateIngestResponseExample3": { - "summary": "Use pipeline substitutions", - "description": "A successful response when the simulation uses pipeline substitutions.", - "value": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"foo\": \"foo\"\n },\n \"executed_pipelines\": []\n }\n },\n {\n \"doc\": {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_version\": -3,\n \"_source\": {\n \"bar\": \"rab\"\n },\n \"executed_pipelines\": []\n }\n }\n ]\n}" + ] + }, + "start_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" } - } - } - } - }, - "slm.get_lifecycle-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/slm._types.SnapshotLifecycle" + ] + }, + "start_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } - }, - "examples": { - "GetSnapshotLifecycleResponseExample1": { - "description": "A successful response from `GET _slm/policy/daily-snapshots?human`.", - "value": "{\n \"daily-snapshots\": {\n \"version\": 1,\n \"modified_date\": \"2099-05-06T01:30:00.000Z\",\n \"modified_date_millis\": 4081757400000,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"stats\": {\n \"policy\": \"daily-snapshots\",\n \"snapshots_taken\": 0,\n \"snapshots_failed\": 0,\n \"snapshots_deleted\": 0,\n \"snapshot_deletion_failures\": 0\n },\n \"next_execution\": \"2099-05-07T01:30:00.000Z\",\n \"next_execution_millis\": 4081843800000\n }\n}" + ] + }, + "state": { + "type": "string" + }, + "uuid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" } - } - } - } - }, - "snapshot.create-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accepted": { - "description": "Equals `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false`", - "type": "boolean" - }, - "snapshot": { - "$ref": "#/components/schemas/snapshot._types.SnapshotInfo" - } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" } - }, - "examples": { - "SnapshotCreateResponseExample1": { - "description": "A successful response from `PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true`.", - "value": "{\n \"snapshot\": {\n \"snapshot\": \"snapshot_2\",\n \"uuid\": \"vdRctLCxSketdKb54xw67g\",\n \"repository\": \"my_repository\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"feature_states\": [],\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n },\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-06-25T14:00:28.850Z\",\n \"start_time_in_millis\": 1593093628850,\n \"end_time\": \"2020-06-25T14:00:28.850Z\",\n \"end_time_in_millis\": 1593094752018,\n \"duration_in_millis\": 0,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n}" + ] + }, + "version_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" } + ] + }, + "feature_states": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot._types.InfoFeatureState" } } - } - }, - "snapshot.create_repository-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } + }, + "required": [ + "data_streams", + "snapshot", + "uuid" + ] }, - "snapshot.get_repository-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/snapshot._types.Repository" + "snapshot._types.SnapshotShardFailure": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - }, - "examples": { - "SnapshotGetRepositoryResponseExample1": { - "description": "A successful response from `GET /_snapshot/my_repository`.", - "value": "{\n \"my_repository\" : {\n \"type\" : \"fs\",\n \"uuid\" : \"0JLknrXbSUiVPuLakHjBrQ\",\n \"settings\" : {\n \"location\" : \"my_backup_location\"\n }\n }\n}" + ] + }, + "node_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - } - } - } - }, - "snapshot.status-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/snapshot._types.Status" - } - } - }, - "required": [ - "snapshots" - ] - }, - "examples": { - "SnapshotStatusResponseExample1": { - "description": "A successful response from `GET _snapshot/my_repository/snapshot_2/_status`. The response contains detailed status information for `snapshot_2` in the `my_repository` repository.\n", - "value": "{\n \"snapshots\" : [\n {\n \"snapshot\" : \"snapshot_2\",\n \"repository\" : \"my_repository\",\n \"uuid\" : \"lNeQD1SvTQCqqJUMQSwmGg\",\n \"state\" : \"SUCCESS\",\n \"include_global_state\" : false,\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326691,\n \"time_in_millis\" : 205\n },\n \"indices\" : {\n \"index_1\" : {\n \"shards_stats\" : {\n \"initializing\" : 0,\n \"started\" : 0,\n \"finalizing\" : 0,\n \"done\" : 1,\n \"failed\" : 0,\n \"total\" : 1\n },\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n },\n \"shards\" : {\n \"0\" : {\n \"stage\" : \"DONE\",\n \"stats\" : {\n \"incremental\" : {\n \"file_count\" : 3,\n \"size_in_bytes\" : 5969\n },\n \"total\" : {\n \"file_count\" : 4,\n \"size_in_bytes\" : 6024\n },\n \"start_time_in_millis\" : 1594829326896,\n \"time_in_millis\" : 0\n }\n }\n }\n }\n }\n }\n ]\n}" + ] + }, + "reason": { + "type": "string" + }, + "shard_id": { + "type": "number" + }, + "index_uuid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - } + ] + }, + "status": { + "type": "string" } - } + }, + "required": [ + "index", + "reason", + "shard_id", + "index_uuid", + "status" + ] }, - "sql.query-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "columns": { - "description": "Column headings for the search results. Each object is a column.", - "type": "array", - "items": { - "$ref": "#/components/schemas/sql._types.Column" - } - }, - "cursor": { - "description": "The cursor for the next set of paginated results.\nFor CSV, TSV, and TXT responses, this value is returned in the `Cursor` HTTP header.", - "type": "string" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "is_running": { - "description": "If `true`, the search is still running.\nIf `false`, the search has finished.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", - "type": "boolean" - }, - "is_partial": { - "description": "If `true`, the response does not contain complete search results.\nIf `is_partial` is `true` and `is_running` is `true`, the search is still running.\nIf `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.\nThis value is returned only for async and saved synchronous searches.\nFor CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.", - "type": "boolean" - }, - "rows": { - "description": "The values for the search results.", - "type": "array", - "items": { - "$ref": "#/components/schemas/sql._types.Row" - } - } - }, - "required": [ - "rows" - ] - } + "snapshot._types.IndexDetails": { + "type": "object", + "properties": { + "shard_count": { + "type": "number" + }, + "size": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "size_in_bytes": { + "type": "number" + }, + "max_segments_per_shard": { + "type": "number" } - } + }, + "required": [ + "shard_count", + "size_in_bytes", + "max_segments_per_shard" + ] }, - "sql.translate-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "size": { - "type": "number" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - } + "snapshot._types.InfoFeatureState": { + "type": "object", + "properties": { + "feature_name": { + "type": "string" + }, + "indices": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" } - } + ] } - } + }, + "required": [ + "feature_name", + "indices" + ] }, - "tasks.cancel-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/tasks._types.TaskListResponseBase" - } + "snapshot._types.Repository": { + "discriminator": { + "propertyName": "type", + "mapping": { + "azure": "#/components/schemas/snapshot._types.AzureRepository", + "fs": "#/components/schemas/snapshot._types.SharedFileSystemRepository", + "gcs": "#/components/schemas/snapshot._types.GcsRepository", + "s3": "#/components/schemas/snapshot._types.S3Repository", + "source": "#/components/schemas/snapshot._types.SourceOnlyRepository", + "url": "#/components/schemas/snapshot._types.ReadOnlyUrlRepository" } - } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/snapshot._types.AzureRepository" + }, + { + "$ref": "#/components/schemas/snapshot._types.GcsRepository" + }, + { + "$ref": "#/components/schemas/snapshot._types.S3Repository" + }, + { + "$ref": "#/components/schemas/snapshot._types.SharedFileSystemRepository" + }, + { + "$ref": "#/components/schemas/snapshot._types.ReadOnlyUrlRepository" + }, + { + "$ref": "#/components/schemas/snapshot._types.SourceOnlyRepository" + } + ] }, - "terms_enum-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_shards": { - "$ref": "#/components/schemas/_types.ShardStatistics" - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } + "snapshot._types.AzureRepository": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + }, + { + "type": "object", + "properties": { + "type": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/azure-repository" }, - "complete": { - "description": "If `false`, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.", - "type": "boolean" - } + "description": "The Azure repository type.", + "type": "string", + "enum": [ + "azure" + ] }, - "required": [ - "_shards", - "terms", - "complete" - ] - }, - "examples": { - "TermsEnumResponseExample1": { - "description": "A successful response from `POST stackoverflow/_terms_enum`.", - "value": "{\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"terms\": [\n \"kibana\"\n ],\n \"complete\" : true\n}" + "settings": { + "description": "The repository settings.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.AzureRepositorySettings" + } + ] } - } + }, + "required": [ + "type" + ] } - } + ] }, - "termvectors-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "found": { - "type": "boolean" - }, - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "term_vectors": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.termvectors.TermVector" - } - }, - "took": { - "type": "number" - }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - } + "snapshot._types.AzureRepositorySettings": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + }, + { + "type": "object", + "properties": { + "base_path": { + "description": "The path to the repository data within the container.\nIt defaults to the root directory.\n\nNOTE: Don't set `base_path` when configuring a snapshot repository for Elastic Cloud Enterprise.\nElastic Cloud Enterprise automatically generates the `base_path` for each deployment so that multiple deployments can share the same bucket.", + "type": "string" }, - "required": [ - "found", - "_index", - "took", - "_version" - ] - }, - "examples": { - "TermVectorsResponseExample1": { - "summary": "Return stored term vectors", - "description": "A successful response from `GET /my-index-000001/_termvectors/1`.", - "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 4,\n \"doc_count\": 2,\n \"sum_ttf\": 6\n },\n \"terms\": {\n \"test\": {\n \"doc_freq\": 2,\n \"ttf\": 4,\n \"term_freq\": 3,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 4,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 1,\n \"start_offset\": 5,\n \"end_offset\": 9,\n \"payload\": \"d29yZA==\"\n },\n {\n \"position\": 2,\n \"start_offset\": 10,\n \"end_offset\": 14,\n \"payload\": \"d29yZA==\"\n }\n ]\n }\n }\n }\n }\n}" + "client": { + "description": "The name of the Azure repository client to use.", + "default": "default", + "type": "string" }, - "TermVectorsResponseExample2": { - "summary": "Per-field analyzer", - "description": "A successful response from `GET /my-index-000001/_termvectors` with `per_field_analyzer` in the request body.", - "value": "{\n \"_index\": \"my-index-000001\",\n \"_version\": 0,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"fullname\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 2,\n \"doc_count\": 4,\n \"sum_ttf\": 4\n },\n \"terms\": {\n \"John Doe\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 8\n }\n ]\n }\n }\n }\n }\n}" + "container": { + "description": "The Azure container.", + "default": "elasticsearch-snapshots", + "type": "string" }, - "TermVectorsResponseExample3": { - "summary": "Terms filtering", - "description": "A successful response from `GET /my-index-000001/_termvectors` with a `filter` in the request body.", - "value": "{\n \"_index\": \"imdb\",\n \"_version\": 0,\n \"found\": true,\n \"term_vectors\": {\n \"plot\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 3384269,\n \"doc_count\": 176214,\n \"sum_ttf\": 3753460\n },\n \"terms\": {\n \"armored\": {\n \"doc_freq\": 27,\n \"ttf\": 27,\n \"term_freq\": 1,\n \"score\": 9.74725\n },\n \"industrialist\": {\n \"doc_freq\": 88,\n \"ttf\": 88,\n \"term_freq\": 1,\n \"score\": 8.590818\n },\n \"stark\": {\n \"doc_freq\": 44,\n \"ttf\": 47,\n \"term_freq\": 1,\n \"score\": 9.272792\n }\n }\n }\n }\n}" - } - } - } - } - }, - "text_structure.find_message_structure-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "charset": { - "type": "string" - }, - "ecs_compatibility": { - "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" - }, - "field_stats": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/text_structure._types.FieldStat" - } - }, - "format": { - "$ref": "#/components/schemas/text_structure._types.FormatType" - }, - "grok_pattern": { - "$ref": "#/components/schemas/_types.GrokPattern" - }, - "java_timestamp_formats": { - "type": "array", - "items": { - "type": "string" - } - }, - "joda_timestamp_formats": { - "type": "array", - "items": { - "type": "string" - } - }, - "ingest_pipeline": { - "$ref": "#/components/schemas/ingest._types.PipelineConfig" - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" - }, - "multiline_start_pattern": { - "type": "string" - }, - "need_client_timezone": { - "type": "boolean" - }, - "num_lines_analyzed": { - "type": "number" - }, - "num_messages_analyzed": { - "type": "number" - }, - "sample_start": { - "type": "string" - }, - "timestamp_field": { - "$ref": "#/components/schemas/_types.Field" - } + "delete_objects_max_size": { + "description": "The maxmimum batch size, between 1 and 256, used for `BlobBatch` requests.\nDefaults to 256 which is the maximum number supported by the Azure blob batch API.", + "default": 256.0, + "type": "number" }, - "required": [ - "charset", - "field_stats", - "format", - "ingest_pipeline", - "mappings", - "need_client_timezone", - "num_lines_analyzed", - "num_messages_analyzed", - "sample_start" - ] - }, - "examples": { - "FindMessageStructureResponseExample1": { - "description": "A successful response from `POST _text_structure/find_message_structure`.", - "value": "{\n \"num_lines_analyzed\" : 22,\n \"num_messages_analyzed\" : 22,\n \"sample_start\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\\n[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\\n\",\n \"charset\" : \"UTF-8\",\n \"format\" : \"semi_structured_text\",\n \"multiline_start_pattern\" : \"^\\\\[\\\\b\\\\d{4}-\\\\d{2}-\\\\d{2}[T ]\\\\d{2}:\\\\d{2}\",\n \"grok_pattern\" : \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\",\n \"ecs_compatibility\" : \"disabled\",\n \"timestamp_field\" : \"timestamp\",\n \"joda_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true,\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"loglevel\" : {\n \"type\" : \"keyword\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by text structure finder\",\n \"processors\" : [\n {\n \"grok\" : {\n \"field\" : \"message\",\n \"patterns\" : [\n \"\\\\[%{TIMESTAMP_ISO8601:timestamp}\\\\]\\\\[%{LOGLEVEL:loglevel} \\\\]\\\\[.*\"\n ],\n \"ecs_compatibility\" : \"disabled\"\n }\n },\n {\n \"date\" : {\n \"field\" : \"timestamp\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n },\n {\n \"remove\" : {\n \"field\" : \"timestamp\"\n }\n }\n ]\n },\n \"field_stats\" : {\n \"loglevel\" : {\n \"count\" : 22,\n \"cardinality\" : 1,\n \"top_hits\" : [\n {\n \"value\" : \"INFO\",\n \"count\" : 22\n }\n ]\n },\n \"message\" : {\n \"count\" : 22,\n \"cardinality\" : 22,\n \"top_hits\" : [\n {\n \"value\" : \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"count\" : 1\n },\n {\n \"value\" : \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"count\" : 1\n }\n ]\n },\n \"timestamp\" : {\n \"count\" : 22,\n \"cardinality\" : 14,\n \"earliest\" : \"2024-03-05T10:52:36,256\",\n \"latest\" : \"2024-03-05T10:52:49,199\",\n \"top_hits\" : [\n {\n \"value\" : \"2024-03-05T10:52:41,044\",\n \"count\" : 6\n },\n {\n \"value\" : \"2024-03-05T10:52:41,043\",\n \"count\" : 3\n },\n {\n \"value\" : \"2024-03-05T10:52:41,059\",\n \"count\" : 2\n },\n {\n \"value\" : \"2024-03-05T10:52:36,256\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,038\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:41,042\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:43,291\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:46,098\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,227\",\n \"count\" : 1\n },\n {\n \"value\" : \"2024-03-05T10:52:47,259\",\n \"count\" : 1\n }\n ]\n }\n }\n}" - } - } - } - } - }, - "text_structure.test_grok_pattern-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "matches": { - "type": "array", - "items": { - "$ref": "#/components/schemas/text_structure.test_grok_pattern.MatchedText" - } - } + "location_mode": { + "description": "Either `primary_only` or `secondary_only`.\nNote that if you set it to `secondary_only`, it will force `readonly` to `true`.", + "default": "primary_only", + "type": "string" }, - "required": [ - "matches" - ] - }, - "examples": { - "TestGrokPatternResponseExample1": { - "description": "A successful response from `GET _text_structure/test_grok_pattern`.", - "value": "{\n \"matches\": [\n {\n \"matched\": true,\n \"fields\": {\n \"first_name\": [\n {\n \"match\": \"John\",\n \"offset\": 6,\n \"length\": 4\n }\n ],\n \"last_name\": [\n {\n \"match\": \"Doe\",\n \"offset\": 11,\n \"length\": 3\n }\n ]\n }\n },\n {\n \"matched\": false\n }\n ]\n}" + "max_concurrent_batch_deletes": { + "description": "The maximum number of concurrent batch delete requests that will be submitted for any individual bulk delete with `BlobBatch`.\nNote that the effective number of concurrent deletes is further limited by the Azure client connection and event loop thread limits.\nDefaults to 10, minimum is 1, maximum is 100.", + "default": 10.0, + "type": "number" + }, + "readonly": { + "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, + "type": "boolean" } } } - } + ] }, - "transform.get_transform-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "transforms": { - "type": "array", - "items": { - "$ref": "#/components/schemas/transform.get_transform.TransformSummary" - } - } - }, - "required": [ - "count", - "transforms" - ] - }, - "examples": { - "GetTransformResponseExample1": { - "description": "A successful response that contains configuration information for a transform.", - "value": "{\n \"count\": 1,\n \"transforms\": [\n {\n \"id\": \"ecommerce_transform1\",\n \"authorization\": {\n \"roles\": [\n \"superuser\"\n ]\n },\n \"version\": \"8.4.0\",\n \"create_time\": 1656023416565,\n \"source\": {\n \"index\": [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"settings\": {},\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n }\n ]\n}" + "snapshot._types.RepositorySettingsBase": { + "type": "object", + "properties": { + "chunk_size": { + "description": "Big files can be broken down into multiple smaller blobs in the blob store during snapshotting.\nIt is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository.\nSetting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly.\nSpecify the chunk size as a byte unit, for example: `10MB`, `5KB`, 500B.\nThe default varies by repository type.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "compress": { + "description": "When set to `true`, metadata files are stored in compressed format.\nThis setting doesn't affect index files that are already compressed by default.", + "default": true, + "type": "boolean" + }, + "max_restore_bytes_per_sec": { + "description": "The maximum snapshot restore rate per node.\nIt defaults to unlimited.\nNote that restores are also throttled through recovery settings.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "max_snapshot_bytes_per_sec": { + "description": "The maximum snapshot creation rate per node.\nIt defaults to 40mb per second.\nNote that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" } - } + ] } } }, - "transform.preview_transform-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "generated_dest_index": { - "$ref": "#/components/schemas/indices._types.IndexState" - }, - "preview": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "required": [ - "generated_dest_index", - "preview" - ] - }, - "examples": { - "PreviewTransformResponseExample1": { - "description": "An abbreviated response from `POST _transform/_preview` that contains a preview a transform that uses the pivot method.", - "value": "{\n \"preview\": [\n {\n \"max_price\": 171,\n \"customer_id\": \"10\"\n },\n {\n \"max_price\": 233,\n \"customer_id\": \"11\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"12\"\n },\n {\n \"max_price\": 301,\n \"customer_id\": \"13\"\n },\n {\n \"max_price\": 176,\n \"customer_id\": \"14\"\n },\n {\n \"max_price\": 2250,\n \"customer_id\": \"15\"\n },\n {\n \"max_price\": 170,\n \"customer_id\": \"16\"\n },\n {\n \"max_price\": 243,\n \"customer_id\": \"17\"\n },\n {\n \"max_price\": 154,\n \"customer_id\": \"18\"\n },\n {\n \"max_price\": 393,\n \"customer_id\": \"19\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"20\"\n },\n {\n \"max_price\": 115,\n \"customer_id\": \"21\"\n },\n {\n \"max_price\": 192,\n \"customer_id\": \"22\"\n },\n {\n \"max_price\": 169,\n \"customer_id\": \"23\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"24\"\n },\n {\n \"max_price\": 278,\n \"customer_id\": \"25\"\n },\n {\n \"max_price\": 200,\n \"customer_id\": \"26\"\n },\n {\n \"max_price\": 344,\n \"customer_id\": \"27\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"28\"\n },\n {\n \"max_price\": 177,\n \"customer_id\": \"29\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"30\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"31\"\n },\n {\n \"max_price\": 205,\n \"customer_id\": \"32\"\n },\n {\n \"max_price\": 215,\n \"customer_id\": \"33\"\n },\n {\n \"max_price\": 270,\n \"customer_id\": \"34\"\n },\n {\n \"max_price\": 184,\n \"customer_id\": \"36\"\n },\n {\n \"max_price\": 222,\n \"customer_id\": \"37\"\n },\n {\n \"max_price\": 370,\n \"customer_id\": \"38\"\n },\n {\n \"max_price\": 240,\n \"customer_id\": \"39\"\n },\n {\n \"max_price\": 230,\n \"customer_id\": \"4\"\n },\n {\n \"max_price\": 229,\n \"customer_id\": \"41\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"42\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"43\"\n },\n {\n \"max_price\": 175,\n \"customer_id\": \"44\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"45\"\n },\n {\n \"max_price\": 150,\n \"customer_id\": \"46\"\n },\n {\n \"max_price\": 310,\n \"customer_id\": \"48\"\n },\n {\n \"max_price\": 223,\n \"customer_id\": \"49\"\n },\n {\n \"max_price\": 283,\n \"customer_id\": \"5\"\n },\n {\n \"max_price\": 185,\n \"customer_id\": \"50\"\n },\n {\n \"max_price\": 190,\n \"customer_id\": \"51\"\n },\n {\n \"max_price\": 333,\n \"customer_id\": \"52\"\n },\n {\n \"max_price\": 165,\n \"customer_id\": \"6\"\n },\n {\n \"max_price\": 144,\n \"customer_id\": \"7\"\n },\n {\n \"max_price\": 198,\n \"customer_id\": \"8\"\n },\n {\n \"max_price\": 210,\n \"customer_id\": \"9\"\n }\n ],\n \"generated_dest_index\": {\n \"mappings\": {\n \"_meta\": {\n \"_transform\": {\n \"transform\": \"transform-preview\",\n \"version\": {\n \"created\": \"10.0.0\"\n },\n \"creation_date_in_millis\": 1712948905889\n },\n \"created_by\": \"transform\"\n },\n \"properties\": {\n \"max_price\": {\n \"type\": \"half_float\"\n },\n \"customer_id\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"number_of_shards\": \"1\",\n \"auto_expand_replicas\": \"0-1\"\n }\n },\n \"aliases\": {}\n }\n}" + "snapshot._types.RepositoryBase": { + "type": "object", + "properties": { + "uuid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" } - } + ] } } }, - "watcher.ack_watch-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/watcher._types.WatchStatus" - } + "snapshot._types.GcsRepository": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + }, + { + "type": "object", + "properties": { + "type": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/google-cloud-storage-repository" + }, + "description": "The Google Cloud Storage repository type.", + "type": "string", + "enum": [ + "gcs" + ] }, - "required": [ - "status" - ] - }, - "examples": { - "WatcherAckWatchResponseExample1": { - "description": "A successful response from `POST _watcher/watch/my_watch/_ack`.", - "value": "{\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:04:27.723Z\"\n },\n \"last_checked\": \"2015-05-26T18:04:27.753Z\",\n \"last_met_condition\": \"2015-05-26T18:04:27.763Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\" : {\n \"timestamp\": \"2015-05-26T18:04:27.713Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.733Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.773Z\",\n \"successful\": true\n }\n }\n },\n \"execution_state\": \"executed\",\n \"version\": 2\n }\n}" + "settings": { + "description": "The repository settings.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.GcsRepositorySettings" + } + ] } - } + }, + "required": [ + "type", + "settings" + ] } - } + ] }, - "watcher.activate_watch-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/watcher._types.ActivationStatus" - } + "snapshot._types.GcsRepositorySettings": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + }, + { + "type": "object", + "properties": { + "bucket": { + "description": "The name of the bucket to be used for snapshots.", + "type": "string" }, - "required": [ - "status" - ] - } - } - } - }, - "watcher.deactivate_watch-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/watcher._types.ActivationStatus" - } + "application_name": { + "deprecated": true, + "description": "The name used by the client when it uses the Google Cloud Storage service.", + "type": "string" }, - "required": [ - "status" - ] - } - } - } - }, - "watcher.execute_watch-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "watch_record": { - "$ref": "#/components/schemas/watcher.execute_watch.WatchRecord" - } + "base_path": { + "description": "The path to the repository data within the bucket.\nIt defaults to the root of the bucket.\n\nNOTE: Don't set `base_path` when configuring a snapshot repository for Elastic Cloud Enterprise.\nElastic Cloud Enterprise automatically generates the `base_path` for each deployment so that multiple deployments can share the same bucket.", + "type": "string" }, - "required": [ - "_id", - "watch_record" - ] - }, - "examples": { - "WatcherExecuteWatchResponseExample1": { - "description": "A successful response from `POST _watcher/watch/my_watch/_execute`.\n", - "value": "{\n \"_id\": \"my_watch_0-2015-06-02T23:17:55.124Z\", \n \"watch_record\": { \n \"@timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"watch_id\": \"my_watch\",\n \"node\": \"my_node\",\n \"messages\": [],\n \"trigger_event\": {\n \"type\": \"manual\",\n \"triggered_time\": \"2015-06-02T23:17:55.124Z\",\n \"manual\": {\n \"schedule\": {\n \"scheduled_time\": \"2015-06-02T23:17:55.124Z\"\n }\n }\n },\n \"state\": \"executed\",\n \"status\": {\n \"version\": 1,\n \"execution_state\": \"executed\",\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-06-02T23:17:55.111Z\"\n },\n \"last_checked\": \"2015-06-02T23:17:55.124Z\",\n \"last_met_condition\": \"2015-06-02T23:17:55.124Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n },\n \"last_successful_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n }\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"result\": { \n \"execution_time\": \"2015-06-02T23:17:55.124Z\",\n \"execution_duration\": 12608,\n \"input\": {\n \"type\": \"simple\",\n \"payload\": {\n \"foo\": \"bar\"\n },\n \"status\": \"success\"\n },\n \"condition\": {\n \"type\": \"always\",\n \"met\": true,\n \"status\": \"success\"\n },\n \"actions\": [\n {\n \"id\": \"test_index\",\n \"index\": {\n \"response\": {\n \"index\": \"test\",\n \"version\": 1,\n \"created\": true,\n \"result\": \"created\",\n \"id\": \"AVSHKzPa9zx62AzUzFXY\"\n }\n },\n \"status\": \"success\",\n \"type\": \"index\"\n }\n ]\n },\n \"user\": \"test_admin\" \n }\n}" + "client": { + "description": "The name of the client to use to connect to Google Cloud Storage.", + "default": "default", + "type": "string" + }, + "readonly": { + "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, + "type": "boolean" } - } + }, + "required": [ + "bucket" + ] } - } + ] }, - "watcher.put_watch-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "created": { - "type": "boolean" - }, - "_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "_primary_term": { - "type": "number" - }, - "_seq_no": { - "$ref": "#/components/schemas/_types.SequenceNumber" + "snapshot._types.S3Repository": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + }, + { + "type": "object", + "properties": { + "type": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository" }, - "_version": { - "$ref": "#/components/schemas/_types.VersionNumber" - } + "description": "The S3 repository type.", + "type": "string", + "enum": [ + "s3" + ] }, - "required": [ - "created", - "_id", - "_primary_term", - "_seq_no", - "_version" - ] - } - } - } - }, - "watcher.query_watches-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "description": "The total number of watches found.", - "type": "number" - }, - "watches": { - "description": "A list of watches based on the `from`, `size`, or `search_after` request body parameters.", - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher._types.QueryWatch" + "settings": { + "description": "The repository settings.\n\nNOTE: In addition to the specified settings, you can also use all non-secure client settings in the repository settings.\nIn this case, the client settings found in the repository settings will be merged with those of the named client used by the repository.\nConflicts between client and repository settings are resolved by the repository settings taking precedence over client settings.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.S3RepositorySettings" } - } - }, - "required": [ - "count", - "watches" - ] - }, - "examples": { - "WatcherQueryWatchesResponseExample1": { - "description": "A successful response from `GET /_watcher/_query/watches`.", - "value": "{\n \"count\": 1,\n \"watches\": [\n {\n \"_id\": \"my_watch\",\n \"watch\": {\n \"trigger\": {\n \"schedule\": {\n \"hourly\": {\n \"minute\": [\n 0,\n 5\n ]\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"actions\": {\n \"test_index\": {\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n },\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:21:08.630Z\"\n },\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:21:08.630Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n },\n \"version\": -1\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n }\n ]\n}" + ] } - } + }, + "required": [ + "type", + "settings" + ] } - } + ] }, - "watcher.stats-200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_nodes": { - "$ref": "#/components/schemas/_types.NodeStatistics" + "snapshot._types.S3RepositorySettings": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + }, + { + "type": "object", + "properties": { + "bucket": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/AmazonS3/latest/userguide/BucketRestrictions.html#bucketnamingrules" }, - "cluster_name": { - "$ref": "#/components/schemas/_types.Name" + "description": "The name of the S3 bucket to use for snapshots.\nThe bucket name must adhere to Amazon's S3 bucket naming rules.", + "type": "string" + }, + "base_path": { + "description": "The path to the repository data within its bucket.\nIt defaults to an empty string, meaning that the repository is at the root of the bucket.\nThe value of this setting should not start or end with a forward slash (`/`).\n\nNOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise.\nElastic Cloud Enterprise automatically generates the `base_path` for each deployment so that multiple deployments may share the same bucket.", + "type": "string" + }, + "buffer_size": { + "description": "The minimum threshold below which the chunk is uploaded using a single request.\nBeyond this threshold, the S3 repository will use the AWS Multipart Upload API to split the chunk into several parts, each of `buffer_size` length, and to upload each part in its own request.\nNote that setting a buffer size lower than 5mb is not allowed since it will prevent the use of the Multipart API and may result in upload errors.\nIt is also not possible to set a buffer size greater than 5gb as it is the maximum upload size allowed by S3.\nDefaults to `100mb` or 5% of JVM heap, whichever is smaller.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "canned_acl": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl" }, - "manually_stopped": { - "type": "boolean" + "description": "The S3 repository supports all S3 canned ACLs: `private`, `public-read`, `public-read-write`, `authenticated-read`, `log-delivery-write`, `bucket-owner-read`, `bucket-owner-full-control`.\nYou could specify a canned ACL using the `canned_acl` setting.\nWhen the S3 repository creates buckets and objects, it adds the canned ACL into the buckets and objects.", + "default": "private", + "type": "string" + }, + "client": { + "description": "The name of the S3 client to use to connect to S3.", + "default": "default", + "type": "string" + }, + "delete_objects_max_size": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html" }, - "stats": { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher.stats.WatcherNodeStats" + "description": "The maxmimum batch size, between 1 and 1000, used for `DeleteObjects` requests.\nDefaults to 1000 which is the maximum number supported by the AWS DeleteObjects API.", + "default": 1000.0, + "type": "number" + }, + "get_register_retry_delay": { + "description": "The time to wait before trying again if an attempt to read a linearizable register fails.", + "default": "5s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - } + ] }, - "required": [ - "_nodes", - "cluster_name", - "manually_stopped", - "stats" - ] - }, - "examples": { - "WatcherStatsResponseExample1": { - "summary": "Basic metrics", - "description": "A successful response from `GET _watcher/stats`.", - "value": "{\n \"watcher_state\": \"started\", \n \"watch_count\": 1, \n \"execution_thread_pool\": {\n \"size\": 1000, \n \"max_size\": 1 \n }\n}" + "max_multipart_parts": { + "description": "The maximum number of parts that Elasticsearch will write during a multipart upload of a single object.\nFiles which are larger than `buffer_size × max_multipart_parts` will be chunked into several smaller objects.\nElasticsearch may also split a file across multiple objects to satisfy other constraints such as the `chunk_size` limit.\nDefaults to `10000` which is the maximum number of parts in a multipart upload in AWS S3.", + "default": 10000.0, + "type": "number" }, - "WatcherStatsResponseExample2": { - "summary": "Current watch metrics", - "description": "A successful response from `GET _watcher/stats?metric=current_watches`.", - "value": "{\n \"watcher_state\": \"started\",\n \"watch_count\": 2,\n \"execution_thread_pool\": {\n \"queue_size\": 1000,\n \"max_size\": 20\n },\n \"current_watches\": [ \n {\n \"watch_id\": \"slow_condition\", \n \"watch_record_id\": \"slow_condition_3-2015-05-13T07:42:32.179Z\", \n \"triggered_time\": \"2015-05-12T11:53:51.800Z\", \n \"execution_time\": \"2015-05-13T07:42:32.179Z\", \n \"execution_phase\": \"condition\" \n }\n ]\n}" + "max_multipart_upload_cleanup_size": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html" + }, + "description": "The maximum number of possibly-dangling multipart uploads to clean up in each batch of snapshot deletions.\nDefaults to 1000 which is the maximum number supported by the AWS ListMultipartUploads API.\nIf set to `0`, Elasticsearch will not attempt to clean up dangling multipart uploads.", + "default": 1000.0, + "type": "number" }, - "WatcherStatsResponseExample3": { - "summary": "Queued watch metrics", - "description": "An abbreviated response from `GET _watcher/stats/queued_watches`.", - "value": "{\n \"watcher_state\": \"started\",\n \"watch_count\": 10,\n \"execution_thread_pool\": {\n \"queue_size\": 1000,\n \"max_size\": 20\n },\n \"queued_watches\": [ \n {\n \"watch_id\": \"slow_condition4\", \n \"watch_record_id\": \"slow_condition4_223-2015-05-21T11:59:59.811Z\", \n \"triggered_time\": \"2015-05-21T11:59:59.811Z\", \n \"execution_time\": \"2015-05-21T11:59:59.811Z\" \n }\n ]\n}" - } - } - } - } - } - }, - "parameters": { - "async_search.submit-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "async_search.submit-wait_for_completion_timeout": { - "in": "query", - "name": "wait_for_completion_timeout", - "description": "Blocks and waits until the search is completed up to a certain timeout.\nWhen the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "async_search.submit-keep_alive": { - "in": "query", - "name": "keep_alive", - "description": "Specifies how long the async search needs to be available.\nOngoing async searches and any saved search results are deleted after this period.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "async_search.submit-keep_on_completion": { - "in": "query", - "name": "keep_on_completion", - "description": "If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-allow_partial_search_results": { - "in": "query", - "name": "allow_partial_search_results", - "description": "Indicate if an error should be returned if there is a partial search failure or timeout", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-analyzer": { - "in": "query", - "name": "analyzer", - "description": "The analyzer to use for the query string", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "async_search.submit-analyze_wildcard": { - "in": "query", - "name": "analyze_wildcard", - "description": "Specify whether wildcard and prefix queries should be analyzed (default: false)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-batched_reduce_size": { - "in": "query", - "name": "batched_reduce_size", - "description": "Affects how often partial results become available, which happens whenever shard results are reduced.\nA partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "async_search.submit-ccs_minimize_roundtrips": { - "in": "query", - "name": "ccs_minimize_roundtrips", - "description": "The default value is the only supported value.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-default_operator": { - "in": "query", - "name": "default_operator", - "description": "The default operator for query string query (AND or OR)", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "style": "form" - }, - "async_search.submit-df": { - "in": "query", - "name": "df", - "description": "The field to use as default where no field prefix is given in the query string", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "async_search.submit-docvalue_fields": { - "in": "query", - "name": "docvalue_fields", - "description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "async_search.submit-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "async_search.submit-explain": { - "in": "query", - "name": "explain", - "description": "Specify whether to return detailed information about score computation as part of a hit", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-ignore_throttled": { - "in": "query", - "name": "ignore_throttled", - "description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-lenient": { - "in": "query", - "name": "lenient", - "description": "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-max_concurrent_shard_requests": { - "in": "query", - "name": "max_concurrent_shard_requests", - "description": "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", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "async_search.submit-preference": { - "in": "query", - "name": "preference", - "description": "Specify the node or shard the operation should be performed on (default: random)", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "async_search.submit-request_cache": { - "in": "query", - "name": "request_cache", - "description": "Specify if request cache should be used for this request or not, defaults to true", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-routing": { - "in": "query", - "name": "routing", - "description": "A comma-separated list of specific routing values", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "async_search.submit-search_type": { - "in": "query", - "name": "search_type", - "description": "Search operation type\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SearchType" - }, - "style": "form" - }, - "async_search.submit-stats": { - "in": "query", - "name": "stats", - "description": "Specific 'tag' of the request for logging and statistical purposes", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "style": "form" - }, - "async_search.submit-stored_fields": { - "in": "query", - "name": "stored_fields", - "description": "A comma-separated list of stored fields to return as part of a hit", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "async_search.submit-suggest_field": { - "in": "query", - "name": "suggest_field", - "description": "Specifies which field to use for suggestions.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "form" - }, - "async_search.submit-suggest_mode": { - "in": "query", - "name": "suggest_mode", - "description": "Specify suggest mode\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SuggestMode" - }, - "style": "form" - }, - "async_search.submit-suggest_size": { - "in": "query", - "name": "suggest_size", - "description": "How many suggestions to return in response", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "async_search.submit-suggest_text": { - "in": "query", - "name": "suggest_text", - "description": "The source text for which the suggestions should be returned.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "async_search.submit-terminate_after": { - "in": "query", - "name": "terminate_after", - "description": "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "async_search.submit-timeout": { - "in": "query", - "name": "timeout", - "description": "Explicit operation timeout", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "async_search.submit-track_total_hits": { - "in": "query", - "name": "track_total_hits", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.TrackHits" - }, - "style": "form" - }, - "async_search.submit-track_scores": { - "in": "query", - "name": "track_scores", - "description": "Whether to calculate and return scores even if they are not used for sorting", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-version": { - "in": "query", - "name": "version", - "description": "Specify whether to return document version as part of a hit", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-_source": { - "in": "query", - "name": "_source", - "description": "True or false to return the _source field or not, or a list of fields to return", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" - }, - "style": "form" - }, - "async_search.submit-_source_excludes": { - "in": "query", - "name": "_source_excludes", - "description": "A list of fields to exclude from the returned _source field", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "async_search.submit-_source_includes": { - "in": "query", - "name": "_source_includes", - "description": "A list of fields to extract and return from the _source field", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "async_search.submit-seq_no_primary_term": { - "in": "query", - "name": "seq_no_primary_term", - "description": "Specify whether to return sequence number and primary term of the last modification of each hit", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "async_search.submit-q": { - "in": "query", - "name": "q", - "description": "Query in the Lucene query string syntax", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "async_search.submit-size": { - "in": "query", - "name": "size", - "description": "Number of hits to return (default: 10)", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "async_search.submit-from": { - "in": "query", - "name": "from", - "description": "Starting offset (default: 0)", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "async_search.submit-sort": { - "in": "query", - "name": "sort", - "description": "A comma-separated list of : pairs", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { + "readonly": { + "description": "If true, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, + "type": "boolean" + }, + "server_side_encryption": { + "description": "When set to `true`, files are encrypted on server side using an AES256 algorithm.", + "default": false, + "type": "boolean" + }, + "storage_class": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository#repository-s3-storage-classes" + }, + "description": "The S3 storage class for objects written to the repository.\nValues may be `standard`, `reduced_redundancy`, `standard_ia`, `onezone_ia`, and `intelligent_tiering`.", + "default": "standard", "type": "string" - } - } - ] - }, - "style": "form" - }, - "bulk-index": { - "in": "path", - "name": "index", - "description": "The name of the data stream, index, or index alias to perform bulk actions on.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "bulk-include_source_on_error": { - "in": "query", - "name": "include_source_on_error", - "description": "True or false if to include the document source in the error message in case of parsing errors.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "bulk-list_executed_pipelines": { - "in": "query", - "name": "list_executed_pipelines", - "description": "If `true`, the response will include the ingest pipelines that were run for each index or create.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "bulk-pipeline": { - "in": "query", - "name": "pipeline", - "description": "The pipeline identifier to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "bulk-refresh": { - "in": "query", - "name": "refresh", - "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, wait for a refresh to make this operation visible to search.\nIf `false`, do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "bulk-routing": { - "in": "query", - "name": "routing", - "description": "A custom value that is used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "bulk-_source": { - "in": "query", - "name": "_source", - "description": "Indicates whether to return the `_source` field (`true` or `false`) or contains a list of fields to return.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" - }, - "style": "form" - }, - "bulk-_source_excludes": { - "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "bulk-_source_includes": { - "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "bulk-timeout": { - "in": "query", - "name": "timeout", - "description": "The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.\nThe default is `1m` (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "bulk-wait_for_active_shards": { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default is `1`, which waits for each primary shard to be active.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" - }, - "style": "form" - }, - "bulk-require_alias": { - "in": "query", - "name": "require_alias", - "description": "If `true`, the request's actions must target an index alias.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "bulk-require_data_stream": { - "in": "query", - "name": "require_data_stream", - "description": "If `true`, the request's actions must target a data stream (existing or to be created).", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.aliases-name": { - "in": "path", - "name": "name", - "description": "A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "cat.aliases-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.aliases-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.aliases-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "cat.aliases-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicated that the request should never timeout, you can set it to `-1`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.allocation-node_id": { - "in": "path", - "name": "node_id", - "description": "A comma-separated list of node identifiers or names used to limit the returned information.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "cat.allocation-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.allocation-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.allocation-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.allocation-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.allocation-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.component_templates-name": { - "in": "path", - "name": "name", - "description": "The name of the component template.\nIt accepts wildcard expressions.\nIf it is omitted, all component templates are returned.", - "required": true, - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "cat.component_templates-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.component_templates-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.component_templates-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.component_templates-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.count-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nIt supports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "cat.count-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.count-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.fielddata-fields": { - "in": "path", - "name": "fields", - "description": "Comma-separated list of fields used to limit returned information.\nTo retrieve all fields, omit this parameter.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "simple" - }, - "cat.fielddata-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.fielddata-fields_": { - "in": "query", - "name": "fields", - "description": "Comma-separated list of fields used to limit returned information.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "cat.fielddata-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.fielddata-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.indices-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "cat.indices-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.indices-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "cat.indices-health": { - "in": "query", - "name": "health", - "description": "The health status used to limit returned indices. By default, the response includes indices of any health status.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.HealthStatus" - }, - "style": "form" - }, - "cat.indices-include_unloaded_segments": { - "in": "query", - "name": "include_unloaded_segments", - "description": "If true, the response includes information from segments that are not loaded into memory.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.indices-pri": { - "in": "query", - "name": "pri", - "description": "If true, the response only includes information from primary shards.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.indices-time": { - "in": "query", - "name": "time", - "description": "The unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.indices-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.indices-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.indices-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.ml_data_frame_analytics-id": { - "in": "path", - "name": "id", - "description": "The ID of the data frame analytics to fetch", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "cat.ml_data_frame_analytics-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.ml_data_frame_analytics-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit in which to display byte values", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.ml_data_frame_analytics-h": { - "in": "query", - "name": "h", - "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): Contains messages relating to the selection of a node.\n - `create_time` (or `ct`, `createTime`): The time when the data frame analytics job was created.\n - `description` (or `d`): A description of a job.\n - `dest_index` (or `di`, `destIndex`): Name of the destination index.\n - `failure_reason` (or `fr`, `failureReason`): Contains messages about the reason why a data frame analytics job failed.\n - `id`: Identifier for the data frame analytics job.\n - `model_memory_limit` (or `mml`, `modelMemoryLimit`): The approximate maximum amount of memory resources that are permitted for\nthe data frame analytics job.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that the data frame analytics job is\nassigned to.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that the data frame analytics job is assigned\nto.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that the data frame analytics job is\nassigned to.\n - `node.name` (or `nn`, `nodeName`): The name of the node that the data frame analytics job is assigned to.\n - `progress` (or `p`): The progress report of the data frame analytics job by phase.\n - `source_index` (or `si`, `sourceIndex`): Name of the source index.\n - `state` (or `s`): Current state of the data frame analytics job.\n - `type` (or `t`): The type of analysis that the data frame analytics job performs.\n - `version` (or `v`): The Elasticsearch version number in which the data frame analytics job was\ncreated.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatDfaColumns" - }, - "style": "form" - }, - "cat.ml_data_frame_analytics-s": { - "in": "query", - "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the\nresponse.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): Contains messages relating to the selection of a node.\n - `create_time` (or `ct`, `createTime`): The time when the data frame analytics job was created.\n - `description` (or `d`): A description of a job.\n - `dest_index` (or `di`, `destIndex`): Name of the destination index.\n - `failure_reason` (or `fr`, `failureReason`): Contains messages about the reason why a data frame analytics job failed.\n - `id`: Identifier for the data frame analytics job.\n - `model_memory_limit` (or `mml`, `modelMemoryLimit`): The approximate maximum amount of memory resources that are permitted for\nthe data frame analytics job.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that the data frame analytics job is\nassigned to.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that the data frame analytics job is assigned\nto.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that the data frame analytics job is\nassigned to.\n - `node.name` (or `nn`, `nodeName`): The name of the node that the data frame analytics job is assigned to.\n - `progress` (or `p`): The progress report of the data frame analytics job by phase.\n - `source_index` (or `si`, `sourceIndex`): Name of the source index.\n - `state` (or `s`): Current state of the data frame analytics job.\n - `type` (or `t`): The type of analysis that the data frame analytics job performs.\n - `version` (or `v`): The Elasticsearch version number in which the data frame analytics job was\ncreated.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatDfaColumns" - }, - "style": "form" - }, - "cat.ml_data_frame_analytics-time": { - "in": "query", - "name": "time", - "description": "Unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.ml_datafeeds-datafeed_id": { - "in": "path", - "name": "datafeed_id", - "description": "A numerical character string that uniquely identifies the datafeed.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "cat.ml_datafeeds-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n* Contains wildcard expressions and there are no datafeeds that match.\n* Contains the `_all` string or no identifiers and there are no matches.\n* Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty datafeeds array when there are no matches and the subset of results when\nthere are partial matches. If `false`, the API returns a 404 status code when there are no matches or only\npartial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.ml_datafeeds-h": { - "in": "query", - "name": "h", - "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `ae` (or `assignment_explanation`): For started datafeeds only, contains messages relating to the selection of\na node.\n - `bc` (or `buckets.count`, `bucketsCount`): The number of buckets processed.\n - `id`: A numerical character string that uniquely identifies the datafeed.\n - `na` (or `node.address`, `nodeAddress`): For started datafeeds only, the network address of the node where the\ndatafeed is started.\n - `ne` (or `node.ephemeral_id`, `nodeEphemeralId`): For started datafeeds only, the ephemeral ID of the node where the\ndatafeed is started.\n - `ni` (or `node.id`, `nodeId`): For started datafeeds only, the unique identifier of the node where the\ndatafeed is started.\n - `nn` (or `node.name`, `nodeName`): For started datafeeds only, the name of the node where the datafeed is\nstarted.\n - `sba` (or `search.bucket_avg`, `searchBucketAvg`): The average search time per bucket, in milliseconds.\n - `sc` (or `search.count`, `searchCount`): The number of searches run by the datafeed.\n - `seah` (or `search.exp_avg_hour`, `searchExpAvgHour`): The exponential average search time per hour, in milliseconds.\n - `st` (or `search.time`, `searchTime`): The total time the datafeed spent searching, in milliseconds.\n - `s` (or `state`): The status of the datafeed: `starting`, `started`, `stopping`, or `stopped`.\nIf `starting`, the datafeed has been requested to start but has not yet\nstarted. If `started`, the datafeed is actively receiving data. If\n`stopping`, the datafeed has been requested to stop gracefully and is\ncompleting its final action. If `stopped`, the datafeed is stopped and will\nnot receive data until it is re-started.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" - }, - "style": "form" - }, - "cat.ml_datafeeds-s": { - "in": "query", - "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `ae` (or `assignment_explanation`): For started datafeeds only, contains messages relating to the selection of\na node.\n - `bc` (or `buckets.count`, `bucketsCount`): The number of buckets processed.\n - `id`: A numerical character string that uniquely identifies the datafeed.\n - `na` (or `node.address`, `nodeAddress`): For started datafeeds only, the network address of the node where the\ndatafeed is started.\n - `ne` (or `node.ephemeral_id`, `nodeEphemeralId`): For started datafeeds only, the ephemeral ID of the node where the\ndatafeed is started.\n - `ni` (or `node.id`, `nodeId`): For started datafeeds only, the unique identifier of the node where the\ndatafeed is started.\n - `nn` (or `node.name`, `nodeName`): For started datafeeds only, the name of the node where the datafeed is\nstarted.\n - `sba` (or `search.bucket_avg`, `searchBucketAvg`): The average search time per bucket, in milliseconds.\n - `sc` (or `search.count`, `searchCount`): The number of searches run by the datafeed.\n - `seah` (or `search.exp_avg_hour`, `searchExpAvgHour`): The exponential average search time per hour, in milliseconds.\n - `st` (or `search.time`, `searchTime`): The total time the datafeed spent searching, in milliseconds.\n - `s` (or `state`): The status of the datafeed: `starting`, `started`, `stopping`, or `stopped`.\nIf `starting`, the datafeed has been requested to start but has not yet\nstarted. If `started`, the datafeed is actively receiving data. If\n`stopping`, the datafeed has been requested to stop gracefully and is\ncompleting its final action. If `stopped`, the datafeed is stopped and will\nnot receive data until it is re-started.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" - }, - "style": "form" - }, - "cat.ml_datafeeds-time": { - "in": "query", - "name": "time", - "description": "The unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.ml_jobs-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "cat.ml_jobs-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n* Contains wildcard expressions and there are no jobs that match.\n* Contains the `_all` string or no identifiers and there are no matches.\n* Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty jobs array when there are no matches and the subset of results when there\nare partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial\nmatches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.ml_jobs-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.ml_jobs-h": { - "in": "query", - "name": "h", - "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): For open anomaly detection jobs only, contains messages relating to the\nselection of a node to run the job.\n - `buckets.count` (or `bc`, `bucketsCount`): The number of bucket results produced by the job.\n - `buckets.time.exp_avg` (or `btea`, `bucketsTimeExpAvg`): Exponential moving average of all bucket processing times, in milliseconds.\n - `buckets.time.exp_avg_hour` (or `bteah`, `bucketsTimeExpAvgHour`): Exponentially-weighted moving average of bucket processing times calculated\nin a 1 hour time window, in milliseconds.\n - `buckets.time.max` (or `btmax`, `bucketsTimeMax`): Maximum among all bucket processing times, in milliseconds.\n - `buckets.time.min` (or `btmin`, `bucketsTimeMin`): Minimum among all bucket processing times, in milliseconds.\n - `buckets.time.total` (or `btt`, `bucketsTimeTotal`): Sum of all bucket processing times, in milliseconds.\n - `data.buckets` (or `db`, `dataBuckets`): The number of buckets processed.\n - `data.earliest_record` (or `der`, `dataEarliestRecord`): The timestamp of the earliest chronologically input document.\n - `data.empty_buckets` (or `deb`, `dataEmptyBuckets`): The number of buckets which did not contain any data.\n - `data.input_bytes` (or `dib`, `dataInputBytes`): The number of bytes of input data posted to the anomaly detection job.\n - `data.input_fields` (or `dif`, `dataInputFields`): The total number of fields in input documents posted to the anomaly\ndetection job. This count includes fields that are not used in the analysis.\nHowever, be aware that if you are using a datafeed, it extracts only the\nrequired fields from the documents it retrieves before posting them to the job.\n - `data.input_records` (or `dir`, `dataInputRecords`): The number of input documents posted to the anomaly detection job.\n - `data.invalid_dates` (or `did`, `dataInvalidDates`): The number of input documents with either a missing date field or a date\nthat could not be parsed.\n - `data.last` (or `dl`, `dataLast`): The timestamp at which data was last analyzed, according to server time.\n - `data.last_empty_bucket` (or `dleb`, `dataLastEmptyBucket`): The timestamp of the last bucket that did not contain any data.\n - `data.last_sparse_bucket` (or `dlsb`, `dataLastSparseBucket`): The timestamp of the last bucket that was considered sparse.\n - `data.latest_record` (or `dlr`, `dataLatestRecord`): The timestamp of the latest chronologically input document.\n - `data.missing_fields` (or `dmf`, `dataMissingFields`): The number of input documents that are missing a field that the anomaly\ndetection job is configured to analyze. Input documents with missing fields\nare still processed because it is possible that not all fields are missing.\n - `data.out_of_order_timestamps` (or `doot`, `dataOutOfOrderTimestamps`): The number of input documents that have a timestamp chronologically\npreceding the start of the current anomaly detection bucket offset by the\nlatency window. This information is applicable only when you provide data\nto the anomaly detection job by using the post data API. These out of order\ndocuments are discarded, since jobs require time series data to be in\nascending chronological order.\n - `data.processed_fields` (or `dpf`, `dataProcessedFields`): The total number of fields in all the documents that have been processed by\nthe anomaly detection job. Only fields that are specified in the detector\nconfiguration object contribute to this count. The timestamp is not\nincluded in this count.\n - `data.processed_records` (or `dpr`, `dataProcessedRecords`): The number of input documents that have been processed by the anomaly\ndetection job. This value includes documents with missing fields, since\nthey are nonetheless analyzed. If you use datafeeds and have aggregations\nin your search query, the processed record count is the number of\naggregation results processed, not the number of Elasticsearch documents.\n - `data.sparse_buckets` (or `dsb`, `dataSparseBuckets`): The number of buckets that contained few data points compared to the\nexpected number of data points.\n - `forecasts.memory.avg` (or `fmavg`, `forecastsMemoryAvg`): The average memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.max` (or `fmmax`, `forecastsMemoryMax`): The maximum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.min` (or `fmmin`, `forecastsMemoryMin`): The minimum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.total` (or `fmt`, `forecastsMemoryTotal`): The total memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.records.avg` (or `fravg`, `forecastsRecordsAvg`): The average number of `m`odel_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.max` (or `frmax`, `forecastsRecordsMax`): The maximum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.min` (or `frmin`, `forecastsRecordsMin`): The minimum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.total` (or `frt`, `forecastsRecordsTotal`): The total number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.time.avg` (or `ftavg`, `forecastsTimeAvg`): The average runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.max` (or `ftmax`, `forecastsTimeMax`): The maximum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.min` (or `ftmin`, `forecastsTimeMin`): The minimum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.total` (or `ftt`, `forecastsTimeTotal`): The total runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.total` (or `ft`, `forecastsTotal`): The number of individual forecasts currently available for the job.\n - `id`: Identifier for the anomaly detection job.\n - `model.bucket_allocation_failures` (or `mbaf`, `modelBucketAllocationFailures`): The number of buckets for which new entities in incoming data were not\nprocessed due to insufficient model memory.\n - `model.by_fields` (or `mbf`, `modelByFields`): The number of by field values that were analyzed by the models. This value\nis cumulative for all detectors in the job.\n - `model.bytes` (or `mb`, `modelBytes`): The number of bytes of memory used by the models. This is the maximum value\nsince the last time the model was persisted. If the job is closed, this\nvalue indicates the latest size.\n - `model.bytes_exceeded` (or `mbe`, `modelBytesExceeded`): The number of bytes over the high limit for memory usage at the last\nallocation failure.\n - `model.categorization_status` (or `mcs`, `modelCategorizationStatus`): The status of categorization for the job: `ok` or `warn`. If `ok`,\ncategorization is performing acceptably well (or not being used at all). If\n`warn`, categorization is detecting a distribution of categories that\nsuggests the input data is inappropriate for categorization. Problems could\nbe that there is only one category, more than 90% of categories are rare,\nthe number of categories is greater than 50% of the number of categorized\ndocuments, there are no frequently matched categories, or more than 50% of\ncategories are dead.\n - `model.categorized_doc_count` (or `mcdc`, `modelCategorizedDocCount`): The number of documents that have had a field categorized.\n - `model.dead_category_count` (or `mdcc`, `modelDeadCategoryCount`): The number of categories created by categorization that will never be\nassigned again because another category’s definition makes it a superset of\nthe dead category. Dead categories are a side effect of the way\ncategorization has no prior training.\n - `model.failed_category_count` (or `mdcc`, `modelFailedCategoryCount`): The number of times that categorization wanted to create a new category but\ncouldn’t because the job had hit its model memory limit. This count does\nnot track which specific categories failed to be created. Therefore, you\ncannot use this value to determine the number of unique categories that\nwere missed.\n - `model.frequent_category_count` (or `mfcc`, `modelFrequentCategoryCount`): The number of categories that match more than 1% of categorized documents.\n - `model.log_time` (or `mlt`, `modelLogTime`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_limit` (or `mml`, `modelMemoryLimit`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_status` (or `mms`, `modelMemoryStatus`): The status of the mathematical models: `ok`, `soft_limit`, or `hard_limit`.\nIf `ok`, the models stayed below the configured value. If `soft_limit`, the\nmodels used more than 60% of the configured memory limit and older unused\nmodels will be pruned to free up space. Additionally, in categorization jobs\nno further category examples will be stored. If `hard_limit`, the models\nused more space than the configured memory limit. As a result, not all\nincoming data was processed.\n - `model.over_fields` (or `mof`, `modelOverFields`): The number of over field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.partition_fields` (or `mpf`, `modelPartitionFields`): The number of partition field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.rare_category_count` (or `mrcc`, `modelRareCategoryCount`): The number of categories that match just one categorized document.\n - `model.timestamp` (or `mt`, `modelTimestamp`): The timestamp of the last record when the model stats were gathered.\n - `model.total_category_count` (or `mtcc`, `modelTotalCategoryCount`): The number of categories created by categorization.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that runs the job. This information is\navailable only for open jobs.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that runs the job. This information is\navailable only for open jobs.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that runs the job. This information is\navailable only for open jobs.\n - `node.name` (or `nn`, `nodeName`): The name of the node that runs the job. This information is available only\nfor open jobs.\n - `opened_time` (or `ot`): For open jobs only, the elapsed time for which the job has been open.\n - `state` (or `s`): The status of the anomaly detection job: `closed`, `closing`, `failed`,\n`opened`, or `opening`. If `closed`, the job finished successfully with its\nmodel state persisted. The job must be opened before it can accept further\ndata. If `closing`, the job close action is in progress and has not yet\ncompleted. A closing job cannot accept further data. If `failed`, the job\ndid not finish successfully due to an error. This situation can occur due\nto invalid input data, a fatal error occurring during the analysis, or an\nexternal interaction such as the process being killed by the Linux out of\nmemory (OOM) killer. If the job had irrevocably failed, it must be force\nclosed and then deleted. If the datafeed can be corrected, the job can be\nclosed and then re-opened. If `opened`, the job is available to receive and\nprocess data. If `opening`, the job open action is in progress and has not\nyet completed.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatAnonalyDetectorColumns" - }, - "style": "form" - }, - "cat.ml_jobs-s": { - "in": "query", - "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): For open anomaly detection jobs only, contains messages relating to the\nselection of a node to run the job.\n - `buckets.count` (or `bc`, `bucketsCount`): The number of bucket results produced by the job.\n - `buckets.time.exp_avg` (or `btea`, `bucketsTimeExpAvg`): Exponential moving average of all bucket processing times, in milliseconds.\n - `buckets.time.exp_avg_hour` (or `bteah`, `bucketsTimeExpAvgHour`): Exponentially-weighted moving average of bucket processing times calculated\nin a 1 hour time window, in milliseconds.\n - `buckets.time.max` (or `btmax`, `bucketsTimeMax`): Maximum among all bucket processing times, in milliseconds.\n - `buckets.time.min` (or `btmin`, `bucketsTimeMin`): Minimum among all bucket processing times, in milliseconds.\n - `buckets.time.total` (or `btt`, `bucketsTimeTotal`): Sum of all bucket processing times, in milliseconds.\n - `data.buckets` (or `db`, `dataBuckets`): The number of buckets processed.\n - `data.earliest_record` (or `der`, `dataEarliestRecord`): The timestamp of the earliest chronologically input document.\n - `data.empty_buckets` (or `deb`, `dataEmptyBuckets`): The number of buckets which did not contain any data.\n - `data.input_bytes` (or `dib`, `dataInputBytes`): The number of bytes of input data posted to the anomaly detection job.\n - `data.input_fields` (or `dif`, `dataInputFields`): The total number of fields in input documents posted to the anomaly\ndetection job. This count includes fields that are not used in the analysis.\nHowever, be aware that if you are using a datafeed, it extracts only the\nrequired fields from the documents it retrieves before posting them to the job.\n - `data.input_records` (or `dir`, `dataInputRecords`): The number of input documents posted to the anomaly detection job.\n - `data.invalid_dates` (or `did`, `dataInvalidDates`): The number of input documents with either a missing date field or a date\nthat could not be parsed.\n - `data.last` (or `dl`, `dataLast`): The timestamp at which data was last analyzed, according to server time.\n - `data.last_empty_bucket` (or `dleb`, `dataLastEmptyBucket`): The timestamp of the last bucket that did not contain any data.\n - `data.last_sparse_bucket` (or `dlsb`, `dataLastSparseBucket`): The timestamp of the last bucket that was considered sparse.\n - `data.latest_record` (or `dlr`, `dataLatestRecord`): The timestamp of the latest chronologically input document.\n - `data.missing_fields` (or `dmf`, `dataMissingFields`): The number of input documents that are missing a field that the anomaly\ndetection job is configured to analyze. Input documents with missing fields\nare still processed because it is possible that not all fields are missing.\n - `data.out_of_order_timestamps` (or `doot`, `dataOutOfOrderTimestamps`): The number of input documents that have a timestamp chronologically\npreceding the start of the current anomaly detection bucket offset by the\nlatency window. This information is applicable only when you provide data\nto the anomaly detection job by using the post data API. These out of order\ndocuments are discarded, since jobs require time series data to be in\nascending chronological order.\n - `data.processed_fields` (or `dpf`, `dataProcessedFields`): The total number of fields in all the documents that have been processed by\nthe anomaly detection job. Only fields that are specified in the detector\nconfiguration object contribute to this count. The timestamp is not\nincluded in this count.\n - `data.processed_records` (or `dpr`, `dataProcessedRecords`): The number of input documents that have been processed by the anomaly\ndetection job. This value includes documents with missing fields, since\nthey are nonetheless analyzed. If you use datafeeds and have aggregations\nin your search query, the processed record count is the number of\naggregation results processed, not the number of Elasticsearch documents.\n - `data.sparse_buckets` (or `dsb`, `dataSparseBuckets`): The number of buckets that contained few data points compared to the\nexpected number of data points.\n - `forecasts.memory.avg` (or `fmavg`, `forecastsMemoryAvg`): The average memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.max` (or `fmmax`, `forecastsMemoryMax`): The maximum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.min` (or `fmmin`, `forecastsMemoryMin`): The minimum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.total` (or `fmt`, `forecastsMemoryTotal`): The total memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.records.avg` (or `fravg`, `forecastsRecordsAvg`): The average number of `m`odel_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.max` (or `frmax`, `forecastsRecordsMax`): The maximum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.min` (or `frmin`, `forecastsRecordsMin`): The minimum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.total` (or `frt`, `forecastsRecordsTotal`): The total number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.time.avg` (or `ftavg`, `forecastsTimeAvg`): The average runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.max` (or `ftmax`, `forecastsTimeMax`): The maximum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.min` (or `ftmin`, `forecastsTimeMin`): The minimum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.total` (or `ftt`, `forecastsTimeTotal`): The total runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.total` (or `ft`, `forecastsTotal`): The number of individual forecasts currently available for the job.\n - `id`: Identifier for the anomaly detection job.\n - `model.bucket_allocation_failures` (or `mbaf`, `modelBucketAllocationFailures`): The number of buckets for which new entities in incoming data were not\nprocessed due to insufficient model memory.\n - `model.by_fields` (or `mbf`, `modelByFields`): The number of by field values that were analyzed by the models. This value\nis cumulative for all detectors in the job.\n - `model.bytes` (or `mb`, `modelBytes`): The number of bytes of memory used by the models. This is the maximum value\nsince the last time the model was persisted. If the job is closed, this\nvalue indicates the latest size.\n - `model.bytes_exceeded` (or `mbe`, `modelBytesExceeded`): The number of bytes over the high limit for memory usage at the last\nallocation failure.\n - `model.categorization_status` (or `mcs`, `modelCategorizationStatus`): The status of categorization for the job: `ok` or `warn`. If `ok`,\ncategorization is performing acceptably well (or not being used at all). If\n`warn`, categorization is detecting a distribution of categories that\nsuggests the input data is inappropriate for categorization. Problems could\nbe that there is only one category, more than 90% of categories are rare,\nthe number of categories is greater than 50% of the number of categorized\ndocuments, there are no frequently matched categories, or more than 50% of\ncategories are dead.\n - `model.categorized_doc_count` (or `mcdc`, `modelCategorizedDocCount`): The number of documents that have had a field categorized.\n - `model.dead_category_count` (or `mdcc`, `modelDeadCategoryCount`): The number of categories created by categorization that will never be\nassigned again because another category’s definition makes it a superset of\nthe dead category. Dead categories are a side effect of the way\ncategorization has no prior training.\n - `model.failed_category_count` (or `mdcc`, `modelFailedCategoryCount`): The number of times that categorization wanted to create a new category but\ncouldn’t because the job had hit its model memory limit. This count does\nnot track which specific categories failed to be created. Therefore, you\ncannot use this value to determine the number of unique categories that\nwere missed.\n - `model.frequent_category_count` (or `mfcc`, `modelFrequentCategoryCount`): The number of categories that match more than 1% of categorized documents.\n - `model.log_time` (or `mlt`, `modelLogTime`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_limit` (or `mml`, `modelMemoryLimit`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_status` (or `mms`, `modelMemoryStatus`): The status of the mathematical models: `ok`, `soft_limit`, or `hard_limit`.\nIf `ok`, the models stayed below the configured value. If `soft_limit`, the\nmodels used more than 60% of the configured memory limit and older unused\nmodels will be pruned to free up space. Additionally, in categorization jobs\nno further category examples will be stored. If `hard_limit`, the models\nused more space than the configured memory limit. As a result, not all\nincoming data was processed.\n - `model.over_fields` (or `mof`, `modelOverFields`): The number of over field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.partition_fields` (or `mpf`, `modelPartitionFields`): The number of partition field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.rare_category_count` (or `mrcc`, `modelRareCategoryCount`): The number of categories that match just one categorized document.\n - `model.timestamp` (or `mt`, `modelTimestamp`): The timestamp of the last record when the model stats were gathered.\n - `model.total_category_count` (or `mtcc`, `modelTotalCategoryCount`): The number of categories created by categorization.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that runs the job. This information is\navailable only for open jobs.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that runs the job. This information is\navailable only for open jobs.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that runs the job. This information is\navailable only for open jobs.\n - `node.name` (or `nn`, `nodeName`): The name of the node that runs the job. This information is available only\nfor open jobs.\n - `opened_time` (or `ot`): For open jobs only, the elapsed time for which the job has been open.\n - `state` (or `s`): The status of the anomaly detection job: `closed`, `closing`, `failed`,\n`opened`, or `opening`. If `closed`, the job finished successfully with its\nmodel state persisted. The job must be opened before it can accept further\ndata. If `closing`, the job close action is in progress and has not yet\ncompleted. A closing job cannot accept further data. If `failed`, the job\ndid not finish successfully due to an error. This situation can occur due\nto invalid input data, a fatal error occurring during the analysis, or an\nexternal interaction such as the process being killed by the Linux out of\nmemory (OOM) killer. If the job had irrevocably failed, it must be force\nclosed and then deleted. If the datafeed can be corrected, the job can be\nclosed and then re-opened. If `opened`, the job is available to receive and\nprocess data. If `opening`, the job open action is in progress and has not\nyet completed.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatAnonalyDetectorColumns" - }, - "style": "form" - }, - "cat.ml_jobs-time": { - "in": "query", - "name": "time", - "description": "The unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.ml_trained_models-model_id": { - "in": "path", - "name": "model_id", - "description": "A unique identifier for the trained model.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "cat.ml_trained_models-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "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.\nIf `true`, the API returns an empty array when there are no matches and the subset of results when there are partial matches.\nIf `false`, the API returns a 404 status code when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.ml_trained_models-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.ml_trained_models-h": { - "in": "query", - "name": "h", - "description": "A comma-separated list of column names to display.\n\nSupported values include:\n - `create_time` (or `ct`): The time when the trained model was created.\n - `created_by` (or `c`, `createdBy`): Information on the creator of the trained model.\n - `data_frame_analytics_id` (or `df`, `dataFrameAnalytics`, `dfid`): Identifier for the data frame analytics job that created the model. Only\ndisplayed if it is still available.\n - `description` (or `d`): The description of the trained model.\n - `heap_size` (or `hs`, `modelHeapSize`): The estimated heap size to keep the trained model in memory.\n - `id`: Identifier for the trained model.\n - `ingest.count` (or `ic`, `ingestCount`): The total number of documents that are processed by the model.\n - `ingest.current` (or `icurr`, `ingestCurrent`): The total number of document that are currently being handled by the\ntrained model.\n - `ingest.failed` (or `if`, `ingestFailed`): The total number of failed ingest attempts with the trained model.\n - `ingest.pipelines` (or `ip`, `ingestPipelines`): The total number of ingest pipelines that are referencing the trained\nmodel.\n - `ingest.time` (or `it`, `ingestTime`): The total time that is spent processing documents with the trained model.\n - `license` (or `l`): The license level of the trained model.\n - `operations` (or `o`, `modelOperations`): The estimated number of operations to use the trained model. This number\nhelps measuring the computational complexity of the model.\n - `version` (or `v`): The Elasticsearch version number in which the trained model was created.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" - }, - "style": "form" - }, - "cat.ml_trained_models-s": { - "in": "query", - "name": "s", - "description": "A comma-separated list of column names or aliases used to sort the response.\n\nSupported values include:\n - `create_time` (or `ct`): The time when the trained model was created.\n - `created_by` (or `c`, `createdBy`): Information on the creator of the trained model.\n - `data_frame_analytics_id` (or `df`, `dataFrameAnalytics`, `dfid`): Identifier for the data frame analytics job that created the model. Only\ndisplayed if it is still available.\n - `description` (or `d`): The description of the trained model.\n - `heap_size` (or `hs`, `modelHeapSize`): The estimated heap size to keep the trained model in memory.\n - `id`: Identifier for the trained model.\n - `ingest.count` (or `ic`, `ingestCount`): The total number of documents that are processed by the model.\n - `ingest.current` (or `icurr`, `ingestCurrent`): The total number of document that are currently being handled by the\ntrained model.\n - `ingest.failed` (or `if`, `ingestFailed`): The total number of failed ingest attempts with the trained model.\n - `ingest.pipelines` (or `ip`, `ingestPipelines`): The total number of ingest pipelines that are referencing the trained\nmodel.\n - `ingest.time` (or `it`, `ingestTime`): The total time that is spent processing documents with the trained model.\n - `license` (or `l`): The license level of the trained model.\n - `operations` (or `o`, `modelOperations`): The estimated number of operations to use the trained model. This number\nhelps measuring the computational complexity of the model.\n - `version` (or `v`): The Elasticsearch version number in which the trained model was created.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" - }, - "style": "form" - }, - "cat.ml_trained_models-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of transforms.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "cat.ml_trained_models-size": { - "in": "query", - "name": "size", - "description": "The maximum number of transforms to display.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "cat.ml_trained_models-time": { - "in": "query", - "name": "time", - "description": "Unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.recovery-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "cat.recovery-active_only": { - "in": "query", - "name": "active_only", - "description": "If `true`, the response only includes ongoing shard recoveries.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.recovery-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.recovery-detailed": { - "in": "query", - "name": "detailed", - "description": "If `true`, the response includes detailed information about shard recoveries.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.recovery-index_": { - "in": "query", - "name": "index", - "description": "Comma-separated list or wildcard expression of index names to limit the returned information", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "form" - }, - "cat.recovery-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.recovery-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.recovery-time": { - "in": "query", - "name": "time", - "description": "Unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.segments-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "cat.segments-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.segments-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.segments-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.segments-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.segments-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.shards-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "cat.shards-bytes": { - "in": "query", - "name": "bytes", - "description": "The unit used to display byte values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Bytes" - }, - "style": "form" - }, - "cat.shards-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.shards-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.shards-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.shards-time": { - "in": "query", - "name": "time", - "description": "Unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.snapshots-repository": { - "in": "path", - "name": "repository", - "description": "A comma-separated list of snapshot repositories used to limit the request.\nAccepts wildcard expressions.\n`_all` returns all repositories.\nIf any repository fails during the request, Elasticsearch returns an error.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "cat.snapshots-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, the response does not include information from unavailable snapshots.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.snapshots-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.snapshots-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.snapshots-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.snapshots-time": { - "in": "query", - "name": "time", - "description": "Unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.templates-name": { - "in": "path", - "name": "name", - "description": "The name of the template to return.\nAccepts wildcard expressions. If omitted, all templates are returned.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "cat.templates-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.templates-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.templates-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.templates-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.thread_pool-thread_pool_patterns": { - "in": "path", - "name": "thread_pool_patterns", - "description": "A comma-separated list of thread pool names used to limit the request.\nAccepts wildcard expressions.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "cat.thread_pool-h": { - "in": "query", - "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.thread_pool-s": { - "in": "query", - "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "form" - }, - "cat.thread_pool-time": { - "in": "query", - "name": "time", - "description": "The unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.thread_pool-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.thread_pool-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cat.transforms-transform_id": { - "in": "path", - "name": "transform_id", - "description": "A transform identifier or a wildcard expression.\nIf you do not specify one of these options, the API returns information for all transforms.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "cat.transforms-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "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.\nIf `true`, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches.\nIf `false`, the request returns a 404 status code when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cat.transforms-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of transforms.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "cat.transforms-h": { - "in": "query", - "name": "h", - "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `changes_last_detection_time` (or `cldt`): The timestamp when changes were last detected in the source indices.\n - `checkpoint` (or `cp`): The sequence number for the checkpoint.\n - `checkpoint_duration_time_exp_avg` (or `cdtea`, `checkpointTimeExpAvg`): Exponential moving average of the duration of the checkpoint, in\nmilliseconds.\n - `checkpoint_progress` (or `c`, `checkpointProgress`): The progress of the next checkpoint that is currently in progress.\n - `create_time` (or `ct`, `createTime`): The time the transform was created.\n - `delete_time` (or `dtime`): The amount of time spent deleting, in milliseconds.\n - `description` (or `d`): The description of the transform.\n - `dest_index` (or `di`, `destIndex`): The destination index for the transform. The mappings of the destination\nindex are deduced based on the source fields when possible. If alternate\nmappings are required, use the Create index API prior to starting the\ntransform.\n - `documents_deleted` (or `docd`): The number of documents that have been deleted from the destination index\ndue to the retention policy for this transform.\n - `documents_indexed` (or `doci`): The number of documents that have been indexed into the destination index\nfor the transform.\n - `docs_per_second` (or `dps`): Specifies a limit on the number of input documents per second. This setting\nthrottles the transform by adding a wait time between search requests. The\ndefault value is `null`, which disables throttling.\n - `documents_processed` (or `docp`): The number of documents that have been processed from the source index of\nthe transform.\n - `frequency` (or `f`): The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is `1s` and the maximum is `1h`. The default\nvalue is `1m`.\n - `id`: Identifier for the transform.\n - `index_failure` (or `if`): The number of indexing failures.\n - `index_time` (or `itime`): The amount of time spent indexing, in milliseconds.\n - `index_total` (or `it`): The number of index operations.\n - `indexed_documents_exp_avg` (or `idea`): Exponential moving average of the number of new documents that have been\nindexed.\n - `last_search_time` (or `lst`, `lastSearchTime`): The timestamp of the last search in the source indices. This field is only\nshown if the transform is running.\n - `max_page_search_size` (or `mpsz`): Defines the initial page size to use for the composite aggregation for each\ncheckpoint. If circuit breaker exceptions occur, the page size is\ndynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`. The default value is `500`.\n - `pages_processed` (or `pp`): The number of search or bulk index operations processed. Documents are\nprocessed in batches instead of individually.\n - `pipeline` (or `p`): The unique identifier for an ingest pipeline.\n - `processed_documents_exp_avg` (or `pdea`): Exponential moving average of the number of documents that have been\nprocessed.\n - `processing_time` (or `pt`): The amount of time spent processing results, in milliseconds.\n - `reason` (or `r`): If a transform has a `failed` state, this property provides details about\nthe reason for the failure.\n - `search_failure` (or `sf`): The number of search failures.\n - `search_time` (or `stime`): The amount of time spent searching, in milliseconds.\n - `search_total` (or `st`): The number of search operations on the source index for the transform.\n - `source_index` (or `si`, `sourceIndex`): The source indices for the transform. It can be a single index, an index\npattern (for example, `\"my-index-*\"`), an array of indices (for example,\n`[\"my-index-000001\", \"my-index-000002\"]`), or an array of index patterns\n(for example, `[\"my-index-*\", \"my-other-index-*\"]`. For remote indices use\nthe syntax `\"remote_name:index_name\"`. If any indices are in remote\nclusters then the master node and at least one transform node must have the\n`remote_cluster_client` node role.\n - `state` (or `s`): The status of the transform, which can be one of the following values:\n\n* `aborting`: The transform is aborting.\n* `failed`: The transform failed. For more information about the failure,\ncheck the reason field.\n* `indexing`: The transform is actively processing data and creating new\ndocuments.\n* `started`: The transform is running but not actively indexing data.\n* `stopped`: The transform is stopped.\n* `stopping`: The transform is stopping.\n - `transform_type` (or `tt`): Indicates the type of transform: `batch` or `continuous`.\n - `trigger_count` (or `tc`): The number of times the transform has been triggered by the scheduler. For\nexample, the scheduler triggers the transform indexer to check for updates\nor ingest new data at an interval specified in the `frequency` property.\n - `version` (or `v`): The version of Elasticsearch that existed on the node when the transform\nwas created.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatTransformColumns" - }, - "style": "form" - }, - "cat.transforms-s": { - "in": "query", - "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `changes_last_detection_time` (or `cldt`): The timestamp when changes were last detected in the source indices.\n - `checkpoint` (or `cp`): The sequence number for the checkpoint.\n - `checkpoint_duration_time_exp_avg` (or `cdtea`, `checkpointTimeExpAvg`): Exponential moving average of the duration of the checkpoint, in\nmilliseconds.\n - `checkpoint_progress` (or `c`, `checkpointProgress`): The progress of the next checkpoint that is currently in progress.\n - `create_time` (or `ct`, `createTime`): The time the transform was created.\n - `delete_time` (or `dtime`): The amount of time spent deleting, in milliseconds.\n - `description` (or `d`): The description of the transform.\n - `dest_index` (or `di`, `destIndex`): The destination index for the transform. The mappings of the destination\nindex are deduced based on the source fields when possible. If alternate\nmappings are required, use the Create index API prior to starting the\ntransform.\n - `documents_deleted` (or `docd`): The number of documents that have been deleted from the destination index\ndue to the retention policy for this transform.\n - `documents_indexed` (or `doci`): The number of documents that have been indexed into the destination index\nfor the transform.\n - `docs_per_second` (or `dps`): Specifies a limit on the number of input documents per second. This setting\nthrottles the transform by adding a wait time between search requests. The\ndefault value is `null`, which disables throttling.\n - `documents_processed` (or `docp`): The number of documents that have been processed from the source index of\nthe transform.\n - `frequency` (or `f`): The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is `1s` and the maximum is `1h`. The default\nvalue is `1m`.\n - `id`: Identifier for the transform.\n - `index_failure` (or `if`): The number of indexing failures.\n - `index_time` (or `itime`): The amount of time spent indexing, in milliseconds.\n - `index_total` (or `it`): The number of index operations.\n - `indexed_documents_exp_avg` (or `idea`): Exponential moving average of the number of new documents that have been\nindexed.\n - `last_search_time` (or `lst`, `lastSearchTime`): The timestamp of the last search in the source indices. This field is only\nshown if the transform is running.\n - `max_page_search_size` (or `mpsz`): Defines the initial page size to use for the composite aggregation for each\ncheckpoint. If circuit breaker exceptions occur, the page size is\ndynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`. The default value is `500`.\n - `pages_processed` (or `pp`): The number of search or bulk index operations processed. Documents are\nprocessed in batches instead of individually.\n - `pipeline` (or `p`): The unique identifier for an ingest pipeline.\n - `processed_documents_exp_avg` (or `pdea`): Exponential moving average of the number of documents that have been\nprocessed.\n - `processing_time` (or `pt`): The amount of time spent processing results, in milliseconds.\n - `reason` (or `r`): If a transform has a `failed` state, this property provides details about\nthe reason for the failure.\n - `search_failure` (or `sf`): The number of search failures.\n - `search_time` (or `stime`): The amount of time spent searching, in milliseconds.\n - `search_total` (or `st`): The number of search operations on the source index for the transform.\n - `source_index` (or `si`, `sourceIndex`): The source indices for the transform. It can be a single index, an index\npattern (for example, `\"my-index-*\"`), an array of indices (for example,\n`[\"my-index-000001\", \"my-index-000002\"]`), or an array of index patterns\n(for example, `[\"my-index-*\", \"my-other-index-*\"]`. For remote indices use\nthe syntax `\"remote_name:index_name\"`. If any indices are in remote\nclusters then the master node and at least one transform node must have the\n`remote_cluster_client` node role.\n - `state` (or `s`): The status of the transform, which can be one of the following values:\n\n* `aborting`: The transform is aborting.\n* `failed`: The transform failed. For more information about the failure,\ncheck the reason field.\n* `indexing`: The transform is actively processing data and creating new\ndocuments.\n* `started`: The transform is running but not actively indexing data.\n* `stopped`: The transform is stopped.\n* `stopping`: The transform is stopping.\n - `transform_type` (or `tt`): Indicates the type of transform: `batch` or `continuous`.\n - `trigger_count` (or `tc`): The number of times the transform has been triggered by the scheduler. For\nexample, the scheduler triggers the transform indexer to check for updates\nor ingest new data at an interval specified in the `frequency` property.\n - `version` (or `v`): The version of Elasticsearch that existed on the node when the transform\nwas created.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/cat._types.CatTransformColumns" - }, - "style": "form" - }, - "cat.transforms-time": { - "in": "query", - "name": "time", - "description": "The unit used to display time values.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "cat.transforms-size": { - "in": "query", - "name": "size", - "description": "The maximum number of transforms to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ccr.get_auto_follow_pattern-name": { - "in": "path", - "name": "name", - "description": "The auto-follow pattern collection that you want to retrieve.\nIf you do not specify a name, the API returns information for all collections.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "ccr.get_auto_follow_pattern-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "clear_scroll-scroll_id": { - "in": "path", - "name": "scroll_id", - "description": "A comma-separated list of scroll IDs to clear.\nTo clear all scroll IDs, use `_all`.\nIMPORTANT: Scroll IDs can be long. It is recommended to specify scroll IDs in the request body parameter.", - "required": true, - "deprecated": true, - "schema": { - "$ref": "#/components/schemas/_types.ScrollIds" - }, - "style": "simple" - }, - "cluster.allocation_explain-include_disk_info": { - "in": "query", - "name": "include_disk_info", - "description": "If true, returns information about disk usage and shard sizes.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.allocation_explain-include_yes_decisions": { - "in": "query", - "name": "include_yes_decisions", - "description": "If true, returns YES decisions in explanation.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.allocation_explain-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cluster.get_component_template-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of component template names used to limit the request.\nWildcard (`*`) expressions are supported.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "cluster.get_component_template-flat_settings": { - "in": "query", - "name": "flat_settings", - "description": "If `true`, returns settings in flat format.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.get_component_template-include_defaults": { - "in": "query", - "name": "include_defaults", - "description": "Return all default configurations for the component template (default: false)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.get_component_template-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request retrieves information from the local node only.\nIf `false`, information is retrieved from the master node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.get_component_template-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cluster.health-index": { - "in": "path", - "name": "index", - "description": "Comma-separated 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 `*`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "cluster.health-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "cluster.health-level": { - "in": "query", - "name": "level", - "description": "Can be one of cluster, indices or shards. Controls the details level of the health information returned.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Level" - }, - "style": "form" - }, - "cluster.health-local": { - "in": "query", - "name": "local", - "description": "If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.health-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cluster.health-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cluster.health-wait_for_active_shards": { - "in": "query", - "name": "wait_for_active_shards", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" - }, - "style": "form" - }, - "cluster.health-wait_for_events": { - "in": "query", - "name": "wait_for_events", - "description": "Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForEvents" - }, - "style": "form" - }, - "cluster.health-wait_for_nodes": { - "in": "query", - "name": "wait_for_nodes", - "description": "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.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.HealthStatus" - }, - "style": "form" - }, - "cluster.put_component_template-name": { - "in": "path", - "name": "name", - "description": "Name of the component template to create.\nElasticsearch includes the following built-in component templates: `logs-mappings`; `logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`.\nElastic Agent uses these templates to configure backing indices for its data streams.\nIf you use Elastic Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version.\nIf you don’t use Elastic Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "cluster.put_component_template-create": { - "in": "query", - "name": "create", - "description": "If `true`, this request cannot replace or update existing component templates.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.put_component_template-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cluster.state-metric": { - "in": "path", - "name": "metric", - "description": "Limit the information returned to the specified metrics", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Metrics" - }, - "style": "simple" - }, - "cluster.state-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "cluster.state-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.state-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "cluster.state-flat_settings": { - "in": "query", - "name": "flat_settings", - "description": "Return settings in flat format (default: false)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.state-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.state-local": { - "in": "query", - "name": "local", - "description": "Return local information, do not retrieve the state from master node (default: false)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.state-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Specify timeout for connection to master", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cluster.state-wait_for_metadata_version": { - "in": "query", - "name": "wait_for_metadata_version", - "description": "Wait for the metadata version to be equal or greater than the specified metadata version", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "style": "form" - }, - "cluster.state-wait_for_timeout": { - "in": "query", - "name": "wait_for_timeout", - "description": "The maximum time to wait for wait_for_metadata_version before timing out", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "cluster.stats-node_id": { - "in": "path", - "name": "node_id", - "description": "Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "cluster.stats-include_remotes": { - "in": "query", - "name": "include_remotes", - "description": "Include remote cluster data into the response", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "cluster.stats-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for each node to respond.\nIf a node does not respond before its timeout expires, the response does not include its stats.\nHowever, timed out nodes are included in the response’s `_nodes.failed` property. Defaults to no timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "connector.put-connector_id": { - "in": "path", - "name": "connector_id", - "description": "The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "count-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "count-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "count-analyzer": { - "in": "query", - "name": "analyzer", - "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "count-analyze_wildcard": { - "in": "query", - "name": "analyze_wildcard", - "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "count-default_operator": { - "in": "query", - "name": "default_operator", - "description": "The default operator for query string query: `AND` or `OR`.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "style": "form" - }, - "count-df": { - "in": "query", - "name": "df", - "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "count-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "count-ignore_throttled": { - "in": "query", - "name": "ignore_throttled", - "description": "If `true`, concrete, expanded, or aliased indices are ignored when frozen.", - "deprecated": true, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "count-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "count-lenient": { - "in": "query", - "name": "lenient", - "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "count-min_score": { - "in": "query", - "name": "min_score", - "description": "The minimum `_score` value that documents must have to be included in the result.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "count-preference": { - "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nBy default, it is random.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "count-routing": { - "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "count-terminate_after": { - "in": "query", - "name": "terminate_after", - "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "count-q": { - "in": "query", - "name": "q", - "description": "The query in Lucene query string syntax. This parameter cannot be used with a request body.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "create-id": { - "in": "path", - "name": "id", - "description": "A unique identifier for the document.\nTo automatically generate a document ID, use the `POST //_doc/` request format.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "create-index": { - "in": "path", - "name": "index", - "description": "The name of the data stream or index to target.\nIf the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn't exist and doesn’t match a data stream template, this request creates the index.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "create-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "create-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, - "create-include_source_on_error": { - "in": "query", - "name": "include_source_on_error", - "description": "True or false if to include the document source in the error message in case of parsing errors.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "create-op_type": { - "in": "query", - "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.\n\nSupported values include:\n - `index`: Overwrite any documents that already exist.\n - `create`: Only index documents that do not already exist.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.OpType" - }, - "style": "form" - }, - "create-pipeline": { - "in": "query", - "name": "pipeline", - "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "create-refresh": { - "in": "query", - "name": "refresh", - "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "create-require_alias": { - "in": "query", - "name": "require_alias", - "description": "If `true`, the destination must be an index alias.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "create-require_data_stream": { - "in": "query", - "name": "require_data_stream", - "description": "If `true`, the request's actions must target a data stream (existing or to be created).", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "create-routing": { - "in": "query", - "name": "routing", - "description": "A custom value that is used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "create-timeout": { - "in": "query", - "name": "timeout", - "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\nElasticsearch waits for at least the specified timeout period before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "create-version": { - "in": "query", - "name": "version", - "description": "The explicit version number for concurrency control.\nIt must be a non-negative long number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "style": "form" - }, - "create-version_type": { - "in": "query", - "name": "version_type", - "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n - `force`: This option is deprecated because it can cause primary and replica shards to diverge.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionType" - }, - "style": "form" - }, - "create-wait_for_active_shards": { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" - }, - "style": "form" - }, - "enrich.get_policy-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of enrich policy names used to limit the request.\nTo return information for all enrich policies, omit this parameter.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "enrich.get_policy-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "eql.search-index": { - "in": "path", - "name": "index", - "description": "The name of the index to scope the operation", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "eql.search-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "eql.search-allow_partial_search_results": { - "in": "query", - "name": "allow_partial_search_results", - "description": "If true, returns partial results if there are shard failures. If false, returns an error with no partial results.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "eql.search-allow_partial_sequence_results": { - "in": "query", - "name": "allow_partial_sequence_results", - "description": "If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all.\nThis flag has effect only if allow_partial_search_results is true.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "eql.search-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "eql.search-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If true, missing or closed indices are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "eql.search-keep_alive": { - "in": "query", - "name": "keep_alive", - "description": "Period for which the search and its results are stored on the cluster.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "eql.search-keep_on_completion": { - "in": "query", - "name": "keep_on_completion", - "description": "If true, the search and its results are stored on the cluster.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "eql.search-wait_for_completion_timeout": { - "in": "query", - "name": "wait_for_completion_timeout", - "description": "Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "explain-id": { - "in": "path", - "name": "id", - "description": "The document identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "explain-index": { - "in": "path", - "name": "index", - "description": "Index names that are used to limit the request.\nOnly a single index name can be provided to this parameter.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "explain-analyzer": { - "in": "query", - "name": "analyzer", - "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "explain-analyze_wildcard": { - "in": "query", - "name": "analyze_wildcard", - "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "explain-default_operator": { - "in": "query", - "name": "default_operator", - "description": "The default operator for query string query: `AND` or `OR`.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "style": "form" - }, - "explain-df": { - "in": "query", - "name": "df", - "description": "The field to use as default where no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "explain-lenient": { - "in": "query", - "name": "lenient", - "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "explain-preference": { - "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nIt is random by default.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "explain-routing": { - "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "explain-_source": { - "in": "query", - "name": "_source", - "description": "`True` or `false` to return the `_source` field or not or a list of fields to return.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" - }, - "style": "form" - }, - "explain-_source_excludes": { - "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "explain-_source_includes": { - "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "explain-stored_fields": { - "in": "query", - "name": "stored_fields", - "description": "A comma-separated list of stored fields to return in the response.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "explain-q": { - "in": "query", - "name": "q", - "description": "The query in the Lucene query string syntax.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "field_caps-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "field_caps-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If false, the request returns an error if any wildcard expression, index alias,\nor `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "field_caps-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "The 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 comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "field_caps-fields": { - "in": "query", - "name": "fields", - "description": "A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "field_caps-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, missing or closed indices are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "field_caps-include_unmapped": { - "in": "query", - "name": "include_unmapped", - "description": "If true, unmapped fields are included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "field_caps-filters": { - "in": "query", - "name": "filters", - "description": "A comma-separated list of filters to apply to the response.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "field_caps-types": { - "in": "query", - "name": "types", - "description": "A comma-separated list of field types to include.\nAny fields that do not match one of these types will be excluded from the results.\nIt defaults to empty, meaning that all field types are returned.", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "type": "string" + }, + "throttled_delete_retry.delay_increment": { + "description": "The delay before the first retry and the amount the delay is incremented by on each subsequent retry.\nThe default is 50ms and the minimum is 0ms.", + "default": "50ms", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttled_delete_retry.maximum_delay": { + "description": "The upper bound on how long the delays between retries will grow to.\nThe default is 5s and the minimum is 0ms.", + "default": "5s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttled_delete_retry.maximum_number_of_retries": { + "description": "The number times to retry a throttled snapshot deletion.\nThe default is 10 and the minimum value is 0 which will disable retries altogether.\nNote that if retries are enabled in the Azure client, each of these retries comprises that many client-level retries.", + "type": "number" + } + }, + "required": [ + "bucket" + ] } - }, - "style": "form" - }, - "field_caps-include_empty_fields": { - "in": "query", - "name": "include_empty_fields", - "description": "If false, empty fields are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + ] }, - "fleet.msearch-index": { - "in": "path", - "name": "index", - "description": "A single target to search. If the target is an index alias, it must resolve to a single index.", - "required": true, - "deprecated": false, - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.IndexName" + "snapshot._types.SharedFileSystemRepository": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + }, + { + "type": "object", + "properties": { + "type": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/shared-file-system-repository" + }, + "description": "The shared file system repository type.", + "type": "string", + "enum": [ + "fs" + ] + }, + "settings": { + "description": "The repository settings.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.SharedFileSystemRepositorySettings" + } + ] + } }, - { - "$ref": "#/components/schemas/_types.IndexAlias" - } - ] - }, - "style": "simple" - }, - "fleet.msearch-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "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.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.msearch-ccs_minimize_roundtrips": { - "in": "query", - "name": "ccs_minimize_roundtrips", - "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.msearch-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "fleet.msearch-ignore_throttled": { - "in": "query", - "name": "ignore_throttled", - "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.msearch-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If true, missing or closed indices are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.msearch-max_concurrent_searches": { - "in": "query", - "name": "max_concurrent_searches", - "description": "Maximum number of concurrent searches the multi search API can execute.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.msearch-max_concurrent_shard_requests": { - "in": "query", - "name": "max_concurrent_shard_requests", - "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.msearch-pre_filter_shard_size": { - "in": "query", - "name": "pre_filter_shard_size", - "description": "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.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.msearch-search_type": { - "in": "query", - "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SearchType" - }, - "style": "form" - }, - "fleet.msearch-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.msearch-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.msearch-wait_for_checkpoints": { - "in": "query", - "name": "wait_for_checkpoints", - "description": "A comma separated list of checkpoints. When configured, the search API will only be executed on a shard\nafter the relevant checkpoint has become visible for search. Defaults to an empty list which will cause\nElasticsearch to immediately execute the search.", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/fleet._types.Checkpoint" + "required": [ + "type", + "settings" + ] } - }, - "style": "form" - }, - "fleet.msearch-allow_partial_search_results": { - "in": "query", - "name": "allow_partial_search_results", - "description": "If true, returns partial results if there are shard request timeouts or shard failures.\nIf false, returns an error with no partial results.\nDefaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + ] }, - "fleet.search-index": { - "in": "path", - "name": "index", - "description": "A single target to search. If the target is an index alias, it must resolve to a single index.", - "required": true, - "deprecated": false, - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.IndexName" + "snapshot._types.SharedFileSystemRepositorySettings": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + }, + { + "type": "object", + "properties": { + "location": { + "description": "The location of the shared filesystem used to store and retrieve snapshots.\nThis location must be registered in the `path.repo` setting on all master and data nodes in the cluster.\nUnlike `path.repo`, this setting supports only a single file path.", + "type": "string" + }, + "max_number_of_snapshots": { + "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", + "default": 2147483647.0, + "type": "number" + }, + "readonly": { + "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, + "type": "boolean" + } }, - { - "$ref": "#/components/schemas/_types.IndexAlias" - } - ] - }, - "style": "simple" - }, - "fleet.search-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-analyzer": { - "in": "query", - "name": "analyzer", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "fleet.search-analyze_wildcard": { - "in": "query", - "name": "analyze_wildcard", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-batched_reduce_size": { - "in": "query", - "name": "batched_reduce_size", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.search-ccs_minimize_roundtrips": { - "in": "query", - "name": "ccs_minimize_roundtrips", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-default_operator": { - "in": "query", - "name": "default_operator", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "style": "form" - }, - "fleet.search-df": { - "in": "query", - "name": "df", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "fleet.search-docvalue_fields": { - "in": "query", - "name": "docvalue_fields", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "fleet.search-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "fleet.search-explain": { - "in": "query", - "name": "explain", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-ignore_throttled": { - "in": "query", - "name": "ignore_throttled", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-lenient": { - "in": "query", - "name": "lenient", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-max_concurrent_shard_requests": { - "in": "query", - "name": "max_concurrent_shard_requests", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.search-preference": { - "in": "query", - "name": "preference", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "fleet.search-pre_filter_shard_size": { - "in": "query", - "name": "pre_filter_shard_size", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.search-request_cache": { - "in": "query", - "name": "request_cache", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-routing": { - "in": "query", - "name": "routing", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "fleet.search-scroll": { - "in": "query", - "name": "scroll", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "fleet.search-search_type": { - "in": "query", - "name": "search_type", - "description": "\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SearchType" - }, - "style": "form" - }, - "fleet.search-stats": { - "in": "query", - "name": "stats", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "type": "string" + "required": [ + "location" + ] } - }, - "style": "form" - }, - "fleet.search-stored_fields": { - "in": "query", - "name": "stored_fields", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "fleet.search-suggest_field": { - "in": "query", - "name": "suggest_field", - "description": "Specifies which field to use for suggestions.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "form" - }, - "fleet.search-suggest_mode": { - "in": "query", - "name": "suggest_mode", - "description": "\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SuggestMode" - }, - "style": "form" - }, - "fleet.search-suggest_size": { - "in": "query", - "name": "suggest_size", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.search-suggest_text": { - "in": "query", - "name": "suggest_text", - "description": "The source text for which the suggestions should be returned.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "fleet.search-terminate_after": { - "in": "query", - "name": "terminate_after", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.search-timeout": { - "in": "query", - "name": "timeout", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "fleet.search-track_total_hits": { - "in": "query", - "name": "track_total_hits", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.TrackHits" - }, - "style": "form" - }, - "fleet.search-track_scores": { - "in": "query", - "name": "track_scores", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-typed_keys": { - "in": "query", - "name": "typed_keys", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-version": { - "in": "query", - "name": "version", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-_source": { - "in": "query", - "name": "_source", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" - }, - "style": "form" - }, - "fleet.search-_source_excludes": { - "in": "query", - "name": "_source_excludes", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "fleet.search-_source_includes": { - "in": "query", - "name": "_source_includes", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "fleet.search-seq_no_primary_term": { - "in": "query", - "name": "seq_no_primary_term", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "fleet.search-q": { - "in": "query", - "name": "q", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "fleet.search-size": { - "in": "query", - "name": "size", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "fleet.search-from": { - "in": "query", - "name": "from", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + ] }, - "fleet.search-sort": { - "in": "query", - "name": "sort", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" + "snapshot._types.ReadOnlyUrlRepository": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + }, + { + "type": "object", + "properties": { + "type": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/read-only-url-repository" + }, + "description": "The read-only URL repository type.", + "type": "string", + "enum": [ + "url" + ] + }, + "settings": { + "description": "The repository settings.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.ReadOnlyUrlRepositorySettings" + } + ] + } }, - { - "type": "array", - "items": { + "required": [ + "type", + "settings" + ] + } + ] + }, + "snapshot._types.ReadOnlyUrlRepositorySettings": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + }, + { + "type": "object", + "properties": { + "http_max_retries": { + "description": "The maximum number of retries for HTTP and HTTPS URLs.", + "default": 5.0, + "type": "number" + }, + "http_socket_timeout": { + "description": "The maximum wait time for data transfers over a connection.", + "default": "50s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max_number_of_snapshots": { + "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", + "default": 2147483647.0, + "type": "number" + }, + "url": { + "description": "The URL location of the root of the shared filesystem repository.\nThe following protocols are supported:\n\n* `file`\n* `ftp`\n* `http`\n* `https`\n* `jar`\n\nURLs using the HTTP, HTTPS, or FTP protocols must be explicitly allowed with the `repositories.url.allowed_urls` cluster setting.\nThis setting supports wildcards in the place of a host, path, query, or fragment in the URL.\n\nURLs using the file protocol must point to the location of a shared filesystem accessible to all master and data nodes in the cluster.\nThis location must be registered in the `path.repo` setting.\nYou don't need to register URLs using the FTP, HTTP, HTTPS, or JAR protocols in the `path.repo` setting.", "type": "string" } - } - ] - }, - "style": "form" - }, - "fleet.search-wait_for_checkpoints": { - "in": "query", - "name": "wait_for_checkpoints", - "description": "A comma separated list of checkpoints. When configured, the search API will only be executed on a shard\nafter the relevant checkpoint has become visible for search. Defaults to an empty list which will cause\nElasticsearch to immediately execute the search.", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/fleet._types.Checkpoint" + }, + "required": [ + "url" + ] } - }, - "style": "form" + ] }, - "fleet.search-allow_partial_search_results": { - "in": "query", - "name": "allow_partial_search_results", - "description": "If true, returns partial results if there are shard request timeouts or shard failures.\nIf false, returns an error with no partial results.\nDefaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "graph.explore-index": { - "in": "path", - "name": "index", - "description": "Name of the index.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "graph.explore-routing": { - "in": "query", - "name": "routing", - "description": "Custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "graph.explore-timeout": { - "in": "query", - "name": "timeout", - "description": "Specifies the period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "health_report-feature": { - "in": "path", - "name": "feature", - "description": "A feature of the cluster, as returned by the top-level health report API.", - "required": true, - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" + "snapshot._types.SourceOnlyRepository": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositoryBase" + }, + { + "type": "object", + "properties": { + "type": { + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/source-only-repository" + }, + "description": "The source-only repository type.", + "type": "string", + "enum": [ + "source" + ] + }, + "settings": { + "description": "The repository settings.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.SourceOnlyRepositorySettings" + } + ] + } }, - { - "type": "array", - "items": { + "required": [ + "type", + "settings" + ] + } + ] + }, + "snapshot._types.SourceOnlyRepositorySettings": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.RepositorySettingsBase" + }, + { + "type": "object", + "properties": { + "delegate_type": { + "description": "The delegated repository type. For valid values, refer to the `type` parameter.\nSource repositories can use `settings` properties for its delegated repository type.", "type": "string" + }, + "max_number_of_snapshots": { + "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", + "default": 2147483647.0, + "type": "number" + }, + "read_only": { + "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, + "type": "boolean" } } - ] - }, - "style": "simple" - }, - "health_report-timeout": { - "in": "query", - "name": "timeout", - "description": "Explicit operation timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "health_report-verbose": { - "in": "query", - "name": "verbose", - "description": "Opt-in for more information about the health of the system.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "health_report-size": { - "in": "query", - "name": "size", - "description": "Limit the number of affected resources the health report API returns.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ilm.get_lifecycle-policy": { - "in": "path", - "name": "policy", - "description": "Identifier for the policy.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "ilm.get_lifecycle-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "ilm.get_lifecycle-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "index-id": { - "in": "path", - "name": "id", - "description": "A unique identifier for the document.\nTo automatically generate a document ID, use the `POST //_doc/` request format and omit this parameter.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "index-index": { - "in": "path", - "name": "index", - "description": "The name of the data stream or index to target.\nIf the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn't exist and doesn't match a data stream template, this request creates the index.\nYou can check for existing targets with the resolve index API.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "index-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "index-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, - "index-include_source_on_error": { - "in": "query", - "name": "include_source_on_error", - "description": "True or false if to include the document source in the error message in case of parsing errors.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "index-op_type": { - "in": "query", - "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.\n\nSupported values include:\n - `index`: Overwrite any documents that already exist.\n - `create`: Only index documents that do not already exist.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.OpType" - }, - "style": "form" - }, - "index-pipeline": { - "in": "query", - "name": "pipeline", - "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "index-refresh": { - "in": "query", - "name": "refresh", - "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "index-routing": { - "in": "query", - "name": "routing", - "description": "A custom value that is used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "index-timeout": { - "in": "query", - "name": "timeout", - "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "index-version": { - "in": "query", - "name": "version", - "description": "An explicit version number for concurrency control.\nIt must be a non-negative long number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "style": "form" - }, - "index-version_type": { - "in": "query", - "name": "version_type", - "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n - `force`: This option is deprecated because it can cause primary and replica shards to diverge.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionType" - }, - "style": "form" - }, - "index-wait_for_active_shards": { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" - }, - "style": "form" - }, - "index-require_alias": { - "in": "query", - "name": "require_alias", - "description": "If `true`, the destination must be an index alias.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.analyze-index": { - "in": "path", - "name": "index", - "description": "Index used to derive the analyzer.\nIf specified, the `analyzer` or field parameter overrides this value.\nIf no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.analyze-index_": { - "in": "query", - "name": "index", - "description": "Index used to derive the analyzer.\nIf specified, the `analyzer` or field parameter overrides this value.\nIf no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "form" - }, - "indices.clear_cache-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.clear_cache-index_": { - "in": "query", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "form" - }, - "indices.clear_cache-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.clear_cache-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.clear_cache-fielddata": { - "in": "query", - "name": "fielddata", - "description": "If `true`, clears the fields cache.\nUse the `fields` parameter to clear the cache of specific fields only.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.clear_cache-fields": { - "in": "query", - "name": "fields", - "description": "Comma-separated list of field names used to limit the `fielddata` parameter.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "indices.clear_cache-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.clear_cache-query": { - "in": "query", - "name": "query", - "description": "If `true`, clears the query cache.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.clear_cache-request": { - "in": "query", - "name": "request", - "description": "If `true`, clears the request cache.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.clone-index": { - "in": "path", - "name": "index", - "description": "Name of the source index to clone.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.clone-target": { - "in": "path", - "name": "target", - "description": "Name of the target index to create.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "indices.clone-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.clone-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.clone-wait_for_active_shards": { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" - }, - "style": "form" - }, - "indices.create_from-source": { - "in": "path", - "name": "source", - "description": "The source index or data stream name", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.create_from-dest": { - "in": "path", - "name": "dest", - "description": "The destination index or data stream name", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.data_streams_stats-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of data streams used to limit the request.\nWildcard expressions (`*`) are supported.\nTo target all data streams in a cluster, omit this parameter or use `*`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.data_streams_stats-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.delete_alias-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams or indices used to limit the request.\nSupports wildcards (`*`).", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.delete_alias-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of aliases to remove.\nSupports wildcards (`*`). To remove all aliases, use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "indices.delete_alias-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.delete_alias-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.exists_alias-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of aliases to check. Supports wildcards (`*`).", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "indices.exists_alias-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams or indices used to limit the request. Supports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.exists_alias-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.exists_alias-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.exists_alias-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, requests that include a missing data stream or index in the target indices or data streams return an error.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.exists_alias-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.flush-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases to flush.\nSupports wildcards (`*`).\nTo flush all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.flush-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.flush-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.flush-force": { - "in": "query", - "name": "force", - "description": "If `true`, the request forces a flush even if there are no changes to commit to the index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.flush-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.flush-wait_if_ongoing": { - "in": "query", - "name": "wait_if_ongoing", - "description": "If `true`, the flush operation blocks until execution when another flush operation is running.\nIf `false`, Elasticsearch returns an error if you request a flush when another flush operation is running.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.forcemerge-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.forcemerge-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.forcemerge-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.forcemerge-flush": { - "in": "query", - "name": "flush", - "description": "Specify whether the index should be flushed after performing the operation (default: true)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.forcemerge-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.forcemerge-max_num_segments": { - "in": "query", - "name": "max_num_segments", - "description": "The number of segments the index should be merged into (default: dynamic)", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "indices.forcemerge-only_expunge_deletes": { - "in": "query", - "name": "only_expunge_deletes", - "description": "Specify whether the operation should only expunge deleted documents", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.forcemerge-wait_for_completion": { - "in": "query", - "name": "wait_for_completion", - "description": "Should the request wait until the force merge is completed.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_alias-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of aliases to retrieve.\nSupports wildcards (`*`).\nTo retrieve all aliases, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "indices.get_alias-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams or indices used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.get_alias-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_alias-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.get_alias-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_alias-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.get_data_stream-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of data stream names used to limit the request.\nWildcard (`*`) expressions are supported. If omitted, all data streams are returned.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DataStreamNames" - }, - "style": "simple" - }, - "indices.get_data_stream-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.get_data_stream-include_defaults": { - "in": "query", - "name": "include_defaults", - "description": "If true, returns all relevant default configurations for the index template.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_data_stream-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.get_data_stream-verbose": { - "in": "query", - "name": "verbose", - "description": "Whether the maximum timestamp for each data stream should be calculated and returned.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_field_mapping-fields": { - "in": "path", - "name": "fields", - "description": "Comma-separated list or wildcard expression of fields used to limit returned information.\nSupports wildcards (`*`).", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "simple" - }, - "indices.get_field_mapping-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.get_field_mapping-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_field_mapping-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.get_field_mapping-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_field_mapping-include_defaults": { - "in": "query", - "name": "include_defaults", - "description": "If `true`, return all default settings in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_index_template-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "indices.get_index_template-local": { - "in": "query", - "name": "local", - "description": "If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_index_template-flat_settings": { - "in": "query", - "name": "flat_settings", - "description": "If true, returns settings in flat format.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_index_template-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.get_index_template-include_defaults": { - "in": "query", - "name": "include_defaults", - "description": "If true, returns all relevant default configurations for the index template.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_mapping-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.get_mapping-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_mapping-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.get_mapping-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_mapping-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request retrieves information from the local node only.", - "deprecated": true, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_mapping-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.get_settings-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit\nthe request. Supports wildcards (`*`). To target all data streams and\nindices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.get_settings-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list or wildcard expression of settings to retrieve.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "indices.get_settings-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index\nalias, or `_all` value targets only missing or closed indices. This\nbehavior applies even if the request targets other open indices. For\nexample, a request targeting `foo*,bar*` returns an error if an index\nstarts with foo but no index starts with `bar`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_settings-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.get_settings-flat_settings": { - "in": "query", - "name": "flat_settings", - "description": "If `true`, returns settings in flat format.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_settings-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_settings-include_defaults": { - "in": "query", - "name": "include_defaults", - "description": "If `true`, return all default settings in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_settings-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request retrieves information from the local node only. If\n`false`, information is retrieved from the master node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_settings-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.get_template-name": { - "in": "path", - "name": "name", - "description": "Comma-separated list of index template names used to limit the request.\nWildcard (`*`) expressions are supported.\nTo return all index templates, omit this parameter or use a value of `_all` or `*`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "indices.get_template-flat_settings": { - "in": "query", - "name": "flat_settings", - "description": "If `true`, returns settings in flat format.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_template-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request retrieves information from the local node only.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.get_template-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_alias-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams or indices to add.\nSupports wildcards (`*`).\nWildcard patterns that match both data streams and indices return an error.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.put_alias-name": { - "in": "path", - "name": "name", - "description": "Alias to update.\nIf the alias doesn’t exist, the request creates it.\nIndex alias names support date math.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "indices.put_alias-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_alias-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_index_template-name": { - "in": "path", - "name": "name", - "description": "Index or template name", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "indices.put_index_template-create": { - "in": "query", - "name": "create", - "description": "If `true`, this request cannot replace or update existing index templates.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_index_template-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_index_template-cause": { - "in": "query", - "name": "cause", - "description": "User defined reason for creating/updating the index template", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "indices.put_mapping-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.put_mapping-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_mapping-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.put_mapping-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_mapping-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_mapping-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_mapping-write_index_only": { - "in": "query", - "name": "write_index_only", - "description": "If `true`, the mappings are applied only to the current write index for the target.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_settings-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit\nthe request. Supports wildcards (`*`). To target all data streams and\nindices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.put_settings-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index\nalias, or `_all` value targets only missing or closed indices. This\nbehavior applies even if the request targets other open indices. For\nexample, a request targeting `foo*,bar*` returns an error if an index\nstarts with `foo` but no index starts with `bar`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_settings-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target\ndata streams, this argument determines whether wildcard expressions match\nhidden data streams. Supports comma-separated values, such as\n`open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.put_settings-flat_settings": { - "in": "query", - "name": "flat_settings", - "description": "If `true`, returns settings in flat format.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_settings-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, returns settings in flat format.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_settings-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_settings-preserve_existing": { - "in": "query", - "name": "preserve_existing", - "description": "If `true`, existing index settings remain unchanged.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_settings-reopen": { - "in": "query", - "name": "reopen", - "description": "Whether to close and reopen the index to apply non-dynamic settings.\nIf set to `true` the indices to which the settings are being applied\nwill be closed temporarily and then reopened in order to apply the changes.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_settings-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_template-name": { - "in": "path", - "name": "name", - "description": "The name of the template", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "indices.put_template-create": { - "in": "query", - "name": "create", - "description": "If true, this request cannot replace or update existing index templates.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.put_template-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.put_template-order": { - "in": "query", - "name": "order", - "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "indices.put_template-cause": { - "in": "query", - "name": "cause", - "description": "User defined reason for creating/updating the index template", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "indices.recovery-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.recovery-active_only": { - "in": "query", - "name": "active_only", - "description": "If `true`, the response only includes ongoing shard recoveries.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + } + ] }, - "indices.recovery-detailed": { - "in": "query", - "name": "detailed", - "description": "If `true`, the response includes detailed information about shard recoveries.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.refresh-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.refresh-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "snapshot._types.SnapshotSort": { + "type": "string", + "enum": [ + "start_time", + "duration", + "name", + "index_count", + "repository", + "shard_count", + "failed_shard_count" + ] }, - "indices.refresh-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" + "snapshot._types.SnapshotState": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "FAILED", + "PARTIAL", + "INCOMPATIBLE" + ] }, - "indices.refresh-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.reload_search_analyzers-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of index names to reload analyzers for", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.reload_search_analyzers-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot.get.SnapshotResponseItem": { + "type": "object", + "properties": { + "repository": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snapshot._types.SnapshotInfo" + } + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + } }, - "style": "form" + "required": [ + "repository" + ] }, - "indices.reload_search_analyzers-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "snapshot.repository_analyze.SnapshotNodeInfo": { + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + } }, - "style": "form" + "required": [ + "id", + "name" + ] }, - "indices.reload_search_analyzers-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.reload_search_analyzers-resource": { - "in": "query", - "name": "resource", - "description": "Changed resource to reload analyzers from if applicable", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "indices.resolve_cluster-name": { - "in": "path", - "name": "name", - "description": "A comma-separated list of names or index patterns for the indices, aliases, and data streams to resolve.\nResources on remote clusters can be specified using the ``:`` syntax.\nIndex and cluster exclusions (e.g., `-cluster1:*`) are also supported.\nIf no index expression is specified, information about all remote clusters configured on the local cluster\nis returned without doing any index matching", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "indices.resolve_cluster-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing\nor closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot.repository_analyze.DetailsInfo": { + "type": "object", + "properties": { + "blob": { + "description": "A description of the blob that was written and read.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.BlobDetails" + } + ] + }, + "overwrite_elapsed": { + "description": "The elapsed time spent overwriting the blob.\nIf the blob was not overwritten, this information is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "overwrite_elapsed_nanos": { + "description": "The elapsed time spent overwriting the blob, in nanoseconds.\nIf the blob was not overwritten, this information is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "write_elapsed": { + "description": "The elapsed time spent writing the blob.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "write_elapsed_nanos": { + "description": "The elapsed time spent writing the blob, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "write_throttled": { + "description": "The length of time spent waiting for the `max_snapshot_bytes_per_sec` (or `indices.recovery.max_bytes_per_sec` if the recovery settings for managed services are set) throttle while writing the blob.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "write_throttled_nanos": { + "description": "The length of time spent waiting for the `max_snapshot_bytes_per_sec` (or `indices.recovery.max_bytes_per_sec` if the recovery settings for managed services are set) throttle while writing the blob, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "writer_node": { + "description": "The node which wrote the blob and coordinated the read operations.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.SnapshotNodeInfo" + } + ] + } }, - "style": "form" + "required": [ + "blob", + "write_elapsed", + "write_elapsed_nanos", + "write_throttled", + "write_throttled_nanos", + "writer_node" + ] }, - "indices.resolve_cluster-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "snapshot.repository_analyze.BlobDetails": { + "type": "object", + "properties": { + "name": { + "description": "The name of the blob.", + "type": "string" + }, + "overwritten": { + "description": "Indicates whether the blob was overwritten while the read operations were ongoing.\n /**", + "type": "boolean" + }, + "read_early": { + "type": "boolean" + }, + "read_end": { + "description": "The position, in bytes, at which read operations completed.", + "type": "number" + }, + "read_start": { + "description": "The position, in bytes, at which read operations started.", + "type": "number" + }, + "reads": { + "description": "A description of every read operation performed on the blob.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.ReadBlobDetails" + } + ] + }, + "size": { + "description": "The size of the blob.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "size_bytes": { + "description": "The size of the blob in bytes.", + "type": "number" + } }, - "style": "form" + "required": [ + "name", + "overwritten", + "read_early", + "read_end", + "read_start", + "reads", + "size", + "size_bytes" + ] }, - "indices.resolve_cluster-ignore_throttled": { - "in": "query", - "name": "ignore_throttled", - "description": "If true, concrete, expanded, or aliased indices are ignored when frozen.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", - "deprecated": true, - "schema": { - "type": "boolean" + "snapshot.repository_analyze.ReadBlobDetails": { + "type": "object", + "properties": { + "before_write_complete": { + "description": "Indicates whether the read operation may have started before the write operation was complete.", + "type": "boolean" + }, + "elapsed": { + "description": "The length of time spent reading the blob.\nIf the blob was not found, this detail is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "elapsed_nanos": { + "description": "The length of time spent reading the blob, in nanoseconds.\nIf the blob was not found, this detail is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "first_byte_time": { + "description": "The length of time waiting for the first byte of the read operation to be received.\nIf the blob was not found, this detail is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "first_byte_time_nanos": { + "description": "The length of time waiting for the first byte of the read operation to be received, in nanoseconds.\nIf the blob was not found, this detail is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "found": { + "description": "Indicates whether the blob was found by the read operation.\nIf the read was started before the write completed or the write was ended before completion, it might be false.", + "type": "boolean" + }, + "node": { + "description": "The node that performed the read operation.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.SnapshotNodeInfo" + } + ] + }, + "throttled": { + "description": "The length of time spent waiting due to the `max_restore_bytes_per_sec` or `indices.recovery.max_bytes_per_sec` throttles during the read of the blob.\nIf the blob was not found, this detail is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttled_nanos": { + "description": "The length of time spent waiting due to the `max_restore_bytes_per_sec` or `indices.recovery.max_bytes_per_sec` throttles during the read of the blob, in nanoseconds.\nIf the blob was not found, this detail is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + } }, - "style": "form" + "required": [ + "first_byte_time_nanos", + "found", + "node" + ] }, - "indices.resolve_cluster-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If false, the request returns an error if it targets a missing or closed index.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.resolve_cluster-timeout": { - "in": "query", - "name": "timeout", - "description": "The maximum time to wait for remote clusters to respond.\nIf a remote cluster does not respond within this timeout period, the API response\nwill show the cluster as not connected and include an error message that the\nrequest timed out.\n\nThe default timeout is unset and the query can take\nas long as the networking layer is configured to wait for remote clusters that are\nnot responding (typically 30 seconds).", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.rollover-alias": { - "in": "path", - "name": "alias", - "description": "Name of the data stream or index alias to roll over.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexAlias" - }, - "style": "simple" - }, - "indices.rollover-new_index": { - "in": "path", - "name": "new_index", - "description": "Name of the index to create.\nSupports date math.\nData streams do not support this parameter.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.rollover-dry_run": { - "in": "query", - "name": "dry_run", - "description": "If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.rollover-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.rollover-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.rollover-wait_for_active_shards": { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" - }, - "style": "form" - }, - "indices.rollover-lazy": { - "in": "query", - "name": "lazy", - "description": "If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write.\nOnly allowed on data streams.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.segments-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.segments-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot.repository_analyze.SummaryInfo": { + "type": "object", + "properties": { + "read": { + "description": "A collection of statistics that summarise the results of the read operations in the test.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.ReadSummaryInfo" + } + ] + }, + "write": { + "description": "A collection of statistics that summarise the results of the write operations in the test.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot.repository_analyze.WriteSummaryInfo" + } + ] + } }, - "style": "form" + "required": [ + "read", + "write" + ] }, - "indices.segments-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "snapshot.repository_analyze.ReadSummaryInfo": { + "type": "object", + "properties": { + "count": { + "description": "The number of read operations performed in the test.", + "type": "number" + }, + "max_wait": { + "description": "The maximum time spent waiting for the first byte of any read request to be received.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "max_wait_nanos": { + "description": "The maximum time spent waiting for the first byte of any read request to be received, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "total_elapsed": { + "description": "The total elapsed time spent on reading blobs in the test.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_elapsed_nanos": { + "description": "The total elapsed time spent on reading blobs in the test, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "total_size": { + "description": "The total size of all the blobs or partial blobs read in the test.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_size_bytes": { + "description": "The total size of all the blobs or partial blobs read in the test, in bytes.", + "type": "number" + }, + "total_throttled": { + "description": "The total time spent waiting due to the `max_restore_bytes_per_sec` or `indices.recovery.max_bytes_per_sec` throttles.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_throttled_nanos": { + "description": "The total time spent waiting due to the `max_restore_bytes_per_sec` or `indices.recovery.max_bytes_per_sec` throttles, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "total_wait": { + "description": "The total time spent waiting for the first byte of each read request to be received.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_wait_nanos": { + "description": "The total time spent waiting for the first byte of each read request to be received, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + } }, - "style": "form" + "required": [ + "count", + "max_wait", + "max_wait_nanos", + "total_elapsed", + "total_elapsed_nanos", + "total_size", + "total_size_bytes", + "total_throttled", + "total_throttled_nanos", + "total_wait", + "total_wait_nanos" + ] }, - "indices.segments-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.shard_stores-index": { - "in": "path", - "name": "index", - "description": "List of data streams, indices, and aliases used to limit the request.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.shard_stores-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If false, the request returns an error if any wildcard expression, index alias, or _all\nvalue targets only missing or closed indices. This behavior applies even if the request\ntargets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot.repository_analyze.WriteSummaryInfo": { + "type": "object", + "properties": { + "count": { + "description": "The number of write operations performed in the test.", + "type": "number" + }, + "total_elapsed": { + "description": "The total elapsed time spent on writing blobs in the test.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_elapsed_nanos": { + "description": "The total elapsed time spent on writing blobs in the test, in nanoseconds.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitNanos" + } + ] + }, + "total_size": { + "description": "The total size of all the blobs written in the test.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ByteSize" + } + ] + }, + "total_size_bytes": { + "description": "The total size of all the blobs written in the test, in bytes.", + "type": "number" + }, + "total_throttled": { + "description": "The total time spent waiting due to the `max_snapshot_bytes_per_sec` throttle.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "total_throttled_nanos": { + "description": "The total time spent waiting due to the `max_snapshot_bytes_per_sec` throttle, in nanoseconds.", + "type": "number" + } }, - "style": "form" + "required": [ + "count", + "total_elapsed", + "total_elapsed_nanos", + "total_size", + "total_size_bytes", + "total_throttled", + "total_throttled_nanos" + ] }, - "indices.shard_stores-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams,\nthis argument determines whether wildcard expressions match hidden data streams.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "snapshot.restore.SnapshotRestore": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } + }, + "snapshot": { + "type": "string" + }, + "shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + } }, - "style": "form" + "required": [ + "indices", + "snapshot", + "shards" + ] }, - "indices.shard_stores-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If true, missing or closed indices are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot._types.Status": { + "type": "object", + "properties": { + "include_global_state": { + "description": "Indicates whether the current cluster state is included in the snapshot.", + "type": "boolean" + }, + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/snapshot._types.SnapshotIndexStats" + } + }, + "repository": { + "description": "The name of the repository that includes the snapshot.", + "type": "string" + }, + "shards_stats": { + "description": "Statistics for the shards in the snapshot.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.ShardsStats" + } + ] + }, + "snapshot": { + "description": "The name of the snapshot.", + "type": "string" + }, + "state": { + "description": "The current snapshot state:\n\n* `FAILED`: The snapshot finished with an error and failed to store any data.\n* `STARTED`: The snapshot is currently running.\n* `SUCCESS`: The snapshot completed.", + "type": "string" + }, + "stats": { + "description": "Details about the number (`file_count`) and size (`size_in_bytes`) of files included in the snapshot.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.SnapshotStats" + } + ] + }, + "uuid": { + "description": "The universally unique identifier (UUID) for the snapshot.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Uuid" + } + ] + } }, - "style": "form" + "required": [ + "include_global_state", + "indices", + "repository", + "shards_stats", + "snapshot", + "state", + "stats", + "uuid" + ] }, - "indices.shard_stores-status": { - "in": "query", - "name": "status", - "description": "List of shard health statuses used to limit the request.\n\nSupported values include:\n - `green`: The primary shard and all replica shards are assigned.\n - `yellow`: One or more replica shards are unassigned.\n - `red`: The primary shard is unassigned.\n - `all`: Return all shards, regardless of health status.\n\n", - "deprecated": false, - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/indices.shard_stores.ShardStoreStatus" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/indices.shard_stores.ShardStoreStatus" + "snapshot._types.SnapshotIndexStats": { + "type": "object", + "properties": { + "shards": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/snapshot._types.SnapshotShardsStatus" + } + }, + "shards_stats": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.ShardsStats" + } + ] + }, + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.SnapshotStats" } - } - ] - }, - "style": "form" - }, - "indices.shrink-index": { - "in": "path", - "name": "index", - "description": "Name of the source index to shrink.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.shrink-target": { - "in": "path", - "name": "target", - "description": "Name of the target index to create.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.shrink-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.shrink-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.shrink-wait_for_active_shards": { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" - }, - "style": "form" - }, - "indices.simulate_template-name": { - "in": "path", - "name": "name", - "description": "Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit\nthis parameter and specify the template configuration in the request body.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "indices.simulate_template-create": { - "in": "query", - "name": "create", - "description": "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.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.simulate_template-cause": { - "in": "query", - "name": "cause", - "description": "User defined reason for dry-run creating the new template for simulation purposes", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "indices.simulate_template-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.simulate_template-include_defaults": { - "in": "query", - "name": "include_defaults", - "description": "If true, returns all relevant default configurations for the index template.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.split-index": { - "in": "path", - "name": "index", - "description": "Name of the source index to split.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.split-target": { - "in": "path", - "name": "target", - "description": "Name of the target index to create.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "indices.split-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.split-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "indices.split-wait_for_active_shards": { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.WaitForActiveShards" - }, - "style": "form" - }, - "indices.stats-metric": { - "in": "path", - "name": "metric", - "description": "Limit the information returned the specific metrics.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Metrics" - }, - "style": "simple" - }, - "indices.stats-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.stats-completion_fields": { - "in": "query", - "name": "completion_fields", - "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "indices.stats-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.stats-fielddata_fields": { - "in": "query", - "name": "fielddata_fields", - "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "indices.stats-fields": { - "in": "query", - "name": "fields", - "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "indices.stats-forbid_closed_indices": { - "in": "query", - "name": "forbid_closed_indices", - "description": "If true, statistics are not collected from closed indices.", - "deprecated": false, - "schema": { - "type": "boolean" + ] + } }, - "style": "form" + "required": [ + "shards", + "shards_stats", + "stats" + ] }, - "indices.stats-groups": { - "in": "query", - "name": "groups", - "description": "Comma-separated list of search groups to include in the search statistics.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + "snapshot._types.SnapshotShardsStatus": { + "type": "object", + "properties": { + "stage": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.ShardsStatsStage" } - } - ] - }, - "style": "form" - }, - "indices.stats-include_segment_file_sizes": { - "in": "query", - "name": "include_segment_file_sizes", - "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.stats-include_unloaded_segments": { - "in": "query", - "name": "include_unloaded_segments", - "description": "If true, the response includes information from segments that are not loaded into memory.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.stats-level": { - "in": "query", - "name": "level", - "description": "Indicates whether statistics are aggregated at the cluster, index, or shard level.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Level" - }, - "style": "form" - }, - "indices.validate_query-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases to search.\nSupports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "indices.validate_query-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.validate_query-all_shards": { - "in": "query", - "name": "all_shards", - "description": "If `true`, the validation is executed on all shards instead of one random shard per index.", - "deprecated": false, - "schema": { - "type": "boolean" + ] + }, + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.ShardsStatsSummary" + } + ] + } }, - "style": "form" + "required": [ + "stage", + "stats" + ] }, - "indices.validate_query-analyzer": { - "in": "query", - "name": "analyzer", - "description": "Analyzer to use for the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" + "snapshot._types.ShardsStatsStage": { + "type": "string", + "enum": [ + "DONE", + "FAILURE", + "FINALIZE", + "INIT", + "STARTED" + ] }, - "indices.validate_query-analyze_wildcard": { - "in": "query", - "name": "analyze_wildcard", - "description": "If `true`, wildcard and prefix queries are analyzed.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.validate_query-default_operator": { - "in": "query", - "name": "default_operator", - "description": "The default operator for query string query: `AND` or `OR`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "style": "form" - }, - "indices.validate_query-df": { - "in": "query", - "name": "df", - "description": "Field to use as default where no field prefix is given in the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "indices.validate_query-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "indices.validate_query-explain": { - "in": "query", - "name": "explain", - "description": "If `true`, the response returns detailed information if an error has occurred.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot._types.ShardsStatsSummary": { + "type": "object", + "properties": { + "incremental": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.ShardsStatsSummaryItem" + } + ] + }, + "total": { + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.ShardsStatsSummaryItem" + } + ] + }, + "start_time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + } }, - "style": "form" + "required": [ + "incremental", + "total", + "start_time_in_millis", + "time_in_millis" + ] }, - "indices.validate_query-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot._types.ShardsStatsSummaryItem": { + "type": "object", + "properties": { + "file_count": { + "type": "number" + }, + "size_in_bytes": { + "type": "number" + } }, - "style": "form" + "required": [ + "file_count", + "size_in_bytes" + ] }, - "indices.validate_query-lenient": { - "in": "query", - "name": "lenient", - "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot._types.ShardsStats": { + "type": "object", + "properties": { + "done": { + "description": "The number of shards that initialized, started, and finalized successfully.", + "type": "number" + }, + "failed": { + "description": "The number of shards that failed to be included in the snapshot.", + "type": "number" + }, + "finalizing": { + "description": "The number of shards that are finalizing but are not done.", + "type": "number" + }, + "initializing": { + "description": "The number of shards that are still initializing.", + "type": "number" + }, + "started": { + "description": "The number of shards that have started but are not finalized.", + "type": "number" + }, + "total": { + "description": "The total number of shards included in the snapshot.", + "type": "number" + } }, - "style": "form" + "required": [ + "done", + "failed", + "finalizing", + "initializing", + "started", + "total" + ] }, - "indices.validate_query-rewrite": { - "in": "query", - "name": "rewrite", - "description": "If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "indices.validate_query-q": { - "in": "query", - "name": "q", - "description": "Query in the Lucene query string syntax.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "inference.delete-task_type": { - "in": "path", - "name": "task_type", - "description": "The task type", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types.TaskType" - }, - "style": "simple" - }, - "inference.delete-inference_id": { - "in": "path", - "name": "inference_id", - "description": "The inference identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "inference.delete-dry_run": { - "in": "query", - "name": "dry_run", - "description": "When true, the endpoint is not deleted and a list of ingest processors which reference this endpoint is returned.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot._types.SnapshotStats": { + "type": "object", + "properties": { + "incremental": { + "description": "The number and size of files that still need to be copied as part of the incremental snapshot.\nFor completed snapshots, this property indicates the number and size of files that were not already in the repository and were copied as part of the incremental snapshot.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.FileCountSnapshotStats" + } + ] + }, + "start_time_in_millis": { + "description": "The time, in milliseconds, when the snapshot creation process started.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "time_in_millis": { + "description": "The total time, in milliseconds, that it took for the snapshot process to complete.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "total": { + "description": "The total number and size of files that are referenced by the snapshot.", + "allOf": [ + { + "$ref": "#/components/schemas/snapshot._types.FileCountSnapshotStats" + } + ] + } }, - "style": "form" + "required": [ + "incremental", + "start_time_in_millis", + "time_in_millis", + "total" + ] }, - "inference.delete-force": { - "in": "query", - "name": "force", - "description": "When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "inference.get-task_type": { - "in": "path", - "name": "task_type", - "description": "The task type", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types.TaskType" - }, - "style": "simple" - }, - "inference.get-inference_id": { - "in": "path", - "name": "inference_id", - "description": "The inference Id", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "inference.inference-task_type": { - "in": "path", - "name": "task_type", - "description": "The type of inference task that the model performs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types.TaskType" - }, - "style": "simple" - }, - "inference.inference-inference_id": { - "in": "path", - "name": "inference_id", - "description": "The unique identifier for the inference endpoint.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "inference.inference-timeout": { - "in": "query", - "name": "timeout", - "description": "The amount of time to wait for the inference request to complete.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "inference.put-task_type": { - "in": "path", - "name": "task_type", - "description": "The task type", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types.TaskType" - }, - "style": "simple" - }, - "inference.put-inference_id": { - "in": "path", - "name": "inference_id", - "description": "The inference Id", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "inference.update-inference_id": { - "in": "path", - "name": "inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "inference.update-task_type": { - "in": "path", - "name": "task_type", - "description": "The type of inference task that the model performs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types.TaskType" - }, - "style": "simple" - }, - "ingest.get_geoip_database-id": { - "in": "path", - "name": "id", - "description": "A comma-separated list of database configuration IDs to retrieve.\nWildcard (`*`) expressions are supported.\nTo get all database configurations, omit this parameter or use `*`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "ingest.get_ip_location_database-id": { - "in": "path", - "name": "id", - "description": "Comma-separated list of database configuration IDs to retrieve.\nWildcard (`*`) expressions are supported.\nTo get all database configurations, omit this parameter or use `*`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "ingest.get_ip_location_database-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "ingest.get_pipeline-id": { - "in": "path", - "name": "id", - "description": "Comma-separated list of pipeline IDs to retrieve.\nWildcard (`*`) expressions are supported.\nTo get all ingest pipelines, omit this parameter or use `*`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ingest.get_pipeline-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "ingest.get_pipeline-summary": { - "in": "query", - "name": "summary", - "description": "Return pipelines without their definitions (default: false)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ingest.simulate-id": { - "in": "path", - "name": "id", - "description": "The pipeline to test.\nIf you don't specify a `pipeline` in the request body, this parameter is required.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ingest.simulate-verbose": { - "in": "query", - "name": "verbose", - "description": "If `true`, the response includes output data for each processor in the executed pipeline.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot._types.FileCountSnapshotStats": { + "type": "object", + "properties": { + "file_count": { + "type": "number" + }, + "size_in_bytes": { + "type": "number" + } }, - "style": "form" + "required": [ + "file_count", + "size_in_bytes" + ] }, - "license.post-acknowledge": { - "in": "query", - "name": "acknowledge", - "description": "Specifies whether you acknowledge the license changes.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "license.post-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "license.post-timeout": { - "in": "query", - "name": "timeout", - "description": "The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "logstash.get_pipeline-id": { - "in": "path", - "name": "id", - "description": "A comma-separated list of pipeline identifiers.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "mget-index": { - "in": "path", - "name": "index", - "description": "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.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "mget-preference": { - "in": "query", - "name": "preference", - "description": "Specifies the node or shard the operation should be performed on. Random by default.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "mget-realtime": { - "in": "query", - "name": "realtime", - "description": "If `true`, the request is real-time as opposed to near-real-time.", - "deprecated": false, - "schema": { - "type": "boolean" + "snapshot.verify_repository.CompactNodeInfo": { + "type": "object", + "properties": { + "name": { + "description": "A human-readable name for the node.\nYou can set this name using the `node.name` property in `elasticsearch.yml`.\nThe default value is the machine's hostname.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + } }, - "style": "form" + "required": [ + "name" + ] }, - "mget-refresh": { - "in": "query", - "name": "refresh", - "description": "If `true`, the request refreshes relevant shards before retrieving documents.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "mget-routing": { - "in": "query", - "name": "routing", - "description": "Custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "mget-_source": { - "in": "query", - "name": "_source", - "description": "True or false to return the `_source` field or not, or a list of fields to return.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" - }, - "style": "form" - }, - "mget-_source_excludes": { - "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "mget-_source_includes": { - "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "mget-stored_fields": { - "in": "query", - "name": "stored_fields", - "description": "If `true`, retrieves the document fields stored in the index rather than the document `_source`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "migration.deprecations-index": { - "in": "path", - "name": "index", - "description": "Comma-separate list of data streams or indices to check. Wildcard (*) expressions are supported.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "ml.delete_expired_data-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for an anomaly detection job. It can be a job identifier, a\ngroup name, or a wildcard expression.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.delete_expired_data-requests_per_second": { - "in": "query", - "name": "requests_per_second", - "description": "The desired requests per second for the deletion processes. The default\nbehavior is no throttling.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.delete_expired_data-timeout": { - "in": "query", - "name": "timeout", - "description": "How long can the underlying delete processes run until they are canceled.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "ml.delete_forecast-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.delete_forecast-forecast_id": { - "in": "path", - "name": "forecast_id", - "description": "A comma-separated list of forecast identifiers. If you do not specify\nthis optional parameter or if you specify `_all` or `*` the API deletes\nall forecasts from the job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.delete_forecast-allow_no_forecasts": { - "in": "query", - "name": "allow_no_forecasts", - "description": "Specifies whether an error occurs when there are no forecasts. In\nparticular, if this parameter is set to `false` and there are no\nforecasts associated with the job, attempts to delete all forecasts\nreturn an error.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.delete_forecast-timeout": { - "in": "query", - "name": "timeout", - "description": "Specifies the period of time to wait for the completion of the delete\noperation. When this period of time elapses, the API fails and returns an\nerror.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "ml.explain_data_frame_analytics-id": { - "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job. This identifier can contain\nlowercase alphanumeric characters (a-z and 0-9), hyphens, and\nunderscores. It must start and end with alphanumeric characters.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_buckets-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_buckets-timestamp": { - "in": "path", - "name": "timestamp", - "description": "The timestamp of a single bucket result. If you do not specify this\nparameter, the API returns information about all buckets.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "simple" - }, - "ml.get_buckets-anomaly_score": { - "in": "query", - "name": "anomaly_score", - "description": "Returns buckets with anomaly scores greater or equal than this value.", - "deprecated": false, - "schema": { - "type": "number" + "sql._types.Column": { + "type": "object", + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "type": { + "type": "string" + } }, - "style": "form" + "required": [ + "name", + "type" + ] }, - "ml.get_buckets-desc": { - "in": "query", - "name": "desc", - "description": "If `true`, the buckets are sorted in descending order.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "sql._types.Row": { + "type": "array", + "items": { + "type": "object" + } }, - "ml.get_buckets-end": { - "in": "query", - "name": "end", - "description": "Returns buckets with timestamps earlier than this time. `-1` means it is\nunset and results are not limited to specific timestamps.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" + "sql.query.SqlFormat": { + "type": "string", + "enum": [ + "csv", + "json", + "tsv", + "txt", + "yaml", + "cbor", + "smile" + ] }, - "ml.get_buckets-exclude_interim": { - "in": "query", - "name": "exclude_interim", - "description": "If `true`, the output excludes interim results.", - "deprecated": false, - "schema": { - "type": "boolean" + "ssl.certificates.CertificateInformation": { + "type": "object", + "properties": { + "alias": { + "description": "If the path refers to a container file (a jks keystore, or a PKCS#12 file), it is the alias of the certificate.\nOtherwise, it is null.", + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "expiry": { + "description": "The ISO formatted date of the certificate's expiry (not-after) date.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "format": { + "description": "The format of the file.\nValid values include `jks`, `PKCS12`, and `PEM`.", + "type": "string" + }, + "has_private_key": { + "description": "Indicates whether Elasticsearch has access to the private key for this certificate.", + "type": "boolean" + }, + "issuer": { + "description": "The Distinguished Name of the certificate's issuer.", + "type": "string" + }, + "path": { + "description": "The path to the certificate, as configured in the `elasticsearch.yml` file.", + "type": "string" + }, + "serial_number": { + "description": "The hexadecimal representation of the certificate's serial number.", + "type": "string" + }, + "subject_dn": { + "description": "The Distinguished Name of the certificate's subject.", + "type": "string" + } }, - "style": "form" + "required": [ + "alias", + "expiry", + "format", + "has_private_key", + "path", + "serial_number", + "subject_dn" + ] }, - "ml.get_buckets-expand": { - "in": "query", - "name": "expand", - "description": "If true, the output includes anomaly records.", - "deprecated": false, - "schema": { - "type": "boolean" + "synonyms._types.SynonymsUpdateResult": { + "type": "object", + "properties": { + "result": { + "description": "The update operation result.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + }, + "reload_analyzers_details": { + "description": "Updating synonyms in a synonym set can reload the associated analyzers in case refresh is set to true.\nThis information is the analyzers reloading result.", + "allOf": [ + { + "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult" + } + ] + } }, - "style": "form" + "required": [ + "result" + ] }, - "ml.get_buckets-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of buckets.", - "deprecated": false, - "schema": { - "type": "number" + "synonyms._types.SynonymRuleRead": { + "type": "object", + "properties": { + "id": { + "description": "Synonym Rule identifier", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "synonyms": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/text-analysis/analysis-synonym-graph-tokenfilter#_solr_format_2" + }, + "description": "Synonyms, in Solr format, that conform the synonym rule.", + "allOf": [ + { + "$ref": "#/components/schemas/synonyms._types.SynonymString" + } + ] + } }, - "style": "form" + "required": [ + "id", + "synonyms" + ] }, - "ml.get_buckets-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of buckets to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.get_buckets-sort": { - "in": "query", - "name": "sort", - "description": "Specifies the sort field for the requested buckets.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "form" - }, - "ml.get_buckets-start": { - "in": "query", - "name": "start", - "description": "Returns buckets with timestamps after this time. `-1` means it is unset\nand results are not limited to specific timestamps.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" - }, - "ml.get_calendars-calendar_id": { - "in": "path", - "name": "calendar_id", - "description": "A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_calendars-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "synonyms._types.SynonymString": { + "type": "string" }, - "ml.get_calendars-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.get_categories-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_categories-category_id": { - "in": "path", - "name": "category_id", - "description": "Identifier for the category, which is unique in the job. If you specify\nneither the category ID nor the partition_field_value, the API returns\ninformation about all categories. If you specify only the\npartition_field_value, it returns information about all categories for\nthe specified partition.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.CategoryId" - }, - "style": "simple" - }, - "ml.get_categories-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of categories.", - "deprecated": false, - "schema": { - "type": "number" + "synonyms.get_synonyms_sets.SynonymsSetItem": { + "type": "object", + "properties": { + "synonyms_set": { + "description": "Synonyms set identifier", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "count": { + "description": "Number of synonym rules that the synonym set contains", + "type": "number" + } }, - "style": "form" + "required": [ + "synonyms_set", + "count" + ] }, - "ml.get_categories-partition_field_value": { - "in": "query", - "name": "partition_field_value", - "description": "Only return categories for the specified partition.", - "deprecated": false, - "schema": { - "type": "string" + "synonyms._types.SynonymRule": { + "type": "object", + "properties": { + "id": { + "description": "The identifier for the synonym rule.\nIf you do not specify a synonym rule ID when you create a rule, an identifier is created automatically by Elasticsearch.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "synonyms": { + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/text-analysis/analysis-synonym-graph-tokenfilter#analysis-synonym-graph-define-synonyms" + }, + "description": "The synonyms that conform the synonym rule in Solr format.", + "allOf": [ + { + "$ref": "#/components/schemas/synonyms._types.SynonymString" + } + ] + } }, - "style": "form" + "required": [ + "synonyms" + ] }, - "ml.get_categories-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of categories to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.get_data_frame_analytics-id": { - "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job. If you do not specify this\noption, the API returns information for the first hundred data frame\nanalytics jobs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_data_frame_analytics-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value returns an empty data_frame_analytics array when there\nare no matches and the subset of results when there are partial matches.\nIf this parameter is `false`, the request returns a 404 status code when\nthere are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "tasks._types.GroupBy": { + "type": "string", + "enum": [ + "nodes", + "parents", + "none" + ] }, - "ml.get_data_frame_analytics-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of data frame analytics jobs.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "text_structure._types.EcsCompatibilityType": { + "type": "string", + "enum": [ + "disabled", + "v1" + ] }, - "ml.get_data_frame_analytics-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of data frame analytics jobs to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "text_structure._types.FormatType": { + "type": "string", + "enum": [ + "delimited", + "ndjson", + "semi_structured_text", + "xml" + ] }, - "ml.get_data_frame_analytics-exclude_generated": { - "in": "query", - "name": "exclude_generated", - "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.get_data_frame_analytics_stats-id": { - "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job. If you do not specify this\noption, the API returns information for the first hundred data frame\nanalytics jobs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_data_frame_analytics_stats-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no data frame analytics\njobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value returns an empty data_frame_analytics array when there\nare no matches and the subset of results when there are partial matches.\nIf this parameter is `false`, the request returns a 404 status code when\nthere are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" + "text_structure._types.FieldStat": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "cardinality": { + "type": "number" + }, + "top_hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/text_structure._types.TopHit" + } + }, + "mean_value": { + "type": "number" + }, + "median_value": { + "type": "number" + }, + "max_value": { + "type": "number" + }, + "min_value": { + "type": "number" + }, + "earliest": { + "type": "string" + }, + "latest": { + "type": "string" + } }, - "style": "form" + "required": [ + "count", + "cardinality", + "top_hits" + ] }, - "ml.get_data_frame_analytics_stats-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of data frame analytics jobs.", - "deprecated": false, - "schema": { - "type": "number" + "text_structure._types.TopHit": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "value": { + "type": "object" + } }, - "style": "form" + "required": [ + "count", + "value" + ] }, - "ml.get_data_frame_analytics_stats-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of data frame analytics jobs to obtain.", - "deprecated": false, - "schema": { - "type": "number" + "ingest._types.PipelineConfig": { + "type": "object", + "properties": { + "description": { + "description": "Description of the ingest pipeline.", + "type": "string" + }, + "version": { + "description": "Version number used by external systems to track ingest pipelines.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "processors": { + "description": "Processors used to perform transformations on documents before indexing.\nProcessors run sequentially in the order specified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types.ProcessorContainer" + } + } }, - "style": "form" + "required": [ + "processors" + ] }, - "ml.get_data_frame_analytics_stats-verbose": { - "in": "query", - "name": "verbose", - "description": "Defines whether the stats response should be verbose.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.get_datafeed_stats-datafeed_id": { - "in": "path", - "name": "datafeed_id", - "description": "Identifier for the datafeed. It can be a datafeed identifier or a\nwildcard expression. If you do not specify one of these options, the API\nreturns information about all datafeeds.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "ml.get_datafeed_stats-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no datafeeds that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `datafeeds` array\nwhen there are no matches and the subset of results when there are\npartial matches. If this parameter is `false`, the request returns a\n`404` status code when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.get_datafeeds-datafeed_id": { - "in": "path", - "name": "datafeed_id", - "description": "Identifier for the datafeed. It can be a datafeed identifier or a\nwildcard expression. If you do not specify one of these options, the API\nreturns information about all datafeeds.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "ml.get_datafeeds-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no datafeeds that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `datafeeds` array\nwhen there are no matches and the subset of results when there are\npartial matches. If this parameter is `false`, the request returns a\n`404` status code when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "text_structure.find_structure.FindStructureFormat": { + "type": "string", + "enum": [ + "ndjson", + "xml", + "delimited", + "semi_structured_text" + ] }, - "ml.get_datafeeds-exclude_generated": { - "in": "query", - "name": "exclude_generated", - "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.get_filters-filter_id": { - "in": "path", - "name": "filter_id", - "description": "A string that uniquely identifies a filter.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "ml.get_filters-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of filters.", - "deprecated": false, - "schema": { - "type": "number" + "text_structure.test_grok_pattern.MatchedText": { + "type": "object", + "properties": { + "matched": { + "type": "boolean" + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/text_structure.test_grok_pattern.MatchedField" + } + } + } }, - "style": "form" + "required": [ + "matched" + ] }, - "ml.get_filters-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of filters to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.get_influencers-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_influencers-desc": { - "in": "query", - "name": "desc", - "description": "If true, the results are sorted in descending order.", - "deprecated": false, - "schema": { - "type": "boolean" + "text_structure.test_grok_pattern.MatchedField": { + "type": "object", + "properties": { + "match": { + "type": "string" + }, + "offset": { + "type": "number" + }, + "length": { + "type": "number" + } }, - "style": "form" + "required": [ + "match", + "offset", + "length" + ] }, - "ml.get_influencers-end": { - "in": "query", - "name": "end", - "description": "Returns influencers with timestamps earlier than this time.\nThe default value means it is unset and results are not limited to\nspecific timestamps.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "transform.get_node_stats.TransformNodeFullStats": { + "type": "object", + "properties": { + "total": { + "allOf": [ + { + "$ref": "#/components/schemas/transform.get_node_stats.TransformNodeStats" + } + ] + } }, - "style": "form" + "required": [ + "total" + ] }, - "ml.get_influencers-exclude_interim": { - "in": "query", - "name": "exclude_interim", - "description": "If true, the output excludes interim results. By default, interim results\nare included.", - "deprecated": false, - "schema": { - "type": "boolean" + "transform.get_node_stats.TransformNodeStats": { + "type": "object", + "properties": { + "scheduler": { + "allOf": [ + { + "$ref": "#/components/schemas/transform.get_node_stats.TransformSchedulerStats" + } + ] + } }, - "style": "form" + "required": [ + "scheduler" + ] }, - "ml.get_influencers-influencer_score": { - "in": "query", - "name": "influencer_score", - "description": "Returns influencers with anomaly scores greater than or equal to this\nvalue.", - "deprecated": false, - "schema": { - "type": "number" + "transform.get_node_stats.TransformSchedulerStats": { + "type": "object", + "properties": { + "registered_transform_count": { + "type": "number" + }, + "peek_transform": { + "type": "string" + } }, - "style": "form" + "required": [ + "registered_transform_count" + ] }, - "ml.get_influencers-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of influencers.", - "deprecated": false, - "schema": { - "type": "number" + "transform.get_transform.TransformSummary": { + "type": "object", + "properties": { + "authorization": { + "description": "The security privileges that the transform uses to run its queries. If Elastic Stack security features were disabled at the time of the most recent update to the transform, this property is omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.TransformAuthorization" + } + ] + }, + "create_time": { + "description": "The time the transform was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "create_time_string": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "description": { + "description": "Free text description of the transform.", + "type": "string" + }, + "dest": { + "description": "The destination for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/_global.reindex.Destination" + } + ] + }, + "frequency": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "latest": { + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Latest" + } + ] + }, + "pivot": { + "description": "The pivot method transforms the data by aggregating and grouping it.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Pivot" + } + ] + }, + "retention_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" + } + ] + }, + "settings": { + "description": "Defines optional transform settings.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Settings" + } + ] + }, + "source": { + "description": "The source of the data for the transform.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.Source" + } + ] + }, + "sync": { + "description": "Defines the properties transforms require to run continuously.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.SyncContainer" + } + ] + }, + "version": { + "description": "The version of Elasticsearch that existed on the node when the transform was created.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" + } + ] + }, + "_meta": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + } }, - "style": "form" + "required": [ + "dest", + "id", + "source" + ] }, - "ml.get_influencers-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of influencers to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.get_influencers-sort": { - "in": "query", - "name": "sort", - "description": "Specifies the sort field for the requested influencers. By default, the\ninfluencers are sorted by the `influencer_score` value.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "form" - }, - "ml.get_influencers-start": { - "in": "query", - "name": "start", - "description": "Returns influencers with timestamps after this time. The default value\nmeans it is unset and results are not limited to specific timestamps.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" - }, - "ml.get_job_stats-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, a comma-separated list of jobs, or a wildcard expression. If\nyou do not specify one of these options, the API returns information for\nall anomaly detection jobs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_job_stats-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If `false`, the API returns a `404` status\ncode when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.get_jobs-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, or a wildcard expression. If you do not specify one of these\noptions, the API returns information for all anomaly detection jobs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "ml.get_jobs-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If this parameter is `false`, the request returns a `404` status\ncode when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "ml._types.TransformAuthorization": { + "type": "object", + "properties": { + "api_key": { + "description": "If an API key was used for the most recent update to the transform, its name and identifier are listed in the response.", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.ApiKeyAuthorization" + } + ] + }, + "roles": { + "description": "If a user ID was used for the most recent update to the transform, its roles at the time of the update are listed in the response.", + "type": "array", + "items": { + "type": "string" + } + }, + "service_account": { + "description": "If a service account was used for the most recent update to the transform, the account name is listed in the response.", + "type": "string" + } + } }, - "ml.get_jobs-exclude_generated": { - "in": "query", - "name": "exclude_generated", - "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.get_memory_stats-node_id": { - "in": "path", - "name": "node_id", - "description": "The names of particular nodes in the cluster to target. For example, `nodeId1,nodeId2` or\n`ml:true`", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_memory_stats-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node. If no response is received before the timeout\nexpires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "ml.get_memory_stats-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request\nfails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "ml.get_model_snapshots-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_model_snapshots-snapshot_id": { - "in": "path", - "name": "snapshot_id", - "description": "A numerical character string that uniquely identifies the model snapshot. You can get information for multiple\nsnapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using `_all`,\nby specifying `*` as the snapshot ID, or by omitting the snapshot ID.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_model_snapshots-desc": { - "in": "query", - "name": "desc", - "description": "If true, the results are sorted in descending order.", - "deprecated": false, - "schema": { - "type": "boolean" + "transform._types.Latest": { + "type": "object", + "properties": { + "sort": { + "description": "Specifies the date field that is used to identify the latest documents.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "unique_key": { + "description": "Specifies an array of one or more fields that are used to group the data.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + } }, - "style": "form" + "required": [ + "sort", + "unique_key" + ] }, - "ml.get_model_snapshots-end": { - "in": "query", - "name": "end", - "description": "Returns snapshots with timestamps earlier than this time.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" + "transform._types.Pivot": { + "type": "object", + "properties": { + "aggregations": { + "description": "Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket\nscript, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation,\nmin, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted\naverage.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" + } + }, + "group_by": { + "description": "Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are\ncurrently supported: date histogram, geotile grid, histogram, terms.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/transform._types.PivotGroupByContainer" + } + } + } }, - "ml.get_model_snapshots-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of snapshots.", - "deprecated": false, - "schema": { - "type": "number" + "transform._types.PivotGroupByContainer": { + "type": "object", + "properties": { + "date_histogram": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.DateHistogramAggregation" + } + ] + }, + "geotile_grid": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.GeoTileGridAggregation" + } + ] + }, + "histogram": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.HistogramAggregation" + } + ] + }, + "terms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TermsAggregation" + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "ml.get_model_snapshots-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of snapshots to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.get_model_snapshots-sort": { - "in": "query", - "name": "sort", - "description": "Specifies the sort field for the requested snapshots. By default, the\nsnapshots are sorted by their timestamp.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "form" - }, - "ml.get_model_snapshots-start": { - "in": "query", - "name": "start", - "description": "Returns snapshots with timestamps after this time.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" - }, - "ml.get_overall_buckets-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, a comma-separated list of jobs or groups, or a wildcard\nexpression.\n\nYou can summarize the bucket results for all anomaly detection jobs by\nusing `_all` or by specifying `*` as the ``.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_overall_buckets-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the `_all` string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the request returns an empty `jobs` array when there are no\nmatches and the subset of results when there are partial matches. If this\nparameter is `false`, the request returns a `404` status code when there\nare no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.get_overall_buckets-bucket_span": { - "in": "query", - "name": "bucket_span", - "description": "The span of the overall buckets. Must be greater or equal to the largest\nbucket span of the specified anomaly detection jobs, which is the default\nvalue.\n\nBy default, an overall bucket has a span equal to the largest bucket span\nof the specified anomaly detection jobs. To override that behavior, use\nthe optional `bucket_span` parameter.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "ml.get_overall_buckets-end": { - "in": "query", - "name": "end", - "description": "Returns overall buckets with timestamps earlier than this time.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" - }, - "ml.get_overall_buckets-exclude_interim": { - "in": "query", - "name": "exclude_interim", - "description": "If `true`, the output excludes interim results.", - "deprecated": false, - "schema": { - "type": "boolean" + "transform._types.RetentionPolicyContainer": { + "type": "object", + "properties": { + "time": { + "description": "Specifies that the transform uses a time field to set the retention policy.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.RetentionPolicy" + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "ml.get_overall_buckets-overall_score": { - "in": "query", - "name": "overall_score", - "description": "Returns overall buckets with overall scores greater than or equal to this\nvalue.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "transform._types.RetentionPolicy": { + "type": "object", + "properties": { + "field": { + "description": "The date field that is used to calculate the age of the document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "max_age": { + "description": "Specifies the maximum age of a document in the destination index. Documents that are older than the configured\nvalue are removed from the destination index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } }, - "style": "form" + "required": [ + "field", + "max_age" + ] }, - "ml.get_overall_buckets-start": { - "in": "query", - "name": "start", - "description": "Returns overall buckets with timestamps after this time.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" + "transform._types.Settings": { + "description": "The source of the data for the transform.", + "type": "object", + "properties": { + "align_checkpoints": { + "description": "Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align\ncheckpoint ranges with the date histogram interval when date histogram is specified as a group source in the\ntransform config. As a result, less document updates in the destination index will be performed thus improving\noverall performance.", + "default": true, + "type": "boolean" + }, + "dates_as_epoch_millis": { + "description": "Defines if dates in the ouput should be written as ISO formatted string or as millis since epoch. epoch_millis was\nthe default for transforms created before version 7.11. For compatible output set this value to `true`.", + "default": false, + "type": "boolean" + }, + "deduce_mappings": { + "description": "Specifies whether the transform should deduce the destination index mappings from the transform configuration.", + "default": true, + "type": "boolean" + }, + "docs_per_second": { + "description": "Specifies a limit on the number of input documents per second. This setting throttles the transform by adding a\nwait time between search requests. The default value is null, which disables throttling.", + "type": "number" + }, + "max_page_search_size": { + "description": "Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker\nexceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`.", + "default": 500.0, + "type": "number" + }, + "use_point_in_time": { + "externalDocs": { + "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time" + }, + "description": "Specifies whether the transform checkpoint will use the Point In Time API while searching over the source index.\nIn general, Point In Time is an optimization that will reduce pressure on the source index by reducing the amount\nof refreshes and merges, but it can be expensive if a large number of Point In Times are opened and closed for a\ngiven index. The benefits and impact depend on the data being searched, the ingest rate into the source index, and\nthe amount of other consumers searching the same source index.", + "default": true, + "type": "boolean" + }, + "unattended": { + "description": "If `true`, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case\nof an error which means the transform never fails. Setting the number of retries other than infinite fails in\nvalidation.", + "default": false, + "x-state": "Generally available; Added in 8.5.0", + "type": "boolean" + } + } }, - "ml.get_overall_buckets-top_n": { - "in": "query", - "name": "top_n", - "description": "The number of top anomaly detection job bucket scores to be used in the\n`overall_score` calculation.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.get_records-job_id": { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.get_records-desc": { - "in": "query", - "name": "desc", - "description": "If true, the results are sorted in descending order.", - "deprecated": false, - "schema": { - "type": "boolean" + "transform._types.Source": { + "type": "object", + "properties": { + "index": { + "description": "The source indices for the transform. It can be a single index, an index pattern (for example, `\"my-index-*\"\"`), an\narray of indices (for example, `[\"my-index-000001\", \"my-index-000002\"]`), or an array of index patterns (for\nexample, `[\"my-index-*\", \"my-other-index-*\"]`. For remote indices use the syntax `\"remote_name:index_name\"`. If\nany indices are in remote clusters then the master node and at least one transform node must have the `remote_cluster_client` node role.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "query": { + "description": "A query clause that retrieves a subset of data from the source index.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "runtime_mappings": { + "description": "Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data\nnodes, including remote nodes, must be 7.12 or later.", + "x-state": "Generally available; Added in 7.12.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + } }, - "style": "form" + "required": [ + "index" + ] }, - "ml.get_records-end": { - "in": "query", - "name": "end", - "description": "Returns records with timestamps earlier than this time. The default value\nmeans results are not limited to specific timestamps.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" + "transform._types.SyncContainer": { + "type": "object", + "properties": { + "time": { + "description": "Specifies that the transform uses a time field to synchronize the source and destination indices.", + "allOf": [ + { + "$ref": "#/components/schemas/transform._types.TimeSync" + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "ml.get_records-exclude_interim": { - "in": "query", - "name": "exclude_interim", - "description": "If `true`, the output excludes interim results.", - "deprecated": false, - "schema": { - "type": "boolean" + "transform._types.TimeSync": { + "type": "object", + "properties": { + "delay": { + "description": "The time delay between the current time and the latest input data time.", + "default": "60s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "field": { + "description": "The date field that is used to identify new documents in the source. In general, it’s a good idea to use a field\nthat contains the ingest timestamp. If you use a different field, you might need to set the delay such that it\naccounts for data transmission delays.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } }, - "style": "form" + "required": [ + "field" + ] }, - "ml.get_records-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of records.", - "deprecated": false, - "schema": { - "type": "number" + "transform.get_transform_stats.TransformStats": { + "type": "object", + "properties": { + "checkpointing": { + "allOf": [ + { + "$ref": "#/components/schemas/transform.get_transform_stats.Checkpointing" + } + ] + }, + "health": { + "allOf": [ + { + "$ref": "#/components/schemas/transform.get_transform_stats.TransformStatsHealth" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "node": { + "x-state": "Generally available", + "allOf": [ + { + "$ref": "#/components/schemas/_types.NodeAttributes" + } + ] + }, + "reason": { + "type": "string" + }, + "state": { + "type": "string" + }, + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/transform.get_transform_stats.TransformIndexerStats" + } + ] + } }, - "style": "form" + "required": [ + "checkpointing", + "id", + "state", + "stats" + ] }, - "ml.get_records-record_score": { - "in": "query", - "name": "record_score", - "description": "Returns records with anomaly scores greater or equal than this value.", - "deprecated": false, - "schema": { - "type": "number" + "transform.get_transform_stats.Checkpointing": { + "type": "object", + "properties": { + "changes_last_detected_at": { + "type": "number" + }, + "changes_last_detected_at_string": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "last": { + "allOf": [ + { + "$ref": "#/components/schemas/transform.get_transform_stats.CheckpointStats" + } + ] + }, + "next": { + "allOf": [ + { + "$ref": "#/components/schemas/transform.get_transform_stats.CheckpointStats" + } + ] + }, + "operations_behind": { + "type": "number" + }, + "last_search_time": { + "type": "number" + }, + "last_search_time_string": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } }, - "style": "form" + "required": [ + "last" + ] }, - "ml.get_records-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of records to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.get_records-sort": { - "in": "query", - "name": "sort", - "description": "Specifies the sort field for the requested records.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "form" - }, - "ml.get_records-start": { - "in": "query", - "name": "start", - "description": "Returns records with timestamps after this time. The default value means\nresults are not limited to specific timestamps.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" - }, - "ml.get_trained_models-model_id": { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model or a model alias.\n\nYou can get information for multiple trained models in a single API\nrequest by using a comma-separated list of model IDs or a wildcard\nexpression.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "ml.get_trained_models-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n- Contains wildcard expressions and there are no models that match.\n- Contains the _all string or no identifiers and there are no matches.\n- Contains wildcard expressions and there are only partial matches.\n\nIf true, it returns an empty array when there are no matches and the\nsubset of results when there are partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" + "transform.get_transform_stats.CheckpointStats": { + "type": "object", + "properties": { + "checkpoint": { + "type": "number" + }, + "checkpoint_progress": { + "allOf": [ + { + "$ref": "#/components/schemas/transform.get_transform_stats.TransformProgress" + } + ] + }, + "timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "timestamp_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "time_upper_bound": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "time_upper_bound_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + } }, - "style": "form" + "required": [ + "checkpoint" + ] }, - "ml.get_trained_models-decompress_definition": { - "in": "query", - "name": "decompress_definition", - "description": "Specifies whether the included model definition should be returned as a\nJSON map (true) or in a custom compressed format (false).", - "deprecated": false, - "schema": { - "type": "boolean" + "transform.get_transform_stats.TransformProgress": { + "type": "object", + "properties": { + "docs_indexed": { + "type": "number" + }, + "docs_processed": { + "type": "number" + }, + "docs_remaining": { + "type": "number" + }, + "percent_complete": { + "type": "number" + }, + "total_docs": { + "type": "number" + } }, - "style": "form" + "required": [ + "docs_indexed", + "docs_processed" + ] }, - "ml.get_trained_models-exclude_generated": { - "in": "query", - "name": "exclude_generated", - "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", - "deprecated": false, - "schema": { - "type": "boolean" + "transform.get_transform_stats.TransformStatsHealth": { + "type": "object", + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.HealthStatus" + } + ] + }, + "issues": { + "description": "If a non-healthy status is returned, contains a list of issues of the transform.", + "type": "array", + "items": { + "$ref": "#/components/schemas/transform.get_transform_stats.TransformHealthIssue" + } + } }, - "style": "form" + "required": [ + "status" + ] }, - "ml.get_trained_models-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of models.", - "deprecated": false, - "schema": { - "type": "number" + "transform.get_transform_stats.TransformHealthIssue": { + "type": "object", + "properties": { + "type": { + "description": "The type of the issue", + "type": "string" + }, + "issue": { + "description": "A description of the issue", + "type": "string" + }, + "details": { + "description": "Details about the issue", + "type": "string" + }, + "count": { + "description": "Number of times this issue has occurred since it started", + "type": "number" + }, + "first_occurrence": { + "description": "The timestamp this issue occurred for for the first time", + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "first_occurence_string": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } }, - "style": "form" + "required": [ + "type", + "issue", + "count" + ] }, - "ml.get_trained_models-include": { - "in": "query", - "name": "include", - "description": "A comma delimited string of optional fields to include in the response\nbody.\n\nSupported values include:\n - `definition`: Includes the model definition.\n - `feature_importance_baseline`: Includes the baseline for feature importance values.\n - `hyperparameters`: Includes the information about hyperparameters used to train the model.\nThis information consists of the value, the absolute and relative\nimportance of the hyperparameter as well as an indicator of whether it was\nspecified by the user or tuned during hyperparameter optimization.\n - `total_feature_importance`: Includes the total feature importance for the training data set. The\nbaseline and total feature importance values are returned in the metadata\nfield in the response body.\n - `definition_status`: Includes the model definition status.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/ml._types.Include" + "transform.get_transform_stats.TransformIndexerStats": { + "type": "object", + "properties": { + "delete_time_in_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + } + ] + }, + "documents_indexed": { + "type": "number" + }, + "documents_deleted": { + "type": "number" + }, + "documents_processed": { + "type": "number" + }, + "exponential_avg_checkpoint_duration_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis" + } + ] + }, + "exponential_avg_documents_indexed": { + "type": "number" + }, + "exponential_avg_documents_processed": { + "type": "number" + }, + "index_failures": { + "type": "number" + }, + "index_time_in_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "index_total": { + "type": "number" + }, + "pages_processed": { + "type": "number" + }, + "processing_time_in_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "processing_total": { + "type": "number" + }, + "search_failures": { + "type": "number" + }, + "search_time_in_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "search_total": { + "type": "number" + }, + "trigger_count": { + "type": "number" + } }, - "style": "form" + "required": [ + "documents_indexed", + "documents_processed", + "exponential_avg_checkpoint_duration_ms", + "exponential_avg_documents_indexed", + "exponential_avg_documents_processed", + "index_failures", + "index_time_in_ms", + "index_total", + "pages_processed", + "processing_time_in_ms", + "processing_total", + "search_failures", + "search_time_in_ms", + "search_total", + "trigger_count" + ] }, - "ml.get_trained_models-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of models to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "transform._types.Destination": { + "type": "object", + "properties": { + "index": { + "description": "The destination index for the transform. The mappings of the destination index are deduced based on the source\nfields when possible. If alternate mappings are required, use the create index API prior to starting the\ntransform.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "pipeline": { + "description": "The unique identifier for an ingest pipeline.", + "type": "string" + } + } }, - "ml.get_trained_models-tags": { - "in": "query", - "name": "tags", - "description": "A comma delimited string of tags. A trained model can have many tags, or\nnone. When supplied, only trained models that contain all the supplied\ntags are returned.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + "_global.update.UpdateWriteResponseBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + { + "type": "object", + "properties": { + "get": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.InlineGet" + } + ] } } - ] - }, - "style": "form" - }, - "ml.get_trained_models_stats-model_id": { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the trained model or a model alias. It can be a\ncomma-separated list or a wildcard expression.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Ids" - }, - "style": "simple" - }, - "ml.get_trained_models_stats-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n- Contains wildcard expressions and there are no models that match.\n- Contains the _all string or no identifiers and there are no matches.\n- Contains wildcard expressions and there are only partial matches.\n\nIf true, it returns an empty array when there are no matches and the\nsubset of results when there are partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "ml.get_trained_models_stats-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of models.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + } + ] }, - "ml.get_trained_models_stats-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of models to obtain.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "ml.preview_data_frame_analytics-id": { - "in": "path", - "name": "id", - "description": "Identifier for the data frame analytics job.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.preview_datafeed-datafeed_id": { - "in": "path", - "name": "datafeed_id", - "description": "A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase\nalphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric\ncharacters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job\nconfiguration details in the request body.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "ml.preview_datafeed-start": { - "in": "query", - "name": "start", - "description": "The start time from where the datafeed preview should begin", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" - }, - "ml.preview_datafeed-end": { - "in": "query", - "name": "end", - "description": "The end time when the datafeed preview should stop", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "style": "form" - }, - "msearch-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and index aliases to search.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "msearch-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "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.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "_global.update_by_query_rethrottle.UpdateByQueryRethrottleNode": { + "allOf": [ + { + "$ref": "#/components/schemas/_spec_utils.BaseNode" + }, + { + "type": "object", + "properties": { + "tasks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/tasks._types.TaskInfo" + } + } + }, + "required": [ + "tasks" + ] + } + ] }, - "msearch-ccs_minimize_roundtrips": { - "in": "query", - "name": "ccs_minimize_roundtrips", - "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.WatchStatus": { + "type": "object", + "properties": { + "actions": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Actions" + } + ] + }, + "last_checked": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "last_met_condition": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActivationState" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + }, + "execution_state": { + "type": "string" + } }, - "style": "form" + "required": [ + "actions", + "state", + "version" + ] }, - "msearch-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" + "watcher._types.Actions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.ActionStatus" + } }, - "msearch-ignore_throttled": { - "in": "query", - "name": "ignore_throttled", - "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ActionStatus": { + "type": "object", + "properties": { + "ack": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.AcknowledgeState" + } + ] + }, + "last_execution": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ExecutionState" + } + ] + }, + "last_successful_execution": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ExecutionState" + } + ] + }, + "last_throttle": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ThrottleState" + } + ] + } }, - "style": "form" + "required": [ + "ack" + ] }, - "msearch-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If true, missing or closed indices are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.AcknowledgeState": { + "type": "object", + "properties": { + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.AcknowledgementOptions" + } + ] + }, + "timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } }, - "style": "form" + "required": [ + "state", + "timestamp" + ] }, - "msearch-include_named_queries_score": { - "in": "query", - "name": "include_named_queries_score", - "description": "Indicates whether hit.matched_queries should be rendered as a map that includes\nthe name of the matched query associated with its score (true)\nor as an array containing the name of the matched queries (false)\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.AcknowledgementOptions": { + "type": "string", + "enum": [ + "awaits_successful_execution", + "ackable", + "acked" + ] }, - "msearch-max_concurrent_searches": { - "in": "query", - "name": "max_concurrent_searches", - "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", - "deprecated": false, - "schema": { - "type": "number" + "watcher._types.ExecutionState": { + "type": "object", + "properties": { + "successful": { + "type": "boolean" + }, + "timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "reason": { + "type": "string" + } }, - "style": "form" + "required": [ + "successful", + "timestamp" + ] }, - "msearch-max_concurrent_shard_requests": { - "in": "query", - "name": "max_concurrent_shard_requests", - "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", - "deprecated": false, - "schema": { - "type": "number" + "watcher._types.ThrottleState": { + "type": "object", + "properties": { + "reason": { + "type": "string" + }, + "timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } }, - "style": "form" + "required": [ + "reason", + "timestamp" + ] }, - "msearch-pre_filter_shard_size": { - "in": "query", - "name": "pre_filter_shard_size", - "description": "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.", - "deprecated": false, - "schema": { - "type": "number" + "watcher._types.ActivationState": { + "type": "object", + "properties": { + "active": { + "type": "boolean" + }, + "timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } }, - "style": "form" + "required": [ + "active", + "timestamp" + ] }, - "msearch-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "msearch-routing": { - "in": "query", - "name": "routing", - "description": "Custom routing value used to route search operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "msearch-search_type": { - "in": "query", - "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SearchType" - }, - "style": "form" - }, - "msearch-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "msearch_template-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "msearch_template-ccs_minimize_roundtrips": { - "in": "query", - "name": "ccs_minimize_roundtrips", - "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ActivationStatus": { + "type": "object", + "properties": { + "actions": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Actions" + } + ] + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActivationState" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } }, - "style": "form" + "required": [ + "actions", + "state", + "version" + ] }, - "msearch_template-max_concurrent_searches": { - "in": "query", - "name": "max_concurrent_searches", - "description": "The maximum number of concurrent searches the API can run.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.ActionExecutionMode": { + "type": "string", + "enum": [ + "simulate", + "force_simulate", + "execute", + "force_execute", + "skip" + ] }, - "msearch_template-search_type": { - "in": "query", - "name": "search_type", - "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SearchType" + "watcher._types.SimulatedActions": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" + } + }, + "all": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SimulatedActions" + } + ] + }, + "use_all": { + "type": "boolean" + } }, - "style": "form" + "required": [ + "actions", + "all", + "use_all" + ] }, - "msearch_template-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "description": "If `true`, the response returns `hits.total` as an integer.\nIf `false`, it returns `hits.total` as an object.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ScheduleTriggerEvent": { + "type": "object", + "properties": { + "scheduled_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "triggered_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + } }, - "style": "form" + "required": [ + "scheduled_time" + ] }, - "msearch_template-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "mtermvectors-index": { - "in": "path", - "name": "index", - "description": "The name of the index that contains the documents.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "mtermvectors-ids": { - "in": "query", - "name": "ids", - "description": "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" + "watcher._types.Watch": { + "type": "object", + "properties": { + "actions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.Action" + } + }, + "condition": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ConditionContainer" + } + ] + }, + "input": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.InputContainer" + } + ] + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WatchStatus" + } + ] + }, + "throttle_period": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttle_period_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "transform": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransformContainer" + } + ] + }, + "trigger": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.TriggerContainer" + } + ] } }, - "style": "form" + "required": [ + "actions", + "condition", + "input", + "trigger" + ] }, - "mtermvectors-fields": { - "in": "query", - "name": "fields", - "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" + "watcher._types.Action": { + "type": "object", + "properties": { + "action_type": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActionType" + } + ] + }, + "condition": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ConditionContainer" + } + ] + }, + "foreach": { + "type": "string" + }, + "max_iterations": { + "type": "number" + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + }, + "throttle_period": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "throttle_period_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "transform": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.TransformContainer" + } + ] + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.IndexAction" + } + ] + }, + "logging": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.LoggingAction" + } + ] + }, + "email": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.EmailAction" + } + ] + }, + "pagerduty": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.PagerDutyAction" + } + ] + }, + "slack": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SlackAction" + } + ] + }, + "webhook": { + "x-state": "Generally available; Added in 7.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WebhookAction" + } + ] + } + } }, - "mtermvectors-field_statistics": { - "in": "query", - "name": "field_statistics", - "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.ActionType": { + "type": "string", + "enum": [ + "email", + "webhook", + "index", + "logging", + "slack", + "pagerduty" + ] }, - "mtermvectors-offsets": { - "in": "query", - "name": "offsets", - "description": "If `true`, the response includes term offsets.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ConditionContainer": { + "type": "object", + "properties": { + "always": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.AlwaysCondition" + } + ] + }, + "array_compare": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.ArrayCompareCondition" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "compare": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.FieldValue" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "minProperties": 1, + "maxProperties": 1 + }, + "never": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.NeverCondition" + } + ] + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ScriptCondition" + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "mtermvectors-payloads": { - "in": "query", - "name": "payloads", - "description": "If `true`, the response includes term payloads.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.AlwaysCondition": { + "type": "object" }, - "mtermvectors-positions": { - "in": "query", - "name": "positions", - "description": "If `true`, the response includes term positions.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ArrayCompareCondition": { + "type": "object", + "properties": { + "path": { + "type": "string" + } }, - "style": "form" + "required": [ + "path" + ] }, - "mtermvectors-preference": { - "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nIt is random by default.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" + "watcher._types.NeverCondition": { + "type": "object" }, - "mtermvectors-realtime": { - "in": "query", - "name": "realtime", - "description": "If true, the request is real-time as opposed to near-real-time.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.ScriptCondition": { + "type": "object", + "properties": { + "lang": { + "default": "painless", + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptLanguage" + } + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + }, + "id": { + "type": "string" + } + } }, - "mtermvectors-routing": { - "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" + "_types.TransformContainer": { + "type": "object", + "properties": { + "chain": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.TransformContainer" + } + }, + "script": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptTransform" + } + ] + }, + "search": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SearchTransform" + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "mtermvectors-term_statistics": { - "in": "query", - "name": "term_statistics", - "description": "If true, the response includes term frequency and document frequency.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "mtermvectors-version": { - "in": "query", - "name": "version", - "description": "If `true`, returns the document version as part of a hit.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "style": "form" - }, - "mtermvectors-version_type": { - "in": "query", - "name": "version_type", - "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n - `force`: This option is deprecated because it can cause primary and replica shards to diverge.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionType" - }, - "style": "form" - }, - "nodes.hot_threads-node_id": { - "in": "path", - "name": "node_id", - "description": "List of node IDs or names used to limit returned information.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "nodes.hot_threads-ignore_idle_threads": { - "in": "query", - "name": "ignore_idle_threads", - "description": "If true, known idle threads (e.g. waiting in a socket select, or to get\na task from an empty queue) are filtered out.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "_types.ScriptTransform": { + "type": "object", + "properties": { + "lang": { + "default": "painless", + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ScriptSource" + } + ] + }, + "id": { + "type": "string" + } + } }, - "nodes.hot_threads-interval": { - "in": "query", - "name": "interval", - "description": "The interval to do the second sampling of threads.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" + "_types.SearchTransform": { + "type": "object", + "properties": { + "request": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SearchInputRequestDefinition" + } + ] + }, + "timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } }, - "style": "form" + "required": [ + "request", + "timeout" + ] }, - "nodes.hot_threads-snapshots": { - "in": "query", - "name": "snapshots", - "description": "Number of samples of thread stacktrace.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.SearchInputRequestDefinition": { + "type": "object", + "properties": { + "body": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SearchInputRequestBody" + } + ] + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.IndexName" + } + }, + "indices_options": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndicesOptions" + } + ] + }, + "search_type": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SearchType" + } + ] + }, + "template": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SearchTemplateRequestBody" + } + ] + }, + "rest_total_hits_as_int": { + "type": "boolean" + } + } }, - "nodes.hot_threads-threads": { - "in": "query", - "name": "threads", - "description": "Specifies the number of hot threads to provide information for.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "nodes.hot_threads-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received\nbefore the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "nodes.hot_threads-type": { - "in": "query", - "name": "type", - "description": "The type to sample.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ThreadType" - }, - "style": "form" - }, - "nodes.hot_threads-sort": { - "in": "query", - "name": "sort", - "description": "The sort order for 'cpu' type (default: total)", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ThreadType" - }, - "style": "form" - }, - "nodes.info-node_id": { - "in": "path", - "name": "node_id", - "description": "Comma-separated list of node IDs or names used to limit returned information.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "nodes.info-metric": { - "in": "path", - "name": "metric", - "description": "Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Metrics" - }, - "style": "simple" - }, - "nodes.info-flat_settings": { - "in": "query", - "name": "flat_settings", - "description": "If true, returns settings in flat format.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.SearchInputRequestBody": { + "type": "object", + "properties": { + "query": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + } }, - "style": "form" - }, - "nodes.info-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "nodes.reload_secure_settings-node_id": { - "in": "path", - "name": "node_id", - "description": "The names of particular nodes in the cluster to target.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "nodes.reload_secure_settings-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "nodes.stats-node_id": { - "in": "path", - "name": "node_id", - "description": "Comma-separated list of node IDs or names used to limit returned information.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "nodes.stats-metric": { - "in": "path", - "name": "metric", - "description": "Limit the information returned to the specified metrics", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Metrics" - }, - "style": "simple" - }, - "nodes.stats-index_metric": { - "in": "path", - "name": "index_metric", - "description": "Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Metrics" - }, - "style": "simple" - }, - "nodes.stats-completion_fields": { - "in": "query", - "name": "completion_fields", - "description": "Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "nodes.stats-fielddata_fields": { - "in": "query", - "name": "fielddata_fields", - "description": "Comma-separated list or wildcard expressions of fields to include in fielddata statistics.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "nodes.stats-fields": { - "in": "query", - "name": "fields", - "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "nodes.stats-groups": { - "in": "query", - "name": "groups", - "description": "Comma-separated list of search groups to include in the search statistics.", - "deprecated": false, - "schema": { - "type": "boolean" + "required": [ + "query" + ] + }, + "watcher._types.SearchTemplateRequestBody": { + "type": "object", + "properties": { + "explain": { + "default": false, + "type": "boolean" + }, + "id": { + "description": "ID of the search template to use. If no source is specified,\nthis parameter is required.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "profile": { + "default": false, + "type": "boolean" + }, + "source": { + "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. Also supports Mustache variables. If no id is specified, this\nparameter is required.", + "type": "string" + } + } + }, + "watcher._types.IndexAction": { + "type": "object", + "properties": { + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + } + ] + }, + "doc_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "refresh": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Refresh" + } + ] + }, + "op_type": { + "default": "index", + "allOf": [ + { + "$ref": "#/components/schemas/_types.OpType" + } + ] + }, + "timeout": { + "default": "60s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "execution_time_field": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + } }, - "style": "form" + "required": [ + "index" + ] }, - "nodes.stats-include_segment_file_sizes": { - "in": "query", - "name": "include_segment_file_sizes", - "description": "If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "nodes.stats-level": { - "in": "query", - "name": "level", - "description": "Indicates whether statistics are aggregated at the cluster, index, or shard level.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Level" - }, - "style": "form" - }, - "nodes.stats-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "nodes.stats-types": { - "in": "query", - "name": "types", - "description": "A comma-separated list of document types for the indexing index metric.", - "deprecated": false, - "schema": { - "type": "array", - "items": { + "watcher._types.LoggingAction": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "text": { + "type": "string" + }, + "category": { "type": "string" } }, - "style": "form" - }, - "nodes.stats-include_unloaded_segments": { - "in": "query", - "name": "include_unloaded_segments", - "description": "If `true`, the response includes information from segments that are not loaded into memory.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "nodes.usage-node_id": { - "in": "path", - "name": "node_id", - "description": "A comma-separated 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", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "nodes.usage-metric": { - "in": "path", - "name": "metric", - "description": "Limits the information returned to the specific metrics.\nA comma-separated list of the following options: `_all`, `rest_actions`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Metrics" - }, - "style": "simple" - }, - "nodes.usage-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "put_script-id": { - "in": "path", - "name": "id", - "description": "The identifier for the stored script or search template.\nIt must be unique within the cluster.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "put_script-context": { - "in": "path", - "name": "context", - "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "put_script-context_": { - "in": "query", - "name": "context", - "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.\nIf you specify both this and the `` path parameter, the API uses the request path parameter.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "form" - }, - "put_script-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "put_script-timeout": { - "in": "query", - "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "rank_eval-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and index aliases used to limit the request.\nWildcard (`*`) expressions are supported.\nTo target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "rank_eval-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "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`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "rank_eval-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "rank_eval-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, missing or closed indices are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "rank_eval-search_type": { - "in": "query", - "name": "search_type", - "description": "Search operation type", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "render_search_template-id": { - "in": "path", - "name": "id", - "description": "The ID of the search template to render.\nIf no `source` is specified, this or the `id` request body parameter is required.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "rollup.get_jobs-id": { - "in": "path", - "name": "id", - "description": "Identifier for the rollup job.\nIf it is `_all` or omitted, the API returns all rollup jobs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "rollup.get_rollup_caps-id": { - "in": "path", - "name": "id", - "description": "Index, indices or index-pattern to return rollup capabilities for.\n`_all` may be used to fetch rollup capabilities from all jobs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "rollup.rollup_search-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams and indices used to limit the request.\nThis parameter has the following rules:\n\n* At least one data stream, index, or wildcard expression must be specified. This target can include a rollup or non-rollup index. For data streams, the stream's backing indices can only serve as non-rollup indices. Omitting the parameter or using `_all` are not permitted.\n* Multiple non-rollup indices may be specified.\n* Only one rollup index may be specified. If more than one are supplied, an exception occurs.\n* Wildcard expressions (`*`) may be used. If they match more than one rollup index, an exception occurs. However, you can use an expression to match multiple non-rollup indices or data streams.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "rollup.rollup_search-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "rollup.rollup_search-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "scroll-scroll_id": { - "in": "path", - "name": "scroll_id", - "description": "The scroll ID", - "required": true, - "deprecated": true, - "schema": { - "$ref": "#/components/schemas/_types.ScrollId" - }, - "style": "simple" - }, - "scroll-scroll": { - "in": "query", - "name": "scroll", - "description": "The period to retain the search context for scrolling.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "scroll-scroll_id_": { - "in": "query", - "name": "scroll_id", - "description": "The scroll ID for scrolled search", - "deprecated": true, - "schema": { - "$ref": "#/components/schemas/_types.ScrollId" - }, - "style": "form" - }, - "scroll-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "description": "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.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "search-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "search-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "required": [ + "text" + ] }, - "search-allow_partial_search_results": { - "in": "query", - "name": "allow_partial_search_results", - "description": "If `true` and there are shard request timeouts or shard failures, the request returns partial results.\nIf `false`, it returns an error with no partial results.\n\nTo override the default behavior, you can set the `search.default_allow_partial_results` cluster setting to `false`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.EmailAction": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Email" + }, + { + "type": "object" + } + ] }, - "search-analyzer": { - "in": "query", - "name": "analyzer", - "description": "The analyzer to use for the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" + "watcher._types.Email": { + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "bcc": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "body": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.EmailBody" + } + ] + }, + "cc": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "from": { + "type": "string" + }, + "priority": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.EmailPriority" + } + ] + }, + "reply_to": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "sent_date": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "subject": { + "type": "string" + }, + "to": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "attachments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.EmailAttachmentContainer" + } + } }, - "style": "form" + "required": [ + "subject", + "to" + ] }, - "search-analyze_wildcard": { - "in": "query", - "name": "analyze_wildcard", - "description": "If `true`, wildcard and prefix queries are analyzed.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.EmailBody": { + "type": "object", + "properties": { + "html": { + "type": "string" + }, + "text": { + "type": "string" + } + } }, - "search-batched_reduce_size": { - "in": "query", - "name": "batched_reduce_size", - "description": "The number of shard results that should be reduced at once on the coordinating node.\nIf the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.EmailPriority": { + "type": "string", + "enum": [ + "lowest", + "low", + "normal", + "high", + "highest" + ] }, - "search-ccs_minimize_roundtrips": { - "in": "query", - "name": "ccs_minimize_roundtrips", - "description": "If `true`, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "search-default_operator": { - "in": "query", - "name": "default_operator", - "description": "The default operator for the query string query: `AND` or `OR`.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "style": "form" - }, - "search-df": { - "in": "query", - "name": "df", - "description": "The field to use as a default when no field prefix is given in the query string.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "search-docvalue_fields": { - "in": "query", - "name": "docvalue_fields", - "description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "search-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "search-explain": { - "in": "query", - "name": "explain", - "description": "If `true`, the request returns detailed information about score computation as part of a hit.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.EmailAttachmentContainer": { + "type": "object", + "properties": { + "http": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpEmailAttachment" + } + ] + }, + "reporting": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ReportingEmailAttachment" + } + ] + }, + "data": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.DataEmailAttachment" + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "search-ignore_throttled": { - "in": "query", - "name": "ignore_throttled", - "description": "If `true`, concrete, expanded or aliased indices will be ignored when frozen.", - "deprecated": true, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.HttpEmailAttachment": { + "type": "object", + "properties": { + "content_type": { + "type": "string" + }, + "inline": { + "type": "boolean" + }, + "request": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + } + ] + } + } }, - "search-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.HttpInputRequestDefinition": { + "type": "object", + "properties": { + "auth": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputAuthentication" + } + ] + }, + "body": { + "type": "string" + }, + "connection_timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" + } + ] + }, + "method": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputMethod" + } + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "path": { + "type": "string" + }, + "port": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "proxy": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputProxy" + } + ] + }, + "read_timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "scheme": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ConnectionScheme" + } + ] + }, + "url": { + "type": "string" + } + } }, - "search-include_named_queries_score": { - "in": "query", - "name": "include_named_queries_score", - "description": "If `true`, the response includes the score contribution from any named queries.\n\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.HttpInputAuthentication": { + "type": "object", + "properties": { + "basic": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputBasicAuthentication" + } + ] + } }, - "style": "form" + "required": [ + "basic" + ] }, - "search-lenient": { - "in": "query", - "name": "lenient", - "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.\nThis parameter can be used only when the `q` query string parameter is specified.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.HttpInputBasicAuthentication": { + "type": "object", + "properties": { + "password": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Password" + } + ] + }, + "username": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + } }, - "style": "form" + "required": [ + "password", + "username" + ] }, - "search-max_concurrent_shard_requests": { - "in": "query", - "name": "max_concurrent_shard_requests", - "description": "The number of concurrent shard requests per node that the search runs concurrently.\nThis value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.HttpInputMethod": { + "type": "string", + "enum": [ + "head", + "get", + "post", + "put", + "delete" + ] }, - "search-preference": { - "in": "query", - "name": "preference", - "description": "The nodes and shards used for the search.\nBy default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness.\nValid values are:\n\n* `_only_local` to run the search only on shards on the local node.\n* `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method.\n* `_only_nodes:,` to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method.\n* `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method.\n* `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`.\n* `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order.", - "deprecated": false, - "schema": { - "type": "string" + "watcher._types.HttpInputProxy": { + "type": "object", + "properties": { + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" + } + ] + }, + "port": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + } }, - "style": "form" + "required": [ + "host", + "port" + ] }, - "search-pre_filter_shard_size": { - "in": "query", - "name": "pre_filter_shard_size", - "description": "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.\nThis filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint).\nWhen unspecified, the pre-filter phase is executed if any of these conditions is met:\n\n* The request targets more than 128 shards.\n* The request targets one or more read-only index.\n* The primary sort of the query targets an indexed field.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.ConnectionScheme": { + "type": "string", + "enum": [ + "http", + "https" + ] }, - "search-request_cache": { - "in": "query", - "name": "request_cache", - "description": "If `true`, the caching of search results is enabled for requests where `size` is `0`.\nIt defaults to index level settings.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "search-routing": { - "in": "query", - "name": "routing", - "description": "A custom value that is used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "search-scroll": { - "in": "query", - "name": "scroll", - "description": "The period to retain the search context for scrolling.\nBy default, this value cannot exceed `1d` (24 hours).\nYou can change this limit by using the `search.max_keep_alive` cluster-level setting.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "search-search_type": { - "in": "query", - "name": "search_type", - "description": "Indicates how distributed term frequencies are calculated for relevance scoring.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SearchType" - }, - "style": "form" - }, - "search-stats": { - "in": "query", - "name": "stats", - "description": "Specific `tag` of the request for logging and statistical purposes.", - "deprecated": false, - "schema": { - "type": "array", - "items": { + "watcher._types.ReportingEmailAttachment": { + "type": "object", + "properties": { + "url": { "type": "string" + }, + "inline": { + "type": "boolean" + }, + "retries": { + "default": 40.0, + "type": "number" + }, + "interval": { + "default": "15s", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "request": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + } + ] } }, - "style": "form" - }, - "search-stored_fields": { - "in": "query", - "name": "stored_fields", - "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "search-suggest_field": { - "in": "query", - "name": "suggest_field", - "description": "The field to use for suggestions.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "form" - }, - "search-suggest_mode": { - "in": "query", - "name": "suggest_mode", - "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SuggestMode" - }, - "style": "form" - }, - "search-suggest_size": { - "in": "query", - "name": "suggest_size", - "description": "The number of suggestions to return.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "search-suggest_text": { - "in": "query", - "name": "suggest_text", - "description": "The source text for which the suggestions should be returned.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" + "required": [ + "url" + ] }, - "search-terminate_after": { - "in": "query", - "name": "terminate_after", - "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.\nIf set to `0` (default), the query does not terminate early.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "search-timeout": { - "in": "query", - "name": "timeout", - "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt defaults to no timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "search-track_total_hits": { - "in": "query", - "name": "track_total_hits", - "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.TrackHits" - }, - "style": "form" - }, - "search-track_scores": { - "in": "query", - "name": "track_scores", - "description": "If `true`, the request calculates and returns document scores, even if the scores are not used for sorting.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.DataEmailAttachment": { + "type": "object", + "properties": { + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.DataAttachmentFormat" + } + ] + } + } }, - "search-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "If `true`, aggregation and suggester names are be prefixed by their respective types in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.DataAttachmentFormat": { + "type": "string", + "enum": [ + "json", + "yaml" + ] }, - "search-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "description": "Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.PagerDutyAction": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.PagerDutyEvent" + }, + { + "type": "object" + } + ] }, - "search-version": { - "in": "query", - "name": "version", - "description": "If `true`, the request returns the document version as part of a hit.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "search-_source": { - "in": "query", - "name": "_source", - "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nValid values are:\n\n* `true` to return the entire document source.\n* `false` to not return the document source.\n* `` to return the source fields that are specified as a comma-separated list that supports wildcard (`*`) patterns.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" - }, - "style": "form" - }, - "search-_source_excludes": { - "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "search-_source_includes": { - "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned.\nYou can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "search-seq_no_primary_term": { - "in": "query", - "name": "seq_no_primary_term", - "description": "If `true`, the request returns the sequence number and primary term of the last modification of each hit.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.PagerDutyEvent": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "attach_payload": { + "type": "boolean" + }, + "client": { + "type": "string" + }, + "client_url": { + "type": "string" + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.PagerDutyContext" + } + }, + "description": { + "type": "string" + }, + "event_type": { + "default": "trigger", + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.PagerDutyEventType" + } + ] + }, + "incident_key": { + "type": "string" + }, + "proxy": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.PagerDutyEventProxy" + } + ] + } }, - "style": "form" + "required": [ + "attach_payload", + "description", + "incident_key" + ] }, - "search-q": { - "in": "query", - "name": "q", - "description": "A query in the Lucene query string syntax.\nQuery parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.\n\nIMPORTANT: This parameter overrides the query parameter in the request body.\nIf both parameters are specified, documents matching the query request body parameter are not returned.", - "deprecated": false, - "schema": { - "type": "string" + "watcher._types.PagerDutyContext": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "src": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.PagerDutyContextType" + } + ] + } }, - "style": "form" + "required": [ + "type" + ] }, - "search-size": { - "in": "query", - "name": "size", - "description": "The number of hits to return.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.PagerDutyContextType": { + "type": "string", + "enum": [ + "link", + "image" + ] }, - "search-from": { - "in": "query", - "name": "from", - "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.PagerDutyEventType": { + "type": "string", + "enum": [ + "trigger", + "resolve", + "acknowledge" + ] }, - "search-sort": { - "in": "query", - "name": "sort", - "description": "A comma-separated list of `:` pairs.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + "watcher._types.PagerDutyEventProxy": { + "type": "object", + "properties": { + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Host" } - } - ] - }, - "style": "form" + ] + }, + "port": { + "type": "number" + } + } }, - "search_application.get_behavioral_analytics-name": { - "in": "path", - "name": "name", - "description": "A list of analytics collections to limit the returned information", - "required": true, - "deprecated": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Name" + "watcher._types.SlackAction": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "message": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SlackMessage" + } + ] } }, - "style": "simple" + "required": [ + "message" + ] }, - "search_application.search-name": { - "in": "path", - "name": "name", - "description": "The name of the search application to be searched.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" + "watcher._types.SlackMessage": { + "type": "object", + "properties": { + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.SlackAttachment" + } + }, + "dynamic_attachments": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SlackDynamicAttachment" + } + ] + }, + "from": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "text": { + "type": "string" + }, + "to": { + "type": "array", + "items": { + "type": "string" + } + } }, - "style": "simple" + "required": [ + "attachments", + "from", + "text", + "to" + ] }, - "search_application.search-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "Determines whether aggregation names are prefixed by their respective types in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "search_mvt-index": { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, or aliases to search", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "search_mvt-field": { - "in": "path", - "name": "field", - "description": "Field containing geospatial data to return", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "simple" - }, - "search_mvt-zoom": { - "in": "path", - "name": "zoom", - "description": "Zoom level for the vector tile to search", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search_mvt._types.ZoomLevel" - }, - "style": "simple" - }, - "search_mvt-x": { - "in": "path", - "name": "x", - "description": "X coordinate for the vector tile to search", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search_mvt._types.Coordinate" - }, - "style": "simple" - }, - "search_mvt-y": { - "in": "path", - "name": "y", - "description": "Y coordinate for the vector tile to search", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search_mvt._types.Coordinate" - }, - "style": "simple" - }, - "search_mvt-exact_bounds": { - "in": "query", - "name": "exact_bounds", - "description": "If `false`, the meta layer's feature is the bounding box of the tile.\nIf true, the meta layer's feature is a bounding box resulting from a\ngeo_bounds aggregation. The aggregation runs on values that intersect\nthe // tile with wrap_longitude set to false. The resulting\nbounding box may be larger than the vector tile.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.SlackAttachment": { + "type": "object", + "properties": { + "author_icon": { + "type": "string" + }, + "author_link": { + "type": "string" + }, + "author_name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "fallback": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.SlackAttachmentField" + } + }, + "footer": { + "type": "string" + }, + "footer_icon": { + "type": "string" + }, + "image_url": { + "type": "string" + }, + "pretext": { + "type": "string" + }, + "text": { + "type": "string" + }, + "thumb_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "title_link": { + "type": "string" + }, + "ts": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitSeconds" + } + ] + } }, - "style": "form" + "required": [ + "author_name", + "title" + ] }, - "search_mvt-extent": { - "in": "query", - "name": "extent", - "description": "The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.", - "deprecated": false, - "schema": { - "type": "number" + "watcher._types.SlackAttachmentField": { + "type": "object", + "properties": { + "short": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "style": "form" + "required": [ + "short", + "title", + "value" + ] }, - "search_mvt-grid_agg": { - "in": "query", - "name": "grid_agg", - "description": "Aggregation used to create a grid for `field`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search_mvt._types.GridAggregationType" + "watcher._types.SlackDynamicAttachment": { + "type": "object", + "properties": { + "attachment_template": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SlackAttachment" + } + ] + }, + "list_path": { + "type": "string" + } }, - "style": "form" + "required": [ + "attachment_template", + "list_path" + ] }, - "search_mvt-grid_precision": { - "in": "query", - "name": "grid_precision", - "description": "Additional zoom levels available through the aggs layer. For example, if is 7\nand grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results\ndon't include the aggs layer.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.WebhookAction": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + }, + { + "type": "object" + } + ] }, - "search_mvt-grid_type": { - "in": "query", - "name": "grid_type", - "description": "Determines the geometry type for features in the aggs layer. In the aggs layer,\neach feature represents a geotile_grid cell. If 'grid' each feature is a Polygon\nof the cells bounding box. If 'point' each feature is a Point that is the centroid\nof the cell.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search_mvt._types.GridType" + "watcher._types.InputContainer": { + "type": "object", + "properties": { + "chain": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ChainInput" + } + ] + }, + "http": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInput" + } + ] + }, + "search": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SearchInput" + } + ] + }, + "simple": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "search_mvt-size": { - "in": "query", - "name": "size", - "description": "Maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", - "deprecated": false, - "schema": { - "type": "number" + "watcher._types.ChainInput": { + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/watcher._types.InputContainer" + }, + "minProperties": 1, + "maxProperties": 1 + } + } }, - "style": "form" + "required": [ + "inputs" + ] }, - "search_mvt-with_labels": { - "in": "query", - "name": "with_labels", - "description": "If `true`, the hits and aggs layers will contain additional point features representing\nsuggested label positions for the original features.\n\n* `Point` and `MultiPoint` features will have one of the points selected.\n* `Polygon` and `MultiPolygon` features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.\n* `LineString` features will likewise provide a roughly central point selected from the triangle-tree.\n* The aggregation results will provide one central point for each aggregation bucket.\n\nAll attributes from the original features will also be copied to the new label features.\nIn addition, the new features will be distinguishable using the tag `_mvt_label_position`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "search_shards-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "search_shards-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.HttpInput": { + "type": "object", + "properties": { + "extract": { + "type": "array", + "items": { + "type": "string" + } + }, + "request": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + } + ] + }, + "response_content_type": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ResponseContentType" + } + ] + } + } }, - "search_shards-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" + "watcher._types.ResponseContentType": { + "type": "string", + "enum": [ + "json", + "yaml", + "text" + ] }, - "search_shards-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.SearchInput": { + "type": "object", + "properties": { + "extract": { + "type": "array", + "items": { + "type": "string" + } + }, + "request": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SearchInputRequestDefinition" + } + ] + }, + "timeout": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + } }, - "style": "form" + "required": [ + "request" + ] }, - "search_shards-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request retrieves information from the local node only.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "search_shards-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIT can also be set to `-1` to indicate that the request should never timeout.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "search_shards-preference": { - "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nIt is random by default.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "search_shards-routing": { - "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "search_template-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "search_template-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.TriggerContainer": { + "type": "object", + "properties": { + "schedule": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ScheduleContainer" + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "search_template-ccs_minimize_roundtrips": { - "in": "query", - "name": "ccs_minimize_roundtrips", - "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ScheduleContainer": { + "type": "object", + "properties": { + "timezone": { + "type": "string" + }, + "cron": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.CronExpression" + } + ] + }, + "daily": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.DailySchedule" + } + ] + }, + "hourly": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HourlySchedule" + } + ] + }, + "interval": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + } + ] + }, + "monthly": { + "oneOf": [ + { + "$ref": "#/components/schemas/watcher._types.TimeOfMonth" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.TimeOfMonth" + } + } + ] + }, + "weekly": { + "oneOf": [ + { + "$ref": "#/components/schemas/watcher._types.TimeOfWeek" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.TimeOfWeek" + } + } + ] + }, + "yearly": { + "oneOf": [ + { + "$ref": "#/components/schemas/watcher._types.TimeOfYear" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.TimeOfYear" + } + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "search_template-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" + "watcher._types.DailySchedule": { + "type": "object", + "properties": { + "at": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.ScheduleTimeOfDay" + } + } }, - "style": "form" + "required": [ + "at" + ] }, - "search_template-explain": { - "in": "query", - "name": "explain", - "description": "If `true`, the response includes additional details about score computation as part of a hit.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.HourlySchedule": { + "type": "object", + "properties": { + "minute": { + "type": "array", + "items": { + "type": "number" + } + } }, - "style": "form" + "required": [ + "minute" + ] }, - "search_template-ignore_throttled": { - "in": "query", - "name": "ignore_throttled", - "description": "If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled.", - "deprecated": true, - "schema": { - "type": "boolean" + "watcher._types.TimeOfMonth": { + "type": "object", + "properties": { + "at": { + "type": "array", + "items": { + "type": "string" + } + }, + "on": { + "type": "array", + "items": { + "type": "number" + } + } }, - "style": "form" + "required": [ + "at", + "on" + ] }, - "search_template-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.TimeOfWeek": { + "type": "object", + "properties": { + "at": { + "type": "array", + "items": { + "type": "string" + } + }, + "on": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.Day" + } + } }, - "style": "form" + "required": [ + "at", + "on" + ] }, - "search_template-preference": { - "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nIt is random by default.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" + "watcher._types.Day": { + "type": "string", + "enum": [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ] }, - "search_template-profile": { - "in": "query", - "name": "profile", - "description": "If `true`, the query execution is profiled.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "search_template-routing": { - "in": "query", - "name": "routing", - "description": "A custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" - }, - "search_template-scroll": { - "in": "query", - "name": "scroll", - "description": "Specifies how long a consistent view of the index\nshould be maintained for scrolled search.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "search_template-search_type": { - "in": "query", - "name": "search_type", - "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SearchType" - }, - "style": "form" - }, - "search_template-rest_total_hits_as_int": { - "in": "query", - "name": "rest_total_hits_as_int", - "description": "If `true`, `hits.total` is rendered as an integer in the response.\nIf `false`, it is rendered as an object.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.TimeOfYear": { + "type": "object", + "properties": { + "at": { + "type": "array", + "items": { + "type": "string" + } + }, + "int": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.Month" + } + }, + "on": { + "type": "array", + "items": { + "type": "number" + } + } }, - "style": "form" + "required": [ + "at", + "int", + "on" + ] }, - "search_template-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "searchable_snapshots.cache_stats-node_id": { - "in": "path", - "name": "node_id", - "description": "The names of the nodes in the cluster to target.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "searchable_snapshots.cache_stats-master_timeout": { - "in": "query", - "name": "master_timeout", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "searchable_snapshots.clear_cache-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases to clear from the cache.\nIt supports wildcards (`*`).", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "searchable_snapshots.clear_cache-expand_wildcards": { - "in": "query", - "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" - }, - "searchable_snapshots.clear_cache-allow_no_indices": { - "in": "query", - "name": "allow_no_indices", - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.Month": { + "type": "string", + "enum": [ + "january", + "february", + "march", + "april", + "may", + "june", + "july", + "august", + "september", + "october", + "november", + "december" + ] }, - "searchable_snapshots.clear_cache-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "searchable_snapshots.stats-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams and indices to retrieve statistics for.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, - "searchable_snapshots.stats-level": { - "in": "query", - "name": "level", - "description": "Return stats aggregated at cluster, index or shard level", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/searchable_snapshots._types.StatsLevel" - }, - "style": "form" - }, - "security.change_password-username": { - "in": "path", - "name": "username", - "description": "The user whose password you want to change. If you do not specify this\nparameter, the password is changed for the current user.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Username" - }, - "style": "simple" - }, - "security.change_password-refresh": { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.create_api_key-refresh": { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.create_service_token-namespace": { - "in": "path", - "name": "namespace", - "description": "The name of the namespace, which is a top-level grouping of service accounts.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Namespace" - }, - "style": "simple" - }, - "security.create_service_token-service": { - "in": "path", - "name": "service", - "description": "The name of the service.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Service" - }, - "style": "simple" - }, - "security.create_service_token-name": { - "in": "path", - "name": "name", - "description": "The name for the service account token.\nIf omitted, a random name will be generated.\n\nToken names must be at least one and no more than 256 characters.\nThey can contain alphanumeric characters (a-z, A-Z, 0-9), dashes (`-`), and underscores (`_`), but cannot begin with an underscore.\n\nNOTE: Token names must be unique in the context of the associated service account.\nThey must also be globally unique with their fully qualified names, which are comprised of the service account principal and token name, such as `//`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "security.create_service_token-refresh": { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.disable_user-username": { - "in": "path", - "name": "username", - "description": "An identifier for the user.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Username" - }, - "style": "simple" - }, - "security.disable_user-refresh": { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.disable_user_profile-uid": { - "in": "path", - "name": "uid", - "description": "Unique identifier for the user profile.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/security._types.UserProfileId" - }, - "style": "simple" - }, - "security.disable_user_profile-refresh": { - "in": "query", - "name": "refresh", - "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', it does nothing with refreshes.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.enable_user-username": { - "in": "path", - "name": "username", - "description": "An identifier for the user.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Username" - }, - "style": "simple" - }, - "security.enable_user-refresh": { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.enable_user_profile-uid": { - "in": "path", - "name": "uid", - "description": "A unique identifier for the user profile.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/security._types.UserProfileId" - }, - "style": "simple" - }, - "security.enable_user_profile-refresh": { - "in": "query", - "name": "refresh", - "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.get_privileges-application": { - "in": "path", - "name": "application", - "description": "The name of the application.\nApplication privileges are always associated with exactly one application.\nIf you do not specify this parameter, the API returns information about all privileges for all applications.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "security.get_privileges-name": { - "in": "path", - "name": "name", - "description": "The name of the privilege.\nIf you do not specify this parameter, the API returns information about all privileges for the requested application.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "security.get_role-name": { - "in": "path", - "name": "name", - "description": "The name of the role.\nYou can specify multiple roles as a comma-separated list.\nIf you do not specify this parameter, the API returns information about all roles.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "security.get_role_mapping-name": { - "in": "path", - "name": "name", - "description": "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 comma-separated list. If you do not specify this parameter, the API returns information about all role mappings.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "security.get_service_accounts-namespace": { - "in": "path", - "name": "namespace", - "description": "The name of the namespace.\nOmit this parameter to retrieve information about all service accounts.\nIf you omit this parameter, you must also omit the `service` parameter.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Namespace" - }, - "style": "simple" - }, - "security.get_service_accounts-service": { - "in": "path", - "name": "service", - "description": "The service name.\nOmit this parameter to retrieve information about all service accounts that belong to the specified `namespace`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Service" - }, - "style": "simple" - }, - "security.get_user-username": { - "in": "path", - "name": "username", - "description": "An identifier for the user. You can specify multiple usernames as a comma-separated list. If you omit this parameter, the API retrieves information about all users.", - "required": true, - "deprecated": false, - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Username" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Username" + "watcher.execute_watch.WatchRecord": { + "type": "object", + "properties": { + "condition": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ConditionContainer" + } + ] + }, + "input": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.InputContainer" } + ] + }, + "messages": { + "type": "array", + "items": { + "type": "string" } - ] + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "node": { + "type": "string" + }, + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ExecutionResult" + } + ] + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ExecutionStatus" + } + ] + }, + "trigger_event": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.TriggerEventResult" + } + ] + }, + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Username" + } + ] + }, + "watch_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WatchStatus" + } + ] + } }, - "style": "simple" + "required": [ + "condition", + "input", + "messages", + "node", + "result", + "state", + "trigger_event", + "user", + "watch_id" + ] }, - "security.get_user-with_profile_uid": { - "in": "query", - "name": "with_profile_uid", - "description": "Determines whether to retrieve the user profile UID, if it exists, for the users.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "security.has_privileges-user": { - "in": "path", - "name": "user", - "description": "Username", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "security.put_privileges-refresh": { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.put_role-name": { - "in": "path", - "name": "name", - "description": "The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "security.put_role-refresh": { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.put_role_mapping-name": { - "in": "path", - "name": "name", - "description": "The distinct name that identifies the role mapping.\nThe 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.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "security.put_role_mapping-refresh": { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.put_user-username": { - "in": "path", - "name": "username", - "description": "An identifier for the user.\n\nNOTE: Usernames must be at least 1 and no more than 507 characters.\nThey can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block.\nLeading or trailing whitespace is not allowed.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Username" - }, - "style": "simple" - }, - "security.put_user-refresh": { - "in": "query", - "name": "refresh", - "description": "Valid values are `true`, `false`, and `wait_for`.\nThese values have the same meaning as in the index API, but the default value for this API is true.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "security.query_api_keys-with_limited_by": { - "in": "query", - "name": "with_limited_by", - "description": "Return the snapshot of the owner user's role descriptors associated with the API key.\nAn API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it).\nAn API key cannot retrieve any API key’s limited-by role descriptors (including itself) unless it has `manage_api_key` or higher privileges.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ExecutionResult": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher._types.ExecutionResultAction" + } + }, + "condition": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ExecutionResultCondition" + } + ] + }, + "execution_duration": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] + }, + "execution_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "input": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ExecutionResultInput" + } + ] + } }, - "style": "form" + "required": [ + "actions", + "condition", + "execution_duration", + "execution_time", + "input" + ] }, - "security.query_api_keys-with_profile_uid": { - "in": "query", - "name": "with_profile_uid", - "description": "Determines whether to also retrieve the profile UID for the API key owner principal.\nIf it exists, the profile UID is returned under the `profile_uid` response field for each API key.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ExecutionResultAction": { + "type": "object", + "properties": { + "email": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.EmailResult" + } + ] + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.IndexResult" + } + ] + }, + "logging": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.LoggingResult" + } + ] + }, + "pagerduty": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.PagerDutyResult" + } + ] + }, + "reason": { + "type": "string" + }, + "slack": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SlackResult" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActionStatusOptions" + } + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActionType" + } + ] + }, + "webhook": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WebhookResult" + } + ] + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ErrorCause" + } + ] + } }, - "style": "form" + "required": [ + "id", + "status", + "type" + ] }, - "security.query_api_keys-typed_keys": { - "in": "query", - "name": "typed_keys", - "description": "Determines whether aggregation names are prefixed by their respective types in the response.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.EmailResult": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "message": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Email" + } + ] + }, + "reason": { + "type": "string" + } }, - "style": "form" + "required": [ + "message" + ] }, - "security.query_user-with_profile_uid": { - "in": "query", - "name": "with_profile_uid", - "description": "Determines whether to retrieve the user profile UID, if it exists, for the users.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.IndexResult": { + "type": "object", + "properties": { + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.IndexResultSummary" + } + ] + } }, - "style": "form" + "required": [ + "response" + ] }, - "security.suggest_user_profiles-data": { - "in": "query", - "name": "data", - "description": "A comma-separated list of filters for the `data` field of the profile document.\nTo return all content use `data=*`.\nTo return a subset of content, use `data=` to retrieve content nested under the specified ``.\nBy default, the API returns no `data` content.\nIt is an error to specify `data` as both the query parameter and the request body field.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + "watcher._types.IndexResultSummary": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - } - ] - }, - "style": "form" - }, - "security.update_user_profile_data-uid": { - "in": "path", - "name": "uid", - "description": "A unique identifier for the user profile.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/security._types.UserProfileId" - }, - "style": "simple" - }, - "security.update_user_profile_data-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, - "security.update_user_profile_data-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "security.update_user_profile_data-refresh": { - "in": "query", - "name": "refresh", - "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - }, - "shutdown.get_node-node_id": { - "in": "path", - "name": "node_id", - "description": "Which node for which to retrieve the shutdown status", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" - }, - "shutdown.get_node-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TimeUnit" - }, - "style": "form" - }, - "simulate.ingest-index": { - "in": "path", - "name": "index", - "description": "The index to simulate ingesting into.\nThis value can be overridden by specifying an index on each document.\nIf you specify this parameter in the request path, it is used for any documents that do not explicitly specify an index argument.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "simulate.ingest-pipeline": { - "in": "query", - "name": "pipeline", - "description": "The pipeline to use as the default pipeline.\nThis value can be used to override the default pipeline of the index.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.PipelineName" - }, - "style": "form" - }, - "slm.get_lifecycle-policy_id": { - "in": "path", - "name": "policy_id", - "description": "Comma-separated list of snapshot lifecycle policies to retrieve", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "slm.get_lifecycle-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "slm.get_lifecycle-timeout": { - "in": "query", - "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "snapshot.create-repository": { - "in": "path", - "name": "repository", - "description": "The name of the repository for the snapshot.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "snapshot.create-snapshot": { - "in": "path", - "name": "snapshot", - "description": "The name of the snapshot.\nIt supportes date math.\nIt must be unique in the repository.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "snapshot.create-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "snapshot.create-wait_for_completion": { - "in": "query", - "name": "wait_for_completion", - "description": "If `true`, the request returns a response when the snapshot is complete.\nIf `false`, the request returns a response when the snapshot initializes.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "snapshot.create_repository-repository": { - "in": "path", - "name": "repository", - "description": "The name of the snapshot repository to register or update.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "snapshot.create_repository-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "snapshot.create_repository-timeout": { - "in": "query", - "name": "timeout", - "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nTo indicate that the request should never timeout, set it to `-1`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "snapshot.create_repository-verify": { - "in": "query", - "name": "verify", - "description": "If `true`, the request verifies the repository is functional on all master and data nodes in the cluster.\nIf `false`, this verification is skipped.\nYou can also perform this verification with the verify snapshot repository API.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "snapshot.get_repository-repository": { - "in": "path", - "name": "repository", - "description": "A comma-separated list of snapshot repository names used to limit the request.\nWildcard (`*`) expressions are supported including combining wildcards with exclude patterns starting with `-`.\n\nTo get information about all snapshot repositories registered in the cluster, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "snapshot.get_repository-local": { - "in": "query", - "name": "local", - "description": "If `true`, the request gets information from the local node only.\nIf `false`, the request gets information from the master node.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "snapshot.get_repository-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "snapshot.status-repository": { - "in": "path", - "name": "repository", - "description": "The snapshot repository name used to limit the request.\nIt supports wildcards (`*`) if `` isn't specified.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "snapshot.status-snapshot": { - "in": "path", - "name": "snapshot", - "description": "A comma-separated list of snapshots to retrieve status for.\nThe default is currently running snapshots.\nWildcards (`*`) are not supported.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "snapshot.status-ignore_unavailable": { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error for any snapshots that are unavailable.\nIf `true`, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "snapshot.status-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nTo indicate that the request should never timeout, set it to `-1`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "sql.query-format": { - "in": "query", - "name": "format", - "description": "The format for the response.\nYou can also specify a format using the `Accept` HTTP header.\nIf you specify both this parameter and the `Accept` HTTP header, this parameter takes precedence.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/sql.query.SqlFormat" - }, - "style": "form" - }, - "tasks.cancel-task_id": { - "in": "path", - "name": "task_id", - "description": "The task identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.TaskId" - }, - "style": "simple" - }, - "tasks.cancel-actions": { - "in": "query", - "name": "actions", - "description": "A comma-separated list or wildcard expression of actions that is used to limit the request.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + ] + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" } - } - ] + ] + }, + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Result" + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionNumber" + } + ] + } }, - "style": "form" + "required": [ + "created", + "id", + "index", + "result", + "version" + ] }, - "tasks.cancel-nodes": { - "in": "query", - "name": "nodes", - "description": "A comma-separated list of node IDs or names that is used to limit the request.", - "deprecated": false, - "schema": { - "type": "array", - "items": { + "watcher._types.LoggingResult": { + "type": "object", + "properties": { + "logged_text": { "type": "string" } }, - "style": "form" + "required": [ + "logged_text" + ] }, - "tasks.cancel-parent_task_id": { - "in": "query", - "name": "parent_task_id", - "description": "A parent task ID that is used to limit the tasks.", - "deprecated": false, - "schema": { - "type": "string" + "watcher._types.PagerDutyResult": { + "type": "object", + "properties": { + "event": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.PagerDutyEvent" + } + ] + }, + "reason": { + "type": "string" + }, + "request": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputRequestResult" + } + ] + }, + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputResponseResult" + } + ] + } }, - "style": "form" + "required": [ + "event" + ] }, - "tasks.cancel-wait_for_completion": { - "in": "query", - "name": "wait_for_completion", - "description": "If true, the request blocks until all found tasks are complete.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "terms_enum-index": { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and index aliases to search.\nWildcard (`*`) expressions are supported.\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "termvectors-index": { - "in": "path", - "name": "index", - "description": "The name of the index that contains the document.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "style": "simple" - }, - "termvectors-id": { - "in": "path", - "name": "id", - "description": "A unique identifier for the document.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "termvectors-fields": { - "in": "query", - "name": "fields", - "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - "termvectors-field_statistics": { - "in": "query", - "name": "field_statistics", - "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.HttpInputRequestResult": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputRequestDefinition" + }, + { + "type": "object" + } + ] }, - "termvectors-offsets": { - "in": "query", - "name": "offsets", - "description": "If `true`, the response includes term offsets.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.HttpInputResponseResult": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.HttpHeaders" + } + ] + }, + "status": { + "type": "number" + } }, - "style": "form" + "required": [ + "body", + "headers", + "status" + ] }, - "termvectors-payloads": { - "in": "query", - "name": "payloads", - "description": "If `true`, the response includes term payloads.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.SlackResult": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "message": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.SlackMessage" + } + ] + } }, - "style": "form" + "required": [ + "message" + ] }, - "termvectors-positions": { - "in": "query", - "name": "positions", - "description": "If `true`, the response includes term positions.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher._types.ActionStatusOptions": { + "type": "string", + "enum": [ + "success", + "failure", + "simulated", + "throttled" + ] }, - "termvectors-preference": { - "in": "query", - "name": "preference", - "description": "The node or shard the operation should be performed on.\nIt is random by default.", - "deprecated": false, - "schema": { - "type": "string" + "watcher._types.WebhookResult": { + "type": "object", + "properties": { + "request": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputRequestResult" + } + ] + }, + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.HttpInputResponseResult" + } + ] + } }, - "style": "form" + "required": [ + "request" + ] }, - "termvectors-realtime": { - "in": "query", - "name": "realtime", - "description": "If true, the request is real-time as opposed to near-real-time.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ExecutionResultCondition": { + "type": "object", + "properties": { + "met": { + "type": "boolean" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActionStatusOptions" + } + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ConditionType" + } + ] + } }, - "style": "form" + "required": [ + "met", + "status", + "type" + ] }, - "termvectors-routing": { - "in": "query", - "name": "routing", - "description": "A custom value that is used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" + "watcher._types.ConditionType": { + "type": "string", + "enum": [ + "always", + "never", + "script", + "compare", + "array_compare" + ] }, - "termvectors-term_statistics": { - "in": "query", - "name": "term_statistics", - "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "termvectors-version": { - "in": "query", - "name": "version", - "description": "If `true`, returns the document version as part of a hit.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "style": "form" - }, - "termvectors-version_type": { - "in": "query", - "name": "version_type", - "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n - `force`: This option is deprecated because it can cause primary and replica shards to diverge.\n\n", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionType" - }, - "style": "form" - }, - "text_structure.find_message_structure-column_names": { - "in": "query", - "name": "column_names", - "description": "If the format is `delimited`, you can specify the column names in a comma-separated list.\nIf this parameter is not specified, the structure finder uses the column names from the header row of the text.\nIf the text does not have a header role, columns are named \"column1\", \"column2\", \"column3\", for example.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "text_structure.find_message_structure-delimiter": { - "in": "query", - "name": "delimiter", - "description": "If you the format is `delimited`, you can specify the character used to delimit the values in each row.\nOnly a single character is supported; the delimiter cannot have multiple characters.\nBy default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (`|`).\nIn this default scenario, all rows must have the same number of fields for the delimited format to be detected.\nIf you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "text_structure.find_message_structure-ecs_compatibility": { - "in": "query", - "name": "ecs_compatibility", - "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nThis setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.\nIf the structure finder identifies a common structure but has no idea of meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output, with the intention that a user who knows the meanings rename these fields before using it.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/text_structure._types.EcsCompatibilityType" - }, - "style": "form" - }, - "text_structure.find_message_structure-explain": { - "in": "query", - "name": "explain", - "description": "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.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "text_structure.find_message_structure-format": { - "in": "query", - "name": "format", - "description": "The high level structure of the text.\nBy default, the API chooses the format.\nIn this default scenario, all rows must have the same number of fields for a delimited format to be detected.\nIf the format is `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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/text_structure._types.FormatType" - }, - "style": "form" - }, - "text_structure.find_message_structure-grok_pattern": { - "in": "query", - "name": "grok_pattern", - "description": "If the format is `semi_structured_text`, you can specify a Grok pattern that is used to extract fields from every message in the text.\nThe name of the timestamp field in the Grok pattern must match what is specified in the `timestamp_field` parameter.\nIf that parameter is not specified, the name of the timestamp field in the Grok pattern must match \"timestamp\".\nIf `grok_pattern` is not specified, the structure finder creates a Grok pattern.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.GrokPattern" - }, - "style": "form" - }, - "text_structure.find_message_structure-quote": { - "in": "query", - "name": "quote", - "description": "If the format is `delimited`, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character.\nOnly a single character is supported.\nIf this parameter is not specified, the default value is a double quote (`\"`).\nIf 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.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "text_structure.find_message_structure-should_trim_fields": { - "in": "query", - "name": "should_trim_fields", - "description": "If the format is `delimited`, you can specify whether values between delimiters should have whitespace trimmed from them.\nIf this parameter is not specified and the delimiter is pipe (`|`), the default value is true.\nOtherwise, the default value is `false`.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "text_structure.find_message_structure-timeout": { - "in": "query", - "name": "timeout", - "description": "The maximum amount of time that the structure analysis can take.\nIf the analysis is still running when the timeout expires, it will be stopped.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "text_structure.find_message_structure-timestamp_field": { - "in": "query", - "name": "timestamp_field", - "description": "The name of the field that contains the primary timestamp of each record in the text.\nIn particular, if the text was ingested into an index, this is the field that would be used to populate the `@timestamp` field.\n\nIf the format is `semi_structured_text`, this field must match the name of the appropriate extraction in the `grok_pattern`.\nTherefore, for semi-structured text, it is best not to specify this parameter unless `grok_pattern` is also specified.\n\nFor structured text, if you specify this parameter, the field must exist within the text.\n\nIf this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field.\nFor structured text, it is not compulsory to have a timestamp in the text.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Field" - }, - "style": "form" - }, - "text_structure.find_message_structure-timestamp_format": { - "in": "query", - "name": "timestamp_format", - "description": "The Java time format of the timestamp field in the text.\nOnly a subset of Java time format letter groups are supported:\n\n* `a`\n* `d`\n* `dd`\n* `EEE`\n* `EEEE`\n* `H`\n* `HH`\n* `h`\n* `M`\n* `MM`\n* `MMM`\n* `MMMM`\n* `mm`\n* `ss`\n* `XX`\n* `XXX`\n* `yy`\n* `yyyy`\n* `zzz`\n\nAdditionally `S` letter groups (fractional seconds) of length one to nine are supported providing they occur after `ss` and are separated from the `ss` by a period (`.`), comma (`,`), or colon (`:`).\nSpacing and punctuation is also permitted with the exception a question mark (`?`), newline, and carriage return, together with literal text enclosed in single quotes.\nFor example, `MM/dd HH.mm.ss,SSSSSS 'in' yyyy` is a valid override format.\n\nOne valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full `grok_pattern`.\nAnother is when the timestamp format is one that the structure finder does not consider by default.\n\nIf this parameter is not specified, the structure finder chooses the best format from a built-in set.\n\nIf the special value `null` is specified, the structure finder will not look for a primary timestamp in the text.\nWhen the format is semi-structured text, this will result in the structure finder treating the text as single-line messages.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "text_structure.test_grok_pattern-ecs_compatibility": { - "in": "query", - "name": "ecs_compatibility", - "description": "The mode of compatibility with ECS compliant Grok patterns.\nUse this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.\nValid values are `disabled` and `v1`.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - "transform.get_transform-transform_id": { - "in": "path", - "name": "transform_id", - "description": "Identifier for the transform. It can be a transform identifier or a\nwildcard expression. You can get information for all transforms by using\n`_all`, by specifying `*` as the ``, or by omitting the\n``.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "transform.get_transform-allow_no_match": { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no transforms that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf this parameter is false, the request returns a 404 status code when\nthere are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.ExecutionResultInput": { + "type": "object", + "properties": { + "payload": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ActionStatusOptions" + } + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.InputType" + } + ] + } }, - "style": "form" + "required": [ + "payload", + "status", + "type" + ] }, - "transform.get_transform-from": { - "in": "query", - "name": "from", - "description": "Skips the specified number of transforms.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "watcher._types.InputType": { + "type": "string", + "enum": [ + "http", + "search", + "simple" + ] + }, + "watcher._types.ExecutionStatus": { + "type": "string", + "enum": [ + "awaits_execution", + "checking", + "execution_not_needed", + "throttled", + "executed", + "failed", + "deleted_while_queued", + "not_executed_already_queued" + ] }, - "transform.get_transform-size": { - "in": "query", - "name": "size", - "description": "Specifies the maximum number of transforms to obtain.", - "deprecated": false, - "schema": { - "type": "number" + "watcher._types.TriggerEventResult": { + "type": "object", + "properties": { + "manual": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.TriggerEventContainer" + } + ] + }, + "triggered_time": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" + } + ] + }, + "type": { + "type": "string" + } }, - "style": "form" + "required": [ + "manual", + "triggered_time", + "type" + ] }, - "transform.get_transform-exclude_generated": { - "in": "query", - "name": "exclude_generated", - "description": "Excludes fields that were automatically added when creating the\ntransform. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "transform.preview_transform-transform_id": { - "in": "path", - "name": "transform_id", - "description": "Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform\nconfiguration details in the request body.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "transform.preview_transform-timeout": { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the\ntimeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - "watcher.ack_watch-watch_id": { - "in": "path", - "name": "watch_id", - "description": "The watch identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "watcher.ack_watch-action_id": { - "in": "path", - "name": "action_id", - "description": "A comma-separated list of the action identifiers to acknowledge.\nIf you omit this parameter, all of the actions of the watch are acknowledged.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Names" - }, - "style": "simple" - }, - "watcher.activate_watch-watch_id": { - "in": "path", - "name": "watch_id", - "description": "The watch identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "watcher.deactivate_watch-watch_id": { - "in": "path", - "name": "watch_id", - "description": "The watch identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" - }, - "watcher.execute_watch-id": { - "in": "path", - "name": "id", - "description": "The watch identifier.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "watcher.execute_watch-debug": { - "in": "query", - "name": "debug", - "description": "Defines whether the watch runs in debug mode.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - "watcher.put_watch-id": { - "in": "path", - "name": "id", - "description": "The identifier for the watch.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" - }, - "watcher.put_watch-active": { - "in": "query", - "name": "active", - "description": "The initial state of the watch.\nThe default value is `true`, which means the watch is active by default.", - "deprecated": false, - "schema": { - "type": "boolean" + "watcher._types.TriggerEventContainer": { + "type": "object", + "properties": { + "schedule": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ScheduleTriggerEvent" + } + ] + } }, - "style": "form" + "minProperties": 1, + "maxProperties": 1 }, - "watcher.put_watch-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "only update the watch if the last operation that has changed the watch has the specified primary term", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "watcher.put_watch-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "only update the watch if the last operation that has changed the watch has the specified sequence number", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, - "watcher.put_watch-version": { - "in": "query", - "name": "version", - "description": "Explicit version number for concurrency control", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "style": "form" - }, - "watcher.stats-metric": { - "in": "path", - "name": "metric", - "description": "Defines which additional metrics are included in the response.\n\nSupported values include: `_all` (or `all`), `queued_watches`, `current_watches`, `pending_watches`\n\n", - "required": true, - "deprecated": false, - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/watcher.stats.WatcherMetric" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher.stats.WatcherMetric" + "watcher._types.QueryWatch": { + "type": "object", + "properties": { + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - } - ] + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.WatchStatus" + } + ] + }, + "watch": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.Watch" + } + ] + }, + "_primary_term": { + "type": "number" + }, + "_seq_no": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.SequenceNumber" + } + ] + } }, - "style": "simple" + "required": [ + "_id" + ] }, - "watcher.stats-emit_stacktraces": { - "in": "query", - "name": "emit_stacktraces", - "description": "Defines whether stack traces are generated for each watch that is running.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "watcher.stats.WatcherMetric": { + "type": "string", + "enum": [ + "_all", + "all", + "queued_watches", + "current_watches", + "pending_watches" + ] }, - "watcher.stats-metric_": { - "in": "query", - "name": "metric", - "description": "Defines which additional metrics are included in the response.\n\nSupported values include: `_all` (or `all`), `queued_watches`, `current_watches`, `pending_watches`\n\n", - "deprecated": false, - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/watcher.stats.WatcherMetric" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/watcher.stats.WatcherMetric" + "watcher.stats.WatcherNodeStats": { + "type": "object", + "properties": { + "current_watches": { + "description": "The current executing watches metric gives insight into the watches that are currently being executed by Watcher.\nAdditional information is shared per watch that is currently executing.\nThis information includes the `watch_id`, the time its execution started and its current execution phase.\nTo include this metric, the `metric` option should be set to `current_watches` or `_all`.\nIn addition you can also specify the `emit_stacktraces=true` parameter, which adds stack traces for each watch that is being run.\nThese stack traces can give you more insight into an execution of a watch.", + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher.stats.WatchRecordStats" + } + }, + "execution_thread_pool": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher._types.ExecutionThreadPool" } + ] + }, + "queued_watches": { + "description": "Watcher moderates the execution of watches such that their execution won't put too much pressure on the node and its resources.\nIf too many watches trigger concurrently and there isn't enough capacity to run them all, some of the watches are queued, waiting for the current running watches to finish.s\nThe queued watches metric gives insight on these queued watches.\n\nTo include this metric, the `metric` option should include `queued_watches` or `_all`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/watcher.stats.WatchRecordQueuedStats" } - ] - }, - "style": "form" - } - }, - "requestBodies": { - "async_search.submit": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types.FieldCollapse" - }, - "explain": { - "description": "If true, returns detailed information about score computation as part of a hit.", - "type": "boolean" - }, - "ext": { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "from": { - "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types.Highlight" - }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types.TrackHits" - }, - "indices_boost": { - "description": "Boosts the _score of documents from specified indices.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "docvalue_fields": { - "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "knn": { - "description": "Defines the approximate kNN search to run.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.KnnSearch" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.KnnSearch" - } - } - ] - }, - "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in search results and results collected by aggregations.", - "type": "number" - }, - "post_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "profile": { - "type": "boolean" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "rescore": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.Rescore" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Rescore" - } - } - ] - }, - "script_fields": { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" - }, - "size": { - "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", - "type": "number" - }, - "slice": { - "$ref": "#/components/schemas/_types.SlicedScroll" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "fields": { - "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types.Suggester" - }, - "terminate_after": { - "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", - "type": "number" - }, - "timeout": { - "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", - "type": "string" - }, - "track_scores": { - "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", - "type": "boolean" - }, - "version": { - "description": "If true, returns document version as part of a hit.", - "type": "boolean" - }, - "seq_no_primary_term": { - "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", - "type": "boolean" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "pit": { - "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "stats": { - "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", - "type": "array", - "items": { - "type": "string" - } - } + }, + "watch_count": { + "description": "The number of watches currently registered.", + "type": "number" + }, + "watcher_state": { + "description": "The current state of Watcher.", + "allOf": [ + { + "$ref": "#/components/schemas/watcher.stats.WatcherState" } - }, - "examples": { - "AsyncSearchSubmitRequestExample1": { - "description": "Perform a search request asynchronously with `POST /sales*/_async_search?size=0`. It accepts the same parameters and request body as the search API.\n", - "value": "{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}" + ] + }, + "node_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" } - } + ] } - } + }, + "required": [ + "execution_thread_pool", + "watch_count", + "watcher_state", + "node_id" + ] }, - "bulk": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.bulk.OperationContainer" - }, + "watcher.stats.WatchRecordStats": { + "allOf": [ + { + "$ref": "#/components/schemas/watcher.stats.WatchRecordQueuedStats" + }, + { + "type": "object", + "properties": { + "execution_phase": { + "description": "The current watch execution phase.", + "allOf": [ { - "$ref": "#/components/schemas/_global.bulk.UpdateAction" - }, + "$ref": "#/components/schemas/watcher._types.ExecutionPhase" + } + ] + }, + "triggered_time": { + "description": "The time the watch was triggered by the trigger engine.", + "allOf": [ { - "type": "object" + "$ref": "#/components/schemas/_types.DateTime" } ] - } - }, - "examples": { - "BulkRequestExample1": { - "summary": "Multiple operations", - "description": "Run `POST _bulk` to perform multiple operations.", - "value": "{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" }, - "BulkRequestExample2": { - "summary": "Bulk updates", - "description": "When you run `POST _bulk` and use the `update` action, you can use `retry_on_conflict` as a field in the action itself (not in the extra payload line) to specify how many times an update should be retried in the case of a version conflict.\n", - "value": "{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : { \"_id\" : \"0\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"script\" : { \"source\": \"ctx._source.counter += params.param1\", \"lang\" : \"painless\", \"params\" : {\"param1\" : 1}}, \"upsert\" : {\"counter\" : 1}}\n{ \"update\" : {\"_id\" : \"2\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"}, \"doc_as_upsert\" : true }\n{ \"update\" : {\"_id\" : \"3\", \"_index\" : \"index1\", \"_source\" : true} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : {\"_id\" : \"4\", \"_index\" : \"index1\"} }\n{ \"doc\" : {\"field\" : \"value\"}, \"_source\": true}" + "executed_actions": { + "type": "array", + "items": { + "type": "string" + } }, - "BulkRequestExample3": { - "summary": "Filter for failed operations", - "description": "To return only information about failed operations, run `POST /_bulk?filter_path=items.*.error`.\n", - "value": "{ \"update\": {\"_id\": \"5\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"update\": {\"_id\": \"6\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"create\": {\"_id\": \"7\", \"_index\": \"index1\"} }\n{ \"my_field\": \"foo\" }" + "watch_id": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] }, - "BulkRequestExample4": { - "summary": "Dynamic templates", - "description": "Run `POST /_bulk` to perform a bulk request that consists of index and create actions with the `dynamic_templates` parameter. The bulk request creates two new fields `work_location` and `home_location` with type `geo_point` according to the `dynamic_templates` parameter. However, the `raw_location` field is created using default dynamic mapping rules, as a text field in that case since it is supplied as a string in the JSON document.\n", - "value": "{ \"index\" : { \"_index\" : \"my_index\", \"_id\" : \"1\", \"dynamic_templates\": {\"work_location\": \"geo_point\"}} }\n{ \"field\" : \"value1\", \"work_location\": \"41.12,-71.34\", \"raw_location\": \"41.12,-71.34\"}\n{ \"create\" : { \"_index\" : \"my_index\", \"_id\" : \"2\", \"dynamic_templates\": {\"home_location\": \"geo_point\"}} }\n{ \"field\" : \"value2\", \"home_location\": \"41.12,-71.34\"}" + "watch_record_id": { + "description": "The watch record identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Id" + } + ] } - } + }, + "required": [ + "execution_phase", + "triggered_time", + "watch_id", + "watch_record_id" + ] } - }, - "required": true + ] }, - "clear_scroll": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scroll_id": { - "$ref": "#/components/schemas/_types.ScrollIds" - } + "watcher._types.ExecutionPhase": { + "type": "string", + "enum": [ + "awaits_execution", + "started", + "input", + "condition", + "actions", + "watch_transform", + "aborted", + "finished" + ] + }, + "watcher.stats.WatchRecordQueuedStats": { + "type": "object", + "properties": { + "execution_time": { + "description": "The time the watch was run.\nThis is just before the input is being run.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" } - }, - "examples": { - "ClearScrollRequestExample1": { - "description": "Run `DELETE /_search/scroll` to clear the search context and results for a scrolling search.", - "value": "{\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" + ] + } + }, + "required": [ + "execution_time" + ] + }, + "watcher._types.ExecutionThreadPool": { + "type": "object", + "properties": { + "max_size": { + "description": "The largest size of the execution thread pool, which indicates the largest number of concurrent running watches.", + "type": "number" + }, + "queue_size": { + "description": "The number of watches that were triggered and are currently queued.", + "type": "number" + } + }, + "required": [ + "max_size", + "queue_size" + ] + }, + "watcher.stats.WatcherState": { + "type": "string", + "enum": [ + "stopped", + "starting", + "started", + "stopping" + ] + }, + "xpack.info.XPackCategory": { + "type": "string", + "enum": [ + "build", + "features", + "license" + ] + }, + "xpack.info.BuildInformation": { + "type": "object", + "properties": { + "date": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DateTime" } - } + ] + }, + "hash": { + "type": "string" } - } + }, + "required": [ + "date", + "hash" + ] }, - "cluster.allocation_explain": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "current_node": { - "description": "Specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node.", - "type": "string" - }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "primary": { - "description": "If true, returns explanation for the primary shard for the given shard ID.", - "type": "boolean" - }, - "shard": { - "description": "Specifies the ID of the shard that you would like an explanation for.", - "type": "number" - } + "xpack.info.Features": { + "type": "object", + "properties": { + "aggregate_metric": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "analytics": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "ccr": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "data_streams": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "data_tiers": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "enrich": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "enterprise_search": { + "x-state": "Generally available; Added in 8.8.0", + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "eql": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "esql": { + "x-state": "Generally available; Added in 8.14.0", + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "graph": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "ilm": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "logstash": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "logsdb": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "ml": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "monitoring": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "rollup": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "runtime_fields": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "searchable_snapshots": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] + }, + "security": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" } - }, - "examples": { - "ClusterAllocationExplainRequestExample1": { - "description": "Run `GET _cluster/allocation/explain` to get an explanation for a shard's current allocation.", - "value": "{\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n}" + ] + }, + "slm": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" } - } - } - } - }, - "cluster.put_component_template": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "template": { - "$ref": "#/components/schemas/indices._types.IndexState" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "deprecated": { - "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", - "type": "boolean" - } - }, - "required": [ - "template" - ] - }, - "examples": { - "ClusterPutComponentTemplateRequestExample1": { - "summary": "Create a template", - "value": "{\n \"template\": null,\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n}" - }, - "ClusterPutComponentTemplateRequestExample2": { - "summary": "Create a template with aliases", - "description": "You can include index aliases in a component template. During index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", - "value": "{\n \"template\": null,\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n}" + ] + }, + "spatial": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" } - } - } - }, - "required": true - }, - "connector.put": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "index_name": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "is_native": { - "type": "boolean" - }, - "language": { - "type": "string" - }, - "name": { - "type": "string" - }, - "service_type": { - "type": "string" - } + ] + }, + "sql": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" } - }, - "examples": { - "ConnectorPutRequestExample1": { - "value": "{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"service_type\": \"google_drive\"\n}" - }, - "ConnectorPutRequestExample2": { - "value": "{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"description\": \"My Connector to sync data to Elastic index from Google Drive\",\n \"service_type\": \"google_drive\",\n \"language\": \"english\"\n}" + ] + }, + "transform": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" } - } - } - } - }, - "count": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } + ] + }, + "universal_profiling": { + "x-state": "Generally available; Added in 8.7.0", + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" } - }, - "examples": { - "CountRequestExample1": { - "description": "Run `GET /my-index-000001/_count?q=user:kimchy`. Alternatively, run `GET /my-index-000001/_count` with the same query in the request body. Both requests count the number of documents in `my-index-000001` with a `user.id` of `kimchy`.\n", - "value": "{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" + ] + }, + "voting_only": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" } - } - } - } - }, - "create": { - "content": { - "application/json": { - "schema": { - "type": "object" - }, - "examples": { - "CreateRequestExample1": { - "description": "Run `PUT my-index-000001/_create/1` to index a document into the `my-index-000001` index if no document with that ID exists.\n", - "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + ] + }, + "watcher": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" } - } + ] + }, + "archive": { + "x-state": "Generally available; Added in 8.2.0", + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.Feature" + } + ] } }, - "required": true + "required": [ + "aggregate_metric", + "analytics", + "ccr", + "data_streams", + "data_tiers", + "enrich", + "enterprise_search", + "eql", + "esql", + "graph", + "ilm", + "logstash", + "logsdb", + "ml", + "monitoring", + "rollup", + "searchable_snapshots", + "security", + "slm", + "spatial", + "sql", + "transform", + "universal_profiling", + "voting_only", + "watcher", + "archive" + ] }, - "eql.search": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "description": "EQL query you wish to run.", - "type": "string" - }, - "case_sensitive": { - "type": "boolean" - }, - "event_category_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "tiebreaker_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "timestamp_field": { - "$ref": "#/components/schemas/_types.Field" - }, - "fetch_size": { - "$ref": "#/components/schemas/_types.uint" - }, - "filter": { - "description": "Query, written in Query DSL, used to filter the events on which the EQL query runs.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - ] - }, - "keep_alive": { - "$ref": "#/components/schemas/_types.Duration" - }, - "keep_on_completion": { - "type": "boolean" - }, - "wait_for_completion_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "allow_partial_search_results": { - "description": "Allow query execution also in case of shard failures.\nIf true, the query will keep running and will return results based on the available shards.\nFor sequences, the behavior can be further refined using allow_partial_sequence_results", - "type": "boolean" - }, - "allow_partial_sequence_results": { - "description": "This flag applies only to sequences and has effect only if allow_partial_search_results=true.\nIf true, the sequence query will return results based on the available shards, ignoring the others.\nIf false, the sequence query will return successfully, but will always have empty results.", - "type": "boolean" - }, - "size": { - "$ref": "#/components/schemas/_types.uint" - }, - "fields": { - "description": "Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - } - ] - }, - "result_position": { - "$ref": "#/components/schemas/eql.search.ResultPosition" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "max_samples_per_key": { - "description": "By default, the response of a sample query contains up to `10` samples, with one sample per unique set of join keys. Use the `size`\nparameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the\n`max_samples_per_key` parameter. Pipes are not supported for sample queries.", - "type": "number" - } - }, - "required": [ - "query" - ] - }, - "examples": { - "EqlSearchRequestExample1": { - "summary": "Basic query", - "description": "Run `GET /my-data-stream/_eql/search` to search for events that have a `process.name` of `cmd.exe` and a `process.pid` other than `2013`.\n", - "value": "{\n \"query\": \"\"\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \"\"\"\n}" - }, - "EqlSearchRequestExample2": { - "summary": "Sequence query", - "description": "Run `GET /my-data-stream/_eql/search` to search for a sequence of events. The sequence starts with an event with an `event.category` of `file`, a `file.name` of `cmd.exe`, and a `process.pid` other than `2013`. It is followed by an event with an `event.category` of `process` and a `process.executable` that contains the substring `regsvr32`. These events must also share the same `process.pid` value.\n", - "value": "{\n \"query\": \"\"\"\n sequence by process.pid\n [ file where file.name == \"cmd.exe\" and process.pid != 2013 ]\n [ process where stringContains(process.executable, \"regsvr32\") ]\n \"\"\"\n}" + "xpack.info.Feature": { + "type": "object", + "properties": { + "available": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "native_code_info": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.info.NativeCodeInformation" } - } + ] } }, - "required": true + "required": [ + "available", + "enabled" + ] }, - "explain": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - }, - "examples": { - "ExplainRequestExample1": { - "description": "Run `GET /my-index-000001/_explain/0` with the request body. Alternatively, run `GET /my-index-000001/_explain/0?q=message:elasticsearch`\n", - "value": "{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}" + "xpack.info.NativeCodeInformation": { + "type": "object", + "properties": { + "build_hash": { + "type": "string" + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.VersionString" } - } + ] } - } + }, + "required": [ + "build_hash", + "version" + ] }, - "field_caps": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "index_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - } + "xpack.info.MinimalLicenseInformation": { + "type": "object", + "properties": { + "expiry_date_in_millis": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } - }, - "examples": { - "FieldCapabilitiesRequestExample1": { - "description": "Run `POST my-index-*/_field_caps?fields=rating` to get field capabilities and filter indices with a query. Indices that rewrite the provided filter to `match_none` on every shard will be filtered from the response.\n", - "value": "{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" + ] + }, + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseType" } - } - } - } - }, - "fleet.msearch": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.msearch.RequestItem" + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseStatus" } - } + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/license._types.LicenseType" + } + ] + }, + "uid": { + "type": "string" } }, - "required": true + "required": [ + "expiry_date_in_millis", + "mode", + "status", + "type", + "uid" + ] }, - "fleet.search": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aggregations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types.FieldCollapse" - }, - "explain": { - "description": "If true, returns detailed information about score computation as part of a hit.", - "type": "boolean" - }, - "ext": { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "from": { - "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types.Highlight" - }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types.TrackHits" - }, - "indices_boost": { - "description": "Boosts the _score of documents from specified indices.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "docvalue_fields": { - "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in search results and results collected by aggregations.", - "type": "number" - }, - "post_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "profile": { - "type": "boolean" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "rescore": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.Rescore" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Rescore" - } - } - ] - }, - "script_fields": { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" - }, - "size": { - "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", - "type": "number" - }, - "slice": { - "$ref": "#/components/schemas/_types.SlicedScroll" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "fields": { - "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types.Suggester" - }, - "terminate_after": { - "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", - "type": "number" - }, - "timeout": { - "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", - "type": "string" - }, - "track_scores": { - "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", - "type": "boolean" - }, - "version": { - "description": "If true, returns document version as part of a hit.", - "type": "boolean" - }, - "seq_no_primary_term": { - "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", - "type": "boolean" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "pit": { - "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "stats": { - "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", - "type": "array", - "items": { - "type": "string" - } - } - } - } + "xpack.usage.Base": { + "type": "object", + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" } - } + }, + "required": [ + "available", + "enabled" + ] }, - "graph.explore": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "connections": { - "$ref": "#/components/schemas/graph._types.Hop" - }, - "controls": { - "$ref": "#/components/schemas/graph._types.ExploreControls" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "vertices": { - "description": "Specifies one or more fields that contain the terms you want to include in the graph as vertices.", - "type": "array", - "items": { - "$ref": "#/components/schemas/graph._types.VertexDefinition" + "xpack.usage.Analytics": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.AnalyticsStatistics" } - } + ] } }, - "examples": { - "GraphExploreRequestExample1": { - "description": "Run `POST clicklogs/_graph/explore` for a basic exploration An initial graph explore query typically begins with a query to identify strongly related terms. Seed the exploration with a query. This example is searching `clicklogs` for people who searched for the term `midi`.Identify the vertices to include in the graph. This example is looking for product codes that are significantly associated with searches for `midi`. Find the connections. This example is looking for other search terms that led people to click on the products that are associated with searches for `midi`.\n", - "value": "{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}" - } - } + "required": [ + "stats" + ] } - } + ] }, - "index": { - "content": { - "application/json": { - "schema": { - "type": "object" - }, - "examples": { - "IndexRequestExample1": { - "summary": "Automate document IDs", - "description": "Run `POST my-index-000001/_doc/` to index a document. When you use the `POST //_doc/` request format, the `op_type` is automatically set to `create` and the index operation generates a unique ID for the document.\n", - "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" - }, - "IndexRequestExample2": { - "summary": "Define document IDs", - "description": "Run `PUT my-index-000001/_doc/1` to insert a JSON document into the `my-index-000001` index with an `_id` of 1.\n", - "value": "{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" - } - } + "xpack.usage.AnalyticsStatistics": { + "type": "object", + "properties": { + "boxplot_usage": { + "type": "number" + }, + "cumulative_cardinality_usage": { + "type": "number" + }, + "string_stats_usage": { + "type": "number" + }, + "top_metrics_usage": { + "type": "number" + }, + "t_test_usage": { + "type": "number" + }, + "moving_percentiles_usage": { + "type": "number" + }, + "normalize_usage": { + "type": "number" + }, + "rate_usage": { + "type": "number" + }, + "multi_terms_usage": { + "type": "number" } }, - "required": true + "required": [ + "boxplot_usage", + "cumulative_cardinality_usage", + "string_stats_usage", + "top_metrics_usage", + "t_test_usage", + "moving_percentiles_usage", + "normalize_usage", + "rate_usage" + ] }, - "indices.analyze": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "analyzer": { - "description": "The name of the analyzer that should be applied to the provided `text`.\nThis could be a built-in analyzer, or an analyzer that’s been configured in the index.", - "type": "string" - }, - "attributes": { - "description": "Array of token attributes used to filter the output of the `explain` parameter.", - "type": "array", - "items": { - "type": "string" - } - }, - "char_filter": { - "description": "Array of character filters used to preprocess characters before the tokenizer.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.CharFilter" - } - }, - "explain": { - "description": "If `true`, the response includes token attributes and additional details.", - "type": "boolean" - }, - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "filter": { - "description": "Array of token filters used to apply after the tokenizer.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.TokenFilter" - } - }, - "normalizer": { - "description": "Normalizer to use to convert text into a single token.", - "type": "string" - }, - "text": { - "$ref": "#/components/schemas/indices.analyze.TextToAnalyze" - }, - "tokenizer": { - "$ref": "#/components/schemas/_types.analysis.Tokenizer" - } + "xpack.usage.Archive": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "indices_count": { + "type": "number" } }, - "examples": { - "indicesAnalyzeRequestExample1": { - "summary": "No index specified", - "description": "You can apply any of the built-in analyzers to the text string without specifying an index.", - "value": "{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" - }, - "indicesAnalyzeRequestExample2": { - "summary": "An array of text strings", - "description": "If the text parameter is provided as array of strings, it is analyzed as a multi-value field.", - "value": "{\n \"analyzer\": \"standard\",\n \"text\": [\n \"this is a test\",\n \"the second text\"\n ]\n}" - }, - "indicesAnalyzeRequestExample3": { - "summary": "Custom analyzer example 1", - "description": "You can test a custom transient analyzer built from tokenizers, token filters, and char filters. Token filters use the filter parameter.", - "value": "{\n \"tokenizer\": \"keyword\",\n \"filter\": [\n \"lowercase\"\n ],\n \"char_filter\": [\n \"html_strip\"\n ],\n \"text\": \"this is a test\"\n}" - }, - "indicesAnalyzeRequestExample4": { - "summary": "Custom analyzer example 2", - "description": "Custom tokenizers, token filters, and character filters can be specified in the request body.", - "value": "{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n {\n \"type\": \"stop\",\n \"stopwords\": [\n \"a\",\n \"is\",\n \"this\"\n ]\n }\n ],\n \"text\": \"this is a test\"\n}" - }, - "indicesAnalyzeRequestExample5": { - "summary": "Derive analyzer from field mapping", - "description": "Run `GET /analyze_sample/_analyze` to run an analysis on the text using the default index analyzer associated with the `analyze_sample` index. Alternatively, the analyzer can be derived based on a field mapping.", - "value": "{\n \"field\": \"obj1.field1\",\n \"text\": \"this is a test\"\n}" - }, - "indicesAnalyzeRequestExample6": { - "summary": "Normalizer", - "description": "Run `GET /analyze_sample/_analyze` and supply a normalizer for a keyword field if there is a normalizer associated with the specified index.", - "value": "{\n \"normalizer\": \"my_normalizer\",\n \"text\": \"BaR\"\n}" + "required": [ + "indices_count" + ] + } + ] + }, + "xpack.usage.Watcher": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "execution": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.WatcherActions" + } + ] }, - "indicesAnalyzeRequestExample7": { - "summary": "Explain analysis", - "description": "If you want to get more advanced details, set `explain` to `true`. It will output all token attributes for each token. You can filter token attributes you want to output by setting the `attributes` option. NOTE: The format of the additional detail information is labelled as experimental in Lucene and it may change in the future.\n", - "value": "{\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"snowball\"\n ],\n \"text\": \"detailed output\",\n \"explain\": true,\n \"attributes\": [\n \"keyword\"\n ]\n}" - } - } - } - } - }, - "indices.clone": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aliases": { - "description": "Aliases for the resulting index.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" + "watch": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.WatcherWatch" } - }, - "settings": { - "description": "Configuration options for the target index.", - "type": "object", - "additionalProperties": { - "type": "object" + ] + }, + "count": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Counter" } - } + ] } }, - "examples": { - "indicesCloneRequestExample1": { - "summary": "Clone an existing index.", - "description": "Clone `my_source_index` into a new index called `my_target_index` with `POST /my_source_index/_clone/my_target_index`. The API accepts `settings` and `aliases` parameters for the target index.\n", - "value": "{\n \"settings\": {\n \"index.number_of_shards\": 5\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}" - } - } + "required": [ + "execution", + "watch", + "count" + ] } - } + ] }, - "indices.create_from": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/indices.create_from.CreateFrom" + "xpack.usage.WatcherActions": { + "type": "object", + "properties": { + "actions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.WatcherActionTotals" } } }, - "required": true - }, - "indices.put_alias": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "index_routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "is_write_index": { - "description": "If `true`, sets the write index or data stream for the alias.\nIf an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.\nIf an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.\nData stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.", - "type": "boolean" - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "search_routing": { - "$ref": "#/components/schemas/_types.Routing" - } - } - }, - "examples": { - "indicesPutAliasRequestExample1": { - "value": "{\n \"actions\": [\n {\n \"add\": {\n \"index\": \"my-data-stream\",\n \"alias\": \"my-alias\"\n }\n }\n ]\n}" - } - } - } - } + "required": [ + "actions" + ] }, - "indices.put_index_template": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index_patterns": { - "$ref": "#/components/schemas/_types.Indices" - }, - "composed_of": { - "description": "An ordered list of component template names.\nComponent templates are merged in the order specified, meaning that the last component template specified has the highest precedence.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Name" - } - }, - "template": { - "$ref": "#/components/schemas/indices.put_index_template.IndexTemplateMapping" - }, - "data_stream": { - "$ref": "#/components/schemas/indices._types.DataStreamVisibility" - }, - "priority": { - "description": "Priority to determine index template precedence when a new data stream or index is created.\nThe index template with the highest priority is chosen.\nIf no priority is specified the template is treated as though it is of priority 0 (lowest priority).\nThis number is not automatically generated by Elasticsearch.", - "type": "number" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "allow_auto_create": { - "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf 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`.\nIf set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.", - "type": "boolean" - }, - "ignore_missing_component_templates": { - "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", - "type": "array", - "items": { - "type": "string" - } - }, - "deprecated": { - "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", - "type": "boolean" - } + "xpack.usage.WatcherActionTotals": { + "type": "object", + "properties": { + "total": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Duration" } - }, - "examples": { - "IndicesPutIndexTemplateRequestExample1": { - "summary": "Create a template", - "value": "{\n \"index_patterns\" : [\"template*\"],\n \"priority\" : 1,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 2\n }\n }\n}" - }, - "IndicesPutIndexTemplateRequestExample2": { - "summary": "Create a template with aliases", - "description": "You can include index aliases in an index template.\nDuring index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", - "value": "{\n \"index_patterns\": [\n \"template*\"\n ],\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n }\n}" + ] + }, + "total_time_in_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" } - } + ] } }, - "required": true + "required": [ + "total", + "total_time_in_ms" + ] }, - "indices.put_mapping": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "date_detection": { - "description": "Controls whether dynamic date detection is enabled.", - "type": "boolean" - }, - "dynamic": { - "$ref": "#/components/schemas/_types.mapping.DynamicMapping" - }, - "dynamic_date_formats": { - "description": "If date detection is enabled then new string fields are checked\nagainst 'dynamic_date_formats' and if the value matches then\na new date field is added instead of string.", - "type": "array", - "items": { - "type": "string" - } - }, - "dynamic_templates": { - "description": "Specify dynamic templates for the mapping.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.DynamicTemplate" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "_field_names": { - "$ref": "#/components/schemas/_types.mapping.FieldNamesField" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "numeric_detection": { - "description": "Automatically map strings into numeric data types for all fields.", - "type": "boolean" - }, - "properties": { - "description": "Mapping for a field. For new fields, this mapping can include:\n\n- Field name\n- Field data type\n- Mapping parameters", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping.Property" - } - }, - "_routing": { - "$ref": "#/components/schemas/_types.mapping.RoutingField" - }, - "_source": { - "$ref": "#/components/schemas/_types.mapping.SourceField" - }, - "runtime": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - } - } - }, - "examples": { - "indicesPutMappingRequestExample1": { - "summary": "Update multiple targets", - "description": "The update mapping API can be applied to multiple data streams or indices with a single request. For example, run `PUT /my-index-000001,my-index-000002/_mapping` to update mappings for the `my-index-000001` and `my-index-000002` indices at the same time.\n", - "value": "{\n \"properties\": {\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n}" - } + "xpack.usage.WatcherWatch": { + "type": "object", + "properties": { + "input": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.Counter" + } + }, + "condition": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.Counter" + } + }, + "action": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.Counter" } + }, + "trigger": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.WatcherWatchTrigger" + } + ] } }, - "required": true + "required": [ + "input", + "trigger" + ] }, - "indices.put_settings": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - }, - "examples": { - "IndicesPutSettingsRequestExample1": { - "summary": "Change a dynamic index setting", - "value": "{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}" - }, - "indicesPutSettingsRequestExample2": { - "summary": "Reset an index setting", - "description": "To revert a setting to the default value, use `null`.", - "value": "{\n \"index\" : {\n \"refresh_interval\" : null\n }\n}" - }, - "indicesPutSettingsRequestExample3": { - "summary": "Update index analysis", - "description": "To add an analyzer, you must close the index, define the analyzer, then reopen the index.", - "value": "{\n \"analysis\" : {\n \"analyzer\":{\n \"content\":{\n \"type\":\"custom\",\n \"tokenizer\":\"whitespace\"\n }\n }\n }\n}\n\nPOST /my-index-000001/_open" - } - } + "xpack.usage.Counter": { + "type": "object", + "properties": { + "active": { + "type": "number" + }, + "total": { + "type": "number" } }, - "required": true + "required": [ + "active", + "total" + ] }, - "indices.put_template": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aliases": { - "description": "Aliases for the index.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" - } - }, - "index_patterns": { - "description": "Array of wildcard expressions used to match the names\nof indices during creation.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" - }, - "order": { - "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", - "type": "number" - }, - "settings": { - "$ref": "#/components/schemas/indices._types.IndexSettings" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - } + "xpack.usage.WatcherWatchTrigger": { + "type": "object", + "properties": { + "schedule": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.WatcherWatchTriggerSchedule" } - }, - "examples": { - "indicesPutTemplateRequestExample1": { - "summary": "Create an index template", - "value": "{\n \"index_patterns\": [\n \"te*\",\n \"bar*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n }\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n}" - }, - "indicesPutTemplateRequestExample2": { - "summary": "Create an index template with aliases", - "description": "You can include index aliases in an index template. During index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.\n", - "value": "{\n \"index_patterns\": [\n \"te*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n}" + ] + }, + "_all": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Counter" } - } + ] } }, - "required": true + "required": [ + "_all" + ] }, - "indices.rollover": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aliases": { - "description": "Aliases for the target index.\nData streams do not support this parameter.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" + "xpack.usage.WatcherWatchTriggerSchedule": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Counter" + }, + { + "type": "object", + "properties": { + "cron": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Counter" } - }, - "conditions": { - "$ref": "#/components/schemas/indices.rollover.RolloverConditions" - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" - }, - "settings": { - "description": "Configuration options for the index.\nData streams do not support this parameter.", - "type": "object", - "additionalProperties": { - "type": "object" + ] + }, + "_all": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Counter" } - } + ] } }, - "examples": { - "indicesRolloverRequestExample1": { - "summary": "Create a new index for a data stream.", - "value": "{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n }\n}" - } - } + "required": [ + "cron", + "_all" + ] } - } + ] }, - "indices.shrink": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aliases": { - "description": "The key is the alias name.\nIndex alias names support date math.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" - } - }, - "settings": { - "description": "Configuration options for the target index.", - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "xpack.usage.Ccr": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "auto_follow_patterns_count": { + "type": "number" + }, + "follower_indices_count": { + "type": "number" } }, - "examples": { - "indicesShrinkRequestExample1": { - "summary": "Shrink an existing index into a new index with fewer primary shards.", - "value": "{\n \"settings\": {\n \"index.routing.allocation.require._name\": null,\n \"index.blocks.write\": null\n }\n}" - } - } + "required": [ + "auto_follow_patterns_count", + "follower_indices_count" + ] } - } + ] }, - "indices.simulate_template": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "allow_auto_create": { - "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf 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`.\nIf set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.", - "type": "boolean" - }, - "index_patterns": { - "$ref": "#/components/schemas/_types.Indices" - }, - "composed_of": { - "description": "An ordered list of component template names.\nComponent templates are merged in the order specified, meaning that the last component template specified has the highest precedence.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Name" - } - }, - "template": { - "$ref": "#/components/schemas/indices.put_index_template.IndexTemplateMapping" - }, - "data_stream": { - "$ref": "#/components/schemas/indices._types.DataStreamVisibility" - }, - "priority": { - "description": "Priority to determine index template precedence when a new data stream or index is created.\nThe index template with the highest priority is chosen.\nIf no priority is specified the template is treated as though it is of priority 0 (lowest priority).\nThis number is not automatically generated by Elasticsearch.", - "type": "number" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "_meta": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "ignore_missing_component_templates": { - "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", - "type": "array", - "items": { - "type": "string" - } - }, - "deprecated": { - "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", - "type": "boolean" - } + "xpack.usage.DataStreams": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "data_streams": { + "type": "number" + }, + "indices_count": { + "type": "number" } }, - "examples": { - "indicesSimulateTemplateRequestExample1": { - "description": "To see what settings will be applied by a template before you add it to the cluster, you can pass a template configuration in the request body. The specified template is used for the simulation if it has a higher priority than existing templates.\n", - "value": "{\n \"index_patterns\": [\"my-index-*\"],\n \"composed_of\": [\"ct2\"],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n}" - } - } + "required": [ + "data_streams", + "indices_count" + ] } - } + ] }, - "indices.split": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aliases": { - "description": "Aliases for the resulting index.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.Alias" + "xpack.usage.DataTiers": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "data_warm": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" } - }, - "settings": { - "description": "Configuration options for the target index.", - "type": "object", - "additionalProperties": { - "type": "object" + ] + }, + "data_frozen": { + "x-state": "Generally available; Added in 7.13.0", + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" } - } + ] + }, + "data_cold": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" + } + ] + }, + "data_content": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" + } + ] + }, + "data_hot": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.DataTierPhaseStatistics" + } + ] } }, - "examples": { - "indicesSplitRequestExample1": { - "description": "Split an existing index into a new index with more primary shards.", - "value": "{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}" - } - } - } - } - }, - "indices.validate_query": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - } - } - } - } - }, - "inference.inference": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "description": "The query input, which is required only for the `rerank` task.\nIt is not required for other tasks.", - "type": "string" - }, - "input": { - "description": "The text on which you want to perform the inference task.\nIt can be a single string or an array.\n\n> info\n> Inference endpoints for the `completion` task type currently only support a single string as input.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types.TaskSettings" - } - }, - "required": [ - "input" - ] - } - } - } - }, - "inference.put": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" - } + "required": [ + "data_warm", + "data_cold", + "data_content", + "data_hot" + ] } - }, - "required": true + ] }, - "inference.update": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpoint" - } + "xpack.usage.DataTierPhaseStatistics": { + "type": "object", + "properties": { + "node_count": { + "type": "number" + }, + "index_count": { + "type": "number" + }, + "total_shard_count": { + "type": "number" + }, + "primary_shard_count": { + "type": "number" + }, + "doc_count": { + "type": "number" + }, + "total_size_bytes": { + "type": "number" + }, + "primary_size_bytes": { + "type": "number" + }, + "primary_shard_size_avg_bytes": { + "type": "number" + }, + "primary_shard_size_median_bytes": { + "type": "number" + }, + "primary_shard_size_mad_bytes": { + "type": "number" } }, - "required": true + "required": [ + "node_count", + "index_count", + "total_shard_count", + "primary_shard_count", + "doc_count", + "total_size_bytes", + "primary_size_bytes", + "primary_shard_size_avg_bytes", + "primary_shard_size_median_bytes", + "primary_shard_size_mad_bytes" + ] }, - "ingest.simulate": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "description": "Sample documents to test in the pipeline.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.Document" + "xpack.usage.Eql": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "features": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.EqlFeatures" } - }, - "pipeline": { - "$ref": "#/components/schemas/ingest._types.Pipeline" - } + ] }, - "required": [ - "docs" - ] - }, - "examples": { - "SimulatePipelineRequestExample1": { - "summary": "Run an ingest pipeline against a set of provided documents.", - "description": "You can specify the used pipeline either in the request body or as a path parameter.", - "value": "{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" - } - } - } - }, - "required": true - }, - "license.post": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "license": { - "$ref": "#/components/schemas/license._types.License" - }, - "licenses": { - "description": "A sequence of one or more JSON documents containing the license information.", - "type": "array", - "items": { - "$ref": "#/components/schemas/license._types.License" - } + "queries": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.Query" } } }, - "examples": { - "PostLicenseRequestExample1": { - "description": "Run `PUT _license` to update to a basic license. NOTE: These values are invalid; you must substitute the appropriate contents from your license file.\n", - "value": "{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}" - } - } + "required": [ + "features", + "queries" + ] } - } + ] }, - "mget": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "description": "The documents you want to retrieve. Required if no index is specified in the request URI.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.mget.Operation" - } - }, - "ids": { - "$ref": "#/components/schemas/_types.Ids" - } + "xpack.usage.EqlFeatures": { + "type": "object", + "properties": { + "join": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - }, - "examples": { - "MultiGetRequestExample1": { - "summary": "Get documents by ID", - "description": "Run `GET /my-index-000001/_mget`. When you specify an index in the request URI, only the document IDs are required in the request body.\n", - "value": "{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" - }, - "MultiGetRequestExample2": { - "summary": "Filter source fields", - "description": "Run `GET /_mget`. This request sets `_source` to `false` for document 1 to exclude the source entirely. It retrieves `field3` and `field4` from document 2. It retrieves the `user` field from document 3 but filters out the `user.location` field.\n", - "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": false\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [ \"field3\", \"field4\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [ \"user\" ],\n \"exclude\": [ \"user.location\" ]\n }\n }\n ]\n}" - }, - "MultiGetRequestExample3": { - "summary": "Get stored fields", - "description": "Run `GET /_mget`. This request retrieves `field1` and `field2` from document 1 and `field3` and `field4` from document 2.\n", - "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [ \"field1\", \"field2\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [ \"field3\", \"field4\" ]\n }\n ]\n}" - }, - "MultiGetRequestExample4": { - "summary": "Document routing", - "description": "Run `GET /_mget?routing=key1`. If routing is used during indexing, you need to specify the routing value to retrieve documents. This request fetches `test/_doc/2` from the shard corresponding to routing key `key1`. It fetches `test/_doc/1` from the shard corresponding to routing key `key2`.\n", - "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ]\n}" + ] + }, + "joins": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.EqlFeaturesJoin" } - } + ] + }, + "keys": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.EqlFeaturesKeys" + } + ] + }, + "event": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "pipes": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.EqlFeaturesPipes" + } + ] + }, + "sequence": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "sequences": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.EqlFeaturesSequences" + } + ] } }, - "required": true + "required": [ + "join", + "joins", + "keys", + "event", + "pipes", + "sequence", + "sequences" + ] }, - "ml.delete_expired_data": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "requests_per_second": { - "description": "The desired requests per second for the deletion processes. The default\nbehavior is no throttling.", - "type": "number" - }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" - } + "xpack.usage.EqlFeaturesJoin": { + "type": "object", + "properties": { + "join_queries_two": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } - } - } - }, - "ml.explain_data_frame_analytics": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "source": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource" - }, - "dest": { - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination" - }, - "analysis": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer" - }, - "description": { - "description": "A description of the job.", - "type": "string" - }, - "model_memory_limit": { - "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try to\ncreate data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", - "type": "string" - }, - "max_num_threads": { - "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", - "type": "number" - }, - "analyzed_fields": { - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields" - }, - "allow_lazy_start": { - "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", - "type": "boolean" - } + ] + }, + "join_queries_three": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - }, - "examples": { - "MlExplainDataFrameAnalyticsRequestExample1": { - "description": "Run `POST _ml/data_frame/analytics/_explain` to explain a data frame analytics job configuration.", - "value": "{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + ] + }, + "join_until": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } - } - } - }, - "ml.get_buckets": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "anomaly_score": { - "description": "Refer to the description for the `anomaly_score` query parameter.", - "type": "number" - }, - "desc": { - "description": "Refer to the description for the `desc` query parameter.", - "type": "boolean" - }, - "end": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "exclude_interim": { - "description": "Refer to the description for the `exclude_interim` query parameter.", - "type": "boolean" - }, - "expand": { - "description": "Refer to the description for the `expand` query parameter.", - "type": "boolean" - }, - "page": { - "$ref": "#/components/schemas/ml._types.Page" - }, - "sort": { - "$ref": "#/components/schemas/_types.Field" - }, - "start": { - "$ref": "#/components/schemas/_types.DateTime" - } + ] + }, + "join_queries_five_or_more": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } - } - } - }, - "ml.get_calendars": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "page": { - "$ref": "#/components/schemas/ml._types.Page" - } + ] + }, + "join_queries_four": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } + ] } - } + }, + "required": [ + "join_queries_two", + "join_queries_three", + "join_until", + "join_queries_five_or_more", + "join_queries_four" + ] }, - "ml.get_categories": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "page": { - "$ref": "#/components/schemas/ml._types.Page" - } + "xpack.usage.EqlFeaturesKeys": { + "type": "object", + "properties": { + "join_keys_two": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } - } - } - }, - "ml.get_influencers": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "page": { - "$ref": "#/components/schemas/ml._types.Page" - } + ] + }, + "join_keys_one": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } - } - } - }, - "ml.get_model_snapshots": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "desc": { - "description": "Refer to the description for the `desc` query parameter.", - "type": "boolean" - }, - "end": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "page": { - "$ref": "#/components/schemas/ml._types.Page" - }, - "sort": { - "$ref": "#/components/schemas/_types.Field" - }, - "start": { - "$ref": "#/components/schemas/_types.DateTime" - } + ] + }, + "join_keys_three": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } - } - } - }, - "ml.get_overall_buckets": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "allow_no_match": { - "description": "Refer to the description for the `allow_no_match` query parameter.", - "type": "boolean" - }, - "bucket_span": { - "$ref": "#/components/schemas/_types.Duration" - }, - "end": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "exclude_interim": { - "description": "Refer to the description for the `exclude_interim` query parameter.", - "type": "boolean" - }, - "overall_score": { - "description": "Refer to the description for the `overall_score` query parameter.", - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "start": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "top_n": { - "description": "Refer to the description for the `top_n` query parameter.", - "type": "number" - } + ] + }, + "join_keys_five_or_more": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } - } - } - }, - "ml.get_records": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "desc": { - "description": "Refer to the description for the `desc` query parameter.", - "type": "boolean" - }, - "end": { - "$ref": "#/components/schemas/_types.DateTime" - }, - "exclude_interim": { - "description": "Refer to the description for the `exclude_interim` query parameter.", - "type": "boolean" - }, - "page": { - "$ref": "#/components/schemas/ml._types.Page" - }, - "record_score": { - "description": "Refer to the description for the `record_score` query parameter.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Field" - }, - "start": { - "$ref": "#/components/schemas/_types.DateTime" - } + ] + }, + "join_keys_four": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } + ] } - } + }, + "required": [ + "join_keys_two", + "join_keys_one", + "join_keys_three", + "join_keys_five_or_more", + "join_keys_four" + ] }, - "ml.preview_data_frame_analytics": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "config": { - "$ref": "#/components/schemas/ml.preview_data_frame_analytics.DataframePreviewConfig" - } + "xpack.usage.EqlFeaturesPipes": { + "type": "object", + "properties": { + "pipe_tail": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } - } - } - }, - "ml.preview_datafeed": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "datafeed_config": { - "$ref": "#/components/schemas/ml._types.DatafeedConfig" - }, - "job_config": { - "$ref": "#/components/schemas/ml._types.JobConfig" - } + ] + }, + "pipe_head": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } + ] } - } + }, + "required": [ + "pipe_tail", + "pipe_head" + ] }, - "msearch": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.msearch.RequestItem" + "xpack.usage.EqlFeaturesSequences": { + "type": "object", + "properties": { + "sequence_queries_three": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" } - } + ] + }, + "sequence_queries_four": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "sequence_queries_two": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "sequence_until": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "sequence_queries_five_or_more": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] + }, + "sequence_maxspan": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.uint" + } + ] } }, - "required": true + "required": [ + "sequence_queries_three", + "sequence_queries_four", + "sequence_queries_two", + "sequence_until", + "sequence_queries_five_or_more", + "sequence_maxspan" + ] }, - "msearch_template": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.msearch_template.RequestItem" + "xpack.usage.Query": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "paging": { + "type": "number" + }, + "total": { + "type": "number" + } + } + }, + "xpack.usage.Flattened": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "field_count": { + "type": "number" } }, - "examples": { - "MultiSearchTemplateRequestExample1": { - "description": "Run `GET my-index/_msearch/template` to run multiple templated searches.", - "value": "{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" - } - } + "required": [ + "field_count" + ] } - }, - "required": true + ] }, - "mtermvectors": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "description": "An array of existing or artificial documents.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.mtermvectors.Operation" - } - }, - "ids": { - "description": "A simplified syntax to specify documents by their ID if they're in the same index.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" + "xpack.usage.HealthStatistics": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "invocations": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Invocations" } - } + ] } }, - "examples": { - "MultiTermVectorsRequestExample1": { - "summary": "Get multiple term vectors", - "description": "Run `POST /my-index-000001/_mtermvectors`. When you specify an index in the request URI, the index does not need to be specified for each documents in the request body.\n", - "value": "{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" - }, - "MultiTermVectorsRequestExample2": { - "summary": "Simplified syntax", - "description": "Run `POST /my-index-000001/_mtermvectors`. If all requested documents are in same index and the parameters are the same, you can use a simplified syntax.\n", - "value": "{\n \"ids\": [ \"1\", \"2\" ],\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n}" - }, - "MultiTermVectorsRequestExample3": { - "summary": "Artificial documents", - "description": "Run `POST /_mtermvectors` to generate term vectors for artificial documents provided in the body of the request. The mapping used is determined by the specified `_index`.\n", - "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"Another test ...\"\n }\n }\n ]\n}" - } - } + "required": [ + "invocations" + ] } - } + ] }, - "nodes.reload_secure_settings": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "secure_settings_password": { - "$ref": "#/components/schemas/_types.Password" - } - } - }, - "examples": { - "ReloadSecureSettingsRequestExample1": { - "description": "Run `POST _nodes/reload_secure_settings` to reload the keystore on nodes in the cluster.", - "value": "{\n \"secure_settings_password\": \"keystore-password\"\n}" - } - } + "xpack.usage.Invocations": { + "type": "object", + "properties": { + "total": { + "type": "number" } - } + }, + "required": [ + "total" + ] }, - "put_script": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "script": { - "$ref": "#/components/schemas/_types.StoredScript" - } - }, - "required": [ - "script" - ] - }, - "examples": { - "PutScriptRequestExample1": { - "summary": "Create a search template", - "description": "Run `PUT _scripts/my-search-template` to create a search template.\n", - "value": "{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" - }, - "PutScriptRequestExample2": { - "summary": "Create a stored script", - "description": "Run `PUT _scripts/my-stored-script` to create a stored script.\n", - "value": "{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n }\n}" - } + "xpack.usage.Ilm": { + "type": "object", + "properties": { + "policy_count": { + "type": "number" + }, + "policy_stats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/xpack.usage.IlmPolicyStatistics" } } }, - "required": true + "required": [ + "policy_count", + "policy_stats" + ] }, - "rank_eval": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "requests": { - "description": "A set of typical search requests, together with their provided ratings.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalRequestItem" - } - }, - "metric": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetric" - } - }, - "required": [ - "requests" - ] - } + "xpack.usage.IlmPolicyStatistics": { + "type": "object", + "properties": { + "indices_managed": { + "type": "number" + }, + "phases": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Phases" + } + ] } }, - "required": true + "required": [ + "indices_managed", + "phases" + ] }, - "render_search_template": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "file": { - "type": "string" - }, - "params": { - "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "source": { - "$ref": "#/components/schemas/_types.ScriptSource" - } + "xpack.usage.Phases": { + "type": "object", + "properties": { + "cold": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Phase" + } + ] + }, + "delete": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Phase" } - }, - "examples": { - "RenderSearchTemplateRequestExample1": { - "description": "Run `POST _render/template`", - "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + ] + }, + "frozen": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Phase" } - } + ] + }, + "hot": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Phase" + } + ] + }, + "warm": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Phase" + } + ] } } }, - "rollup.rollup_search": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aggregations": { - "externalDocs": { - "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-aggregation-limitations" - }, - "description": "Specifies aggregations.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "size": { - "description": "Must be zero if set, as rollups work on pre-aggregated data.", - "type": "number" - } - } - }, - "examples": { - "RollupSearchRequestExample1": { - "description": "Search rolled up data stored in `sensor_rollup` with `GET /sensor_rollup/_rollup_search`", - "value": "{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}" - } + "xpack.usage.Phase": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" } + }, + "min_age": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + ] } }, - "required": true + "required": [ + "actions", + "min_age" + ] }, - "scripts_painless_execute": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "context": { - "$ref": "#/components/schemas/_global.scripts_painless_execute.PainlessContext" - }, - "context_setup": { - "$ref": "#/components/schemas/_global.scripts_painless_execute.PainlessContextSetup" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" + "xpack.usage.MachineLearning": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "datafeeds": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.Datafeed" } - } - }, - "examples": { - "ExecutePainlessScriptRequestExample1": { - "summary": "Test context", - "description": "Run `POST /_scripts/painless/_execute`. The `painless_test` context is the default context. It runs scripts without additional parameters. The only variable that is available is `params`, which can be used to access user defined values. The result of the script is always converted to a string.\n", - "value": "{\n \"script\": {\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100.0,\n \"total\": 1000.0\n }\n }\n}" }, - "ExecutePainlessScriptRequestExample2": { - "summary": "Filter context", - "description": "Run `POST /_scripts/painless/_execute` with a `filter` context. It treats scripts as if they were run inside a script query. For testing purposes, a document must be provided so that it will be temporarily indexed in-memory and is accessible from the script. More precisely, the `_source`, stored fields, and doc values of such a document are available to the script being tested.\n", - "value": "{\n \"script\": {\n \"source\": \"doc['field'].value.length() <= params.max_length\",\n \"params\": {\n \"max_length\": 4\n }\n },\n \"context\": \"filter\",\n \"context_setup\": {\n \"index\": \"my-index-000001\",\n \"document\": {\n \"field\": \"four\"\n }\n }\n}" - }, - "ExecutePainlessScriptRequestExample3": { - "summary": "Score context", - "description": "Run `POST /_scripts/painless/_execute` with a `score` context. It treats scripts as if they were run inside a `script_score` function in a `function_score` query.\n", - "value": "{\n \"script\": {\n \"source\": \"doc['rank'].value / params.max_rank\",\n \"params\": {\n \"max_rank\": 5.0\n }\n },\n \"context\": \"score\",\n \"context_setup\": {\n \"index\": \"my-index-000001\",\n \"document\": {\n \"rank\": 4\n }\n }\n}" - } - } - } - } - }, - "scroll": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scroll": { - "$ref": "#/components/schemas/_types.Duration" - }, - "scroll_id": { - "$ref": "#/components/schemas/_types.ScrollId" + "jobs": { + "description": "Job usage statistics. The `_all` entry is always present and gathers statistics for all jobs.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.JobUsage" } }, - "required": [ - "scroll_id" - ] - }, - "examples": { - "ScrollRequestExample1": { - "description": "Run `GET /_search/scroll` to get the next batch of results for a scrolling search.", - "value": "{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" - } - } - } - } - }, - "search": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aggregations": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/aggregations" - }, - "description": "Defines the aggregations that are run as part of the search request.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types.FieldCollapse" - }, - "explain": { - "description": "If `true`, the request returns detailed information about score computation as part of a hit.", - "type": "boolean" - }, - "ext": { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "from": { - "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types.Highlight" - }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types.TrackHits" - }, - "indices_boost": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores" - }, - "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "docvalue_fields": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields" - }, - "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" - } - }, - "knn": { - "externalDocs": { - "url": "https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn" - }, - "description": "The approximate kNN search to run.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.KnnSearch" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.KnnSearch" - } - } - ] - }, - "rank": { - "$ref": "#/components/schemas/_types.RankContainer" - }, - "min_score": { - "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in search results and results collected by aggregations.", - "type": "number" - }, - "post_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "profile": { - "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", - "type": "boolean" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "rescore": { - "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.Rescore" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Rescore" - } - } - ] - }, - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "script_fields": { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" - }, - "size": { - "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", - "type": "number" - }, - "slice": { - "$ref": "#/components/schemas/_types.SlicedScroll" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "fields": { - "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FieldAndFormat" + "node_count": { + "type": "number" + }, + "data_frame_analytics_jobs": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobs" } - }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types.Suggester" - }, - "terminate_after": { - "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", - "type": "number" - }, - "timeout": { - "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", - "type": "string" - }, - "track_scores": { - "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", - "type": "boolean" - }, - "version": { - "description": "If `true`, the request returns the document version as part of a hit.", - "type": "boolean" - }, - "seq_no_primary_term": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control" - }, - "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", - "type": "boolean" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "pit": { - "$ref": "#/components/schemas/_global.search._types.PointInTimeReference" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "stats": { - "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", - "type": "array", - "items": { - "type": "string" + ] + }, + "inference": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlInference" } - } + ] } }, - "examples": { - "SearchRequestExample1": { - "summary": "A simple term search", - "description": "Run `GET /my-index-000001/_search?from=40&size=20` to run a search.\n", - "value": "{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" - }, - "SearchRequestExample2": { - "summary": "A point in time search", - "description": "Run `POST /_search` to run a point in time search. The `id` parameter tells Elasticsearch to run the request using contexts from this open point in time. The `keep_alive` parameter tells Elasticsearch how long it should extend the time to live of the point in time.\n", - "value": "{\n \"size\": 100, \n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\", \n \"keep_alive\": \"1m\" \n }\n}" - }, - "SearchRequestExample3": { - "summary": "Search slicing", - "description": "When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently. The result from running the first `GET /_search` request returns documents belonging to the first slice (`id: 0`). If you run a second request with `id` set to `1', it returns documents in the second slice. Since the maximum number of slices is set to `2`, the union of the results is equivalent to the results of a point-in-time search without slicing.\n", - "value": "{\n \"slice\": {\n \"id\": 0, \n \"max\": 2 \n },\n \"query\": {\n \"match\": {\n \"message\": \"foo\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n }\n}" - } - } + "required": [ + "datafeeds", + "jobs", + "node_count", + "data_frame_analytics_jobs", + "inference" + ] } - } + ] }, - "search_application.search": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "params": { - "description": "Query parameters specific to this request, which will override any defaults specified in the template.", - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - }, - "examples": { - "SearchApplicationsSearchRequestExample1": { - "description": "Use `POST _application/search_application/my-app/_search` to run a search against a search application called `my-app` that uses a search template.", - "value": "{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\", \"boost\": 1}\n ]\n }\n}" - } - } + "xpack.usage.Datafeed": { + "type": "object", + "properties": { + "count": { + "type": "number" } - } + }, + "required": [ + "count" + ] }, - "search_mvt": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aggs": { - "description": "Sub-aggregations for the geotile_grid.\n\nIt supports the following aggregation types:\n\n- `avg`\n- `boxplot`\n- `cardinality`\n- `extended stats`\n- `max`\n- `median absolute deviation`\n- `min`\n- `percentile`\n- `percentile-rank`\n- `stats`\n- `sum`\n- `value count`\n\nThe aggregation names can't start with `_mvt_`. The `_mvt_` prefix is reserved for internal aggregations.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations.AggregationContainer" - } - }, - "buffer": { - "description": "The size, in pixels, of a clipping buffer outside the tile. This allows renderers\nto avoid outline artifacts from geometries that extend past the extent of the tile.", - "type": "number" - }, - "exact_bounds": { - "description": "If `false`, the meta layer's feature is the bounding box of the tile.\nIf `true`, the meta layer's feature is a bounding box resulting from a\n`geo_bounds` aggregation. The aggregation runs on values that intersect\nthe `//` tile with `wrap_longitude` set to `false`. The resulting\nbounding box may be larger than the vector tile.", - "type": "boolean" - }, - "extent": { - "description": "The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.", - "type": "number" - }, - "fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "grid_agg": { - "$ref": "#/components/schemas/_global.search_mvt._types.GridAggregationType" - }, - "grid_precision": { - "description": "Additional zoom levels available through the aggs layer. For example, if `` is `7`\nand `grid_precision` is `8`, you can zoom in up to level 15. Accepts 0-8. If 0, results\ndon't include the aggs layer.", - "type": "number" - }, - "grid_type": { - "$ref": "#/components/schemas/_global.search_mvt._types.GridType" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "size": { - "description": "The maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types.TrackHits" - }, - "with_labels": { - "description": "If `true`, the hits and aggs layers will contain additional point features representing\nsuggested label positions for the original features.\n\n* `Point` and `MultiPoint` features will have one of the points selected.\n* `Polygon` and `MultiPolygon` features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.\n* `LineString` features will likewise provide a roughly central point selected from the triangle-tree.\n* The aggregation results will provide one central point for each aggregation bucket.\n\nAll attributes from the original features will also be copied to the new label features.\nIn addition, the new features will be distinguishable using the tag `_mvt_label_position`.", - "type": "boolean" - } + "xpack.usage.JobUsage": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "created_by": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "detectors": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" } - }, - "examples": { - "SearchMvtRequestExample1": { - "description": "Run `GET museums/_mvt/location/13/4207/2692` to search an index for `location` values that intersect the `13/4207/2692` vector tile.\n", - "value": "{\n \"grid_agg\": \"geotile\",\n \"grid_precision\": 2,\n \"fields\": [\n \"name\",\n \"price\"\n ],\n \"query\": {\n \"term\": {\n \"included\": true\n }\n },\n \"aggs\": {\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n }\n}" + ] + }, + "forecasts": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlJobForecasts" } - } + ] + }, + "model_size": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" + } + ] } - } + }, + "required": [ + "count", + "created_by", + "detectors", + "forecasts", + "model_size" + ] }, - "search_template": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "explain": { - "description": "If `true`, returns detailed information about score calculation as part of each hit.\nIf you specify both this and the `explain` query parameter, the API uses only the query parameter.", - "type": "boolean" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "params": { - "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "profile": { - "description": "If `true`, the query execution is profiled.", - "type": "boolean" - }, - "source": { - "$ref": "#/components/schemas/_types.ScriptSource" - } + "xpack.usage.MlJobForecasts": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "forecasted_jobs": { + "type": "number" + } + }, + "required": [ + "total", + "forecasted_jobs" + ] + }, + "xpack.usage.MlDataFrameAnalyticsJobs": { + "type": "object", + "properties": { + "memory_usage": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobsMemory" } - }, - "examples": { - "SearchTemplateRequestExample1": { - "description": "Run `GET my-index/_search/template` to run a search with a search template.\n", - "value": "{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + ] + }, + "_all": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobsCount" } - } + ] + }, + "analysis_counts": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobsAnalysis" + } + ] + }, + "stopped": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlDataFrameAnalyticsJobsCount" + } + ] } }, - "required": true + "required": [ + "_all" + ] }, - "security.change_password": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "$ref": "#/components/schemas/_types.Password" - }, - "password_hash": { - "description": "A hash of the new password value. This must be produced using the same\nhashing algorithm as has been configured for password storage. For more details,\nsee the explanation of the `xpack.security.authc.password_hashing.algorithm`\nsetting.", - "type": "string" - } - } - }, - "examples": { - "SecurityChangePasswordRequestExample1": { - "description": "Run `POST /_security/user/jacknich/_password` to update the password for the `jacknich` user.\n", - "value": "{\n \"password\" : \"new-test-password\"\n}" + "xpack.usage.MlDataFrameAnalyticsJobsMemory": { + "type": "object", + "properties": { + "peak_usage_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" } - } + ] } }, - "required": true + "required": [ + "peak_usage_bytes" + ] }, - "security.create_api_key": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "expiration": { - "$ref": "#/components/schemas/_types.Duration" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - }, - "role_descriptors": { - "externalDocs": { - "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role" - }, - "description": "An array of role descriptors for this API key.\nWhen it is not specified or it is an empty array, the API key will have a point in time snapshot of permissions of the authenticated user.\nIf you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the authenticated user's permissions thereby limiting the access scope for API keys.\nThe structure of role descriptor is the same as the request for the create role API.\nFor more details, refer to the create or update roles API.\n\nNOTE: Due to the way in which this permission intersection is calculated, it is not possible to create an API key that is a child of another API key, unless the derived key is created without any privileges.\nIn this case, you must explicitly specify a role descriptor with no privileges.\nThe derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security._types.RoleDescriptor" - } - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - } + "xpack.usage.MlDataFrameAnalyticsJobsCount": { + "type": "object", + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ] + }, + "xpack.usage.MlDataFrameAnalyticsJobsAnalysis": { + "type": "object", + "properties": { + "classification": { + "type": "number" + }, + "outlier_detection": { + "type": "number" + }, + "regression": { + "type": "number" + } + } + }, + "xpack.usage.MlInference": { + "type": "object", + "properties": { + "ingest_processors": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.MlInferenceIngestProcessor" + } + }, + "trained_models": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlInferenceTrainedModels" } - }, - "examples": { - "SecurityCreateApiKeyRequestExample1": { - "description": "Run `POST /_security/api_key` to create an API key. If `expiration` is not provided, the API keys do not expire. If `role_descriptors` is not provided, the permissions of the authenticated user are applied.\n", - "value": "{\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\", \n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n}" + ] + }, + "deployments": { + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlInferenceDeployments" } - } + ] } }, - "required": true + "required": [ + "ingest_processors", + "trained_models" + ] }, - "security.has_privileges": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "application": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security.has_privileges.ApplicationPrivilegesCheck" - } - }, - "cluster": { - "description": "A list of the cluster privileges that you want to check.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ClusterPrivilege" - } - }, - "index": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security.has_privileges.IndexPrivilegesCheck" - } - } + "xpack.usage.MlInferenceIngestProcessor": { + "type": "object", + "properties": { + "num_docs_processed": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlInferenceIngestProcessorCount" } - }, - "examples": { - "SecurityHasPrivilegesRequestExample1": { - "description": "Run `GET /_security/user/_has_privileges` to check whether the current user has a specific set of cluster, index, and application privileges.", - "value": "{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + ] + }, + "pipelines": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlCounter" } - } + ] + }, + "num_failures": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlInferenceIngestProcessorCount" + } + ] + }, + "time_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlInferenceIngestProcessorCount" + } + ] } }, - "required": true + "required": [ + "num_docs_processed", + "pipelines", + "num_failures", + "time_ms" + ] }, - "security.has_privileges_user_profile": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "uids": { - "description": "A list of profile IDs. The privileges are checked for associated users of the profiles.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.UserProfileId" - } - }, - "privileges": { - "$ref": "#/components/schemas/security.has_privileges_user_profile.PrivilegesCheck" - } - }, - "required": [ - "uids", - "privileges" - ] - }, - "examples": { - "HasPrivilegesUserProfileRequestExample1": { - "description": "Run `POST /_security/profile/_has_privileges` to check whether the two users associated with the specified profiles have all the requested set of cluster, index, and application privileges.\n", - "value": "{\n \"uids\": [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n \"privileges\": {\n \"cluster\": [ \"monitor\", \"create_snapshot\", \"manage_ml\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"create_doc\"]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n }\n}" - } - } + "xpack.usage.MlInferenceIngestProcessorCount": { + "type": "object", + "properties": { + "max": { + "type": "number" + }, + "sum": { + "type": "number" + }, + "min": { + "type": "number" } }, - "required": true + "required": [ + "max", + "sum", + "min" + ] }, - "security.put_privileges": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.put_privileges.Actions" - } - } - }, - "examples": { - "SecurityPutPrivilegesRequestExample1": { - "summary": "Add a privilege", - "description": "Run `PUT /_security/privilege` to add a single application privilege. The wildcard (`*`) means that this privilege grants access to all actions that start with `data:read/`. Elasticsearch does not assign any meaning to these actions. However, if the request includes an application privilege such as `data:read/users` or `data:read/settings`, the has privileges API respects the use of a wildcard and returns `true`.\n", - "value": "{\n \"myapp\": {\n \"read\": {\n \"actions\": [ \n \"data:read/*\" , \n \"action:login\" ],\n \"metadata\": { \n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" - }, - "SecurityPutPrivilegesRequestExample2": { - "summary": "Add multiple privileges", - "description": "Run `PUT /_security/privilege` to add multiple application privileges.\n", - "value": "{\n \"app01\": {\n \"read\": {\n \"actions\": [ \"action:login\", \"data:read/*\" ]\n },\n \"write\": {\n \"actions\": [ \"action:login\", \"data:write/*\" ]\n }\n },\n \"app02\": {\n \"all\": {\n \"actions\": [ \"*\" ]\n }\n }\n}" - } - } + "xpack.usage.MlCounter": { + "type": "object", + "properties": { + "count": { + "type": "number" } }, - "required": true + "required": [ + "count" + ] }, - "security.put_role": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "applications": { - "description": "A list of application privilege entries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ApplicationPrivileges" - } - }, - "cluster": { - "description": "A list of cluster privileges. These privileges define the cluster-level actions for users with this role.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.ClusterPrivilege" - } - }, - "global": { - "description": "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.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "indices": { - "description": "A list of indices permissions entries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.IndicesPrivileges" - } - }, - "remote_indices": { - "description": "A list of remote indices permissions entries.\n\nNOTE: Remote indices are effective for remote clusters configured with the API key based model.\nThey have no effect for remote clusters configured with the certificate based model.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteIndicesPrivileges" - } - }, - "remote_cluster": { - "description": "A list of remote cluster permissions entries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RemoteClusterPrivileges" - } - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "run_as": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users" - }, - "description": "A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "description": "Optional description of the role descriptor", - "type": "string" - }, - "transient_metadata": { - "description": "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.", - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "xpack.usage.MlInferenceTrainedModels": { + "type": "object", + "properties": { + "estimated_operations": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" } - }, - "examples": { - "SecurityPutRoleRequestExample1": { - "summary": "Role example 1", - "description": "Run `POST /_security/role/my_admin_role` to create a role.", - "value": "{\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [ \"index1\", \"index2\" ],\n \"privileges\": [\"all\"],\n \"field_security\" : { // optional\n \"grant\" : [ \"title\", \"body\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\" // optional\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [ \"admin\", \"read\" ],\n \"resources\": [ \"*\" ]\n }\n ],\n \"run_as\": [ \"other_user\" ], // optional\n \"metadata\" : { // optional\n \"version\" : 1\n }\n}" - }, - "SecurityPutRoleRequestExample2": { - "summary": "Role example 2", - "description": "Run `POST /_security/role/cli_or_drivers_minimal` to configure a role that can run SQL in JDBC.", - "value": "{\n \"cluster\": [\"cluster:monitor/main\"],\n \"indices\": [\n {\n \"names\": [\"test\"],\n \"privileges\": [\"read\", \"indices:admin/get\"]\n }\n ]\n}" - }, - "SecurityPutRoleRequestExample3": { - "summary": "Role example 3", - "description": "Run `POST /_security/role/only_remote_access_role` to configure a role with remote indices and remote cluster privileges for a remote cluster.", - "value": "{\n \"remote_indices\": [\n {\n \"clusters\": [\"my_remote\"], \n \"names\": [\"logs*\"], \n \"privileges\": [\"read\", \"read_cross_cluster\", \"view_index_metadata\"] \n }\n ],\n \"remote_cluster\": [\n {\n \"clusters\": [\"my_remote\"], \n \"privileges\": [\"monitor_stats\"] \n }\n ]\n}" + ] + }, + "estimated_heap_memory_usage_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" } - } + ] + }, + "count": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlInferenceTrainedModelsCount" + } + ] + }, + "_all": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlCounter" + } + ] + }, + "model_size_bytes": { + "x-state": "Generally available; Added in 8.0.0", + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" + } + ] } }, - "required": true + "required": [ + "_all" + ] }, - "security.put_role_mapping": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "description": "Mappings that have `enabled` set to `false` are ignored when role mapping is performed.", - "type": "boolean" - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "roles": { - "description": "A list of role names that are granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", - "type": "array", - "items": { - "type": "string" - } - }, - "role_templates": { - "description": "A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RoleTemplate" - } - }, - "rules": { - "$ref": "#/components/schemas/security._types.RoleMappingRule" - }, - "run_as": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "examples": { - "SecurityPutRoleMappingRequestExample1": { - "summary": "Roles for all users", - "description": "Run `POST /_security/role_mapping/mapping1` to assign the `user` role to all users.\n", - "value": "{\n \"roles\": [ \"user\"],\n \"enabled\": true, \n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { \n \"version\" : 1\n }\n}" - }, - "SecurityPutRoleMappingRequestExample2": { - "summary": "Roles for specific users", - "description": "Run `POST /_security/role_mapping/mapping2` to assign the \"user\" and \"admin\" roles to specific users.\n", - "value": "{\n \"roles\": [ \"user\", \"admin\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"username\" : [ \"esadmin01\", \"esadmin02\" ] }\n }\n}" - }, - "SecurityPutRoleMappingRequestExample3": { - "summary": "Roles for specific realms", - "description": "Run `POST /_security/role_mapping/mapping3` to match users who authenticated against a specific realm.\n", - "value": "{\n \"roles\": [ \"ldap-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"realm.name\" : \"ldap1\" }\n }\n}" - }, - "SecurityPutRoleMappingRequestExample4": { - "summary": "Roles for specific groups", - "description": "Run `POST /_security/role_mapping/mapping4` to match any user where either the username is `esadmin` or the user is in the `cn=admin,dc=example,dc=com group`. This example is useful when the group names in your identity management system (such as Active Directory, or a SAML Identity Provider) do not have a one-to-one correspondence with the names of roles in Elasticsearch. The role mapping is the means by which you link a group name with a role name.\n", - "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n }\n}" - }, - "SecurityPutRoleMappingRequestExample5": { - "summary": "Roles for multiple groups", - "description": "Run `POST /_security/role_mapping/mapping5` to use an array syntax for the groups field when there are multiple groups. This pattern matches any of the groups (rather than all of the groups).\n", - "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" - }, - "SecurityPutRoleMappingRequestExample6": { - "summary": "Templated roles for groups", - "description": "Run `POST /_security/role_mapping/mapping6` for rare cases when the names of your groups may be an exact match for the names of your Elasticsearch roles. This can be the case when your SAML Identity Provider includes its own \"group mapping\" feature and can be configured to release Elasticsearch role names in the user's SAML attributes. In these cases it is possible to use a template that treats the group names as role names.\nNOTE: This should only be done if you intend to define roles for all of the provided groups. Mapping a user to a large number of unnecessary or undefined roles is inefficient and can have a negative effect on system performance. If you only need to map a subset of the groups, you should do it by using explicit mappings.\nThe `tojson` mustache function is used to convert the list of group names into a valid JSON array. Because the template produces a JSON array, the `format` must be set to `json`.\n", - "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" - }, - "SecurityPutRoleMappingRequestExample7": { - "summary": "Users in a LDAP sub-tree and realm", - "description": "Run `POST /_security/role_mapping/mapping7` to match users within a particular LDAP sub-tree in a specific realm.\n", - "value": "{\n \"roles\": [ \"ldap-example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n { \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" } },\n { \"field\" : { \"realm.name\" : \"ldap1\" } }\n ]\n }\n}" - }, - "SecurityPutRoleMappingRequestExample8": { - "summary": "Complex roles", - "description": "Run `POST /_security/role_mapping/mapping8` to assign rules that are complex and include wildcard matching. For example, this mapping matches any user where all of these conditions are met: the Distinguished Name matches the pattern `*,ou=admin,dc=example,dc=com`, or the `username` is `es-admin`, or the `username` is `es-system`; the user is in the `cn=people,dc=example,dc=com` group; the user does not have a `terminated_date`.\n", - "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [ \"es-admin\", \"es-system\" ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": null\n }\n }\n }\n ]\n }\n}" - }, - "SecurityPutRoleMappingRequestExample9": { - "summary": "Templated roles", - "description": "Run `POST /_security/role_mapping/mapping9` to use templated roles to automatically map every user to their own custom role. In this example every user who authenticates using the `cloud-saml` realm will be automatically mapped to two roles: the `saml_user` role and a role that is their username prefixed with `_user_`. For example, the user `nwong` would be assigned the `saml_user` and `_user_nwong` roles.\n", - "value": "{\n \"rules\": { \"field\": { \"realm.name\": \"cloud-saml\" } },\n \"role_templates\": [\n { \"template\": { \"source\" : \"saml_user\" } }, \n { \"template\": { \"source\" : \"_user_{{username}}\" } }\n ],\n \"enabled\": true\n}" - } - } + "xpack.usage.MlInferenceTrainedModelsCount": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "prepackaged": { + "type": "number" + }, + "other": { + "type": "number" + }, + "pass_through": { + "type": "number" + }, + "regression": { + "type": "number" + }, + "classification": { + "type": "number" + }, + "ner": { + "type": "number" + }, + "text_embedding": { + "type": "number" } }, - "required": true + "required": [ + "total", + "prepackaged", + "other" + ] }, - "security.put_user": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "username": { - "$ref": "#/components/schemas/_types.Username" - }, - "email": { - "description": "The email of the user.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "full_name": { - "description": "The full name of the user.", - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "password": { - "$ref": "#/components/schemas/_types.Password" - }, - "password_hash": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#hashing-settings" - }, - "description": "A hash of the user's password.\nThis must be produced using the same hashing algorithm as has been configured for password storage.\nFor more details, see the explanation of the `xpack.security.authc.password_hashing.algorithm` setting in the user cache and password hash algorithm documentation.\nUsing this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons.\nThe `password` parameter and the `password_hash` parameter cannot be used in the same request.", - "type": "string" - }, - "roles": { - "description": "A set of roles the user has.\nThe roles determine the user's access permissions.\nTo create a user without any roles, specify an empty list (`[]`).", - "type": "array", - "items": { - "type": "string" - } - }, - "enabled": { - "description": "Specifies whether the user is enabled.", - "type": "boolean" - } + "xpack.usage.MlInferenceDeployments": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "inference_counts": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" } - }, - "examples": { - "SecurityPutUserRequestExample1": { - "description": "Run `POST /_security/user/jacknich` to activate a user profile.", - "value": "{\n \"password\" : \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\" : [ \"admin\", \"other_role1\" ],\n \"full_name\" : \"Jack Nicholson\",\n \"email\" : \"jacknich@example.com\",\n \"metadata\" : {\n \"intelligence\" : 7\n }\n}" + ] + }, + "model_sizes_bytes": { + "allOf": [ + { + "$ref": "#/components/schemas/ml._types.JobStatistics" } - } + ] + }, + "time_ms": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.MlInferenceDeploymentsTimeMs" + } + ] } }, - "required": true + "required": [ + "count", + "inference_counts", + "model_sizes_bytes", + "time_ms" + ] }, - "security.query_api_keys": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "aggregations": { - "description": "Any aggregations to run over the corpus of returned API keys.\nAggregations and queries work together. Aggregations are computed only on the API keys that match the query.\nThis supports only a subset of aggregation types, namely: `terms`, `range`, `date_range`, `missing`,\n`cardinality`, `value_count`, `composite`, `filter`, and `filters`.\nAdditionally, aggregations only run over the same subset of fields that query works with.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregationContainer" - } - }, - "query": { - "$ref": "#/components/schemas/security.query_api_keys.ApiKeyQueryContainer" - }, - "from": { - "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "size": { - "description": "The number of hits to return.\nIt must not be negative.\nThe `size` parameter can be set to `0`, in which case no API key matches are returned, only the aggregation results.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" - } - } - }, - "examples": { - "QueryApiKeysRequestExample1": { - "summary": "Query API keys by ID", - "description": "Run `GET /_security/_query/api_key?with_limited_by=true` to retrieve an API key by ID.", - "value": "{\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n}" - }, - "QueryApiKeysRequestExample2": { - "summary": "Query API keys with pagination", - "description": "Run `GET /_security/_query/api_key`. Use a `bool` query to issue complex logical conditions and use `from`, `size`, and `sort` to help paginate the result. For example, the API key name must begin with `app1-key-` and must not be `app1-key-01`. It must be owned by a username with the wildcard pattern `org-*-user` and the `environment` metadata field must have a `production` value. The offset to begin the search result is the twentieth (zero-based index) API key. The page size of the response is 10 API keys. The result is first sorted by creation date in descending order, then by name in ascending order.\n", - "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\" \n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\" \n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\" \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\" \n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\" \n }\n }\n ]\n }\n },\n \"from\": 20, \n \"size\": 10, \n \"sort\": [ \n { \"creation\": { \"order\": \"desc\", \"format\": \"date_time\" } },\n \"name\"\n ]\n}" - }, - "QueryApiKeysRequestExample3": { - "summary": "Query API keys by name", - "description": "Run `GET /_security/_query/api_key` to retrieve the API key by name.", - "value": "{\n \"query\": {\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n }\n}" - } - } + "xpack.usage.MlInferenceDeploymentsTimeMs": { + "type": "object", + "properties": { + "avg": { + "type": "number" } - } + }, + "required": [ + "avg" + ] }, - "security.query_role": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/security.query_role.RoleQueryContainer" - }, - "from": { - "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "size": { - "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "xpack.usage.Monitoring": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "collection_enabled": { + "type": "boolean" + }, + "enabled_exporters": { + "type": "object", + "additionalProperties": { "type": "number" - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" } } }, - "examples": { - "QueryRolesRequestExample1": { - "summary": "Query roles by name", - "description": "Run `POST /_security/_query/role` to lists all roles, sorted by the role name.", - "value": "{\n \"sort\": [\"name\"]\n}" - }, - "QueryRolesRequestExample2": { - "summary": "Query roles by description", - "description": "Run `POST /_security/_query/role` to query only the user access role, given its description. It returns only the best matching role because `size` is set to `1`.\n", - "value": "{\n \"query\": {\n \"match\": {\n \"description\": {\n \"query\": \"user access\"\n }\n }\n },\n \"size\": 1 \n}" - } - } + "required": [ + "collection_enabled", + "enabled_exporters" + ] } - } + ] }, - "security.query_user": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/security.query_user.UserQueryContainer" - }, - "from": { - "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "size": { - "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" + "xpack.usage.RuntimeFieldTypes": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "field_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/xpack.usage.RuntimeFieldsType" } } }, - "examples": { - "SecurityQueryUserRequestExample1": { - "summary": "Query users by role prefix", - "description": "Run `POST /_security/_query/user?with_profile_uid=true` to get users that have roles that are prefixed with `other`. It will also include the user `profile_uid` in the response.\n", - "value": "{\n \"query\": {\n \"prefix\": {\n \"roles\": \"other\"\n }\n }\n}" - }, - "SecurityQueryUserRequestExample2": { - "summary": "Query users with multiple conditions", - "description": "Run `POST /_security/_query/user`. Use a `bool` query to issue complex logical conditions: The `email` must end with `example.com`. The user must be enabled. The result will be filtered to only contain users with at least one role that contains the substring `other`. The offset to begin the search result is the second (zero-based index) user. The page size of the response is two users. The result is sorted by `username` in descending order.\n", - "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"wildcard\": {\n \"email\": \"*example.com\" \n }\n },\n {\n \"term\": {\n \"enabled\": true \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"roles\": \"*other*\" \n }\n }\n ]\n }\n },\n \"from\": 1, \n \"size\": 2, \n \"sort\": [\n { \"username\": { \"order\": \"desc\"} } \n ]\n}" - } - } + "required": [ + "field_types" + ] } - } + ] }, - "security.suggest_user_profiles": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "description": "A query string used to match name-related fields in user profile documents.\nName-related fields are the user's `username`, `full_name`, and `email`.", - "type": "string" - }, - "size": { - "description": "The number of profiles to return.", - "type": "number" - }, - "data": { - "description": "A comma-separated list of filters for the `data` field of the profile document.\nTo return all content use `data=*`.\nTo return a subset of content, use `data=` to retrieve content nested under the specified ``.\nBy default, the API returns no `data` content.\nIt is an error to specify `data` as both the query parameter and the request body field.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "hint": { - "$ref": "#/components/schemas/security.suggest_user_profiles.Hint" - } - } - }, - "examples": { - "SuggestUserProfilesRequestExample1": { - "description": "Run `POST /_security/profile/_suggest` to get suggestions for profile documents with name-related fields matching `jack`. It specifies both `uids` and `labels` hints for better relevance. The `labels` hint ranks profiles higher if their `direction` label matches either `north` or `east`.\n", - "value": "{\n \"name\": \"jack\", \n \"hint\": {\n \"uids\": [ \n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\"north\", \"east\"] \n }\n }\n}" - } + "xpack.usage.RuntimeFieldsType": { + "type": "object", + "properties": { + "chars_max": { + "type": "number" + }, + "chars_total": { + "type": "number" + }, + "count": { + "type": "number" + }, + "doc_max": { + "type": "number" + }, + "doc_total": { + "type": "number" + }, + "index_count": { + "type": "number" + }, + "lang": { + "type": "array", + "items": { + "type": "string" } + }, + "lines_max": { + "type": "number" + }, + "lines_total": { + "type": "number" + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Field" + } + ] + }, + "scriptless_count": { + "type": "number" + }, + "shadowed_count": { + "type": "number" + }, + "source_max": { + "type": "number" + }, + "source_total": { + "type": "number" } - } + }, + "required": [ + "chars_max", + "chars_total", + "count", + "doc_max", + "doc_total", + "index_count", + "lang", + "lines_max", + "lines_total", + "name", + "scriptless_count", + "shadowed_count", + "source_max", + "source_total" + ] }, - "security.update_user_profile_data": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "labels": { - "description": "Searchable data that you want to associate with the user profile.\nThis field supports a nested data structure.\nWithin the labels object, top-level keys cannot begin with an underscore (`_`) or contain a period (`.`).", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "data": { - "description": "Non-searchable data that you want to associate with the user profile.\nThis field supports a nested data structure.\nWithin the `data` object, top-level keys cannot begin with an underscore (`_`) or contain a period (`.`).\nThe data object is not searchable, but can be retrieved with the get user profile API.", - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "xpack.usage.SearchableSnapshots": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "indices_count": { + "type": "number" + }, + "full_copy_indices_count": { + "type": "number" + }, + "shared_cache_indices_count": { + "type": "number" } }, - "examples": { - "UpdateUserProfileDataRequestExample1": { - "description": "Run `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data` to update a profile document for the `u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0` user profile.\n", - "value": "{\n \"labels\": {\n \"direction\": \"east\"\n },\n \"data\": {\n \"app1\": {\n \"theme\": \"default\"\n }\n }\n}" - } - } + "required": [ + "indices_count" + ] } - }, - "required": true + ] }, - "simulate.ingest": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "description": "Sample documents to test in the pipeline.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types.Document" + "xpack.usage.Security": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "api_key_service": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.FeatureToggle" } - }, - "component_template_substitutions": { - "description": "A map of component template names to substitute component template definition objects.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/cluster._types.ComponentTemplateNode" + ] + }, + "anonymous": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.FeatureToggle" } - }, - "index_template_substitutions": { - "description": "A map of index template names to substitute index template definition objects.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types.IndexTemplate" + ] + }, + "audit": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Audit" } - }, - "mapping_addition": { - "$ref": "#/components/schemas/_types.mapping.TypeMapping" - }, - "pipeline_substitutions": { - "description": "Pipelines to test.\nIf you don’t specify the `pipeline` request path parameter, this parameter is required.\nIf you specify both this and the request path parameter, the API only uses the request path parameter.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ingest._types.Pipeline" + ] + }, + "fips_140": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.FeatureToggle" + } + ] + }, + "ipfilter": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.IpFilter" } + ] + }, + "realms": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.Realm" + } + }, + "role_mapping": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.RoleMapping" } }, - "required": [ - "docs" - ] - }, - "examples": { - "SimulateIngestRequestExample1": { - "summary": "Existing pipeline definitions", - "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. Since both documents are being ingested into `my-index`, both pipelines are run using the pipeline definitions that are already in the system.", - "value": "{\n \"docs\": [\n {\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + "roles": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.SecurityRoles" + } + ] + }, + "ssl": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Ssl" + } + ] }, - "SimulateIngestRequestExample2": { - "summary": "Pipeline substitions", - "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already defined in the system will run.", - "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": 123,\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": 456,\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" + "system_key": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.FeatureToggle" + } + ] }, - "SimulateIngestRequestExample3": { - "summary": "Component template substitutions", - "description": "In this example, imagine that the index `my-index` has a strict mapping with only the `foo` keyword field defined. Say that field mapping came from a component template named `my-mappings-template`. You want to test adding a new field, `bar`. So a substitute definition of `my-mappings-template` is provided in `component_template_substitutions`. The substitute `my-mappings-template` will be used in place of the existing mapping for `my-index` and in place of the `my-mappings-template` that is in the system.\n", - "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"foo\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"bar\": \"rab\"\n }\n }\n ],\n \"component_template_substitutions\": {\n \"my-mappings_template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n },\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n}" + "token_service": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.FeatureToggle" + } + ] }, - "SimulateIngestRequestExample4": { - "summary": "Multiple substitutions", - "description": "The pipeline, component template, and index template substitutions replace the existing pipeline details for the duration of this request.", - "value": "{\n \"docs\": [\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field3\",\n \"value\": \"value3\"\n }\n }\n ]\n }\n },\n \"component_template_substitutions\": {\n \"my-component-template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": true,\n \"properties\": {\n \"field3\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"default_pipeline\": \"my-pipeline\"\n }\n }\n }\n }\n },\n \"index_template_substitutions\": {\n \"my-index-template\": {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"component_template_1\",\n \"component_template_2\"\n ]\n }\n },\n \"mapping_addition\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n}" - } - } - } - }, - "required": true - }, - "snapshot.create": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "expand_wildcards": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "feature_states": { - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state" - }, - "description": "The feature states to include in the snapshot.\nEach feature state includes one or more system indices containing related data.\nYou can view a list of eligible features using the get features API.\n\nIf `include_global_state` is `true`, all current feature states are included by default.\nIf `include_global_state` is `false`, no feature states are included by default.\n\nNote that specifying an empty array will result in the default behavior.\nTo exclude all feature states, regardless of the `include_global_state` value, specify an array with only the value `none` (`[\"none\"]`).", - "type": "array", - "items": { - "type": "string" + "operator_privileges": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" } - }, - "ignore_unavailable": { - "description": "If `true`, the request ignores data streams and indices in `indices` that are missing or closed.\nIf `false`, the request returns an error for any data stream or index that is missing or closed.", - "type": "boolean" - }, - "include_global_state": { - "description": "If `true`, the current cluster state is included in the snapshot.\nThe cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies.\nIt also includes data stored in system indices, such as Watches and task records (configurable via `feature_states`).", - "type": "boolean" - }, - "indices": { - "$ref": "#/components/schemas/_types.Indices" - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "partial": { - "description": "If `true`, it enables you to restore a partial snapshot of indices with unavailable shards.\nOnly shards that were successfully included in the snapshot will be restored.\nAll missing shards will be recreated as empty.\n\nIf `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.", - "type": "boolean" - } + ] } }, - "examples": { - "SnapshotCreateRequestExample1": { - "description": "Run `PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true` to take a snapshot of `index_1` and `index_2`.", - "value": "{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n}" - } - } + "required": [ + "api_key_service", + "anonymous", + "audit", + "fips_140", + "ipfilter", + "realms", + "role_mapping", + "roles", + "ssl", + "token_service", + "operator_privileges" + ] } - } + ] }, - "snapshot.create_repository": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/snapshot._types.Repository" - }, - "examples": { - "SnapshotCreateRepositoryRequestExample1": { - "summary": "A shared file system repository", - "description": "Run `PUT /_snapshot/my_repository` to create or update a shared file system snapshot repository.", - "value": "{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}" - }, - "SnapshotCreateRepositoryRequestExample2": { - "summary": "An Azure repository", - "description": "Run `PUT /_snapshot/my_repository` to create or update an Azure snapshot repository.", - "value": "{\n \"type\": \"azure\",\n \"settings\": {\n \"client\": \"secondary\"\n }\n}" - }, - "SnapshotCreateRepositoryRequestExample3": { - "summary": "A Google Cloud Storage repository", - "description": "Run `PUT /_snapshot/my_gcs_repository` to create or update a Google Cloud Storage snapshot repository.", - "value": "{\n \"type\": \"gcs\",\n \"settings\": {\n \"bucket\": \"my_other_bucket\",\n \"base_path\": \"dev\"\n }\n}" - }, - "SnapshotCreateRepositoryRequestExample4": { - "summary": "An S3 repository", - "description": "Run `PUT /_snapshot/my_s3_repository` to create or update an AWS S3 snapshot repository.", - "value": "{\n \"type\": \"s3\",\n \"settings\": {\n \"bucket\": \"my-bucket\"\n }\n}" - }, - "SnapshotCreateRepositoryRequestExample5": { - "summary": "A source-only repository", - "description": "Run `PUT _snapshot/my_src_only_repository` to create or update a source-only snapshot repository.", - "value": "{\n \"type\": \"source\",\n \"settings\": {\n \"delegate_type\": \"fs\",\n \"location\": \"my_backup_repository\"\n }\n}" - }, - "SnapshotCreateRepositoryRequestExample6": { - "summary": "A read-only URL repository", - "description": "Run `PUT _snapshot/my_read_only_url_repository` to create or update a read-only URL snapshot repository.", - "value": "{\n \"type\": \"url\",\n \"settings\": {\n \"url\": \"file:/mount/backups/my_fs_backup_location\"\n }\n}" - } - } + "xpack.usage.FeatureToggle": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" } }, - "required": true + "required": [ + "enabled" + ] }, - "sql.query": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "allow_partial_search_results": { - "description": "If `true`, the response has partial results when there are shard request timeouts or shard failures.\nIf `false`, the API returns an error with no partial results.", - "type": "boolean" - }, - "catalog": { - "description": "The default catalog (cluster) for queries.\nIf unspecified, the queries execute on the data in the local cluster only.", - "type": "string" - }, - "columnar": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-columnar" - }, - "description": "If `true`, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results.\nThe API supports this parameter only for CBOR, JSON, SMILE, and YAML responses.", - "type": "boolean" - }, - "cursor": { - "description": "The cursor used to retrieve a set of paginated results.\nIf you specify a cursor, the API only uses the `columnar` and `time_zone` request body parameters.\nIt ignores other request body parameters.", - "type": "string" - }, - "fetch_size": { - "description": "The maximum number of rows (or entries) to return in one response.", - "type": "number" - }, - "field_multi_value_leniency": { - "description": "If `false`, the API returns an exception when encountering multiple values for a field.\nIf `true`, the API is lenient and returns the first value from the array with no guarantee of consistent results.", - "type": "boolean" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "index_using_frozen": { - "description": "If `true`, the search can run on frozen indices.", - "type": "boolean" - }, - "keep_alive": { - "$ref": "#/components/schemas/_types.Duration" - }, - "keep_on_completion": { - "description": "If `true`, Elasticsearch stores synchronous searches if you also specify the `wait_for_completion_timeout` parameter.\nIf `false`, Elasticsearch only stores async searches that don't finish before the `wait_for_completion_timeout`.", - "type": "boolean" - }, - "page_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "params": { - "description": "The values for parameters in the query.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "query": { - "externalDocs": { - "url": "https://www.elastic.co/docs/reference/query-languages/sql/sql-spec" - }, - "description": "The SQL query to run.", + "xpack.usage.Audit": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.FeatureToggle" + }, + { + "type": "object", + "properties": { + "outputs": { + "type": "array", + "items": { "type": "string" - }, - "request_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" - }, - "wait_for_completion_timeout": { - "$ref": "#/components/schemas/_types.Duration" } } - }, - "examples": { - "QuerySqlRequestExample1": { - "description": "Run `POST _sql?format=txt` to get results for an SQL search.", - "value": "{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n}" - } } } + ] + }, + "xpack.usage.IpFilter": { + "type": "object", + "properties": { + "http": { + "type": "boolean" + }, + "transport": { + "type": "boolean" + } }, - "required": true + "required": [ + "http", + "transport" + ] }, - "sql.translate": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "fetch_size": { - "description": "The maximum number of rows (or entries) to return in one response.", - "type": "number" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "query": { - "description": "The SQL query to run.", + "xpack.usage.Realm": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "name": { + "type": "array", + "items": { "type": "string" - }, - "time_zone": { - "$ref": "#/components/schemas/_types.TimeZone" } }, - "required": [ - "query" - ] - }, - "examples": { - "TranslateSqlRequestExample1": { - "summary": "sql/apis/sql-translate-api.asciidoc:12", - "description": "", - "value": "{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n}" - } - } - } - }, - "required": true - }, - "terms_enum": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "size": { - "description": "The number of matching terms to return.", + "order": { + "type": "array", + "items": { "type": "number" - }, - "timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "case_insensitive": { - "description": "When `true`, the provided search string is matched against index terms without case sensitivity.", - "type": "boolean" - }, - "index_filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "string": { - "description": "The string to match at the start of indexed terms.\nIf it is not provided, all terms in the field are considered.\n\n> info\n> The prefix string cannot be larger than the largest possible keyword value, which is Lucene's term byte-length limit of 32766.", - "type": "string" - }, - "search_after": { - "description": "The string after which terms in the index should be returned.\nIt allows for a form of pagination if the last result from one request is passed as the `search_after` parameter for a subsequent request.", - "type": "string" } }, - "required": [ - "field" - ] - }, - "examples": { - "TermsEnumRequestExample1": { - "description": "Run `POST stackoverflow/_terms_enum`.", - "value": "{\n \"field\" : \"tags\",\n \"string\" : \"kiba\"\n}" - } - } - } - } - }, - "termvectors": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "doc": { - "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", - "type": "object" - }, - "filter": { - "$ref": "#/components/schemas/_global.termvectors.Filter" - }, - "per_field_analyzer": { - "description": "Override the default per-field analyzer.\nThis is useful in order to generate term vectors in any fashion, especially when using artificial documents.\nWhen providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "field_statistics": { - "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", - "type": "boolean" - }, - "offsets": { - "description": "If `true`, the response includes term offsets.", - "type": "boolean" - }, - "payloads": { - "description": "If `true`, the response includes term payloads.", - "type": "boolean" - }, - "positions": { - "description": "If `true`, the response includes term positions.", - "type": "boolean" - }, - "term_statistics": { - "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", - "type": "boolean" - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" + "size": { + "type": "array", + "items": { + "type": "number" + } + }, + "cache": { + "type": "array", + "items": { + "$ref": "#/components/schemas/xpack.usage.RealmCache" } - } - }, - "examples": { - "TermVectorsRequestExample1": { - "summary": "Return stored term vectors", - "description": "Run `GET /my-index-000001/_termvectors/1` to return all information and statistics for field `text` in document 1.\n", - "value": "{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" }, - "TermVectorsRequestExample2": { - "summary": "Per-field analyzer", - "description": "Run `GET /my-index-000001/_termvectors/1` to set per-field analyzers. A different analyzer than the one at the field may be provided by using the `per_field_analyzer` parameter.\n", - "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n },\n \"fields\": [\"fullname\"],\n \"per_field_analyzer\" : {\n \"fullname\": \"keyword\"\n }\n}" + "has_authorization_realms": { + "type": "array", + "items": { + "type": "boolean" + } }, - "TermVectorsRequestExample3": { - "summary": "Terms filtering", - "description": "Run `GET /imdb/_termvectors` to filter the terms returned based on their tf-idf scores. It returns the three most \"interesting\" keywords from the artificial document having the given \"plot\" field value. Notice that the keyword \"Tony\" or any stop words are not part of the response, as their tf-idf must be too low.\n", - "value": "{\n \"doc\": {\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n \"term_statistics\": true,\n \"field_statistics\": true,\n \"positions\": false,\n \"offsets\": false,\n \"filter\": {\n \"max_num_terms\": 3,\n \"min_term_freq\": 1,\n \"min_doc_freq\": 1\n }\n}" + "has_default_username_pattern": { + "type": "array", + "items": { + "type": "boolean" + } }, - "TermVectorsRequestExample4": { - "summary": "Generate term vectors on the fly", - "description": "Run `GET /my-index-000001/_termvectors/1`. Term vectors which are not explicitly stored in the index are automatically computed on the fly. This request returns all information and statistics for the fields in document 1, even though the terms haven't been explicitly stored in the index. Note that for the field text, the terms are not regenerated.\n", - "value": "{\n \"fields\" : [\"text\", \"some_field_without_term_vectors\"],\n \"offsets\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + "has_truststore": { + "type": "array", + "items": { + "type": "boolean" + } }, - "TermVectorsRequestExample5": { - "summary": "Artificial documents", - "description": "Run `GET /my-index-000001/_termvectors`. Term vectors can be generated for artificial documents, that is for documents not present in the index. If dynamic mapping is turned on (default), the document fields not in the original mapping will be dynamically created.\n", - "value": "{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"test test test\"\n }\n}" + "is_authentication_delegated": { + "type": "array", + "items": { + "type": "boolean" + } } } } - } + ] }, - "text_structure.find_message_structure": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "messages": { - "description": "The list of messages you want to analyze.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "messages" - ] - }, - "examples": { - "FindMessageStructureRequestExample1": { - "description": "Run `POST _text_structure/find_message_structure` to analyze Elasticsearch log files.\n", - "value": "{\n \"messages\": [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ]\n}" - } - } + "xpack.usage.RealmCache": { + "type": "object", + "properties": { + "size": { + "type": "number" } }, - "required": true + "required": [ + "size" + ] }, - "text_structure.test_grok_pattern": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "grok_pattern": { - "$ref": "#/components/schemas/_types.GrokPattern" - }, - "text": { - "description": "The lines of text to run the Grok pattern on.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "grok_pattern", - "text" - ] - }, - "examples": { - "TestGrokPatternRequestExample1": { - "description": "Run `GET _text_structure/test_grok_pattern` to test a Grok pattern.", - "value": "{\n \"grok_pattern\": \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\": [\n \"Hello John Doe\",\n \"this does not match\"\n ]\n}" - } - } + "xpack.usage.RoleMapping": { + "type": "object", + "properties": { + "enabled": { + "type": "number" + }, + "size": { + "type": "number" } }, - "required": true + "required": [ + "enabled", + "size" + ] }, - "transform.preview_transform": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "dest": { - "$ref": "#/components/schemas/transform._types.Destination" - }, - "description": { - "description": "Free text description of the transform.", - "type": "string" - }, - "frequency": { - "$ref": "#/components/schemas/_types.Duration" - }, - "pivot": { - "$ref": "#/components/schemas/transform._types.Pivot" - }, - "source": { - "$ref": "#/components/schemas/transform._types.Source" - }, - "settings": { - "$ref": "#/components/schemas/transform._types.Settings" - }, - "sync": { - "$ref": "#/components/schemas/transform._types.SyncContainer" - }, - "retention_policy": { - "$ref": "#/components/schemas/transform._types.RetentionPolicyContainer" - }, - "latest": { - "$ref": "#/components/schemas/transform._types.Latest" - } + "xpack.usage.SecurityRoles": { + "type": "object", + "properties": { + "native": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.SecurityRolesNative" } - }, - "examples": { - "PreviewTransformRequestExample1": { - "description": "Run `POST _transform/_preview` to preview a transform that uses the pivot method.", - "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + ] + }, + "dls": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.SecurityRolesDls" } - } + ] + }, + "file": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.SecurityRolesFile" + } + ] } - } + }, + "required": [ + "native", + "dls", + "file" + ] }, - "watcher.execute_watch": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "action_modes": { - "description": "Determines how to handle the watch actions as part of the watch execution.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/watcher._types.ActionExecutionMode" - } - }, - "alternative_input": { - "description": "When present, the watch uses this object as a payload instead of executing its own input.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "ignore_condition": { - "description": "When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter.", - "type": "boolean" - }, - "record_execution": { - "description": "When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time.\nIn addition, the status of the watch is updated, possibly throttling subsequent runs.\nThis can also be specified as an HTTP parameter.", - "type": "boolean" - }, - "simulated_actions": { - "$ref": "#/components/schemas/watcher._types.SimulatedActions" - }, - "trigger_data": { - "$ref": "#/components/schemas/watcher._types.ScheduleTriggerEvent" - }, - "watch": { - "$ref": "#/components/schemas/watcher._types.Watch" - } + "xpack.usage.SecurityRolesNative": { + "type": "object", + "properties": { + "dls": { + "type": "boolean" + }, + "fls": { + "type": "boolean" + }, + "size": { + "type": "number" + } + }, + "required": [ + "dls", + "fls", + "size" + ] + }, + "xpack.usage.SecurityRolesFile": { + "type": "object", + "properties": { + "dls": { + "type": "boolean" + }, + "fls": { + "type": "boolean" + }, + "size": { + "type": "number" + } + }, + "required": [ + "dls", + "fls", + "size" + ] + }, + "xpack.usage.Ssl": { + "type": "object", + "properties": { + "http": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.FeatureToggle" } - }, - "examples": { - "WatcherExecuteRequestExample1": { - "summary": "Run a watch", - "description": "Run `POST _watcher/watch/my_watch/_execute` to run a watch. The input defined in the watch is ignored and the `alternative_input` is used as the payload. The condition as defined by the watch is ignored and is assumed to evaluate to true. The `force_simulate` action forces the simulation of `my-action`. Forcing the simulation means that throttling is ignored and the watch is simulated by Watcher instead of being run normally.\n", - "value": "{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" - }, - "WatcherExecuteRequestExample2": { - "summary": "Run a watch with multiple action modes", - "description": "Run `POST _watcher/watch/my_watch/_execute` and set a different mode for each action.\n", - "value": "{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}" - }, - "WatcherExecuteRequestExample3": { - "summary": "Run a watch inline", - "description": "Run `POST _watcher/watch/_execute` to run a watch inline. All other settings for this API still apply when inlining a watch. In this example, while the inline watch defines a compare condition, during the execution this condition will be ignored.\n", - "value": "{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}" + ] + }, + "transport": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.FeatureToggle" } - } + ] } - } + }, + "required": [ + "http", + "transport" + ] }, - "watcher.put_watch": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "actions": { - "description": "The list of actions that will be run if the condition matches.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/watcher._types.Action" + "xpack.usage.Slm": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "policy_count": { + "type": "number" + }, + "policy_stats": { + "allOf": [ + { + "$ref": "#/components/schemas/slm._types.Statistics" } - }, - "condition": { - "$ref": "#/components/schemas/watcher._types.ConditionContainer" - }, - "input": { - "$ref": "#/components/schemas/watcher._types.InputContainer" - }, - "metadata": { - "$ref": "#/components/schemas/_types.Metadata" - }, - "throttle_period": { - "$ref": "#/components/schemas/_types.Duration" - }, - "throttle_period_in_millis": { - "$ref": "#/components/schemas/_types.DurationValueUnitMillis" - }, - "transform": { - "$ref": "#/components/schemas/_types.TransformContainer" - }, - "trigger": { - "$ref": "#/components/schemas/watcher._types.TriggerContainer" - } - } - }, - "examples": { - "WatcherPutWatchRequestExample1": { - "description": "Run `PUT _watcher/watch/my-watch` add a watch. The watch schedule triggers every minute. The watch search input looks for any 404 HTTP responses that occurred in the last five minutes. The watch condition checks if any search hits where found. When found, the watch action sends an email to an administrator.\n", - "value": "{\n \"trigger\" : {\n \"schedule\" : { \"cron\" : \"0 0/1 * * * ?\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [\n \"logstash*\"\n ],\n \"body\" : {\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\" : {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"email_admin\" : {\n \"email\" : {\n \"to\" : \"admin@domain.host.com\",\n \"subject\" : \"404 recently encountered\"\n }\n }\n }\n}" + ] } } } - } + ] }, - "watcher.query_watches": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "from": { - "description": "The offset from the first result to fetch.\nIt must be non-negative.", - "type": "number" - }, - "size": { - "description": "The number of hits to return.\nIt must be non-negative.", + "xpack.usage.Sql": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "features": { + "type": "object", + "additionalProperties": { "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "search_after": { - "$ref": "#/components/schemas/_types.SortResults" + } + }, + "queries": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/xpack.usage.Query" } } - } + }, + "required": [ + "features", + "queries" + ] } - } + ] + }, + "xpack.usage.Vector": { + "allOf": [ + { + "$ref": "#/components/schemas/xpack.usage.Base" + }, + { + "type": "object", + "properties": { + "dense_vector_dims_avg_count": { + "type": "number" + }, + "dense_vector_fields_count": { + "type": "number" + }, + "sparse_vector_fields_count": { + "type": "number" + } + }, + "required": [ + "dense_vector_dims_avg_count", + "dense_vector_fields_count" + ] + } + ] + } + }, + "securitySchemes": { + "apiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "Elasticsearch APIs support key-based authentication.\nYou must create an API key and use the encoded value in the request header.\nFor example:\n\n```\ncurl -X GET \"${ES_URL}/_cat/indices?v=true\" \\\n -H \"Authorization: ApiKey ${API_KEY}\"\n```\n\nTo get API keys, use the `/_security/api_key` APIs." + }, + "basicAuth": { + "type": "http", + "scheme": "basic" + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "description": "Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.\nFor examples, refer to [Token-based authentication services](https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/token-based-authentication-services)" } } - } + }, + "security": [ + { + "apiKeyAuth": [] + }, + { + "basicAuth": [] + }, + { + "bearerAuth": [] + } + ], + "tags": [ + { + "name": "analytics", + "description": "The behavioral analytics APIs let you create and manage analytics collections and view their data. Use them to analyze users' search and click behavior, improve result relevance, and identify content gaps.", + "x-displayName": "Behavioral analytics" + }, + { + "name": "cluster", + "description": "The cluster APIs enable you to retrieve information about your infrastructure on cluster, node, or shard level. You can manage cluster settings and voting configuration exceptions, collect node statistics and retrieve node information.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/distributed-architecture/discovery-cluster-formation/cluster-state-overview" + }, + "x-displayName": "Cluster" + }, + { + "name": "health_report", + "description": "The cluster - health API provides you a report with the health status of an Elasticsearch cluster.", + "x-displayName": "Cluster - Health" + }, + { + "name": "cat", + "description": "The compact and aligned text (CAT) APIs aim are intended only for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, it's recommend to use a corresponding JSON API.\n\nAll the cat commands accept a query string parameter `help` to see all the headers and info they provide, and the `/_cat` command alone lists all the available commands.", + "x-displayName": "Compact and aligned text (CAT)" + }, + { + "name": "connector", + "description": "The connector and sync jobs APIs provide a convenient way to create and manage Elastic connectors and sync jobs in an internal index.\n\nConnectors are Elasticsearch integrations for syncing content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure.\n\nThis API provides an alternative to relying solely on Kibana UI for connector and sync job management. The API comes with a set of validations and assertions to ensure that the state representation in the internal index remains valid.\n\nThis API requires the `manage_connector` privilege or, for read-only endpoints, the `monitor_connector` privilege.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/reference/search-connectors/api-tutorial" + }, + "x-displayName": "Connector" + }, + { + "name": "ccr", + "description": "The cross-cluster replication (CCR) APIs let you run replication operations, such as creating and managing follower indices or auto-follow patterns. Use CCR to replicate indices across clusters to maintain search availability during outages, reduce indexing impact, and lower search latency by serving requests closer to users.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication" + }, + "x-displayName": "Cross-cluster replication" + }, + { + "name": "data stream", + "description": "The data stream APIs enable you to create and manage data streams and data stream lifecycles. A data stream lets you store append-only time series data across multiple indices while giving you a single named resource for requests. Data streams are well-suited for logs, events, metrics, and other continuously generated data.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/manage-data/data-store/data-streams" + }, + "x-displayName": "Data stream" + }, + { + "name": "document", + "description": "The document APIs enable you to create and manage documents in an Elasticsearch index.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/distributed-architecture/reading-and-writing-documents" + }, + "x-displayName": "Document" + }, + { + "name": "enrich", + "description": "The enrich APIs enable you to manage enrich policies. An enrich policy is a set of configuration options used to add the right enrich data to the right incoming documents.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/data-enrichment" + }, + "x-displayName": "Enrich" + }, + { + "name": "eql", + "description": "Event Query Language (EQL) is a query language for event-based time series data, such as logs, metrics, and traces.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql" + }, + "x-displayName": "EQL" + }, + { + "name": "esql", + "description": "The Elasticsearch Query Language (ES|QL) provides a powerful way to filter, transform, and analyze data stored in Elasticsearch, and in the future in other runtimes.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql" + }, + "x-displayName": "ES|QL" + }, + { + "name": "features", + "description": "The features APIs retrieve information about the features that are currently enabled and available on the node.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state" + }, + "x-displayName": "Features" + }, + { + "name": "fleet", + "description": "The Fleet APIs support Fleet's use of Elasticsearch as a data store for internal agent and action data.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/reference/fleet" + }, + "x-displayName": "Fleet" + }, + { + "name": "graph", + "description": "The graph explore API enables you to extract and summarize information about the documents and terms in an Elasticsearch index.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/visualize/graph" + }, + "x-displayName": "Graph explore" + }, + { + "name": "indices", + "description": "Index APIs are used to manage individual indices, index settings, aliases, mappings, and index templates.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/manage-data/data-store/index-basics" + }, + "x-displayName": "Index" + }, + { + "name": "ilm", + "description": "You can use the index lifecycle management (ILM) APIs to create and manage policies to automatically manage the lifecycle of your Elasticsearch indices.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/index-lifecycle" + }, + "x-displayName": "Index lifecycle management" + }, + { + "name": "inference", + "description": "Inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api" + }, + "x-displayName": "Inference" + }, + { + "name": "info", + "description": "Get basic information about the cluster.", + "x-displayName": "Info" + }, + { + "name": "ingest", + "description": "Ingest APIs enable you to manage tasks and resources related to ingest pipelines and processors.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines" + }, + "x-displayName": "Ingest" + }, + { + "name": "license", + "description": "Licensing APIs enable you to manage your licenses.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/subscriptions" + }, + "x-displayName": "Licensing" + }, + { + "name": "logstash", + "description": "Logstash APIs enable you to manage pipelines that are used by Logstash Central Management.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management" + }, + "x-displayName": "Logstash" + }, + { + "name": "ml", + "description": "Perform machine learning activities, such as anomaly detection, data frame analytics, and natural language processing tasks.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/machine-learning" + }, + "x-displayName": "Machine learning" + }, + { + "name": "ml anomaly", + "description": "The machine learning anomaly detection APIs enable you to perform anomaly detection activities.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-ad-finding-anomalies" + }, + "x-displayName": "Machine learning anomaly detection" + }, + { + "name": "ml data frame", + "description": "The machine learning data frame analytics APIs enable you to perform data frame analytics activities.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/ml-dfa-overview" + }, + "x-displayName": "Machine learning data frame analytics" + }, + { + "name": "ml trained model", + "description": "The machine learning trained models APIs enable you to perform model management operations.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/machine-learning/nlp/ml-nlp-overview" + }, + "x-displayName": "Machine learning trained model" + }, + { + "name": "migration", + "description": "The migration APIs power Kibana's Upgrade Assistant feature.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/upgrade/prepare-to-upgrade/upgrade-assistant" + }, + "x-displayName": "Migration" + }, + { + "name": "query_rules", + "description": "Query rules enable you to configure per-query rules that are applied at query time to queries that match the specific rule. Query rules are organized into rulesets, collections of query rules that are matched against incoming queries. Query rules are applied using the rule query. If a query matches one or more rules in the ruleset, the query is re-written to apply the rules before searching. This allows pinning documents for only queries that match a specific term. Alternatively, you can use the Query Rules UI to manage query rules.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules" + }, + "x-displayName": "Query rules" + }, + { + "name": "rollup", + "description": "The rollup APIs enable you to create, manage, and retrieve information about rollup jobs.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup" + }, + "x-displayName": "Rollup" + }, + { + "name": "script", + "description": "Use the script support APIs to get a list of supported script contexts and languages. Use the stored script APIs to manage stored scripts and search templates.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/scripting" + }, + "x-displayName": "Scripting" + }, + { + "name": "search", + "description": "The search APIs are used to search and aggregate data stored in Elasticsearch indices and data streams.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/solutions/search/search-approaches" + }, + "x-displayName": "Search" + }, + { + "name": "search_application", + "description": "The search application APIs provide a convenient way to leverage the power of Elasticsearch for your search applications.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/solutions/elasticsearch-solution-project/search-applications" + }, + "x-displayName": "Search application" + }, + { + "name": "searchable_snapshots", + "description": "The searchable snapshots APIs are used to mount snapshots as searchable indices.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots" + }, + "x-displayName": "Searchable snapshots" + }, + { + "name": "security", + "description": "The security APIs enable you to manage users and their roles, manage and invalidate API keys, and manage application privileges.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/security" + }, + "x-displayName": "Security" + }, + { + "name": "snapshot", + "description": "The snapshot and restore APIs are used to take snapshots of running clusters. Snapshots are backups of individual indices or entire clusters.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore" + }, + "x-displayName": "Snapshot and restore" + }, + { + "name": "slm", + "description": "Snapshot lifecycle management (SLM) enables you to automatically take snapshots and control how long they are kept.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots" + }, + "x-displayName": "Snapshot lifecycle management" + }, + { + "name": "sql", + "description": "Elasticsearch's SQL APIs enable you to run SQL queries on Elasticsearch indices and data streams.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql" + }, + "x-displayName": "SQL" + }, + { + "name": "synonyms", + "description": "The synonyms management API provides a convenient way to define and manage synonyms in an internal system index. Related synonyms can be grouped in a \"synonyms set\". Create as many synonym sets as you need.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/solutions/search/full-text/search-with-synonyms" + }, + "x-displayName": "Synonyms" + }, + { + "name": "tasks", + "description": "The task management APIs enable you to get information about the tasks currently running on one or more nodes in the cluster.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/troubleshoot/elasticsearch/task-queue-backlog" + }, + "x-displayName": "Task management" + }, + { + "name": "text_structure", + "description": "The text structure APIs enable you to find the structure of a text field in an Elasticsearch index.", + "x-displayName": "Text structure" + }, + { + "name": "transform", + "description": "The transform APIs enable you to create and manage transforms.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/transforms" + }, + "x-displayName": "Transform" + }, + { + "name": "xpack", + "description": "The usage API provides usage information about the installed X-Pack features.", + "x-displayName": "Usage" + }, + { + "name": "watcher", + "description": "You can use Watcher to watch for changes or anomalies in your data and perform the necessary actions in response.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/explore-analyze/alerting/watcher" + }, + "x-displayName": "Watcher" + } + ], + "x-tagGroups": [ + { + "name": "AI & Machine Learning", + "tags": [ + "analytics", + "graph", + "inference", + "ml", + "ml anomaly", + "ml data frame", + "ml trained model", + "query_rules", + "text_structure" + ] + }, + { + "name": "Cluster Management", + "tags": [ + "ccr", + "cluster", + "connector", + "data stream", + "ilm", + "indices", + "rollup", + "script", + "search_application", + "searchable_snapshots", + "slm", + "snapshot" + ] + }, + { + "name": "Data Processing", + "tags": [ + "enrich", + "fleet", + "ingest", + "logstash", + "synonyms", + "transform" + ] + }, + { + "name": "Information & Monitoring", + "tags": [ + "cat", + "features", + "health_report", + "info", + "license", + "migration", + "tasks", + "watcher", + "xpack" + ] + }, + { + "name": "Search & Document APIs", + "tags": [ + "document", + "eql", + "esql", + "search", + "sql" + ] + }, + { + "name": "Security", + "tags": [ + "security" + ] + } + ] } \ No newline at end of file From bf36a61084bedc5486596cf449e93215d8b611d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Tue, 21 Apr 2026 16:46:01 +0200 Subject: [PATCH 2/6] Add multi-language code sample tabs to API Explorer (#3127) * Add multi-language code sample tabs to API Explorer request examples Parse x-codeSamples from OpenAPI operations and render them as language-selectable tabs (Console, cURL, Python, JS, Ruby, PHP, Java) inline within the Request Examples section, replacing the JSON code block. Uses the existing tabs CSS/JS infrastructure with synced language selection across operations via sessionStorage. Made-with: Cursor * Fix Elastic.ApiExplorer.Tests * Render code examples as standalone section for all HTTP methods The inline approach only worked for operations with request bodies (PUT/POST/PATCH). GET/DELETE operations had x-codeSamples in the spec but no Request Examples section to host them. Move language tabs to a standalone Code Examples section that renders for every operation with x-codeSamples, regardless of HTTP method. Restore original Request Examples rendering unchanged. Made-with: Cursor * Hide Request Examples when single example duplicates Code Examples When an operation has exactly one request example and x-codeSamples are present, the request example is redundant (same content shown in richer form via language tabs). Skip rendering it to avoid duplication. Made-with: Cursor --------- Co-authored-by: lcawl --- docs/configure/content-set/api-explorer.md | 18 ++ .../Operations/OperationView.cshtml | 49 +++++- .../Operations/OperationViewModel.cs | 73 ++++++++- .../CodeSampleTests.cs | 154 ++++++++++++++++++ 4 files changed, 289 insertions(+), 5 deletions(-) create mode 100644 tests/Elastic.ApiExplorer.Tests/CodeSampleTests.cs diff --git a/docs/configure/content-set/api-explorer.md b/docs/configure/content-set/api-explorer.md index 66ea876ce6..7292ebde22 100644 --- a/docs/configure/content-set/api-explorer.md +++ b/docs/configure/content-set/api-explorer.md @@ -194,3 +194,21 @@ Use the document-level `x-tagGroups` extension (from [Redocly](https://redocly.c - When `x-tagGroups` is present and valid, the API Explorer uses it as an additional level of grouping in the sidebar. - When `x-tagGroups` is absent, tags are listed directly under the API root in a single flat layer. - Any operation tag that is not listed under any group is still included: it appears under a fallback section named `unknown`, and the build logs a warning so you can fix the spec. + +### Multi-language code examples + +When an OpenAPI operation includes the `x-codeSamples` extension, the API Explorer renders the code samples with a language selector tab. This lets users switch between available languages such as Console, cURL, Python, JavaScript, Ruby, PHP, and Java. + +The `x-codeSamples` extension is a JSON array of objects, each with a `lang` and `source` field: + +```json +"x-codeSamples": [ + { "lang": "Console", "source": "GET /_search" }, + { "lang": "curl", "source": "curl -X GET ..." }, + { "lang": "Python", "source": "resp = client.search()" } +] +``` + +The code samples appear in a standalone "Code Examples" section on every operation page that has the extension, regardless of HTTP method. This means GET, DELETE, and other operations without a request body also display language tabs when `x-codeSamples` are present. When multiple languages are available, they appear as tabs. The selected language persists across operations and page navigations. When only one language is available, the example renders without a tab selector. + +Console is treated as the default language and appears first in the tab order when present. diff --git a/src/Elastic.ApiExplorer/Operations/OperationView.cshtml b/src/Elastic.ApiExplorer/Operations/OperationView.cshtml index 9c67712392..5c2f5be234 100644 --- a/src/Elastic.ApiExplorer/Operations/OperationView.cshtml +++ b/src/Elastic.ApiExplorer/Operations/OperationView.cshtml @@ -491,6 +491,47 @@ } } + @{ + var codeSamples = Model.CodeSamples; + } + @if (codeSamples.Count == 1) + { +

+ Code Examples + + @Model.Operation.Route + + + +

+
+

@codeSamples[0].Language

+
@codeSamples[0].Source
+
+ } + else if (codeSamples.Count > 1) + { +

+ Code Examples + + @Model.Operation.Route + + + +

+
+ @for (var i = 0; i < codeSamples.Count; i++) + { + var sample = codeSamples[i]; + var tabId = $"code-sample-{i}"; + + +
+
@sample.Source
+
+ } +
+ } @{ // Check for examples in request body var requestBodyContent = operation.RequestBody?.Content?.FirstOrDefault().Value; @@ -501,7 +542,7 @@ var responseContent = successResponse?.Content?.FirstOrDefault().Value; var responseExamples = responseContent?.Examples; } - @if (requestExamples is { Count: > 0 }) + @if (requestExamples is { Count: > 0 } && !(requestExamples.Count == 1 && codeSamples.Count > 0)) {

Request Examples @@ -560,8 +601,10 @@ } } @{ - var hasExamples = requestExamples is { Count: > 0 } || responseExamples is { Count: > 0 }; - var examplesAnchor = requestExamples is { Count: > 0 } ? "request-examples" : "response-examples"; + var hasExamples = codeSamples.Count > 0 || requestExamples is { Count: > 0 } || responseExamples is { Count: > 0 }; + var examplesAnchor = codeSamples.Count > 0 ? "code-examples" + : requestExamples is { Count: > 0 } ? "request-examples" + : "response-examples"; } @if (hasExamples) { diff --git a/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs b/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs index 9865b12289..027a0fb84e 100644 --- a/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs +++ b/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs @@ -2,16 +2,45 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information +using System.Text.Json.Nodes; using Microsoft.OpenApi; namespace Elastic.ApiExplorer.Operations; +/// +/// A single code sample extracted from the x-codeSamples OpenAPI extension. +/// +public record CodeSample(string Language, string Source, string HighlightClass) +{ + private static readonly Dictionary LanguageHighlightMap = new(StringComparer.OrdinalIgnoreCase) + { + ["Console"] = "language-console", + ["curl"] = "language-bash", + ["Python"] = "language-python", + ["JavaScript"] = "language-javascript", + ["Ruby"] = "language-ruby", + ["PHP"] = "language-php", + ["Java"] = "language-java", + }; + + public static string GetHighlightClass(string language) => + LanguageHighlightMap.GetValueOrDefault(language, $"language-{language.ToLowerInvariant()}"); +} + public class OperationViewModel(ApiRenderContext context) : ApiViewModel(context) { public required ApiOperation Operation { get; init; } + /// + /// Code samples parsed from the x-codeSamples extension, ordered with Console first. + /// Populated during , which runs before the template body. + /// + public IReadOnlyList CodeSamples { get; private set; } = []; + protected override IReadOnlyList GetTocItems() { + CodeSamples = ParseCodeSamples(Operation.Operation); + var operation = Operation.Operation; var tocItems = new List { new("Paths", "paths") }; @@ -28,9 +57,12 @@ protected override IReadOnlyList GetTocItems() if (operation.Responses is { Count: > 0 }) tocItems.Add(new ApiTocItem(operation.Responses.Count == 1 ? "Response" : "Responses", "responses")); - // Request body examples + if (CodeSamples.Count > 0) + tocItems.Add(new ApiTocItem("Code Examples", "code-examples")); + + // Request body examples (skip when single example duplicates code samples) var reqContent = operation.RequestBody?.Content?.FirstOrDefault().Value; - if (reqContent?.Examples is { Count: > 0 }) + if (reqContent?.Examples is { Count: > 0 } && !(reqContent.Examples.Count == 1 && CodeSamples.Count > 0)) tocItems.Add(new ApiTocItem("Request Examples", "request-examples")); // Response examples @@ -41,4 +73,41 @@ protected override IReadOnlyList GetTocItems() return tocItems; } + + public static IReadOnlyList ParseCodeSamples(OpenApiOperation operation) + { + if (operation.Extensions?.TryGetValue("x-codeSamples", out var ext) != true + || ext is not JsonNodeExtension jsonExt + || jsonExt.Node is not JsonArray samplesArray) + return []; + + var samples = new List(); + foreach (var item in samplesArray) + { + if (item is not JsonObject obj) + continue; + + var lang = obj["lang"]?.GetValue(); + var source = obj["source"]?.GetValue(); + + if (string.IsNullOrEmpty(lang) || string.IsNullOrEmpty(source)) + continue; + + samples.Add(new CodeSample(lang, source, CodeSample.GetHighlightClass(lang))); + } + + // Console first when present, then preserve spec order + samples.Sort((a, b) => + { + var aIsConsole = string.Equals(a.Language, "Console", StringComparison.OrdinalIgnoreCase); + var bIsConsole = string.Equals(b.Language, "Console", StringComparison.OrdinalIgnoreCase); + if (aIsConsole && !bIsConsole) + return -1; + if (!aIsConsole && bIsConsole) + return 1; + return 0; + }); + + return samples; + } } diff --git a/tests/Elastic.ApiExplorer.Tests/CodeSampleTests.cs b/tests/Elastic.ApiExplorer.Tests/CodeSampleTests.cs new file mode 100644 index 0000000000..cfc0b50f94 --- /dev/null +++ b/tests/Elastic.ApiExplorer.Tests/CodeSampleTests.cs @@ -0,0 +1,154 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +using System.Text.Json.Nodes; +using AwesomeAssertions; +using Elastic.ApiExplorer.Operations; +using Microsoft.OpenApi; + +namespace Elastic.ApiExplorer.Tests; + +public class CodeSampleTests +{ + private static OpenApiOperation CreateOperationWithCodeSamples(JsonArray samplesArray) + { + var operation = new OpenApiOperation(); + operation.Extensions ??= new Dictionary(); + operation.Extensions["x-codeSamples"] = new JsonNodeExtension(samplesArray); + return operation; + } + + [Fact] + public void CodeSamples_ReturnsEmptyList_WhenExtensionIsMissing() + { + var operation = new OpenApiOperation(); + + var result = OperationViewModel.ParseCodeSamples(operation); + + result.Should().BeEmpty(); + } + + [Fact] + public void CodeSamples_ParsesValidSamples() + { + var samples = new JsonArray( + new JsonObject { ["lang"] = "Console", ["source"] = "GET /_search" }, + new JsonObject { ["lang"] = "curl", ["source"] = "curl -X GET ..." } + ); + var operation = CreateOperationWithCodeSamples(samples); + + var result = OperationViewModel.ParseCodeSamples(operation); + + result.Should().HaveCount(2); + result[0].Language.Should().Be("Console"); + result[0].Source.Should().Be("GET /_search"); + result[1].Language.Should().Be("curl"); + result[1].Source.Should().Be("curl -X GET ..."); + } + + [Fact] + public void CodeSamples_OrdersConsoleFirst() + { + var samples = new JsonArray( + new JsonObject { ["lang"] = "Python", ["source"] = "resp = client.search()" }, + new JsonObject { ["lang"] = "curl", ["source"] = "curl -X GET ..." }, + new JsonObject { ["lang"] = "Console", ["source"] = "GET /_search" }, + new JsonObject { ["lang"] = "Java", ["source"] = "client.search()" } + ); + var operation = CreateOperationWithCodeSamples(samples); + + var result = OperationViewModel.ParseCodeSamples(operation); + + result[0].Language.Should().Be("Console"); + } + + [Fact] + public void CodeSamples_PreservesOrderForNonConsole() + { + var samples = new JsonArray( + new JsonObject { ["lang"] = "Python", ["source"] = "resp = client.search()" }, + new JsonObject { ["lang"] = "curl", ["source"] = "curl -X GET ..." }, + new JsonObject { ["lang"] = "Console", ["source"] = "GET /_search" }, + new JsonObject { ["lang"] = "Ruby", ["source"] = "response = client.search" } + ); + var operation = CreateOperationWithCodeSamples(samples); + + var result = OperationViewModel.ParseCodeSamples(operation); + + result[0].Language.Should().Be("Console"); + result[1].Language.Should().Be("Python"); + result[2].Language.Should().Be("curl"); + result[3].Language.Should().Be("Ruby"); + } + + [Fact] + public void CodeSamples_SkipsEntriesWithMissingSource() + { + var samples = new JsonArray( + new JsonObject { ["lang"] = "Console", ["source"] = "GET /_search" }, + new JsonObject { ["lang"] = "Python" }, + new JsonObject { ["lang"] = "curl", ["source"] = "" } + ); + var operation = CreateOperationWithCodeSamples(samples); + + var result = OperationViewModel.ParseCodeSamples(operation); + + result.Should().HaveCount(1); + result[0].Language.Should().Be("Console"); + } + + [Fact] + public void CodeSamples_SkipsEntriesWithMissingLang() + { + var samples = new JsonArray( + new JsonObject { ["source"] = "GET /_search" }, + new JsonObject { ["lang"] = "Console", ["source"] = "GET /_search" } + ); + var operation = CreateOperationWithCodeSamples(samples); + + var result = OperationViewModel.ParseCodeSamples(operation); + + result.Should().HaveCount(1); + result[0].Language.Should().Be("Console"); + } + + [Fact] + public void CodeSamples_HandlesEmptyArray() + { + var samples = new JsonArray(); + var operation = CreateOperationWithCodeSamples(samples); + + var result = OperationViewModel.ParseCodeSamples(operation); + + result.Should().BeEmpty(); + } + + [Theory] + [InlineData("Console", "language-console")] + [InlineData("curl", "language-bash")] + [InlineData("Python", "language-python")] + [InlineData("JavaScript", "language-javascript")] + [InlineData("Ruby", "language-ruby")] + [InlineData("PHP", "language-php")] + [InlineData("Java", "language-java")] + [InlineData("Go", "language-go")] + [InlineData("TypeScript", "language-typescript")] + public void GetHighlightClass_MapsLanguagesCorrectly(string language, string expected) + { + CodeSample.GetHighlightClass(language).Should().Be(expected); + } + + [Fact] + public void CodeSamples_SetsCorrectHighlightClass() + { + var samples = new JsonArray( + new JsonObject { ["lang"] = "curl", ["source"] = "curl -X GET ..." } + ); + var operation = CreateOperationWithCodeSamples(samples); + + var result = OperationViewModel.ParseCodeSamples(operation); + + result[0].HighlightClass.Should().Be("language-bash"); + } +} From 4d87ba3070f17bc18c20ba355b3a3b212880ad16 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 22 Apr 2026 13:13:30 -0700 Subject: [PATCH 3/6] [API Explorer] Add support for x-req-auth (#3168) --- docs/configure/content-set/api-explorer.md | 77 +++++--- src/Elastic.ApiExplorer/ApiRenderContext.cs | 3 + src/Elastic.ApiExplorer/ApiViewModel.cs | 3 + src/Elastic.ApiExplorer/OpenApiGenerator.cs | 3 +- .../Operations/OpenApiXReqAuthParser.cs | 66 +++++++ .../Operations/OperationView.cshtml | 20 ++ .../Operations/OperationViewModel.cs | 11 ++ .../Elastic.ApiExplorer.Tests.csproj | 4 + ...csearch-x-req-auth-cat-indices-sample.json | 55 ++++++ .../kibana-openapi-no-x-req-auth-sample.json | 47 +++++ .../XReqAuthTests.cs | 184 ++++++++++++++++++ 11 files changed, 450 insertions(+), 23 deletions(-) create mode 100644 src/Elastic.ApiExplorer/Operations/OpenApiXReqAuthParser.cs create mode 100644 tests/Elastic.ApiExplorer.Tests/TestData/elasticsearch-x-req-auth-cat-indices-sample.json create mode 100644 tests/Elastic.ApiExplorer.Tests/TestData/kibana-openapi-no-x-req-auth-sample.json create mode 100644 tests/Elastic.ApiExplorer.Tests/XReqAuthTests.cs diff --git a/docs/configure/content-set/api-explorer.md b/docs/configure/content-set/api-explorer.md index 7292ebde22..848fbef77b 100644 --- a/docs/configure/content-set/api-explorer.md +++ b/docs/configure/content-set/api-explorer.md @@ -15,7 +15,7 @@ This feature is still under development and the functionality described on this Add the `api` key to your `docset.yml` file to enable the API Explorer. The key maps product names to OpenAPI JSON specification files. Paths are relative to the folder that contains `docset.yml`. -### Basic Configuration +### Basic configuration ```yaml api: @@ -138,9 +138,60 @@ The API Explorer generates the following types of pages from your OpenAPI spec: ## OpenAPI extensions -The API Explorer supports the following OpenAPI specification extensions to enhance navigation and display: +The API Explorer supports some OpenAPI specification extensions to enhance navigation and display: -### `x-displayName` for tags +- [x-codeSamples](#x-codesamples) +- [x-displayName](#x-displayname) +- [x-req-auth](#x-req-auth) +- [x-tagGroups](#x-taggroups) + +For background on OpenAPI vendor extensions, refer to [OpenAPI Specification](https://spec.openapis.org/oas/latest.html#specification-extensions). + +### Multi-language code examples [x-codesamples] + +When an OpenAPI operation includes the `x-codeSamples` extension, the API Explorer renders the code samples with a language selector tab. This lets users switch between available languages such as Console, cURL, Python, JavaScript, Ruby, PHP, and Java. + +The `x-codeSamples` extension is a JSON array of objects, each with a `lang` and `source` field: + +```json +"x-codeSamples": [ + { "lang": "Console", "source": "GET /_search" }, + { "lang": "curl", "source": "curl -X GET ..." }, + { "lang": "Python", "source": "resp = client.search()" } +] +``` + +The code samples appear in a standalone "Code Examples" section on every operation page that has the extension, regardless of HTTP method. This means GET, DELETE, and other operations without a request body also display language tabs when `x-codeSamples` are present. When multiple languages are available, they appear as tabs. The selected language persists across operations and page navigations. When only one language is available, the example renders without a tab selector. + +Console is treated as the default language and appears first in the tab order when present. + +### Prerequisites [x-req-auth] + +Add the operation-level `x-req-auth` extension to list authentication or privilege requirements that users must satisfy before calling the API. +The API Explorer renders these lines in a **Prerequisites** section on the operation page. + +`x-req-auth` is a JSON array of strings. +Each non-empty string becomes one item in the prerequisites list (leading and trailing whitespace is trimmed). + +```json +{ + "get": { + "operationId": "get-snapshot", + "responses": { "200": { "description": "ok" } }, + "x-req-auth": [ + "Cluster privilege: `cluster:admin/snapshot`" + ] + } +} +``` + + + +When prerequisites are present, **Prerequisites** also appears in the on-page table of contents (after **Paths**). +When the extension is missing, empty, or not a JSON array, the section is omitted. +Malformed values are skipped and the build may log a warning. + +### Tag labels [x-displayname] Use the `x-displayName` extension (from [Redocly](https://redocly.com/docs-legacy/api-reference-docs/specification-extensions/x-display-name)) on tag objects to provide user-friendly display names in navigation and landing pages while maintaining stable URLs based on the canonical tag name. @@ -167,7 +218,7 @@ Use the `x-displayName` extension (from [Redocly](https://redocly.com/docs-legac - When `x-displayName` is absent, the canonical tag `name` is used as a fallback - Navigation URLs and internal references always use the canonical tag `name` for stability -### `x-tagGroups` for sidebar grouping +### Tag groups [x-taggroups] Use the document-level `x-tagGroups` extension (from [Redocly](https://redocly.com/docs-legacy/api-reference-docs/specification-extensions/x-tag-groups)) to define how tags are grouped in the API Explorer sidebar. Each group has a display `name` and a list of tag `name` values that belong to it. Group order in the array is the order of top-level sections in the navigation. @@ -194,21 +245,3 @@ Use the document-level `x-tagGroups` extension (from [Redocly](https://redocly.c - When `x-tagGroups` is present and valid, the API Explorer uses it as an additional level of grouping in the sidebar. - When `x-tagGroups` is absent, tags are listed directly under the API root in a single flat layer. - Any operation tag that is not listed under any group is still included: it appears under a fallback section named `unknown`, and the build logs a warning so you can fix the spec. - -### Multi-language code examples - -When an OpenAPI operation includes the `x-codeSamples` extension, the API Explorer renders the code samples with a language selector tab. This lets users switch between available languages such as Console, cURL, Python, JavaScript, Ruby, PHP, and Java. - -The `x-codeSamples` extension is a JSON array of objects, each with a `lang` and `source` field: - -```json -"x-codeSamples": [ - { "lang": "Console", "source": "GET /_search" }, - { "lang": "curl", "source": "curl -X GET ..." }, - { "lang": "Python", "source": "resp = client.search()" } -] -``` - -The code samples appear in a standalone "Code Examples" section on every operation page that has the extension, regardless of HTTP method. This means GET, DELETE, and other operations without a request body also display language tabs when `x-codeSamples` are present. When multiple languages are available, they appear as tabs. The selected language persists across operations and page navigations. When only one language is available, the example renders without a tab selector. - -Console is treated as the default language and appears first in the tab order when present. diff --git a/src/Elastic.ApiExplorer/ApiRenderContext.cs b/src/Elastic.ApiExplorer/ApiRenderContext.cs index 2779aa3030..516db203c1 100644 --- a/src/Elastic.ApiExplorer/ApiRenderContext.cs +++ b/src/Elastic.ApiExplorer/ApiRenderContext.cs @@ -8,6 +8,7 @@ using Elastic.Documentation.Navigation; using Elastic.Documentation.Site.FileProviders; using Elastic.Documentation.Site.Navigation; +using Microsoft.Extensions.Logging; using Microsoft.OpenApi; namespace Elastic.ApiExplorer; @@ -23,4 +24,6 @@ StaticFileContentHashProvider StaticFileContentHashProvider public required INavigationItem CurrentNavigation { get; init; } public required IMarkdownStringRenderer MarkdownRenderer { get; init; } + /// Logger for API Explorer rendering (e.g. OpenAPI extension parsing); optional when the host does not provide one. + public ILogger? ApiExplorerLog { get; init; } } diff --git a/src/Elastic.ApiExplorer/ApiViewModel.cs b/src/Elastic.ApiExplorer/ApiViewModel.cs index 558d9f606a..bf4bb5cac7 100644 --- a/src/Elastic.ApiExplorer/ApiViewModel.cs +++ b/src/Elastic.ApiExplorer/ApiViewModel.cs @@ -32,6 +32,9 @@ public abstract partial class ApiViewModel(ApiRenderContext context) public BuildContext BuildContext { get; } = context?.BuildContext ?? throw new ArgumentNullException(nameof(context), "BuildContext cannot be null"); public OpenApiDocument Document { get; } = context?.Model ?? throw new ArgumentNullException(nameof(context), "OpenApiDocument cannot be null"); + /// Current API render context (OpenAPI model, nav, optional logging). + protected ApiRenderContext RenderContext { get; } = context ?? throw new ArgumentNullException(nameof(context)); + public HtmlString RenderMarkdown(string? markdown) { diff --git a/src/Elastic.ApiExplorer/OpenApiGenerator.cs b/src/Elastic.ApiExplorer/OpenApiGenerator.cs index 196e660c20..79e1996d16 100644 --- a/src/Elastic.ApiExplorer/OpenApiGenerator.cs +++ b/src/Elastic.ApiExplorer/OpenApiGenerator.cs @@ -405,7 +405,8 @@ private async Task GenerateApiProduct(string prefix, OpenApiDocument openApiDocu { NavigationHtml = string.Empty, CurrentNavigation = navigation, - MarkdownRenderer = markdownStringRenderer + MarkdownRenderer = markdownStringRenderer, + ApiExplorerLog = _logger }; await RenderNavigationItems(prefix, renderContext, navigationRenderer, navigation, navigation, ctx); diff --git a/src/Elastic.ApiExplorer/Operations/OpenApiXReqAuthParser.cs b/src/Elastic.ApiExplorer/Operations/OpenApiXReqAuthParser.cs new file mode 100644 index 0000000000..aff21d43fc --- /dev/null +++ b/src/Elastic.ApiExplorer/Operations/OpenApiXReqAuthParser.cs @@ -0,0 +1,66 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +using System.Text.Json; +using System.Text.Json.Nodes; +using Elastic.Documentation.Extensions; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi; + +namespace Elastic.ApiExplorer.Operations; + +public static class OpenApiXReqAuthParser +{ + public const string ExtensionKey = "x-req-auth"; + + public static IReadOnlyList? TryGetPrerequisiteLines( + OpenApiOperation operation, + ILogger? log, + string? route, + string? operationId + ) + { + if (operation.Extensions is null) + return null; + + if (!operation.Extensions.TryGetValue(ExtensionKey, out var ext) || ext is not JsonNodeExtension jne) + return null; + + try + { + if (jne.Node is not JsonArray array) + { + log?.LogWarning("Failed to parse {Extension} extension for operation {OperationId} on path {Path}: expected a JSON array", ExtensionKey, operationId, route); + return null; + } + + var list = new List(); + foreach (var node in array) + { + if (node is null) + continue; + var line = LineFromNode(node); + if (!string.IsNullOrWhiteSpace(line)) + list.Add(line.Trim()); + } + + if (list.Count == 0) + return null; + + return list; + } + catch (Exception ex) + { + log?.LogWarning(ex, "Failed to parse {Extension} extension for operation {OperationId} on path {Path}", ExtensionKey, operationId, route); + return null; + } + } + + private static string LineFromNode(JsonNode node) => + node is JsonValue value + ? value.GetValueKind() == JsonValueKind.String + ? value.GetValue() ?? "" + : value.ToString() ?? "" + : node.ToString() ?? ""; +} diff --git a/src/Elastic.ApiExplorer/Operations/OperationView.cshtml b/src/Elastic.ApiExplorer/Operations/OperationView.cshtml index 5c2f5be234..c38fbd81e1 100644 --- a/src/Elastic.ApiExplorer/Operations/OperationView.cshtml +++ b/src/Elastic.ApiExplorer/Operations/OperationView.cshtml @@ -148,6 +148,26 @@ @{ var pathParameters = operation.Parameters?.Where(p => p.In == ParameterLocation.Path).ToArray() ?? []; } + @{ + var prerequisiteLines = Model.RequiredAuthItems; + } + @if (prerequisiteLines is { Count: > 0 }) + { +

+ Prerequisites + + @Model.Operation.Route + + + +

+
    + @foreach (var line in prerequisiteLines) + { +
  • @Model.RenderMarkdown(line)
  • + } +
+ } @if (pathParameters.Length > 0) {

Path Parameters

diff --git a/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs b/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs index 027a0fb84e..c570f02613 100644 --- a/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs +++ b/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs @@ -37,6 +37,14 @@ public class OperationViewModel(ApiRenderContext context) : ApiViewModel(context /// public IReadOnlyList CodeSamples { get; private set; } = []; + public IReadOnlyList? RequiredAuthItems => + OpenApiXReqAuthParser.TryGetPrerequisiteLines( + Operation.Operation, + RenderContext.ApiExplorerLog, + Operation.Route, + Operation.Operation.OperationId + ); + protected override IReadOnlyList GetTocItems() { CodeSamples = ParseCodeSamples(Operation.Operation); @@ -44,6 +52,9 @@ protected override IReadOnlyList GetTocItems() var operation = Operation.Operation; var tocItems = new List { new("Paths", "paths") }; + if (RequiredAuthItems is { Count: > 0 }) + tocItems.Add(new ApiTocItem("Prerequisites", "prerequisites")); + if (!string.IsNullOrWhiteSpace(operation.Description)) tocItems.Add(new ApiTocItem("Description", "description")); diff --git a/tests/Elastic.ApiExplorer.Tests/Elastic.ApiExplorer.Tests.csproj b/tests/Elastic.ApiExplorer.Tests/Elastic.ApiExplorer.Tests.csproj index fdef66023b..25b59aa823 100644 --- a/tests/Elastic.ApiExplorer.Tests/Elastic.ApiExplorer.Tests.csproj +++ b/tests/Elastic.ApiExplorer.Tests/Elastic.ApiExplorer.Tests.csproj @@ -14,4 +14,8 @@ + + + + diff --git a/tests/Elastic.ApiExplorer.Tests/TestData/elasticsearch-x-req-auth-cat-indices-sample.json b/tests/Elastic.ApiExplorer.Tests/TestData/elasticsearch-x-req-auth-cat-indices-sample.json new file mode 100644 index 0000000000..12dd3517cc --- /dev/null +++ b/tests/Elastic.ApiExplorer.Tests/TestData/elasticsearch-x-req-auth-cat-indices-sample.json @@ -0,0 +1,55 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Elasticsearch sample (x-req-auth cat indices)", + "version": "1.0.0" + }, + "paths": { + "/_cat/indices": { + "get": { + "tags": [ + "cat" + ], + "summary": "Get index information", + "operationId": "cat-indices", + "responses": { + "200": { + "description": "OK" + } + }, + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" + ] + } + }, + "/_cat/indices/{index}": { + "get": { + "tags": [ + "cat" + ], + "summary": "Get index information", + "operationId": "cat-indices-1", + "parameters": [ + { + "name": "index", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" + ] + } + } + } +} diff --git a/tests/Elastic.ApiExplorer.Tests/TestData/kibana-openapi-no-x-req-auth-sample.json b/tests/Elastic.ApiExplorer.Tests/TestData/kibana-openapi-no-x-req-auth-sample.json new file mode 100644 index 0000000000..cb22222163 --- /dev/null +++ b/tests/Elastic.ApiExplorer.Tests/TestData/kibana-openapi-no-x-req-auth-sample.json @@ -0,0 +1,47 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Kibana sample (no x-req-auth)", + "version": "1.0.0" + }, + "paths": { + "/api/status": { + "get": { + "operationId": "get-status", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/foo": { + "get": { + "operationId": "foo-get", + "responses": { + "200": { + "description": "OK" + } + } + }, + "post": { + "operationId": "foo-post", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/bar": { + "delete": { + "operationId": "bar-delete", + "responses": { + "200": { + "description": "OK" + } + } + } + } + } +} diff --git a/tests/Elastic.ApiExplorer.Tests/XReqAuthTests.cs b/tests/Elastic.ApiExplorer.Tests/XReqAuthTests.cs new file mode 100644 index 0000000000..3eb7de364f --- /dev/null +++ b/tests/Elastic.ApiExplorer.Tests/XReqAuthTests.cs @@ -0,0 +1,184 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +using AwesomeAssertions; +using Elastic.ApiExplorer.Operations; +using Microsoft.OpenApi; +using Microsoft.OpenApi.Reader; + +namespace Elastic.ApiExplorer.Tests; + +public class XReqAuthTests +{ + private static string TestDataPath(string fileName) => + Path.Join(AppContext.BaseDirectory, "TestData", fileName); + + [Fact] + public async Task TryGetPrerequisiteLines_MinimalOpenApi3Spec_MatchesElasticsearchShape() + { + var json = /*lang=json,strict*/ """ + { + "openapi": "3.0.0", + "info": { "title": "t", "version": "1" }, + "paths": { + "/a": { + "get": { + "operationId": "op-a", + "responses": { "200": { "description": "ok" } }, + "x-req-auth": [ + "Index privileges: `monitor`\n", + "Cluster privileges: `monitor`\n" + ] + } + } + } + } + """; + var jsonPath = Path.Join(Path.GetTempPath(), $"xreqauth-{Guid.NewGuid():N}.json"); + try + { + await File.WriteAllTextAsync(jsonPath, json, TestContext.Current.CancellationToken); + var loaded = await OpenApiDocument.LoadAsync( + jsonPath, + new OpenApiReaderSettings + { + LeaveStreamOpen = false + }, + TestContext.Current.CancellationToken + ); + var op = loaded.Document!.Paths!["/a"].Operations![HttpMethod.Get]!; + + var lines = OpenApiXReqAuthParser.TryGetPrerequisiteLines(op, null, "/a", "op-a"); + + lines.Should().NotBeNull(); + lines!.Should().HaveCount(2); + lines[0].Should().Contain("Index"); + lines[0].Should().Contain("monitor"); + lines[1].Should().Contain("Cluster"); + lines[1].Should().Contain("monitor"); + } + finally + { + if (File.Exists(jsonPath)) + File.Delete(jsonPath); + } + } + + [Fact] + public async Task TryGetPrerequisiteLines_EmptyArray_ReturnsNull() + { + var json = /*lang=json,strict*/ """ + { + "openapi": "3.0.0", + "info": { "title": "t", "version": "1" }, + "paths": { + "/a": { + "get": { + "operationId": "op-a", + "responses": { "200": { "description": "ok" } }, + "x-req-auth": [] + } + } + } + } + """; + var jsonPath = Path.Join(Path.GetTempPath(), $"xreqauth-{Guid.NewGuid():N}.json"); + try + { + await File.WriteAllTextAsync(jsonPath, json, TestContext.Current.CancellationToken); + var loaded = await OpenApiDocument.LoadAsync( + jsonPath, + new OpenApiReaderSettings + { + LeaveStreamOpen = false + }, + TestContext.Current.CancellationToken + ); + var op = loaded.Document!.Paths!["/a"].Operations![HttpMethod.Get]!; + + OpenApiXReqAuthParser.TryGetPrerequisiteLines(op, null, "/a", "op-a") + .Should().BeNull("empty x-req-auth should not show Prerequisites"); + } + finally + { + if (File.Exists(jsonPath)) + File.Delete(jsonPath); + } + } + + [Fact] + public async Task ElasticsearchSample_CatIndicesOperations_HaveXReqAuth() + { + var specPath = TestDataPath("elasticsearch-x-req-auth-cat-indices-sample.json"); + File.Exists(specPath).Should().BeTrue($"Fixture missing: {specPath}"); + + var loaded = await OpenApiDocument.LoadAsync( + specPath, + new OpenApiReaderSettings + { + LeaveStreamOpen = false + }, + TestContext.Current.CancellationToken + ); + var doc = loaded.Document!; + var getIndices = doc.Paths!["/_cat/indices"].Operations![HttpMethod.Get]!; + var a = OpenApiXReqAuthParser.TryGetPrerequisiteLines(getIndices, null, "/_cat/indices", getIndices.OperationId); + a.Should().NotBeNull(); + a!.Should().NotBeEmpty(); + a.Should().OnlyContain(s => !string.IsNullOrWhiteSpace(s)); + + var getIndicesIndex = doc.Paths!["/_cat/indices/{index}"].Operations![HttpMethod.Get]!; + var b = OpenApiXReqAuthParser.TryGetPrerequisiteLines( + getIndicesIndex, + null, + "/_cat/indices/{index}", + getIndicesIndex.OperationId + ); + b.Should().NotBeNull(); + b!.Should().NotBeEmpty(); + } + + [Fact] + public async Task KibanaStyleSample_FirstPathsLackXReqAuth() + { + var specPath = TestDataPath("kibana-openapi-no-x-req-auth-sample.json"); + File.Exists(specPath).Should().BeTrue($"Fixture missing: {specPath}"); + + var loaded = await OpenApiDocument.LoadAsync( + specPath, + new OpenApiReaderSettings + { + LeaveStreamOpen = false + }, + TestContext.Current.CancellationToken + ); + var doc = loaded.Document!; + + var opCount = 0; + var pathCount = 0; + foreach (var p in doc.Paths) + { + if (pathCount >= 3) + break; + pathCount++; + if (p.Value.Operations is null) + continue; + foreach (var httpOp in p.Value.Operations) + { + if (opCount >= 5) + goto done; + var lines = OpenApiXReqAuthParser.TryGetPrerequisiteLines( + httpOp.Value, + null, + p.Key, + httpOp.Value.OperationId + ); + lines.Should().BeNull("sample Kibana-style spec has no x-req-auth on sampled operations"); + opCount++; + } + } + done: + opCount.Should().BeGreaterThan(0, "sample should have at least one operation in the first 3 paths"); + } +} From 4e1fa04f8b51402f80061fc3b5a43d3767082c26 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Thu, 23 Apr 2026 09:37:25 -0700 Subject: [PATCH 4/6] [API Explorer] Add tag landing pages (#3169) --- docs/configure/content-set/api-explorer.md | 14 +- docs/kibana-openapi.json | 2 +- .../Landing/LandingNavigationItem.cs | 18 +- .../Landing/LandingView.cshtml | 2 +- .../Landing/TagLandingView.cshtml | 97 ++++++++++ .../Landing/TagLandingViewModel.cs | 15 ++ src/Elastic.ApiExplorer/OpenApiGenerator.cs | 144 +++++++++++---- .../TagMetadataTests.cs | 167 +++++++++++++++++- 8 files changed, 412 insertions(+), 47 deletions(-) create mode 100644 src/Elastic.ApiExplorer/Landing/TagLandingView.cshtml create mode 100644 src/Elastic.ApiExplorer/Landing/TagLandingViewModel.cs diff --git a/docs/configure/content-set/api-explorer.md b/docs/configure/content-set/api-explorer.md index 848fbef77b..836efaff93 100644 --- a/docs/configure/content-set/api-explorer.md +++ b/docs/configure/content-set/api-explorer.md @@ -83,6 +83,10 @@ Make sure you have: - Understanding of RESTful API principles ``` +:::{important} +Intro and outro Markdown files must not use a slug that would collide with the reserved API Explorer segments like `types` and `tags`. +::: + ## Place your spec files OpenAPI specification files must be in JSON format and located in the same folder as your `docset.yml` (or in a subfolder of it). The path you specify in `api` is resolved relative to the `docset.yml` location. @@ -133,6 +137,7 @@ toc: The API Explorer generates the following types of pages from your OpenAPI spec: - **Landing page**: An overview of the API grouped by tag +- **Tag landing pages**: One page per tag that lists operations in that tag, with the tag's display name, optional OpenAPI `description` (CommonMark), and optional `externalDocs` link - **Operation pages**: One page per API operation, with the HTTP method, path, parameters, request body, response schemas, and examples - **Schema type pages**: Dedicated pages for complex shared types such as `QueryContainer` and `AggregationContainer` @@ -214,9 +219,13 @@ Use the `x-displayName` extension (from [Redocly](https://redocly.com/docs-legac **Behavior:** -- When `x-displayName` is present, it's used for navigation titles and section headings in the API Explorer +- When `x-displayName` is present, it's used for navigation titles, tag landing page titles, and section headings on the main API overview - When `x-displayName` is absent, the canonical tag `name` is used as a fallback -- Navigation URLs and internal references always use the canonical tag `name` for stability +- Tag landing page URLs and tag URL segments are derived from the canonical tag `name` + +:::{note} +If two different canonical tag names normalize to the same tag landing page URL, the build fails with an error that names both tags and the colliding segment so the spec can be fixed. +::: ### Tag groups [x-taggroups] @@ -243,5 +252,6 @@ Use the document-level `x-tagGroups` extension (from [Redocly](https://redocly.c **Behavior:** - When `x-tagGroups` is present and valid, the API Explorer uses it as an additional level of grouping in the sidebar. +- In the navigation tree, a group's section title links to the **main API overview** for that product (it is not a separate page and does not point at the first tag in the group; tag landings stay under `.../tags/...` only for tags). - When `x-tagGroups` is absent, tags are listed directly under the API root in a single flat layer. - Any operation tag that is not listed under any group is still included: it appears under a fallback section named `unknown`, and the build logs a warning so you can fix the spec. diff --git a/docs/kibana-openapi.json b/docs/kibana-openapi.json index 59d20f5451..0a3b83f1ca 100644 --- a/docs/kibana-openapi.json +++ b/docs/kibana-openapi.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"contact":{"name":"Kibana Team"},"description":"The Kibana REST APIs enable you to manage resources such as connectors, data views, and saved objects.\nThe API calls are stateless.\nEach request that you make happens in isolation from other calls and must include all of the necessary information for Kibana to fulfill the\nrequest.\nAPI requests return JSON output, which is a format that is machine-readable and works well for automation.\n\nTo interact with Kibana APIs, use the following operations:\n\n- GET: Fetches the information.\n- PATCH: Applies partial modifications to the existing information.\n- POST: Adds new information.\n- PUT: Updates the existing information.\n- DELETE: Removes the information.\n\nYou can prepend any Kibana API endpoint with `kbn:` and run the request in **Dev Tools → Console**.\nFor example:\n\n```\nGET kbn:/api/data_views\n```\n\nFor more information about the console, refer to [Run API requests](https://www.elastic.co/docs/explore-analyze/query-filter/tools/console).\n\nNOTE: Access to internal Kibana API endpoints will be restricted in Kibana version 9.0. Please move any integrations to publicly documented APIs.\n\n## Documentation source and versions\n\nThis documentation is derived from the `main` branch of the [kibana](https://github.com/elastic/kibana) repository.\nIt is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).\n\nThis documentation contains work-in-progress information for future Elastic Stack releases.\n","title":"Kibana APIs","version":"1.0.2","x-doc-license":{"name":"Attribution-NonCommercial-NoDerivatives 4.0 International","url":"https://creativecommons.org/licenses/by-nc-nd/4.0/"},"x-feedbackLink":{"label":"Feedback","url":"https://github.com/elastic/docs-content/issues/new?assignees=\u0026labels=feedback%2Ccommunity\u0026projects=\u0026template=api-feedback.yaml\u0026title=%5BFeedback%5D%3A+"}},"servers":[{"url":"https://{kibana_url}","variables":{"kibana_url":{"default":"localhost:5601"}}}],"security":[{"apiKeyAuth":[]},{"basicAuth":[]}],"tags":[{"name":"alerting","description":"Alerting enables you to define rules, which detect complex conditions within your data. When a condition is met, the rule tracks it as an alert and runs the actions that are defined in the rule. Actions typically involve the use of connectors to interact with Kibana services or third party integrations.\n","externalDocs":{"description":"Alerting documentation","url":"https://www.elastic.co/docs/explore-analyze/alerts-cases/alerts"},"x-displayName":"Alerting"},{"description":"Adjust APM agent configuration without need to redeploy your application.\n","name":"APM agent configuration"},{"description":"Configure APM agent keys to authorize requests from APM agents to the APM Server.\n","name":"APM agent keys"},{"description":"Annotate visualizations in the APM app with significant events. Annotations enable you to easily see how events are impacting the performance of your applications.\n","name":"APM annotations"},{"description":"Create APM fleet server schema.","name":"APM server schema"},{"description":"Configure APM source maps. A source map allows minified files to be mapped back to original source code--allowing you to maintain the speed advantage of minified code, without losing the ability to quickly and easily debug your application.\nFor best results, uploading source maps should become a part of your deployment procedure, and not something you only do when you see unhelpful errors. That's because uploading source maps after errors happen won't make old errors magically readable--errors must occur again for source mapping to occur.\n","name":"APM sourcemaps"},{"description":"Cases are used to open and track issues. You can add assignees and tags to your cases, set their severity and status, and add alerts, comments, and visualizations. You can also send cases to external incident management systems by configuring connectors.\n","name":"cases","externalDocs":{"description":"Cases documentation","url":"https://www.elastic.co/docs/explore-analyze/alerts-cases/cases"},"x-displayName":"Cases"},{"name":"connectors","description":"Connectors provide a central place to store connection information for services and integrations with Elastic or third party systems. Alerting rules can use connectors to run actions when rule conditions are met.\n","externalDocs":{"description":"Connector documentation","url":"https://www.elastic.co/docs/reference/kibana/connectors-kibana"},"x-displayName":"Connectors"},{"name":"Dashboards"},{"name":"Data streams"},{"description":"Data view APIs enable you to manage data views, formerly known as Kibana index patterns.","name":"data views","x-displayName":"Data views"},{"name":"Elastic Agent actions"},{"name":"Elastic Agent binary download sources"},{"name":"Elastic Agent policies"},{"name":"Elastic Agent status"},{"name":"Elastic Agents"},{"name":"Elastic Package Manager (EPM)"},{"name":"Fleet enrollment API keys"},{"name":"Fleet internals"},{"name":"Fleet outputs"},{"name":"Fleet package policies"},{"name":"Fleet proxies"},{"name":"Fleet Server hosts"},{"name":"Fleet service tokens"},{"name":"Fleet uninstall tokens"},{"description":"Programmatically integrate with Logstash configuration management.\n\u003e warn\n\u003e Do not directly access the `.logstash` index. The structure of the `.logstash` index is subject to change, which could cause your integration to break. Instead, use the Logstash configuration management APIs.\n","externalDocs":{"description":"Centralized pipeline management","url":"https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management"},"name":"logstash","x-displayName":"Logstash configuration management"},{"name":"maintenance-window","description":"You can schedule single or recurring maintenance windows to temporarily reduce rule notifications. For example, a maintenance window prevents false alarms during planned outages.\n","externalDocs":{"description":"Maintenance window documentation","url":"https://www.elastic.co/docs/explore-analyze/alerts-cases/alerts/maintenance-windows"},"x-displayName":"Maintenance windows"},{"name":"Message Signing Service"},{"description":"Machine learning","name":"ml","x-displayName":"Machine learning"},{"name":"roles","x-displayName":"Roles","description":"Manage the roles that grant Elasticsearch and Kibana privileges.","externalDocs":{"description":"Kibana role management","url":"https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles"}},{"name":"saved objects","x-displayName":"Saved objects","description":"Export sets of saved objects that you want to import into Kibana, resolve import errors, and rotate an encryption key for encrypted saved objects with the saved objects APIs.\n\nTo manage a specific type of saved object, use the corresponding APIs.\nFor example, use:\n\n* [Data views](../group/endpoint-data-views)\n* [Spaces](../group/endpoint-spaces)\n* [Short URLs](../group/endpoint-short-url)\n\nWarning: Do not write documents directly to the `.kibana` index. When you write directly to the `.kibana` index, the data becomes corrupted and permanently breaks future Kibana versions\n"},{"description":"Manage and interact with Security Assistant resources.","name":"Security AI Assistant API","x-displayName":"Security AI assistant"},{"description":"Use the detections APIs to create and manage detection rules. Detection rules search events and external alerts sent to Elastic Security and generate detection alerts from any hits. Alerts are displayed on the **Alerts** page and can be assigned and triaged, using the alert status to mark them as open, closed, or acknowledged.\n\nThis API supports both key-based authentication and basic authentication.\n\nTo use key-based authentication, create an API key, then specify the key in the header of your API calls.\n\nTo use basic authentication, provide a username and password; this automatically creates an API key that matches the current user’s privileges.\n\nIn both cases, the API key is subsequently used for authorization when the rule runs.\n\u003e warn\n\u003e If the API key used for authorization has different privileges than the key that created or most recently updated a rule, the rule behavior might change.\n\n\u003e If the API key that created a rule is deleted, or the user that created the rule becomes inactive, the rule will stop running.\n\nTo create and run rules, the user must meet specific requirements for the Kibana space. Refer to the [Detections requirements](https://www.elastic.co/guide/en/security/current/detections-permissions-section.html) for a complete list of requirements.\n","name":"Security Detections API","x-displayName":"Security detections"},{"description":"Endpoint Exceptions API allows you to manage detection rule endpoint exceptions to prevent a rule from generating an alert from incoming events even when the rule's other criteria are met.","name":"Security Endpoint Exceptions API","x-displayName":"Security endpoint exceptions"},{"description":"Interact with and manage endpoints running the Elastic Defend integration.","name":"Security Endpoint Management API","x-displayName":"Security endpoint management"},{"description":"","name":"Security Entity Analytics API","x-displayName":"Security entity analytics"},{"description":"Exceptions are associated with detection and endpoint rules, and are used to prevent a rule from generating an alert from incoming events, even when the rule's other criteria are met. They can help reduce the number of false positives and prevent trusted processes and network activity from generating unnecessary alerts.\n\nExceptions are made up of:\n\n* **Exception containers**: A container for related exceptions. Generally, a single exception container contains all the exception items relevant for a subset of rules. For example, a container can be used to group together network-related exceptions that are relevant for a large number of network rules. The container can then be associated with all the relevant rules.\n* **Exception items**: The query (fields, values, and logic) used to prevent rules from generating alerts. When an exception item's query evaluates to `true`, the rule does not generate an alert.\n\nFor detection rules, you can also use lists to define rule exceptions. A list holds multiple values of the same Elasticsearch data type, such as IP addresses. These values are used to determine when an exception prevents an alert from being generated.\n\u003e info\n\u003e You cannot use lists with endpoint rule exceptions.\n\n\u003e info\n\u003e Only exception containers can be associated with rules. You cannot directly associate an exception item or a list container with a rule. To use list exceptions, create an exception item that references the relevant list container.\n\n## Exceptions requirements\n\nBefore you can start working with exceptions that use value lists, you must create the `.lists` and `.items` data streams for the relevant Kibana space. To do this, use the [Create list data streams](../operation/operation-createlistindex) endpoint. Once these data streams are created, your role needs privileges to manage rules. For a complete list of requirements, refer to [Enable and access detections](https://www.elastic.co/guide/en/security/current/detections-permissions-section.html#enable-detections-ui).\n","name":"Security Exceptions API","x-displayName":"Security exceptions"},{"description":"Lists can be used with detection rule exceptions to define values that prevent a rule from generating alerts.\n\nLists are made up of:\n\n* **List containers**: A container for values of the same Elasticsearch data type. The following data types can be used:\n * `boolean`\n * `byte`\n * `date`\n * `date_nanos`\n * `date_range`\n * `double`\n * `double_range`\n * `float`\n * `float_range`\n * `half_float`\n * `integer`\n * `integer_range`\n * `ip`\n * `ip_range`\n * `keyword`\n * `long`\n * `long_range`\n * `short`\n * `text`\n* **List items**: The values used to determine whether the exception prevents an alert from being generated.\n\nAll list items in the same list container must be of the same data type, and each item defines a single value. For example, an IP list container named `internal-ip-addresses-southport` contains five items, where each item defines one internal IP address:\n1. `192.168.1.1`\n2. `192.168.1.3`\n3. `192.168.1.18`\n4. `192.168.1.12`\n5. `192.168.1.7`\n\nTo use these IP addresses as values for defining rule exceptions, use the Security exceptions API to [create an exception list item](../operation/operation-createexceptionlistitem) that references the `internal-ip-addresses-southport` list.\n\u003e info\n\u003e Lists cannot be added directly to rules, nor do they define the operators used to determine when exceptions are applied (`is in list`, `is not in list`). Use an exception item to define the operator and associate it with an [exception container](../operation/operation-createexceptionlist). You can then add the exception container to a rule's `exceptions_list` object.\n\n## Lists requirements\n\nBefore you can start using lists, you must create the `.lists` and `.items` data streams for the relevant Kibana space. To do this, use the [Create list data streams](../operation/operation-createlistindex) endpoint. Once these data streams are created, your role needs privileges to manage rules. Refer to [Enable and access detections](https://www.elastic.co/guide/en/security/current/detections-permissions-section.html#enable-detections-ui) for a complete list of requirements.\n","name":"Security Lists API","x-displayName":"Security lists"},{"description":"Run live queries, manage packs and saved queries.","name":"Security Osquery API","x-displayName":"Security Osquery"},{"description":"You can create Timelines and Timeline templates via the API, as well as import new Timelines from an ndjson file.","name":"Security Timeline API","x-displayName":"Security timeline"},{"description":"Manage Kibana short URLs.","name":"short url","x-displayName":"Short URLs"},{"description":"SLO APIs enable you to define, manage and track service-level objectives","name":"slo","x-displayName":"Service level objectives"},{"name":"spaces","x-displayName":"Spaces","description":"Manage your Kibana spaces.","externalDocs":{"url":"https://www.elastic.co/docs/deploy-manage/manage-spaces","description":"Space overview"}},{"name":"streams","description":"Streams is a new and experimental way to manage your data in Kibana (currently experimental - expect changes).\n","x-displayName":"Streams"},{"name":"synthetics","x-displayName":"Synthetics","externalDocs":{"description":"Synthetic monitoring","url":"https://www.elastic.co/docs/solutions/observability/synthetics"}},{"name":"system","x-displayName":"System","description":"Get information about the system status, resource usage, features, and installed plugins.\n"},{"description":"Get information about the system status, resource usage, features, and installed plugins.\n","name":"system","x-displayName":"System"},{"externalDocs":{"description":"Task manager","url":"https://www.elastic.co/docs/deploy-manage/distributed-architecture/kibana-tasks-management"},"name":"task manager","x-displayName":"Task manager"},{"description":"The assistant helps you prepare for the next major version of Elasticsearch.","name":"upgrade","x-displayName":"Upgrade assistant"},{"externalDocs":{"description":"Uptime monitoring","url":"https://www.elastic.co/docs/solutions/observability/uptime"},"name":"uptime","x-displayName":"Uptime"},{"name":"user session","x-displayName":"User session management"}],"paths":{"/api/actions/connector_types":{"get":{"description":"You do not need any Kibana feature privileges to run this API.","operationId":"get-actions-connector-types","parameters":[{"description":"A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases).","in":"query","name":"feature_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getConnectorTypesServerlessResponse":{"$ref":"#/components/examples/get_connector_types_generativeai_response"}}}}}},"summary":"Get connector types","tags":["connectors"]}},"/api/actions/connector/{id}":{"delete":{"description":"WARNING: When you delete a connector, it cannot be recovered.","operationId":"delete-actions-connector-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."}},"summary":"Delete a connector","tags":["connectors"]},"get":{"operationId":"get-actions-connector-id","parameters":[{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{},"type":"object"},"connector_type_id":{"description":"The connector type identifier.","type":"string"},"id":{"description":"The identifier for the connector.","type":"string"},"is_deprecated":{"description":"Indicates whether the connector is deprecated.","type":"boolean"},"is_missing_secrets":{"description":"Indicates whether the connector is missing secrets.","type":"boolean"},"is_preconfigured":{"description":"Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ","type":"boolean"},"is_system_action":{"description":"Indicates whether the connector is used for system actions.","type":"boolean"},"name":{"description":" The name of the rule.","type":"string"}},"required":["id","name","connector_type_id","is_preconfigured","is_deprecated","is_system_action"]},"examples":{"getConnectorResponse":{"$ref":"#/components/examples/get_connector_response"}}}},"description":"Indicates a successful call."}},"summary":"Get connector information","tags":["connectors"]},"post":{"operationId":"post-actions-connector-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"connector_type_id":{"description":"The type of connector.","type":"string"},"name":{"description":"The display name for the connector.","type":"string"},"config":{"additionalProperties":{},"default":{},"description":"The connector configuration details.","oneOf":[{"$ref":"#/components/schemas/bedrock_config"},{"$ref":"#/components/schemas/crowdstrike_config"},{"$ref":"#/components/schemas/d3security_config"},{"$ref":"#/components/schemas/email_config"},{"$ref":"#/components/schemas/gemini_config"},{"$ref":"#/components/schemas/resilient_config"},{"$ref":"#/components/schemas/index_config"},{"$ref":"#/components/schemas/jira_config"},{"$ref":"#/components/schemas/genai_azure_config"},{"$ref":"#/components/schemas/genai_openai_config"},{"$ref":"#/components/schemas/opsgenie_config"},{"$ref":"#/components/schemas/pagerduty_config"},{"$ref":"#/components/schemas/sentinelone_config"},{"$ref":"#/components/schemas/servicenow_config"},{"$ref":"#/components/schemas/servicenow_itom_config"},{"$ref":"#/components/schemas/slack_api_config"},{"$ref":"#/components/schemas/swimlane_config"},{"$ref":"#/components/schemas/thehive_config"},{"$ref":"#/components/schemas/tines_config"},{"$ref":"#/components/schemas/torq_config"},{"$ref":"#/components/schemas/webhook_config"},{"$ref":"#/components/schemas/cases_webhook_config"},{"$ref":"#/components/schemas/xmatters_config"}]},"secrets":{"additionalProperties":{},"default":{},"oneOf":[{"$ref":"#/components/schemas/bedrock_secrets"},{"$ref":"#/components/schemas/crowdstrike_secrets"},{"$ref":"#/components/schemas/d3security_secrets"},{"$ref":"#/components/schemas/email_secrets"},{"$ref":"#/components/schemas/gemini_secrets"},{"$ref":"#/components/schemas/resilient_secrets"},{"$ref":"#/components/schemas/jira_secrets"},{"$ref":"#/components/schemas/defender_secrets"},{"$ref":"#/components/schemas/teams_secrets"},{"$ref":"#/components/schemas/genai_secrets"},{"$ref":"#/components/schemas/opsgenie_secrets"},{"$ref":"#/components/schemas/pagerduty_secrets"},{"$ref":"#/components/schemas/sentinelone_secrets"},{"$ref":"#/components/schemas/servicenow_secrets"},{"$ref":"#/components/schemas/slack_api_secrets"},{"$ref":"#/components/schemas/swimlane_secrets"},{"$ref":"#/components/schemas/thehive_secrets"},{"$ref":"#/components/schemas/tines_secrets"},{"$ref":"#/components/schemas/torq_secrets"},{"$ref":"#/components/schemas/webhook_secrets"},{"$ref":"#/components/schemas/cases_webhook_secrets"},{"$ref":"#/components/schemas/xmatters_secrets"}]}},"required":["name","connector_type_id"]},"examples":{"createEmailConnectorRequest":{"$ref":"#/components/examples/create_email_connector_request"},"createIndexConnectorRequest":{"$ref":"#/components/examples/create_index_connector_request"},"createWebhookConnectorRequest":{"$ref":"#/components/examples/create_webhook_connector_request"},"createXmattersConnectorRequest":{"$ref":"#/components/examples/create_xmatters_connector_request"}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{},"type":"object"},"connector_type_id":{"description":"The connector type identifier.","type":"string"},"id":{"description":"The identifier for the connector.","type":"string"},"is_deprecated":{"description":"Indicates whether the connector is deprecated.","type":"boolean"},"is_missing_secrets":{"description":"Indicates whether the connector is missing secrets.","type":"boolean"},"is_preconfigured":{"description":"Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ","type":"boolean"},"is_system_action":{"description":"Indicates whether the connector is used for system actions.","type":"boolean"},"name":{"description":" The name of the rule.","type":"string"}},"required":["id","name","connector_type_id","is_preconfigured","is_deprecated","is_system_action"]},"examples":{"createEmailConnectorResponse":{"$ref":"#/components/examples/create_email_connector_response"},"createIndexConnectorResponse":{"$ref":"#/components/examples/create_index_connector_response"},"createWebhookConnectorResponse":{"$ref":"#/components/examples/create_webhook_connector_response"},"createXmattersConnectorResponse":{"$ref":"#/components/examples/get_connector_response"}}}},"description":"Indicates a successful call."}},"summary":"Create a connector","tags":["connectors"]},"put":{"operationId":"put-actions-connector-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"description":"The display name for the connector.","type":"string"},"config":{"additionalProperties":{},"default":{},"description":"The connector configuration details.","oneOf":[{"$ref":"#/components/schemas/bedrock_config"},{"$ref":"#/components/schemas/crowdstrike_config"},{"$ref":"#/components/schemas/d3security_config"},{"$ref":"#/components/schemas/email_config"},{"$ref":"#/components/schemas/gemini_config"},{"$ref":"#/components/schemas/resilient_config"},{"$ref":"#/components/schemas/index_config"},{"$ref":"#/components/schemas/jira_config"},{"$ref":"#/components/schemas/defender_config"},{"$ref":"#/components/schemas/genai_azure_config"},{"$ref":"#/components/schemas/genai_openai_config"},{"$ref":"#/components/schemas/opsgenie_config"},{"$ref":"#/components/schemas/pagerduty_config"},{"$ref":"#/components/schemas/sentinelone_config"},{"$ref":"#/components/schemas/servicenow_config"},{"$ref":"#/components/schemas/servicenow_itom_config"},{"$ref":"#/components/schemas/slack_api_config"},{"$ref":"#/components/schemas/swimlane_config"},{"$ref":"#/components/schemas/thehive_config"},{"$ref":"#/components/schemas/tines_config"},{"$ref":"#/components/schemas/torq_config"},{"$ref":"#/components/schemas/webhook_config"},{"$ref":"#/components/schemas/cases_webhook_config"},{"$ref":"#/components/schemas/xmatters_config"}]},"secrets":{"additionalProperties":{},"default":{},"oneOf":[{"$ref":"#/components/schemas/bedrock_secrets"},{"$ref":"#/components/schemas/crowdstrike_secrets"},{"$ref":"#/components/schemas/d3security_secrets"},{"$ref":"#/components/schemas/email_secrets"},{"$ref":"#/components/schemas/gemini_secrets"},{"$ref":"#/components/schemas/resilient_secrets"},{"$ref":"#/components/schemas/jira_secrets"},{"$ref":"#/components/schemas/teams_secrets"},{"$ref":"#/components/schemas/genai_secrets"},{"$ref":"#/components/schemas/opsgenie_secrets"},{"$ref":"#/components/schemas/pagerduty_secrets"},{"$ref":"#/components/schemas/sentinelone_secrets"},{"$ref":"#/components/schemas/servicenow_secrets"},{"$ref":"#/components/schemas/slack_api_secrets"},{"$ref":"#/components/schemas/swimlane_secrets"},{"$ref":"#/components/schemas/thehive_secrets"},{"$ref":"#/components/schemas/tines_secrets"},{"$ref":"#/components/schemas/torq_secrets"},{"$ref":"#/components/schemas/webhook_secrets"},{"$ref":"#/components/schemas/cases_webhook_secrets"},{"$ref":"#/components/schemas/xmatters_secrets"}]}},"required":["name"]},"examples":{"updateIndexConnectorRequest":{"$ref":"#/components/examples/update_index_connector_request"}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{},"type":"object"},"connector_type_id":{"description":"The connector type identifier.","type":"string"},"id":{"description":"The identifier for the connector.","type":"string"},"is_deprecated":{"description":"Indicates whether the connector is deprecated.","type":"boolean"},"is_missing_secrets":{"description":"Indicates whether the connector is missing secrets.","type":"boolean"},"is_preconfigured":{"description":"Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ","type":"boolean"},"is_system_action":{"description":"Indicates whether the connector is used for system actions.","type":"boolean"},"name":{"description":" The name of the rule.","type":"string"}},"required":["id","name","connector_type_id","is_preconfigured","is_deprecated","is_system_action"]}}},"description":"Indicates a successful call."}},"summary":"Update a connector","tags":["connectors"]}},"/api/actions/connector/{id}/_execute":{"post":{"description":"You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems.","operationId":"post-actions-connector-id-execute","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"params":{"additionalProperties":{},"oneOf":[{"$ref":"#/components/schemas/run_acknowledge_resolve_pagerduty"},{"$ref":"#/components/schemas/run_documents"},{"$ref":"#/components/schemas/run_message_email"},{"$ref":"#/components/schemas/run_message_serverlog"},{"$ref":"#/components/schemas/run_message_slack"},{"$ref":"#/components/schemas/run_trigger_pagerduty"},{"$ref":"#/components/schemas/run_addevent"},{"$ref":"#/components/schemas/run_closealert"},{"$ref":"#/components/schemas/run_closeincident"},{"$ref":"#/components/schemas/run_createalert"},{"$ref":"#/components/schemas/run_fieldsbyissuetype"},{"$ref":"#/components/schemas/run_getagentdetails"},{"$ref":"#/components/schemas/run_getagents"},{"$ref":"#/components/schemas/run_getchoices"},{"$ref":"#/components/schemas/run_getfields"},{"$ref":"#/components/schemas/run_getincident"},{"$ref":"#/components/schemas/run_issue"},{"$ref":"#/components/schemas/run_issues"},{"$ref":"#/components/schemas/run_issuetypes"},{"$ref":"#/components/schemas/run_postmessage"},{"$ref":"#/components/schemas/run_pushtoservice"},{"$ref":"#/components/schemas/run_validchannelid"}]}},"required":["params"]},"examples":{"runIndexConnectorRequest":{"$ref":"#/components/examples/run_index_connector_request"},"runJiraConnectorRequest":{"$ref":"#/components/examples/run_jira_connector_request"},"runServerLogConnectorRequest":{"$ref":"#/components/examples/run_servicenow_itom_connector_request"},"runSlackConnectorRequest":{"$ref":"#/components/examples/run_slack_api_connector_request"},"runSwimlaneConnectorRequest":{"$ref":"#/components/examples/run_swimlane_connector_request"}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{},"type":"object"},"connector_type_id":{"description":"The connector type identifier.","type":"string"},"id":{"description":"The identifier for the connector.","type":"string"},"is_deprecated":{"description":"Indicates whether the connector is deprecated.","type":"boolean"},"is_missing_secrets":{"description":"Indicates whether the connector is missing secrets.","type":"boolean"},"is_preconfigured":{"description":"Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ","type":"boolean"},"is_system_action":{"description":"Indicates whether the connector is used for system actions.","type":"boolean"},"name":{"description":" The name of the rule.","type":"string"}},"required":["id","name","connector_type_id","is_preconfigured","is_deprecated","is_system_action"]},"examples":{"runIndexConnectorResponse":{"$ref":"#/components/examples/run_index_connector_response"},"runJiraConnectorResponse":{"$ref":"#/components/examples/run_jira_connector_response"},"runServerLogConnectorResponse":{"$ref":"#/components/examples/run_server_log_connector_response"},"runServiceNowITOMConnectorResponse":{"$ref":"#/components/examples/run_servicenow_itom_connector_response"},"runSlackConnectorResponse":{"$ref":"#/components/examples/run_slack_api_connector_response"},"runSwimlaneConnectorResponse":{"$ref":"#/components/examples/run_swimlane_connector_response"}}}},"description":"Indicates a successful call."}},"summary":"Run a connector","tags":["connectors"]}},"/api/actions/connectors":{"get":{"operationId":"get-actions-connectors","parameters":[],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getConnectorsResponse":{"$ref":"#/components/examples/get_connectors_response"}}}}}},"summary":"Get all connectors","tags":["connectors"]}},"/api/alerting/_health":{"get":{"description":"You must have `read` privileges for the **Management \u003e Stack Rules** feature or for at least one of the **Analytics \u003e Discover**, **Analytics \u003e Machine Learning**, **Observability**, or **Security** features.\n","operationId":"getAlertingHealth","responses":{"200":{"content":{"application/json":{"examples":{"getAlertingHealthResponse":{"$ref":"#/components/examples/Alerting_get_health_response"}},"schema":{"type":"object","properties":{"alerting_framework_health":{"description":"Three substates identify the health of the alerting framework: `decryption_health`, `execution_health`, and `read_health`.\n","type":"object","properties":{"decryption_health":{"description":"The timestamp and status of the rule decryption.","type":"object","properties":{"status":{"enum":["error","ok","warn"],"example":"ok","type":"string"},"timestamp":{"example":"2023-01-13T01:28:00.280Z","format":"date-time","type":"string"}}},"execution_health":{"description":"The timestamp and status of the rule run.","type":"object","properties":{"status":{"enum":["error","ok","warn"],"example":"ok","type":"string"},"timestamp":{"example":"2023-01-13T01:28:00.280Z","format":"date-time","type":"string"}}},"read_health":{"description":"The timestamp and status of the rule reading events.","type":"object","properties":{"status":{"enum":["error","ok","warn"],"example":"ok","type":"string"},"timestamp":{"example":"2023-01-13T01:28:00.280Z","format":"date-time","type":"string"}}}}},"has_permanent_encryption_key":{"description":"If `false`, the encrypted saved object plugin does not have a permanent encryption key.","example":true,"type":"boolean"},"is_sufficiently_secure":{"description":"If `false`, security is enabled but TLS is not.","example":true,"type":"boolean"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alerting_401_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get the alerting framework health","tags":["alerting"]}},"/api/alerting/rule_types":{"get":{"description":"If you have `read` privileges for one or more Kibana features, the API response contains information about the appropriate rule types. For example, there are rule types associated with the **Management \u003e Stack Rules** feature, **Analytics \u003e Discover** and **Machine Learning** features, **Observability** features, and **Security** features. To get rule types associated with the **Stack Monitoring** feature, use the `monitoring_user` built-in role.\n","operationId":"getRuleTypes","responses":{"200":{"content":{"application/json":{"examples":{"getRuleTypesResponse":{"$ref":"#/components/examples/Alerting_get_rule_types_response"}},"schema":{"items":{"type":"object","properties":{"action_groups":{"description":"An explicit list of groups for which the rule type can schedule actions, each with the action group's unique ID and human readable name. Rule actions validation uses this configuration to ensure that groups are valid.\n","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"type":"array"},"action_variables":{"description":"A list of action variables that the rule type makes available via context and state in action parameter templates, and a short human readable description. When you create a rule in Kibana, it uses this information to prompt you for these variables in action parameter editors.\n","type":"object","properties":{"context":{"items":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"useWithTripleBracesInTemplates":{"type":"boolean"}}},"type":"array"},"params":{"items":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}}},"type":"array"},"state":{"items":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}}},"type":"array"}}},"alerts":{"description":"Details for writing alerts as data documents for this rule type.\n","type":"object","properties":{"context":{"description":"The namespace for this rule type.\n","enum":["ml.anomaly-detection","observability.apm","observability.logs","observability.metrics","observability.slo","observability.threshold","observability.uptime","security","stack"],"type":"string"},"dynamic":{"description":"Indicates whether new fields are added dynamically.","enum":["false","runtime","strict","true"],"type":"string"},"isSpaceAware":{"description":"Indicates whether the alerts are space-aware. If true, space-specific alert indices are used.\n","type":"boolean"},"mappings":{"type":"object","properties":{"fieldMap":{"additionalProperties":{"$ref":"#/components/schemas/Alerting_fieldmap_properties"},"description":"Mapping information for each field supported in alerts as data documents for this rule type. For more information about mapping parameters, refer to the Elasticsearch documentation.\n","type":"object"}}},"secondaryAlias":{"description":"A secondary alias. It is typically used to support the signals alias for detection rules.\n","type":"string"},"shouldWrite":{"description":"Indicates whether the rule should write out alerts as data.\n","type":"boolean"},"useEcs":{"description":"Indicates whether to include the ECS component template for the alerts.\n","type":"boolean"},"useLegacyAlerts":{"default":false,"description":"Indicates whether to include the legacy component template for the alerts.\n","type":"boolean"}}},"authorized_consumers":{"description":"The list of the plugins IDs that have access to the rule type.","type":"object","properties":{"alerts":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"apm":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"discover":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"infrastructure":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"logs":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"ml":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"monitoring":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"siem":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"slo":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"stackAlerts":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"uptime":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}}}},"category":{"description":"The rule category, which is used by features such as category-specific maintenance windows.","enum":["management","observability","securitySolution"],"type":"string"},"default_action_group_id":{"description":"The default identifier for the rule type group.","type":"string"},"does_set_recovery_context":{"description":"Indicates whether the rule passes context variables to its recovery action.","type":"boolean"},"enabled_in_license":{"description":"Indicates whether the rule type is enabled or disabled based on the subscription.","type":"boolean"},"has_alerts_mappings":{"description":"Indicates whether the rule type has custom mappings for the alert data.","type":"boolean"},"has_fields_for_a_a_d":{"type":"boolean"},"id":{"description":"The unique identifier for the rule type.","type":"string"},"is_exportable":{"description":"Indicates whether the rule type is exportable in **Stack Management \u003e Saved Objects**.","type":"boolean"},"minimum_license_required":{"description":"The subscriptions required to use the rule type.","example":"basic","type":"string"},"name":{"description":"The descriptive name of the rule type.","type":"string"},"producer":{"description":"An identifier for the application that produces this rule type.","example":"stackAlerts","type":"string"},"recovery_action_group":{"description":"An action group to use when an alert goes from an active state to an inactive one.","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"rule_task_timeout":{"example":"5m","type":"string"}}},"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alerting_401_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get the rule types","tags":["alerting"]}},"/api/alerting/rule/{id}":{"delete":{"operationId":"delete-alerting-rule-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Delete a rule","tags":["alerting"]},"get":{"operationId":"get-alerting-rule-id","parameters":[{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"items":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"connector_type_id":{"description":"The type of connector. This property appears in responses but cannot be set in requests.","type":"string"},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id","connector_type_id","params"]},"type":"array"},"active_snoozes":{"items":{"description":"List of active snoozes for the rule.","type":"string"},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"api_key_created_by_user":{"description":"Indicates whether the API key that is associated with the rule was created by the user.","nullable":true,"type":"boolean"},"api_key_owner":{"description":"The owner of the API key that is associated with the rule and used to run background tasks.","nullable":true,"type":"string"},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"description":"User-created content that describes alert causes and remdiation.","type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"created_at":{"description":"The date and time that the rule was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the rule.","nullable":true,"type":"string"},"enabled":{"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"execution_status":{"additionalProperties":false,"type":"object","properties":{"error":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Error message.","type":"string"},"reason":{"description":"Reason for error.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate"],"type":"string"}},"required":["reason","message"]},"last_duration":{"description":"Duration of last execution of the rule.","type":"number"},"last_execution_date":{"description":"The date and time when rule was executed last.","type":"string"},"status":{"description":"Status of rule execution.","enum":["ok","active","error","warning","pending","unknown"],"type":"string"},"warning":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Warning message.","type":"string"},"reason":{"description":"Reason for warning.","enum":["maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"type":"string"}},"required":["reason","message"]}},"required":["status","last_execution_date"]},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"id":{"description":"The identifier for the rule.","type":"string"},"is_snoozed_until":{"description":"The date when the rule will no longer be snoozed.","nullable":true,"type":"string"},"last_run":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"alerts_count":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"Number of active alerts during last run.","nullable":true,"type":"number"},"ignored":{"description":"Number of ignored alerts during last run.","nullable":true,"type":"number"},"new":{"description":"Number of new alerts during last run.","nullable":true,"type":"number"},"recovered":{"description":"Number of recovered alerts during last run.","nullable":true,"type":"number"}}},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"outcome_msg":{"items":{"description":"Outcome message generated during last rule run.","type":"string"},"nullable":true,"type":"array"},"outcome_order":{"description":"Order of the outcome.","type":"number"},"warning":{"description":"Warning of last rule execution.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate","maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"nullable":true,"type":"string"}},"required":["outcome","alerts_count"]},"mapped_params":{"additionalProperties":{},"type":"object"},"monitoring":{"additionalProperties":false,"description":"Monitoring details of the rule.","type":"object","properties":{"run":{"additionalProperties":false,"description":"Rule run details.","type":"object","properties":{"calculated_metrics":{"additionalProperties":false,"description":"Calculation of different percentiles and success ratio.","type":"object","properties":{"p50":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"},"success_ratio":{"type":"number"}},"required":["success_ratio"]},"history":{"description":"History of the rule run.","items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule run.","type":"number"},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"success":{"description":"Indicates whether the rule run was successful.","type":"boolean"},"timestamp":{"description":"Time of rule run.","type":"number"}},"required":["success","timestamp"]},"type":"array"},"last_run":{"additionalProperties":false,"type":"object","properties":{"metrics":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of most recent rule run.","type":"number"},"gap_duration_s":{"description":"Duration in seconds of rule run gap.","nullable":true,"type":"number"},"gap_range":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"gte":{"description":"End of the gap range.","type":"string"},"lte":{"description":"Start of the gap range.","type":"string"}},"required":["lte","gte"]},"total_alerts_created":{"description":"Total number of alerts created during last rule run.","nullable":true,"type":"number"},"total_alerts_detected":{"description":"Total number of alerts detected during last rule run.","nullable":true,"type":"number"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during last rule run in milliseconds.","nullable":true,"type":"number"},"total_search_duration_ms":{"description":"Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.","nullable":true,"type":"number"}}},"timestamp":{"description":"Time of the most recent rule run.","type":"string"}},"required":["timestamp","metrics"]}},"required":["history","calculated_metrics","last_run"]}},"required":["run"]},"mute_all":{"description":"Indicates whether all alerts are muted.","type":"boolean"},"muted_alert_ids":{"items":{"description":"List of identifiers of muted alerts. ","type":"string"},"type":"array"},"name":{"description":" The name of the rule.","type":"string"},"next_run":{"description":"Date and time of the next run of the rule.","nullable":true,"type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the rule.","type":"object"},"revision":{"description":"The rule revision number.","type":"number"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"running":{"description":"Indicates whether the rule is running.","nullable":true,"type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"scheduled_task_id":{"description":"Identifier of the scheduled task.","type":"string"},"snooze_schedule":{"items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule snooze schedule.","type":"number"},"id":{"description":"Identifier of the rule snooze schedule.","type":"string"},"rRule":{"additionalProperties":false,"type":"object","properties":{"byhour":{"items":{"description":"Indicates hours of the day to recur.","type":"number"},"nullable":true,"type":"array"},"byminute":{"items":{"description":"Indicates minutes of the hour to recur.","type":"number"},"nullable":true,"type":"array"},"bymonth":{"items":{"description":"Indicates months of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"bymonthday":{"items":{"description":"Indicates the days of the month to recur.","type":"number"},"nullable":true,"type":"array"},"bysecond":{"items":{"description":"Indicates seconds of the day to recur.","type":"number"},"nullable":true,"type":"array"},"bysetpos":{"items":{"description":"A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.","type":"number"},"nullable":true,"type":"array"},"byweekday":{"items":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination."},"nullable":true,"type":"array"},"byweekno":{"items":{"description":"Indicates number of the week hours to recur.","type":"number"},"nullable":true,"type":"array"},"byyearday":{"items":{"description":"Indicates the days of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"count":{"description":"Number of times the rule should recur until it stops.","type":"number"},"dtstart":{"description":"Rule start date in Coordinated Universal Time (UTC).","type":"string"},"freq":{"description":"Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.","enum":[0,1,2,3,4,5,6],"type":"integer"},"interval":{"description":"Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.","type":"number"},"tzid":{"description":"Indicates timezone abbreviation.","type":"string"},"until":{"description":"Recur the rule until this date.","type":"string"},"wkst":{"description":"Indicates the start of week, defaults to Monday.","enum":["MO","TU","WE","TH","FR","SA","SU"],"type":"string"}},"required":["dtstart","tzid"]},"skipRecurrences":{"items":{"description":"Skips recurrence of rule on this date.","type":"string"},"type":"array"}},"required":["duration","rRule"]},"type":"array"},"tags":{"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"deprecated":true,"description":"Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"updated_at":{"description":"The date and time that the rule was updated most recently.","type":"string"},"updated_by":{"description":"The identifier for the user that updated this rule most recently.","nullable":true,"type":"string"},"view_in_app_relative_url":{"description":"Relative URL to view rule in the app.","nullable":true,"type":"string"}},"required":["id","enabled","name","tags","rule_type_id","consumer","schedule","actions","params","created_by","updated_by","created_at","updated_at","api_key_owner","mute_all","muted_alert_ids","execution_status","revision"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Get rule details","tags":["alerting"]},"post":{"operationId":"post-alerting-rule-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule. If it is omitted, an ID is randomly generated.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"createEsQueryEsqlRuleRequest":{"description":"Create an Elasticsearch query rule that uses Elasticsearch Query Language (ES|QL) to define its query and a server log connector to send notifications.\n","summary":"Elasticsearch query rule (ES|QL)","value":{"actions":[{"frequency":{"notify_when":"onActiveAlert","summary":false},"group":"query matched","id":"d0db1fe0-78d6-11ee-9177-f7d404c8c945","params":{"level":"info","message":"Elasticsearch query rule '{{rule.name}}' is active:\n- Value: {{context.value}} - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date}} - Link: {{context.link}}"}}],"consumer":"stackAlerts","name":"my Elasticsearch query ESQL rule","params":{"esqlQuery":{"esql":"FROM kibana_sample_data_logs | KEEP bytes, clientip, host, geo.dest | where geo.dest != \"GB\" | STATS sumbytes = sum(bytes) by clientip, host | WHERE sumbytes \u003e 5000 | SORT sumbytes desc | LIMIT 10"},"searchType":"esqlQuery","size":0,"threshold":[0],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"d"},"rule_type_id":".es-query","schedule":{"interval":"1d"}}},"createEsQueryKqlRuleRequest":{"description":"Create an Elasticsearch query rule that uses Kibana query language (KQL).","summary":"Elasticsearch query rule (KQL)","value":{"consumer":"alerts","name":"my Elasticsearch query KQL rule","params":{"aggType":"count","excludeHitsFromPreviousRun":true,"groupBy":"all","searchConfiguration":{"index":"90943e30-9a47-11e8-b64d-95841ca0b247","query":{"language":"kuery","query":"\"\"geo.src : \"US\" \"\""}},"searchType":"searchSource","size":100,"threshold":[1000],"thresholdComparator":"\u003e","timeWindowSize":5,"timeWindowUnit":"m"},"rule_type_id":".es-query","schedule":{"interval":"1m"}}},"createEsQueryRuleRequest":{"description":"Create an Elasticsearch query rule that uses Elasticsearch query domain specific language (DSL) to define its query and a server log connector to send notifications.\n","summary":"Elasticsearch query rule (DSL)","value":{"actions":[{"frequency":{"notify_when":"onThrottleInterval","summary":true,"throttle":"1d"},"group":"query matched","id":"fdbece50-406c-11ee-850e-c71febc4ca7f","params":{"level":"info","message":"The system has detected {{alerts.new.count}} new, {{alerts.ongoing.count}} ongoing, and {{alerts.recovered.count}} recovered alerts."}},{"frequency":{"notify_when":"onActionGroupChange","summary":false},"group":"recovered","id":"fdbece50-406c-11ee-850e-c71febc4ca7f","params":{"level":"info","message":"Recovered"}}],"consumer":"alerts","name":"my Elasticsearch query rule","params":{"esQuery":"\"\"\"{\"query\":{\"match_all\" : {}}}\"\"\"","index":["kibana_sample_data_logs"],"size":100,"threshold":[100],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"d"},"rule_type_id":".es-query","schedule":{"interval":"1d"}}},"createIndexThresholdRuleRequest":{"description":"Create an index threshold rule that uses a server log connector to send notifications when the threshold is met.\n","summary":"Index threshold rule","value":{"actions":[{"frequency":{"notify_when":"onActionGroupChange","summary":false},"group":"threshold met","id":"48de3460-f401-11ed-9f8e-399c75a2deeb","params":{"level":"info","message":"Rule '{{rule.name}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}"}}],"alert_delay":{"active":3},"consumer":"alerts","name":"my rule","params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":[".test-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"rule_type_id":".index-threshold","schedule":{"interval":"1m"},"tags":["cpu"]}},"createTrackingContainmentRuleRequest":{"description":"Create a tracking containment rule that checks when an entity is contained or no longer contained within a boundary.\n","summary":"Tracking containment rule","value":{"consumer":"alerts","name":"my tracking rule","params":{"boundaryGeoField":"location","boundaryIndexId":"0cd90abf-abe7-44c7-909a-f621bbbcfefc","boundaryIndexTitle":"boundary*","boundaryNameField":"name","boundaryType":"entireIndex","dateField\"":"@timestamp","entity":"agent.keyword","geoField":"geo.coordinates","index":"kibana_sample_data_logs","indexId":"90943e30-9a47-11e8-b64d-95841ca0b247"},"rule_type_id":".geo-containment","schedule":{"interval":"1h"}}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"default":[],"items":{"additionalProperties":false,"description":"An action that runs under defined conditions.","type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Conditions that affect whether the action runs. If you specify multiple conditions, all conditions must be met for the action to run. For example, if an alert occurs within the specified time frame and matches the query, the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"description":"Defines the range of time in a day that the action can run. If the `start` value is `00:00` and the `end` value is `24:00`, actions be generated all day.","type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"default":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id"]},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"maxItems":10,"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"maxLength":1000,"type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"enabled":{"default":true,"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"name":{"description":"The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule.","type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"schedule":{"additionalProperties":false,"description":"The check interval, which specifies how frequently the rule conditions are checked.","type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"tags":{"default":[],"description":"The tags for the rule.","items":{"type":"string"},"type":"array"},"throttle":{"description":"Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"params":{"additionalProperties":{},"default":{},"description":"The parameters for the rule.","anyOf":[{"$ref":"#/components/schemas/params_property_apm_anomaly"},{"$ref":"#/components/schemas/params_property_apm_error_count"},{"$ref":"#/components/schemas/params_property_apm_transaction_duration"},{"$ref":"#/components/schemas/params_property_apm_transaction_error_rate"},{"$ref":"#/components/schemas/params_es_query_dsl_rule"},{"$ref":"#/components/schemas/params_es_query_esql_rule"},{"$ref":"#/components/schemas/params_es_query_kql_rule"},{"$ref":"#/components/schemas/params_index_threshold_rule"},{"$ref":"#/components/schemas/params_property_infra_inventory"},{"$ref":"#/components/schemas/params_property_log_threshold"},{"$ref":"#/components/schemas/params_property_infra_metric_threshold"},{"$ref":"#/components/schemas/params_property_slo_burn_rate"},{"$ref":"#/components/schemas/params_property_synthetics_uptime_tls"},{"$ref":"#/components/schemas/params_property_synthetics_monitor_status"}]}},"required":["name","rule_type_id","consumer","schedule"]}}}},"responses":{"200":{"content":{"application/json":{"examples":{"createEsQueryEsqlRuleResponse":{"description":"The response for successfully creating an Elasticsearch query rule that uses Elasticsearch Query Language (ES|QL).","summary":"Elasticsearch query rule (ES|QL)","value":{"actions":[{"connector_type_id":".server-log","frequency":{"notify_when":"onActiveAlert","summary":false,"throttle":null},"group":"query matched","id":"d0db1fe0-78d6-11ee-9177-f7d404c8c945","params":{"level":"info","message":"Elasticsearch query rule '{{rule.name}}' is active:\n- Value: {{context.value}} - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date}} - Link: {{context.link}}"},"uuid":"bfe370a3-531b-4855-bbe6-ad739f578844"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"stackAlerts","created_at":"2023-11-01T19:00:10.453Z","created_by":"elastic","enabled":true,"execution_status":{"last_execution_date":"2023-11-01T19:00:10.453Z","status":"pending"},"id":"e0d62360-78e8-11ee-9177-f7d404c8c945","mute_all":false,"muted_alert_ids":[],"name":"my Elasticsearch query ESQL rule","notify_when":null,"params":{"aggType":"count","esqlQuery":{"esql":"FROM kibana_sample_data_logs | keep bytes, clientip, host, geo.dest | WHERE geo.dest != \"GB\" | stats sumbytes = sum(bytes) by clientip, host | WHERE sumbytes \u003e 5000 | sort sumbytes desc | limit 10"},"excludeHitsFromPreviousRun\"":"true,","groupBy":"all","searchType":"esqlQuery","size":0,"threshold":[0],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"d"},"revision":0,"rule_type_id":".es-query","running":false,"schedule":{"interval":"1d"},"scheduled_task_id":"e0d62360-78e8-11ee-9177-f7d404c8c945","tags":[],"throttle":null,"updated_at":"2023-11-01T19:00:10.453Z","updated_by":"elastic\","}},"createEsQueryKqlRuleResponse":{"description":"The response for successfully creating an Elasticsearch query rule that uses Kibana query language (KQL).","summary":"Elasticsearch query rule (KQL)","value":{"actions":[],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2023-07-14T20:24:50.729Z","created_by":"elastic","enabled":true,"execution_status":{"last_execution_date":"2023-07-14T20:24:50.729Z","status":"pending"},"id":"7bd506d0-2284-11ee-8fad-6101956ced88","mute_all":false,"muted_alert_ids":[],"name":"my Elasticsearch query KQL rule\"","notify_when":null,"params":{"aggType":"count","excludeHitsFromPreviousRun":true,"groupBy":"all","searchConfiguration":{"index":"90943e30-9a47-11e8-b64d-95841ca0b247","query":{"language":"kuery","query":"\"\"geo.src : \"US\" \"\""}},"searchType":"searchSource","size":100,"threshold":[1000],"thresholdComparator":"\u003e","timeWindowSize":5,"timeWindowUnit":"m"},"revision":0,"rule_type_id":".es-query","running":false,"schedule":{"interval":"1m"},"scheduled_task_id":"7bd506d0-2284-11ee-8fad-6101956ced88","tags":[],"throttle":null,"updated_at":"2023-07-14T20:24:50.729Z","updated_by":"elastic"}},"createEsQueryRuleResponse":{"description":"The response for successfully creating an Elasticsearch query rule that uses Elasticsearch query domain specific language (DSL).","summary":"Elasticsearch query rule (DSL)","value":{"actions":[{"connector_type_id":".server-log","frequency":{"notify_when":"onThrottleInterval","summary":true,"throttle":"1d"},"group":"query matched","id":"fdbece50-406c-11ee-850e-c71febc4ca7f","params":{"level":"info","message":"The system has detected {{alerts.new.count}} new, {{alerts.ongoing.count}} ongoing, and {{alerts.recovered.count}} recovered alerts."},"uuid":"53f3c2a3-e5d0-4cfa-af3b-6f0881385e78"},{"connector_type_id":".server-log","frequency":{"notify_when":"onActionGroupChange","summary":false,"throttle":null},"group":"recovered","id":"fdbece50-406c-11ee-850e-c71febc4ca7f","params":{"level":"info","message":"Recovered"},"uuid":"2324e45b-c0df-45c7-9d70-4993e30be758"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2023-08-22T00:03:38.263Z","created_by":"elastic","enabled":true,"execution_status":{"last_execution_date":"2023-08-22T00:03:38.263Z","status":"pending"},"id":"58148c70-407f-11ee-850e-c71febc4ca7f","mute_all":false,"muted_alert_ids":[],"name":"my Elasticsearch query rule","notify_when":null,"params":{"aggType":"count","esQuery":"\"\"\"{\"query\":{\"match_all\" : {}}}\"\"\"","excludeHitsFromPreviousRun":true,"groupBy":"all","index":["kibana_sample_data_logs"],"searchType":"esQuery","size":100,"threshold":[100],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"d"},"revision":0,"rule_type_id":".es-query","running":false,"schedule":{"interval":"1d"},"scheduled_task_id":"58148c70-407f-11ee-850e-c71febc4ca7f","tags":[],"throttle":null,"updated_at":"2023-08-22T00:03:38.263Z","updated_by":"elastic"}},"createIndexThresholdRuleResponse":{"description":"The response for successfully creating an index threshold rule.","summary":"Index threshold rule","value":{"actions":[{"connector_type_id":".server-log","frequency":{"notify_when":"onActionGroupChange","summary":false,"throttle":null},"group":"threshold met","id":"dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2","params":{"level":"info","message":"Rule {{rule.name}} is active for group {{context.group} :\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}"},"uuid":"07aef2a0-9eed-4ef9-94ec-39ba58eb609d"}],"alert_delay":{"active":3},"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2022-06-08T17:20:31.632Z","created_by":"elastic","enabled":true,"execution_status":{"last_execution_date":"2022-06-08T17:20:31.632Z","status":"pending"},"id":"41893910-6bca-11eb-9e0d-85d233e3ee35","mute_all":false,"muted_alert_ids":[],"name":"my rule","notify_when":null,"params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":[".test-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"revision":0,"rule_type_id":".index-threshold","running":false,"schedule":{"interval":"1m"},"scheduled_task_id":"425b0800-6bca-11eb-9e0d-85d233e3ee35","tags":["cpu"],"throttle":null,"updated_at":"2022-06-08T17:20:31.632Z","updated_by":"elastic"}},"createTrackingContainmentRuleResponse":{"description":"The response for successfully creating a tracking containment rule.","summary":"Tracking containment rule","value":{"actions":[],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2024-02-14T19:52:55.920Z","created_by":"elastic","enabled":true,"execution_status":{"last_duration":74,"last_execution_date":"2024-02-15T03:25:38.125Z","status":"ok"},"id":"b6883f9d-5f70-4758-a66e-369d7c26012f","last_run":{"alerts_count":{"active":0,"ignored":0,"new":0,"recovered":0},"outcome":"succeeded","outcome_msg":null,"outcome_order":0,"warning":null},"mute_all":false,"muted_alert_ids":[],"name":"my tracking rule","next_run":"2024-02-15T03:26:38.033Z","notify_when":null,"params":{"boundaryGeoField":"location","boundaryIndexId":"0cd90abf-abe7-44c7-909a-f621bbbcfefc","boundaryIndexTitle":"boundary*","boundaryNameField":"name","boundaryType":"entireIndex","dateField":"@timestamp","entity":"agent.keyword","geoField":"geo.coordinates","index":"kibana_sample_data_logs","indexId":"90943e30-9a47-11e8-b64d-95841ca0b247"},"revision":1,"rule_type_id":".geo-containment","running":false,"schedule":{"interval":"1h"},"scheduled_task_id":"b6883f9d-5f70-4758-a66e-369d7c26012f","tags":[],"throttle":null,"updated_at":"2024-02-15T03:24:32.574Z","updated_by":"elastic"}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"items":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"connector_type_id":{"description":"The type of connector. This property appears in responses but cannot be set in requests.","type":"string"},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id","connector_type_id","params"]},"type":"array"},"active_snoozes":{"items":{"description":"List of active snoozes for the rule.","type":"string"},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"api_key_created_by_user":{"description":"Indicates whether the API key that is associated with the rule was created by the user.","nullable":true,"type":"boolean"},"api_key_owner":{"description":"The owner of the API key that is associated with the rule and used to run background tasks.","nullable":true,"type":"string"},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"description":"User-created content that describes alert causes and remdiation.","type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"created_at":{"description":"The date and time that the rule was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the rule.","nullable":true,"type":"string"},"enabled":{"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"execution_status":{"additionalProperties":false,"type":"object","properties":{"error":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Error message.","type":"string"},"reason":{"description":"Reason for error.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate"],"type":"string"}},"required":["reason","message"]},"last_duration":{"description":"Duration of last execution of the rule.","type":"number"},"last_execution_date":{"description":"The date and time when rule was executed last.","type":"string"},"status":{"description":"Status of rule execution.","enum":["ok","active","error","warning","pending","unknown"],"type":"string"},"warning":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Warning message.","type":"string"},"reason":{"description":"Reason for warning.","enum":["maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"type":"string"}},"required":["reason","message"]}},"required":["status","last_execution_date"]},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"id":{"description":"The identifier for the rule.","type":"string"},"is_snoozed_until":{"description":"The date when the rule will no longer be snoozed.","nullable":true,"type":"string"},"last_run":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"alerts_count":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"Number of active alerts during last run.","nullable":true,"type":"number"},"ignored":{"description":"Number of ignored alerts during last run.","nullable":true,"type":"number"},"new":{"description":"Number of new alerts during last run.","nullable":true,"type":"number"},"recovered":{"description":"Number of recovered alerts during last run.","nullable":true,"type":"number"}}},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"outcome_msg":{"items":{"description":"Outcome message generated during last rule run.","type":"string"},"nullable":true,"type":"array"},"outcome_order":{"description":"Order of the outcome.","type":"number"},"warning":{"description":"Warning of last rule execution.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate","maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"nullable":true,"type":"string"}},"required":["outcome","alerts_count"]},"mapped_params":{"additionalProperties":{},"type":"object"},"monitoring":{"additionalProperties":false,"description":"Monitoring details of the rule.","type":"object","properties":{"run":{"additionalProperties":false,"description":"Rule run details.","type":"object","properties":{"calculated_metrics":{"additionalProperties":false,"description":"Calculation of different percentiles and success ratio.","type":"object","properties":{"p50":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"},"success_ratio":{"type":"number"}},"required":["success_ratio"]},"history":{"description":"History of the rule run.","items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule run.","type":"number"},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"success":{"description":"Indicates whether the rule run was successful.","type":"boolean"},"timestamp":{"description":"Time of rule run.","type":"number"}},"required":["success","timestamp"]},"type":"array"},"last_run":{"additionalProperties":false,"type":"object","properties":{"metrics":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of most recent rule run.","type":"number"},"gap_duration_s":{"description":"Duration in seconds of rule run gap.","nullable":true,"type":"number"},"gap_range":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"gte":{"description":"End of the gap range.","type":"string"},"lte":{"description":"Start of the gap range.","type":"string"}},"required":["lte","gte"]},"total_alerts_created":{"description":"Total number of alerts created during last rule run.","nullable":true,"type":"number"},"total_alerts_detected":{"description":"Total number of alerts detected during last rule run.","nullable":true,"type":"number"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during last rule run in milliseconds.","nullable":true,"type":"number"},"total_search_duration_ms":{"description":"Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.","nullable":true,"type":"number"}}},"timestamp":{"description":"Time of the most recent rule run.","type":"string"}},"required":["timestamp","metrics"]}},"required":["history","calculated_metrics","last_run"]}},"required":["run"]},"mute_all":{"description":"Indicates whether all alerts are muted.","type":"boolean"},"muted_alert_ids":{"items":{"description":"List of identifiers of muted alerts. ","type":"string"},"type":"array"},"name":{"description":" The name of the rule.","type":"string"},"next_run":{"description":"Date and time of the next run of the rule.","nullable":true,"type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the rule.","type":"object"},"revision":{"description":"The rule revision number.","type":"number"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"running":{"description":"Indicates whether the rule is running.","nullable":true,"type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"scheduled_task_id":{"description":"Identifier of the scheduled task.","type":"string"},"snooze_schedule":{"items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule snooze schedule.","type":"number"},"id":{"description":"Identifier of the rule snooze schedule.","type":"string"},"rRule":{"additionalProperties":false,"type":"object","properties":{"byhour":{"items":{"description":"Indicates hours of the day to recur.","type":"number"},"nullable":true,"type":"array"},"byminute":{"items":{"description":"Indicates minutes of the hour to recur.","type":"number"},"nullable":true,"type":"array"},"bymonth":{"items":{"description":"Indicates months of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"bymonthday":{"items":{"description":"Indicates the days of the month to recur.","type":"number"},"nullable":true,"type":"array"},"bysecond":{"items":{"description":"Indicates seconds of the day to recur.","type":"number"},"nullable":true,"type":"array"},"bysetpos":{"items":{"description":"A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.","type":"number"},"nullable":true,"type":"array"},"byweekday":{"items":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination."},"nullable":true,"type":"array"},"byweekno":{"items":{"description":"Indicates number of the week hours to recur.","type":"number"},"nullable":true,"type":"array"},"byyearday":{"items":{"description":"Indicates the days of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"count":{"description":"Number of times the rule should recur until it stops.","type":"number"},"dtstart":{"description":"Rule start date in Coordinated Universal Time (UTC).","type":"string"},"freq":{"description":"Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.","enum":[0,1,2,3,4,5,6],"type":"integer"},"interval":{"description":"Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.","type":"number"},"tzid":{"description":"Indicates timezone abbreviation.","type":"string"},"until":{"description":"Recur the rule until this date.","type":"string"},"wkst":{"description":"Indicates the start of week, defaults to Monday.","enum":["MO","TU","WE","TH","FR","SA","SU"],"type":"string"}},"required":["dtstart","tzid"]},"skipRecurrences":{"items":{"description":"Skips recurrence of rule on this date.","type":"string"},"type":"array"}},"required":["duration","rRule"]},"type":"array"},"tags":{"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"deprecated":true,"description":"Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"updated_at":{"description":"The date and time that the rule was updated most recently.","type":"string"},"updated_by":{"description":"The identifier for the user that updated this rule most recently.","nullable":true,"type":"string"},"view_in_app_relative_url":{"description":"Relative URL to view rule in the app.","nullable":true,"type":"string"}},"required":["id","enabled","name","tags","rule_type_id","consumer","schedule","actions","params","created_by","updated_by","created_at","updated_at","api_key_owner","mute_all","muted_alert_ids","execution_status","revision"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"409":{"description":"Indicates that the rule id is already in use."}},"summary":"Create a rule","tags":["alerting"]},"put":{"operationId":"put-alerting-rule-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"updateRuleRequest":{"description":"Update an index threshold rule that uses a server log connector to send notifications when the threshold is met.","summary":"Index threshold rule","value":{"actions":[{"frequency":{"notify_when":"onActionGroupChange","summary":false},"group":"threshold met","id":"96b668d0-a1b6-11ed-afdf-d39a49596974","params":{"level":"info","message":"Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}"}}],"name":"new name","params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":[".updated-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"schedule":{"interval":"1m"},"tags":[]}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"default":[],"items":{"additionalProperties":false,"description":"An action that runs under defined conditions.","type":"object","properties":{"alerts_filter":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"description":"Defines the range of time in a day that the action can run. If the `start` value is `00:00` and the `end` value is `24:00`, actions be generated all day.","type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"default":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id"]},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"maxItems":10,"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"maxLength":1000,"type":"string"}},"required":["blob"]}}},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"name":{"description":"The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule.","type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"default":{},"description":"The parameters for the rule.","type":"object"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"tags":{"default":[],"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"description":"Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["name","schedule"]}}}},"responses":{"200":{"content":{"application/json":{"examples":{"updateRuleResponse":{"description":"The response for successfully updating an index threshold rule.","summary":"Index threshold rule","value":{"actions":[{"connector_type_id":".server-log","frequency":{"notify_when":"onActionGroupChange","summary":false,"throttle":null},"group":"threshold met","id":"96b668d0-a1b6-11ed-afdf-d39a49596974","params":{"level":"info","message":"Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}"},"uuid":"07aef2a0-9eed-4ef9-94ec-39ba58eb609d"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2024-03-26T23:13:20.985Z","created_by":"elastic","enabled":true,"execution_status":{"last_duration":52,"last_execution_date":"2024-03-26T23:22:51.390Z","status":"ok"},"id":"ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74","last_run":{"alerts_count":{"active":0,"ignored":0,"new":0,"recovered":0},"outcome":"succeeded","outcome_msg":null,"warning":null},"mute_all":false,"muted_alert_ids":[],"name":"new name","next_run":"2024-03-26T23:23:51.316Z","params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":[".updated-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"revision":1,"rule_type_id":".index-threshold","running":false,"schedule":{"interval":"1m"},"scheduled_task_id":"4c5eda00-e74f-11ec-b72f-5b18752ff9ea","tags":[],"throttle":null,"updated_at":"2024-03-26T23:22:59.949Z","updated_by":"elastic"}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"items":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"connector_type_id":{"description":"The type of connector. This property appears in responses but cannot be set in requests.","type":"string"},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id","connector_type_id","params"]},"type":"array"},"active_snoozes":{"items":{"description":"List of active snoozes for the rule.","type":"string"},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"api_key_created_by_user":{"description":"Indicates whether the API key that is associated with the rule was created by the user.","nullable":true,"type":"boolean"},"api_key_owner":{"description":"The owner of the API key that is associated with the rule and used to run background tasks.","nullable":true,"type":"string"},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"description":"User-created content that describes alert causes and remdiation.","type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"created_at":{"description":"The date and time that the rule was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the rule.","nullable":true,"type":"string"},"enabled":{"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"execution_status":{"additionalProperties":false,"type":"object","properties":{"error":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Error message.","type":"string"},"reason":{"description":"Reason for error.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate"],"type":"string"}},"required":["reason","message"]},"last_duration":{"description":"Duration of last execution of the rule.","type":"number"},"last_execution_date":{"description":"The date and time when rule was executed last.","type":"string"},"status":{"description":"Status of rule execution.","enum":["ok","active","error","warning","pending","unknown"],"type":"string"},"warning":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Warning message.","type":"string"},"reason":{"description":"Reason for warning.","enum":["maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"type":"string"}},"required":["reason","message"]}},"required":["status","last_execution_date"]},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"id":{"description":"The identifier for the rule.","type":"string"},"is_snoozed_until":{"description":"The date when the rule will no longer be snoozed.","nullable":true,"type":"string"},"last_run":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"alerts_count":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"Number of active alerts during last run.","nullable":true,"type":"number"},"ignored":{"description":"Number of ignored alerts during last run.","nullable":true,"type":"number"},"new":{"description":"Number of new alerts during last run.","nullable":true,"type":"number"},"recovered":{"description":"Number of recovered alerts during last run.","nullable":true,"type":"number"}}},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"outcome_msg":{"items":{"description":"Outcome message generated during last rule run.","type":"string"},"nullable":true,"type":"array"},"outcome_order":{"description":"Order of the outcome.","type":"number"},"warning":{"description":"Warning of last rule execution.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate","maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"nullable":true,"type":"string"}},"required":["outcome","alerts_count"]},"mapped_params":{"additionalProperties":{},"type":"object"},"monitoring":{"additionalProperties":false,"description":"Monitoring details of the rule.","type":"object","properties":{"run":{"additionalProperties":false,"description":"Rule run details.","type":"object","properties":{"calculated_metrics":{"additionalProperties":false,"description":"Calculation of different percentiles and success ratio.","type":"object","properties":{"p50":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"},"success_ratio":{"type":"number"}},"required":["success_ratio"]},"history":{"description":"History of the rule run.","items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule run.","type":"number"},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"success":{"description":"Indicates whether the rule run was successful.","type":"boolean"},"timestamp":{"description":"Time of rule run.","type":"number"}},"required":["success","timestamp"]},"type":"array"},"last_run":{"additionalProperties":false,"type":"object","properties":{"metrics":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of most recent rule run.","type":"number"},"gap_duration_s":{"description":"Duration in seconds of rule run gap.","nullable":true,"type":"number"},"gap_range":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"gte":{"description":"End of the gap range.","type":"string"},"lte":{"description":"Start of the gap range.","type":"string"}},"required":["lte","gte"]},"total_alerts_created":{"description":"Total number of alerts created during last rule run.","nullable":true,"type":"number"},"total_alerts_detected":{"description":"Total number of alerts detected during last rule run.","nullable":true,"type":"number"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during last rule run in milliseconds.","nullable":true,"type":"number"},"total_search_duration_ms":{"description":"Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.","nullable":true,"type":"number"}}},"timestamp":{"description":"Time of the most recent rule run.","type":"string"}},"required":["timestamp","metrics"]}},"required":["history","calculated_metrics","last_run"]}},"required":["run"]},"mute_all":{"description":"Indicates whether all alerts are muted.","type":"boolean"},"muted_alert_ids":{"items":{"description":"List of identifiers of muted alerts. ","type":"string"},"type":"array"},"name":{"description":" The name of the rule.","type":"string"},"next_run":{"description":"Date and time of the next run of the rule.","nullable":true,"type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the rule.","type":"object"},"revision":{"description":"The rule revision number.","type":"number"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"running":{"description":"Indicates whether the rule is running.","nullable":true,"type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"scheduled_task_id":{"description":"Identifier of the scheduled task.","type":"string"},"snooze_schedule":{"items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule snooze schedule.","type":"number"},"id":{"description":"Identifier of the rule snooze schedule.","type":"string"},"rRule":{"additionalProperties":false,"type":"object","properties":{"byhour":{"items":{"description":"Indicates hours of the day to recur.","type":"number"},"nullable":true,"type":"array"},"byminute":{"items":{"description":"Indicates minutes of the hour to recur.","type":"number"},"nullable":true,"type":"array"},"bymonth":{"items":{"description":"Indicates months of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"bymonthday":{"items":{"description":"Indicates the days of the month to recur.","type":"number"},"nullable":true,"type":"array"},"bysecond":{"items":{"description":"Indicates seconds of the day to recur.","type":"number"},"nullable":true,"type":"array"},"bysetpos":{"items":{"description":"A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.","type":"number"},"nullable":true,"type":"array"},"byweekday":{"items":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination."},"nullable":true,"type":"array"},"byweekno":{"items":{"description":"Indicates number of the week hours to recur.","type":"number"},"nullable":true,"type":"array"},"byyearday":{"items":{"description":"Indicates the days of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"count":{"description":"Number of times the rule should recur until it stops.","type":"number"},"dtstart":{"description":"Rule start date in Coordinated Universal Time (UTC).","type":"string"},"freq":{"description":"Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.","enum":[0,1,2,3,4,5,6],"type":"integer"},"interval":{"description":"Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.","type":"number"},"tzid":{"description":"Indicates timezone abbreviation.","type":"string"},"until":{"description":"Recur the rule until this date.","type":"string"},"wkst":{"description":"Indicates the start of week, defaults to Monday.","enum":["MO","TU","WE","TH","FR","SA","SU"],"type":"string"}},"required":["dtstart","tzid"]},"skipRecurrences":{"items":{"description":"Skips recurrence of rule on this date.","type":"string"},"type":"array"}},"required":["duration","rRule"]},"type":"array"},"tags":{"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"deprecated":true,"description":"Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"updated_at":{"description":"The date and time that the rule was updated most recently.","type":"string"},"updated_by":{"description":"The identifier for the user that updated this rule most recently.","nullable":true,"type":"string"},"view_in_app_relative_url":{"description":"Relative URL to view rule in the app.","nullable":true,"type":"string"}},"required":["id","enabled","name","tags","rule_type_id","consumer","schedule","actions","params","created_by","updated_by","created_at","updated_at","api_key_owner","mute_all","muted_alert_ids","execution_status","revision"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."},"409":{"description":"Indicates that the rule has already been updated by another user."}},"summary":"Update a rule","tags":["alerting"]}},"/api/alerting/rule/{id}/_disable":{"post":{"operationId":"post-alerting-rule-id-disable","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"untrack":{"description":"Defines whether this rule's alerts should be untracked.","type":"boolean"}},"x-oas-optional":true}}}},"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Disable a rule","tags":["alerting"]}},"/api/alerting/rule/{id}/_enable":{"post":{"operationId":"post-alerting-rule-id-enable","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Enable a rule","tags":["alerting"]}},"/api/alerting/rule/{id}/_mute_all":{"post":{"operationId":"post-alerting-rule-id-mute-all","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Mute all alerts","tags":["alerting"]}},"/api/alerting/rule/{id}/_unmute_all":{"post":{"operationId":"post-alerting-rule-id-unmute-all","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Unmute all alerts","tags":["alerting"]}},"/api/alerting/rule/{id}/_update_api_key":{"post":{"operationId":"post-alerting-rule-id-update-api-key","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."},"409":{"description":"Indicates that the rule has already been updated by another user."}},"summary":"Update the API key for a rule","tags":["alerting"]}},"/api/alerting/rule/{id}/snooze_schedule":{"post":{"description":"When you snooze a rule, the rule checks continue to run but alerts will not generate actions. You can snooze for a specified period of time and schedule single or recurring downtimes.","operationId":"post-alerting-rule-id-snooze-schedule","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"Identifier of the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","minimum":1,"type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"maximum":12,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"maximum":31,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"minItems":1,"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}}}},"required":["schedule"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"body":{"additionalProperties":false,"type":"object","properties":{"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","minimum":1,"type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"maximum":12,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"maximum":31,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"minItems":1,"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]},"id":{"description":"Identifier of the snooze schedule.","type":"string"}},"required":["id"]}},"required":["schedule"]}},"required":["body"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given id does not exist."}},"summary":"Schedule a snooze for the rule","tags":["alerting"],"x-state":"Generally available; added in 8.19.0"}},"/api/alerting/rule/{rule_id}/alert/{alert_id}/_mute":{"post":{"operationId":"post-alerting-rule-rule-id-alert-alert-id-mute","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"rule_id","required":true,"schema":{"type":"string"}},{"description":"The identifier for the alert.","in":"path","name":"alert_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule or alert with the given ID does not exist."}},"summary":"Mute an alert","tags":["alerting"]}},"/api/alerting/rule/{rule_id}/alert/{alert_id}/_unmute":{"post":{"operationId":"post-alerting-rule-rule-id-alert-alert-id-unmute","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"rule_id","required":true,"schema":{"type":"string"}},{"description":"The identifier for the alert.","in":"path","name":"alert_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule or alert with the given ID does not exist."}},"summary":"Unmute an alert","tags":["alerting"]}},"/api/alerting/rule/{ruleId}/snooze_schedule/{scheduleId}":{"delete":{"operationId":"delete-alerting-rule-ruleid-snooze-schedule-scheduleid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"ruleId","required":true,"schema":{"type":"string"}},{"description":"The identifier for the snooze schedule.","in":"path","name":"scheduleId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given id does not exist."}},"summary":"Delete a snooze schedule for a rule","tags":["alerting"],"x-state":"Generally available; added in 8.19.0"}},"/api/alerting/rules/_find":{"get":{"operationId":"get-alerting-rules-find","parameters":[{"description":"The number of rules to return per page.","in":"query","name":"per_page","required":false,"schema":{"default":10,"minimum":0,"type":"number"}},{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"number"}},{"description":"An Elasticsearch simple_query_string query that filters the objects in the response.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"The default operator to use for the simple_query_string.","in":"query","name":"default_search_operator","required":false,"schema":{"default":"OR","enum":["OR","AND"],"type":"string"}},{"description":"The fields to perform the simple_query_string parsed query against.","in":"query","name":"search_fields","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]}},{"description":"Determines which field is used to sort the results. The field must exist in the `attributes` key of the response.","in":"query","name":"sort_field","required":false,"schema":{"type":"string"}},{"description":"Determines the sort order.","in":"query","name":"sort_order","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"description":"Filters the rules that have a relation with the reference objects with a specific type and identifier.","in":"query","name":"has_reference","required":false,"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]}},{"in":"query","name":"fields","required":false,"schema":{"items":{"description":"The fields to return in the `attributes` key of the response.","type":"string"},"type":"array"}},{"description":"A KQL string that you filter with an attribute from your saved object. It should look like `savedObjectType.attributes.title: \"myTitle\"`. However, if you used a direct attribute of a saved object, such as `updatedAt`, you must define your filter, for example, `savedObjectType.updatedAt \u003e 2018-12-22`.","in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"in":"query","name":"filter_consumers","required":false,"schema":{"items":{"description":"List of consumers to filter.","type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"examples":{"findConditionalActionRulesResponse":{"description":"A response that contains information about an index threshold rule.","summary":"Index threshold rule","value":{"data":[{"actions":[{"frequency":{"notify_when":"onActionGroupChange","summary":false,"throttle":null},"group":"threshold met","id":"9dca3e00-74f5-11ed-9801-35303b735aef","params":{"connector_type_id":".server-log","level":"info","message":"Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}"},"uuid":"1c7a1280-f28c-4e06-96b2-e4e5f05d1d61"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2022-12-05T23:40:33.132Z","created_by":"elastic","enabled":true,"execution_status":{"last_duration":48,"last_execution_date":"2022-12-06T01:44:23.983Z","status":"ok"},"id":"3583a470-74f6-11ed-9801-35303b735aef","last_run":{"alerts_count":{"active":0,"ignored":0,"new":0,"recovered":0},"outcome":"succeeded","outcome_msg":null,"warning":null},"mute_all":false,"muted_alert_ids":[],"name":"my alert","next_run":"2022-12-06T01:45:23.912Z","params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":["test-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"revision":1,"rule_type_id":".index-threshold","schedule":{"interval":"1m"},"scheduled_task_id":"3583a470-74f6-11ed-9801-35303b735aef","tags":["cpu"],"throttle":null,"updated_at":"2022-12-05T23:40:33.132Z","updated_by":"elastic"}],"page":1,"per_page":10,"total":1}},"findRulesResponse":{"description":"A response that contains information about a security rule that has conditional actions.","summary":"Security rule","value":{"data":[{"actions":[{"alerts_filter":{"query":{"filters":[{"$state":{"store":"appState"},"meta":{"alias":null,"disabled":false,"field":"client.geo.region_iso_code","index":"c4bdca79-e69e-4d80-82a1-e5192c621bea","key":"client.geo.region_iso_code","negate":false,"params":{"query":"CA-QC","type":"phrase"}},"query":{"match_phrase":{"client.geo.region_iso_code":"CA-QC"}}}],"kql":""},"timeframe":{"days":[7],"hours":{"end":"17:00","start":"08:00"},"timezone":"UTC"}},"connector_type_id":".index","frequency":{"notify_when":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"49eae970-f401-11ed-9f8e-399c75a2deeb","params":{"documents":[{"alert_id":{"[object Object]":null},"context_message":{"[object Object]":null},"rule_id":{"[object Object]":null},"rule_name":{"[object Object]":null}}]},"uuid":"1c7a1280-f28c-4e06-96b2-e4e5f05d1d61"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"siem","created_at":"2023-05-16T15:50:28.358Z","created_by":"elastic","enabled":true,"execution_status":{"last_duration":166,"last_execution_date":"2023-05-16T20:26:49.590Z","status":"ok"},"id":"6107a8f0-f401-11ed-9f8e-399c75a2deeb","last_run":{"alerts_count":{"active":0,"ignored":0,"new":0,"recovered":0},"outcome":"succeeded","outcome_msg":["Rule execution completed successfully"],"outcome_order":0,"warning":null},"mute_all":false,"muted_alert_ids":[],"name":"security_rule","next_run":"2023-05-16T20:27:49.507Z","notify_when":null,"params":{"author":[],"description":"A security threshold rule.","exceptionsList":[],"falsePositives":[],"filters":[],"from":"now-3660s","immutable":false,"index":["kibana_sample_data_logs"],"language":"kuery","license":"","maxSignals":100,"meta":{"from":"1h","kibana_siem_app_url":"https://localhost:5601/app/security"},"outputIndex":"","query":"*","references":[],"riskScore":21,"riskScoreMapping":[],"ruleId":"an_internal_rule_id","severity":"low","severityMapping":[],"threat":[],"threshold":{"cardinality":[],"field":["bytes"],"value":1},"to":"now","type":"threshold","version":1},"revision":1,"rule_type_id":"siem.thresholdRule","running":false,"schedule":{"interval":"1m"},"scheduled_task_id":"6107a8f0-f401-11ed-9f8e-399c75a2deeb","tags":[],"throttle":null,"updated_at":"2023-05-16T20:25:42.559Z","updated_by":"elastic"}],"page":1,"per_page":10,"total":1}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"items":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"connector_type_id":{"description":"The type of connector. This property appears in responses but cannot be set in requests.","type":"string"},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id","connector_type_id","params"]},"type":"array"},"active_snoozes":{"items":{"description":"List of active snoozes for the rule.","type":"string"},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"api_key_created_by_user":{"description":"Indicates whether the API key that is associated with the rule was created by the user.","nullable":true,"type":"boolean"},"api_key_owner":{"description":"The owner of the API key that is associated with the rule and used to run background tasks.","nullable":true,"type":"string"},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"description":"User-created content that describes alert causes and remdiation.","type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"created_at":{"description":"The date and time that the rule was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the rule.","nullable":true,"type":"string"},"enabled":{"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"execution_status":{"additionalProperties":false,"type":"object","properties":{"error":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Error message.","type":"string"},"reason":{"description":"Reason for error.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate"],"type":"string"}},"required":["reason","message"]},"last_duration":{"description":"Duration of last execution of the rule.","type":"number"},"last_execution_date":{"description":"The date and time when rule was executed last.","type":"string"},"status":{"description":"Status of rule execution.","enum":["ok","active","error","warning","pending","unknown"],"type":"string"},"warning":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Warning message.","type":"string"},"reason":{"description":"Reason for warning.","enum":["maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"type":"string"}},"required":["reason","message"]}},"required":["status","last_execution_date"]},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"id":{"description":"The identifier for the rule.","type":"string"},"is_snoozed_until":{"description":"The date when the rule will no longer be snoozed.","nullable":true,"type":"string"},"last_run":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"alerts_count":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"Number of active alerts during last run.","nullable":true,"type":"number"},"ignored":{"description":"Number of ignored alerts during last run.","nullable":true,"type":"number"},"new":{"description":"Number of new alerts during last run.","nullable":true,"type":"number"},"recovered":{"description":"Number of recovered alerts during last run.","nullable":true,"type":"number"}}},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"outcome_msg":{"items":{"description":"Outcome message generated during last rule run.","type":"string"},"nullable":true,"type":"array"},"outcome_order":{"description":"Order of the outcome.","type":"number"},"warning":{"description":"Warning of last rule execution.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate","maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"nullable":true,"type":"string"}},"required":["outcome","alerts_count"]},"mapped_params":{"additionalProperties":{},"type":"object"},"monitoring":{"additionalProperties":false,"description":"Monitoring details of the rule.","type":"object","properties":{"run":{"additionalProperties":false,"description":"Rule run details.","type":"object","properties":{"calculated_metrics":{"additionalProperties":false,"description":"Calculation of different percentiles and success ratio.","type":"object","properties":{"p50":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"},"success_ratio":{"type":"number"}},"required":["success_ratio"]},"history":{"description":"History of the rule run.","items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule run.","type":"number"},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"success":{"description":"Indicates whether the rule run was successful.","type":"boolean"},"timestamp":{"description":"Time of rule run.","type":"number"}},"required":["success","timestamp"]},"type":"array"},"last_run":{"additionalProperties":false,"type":"object","properties":{"metrics":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of most recent rule run.","type":"number"},"gap_duration_s":{"description":"Duration in seconds of rule run gap.","nullable":true,"type":"number"},"gap_range":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"gte":{"description":"End of the gap range.","type":"string"},"lte":{"description":"Start of the gap range.","type":"string"}},"required":["lte","gte"]},"total_alerts_created":{"description":"Total number of alerts created during last rule run.","nullable":true,"type":"number"},"total_alerts_detected":{"description":"Total number of alerts detected during last rule run.","nullable":true,"type":"number"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during last rule run in milliseconds.","nullable":true,"type":"number"},"total_search_duration_ms":{"description":"Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.","nullable":true,"type":"number"}}},"timestamp":{"description":"Time of the most recent rule run.","type":"string"}},"required":["timestamp","metrics"]}},"required":["history","calculated_metrics","last_run"]}},"required":["run"]},"mute_all":{"description":"Indicates whether all alerts are muted.","type":"boolean"},"muted_alert_ids":{"items":{"description":"List of identifiers of muted alerts. ","type":"string"},"type":"array"},"name":{"description":" The name of the rule.","type":"string"},"next_run":{"description":"Date and time of the next run of the rule.","nullable":true,"type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the rule.","type":"object"},"revision":{"description":"The rule revision number.","type":"number"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"running":{"description":"Indicates whether the rule is running.","nullable":true,"type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"scheduled_task_id":{"description":"Identifier of the scheduled task.","type":"string"},"snooze_schedule":{"items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule snooze schedule.","type":"number"},"id":{"description":"Identifier of the rule snooze schedule.","type":"string"},"rRule":{"additionalProperties":false,"type":"object","properties":{"byhour":{"items":{"description":"Indicates hours of the day to recur.","type":"number"},"nullable":true,"type":"array"},"byminute":{"items":{"description":"Indicates minutes of the hour to recur.","type":"number"},"nullable":true,"type":"array"},"bymonth":{"items":{"description":"Indicates months of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"bymonthday":{"items":{"description":"Indicates the days of the month to recur.","type":"number"},"nullable":true,"type":"array"},"bysecond":{"items":{"description":"Indicates seconds of the day to recur.","type":"number"},"nullable":true,"type":"array"},"bysetpos":{"items":{"description":"A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.","type":"number"},"nullable":true,"type":"array"},"byweekday":{"items":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination."},"nullable":true,"type":"array"},"byweekno":{"items":{"description":"Indicates number of the week hours to recur.","type":"number"},"nullable":true,"type":"array"},"byyearday":{"items":{"description":"Indicates the days of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"count":{"description":"Number of times the rule should recur until it stops.","type":"number"},"dtstart":{"description":"Rule start date in Coordinated Universal Time (UTC).","type":"string"},"freq":{"description":"Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.","enum":[0,1,2,3,4,5,6],"type":"integer"},"interval":{"description":"Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.","type":"number"},"tzid":{"description":"Indicates timezone abbreviation.","type":"string"},"until":{"description":"Recur the rule until this date.","type":"string"},"wkst":{"description":"Indicates the start of week, defaults to Monday.","enum":["MO","TU","WE","TH","FR","SA","SU"],"type":"string"}},"required":["dtstart","tzid"]},"skipRecurrences":{"items":{"description":"Skips recurrence of rule on this date.","type":"string"},"type":"array"}},"required":["duration","rRule"]},"type":"array"},"tags":{"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"deprecated":true,"description":"Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"updated_at":{"description":"The date and time that the rule was updated most recently.","type":"string"},"updated_by":{"description":"The identifier for the user that updated this rule most recently.","nullable":true,"type":"string"},"view_in_app_relative_url":{"description":"Relative URL to view rule in the app.","nullable":true,"type":"string"}},"required":["id","enabled","name","tags","rule_type_id","consumer","schedule","actions","params","created_by","updated_by","created_at","updated_at","api_key_owner","mute_all","muted_alert_ids","execution_status","revision"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."}},"summary":"Get information about rules","tags":["alerting"]}},"/api/apm/agent_keys":{"post":{"description":"Create a new agent key for APM.\nThe user creating an APM agent API key must have at least the `manage_own_api_key` cluster privilege and the APM application-level privileges that it wishes to grant.\nAfter it is created, you can copy the API key (Base64 encoded) and use it to to authorize requests from APM agents to the APM Server.\n","operationId":"createAgentKey","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"createAgentKeyRequest1":{"$ref":"#/components/examples/APM_UI_agent_keys_object_post_request1"}},"schema":{"$ref":"#/components/schemas/APM_UI_agent_keys_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"createAgentKeyResponse1":{"$ref":"#/components/examples/APM_UI_agent_keys_object_post_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_agent_keys_response"}}},"description":"Agent key created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"}},"summary":"Create an APM agent key","tags":["APM agent keys"]}},"/api/apm/fleet/apm_server_schema":{"post":{"operationId":"saveApmServerSchema","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"additionalProperties":true,"description":"Schema object","example":{"foo":"bar"},"type":"object"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Save APM server schema","tags":["APM server schema"]}},"/api/apm/services/{serviceName}/annotation":{"post":{"description":"Create a new annotation for a specific service.","operationId":"createAnnotation","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"},{"description":"The name of the service","in":"path","name":"serviceName","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_create_annotation_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"createAnnotationResponse1":{"$ref":"#/components/examples/APM_UI_annotation_object_post_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_create_annotation_response"}}},"description":"Annotation created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Create a service annotation","tags":["APM annotations"],"x-codeSamples":[{"lang":"Curl","source":"curl -X POST \\\nhttp://localhost:5601/api/apm/services/opbeans-java/annotation \\\n-H 'Content-Type: application/json' \\\n-H 'kbn-xsrf: true' \\\n-H 'Authorization: Basic YhUlubWZhM0FDbnlQeE6WRtaW49FQmSGZ4RUWXdX' \\\n-d '{\n \"@timestamp\": \"2020-05-08T10:31:30.452Z\",\n \"service\": {\n \"version\": \"1.2\"\n },\n \"message\": \"Deployment 1.2\"\n }'\n"}]}},"/api/apm/services/{serviceName}/annotation/search":{"get":{"description":"Search for annotations related to a specific service.","operationId":"getAnnotation","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"The name of the service","in":"path","name":"serviceName","required":true,"schema":{"type":"string"}},{"description":"The environment to filter annotations by","in":"query","name":"environment","required":false,"schema":{"type":"string"}},{"description":"The start date for the search","in":"query","name":"start","required":false,"schema":{"type":"string"}},{"description":"The end date for the search","in":"query","name":"end","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_annotation_search_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"}},"summary":"Search for annotations","tags":["APM annotations"]}},"/api/apm/settings/agent-configuration":{"delete":{"operationId":"deleteAgentConfiguration","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"deleteAgentConfigurationRequest1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_delete_request1"}},"schema":{"$ref":"#/components/schemas/APM_UI_service_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_delete_agent_configurations_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Delete agent configuration","tags":["APM agent configuration"]},"get":{"operationId":"getAgentConfigurations","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"}],"responses":{"200":{"content":{"application/json":{"examples":{"getAgentConfigurationsResponseExample1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_get_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_agent_configurations_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Get a list of agent configurations","tags":["APM agent configuration"]},"put":{"operationId":"createUpdateAgentConfiguration","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"},{"description":"If the config exists ?overwrite=true is required","in":"query","name":"overwrite","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"examples":{"createUpdateAgentConfigurationRequestExample1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_put_request1"}},"schema":{"$ref":"#/components/schemas/APM_UI_agent_configuration_intake_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Create or update agent configuration","tags":["APM agent configuration"]}},"/api/apm/settings/agent-configuration/agent_name":{"get":{"description":"Retrieve `agentName` for a service.","operationId":"getAgentNameForService","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"The name of the service","example":"node","in":"query","name":"serviceName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_service_agent_name_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Get agent name for service","tags":["APM agent configuration"]}},"/api/apm/settings/agent-configuration/environments":{"get":{"operationId":"getEnvironmentsForService","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"The name of the service","in":"query","name":"serviceName","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_service_environments_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Get environments for service","tags":["APM agent configuration"]}},"/api/apm/settings/agent-configuration/search":{"post":{"description":"This endpoint enables you to search for a single agent configuration and update the 'applied_by_agent' field.\n","operationId":"searchSingleConfiguration","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"searchSingleConfigurationRequest1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_search_request1"}},"schema":{"$ref":"#/components/schemas/APM_UI_search_agent_configuration_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"searchSingleConfigurationResponse1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_search_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_search_agent_configuration_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Lookup single agent configuration","tags":["APM agent configuration"]}},"/api/apm/settings/agent-configuration/view":{"get":{"operationId":"getSingleAgentConfiguration","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"Service name","example":"node","in":"query","name":"name","schema":{"type":"string"}},{"description":"Service environment","example":"prod","in":"query","name":"environment","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_single_agent_configuration_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Get single agent configuration","tags":["APM agent configuration"]}},"/api/apm/sourcemaps":{"get":{"description":"Get an array of Fleet artifacts, including source map uploads. You must have `read` or `all` Kibana privileges for the APM and User Experience feature.\n","operationId":"getSourceMaps","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"Page number","in":"query","name":"page","schema":{"type":"number"}},{"description":"Number of records per page","in":"query","name":"perPage","schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getSourceMapsResponse1":{"$ref":"#/components/examples/APM_UI_source_maps_get_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_source_maps_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_501_response"}}},"description":"Not Implemented response"}},"summary":"Get source maps","tags":["APM sourcemaps"],"x-codeSamples":[{"lang":"Curl","source":"curl -X GET \"http://localhost:5601/api/apm/sourcemaps\" \\\n-H 'Content-Type: application/json' \\\n-H 'kbn-xsrf: true' \\\n-H 'Authorization: ApiKey ${YOUR_API_KEY}'\n"}]},"post":{"description":"Upload a source map for a specific service and version. You must have `all` Kibana privileges for the APM and User Experience feature.\nThe maximum payload size is `1mb`. If you attempt to upload a source map that exceeds the maximum payload size, you will get a 413 error. Before uploading source maps that exceed this default, change the maximum payload size allowed by Kibana with the `server.maxPayload` variable.\n","operationId":"uploadSourceMap","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/APM_UI_upload_source_map_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"uploadSourceMapResponse1":{"$ref":"#/components/examples/APM_UI_source_maps_upload_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_upload_source_maps_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_501_response"}}},"description":"Not Implemented response"}},"summary":"Upload a source map","tags":["APM sourcemaps"],"x-codeSamples":[{"lang":"Curl","source":"curl -X POST \"http://localhost:5601/api/apm/sourcemaps\" \\\n-H 'Content-Type: multipart/form-data' \\\n-H 'kbn-xsrf: true' \\\n-H 'Authorization: ApiKey ${YOUR_API_KEY}' \\\n-F 'service_name=\"foo\"' \\\n-F 'service_version=\"1.0.0\"' \\\n-F 'bundle_filepath=\"/test/e2e/general-usecase/bundle.js\"' \\\n-F 'sourcemap=\"{\\\"version\\\":3,\\\"file\\\":\\\"static/js/main.chunk.js\\\",\\\"sources\\\":[\\\"fleet-source-map-client/src/index.css\\\",\\\"fleet-source-map-client/src/App.js\\\",\\\"webpack:///./src/index.css?bb0a\\\",\\\"fleet-source-map-client/src/index.js\\\",\\\"fleet-source-map-client/src/reportWebVitals.js\\\"],\\\"sourcesContent\\\":[\\\"content\\\"],\\\"mappings\\\":\\\"mapping\\\",\\\"sourceRoot\\\":\\\"\\\"}\"' \n"}]}},"/api/apm/sourcemaps/{id}":{"delete":{"description":"Delete a previously uploaded source map. You must have `all` Kibana privileges for the APM and User Experience feature.\n","operationId":"deleteSourceMap","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"},{"description":"Source map identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_501_response"}}},"description":"Not Implemented response"}},"summary":"Delete source map","tags":["APM sourcemaps"],"x-codeSamples":[{"lang":"Curl","source":"curl -X DELETE \"http://localhost:5601/api/apm/sourcemaps/apm:foo-1.0.0-644fd5a9\" \\\n-H 'Content-Type: application/json' \\\n-H 'kbn-xsrf: true' \\\n-H 'Authorization: ApiKey ${YOUR_API_KEY}'\n"}]}},"/api/asset_criticality":{"delete":{"description":"Delete the asset criticality record for a specific entity.","operationId":"DeleteAssetCriticalityRecord","parameters":[{"description":"The ID value of the asset.","example":"my_host","in":"query","name":"id_value","required":true,"schema":{"type":"string"}},{"description":"The field representing the ID.","example":"host.name","in":"query","name":"id_field","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IdField"}},{"description":"If 'wait_for' the request will wait for the index refresh.","in":"query","name":"refresh","required":false,"schema":{"enum":["wait_for"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"description":"True if the record was deleted or false if the record did not exist.","type":"boolean"},"record":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecord","description":"The deleted record if it existed."}},"required":["deleted"]}}},"description":"Successful response"},"400":{"description":"Invalid request"}},"summary":"Delete an asset criticality record","tags":["Security Entity Analytics API"]},"get":{"description":"Get the asset criticality record for a specific entity.","operationId":"GetAssetCriticalityRecord","parameters":[{"description":"The ID value of the asset.","example":"my_host","in":"query","name":"id_value","required":true,"schema":{"type":"string"}},{"description":"The field representing the ID.","example":"host.name","in":"query","name":"id_field","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IdField"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecord"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"404":{"description":"Criticality record not found"}},"summary":"Get an asset criticality record","tags":["Security Entity Analytics API"]},"post":{"description":"Create or update an asset criticality record for a specific entity.\n\nIf a record already exists for the specified entity, that record is overwritten with the specified value. If a record doesn't exist for the specified entity, a new record is created.\n","operationId":"CreateAssetCriticalityRecord","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_CreateAssetCriticalityRecord"},{"type":"object","properties":{"refresh":{"description":"If 'wait_for' the request will wait for the index refresh.","enum":["wait_for"],"type":"string"}}}],"example":{"criticality_level":"high_impact","id_field":"host.name","id_value":"my_host"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecord"}}},"description":"Successful response"},"400":{"description":"Invalid request"}},"summary":"Upsert an asset criticality record","tags":["Security Entity Analytics API"]}},"/api/asset_criticality/bulk":{"post":{"description":"Bulk upsert up to 1000 asset criticality records.\n\nIf asset criticality records already exist for the specified entities, those records are overwritten with the specified values. If asset criticality records don't exist for the specified entities, new records are created.\n","operationId":"BulkUpsertAssetCriticalityRecords","requestBody":{"content":{"application/json":{"schema":{"example":{"records":[{"criticality_level":"low_impact","id_field":"host.name","id_value":"host-1"},{"criticality_level":"medium_impact","id_field":"host.name","id_value":"host-2"}]},"type":"object","properties":{"records":{"items":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecordIdParts"},{"type":"object","properties":{"criticality_level":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevelsForBulkUpload"}},"required":["criticality_level"]}]},"maxItems":1000,"minItems":1,"type":"array"}},"required":["records"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"example":{"errors":[{"index":0,"message":"Invalid ID field"}],"stats":{"failed":1,"successful":1,"total":2}},"type":"object","properties":{"errors":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityBulkUploadErrorItem"},"type":"array"},"stats":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityBulkUploadStats"}},"required":["errors","stats"]}}},"description":"Bulk upload successful"},"413":{"description":"File too large"}},"summary":"Bulk upsert asset criticality records","tags":["Security Entity Analytics API"]}},"/api/asset_criticality/list":{"get":{"description":"List asset criticality records, paging, sorting and filtering as needed.","operationId":"FindAssetCriticalityRecords","parameters":[{"description":"The field to sort by.","in":"query","name":"sort_field","required":false,"schema":{"enum":["id_value","id_field","criticality_level","\\@timestamp"],"type":"string"}},{"description":"The order to sort by.","in":"query","name":"sort_direction","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"The number of records to return per page.","in":"query","name":"per_page","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"The kuery to filter by.","in":"query","name":"kuery","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"page":1,"per_page":10,"records":[{"@timestamp":"2024-08-02T14:40:35.705Z","asset":{"criticality":"medium_impact"},"criticality_level":"medium_impact","host":{"asset":{"criticality":"medium_impact"},"name":"my_other_host"},"id_field":"host.name","id_value":"my_other_host"},{"@timestamp":"2024-08-02T11:15:34.290Z","asset":{"criticality":"high_impact"},"criticality_level":"high_impact","host":{"asset":{"criticality":"high_impact"},"name":"my_host"},"id_field":"host.name","id_value":"my_host"}],"total":2},"type":"object","properties":{"page":{"minimum":1,"type":"integer"},"per_page":{"maximum":1000,"minimum":1,"type":"integer"},"records":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecord"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["records","page","per_page","total"]}}},"description":"Successfully retrieved asset criticality records"}},"summary":"List asset criticality records","tags":["Security Entity Analytics API"]}},"/api/cases":{"delete":{"description":"You must have `read` or `all` privileges and the `delete` sub-feature privilege for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n","operationId":"deleteCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_ids"}],"responses":{"204":{"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Delete cases","tags":["cases"]},"patch":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating.\n","operationId":"updateCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"updateCaseRequest":{"$ref":"#/components/examples/Cases_update_case_request"}},"schema":{"$ref":"#/components/schemas/Cases_update_case_request"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"updateCaseResponse":{"$ref":"#/components/examples/Cases_update_case_response"}},"schema":{"items":{"$ref":"#/components/schemas/Cases_case_response_properties"},"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Update cases","tags":["cases"]},"post":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating.\n","operationId":"createCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"createCaseRequest":{"$ref":"#/components/examples/Cases_create_case_request"}},"schema":{"$ref":"#/components/schemas/Cases_create_case_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"createCaseResponse":{"$ref":"#/components/examples/Cases_create_case_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Create a case","tags":["cases"]}},"/api/cases/_find":{"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n","operationId":"findCasesDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_assignees_filter"},{"$ref":"#/components/parameters/Cases_category"},{"$ref":"#/components/parameters/Cases_defaultSearchOperator"},{"$ref":"#/components/parameters/Cases_from"},{"$ref":"#/components/parameters/Cases_owner_filter"},{"$ref":"#/components/parameters/Cases_page_index"},{"$ref":"#/components/parameters/Cases_page_size"},{"$ref":"#/components/parameters/Cases_reporters"},{"$ref":"#/components/parameters/Cases_search"},{"$ref":"#/components/parameters/Cases_searchFields"},{"$ref":"#/components/parameters/Cases_severity"},{"$ref":"#/components/parameters/Cases_sortField"},{"$ref":"#/components/parameters/Cases_sort_order"},{"$ref":"#/components/parameters/Cases_status"},{"$ref":"#/components/parameters/Cases_tags"},{"$ref":"#/components/parameters/Cases_to"}],"responses":{"200":{"content":{"application/json":{"examples":{"findCaseResponse":{"$ref":"#/components/examples/Cases_find_case_response"}},"schema":{"type":"object","properties":{"cases":{"items":{"$ref":"#/components/schemas/Cases_case_response_properties"},"maxItems":10000,"type":"array"},"count_closed_cases":{"type":"integer"},"count_in_progress_cases":{"type":"integer"},"count_open_cases":{"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Search cases","tags":["cases"]}},"/api/cases/{caseId}":{"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n","operationId":"getCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getDefaultCaseResponse":{"$ref":"#/components/examples/Cases_get_case_response"},"getDefaultObservabilityCaseReponse":{"$ref":"#/components/examples/Cases_get_case_observability_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case information","tags":["cases"]}},"/api/cases/{caseId}/alerts":{"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n","operationId":"getCaseAlertsDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getCaseAlertsResponse":{"$ref":"#/components/examples/Cases_get_case_alerts_response"}},"schema":{"items":{"$ref":"#/components/schemas/Cases_alert_response_properties"},"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get all alerts for a case","tags":["cases"],"x-state":"Technical preview"}},"/api/cases/{caseId}/comments":{"delete":{"description":"Deletes all comments and alerts from a case. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n","operationId":"deleteCaseCommentsDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"}],"responses":{"204":{"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Delete all case comments and alerts","tags":["cases"]},"patch":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. NOTE: You cannot change the comment type or the owner of a comment.\n","operationId":"updateCaseCommentDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateCaseCommentRequest":{"$ref":"#/components/examples/Cases_update_comment_request"}},"schema":{"$ref":"#/components/schemas/Cases_update_case_comment_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"updateCaseCommentResponse":{"$ref":"#/components/examples/Cases_update_comment_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Update a case comment or alert","tags":["cases"]},"post":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. NOTE: Each case can have a maximum of 1,000 alerts.\n","operationId":"addCaseCommentDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"}],"requestBody":{"content":{"application/json":{"examples":{"createCaseCommentRequest":{"$ref":"#/components/examples/Cases_add_comment_request"}},"schema":{"$ref":"#/components/schemas/Cases_add_case_comment_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"createCaseCommentResponse":{"$ref":"#/components/examples/Cases_add_comment_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Add a case comment or alert","tags":["cases"]}},"/api/cases/{caseId}/comments/_find":{"get":{"description":"Retrieves a paginated list of comments for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n","operationId":"findCaseCommentsDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_page_index"},{"$ref":"#/components/parameters/Cases_page_size"},{"$ref":"#/components/parameters/Cases_sort_order"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Find case comments and alerts","tags":["cases"]}},"/api/cases/{caseId}/comments/{commentId}":{"delete":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n","operationId":"deleteCaseCommentDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_comment_id"}],"responses":{"204":{"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Delete a case comment or alert","tags":["cases"]},"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n","operationId":"getCaseCommentDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_comment_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getCaseCommentResponse":{"$ref":"#/components/examples/Cases_get_comment_response"}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_alert_comment_response_properties"},{"$ref":"#/components/schemas/Cases_user_comment_response_properties"}]}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get a case comment or alert","tags":["cases"]}},"/api/cases/{caseId}/connector/{connectorId}/_push":{"post":{"description":"You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. You must also have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're pushing.\n","operationId":"pushCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_connector_id"},{"$ref":"#/components/parameters/Cases_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"nullable":true,"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"pushCaseResponse":{"$ref":"#/components/examples/Cases_push_case_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Push a case to an external service","tags":["cases"]}},"/api/cases/{caseId}/files":{"post":{"description":"Attach a file to a case. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. The request must include:\n- The `Content-Type: multipart/form-data` HTTP header.\n- The location of the file that is being uploaded.\n","operationId":"addCaseFileDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Cases_add_case_file_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"addCaseFileResponse":{"$ref":"#/components/examples/Cases_add_comment_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Attach a file to a case","tags":["cases"]}},"/api/cases/{caseId}/user_actions/_find":{"get":{"description":"Retrives a paginated list of user activity for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n","operationId":"findCaseActivityDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_page_index"},{"$ref":"#/components/parameters/Cases_page_size"},{"$ref":"#/components/parameters/Cases_sort_order"},{"$ref":"#/components/parameters/Cases_user_action_types"}],"responses":{"200":{"content":{"application/json":{"examples":{"findCaseActivityResponse":{"$ref":"#/components/examples/Cases_find_case_activity_response"}},"schema":{"type":"object","properties":{"page":{"type":"integer"},"perPage":{"type":"integer"},"total":{"type":"integer"},"userActions":{"items":{"$ref":"#/components/schemas/Cases_user_actions_find_response_properties"},"maxItems":10000,"type":"array"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Find case activity","tags":["cases"]}},"/api/cases/alerts/{alertId}":{"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n","operationId":"getCasesByAlertDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_alert_id"},{"$ref":"#/components/parameters/Cases_owner_filter"}],"responses":{"200":{"content":{"application/json":{"schema":{"example":[{"id":"06116b80-e1c3-11ec-be9b-9b1838238ee6","title":"security_case"}],"items":{"type":"object","properties":{"id":{"description":"The case identifier.","type":"string"},"title":{"description":"The case title.","type":"string"}}},"maxItems":10000,"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get cases for an alert","tags":["cases"],"x-state":"Technical preview"}},"/api/cases/configure":{"get":{"description":"Get setting details such as the closure type, custom fields, templatse, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.\n","operationId":"getCaseConfigurationDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_owner_filter"}],"responses":{"200":{"content":{"application/json":{"examples":{"getConfigurationResponse":{"$ref":"#/components/examples/Cases_get_case_configuration_response"}},"schema":{"items":{"type":"object","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"created_at":{"example":"2022-06-01T17:07:17.767Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"customFields":{"description":"Custom fields configuration details.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}}},"type":"array"},"error":{"example":null,"nullable":true,"type":"string"},"id":{"example":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","type":"string"},"mappings":{"items":{"type":"object","properties":{"action_type":{"example":"overwrite","type":"string"},"source":{"example":"title","type":"string"},"target":{"example":"summary","type":"string"}}},"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"templates":{"$ref":"#/components/schemas/Cases_templates"},"updated_at":{"example":"2022-06-01T19:58:48.169Z","format":"date-time","nullable":true,"type":"string"},"updated_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"version":{"example":"WzIwNzMsMV0=","type":"string"}}},"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case settings","tags":["cases"]},"post":{"description":"Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.\n","operationId":"setCaseConfigurationDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"setCaseConfigRequest":{"$ref":"#/components/examples/Cases_set_case_configuration_request"}},"schema":{"$ref":"#/components/schemas/Cases_set_case_configuration_request"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"setCaseConfigResponse":{"$ref":"#/components/examples/Cases_set_case_configuration_response"}},"schema":{"type":"object","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"created_at":{"example":"2022-06-01T17:07:17.767Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"customFields":{"description":"Custom fields configuration details.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}}},"type":"array"},"error":{"example":null,"nullable":true,"type":"string"},"id":{"example":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","type":"string"},"mappings":{"items":{"type":"object","properties":{"action_type":{"example":"overwrite","type":"string"},"source":{"example":"title","type":"string"},"target":{"example":"summary","type":"string"}}},"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"templates":{"$ref":"#/components/schemas/Cases_templates"},"updated_at":{"example":"2022-06-01T19:58:48.169Z","format":"date-time","nullable":true,"type":"string"},"updated_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"version":{"example":"WzIwNzMsMV0=","type":"string"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Add case settings","tags":["cases"]}},"/api/cases/configure/{configurationId}":{"patch":{"description":"Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.\n","operationId":"updateCaseConfigurationDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_configuration_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateCaseConfigurationRequest":{"$ref":"#/components/examples/Cases_update_case_configuration_request"}},"schema":{"$ref":"#/components/schemas/Cases_update_case_configuration_request"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"updateCaseConfigurationResponse":{"$ref":"#/components/examples/Cases_update_case_configuration_response"}},"schema":{"type":"object","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"created_at":{"example":"2022-06-01T17:07:17.767Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"customFields":{"description":"Custom fields configuration details.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}}},"type":"array"},"error":{"example":null,"nullable":true,"type":"string"},"id":{"example":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","type":"string"},"mappings":{"items":{"type":"object","properties":{"action_type":{"example":"overwrite","type":"string"},"source":{"example":"title","type":"string"},"target":{"example":"summary","type":"string"}}},"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"templates":{"$ref":"#/components/schemas/Cases_templates"},"updated_at":{"example":"2022-06-01T19:58:48.169Z","format":"date-time","nullable":true,"type":"string"},"updated_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"version":{"example":"WzIwNzMsMV0=","type":"string"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Update case settings","tags":["cases"]}},"/api/cases/configure/connectors/_find":{"get":{"description":"Get information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n","operationId":"findCaseConnectorsDefaultSpace","responses":{"200":{"content":{"application/json":{"examples":{"findConnectorResponse":{"$ref":"#/components/examples/Cases_find_connector_response"}},"schema":{"items":{"type":"object","properties":{"actionTypeId":{"$ref":"#/components/schemas/Cases_connector_types"},"config":{"additionalProperties":true,"type":"object","properties":{"apiUrl":{"type":"string"},"projectKey":{"type":"string"}}},"id":{"type":"string"},"isDeprecated":{"type":"boolean"},"isMissingSecrets":{"type":"boolean"},"isPreconfigured":{"type":"boolean"},"name":{"type":"string"},"referencedByCount":{"type":"integer"}}},"maxItems":1000,"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case connectors","tags":["cases"]}},"/api/cases/reporters":{"get":{"description":"Returns information about the users who opened cases. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged.\n","operationId":"getCaseReportersDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_owner_filter"}],"responses":{"200":{"content":{"application/json":{"examples":{"getReportersResponse":{"$ref":"#/components/examples/Cases_get_reporters_response"}},"schema":{"items":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"maxItems":10000,"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case creators","tags":["cases"]}},"/api/cases/tags":{"get":{"description":"Aggregates and returns a list of case tags. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n","operationId":"getCaseTagsDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_owner_filter"}],"responses":{"200":{"content":{"application/json":{"examples":{"getTagsResponse":{"$ref":"#/components/examples/Cases_get_tags_response"}},"schema":{"items":{"type":"string"},"maxItems":10000,"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case tags","tags":["cases"]}},"/api/dashboards/dashboard":{"get":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"get-dashboards-dashboard","parameters":[{"description":"The page number to return. Default is \"1\".","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"number"}},{"description":"The number of dashboards to display on each page (max 1000). Default is \"20\".","in":"query","name":"perPage","required":false,"schema":{"maximum":1000,"minimum":1,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":true,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"description":{"default":"","description":"A short description.","type":"string"},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"title":{"description":"A human-readable title for the dashboard","type":"string"}},"required":["title"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"error":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"metadata":{"additionalProperties":true,"type":"object","properties":{}},"statusCode":{"type":"number"}},"required":["error","message","statusCode"]},"id":{"type":"string"},"managed":{"type":"boolean"},"namespaces":{"items":{"type":"string"},"type":"array"},"originId":{"type":"string"},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"string"}},"required":["id","type","attributes","references"]},"type":"array"},"total":{"type":"number"}},"required":["items","total"]}}}}},"summary":"Get a list of dashboards","tags":["Dashboards"],"x-state":"Technical Preview"}},"/api/dashboards/dashboard/{id}":{"delete":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"delete-dashboards-dashboard-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"A unique identifier for the dashboard.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{},"summary":"Delete a dashboard","tags":["Dashboards"],"x-state":"Technical Preview"},"get":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"get-dashboards-dashboard-id","parameters":[{"description":"A unique identifier for the dashboard.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y","i"]},"panels":{"items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData","panels"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"error":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"metadata":{"additionalProperties":true,"type":"object","properties":{}},"statusCode":{"type":"number"}},"required":["error","message","statusCode"]},"id":{"type":"string"},"managed":{"type":"boolean"},"namespaces":{"items":{"type":"string"},"type":"array"},"originId":{"type":"string"},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"string"}},"required":["id","type","attributes","references"]},"meta":{"additionalProperties":false,"type":"object","properties":{"aliasPurpose":{"enum":["savedObjectConversion","savedObjectImport"],"type":"string"},"aliasTargetId":{"type":"string"},"outcome":{"enum":["exactMatch","aliasMatch","conflict"],"type":"string"}},"required":["outcome"]}},"required":["item","meta"]}}}}},"summary":"Get a dashboard","tags":["Dashboards"],"x-state":"Technical Preview"},"post":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"post-dashboards-dashboard-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"A unique identifier for the dashboard.","in":"path","name":"id","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"description":"The unique identifier of the panel","type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"description":"The unique ID of the panel.","type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"description":"The unique identifier of the section","type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y"]},"panels":{"default":[],"description":"The panels that belong to the section.","items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"description":"The unique identifier of the panel","type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"description":"The unique ID of the panel.","type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"spaces":{"items":{"type":"string"},"type":"array"}},"required":["attributes"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y","i"]},"panels":{"items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData","panels"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"error":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"metadata":{"additionalProperties":true,"type":"object","properties":{}},"statusCode":{"type":"number"}},"required":["error","message","statusCode"]},"id":{"type":"string"},"managed":{"type":"boolean"},"namespaces":{"items":{"type":"string"},"type":"array"},"originId":{"type":"string"},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"string"}},"required":["id","type","attributes","references"]}},"required":["item"]}}}}},"summary":"Create a dashboard","tags":["Dashboards"],"x-state":"Technical Preview"},"put":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"put-dashboards-dashboard-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"A unique identifier for the dashboard.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"description":"The unique identifier of the panel","type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"description":"The unique ID of the panel.","type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"description":"The unique identifier of the section","type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y"]},"panels":{"default":[],"description":"The panels that belong to the section.","items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"description":"The unique identifier of the panel","type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"description":"The unique ID of the panel.","type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"}},"required":["attributes"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y","i"]},"panels":{"items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData","panels"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"error":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"metadata":{"additionalProperties":true,"type":"object","properties":{}},"statusCode":{"type":"number"}},"required":["error","message","statusCode"]},"id":{"type":"string"},"managed":{"type":"boolean"},"namespaces":{"items":{"type":"string"},"type":"array"},"originId":{"type":"string"},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"string"}},"required":["id","type","attributes","references"]}},"required":["item"]}}}}},"summary":"Update an existing dashboard","tags":["Dashboards"],"x-state":"Technical Preview"}},"/api/data_views":{"get":{"operationId":"getAllDataViewsDefault","responses":{"200":{"content":{"application/json":{"examples":{"getAllDataViewsResponse":{"$ref":"#/components/examples/Data_views_get_data_views_response"}},"schema":{"type":"object","properties":{"data_view":{"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"typeMeta":{"type":"object"}}},"type":"array"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Get all data views","tags":["data views"]}},"/api/data_views/data_view":{"post":{"operationId":"createDataViewDefaultw","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"createDataViewRequest":{"$ref":"#/components/examples/Data_views_create_data_view_request"}},"schema":{"$ref":"#/components/schemas/Data_views_create_data_view_request_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_data_view_response_object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Create a data view","tags":["data views"]}},"/api/data_views/data_view/{viewId}":{"delete":{"description":"WARNING: When you delete a data view, it cannot be recovered.\n","operationId":"deleteDataViewDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"$ref":"#/components/parameters/Data_views_view_id"}],"responses":{"204":{"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_404_response"}}},"description":"Object is not found."}},"summary":"Delete a data view","tags":["data views"]},"get":{"operationId":"getDataViewDefault","parameters":[{"$ref":"#/components/parameters/Data_views_view_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getDataViewResponse":{"$ref":"#/components/examples/Data_views_get_data_view_response"}},"schema":{"$ref":"#/components/schemas/Data_views_data_view_response_object"}}},"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_404_response"}}},"description":"Object is not found."}},"summary":"Get a data view","tags":["data views"]},"post":{"operationId":"updateDataViewDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"$ref":"#/components/parameters/Data_views_view_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateDataViewRequest":{"$ref":"#/components/examples/Data_views_update_data_view_request"}},"schema":{"$ref":"#/components/schemas/Data_views_update_data_view_request_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_data_view_response_object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Update a data view","tags":["data views"]}},"/api/data_views/data_view/{viewId}/fields":{"post":{"description":"Update fields presentation metadata such as count, customLabel, customDescription, and format.\n","operationId":"updateFieldsMetadataDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"$ref":"#/components/parameters/Data_views_view_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateFieldsMetadataRequest":{"$ref":"#/components/examples/Data_views_update_field_metadata_request"}},"schema":{"type":"object","properties":{"fields":{"description":"The field object.","type":"object"}},"required":["fields"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Update data view fields metadata","tags":["data views"]}},"/api/data_views/data_view/{viewId}/runtime_field":{"post":{"operationId":"createRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"$ref":"#/components/parameters/Data_views_view_id"}],"requestBody":{"content":{"application/json":{"examples":{"createRuntimeFieldRequest":{"$ref":"#/components/examples/Data_views_create_runtime_field_request"}},"schema":{"type":"object","properties":{"name":{"description":"The name for a runtime field.\n","type":"string"},"runtimeField":{"description":"The runtime field definition object.\n","type":"object"}},"required":["name","runtimeField"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."}},"summary":"Create a runtime field","tags":["data views"]},"put":{"operationId":"createUpdateRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"description":"The ID of the data view fields you want to update.\n","in":"path","name":"viewId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"updateRuntimeFieldRequest":{"$ref":"#/components/examples/Data_views_create_runtime_field_request"}},"schema":{"type":"object","properties":{"name":{"description":"The name for a runtime field.\n","type":"string"},"runtimeField":{"description":"The runtime field definition object.\n","type":"object"}},"required":["name","runtimeField"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data_view":{"type":"object"},"fields":{"items":{"type":"object"},"type":"array"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Create or update a runtime field","tags":["data views"]}},"/api/data_views/data_view/{viewId}/runtime_field/{fieldName}":{"delete":{"operationId":"deleteRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_field_name"},{"$ref":"#/components/parameters/Data_views_view_id"}],"responses":{"200":{"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_404_response"}}},"description":"Object is not found."}},"summary":"Delete a runtime field from a data view","tags":["data views"]},"get":{"operationId":"getRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_field_name"},{"$ref":"#/components/parameters/Data_views_view_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getRuntimeFieldResponse":{"$ref":"#/components/examples/Data_views_get_runtime_field_response"}},"schema":{"type":"object","properties":{"data_view":{"type":"object"},"fields":{"items":{"type":"object"},"type":"array"}}}}},"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_404_response"}}},"description":"Object is not found."}},"summary":"Get a runtime field","tags":["data views"]},"post":{"operationId":"updateRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_field_name"},{"$ref":"#/components/parameters/Data_views_view_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateRuntimeFieldRequest":{"$ref":"#/components/examples/Data_views_update_runtime_field_request"}},"schema":{"type":"object","properties":{"runtimeField":{"description":"The runtime field definition object.\n\nYou can update following fields:\n\n- `type`\n- `script`\n","type":"object"}},"required":["runtimeField"]}}},"required":true},"responses":{"200":{"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Update a runtime field","tags":["data views"]}},"/api/data_views/default":{"get":{"operationId":"getDefaultDataViewDefault","responses":{"200":{"content":{"application/json":{"examples":{"getDefaultDataViewResponse":{"$ref":"#/components/examples/Data_views_get_default_data_view_response"}},"schema":{"type":"object","properties":{"data_view_id":{"type":"string"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Get the default data view","tags":["data views"]},"post":{"operationId":"setDefaultDatailViewDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"setDefaultDataViewRequest":{"$ref":"#/components/examples/Data_views_set_default_data_view_request"}},"schema":{"type":"object","properties":{"data_view_id":{"description":"The data view identifier. NOTE: The API does not validate whether it is a valid identifier. Use `null` to unset the default data view.\n","nullable":true,"type":"string"},"force":{"default":false,"description":"Update an existing default data view identifier.","type":"boolean"}},"required":["data_view_id"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Set the default data view","tags":["data views"]}},"/api/data_views/swap_references":{"post":{"description":"Changes saved object references from one data view identifier to another. WARNING: Misuse can break large numbers of saved objects! Practicing with a backup is recommended.\n","operationId":"swapDataViewsDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"swapDataViewRequest":{"$ref":"#/components/examples/Data_views_swap_data_view_request"}},"schema":{"$ref":"#/components/schemas/Data_views_swap_data_view_request_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"deleteStatus":{"type":"object","properties":{"deletePerformed":{"type":"boolean"},"remainingRefs":{"type":"integer"}}},"result":{"items":{"type":"object","properties":{"id":{"description":"A saved object identifier.","type":"string"},"type":{"description":"The saved object type.","type":"string"}}},"type":"array"}}}}},"description":"Indicates a successful call."}},"summary":"Swap saved object references","tags":["data views"]}},"/api/data_views/swap_references/_preview":{"post":{"description":"Preview the impact of swapping saved object references from one data view identifier to another.\n","operationId":"previewSwapDataViewsDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"previewSwapDataViewRequest":{"$ref":"#/components/examples/Data_views_preview_swap_data_view_request"}},"schema":{"$ref":"#/components/schemas/Data_views_swap_data_view_request_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"items":{"type":"object","properties":{"id":{"description":"A saved object identifier.","type":"string"},"type":{"description":"The saved object type.","type":"string"}}},"type":"array"}}}}},"description":"Indicates a successful call."}},"summary":"Preview a saved object reference swap","tags":["data views"]}},"/api/detection_engine/index":{"delete":{"operationId":"DeleteAlertsIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}},"required":["acknowledged"]}}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not enough permissions response"},"404":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Index does not exist response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete an alerts index","tags":["Security Detections API"]},"get":{"operationId":"ReadAlertsIndex","responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"index_mapping_outdated":false,"name":".alerts-security.alerts-default"}}},"schema":{"type":"object","properties":{"index_mapping_outdated":{"nullable":true,"type":"boolean"},"name":{"type":"string"}},"required":["name","index_mapping_outdated"]}}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not enough permissions response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Reads the alert index name if it exists","tags":["Security Detections API"]},"post":{"operationId":"CreateAlertsIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}},"required":["acknowledged"]}}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not enough permissions response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create an alerts index","tags":["Security Detections API"]}},"/api/detection_engine/privileges":{"get":{"description":"Retrieves whether or not the user is authenticated, and the user's Kibana\nspace and index privileges, which determine if the user can create an\nindex for the Elastic Security alerts generated by\ndetection engine rules.\n","operationId":"ReadPrivileges","responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"application":{},"cluster":{"all":true,"manage":true,"manage_api_key":true,"manage_index_templates":true,"manage_ml":true,"manage_own_api_key":true,"manage_pipeline":true,"manage_security":true,"manage_transform":true,"monitor":true,"monitor_ml":true,"monitor_transform":true},"has_all_requested":true,"has_encryption_key":true,"index":{".alerts-security.alerts-default":{"all":true,"create":true,"create_doc":true,"create_index":true,"delete":true,"delete_index":true,"index":true,"maintenance":true,"manage":true,"monitor":true,"read":true,"view_index_metadata":true,"write":true}},"is_authenticated":true,"username":"elastic"}}},"schema":{"type":"object","properties":{"has_encryption_key":{"type":"boolean"},"is_authenticated":{"type":"boolean"}},"required":["is_authenticated","has_encryption_key"]}}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Returns user privileges for the Kibana space","tags":["Security Detections API"]}},"/api/detection_engine/rules":{"delete":{"description":"Delete a detection rule using the `rule_id` or `id` field.\n\nThe URL query must include one of the following:\n\n* `id` - `DELETE /api/detection_engine/rules?id=\u003cid\u003e`\n* `rule_id`- `DELETE /api/detection_engine/rules?rule_id=\u003crule_id\u003e`\n\nThe difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.\n","operationId":"DeleteRule","parameters":[{"description":"The rule's `id` value.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"}},{"description":"The rule's `rule_id` value.","in":"query","name":"rule_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call."}},"summary":"Delete a detection rule","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl \\\n --request DELETE https://localhost:5601/api/detection_engine/rules?rule_id=bfeaf89b-a2a7-48a3-817f-e41829dc61ee \\\n --header \"Content-Type: application/json; Elastic-Api-Version=2023-10-31\"\n"}]},"get":{"description":"Retrieve a detection rule using the `rule_id` or `id` field.\n\nThe URL query must include one of the following:\n\n* `id` - `GET /api/detection_engine/rules?id=\u003cid\u003e`\n* `rule_id` - `GET /api/detection_engine/rules?rule_id=\u003crule_id\u003e`\n\nThe difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.\n","operationId":"ReadRule","parameters":[{"description":"The rule's `id` value.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"}},{"description":"The rule's `rule_id` value.","in":"query","name":"rule_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"summary":"Example response for a retrieved rule","value":{"created_at":"2020-02-03T11:19:04.259Z","created_by":"elastic","description":"Process started by MS Office program in user folder","enabled":false,"execution_summary":{"last_execution":{"date":"2022-03-23T16:06:12.787Z","message":"This rule attempted to query data from Elasticsearch indices listed in the \"Index pattern\" section of the rule definition, but no matching index was found.","metrics":{"execution_gap_duration_s":0,"total_indexing_duration_ms":15,"total_search_duration_ms":135},"status":"partial failure","status_order":20}},"false_positives":[],"filters":[{"query":{"match":{"event.action":{"query":"Process Create (rule: ProcessCreate)","type":"phrase"}}}}],"from":"now-4200s","id":"c41d170b-8ba6-4de6-b8ec-76440a35ace3","immutable":false,"interval":"1h","language":"kuery","max_signals":100,"name":"MS Office child process","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"process.name","type":"keyword"},{"ecs":true,"name":"process.parent.name","type":"keyword"}],"risk_score":21,"rule_id":"process_started_by_ms_office_user_folder","setup":"","severity":"low","tags":["child process","ms office"],"threat":[{"framework":"MITRE ATT\u0026CK","tactic":{"id":"TA0001","name":"Initial Access","reference":"https://attack.mitre.org/tactics/TA0001"},"technique":[{"id":"T1193","name":"Spearphishing Attachment","reference":"https://attack.mitre.org/techniques/T1193"}]}],"to":"now-300s","type":"query","updated_at":"2020-02-03T11:19:04.462Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call.\n\u003e info\n\u003e These fields are under development and their usage or schema may change: execution_summary.\n"}},"summary":"Retrieve a detection rule","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl \\\n --request GET https://localhost:5601/api/detection_engine/rules?rule_id=bfeaf89b-a2a7-48a3-817f-e41829dc61ee \\\n --header \"Content-Type: application/json; Elastic-Api-Version=2023-10-31\"\n"}]},"patch":{"description":"Update specific fields of an existing detection rule using the `rule_id` or `id` field.\n\nThe difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n","operationId":"PatchRule","requestBody":{"content":{"application/json":{"examples":{"example1":{"summary":"Patch query rule","value":{"id":"14b7b513-3d8d-4b22-b7da-a7ae632f7e76","name":"New name"}},"example2":{"summary":"Patch EQL rule","value":{"rule_id":"process_started_by_ms_office_program_possible_payload","threat":[{"framework":"MITRE ATT\u0026CK","tactic":{"id":"TA0001","name":"Initial Access","reference":"https://attack.mitre.org/tactics/TA0001"},"technique":[{"id":"T1193","name":"Spearphishing Attachment","reference":"https://attack.mitre.org/techniques/T1193"}]}]}},"example3":{"summary":"Patch threshold rule","value":{"id":"005d2c4f-51ca-493d-a2bd-20ef076339b1","query":"agent.version : * and agent.id : \"243d9b4f-ca01-4311-8e5c-9abbee91afd8\"","threshold":{"cardinality":[],"field":[],"value":600}}},"example4":{"summary":"Patch new terms rule","value":{"history_window_start":"now-3d","id":"569aac91-40dc-4807-a8ae-a2c8698089c4","new_terms_fields":["Endpoint.policy.applied.artifacts.global.identifiers.name"]}},"example5":{"summary":"Patch esql rule","value":{"id":"0b15e8a2-49b6-47e0-a8e6-d63a6cc335bd","query":"FROM logs-abc*\n| STATS count = COUNT(*), min_timestamp = MIN(@timestamp)\n| EVAL event_rate = count / DATE_DIFF(\"seconds\", min_timestamp, NOW()) \n| KEEP event_rate\n"}},"example6":{"summary":"Patch indicator match rule","value":{"id":"462f1986-10fe-40a3-a22c-2b1c9c4c48fd","threat_query":"@timestamp \u003e= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.ip:* and not labels.is_ioc_transform_source:\"false\""}},"example7":{"summary":"Patch machine learning rule","value":{"anomaly_threshold":50,"id":"60b13926-289b-41b1-a537-197ef1fa5059","machine_learning_job_id":["auth_high_count_logon_events"]}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RulePatchProps"}}},"description":"\u003e info\n\u003e You cannot modify the `id` or `rule_id` values.\n","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"summary":"Example response for an updated rule","value":{"actions":[],"created_at":"2020-04-07T14:51:09.755Z","created_by":"elastic","description":"Updated description for the rule.","enabled":false,"false_positives":[],"filters":[{"query":null}],"from":"now-70m","id":"6541b99a-dee9-4f6d-a86d-dbd1869d73b1","immutable":false,"interval":"1h","language":"kuery","max_signals":100,"name":"Updated Rule Name","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","references":[],"related_integrations":[{"package":"o365"}],"required_fields":[{"name":"process.parent.name"}],"risk_score":50,"rule_id":"process_started_by_ms_office_program","setup":"","severity":"low","tags":["child process","ms office"],"threat":[],"to":"now","type":"query","updated_at":"2020-04-07T14:51:09.970Z","updated_by":"elastic","version":2}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call."}},"summary":"Patch a detection rule","tags":["Security Detections API"]},"post":{"description":"Create a new detection rule.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n\nYou can create the following types of rules:\n\n* **Custom query**: Searches the defined indices and creates an alert when a document matches the rule's KQL query.\n* **Event correlation**: Searches the defined indices and creates an alert when results match an [Event Query Language (EQL)](https://www.elastic.co/guide/en/elasticsearch/reference/current/eql.html) query.\n* **Threshold**: Searches the defined indices and creates an alert when the number of times the specified field's value meets the threshold during a single execution. When there are multiple values that meet the threshold, an alert is generated for each value.\n For example, if the threshold `field` is `source.ip` and its `value` is `10`, an alert is generated for every source IP address that appears in at least 10 of the rule's search results. If you're interested, see [Terms Aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html) for more information.\n* **Indicator match**: Creates an alert when fields match values defined in the specified [Elasticsearch index](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html). For example, you can create an index for IP addresses and use this index to create an alert whenever an event's `destination.ip` equals a value in the index. The index's field mappings should be [ECS-compliant](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html).\n* **New terms**: Generates an alert for each new term detected in source documents within a specified time range.\n* **ES|QL**: Uses [Elasticsearch Query Language (ES|QL)](https://www.elastic.co/guide/en/elasticsearch/reference/current/esql.html) to find events and aggregate search results.\n* **Machine learning rules**: Creates an alert when a machine learning job discovers an anomaly above the defined threshold.\n\u003e info\n\u003e To create machine learning rules, you must have the [appropriate license](https://www.elastic.co/subscriptions) or use a [cloud deployment](https://cloud.elastic.co/registration). Additionally, for the machine learning rule to function correctly, the associated machine learning job must be running.\n\nTo retrieve machine learning job IDs, which are required to create machine learning jobs, call the [Elasticsearch Get jobs API](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html). Machine learning jobs that contain `siem` in the `groups` field can be used to create rules:\n\n```json\n...\n\"job_id\": \"linux_anomalous_network_activity_ecs\",\n\"job_type\": \"anomaly_detector\",\n\"job_version\": \"7.7.0\",\n\"groups\": [\n \"auditbeat\",\n \"process\",\n \"siem\"\n],\n...\n```\n\nAdditionally, you can set up notifications for when rules create alerts. The notifications use the [Alerting and Actions framework](https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html). Each action type requires a connector. Connectors store the information required to send notifications via external systems. The following connector types are supported for rule notifications:\n\n* Slack\n* Email\n* PagerDuty\n* Webhook\n* Microsoft Teams\n* IBM Resilient\n* Jira\n* ServiceNow ITSM\n\u003e info\n\u003e For more information on PagerDuty fields, see [Send a v2 Event](https://developer.pagerduty.com/docs/events-api-v2/trigger-events/).\n\nTo retrieve connector IDs, which are required to configure rule notifications, call the [Find objects API](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html) with `\"type\": \"action\"` in the request payload.\n\nFor detailed information on Kibana actions and alerting, and additional API calls, see:\n\n* [Alerting API](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-alerting)\n* [Alerting and Actions framework](https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html)\n* [Connectors API](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-connectors)\n","operationId":"CreateRule","requestBody":{"content":{"application/json":{"examples":{"example1":{"description":"Query rule that searches for processes started by MS Office","summary":"Query rule","value":{"description":"Process started by MS Office program - possible payload","enabled":false,"filters":[{"query":{"match":{"event.action":{"query":"Process Create (rule: ProcessCreate)","type":"phrase"}}}}],"from":"now-70m","interval":"1h","language":"kuery","name":"MS Office child process","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"name":"process.parent.name","type":"keyword"}],"risk_score":50,"rule_id":"process_started_by_ms_office_program","severity":"low","tags":["child process","ms office"],"type":"query"}},"example2":{"description":"Threshold rule that detects multiple failed login attempts to a Windows host from the same external source IP address","summary":"Threshold rule","value":{"description":"Detects when there are 20 or more failed login attempts from the same IP address with a 2 minute time frame.","enabled":true,"exceptions_list":[{"id":"int-ips","namespace_type":"single","type":"detection"}],"from":"now-180s","index":["winlogbeat-*"],"interval":"2m","name":"Windows server prml-19","query":"host.name:prml-19 and event.category:authentication and event.outcome:failure","required_fields":[{"name":"source.ip","type":"ip"}],"risk_score":30,"rule_id":"liv-win-ser-logins","severity":"low","severity_mapping":[{"field":"source.geo.city_name","operator":"equals","severity":"low","value":"Manchester"},{"field":"source.geo.city_name","operator":"equals","severity":"medium","value":"London"},{"field":"source.geo.city_name","operator":"equals","severity":"high","value":"Birmingham"},{"field":"source.geo.city_name","operator":"equals","severity":"critical","value":"Wallingford"}],"tags":["Brute force"],"threshold":{"field":"source.ip","value":20},"type":"threshold"}},"example3":{"description":"Machine learning rule that creates alerts, and sends Slack notifications, when the linux_anomalous_network_activity_ecs machine learning job discovers anomalies with a threshold of 70 or above.","summary":"Machine learning rule","value":{"actions":[{"action_type_id":".slack","group":"default","id":"5ad22cd5-5e6e-4c6c-a81a-54b626a4cec5","params":{"message":"Urgent: {{context.rule.description}}"}}],"anomaly_threshold":70,"description":"Generates alerts when the job discovers anomalies over 70","enabled":true,"from":"now-6m","interval":"5m","machine_learning_job_id":"linux_anomalous_network_activity_ecs","name":"Anomalous Linux network activity","note":"Shut down the internet.","risk_score":70,"rule_id":"ml_linux_network_high_threshold","setup":"This rule requires data coming in from Elastic Defend.","severity":"high","tags":["machine learning","Linux"],"type":"machine_learning"}},"example4":{"description":"Event correlation rule that creates alerts when the Windows rundll32.exe process makes unusual network connections","summary":"EQL rule","value":{"description":"Unusual rundll32.exe network connection","language":"eql","name":"rundll32.exe network connection","query":"sequence by process.entity_id with maxspan=2h [process where event.type in (\"start\", \"process_started\") and (process.name == \"rundll32.exe\" or process.pe.original_file_name == \"rundll32.exe\") and ((process.args == \"rundll32.exe\" and process.args_count == 1) or (process.args != \"rundll32.exe\" and process.args_count == 0))] [network where event.type == \"connection\" and (process.name == \"rundll32.exe\" or process.pe.original_file_name == \"rundll32.exe\")]","required_fields":[{"name":"event.type","type":"keyword"},{"name":"process.args","type":"keyword"},{"name":"process.args_count","type":"long"},{"name":"process.entity_id","type":"keyword"},{"name":"process.name","type":"keyword"},{"name":"process.pe.original_file_name","type":"keyword"}],"risk_score":21,"rule_id":"eql-outbound-rundll32-connections","severity":"low","tags":["EQL","Windows","rundll32.exe"],"type":"eql"}},"example5":{"description":"Indicator match rule that creates an alert when one of the following is true: The event's destination IP address and port number matches destination IP and port values in the threat_index index; The event's source IP address matches a host IP address value in the threat_index index.\n","summary":"Indicator match rule","value":{"actions":[],"description":"Checks for bad IP addresses listed in the ip-threat-list index","index":["packetbeat-*"],"name":"Bad IP threat match","query":"destination.ip:* or host.ip:*","required_fields":[{"name":"destination.ip","type":"ip"},{"name":"destination.port","type":"long"},{"name":"host.ip","type":"ip"}],"risk_score":50,"severity":"medium","threat_index":["ip-threat-list"],"threat_mapping":[{"entries":[{"field":"destination.ip","type":"mapping","value":"destination.ip"},{"field":"destination.port","type":"mapping","value":"destination.port"}]},{"entries":[{"field":"source.ip","type":"mapping","value":"host.ip"}]}],"threat_query":"*:*","type":"threat_match"}},"example6":{"description":"New terms rule that creates alerts a new IP address is detected for a user","summary":"New terms rule","value":{"description":"Detects a user associated with a new IP address","history_window_start":"now-30d","index":["auditbeat*"],"language":"kuery","name":"New User IP Detected","new_terms_fields":["user.id","source.ip"],"query":"*","required_fields":[{"name":"user.id","type":"keyword"},{"name":"source.ip","type":"ip"}],"risk_score":21,"severity":"medium","type":"new_terms"}},"example7":{"description":"esql rule that creates alerts from events that match an Excel parent process","summary":"Esql rule","value":{"description":"Find Excel events","enabled":false,"from":"now-360s","interval":"5m","language":"esql","name":"Find Excel events","query":"from auditbeat-8.10.2 METADATA _id, _version, _index | where process.parent.name == \"EXCEL.EXE\"","required_fields":[{"name":"process.parent.name","type":"keyword"}],"risk_score":21,"severity":"low","tags":[],"to":"now","type":"esql"}},"example8":{"description":"Query rule that searches for processes started by MS Office and suppresses alerts by the process.parent.name field within a 5-hour time period","summary":"Query rule 2","value":{"alert_suppression":{"duration":{"unit":"h","value":5},"group_by":["process.parent.name"],"missing_fields_strategy":"suppress"},"description":"Process started by MS Office program - possible payload","enabled":false,"filters":[{"query":{"match":{"event.action":{"query":"Process Create (rule: ProcessCreate)","type":"phrase"}}}}],"from":"now-70m","interval":"1h","language":"kuery","name":"MS Office child process","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","risk_score":50,"rule_id":"process_started_by_ms_office_program","severity":"low","tags":["child process","ms office"],"type":"query"}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleCreateProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"description":"Example response for a query rule","summary":"Query rule response","value":{"actions":[],"created_at":"2020-04-07T14:51:09.755Z","created_by":"elastic","description":"Process started by MS Office program - possible payload","enabled":false,"false_positives":[],"filters":[{"query":{"match":{"event.action":{"query":"Process Create (rule: ProcessCreate)","type":"phrase"}}}}],"from":"now-70m","id":"6541b99a-dee9-4f6d-a86d-dbd1869d73b1","immutable":false,"interval":"1h","language":"kuery","max_signals":100,"name":"MS Office child process","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"},{"integration":"graphactivitylogs","package":"azure","version":"^1.11.4"}],"required_fields":[{"ecs":true,"name":"process.parent.name","type":"keyword"}],"risk_score":50,"rule_id":"process_started_by_ms_office_program","setup":"","severity":"low","tags":["child process","ms office"],"threat":[],"to":"now","type":"query","updated_at":"2020-04-07T14:51:09.970Z","updated_by":"elastic","version":1}},"example2":{"description":"Example response for a machine learning job rule","summary":"Machine learning response","value":{"actions":[{"action_type_id":".slack","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"5ad22cd5-5e6e-4c6c-a81a-54b626a4cec5","params":{"message":"Urgent: {{context.rule.description}}"}}],"anomaly_threshold":70,"created_at":"2020-04-07T14:45:15.679Z","created_by":"elastic","description":"Generates alerts when the job discovers anomalies over 70","enabled":true,"false_positives":[],"from":"now-6m","id":"83876f66-3a57-4a99-bf37-416494c80f3b","immutable":false,"interval":"5m","machine_learning_job_id":"linux_anomalous_network_activity_ecs","max_signals":100,"name":"Anomalous Linux network activity","note":"Shut down the internet.","references":[],"related_integrations":[],"required_fields":[],"risk_score":70,"rule_id":"ml_linux_network_high_threshold","setup":"","severity":"high","status":"going to run","status_date":"2020-04-07T14:45:21.685Z","tags":["machine learning","Linux"],"threat":[],"to":"now","type":"machine_learning","updated_at":"2020-04-07T14:45:15.892Z","updated_by":"elastic","version":1}},"example3":{"description":"Example response for a threshold rule","summary":"Threshold rule response","value":{"actions":[],"author":[],"created_at":"2020-07-22T10:27:23.486Z","created_by":"elastic","description":"Detects when there are 20 or more failed login attempts from the same IP address with a 2 minute time frame.","enabled":true,"exceptions_list":[{"id":"int-ips","namespace_type":"single","type":"detection"}],"false_positives":[],"from":"now-180s","id":"15dbde26-b627-4d74-bb1f-a5e0ed9e4993","immutable":false,"index":["winlogbeat-*"],"interval":"2m","language":"kuery","max_signals":100,"name":"Windows server prml-19","query":"host.name:prml-19 and event.category:authentication and event.outcome:failure","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"source.ip","type":"ip"}],"risk_score":30,"risk_score_mapping":[],"rule_id":"liv-win-ser-logins","setup":"","severity":"low","severity_mapping":[{"field":"source.geo.city_name","operator":"equals","severity":"low","value":"Manchester"},{"field":"source.geo.city_name","operator":"equals","severity":"medium","value":"London"},{"field":"source.geo.city_name","operator":"equals","severity":"high","value":"Birmingham"},{"field":"source.geo.city_name","operator":"equals","severity":"critical","value":"Wallingford"}],"tags":["Brute force"],"threat":[],"threshold":{"field":"source.ip","value":20},"to":"now","type":"threshold","updated_at":"2020-07-22T10:27:23.673Z","updated_by":"elastic","version":1}},"example4":{"description":"Example response for an EQL rule","summary":"EQL rule response","value":{"author":[],"created_at":"2020-10-05T09:06:16.392Z","created_by":"elastic","description":"Unusual rundll32.exe network connection","enabled":true,"exceptions_list":[],"false_positives":[],"from":"now-6m","id":"93808cae-b05b-4dc9-8479-73574b50f8b1","immutable":false,"interval":"5m","language":"eql","max_signals":100,"name":"rundll32.exe network connection","query":"sequence by process.entity_id with maxspan=2h [process where event.type in (\"start\", \"process_started\") and (process.name == \"rundll32.exe\" or process.pe.original_file_name == \"rundll32.exe\") and ((process.args == \"rundll32.exe\" and process.args_count == 1) or (process.args != \"rundll32.exe\" and process.args_count == 0))] [network where event.type == \"connection\" and (process.name == \"rundll32.exe\" or process.pe.original_file_name == \"rundll32.exe\")]","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"event.type","type":"keyword"},{"ecs":true,"name":"process.args","type":"keyword"},{"ecs":true,"name":"process.args_count","type":"long"},{"ecs":true,"name":"process.entity_id","type":"keyword"},{"ecs":true,"name":"process.name","type":"keyword"},{"ecs":true,"name":"process.pe.original_file_name","type":"keyword"}],"risk_score":21,"risk_score_mapping":[],"rule_id":"eql-outbound-rundll32-connections","setup":"","severity":"low","severity_mapping":[],"tags":["EQL","Windows","rundll32.exe"],"threat":[],"throttle":"no_actions","to":"now","type":"eql","updated_at":"2020-10-05T09:06:16.403Z","updated_by":"elastic","version":1}},"example5":{"description":"Example response for an indicator match rule","summary":"Indicator match rule response","value":{"author":[],"created_at":"2020-10-06T07:07:58.227Z","created_by":"elastic","description":"Checks for bad IP addresses listed in the ip-threat-list index","enabled":true,"exceptions_list":[],"false_positives":[],"from":"now-6m","id":"d5daa13f-81fb-4b13-be2f-31011e1d9ae1","immutable":false,"index":["packetbeat-*"],"interval":"5m","language":"kuery","max_signals":100,"name":"Bad IP threat match","query":"destination.ip:* or host.ip:*","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"destination.ip","type":"ip"},{"ecs":true,"name":"destination.port","type":"long"},{"ecs":true,"name":"host.ip","type":"ip"}],"risk_score":50,"risk_score_mapping":[],"rule_id":"608501e4-c768-4f64-9326-cec55b5d439b","setup":"","severity":"medium","severity_mapping":[],"tags":[],"threat":[],"threat_index":["ip-threat-list"],"threat_mapping":[{"entries":[{"field":"destination.ip","type":"mapping","value":"destination.ip"},{"field":"destination.port","type":"mapping","value":"destination.port"}]},{"entries":[{"field":"source.ip","type":"mapping","value":"host.ip"}]}],"threat_query":"*:*","to":"now","type":"threat_match","updated_at":"2020-10-06T07:07:58.237Z","updated_by":"elastic","version":1}},"example6":{"description":"Example response for a new terms rule","summary":"New terms rule response","value":{"author":[],"created_at":"2020-10-06T07:07:58.227Z","created_by":"elastic","description":"Detects a user associated with a new IP address","enabled":true,"exceptions_list":[],"false_positives":[],"from":"now-6m","history_window_start":"now-30d","id":"eb7225c0-566b-11ee-8b4f-bbf3afdeb9f4","immutable":false,"index":["auditbeat*"],"interval":"5m","language":"kuery","max_signals":100,"name":"New User IP Detected","new_terms_fields":["user.id","source.ip"],"query":"*","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"user.id","type":"keyword"},{"ecs":true,"name":"source.ip","type":"ip"}],"risk_score":21,"risk_score_mapping":[],"rule_id":"c6f5d0bc-7be9-47d4-b2f3-073d22641e30","setup":"","severity":"medium","severity_mapping":[],"tags":[],"threat":[],"to":"now","type":"new_terms","updated_at":"2020-10-06T07:07:58.237Z","updated_by":"elastic","version":1}},"example7":{"description":"Example response for an Esql rule","summary":"Esql rule response","value":{"actions":[],"author":[],"created_at":"2023-10-18T10:55:14.269Z","created_by":"elastic","description":"Find Excel events","enabled":false,"exceptions_list":[],"false_positives":[],"from":"now-360s","id":"d0f20490-6da4-11ee-b85e-09e9b661f2e2","immutable":false,"interval":"5m","language":"esql","max_signals":100,"name":"Find Excel events","output_index":"","query":"from auditbeat-8.10.2 METADATA _id | where process.parent.name == \"EXCEL.EXE\"","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"process.parent.name","type":"keyword"}],"revision":0,"risk_score":21,"risk_score_mapping":[],"rule_id":"e4b53a89-debd-4a0d-a3e3-20606952e589","setup":"","severity":"low","severity_mapping":[],"tags":[],"threat":[],"to":"now","type":"esql","updated_at":"2023-10-18T10:55:14.269Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call."}},"summary":"Create a detection rule","tags":["Security Detections API"]},"put":{"description":"Update a detection rule using the `rule_id` or `id` field. The original rule is replaced, and all unspecified fields are deleted.\n\nThe difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n","operationId":"UpdateRule","requestBody":{"content":{"application/json":{"examples":{"example1":{"summary":"Update query rule","value":{"description":"A new description","id":"14b7b513-3d8d-4b22-b7da-a7ae632f7e76","name":"A new name for the rule","risk_score":22,"severity":"medium","type":"query"}},"example2":{"summary":"Update EQL rule","value":{"description":"eql rule test","id":"9b684efb-acf9-4323-9bff-8335b3867d14","index":["apm-*-transaction*"],"language":"eql","name":"New name for EQL rule","query":"process where process.name == \"regsvr32.exe\"","risk_score":21,"severity":"low","type":"eql"}},"example3":{"summary":"Update threshold rule","value":{"description":"Description of threat rule test","id":"005d2c4f-51ca-493d-a2bd-20ef076339b1","language":"kuery","name":"New name for threat rule","query":"agent.version : * and agent.id : \"243d9b4f-ca01-4311-8e5c-9abbee91afd8\"","risk_score":21,"severity":"low","tags":["new_tag"],"threshold":{"cardinality":[],"field":[],"value":400},"type":"threshold"}},"example4":{"summary":"Update new terms rule","value":{"description":"New description","history_window_start":"now-7d","id":"569aac91-40dc-4807-a8ae-a2c8698089c4","interval":"5m","name":"New terms rule name","new_terms_fields":["Endpoint.policy.applied.artifacts.global.identifiers.name"],"query":"agent.version : \"9.1.0\"","risk_score":21,"severity":"low","type":"new_terms"}},"example5":{"summary":"Update esql rule","value":{"description":"New description for esql rule","id":"0b15e8a2-49b6-47e0-a8e6-d63a6cc335bd","language":"esql","name":"New name for esql rule","query":"FROM logs*\n| STATS count = COUNT(*), min_timestamp = MIN(@timestamp) /* MIN(dateField) finds the earliest timestamp in the dataset. */\n| EVAL event_rate = count / DATE_DIFF(\"seconds\", min_timestamp, NOW()) /* Calculates the event rate by dividing the total count of events by the time difference (in seconds) between the earliest event and the current time. */\n| KEEP event_rate\n","risk_score":21,"severity":"low","type":"esql"}},"example6":{"summary":"Update indicator match rule","value":{"description":"New description","id":"462f1986-10fe-40a3-a22c-2b1c9c4c48fd","name":"New name for Indicator Match rule","query":"source.ip:* or destination.ip:*\\n","risk_score":99,"severity":"critical","threat_index":["filebeat-*","logs-ti_*"],"threat_mapping":[{"entries":[{"field":"source.ip","type":"mapping","value":"threat.indicator.ip"}]},{"entries":[{"field":"destination.ip","type":"mapping","value":"threat.indicator.ip"}]}],"threat_query":"@timestamp \u003e= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.ip:* and not labels.is_ioc_transform_source:\"true\"","type":"threat_match"}},"example7":{"summary":"Update machine learning rule","value":{"anomaly_threshold":50,"description":"New description of ml rule","id":"60b13926-289b-41b1-a537-197ef1fa5059","machine_learning_job_id":["auth_high_count_logon_events"],"name":"New name of ml rule","risk_score":21,"severity":"low","type":"machine_learning"}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleUpdateProps"}}},"description":"\u003e info\n\u003e All unspecified fields are deleted. You cannot modify the `id` or `rule_id` values.\n","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"summary":"Example response for an updated rule","value":{"actions":[],"created_at":"2020-04-07T14:51:09.755Z","created_by":"elastic","description":"Updated description for the rule.","enabled":false,"false_positives":[],"filters":[{"query":null}],"from":"now-70m","id":"6541b99a-dee9-4f6d-a86d-dbd1869d73b1","immutable":false,"interval":"1h","language":"kuery","max_signals":100,"name":"Updated Rule Name","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","references":[],"related_integrations":[{"package":"o365"}],"required_fields":[{"name":"process.parent.name"}],"risk_score":50,"rule_id":"process_started_by_ms_office_program","setup":"","severity":"low","tags":["child process","ms office"],"threat":[],"to":"now","type":"query","updated_at":"2020-04-07T14:51:09.970Z","updated_by":"elastic","version":2}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call."}},"summary":"Update a detection rule","tags":["Security Detections API"]}},"/api/detection_engine/rules/_bulk_action":{"post":{"description":"Apply a bulk action, such as bulk edit, duplicate, or delete, to multiple detection rules. The bulk action is applied to all rules that match the query or to the rules listed by their IDs.\n\nThe edit action allows you to add, delete, or set tags, index patterns, investigation fields, rule actions and schedules for multiple rules at once. \nThe edit action is idempotent, meaning that if you add a tag to a rule that already has that tag, no changes are made. The same is true for other edit actions, for example removing an index pattern that is not specified in a rule will not result in any changes. The only exception is the `add_rule_actions` and `set_rule_actions` action, which is non-idempotent. This means that if you add or set a rule action to a rule that already has that action, a new action is created with a new unique ID.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n","operationId":"PerformRulesBulkAction","parameters":[{"description":"Enables dry run mode for the request call.\n\nEnable dry run mode to verify that bulk actions can be applied to specified rules. Certain rules, such as prebuilt Elastic rules on a Basic subscription, can’t be edited and will return errors in the request response. Error details will contain an explanation, the rule name and/or ID, and additional troubleshooting information.\n\nTo enable dry run mode on a request, add the query parameter `dry_run=true` to the end of the request URL. Rules specified in the request will be temporarily updated. These updates won’t be written to Elasticsearch.\n\u003e info\n\u003e Dry run mode is not supported for the `export` bulk action. A 400 error will be returned in the request response.\n","in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"examples":{"example01":{"description":"The following request activates all rules with the test tag.","summary":"Enable - Enable all rules with the test tag","value":{"action":"enable","query":"alert.attributes.tags: \"test\""}},"example02":{"description":"The following request enables the rule with the specified ID.","summary":"Enable - Enable a specific rule by ID.","value":{"action":"enable","ids":["748694f0-6977-4ea5-8384-cd2e39730779"]}},"example03":{"description":"The following request disables the rule with the specified ID.","summary":"Disable - Disable a specific rule by ID","value":{"action":"disable","ids":["748694f0-6977-4ea5-8384-cd2e39730779"]}},"example04":{"description":"The following request duplicates rules with the specified IDs, including exceptions but not expired exceptions.","summary":"Duplicate - Duplicate rules with specific IDs","value":{"action":"duplicate","duplicate":{"include_exceptions":true,"include_expired_exceptions":false},"ids":["748694f0-6977-4ea5-8384-cd2e39730779","461a4c22-416e-4009-a9a7-cf79656454bf"]}},"example05":{"description":"The following request deletes the rule with the specified ID.","summary":"Delete - Delete a specific rule by ID","value":{"action":"delete","ids":["cf4abfd1-7c37-4519-ab0f-5ea5c75fac60"]}},"example06":{"description":"The following request runs the rule with the specified ID within the given date range.","summary":"Run - Run a specific rule by ID","value":{"action":"run","ids":["748694f0-6977-4ea5-8384-cd2e39730779"],"run":{"end_date":"2025-03-10T23:59:59.999Z","start_date":"2025-03-01T00:00:00.000Z"}}},"example07":{"description":"The following request exports the rules with the specified IDs.","summary":"Export - Export specific rules by ID","value":{"action":"export","ids":["748694f0-6977-4ea5-8384-cd2e39730779"]}},"example08":{"description":"The following request will validate that the add_index_patterns bulk action can be successfully applied to three rules. The dry_run parameter is specified in query parameters, e.g. POST api/detection_engine/rules/_bulk_action?dry_run=true","summary":"Edit - dry run - Validate add_index_patterns bulk action","value":{"action":"edit","edit":[{"type":"add_index_patterns","value":["test-*"]}],"ids":["81aa0480-06af-11ed-94fb-dd1a0597d8d2","dc015d10-0831-11ed-ac8b-05a222bd8d4a","de8f5af0-0831-11ed-ac8b-05a222bd8d4a"]}},"example09":{"description":"The following request adds the tag \"tag-1\" to the rules with the specified IDs. If the tag already exists for a rule, no changes are made.","summary":"Edit - Add a tag to rules (idempotent)","value":{"action":"edit","edit":[{"type":"add_tags","value":["tag-1"]}],"ids":["8bc7dad0-9320-11ec-9265-8b772383a08d","8e5c1a40-9320-11ec-9265-8b772383a08d"]}},"example10":{"description":"The following request adds two tags at the same time, tag-1 and tag-2, to the rules that have the IDs sent in the payload. If the tags already exist for a rule, no changes are made.","summary":"Edit - Add two tags to rules (idempotent)","value":{"action":"edit","edit":[{"type":"add_tags","value":["tag-1","tag-2"]}],"ids":["8bc7dad0-9320-11ec-9265-8b772383a08d","8e5c1a40-9320-11ec-9265-8b772383a08d"]}},"example11":{"description":"The following request removes the tag \"tag-1\" from the rules with the specified IDs. If the tag does not exist for a rule, no changes are made.","summary":"Edit - Delete a tag from rules (idempotent)","value":{"action":"edit","edit":[{"type":"delete_tags","value":["tag-1"]}],"ids":["8bc7dad0-9320-11ec-9265-8b772383a08d","8e5c1a40-9320-11ec-9265-8b772383a08d"]}},"example12":{"description":"The following request sets the tags \"tag-1\" and \"tag-2\" for the rules with the specified IDs, overwriting any existing tags. If the set of tags is the same as the existing tags, no changes are made.","summary":"Edit - Set (overwrite existing) tags for rules (idempotent)","value":{"action":"edit","edit":[{"type":"set_tags","value":["tag-1","tag-2"]}],"ids":["8bc7dad0-9320-11ec-9265-8b772383a08d","8e5c1a40-9320-11ec-9265-8b772383a08d"]}},"example13":{"description":"The following request adds the index pattern \"test-*\" to the rules with the specified IDs. If the index pattern already exists for a rule, no changes are made.","summary":"Edit - Add index patterns to rules (idempotent)","value":{"action":"edit","edit":[{"type":"add_index_patterns","value":["test-*"]}],"ids":["81aa0480-06af-11ed-94fb-dd1a0597d8d2","dc015d10-0831-11ed-ac8b-05a222bd8d4a"]}},"example14":{"description":"The following request removes the index pattern \"test-*\" from the rules with the specified IDs. If the index pattern does not exist for a rule, no changes are made.","summary":"Edit - Remove index patterns from rules (idempotent)","value":{"action":"edit","edit":[{"type":"delete_index_patterns","value":["test-*"]}],"ids":["81aa0480-06af-11ed-94fb-dd1a0597d8d2","dc015d10-0831-11ed-ac8b-05a222bd8d4a"]}},"example15":{"description":"The following request sets the index patterns \"test-*\" and \"prod-*\" for the rules with the specified IDs, overwriting any existing index patterns. If the set of index patterns is the same as the existing index patterns, no changes are made.","summary":"Edit - Set (overwrite existing) index patterns for rules patterns (idempotent)","value":{"action":"edit","edit":[{"type":"set_index_patterns","value":["test-*"]}],"ids":["81aa0480-06af-11ed-94fb-dd1a0597d8d2","dc015d10-0831-11ed-ac8b-05a222bd8d4a"]}},"example16":{"description":"The following request adds investigation field to the rules with the specified IDs.","summary":"Edit - Add investigation field to rules","value":{"action":"edit","edit":[{"type":"add_investigation_fields","value":{"field_names":["alert.status"]}}],"ids":["12345678-1234-1234-1234-1234567890ab","87654321-4321-4321-4321-0987654321ba"]}},"example17":{"description":"The following request deletes investigation fields from the rules with the specified IDs. If the field does not exist for a rule, no changes are made.","summary":"Edit - Delete investigation fields from rules (idempotent)","value":{"action":"edit","edit":[{"type":"delete_investigation_fields"}],"ids":["12345678-1234-1234-1234-1234567890ab","87654321-4321-4321-4321-0987654321ba"],"value":["field1","field2"]}},"example18":{"description":"The following request sets investigation fields for the rules with the specified IDs, overwriting any existing investigation fields. If the set of investigation fields is the same as the existing investigation fields, no changes are made.","summary":"Edit - Set (overwrite existing) investigation fields for rules (idempotent)","value":{"action":"edit","edit":[{"type":"set_investigation_fields","value":["field1","field2"]}],"ids":["12345678-1234-1234-1234-1234567890ab","87654321-4321-4321-4321-0987654321ba"]}},"example19":{"description":"The following request sets a timeline template for the rules with the specified IDs. If the same timeline template is already set for a rule, no changes are made.","summary":"Edit - Set (overwrite existing) timeline template for rules (idempotent)","value":{"action":"edit","edit":[{"type":"set_timeline","value":{"timeline_id":"3e827bab-838a-469f-bd1e-5e19a2bff2fd","timeline_title":"Alerts Involving a Single User Timeline"}}],"ids":["eacdfc95-e007-41c9-986e-4b2cbdfdc71b"]}},"example20":{"description":"The following request sets a schedule for the rules with the specified IDs. If the same schedule is already set for a rule, no changes are made.","summary":"Edit - Set (overwrite existing) schedule for rules (idempotent)","value":{"action":"edit","edit":[{"type":"set_schedule","value":{"interval":"1h","lookback":"30m"}}],"ids":["99887766-5544-3322-1100-aabbccddeeff"]}},"example21":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules (non-idempotent)","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"The message body"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191928"]}},"example22":{"description":"The following request sets rule actions for the rules with the specified IDs. Each action receives its own unique ID.","summary":"Edit - Set (overwrite existing) rule actions for rules (non-idempotent)","value":{"action":"edit","edit":[{"type":"set_rule_actions","value":{"actions":[{"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"The message body"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191928"]}},"example23":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules for a webhook connector","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default3","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"The message body"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191921"]}},"example24":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules for an email connector","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default3","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"message":"The message body","subject":"Subject","to":"address@domain.com"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191921"]}},"example25":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules for a slack connector","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default3","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"message":"The content of the message"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191921"]}},"example26":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules for a PagerDuty connector","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default3","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"eventAction":"trigger","severity":"critical","summary":"The message body","timestamp":"2023-10-31T00:00:00.000Z"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191921"]}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_BulkDeleteRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkDisableRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkEnableRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkExportRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkDuplicateRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkManualRuleRun"},{"$ref":"#/components/schemas/Security_Detections_API_BulkEditRules"}]}}}},"responses":{"200":{"content":{"application/json":{"examples":{"example01":{"description":"In this response one rule was updated and one was skipped. Objects returned in attributes.results.skipped will only include rules' id, name, and skip_reason.","summary":"Successful response","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[{"id":"51658332-a15e-4c9e-912a-67214e2e2359","name":"Skipped rule","skip_reason":"RULE_NOT_MODIFIED"}],"updated":[{"anomaly_threshold":50,"author":["Elastic"],"created_at":"2022-02-21T14:14:13.801Z","created_by":"elastic","description":"A machine learning job detected unusually large numbers of DNS queries for a single top-level DNS domain, which is often used for DNS tunneling. DNS tunneling can be used for command-and-control, persistence, or data exfiltration activity. For example, dnscat tends to generate many DNS questions for a top-level domain as it uses the DNS protocol to tunnel data.","enabled":true,"exceptions_list":[],"execution_summary":{"last_execution":{"date":"2022-03-23T16:06:12.787Z","message":"This rule attempted to query data from Elasticsearch indices listed in the \"Index pattern\" section of the rule definition, but no matching index was found.","metrics":{"execution_gap_duration_s":0,"total_indexing_duration_ms":15,"total_search_duration_ms":135},"status":"partial failure","status_order":20}},"false_positives":["DNS domains that use large numbers of child domains, such as software or content distribution networks, can trigger this alert and such parent domains can be excluded."],"from":"now-45m","id":"8bc7dad0-9320-11ec-9265-8b772383a08d","immutable":false,"interval":"15m","license":"Elastic License v2","machine_learning_job_id":["packetbeat_dns_tunneling"],"max_signals":100,"name":"DNS Tunneling [Duplicate]","references":["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"],"related_integrations":[],"required_fields":[],"risk_score":21,"risk_score_mapping":[],"rule_id":"7289bf08-4e91-4c70-bf01-e04c4c5d7756","setup":"","severity":"low","severity_mapping":[],"tags":["Elastic","Network","Threat Detection","ML"],"threat":[],"to":"now","type":"machine_learning","updated_at":"2022-02-21T17:05:50.883Z","updated_by":"elastic","version":6}]},"summary":{"failed":0,"skipped":1,"succeeded":1,"total":2}},"rules_count":1,"success":true}},"example02":{"description":"If processing of any rule fails, a partial error outputs the ID and/or name of the affected rule and the corresponding error, as well as successfully processed rules (in the same format as a successful 200 request).","summary":"Partial failure","value":{"value":{"attributes":{"errors":[{"message":"Index patterns can't be added. Machine learning rule doesn't have index patterns property","rules":[{"id":"8bc7dad0-9320-11ec-9265-8b772383a08d","name":"DNS Tunneling [Duplicate]"}],"status_code":500}],"results":{"created":[],"deleted":[],"skipped":[],"updated":[{"actions":[],"author":["Elastic"],"created_at":"2022-02-21T14:14:17.883Z","created_by":"elastic","description":"Generates a detection alert for each external alert written to the configured indices. Enabling this rule allows you to immediately begin investigating external alerts in the app.","enabled":true,"exceptions_list":[],"execution_summary":{"last_execution":{"date":"2022-03-23T16:06:12.787Z","message":"This rule attempted to query data from Elasticsearch indices listed in the \"Index pattern\" section of the rule definition, but no matching index was found.","metrics":{"execution_gap_duration_s":0,"total_indexing_duration_ms":15,"total_search_duration_ms":135},"status":"partial failure","status_order":20}},"false_positives":[],"from":"now-6m","id":"8e5c1a40-9320-11ec-9265-8b772383a08d","immutable":false,"index":["apm-*-transaction*","traces-apm*","auditbeat-*","filebeat-*","logs-*","packetbeat-*","winlogbeat-*","added-by-id-*"],"interval":"5m","language":"kuery","license":"Elastic License v2","max_signals":10000,"name":"External Alerts [Duplicate]","query":"event.kind:alert and not event.module:(endgame or endpoint)\n","references":[],"related_integrations":[],"required_fields":[],"risk_score":47,"risk_score_mapping":[{"field":"event.risk_score","operator":"equals","value":""}],"rule_id":"941faf98-0cdc-4569-b16d-4af962914d61","rule_name_override":"message","setup":"","severity":"medium","severity_mapping":[{"field":"event.severity","operator":"equals","severity":"low","value":"21"},{"field":"event.severity","operator":"equals","severity":"medium","value":"47"},{"field":"event.severity","operator":"equals","severity":"high","value":"73"},{"field":"event.severity","operator":"equals","severity":"critical","value":"99"}],"tags":["Elastic","Network","Windows","APM","macOS","Linux"],"threat":[],"timestamp_override":"event.ingested","to":"now","type":"query","updated_at":"2022-02-21T16:56:22.818Z","updated_by":"elastic","version":5}]},"summary":{"failed":1,"skipped":0,"succeeded":1,"total":2}},"message":"Bulk edit partially failed","rules_count":2,"status_code":500,"success":false}}},"example03":{"description":"The attributes.errors section of the response shows that two rules failed to update and one succeeded. The same results would be returned if you ran the request without dry run mode enabled. Notice that there are no arrays in attributes.results. In dry run mode, rule updates are not applied and saved to Elasticsearch, so the endpoint wouldn’t return results for rules that have been updated, created, or deleted.","summary":"Dry run","value":{"attributes":{"errors":[{"err_code":"IMMUTABLE","message":"Elastic rule can't be edited","rules":[{"id":"81aa0480-06af-11ed-94fb-dd1a0597d8d2","name":"Unusual AWS Command for a User"}],"status_code":500},{"err_code":"MACHINE_LEARNING_INDEX_PATTERN","message":"Machine learning rule doesn't have index patterns","rules":[{"id":"dc015d10-0831-11ed-ac8b-05a222bd8d4a","name":"Suspicious Powershell Script [Duplicate]"}],"status_code":500}],"results":{"created":[],"deleted":[],"skipped":[],"updated":[]},"summary":{"failed":2,"skipped":0,"succeeded":1,"total":3}},"message":"Bulk edit partially failed","status_code":500}},"example04":{"description":"This example presents the successful setting of tags for 2 rules. There was a difference between the set of tags that were being added and the tags that were already set in the rules, that's why the rules were updated.","summary":"Set tags successsully for 2 rules","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[],"updated":[{"actions":[],"author":[],"created_at":"2025-03-25T11:46:41.899Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-6m","id":"738112cd-6cfa-414a-8457-2a658845d6ba","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"5m","language":"kuery","license":"","max_signals":100,"meta":{"kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Rule 1","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":1,"risk_score":21,"risk_score_mapping":[],"rule_id":"6fb746a0-dfe5-40fa-b03f-5cbb84f3e32e","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":["tag-1","tag-2"],"threat":[],"to":"now","type":"query","updated_at":"2025-03-25T11:47:11.350Z","updated_by":"elastic","version":2},{"actions":[{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"Hello"},"uuid":"580e2e16-5e91-411c-999b-7b75a11ed441"}],"author":[],"created_at":"2025-03-25T09:49:08.343Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-360s","id":"eacdfc95-e007-41c9-986e-4b2cbdfdc71b","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"3m","investigation_fields":{"field_names":["alert.status","Endpoint.policy.applied.artifacts.global.channel"]},"language":"kuery","license":"","max_signals":100,"meta":{"from":"3m","kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Rule 2","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":33,"risk_score":21,"risk_score_mapping":[],"rule_id":"43250a55-53a3-4ddd-96cb-82a1bd720180","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":["tag-1","tag-2"],"threat":[],"timeline_id":"3e827bab-838a-469f-bd1e-5e19a2bff2fd","timeline_title":"Alerts Involving a Single User Timeline","to":"now","type":"query","updated_at":"2025-03-25T11:47:11.357Z","updated_by":"elastic","version":24}]},"summary":{"failed":0,"skipped":0,"succeeded":2,"total":2}},"rules_count":2,"success":true}},"example05":{"description":"This example presents the idempotent behavior of the edit action with set_tags request. Both rules already had exactly the same tags that were being added, so no changes were made in any of them.","summary":"Idempotent behavior of set_tags","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[{"id":"eacdfc95-e007-41c9-986e-4b2cbdfdc71b","name":"Rule 1","skip_reason":"RULE_NOT_MODIFIED"},{"id":"738112cd-6cfa-414a-8457-2a658845d6ba","name":"Rule 2","skip_reason":"RULE_NOT_MODIFIED"}],"updated":[]},"summary":{"failed":0,"skipped":2,"succeeded":0,"total":2}},"rules_count":2,"success":true}},"example06":{"description":"This example presents the idempotent behavior of the edit action with add_tags request. One rule was updated and one was skipped. The rule that was skipped already had all the tags that were being added.","summary":"Idempotent behavior of add_tags","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[{"id":"738112cd-6cfa-414a-8457-2a658845d6ba","name":"Test Rule 2","skip_reason":"RULE_NOT_MODIFIED"}],"updated":[{"actions":[{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"Hello"},"uuid":"580e2e16-5e91-411c-999b-7b75a11ed441"}],"author":[],"created_at":"2025-03-25T09:49:08.343Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-360s","id":"eacdfc95-e007-41c9-986e-4b2cbdfdc71b","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"3m","investigation_fields":{"field_names":["alert.status","Endpoint.policy.applied.artifacts.global.channel"]},"language":"kuery","license":"","max_signals":100,"meta":{"from":"3m","kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Test rule","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":34,"risk_score":21,"risk_score_mapping":[],"rule_id":"43250a55-53a3-4ddd-96cb-82a1bd720180","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":["tag-1","tag-2","tag-4"],"threat":[],"timeline_id":"3e827bab-838a-469f-bd1e-5e19a2bff2fd","timeline_title":"Alerts Involving a Single User Timeline","to":"now","type":"query","updated_at":"2025-03-25T11:55:12.752Z","updated_by":"elastic","version":25}]},"summary":{"failed":0,"skipped":1,"succeeded":1,"total":2}},"rules_count":2,"success":true}},"example07":{"description":"This example shows a non-idempotent nature of the set_rule_actions requests. Regardless if the actions are the same as the existing actions for a rule, the actions are always set in the rule and receive a new unique ID.","summary":"Non-idempotent behavior for set_rule_actions","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[],"updated":[{"actions":[{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"Hello"},"uuid":"e48428e5-efac-4856-b8ad-b271c14eaa91"}],"author":[],"created_at":"2025-03-25T09:49:08.343Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-360s","id":"eacdfc95-e007-41c9-986e-4b2cbdfdc71b","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"3m","investigation_fields":{"field_names":["alert.status","Endpoint.policy.applied.artifacts.global.channel"]},"language":"kuery","license":"","max_signals":100,"meta":{"from":"3m","kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Test rule","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":39,"risk_score":21,"risk_score_mapping":[],"rule_id":"43250a55-53a3-4ddd-96cb-82a1bd720180","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":["tag-1","tag-2","tag-4"],"threat":[],"timeline_id":"3e827bab-838a-469f-bd1e-5e19a2bff2fd","timeline_title":"Alerts Involving a Single User Timeline","to":"now","type":"query","updated_at":"2025-03-25T12:17:40.528Z","updated_by":"elastic","version":30}]},"summary":{"failed":0,"skipped":0,"succeeded":1,"total":1}},"rules_count":1,"success":true}},"example08":{"description":"This example shows a non-idempotent nature of the add_rule_actions requests. Regardless if the added action is the same as another existing action for a rule, the new action is added to the rule and receives a new unique ID.","summary":"Non-idempotent behavior for add_rule_actions","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[],"updated":[{"actions":[{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"76af173d-38d8-4a9a-b2cc-a3c695b845b4","params":{"body":"Message body"},"uuid":"0309347e-3954-429c-9168-5da2663389af"},{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"76af173d-38d8-4a9a-b2cc-a3c695b845b4","params":{"body":"Message body"},"uuid":"49ddaa94-d63d-410e-90dc-8c1bad9552bd"}],"author":[],"created_at":"2025-04-02T12:42:03.400Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-6m","id":"0d3eb0cd-88c4-4651-ac87-6d9f0cb87217","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"5m","language":"kuery","license":"","max_signals":100,"meta":{"kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Jacek test rule","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":2,"risk_score":21,"risk_score_mapping":[],"rule_id":"2684c020-1370-4719-ac27-eafe6428fe10","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":[],"threat":[],"to":"now","type":"query","updated_at":"2025-04-02T12:51:40.215Z","updated_by":"elastic","version":2}]},"summary":{"failed":0,"skipped":0,"succeeded":1,"total":1}},"rules_count":1,"success":true}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_BulkEditActionResponse"},{"$ref":"#/components/schemas/Security_Detections_API_BulkExportActionResponse"}]}}},"description":"OK"}},"summary":"Apply a bulk action to detection rules","tags":["Security Detections API"]}},"/api/detection_engine/rules/_export":{"post":{"description":"Export detection rules to an `.ndjson` file. The following configuration items are also included in the `.ndjson` file:\n- Actions\n- Exception lists\n\u003e info\n\u003e Rule actions and connectors are included in the exported file, but sensitive information about the connector (such as authentication credentials) is not included. You must re-add missing connector details after importing detection rules.\n\n\u003e You can use Kibana’s [Saved Objects](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html) UI (Stack Management → Kibana → Saved Objects) or the Saved Objects APIs (experimental) to [export](https://www.elastic.co/docs/api/doc/kibana/operation/operation-exportsavedobjectsdefault) and [import](https://www.elastic.co/docs/api/doc/kibana/operation/operation-importsavedobjectsdefault) any necessary connectors before importing detection rules.\n\n\u003e Similarly, any value lists used for rule exceptions are not included in rule exports or imports. Use the [Manage value lists](https://www.elastic.co/guide/en/security/current/value-lists-exceptions.html#manage-value-lists) UI (Rules → Detection rules (SIEM) → Manage value lists) to export and import value lists separately.\n","operationId":"ExportRules","parameters":[{"description":"Determines whether a summary of the exported rules is returned.","in":"query","name":"exclude_export_details","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"File name for saving the exported rules.\n\u003e info\n\u003e When using cURL to export rules to a file, use the -O and -J options to save the rules to the file name specified in the URL.\n","in":"query","name":"file_name","required":false,"schema":{"default":"export.ndjson","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"nullable":true,"type":"object","properties":{"objects":{"description":"Array of `rule_id` fields. Exports all rules when unspecified.","items":{"type":"object","properties":{"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"}},"required":["rule_id"]},"type":"array"}},"required":["objects"]}}},"required":false},"responses":{"200":{"content":{"application/ndjson":{"schema":{"description":"An `.ndjson` file containing the returned rules.\n\nEach line in the file represents an object (a rule, exception list parent container, or exception list item), and the last line includes a summary of what was exported.\n","format":"binary","type":"string"}}},"description":"Indicates a successful call."}},"summary":"Export detection rules","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"localhost:5601/api/detection_engine/rules/_export?exclude_export_details=true\u0026file_name=exported_rules.ndjson\" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'\n{\n \"objects\": [\n {\n \"rule_id\":\"343580b5-c811-447c-8d2d-2ccf052c6900\"\n },\n {\n \"rule_id\":\"2938c9fa-53eb-4c04-b79c-33cbf041b18d\"\n }\n ]\n}\n"}]}},"/api/detection_engine/rules/_find":{"get":{"description":"Retrieve a paginated list of detection rules. By default, the first page is returned, with 20 results per page.","operationId":"FindRules","parameters":[{"in":"query","name":"fields","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"Search query\n\nFilters the returned results according to the value of the specified field, using the alert.attributes.\u003cfield name\u003e:\u003cfield value\u003e syntax, where \u003cfield name\u003e can be:\n- name\n- enabled\n- tags\n- createdBy\n- interval\n- updatedBy\n\u003e info\n\u003e Even though the JSON rule object uses created_by and updated_by fields, you must use createdBy and updatedBy fields in the filter.\n","in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"description":"Field to sort by","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_FindRulesSortField"}},{"description":"Sort order","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_SortOrder"}},{"description":"Page number","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Rules per page","in":"query","name":"per_page","required":false,"schema":{"default":20,"minimum":0,"type":"integer"}},{"description":"Gaps range start","in":"query","name":"gaps_range_start","required":false,"schema":{"type":"string"}},{"description":"Gaps range end","in":"query","name":"gaps_range_end","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"value":{"data":[{"created_at":"2020-02-02T10:05:19.613Z","created_by":"elastic","description":"Identifies a PowerShell process launched by either cscript.exe or wscript.exe. Observing Windows scripting processes executing a PowerShell script, may be indicative of malicious activity.","enabled":false,"execution_summary":{"last_execution":{"date":"2022-03-23T16:06:12.787Z","message":"This rule attempted to query data from Elasticsearch indices listed in the \"Index pattern\" section of the rule definition, but no matching index was found.","metrics":{"execution_gap_duration_s":0,"total_indexing_duration_ms":15,"total_search_duration_ms":135},"status":"partial failure","status_order":20}},"false_positives":[],"from":"now-6m","id":"89761517-fdb0-4223-b67b-7621acc48f9e","immutable":true,"index":["winlogbeat-*"],"interval":"5m","language":"kuery","max_signals":33,"name":"Windows Script Executing PowerShell","query":"event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:(\"wscript.exe\" or \"cscript.exe\") and process.name:\"powershell.exe\"","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"event.action","type":"keyword"},{"ecs":true,"name":"process.name","type":"keyword"},{"ecs":true,"name":"process.parent.name","type":"keyword"}],"risk_score":21,"rule_id":"f545ff26-3c94-4fd0-bd33-3c7f95a3a0fc","setup":"","severity":"low","tags":["Elastic","Windows"],"threat":[{"framework":"MITRE ATT\u0026CK","tactic":{"id":"TA0002","name":"Execution","reference":"https://attack.mitre.org/tactics/TA0002/"},"technique":[{"id":"T1193","name":"Spearphishing Attachment","reference":"https://attack.mitre.org/techniques/T1193/"}]}],"to":"now","type":"query","updated_at":"2020-02-02T10:05:19.830Z","updated_by":"elastic"}],"page":1,"perPage":5,"total":4}}},"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"},"type":"array"},"page":{"type":"integer"},"perPage":{"type":"integer"},"total":{"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response\n\u003e info\n\u003e These fields are under development and their usage or schema may change: execution_summary.\n"}},"summary":"List all detection rules","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \"localhost:5601/api/detection_engine/rules/_find?page=1\u0026per_page=5\u0026sort_field=enabled\u0026sort_order=asc\u0026filter=alert.attributes.name:windows\" -H 'kbn-xsrf: true'\n"}]}},"/api/detection_engine/rules/_import":{"post":{"description":"Import detection rules from an `.ndjson` file, including actions and exception lists. The request must include:\n- The `Content-Type: multipart/form-data` HTTP header.\n- A link to the `.ndjson` file containing the rules.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n\u003e info\n\u003e To import rules with actions, you need at least Read privileges for the Action and Connectors feature. To overwrite or add new connectors, you need All privileges for the Actions and Connectors feature. To import rules without actions, you don’t need Actions and Connectors privileges. Refer to [Enable and access detections](https://www.elastic.co/guide/en/security/current/detections-permissions-section.html#enable-detections-ui) for more information.\n\n\u003e info\n\u003e Rule actions and connectors are included in the exported file, but sensitive information about the connector (such as authentication credentials) is not included. You must re-add missing connector details after importing detection rules.\n\n\u003e You can use Kibana’s [Saved Objects](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html) UI (Stack Management → Kibana → Saved Objects) or the Saved Objects APIs (experimental) to [export](https://www.elastic.co/docs/api/doc/kibana/operation/operation-exportsavedobjectsdefault) and [import](https://www.elastic.co/docs/api/doc/kibana/operation/operation-importsavedobjectsdefault) any necessary connectors before importing detection rules.\n\n\u003e Similarly, any value lists used for rule exceptions are not included in rule exports or imports. Use the [Manage value lists](https://www.elastic.co/guide/en/security/current/value-lists-exceptions.html#manage-value-lists) UI (Rules → Detection rules (SIEM) → Manage value lists) to export and import value lists separately.\n","operationId":"ImportRules","parameters":[{"description":"Determines whether existing rules with the same `rule_id` are overwritten.","in":"query","name":"overwrite","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Determines whether existing exception lists with the same `list_id` are overwritten. Both the exception list container and its items are overwritten.","in":"query","name":"overwrite_exceptions","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Determines whether existing actions with the same `kibana.alert.rule.actions.id` are overwritten.","in":"query","name":"overwrite_action_connectors","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Generates a new list ID for each imported exception list.","in":"query","name":"as_new_list","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"The `.ndjson` file containing the rules.","format":"binary","type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"summary":"Import rules with success","value":{"errors":[],"exceptions_errors":[],"exceptions_success":true,"exceptions_success_count":0,"rules_count":1,"success":true,"success_count":1}}},"schema":{"additionalProperties":false,"type":"object","properties":{"action_connectors_errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ErrorSchema"},"type":"array"},"action_connectors_success":{"type":"boolean"},"action_connectors_success_count":{"minimum":0,"type":"integer"},"action_connectors_warnings":{"items":{"$ref":"#/components/schemas/Security_Detections_API_WarningSchema"},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ErrorSchema"},"type":"array"},"exceptions_errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ErrorSchema"},"type":"array"},"exceptions_success":{"type":"boolean"},"exceptions_success_count":{"minimum":0,"type":"integer"},"rules_count":{"minimum":0,"type":"integer"},"success":{"type":"boolean"},"success_count":{"minimum":0,"type":"integer"}},"required":["exceptions_success","exceptions_success_count","exceptions_errors","rules_count","success","success_count","errors","action_connectors_errors","action_connectors_warnings","action_connectors_success","action_connectors_success_count"]}}},"description":"Indicates a successful call."}},"summary":"Import detection rules","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"\u003cKibanaURL\u003e/api/detection_engine/rules/_import\"\n-u \u003cusername\u003e:\u003cpassword\u003e -H 'kbn-xsrf: true'\n-H 'Content-Type: multipart/form-data'\n--form \"file=@\u003clink to file\u003e\"\n"}]}},"/api/detection_engine/rules/{id}/exceptions":{"post":{"description":"Create exception items that apply to a single detection rule.","operationId":"CreateRuleExceptionListItems","parameters":[{"description":"Detection rule's identifier","examples":{"id":{"value":"330bdd28-eedf-40e1-bed0-f10176c7f9e0"}},"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_RuleId"}}],"requestBody":{"content":{"application/json":{"schema":{"example":{"items":[{"description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"type":"simple"}]},"type":"object","properties":{"items":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateRuleExceptionListItemProps"},"type":"array"}},"required":["items"]}}},"description":"Rule exception items.","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ruleExceptionItems":{"value":[{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}]}},"schema":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"},"type":"array"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badPayload":{"value":{"error":"Bad Request","message":"Invalid request payload JSON format","statusCode":400}},"badRequest":{"value":{"error":"Bad Request","message":"[request params]: id: Invalid uuid","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"message":"Unable to create exception-list","status_code":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create rule exception items","tags":["Security Exceptions API"]}},"/api/detection_engine/rules/prepackaged":{"put":{"description":"Install and update all Elastic prebuilt detection rules and Timelines.\n\nThis endpoint allows you to install and update prebuilt detection rules and Timelines provided by Elastic. \nWhen you call this endpoint, it will:\n- Install any new prebuilt detection rules that are not currently installed in your system.\n- Update any existing prebuilt detection rules that have been modified or improved by Elastic.\n- Install any new prebuilt Timelines that are not currently installed in your system.\n- Update any existing prebuilt Timelines that have been modified or improved by Elastic.\n\nThis ensures that your detection engine is always up-to-date with the latest rules and Timelines, \nproviding you with the most current and effective threat detection capabilities.\n","operationId":"InstallPrebuiltRulesAndTimelines","responses":{"200":{"content":{"application/json":{"examples":{"example1":{"value":{"rules_installed":112,"rules_updated":0,"timelines_installed":5,"timelines_updated":2}}},"schema":{"additionalProperties":false,"type":"object","properties":{"rules_installed":{"description":"The number of rules installed","minimum":0,"type":"integer"},"rules_updated":{"description":"The number of rules updated","minimum":0,"type":"integer"},"timelines_installed":{"description":"The number of timelines installed","minimum":0,"type":"integer"},"timelines_updated":{"description":"The number of timelines updated","minimum":0,"type":"integer"}},"required":["rules_installed","rules_updated","timelines_installed","timelines_updated"]}}},"description":"Indicates a successful call"}},"summary":"Install prebuilt detection rules and Timelines","tags":["Security Detections API"]}},"/api/detection_engine/rules/prepackaged/_status":{"get":{"description":"Retrieve the status of all Elastic prebuilt detection rules and Timelines. \n\nThis endpoint provides detailed information about the number of custom rules, installed prebuilt rules, available prebuilt rules that are not installed, outdated prebuilt rules, installed prebuilt timelines, available prebuilt timelines that are not installed, and outdated prebuilt timelines.\n","operationId":"ReadPrebuiltRulesAndTimelinesStatus","responses":{"200":{"content":{"application/json":{"examples":{"example1":{"value":{"rules_custom_installed":0,"rules_installed":0,"rules_not_installed":112,"rules_not_updated":0,"timelines_installed":0,"timelines_not_installed":0,"timelines_not_updated":0}}},"schema":{"additionalProperties":false,"type":"object","properties":{"rules_custom_installed":{"description":"The total number of custom rules","minimum":0,"type":"integer"},"rules_installed":{"description":"The total number of installed prebuilt rules","minimum":0,"type":"integer"},"rules_not_installed":{"description":"The total number of available prebuilt rules that are not installed","minimum":0,"type":"integer"},"rules_not_updated":{"description":"The total number of outdated prebuilt rules","minimum":0,"type":"integer"},"timelines_installed":{"description":"The total number of installed prebuilt timelines","minimum":0,"type":"integer"},"timelines_not_installed":{"description":"The total number of available prebuilt timelines that are not installed","minimum":0,"type":"integer"},"timelines_not_updated":{"description":"The total number of outdated prebuilt timelines","minimum":0,"type":"integer"}},"required":["rules_custom_installed","rules_installed","rules_not_installed","rules_not_updated","timelines_installed","timelines_not_installed","timelines_not_updated"]}}},"description":"Indicates a successful call"}},"summary":"Retrieve the status of prebuilt detection rules and Timelines","tags":["Security Detections API"]}},"/api/detection_engine/rules/preview":{"post":{"operationId":"RulePreview","parameters":[{"description":"Enables logging and returning in response ES queries, performed during rule execution","in":"query","name":"enable_logged_requests","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]}],"discriminator":{"propertyName":"type"}}}},"description":"An object containing tags to add or remove and alert ids the changes will be applied","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"isAborted":{"type":"boolean"},"logs":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewLogs"},"type":"array"},"previewId":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}},"required":["logs"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Preview rule alerts generated on specified time range","tags":["Security Detections API"]}},"/api/detection_engine/signals/assignees":{"post":{"description":"Assign users to detection alerts, and unassign them from alerts.\n\u003e info\n\u003e You cannot add and remove the same assignee in the same request.\n","operationId":"SetAlertAssignees","requestBody":{"content":{"application/json":{"examples":{"add":{"value":{"assignees":{"add":["u_MxY0jbrft7EcfC6iNZSUGeI_n6iYrSwZj5mWF5EqmSU_0"],"remove":[]},"ids":["681c2a707335aa7df5f349b70013d87254746191712ecf0ced9b3e2d538503a6"]}},"remove":{"value":{"assignees":{"add":[],"remove":["u_MxY0jbrft7EcfC6iNZSUGeI_n6iYrSwZj5mWF5EqmSU_0"]},"ids":["681c2a707335aa7df5f349b70013d87254746191712ecf0ced9b3e2d538503a6"]}}},"schema":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Security_Detections_API_AlertAssignees","description":"Details about the assignees to assign and unassign."},"ids":{"$ref":"#/components/schemas/Security_Detections_API_AlertIds"}},"required":["assignees","ids"]}}},"required":true},"responses":{"200":{"content":{"application/ndjson":{"examples":{"add":{"value":{"batches":"1,","deleted":"0,","failures":[],"noops":"0,","requests_per_second":"-1,","retries":[{"bulk":"0,"},{"search":0}],"throttled_millis":"0,","throttled_until_millis":"0,","timed_out":"false,","took":"76,","total":"1,","updated":"1,","version_conflicts":"0,"}}}}},"description":"Indicates a successful call."},"400":{"description":"Invalid request."}},"summary":"Assign and unassign users from detection alerts","tags":["Security Detections API"]}},"/api/detection_engine/signals/finalize_migration":{"post":{"deprecated":true,"description":"Finalize successful migrations of detection alerts. This replaces the original index's alias with the successfully migrated index's alias.\nThe endpoint is idempotent; therefore, it can safely be used to poll a given migration and, upon completion,\nfinalize it.\n","operationId":"FinalizeAlertsMigration","requestBody":{"content":{"application/json":{"schema":{"example":{"migration_ids":["924f7c50-505f-11eb-ae0a-3fa2e626a51d"]},"type":"object","properties":{"migration_ids":{"description":"Array of `migration_id`s to finalize.","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["migration_ids"]}}},"description":"Array of `migration_id`s to finalize","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"migrations":[{"completed":true,"destinationIndex":".siem-signals-default-000002-r000016","id":"924f7c50-505f-11eb-ae0a-3fa2e626a51d","sourceIndex":".siem-signals-default-000002","status":"success","updated":"2021-01-06T22:05:56.859Z","version":16}]}}},"schema":{"items":{"$ref":"#/components/schemas/Security_Detections_API_MigrationFinalizationResult"},"type":"array"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Finalize detection alert migrations","tags":["Security Detections API"]}},"/api/detection_engine/signals/migration":{"delete":{"deprecated":true,"description":"Migrations favor data integrity over shard size. Consequently, unused or orphaned indices are artifacts of\nthe migration process. A successful migration will result in both the old and new indices being present.\nAs such, the old, orphaned index can (and likely should) be deleted.\n\nWhile you can delete these indices manually,\nthe endpoint accomplishes this task by applying a deletion policy to the relevant index, causing it to be deleted\nafter 30 days. It also deletes other artifacts specific to the migration implementation.\n","operationId":"AlertsMigrationCleanup","requestBody":{"content":{"application/json":{"schema":{"example":{"migration_ids":["924f7c50-505f-11eb-ae0a-3fa2e626a51d"]},"type":"object","properties":{"migration_ids":{"description":"Array of `migration_id`s to cleanup.","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["migration_ids"]}}},"description":"Array of `migration_id`s to cleanup","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"migrations":[{"destinationIndex":".siem-signals-default-000002-r000016","id":"924f7c50-505f-11eb-ae0a-3fa2e626a51d","sourceIndex":".siem-signals-default-000002","status":"success","updated":"2021-01-06T22:05:56.859Z","version":16}]}}},"schema":{"items":{"$ref":"#/components/schemas/Security_Detections_API_MigrationCleanupResult"},"type":"array"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Clean up detection alert migrations","tags":["Security Detections API"]},"post":{"deprecated":true,"description":"Initiate a migration of detection alerts.\nMigrations are initiated per index. While the process is neither destructive nor interferes with existing data, it may be resource-intensive. As such, it is recommended that you plan your migrations accordingly.\n","operationId":"CreateAlertsMigration","requestBody":{"content":{"application/json":{"examples":{"singleIndex":{"value":{"index":[".siem-signals-default-000001"]}}},"schema":{"allOf":[{"type":"object","properties":{"index":{"description":"Array of index names to migrate.","items":{"format":"nonempty","minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["index"]},{"$ref":"#/components/schemas/Security_Detections_API_AlertsReindexOptions"}]}}},"description":"Alerts migration parameters","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"indices":[{"index":".siem-signals-default-000001,","migration_id":"923f7c50-505f-11eb-ae0a-3fa2e626a51d","migration_index":".siem-signals-default-000001-r000016"}]}}},"schema":{"type":"object","properties":{"indices":{"items":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexMigrationSuccess"},{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexMigrationError"},{"$ref":"#/components/schemas/Security_Detections_API_SkippedAlertsIndexMigration"}]},"type":"array"}},"required":["indices"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Initiate a detection alert migration","tags":["Security Detections API"]}},"/api/detection_engine/signals/migration_status":{"get":{"deprecated":true,"description":"Retrieve indices that contain detection alerts of a particular age, along with migration information for each of those indices.","operationId":"ReadAlertsMigrationStatus","parameters":[{"description":"Maximum age of qualifying detection alerts","in":"query","name":"from","required":true,"schema":{"description":"Time from which data is analyzed. For example, now-4200s means the rule analyzes data from 70 minutes\nbefore its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).\n","example":"now-30d","format":"date-math","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"indices":[{"index":".siem-signals-default-000002","is_outdated":true,"migrations":[{"id":"924f7c50-505f-11eb-ae0a-3fa2e626a51d","status":"pending","updated":"2021-01-06T20:41:37.173Z","version":16}],"signal_versions":[{"count":100,"version":15},{"count":87,"version":16}],"version":15},{"index":".siem-signals-default-000003","is_outdated":false,"migrations":[],"signal_versions":[{"count":54,"version":16}],"version":16}]}}},"schema":{"type":"object","properties":{"indices":{"items":{"$ref":"#/components/schemas/Security_Detections_API_IndexMigrationStatus"},"type":"array"}},"required":["indices"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Retrieve the status of detection alert migrations","tags":["Security Detections API"]}},"/api/detection_engine/signals/search":{"post":{"description":"Find and/or aggregate detection alerts that match the given query.","operationId":"SearchAlerts","requestBody":{"content":{"application/json":{"examples":{"query":{"value":{"aggs":{"alertsByGrouping":{"terms":{"field":"host.name","size":10}},"missingFields":{"missing":{"field":"host.name"}}},"query":{"bool":{"filter":[{"bool":{"filter":[{"match_phrase":{"kibana.alert.workflow_status":"open"}}],"must":[],"must_not":[{"exists":{"field":"kibana.alert.building_block_type"}}],"should":[]}},{"range":{"@timestamp":{"gte":"2025-01-17T08:00:00.000Z","lte":"2025-01-18T07:59:59.999Z"}}}]}},"runtime_mappings":{},"size":0}}},"schema":{"description":"Elasticsearch query and aggregation request","type":"object","properties":{"_source":{"oneOf":[{"type":"boolean"},{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"aggs":{"additionalProperties":true,"type":"object"},"fields":{"items":{"type":"string"},"type":"array"},"query":{"additionalProperties":true,"type":"object"},"runtime_mappings":{"additionalProperties":true,"type":"object"},"size":{"minimum":0,"type":"integer"},"sort":{"$ref":"#/components/schemas/Security_Detections_API_AlertsSort"},"track_total_hits":{"type":"boolean"}}}}},"description":"Search and/or aggregation query","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"_shards":{"failed":0,"skipped":0,"successful":1,"total":1},"aggregations":{"alertsByGrouping":{"buckets":[{"doc_count":5,"key":"Host-f43kkddfyc"}],"doc_count_error_upper_bound":0,"sum_other_doc_count":0},"missingFields":{"doc_count":0}},"hits":{"hits":[],"max_score":null,"total":{"relation":"eq","value":5}},"timed_out":false,"took":0}}},"schema":{"additionalProperties":true,"description":"Elasticsearch search response","type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Find and/or aggregate detection alerts","tags":["Security Detections API"]}},"/api/detection_engine/signals/status":{"post":{"description":"Set the status of one or more detection alerts.","operationId":"SetAlertsStatus","requestBody":{"content":{"application/json":{"examples":{"byId":{"value":{"signal_ids":["80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1"],"status":"closed"}},"byQuery":{"value":{"conflicts":"proceed","query":{"bool":{"filter":[{"@timestamp":{"format":"strict_date_optional_time","gte":"2024-10-23T07:00:00.000Z","lte":"2025-01-21T20:12:11.704Z"},"range":null},{"bool":{"filter":{"bool":{"filter":[{"match_phrase":{"kibana.alert.workflow_status":"open"}},{"@timestamp":{"format":"strict_date_optional_time","gte":"2024-10-23T07:00:00.000Z","lte":"2025-01-21T20:12:11.704Z"},"range":null}],"must":[],"must_not":[{"exists":{"field":"kibana.alert.building_block_type"}}],"should":[]}}}}],"must":[],"must_not":[],"should":[]}},"status":"closed"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_SetAlertsStatusByIds"},{"$ref":"#/components/schemas/Security_Detections_API_SetAlertsStatusByQuery"}]}}},"description":"An object containing desired status and explicit alert ids or a query to select alerts","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"byId":{"value":{"batches":1,"deleted":0,"failures":[],"noops":0,"requests_per_second":-1,"retries":{"bulk":0,"search":0},"throttled_millis":0,"throttled_until_millis":0,"timed_out":false,"took":81,"total":1,"updated":1,"version_conflicts":0}},"byQuery":{"value":{"batches":1,"deleted":0,"failures":[],"noops":0,"requests_per_second":-1,"retries":{"bulk":0,"search":0},"throttled_millis":0,"throttled_until_millis":0,"timed_out":false,"took":100,"total":17,"updated":17,"version_conflicts":0}}},"schema":{"additionalProperties":true,"description":"Elasticsearch update by query response","type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Set a detection alert status","tags":["Security Detections API"]}},"/api/detection_engine/signals/tags":{"post":{"description":"And tags to detection alerts, and remove them from alerts.\n\u003e info\n\u003e You cannot add and remove the same alert tag in the same request.\n","operationId":"SetAlertTags","requestBody":{"content":{"application/json":{"examples":{"add":{"value":{"ids":["549c7129c76cbd554aba1bd638f8a49dde95088f5832e50218358e7eca1cf16e"],"tags":{"tags_to_add":["Duplicate"],"tags_to_remove":[]}}},"remove":{"value":{"ids":["549c7129c76cbd554aba1bd638f8a49dde95088f5832e50218358e7eca1cf16e"],"tags":{"tags_to_add":[],"tags_to_remove":["Duplicate"]}}}},"schema":{"type":"object","properties":{"ids":{"$ref":"#/components/schemas/Security_Detections_API_AlertIds"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_SetAlertTags"}},"required":["ids","tags"]}}},"description":"An object containing tags to add or remove and alert ids the changes will be applied","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"batches":"1,","deleted":"0,","failures":[],"noops":"0,","requests_per_second":"-1,","retries":{"bulk":"0,","search":0},"throttled_millis":"0,","throttled_until_millis":"0,","timed_out":"false,","took":"68,","total":"1,","updated":"1,","version_conflicts":"0,"}}},"schema":{"additionalProperties":true,"description":"Elasticsearch update by query response","type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Add and remove detection alert tags","tags":["Security Detections API"]}},"/api/detection_engine/tags":{"get":{"description":"List all unique tags from all detection rules.","operationId":"ReadTags","responses":{"200":{"content":{"application/json":{"examples":{"example1":{"value":["zeek","suricata","windows","linux","network","initial access","remote access","phishing"]}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"}}},"description":"Indicates a successful call"}},"summary":"List all detection rule tags","tags":["Security Detections API"]}},"/api/encrypted_saved_objects/_rotate_key":{"post":{"description":"Superuser role required.\n\nIf a saved object cannot be decrypted using the primary encryption key, then Kibana will attempt to decrypt it using the specified decryption-only keys. In most of the cases this overhead is negligible, but if you're dealing with a large number of saved objects and experiencing performance issues, you may want to rotate the encryption key.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n","operationId":"rotateEncryptionKey","parameters":[{"description":"Specifies a maximum number of saved objects that Kibana can process in a single batch. Bulk key rotation is an iterative process since Kibana may not be able to fetch and process all required saved objects in one go and splits processing into consequent batches. By default, the batch size is 10000, which is also a maximum allowed value.\n","in":"query","name":"batch_size","required":false,"schema":{"default":10000,"type":"number"}},{"description":"Limits encryption key rotation only to the saved objects with the specified type. By default, Kibana tries to rotate the encryption key for all saved object types that may contain encrypted attributes.\n","in":"query","name":"type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"rotateEncryptionKeyResponse":{"$ref":"#/components/examples/Saved_objects_key_rotation_response"}},"schema":{"type":"object","properties":{"failed":{"description":"Indicates the number of the saved objects that were still encrypted with one of the old encryption keys that Kibana failed to re-encrypt with the primary key.\n","type":"number"},"successful":{"description":"Indicates the total number of all encrypted saved objects (optionally filtered by the requested `type`), regardless of the key Kibana used for encryption.\n\nNOTE: In most cases, `total` will be greater than `successful` even if `failed` is zero. The reason is that Kibana may not need or may not be able to rotate encryption keys for all encrypted saved objects.\n","type":"number"},"total":{"description":"Indicates the total number of all encrypted saved objects (optionally filtered by the requested `type`), regardless of the key Kibana used for encryption.\n","type":"number"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Already in progress."}},"summary":"Rotate a key for encrypted saved objects","tags":["saved objects"]}},"/api/endpoint_list":{"post":{"description":"Create an endpoint exception list, which groups endpoint exception list items. If an endpoint exception list already exists, an empty response is returned.","operationId":"CreateEndpointList","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Create an endpoint exception list","tags":["Security Endpoint Exceptions API"]}},"/api/endpoint_list/items":{"delete":{"description":"Delete an endpoint exception list item using the `id` or `item_id` field.","operationId":"DeleteEndpointListItem","parameters":[{"description":"Either `id` or `item_id` must be specified","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemId"}},{"description":"Either `id` or `item_id` must be specified","in":"query","name":"item_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list item not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Delete an endpoint exception list item","tags":["Security Endpoint Exceptions API"]},"get":{"description":"Get the details of an endpoint exception list item using the `id` or `item_id` field.","operationId":"ReadEndpointListItem","parameters":[{"description":"Either `id` or `item_id` must be specified","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemId"}},{"description":"Either `id` or `item_id` must be specified","in":"query","name":"item_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"},"type":"array"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list item not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Get an endpoint exception list item","tags":["Security Endpoint Exceptions API"]},"post":{"description":"Create an endpoint exception list item, and associate it with the endpoint exception list.","operationId":"CreateEndpointListItem","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryArray"},"item_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId"},"meta":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemName"},"os_types":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemTags","default":[]},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemType"}},"required":["type","name","description","entries"]}}},"description":"Exception list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list item already exists"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Create an endpoint exception list item","tags":["Security Endpoint Exceptions API"]},"put":{"description":"Update an endpoint exception list item using the `id` or `item_id` field.","operationId":"UpdateEndpointListItem","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"_version":{"type":"string"},"comments":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryArray"},"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemId","description":"Either `id` or `item_id` must be specified"},"item_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId","description":"Either `id` or `item_id` must be specified"},"meta":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemName"},"os_types":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemTags"},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemType"}},"required":["type","name","description","entries"]}}},"description":"Exception list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list item not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Update an endpoint exception list item","tags":["Security Endpoint Exceptions API"]}},"/api/endpoint_list/items/_find":{"get":{"description":"Get a list of all endpoint exception list items.","operationId":"FindEndpointListItems","parameters":[{"description":"Filters the returned results according to the value of the specified field,\nusing the `\u003cfield name\u003e:\u003cfield value\u003e` syntax.\n","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_FindEndpointListItemsFilter"}},{"description":"The page number to return","in":"query","name":"page","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"The number of exception list items to return per page","in":"query","name":"per_page","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Determines which field is used to sort the results","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"}},{"description":"Determines the sort order, which can be `desc` or `asc`","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"},"type":"array"},"page":{"minimum":0,"type":"integer"},"per_page":{"minimum":0,"type":"integer"},"pit":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Get endpoint exception list items","tags":["Security Endpoint Exceptions API"]}},"/api/endpoint/action":{"get":{"description":"Get a list of all response actions.","operationId":"EndpointGetActionsList","parameters":[{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Page"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PageSize"}},{"in":"query","name":"commands","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Commands"}},{"in":"query","name":"agentIds","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentIds"}},{"in":"query","name":"userIds","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_UserIds"}},{"in":"query","name":"startDate","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_StartDate"}},{"in":"query","name":"endDate","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndDate"}},{"in":"query","name":"agentTypes","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"}},{"in":"query","name":"withOutputs","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_WithOutputs"}},{"in":"query","name":"types","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Types"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetEndpointActionListResponse"}}},"description":"OK"}},"summary":"Get response actions","tags":["Security Endpoint Management API"]}},"/api/endpoint/action_status":{"get":{"description":"Get the status of response actions for the specified agent IDs.","operationId":"EndpointGetActionsStatus","parameters":[{"in":"query","name":"query","required":true,"schema":{"type":"object","properties":{"agent_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentIds"}}}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ActionStatusSuccessResponse"}}},"description":"OK"}},"summary":"Get response actions status","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/{action_id}":{"get":{"description":"Get the details of a response action using the action ID.","operationId":"EndpointGetActionsDetails","parameters":[{"in":"path","name":"action_id","required":true,"schema":{"description":"The ID of the action to retrieve.","example":"fr518850-681a-4y60-aa98-e22640cae2b8","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetEndpointActionResponse"}}},"description":"OK"}},"summary":"Get action details","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/{action_id}/file/{file_id}":{"get":{"description":"Get information for the specified file using the file ID.","operationId":"EndpointFileInfo","parameters":[{"in":"path","name":"action_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"file_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuccessResponse"}}},"description":"OK"}},"summary":"Get file information","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/{action_id}/file/{file_id}/download":{"get":{"description":"Download a file from an endpoint.","operationId":"EndpointFileDownload","parameters":[{"in":"path","name":"action_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"file_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuccessResponse"}}},"description":"OK"}},"summary":"Download a file","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/execute":{"post":{"description":"Run a shell command on an endpoint.","operationId":"EndpointExecuteAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ExecuteRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ExecuteRouteResponse"}}},"description":"OK"}},"summary":"Run a command","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/get_file":{"post":{"description":"Get a file from an endpoint.","operationId":"EndpointGetFileAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetFileRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetFileRouteResponse"}}},"description":"OK"}},"summary":"Get a file","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/isolate":{"post":{"description":"Isolate an endpoint from the network. The endpoint remains isolated until it's released.","operationId":"EndpointIsolateAction","requestBody":{"content":{"application/json":{"examples":{"multiple_endpoints":{"summary":"Isolates several hosts; includes a comment","value":{"comment":"Locked down, pending further investigation","endpoint_ids":["9972d10e-4b9e-41aa-a534-a85e2a28ea42","bc0e4f0c-3bca-4633-9fee-156c0b505d16","fa89271b-b9d4-43f2-a684-307cffddeb5a"]}},"single_endpoint":{"summary":"Isolates a single host with an endpoint_id value of ed518850-681a-4d60-bb98-e22640cae2a8","value":{"endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"]}},"with_case_id":{"summary":"Isolates a single host with a case_id value of 1234","value":{"case_ids":["4976be38-c134-4554-bd5e-0fd89ce63667"],"comment":"Isolating as initial response","endpoint_ids":["1aa1f8fd-0fb0-4fe4-8c30-92068272d3f0","b30a11bf-1395-4707-b508-fbb45ef9793e"]}}},"schema":{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_IsolateRouteResponse"}}},"description":"OK"}},"summary":"Isolate an endpoint","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/kill_process":{"post":{"description":"Terminate a running process on an endpoint.","operationId":"EndpointKillProcessAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_KillProcessRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_KillProcessRouteResponse"}}},"description":"OK"}},"summary":"Terminate a process","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/running_procs":{"post":{"description":"Get a list of all processes running on an endpoint.","operationId":"EndpointGetProcessesAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetProcessesRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetProcessesRouteResponse"}}},"description":"OK"}},"summary":"Get running processes","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/runscript":{"post":{"description":"Run a shell command on an endpoint.","operationId":"RunScriptAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_RunScriptRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuccessResponse"}}},"description":"OK"}},"summary":"Run a script","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/scan":{"post":{"description":"Scan a specific file or directory on an endpoint for malware.","operationId":"EndpointScanAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ScanRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ScanRouteResponse"}}},"description":"OK"}},"summary":"Scan a file or directory","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/state":{"get":{"description":"Get a response actions state, which reports whether encryption is enabled.","operationId":"EndpointGetActionsState","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ActionStateSuccessResponse"}}},"description":"OK"}},"summary":"Get actions state","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/suspend_process":{"post":{"description":"Suspend a running process on an endpoint.","operationId":"EndpointSuspendProcessAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuspendProcessRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuspendProcessRouteResponse"}}},"description":"OK"}},"summary":"Suspend a process","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/unisolate":{"post":{"description":"Release an isolated endpoint, allowing it to rejoin a network.","operationId":"EndpointUnisolateAction","requestBody":{"content":{"application/json":{"examples":{"multipleHosts":{"summary":"Releases several hosts; includes a comment:","value":{"comment":"Benign process identified, releasing group","endpoint_ids":["9972d10e-4b9e-41aa-a534-a85e2a28ea42","bc0e4f0c-3bca-4633-9fee-156c0b505d16","fa89271b-b9d4-43f2-a684-307cffddeb5a"]}},"singleHost":{"summary":"Releases a single host with an endpoint_id value of ed518850-681a-4d60-bb98-e22640cae2a8","value":{"endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"]}},"withCaseId":{"summary":"Releases hosts with an associated case; includes a comment.","value":{"case_ids":["4976be38-c134-4554-bd5e-0fd89ce63667"],"comment":"Remediation complete, restoring network","endpoint_ids":["1aa1f8fd-0fb0-4fe4-8c30-92068272d3f0","b30a11bf-1395-4707-b508-fbb45ef9793e"]}}},"schema":{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_UnisolateRouteResponse"}}},"description":"OK"}},"summary":"Release an isolated endpoint","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/upload":{"post":{"description":"Upload a file to an endpoint.","operationId":"EndpointUploadAction","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_UploadRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_UploadRouteResponse"}}},"description":"OK"}},"summary":"Upload a file","tags":["Security Endpoint Management API"]}},"/api/endpoint/metadata":{"get":{"operationId":"GetEndpointMetadataList","parameters":[{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Page"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PageSize"}},{"in":"query","name":"kuery","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Kuery"}},{"in":"query","name":"hostStatuses","required":true,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_HostStatuses"}},{"in":"query","name":"sortField","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SortField"}},{"in":"query","name":"sortDirection","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SortDirection"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_MetadataListResponse"}}},"description":"OK"}},"summary":"Get a metadata list","tags":["Security Endpoint Management API"]}},"/api/endpoint/metadata/{id}":{"get":{"operationId":"GetEndpointMetadata","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"ed518850-681a-4d60-bb98-e22640cae2a8","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointMetadataResponse"}}},"description":"OK"}},"summary":"Get metadata","tags":["Security Endpoint Management API"]}},"/api/endpoint/policy_response":{"get":{"operationId":"GetPolicyResponse","parameters":[{"in":"query","name":"query","required":true,"schema":{"type":"object","properties":{"agentId":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentId"}}}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuccessResponse"}}},"description":"OK"}},"summary":"Get a policy response","tags":["Security Endpoint Management API"]}},"/api/endpoint/protection_updates_note/{package_policy_id}":{"get":{"operationId":"GetProtectionUpdatesNote","parameters":[{"in":"path","name":"package_policy_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ProtectionUpdatesNoteResponse"}}},"description":"OK"}},"summary":"Get a protection updates note","tags":["Security Endpoint Management API"]},"post":{"operationId":"CreateUpdateProtectionUpdatesNote","parameters":[{"in":"path","name":"package_policy_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ProtectionUpdatesNoteResponse"}}},"description":"OK"}},"summary":"Create or update a protection updates note","tags":["Security Endpoint Management API"]}},"/api/entity_analytics/monitoring/engine/init":{"post":{"operationId":"InitMonitoringEngine","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoringEngineDescriptor"}}},"description":"Successful response"}},"summary":"Initialize the Privilege Monitoring Engine","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/privileges/health":{"get":{"operationId":"PrivMonHealth","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}},"description":"Successful response"}},"summary":"Health check on Privilege Monitoring","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users":{"post":{"operationId":"CreatePrivMonUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_UserName"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"}}},"description":"User created successfully"}},"summary":"Create a new monitored user","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users/_csv":{"post":{"operationId":"BulkUploadUsersCSV","requestBody":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"CSV file containing users to upsert","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"upserted_count":{"type":"integer"}}}}},"description":"Successful response"}},"summary":"Upsert multiple monitored users via CSV upload","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users/_json":{"post":{"operationId":"BulkUploadUsersJSON","requestBody":{"content":{"text/json":{"schema":{"type":"object","properties":{"users":{"items":{"type":"object","properties":{"is_monitored":{"type":"boolean"},"user_name":{"type":"string"}}},"type":"array"}}}}},"description":"JSON file containing users to upsert","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"upserted_count":{"type":"integer"}}}}},"description":"Successful response"}},"summary":"Upsert multiple monitored users via JSON upload","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users/{id}":{"delete":{"operationId":"DeletePrivMonUser","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"aknowledged":{"description":"Indicates if the deletion was successful","type":"boolean"},"message":{"description":"A message providing additional information about the deletion status","type":"string"}},"required":["success"]}}},"description":"User deleted successfully"}},"summary":"Delete a monitored user","tags":["Security Entity Analytics API"]},"get":{"operationId":"GetPrivMonUser","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"}}},"description":"User details retrieved"}},"summary":"Retrieve a monitored user by ID","tags":["Security Entity Analytics API"]},"put":{"operationId":"UpdatePrivMonUser","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"}}},"description":"User updated successfully"}},"summary":"Update a monitored user","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users/list":{"get":{"operationId":"ListPrivMonUsers","parameters":[{"description":"KQL query to filter the list of monitored users","in":"query","name":"kql","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"},"type":"array"}}},"description":"List of monitored users"}},"summary":"List all monitored users","tags":["Security Entity Analytics API"]}},"/api/entity_store/enable":{"post":{"operationId":"InitEntityStore","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delay":{"default":"1m","description":"The delay before the transform will run.","pattern":"[smdh]$","type":"string"},"docsPerSecond":{"description":"The number of documents per second to process.","type":"integer"},"enrichPolicyExecutionInterval":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_Interval"},"entityTypes":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"},"type":"array"},"fieldHistoryLength":{"default":10,"description":"The number of historical values to keep for each field.","type":"integer"},"filter":{"type":"string"},"frequency":{"default":"1m","description":"The frequency at which the transform will run.","pattern":"[smdh]$","type":"string"},"indexPattern":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IndexPattern"},"lookbackPeriod":{"default":"24h","description":"The amount of time the transform looks back to calculate the aggregations.","pattern":"[smdh]$","type":"string"},"timeout":{"default":"180s","description":"The timeout for initializing the aggregating transform.","pattern":"[smdh]$","type":"string"},"timestampField":{"default":"@timestamp","description":"The field to use as the timestamp.","type":"string"}}}}},"description":"Schema for the entity store initialization","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"engines":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"},"type":"array"},"succeeded":{"type":"boolean"}}}}},"description":"Successful response"},"400":{"description":"Invalid request"}},"summary":"Initialize the Entity Store","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines":{"get":{"operationId":"ListEntityEngines","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"engines":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"},"type":"array"}}}}},"description":"Successful response"}},"summary":"List the Entity Engines","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/{entityType}":{"delete":{"operationId":"DeleteEntityEngine","parameters":[{"description":"The entity type of the engine (either 'user' or 'host').","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}},{"description":"Control flag to also delete the entity data.","in":"query","name":"data","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}},"description":"Successful response"}},"summary":"Delete the Entity Engine","tags":["Security Entity Analytics API"]},"get":{"operationId":"GetEntityEngine","parameters":[{"description":"The entity type of the engine (either 'user' or 'host').","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"}}},"description":"Successful response"}},"summary":"Get an Entity Engine","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/{entityType}/init":{"post":{"operationId":"InitEntityEngine","parameters":[{"description":"The entity type of the engine (either 'user' or 'host').","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delay":{"default":"1m","description":"The delay before the transform will run.","pattern":"[smdh]$","type":"string"},"docsPerSecond":{"description":"The number of documents per second to process.","type":"integer"},"enrichPolicyExecutionInterval":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_Interval"},"fieldHistoryLength":{"default":10,"description":"The number of historical values to keep for each field.","type":"integer"},"filter":{"type":"string"},"frequency":{"default":"1m","description":"The frequency at which the transform will run.","pattern":"[smdh]$","type":"string"},"indexPattern":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IndexPattern"},"lookbackPeriod":{"default":"24h","description":"The amount of time the transform looks back to calculate the aggregations.","pattern":"[smdh]$","type":"string"},"timeout":{"default":"180s","description":"The timeout for initializing the aggregating transform.","pattern":"[smdh]$","type":"string"},"timestampField":{"default":"@timestamp","description":"The field to use as the timestamp for the entity type.","type":"string"}}}}},"description":"Schema for the engine initialization","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"}}},"description":"Successful response"},"400":{"description":"Invalid request"}},"summary":"Initialize an Entity Engine","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/{entityType}/start":{"post":{"operationId":"StartEntityEngine","parameters":[{"description":"The entity type of the engine","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean"}}}}},"description":"Successful response"}},"summary":"Start an Entity Engine","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/{entityType}/stop":{"post":{"operationId":"StopEntityEngine","parameters":[{"description":"The entity type of the engine (either 'user' or 'host').","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"stopped":{"type":"boolean"}}}}},"description":"Successful response"}},"summary":"Stop an Entity Engine","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/apply_dataview_indices":{"post":{"operationId":"ApplyEntityEngineDataviewIndices","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDataviewUpdateResult"},"type":"array"},"success":{"type":"boolean"}}}}},"description":"Successful response"},"207":{"content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"items":{"type":"string"},"type":"array"},"result":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDataviewUpdateResult"},"type":"array"},"success":{"type":"boolean"}}}}},"description":"Partial successful response"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Error response"}},"summary":"Apply DataView indices to all installed engines","tags":["Security Entity Analytics API"]}},"/api/entity_store/entities/list":{"get":{"description":"List entities records, paging, sorting and filtering as needed.","operationId":"ListEntities","parameters":[{"in":"query","name":"sort_field","required":false,"schema":{"type":"string"}},{"in":"query","name":"sort_order","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"maximum":10000,"minimum":1,"type":"integer"}},{"description":"An ES query to filter by.","in":"query","name":"filterQuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"entity_types","required":true,"schema":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"inspect":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_InspectQuery"},"page":{"minimum":1,"type":"integer"},"per_page":{"maximum":1000,"minimum":1,"type":"integer"},"records":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_Entity"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["records","page","per_page","total"]}}},"description":"Entities returned successfully"}},"summary":"List Entity Store Entities","tags":["Security Entity Analytics API"]}},"/api/entity_store/status":{"get":{"operationId":"GetEntityStoreStatus","parameters":[{"description":"If true returns a detailed status of the engine including all it's components","in":"query","name":"include_components","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"engines":{"items":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"},{"type":"object","properties":{"components":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineComponentStatus"},"type":"array"}}}]},"type":"array"},"status":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_StoreStatus"}},"required":["status","engines"]}}},"description":"Successful response"}},"summary":"Get the status of the Entity Store","tags":["Security Entity Analytics API"]}},"/api/exception_lists":{"delete":{"description":"Delete an exception list using the `id` or `list_id` field.","operationId":"DeleteExceptionList","parameters":[{"description":"Exception list's identifier. Either `id` or `list_id` must be specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"}},{"description":"Human readable exception list string identifier, e.g. `trusted-linux-processes`. Either `id` or `list_id` must be specified.","examples":{"autogeneratedId":{"value":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2"},"list_id":{"value":"simple_list"}},"in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}}],"responses":{"200":{"content":{"application/json":{"examples":{"detectionExceptionList":{"value":{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [DELETE /api/exception_lists?list_id=simple_list\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list list_id: \"foo\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete an exception list","tags":["Security Exceptions API"]},"get":{"description":"Get the details of an exception list using the `id` or `list_id` field.","operationId":"ReadExceptionList","parameters":[{"description":"Exception list's identifier. Either `id` or `list_id` must be specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"}},{"description":"Human readable exception list string identifier, e.g. `trusted-linux-processes`. Either `id` or `list_id` must be specified.","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}}],"responses":{"200":{"content":{"application/json":{"examples":{"detectionType":{"value":{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists?list_id=simple_list\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get exception list details","tags":["Security Exceptions API"]},"post":{"description":"An exception list groups exception items and can be associated with detection rules. You can assign exception lists to multiple detection rules.\n\u003e info\n\u003e All exception items added to the same list are evaluated using `OR` logic. That is, if any of the items in a list evaluate to `true`, the exception prevents the rule from generating an alert. Likewise, `OR` logic is used for evaluating exceptions when more than one exception list is assigned to a rule. To use the `AND` operator, you can define multiple clauses (`entries`) in a single exception item.\n","operationId":"CreateExceptionList","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"This is a sample detection type exception list.","list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"type":"detection"},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListDescription"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListTags","default":[]},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListType"},"version":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListVersion","default":1}},"required":["name","description","type"]}}},"description":"Exception list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"autogeneratedListId":{"value":{"_version":"WzMsMV0=","created_at":"2025-01-09T01:05:23.019Z","created_by":"elastic","description":"This is a sample detection type exception with an autogenerated list_id.","id":"28243c2f-624a-4443-823d-c0b894880931","immutable":false,"list_id":"8c1aae4c-1ef5-4bce-a2e3-16584b501783","name":"Sample Detection Exception List","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"ad94de31-39f7-4ad7-b8e4-988bfa95f338","type":"detection","updated_at":"2025-01-09T01:05:23.020Z","updated_by":"elastic","version":1}},"namespaceAgnostic":{"value":{"_version":"WzUsMV0=","created_at":"2025-01-09T01:10:36.369Z","created_by":"elastic","description":"This is a sample agnostic endpoint type exception.","id":"1a744e77-22ca-4b6b-9085-54f55275ebe5","immutable":false,"list_id":"b935eb55-7b21-4c1c-b235-faa1df23b3d6","name":"Sample Agnostic Endpoint Exception List","namespace_type":"agnostic","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"49ea0adc-a2b8-4d83-a8f3-2fb98301dea3","type":"endpoint","updated_at":"2025-01-09T01:10:36.369Z","updated_by":"elastic","version":1}},"typeDetection":{"value":{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}},"typeEndpoint":{"value":{"_version":"WzQsMV0=","created_at":"2025-01-09T01:07:49.658Z","created_by":"elastic","description":"This is a sample endpoint type exception list.","id":"a79f4730-6e32-4278-abfc-349c0add7d54","immutable":false,"list_id":"endpoint_list","name":"Sample Endpoint Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"94a028af-8f47-427a-aca5-ffaf829e64ee","type":"endpoint","updated_at":"2025-01-09T01:07:49.658Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: list_id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"exception list id: \"simple_list\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create an exception list","tags":["Security Exceptions API"]},"put":{"description":"Update an exception list using the `id` or `list_id` field.","operationId":"UpdateExceptionList","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"Different description","list_id":"simple_list","name":"Updated exception list name","os_types":["linux"],"tags":["draft malware"],"type":"detection"},"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListDescription"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListTags"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListType"},"version":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListVersion"}},"required":["name","description","type"]}}},"description":"Exception list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"simpleList":{"value":{"_version":"WzExLDFd","created_at":"2025-01-07T20:43:55.264Z","created_by":"elastic","description":"Different description","id":"fa7f545f-191b-4d32-b1f0-c7cd62a79e55","immutable":false,"list_id":"simple_list","name":"Updated exception list name","namespace_type":"single","os_types":[],"tags":["draft malware"],"tie_breaker_id":"319fe983-acdd-4806-b6c4-3098eae9392f","type":"detection","updated_at":"2025-01-07T21:32:03.726Z","updated_by":"elastic","version":2}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: list_id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PUT /api/exception_lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Update an exception list","tags":["Security Exceptions API"]}},"/api/exception_lists/_duplicate":{"post":{"description":"Duplicate an existing exception list.","operationId":"DuplicateExceptionList","parameters":[{"in":"query","name":"list_id","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"}},{"description":"Determines whether to include expired exceptions in the duplicated list. Expiration date defined by `expire_time`.","in":"query","name":"include_expired_exceptions","required":true,"schema":{"default":"true","enum":["true","false"],"example":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"detectionExceptionList":{"value":{"_version":"WzExNDY1LDFd","created_at":"2025-01-09T16:19:50.280Z","created_by":"elastic","description":"This is a sample detection type exception","id":"b2f4a715-6ab1-444c-8b1e-3fa1b1049429","immutable":false,"list_id":"d6390d60-bce3-4a48-9002-52db600f329c","name":"Sample Detection Exception List [Duplicate]","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"6fa670bd-666d-4c9c-9f1e-d1dbc516e985","type":"detection","updated_at":"2025-01-09T16:19:50.280Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type: Invalid enum value. Expected 'agnostic' | 'single', received 'foo'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists/_duplicate] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Exception list not found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list to duplicate not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Duplicate an exception list","tags":["Security Exceptions API"]}},"/api/exception_lists/_export":{"post":{"description":"Export an exception list and its associated items to an NDJSON file.","operationId":"ExportExceptionList","parameters":[{"in":"query","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"}},{"in":"query","name":"list_id","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"}},{"description":"Determines whether to include expired exceptions in the exported list. Expiration date defined by `expire_time`.","example":true,"in":"query","name":"include_expired_exceptions","required":true,"schema":{"default":"true","enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/ndjson":{"examples":{"exportSavedObjectsResponse":{"value":"{\"_version\":\"WzExNDU5LDFd\",\"created_at\":\"2025-01-09T16:18:17.757Z\",\"created_by\":\"elastic\",\"description\":\"This is a sample detection type exception\",\"id\":\"c86c2da0-2ab6-4343-b81c-216ef27e8d75\",\"immutable\":false,\"list_id\":\"simple_list\",\"name\":\"Sample Detection Exception List\",\"namespace_type\":\"single\",\"os_types\":[],\"tags\":[\"user added string for a tag\",\"malware\"],\"tie_breaker_id\":\"cf4a7b92-732d-47f0-a0d5-49a35a1736bf\",\"type\":\"detection\",\"updated_at\":\"2025-01-09T16:18:17.757Z\",\"updated_by\":\"elastic\",\"version\":1}\n{\"_version\":\"WzExNDYxLDFd\",\"comments\":[],\"created_at\":\"2025-01-09T16:18:42.308Z\",\"created_by\":\"elastic\",\"description\":\"This is a sample endpoint type exception\",\"entries\":[{\"type\":\"exists\",\"field\":\"actingProcess.file.signer\",\"operator\":\"excluded\"},{\"type\":\"match_any\",\"field\":\"host.name\",\"value\":[\"some host\",\"another host\"],\"operator\":\"included\"}],\"id\":\"f37597ce-eaa7-4b64-9100-4301118f6806\",\"item_id\":\"simple_list_item\",\"list_id\":\"simple_list\",\"name\":\"Sample Endpoint Exception List\",\"namespace_type\":\"single\",\"os_types\":[\"linux\"],\"tags\":[\"user added string for a tag\",\"malware\"],\"tie_breaker_id\":\"4ca3ef3e-9721-42c0-8107-cf47e094d40f\",\"type\":\"simple\",\"updated_at\":\"2025-01-09T16:18:42.308Z\",\"updated_by\":\"elastic\"}\n{\"exported_exception_list_count\":1,\"exported_exception_list_item_count\":1,\"missing_exception_list_item_count\":0,\"missing_exception_list_items\":[],\"missing_exception_lists\":[],\"missing_exception_lists_count\":0}\n"}},"schema":{"description":"A `.ndjson` file containing specified exception list and its items","format":"binary","type":"string"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: list_id: Required, namespace_type: Required","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists/_export] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Export an exception list","tags":["Security Exceptions API"]}},"/api/exception_lists/_find":{"get":{"description":"Get a list of all exception list containers.","operationId":"FindExceptionLists","parameters":[{"description":"Filters the returned results according to the value of the specified field.\n\nUses the `so type.field name:field` value syntax, where `so type` can be:\n\n- `exception-list`: Specify a space-aware exception list.\n- `exception-list-agnostic`: Specify an exception list that is shared across spaces.\n","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_FindExceptionListsFilter"}},{"description":"Determines whether the returned containers are Kibana associated with a Kibana space\nor available in all spaces (`agnostic` or `single`)\n","examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"default":["single"],"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"},"type":"array"}},{"description":"The page number to return","in":"query","name":"page","required":false,"schema":{"example":1,"minimum":1,"type":"integer"}},{"description":"The number of exception lists to return per page","in":"query","name":"per_page","required":false,"schema":{"example":20,"minimum":1,"type":"integer"}},{"description":"Determines which field is used to sort the results.","in":"query","name":"sort_field","required":false,"schema":{"example":"name","type":"string"}},{"description":"Determines the sort order, which can be `desc` or `asc`.","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"example":"desc","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"simpleLists":{"value":{"data":[{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Detection Exception List","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}],"page":1,"per_page":20,"total":1}}},"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists/_find?namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get exception lists","tags":["Security Exceptions API"]}},"/api/exception_lists/_import":{"post":{"description":"Import an exception list and its associated items from an NDJSON file.","operationId":"ImportExceptionList","parameters":[{"description":"Determines whether existing exception lists with the same `list_id` are overwritten.\nIf any exception items have the same `item_id`, those are also overwritten.\n","in":"query","name":"overwrite","required":false,"schema":{"default":false,"example":false,"type":"boolean"}},{"description":"Determines whether the list being imported will have a new `list_id` generated.\nAdditional `item_id`'s are generated for each exception item. Both the exception\nlist and its items are overwritten.\n","in":"query","name":"as_new_list","required":false,"schema":{"default":false,"example":false,"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"A `.ndjson` file containing the exception list","example":"{\"_version\":\"WzExNDU5LDFd\",\"created_at\":\"2025-01-09T16:18:17.757Z\",\"created_by\":\"elastic\",\"description\":\"This is a sample detection type exception\",\"id\":\"c86c2da0-2ab6-4343-b81c-216ef27e8d75\",\"immutable\":false,\"list_id\":\"simple_list\",\"name\":\"Sample Detection Exception List\",\"namespace_type\":\"single\",\"os_types\":[],\"tags\":[\"user added string for a tag\",\"malware\"],\"tie_breaker_id\":\"cf4a7b92-732d-47f0-a0d5-49a35a1736bf\",\"type\":\"detection\",\"updated_at\":\"2025-01-09T16:18:17.757Z\",\"updated_by\":\"elastic\",\"version\":1}\n{\"_version\":\"WzExNDYxLDFd\",\"comments\":[],\"created_at\":\"2025-01-09T16:18:42.308Z\",\"created_by\":\"elastic\",\"description\":\"This is a sample endpoint type exception\",\"entries\":[{\"type\":\"exists\",\"field\":\"actingProcess.file.signer\",\"operator\":\"excluded\"},{\"type\":\"match_any\",\"field\":\"host.name\",\"value\":[\"some host\",\"another host\"],\"operator\":\"included\"}],\"id\":\"f37597ce-eaa7-4b64-9100-4301118f6806\",\"item_id\":\"simple_list_item\",\"list_id\":\"simple_list\",\"name\":\"Sample Endpoint Exception List\",\"namespace_type\":\"single\",\"os_types\":[\"linux\"],\"tags\":[\"user added string for a tag\",\"malware\"],\"tie_breaker_id\":\"4ca3ef3e-9721-42c0-8107-cf47e094d40f\",\"type\":\"simple\",\"updated_at\":\"2025-01-09T16:18:42.308Z\",\"updated_by\":\"elastic\"}\n","format":"binary","type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"withErrors":{"value":{"errors":[{"error":{"message":"Error found importing exception list: Invalid value \\\"4\\\" supplied to \\\"list_id\\\"","status_code":400},"list_id":"(unknown list_id)"},{"error":{"message":"Found that item_id: \\\"f7fd00bb-dba8-4c93-9d59-6cbd427b6330\\\" already exists. Import of item_id: \\\"f7fd00bb-dba8-4c93-9d59-6cbd427b6330\\\" skipped.","status_code":409},"item_id":"f7fd00bb-dba8-4c93-9d59-6cbd427b6330","list_id":"7d7cccb8-db72-4667-b1f3-648efad7c1ee"}],"success":"false,","success_count":"0,","success_count_exception_list_items":0,"success_count_exception_lists":"0,","success_exception_list_items":"false,","success_exception_lists":"false,"}},"withoutErrors":{"value":{"errors":[],"success":true,"success_count":2,"success_count_exception_list_items":1,"success_count_exception_lists":1,"success_exception_list_items":true,"success_exception_lists":"true,"}}},"schema":{"type":"object","properties":{"errors":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListsImportBulkErrorArray"},"success":{"type":"boolean"},"success_count":{"minimum":0,"type":"integer"},"success_count_exception_list_items":{"minimum":0,"type":"integer"},"success_count_exception_lists":{"minimum":0,"type":"integer"},"success_exception_list_items":{"type":"boolean"},"success_exception_lists":{"type":"boolean"}},"required":["errors","success","success_count","success_exception_lists","success_count_exception_lists","success_exception_list_items","success_count_exception_list_items"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists/_import] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Import an exception list","tags":["Security Exceptions API"]}},"/api/exception_lists/items":{"delete":{"description":"Delete an exception list item using the `id` or `item_id` field.","operationId":"DeleteExceptionListItem","parameters":[{"description":"Exception item's identifier. Either `id` or `item_id` must be specified","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemId"}},{"description":"Human readable exception item string identifier, e.g. `trusted-linux-processes`. Either `id` or `item_id` must be specified","in":"query","name":"item_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}}],"responses":{"200":{"content":{"application/json":{"examples":{"simpleExceptionItem":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"example":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400},"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [DELETE /api/exception_lists/items?item_id=simple_list\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list item item_id: \\\"foo\\\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete an exception list item","tags":["Security Exceptions API"]},"get":{"description":"Get the details of an exception list item using the `id` or `item_id` field.","operationId":"ReadExceptionListItem","parameters":[{"description":"Exception list item's identifier. Either `id` or `item_id` must be specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemId"}},{"description":"Human readable exception item string identifier, e.g. `trusted-linux-processes`. Either `id` or `item_id` must be specified.","in":"query","name":"item_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}}],"responses":{"200":{"content":{"application/json":{"examples":{"simpleListItem":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists/items?item_id=\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list item item_id: \\\"foo\\\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get an exception list item","tags":["Security Exceptions API"]},"post":{"description":"Create an exception item and associate it with the specified exception list.\n\u003e info\n\u003e Before creating exception items, you must create an exception list.\n","operationId":"CreateExceptionListItem","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"type":"simple"},"type":"object","properties":{"comments":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemExpireTime"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemTags","default":[]},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemType"}},"required":["list_id","type","name","description","entries"]}}},"description":"Exception list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"autogeneratedItemId":{"value":{"_version":"WzYsMV0=","comments":[],"created_at":"2025-01-09T01:16:23.322Z","created_by":"elastic","description":"This is a sample exception that has no item_id so it is autogenerated.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"}],"id":"323faa75-c657-4fa0-9084-8827612c207b","item_id":"80e6edf7-4b13-4414-858f-2fa74aa52b37","list_id":"8c1aae4c-1ef5-4bce-a2e3-16584b501783","name":"Sample Autogenerated Exception List Item ID","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"d6799986-3a23-4213-bc6d-ed9463a32f23","type":"simple","updated_at":"2025-01-09T01:16:23.322Z","updated_by":"elastic"}},"detectionExceptionListItem":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withExistEntry":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withMatchAnyEntry":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withMatchEntry":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"included","type":"match","value":"Elastic N.V."}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withNestedEntry":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"entries":[{"field":"signer","operator":"included","type":"match","value":"Evil"},{"field":"trusted","operator":"included","type":"match","value":true}],"field":"file.signature","type":"nested"}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withValueListEntry":{"value":{"_version":"WzcsMV0=","comments":[],"created_at":"2025-01-09T01:31:12.614Z","created_by":"elastic","description":"Don't signal when agent.name is rock01 and source.ip is in the goodguys.txt list","entries":[{"field":"source.ip","list":{"id":"goodguys.txt","type":"ip"},"operator":"excluded","type":"list"}],"id":"deb26876-297d-4677-8a1f-35467d2f1c4f","item_id":"686b129e-9b8d-4c59-8d8d-c93a9ea82c71","list_id":"8c1aae4c-1ef5-4bce-a2e3-16584b501783","name":"Filter out good guys ip and agent.name rock01","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"5e0288ce-6657-4c18-9dcc-00ec9e8cc6c8","type":"simple","updated_at":"2025-01-09T01:31:12.614Z","updated_by":"elastic"}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request,","message":"[request body]: list_id: Expected string, received number","statusCode":"400,"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"exception list item id: \\\"simple_list_item\\\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create an exception list item","tags":["Security Exceptions API"]},"put":{"description":"Update an exception list item using the `id` or `item_id` field.","operationId":"UpdateExceptionListItem","requestBody":{"content":{"application/json":{"example":{"comments":[],"description":"Updated description","entries":[{"field":"host.name","operator":"included","type":"match","value":"rock01"}],"item_id":"simple_list_item","name":"Updated name","namespace_type":"single","tags":[],"type":"simple"},"schema":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"comments":{"$ref":"#/components/schemas/Security_Exceptions_API_UpdateExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemExpireTime"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemId","description":"Either `id` or `item_id` must be specified"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId","description":"Either `id` or `item_id` must be specified"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemTags"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemType"}},"required":["type","name","description","entries"]}}},"description":"Exception list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"simpleListItem":{"value":{"_version":"WzEyLDFd","comments":[],"created_at":"2025-01-07T21:12:25.512Z","created_by":"elastic","description":"Updated description","entries":[{"field":"host.name","operator":"included","type":"match","value":"rock01"}],"id":"459c5e7e-f8b2-4f0b-b136-c1fc702f72da","item_id":"simple_list_item","list_id":"simple_list","name":"Updated name","namespace_type":"single","os_types":[],"tags":[],"tie_breaker_id":"ad0754ff-7b19-49ca-b73e-e6aff6bfa2d0","type":"simple","updated_at":"2025-01-07T21:34:50.233Z","updated_by":"elastic"}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: item_id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PUT /api/exception_lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list item item_id: \\\"foo\\\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Update an exception list item","tags":["Security Exceptions API"]}},"/api/exception_lists/items/_find":{"get":{"description":"Get a list of all exception list items in the specified list.","operationId":"FindExceptionListItems","parameters":[{"description":"The `list_id`s of the items to fetch.","in":"query","name":"list_id","required":true,"schema":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"type":"array"}},{"description":"Filters the returned results according to the value of the specified field,\nusing the `\u003cfield name\u003e:\u003cfield value\u003e` syntax.\n","examples":{"singleFilter":{"value":["exception-list.attributes.name:%My%20item"]}},"in":"query","name":"filter","required":false,"schema":{"default":[],"items":{"$ref":"#/components/schemas/Security_Exceptions_API_FindExceptionListItemsFilter"},"type":"array"}},{"description":"Determines whether the returned containers are Kibana associated with a Kibana space\nor available in all spaces (`agnostic` or `single`)\n","examples":{"single":{"value":["single"]}},"in":"query","name":"namespace_type","required":false,"schema":{"default":["single"],"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"},"type":"array"}},{"in":"query","name":"search","required":false,"schema":{"example":"host.name","type":"string"}},{"description":"The page number to return","in":"query","name":"page","required":false,"schema":{"example":1,"minimum":0,"type":"integer"}},{"description":"The number of exception list items to return per page","in":"query","name":"per_page","required":false,"schema":{"example":20,"minimum":0,"type":"integer"}},{"description":"Determines which field is used to sort the results.","example":"name","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},{"description":"Determines the sort order, which can be `desc` or `asc`.","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"example":"desc","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"simpleListItems":{"value":{"data":[{"_version":"WzgsMV0=","comments":[],"created_at":"2025-01-07T21:12:25.512Z","created_by":"elastic","description":"This is a sample exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["jupiter","saturn"]}],"id":"459c5e7e-f8b2-4f0b-b136-c1fc702f72da","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"ad0754ff-7b19-49ca-b73e-e6aff6bfa2d0","type":"simple","updated_at":"2025-01-07T21:12:25.512Z","updated_by":"elastic"}],"page":1,"per_page":20,"total":1}}},"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"minimum":1,"type":"integer"},"pit":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists/items/_find?list_id=simple_list\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list list_id: \"foo\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get exception list items","tags":["Security Exceptions API"]}},"/api/exception_lists/summary":{"get":{"description":"Get a summary of the specified exception list.","operationId":"ReadExceptionListSummary","parameters":[{"description":"Exception list's identifier generated upon creation.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"}},{"description":"Exception list's human readable identifier.","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}},{"description":"Search filter clause","in":"query","name":"filter","required":false,"schema":{"example":"exception-list-agnostic.attributes.tags:\"policy:policy-1\" OR exception-list-agnostic.attributes.tags:\"policy:all\"","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"summary":{"value":{"linux":0,"macos":0,"total":0,"windows":0}}},"schema":{"type":"object","properties":{"linux":{"minimum":0,"type":"integer"},"macos":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"},"windows":{"minimum":0,"type":"integer"}}}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists/summary?list_id=simple_list\u0026namespace_type=agnostic] is unauthorized for user, this action is granted by the Kibana privileges [lists-summary]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get an exception list summary","tags":["Security Exceptions API"]}},"/api/exceptions/shared":{"post":{"description":"An exception list groups exception items and can be associated with detection rules. A shared exception list can apply to multiple detection rules.\n\u003e info\n\u003e All exception items added to the same list are evaluated using `OR` logic. That is, if any of the items in a list evaluate to `true`, the exception prevents the rule from generating an alert. Likewise, `OR` logic is used for evaluating exceptions when more than one exception list is assigned to a rule. To use the `AND` operator, you can define multiple clauses (`entries`) in a single exception item.\n","operationId":"CreateSharedExceptionList","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"This is a sample detection type exception list.","list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"]},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListDescription"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListName"}},"required":["name","description"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"sharedList":{"value":{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: list_id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"message":"Unable to create exception-list","status_code":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"exception list id: \"simple_list\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create a shared exception list","tags":["Security Exceptions API"]}},"/api/features":{"get":{"description":"Get information about all Kibana features. Features are used by spaces and security to refine and secure access to Kibana.\n","operationId":"get-features","responses":{"200":{"content":{"application/json":{"examples":{"getFeaturesExample":{"value":"{\n \"features\": [\n {\n \"name\": \"tasks\",\n \"description\": \"Manages task results\"\n },\n {\n \"name\": \"security\",\n \"description\": \"Manages configuration for Security features, such as users and roles\"\n },\n {\n \"name\": \"searchable_snapshots\",\n \"description\": \"Manages caches and configuration for searchable snapshots\"\n },\n {\n \"name\": \"logstash_management\",\n \"description\": \"Enables Logstash Central Management pipeline storage\"\n },\n {\n \"name\": \"transform\",\n \"description\": \"Manages configuration and state for transforms\"\n },\n {\n \"name\": \"kibana\",\n \"description\": \"Manages Kibana configuration and reports\"\n },\n {\n \"name\": \"synonyms\",\n \"description\": \"Manages synonyms\"\n },\n {\n \"name\": \"async_search\",\n \"description\": \"Manages results of async searches\"\n },\n {\n \"name\": \"ent_search\",\n \"description\": \"Manages configuration for Enterprise Search features\"\n },\n {\n \"name\": \"machine_learning\",\n \"description\": \"Provides anomaly detection and forecasting functionality\"\n },\n {\n \"name\": \"geoip\",\n \"description\": \"Manages data related to GeoIP database downloader\"\n },\n {\n \"name\": \"watcher\",\n \"description\": \"Manages Watch definitions and state\"\n },\n {\n \"name\": \"fleet\",\n \"description\": \"Manages configuration for Fleet\"\n },\n {\n \"name\": \"enrich\",\n \"description\": \"Manages data related to Enrich policies\"\n },\n {\n \"name\": \"inference_plugin\",\n \"description\": \"Inference plugin for managing inference services and inference\"\n }\n ]\n}\n"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Get features","tags":["system"],"x-state":"Technical Preview"}},"/api/fleet/agent_download_sources":{"get":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-settings-read.","operationId":"get-fleet-agent-download-sources","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["id","name","host"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent binary download sources","tags":["Elastic Agent binary download sources"]},"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-agent-download-sources","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["name","host"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["id","name","host"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create an agent binary download source","tags":["Elastic Agent binary download sources"]}},"/api/fleet/agent_download_sources/{sourceId}":{"delete":{"description":"Delete an agent binary download source by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"delete-fleet-agent-download-sources-sourceid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete an agent binary download source","tags":["Elastic Agent binary download sources"]},"get":{"description":"Get an agent binary download source by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-settings-read.","operationId":"get-fleet-agent-download-sources-sourceid","parameters":[{"in":"path","name":"sourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["id","name","host"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent binary download source","tags":["Elastic Agent binary download sources"]},"put":{"description":"Update an agent binary download source by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"put-fleet-agent-download-sources-sourceid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["name","host"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["id","name","host"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update an agent binary download source","tags":["Elastic Agent binary download sources"]}},"/api/fleet/agent_policies":{"get":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup.","operationId":"get-fleet-agent-policies","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"type":"number"}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortOrder","required":false,"schema":{"enum":["desc","asc"],"type":"string"}},{"in":"query","name":"showUpgradeable","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}},{"description":"use withAgentCount instead","in":"query","name":"noAgentCount","required":false,"schema":{"deprecated":true,"type":"boolean"}},{"description":"get policies with agent count","in":"query","name":"withAgentCount","required":false,"schema":{"type":"boolean"}},{"description":"get full policies with package policies populated","in":"query","name":"full","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent policies","tags":["Elastic Agent policies"]},"post":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-all.","operationId":"post-fleet-agent-policies","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"sys_monitoring","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"force":{"type":"boolean"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_protected":{"type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"space_ids":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"}},"required":["name","namespace"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/_bulk_get":{"post":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup.","operationId":"post-fleet-agent-policies-bulk-get","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"full":{"description":"get full policies with package policies populated","type":"boolean"},"ids":{"description":"list of package policy ids","items":{"type":"string"},"type":"array"},"ignoreMissing":{"type":"boolean"}},"required":["ids"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk get agent policies","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}":{"get":{"description":"Get an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup.","operationId":"get-fleet-agent-policies-agentpolicyid","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent policy","tags":["Elastic Agent policies"]},"put":{"description":"Update an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all.","operationId":"put-fleet-agent-policies-agentpolicyid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"bumpRevision":{"type":"boolean"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"force":{"type":"boolean"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_protected":{"type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"space_ids":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"}},"required":["name","namespace"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status":{"get":{"description":"Get auto upgrade agent status\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agent-policies-agentpolicyid-auto-upgrade-agents-status","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"currentVersions":{"items":{"additionalProperties":false,"type":"object","properties":{"agents":{"type":"number"},"failedUpgradeAgents":{"type":"number"},"version":{"type":"string"}},"required":["version","agents","failedUpgradeAgents"]},"type":"array"},"totalAgents":{"type":"number"}},"required":["currentVersions","totalAgents"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get auto upgrade agent status","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/copy":{"post":{"description":"Copy an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all.","operationId":"post-fleet-agent-policies-agentpolicyid-copy","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["name"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Copy an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/download":{"get":{"description":"Download an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-setup.","operationId":"get-fleet-agent-policies-agentpolicyid-download","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"download","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"standalone","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"kubernetes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Download an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/full":{"get":{"description":"Get a full agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read.","operationId":"get-fleet-agent-policies-agentpolicyid-full","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"download","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"standalone","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"kubernetes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"anyOf":[{"type":"string"},{"additionalProperties":false,"type":"object","properties":{"agent":{"additionalProperties":false,"type":"object","properties":{"download":{"additionalProperties":false,"type":"object","properties":{"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}}}},"required":["key"]}}},"sourceURI":{"type":"string"},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"renegotiation":{"type":"string"},"verification_mode":{"type":"string"}}}},"required":["sourceURI"]},"features":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"type":"object"},"limits":{"additionalProperties":false,"type":"object","properties":{"go_max_procs":{"type":"number"}}},"logging":{"additionalProperties":false,"type":"object","properties":{"files":{"additionalProperties":false,"type":"object","properties":{"interval":{"type":"string"},"keepfiles":{"type":"number"},"rotateeverybytes":{"type":"number"}}},"level":{"type":"string"},"to_files":{"type":"boolean"}}},"monitoring":{"additionalProperties":false,"type":"object","properties":{"apm":{},"enabled":{"type":"boolean"},"logs":{"type":"boolean"},"metrics":{"type":"boolean"},"namespace":{"type":"string"},"traces":{"type":"boolean"},"use_output":{"type":"string"}},"required":["enabled","metrics","logs","traces","apm"]},"protection":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"signing_key":{"type":"string"},"uninstall_token_hash":{"type":"string"}},"required":["enabled","uninstall_token_hash","signing_key"]}},"required":["monitoring","download","features"]},"fleet":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"hosts":{"items":{"type":"string"},"type":"array"},"proxy_headers":{},"proxy_url":{"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}}}},"required":["key"]}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"renegotiation":{"type":"string"},"verification_mode":{"type":"string"}}}},"required":["hosts","proxy_headers"]},{"additionalProperties":false,"type":"object","properties":{"kibana":{"additionalProperties":false,"type":"object","properties":{"hosts":{"items":{"type":"string"},"type":"array"},"path":{"type":"string"},"protocol":{"type":"string"}},"required":["hosts","protocol"]}},"required":["kibana"]}]},"id":{"type":"string"},"inputs":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"namespace":{"type":"string"}},"required":["namespace"]},"id":{"type":"string"},"meta":{"additionalProperties":true,"type":"object","properties":{"package":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]}}},"name":{"type":"string"},"package_policy_id":{"type":"string"},"processors":{"items":{"additionalProperties":true,"type":"object","properties":{"add_fields":{"additionalProperties":true,"type":"object","properties":{"fields":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]},"type":"object"},"target":{"type":"string"}},"required":["target","fields"]}},"required":["add_fields"]},"type":"array"},"revision":{"type":"number"},"streams":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"dataset":{"type":"string"},"type":{"type":"string"}},"required":["dataset"]},"id":{"type":"string"}},"required":["id","data_stream"]},"type":"array"},"type":{"type":"string"},"use_output":{"type":"string"}},"required":["id","name","revision","type","data_stream","use_output","package_policy_id"]},"type":"array"},"namespaces":{"items":{"type":"string"},"type":"array"},"output_permissions":{"additionalProperties":{"additionalProperties":{},"type":"object"},"type":"object"},"outputs":{"additionalProperties":{"additionalProperties":true,"type":"object","properties":{"ca_sha256":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"type":"array"},"proxy_headers":{},"proxy_url":{"type":"string"},"type":{"type":"string"}},"required":["type","proxy_headers"]},"type":"object"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"signed":{"additionalProperties":false,"type":"object","properties":{"data":{"type":"string"},"signature":{"type":"string"}},"required":["data","signature"]}},"required":["id","outputs","inputs"]}]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a full agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/outputs":{"get":{"description":"Get a list of outputs associated with agent policy by policy id.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read.","operationId":"get-fleet-agent-policies-agentpolicyid-outputs","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"agentPolicyId":{"type":"string"},"data":{"additionalProperties":false,"type":"object","properties":{"integrations":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"integrationPolicyName":{"type":"string"},"name":{"type":"string"},"pkgName":{"type":"string"}}},"type":"array"},"output":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["output"]},"monitoring":{"additionalProperties":false,"type":"object","properties":{"output":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["output"]}},"required":["monitoring","data"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get outputs for an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/delete":{"post":{"description":"Delete an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all.","operationId":"post-fleet-agent-policies-delete","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agentPolicyId":{"type":"string"},"force":{"description":"bypass validation checks that can prevent agent policy deletion","type":"boolean"}},"required":["agentPolicyId"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/outputs":{"post":{"description":"Get a list of outputs associated with agent policies.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read.","operationId":"post-fleet-agent-policies-outputs","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"ids":{"description":"list of package policy ids","items":{"type":"string"},"type":"array"}},"required":["ids"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"agentPolicyId":{"type":"string"},"data":{"additionalProperties":false,"type":"object","properties":{"integrations":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"integrationPolicyName":{"type":"string"},"name":{"type":"string"},"pkgName":{"type":"string"}}},"type":"array"},"output":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["output"]},"monitoring":{"additionalProperties":false,"type":"object","properties":{"output":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["output"]}},"required":["monitoring","data"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get outputs for agent policies","tags":["Elastic Agent policies"]}},"/api/fleet/agent_status":{"get":{"operationId":"get-fleet-agent-status","parameters":[{"in":"query","name":"policyId","required":false,"schema":{"type":"string"}},{"in":"query","name":"policyIds","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"results":{"additionalProperties":false,"type":"object","properties":{"active":{"type":"number"},"all":{"type":"number"},"error":{"type":"number"},"events":{"type":"number"},"inactive":{"type":"number"},"offline":{"type":"number"},"online":{"type":"number"},"orphaned":{"type":"number"},"other":{"type":"number"},"unenrolled":{"type":"number"},"uninstalled":{"type":"number"},"updating":{"type":"number"}},"required":["events","online","error","offline","other","updating","inactive","unenrolled","all","active"]}},"required":["results"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent status summary","tags":["Elastic Agent status"]}},"/api/fleet/agent_status/data":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agent-status-data","parameters":[{"in":"query","name":"agentsIds","required":true,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]}},{"in":"query","name":"pkgName","required":false,"schema":{"type":"string"}},{"in":"query","name":"pkgVersion","required":false,"schema":{"type":"string"}},{"in":"query","name":"previewData","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"dataPreview":{"items":{},"type":"array"},"items":{"items":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"data":{"type":"boolean"}},"required":["data"]},"type":"object"},"type":"array"}},"required":["items","dataPreview"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get incoming agent data","tags":["Elastic Agents"]}},"/api/fleet/agents":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"default":20,"type":"number"}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"showAgentless","required":false,"schema":{"default":true,"type":"boolean"}},{"in":"query","name":"showInactive","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"withMetrics","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"showUpgradeable","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"getStatusSummary","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortOrder","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"in":"query","name":"searchAfter","required":false,"schema":{"type":"string"}},{"in":"query","name":"openPit","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"pitId","required":false,"schema":{"type":"string"}},{"in":"query","name":"pitKeepAlive","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"access_api_key":{"type":"string"},"access_api_key_id":{"type":"string"},"active":{"type":"boolean"},"agent":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"}},"required":["id","version"]},"audit_unenrolled_reason":{"type":"string"},"components":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"type":"string"},"units":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"payload":{"additionalProperties":{},"type":"object"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"enum":["input","output"],"type":"string"}},"required":["id","type","status","message"]},"type":"array"}},"required":["id","type","status","message"]},"type":"array"},"default_api_key":{"type":"string"},"default_api_key_history":{"items":{"additionalProperties":false,"deprecated":true,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"default_api_key_id":{"type":"string"},"enrolled_at":{"type":"string"},"id":{"type":"string"},"last_checkin":{"type":"string"},"last_checkin_message":{"type":"string"},"last_checkin_status":{"enum":["error","online","degraded","updating","starting"],"type":"string"},"local_metadata":{"additionalProperties":{},"type":"object"},"metrics":{"additionalProperties":false,"type":"object","properties":{"cpu_avg":{"type":"number"},"memory_size_byte_avg":{"type":"number"}}},"namespaces":{"items":{"type":"string"},"type":"array"},"outputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"api_key_id":{"type":"string"},"to_retire_api_key_ids":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"type":{"type":"string"}}},"type":"object"},"packages":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_revision":{"nullable":true,"type":"number"},"sort":{"items":{},"type":"array"},"status":{"enum":["offline","error","online","inactive","enrolling","unenrolling","unenrolled","updating","degraded","uninstalled","orphaned"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"type":{"enum":["PERMANENT","EPHEMERAL","TEMPORARY"],"type":"string"},"unenrolled_at":{"type":"string"},"unenrollment_started_at":{"type":"string"},"unhealthy_reason":{"items":{"enum":["input","output","other"],"type":"string"},"nullable":true,"type":"array"},"upgrade_attempts":{"items":{"type":"string"},"nullable":true,"type":"array"},"upgrade_details":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"action_id":{"type":"string"},"metadata":{"additionalProperties":false,"type":"object","properties":{"download_percent":{"type":"number"},"download_rate":{"type":"number"},"error_msg":{"type":"string"},"failed_state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"retry_error_msg":{"type":"string"},"retry_until":{"type":"string"},"scheduled_at":{"type":"string"}}},"state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"target_version":{"type":"string"}},"required":["target_version","action_id","state"]},"upgrade_started_at":{"nullable":true,"type":"string"},"upgraded_at":{"nullable":true,"type":"string"},"user_provided_metadata":{"additionalProperties":{},"type":"object"}},"required":["id","packages","type","active","enrolled_at","local_metadata"]},"type":"array"},"nextSearchAfter":{"type":"string"},"page":{"type":"number"},"perPage":{"type":"number"},"pit":{"type":"string"},"statusSummary":{"additionalProperties":{"type":"number"},"type":"object"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agents","tags":["Elastic Agents"]},"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"post-fleet-agents","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionIds":{"items":{"type":"string"},"type":"array"}},"required":["actionIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"type":"string"},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agents by action ids","tags":["Elastic Agents"]}},"/api/fleet/agents/{agentId}":{"delete":{"description":"Delete an agent by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"delete-fleet-agents-agentid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"action":{"enum":["deleted"],"type":"string"}},"required":["action"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete an agent","tags":["Elastic Agents"]},"get":{"description":"Get an agent by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-agentid","parameters":[{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}},{"in":"query","name":"withMetrics","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"access_api_key":{"type":"string"},"access_api_key_id":{"type":"string"},"active":{"type":"boolean"},"agent":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"}},"required":["id","version"]},"audit_unenrolled_reason":{"type":"string"},"components":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"type":"string"},"units":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"payload":{"additionalProperties":{},"type":"object"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"enum":["input","output"],"type":"string"}},"required":["id","type","status","message"]},"type":"array"}},"required":["id","type","status","message"]},"type":"array"},"default_api_key":{"type":"string"},"default_api_key_history":{"items":{"additionalProperties":false,"deprecated":true,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"default_api_key_id":{"type":"string"},"enrolled_at":{"type":"string"},"id":{"type":"string"},"last_checkin":{"type":"string"},"last_checkin_message":{"type":"string"},"last_checkin_status":{"enum":["error","online","degraded","updating","starting"],"type":"string"},"local_metadata":{"additionalProperties":{},"type":"object"},"metrics":{"additionalProperties":false,"type":"object","properties":{"cpu_avg":{"type":"number"},"memory_size_byte_avg":{"type":"number"}}},"namespaces":{"items":{"type":"string"},"type":"array"},"outputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"api_key_id":{"type":"string"},"to_retire_api_key_ids":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"type":{"type":"string"}}},"type":"object"},"packages":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_revision":{"nullable":true,"type":"number"},"sort":{"items":{},"type":"array"},"status":{"enum":["offline","error","online","inactive","enrolling","unenrolling","unenrolled","updating","degraded","uninstalled","orphaned"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"type":{"enum":["PERMANENT","EPHEMERAL","TEMPORARY"],"type":"string"},"unenrolled_at":{"type":"string"},"unenrollment_started_at":{"type":"string"},"unhealthy_reason":{"items":{"enum":["input","output","other"],"type":"string"},"nullable":true,"type":"array"},"upgrade_attempts":{"items":{"type":"string"},"nullable":true,"type":"array"},"upgrade_details":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"action_id":{"type":"string"},"metadata":{"additionalProperties":false,"type":"object","properties":{"download_percent":{"type":"number"},"download_rate":{"type":"number"},"error_msg":{"type":"string"},"failed_state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"retry_error_msg":{"type":"string"},"retry_until":{"type":"string"},"scheduled_at":{"type":"string"}}},"state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"target_version":{"type":"string"}},"required":["target_version","action_id","state"]},"upgrade_started_at":{"nullable":true,"type":"string"},"upgraded_at":{"nullable":true,"type":"string"},"user_provided_metadata":{"additionalProperties":{},"type":"object"}},"required":["id","packages","type","active","enrolled_at","local_metadata"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent","tags":["Elastic Agents"]},"put":{"description":"Update an agent by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"put-fleet-agents-agentid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"tags":{"items":{"type":"string"},"type":"array"},"user_provided_metadata":{"additionalProperties":{},"type":"object"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"access_api_key":{"type":"string"},"access_api_key_id":{"type":"string"},"active":{"type":"boolean"},"agent":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"}},"required":["id","version"]},"audit_unenrolled_reason":{"type":"string"},"components":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"type":"string"},"units":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"payload":{"additionalProperties":{},"type":"object"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"enum":["input","output"],"type":"string"}},"required":["id","type","status","message"]},"type":"array"}},"required":["id","type","status","message"]},"type":"array"},"default_api_key":{"type":"string"},"default_api_key_history":{"items":{"additionalProperties":false,"deprecated":true,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"default_api_key_id":{"type":"string"},"enrolled_at":{"type":"string"},"id":{"type":"string"},"last_checkin":{"type":"string"},"last_checkin_message":{"type":"string"},"last_checkin_status":{"enum":["error","online","degraded","updating","starting"],"type":"string"},"local_metadata":{"additionalProperties":{},"type":"object"},"metrics":{"additionalProperties":false,"type":"object","properties":{"cpu_avg":{"type":"number"},"memory_size_byte_avg":{"type":"number"}}},"namespaces":{"items":{"type":"string"},"type":"array"},"outputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"api_key_id":{"type":"string"},"to_retire_api_key_ids":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"type":{"type":"string"}}},"type":"object"},"packages":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_revision":{"nullable":true,"type":"number"},"sort":{"items":{},"type":"array"},"status":{"enum":["offline","error","online","inactive","enrolling","unenrolling","unenrolled","updating","degraded","uninstalled","orphaned"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"type":{"enum":["PERMANENT","EPHEMERAL","TEMPORARY"],"type":"string"},"unenrolled_at":{"type":"string"},"unenrollment_started_at":{"type":"string"},"unhealthy_reason":{"items":{"enum":["input","output","other"],"type":"string"},"nullable":true,"type":"array"},"upgrade_attempts":{"items":{"type":"string"},"nullable":true,"type":"array"},"upgrade_details":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"action_id":{"type":"string"},"metadata":{"additionalProperties":false,"type":"object","properties":{"download_percent":{"type":"number"},"download_rate":{"type":"number"},"error_msg":{"type":"string"},"failed_state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"retry_error_msg":{"type":"string"},"retry_until":{"type":"string"},"scheduled_at":{"type":"string"}}},"state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"target_version":{"type":"string"}},"required":["target_version","action_id","state"]},"upgrade_started_at":{"nullable":true,"type":"string"},"upgraded_at":{"nullable":true,"type":"string"},"user_provided_metadata":{"additionalProperties":{},"type":"object"}},"required":["id","packages","type","active","enrolled_at","local_metadata"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update an agent","tags":["Elastic Agents"]}},"/api/fleet/agents/{agentId}/actions":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-actions","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"action":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"ack_data":{},"data":{},"type":{"enum":["UNENROLL","UPGRADE","POLICY_REASSIGN"],"type":"string"}},"required":["type","data","ack_data"]},{"additionalProperties":false,"type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"log_level":{"enum":["debug","info","warning","error"],"nullable":true,"type":"string"}},"required":["log_level"]},"type":{"enum":["SETTINGS"],"type":"string"}},"required":["type","data"]}]}},"required":["action"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"ack_data":{},"agents":{"items":{"type":"string"},"type":"array"},"created_at":{"type":"string"},"data":{},"expiration":{"type":"string"},"id":{"type":"string"},"minimum_execution_duration":{"type":"number"},"namespaces":{"items":{"type":"string"},"type":"array"},"rollout_duration_seconds":{"type":"number"},"sent_at":{"type":"string"},"source_uri":{"type":"string"},"start_time":{"type":"string"},"total":{"type":"number"},"type":{"type":"string"}},"required":["id","type","data","created_at","ack_data"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create an agent action","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/migrate":{"post":{"description":"Migrate a single agent to another cluster.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-migrate","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"enrollment_token":{"type":"string"},"settings":{"additionalProperties":false,"type":"object","properties":{"ca_sha256":{"type":"string"},"certificate_authorities":{"type":"string"},"elastic_agent_cert":{"type":"string"},"elastic_agent_cert_key":{"type":"string"},"elastic_agent_cert_key_passphrase":{"type":"string"},"headers":{"additionalProperties":{"type":"string"},"type":"object"},"insecure":{"type":"boolean"},"proxy_disabled":{"type":"boolean"},"proxy_headers":{"additionalProperties":{"type":"string"},"type":"object"},"proxy_url":{"type":"string"},"replace_token":{"type":"boolean"},"staging":{"type":"boolean"},"tags":{"items":{"type":"string"},"type":"array"}}},"uri":{"format":"uri","type":"string"}},"required":["uri","enrollment_token"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Migrate a single agent","tags":["Elastic Agents"]}},"/api/fleet/agents/{agentId}/reassign":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-reassign","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"policy_id":{"type":"string"}},"required":["policy_id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{}}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Reassign an agent","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/request_diagnostics":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"post-fleet-agents-agentid-request-diagnostics","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"additional_metrics":{"items":{"enum":["CPU"],"type":"string"},"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Request agent diagnostics","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/unenroll":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-unenroll","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"force":{"type":"boolean"},"revoke":{"type":"boolean"}}}}}},"responses":{},"summary":"Unenroll an agent","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/upgrade":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-upgrade","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"force":{"type":"boolean"},"skipRateLimitCheck":{"type":"boolean"},"source_uri":{"type":"string"},"version":{"type":"string"}},"required":["version"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{}}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Upgrade an agent","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/uploads":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-agentid-uploads","parameters":[{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"},"createTime":{"type":"string"},"error":{"type":"string"},"filePath":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"enum":["READY","AWAITING_UPLOAD","DELETED","EXPIRED","IN_PROGRESS","FAILED"],"type":"string"}},"required":["id","name","filePath","createTime","status","actionId"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent uploads","tags":["Elastic Agents"]}},"/api/fleet/agents/action_status":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-action-status","parameters":[{"in":"query","name":"page","required":false,"schema":{"default":0,"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"default":20,"type":"number"}},{"in":"query","name":"date","required":false,"schema":{"type":"string"}},{"in":"query","name":"latest","required":false,"schema":{"type":"number"}},{"in":"query","name":"errorSize","required":false,"schema":{"default":5,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"},"cancellationTime":{"type":"string"},"completionTime":{"type":"string"},"creationTime":{"description":"creation time of action","type":"string"},"expiration":{"type":"string"},"hasRolloutPeriod":{"type":"boolean"},"is_automatic":{"type":"boolean"},"latestErrors":{"items":{"additionalProperties":false,"description":"latest errors that happened when the agents executed the action","type":"object","properties":{"agentId":{"type":"string"},"error":{"type":"string"},"hostname":{"type":"string"},"timestamp":{"type":"string"}},"required":["agentId","error","timestamp"]},"type":"array"},"nbAgentsAck":{"description":"number of agents that acknowledged the action","type":"number"},"nbAgentsActionCreated":{"description":"number of agents included in action from kibana","type":"number"},"nbAgentsActioned":{"description":"number of agents actioned","type":"number"},"nbAgentsFailed":{"description":"number of agents that failed to execute the action","type":"number"},"newPolicyId":{"description":"new policy id (POLICY_REASSIGN action)","type":"string"},"policyId":{"description":"policy id (POLICY_CHANGE action)","type":"string"},"revision":{"description":"new policy revision (POLICY_CHANGE action)","type":"number"},"startTime":{"description":"start time of action (scheduled actions)","type":"string"},"status":{"enum":["COMPLETE","EXPIRED","CANCELLED","FAILED","IN_PROGRESS","ROLLOUT_PASSED"],"type":"string"},"type":{"enum":["UPGRADE","UNENROLL","SETTINGS","POLICY_REASSIGN","CANCEL","FORCE_UNENROLL","REQUEST_DIAGNOSTICS","UPDATE_TAGS","POLICY_CHANGE","INPUT_ACTION","MIGRATE"],"type":"string"},"version":{"description":"agent version number (UPGRADE action)","type":"string"}},"required":["actionId","nbAgentsActionCreated","nbAgentsAck","nbAgentsFailed","type","nbAgentsActioned","status","creationTime"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent action status","tags":["Elastic Agent actions"]}},"/api/fleet/agents/actions/{actionId}/cancel":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-actions-actionid-cancel","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"actionId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"ack_data":{},"agents":{"items":{"type":"string"},"type":"array"},"created_at":{"type":"string"},"data":{},"expiration":{"type":"string"},"id":{"type":"string"},"minimum_execution_duration":{"type":"number"},"namespaces":{"items":{"type":"string"},"type":"array"},"rollout_duration_seconds":{"type":"number"},"sent_at":{"type":"string"},"source_uri":{"type":"string"},"start_time":{"type":"string"},"total":{"type":"number"},"type":{"type":"string"}},"required":["id","type","data","created_at","ack_data"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Cancel an agent action","tags":["Elastic Agent actions"]}},"/api/fleet/agents/available_versions":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-available-versions","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"type":"string"},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get available agent versions","tags":["Elastic Agents"]}},"/api/fleet/agents/bulk_reassign":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-bulk-reassign","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"batchSize":{"type":"number"},"includeInactive":{"default":false,"type":"boolean"},"policy_id":{"type":"string"}},"required":["policy_id","agents"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk reassign agents","tags":["Elastic Agent actions"]}},"/api/fleet/agents/bulk_request_diagnostics":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"post-fleet-agents-bulk-request-diagnostics","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"additional_metrics":{"items":{"enum":["CPU"],"type":"string"},"type":"array"},"agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"batchSize":{"type":"number"}},"required":["agents"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk request diagnostics from agents","tags":["Elastic Agent actions"]}},"/api/fleet/agents/bulk_unenroll":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-bulk-unenroll","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agents":{"anyOf":[{"items":{"description":"KQL query string, leave empty to action all agents","type":"string"},"type":"array"},{"description":"list of agent IDs","type":"string"}]},"batchSize":{"type":"number"},"force":{"description":"Unenrolls hosted agents too","type":"boolean"},"includeInactive":{"description":"When passing agents by KQL query, unenrolls inactive agents too","type":"boolean"},"revoke":{"description":"Revokes API keys of agents","type":"boolean"}},"required":["agents"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk unenroll agents","tags":["Elastic Agent actions"]}},"/api/fleet/agents/bulk_update_agent_tags":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-bulk-update-agent-tags","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"batchSize":{"type":"number"},"includeInactive":{"default":false,"type":"boolean"},"tagsToAdd":{"items":{"type":"string"},"type":"array"},"tagsToRemove":{"items":{"type":"string"},"type":"array"}},"required":["agents"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk update agent tags","tags":["Elastic Agent actions"]}},"/api/fleet/agents/bulk_upgrade":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-bulk-upgrade","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"batchSize":{"type":"number"},"force":{"type":"boolean"},"includeInactive":{"default":false,"type":"boolean"},"rollout_duration_seconds":{"minimum":600,"type":"number"},"skipRateLimitCheck":{"type":"boolean"},"source_uri":{"type":"string"},"start_time":{"type":"string"},"version":{"type":"string"}},"required":["agents","version"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk upgrade agents","tags":["Elastic Agent actions"]}},"/api/fleet/agents/files/{fileId}":{"delete":{"description":"Delete a file uploaded by an agent.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"delete-fleet-agents-files-fileid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"fileId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"deleted":{"type":"boolean"},"id":{"type":"string"}},"required":["id","deleted"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete an uploaded file","tags":["Elastic Agents"]}},"/api/fleet/agents/files/{fileId}/{fileName}":{"get":{"description":"Get a file uploaded by an agent.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-files-fileid-filename","parameters":[{"in":"path","name":"fileId","required":true,"schema":{"type":"string"}},{"in":"path","name":"fileName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an uploaded file","tags":["Elastic Agents"]}},"/api/fleet/agents/setup":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup.","operationId":"get-fleet-agents-setup","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"A summary of the agent setup status. `isReady` indicates whether the setup is ready. If the setup is not ready, `missing_requirements` lists which requirements are missing.","type":"object","properties":{"is_secrets_storage_enabled":{"type":"boolean"},"is_space_awareness_enabled":{"type":"boolean"},"isReady":{"type":"boolean"},"missing_optional_features":{"items":{"enum":["encrypted_saved_object_encryption_key_required"],"type":"string"},"type":"array"},"missing_requirements":{"items":{"enum":["security_required","tls_required","api_keys","fleet_admin_user","fleet_server"],"type":"string"},"type":"array"},"package_verification_key_id":{"type":"string"}},"required":["isReady","missing_requirements","missing_optional_features"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent setup info","tags":["Elastic Agents"]},"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup.","operationId":"post-fleet-agents-setup","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"A summary of the result of Fleet's `setup` lifecycle. If `isInitialized` is true, Fleet is ready to accept agent enrollment. `nonFatalErrors` may include useful insight into non-blocking issues with Fleet setup.","type":"object","properties":{"isInitialized":{"type":"boolean"},"nonFatalErrors":{"items":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"}},"required":["name","message"]},"type":"array"}},"required":["isInitialized","nonFatalErrors"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Initiate agent setup","tags":["Elastic Agents"]}},"/api/fleet/agents/tags":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-tags","parameters":[{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"showInactive","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"type":"string"},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent tags","tags":["Elastic Agents"]}},"/api/fleet/check-permissions":{"get":{"operationId":"get-fleet-check-permissions","parameters":[{"in":"query","name":"fleetServerSetup","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"error":{"enum":["MISSING_SECURITY","MISSING_PRIVILEGES","MISSING_FLEET_SERVER_SETUP_PRIVILEGES"],"type":"string"},"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Check permissions","tags":["Fleet internals"]}},"/api/fleet/data_streams":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all.","operationId":"get-fleet-data-streams","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"data_streams":{"items":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"type":"array"},"dataset":{"type":"string"},"index":{"type":"string"},"last_activity_ms":{"type":"number"},"namespace":{"type":"string"},"package":{"type":"string"},"package_version":{"type":"string"},"serviceDetails":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"environment":{"type":"string"},"serviceName":{"type":"string"}},"required":["environment","serviceName"]},"size_in_bytes":{"type":"number"},"size_in_bytes_formatted":{"anyOf":[{"type":"number"},{"type":"string"}]},"type":{"type":"string"}},"required":["index","dataset","namespace","type","package","package_version","last_activity_ms","size_in_bytes","size_in_bytes_formatted","dashboards","serviceDetails"]},"type":"array"}},"required":["data_streams"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get data streams","tags":["Data streams"]}},"/api/fleet/enrollment_api_keys":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup.","operationId":"get-fleet-enrollment-api-keys","parameters":[{"in":"query","name":"page","required":false,"schema":{"default":1,"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"default":20,"type":"number"}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.","type":"boolean"},"api_key":{"description":"The enrollment API key (token) used for enrolling Elastic Agents.","type":"string"},"api_key_id":{"description":"The ID of the API key in the Security API.","type":"string"},"created_at":{"type":"string"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"description":"The name of the enrollment API key.","type":"string"},"policy_id":{"description":"The ID of the agent policy the Elastic Agent will be enrolled in.","type":"string"}},"required":["id","api_key_id","api_key","active","created_at"]},"type":"array"},"list":{"deprecated":true,"items":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.","type":"boolean"},"api_key":{"description":"The enrollment API key (token) used for enrolling Elastic Agents.","type":"string"},"api_key_id":{"description":"The ID of the API key in the Security API.","type":"string"},"created_at":{"type":"string"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"description":"The name of the enrollment API key.","type":"string"},"policy_id":{"description":"The ID of the agent policy the Elastic Agent will be enrolled in.","type":"string"}},"required":["id","api_key_id","api_key","active","created_at"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage","list"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get enrollment API keys","tags":["Fleet enrollment API keys"]},"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-enrollment-api-keys","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"expiration":{"type":"string"},"name":{"type":"string"},"policy_id":{"type":"string"}},"required":["policy_id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"action":{"enum":["created"],"type":"string"},"item":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.","type":"boolean"},"api_key":{"description":"The enrollment API key (token) used for enrolling Elastic Agents.","type":"string"},"api_key_id":{"description":"The ID of the API key in the Security API.","type":"string"},"created_at":{"type":"string"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"description":"The name of the enrollment API key.","type":"string"},"policy_id":{"description":"The ID of the agent policy the Elastic Agent will be enrolled in.","type":"string"}},"required":["id","api_key_id","api_key","active","created_at"]}},"required":["item","action"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create an enrollment API key","tags":["Fleet enrollment API keys"]}},"/api/fleet/enrollment_api_keys/{keyId}":{"delete":{"description":"Revoke an enrollment API key by ID by marking it as inactive.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"delete-fleet-enrollment-api-keys-keyid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"keyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"action":{"enum":["deleted"],"type":"string"}},"required":["action"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Revoke an enrollment API key","tags":["Fleet enrollment API keys"]},"get":{"description":"Get an enrollment API key by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup.","operationId":"get-fleet-enrollment-api-keys-keyid","parameters":[{"in":"path","name":"keyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.","type":"boolean"},"api_key":{"description":"The enrollment API key (token) used for enrolling Elastic Agents.","type":"string"},"api_key_id":{"description":"The ID of the API key in the Security API.","type":"string"},"created_at":{"type":"string"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"description":"The name of the enrollment API key.","type":"string"},"policy_id":{"description":"The ID of the agent policy the Elastic Agent will be enrolled in.","type":"string"}},"required":["id","api_key_id","api_key","active","created_at"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an enrollment API key","tags":["Fleet enrollment API keys"]}},"/api/fleet/epm/bulk_assets":{"post":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"post-fleet-epm-bulk-assets","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"assetIds":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"]},"type":"array"}},"required":["assetIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"appLink":{"type":"string"},"attributes":{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"service":{"type":"string"},"title":{"type":"string"}}},"id":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","attributes"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk get assets","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/categories":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-categories","parameters":[{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"include_policy_templates","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"count":{"type":"number"},"id":{"type":"string"},"parent_id":{"type":"string"},"parent_title":{"type":"string"},"title":{"type":"string"}},"required":["id","title","count"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get package categories","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/custom_integrations":{"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-custom-integrations","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"datasets":{"items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["logs","metrics","traces","synthetics","profiling"],"type":"string"}},"required":["name","type"]},"type":"array"},"force":{"type":"boolean"},"integrationName":{"type":"string"}},"required":["integrationName","datasets"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"_meta":{"additionalProperties":false,"type":"object","properties":{"install_source":{"type":"string"},"name":{"type":"string"}},"required":["install_source","name"]},"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"}},"required":["items","_meta"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a custom integration","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/custom_integrations/{pkgName}":{"put":{"description":"[Required authorization] Route required privileges: fleet-settings-all AND integrations-all.","operationId":"put-fleet-epm-custom-integrations-pkgname","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"categories":{"items":{"type":"string"},"type":"array"},"readMeData":{"type":"string"}},"required":["readMeData"]}}}},"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update a custom integration","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/data_streams":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-data-streams","parameters":[{"in":"query","name":"type","required":false,"schema":{"enum":["logs","metrics","traces","synthetics","profiling"],"type":"string"}},{"in":"query","name":"datasetQuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortOrder","required":false,"schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},{"in":"query","name":"uncategorisedOnly","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get data streams","tags":["Data streams"]}},"/api/fleet/epm/packages":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages","parameters":[{"in":"query","name":"category","required":false,"schema":{"type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"excludeInstallStatus","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"withPackagePoliciesCount","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":true,"type":"object","properties":{"categories":{"items":{"type":"string"},"type":"array"},"conditions":{"additionalProperties":true,"type":"object","properties":{"elastic":{"additionalProperties":true,"type":"object","properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"subscription":{"type":"string"}}},"kibana":{"additionalProperties":true,"type":"object","properties":{"version":{"type":"string"}}}}},"data_streams":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"description":{"type":"string"},"discovery":{"additionalProperties":true,"type":"object","properties":{"fields":{"items":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"type":"array"}}},"download":{"type":"string"},"format_version":{"type":"string"},"icons":{"items":{"additionalProperties":true,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"id":{"type":"string"},"installationInfo":{"additionalProperties":true,"type":"object","properties":{"additional_spaces_installed_kibana":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"type":"object"},"created_at":{"type":"string"},"experimental_data_stream_features":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":true,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"install_format_schema_version":{"type":"string"},"install_source":{"enum":["registry","upload","bundled","custom"],"type":"string"},"install_status":{"enum":["installed","installing","install_failed"],"type":"string"},"installed_es":{"items":{"additionalProperties":true,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]},"type":"array"},"installed_kibana":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"installed_kibana_space_id":{"type":"string"},"latest_executed_state":{"additionalProperties":true,"type":"object","properties":{"error":{"type":"string"},"name":{"type":"string"},"started_at":{"type":"string"}}},"latest_install_failed_attempts":{"items":{"additionalProperties":true,"type":"object","properties":{"created_at":{"type":"string"},"error":{"additionalProperties":true,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"]},"target_version":{"type":"string"}},"required":["created_at","target_version","error"]},"type":"array"},"name":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"updated_at":{"type":"string"},"verification_key_id":{"nullable":true,"type":"string"},"verification_status":{"enum":["unverified","verified","unknown"],"type":"string"},"version":{"type":"string"}},"required":["type","installed_kibana","installed_es","name","version","install_status","install_source","verification_status"]},"integration":{"type":"string"},"internal":{"type":"boolean"},"latestVersion":{"type":"string"},"name":{"type":"string"},"owner":{"additionalProperties":true,"type":"object","properties":{"github":{"type":"string"},"type":{"enum":["elastic","partner","community"],"type":"string"}}},"path":{"type":"string"},"policy_templates":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"readme":{"type":"string"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"signature_path":{"type":"string"},"source":{"additionalProperties":true,"type":"object","properties":{"license":{"type":"string"}},"required":["license"]},"status":{"type":"string"},"title":{"type":"string"},"type":{"anyOf":[{"enum":["integration"],"type":"string"},{"enum":["input"],"type":"string"},{"enum":["content"],"type":"string"},{"type":"string"}]},"vars":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"version":{"type":"string"}},"required":["name","version","title","id"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get packages","tags":["Elastic Package Manager (EPM)"]},"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-packages","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"ignoreMappingUpdateErrors","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"skipDataStreamRollover","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/gzip; application/zip":{"schema":{"format":"binary","type":"string"}}}},"responses":{"200":{"content":{"application/gzip; application/zip":{"schema":{"additionalProperties":false,"type":"object","properties":{"_meta":{"additionalProperties":false,"type":"object","properties":{"install_source":{"type":"string"},"name":{"type":"string"}},"required":["install_source","name"]},"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"}},"required":["items","_meta"]}}}},"400":{"content":{"application/gzip; application/zip":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Install a package by upload","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/_bulk":{"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-packages-bulk","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"force":{"default":false,"type":"boolean"},"packages":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"prerelease":{"type":"boolean"},"version":{"type":"string"}},"required":["name","version"]}]},"minItems":1,"type":"array"}},"required":["packages"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"result":{"additionalProperties":false,"type":"object","properties":{"assets":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"},"error":{},"installSource":{"type":"string"},"installType":{"type":"string"},"status":{"enum":["installed","already_installed"],"type":"string"}},"required":["error","installType"]},"version":{"type":"string"}},"required":["name","version","result"]},{"additionalProperties":false,"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{}]},"name":{"type":"string"},"statusCode":{"type":"number"}},"required":["name","statusCode","error"]}]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk install packages","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}":{"delete":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"delete-fleet-epm-packages-pkgname-pkgversion","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":false,"schema":{"type":"string"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete a package","tags":["Elastic Package Manager (EPM)"]},"get":{"operationId":"get-fleet-epm-packages-pkgname-pkgversion","parameters":[{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":false,"schema":{"type":"string"}},{"in":"query","name":"ignoreUnverified","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"full","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"withMetadata","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"agent":{"additionalProperties":false,"type":"object","properties":{"privileges":{"additionalProperties":false,"type":"object","properties":{"root":{"type":"boolean"}}}}},"asset_tags":{"items":{"additionalProperties":false,"type":"object","properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"asset_types":{"items":{"type":"string"},"type":"array"},"text":{"type":"string"}},"required":["text"]},"type":"array"},"assets":{"additionalProperties":{},"type":"object"},"categories":{"items":{"type":"string"},"type":"array"},"conditions":{"additionalProperties":true,"type":"object","properties":{"elastic":{"additionalProperties":true,"type":"object","properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"subscription":{"type":"string"}}},"kibana":{"additionalProperties":true,"type":"object","properties":{"version":{"type":"string"}}}}},"data_streams":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"description":{"type":"string"},"discovery":{"additionalProperties":true,"type":"object","properties":{"fields":{"items":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"type":"array"}}},"download":{"type":"string"},"elasticsearch":{"additionalProperties":{},"type":"object"},"format_version":{"type":"string"},"icons":{"items":{"additionalProperties":true,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"installationInfo":{"additionalProperties":true,"type":"object","properties":{"additional_spaces_installed_kibana":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"type":"object"},"created_at":{"type":"string"},"experimental_data_stream_features":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":true,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"install_format_schema_version":{"type":"string"},"install_source":{"enum":["registry","upload","bundled","custom"],"type":"string"},"install_status":{"enum":["installed","installing","install_failed"],"type":"string"},"installed_es":{"items":{"additionalProperties":true,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]},"type":"array"},"installed_kibana":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"installed_kibana_space_id":{"type":"string"},"latest_executed_state":{"additionalProperties":true,"type":"object","properties":{"error":{"type":"string"},"name":{"type":"string"},"started_at":{"type":"string"}}},"latest_install_failed_attempts":{"items":{"additionalProperties":true,"type":"object","properties":{"created_at":{"type":"string"},"error":{"additionalProperties":true,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"]},"target_version":{"type":"string"}},"required":["created_at","target_version","error"]},"type":"array"},"name":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"updated_at":{"type":"string"},"verification_key_id":{"nullable":true,"type":"string"},"verification_status":{"enum":["unverified","verified","unknown"],"type":"string"},"version":{"type":"string"}},"required":["type","installed_kibana","installed_es","name","version","install_status","install_source","verification_status"]},"internal":{"type":"boolean"},"keepPoliciesUpToDate":{"type":"boolean"},"latestVersion":{"type":"string"},"license":{"type":"string"},"licensePath":{"type":"string"},"name":{"type":"string"},"notice":{"type":"string"},"owner":{"additionalProperties":true,"type":"object","properties":{"github":{"type":"string"},"type":{"enum":["elastic","partner","community"],"type":"string"}}},"path":{"type":"string"},"policy_templates":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"readme":{"type":"string"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"screenshots":{"items":{"additionalProperties":false,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"signature_path":{"type":"string"},"source":{"additionalProperties":true,"type":"object","properties":{"license":{"type":"string"}},"required":["license"]},"status":{"type":"string"},"title":{"type":"string"},"type":{"anyOf":[{"enum":["integration"],"type":"string"},{"enum":["input"],"type":"string"},{"enum":["content"],"type":"string"},{"type":"string"}]},"vars":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"version":{"type":"string"}},"required":["name","version","title","assets"]},"metadata":{"additionalProperties":false,"type":"object","properties":{"has_policies":{"type":"boolean"}},"required":["has_policies"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a package","tags":["Elastic Package Manager (EPM)"]},"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-packages-pkgname-pkgversion","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":false,"schema":{"type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"ignoreMappingUpdateErrors","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"skipDataStreamRollover","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"force":{"default":false,"type":"boolean"},"ignore_constraints":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"_meta":{"additionalProperties":false,"type":"object","properties":{"install_source":{"type":"string"},"name":{"type":"string"}},"required":["install_source","name"]},"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"}},"required":["items","_meta"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Install a package from the registry","tags":["Elastic Package Manager (EPM)"]},"put":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"put-fleet-epm-packages-pkgname-pkgversion","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"keepPoliciesUpToDate":{"type":"boolean"}},"required":["keepPoliciesUpToDate"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"agent":{"additionalProperties":false,"type":"object","properties":{"privileges":{"additionalProperties":false,"type":"object","properties":{"root":{"type":"boolean"}}}}},"asset_tags":{"items":{"additionalProperties":false,"type":"object","properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"asset_types":{"items":{"type":"string"},"type":"array"},"text":{"type":"string"}},"required":["text"]},"type":"array"},"assets":{"additionalProperties":{},"type":"object"},"categories":{"items":{"type":"string"},"type":"array"},"conditions":{"additionalProperties":true,"type":"object","properties":{"elastic":{"additionalProperties":true,"type":"object","properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"subscription":{"type":"string"}}},"kibana":{"additionalProperties":true,"type":"object","properties":{"version":{"type":"string"}}}}},"data_streams":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"description":{"type":"string"},"discovery":{"additionalProperties":true,"type":"object","properties":{"fields":{"items":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"type":"array"}}},"download":{"type":"string"},"elasticsearch":{"additionalProperties":{},"type":"object"},"format_version":{"type":"string"},"icons":{"items":{"additionalProperties":true,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"installationInfo":{"additionalProperties":true,"type":"object","properties":{"additional_spaces_installed_kibana":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"type":"object"},"created_at":{"type":"string"},"experimental_data_stream_features":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":true,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"install_format_schema_version":{"type":"string"},"install_source":{"enum":["registry","upload","bundled","custom"],"type":"string"},"install_status":{"enum":["installed","installing","install_failed"],"type":"string"},"installed_es":{"items":{"additionalProperties":true,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]},"type":"array"},"installed_kibana":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"installed_kibana_space_id":{"type":"string"},"latest_executed_state":{"additionalProperties":true,"type":"object","properties":{"error":{"type":"string"},"name":{"type":"string"},"started_at":{"type":"string"}}},"latest_install_failed_attempts":{"items":{"additionalProperties":true,"type":"object","properties":{"created_at":{"type":"string"},"error":{"additionalProperties":true,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"]},"target_version":{"type":"string"}},"required":["created_at","target_version","error"]},"type":"array"},"name":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"updated_at":{"type":"string"},"verification_key_id":{"nullable":true,"type":"string"},"verification_status":{"enum":["unverified","verified","unknown"],"type":"string"},"version":{"type":"string"}},"required":["type","installed_kibana","installed_es","name","version","install_status","install_source","verification_status"]},"internal":{"type":"boolean"},"keepPoliciesUpToDate":{"type":"boolean"},"latestVersion":{"type":"string"},"license":{"type":"string"},"licensePath":{"type":"string"},"name":{"type":"string"},"notice":{"type":"string"},"owner":{"additionalProperties":true,"type":"object","properties":{"github":{"type":"string"},"type":{"enum":["elastic","partner","community"],"type":"string"}}},"path":{"type":"string"},"policy_templates":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"readme":{"type":"string"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"screenshots":{"items":{"additionalProperties":false,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"signature_path":{"type":"string"},"source":{"additionalProperties":true,"type":"object","properties":{"license":{"type":"string"}},"required":["license"]},"status":{"type":"string"},"title":{"type":"string"},"type":{"anyOf":[{"enum":["integration"],"type":"string"},{"enum":["input"],"type":"string"},{"enum":["content"],"type":"string"},{"type":"string"}]},"vars":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"version":{"type":"string"}},"required":["name","version","title","assets"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update package settings","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages-pkgname-pkgversion-filepath","parameters":[{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}},{"in":"path","name":"filePath","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a package file","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets":{"delete":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"delete-fleet-epm-packages-pkgname-pkgversion-datastream-assets","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}},{"in":"query","name":"packagePolicyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete assets for an input package","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets":{"delete":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"delete-fleet-epm-packages-pkgname-pkgversion-kibana-assets","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete Kibana assets for a package","tags":["Elastic Package Manager (EPM)"]},"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-packages-pkgname-pkgversion-kibana-assets","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"force":{"type":"boolean"},"space_ids":{"description":"When provided install assets in the specified spaces instead of the current space.","items":{"type":"string"},"minItems":1,"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Install Kibana assets for a package","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize":{"post":{"operationId":"post-fleet-epm-packages-pkgname-pkgversion-transforms-authorize","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"transforms":{"items":{"additionalProperties":false,"type":"object","properties":{"transformId":{"type":"string"}},"required":["transformId"]},"type":"array"}},"required":["transforms"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"type":"object","properties":{"error":{"nullable":true},"success":{"type":"boolean"},"transformId":{"type":"string"}},"required":["transformId","success","error"]},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Authorize transforms","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/stats":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages-pkgname-stats","parameters":[{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"response":{"additionalProperties":false,"type":"object","properties":{"agent_policy_count":{"type":"number"}},"required":["agent_policy_count"]}},"required":["response"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get package stats","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/installed":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages-installed","parameters":[{"in":"query","name":"dataStreamType","required":false,"schema":{"enum":["logs","metrics","traces","synthetics","profiling"],"type":"string"}},{"in":"query","name":"showOnlyActiveDataStreams","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"nameQuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"searchAfter","required":false,"schema":{"items":{"anyOf":[{"type":"string"},{"type":"number"}]},"type":"array"}},{"in":"query","name":"perPage","required":false,"schema":{"default":15,"type":"number"}},{"in":"query","name":"sortOrder","required":false,"schema":{"default":"asc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"dataStreams":{"items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"}},"required":["name","title"]},"type":"array"},"description":{"type":"string"},"icons":{"items":{"additionalProperties":false,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"name":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"version":{"type":"string"}},"required":["name","version","status","dataStreams"]},"type":"array"},"searchAfter":{"items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":[],"nullable":true},{}]},"type":"array"},"total":{"type":"number"}},"required":["items","total"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get installed packages","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/limited":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages-limited","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"type":"string"},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a limited package list","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-templates-pkgname-pkgversion-inputs","parameters":[{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","yml","yaml"],"type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"ignoreUnverified","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"type":"string"},{"additionalProperties":false,"type":"object","properties":{"inputs":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"streams":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"dataset":{"type":"string"},"type":{"type":"string"}},"required":["dataset"]},"id":{"type":"string"}},"required":["id","data_stream"]},"type":"array"},"type":{"type":"string"}},"required":["id","type"]},"type":"array"}},"required":["inputs"]}]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an inputs template","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/verification_key_id":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-verification-key-id","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"nullable":true,"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a package signature verification key ID","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/fleet_server_hosts":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-all OR fleet-settings-read.","operationId":"get-fleet-fleet-server-hosts","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls","id"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get Fleet Server hosts","tags":["Fleet Server hosts"]},"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-fleet-server-hosts","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls","id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a Fleet Server host","tags":["Fleet Server hosts"]}},"/api/fleet/fleet_server_hosts/{itemId}":{"delete":{"description":"Delete a Fleet Server host by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"delete-fleet-fleet-server-hosts-itemid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete a Fleet Server host","tags":["Fleet Server hosts"]},"get":{"description":"Get a Fleet Server host by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-fleet-server-hosts-itemid","parameters":[{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls","id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a Fleet Server host","tags":["Fleet Server hosts"]},"put":{"description":"Update a Fleet Server host by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"put-fleet-fleet-server-hosts-itemid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"is_default":{"type":"boolean"},"is_internal":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["proxy_id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls","id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update a Fleet Server host","tags":["Fleet Server hosts"]}},"/api/fleet/health_check":{"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-health-check","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Check Fleet Server health","tags":["Fleet internals"]}},"/api/fleet/kubernetes":{"get":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-setup.","operationId":"get-fleet-kubernetes","parameters":[{"in":"query","name":"download","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"fleetServer","required":false,"schema":{"type":"string"}},{"in":"query","name":"enrolToken","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"type":"string"}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a full K8s agent manifest","tags":["Elastic Agent policies"]}},"/api/fleet/kubernetes/download":{"get":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-setup.","operationId":"get-fleet-kubernetes-download","parameters":[{"in":"query","name":"download","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"fleetServer","required":false,"schema":{"type":"string"}},{"in":"query","name":"enrolToken","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Download an agent manifest","tags":["Elastic Agent policies"]}},"/api/fleet/logstash_api_keys":{"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-logstash-api-keys","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"api_key":{"type":"string"}},"required":["api_key"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Generate a Logstash API key","tags":["Fleet outputs"]}},"/api/fleet/message_signing_service/rotate_key_pair":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all.","operationId":"post-fleet-message-signing-service-rotate-key-pair","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"acknowledge","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"500":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Rotate a Fleet message signing key pair","tags":["Message Signing Service"]}},"/api/fleet/outputs":{"get":{"description":"[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read.","operationId":"get-fleet-outputs","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":true,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":true,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":true,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get outputs","tags":["Fleet outputs"]},"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-outputs","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":false,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":false,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":false,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":false,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":false,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":true,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":true,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":true,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create output","tags":["Fleet outputs"]}},"/api/fleet/outputs/{outputId}":{"delete":{"description":"Delete output by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"delete-fleet-outputs-outputid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"outputId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete output","tags":["Fleet outputs"]},"get":{"description":"Get output by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read.","operationId":"get-fleet-outputs-outputid","parameters":[{"in":"path","name":"outputId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":true,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":true,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":true,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get output","tags":["Fleet outputs"]},"put":{"description":"Update output by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all OR fleet-agent-policies-all.","operationId":"put-fleet-outputs-outputid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"outputId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"type":"boolean"},"is_default_monitoring":{"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"type":"boolean"},"is_default_monitoring":{"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"type":"boolean"},"is_default_monitoring":{"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":false,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":false,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":false,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":false,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":false,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","compression_level","connection_type","username","password"]}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":true,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":true,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":true,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update output","tags":["Fleet outputs"]}},"/api/fleet/outputs/{outputId}/health":{"get":{"description":"[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-outputs-outputid-health","parameters":[{"in":"path","name":"outputId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"long message if unhealthy","type":"string"},"state":{"description":"state of output, HEALTHY or DEGRADED","type":"string"},"timestamp":{"description":"timestamp of reported state","type":"string"}},"required":["state","message","timestamp"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get the latest output health","tags":["Fleet outputs"]}},"/api/fleet/package_policies":{"get":{"operationId":"get-fleet-package-policies","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"type":"number"}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortOrder","required":false,"schema":{"enum":["desc","asc"],"type":"string"}},{"in":"query","name":"showUpgradeable","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}},{"in":"query","name":"withAgentCount","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get package policies","tags":["Fleet package policies"]},"post":{"operationId":"post-fleet-package-policies","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"description":{"description":"Package policy description","type":"string"},"enabled":{"type":"boolean"},"force":{"description":"Force package policy creation even if package is not verified, or if the agent policy is managed.","type":"boolean"},"id":{"description":"Package policy unique identifier","type":"string"},"inputs":{"items":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled"]},"type":"array"},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["name","inputs"]},{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"description":{"type":"string"},"force":{"type":"boolean"},"id":{"type":"string"},"inputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object"},"name":{"type":"string"},"namespace":{"type":"string"},"output_id":{"nullable":true,"type":"string"},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"nullable":true,"type":"string"},"policy_ids":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}},"required":["name","package"]}],"description":"You should use inputs as an object and not use the deprecated inputs array."}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"409":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a package policy","tags":["Fleet package policies"]}},"/api/fleet/package_policies/_bulk_get":{"post":{"operationId":"post-fleet-package-policies-bulk-get","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"ids":{"description":"list of package policy ids","items":{"type":"string"},"type":"array"},"ignoreMissing":{"type":"boolean"}},"required":["ids"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Bulk get package policies","tags":["Fleet package policies"]}},"/api/fleet/package_policies/{packagePolicyId}":{"delete":{"description":"Delete a package policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.","operationId":"delete-fleet-package-policies-packagepolicyid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"packagePolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete a package policy","tags":["Fleet package policies"]},"get":{"description":"Get a package policy by ID.","operationId":"get-fleet-package-policies-packagepolicyid","parameters":[{"in":"path","name":"packagePolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Get a package policy","tags":["Fleet package policies"]},"put":{"description":"Update a package policy by ID.","operationId":"put-fleet-package-policies-packagepolicyid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"packagePolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"description":{"description":"Package policy description","type":"string"},"enabled":{"type":"boolean"},"force":{"type":"boolean"},"inputs":{"items":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled"]},"type":"array"},"is_managed":{"type":"boolean"},"name":{"type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"version":{"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"description":{"type":"string"},"force":{"type":"boolean"},"id":{"type":"string"},"inputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object"},"name":{"type":"string"},"namespace":{"type":"string"},"output_id":{"nullable":true,"type":"string"},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"nullable":true,"type":"string"},"policy_ids":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}},"required":["name","package"]}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"403":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update a package policy","tags":["Fleet package policies"]}},"/api/fleet/package_policies/delete":{"post":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.","operationId":"post-fleet-package-policies-delete","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"force":{"type":"boolean"},"packagePolicyIds":{"items":{"type":"string"},"type":"array"}},"required":["packagePolicyIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"type":"object","properties":{"body":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"id":{"type":"string"},"name":{"type":"string"},"output_id":{"nullable":true,"type":"string"},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Use `policy_ids` instead","nullable":true,"type":"string"},"policy_ids":{"items":{"type":"string"},"type":"array"},"statusCode":{"type":"number"},"success":{"type":"boolean"}},"required":["id","success","policy_ids","package"]},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk delete package policies","tags":["Fleet package policies"]}},"/api/fleet/package_policies/upgrade":{"post":{"description":"Upgrade a package policy to a newer package version.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.","operationId":"post-fleet-package-policies-upgrade","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"packagePolicyIds":{"items":{"type":"string"},"type":"array"}},"required":["packagePolicyIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"type":"object","properties":{"body":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"id":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"number"},"success":{"type":"boolean"}},"required":["id","success"]},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Upgrade a package policy","tags":["Fleet package policies"]}},"/api/fleet/package_policies/upgrade/dryrun":{"post":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read AND integrations-read.","operationId":"post-fleet-package-policies-upgrade-dryrun","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"packagePolicyIds":{"items":{"type":"string"},"type":"array"},"packageVersion":{"type":"string"}},"required":["packagePolicyIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"type":"object","properties":{"agent_diff":{"items":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"namespace":{"type":"string"}},"required":["namespace"]},"id":{"type":"string"},"meta":{"additionalProperties":true,"type":"object","properties":{"package":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]}},"required":["package"]},"name":{"type":"string"},"package_policy_id":{"type":"string"},"processors":{"items":{"additionalProperties":true,"type":"object","properties":{"add_fields":{"additionalProperties":true,"type":"object","properties":{"fields":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]},"type":"object"},"target":{"type":"string"}},"required":["target","fields"]}},"required":["add_fields"]},"type":"array"},"revision":{"type":"number"},"streams":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"dataset":{"type":"string"},"type":{"type":"string"}},"required":["dataset"]},"id":{"type":"string"}},"required":["data_stream"]},"type":"array"},"type":{"type":"string"},"use_output":{"type":"string"}},"required":["id","name","revision","type","data_stream","use_output","package_policy_id"]},"type":"array"},"type":"array"},"body":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"diff":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","revision","updated_at","updated_by","created_at","created_by"]},{"additionalProperties":true,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"errors":{"items":{"additionalProperties":false,"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"required":["message"]},"type":"array"},"force":{"type":"boolean"},"id":{"type":"string"},"inputs":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},"is_managed":{"type":"boolean"},"missingVars":{"items":{"type":"string"},"type":"array"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"version":{"type":"string"}},"required":["name","enabled","inputs"]}]},"type":"array"},"hasErrors":{"type":"boolean"},"name":{"type":"string"},"statusCode":{"type":"number"}},"required":["hasErrors"]},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Dry run a package policy upgrade","tags":["Fleet package policies"]}},"/api/fleet/proxies":{"get":{"description":"[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-proxies","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["id","url","name"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get proxies","tags":["Fleet proxies"]},"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-proxies","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["url","name"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["id","url","name"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a proxy","tags":["Fleet proxies"]}},"/api/fleet/proxies/{itemId}":{"delete":{"description":"Delete a proxy by ID\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"delete-fleet-proxies-itemid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete a proxy","tags":["Fleet proxies"]},"get":{"description":"Get a proxy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-proxies-itemid","parameters":[{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["id","url","name"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a proxy","tags":["Fleet proxies"]},"put":{"description":"Update a proxy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"put-fleet-proxies-itemid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["proxy_headers","certificate_authorities","certificate","certificate_key"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["id","url","name"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update a proxy","tags":["Fleet proxies"]}},"/api/fleet/service_tokens":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-service-tokens","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"remote":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a service token","tags":["Fleet service tokens"]}},"/api/fleet/settings":{"get":{"description":"[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-settings","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"delete_unenrolled_agents":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"is_preconfigured":{"type":"boolean"}},"required":["enabled","is_preconfigured"]},"has_seen_add_data_notice":{"type":"boolean"},"id":{"type":"string"},"output_secret_storage_requirements_met":{"type":"boolean"},"preconfigured_fields":{"items":{"enum":["fleet_server_hosts"],"type":"string"},"type":"array"},"prerelease_integrations_enabled":{"type":"boolean"},"secret_storage_requirements_met":{"type":"boolean"},"use_space_awareness_migration_started_at":{"nullable":true,"type":"string"},"use_space_awareness_migration_status":{"enum":["pending","success","error"],"type":"string"},"version":{"type":"string"}},"required":["id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Get settings","tags":["Fleet internals"]},"put":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"put-fleet-settings","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"additional_yaml_config":{"type":"string"},"delete_unenrolled_agents":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"is_preconfigured":{"type":"boolean"}},"required":["enabled","is_preconfigured"]},"has_seen_add_data_notice":{"type":"boolean"},"kibana_ca_sha256":{"type":"string"},"kibana_urls":{"items":{"format":"uri","type":"string"},"type":"array"},"prerelease_integrations_enabled":{"type":"boolean"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"delete_unenrolled_agents":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"is_preconfigured":{"type":"boolean"}},"required":["enabled","is_preconfigured"]},"has_seen_add_data_notice":{"type":"boolean"},"id":{"type":"string"},"output_secret_storage_requirements_met":{"type":"boolean"},"preconfigured_fields":{"items":{"enum":["fleet_server_hosts"],"type":"string"},"type":"array"},"prerelease_integrations_enabled":{"type":"boolean"},"secret_storage_requirements_met":{"type":"boolean"},"use_space_awareness_migration_started_at":{"nullable":true,"type":"string"},"use_space_awareness_migration_status":{"enum":["pending","success","error"],"type":"string"},"version":{"type":"string"}},"required":["id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Update settings","tags":["Fleet internals"]}},"/api/fleet/setup":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup.","operationId":"post-fleet-setup","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"A summary of the result of Fleet's `setup` lifecycle. If `isInitialized` is true, Fleet is ready to accept agent enrollment. `nonFatalErrors` may include useful insight into non-blocking issues with Fleet setup.","type":"object","properties":{"isInitialized":{"type":"boolean"},"nonFatalErrors":{"items":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"}},"required":["name","message"]},"type":"array"}},"required":["isInitialized","nonFatalErrors"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"500":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Internal Server Error","type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Initiate Fleet setup","tags":["Fleet internals"]}},"/api/fleet/uninstall_tokens":{"get":{"description":"List the metadata for the latest uninstall tokens per agent policy.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"get-fleet-uninstall-tokens","parameters":[{"description":"Partial match filtering for policy IDs","in":"query","name":"policyId","required":false,"schema":{"maxLength":50,"type":"string"}},{"in":"query","name":"search","required":false,"schema":{"maxLength":50,"type":"string"}},{"description":"The number of items to return","in":"query","name":"perPage","required":false,"schema":{"minimum":5,"type":"number"}},{"in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"created_at":{"type":"string"},"id":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_name":{"nullable":true,"type":"string"}},"required":["id","policy_id","created_at"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get metadata for latest uninstall tokens","tags":["Fleet uninstall tokens"]}},"/api/fleet/uninstall_tokens/{uninstallTokenId}":{"get":{"description":"Get one decrypted uninstall token by its ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"get-fleet-uninstall-tokens-uninstalltokenid","parameters":[{"in":"path","name":"uninstallTokenId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"created_at":{"type":"string"},"id":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_name":{"nullable":true,"type":"string"},"token":{"type":"string"}},"required":["id","policy_id","created_at","token"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a decrypted uninstall token","tags":["Fleet uninstall tokens"]}},"/api/lists":{"delete":{"description":"Delete a value list using the list ID.\n\u003e info\n\u003e When you delete a list, all of its list items are also deleted.\n","operationId":"DeleteList","parameters":[{"in":"query","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"Determines whether exception items referencing this value list should be deleted.","in":"query","name":"deleteReferences","required":false,"schema":{"default":false,"example":false,"type":"boolean"}},{"description":"Determines whether to delete value list without performing any additional checks of where this list may be utilized.","in":"query","name":"ignoreReferences","required":false,"schema":{"default":false,"example":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ipList":{"value":{"_version":"WzIsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"List of bad internet ips.","id":"21b01cfb-058d-44b9-838c-282be16c91cd","immutable":false,"name":"Bad ips","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T05:39:39.292Z","updated_by":"elastic","version":3}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: id: Required","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [DELETE /api/lists?id=ip_list] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list id: \\\"ip_list\\\" was not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete a value list","tags":["Security Lists API"]},"get":{"description":"Get the details of a value list using the list ID.","operationId":"ReadList","parameters":[{"in":"query","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzEsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"This list describes bad internet ip","id":"ip_list","immutable":false,"name":"My bad ips","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T05:21:53.843Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: id: Required","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists?id=ip_list] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get value list details","tags":["Security Lists API"]},"patch":{"description":"Update specific fields of an existing list using the list `id`.","operationId":"PatchList","requestBody":{"content":{"application/json":{"schema":{"example":{"id":"ip_list","name":"Bad ips list - UPDATED"},"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"description":{"$ref":"#/components/schemas/Security_Lists_API_ListDescription"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListMetadata"},"name":{"$ref":"#/components/schemas/Security_Lists_API_ListName"},"version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersion"}},"required":["id"]}}},"description":"Value list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzEsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"This list describes bad internet ips","id":"ip_list","immutable":false,"name":"Bad ips list - UPDATED","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T05:21:53.843Z","updated_by":"elastic","version":2}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: name: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PATCH /api/lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Patch a value list","tags":["Security Lists API"]},"post":{"description":"Create a new value list.","operationId":"CreateList","requestBody":{"content":{"application/json":{"examples":{"ip":{"value":{"description":"This list describes bad internet ips","id":"ip_list","name":"Simple list with ips","type":"ip"}},"ip_range":{"value":{"description":"This list has ip ranges","id":"ip_range_list","name":"Simple list with ip ranges","type":"ip_range"}},"keyword":{"value":{"description":"This list describes bad host names","id":"keyword_list","name":"Simple list with a keyword","type":"keyword"}},"keyword_custom_format":{"value":{"description":"This parses the first found ipv4 only","deserializer":"{{value}}","id":"keyword_custom_format_list","name":"Simple list with a keyword using a custom format","serializer":"(?\u003cvalue\u003e((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))","type":"keyword"}}},"schema":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Lists_API_ListDescription"},"deserializer":{"$ref":"#/components/schemas/Security_Lists_API_ListDeserializer"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListMetadata"},"name":{"$ref":"#/components/schemas/Security_Lists_API_ListName"},"serializer":{"$ref":"#/components/schemas/Security_Lists_API_ListSerializer"},"type":{"$ref":"#/components/schemas/Security_Lists_API_ListType"},"version":{"default":1,"minimum":1,"type":"integer"}},"required":["name","description","type"]}}},"description":"Value list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"This list describes bad internet ips","id":"ip_list","immutable":false,"name":"Simple list with ips","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T04:47:34.273Z","updated_by":"elastic","version":1}},"ip_range":{"value":{"_version":"WzAsMV0=","@timestamp":"2025-01-09T18:23:52.241Z","created_at":"2025-01-09T18:23:52.241Z","created_by":"elastic","description":"This list has ip ranges","id":"ip_range_list","immutable":false,"name":"Simple list with ip ranges","tie_breaker_id":"74aebdaf-601f-4940-b351-155728ff7003","type":"ip_range","updated_at":"2025-01-09T18:23:52.241Z","updated_by":"elastic","version":1}},"keyword":{"value":{"_version":"WzEsMV0=","@timestamp":"2025-01-09T18:24:55.786Z","created_at":"2025-01-09T18:24:55.786Z","created_by":"elastic","description":"This list describes bad host names","id":"keyword_list","immutable":false,"name":"Simple list with a keyword","tie_breaker_id":"f7e7dbaa-daf7-4c9a-a3dc-56643923ef68","type":"keyword","updated_at":"2025-01-09T18:24:55.786Z","updated_by":"elastic","version":1}},"keyword_custom_format":{"value":{"_version":"WzIsMV0=","@timestamp":"2025-01-09T18:25:39.604Z","created_at":"2025-01-09T18:25:39.604Z","created_by":"elastic","description":"This parses the first found ipv4 only","deserializer":"{{value}}","id":"keyword_custom_format_list","immutable":false,"name":"Simple list with a keyword using a custom format","serializer":"(?\u003cvalue\u003e((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))","tie_breaker_id":"8247ae63-b780-47b8-9a89-948b643e9ec2","type":"keyword","updated_at":"2025-01-09T18:25:39.604Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"To create a list, the data stream must exist first. Data stream \\\".lists-default\\\" does not exist","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"list id: \"keyword_custom_format_list\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create a value list","tags":["Security Lists API"]},"put":{"description":"Update a value list using the list `id`. The original list is replaced, and all unspecified fields are deleted.\n\u003e info\n\u003e You cannot modify the `id` value.\n","operationId":"UpdateList","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"Latest list of bad ips","id":"ip_list","name":"Bad ips - updated"},"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"description":{"$ref":"#/components/schemas/Security_Lists_API_ListDescription"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListMetadata"},"name":{"$ref":"#/components/schemas/Security_Lists_API_ListName"},"version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersion"}},"required":["id","name","description"]}}},"description":"Value list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzIsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"Latest list of bad ips","id":"ip_list","immutable":false,"name":"Bad ips - updated","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T05:39:39.292Z","updated_by":"elastic","version":3}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PUT /api/lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Update a value list","tags":["Security Lists API"]}},"/api/lists/_find":{"get":{"description":"Get a paginated subset of value lists. By default, the first page is returned, with 20 results per page.","operationId":"FindLists","parameters":[{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"example":1,"type":"integer"}},{"description":"The number of value lists to return per page.","in":"query","name":"per_page","required":false,"schema":{"example":20,"type":"integer"}},{"description":"Determines which field is used to sort the results.","in":"query","name":"sort_field","required":false,"schema":{"example":"name","format":"nonempty","minLength":1,"type":"string"}},{"description":"Determines the sort order, which can be `desc` or `asc`","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"example":"asc","type":"string"}},{"description":"Returns the lists that come after the last lists returned in the previous call (use the `cursor` value returned in the previous call). This parameter uses the `tie_breaker_id` field to ensure all lists are sorted and returned correctly.","in":"query","name":"cursor","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_FindListsCursor"}},{"description":"Filters the returned results according to the value of the specified field,\nusing the \u003cfield name\u003e:\u003cfield value\u003e syntax.\n","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_FindListsFilter"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ipList":{"value":{"cursor":"WzIwLFsiZjU1MDgxODgtYjFlOS00ZTZlLTk2NjItZDAzOWE3ZDg5ODk5Il1d","data":[{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:47:34.273Z\n","created_at":"2025-01-08T04:47:34.273Z\n","created_by":"elastic","description":"This list describes bad internet ip","id":"ip_list","immutable":false,"name":"Simple list with an ip","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T04:47:34.273Z\n","updated_by":"elastic","version":1}],"page":1,"per_page":20,"total":1}}},"schema":{"type":"object","properties":{"cursor":{"$ref":"#/components/schemas/Security_Lists_API_FindListsCursor"},"data":{"items":{"$ref":"#/components/schemas/Security_Lists_API_List"},"type":"array"},"page":{"minimum":0,"type":"integer"},"per_page":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total","cursor"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: page: Expected number, received nan","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists/_find?page=1\u0026per_page=20] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get value lists","tags":["Security Lists API"]}},"/api/lists/index":{"delete":{"description":"Delete the `.lists` and `.items` data streams.","operationId":"DeleteListIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}},"required":["acknowledged"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List data stream not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete value list data streams","tags":["Security Lists API"]},"get":{"description":"Verify that `.lists` and `.items` data streams exist.","operationId":"ReadListIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"list_index":{"type":"boolean"},"list_item_index":{"type":"boolean"}},"required":["list_index","list_item_index"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List data stream(s) not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get status of value list data streams","tags":["Security Lists API"]},"post":{"description":"Create `.lists` and `.items` data streams in the relevant space.","operationId":"CreateListIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}},"required":["acknowledged"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]\n","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"data stream: \\\".lists-default\\\" and \\\".items-default\\\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List data stream exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create list data streams","tags":["Security Lists API"]}},"/api/lists/items":{"delete":{"description":"Delete a value list item using its `id`, or its `list_id` and `value` fields.","operationId":"DeleteListItem","parameters":[{"description":"Value list item's identifier. Required if `list_id` and `value` are not specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"}},{"description":"Value list's identifier. Required if `id` is not specified.","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"The value used to evaluate exceptions. Required if `id` is not specified.","in":"query","name":"value","required":false,"schema":{"example":"255.255.255.255","type":"string"}},{"description":"Determines when changes made by the request are made visible to search.","in":"query","name":"refresh","required":false,"schema":{"default":"false","enum":["true","false","wait_for"],"example":false,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzIwLDFd","@timestamp":"2025-01-08T05:15:05.159Z","created_at":"2025-01-08T05:15:05.159Z","created_by":"elastic","id":"pd1WRJQBs4HAK3VQeHFI","list_id":"ip_list","tie_breaker_id":"eee41dc7-1666-4876-982f-8b0f7b59eca3","type":"ip","updated_at":"2025-01-08T05:44:14.009Z","updated_by":"elastic","value":"255.255.255.255"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},{"items":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},"type":"array"}]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"message":"Either \\\"list_id\\\" or \\\"id\\\" needs to be defined in the request","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [DELETE /api/lists/items?id=pd1WRJQBs4HAK3VQeHFI] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list item with id: \\\"pd1WRJQBs4HAK3VQeHFI\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete a value list item","tags":["Security Lists API"]},"get":{"description":"Get the details of a value list item.","operationId":"ReadListItem","parameters":[{"description":"Value list item identifier. Required if `list_id` and `value` are not specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"Value list item list's `id` identfier. Required if `id` is not specified.","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"The value used to evaluate exceptions. Required if `id` is not specified.","in":"query","name":"value","required":false,"schema":{"example":"127.0.0.2","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzExLDFd","@timestamp":"2025-01-08T05:16:25.882Z","created_at":"2025-01-08T05:16:25.882Z","created_by":"elastic","id":"qN1XRJQBs4HAK3VQs3Gc","list_id":"ip_list","tie_breaker_id":"a9a34c02-a385-436e-86a0-02a3942f3537","type":"ip","updated_at":"2025-01-08T05:16:25.882Z","updated_by":"elastic","value":"127.0.0.2"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},{"items":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},"type":"array"}]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"message":"Either \\\"list_id\\\" or \\\"id\\\" needs to be defined in the request","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists/items?id=qN1XRJQBs4HAK3VQs3Gc] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list item id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get a value list item","tags":["Security Lists API"]},"patch":{"description":"Update specific fields of an existing value list item using the item `id`.","operationId":"PatchListItem","requestBody":{"content":{"application/json":{"schema":{"example":{"id":"pd1WRJQBs4HAK3VQeHFI","value":"255.255.255.255"},"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListItemMetadata"},"refresh":{"description":"Determines when changes made by the request are made visible to search.","enum":["true","false","wait_for"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Lists_API_ListItemValue"}},"required":["id"]}}},"description":"Value list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ipItem":{"value":{"_version":"WzE5LDFd","@timestamp":"2025-01-08T05:15:05.159Z","created_at":"2025-01-08T05:15:05.159Z","created_by":"elastic","id":"pd1WRJQBs4HAK3VQeHFI","list_id":"ip_list","tie_breaker_id":"eee41dc7-1666-4876-982f-8b0f7b59eca3","type":"ip","updated_at":"2025-01-08T05:23:37.602Z","updated_by":"elastic","value":"255.255.255.255"}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"message":"{\"took\":15,\"timed_out\":false,\"total\":1,\"updated\":0,\"deleted\":0,\"batches\":1,\"version_conflicts\":0,\"noops\":0,\"retries\":{\"bulk\":0,\"search\":0},\"throttled_millis\":0,\"requests_per_second\":-1,\"throttled_until_millis\":0,\"failures\":[{\"index\":\".ds-.items-default-2025.01.09-000001\",\"id\":\"ip_item\",\"cause\":{\"type\":\"document_parsing_exception\",\"reason\":\"[1:107] failed to parse field [ip] of type [ip] in document with id ip_item. Preview of fields value: 2\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"2 is not an IP string literal.\"}},\"status\":400}]}","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PATCH /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list item id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Patch a value list item","tags":["Security Lists API"]},"post":{"description":"Create a value list item and associate it with the specified value list.\n\nAll value list items in the same list must be the same type. For example, each list item in an `ip` list must define a specific IP address.\n\u003e info\n\u003e Before creating a list item, you must create a list.\n","operationId":"CreateListItem","requestBody":{"content":{"application/json":{"examples":{"ip":{"value":{"list_id":"ip_list","value":"127.0.0.1"}},"ip_range":{"value":{"list_id":"ip_range_list","value":"192.168.0.0/16"}},"keyword":{"value":{"list_id":"keyword_list","value":"zeek"}}},"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"},"list_id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListItemMetadata"},"refresh":{"description":"Determines when changes made by the request are made visible to search.","enum":["true","false","wait_for"],"example":"wait_for","type":"string"},"value":{"$ref":"#/components/schemas/Security_Lists_API_ListItemValue"}},"required":["list_id","value"]}}},"description":"Value list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:59:06.154Z","created_at":"2025-01-08T04:59:06.154Z","created_by":"elastic","id":"21b01cfb-058d-44b9-838c-282be16c91cc","list_id":"ip_list","tie_breaker_id":"b57c762c-3036-465c-9bfb-7bfb5e6e515a","type":"ip","updated_at":"2025-01-08T04:59:06.154Z","updated_by":"elastic","value":"127.0.0.1"}},"ip_range":{"value":{"_version":"WzEsMV0=","@timestamp":"2025-01-09T18:33:08.202Z","created_at":"2025-01-09T18:33:08.202Z","created_by":"elastic","id":"ip_range_item","list_id":"ip_range_list","tie_breaker_id":"ea1b4189-efda-4637-b8f9-74655a5ebb61","type":"ip_range","updated_at":"2025-01-09T18:33:08.202Z","updated_by":"elastic","value":"192.168.0.0/16"}},"keyword":{"value":{"_version":"WzIsMV0=","@timestamp":"2025-01-09T18:34:29.422Z","created_at":"2025-01-09T18:34:29.422Z","created_by":"elastic","id":"7f24737d-1da8-4626-a568-33070591bb4e","list_id":"keyword_list","tie_breaker_id":"2108ced2-5e5d-401e-a88e-4dd69fc5fa27","type":"keyword","updated_at":"2025-01-09T18:34:29.422Z","updated_by":"elastic","value":"zeek"}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"uri [/api/lists/items] with method [post] exists but is not available with the current configuration","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"listNotFound":{"value":{"message":"list id: \\\"ip_list\\\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"list item id: \\\"ip_item\\\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create a value list item","tags":["Security Lists API"]},"put":{"description":"Update a value list item using the list item ID. The original list item is replaced, and all unspecified fields are deleted.\n\u003e info\n\u003e You cannot modify the `id` value.\n","operationId":"UpdateListItem","requestBody":{"content":{"application/json":{"example":{"id":"ip_item","value":"255.255.255.255"},"schema":{"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListItemMetadata"},"value":{"$ref":"#/components/schemas/Security_Lists_API_ListItemValue"}},"required":["id","value"]}}},"description":"Value list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzIwLDFd","@timestamp":"2025-01-08T05:15:05.159Z","created_at":"2025-01-08T05:15:05.159Z","created_by":"elastic","id":"pd1WRJQBs4HAK3VQeHFI","list_id":"ip_list","tie_breaker_id":"eee41dc7-1666-4876-982f-8b0f7b59eca3","type":"ip","updated_at":"2025-01-08T05:44:14.009Z","updated_by":"elastic","value":"255.255.255.255"}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PATCH /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list item id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Update a value list item","tags":["Security Lists API"]}},"/api/lists/items/_export":{"post":{"description":"Export list item values from the specified value list.","operationId":"ExportListItems","parameters":[{"description":"Value list's `id` to export.","in":"query","name":"list_id","required":true,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}}],"responses":{"200":{"content":{"application/ndjson":{"schema":{"description":"A `.txt` file containing list items from the specified list","example":"127.0.0.1\n127.0.0.2\n127.0.0.3\n127.0.0.4\n127.0.0.5\n127.0.0.6\n127.0.0.7\n127.0.0.8\n127.0.0.9\n","format":"binary","type":"string"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request\",\"message\":\"[request query]: list_id: Required","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/lists/items/_export?list_id=ips.txt] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Export value list items","tags":["Security Lists API"]}},"/api/lists/items/_find":{"get":{"description":"Get all value list items in the specified list.","operationId":"FindListItems","parameters":[{"in":"query","name":"list_id","required":true,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"example":1,"type":"integer"}},{"description":"The number of list items to return per page.","in":"query","name":"per_page","required":false,"schema":{"example":20,"type":"integer"}},{"description":"Determines which field is used to sort the results.","in":"query","name":"sort_field","required":false,"schema":{"example":"value","format":"nonempty","minLength":1,"type":"string"}},{"description":"Determines the sort order, which can be `desc` or `asc`","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"example":"asc","type":"string"}},{"in":"query","name":"cursor","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_FindListItemsCursor"}},{"description":"Filters the returned results according to the value of the specified field,\nusing the \u003cfield name\u003e:\u003cfield value\u003e syntax.\n","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_FindListItemsFilter"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"cursor":"WzIwLFsiYjU3Yzc2MmMtMzAzNi00NjVjLTliZmItN2JmYjVlNmU1MTVhIl1d","data":[{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:59:06.154Z","created_at":"2025-01-08T04:59:06.154Z","created_by":"elastic","id":"21b01cfb-058d-44b9-838c-282be16c91cc","list_id":"ip_list","tie_breaker_id":"b57c762c-3036-465c-9bfb-7bfb5e6e515a","type":"ip","updated_at":"2025-01-08T04:59:06.154Z","updated_by":"elastic","value":"127.0.0.1"}],"page":1,"per_page":20,"total":1}}},"schema":{"type":"object","properties":{"cursor":{"$ref":"#/components/schemas/Security_Lists_API_FindListItemsCursor"},"data":{"items":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},"type":"array"},"page":{"minimum":0,"type":"integer"},"per_page":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total","cursor"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request,","message":"[request query]: list_id: Required","statusCode":"400,"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists/items/_find?list_id=ip_list\u0026page=1\u0026per_page=20] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get value list items","tags":["Security Lists API"]}},"/api/lists/items/_import":{"post":{"description":"Import value list items from a TXT or CSV file. The maximum file size is 9 million bytes.\n\nYou can import items to a new or existing list.\n","operationId":"ImportListItems","parameters":[{"description":"List's id.\n\nRequired when importing to an existing list.\n","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"Type of the importing list.\n\nRequired when importing a new list whose list `id` is not specified.\n","examples":{"ip":{"value":"ip"}},"in":"query","name":"type","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListType"}},{"description":"Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:\n\n- `(?\u003cvalue\u003e.+)` - Single value item types, such as ip, long, date, keyword, and text.\n- `(?\u003cgte\u003e.+)-(?\u003clte\u003e.+)|(?\u003cvalue\u003e.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.\n","in":"query","name":"serializer","required":false,"schema":{"example":"(?\u003cvalue\u003e((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))","type":"string"}},{"description":"Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:\n\n- `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`.\n- `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.\n- `{{{gte}}},{{{lte}}}` - Date range values.\n","in":"query","name":"deserializer","required":false,"schema":{"example":"{{value}}","type":"string"}},{"description":"Determines when changes made by the request are made visible to search.","in":"query","name":"refresh","required":false,"schema":{"enum":["true","false","wait_for"],"example":true,"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"A `.txt` or `.csv` file containing newline separated list items.","example":"127.0.0.1\n127.0.0.2\n127.0.0.3\n127.0.0.4\n127.0.0.5\n127.0.0.6\n127.0.0.7\n127.0.0.8\n127.0.0.9\n","format":"binary","type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"This list describes bad internet ip","id":"ip_list","immutable":false,"name":"Simple list with an ip","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T04:47:34.273Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"message":"Either type or list_id need to be defined in the query","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/lists/items/_import?list_id=ip_list] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List with specified list_id does not exist response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Import value list items","tags":["Security Lists API"]}},"/api/lists/privileges":{"get":{"operationId":"ReadListPrivileges","responses":{"200":{"content":{"application/json":{"examples":{"privileges":{"value":{"is_authenticated":true,"listItems":{"application":{},"cluster":{"all":true,"manage":true,"manage_api_key":true,"manage_index_templates":true,"manage_ml":true,"manage_own_api_key":true,"manage_pipeline":true,"manage_security":true,"manage_transform":true,"monitor":true,"monitor_ml":true,"monitor_transform":true},"has_all_requested":true,"index":{".items-default":{"all":true,"create":true,"create_doc":true,"create_index":true,"delete":true,"delete_index":true,"index":true,"maintenance":true,"manage":true,"monitor":true,"read":true,"view_index_metadata":true,"write":true}},"username":"elastic"},"lists":{"application":{},"cluster":{"all":true,"manage":true,"manage_api_key":true,"manage_index_templates":true,"manage_ml":true,"manage_own_api_key":true,"manage_pipeline":true,"manage_security":true,"manage_transform":true,"monitor":true,"monitor_ml":true,"monitor_transform":true},"has_all_requested":true,"index":{".lists-default":{"all":true,"create":true,"create_doc":true,"create_index":true,"delete":true,"delete_index":true,"index":true,"maintenance":true,"manage":true,"monitor":true,"read":true,"view_index_metadata":true,"write":true}},"username":"elastic"}}}},"schema":{"type":"object","properties":{"is_authenticated":{"type":"boolean"},"listItems":{"$ref":"#/components/schemas/Security_Lists_API_ListItemPrivileges"},"lists":{"$ref":"#/components/schemas/Security_Lists_API_ListPrivileges"}},"required":["lists","listItems","is_authenticated"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists/privileges] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get value list privileges","tags":["Security Lists API"]}},"/api/logstash/pipeline/{id}":{"delete":{"description":"Delete a centrally-managed Logstash pipeline.\nIf your Elasticsearch cluster is protected with basic authentication, you must have either the `logstash_admin` built-in role or a customized Logstash writer role.\n","externalDocs":{"description":"Secure your connection","url":"https://www.elastic.co/docs/reference/logstash/secure-connection"},"operationId":"delete-logstash-pipeline","parameters":[{"description":"An identifier for the pipeline.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call"}},"summary":"Delete a Logstash pipeline","tags":["logstash"],"x-state":"Technical Preview"},"get":{"description":"Get information for a centrally-managed Logstash pipeline.\nTo use this API, you must have either the `logstash_admin` built-in role or a customized Logstash reader role.\n","externalDocs":{"description":"Secure your connection","url":"https://www.elastic.co/docs/reference/logstash/secure-connection"},"operationId":"get-logstash-pipeline","parameters":[{"description":"An identifier for the pipeline.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getLogstashPipelineResponseExample1":{"value":"{\n \"id\": \"hello-world\",\n \"description\": \"Just a simple pipeline\",\n \"username\": \"elastic\",\n \"pipeline\": \"input { stdin {} } output { stdout {} }\",\n \"settings\": {\n \"queue.type\": \"persistent\"\n }\n}"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Get a Logstash pipeline","tags":["logstash"],"x-state":"Technical Preview"},"put":{"description":"Create a centrally-managed Logstash pipeline or update a pipeline.\nTo use this API, you must have either the `logstash_admin` built-in role or a customized Logstash writer role.\n","externalDocs":{"description":"Secure your connection","url":"https://www.elastic.co/docs/reference/logstash/secure-connection"},"operationId":"put-logstash-pipeline","parameters":[{"description":"An identifier for the pipeline. Only alphanumeric characters, hyphens, and underscores are supported.\n","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"putLogstashPipelineRequestExample1":{"value":"{\n \"pipeline\": \"input { stdin {} } output { stdout {} }\",\n \"settings\": {\n \"queue.type\": \"persisted\"\n }\n}"}},"schema":{"type":"object","properties":{"description":{"description":"A description of the pipeline.","type":"string"},"pipeline":{"description":"A definition for the pipeline.","type":"string"},"settings":{"description":"Supported settings, represented as object keys, include the following:\n\n- `pipeline.workers`\n- `pipeline.batch.size`\n- `pipeline.batch.delay`\n- `pipeline.ecs_compatibility`\n- `pipeline.ordered`\n- `queue.type`\n- `queue.max_bytes`\n- `queue.checkpoint.writes`\n","type":"object"}},"required":["pipeline"]}}}},"responses":{"204":{"description":"Indicates a successful call"}},"summary":"Create or update a Logstash pipeline","tags":["logstash"],"x-state":"Technical Preview"}},"/api/logstash/pipelines":{"get":{"description":"Get a list of all centrally-managed Logstash pipelines.\n\nTo use this API, you must have either the `logstash_admin` built-in role or a customized Logstash reader role.\n\u003e info\n\u003e Limit the number of pipelines to 10,000 or fewer. As the number of pipelines nears and surpasses 10,000, you may see performance issues on Kibana.\n\nThe `username` property appears in the response when security is enabled and depends on when the pipeline was created or last updated.\n","externalDocs":{"description":"Secure your connection","url":"https://www.elastic.co/docs/reference/logstash/secure-connection"},"operationId":"get-logstash-pipelines","responses":{"200":{"content":{"application/json":{"examples":{"getLogstashPipelinesResponseExample1":{"value":"{\n \"pipelines\": [\n {\n \"id\": \"hello-world\",\n \"description\": \"Just a simple pipeline\",\n \"last_modified\": \"2018-04-14T12:23:29.772Z\",\n \"username\": \"elastic\" \n },\n {\n \"id\": \"sleepy-pipeline\",\n \"description\": \"\",\n \"last_modified\": \"2018-03-24T03:41:30.554Z\"\n }\n ]\n}"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Get all Logstash pipelines","tags":["logstash"],"x-state":"Technical Preview"}},"/api/maintenance_window":{"post":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"post-maintenance-window","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","minimum":1,"type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"maximum":12,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"maximum":31,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"minItems":1,"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL). Only alerts matching this query will be supressed by the maintenance window.","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"title":{"description":"The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window.","type":"string"}},"required":["title","schedule"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."}},"summary":"Create a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"}},"/api/maintenance_window/{id}":{"delete":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"delete-maintenance-window-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the maintenance window to be deleted.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."}},"summary":"Delete a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"},"get":{"description":"[Required authorization] Route required privileges: read-maintenance-window.","operationId":"get-maintenance-window-id","parameters":[{"description":"The identifier for the maintenance window.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."}},"summary":"Get maintenance window details.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"},"patch":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"patch-maintenance-window-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","minimum":1,"type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"maximum":12,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"maximum":31,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"minItems":1,"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL). Only alerts matching this query will be supressed by the maintenance window.","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"title":{"description":"The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window.","type":"string"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."},"409":{"description":"Indicates that the maintenance window has already been updated by another user."}},"summary":"Update a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"}},"/api/maintenance_window/{id}/_archive":{"post":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"post-maintenance-window-id-archive","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the maintenance window to be archived.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."}},"summary":"Archive a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"}},"/api/maintenance_window/{id}/_unarchive":{"post":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"post-maintenance-window-id-unarchive","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the maintenance window to be unarchived.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."}},"summary":"Unarchive a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"}},"/api/ml/saved_objects/sync":{"get":{"description":"Synchronizes Kibana saved objects for machine learning jobs and trained models in the default space. You must have `all` privileges for the **Machine Learning** feature in the **Analytics** section of the Kibana feature privileges. This API runs automatically when you start Kibana and periodically thereafter.\n","operationId":"mlSync","parameters":[{"$ref":"#/components/parameters/Machine_learning_APIs_simulateParam"}],"responses":{"200":{"content":{"application/json":{"examples":{"syncExample":{"$ref":"#/components/examples/Machine_learning_APIs_mlSyncExample"}},"schema":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSync200Response"}}},"description":"Indicates a successful call"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSync4xxResponse"}}},"description":"Authorization information is missing or invalid."}},"summary":"Sync saved objects in the default space","tags":["ml"]}},"/api/note":{"delete":{"description":"Delete a note from a Timeline using the note ID.","operationId":"DeleteNote","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"nullable":true,"type":"object","properties":{"noteId":{"type":"string"}},"required":["noteId"]},{"nullable":true,"type":"object","properties":{"noteIds":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["noteIds"]}]}}},"description":"The ID of the note to delete.","required":true},"responses":{"200":{"description":"Indicates the note was successfully deleted."}},"summary":"Delete a note","tags":["Security Timeline API"]},"get":{"description":"Get all notes for a given document.","operationId":"GetNotes","parameters":[{"in":"query","name":"documentIds","schema":{"$ref":"#/components/schemas/Security_Timeline_API_DocumentIds"}},{"in":"query","name":"savedObjectIds","schema":{"$ref":"#/components/schemas/Security_Timeline_API_SavedObjectIds"}},{"in":"query","name":"page","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"perPage","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"search","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"sortField","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"sortOrder","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"filter","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"createdByFilter","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"associatedFilter","schema":{"$ref":"#/components/schemas/Security_Timeline_API_AssociatedFilterType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_GetNotesResult"}}},"description":"Indicates the requested notes were returned."}},"summary":"Get notes","tags":["Security Timeline API"]},"patch":{"description":"Add a note to a Timeline or update an existing note.","operationId":"PersistNoteRoute","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"$ref":"#/components/schemas/Security_Timeline_API_BareNote","description":"The note to add or update."},"noteId":{"description":"The `savedObjectId` of the note","example":"709f99c6-89b6-4953-9160-35945c8e174e","nullable":true,"type":"string"},"version":{"description":"The version of the note","example":"WzQ2LDFd","nullable":true,"type":"string"}},"required":["note"]}}},"description":"The note to add or update, along with additional metadata.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_ResponseNote"}}},"description":"Indicates the note was successfully created."}},"summary":"Add or update a note","tags":["Security Timeline API"]}},"/api/osquery/live_queries":{"get":{"description":"Get a list of all live queries.","operationId":"OsqueryFindLiveQueries","parameters":[{"in":"query","name":"kuery","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_KueryOrUndefined"}},{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageOrUndefined"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageSizeOrUndefined"}},{"in":"query","name":"sort","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrUndefined"}},{"in":"query","name":"sortOrder","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrderOrUndefined"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindLiveQueryResponse"}}},"description":"OK"}},"summary":"Get live queries","tags":["Security Osquery API"]},"post":{"description":"Create and run a live query.","operationId":"OsqueryCreateLiveQuery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreateLiveQueryRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreateLiveQueryResponse"}}},"description":"OK"}},"summary":"Create a live query","tags":["Security Osquery API"]}},"/api/osquery/live_queries/{id}":{"get":{"description":"Get the details of a live query using the query ID.","operationId":"OsqueryGetLiveQueryDetails","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"The ID of the live query result you want to retrieve.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindLiveQueryDetailsResponse"}}},"description":"OK"}},"summary":"Get live query details","tags":["Security Osquery API"]}},"/api/osquery/live_queries/{id}/results/{actionId}":{"get":{"description":"Get the results of a live query using the query action ID.","operationId":"OsqueryGetLiveQueryResults","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"The ID of the live query result you want to retrieve.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"}},{"in":"path","name":"actionId","required":true,"schema":{"description":"The ID of the query action that generated the live query results.","example":"609c4c66-ba3d-43fa-afdd-53e244577aa0","type":"string"}},{"in":"query","name":"kuery","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_KueryOrUndefined"}},{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageOrUndefined"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageSizeOrUndefined"}},{"in":"query","name":"sort","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrUndefined"}},{"in":"query","name":"sortOrder","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrderOrUndefined"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_GetLiveQueryResultsResponse"}}},"description":"OK"}},"summary":"Get live query results","tags":["Security Osquery API"]}},"/api/osquery/packs":{"get":{"description":"Get a list of all query packs.","operationId":"OsqueryFindPacks","parameters":[{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageOrUndefined"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageSizeOrUndefined"}},{"in":"query","name":"sort","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrUndefined"}},{"in":"query","name":"sortOrder","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrderOrUndefined"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindPacksResponse"}}},"description":"OK"}},"summary":"Get packs","tags":["Security Osquery API"]},"post":{"description":"Create a query pack.","operationId":"OsqueryCreatePacks","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreatePacksRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreatePacksResponse"}}},"description":"OK"}},"summary":"Create a pack","tags":["Security Osquery API"]}},"/api/osquery/packs/{id}":{"delete":{"description":"Delete a query pack using the pack ID.","operationId":"OsqueryDeletePacks","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PackId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{},"type":"object","properties":{}}}},"description":"OK"}},"summary":"Delete a pack","tags":["Security Osquery API"]},"get":{"description":"Get the details of a query pack using the pack ID.","operationId":"OsqueryGetPacksDetails","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PackId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindPackResponse"}}},"description":"OK"}},"summary":"Get pack details","tags":["Security Osquery API"]},"put":{"description":"Update a query pack using the pack ID.\n\u003e info\n\u003e You cannot update a prebuilt pack.\n","operationId":"OsqueryUpdatePacks","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PackId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_UpdatePacksRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_UpdatePacksResponse"}}},"description":"OK"}},"summary":"Update a pack","tags":["Security Osquery API"]}},"/api/osquery/saved_queries":{"get":{"description":"Get a list of all saved queries.","operationId":"OsqueryFindSavedQueries","parameters":[{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageOrUndefined"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageSizeOrUndefined"}},{"in":"query","name":"sort","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrUndefined"}},{"in":"query","name":"sortOrder","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrderOrUndefined"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindSavedQueryResponse"}}},"description":"OK"}},"summary":"Get saved queries","tags":["Security Osquery API"]},"post":{"description":"Create and run a saved query.","operationId":"OsqueryCreateSavedQuery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreateSavedQueryRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreateSavedQueryResponse"}}},"description":"OK"}},"summary":"Create a saved query","tags":["Security Osquery API"]}},"/api/osquery/saved_queries/{id}":{"delete":{"description":"Delete a saved query using the query ID.","operationId":"OsqueryDeleteSavedQuery","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_DefaultSuccessResponse"}}},"description":"OK"}},"summary":"Delete a saved query","tags":["Security Osquery API"]},"get":{"description":"Get the details of a saved query using the query ID.","operationId":"OsqueryGetSavedQueryDetails","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindSavedQueryDetailResponse"}}},"description":"OK"}},"summary":"Get saved query details","tags":["Security Osquery API"]},"put":{"description":"Update a saved query using the query ID.\n\u003e info\n\u003e You cannot update a prebuilt saved query.\n","operationId":"OsqueryUpdateSavedQuery","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_UpdateSavedQueryRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_UpdateSavedQueryResponse"}}},"description":"OK"}},"summary":"Update a saved query","tags":["Security Osquery API"]}},"/api/pinned_event":{"patch":{"description":"Pin/unpin an event to/from an existing Timeline.","operationId":"PersistPinnedEventRoute","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"description":"The `_id` of the associated event for this pinned event.","example":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bc","type":"string"},"pinnedEventId":{"description":"The `savedObjectId` of the pinned event you want to unpin.","example":"10r1929b-0af7-42bd-85a8-56e234f98h2f3","nullable":true,"type":"string"},"timelineId":{"description":"The `savedObjectId` of the timeline that you want this pinned event unpinned from.","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","type":"string"}},"required":["eventId","timelineId"]}}},"description":"The pinned event to add or unpin, along with additional metadata.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistPinnedEventResponse"}}},"description":"Indicates the event was successfully pinned to or unpinned from the Timeline."}},"summary":"Pin/unpin an event","tags":["Security Timeline API"]}},"/api/risk_score/engine/dangerously_delete_data":{"delete":{"description":"Cleaning up the the Risk Engine by removing the indices, mapping and transforms","operationId":"CleanUpRiskEngine","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"cleanup_successful":{"type":"boolean"}}}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_TaskManagerUnavailableResponse"}}},"description":"Task manager is unavailable"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_CleanUpRiskEngineErrorResponse"}}},"description":"Unexpected error"}},"summary":"Cleanup the Risk Engine","tags":["Security Entity Analytics API"]}},"/api/risk_score/engine/saved_object/configure":{"patch":{"description":"Configuring the Risk Engine Saved Object","operationId":"ConfigureRiskEngineSavedObject","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"exclude_alert_statuses":{"items":{"type":"string"},"type":"array"},"exclude_alert_tags":{"items":{"type":"string"},"type":"array"},"range":{"type":"object","properties":{"end":{"type":"string"},"start":{"type":"string"}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"risk_engine_saved_object_configured":{"type":"boolean"}}}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_TaskManagerUnavailableResponse"}}},"description":"Task manager is unavailable"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_ConfigureRiskEngineSavedObjectErrorResponse"}}},"description":"Unexpected error"}},"summary":"Configure the Risk Engine Saved Object","tags":["Security Entity Analytics API"]}},"/api/risk_score/engine/schedule_now":{"post":{"description":"Schedule the risk scoring engine to run as soon as possible. You can use this to recalculate entity risk scores after updating their asset criticality.","operationId":"ScheduleRiskEngineNow","requestBody":{"content":{"application/json":{}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_RiskEngineScheduleNowResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_TaskManagerUnavailableResponse"}}},"description":"Task manager is unavailable"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_RiskEngineScheduleNowErrorResponse"}}},"description":"Unexpected error"}},"summary":"Run the risk scoring engine","tags":["Security Entity Analytics API"]}},"/api/saved_objects/_bulk_create":{"post":{"deprecated":true,"operationId":"bulkCreateSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"description":"When true, overwrites the document with the same identifier.","in":"query","name":"overwrite","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Create saved objects","tags":["saved objects"]}},"/api/saved_objects/_bulk_delete":{"post":{"deprecated":true,"description":"WARNING: When you delete a saved object, it cannot be recovered.\n","operationId":"bulkDeleteSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"description":"When true, force delete objects that exist in multiple namespaces. Note that the option applies to the whole request. Use the delete object API to specify per-object deletion behavior. TIP: Use this if you attempted to delete objects and received an HTTP 400 error with the following message: \"Unable to delete saved object that exists in multiple namespaces, use the force option to delete it anyway\". WARNING: When you bulk delete objects that exist in multiple namespaces, the API also deletes legacy url aliases that reference the object. These requests are batched to minimise the impact but they can place a heavy load on Kibana. Make sure you limit the number of objects that exist in multiple namespaces in a single bulk delete operation.\n","in":"query","name":"force","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call. NOTE: This HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual objects will be returned in the response body.\n"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Delete saved objects","tags":["saved objects"]}},"/api/saved_objects/_bulk_get":{"post":{"deprecated":true,"operationId":"bulkGetSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Get saved objects","tags":["saved objects"]}},"/api/saved_objects/_bulk_resolve":{"post":{"deprecated":true,"description":"Retrieve multiple Kibana saved objects by identifier using any legacy URL aliases if they exist. Under certain circumstances when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved by the bulk resolve API using either its new ID or its old ID.\n","operationId":"bulkResolveSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call. NOTE: This HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual objects will be returned in the response body. \n"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Resolve saved objects","tags":["saved objects"]}},"/api/saved_objects/_bulk_update":{"post":{"deprecated":true,"description":"Update the attributes for multiple Kibana saved objects.","operationId":"bulkUpdateSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call. NOTE: This HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual objects will be returned in the response body. \n"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Update saved objects","tags":["saved objects"]}},"/api/saved_objects/_export":{"post":{"description":"Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body.\n\nExported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.","operationId":"post-saved-objects-export","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"exportSavedObjectsRequest":{"summary":"Export a specific saved object.","value":{"excludeExportDetails":true,"includeReferencesDeep":false,"objects":[{"id":"de71f4f0-1902-11e9-919b-ffe5949a18d2","type":"map"}]}}},"schema":{"additionalProperties":false,"type":"object","properties":{"excludeExportDetails":{"default":false,"description":"Do not add export details entry at the end of the stream.","type":"boolean"},"hasReference":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},"type":"array"}]},"includeReferencesDeep":{"default":false,"description":"Includes all of the referenced objects in the exported objects.","type":"boolean"},"objects":{"description":"A list of objects to export. NOTE: this optiona cannot be combined with `types` option","items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},"maxItems":10000,"type":"array"},"search":{"description":"Search for documents to export using the Elasticsearch Simple Query String syntax.","type":"string"},"type":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"The saved object types to include in the export. Use `*` to export all the types."}}}}}},"responses":{"200":{"content":{"application/x-ndjson":{"examples":{"exportSavedObjectsResponse":{"summary":"The export objects API response contains a JSON record for each exported object.","value":{"attributes":{"description":"","layerListJSON":"[{\"id\":\"0hmz5\",\"alpha\":1,\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"isAutoSelect\":true,\"lightModeDefault\":\"road_map_desaturated\"},\"visible\":true,\"style\":{},\"type\":\"EMS_VECTOR_TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"edh66\",\"label\":\"Total Requests by Destination\",\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.5,\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"world_countries\",\"tooltipProperties\":[\"name\",\"iso2\"]},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"__kbnjoin__count__673ff994-fc75-4c67-909b-69fcb0e1060e\",\"origin\":\"join\"},\"color\":\"Greys\",\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\",\"joins\":[{\"leftField\":\"iso2\",\"right\":{\"type\":\"ES_TERM_SOURCE\",\"id\":\"673ff994-fc75-4c67-909b-69fcb0e1060e\",\"indexPatternTitle\":\"kibana_sample_data_logs\",\"term\":\"geo.dest\",\"indexPatternRefName\":\"layer_1_join_0_index_pattern\",\"metrics\":[{\"type\":\"count\",\"label\":\"web logs count\"}],\"applyGlobalQuery\":true}}]},{\"id\":\"gaxya\",\"label\":\"Actual Requests\",\"minZoom\":9,\"maxZoom\":24,\"alpha\":1,\"sourceDescriptor\":{\"id\":\"b7486535-171b-4d3b-bb2e-33c1a0a2854c\",\"type\":\"ES_SEARCH\",\"geoField\":\"geo.coordinates\",\"limit\":2048,\"filterByMapBounds\":true,\"tooltipProperties\":[\"clientip\",\"timestamp\",\"host\",\"request\",\"response\",\"machine.os\",\"agent\",\"bytes\"],\"indexPatternRefName\":\"layer_2_source_index_pattern\",\"applyGlobalQuery\":true,\"scalingType\":\"LIMIT\"},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#2200ff\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":2}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"bytes\",\"origin\":\"source\"},\"minSize\":1,\"maxSize\":23,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\"},{\"id\":\"tfi3f\",\"label\":\"Total Requests and Bytes\",\"minZoom\":0,\"maxZoom\":9,\"alpha\":1,\"sourceDescriptor\":{\"type\":\"ES_GEO_GRID\",\"resolution\":\"COARSE\",\"id\":\"8aaa65b5-a4e9-448b-9560-c98cb1c5ac5b\",\"geoField\":\"geo.coordinates\",\"requestType\":\"point\",\"metrics\":[{\"type\":\"count\",\"label\":\"web logs count\"},{\"type\":\"sum\",\"field\":\"bytes\"}],\"indexPatternRefName\":\"layer_3_source_index_pattern\",\"applyGlobalQuery\":true},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"color\":\"Blues\",\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#cccccc\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"sum_of_bytes\",\"origin\":\"source\"},\"minSize\":7,\"maxSize\":25,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"labelText\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"labelSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"minSize\":12,\"maxSize\":24,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\"}]","mapStateJSON":"{\"zoom\":3.64,\"center\":{\"lon\":-88.92107,\"lat\":42.16337},\"timeFilters\":{\"from\":\"now-7d\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":true,\"interval\":0},\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"settings\":{\"autoFitToDataBounds\":false}}","title":"[Logs] Total Requests and Bytes","uiStateJSON":"{\"isDarkMode\":false}"},"coreMigrationVersion":"8.8.0","created_at":"2023-08-23T20:03:32.204Z","id":"de71f4f0-1902-11e9-919b-ffe5949a18d2","managed":false,"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"layer_1_join_0_index_pattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"layer_2_source_index_pattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"layer_3_source_index_pattern","type":"index-pattern"}],"type":"map","typeMigrationVersion":"8.4.0","updated_at":"2023-08-23T20:03:32.204Z","version":"WzEzLDFd"}}},"schema":{}}},"description":"Indicates a successfull call."},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Indicates an unsuccessful response.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"enum":[400],"type":"integer"}},"required":["error","message","statusCode"]}}},"description":"Bad request."}},"summary":"Export saved objects","tags":["saved objects"]}},"/api/saved_objects/_find":{"get":{"deprecated":true,"description":"Retrieve a paginated set of Kibana saved objects.","operationId":"findSavedObjects","parameters":[{"description":"An aggregation structure, serialized as a string. The field format is similar to filter, meaning that to use a saved object type attribute in the aggregation, the `savedObjectType.attributes.title: \"myTitle\"` format must be used. For root fields, the syntax is `savedObjectType.rootField`. NOTE: As objects change in Kibana, the results on each page of the response also change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data.\n","in":"query","name":"aggs","schema":{"type":"string"}},{"description":"The default operator to use for the `simple_query_string`.","in":"query","name":"default_search_operator","schema":{"type":"string"}},{"description":"The fields to return in the attributes key of the response.","in":"query","name":"fields","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"The filter is a KQL string with the caveat that if you filter with an attribute from your saved object type, it should look like that: `savedObjectType.attributes.title: \"myTitle\"`. However, if you use a root attribute of a saved object such as `updated_at`, you will have to define your filter like that: `savedObjectType.updated_at \u003e 2018-12-22`.\n","in":"query","name":"filter","schema":{"type":"string"}},{"description":"Filters to objects that do not have a relationship with the type and identifier combination.","in":"query","name":"has_no_reference","schema":{"type":"object"}},{"description":"The operator to use for the `has_no_reference` parameter. Either `OR` or `AND`. Defaults to `OR`.","in":"query","name":"has_no_reference_operator","schema":{"type":"string"}},{"description":"Filters to objects that have a relationship with the type and ID combination.","in":"query","name":"has_reference","schema":{"type":"object"}},{"description":"The operator to use for the `has_reference` parameter. Either `OR` or `AND`. Defaults to `OR`.","in":"query","name":"has_reference_operator","schema":{"type":"string"}},{"description":"The page of objects to return.","in":"query","name":"page","schema":{"type":"integer"}},{"description":"The number of objects to return per page.","in":"query","name":"per_page","schema":{"type":"integer"}},{"description":"An Elasticsearch `simple_query_string` query that filters the objects in the response.","in":"query","name":"search","schema":{"type":"string"}},{"description":"The fields to perform the `simple_query_string` parsed query against.","in":"query","name":"search_fields","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"Sorts the response. Includes \"root\" and \"type\" fields. \"root\" fields exist for all saved objects, such as \"updated_at\". \"type\" fields are specific to an object type, such as fields returned in the attributes key of the response. When a single type is defined in the type parameter, the \"root\" and \"type\" fields are allowed, and validity checks are made in that order. When multiple types are defined in the type parameter, only \"root\" fields are allowed.\n","in":"query","name":"sort_field","schema":{"type":"string"}},{"description":"The saved object types to include.","in":"query","name":"type","required":true,"schema":{"oneOf":[{"type":"string"},{"type":"array"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Search for saved objects","tags":["saved objects"]}},"/api/saved_objects/_import":{"post":{"description":"Create sets of Kibana saved objects from a file created by the export API. Saved objects can only be imported into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.","operationId":"post-saved-objects-import","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the `createNewCopies` option.","in":"query","name":"overwrite","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options.","in":"query","name":"createNewCopies","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the `createNewCopies` option.","in":"query","name":"compatibilityMode","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"examples":{"importObjectsRequest":{"value":{"file":"file.ndjson"}}},"schema":{"additionalProperties":false,"type":"object","properties":{"file":{"description":"A file exported using the export API. Changing the contents of the exported file in any way before importing it can cause errors, crashes or data loss. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be included in this file. Similarly, the `savedObjects.maxImportPayloadBytes` setting limits the overall size of the file that can be imported.","type":"object"}},"required":["file"]}}}},"responses":{"200":{"content":{"application/json":{"examples":{"importObjectsResponse":{"summary":"The import objects API response indicates a successful import and the objects are created. Since these objects are created as new copies, each entry in the successResults array includes a destinationId attribute.","value":{"success":true,"successCount":1,"successResults":[{"destinationId":"82d2760c-468f-49cf-83aa-b9a35b6a8943","id":"90943e30-9a47-11e8-b64d-95841ca0b247","managed":false,"meta":{"icon":"indexPatternApp","title":"Kibana Sample Data Logs"},"type":"index-pattern"}]}}},"schema":{"additionalProperties":false,"type":"object","properties":{"errors":{"description":"Indicates the import was unsuccessful and specifies the objects that failed to import.\n\nNOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error.","items":{"additionalProperties":true,"type":"object","properties":{}},"type":"array"},"success":{"description":"Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties.","type":"boolean"},"successCount":{"description":"Indicates the number of successfully imported records.","type":"number"},"successResults":{"description":"Indicates the objects that are successfully imported, with any metadata if applicable.\n\nNOTE: Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the `successResults` array includes a `destinationId` attribute.","items":{"additionalProperties":true,"type":"object","properties":{}},"type":"array"}},"required":["success","successCount","errors","successResults"]}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Indicates an unsuccessful response.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"enum":[400],"type":"integer"}},"required":["error","message","statusCode"]}}},"description":"Bad request."}},"summary":"Import saved objects","tags":["saved objects"],"x-codeSamples":[{"label":"Import with createNewCopies","lang":"cURL","source":"curl \\\n -X POST api/saved_objects/_import?createNewCopies=true\n -H \"kbn-xsrf: true\"\n --form file=@file.ndjson\n"}]}},"/api/saved_objects/_resolve_import_errors":{"post":{"description":"To resolve errors from the Import objects API, you can:\n\n* Retry certain saved objects\n* Overwrite specific saved objects\n* Change references to different saved objects\n","operationId":"resolveImportErrors","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"description":"Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. When enabled during the initial import, also enable when resolving import errors. This option cannot be used with the `createNewCopies` option.\n","in":"query","name":"compatibilityMode","required":false,"schema":{"type":"boolean"}},{"description":"Creates copies of the saved objects, regenerates each object ID, and resets the origin. When enabled during the initial import, also enable when resolving import errors.\n","in":"query","name":"createNewCopies","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"examples":{"resolveImportErrorsRequest":{"$ref":"#/components/examples/Saved_objects_resolve_missing_reference_request"}},"schema":{"type":"object","properties":{"file":{"description":"The same file given to the import API.","format":"binary","type":"string"},"retries":{"description":"The retry operations, which can specify how to resolve different types of errors.","items":{"type":"object","properties":{"destinationId":{"description":"Specifies the destination ID that the imported object should have, if different from the current ID.","type":"string"},"id":{"description":"The saved object ID.","type":"string"},"ignoreMissingReferences":{"description":"When set to `true`, ignores missing reference errors. When set to `false`, does nothing.","type":"boolean"},"overwrite":{"description":"When set to `true`, the source object overwrites the conflicting destination object. When set to `false`, does nothing.","type":"boolean"},"replaceReferences":{"description":"A list of `type`, `from`, and `to` used to change the object references.","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"type":{"type":"string"}}},"type":"array"},"type":{"description":"The saved object type.","type":"string"}},"required":["type","id"]},"type":"array"}},"required":["retries"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"resolveImportErrorsResponse":{"$ref":"#/components/examples/Saved_objects_resolve_missing_reference_response"}},"schema":{"type":"object","properties":{"errors":{"description":"Specifies the objects that failed to resolve.\n\nNOTE: One object can result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and a `conflict` error.\n","items":{"type":"object"},"type":"array"},"success":{"description":"Indicates a successful import. When set to `false`, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties.\n","type":"boolean"},"successCount":{"description":"Indicates the number of successfully resolved records.\n","type":"number"},"successResults":{"description":"Indicates the objects that are successfully imported, with any metadata if applicable.\n\nNOTE: Objects are only created when all resolvable errors are addressed, including conflict and missing references.\n","items":{"type":"object"},"type":"array"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request."}},"summary":"Resolve import errors","tags":["saved objects"]}},"/api/saved_objects/{type}":{"post":{"deprecated":true,"description":"Create a Kibana saved object with a randomly generated identifier.","operationId":"createSavedObject","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"},{"description":"If true, overwrites the document with the same identifier.","in":"query","name":"overwrite","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"$ref":"#/components/schemas/Saved_objects_attributes"},"initialNamespaces":{"$ref":"#/components/schemas/Saved_objects_initial_namespaces"},"references":{"$ref":"#/components/schemas/Saved_objects_references"}},"required":["attributes"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"409":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a conflict error."}},"summary":"Create a saved object","tags":["saved objects"]}},"/api/saved_objects/{type}/{id}":{"get":{"deprecated":true,"description":"Retrieve a single Kibana saved object by identifier.","operationId":"getSavedObject","parameters":[{"$ref":"#/components/parameters/Saved_objects_saved_object_id"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request."}},"summary":"Get a saved object","tags":["saved objects"]},"post":{"deprecated":true,"description":"Create a Kibana saved object and specify its identifier instead of using a randomly generated ID.","operationId":"createSavedObjectId","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"$ref":"#/components/parameters/Saved_objects_saved_object_id"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"},{"description":"If true, overwrites the document with the same identifier.","in":"query","name":"overwrite","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"$ref":"#/components/schemas/Saved_objects_attributes"},"initialNamespaces":{"$ref":"#/components/schemas/Saved_objects_initial_namespaces"},"references":{"$ref":"#/components/schemas/Saved_objects_initial_namespaces"}},"required":["attributes"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"409":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a conflict error."}},"summary":"Create a saved object","tags":["saved objects"]},"put":{"deprecated":true,"description":"Update the attributes for Kibana saved objects.","operationId":"updateSavedObject","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"$ref":"#/components/parameters/Saved_objects_saved_object_id"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates the object was not found."},"409":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a conflict error."}},"summary":"Update a saved object","tags":["saved objects"]}},"/api/saved_objects/resolve/{type}/{id}":{"get":{"deprecated":true,"description":"Retrieve a single Kibana saved object by identifier using any legacy URL alias if it exists. Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved using either its new ID or its old ID.\n","operationId":"resolveSavedObject","parameters":[{"$ref":"#/components/parameters/Saved_objects_saved_object_id"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request."}},"summary":"Resolve a saved object","tags":["saved objects"]}},"/api/security_ai_assistant/anonymization_fields/_bulk_action":{"post":{"description":"Apply a bulk action to multiple anonymization fields. The bulk action is applied to all anonymization fields that match the filter or to the list of anonymization fields by their IDs.","operationId":"PerformAnonymizationFieldsBulkAction","requestBody":{"content":{"application/json":{"schema":{"example":{"create":[{"allowed":true,"anonymized":false,"field":"host.name"},{"allowed":false,"anonymized":true,"field":"user.name"}],"delete":{"ids":["field5","field6"],"query":"field: host.name"},"update":[{"allowed":true,"anonymized":false,"id":"field8"},{"allowed":false,"anonymized":true,"id":"field9"}]},"type":"object","properties":{"create":{"description":"Array of anonymization fields to create.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldCreateProps"},"type":"array"},"delete":{"description":"Object containing the query to filter anonymization fields and/or an array of anonymization field IDs to delete.","type":"object","properties":{"ids":{"description":"Array of IDs to apply the action to.","example":["1234","5678"],"items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter the bulk action.","example":"status: 'inactive'","type":"string"}}},"update":{"description":"Array of anonymization fields to update.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldUpdateProps"},"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"example":{"anonymization_fields_count":5,"attributes":{"results":{"created":[{"allowed":false,"anonymized":true,"createdAt":"2023-10-31T12:00:00Z","createdBy":"user1","field":"host.name","id":"field2","namespace":"default","timestamp":"2023-10-31T12:00:00Z","updatedAt":"2023-10-31T12:00:00Z","updatedBy":"user1"}],"deleted":["field3"],"skipped":[{"id":"field4","name":"user.name","skip_reason":"ANONYMIZATION_FIELD_NOT_MODIFIED"}],"updated":[{"allowed":true,"anonymized":false,"createdAt":"2023-10-31T12:00:00Z","createdBy":"user1","field":"url.domain","id":"field8","namespace":"default","timestamp":"2023-10-31T12:00:00Z","updatedAt":"2023-10-31T12:00:00Z","updatedBy":"user1"}]},"summary":{"failed":1,"skipped":1,"succeeded":2,"total":5}},"message":"Bulk action completed successfully","status_code":200,"success":true},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResponse"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"example":{"error":"Bad Request","message":"Invalid request body","statusCode":400},"schema":{"type":"object","properties":{"error":{"description":"Error type or name.","type":"string"},"message":{"description":"Detailed error message.","type":"string"},"statusCode":{"description":"Status code of the response.","type":"number"}}}}},"description":"Generic Error"}},"summary":"Apply a bulk action to anonymization fields","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/anonymization_fields/_find":{"get":{"description":"Get a list of all anonymization fields.","operationId":"FindAnonymizationFields","parameters":[{"description":"Fields to return","example":["id","field","anonymized","allowed"],"in":"query","name":"fields","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"Search query","example":"field: \"user.name\"","in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"description":"Field to sort by","example":"created_at","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_FindAnonymizationFieldsSortField"}},{"description":"Sort order","example":"asc","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_SortOrder"}},{"description":"Page number","example":1,"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"AnonymizationFields per page","example":20,"in":"query","name":"per_page","required":false,"schema":{"default":20,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"allowed":true,"anonymized":true,"createdAt":"2023-10-31T12:00:00Z","createdBy":"user1","field":"user.name","id":"1","namespace":"default","timestamp":"2023-10-31T12:00:00Z","updatedAt":"2023-10-31T12:00:00Z","updatedBy":"user1"}],"page":1,"perPage":20,"total":100},"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse"},"type":"array"},"page":{"type":"integer"},"perPage":{"type":"integer"},"total":{"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"error":"Bad Request","message":"Invalid request parameters","statusCode":400},"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Generic Error"}},"summary":"Get anonymization fields","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/chat/complete":{"post":{"description":"Create a model response for the given chat conversation.","operationId":"ChatComplete","parameters":[{"description":"If true, the response will not include content references.","example":false,"in":"query","name":"content_references_disabled","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/json":{"example":{"connectorId":"conn-001","conversationId":"abc123","isStream":true,"langSmithApiKey":"sk-abc123","langSmithProject":"security_ai_project","messages":[{"content":"What are some common phishing techniques?","data":{"user_id":"user_789"},"fields_to_anonymize":["user.name","source.ip"],"role":"user"}],"model":"gpt-4","persist":true,"promptId":"prompt_456","responseLanguage":"en"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ChatCompleteProps"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Indicates a successful model response call."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error type.","example":"Bad Request","type":"string"},"message":{"description":"Human-readable error message.","example":"Invalid request payload.","type":"string"},"statusCode":{"description":"HTTP status code.","example":400,"type":"number"}}}}},"description":"Generic Error"}},"summary":"Create a model response","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/current_user/conversations":{"post":{"description":"Create a new Security AI Assistant conversation. This endpoint allows the user to initiate a conversation with the Security AI Assistant by providing the required parameters.","operationId":"CreateConversation","requestBody":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"67890","connectorId":"12345"},"category":"assistant","excludeFromLastConversationStorage":false,"messages":[{"content":"Hello, how can I assist you today?","role":"system","timestamp":"2023-10-31T12:00:00Z"}],"replacements":{},"title":"Security Discussion"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationCreateProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"67890","connectorId":"12345"},"category":"assistant","createdAt":"2023-10-31T12:01:00Z","excludeFromLastConversationStorage":false,"id":"abc123","messages":[{"content":"Hello, how can I assist you today?","role":"system","timestamp":"2023-10-31T12:00:00Z"}],"replacements":{},"title":"Security Discussion","updatedAt":"2023-10-31T12:01:00Z","users":[{"id":"user1","name":"John Doe"}]},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"}}},"description":"Indicates a successful call. The conversation was created successfully."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Missing required parameter: title","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. This response indicates an issue with the request, such as missing required parameters or incorrect data."}},"summary":"Create a conversation","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/current_user/conversations/_find":{"get":{"description":"Get a list of all conversations for the current user. This endpoint allows users to search, filter, sort, and paginate through their conversations.","operationId":"FindConversations","parameters":[{"description":"A list of fields to include in the response. If omitted, all fields are returned.","in":"query","name":"fields","required":false,"schema":{"example":["id","title","createdAt"],"items":{"type":"string"},"type":"array"}},{"description":"A search query to filter the conversations. Can match against titles, messages, or other conversation attributes.","in":"query","name":"filter","required":false,"schema":{"example":"Security Issue","type":"string"}},{"description":"The field by which to sort the results. Valid fields are `created_at`, `title`, and `updated_at`.","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_FindConversationsSortField","example":"created_at"}},{"description":"The order in which to sort the results. Can be either `asc` for ascending or `desc` for descending.","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_SortOrder","example":"desc"}},{"description":"The page number of the results to retrieve. Default is 1.","in":"query","name":"page","required":false,"schema":{"default":1,"example":1,"minimum":1,"type":"integer"}},{"description":"The number of conversations to return per page. Default is 20.","in":"query","name":"per_page","required":false,"schema":{"default":20,"example":20,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"A list of conversations.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"},"type":"array"},"page":{"description":"The current page of the results.","example":1,"type":"integer"},"perPage":{"description":"The number of results returned per page.","example":20,"type":"integer"},"total":{"description":"The total number of conversations matching the filter criteria.","example":100,"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response, returns a paginated list of conversations matching the specified criteria."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Invalid filter query parameter","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. The request could not be processed due to an invalid query parameter or other issue."}},"summary":"Get conversations","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/current_user/conversations/{id}":{"delete":{"description":"Delete an existing conversation using the conversation ID. This endpoint allows users to permanently delete a conversation.","operationId":"DeleteConversation","parameters":[{"description":"The conversation's `id` value.","example":"abc123","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"responses":{"200":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"67890","connectorId":"12345"},"category":"assistant","createdAt":"2023-10-31T12:01:00Z","excludeFromLastConversationStorage":false,"id":"abc123","messages":[{"content":"The conversation has been deleted.","role":"system","timestamp":"2023-10-31T12:35:00Z"}],"replacements":{},"title":"Deleted Security Discussion","updatedAt":"2023-10-31T12:01:00Z","users":[{"id":"user1","name":"John Doe"}]},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"}}},"description":"Indicates a successful call. The conversation was deleted successfully."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Invalid conversation ID","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. This response indicates an issue with the request."}},"summary":"Delete a conversation","tags":["Security AI Assistant API"]},"get":{"description":"Get the details of an existing conversation using the conversation ID. This allows users to fetch the specific conversation data by its unique ID.","operationId":"ReadConversation","parameters":[{"description":"The conversation's `id` value, a unique identifier for the conversation.","example":"abc123","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"responses":{"200":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"67890","connectorId":"12345"},"category":"assistant","createdAt":"2023-10-31T12:01:00Z","excludeFromLastConversationStorage":false,"id":"abc123","messages":[{"content":"Hello, how can I assist you today?","role":"system","timestamp":"2023-10-31T12:00:00Z"}],"replacements":{},"title":"Security Discussion","updatedAt":"2023-10-31T12:01:00Z","users":[{"id":"user1","name":"John Doe"}]},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"}}},"description":"Indicates a successful call. The conversation details are returned."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Invalid conversation ID","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. The request could not be processed due to an error."}},"summary":"Get a conversation","tags":["Security AI Assistant API"]},"put":{"description":"Update an existing conversation using the conversation ID. This endpoint allows users to modify the details of an existing conversation.","operationId":"UpdateConversation","parameters":[{"description":"The conversation's `id` value.","example":"abc123","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"requestBody":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"09876","connectorId":"54321"},"category":"insights","excludeFromLastConversationStorage":true,"messages":[{"content":"The issue was resolved.","role":"assistant","timestamp":"2023-10-31T12:30:00Z"}],"replacements":{},"title":"Updated Security Discussion"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationUpdateProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"09876","connectorId":"54321"},"category":"insights","createdAt":"2023-10-31T12:01:00Z","excludeFromLastConversationStorage":true,"id":"abc123","messages":[{"content":"The issue was resolved.","role":"assistant","timestamp":"2023-10-31T12:30:00Z"}],"replacements":{},"title":"Updated Security Discussion","updatedAt":"2023-10-31T12:31:00Z","users":[{"id":"user1","name":"John Doe"}]},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"}}},"description":"Indicates a successful call. The conversation was updated successfully."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Missing required field: title","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. This response indicates an issue with the request, such as missing required parameters or incorrect data."}},"summary":"Update a conversation","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/{resource}":{"get":{"description":"Read a single KB","operationId":"ReadKnowledgeBase","parameters":[{"description":"The KnowledgeBase `resource` value.","example":"kb12345","in":"path","name":"resource","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"elser_exists":{"description":"Indicates if the ELSER model exists for the KnowledgeBase.","example":true,"type":"boolean"},"is_setup_available":{"description":"Indicates if the setup process is available for the KnowledgeBase.","example":true,"type":"boolean"},"is_setup_in_progress":{"description":"Indicates if the setup process is currently in progress.","example":false,"type":"boolean"},"product_documentation_status":{"description":"The status of the product documentation in the KnowledgeBase.","example":"complete","type":"string"},"security_labs_exists":{"description":"Indicates if Security Labs documentation exists in the KnowledgeBase.","example":true,"type":"boolean"},"user_data_exists":{"description":"Indicates if user data exists in the KnowledgeBase.","example":false,"type":"boolean"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"A short description of the error.","example":"Bad Request","type":"string"},"message":{"description":"A detailed error message.","example":"Invalid resource ID provided.","type":"string"},"statusCode":{"description":"The HTTP status code of the error.","example":400,"type":"number"}}}}},"description":"Generic Error"}},"summary":"Read a KnowledgeBase","tags":["Security AI Assistant API"]},"post":{"description":"Create a KnowledgeBase","operationId":"CreateKnowledgeBase","parameters":[{"description":"The KnowledgeBase `resource` value.","example":"kb12345","in":"path","name":"resource","schema":{"type":"string"}},{"description":"ELSER modelId to use when setting up the Knowledge Base. If not provided, a default model will be used.","example":"elser-model-001","in":"query","name":"modelId","required":false,"schema":{"type":"string"}},{"description":"Indicates whether we should or should not install Security Labs docs when setting up the Knowledge Base. Defaults to `false`.","example":true,"in":"query","name":"ignoreSecurityLabs","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseResponse"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"A short description of the error.","example":"Bad Request","type":"string"},"message":{"description":"A detailed error message.","example":"Invalid resource ID provided.","type":"string"},"statusCode":{"description":"The HTTP status code of the error.","example":400,"type":"number"}}}}},"description":"Generic Error"}},"summary":"Create a KnowledgeBase","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/entries":{"post":{"description":"Create a Knowledge Base Entry","operationId":"CreateKnowledgeBaseEntry","requestBody":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page and click 'Reset Password'.","tags":["password","reset","help"],"title":"How to reset a password"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryCreateProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page and click 'Reset Password'.","id":"12345","tags":["password","reset","help"],"title":"How to reset a password"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"}}},"description":"Successful request returning Knowledge Base Entries"},"400":{"content":{"application/json":{"example":{"error":"Invalid input","message":"The 'title' field is required."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"A generic error occurred, such as invalid input or missing required fields."}},"summary":"Create a Knowledge Base Entry","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/entries/_bulk_action":{"post":{"description":"The bulk action is applied to all Knowledge Base Entries that match the filter or to the list of Knowledge Base Entries by their IDs.","operationId":"PerformKnowledgeBaseEntryBulkAction","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"create":{"description":"List of Knowledge Base Entries to create.","example":[{"content":"This is the content of the new entry.","title":"New Entry"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryCreateProps"},"type":"array"},"delete":{"type":"object","properties":{"ids":{"description":"Array of Knowledge Base Entry IDs.","example":["123","456","789"],"items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter Knowledge Base Entries.","example":"status:active AND category:technology","type":"string"}}},"update":{"description":"List of Knowledge Base Entries to update.","example":[{"content":"Updated content.","id":"123","title":"Updated Entry"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateProps"},"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionResponse"}}},"description":"Successful bulk operation request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"Generic Error"}},"summary":"Applies a bulk action to multiple Knowledge Base Entries","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/entries/_find":{"get":{"description":"Finds Knowledge Base Entries that match the given query.","operationId":"FindKnowledgeBaseEntries","parameters":[{"description":"A list of fields to include in the response. If not provided, all fields will be included.","in":"query","name":"fields","required":false,"schema":{"example":["title","created_at"],"items":{"type":"string"},"type":"array"}},{"description":"Search query to filter Knowledge Base Entries by specific criteria.","in":"query","name":"filter","required":false,"schema":{"example":"error handling","type":"string"}},{"description":"Field to sort the Knowledge Base Entries by.","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_FindKnowledgeBaseEntriesSortField","example":"created_at"}},{"description":"Sort order for the results, either asc or desc.","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_SortOrder","example":"asc"}},{"description":"Page number for paginated results. Defaults to 1.","in":"query","name":"page","required":false,"schema":{"default":1,"example":2,"minimum":1,"type":"integer"}},{"description":"Number of Knowledge Base Entries to return per page. Defaults to 20.","in":"query","name":"per_page","required":false,"schema":{"default":20,"example":10,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The list of Knowledge Base Entries for the current page.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"},"type":"array"},"page":{"description":"The current page number.","example":1,"type":"integer"},"perPage":{"description":"The number of Knowledge Base Entries returned per page.","example":20,"type":"integer"},"total":{"description":"The total number of Knowledge Base Entries available.","example":100,"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response containing the paginated Knowledge Base Entries."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"A short description of the error.","example":"Bad Request","type":"string"},"message":{"description":"A detailed message explaining the error.","example":"Invalid query parameter: sort_order","type":"string"},"statusCode":{"description":"The HTTP status code of the error.","example":400,"type":"number"}}}}},"description":"Generic Error indicating an issue with the request."}},"summary":"Finds Knowledge Base Entries that match the given query.","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/entries/{id}":{"delete":{"description":"Delete a Knowledge Base Entry by its unique `id`.","operationId":"DeleteKnowledgeBaseEntry","parameters":[{"description":"The unique identifier (`id`) of the Knowledge Base Entry to delete.","example":"12345","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"responses":{"200":{"content":{"application/json":{"example":{"id":"12345","message":"Knowledge Base Entry successfully deleted."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_DeleteResponseFields"}}},"description":"Successful request returning the `id` of the deleted Knowledge Base Entry."},"400":{"content":{"application/json":{"example":{"error":"Not Found","message":"No Knowledge Base Entry found with the provided `id`."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"A generic error occurred, such as an invalid `id` or the entry not being found."}},"summary":"Deletes a single Knowledge Base Entry using the `id` field","tags":["Security AI Assistant API"]},"get":{"description":"Retrieve a Knowledge Base Entry by its unique `id`.","operationId":"ReadKnowledgeBaseEntry","parameters":[{"description":"The unique identifier (`id`) of the Knowledge Base Entry to retrieve.","example":"12345","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"responses":{"200":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page and click 'Reset Password'.","id":"12345","tags":["password","reset","help"],"title":"How to reset a password"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"}}},"description":"Successful request returning the requested Knowledge Base Entry."},"400":{"content":{"application/json":{"example":{"error":"Not Found","message":"No Knowledge Base Entry found with the provided `id`."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"A generic error occurred, such as an invalid `id` or the entry not being found."}},"summary":"Read a Knowledge Base Entry","tags":["Security AI Assistant API"]},"put":{"description":"Update an existing Knowledge Base Entry by its unique `id`.","operationId":"UpdateKnowledgeBaseEntry","parameters":[{"description":"The unique identifier (`id`) of the Knowledge Base Entry to update.","example":"12345","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"requestBody":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page, click 'Reset Password', and follow the instructions.","tags":["password","reset","help","update"],"title":"How to reset a password (updated)"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page, click 'Reset Password', and follow the instructions.","id":"12345","tags":["password","reset","help","update"],"title":"How to reset a password (updated)"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"}}},"description":"Successful request returning the updated Knowledge Base Entry."},"400":{"content":{"application/json":{"example":{"error":"Invalid input","message":"The 'content' field cannot be empty."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"A generic error occurred, such as invalid input or the entry not being found."}},"summary":"Update a Knowledge Base Entry","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/prompts/_bulk_action":{"post":{"description":"Apply a bulk action to multiple prompts. The bulk action is applied to all prompts that match the filter or to the list of prompts by their IDs. This action allows for bulk create, update, or delete operations.","operationId":"PerformPromptsBulkAction","requestBody":{"content":{"application/json":{"example":{"create":[{"content":"Please verify the security settings.","name":"New Security Prompt","promptType":"system"}],"delete":{"ids":["prompt1","prompt2"]},"update":[{"content":"Updated content for security prompt.","id":"prompt123"}]},"schema":{"type":"object","properties":{"create":{"description":"List of prompts to be created.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptCreateProps"},"type":"array"},"delete":{"description":"Criteria for deleting prompts in bulk.","type":"object","properties":{"ids":{"description":"Array of IDs to apply the action to.","example":["1234","5678"],"items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter the bulk action.","example":"status: 'inactive'","type":"string"}}},"update":{"description":"List of prompts to be updated.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptUpdateProps"},"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"attributes":{"errors":[],"results":{"created":[{"content":"Please verify the security settings.","id":"prompt6","name":"New Security Prompt","promptType":"system"}],"deleted":["prompt2","prompt3"],"skipped":[{"id":"prompt4","name":"Security Prompt","skip_reason":"PROMPT_FIELD_NOT_MODIFIED"}],"updated":[{"content":"Updated security settings prompt","id":"prompt1","name":"Security Prompt","promptType":"system"}]},"summary":{"failed":0,"skipped":1,"succeeded":4,"total":5}},"message":"Bulk action completed successfully.","prompts_count":5,"status_code":200,"success":true}}},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptsBulkCrudActionResponse"}}},"description":"Indicates a successful call with the results of the bulk action."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"A short error message.","example":"Bad Request","type":"string"},"message":{"description":"A detailed error message.","example":"Invalid prompt ID or missing required fields.","type":"string"},"statusCode":{"description":"The HTTP status code for the error.","example":400,"type":"number"}}}}},"description":"Indicates a generic error due to a bad request."}},"summary":"Apply a bulk action to prompts","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/prompts/_find":{"get":{"description":"Get a list of all prompts based on optional filters, sorting, and pagination.","operationId":"FindPrompts","parameters":[{"description":"List of specific fields to include in each returned prompt.","in":"query","name":"fields","required":false,"schema":{"example":["id","name","content"],"items":{"type":"string"},"type":"array"}},{"description":"Search query string to filter prompts by matching fields.","in":"query","name":"filter","required":false,"schema":{"example":"error handling","type":"string"}},{"description":"Field to sort prompts by.","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_FindPromptsSortField"}},{"description":"Sort order, either asc or desc.","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_SortOrder"}},{"description":"Page number for pagination.","in":"query","name":"page","required":false,"schema":{"default":1,"example":1,"minimum":1,"type":"integer"}},{"description":"Number of prompts per page.","in":"query","name":"per_page","required":false,"schema":{"default":20,"example":20,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"data":[{"categories":["troubleshooting","logging"],"color":"#FF5733","consumer":"security","content":"If you encounter an error, check the logs and retry.","createdAt":"2025-04-20T21:00:00Z","createdBy":"jdoe","id":"prompt-123","isDefault":true,"isNewConversationDefault":false,"name":"Error Troubleshooting Prompt","namespace":"default","promptType":"standard","timestamp":"2025-04-30T22:30:00Z","updatedAt":"2025-04-30T22:45:00Z","updatedBy":"jdoe","users":[{"full_name":"John Doe","username":"jdoe"}]}],"page":1,"perPage":20,"total":142},"type":"object","properties":{"data":{"description":"The list of prompts returned based on the search query, sorting, and pagination.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptResponse"},"type":"array"},"page":{"description":"Current page number.","example":1,"type":"integer"},"perPage":{"description":"Number of prompts per page.","example":20,"type":"integer"},"total":{"description":"Total number of prompts matching the query.","example":142,"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response containing a list of prompts."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Short error message.","example":"Bad Request","type":"string"},"message":{"description":"Detailed description of the error.","example":"Invalid sort order value provided.","type":"string"},"statusCode":{"description":"HTTP status code for the error.","example":400,"type":"number"}}}}},"description":"Bad request due to invalid parameters or malformed query."}},"summary":"Get prompts","tags":["Security AI Assistant API"]}},"/api/security/role":{"get":{"operationId":"get-security-role","parameters":[{"description":"If `true` and the response contains any privileges that are associated with deprecated features, they are omitted in favor of details about the appropriate replacement feature privileges.","in":"query","name":"replaceDeprecatedPrivileges","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getRolesResponse1":{"$ref":"#/components/examples/get_roles_response1"}}}}}},"summary":"Get all roles","tags":["roles"]}},"/api/security/role/_query":{"post":{"operationId":"post-security-role-query","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"filters":{"additionalProperties":false,"type":"object","properties":{"showReservedRoles":{"type":"boolean"}}},"from":{"type":"number"},"query":{"type":"string"},"size":{"type":"number"},"sort":{"additionalProperties":false,"type":"object","properties":{"direction":{"enum":["asc","desc"],"type":"string"},"field":{"type":"string"}},"required":["field","direction"]}}}}}},"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Query roles","tags":[]}},"/api/security/role/{name}":{"delete":{"operationId":"delete-security-role-name","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."}},"summary":"Delete a role","tags":["roles"]},"get":{"operationId":"get-security-role-name","parameters":[{"description":"The role name.","in":"path","name":"name","required":true,"schema":{"minLength":1,"type":"string"}},{"description":"If `true` and the response contains any privileges that are associated with deprecated features, they are omitted in favor of details about the appropriate replacement feature privileges.","in":"query","name":"replaceDeprecatedPrivileges","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getRoleResponse1":{"$ref":"#/components/examples/get_role_response1"}}}}}},"summary":"Get a role","tags":["roles"]},"put":{"description":"Create a new Kibana role or update the attributes of an existing role. Kibana roles are stored in the Elasticsearch native realm.","operationId":"put-security-role-name","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The role name.","in":"path","name":"name","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}},{"description":"When true, a role is not overwritten if it already exists.","in":"query","name":"createOnly","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"description":{"description":"A description for the role.","maxLength":2048,"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"cluster":{"items":{"description":"Cluster privileges that define the cluster level actions that users can perform.","type":"string"},"type":"array"},"indices":{"items":{"additionalProperties":false,"type":"object","properties":{"allow_restricted_indices":{"description":"Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field covers the restricted indices too.","type":"boolean"},"field_security":{"additionalProperties":{"items":{"description":"The document fields that the role members have read access to.","type":"string"},"type":"array"},"type":"object"},"names":{"items":{"description":"The data streams, indices, and aliases to which the permissions in this entry apply. It supports wildcards (*).","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The index level privileges that the role members have for the data streams and indices.","type":"string"},"minItems":1,"type":"array"},"query":{"description":"A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members.","type":"string"}},"required":["names","privileges"]},"type":"array"},"remote_cluster":{"items":{"additionalProperties":false,"type":"object","properties":{"clusters":{"items":{"description":"A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The cluster level privileges for the remote cluster. The allowed values are a subset of the cluster privileges.","type":"string"},"minItems":1,"type":"array"}},"required":["privileges","clusters"]},"type":"array"},"remote_indices":{"items":{"additionalProperties":false,"type":"object","properties":{"allow_restricted_indices":{"description":"Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field will cover the restricted indices too.","type":"boolean"},"clusters":{"items":{"description":"A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.","type":"string"},"minItems":1,"type":"array"},"field_security":{"additionalProperties":{"items":{"description":"The document fields that the role members have read access to.","type":"string"},"type":"array"},"type":"object"},"names":{"items":{"description":"A list of remote aliases, data streams, or indices to which the permissions apply. It supports wildcards (*).","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The index level privileges that role members have for the specified indices.","type":"string"},"minItems":1,"type":"array"},"query":{"description":"A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members. ","type":"string"}},"required":["clusters","names","privileges"]},"type":"array"},"run_as":{"items":{"description":"A user name that the role member can impersonate.","type":"string"},"type":"array"}}},"kibana":{"items":{"additionalProperties":false,"type":"object","properties":{"base":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"items":{"description":"A base privilege that grants applies to all spaces.","type":"string"},"type":"array"},{"items":{"description":"A base privilege that applies to specific spaces.","type":"string"},"type":"array"}]},"feature":{"additionalProperties":{"items":{"description":"The privileges that the role member has for the feature.","type":"string"},"type":"array"},"type":"object"},"spaces":{"anyOf":[{"items":{"enum":["*"],"type":"string"},"maxItems":1,"minItems":1,"type":"array"},{"items":{"description":"A space that the privilege applies to.","type":"string"},"type":"array"}],"default":["*"]}},"required":["base"]},"type":"array"},"metadata":{"additionalProperties":{},"type":"object"}},"required":["elasticsearch"]},"examples":{"createRoleRequest1":{"$ref":"#/components/examples/create_role_request1"},"createRoleRequest2":{"$ref":"#/components/examples/create_role_request2"},"createRoleRequest3":{"$ref":"#/components/examples/create_role_request3"},"createRoleRequest4":{"$ref":"#/components/examples/create_role_request4"}}}}},"responses":{"204":{"description":"Indicates a successful call."}},"summary":"Create or update a role","tags":["roles"]}},"/api/security/roles":{"post":{"operationId":"post-security-roles","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"roles":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"description":{"description":"A description for the role.","maxLength":2048,"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"cluster":{"items":{"description":"Cluster privileges that define the cluster level actions that users can perform.","type":"string"},"type":"array"},"indices":{"items":{"additionalProperties":false,"type":"object","properties":{"allow_restricted_indices":{"description":"Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field covers the restricted indices too.","type":"boolean"},"field_security":{"additionalProperties":{"items":{"description":"The document fields that the role members have read access to.","type":"string"},"type":"array"},"type":"object"},"names":{"items":{"description":"The data streams, indices, and aliases to which the permissions in this entry apply. It supports wildcards (*).","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The index level privileges that the role members have for the data streams and indices.","type":"string"},"minItems":1,"type":"array"},"query":{"description":"A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members.","type":"string"}},"required":["names","privileges"]},"type":"array"},"remote_cluster":{"items":{"additionalProperties":false,"type":"object","properties":{"clusters":{"items":{"description":"A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The cluster level privileges for the remote cluster. The allowed values are a subset of the cluster privileges.","type":"string"},"minItems":1,"type":"array"}},"required":["privileges","clusters"]},"type":"array"},"remote_indices":{"items":{"additionalProperties":false,"type":"object","properties":{"allow_restricted_indices":{"description":"Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field will cover the restricted indices too.","type":"boolean"},"clusters":{"items":{"description":"A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.","type":"string"},"minItems":1,"type":"array"},"field_security":{"additionalProperties":{"items":{"description":"The document fields that the role members have read access to.","type":"string"},"type":"array"},"type":"object"},"names":{"items":{"description":"A list of remote aliases, data streams, or indices to which the permissions apply. It supports wildcards (*).","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The index level privileges that role members have for the specified indices.","type":"string"},"minItems":1,"type":"array"},"query":{"description":"A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members. ","type":"string"}},"required":["clusters","names","privileges"]},"type":"array"},"run_as":{"items":{"description":"A user name that the role member can impersonate.","type":"string"},"type":"array"}}},"kibana":{"items":{"additionalProperties":false,"type":"object","properties":{"base":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"items":{"description":"A base privilege that grants applies to all spaces.","type":"string"},"type":"array"},{"items":{"description":"A base privilege that applies to specific spaces.","type":"string"},"type":"array"}]},"feature":{"additionalProperties":{"items":{"description":"The privileges that the role member has for the feature.","type":"string"},"type":"array"},"type":"object"},"spaces":{"anyOf":[{"items":{"enum":["*"],"type":"string"},"maxItems":1,"minItems":1,"type":"array"},{"items":{"description":"A space that the privilege applies to.","type":"string"},"type":"array"}],"default":["*"]}},"required":["base"]},"type":"array"},"metadata":{"additionalProperties":{},"type":"object"}},"required":["elasticsearch"]},"type":"object"}},"required":["roles"]}}}},"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Create or update roles","tags":["roles"]}},"/api/security/session/_invalidate":{"post":{"description":"Invalidate user sessions that match a query. To use this API, you must be a superuser.\n","operationId":"post-security-session-invalidate","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"invalidateRequestExample1":{"description":"Run `POST api/security/session/_invalidate` to invalidate all existing sessions.","summary":"Invalidate all sessions","value":"{\n \"match\" : \"all\"\n}"},"invalidateRequestExample2":{"description":"Run `POST api/security/session/_invalidate` to invalidate sessions that were created by any SAML authentication provider.","summary":"Invalidate all SAML sessions","value":"{\n \"match\" : \"query\",\n \"query\": {\n \"provider\" : { \"type\": \"saml\" }\n }\n}"},"invalidateRequestExample3":{"description":"Run `POST api/security/session/_invalidate` to invalidate sessions that were created by the SAML authentication provider named `saml1`.","summary":"Invalidate sessions for a provider","value":"{\n \"match\" : \"query\",\n \"query\": {\n \"provider\" : { \"type\": \"saml\", \"name\": \"saml1\" }\n }\n}"},"invalidateRequestExample4":{"description":"Run `POST api/security/session/_invalidate` to invalidate sessions that were created by any OpenID Connect authentication provider for the user with the username `user@my-oidc-sso.com`.","summary":"Invalidate sessions for a user","value":"{\n \"match\" : \"query\",\n \"query\": {\n \"provider\" : { \"type\": \"oidc\" },\n \"username\": \"user@my-oidc-sso.com\"\n }\n}"}},"schema":{"type":"object","properties":{"match":{"description":"The method Kibana uses to determine which sessions to invalidate. If it is `all`, all existing sessions will be invalidated. If it is `query`, only the sessions that match the query will be invalidated.\n","enum":["all","query"],"type":"string"},"query":{"description":"The query that Kibana uses to match the sessions to invalidate when the `match` parameter is set to `query`.\n","type":"object","properties":{"provider":{"description":"The authentication providers that will have their user sessions invalidated.","type":"object","properties":{"name":{"description":"The authentication provider name.","type":"string"},"type":{"description":"The authentication provide type. For example: `basic`, `token`, `saml`, `oidc`, `kerberos`, or `pki`.\n","type":"string"}},"required":["type"]},"username":{"description":"The username that will have its sessions invalidated.","type":"string"}},"required":["provider"]}},"required":["match"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"description":"The number of sessions that were successfully invalidated.","type":"integer"}}}}},"description":"Indicates a successful call"},"403":{"description":"Indicates that the user may not be authorized to invalidate sessions for other users."}},"summary":"Invalidate user sessions","tags":["user session"],"x-state":"Technical Preview"}},"/api/short_url":{"post":{"description":"Kibana URLs may be long and cumbersome, short URLs are much easier to remember and share.\nShort URLs are created by specifying the locator ID and locator parameters. When a short URL is resolved, the locator ID and locator parameters are used to redirect user to the right Kibana page.\n","operationId":"post-url","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"humanReadableSlug":{"description":"When the `slug` parameter is omitted, the API will generate a random human-readable slug if `humanReadableSlug` is set to true.\n","type":"boolean"},"locatorId":{"description":"The identifier for the locator.","type":"string"},"params":{"description":"An object which contains all necessary parameters for the given locator to resolve to a Kibana location.\n\u003e warn\n\u003e When you create a short URL, locator params are not validated, which allows you to pass arbitrary and ill-formed data into the API that can break Kibana. Make sure any data that you send to the API is properly formed.\n","type":"object"},"slug":{"description":"A custom short URL slug. The slug is the part of the short URL that identifies it. You can provide a custom slug which consists of latin alphabet letters, numbers, and `-._` characters. The slug must be at least 3 characters long, but no longer than 255 characters.\n","type":"string"}},"required":["locatorId","params"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Short_URL_APIs_urlResponse"}}},"description":"Indicates a successful call."}},"summary":"Create a short URL","tags":["short url"],"x-state":"Technical Preview"}},"/api/short_url/_slug/{slug}":{"get":{"description":"Resolve a Kibana short URL by its slug.\n","operationId":"resolve-url","parameters":[{"description":"The slug of the short URL.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Short_URL_APIs_urlResponse"}}},"description":"Indicates a successful call."}},"summary":"Resolve a short URL","tags":["short url"],"x-state":"Technical Preview"}},"/api/short_url/{id}":{"delete":{"description":"Delete a Kibana short URL.\n","operationId":"delete-url","parameters":[{"$ref":"#/components/parameters/Short_URL_APIs_idParam"}],"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Delete a short URL","tags":["short url"],"x-state":"Technical Preview"},"get":{"description":"Get a single Kibana short URL.\n","operationId":"get-url","parameters":[{"$ref":"#/components/parameters/Short_URL_APIs_idParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Short_URL_APIs_urlResponse"}}},"description":"Indicates a successful call."}},"summary":"Get a short URL","tags":["short url"],"x-state":"Technical Preview"}},"/api/spaces/_copy_saved_objects":{"post":{"description":"It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved Discover sessions, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: copySavedObjectsToSpaces.","operationId":"post-spaces-copy-saved-objects","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"compatibilityMode":{"default":false,"description":"Apply various adjustments to the saved objects that are being copied to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with copied saved objects. This option cannot be used with the `createNewCopies` option.","type":"boolean"},"createNewCopies":{"default":true,"description":"Create new copies of saved objects, regenerate each object identifier, and reset the origin. When used, potential conflict errors are avoided. This option cannot be used with the `overwrite` and `compatibilityMode` options.","type":"boolean"},"includeReferences":{"default":false,"description":"When set to true, all saved objects related to the specified saved objects will also be copied into the target spaces.","type":"boolean"},"objects":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"description":"The identifier of the saved object to copy.","type":"string"},"type":{"description":"The type of the saved object to copy.","type":"string"}},"required":["type","id"]},"type":"array"},"overwrite":{"default":false,"description":"When set to true, all conflicts are automatically overridden. When a saved object with a matching type and identifier exists in the target space, that version is replaced with the version from the source space. This option cannot be used with the `createNewCopies` option.","type":"boolean"},"spaces":{"items":{"description":"The identifiers of the spaces where you want to copy the specified objects.","type":"string"},"type":"array"}},"required":["spaces","objects"]},"examples":{"copySavedObjectsRequestExample1":{"$ref":"#/components/examples/copy_saved_objects_request1"},"copySavedObjectsRequestExample2":{"$ref":"#/components/examples/copy_saved_objects_request2"}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"copySavedObjectsResponseExample1":{"$ref":"#/components/examples/copy_saved_objects_response1"},"copySavedObjectsResponseExample2":{"$ref":"#/components/examples/copy_saved_objects_response2"},"copySavedObjectsResponseExample3":{"$ref":"#/components/examples/copy_saved_objects_response3"},"copySavedObjectsResponseExample4":{"$ref":"#/components/examples/copy_saved_objects_response4"}}}}}},"summary":"Copy saved objects between spaces","tags":["spaces"]}},"/api/spaces/_disable_legacy_url_aliases":{"post":{"operationId":"post-spaces-disable-legacy-url-aliases","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"aliases":{"items":{"additionalProperties":false,"type":"object","properties":{"sourceId":{"description":"The alias source object identifier. This is the legacy object identifier.","type":"string"},"targetSpace":{"description":"The space where the alias target object exists.","type":"string"},"targetType":{"description":"The type of alias target object. ","type":"string"}},"required":["targetSpace","targetType","sourceId"]},"type":"array"}},"required":["aliases"]},"examples":{"disableLegacyURLRequestExample1":{"$ref":"#/components/examples/disable_legacy_url_request1"}}}}},"responses":{},"summary":"Disable legacy URL aliases","tags":["spaces"]}},"/api/spaces/_get_shareable_references":{"post":{"description":"Collect references and space contexts for saved objects.","operationId":"post-spaces-get-shareable-references","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"objects":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},"type":"array"}},"required":["objects"]}}}},"responses":{},"summary":"Get shareable references","tags":["spaces"]}},"/api/spaces/_resolve_copy_saved_objects_errors":{"post":{"description":"Overwrite saved objects that are returned as errors from the copy saved objects to space API.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: copySavedObjectsToSpaces.","operationId":"post-spaces-resolve-copy-saved-objects-errors","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"compatibilityMode":{"default":false,"type":"boolean"},"createNewCopies":{"default":true,"type":"boolean"},"includeReferences":{"default":false,"type":"boolean"},"objects":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},"type":"array"},"retries":{"additionalProperties":{"items":{"additionalProperties":false,"type":"object","properties":{"createNewCopy":{"description":"Creates new copies of the saved objects, regenerates each object ID, and resets the origin.","type":"boolean"},"destinationId":{"description":"Specifies the destination identifier that the copied object should have, if different from the current identifier.","type":"string"},"id":{"description":"The saved object identifier.","type":"string"},"ignoreMissingReferences":{"description":"When set to true, any missing references errors are ignored.","type":"boolean"},"overwrite":{"default":false,"description":"When set to true, the saved object from the source space overwrites the conflicting object in the destination space.","type":"boolean"},"type":{"description":"The saved object type.","type":"string"}},"required":["type","id"]},"type":"array"},"type":"object"}},"required":["retries","objects"]},"examples":{"resolveCopySavedObjectsRequestExample1":{"$ref":"#/components/examples/resolve_copy_saved_objects_request1"},"resolveCopySavedObjectsRequestExample2":{"$ref":"#/components/examples/resolve_copy_saved_objects_request2"}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"resolveCopySavedObjectsResponseExample1":{"$ref":"#/components/examples/copy_saved_objects_response1"},"resolveCopySavedObjectsResponseExample2":{"$ref":"#/components/examples/copy_saved_objects_response2"}}}}}},"summary":"Resolve conflicts copying saved objects","tags":[]}},"/api/spaces/_update_objects_spaces":{"post":{"description":"Update one or more saved objects to add or remove them from some spaces.","operationId":"post-spaces-update-objects-spaces","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"objects":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"description":"The identifier of the saved object to update.","type":"string"},"type":{"description":"The type of the saved object to update.","type":"string"}},"required":["type","id"]},"type":"array"},"spacesToAdd":{"items":{"description":"The identifiers of the spaces the saved objects should be added to or removed from.","type":"string"},"type":"array"},"spacesToRemove":{"items":{"description":"The identifiers of the spaces the saved objects should be added to or removed from.","type":"string"},"type":"array"}},"required":["objects","spacesToAdd","spacesToRemove"]},"examples":{"updateObjectSpacesRequestExample1":{"$ref":"#/components/examples/update_saved_objects_spaces_request1"}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"updateObjectSpacesResponseExample1":{"$ref":"#/components/examples/update_saved_objects_spaces_response1"}}}}}},"summary":"Update saved objects in spaces","tags":["spaces"]}},"/api/spaces/space":{"get":{"operationId":"get-spaces-space","parameters":[{"description":"Specifies which authorization checks are applied to the API call. The default value is `any`.","in":"query","name":"purpose","required":false,"schema":{"enum":["any","copySavedObjectsIntoSpace","shareSavedObjectsIntoSpace"],"type":"string"}},{"description":"When enabled, the API returns any spaces that the user is authorized to access in any capacity and each space will contain the purposes for which the user is authorized. This can be useful to determine which spaces a user can read but not take a specific action in. If the security plugin is not enabled, this parameter has no effect, since no authorization checks take place. This parameter cannot be used in with the `purpose` parameter.","in":"query","name":"include_authorized_purposes","required":true,"schema":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":[false],"type":"boolean","x-oas-optional":true},{"type":"boolean","x-oas-optional":true}]}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getSpacesResponseExample1":{"$ref":"#/components/examples/get_spaces_response1"},"getSpacesResponseExample2":{"$ref":"#/components/examples/get_spaces_response2"}}}}}},"summary":"Get all spaces","tags":["spaces"]},"post":{"operationId":"post-spaces-space","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"_reserved":{"type":"boolean"},"color":{"description":"The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.","type":"string"},"description":{"description":"A description for the space.","type":"string"},"disabledFeatures":{"default":[],"items":{"description":"The list of features that are turned off in the space.","type":"string"},"type":"array"},"id":{"description":"The space ID that is part of the Kibana URL when inside the space. Space IDs are limited to lowercase alphanumeric, underscore, and hyphen characters (a-z, 0-9, _, and -). You are cannot change the ID with the update operation.","type":"string"},"imageUrl":{"description":"The data-URL encoded image to display in the space avatar. If specified, initials will not be displayed and the color will be visible as the background color for transparent images. For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.","type":"string"},"initials":{"description":"One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.","maxLength":2,"type":"string"},"name":{"description":"The display name for the space. ","minLength":1,"type":"string"},"solution":{"enum":["security","oblt","es","classic"],"type":"string"}},"required":["id","name"]},"examples":{"createSpaceRequest":{"$ref":"#/components/examples/create_space_request"}}}}},"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Create a space","tags":["spaces"]}},"/api/spaces/space/{id}":{"delete":{"description":"When you delete a space, all saved objects that belong to the space are automatically deleted, which is permanent and cannot be undone.","operationId":"delete-spaces-space-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The space identifier.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"404":{"description":"Indicates that the request failed."}},"summary":"Delete a space","tags":["spaces"]},"get":{"operationId":"get-spaces-space-id","parameters":[{"description":"The space identifier.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getSpaceResponseExample":{"$ref":"#/components/examples/get_space_response"}}}}}},"summary":"Get a space","tags":["spaces"]},"put":{"operationId":"put-spaces-space-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The space identifier. You are unable to change the ID with the update operation.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"_reserved":{"type":"boolean"},"color":{"description":"The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.","type":"string"},"description":{"description":"A description for the space.","type":"string"},"disabledFeatures":{"default":[],"items":{"description":"The list of features that are turned off in the space.","type":"string"},"type":"array"},"id":{"description":"The space ID that is part of the Kibana URL when inside the space. Space IDs are limited to lowercase alphanumeric, underscore, and hyphen characters (a-z, 0-9, _, and -). You are cannot change the ID with the update operation.","type":"string"},"imageUrl":{"description":"The data-URL encoded image to display in the space avatar. If specified, initials will not be displayed and the color will be visible as the background color for transparent images. For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.","type":"string"},"initials":{"description":"One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.","maxLength":2,"type":"string"},"name":{"description":"The display name for the space. ","minLength":1,"type":"string"},"solution":{"enum":["security","oblt","es","classic"],"type":"string"}},"required":["id","name"]},"examples":{"updateSpaceRequest":{"$ref":"#/components/examples/update_space_request"}}}}},"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Update a space","tags":["spaces"]}},"/api/status":{"get":{"operationId":"get-status","parameters":[{"description":"Set to \"true\" to get the response in v7 format.","in":"query","name":"v7format","required":false,"schema":{"type":"boolean"}},{"description":"Set to \"true\" to get the response in v8 format.","in":"query","name":"v8format","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Kibana_HTTP_APIs_core_status_response"},{"$ref":"#/components/schemas/Kibana_HTTP_APIs_core_status_redactedResponse"}],"description":"Kibana's operational status. A minimal response is sent for unauthorized users."}}},"description":"Overall status is OK and Kibana should be functioning normally."},"503":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Kibana_HTTP_APIs_core_status_response"},{"$ref":"#/components/schemas/Kibana_HTTP_APIs_core_status_redactedResponse"}],"description":"Kibana's operational status. A minimal response is sent for unauthorized users."}}},"description":"Kibana or some of it's essential services are unavailable. Kibana may be degraded or unavailable."}},"summary":"Get Kibana's current status","tags":["system"]}},"/api/streams":{"get":{"description":"Fetches list of all streams\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get stream list","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/_disable":{"post":{"description":"Disables wired streams and deletes all existing stream definitions. The data of wired streams is deleted, but the data of classic streams is preserved.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-disable","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Disable streams","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/_enable":{"post":{"description":"Enables wired streams\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-enable","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Enable streams","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/_resync":{"post":{"description":"Resyncs all streams, making sure that Elasticsearch assets are up to date\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-resync","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Resync streams","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}":{"delete":{"description":"Deletes a stream definition and the underlying data stream\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"delete-streams-name","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Delete a stream","tags":["streams"],"x-state":"Technical Preview"},"get":{"description":"Fetches a stream definition and associated dashboards\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get a stream","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Creates or updates a stream definition. Classic streams can not be created through this API, only updated\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]},{"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]}},"required":["ingest"]},{"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"wired":{"additionalProperties":false,"type":"object","properties":{"fields":{"additionalProperties":{"allOf":[{"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"not":{}}]},{"items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"not":{}}]},"type":"array"},{}]},"type":"object"},{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"format":{"minLength":1,"type":"string"},"type":{"enum":["keyword","match_only_text","long","double","date","boolean","ip"],"type":"string"}},"required":["type"]},{"additionalProperties":false,"type":"object","properties":{"type":{"enum":["system"],"type":"string"}},"required":["type"]}]}]},"type":"object"},"routing":{"items":{"additionalProperties":false,"type":"object","properties":{"destination":{"minLength":1,"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]}},"required":["destination","if"]},"type":"array"}},"required":["fields","routing"]}},"required":["wired"]}},"required":["ingest"]}]}]}},"required":["stream"]},{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]}},"required":["ingest"]}]}},"required":["stream"]},{"type":"object","properties":{}},{"type":"object","properties":{}}]},{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]},{"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]}},"required":["ingest"]},{"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"unwired":{"additionalProperties":false,"type":"object","properties":{}}},"required":["unwired"]}},"required":["ingest"]}]}]}},"required":["stream"]},{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]}},"required":["ingest"]}]}},"required":["stream"]},{"type":"object","properties":{}},{"type":"object","properties":{}}]}]},{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"group":{"additionalProperties":false,"type":"object","properties":{"members":{"items":{"type":"string"},"type":"array"}},"required":["members"]}},"required":["group"]}]}},"required":["stream"]},{"type":"object","properties":{}}]}]}}}},"responses":{},"summary":"Create or update a stream","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/_fork":{"post":{"description":"Forks a wired stream and creates a child stream\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-fork","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"stream":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["stream","if"]}}}},"responses":{},"summary":"Fork a stream","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/_group":{"get":{"description":"Fetches the group settings of a group stream definition\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-group","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get group stream settings","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Upserts the group settings of a group stream definition\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name-group","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"group":{"additionalProperties":false,"type":"object","properties":{"members":{"items":{"type":"string"},"type":"array"}},"required":["members"]}},"required":["group"]}}}},"responses":{},"summary":"Upsert group stream settings","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/_ingest":{"get":{"description":"Fetches the ingest settings of an ingest stream definition\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-ingest","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get ingest stream settings","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Upserts the ingest settings of an ingest stream definition\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name-ingest","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"ingest":{"anyOf":[{"allOf":[{"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]},{"type":"object","properties":{"wired":{"additionalProperties":false,"type":"object","properties":{"fields":{"additionalProperties":{"allOf":[{"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"not":{}}]},{"items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"not":{}}]},"type":"array"},{}]},"type":"object"},{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"format":{"minLength":1,"type":"string"},"type":{"enum":["keyword","match_only_text","long","double","date","boolean","ip"],"type":"string"}},"required":["type"]},{"additionalProperties":false,"type":"object","properties":{"type":{"enum":["system"],"type":"string"}},"required":["type"]}]}]},"type":"object"},"routing":{"items":{"additionalProperties":false,"type":"object","properties":{"destination":{"minLength":1,"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]}},"required":["destination","if"]},"type":"array"}},"required":["fields","routing"]}},"required":["wired"]}]},{"allOf":[{"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]},{"type":"object","properties":{"unwired":{"additionalProperties":false,"type":"object","properties":{}}},"required":["unwired"]}]}]}},"required":["ingest"]}}}},"responses":{},"summary":"Update ingest stream settings","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/content/export":{"post":{"description":"Exports the content associated to a stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-content-export","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"include":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"objects":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"}},"required":["dashboards"]}},"required":["objects"]},{"additionalProperties":false,"type":"object","properties":{"all":{"additionalProperties":false,"type":"object","properties":{}}},"required":["all"]}]},"name":{"type":"string"},"replaced_patterns":{"items":{"type":"string"},"type":"array"},"version":{"type":"string"}},"required":["name","description","version","replaced_patterns","include"]}}}},"responses":{},"summary":"Export stream content","tags":["streams"]}},"/api/streams/{name}/content/import":{"post":{"description":"Links content objects to a stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-content-import","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"additionalProperties":false,"type":"object","properties":{"content":{},"include":{"type":"string"}},"required":["include","content"]}}}},"responses":{},"summary":"Import content into a stream","tags":["streams"]}},"/api/streams/{name}/dashboards":{"get":{"description":"Fetches all dashboards linked to a stream that are visible to the current user in the current space.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-dashboards","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get stream dashboards","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/dashboards/_bulk":{"post":{"description":"Bulk update dashboards linked to a stream. Can link new dashboards and delete existing ones.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-dashboards-bulk","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"operations":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"index":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["index"]},{"additionalProperties":false,"type":"object","properties":{"delete":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["delete"]}]},"type":"array"}},"required":["operations"]}}}},"responses":{},"summary":"Bulk update dashboards","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/dashboards/{dashboardId}":{"delete":{"description":"Unlinks a dashboard from a stream. Noop if the dashboard is not linked to the stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"delete-streams-name-dashboards-dashboardid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"dashboardId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Unlink a dashboard from a stream","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Links a dashboard to a stream. Noop if the dashboard is already linked to the stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name-dashboards-dashboardid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"dashboardId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Link a dashboard to a stream","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/queries":{"get":{"description":"Fetches all queries linked to a stream that are visible to the current user in the current space.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-queries","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get stream queries","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/queries/_bulk":{"post":{"description":"Bulk update queries of a stream. Can add new queries and delete existing ones.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-queries-bulk","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"operations":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"index":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]}},"required":["index"]},{"additionalProperties":false,"type":"object","properties":{"delete":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["delete"]}]},"type":"array"}},"required":["operations"]}}}},"responses":{},"summary":"Bulk update queries","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/queries/{queryId}":{"delete":{"description":"Remove a query from a stream. Noop if the query is not found on the stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"delete-streams-name-queries-queryid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"queryId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Remove a query from a stream","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Adds a query to a stream. Noop if the query is already present on the stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name-queries-queryid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"queryId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]},"title":{"minLength":1,"type":"string"}},"required":["title","kql"]}}}},"responses":{},"summary":"Upsert a query to a stream","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/significant_events":{"get":{"description":"Read the significant events\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-significant-events","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"query","name":"from","required":true,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"bucketSize","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Read the significant events","tags":["streams"],"x-state":"Technical Preview"}},"/api/synthetics/monitors":{"get":{"description":"Get a list of monitors.\nYou must have `read` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-synthetic-monitors","parameters":[{"description":"Additional filtering criteria.","in":"query","name":"filter","schema":{"type":"string"}},{"description":"The locations to filter by.","in":"query","name":"locations","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"The monitor types to filter.","in":"query","name":"monitorTypes","schema":{"oneOf":[{"enum":["browser","http","icmp","tcp"],"type":"string"},{"type":"array"}]}},{"description":"The page number for paginated results.","in":"query","name":"page","schema":{"type":"integer"}},{"description":"The number of items to return per page.","in":"query","name":"per_page","schema":{"type":"integer"}},{"description":"The projects to filter by.","in":"query","name":"projects","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"A free-text query string.","in":"query","name":"query","schema":{"type":"string"}},{"description":"The schedules to filter by.","in":"query","name":"schedules","schema":{"oneOf":[{"type":"array"},{"type":"string"}]}},{"description":"The field to sort the results by.","in":"query","name":"sortField","schema":{"enum":["name","createdAt","updatedAt","status"],"type":"string"}},{"description":"The sort order.","in":"query","name":"sortOrder","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"The status to filter by.","in":"query","name":"status","schema":{"oneOf":[{"type":"array"},{"type":"string"}]}},{"description":"Tags to filter monitors.","in":"query","name":"tags","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"Specifies whether to apply logical AND filtering for specific fields. Accepts either a string with values \"tags\" or \"locations\" or an array containing both.\n","in":"query","name":"useLogicalAndFor","schema":{"oneOf":[{"enum":["tags","locations"],"type":"string"},{"items":{"enum":["tags","locations"],"type":"string"},"type":"array"}]}}],"responses":{"200":{"content":{"application/json":{"examples":{"getSyntheticMonitorsResponseExample1":{"description":"A successful response from `GET /api/synthetics/monitors?tags=prod\u0026monitorTypes=http\u0026locations=us-east-1\u0026projects=project1\u0026status=up`.","value":"{\n \"page\": 1,\n \"total\": 24,\n \"monitors\": [\n {\n \"type\": \"icmp\",\n \"enabled\": false,\n \"alert\": {\n \"status\": {\n \"enabled\": true\n },\n \"tls\": {\n \"enabled\": true\n }\n },\n \"schedule\": {\n \"number\": \"3\",\n \"unit\": \"m\"\n },\n \"config_id\": \"e59142e5-1fe3-4aae-b0b0-19d6345e65a1\",\n \"timeout\": \"16\",\n \"name\": \"8.8.8.8:80\",\n \"locations\": [\n {\n \"id\": \"us_central\",\n \"label\": \"North America - US Central\",\n \"geo\": {\n \"lat\": 41.25,\n \"lon\": -95.86\n },\n \"isServiceManaged\": true\n }\n ],\n \"namespace\": \"default\",\n \"origin\": \"ui\",\n \"id\": \"e59142e5-1fe3-4aae-b0b0-19d6345e65a1\",\n \"max_attempts\": 2,\n \"wait\": \"7\",\n \"revision\": 3,\n \"mode\": \"all\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"created_at\": \"2023-11-07T09:57:04.152Z\",\n \"updated_at\": \"2023-12-04T19:19:34.039Z\",\n \"host\": \"8.8.8.8:80\"\n }\n ],\n \"absoluteTotal\": 24,\n \"perPage\": 10,\n}"}},"schema":{"type":"object"}}},"description":"A successful response."}},"summary":"Get monitors","tags":["synthetics"]},"post":{"description":"Create a new monitor with the specified attributes. A monitor can be one of the following types: HTTP, TCP, ICMP, or Browser. The required and default fields may vary based on the monitor type.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"post-synthetic-monitors","requestBody":{"content":{"application/json":{"examples":{"postSyntheticMonitorsRequestExample1":{"description":"Create an HTTP monitor to check a website's availability.","summary":"HTTP monitor","value":"{\n \"type\": \"http\",\n \"name\": \"Website Availability\",\n \"url\": \"https://example.com\",\n \"tags\": [\"website\", \"availability\"],\n \"locations\": [\"united_kingdom\"]\n}"},"postSyntheticMonitorsRequestExample2":{"description":"Create a TCP monitor to monitor a server's availability.","summary":"TCP monitor","value":"{\n \"type\": \"tcp\",\n \"name\": \"Server Availability\",\n \"host\": \"example.com\",\n \"private_locations\": [\"my_private_location\"]\n}"},"postSyntheticMonitorsRequestExample3":{"description":"Create an ICMP monitor to perform ping checks.","summary":"ICMP monitor","value":"{\n \"type\": \"icmp\",\n \"name\": \"Ping Test\",\n \"host\": \"example.com\",\n \"locations\": [\"united_kingdom\"]\n}"},"postSyntheticMonitorsRequestExample4":{"description":"Create a browser monitor to check a website.","summary":"Browser monitor","value":"{\n \"type\": \"browser\",\n \"name\": \"Example journey\",\n \"inline_script\": \"step('Go to https://google.com.co', () =\u003e page.goto('https://www.google.com'))\",\n \"locations\": [\"united_kingdom\"]\n}"}},"schema":{"description":"The request body should contain the attributes of the monitor you want to create. The required and default fields differ depending on the monitor type.\n","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Synthetics_browserMonitorFields"},{"$ref":"#/components/schemas/Synthetics_httpMonitorFields"},{"$ref":"#/components/schemas/Synthetics_icmpMonitorFields"},{"$ref":"#/components/schemas/Synthetics_tcpMonitorFields"}]}}},"required":true},"responses":{"200":{"description":"A successful response."}},"summary":"Create a monitor","tags":["synthetics"]}},"/api/synthetics/monitors/_bulk_delete":{"post":{"description":"Delete multiple monitors by sending a list of config IDs.\n","operationId":"delete-synthetic-monitors","requestBody":{"content":{"application/json":{"examples":{"bulkDeleteRequestExample1":{"description":"Run `POST /api/synthetics/monitors/_bulk_delete` to delete a list of monitors.","value":"{\n \"ids\": [\n \"monitor1-id\",\n \"monitor2-id\"\n ]\n}"}},"schema":{"type":"object","properties":{"ids":{"description":"An array of monitor IDs to delete.","items":{"type":"string"},"type":"array"}},"required":["ids"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"deleteMonitorsResponseExample1":{"description":"A response from successfully deleting multiple monitors.","value":"[\n {\n \"id\": \"monitor1-id\",\n \"deleted\": true\n },\n {\n \"id\": \"monitor2-id\",\n \"deleted\": true\n }\n]"}},"schema":{"items":{"description":"The API response includes information about the deleted monitors.","type":"object","properties":{"deleted":{"description":"If it is `true`, the monitor was successfully deleted If it is `false`, the monitor was not deleted.\n","type":"boolean"},"ids":{"description":"The unique identifier of the deleted monitor.","type":"string"}}},"type":"array"}}}}},"summary":"Delete monitors","tags":["synthetics"]}},"/api/synthetics/monitors/{id}":{"delete":{"description":"Delete a monitor from the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"delete-synthetic-monitor","parameters":[{"description":"The identifier for the monitor that you want to delete.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"summary":"Delete a monitor","tags":["synthetics"]},"get":{"operationId":"get-synthetic-monitor","parameters":[{"description":"The ID of the monitor.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getSyntheticMonitorResponseExample1":{"description":"A successful response from `GET /api/synthetics/monitors/\u003cid\u003e`.","value":"{\n \"type\": \"http\",\n \"enabled\": true,\n \"alert\": {\n \"status\": {\n \"enabled\": true\n },\n \"tls\": {\n \"enabled\": true\n }\n },\n \"schedule\": {\n \"number\": \"3\",\n \"unit\": \"m\"\n },\n \"config_id\": \"a8188705-d01e-4bb6-87a1-64fa5e4b07ec\",\n \"timeout\": \"16\",\n \"name\": \"am i something\",\n \"locations\": [\n {\n \"id\": \"us_central\",\n \"label\": \"North America - US Central\",\n \"geo\": {\n \"lat\": 41.25,\n \"lon\": -95.86\n },\n \"isServiceManaged\": true\n }\n ],\n \"namespace\": \"default\",\n \"origin\": \"ui\",\n \"id\": \"a8188705-d01e-4bb6-87a1-64fa5e4b07ec\",\n \"max_attempts\": 2,\n \"__ui\": {\n \"is_tls_enabled\": false\n },\n \"max_redirects\": \"0\",\n \"response.include_body\": \"on_error\",\n \"response.include_headers\": true,\n \"check.request.method\": \"GET\",\n \"mode\": \"any\",\n \"response.include_body_max_bytes\": \"1024\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"ssl.verification_mode\": \"full\",\n \"ssl.supported_protocols\": [\n \"TLSv1.1\",\n \"TLSv1.2\",\n \"TLSv1.3\"\n ],\n \"revision\": 13,\n \"created_at\": \"2023-11-08T08:45:29.334Z\",\n \"updated_at\": \"2023-12-18T20:31:44.770Z\",\n \"url\": \"https://fast.com\"\n}"}},"schema":{"type":"object"}}}},"404":{"description":"If the monitor is not found, the API returns a 404 error."}},"summary":"Get a monitor","tags":["synthetics"]},"put":{"description":"Update a monitor with the specified attributes. The required and default fields may vary based on the monitor type.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\nYou can also partially update a monitor. This will only update the fields that are specified in the request body. All other fields are left unchanged. The specified fields should conform to the monitor type. For example, you can't update the `inline_scipt` field of a HTTP monitor.\n","operationId":"put-synthetic-monitor","parameters":[{"description":"The identifier for the monitor that you want to update.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"putSyntheticMonitorsRequestExample1":{"description":"Update an HTTP monitor that checks a website's availability.","summary":"HTTP monitor","value":"{\n \"type\": \"http\",\n \"name\": \"Website Availability\",\n \"url\": \"https://example.com\",\n \"tags\": [\"website\", \"availability\"],\n \"locations\": [\"united_kingdom\"]\n}"},"putSyntheticMonitorsRequestExample2":{"description":"Update a TCP monitor that monitors a server's availability.","summary":"TCP monitor","value":"{\n \"type\": \"tcp\",\n \"name\": \"Server Availability\",\n \"host\": \"example.com\",\n \"private_locations\": [\"my_private_location\"]\n}"},"putSyntheticMonitorsRequestExample3":{"description":"Update an ICMP monitor that performs ping checks.","summary":"ICMP monitor","value":"{\n \"type\": \"icmp\",\n \"name\": \"Ping Test\",\n \"host\": \"example.com\",\n \"locations\": [\"united_kingdom\"]\n}"},"putSyntheticMonitorsRequestExample4":{"description":"Update a browser monitor that checks a website.","summary":"Browser monitor","value":"{\n \"type\": \"browser\",\n \"name\": \"Example journey\",\n \"inline_script\": \"step('Go to https://google.com.co', () =\u003e page.goto('https://www.google.com'))\",\n \"locations\": [\"united_kingdom\"]\n}"}},"schema":{"description":"The request body should contain the attributes of the monitor you want to update. The required and default fields differ depending on the monitor type.\n","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Synthetics_browserMonitorFields"},{"$ref":"#/components/schemas/Synthetics_httpMonitorFields"},{"$ref":"#/components/schemas/Synthetics_icmpMonitorFields"},{"$ref":"#/components/schemas/Synthetics_tcpMonitorFields"}],"type":"object"}}},"required":true},"summary":"Update a monitor","tags":["synthetics"]}},"/api/synthetics/params":{"get":{"description":"Get a list of all parameters. You must have `read` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-parameters","responses":{"200":{"content":{"application/json":{"examples":{"getParametersResponseExample1":{"description":"A successful response for a user with read-only permissions to get a list of parameters.","summary":"Read access","value":"[\n {\n \"id\": \"param1-id\",\n \"key\": \"param1\",\n \"description\": \"Description for param1\",\n \"tags\": [\"tag1\", \"tag2\"],\n \"namespaces\": [\"namespace1\"]\n },\n {\n \"id\": \"param2-id\",\n \"key\": \"param2\",\n \"description\": \"Description for param2\",\n \"tags\": [\"tag3\"],\n \"namespaces\": [\"namespace2\"]\n }\n]"},"getParametersResponseExample2":{"description":"A successful response for a user with write permissions to get a list of parameters.","summary":"Write access","value":"[\n {\n \"id\": \"param1-id\",\n \"key\": \"param1\",\n \"description\": \"Description for param1\",\n \"tags\": [\"tag1\", \"tag2\"],\n \"namespaces\": [\"namespace1\"],\n \"value\": \"value1\"\n },\n {\n \"id\": \"param2-id\",\n \"key\": \"param2\",\n \"description\": \"Description for param2\",\n \"tags\": [\"tag3\"],\n \"namespaces\": [\"namespace2\"],\n \"value\": \"value2\"\n }\n]"}},"schema":{"items":[{"$ref":"#/components/schemas/Synthetics_getParameterResponse"}],"type":"array"}}},"description":"A successful response."}},"summary":"Get parameters","tags":["synthetics"]},"post":{"description":"Add one or more parameters to the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"post-parameters","requestBody":{"content":{"application/json":{"examples":{"postParametersRequestExample1":{"description":"Add a single parameter.","summary":"Single parameter","value":"{\n \"key\": \"your-key-name\",\n \"value\": \"your-parameter-value\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"share_across_spaces\": true\n}"},"postParametersRequestExample2":{"description":"Add multiple parameters.","summary":"Multiple parameters","value":"[\n {\n \"key\": \"param1\",\n \"value\": \"value1\"\n },\n {\n \"key\": \"param2\",\n \"value\": \"value2\"\n }\n]"}},"schema":{"oneOf":[{"items":{"$ref":"#/components/schemas/Synthetics_parameterRequest"},"type":"array"},{"$ref":"#/components/schemas/Synthetics_parameterRequest"}]}}},"description":"The request body can contain either a single parameter object or an array of parameter objects.","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"postParametersResponseExample1":{"description":"A successful response for a single added parameter.","summary":"Single parameter","value":"{\n \"id\": \"unique-parameter-id\",\n \"key\": \"your-key-name\",\n \"value\": \"your-param-value\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"share_across_spaces\": true\n}"},"postParametersResponseExample2":{"description":"A successful response for multiple added parameters.","summary":"Multiple parameters","value":"[\n {\n \"id\": \"param1-id\",\n \"key\": \"param1\",\n \"value\": \"value1\"\n },\n {\n \"id\": \"param2-id\",\n \"key\": \"param2\",\n \"value\": \"value2\"\n }\n]"}},"schema":{"oneOf":[{"items":{"$ref":"#/components/schemas/Synthetics_postParameterResponse"},"type":"array"},{"$ref":"#/components/schemas/Synthetics_postParameterResponse"}]}}},"description":"A successful response."}},"summary":"Add parameters","tags":["synthetics"]}},"/api/synthetics/params/_bulk_delete":{"delete":{"description":"Delete parameters from the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"delete-parameters","requestBody":{"content":{"application/json":{"examples":{"deleteParametersRequestExample1":{"description":"Run `POST /api/synthetics/params/_bulk_delete` to delete multiple parameters.","value":"{\n \"ids\": [\"param1-id\", \"param2-id\"]\n}"}},"schema":{"property":{"ids":{"description":"An array of parameter IDs to delete.","items":{"type":"string"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"deleteParametersResponseExample1":{"value":"[\n {\n \"id\": \"param1-id\",\n \"deleted\": true\n }\n]"}},"schema":{"items":{"type":"object","properties":{"deleted":{"description":"Indicates whether the parameter was successfully deleted. It is `true` if it was deleted. It is `false` if it was not deleted.\n","type":"boolean"},"id":{"description":"The unique identifier for the deleted parameter.","type":"string"}}},"type":"array"}}},"description":"A successful response."}},"summary":"Delete parameters","tags":["synthetics"]}},"/api/synthetics/params/{id}":{"delete":{"description":"Delete a parameter from the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"delete-parameter","parameters":[{"description":"The ID for the parameter to delete.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"summary":"Delete a parameter","tags":["synthetics"]},"get":{"description":"Get a parameter from the Synthetics app.\nYou must have `read` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-parameter","parameters":[{"description":"The unique identifier for the parameter.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getParameterResponseExample1":{"description":"A successful response for a user with read-only permissions to get a single parameter.","summary":"Read access","value":"{\n \"id\": \"unique-parameter-id\",\n \"key\": \"your-api-key\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"namespaces\": [\"namespace1\", \"namespace2\"]\n}"},"getParameterResponseExample2":{"description":"A successful response for a user with write permissions to get a single parameter.","summary":"Write access","value":"{\n \"id\": \"unique-parameter-id\",\n \"key\": \"your-param-key\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"namespaces\": [\"namespace1\", \"namespace2\"],\n \"value\": \"your-param-value\"\n}"}},"schema":{"$ref":"#/components/schemas/Synthetics_getParameterResponse"}}},"description":"A successful response."}},"summary":"Get a parameter","tags":["synthetics"]},"put":{"description":"Update a parameter in the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"put-parameter","parameters":[{"description":"The unique identifier for the parameter.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"putParameterRequestExample1":{"value":"{\n \"key\": \"updated_param_key\",\n \"value\": \"updated-param-value\",\n \"description\": \"Updated Param to be used in browser monitor\",\n \"tags\": [\"authentication\", \"security\", \"updated\"]\n}"}},"schema":{"type":"object","properties":{"description":{"description":"The updated description of the parameter.","type":"string"},"key":{"description":"The key of the parameter.","type":"string"},"tags":{"description":"An array of updated tags to categorize the parameter.","items":{"type":"string"},"type":"array"},"value":{"description":"The updated value associated with the parameter.","type":"string"}}}}},"description":"The request body cannot be empty; at least one attribute is required.","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"putParameterResponseExample1":{"value":"{\n \"id\": \"param_id1\",\n \"key\": \"updated_param_key\",\n \"value\": \"updated-param-value\",\n \"description\": \"Updated Param to be used in browser monitor\",\n \"tags\": [\"authentication\", \"security\", \"updated\"]\n}"}},"schema":{"type":"object"}}},"description":"A successful response."}},"summary":"Update a parameter","tags":["synthetics"]}},"/api/synthetics/private_locations":{"get":{"description":"Get a list of private locations.\nYou must have `read` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-private-locations","responses":{"200":{"content":{"application/json":{"examples":{"getPrivateLocationsResponseExample1":{"value":"[\n {\n \"label\": \"Test private location\",\n \"id\": \"fleet-server-policy\",\n \"agentPolicyId\": \"fleet-server-policy\",\n \"isInvalid\": false,\n \"geo\": {\n \"lat\": 0,\n \"lon\": 0\n },\n \"namespace\": \"default\"\n },\n {\n \"label\": \"Test private location 2\",\n \"id\": \"691225b0-6ced-11ee-8f5a-376306ee85ae\",\n \"agentPolicyId\": \"691225b0-6ced-11ee-8f5a-376306ee85ae\",\n \"isInvalid\": false,\n \"geo\": {\n \"lat\": 0,\n \"lon\": 0\n },\n \"namespace\": \"test\"\n }\n]"}},"schema":{"items":{"$ref":"#/components/schemas/Synthetics_getPrivateLocation"},"type":"array"}}},"description":"A successful response."}},"summary":"Get private locations","tags":["synthetics"]},"post":{"description":"You must have `all` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.","operationId":"post-private-location","requestBody":{"content":{"application/json":{"examples":{"postPrivateLocationRequestExample1":{"description":"Run `POST /api/private_locations` to create a private location.","value":"{\n \"label\": \"Private Location 1\",\n \"agentPolicyId\": \"abcd1234\",\n \"tags\": [\"private\", \"testing\"],\n \"geo\": {\n \"lat\": 40.7128,\n \"lon\": -74.0060\n }\n \"spaces\": [\"default\"]\n}"}},"schema":{"type":"object","properties":{"agentPolicyId":{"description":"The ID of the agent policy associated with the private location.","type":"string"},"geo":{"description":"Geographic coordinates (WGS84) for the location.","type":"object","properties":{"lat":{"description":"The latitude of the location.","type":"number"},"lon":{"description":"The longitude of the location.","type":"number"}},"required":["lat","lon"]},"label":{"description":"A label for the private location.","type":"string"},"spaces":{"description":"An array of space IDs where the private location is available. If it is not provided, the private location is available in all spaces.\n","items":{"type":"string"},"type":"array"},"tags":{"description":"An array of tags to categorize the private location.","items":{"type":"string"},"type":"array"}},"required":["agentPolicyId","label"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"postPrivateLocationResponseExample1":{"value":"{\n \"id\": \"abcd1234\",\n \"label\": \"Private Location 1\",\n \"agentPolicyId\": \"abcd1234\",\n \"tags\": [\"private\", \"testing\"],\n \"geo\": {\n \"lat\": 40.7128,\n \"lon\": -74.0060\n }\n}"}},"schema":{"type":"object"}}},"description":"A successful response."},"400":{"description":"If the `agentPolicyId` is already used by an existing private location or if the `label` already exists, the API will return a 400 Bad Request response with a corresponding error message."}},"summary":"Create a private location","tags":["synthetics"]}},"/api/synthetics/private_locations/{id}":{"delete":{"description":"You must have `all` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.\nThe API does not return a response body for deletion, but it will return an appropriate status code upon successful deletion.\nA location cannot be deleted if it has associated monitors in use. You must delete all monitors associated with the location before deleting the location.\n","operationId":"delete-private-location","parameters":[{"description":"The unique identifier of the private location to be deleted.","in":"path","name":"id","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}}],"summary":"Delete a private location","tags":["synthetics"]},"get":{"description":"You must have `read` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-private-location","parameters":[{"description":"A private location identifier or label.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getPrivateLocationResponseExample1":{"value":"{\n \"label\": \"Test private location\",\n \"id\": \"test-private-location-id\",\n \"agentPolicyId\": \"test-private-location-id\",\n \"isServiceManaged\": false,\n \"isInvalid\": false,\n \"geo\": {\n \"lat\": 0,\n \"lon\": 0\n },\n \"namespace\": \"default\"\n}"}},"schema":{"$ref":"#/components/schemas/Synthetics_getPrivateLocation"}}},"description":"A successful response."}},"summary":"Get a private location","tags":["synthetics"]}},"/api/task_manager/_health":{"get":{"description":"Get the health status of the Kibana task manager.\n","operationId":"task-manager-health","responses":{"200":{"content":{"application/json":{"examples":{"taskManagerHealthResponse1":{"$ref":"#/components/examples/Task_manager_health_APIs_health_200response"}},"schema":{"$ref":"#/components/schemas/Task_manager_health_APIs_health_response"}}},"description":"Indicates a successful call"}},"summary":"Get the task manager health","tags":["task manager"]}},"/api/timeline":{"delete":{"description":"Delete one or more Timelines or Timeline templates.","operationId":"DeleteTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"savedObjectIds":{"description":"The list of IDs of the Timelines or Timeline templates to delete","example":["15c1929b-0af7-42bd-85a8-56e234cc7c4e"],"items":{"type":"string"},"type":"array"},"searchIds":{"description":"Saved search IDs that should be deleted alongside the timelines","example":["23f3-43g34g322-e5g5hrh6h-45454","6ce1b592-84e3-4b4a-9552-f189d4b82075"],"items":{"type":"string"},"type":"array"}},"required":["savedObjectIds"]}}},"description":"The IDs of the Timelines or Timeline templates to delete.","required":true},"responses":{"200":{"description":"Indicates the Timeline was successfully deleted."}},"summary":"Delete Timelines or Timeline templates","tags":["Security Timeline API"]},"get":{"description":"Get the details of an existing saved Timeline or Timeline template.","operationId":"GetTimeline","parameters":[{"description":"The `savedObjectId` of the template timeline to retrieve","in":"query","name":"template_timeline_id","schema":{"type":"string"}},{"description":"The `savedObjectId` of the Timeline to retrieve.","in":"query","name":"id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineResponse"}}},"description":"Indicates that the (template) Timeline was found and returned."}},"summary":"Get Timeline or Timeline template details","tags":["Security Timeline API"]},"patch":{"description":"Update an existing Timeline. You can update the title, description, date range, pinned events, pinned queries, and/or pinned saved queries of an existing Timeline.","operationId":"PatchTimeline","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timeline":{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline","description":"The timeline object of the Timeline or Timeline template that you’re updating."},"timelineId":{"description":"The `savedObjectId` of the Timeline or Timeline template that you’re updating.","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","nullable":true,"type":"string"},"version":{"description":"The version of the Timeline or Timeline template that you’re updating.","example":"WzE0LDFd","nullable":true,"type":"string"}},"required":["timelineId","version","timeline"]}}},"description":"The Timeline updates, along with the Timeline ID and version.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates that the Timeline was successfully updated."},"405":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"update timeline error","type":"string"},"statusCode":{"example":405,"type":"number"}}}}},"description":"Indicates that the user does not have the required access to create a Timeline."}},"summary":"Update a Timeline","tags":["Security Timeline API"]},"post":{"description":"Create a new Timeline or Timeline template.","operationId":"CreateTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineStatus","nullable":true},"templateTimelineId":{"description":"A unique identifier for the Timeline template.","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","nullable":true,"type":"string"},"templateTimelineVersion":{"description":"Timeline template version number.","example":12,"nullable":true,"type":"number"},"timeline":{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},"timelineId":{"description":"A unique identifier for the Timeline.","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","nullable":true,"type":"string"},"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType","nullable":true},"version":{"nullable":true,"type":"string"}},"required":["timeline"]}}},"description":"The required Timeline fields used to create a new Timeline, along with optional fields that will be created if not provided.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates the Timeline was successfully created."},"405":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"update timeline error","type":"string"},"statusCode":{"example":405,"type":"number"}}}}},"description":"Indicates that there was an error in the Timeline creation."}},"summary":"Create a Timeline or Timeline template","tags":["Security Timeline API"]}},"/api/timeline/_copy":{"get":{"description":"Copies and returns a timeline or timeline template.\n","operationId":"CopyTimeline","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timeline":{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},"timelineIdToCopy":{"type":"string"}},"required":["timeline","timelineIdToCopy"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates that the timeline has been successfully copied."}},"summary":"Copies timeline or timeline template","tags":["Security Timeline API"]}},"/api/timeline/_draft":{"get":{"description":"Get the details of the draft Timeline or Timeline template for the current user. If the user doesn't have a draft Timeline, an empty Timeline is returned.","operationId":"GetDraftTimelines","parameters":[{"in":"query","name":"timelineType","required":true,"schema":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates that the draft Timeline was successfully retrieved."},"403":{"content":{"application:json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"number"}}}}},"description":"If a draft Timeline was not found and we attempted to create one, it indicates that the user does not have the required permissions to create a draft Timeline."},"409":{"content":{"application:json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"number"}}}}},"description":"This should never happen, but if a draft Timeline was not found and we attempted to create one, it indicates that there is already a draft Timeline with the given `timelineId`."}},"summary":"Get draft Timeline or Timeline template details","tags":["Security Timeline API"]},"post":{"description":"Create a clean draft Timeline or Timeline template for the current user.\n\u003e info\n\u003e If the user already has a draft Timeline, the existing draft Timeline is cleared and returned.\n","operationId":"CleanDraftTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType"}},"required":["timelineType"]}}},"description":"The type of Timeline to create. Valid values are `default` and `template`.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates that the draft Timeline was successfully created. In the event the user already has a draft Timeline, the existing draft Timeline is cleared and returned."},"403":{"content":{"application:json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"number"}}}}},"description":"Indicates that the user does not have the required permissions to create a draft Timeline."},"409":{"content":{"application:json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"number"}}}}},"description":"Indicates that there is already a draft Timeline with the given `timelineId`."}},"summary":"Create a clean draft Timeline or Timeline template","tags":["Security Timeline API"]}},"/api/timeline/_export":{"post":{"description":"Export Timelines as an NDJSON file.","operationId":"ExportTimelines","parameters":[{"description":"The name of the file to export","in":"query","name":"file_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"items":{"type":"string"},"nullable":true,"type":"array"}}}}},"description":"The IDs of the Timelines to export.","required":true},"responses":{"200":{"content":{"application/ndjson":{"schema":{"description":"NDJSON of the exported Timelines","type":"string"}}},"description":"Indicates the Timelines were successfully exported."},"400":{"content":{"application/ndjson":{"schema":{"type":"object","properties":{"body":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Indicates that the export size limit was exceeded."}},"summary":"Export Timelines","tags":["Security Timeline API"]}},"/api/timeline/_favorite":{"patch":{"description":"Favorite a Timeline or Timeline template for the current user.","operationId":"PersistFavoriteRoute","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateTimelineId":{"nullable":true,"type":"string"},"templateTimelineVersion":{"nullable":true,"type":"number"},"timelineId":{"nullable":true,"type":"string"},"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType","nullable":true}},"required":["timelineId","templateTimelineId","templateTimelineVersion","timelineType"]}}},"description":"The required fields used to favorite a (template) Timeline.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_FavoriteTimelineResponse"}}},"description":"Indicates the favorite status was successfully updated."},"403":{"content":{"application:json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Indicates the user does not have the required permissions to persist the favorite status."}},"summary":"Favorite a Timeline or Timeline template","tags":["Security Timeline API"]}},"/api/timeline/_import":{"post":{"description":"Import Timelines.","operationId":"ImportTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{},"isImmutable":{"description":"Whether the Timeline should be immutable","enum":["true","false"],"type":"string"}},"required":["file"]}}},"description":"The Timelines to import as a readable stream.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_ImportTimelineResult"}}},"description":"Indicates the import of Timelines was successful."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"Invalid file extension","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Indicates the import of Timelines was unsuccessful because of an invalid file extension."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"Unable to find saved object client","type":"string"},"statusCode":{"example":404,"type":"number"}}}}},"description":"Indicates that we were unable to locate the saved object client necessary to handle the import."},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"Could not import timelines","type":"string"},"statusCode":{"example":409,"type":"number"}}}}},"description":"Indicates the import of Timelines was unsuccessful."}},"summary":"Import Timelines","tags":["Security Timeline API"]}},"/api/timeline/_prepackaged":{"post":{"description":"Install or update prepackaged Timelines.","operationId":"InstallPrepackedTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prepackagedTimelines":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineSavedToReturnObject","nullable":true},"type":"array"},"timelinesToInstall":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_ImportTimelines","nullable":true},"type":"array"},"timelinesToUpdate":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_ImportTimelines","nullable":true},"type":"array"}},"required":["timelinesToInstall","timelinesToUpdate","prepackagedTimelines"]}}},"description":"The Timelines to install or update.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_ImportTimelineResult"}}},"description":"Indicates the installation of prepackaged Timelines was successful."},"500":{"content":{"application:json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Indicates the installation of prepackaged Timelines was unsuccessful."}},"summary":"Install prepackaged Timelines","tags":["Security Timeline API"]}},"/api/timeline/resolve":{"get":{"operationId":"ResolveTimeline","parameters":[{"description":"The ID of the template timeline to resolve","in":"query","name":"template_timeline_id","schema":{"type":"string"}},{"description":"The ID of the timeline to resolve","in":"query","name":"id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_ResolvedTimeline"}}},"description":"The (template) Timeline has been found"},"400":{"description":"The request is missing parameters"},"404":{"description":"The (template) Timeline was not found"}},"summary":"Get an existing saved Timeline or Timeline template","tags":["Security Timeline API"]}},"/api/timelines":{"get":{"description":"Get a list of all saved Timelines or Timeline templates.","operationId":"GetTimelines","parameters":[{"description":"If true, only timelines that are marked as favorites by the user are returned.","in":"query","name":"only_user_favorite","schema":{"enum":["true","false"],"nullable":true,"type":"string"}},{"in":"query","name":"timeline_type","schema":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType","nullable":true}},{"in":"query","name":"sort_field","schema":{"$ref":"#/components/schemas/Security_Timeline_API_SortFieldTimeline"}},{"description":"Whether to sort the results `ascending` or `descending`","in":"query","name":"sort_order","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"How many results should returned at once","in":"query","name":"page_size","schema":{"nullable":true,"type":"string"}},{"description":"How many pages should be skipped","in":"query","name":"page_index","schema":{"nullable":true,"type":"string"}},{"description":"Allows to search for timelines by their title","in":"query","name":"search","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"status","schema":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineStatus","nullable":true}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"customTemplateTimelineCount":{"description":"The amount of custom Timeline templates in the results","example":2,"type":"number"},"defaultTimelineCount":{"description":"The amount of `default` type Timelines in the results","example":90,"type":"number"},"elasticTemplateTimelineCount":{"description":"The amount of Elastic's Timeline templates in the results","example":8,"type":"number"},"favoriteCount":{"description":"The amount of favorited Timelines","example":5,"type":"number"},"templateTimelineCount":{"description":"The amount of Timeline templates in the results","example":10,"type":"number"},"timeline":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineResponse"},"type":"array"},"totalCount":{"description":"The total amount of results","example":100,"type":"number"}},"required":["timeline","totalCount"]}}},"description":"Indicates that the (template) Timelines were found and returned."},"400":{"content":{"application:json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"get timeline error","type":"string"},"statusCode":{"example":405,"type":"number"}}}}},"description":"Bad request. The user supplied invalid data."}},"summary":"Get Timelines or Timeline templates","tags":["Security Timeline API"]}},"/api/upgrade_assistant/status":{"get":{"description":"Check the status of your cluster.","operationId":"get-upgrade-status","responses":{"200":{"content":{"application/json":{"examples":{"getUpgradeStatusResponseExample1":{"value":"{\n \"readyForUpgrade\": false,\n \"cluster\": [\n {\n \"message\": \"Cluster deprecated issue\",\n \"details\":\"You have 2 system indices that must be migrated and 5 Elasticsearch deprecation issues and 0 Kibana deprecation issues that must be resolved before upgrading.\"\n }\n ]\n}"}}}},"description":"Indicates a successful call."}},"summary":"Get the upgrade readiness status","tags":["upgrade"],"x-state":"Technical Preview"}},"/api/uptime/settings":{"get":{"description":"You must have `read` privileges for the uptime feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-uptime-settings","responses":{"200":{"content":{"application/json":{"examples":{"getUptimeSettingsResponseExample1":{"value":"{\n \"heartbeatIndices\": \"heartbeat-8*\",\n \"certExpirationThreshold\": 30,\n \"certAgeThreshold\": 730,\n \"defaultConnectors\": [\n \"08990f40-09c5-11ee-97ae-912b222b13d4\",\n \"db25f830-2318-11ee-9391-6b0c030836d6\"\n ],\n \"defaultEmail\": {\n \"to\": [],\n \"cc\": [],\n \"bcc\": []\n }\n}"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Get uptime settings","tags":["uptime"]},"put":{"description":"Update uptime setting attributes like `heartbeatIndices`, `certExpirationThreshold`, `certAgeThreshold`, `defaultConnectors`, or `defaultEmail`. You must have `all` privileges for the uptime feature in the Observability section of the Kibana feature privileges. A partial update is supported, provided settings keys will be merged with existing settings.\n","operationId":"put-uptime-settings","requestBody":{"content":{"application/json":{"examples":{"putUptimeSettingsRequestExample1":{"description":"Run `PUT api/uptime/settings` to update multiple Uptime settings.","summary":"Update multiple settings","value":"{\n \"heartbeatIndices\": \"heartbeat-8*\",\n \"certExpirationThreshold\": 30,\n \"certAgeThreshold\": 730,\n \"defaultConnectors\": [\n \"08990f40-09c5-11ee-97ae-912b222b13d4\",\n \"db25f830-2318-11ee-9391-6b0c030836d6\"\n ],\n \"defaultEmail\": {\n \"to\": [],\n \"cc\": [],\n \"bcc\": []\n }\n}"},"putUptimeSettingsRequestExample2":{"description":"Run `PUT api/uptime/settings` to update a single Uptime setting.","summary":"Update a setting","value":"{\n \"heartbeatIndices\": \"heartbeat-8*\",\n}"}},"schema":{"type":"object","properties":{"certAgeThreshold":{"default":730,"description":"The number of days after a certificate is created to trigger an alert.","type":"number"},"certExpirationThreshold":{"default":30,"description":"The number of days before a certificate expires to trigger an alert.","type":"number"},"defaultConnectors":{"default":[],"description":"A list of connector IDs to be used as default connectors for new alerts.","type":"array"},"defaultEmail":{"description":"The default email configuration for new alerts.\n","type":"object","properties":{"bcc":{"default":[],"items":[{"type":"string"}],"type":"array"},"cc":{"default":[],"items":[{"type":"string"}],"type":"array"},"to":{"default":[],"items":[{"type":"string"}],"type":"array"}}},"heartbeatIndices":{"default":"heartbeat-*","description":"An index pattern string to be used within the Uptime app and alerts to query Heartbeat data. \n","type":"string"}}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"putUptimeSettingsResponseExample1":{"description":"A successful response from `PUT api/uptime/settings`.","value":"{\n \"heartbeatIndices\": \"heartbeat-8*\",\n \"certExpirationThreshold\": 30,\n \"certAgeThreshold\": 730,\n \"defaultConnectors\": [\n \"08990f40-09c5-11ee-97ae-912b222b13d4\",\n \"db25f830-2318-11ee-9391-6b0c030836d6\"\n ],\n \"defaultEmail\": {\n \"to\": [],\n \"cc\": [],\n \"bcc\": []\n }\n}"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Update uptime settings","tags":["uptime"]}},"/s/{spaceId}/api/observability/slos":{"get":{"description":"You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"findSlosOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"description":"A valid kql query to filter the SLO with","example":"slo.name:latency* and slo.tags : \"prod\"","in":"query","name":"kqlQuery","schema":{"type":"string"}},{"description":"The page size to use for cursor-based pagination, must be greater or equal than 1","example":1,"in":"query","name":"size","schema":{"default":1,"type":"integer"}},{"description":"The cursor to use for fetching the results from, when using a cursor-base pagination.","in":"query","name":"searchAfter","schema":{"items":{"type":"string"},"type":"array"}},{"description":"The page to use for pagination, must be greater or equal than 1","example":1,"in":"query","name":"page","schema":{"default":1,"type":"integer"}},{"description":"Number of SLOs returned by page","example":25,"in":"query","name":"perPage","schema":{"default":25,"maximum":5000,"type":"integer"}},{"description":"Sort by field","example":"status","in":"query","name":"sortBy","schema":{"default":"status","enum":["sli_value","status","error_budget_consumed","error_budget_remaining"],"type":"string"}},{"description":"Sort order","example":"asc","in":"query","name":"sortDirection","schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},{"description":"Hide stale SLOs from the list as defined by stale SLO threshold in SLO settings","in":"query","name":"hideStale","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_find_slo_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Get a paginated list of SLOs","tags":["slo"]},"post":{"description":"You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"createSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_create_slo_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_create_slo_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_409_response"}}},"description":"Conflict - The SLO id already exists"}},"summary":"Create an SLO","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/_bulk_delete":{"post":{"description":"Bulk delete SLO definitions and their associated summary and rollup data. This endpoint initiates a bulk deletion operation for SLOs, which may take some time to complete. The status of the operation can be checked using the `GET /api/slo/_bulk_delete/{taskId}` endpoint.\n","operationId":"bulkDeleteOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_delete_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_delete_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Bulk delete SLO definitions and their associated summary and rollup data.","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/_bulk_delete/{taskId}":{"get":{"description":"Retrieve the status of the bulk deletion operation for SLOs. This endpoint returns the status of the bulk deletion operation, including whether it is completed and the results of the operation.\n","operationId":"bulkDeleteStatusOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"description":"The task id of the bulk delete operation","in":"path","name":"taskId","required":true,"schema":{"example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_delete_status_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Retrieve the status of the bulk deletion","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/_bulk_purge_rollup":{"post":{"description":"The deletion occurs for the specified list of `sloId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"deleteRollupDataOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_purge_rollup_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_purge_rollup_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Batch delete rollup and summary data","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/_delete_instances":{"post":{"description":"The deletion occurs for the specified list of `sloId` and `instanceId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"deleteSloInstancesOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_delete_slo_instances_request"}}},"required":true},"responses":{"204":{"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Batch delete rollup and summary data","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/{sloId}":{"delete":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"deleteSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"responses":{"204":{"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Delete an SLO","tags":["slo"]},"get":{"description":"You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"getSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"},{"description":"the specific instanceId used by the summary calculation","example":"host-abcde","in":"query","name":"instanceId","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_slo_with_summary_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Get an SLO","tags":["slo"]},"put":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"updateSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_update_slo_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_slo_definition_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Update an SLO","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/{sloId}/_reset":{"post":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"resetSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_slo_definition_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Reset an SLO","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/{sloId}/disable":{"post":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"disableSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"responses":{"204":{"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Disable an SLO","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/{sloId}/enable":{"post":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"enableSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"responses":{"204":{"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Enable an SLO","tags":["slo"]}},"/s/{spaceId}/internal/observability/slos/_definitions":{"get":{"description":"You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"getDefinitionsOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"description":"Indicates if the API returns only outdated SLO or all SLO definitions","example":true,"in":"query","name":"includeOutdatedOnly","schema":{"type":"boolean"}},{"description":"Filters the SLOs by tag","in":"query","name":"tags","schema":{"type":"string"}},{"description":"Filters the SLOs by name","example":"my service availability","in":"query","name":"search","schema":{"type":"string"}},{"description":"The page to use for pagination, must be greater or equal than 1","example":1,"in":"query","name":"page","schema":{"type":"number"}},{"description":"Number of SLOs returned by page","example":100,"in":"query","name":"perPage","schema":{"default":100,"maximum":1000,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_find_slo_definitions_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Get the SLO definitions","tags":["slo"]}}},"components":{"examples":{"Alerting_get_health_response":{"summary":"Retrieve information about the health of the alerting framework.","value":{"alerting_framework_health":{"decryption_health":{"status":"ok","timestamp":"2023-01-13T01:28:00.280Z"},"execution_health":{"status":"ok","timestamp":"2023-01-13T01:28:00.280Z"},"read_health":{"status":"ok","timestamp":"2023-01-13T01:28:00.280Z"}},"has_permanent_encryption_key":true,"is_sufficiently_secure":true}},"Alerting_get_rule_types_response":{"summary":"Retrieve rule types associated with Kibana machine learning features","value":[{"action_groups":[{"id":"anomaly_score_match","name":"Anomaly score matched the condition"},{"id":"recovered","name":"Recovered"}],"action_variables":{"context":[{"description":"The bucket timestamp of the anomaly","name":"timestamp"},{"description":"The bucket time of the anomaly in ISO8601 format","name":"timestampIso8601"},{"description":"List of job IDs that triggered the alert","name":"jobIds"},{"description":"Alert info message","name":"message"},{"description":"Indicate if top hits contain interim results","name":"isInterim"},{"description":"Anomaly score at the time of the notification action","name":"score"},{"description":"Top records","name":"topRecords"},{"description":"Top influencers","name":"topInfluencers"},{"description":"URL to open in the Anomaly Explorer","name":"anomalyExplorerUrl","useWithTripleBracesInTemplates":true}],"params":[],"state":[]},"alerts":{"context":"ml.anomaly-detection","mappings":{"fieldMap":{"kibana.alert.anomaly_score":{"array":false,"type":"double","required":false},"kibana.alert.anomaly_timestamp":{"array":false,"type":"date","required":false},"kibana.alert.is_interim":{"array":false,"type":"boolean","required":false},"kibana.alert.job_id":{"array":false,"type":"keyword","required":true},"kibana.alert.top_influencers":{"array":true,"dynamic":false,"type":"object","properties":{"influencer_field_name":{"type":"keyword"},"influencer_field_value":{"type":"keyword"},"influencer_score":{"type":"double"},"initial_influencer_score":{"type":"double"},"is_interim":{"type":"boolean"},"job_id":{"type":"keyword"},"timestamp":{"type":"date"}},"required":false},"kibana.alert.top_records":{"array":true,"dynamic":false,"type":"object","properties":{"actual":{"type":"double"},"by_field_name":{"type":"keyword"},"by_field_value":{"type":"keyword"},"detector_index":{"type":"integer"},"field_name":{"type":"keyword"},"function":{"type":"keyword"},"initial_record_score":{"type":"double"},"is_interim":{"type":"boolean"},"job_id":{"type":"keyword"},"over_field_name":{"type":"keyword"},"over_field_value":{"type":"keyword"},"partition_field_name":{"type":"keyword"},"partition_field_value":{"type":"keyword"},"record_score":{"type":"double"},"timestamp":{"type":"date"},"typical":{"type":"double"}},"required":false}}},"shouldWrite":true},"authorized_consumers":{"alerts":{"all":true,"read":true},"apm":{"all":true,"read":true},"discover":{"all":true,"read":true},"infrastructure":{"all":true,"read":true},"logs":{"all":true,"read":true},"ml":{"all":true,"read":true},"monitoring":{"all":true,"read":true},"siem":{"all":true,"read":true},"slo":{"all":true,"read":true},"stackAlerts":{"all":true,"read":true},"uptime":{"all":true,"read":true}},"category":"management","default_action_group_id":"anomaly_score_match","does_set_recovery_context":true,"enabled_in_license":true,"has_alerts_mappings":true,"has_fields_for_a_a_d":true,"id":"xpack.ml.anomaly_detection_alert","is_exportable":true,"minimum_license_required":"platinum","name":"Anomaly detection alert","producer":"ml","recovery_action_group":{"id":"recovered","name":"Recovered"},"rule_task_timeout":"5m"},{"action_groups":[{"id":"anomaly_detection_realtime_issue","name":"Issue detected"},{"id":"recovered","name":"Recovered"}],"action_variables":{"context":[{"description":"Results of the rule execution","name":"results"},{"description":"Alert info message","name":"message"}],"params":[],"state":[]},"authorized_consumers":{"alerts":{"all":true,"read":true},"apm":{"all":true,"read":true},"discover":{"all":true,"read":true},"infrastructure":{"all":true,"read":true},"logs":{"all":true,"read":true},"ml":{"all":true,"read":true},"monitoring":{"all":true,"read":true},"siem":{"all":true,"read":true},"slo":{"all":true,"read":true},"stackAlerts":{"all":true,"read":true},"uptime":{"all":true,"read":true}},"category":"management","default_action_group_id":"anomaly_detection_realtime_issue","does_set_recovery_context":true,"enabled_in_license":true,"has_alerts_mappings":false,"has_fields_for_a_a_d":false,"id":"xpack.ml.anomaly_detection_jobs_health","is_exportable":true,"minimum_license_required":"platinum","name":"Anomaly detection jobs health","producer":"ml","recovery_action_group":{"id":"recovered","name":"Recovered"},"rule_task_timeout":"5m"}]},"APM_UI_agent_configuration_intake_object_delete_request1":{"description":"Run `DELETE /api/apm/settings/agent-configuration` to delete a configuration.","value":"{\n \"service\" : {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n }\n}\n"},"APM_UI_agent_configuration_intake_object_get_200_response1":{"description":"An example of a successful response from `GET /api/apm/settings/agent-configuration`.","value":"[\n {\n \"agent_name\": \"go\",\n \"service\": {\n \"name\": \"opbeans-go\",\n \"environment\": \"production\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"1\",\n \"capture_body\": \"off\",\n \"transaction_max_spans\": \"200\"\n },\n \"@timestamp\": 1581934104843,\n \"applied_by_agent\": false,\n \"etag\": \"1e58c178efeebae15c25c539da740d21dee422fc\"\n },\n {\n \"agent_name\": \"go\",\n \"service\": {\n \"name\": \"opbeans-go\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"1\",\n \"capture_body\": \"off\",\n \"transaction_max_spans\": \"300\"\n },\n \"@timestamp\": 1581934111727,\n \"applied_by_agent\": false,\n \"etag\": \"3eed916d3db434d9fb7f039daa681c7a04539a64\"\n },\n {\n \"agent_name\": \"nodejs\",\n \"service\": {\n \"name\": \"frontend\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"1\",\n },\n \"@timestamp\": 1582031336265,\n \"applied_by_agent\": false,\n \"etag\": \"5080ed25785b7b19f32713681e79f46996801a5b\"\n }\n]\n"},"APM_UI_agent_configuration_intake_object_put_request1":{"description":"Run `PUT /api/apm/settings/agent-configuration` to create or update configuration details.","value":"{\n \"service\": {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"0.4\",\n \"capture_body\": \"off\",\n \"transaction_max_spans\": \"500\"\n },\n \"agent_name\": \"nodejs\"\n}\n"},"APM_UI_agent_configuration_intake_object_search_200_response1":{"description":"An example of a successful response from `POST /api/apm/settings/agent-configuration/search`.","value":"{\n \"_index\": \".apm-agent-configuration\",\n \"_id\": \"CIaqXXABmQCdPphWj8EJ\",\n \"_score\": 2,\n \"_source\": {\n \"agent_name\": \"nodejs\",\n \"service\": {\n \"name\": \"frontend\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"1\",\n },\n \"@timestamp\": 1582031336265,\n \"applied_by_agent\": false,\n \"etag\": \"5080ed25785b7b19f32713681e79f46996801a5b\"\n }\n}\n"},"APM_UI_agent_configuration_intake_object_search_request1":{"description":"Run `POST /api/apm/settings/agent-configuration/search` to search configuration details.","value":"{\n \"etag\": \"1e58c178efeebae15c25c539da740d21dee422fc\",\n \"service\" : {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n }\n}\n"},"APM_UI_agent_keys_object_post_200_response1":{"description":"An example of a successful response from `POST /api/apm/agent_keys`, which creates an APM agent API key.","value":"{\n \"agentKey\": {\n \"id\": \"3DCLmn0B3ZMhLUa7WBG9\",\n \"name\": \"apm-key\",\n \"api_key\": \"PjGloCGOTzaZr8ilUPvkjA\",\n \"encoded\": \"M0RDTG1uMEIzWk1oTFVhN1dCRzk6UGpHbG9DR09UemFacjhpbFVQdmtqQQ==\"\n }\n}\n"},"APM_UI_agent_keys_object_post_request1":{"description":"Run `POST /api/apm/agent_keys` to create an APM agent API key with the specified privileges.","value":"{\n \"name\": \"apm-key\",\n \"privileges\": [\"event:write\", \"config_agent:read\"]\n}\n"},"APM_UI_annotation_object_post_200_response1":{"description":"An example of a successful response from `POST /api/apm/services/opbeans-java/annotation`, which creates an annotation for a service named `opbeans-java`.","value":"{\n \"_index\": \"observability-annotations\",\n \"_id\": \"Lc9I93EBh6DbmkeV7nFX\",\n \"_version\": 1,\n \"_seq_no\": 12,\n \"_primary_term\": 1,\n \"found\": true,\n \"_source\": {\n \"message\": \"Deployment 1.2\",\n \"@timestamp\": \"2020-05-08T10:31:30.452Z\",\n \"service\": {\n \"version\": \"1.2\",\n \"name\": \"opbeans-java\"\n },\n \"tags\": [\n \"apm\",\n \"elastic.co\",\n \"customer\"\n ],\n \"annotation\": {\n \"type\": \"deployment\"\n },\n \"event\": {\n \"created\": \"2020-05-09T02:34:43.937Z\"\n }\n }\n}\n"},"APM_UI_source_maps_get_200_response1":{"description":"A successful response from `GET /api/apm/sourcemaps`.","value":"{\n \"artifacts\": [\n {\n \"type\": \"sourcemap\",\n \"identifier\": \"foo-1.0.0\",\n \"relative_url\": \"/api/fleet/artifacts/foo-1.0.0/644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456\",\n \"body\": {\n \"serviceName\": \"foo\",\n \"serviceVersion\": \"1.0.0\",\n \"bundleFilepath\": \"/test/e2e/general-usecase/bundle.js\",\n \"sourceMap\": {\n \"version\": 3,\n \"file\": \"static/js/main.chunk.js\",\n \"sources\": [\n \"fleet-source-map-client/src/index.css\",\n \"fleet-source-map-client/src/App.js\",\n \"webpack:///./src/index.css?bb0a\",\n \"fleet-source-map-client/src/index.js\",\n \"fleet-source-map-client/src/reportWebVitals.js\"\n ],\n \"sourcesContent\": [\n \"content\"\n ],\n \"mappings\": \"mapping\",\n \"sourceRoot\": \"\"\n }\n },\n \"created\": \"2021-07-09T20:47:44.812Z\",\n \"id\": \"apm:foo-1.0.0-644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456\",\n \"compressionAlgorithm\": \"zlib\",\n \"decodedSha256\": \"644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456\",\n \"decodedSize\": 441,\n \"encodedSha256\": \"024c72749c3e3dd411b103f7040ae62633558608f480bce4b108cf5b2275bd24\",\n \"encodedSize\": 237,\n \"encryptionAlgorithm\": \"none\",\n \"packageName\": \"apm\"\n }\n ]\n}\n"},"APM_UI_source_maps_upload_200_response1":{"description":"A successful response from `POST /api/apm/sourcemaps`.","value":{"body":"eJyFkL1OwzAUhd/Fc+MbYMuCEBIbHRjKgBgc96R16tiWr1OQqr47NwqJxEK3q/PzWccXxchnZ7E1A1SjuhjVZtF2yOxiEPlO17oWox3D3uPFeSRTjmJQARfCPeiAgGx8NTKsYdAc1T3rwaSJGcds8Sp3c1HnhfywUZ3QhMTFFGepZxqMC9oex3CS9tpk1XyozgOlmoVKuJX1DqEQZ0su7PGtLU+V/3JPKc3cL7TJ2FNDRPov4bFta3MDM4f7W69lpJjLO9qdK8bzVPhcJz3HUCQ4LbO/p5hCSC4cZPByrp/wFqOklbpefwAhzpqI","compressionAlgorithm":"zlib","created":"2021-07-09T20:47:44.812Z","decodedSha256":"644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456","decodedSize":441,"encodedSha256":"024c72749c3e3dd411b103f7040ae62633558608f480bce4b108cf5b2275bd24","encodedSize":237,"encryptionAlgorithm":"none","id":"apm:foo-1.0.0-644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456","identifier":"foo-1.0.0","packageName":"apm","relative_url":"/api/fleet/artifacts/foo-1.0.0/644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456","type":"sourcemap"}},"Cases_add_comment_request":{"summary":"Adds a comment to a case.","value":{"comment":"A new comment.","owner":"cases","type":"user"}},"Cases_add_comment_response":{"summary":"The add comment to case API returns a JSON object that contains details about the case and its comments.","value":{"assignees":[],"category":null,"closed_at":null,"closed_by":null,"comments":[{"comment":"A new comment.","created_at":"2022-10-02T00:49:47.716Z","created_by":{"email":null,"full_name":null,"username":"elastic"},"id":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","owner":"cases","type":"user","version":"WzIwNDMxLDFd"}],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2022-03-24T00:37:03.906Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"Field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":true}],"description":"A case description.","duration":null,"external_service":null,"id":"293f1bc0-74f6-11ea-b83a-553aecdb28b6","owner":"cases","settings":{"syncAlerts":false},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":1,"updated_at":"2022-06-03T00:49:47.716Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzIzMzgsMV0="}},"Cases_create_case_request":{"summary":"Create a security case that uses a Jira connector.","value":{"connector":{"fields":{"issueType":"10006","parent":null,"priority":"High"},"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"}],"description":"A case description.","owner":"cases","settings":{"syncAlerts":true},"tags":["tag-1"],"title":"Case title 1"}},"Cases_create_case_response":{"summary":"The create case API returns a JSON object that contains details about the case.","value":{"assignees":[],"closed_at":null,"closed_by":null,"comments":[],"connector":{"fields":{"issueType":"10006","parent":null,"priority":"High"},"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira"},"created_at":"2022-10-13T15:33:50.604Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":null}],"description":"A case description.","duration":null,"external_service":null,"id":"66b9aa00-94fa-11ea-9f74-e7e108796192","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":0,"updated_at":null,"updated_by":null,"version":"WzUzMiwxXQ=="}},"Cases_find_case_activity_response":{"summary":"Retrieves all activity for a case","value":{"page":1,"perPage":20,"total":3,"userActions":[{"action":"create","comment_id":null,"created_at":"2023-10-20T01:17:22.150Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"b4cd0770-07c9-11ed-a5fd-47154cb8767e","owner":"cases","payload":{"assignees":[],"category":null,"connector":{"fields":null,"id":"none","name":"none","type":".none"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":null}],"description":"A case description.","owner":"cases","settings":{"syncAlerts":false},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1"},"type":"create_case","version":"WzM1ODg4LDFd"},{"action":"create","comment_id":"578608d0-03b1-11ed-920c-974bfa104448","created_at":"2023-10-14T20:12:53.354Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"57af14a0-03b1-11ed-920c-974bfa104448","owner":"cases","payload":{"comment":"A new comment","owner":"cases","type":"user"},"type":"comment","version":"WzM1ODg4LDFa"},{"action":"add","comment_id":null,"created_at":"2023-10-20T01:10:28.238Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"573c6980-6123-11ed-aa41-81a0a61fe447","owner":"cases","payload":{"assignees":{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}},"type":"assignees","version":"WzM1ODg4LDFb"}]}},"Cases_find_case_response":{"summary":"Retrieve the first five cases with the `tag-1` tag, in ascending order by last update time.","value":{"cases":[{"assignees":[],"category":null,"closed_at":null,"closed_by":null,"comments":[],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2023-10-12T00:16:36.371Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":null}],"description":"Case description","duration":null,"external_service":null,"id":"abed3a70-71bd-11ea-a0b2-c51ea50a58e2","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag-1"],"title":"Case title","totalAlerts":0,"totalComment":1,"updated_at":"2023-10-12T00:27:58.162Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzExMCwxXQ=="}],"count_closed_cases":0,"count_in_progress_cases":0,"count_open_cases":1,"page":1,"per_page":5,"total":1}},"Cases_find_connector_response":{"summary":"Retrieve information about the connectors and their settings.","value":[{"actionTypeId":".jira","config":{"apiUrl":"https://elastic.atlassian.net/","projectKey":"ES"},"id":"61787f53-4eee-4741-8df6-8fe84fa616f7","isDeprecated":false,"isMissingSecrets":false,"isPreconfigured":false,"name":"my-Jira","referencedByCount":0}]},"Cases_get_case_alerts_response":{"summary":"Retrieves all alerts attached to a case","value":[{"attached_at":"2022-07-25T20:09:40.963Z","id":"f6a7d0c3-d52d-432c-b2e6-447cd7fce04d","index":".alerts-observability.logs.alerts-default"}]},"Cases_get_case_configuration_response":{"summary":"Get the case configuration.","value":[{"closure_type":"close-by-user","connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2024-07-01T17:07:17.767Z","created_by":{"email":null,"full_name":null,"username":"elastic"},"customFields":[{"defaultValue":"Custom text field value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":false}],"error":null,"id":"856ee650-6c82-11ee-a20a-6164169afa58","mappings":[],"owner":"cases","templates":[{"caseFields":{"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],"category":"Default-category","connector":{"fields":null,"id":"none","name":"none","type":".none"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"Default text field value."}],"description":"A default description for cases.","settings":{"syncAlerts":false},"tags":["Default case tag"],"title":"Default case title"},"description":"A description of the template.","key":"505932fe-ee3a-4960-a661-c781b5acdb05","name":"template-1","tags":["Template tag 1"]}],"updated_at":null,"updated_by":null,"version":"WzEyLDNd"}]},"Cases_get_case_observability_response":{"summary":"Retrieves information about an Observability case including its alerts and comments.","value":{"assignees":[{"uid":"u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"}],"category":null,"closed_at":null,"closed_by":null,"comments":[{"alertId":["a6e12ac4-7bce-457b-84f6-d7ce8deb8446"],"created_at":"2023-11-06T19:29:38.424Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"59d438d0-79a9-4864-8d4b-e63adacebf6e","index":[".internal.alerts-observability.logs.alerts-default-000001"],"owner":"observability","pushed_at":null,"pushed_by":null,"rule":{"id":"03e4eb87-62ca-4e5d-9570-3d7625e9669d","name":"Observability rule"},"type":"alert","updated_at":null,"updated_by":null,"version":"WzY3LDJd"},{"comment":"The first comment.","created_at":"2023-11-06T19:29:57.812Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"d99342d3-3aa3-4b80-90ec-a702607604f5","owner":"observability","pushed_at":null,"pushed_by":null,"type":"user","updated_at":null,"updated_by":null,"version":"WzcyLDJd"}],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2023-11-06T19:29:04.086Z","created_by":{"email":null,"full_name":null,"username":"elastic"},"customFields":[],"description":"An Observability case description.","duration":null,"external_service":null,"id":"c3ff7550-def1-4e90-b6bc-c9969a4a09b1","owner":"observability","settings":{"syncAlerts":false},"severity":"low","status":"in-progress","tags":["observability","tag 1"],"title":"Observability case title 1","totalAlerts":1,"totalComment":1,"updated_at":"2023-11-06T19:47:55.662Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzI0NywyXQ=="}},"Cases_get_case_response":{"summary":"Retrieves information about a case including its comments.","value":{"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],"category":null,"closed_at":null,"closed_by":null,"comments":[{"comment":"A new comment","created_at":"2023-10-13T15:40:32.335Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"2134c1d0-02c2-11ed-85f2-4f7c222ca2fa","owner":"cases","pushed_at":null,"pushed_by":null,"type":"user","updated_at":null,"updated_by":null,"version":"WzM3LDFd"}],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2023-10-13T15:33:50.604Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":null}],"description":"A case description","duration":null,"external_service":null,"id":"31cdada0-02c1-11ed-85f2-4f7c222ca2fa","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":1,"updated_at":"2023-10-13T15:40:32.335Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzM2LDFd"}},"Cases_get_comment_response":{"summary":"A single user comment retrieved from a case","value":{"comment":"A new comment","created_at":"2023-10-07T19:32:13.104Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"8048b460-fe2b-11ec-b15d-779a7c8bbcc3","owner":"cases","pushed_at":null,"pushed_by":null,"type":"user","updated_at":null,"updated_by":null,"version":"WzIzLDFd"}},"Cases_get_reporters_response":{"summary":"A list of two users that opened cases","value":[{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},{"email":"jdoe@example.com","full_name":"Jane Doe","profile_uid":"u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0","username":"jdoe"}]},"Cases_get_tags_response":{"summary":"A list of tags that are used in cases","value":["observability","security","tag 1","tag 2"]},"Cases_push_case_response":{"summary":"The push case API returns a JSON object with details about the case and the external service.","value":{"closed_at":null,"closed_by":null,"comments":[],"connector":{"fields":{"issueType":"10006","parent":null,"priority":"Low"},"id":"09f8c0b0-0eda-11ed-bd18-65557fe66949","name":"My connector","type":".jira"},"created_at":"2022-07-29T00:59:39.444Z","created_by":{"email":null,"full_name":null,"username":"elastic"},"description":"A case description.","duration":null,"external_service":{"connector_id":"09f8c0b0-0eda-11ed-bd18-65557fe66949","connector_name":"My connector","external_id":"71926","external_title":"ES-554","external_url":"https://cases.jira.com","pushed_at":"2022-07-29T01:20:58.436Z","pushed_by":{"email":null,"full_name":null,"username":"elastic"}},"id":"b917f300-0ed9-11ed-bd18-65557fe66949","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":0,"updated_at":"2022-07-29T01:20:58.436Z","updated_by":{"email":null,"full_name":null,"username":"elastic"},"version":"WzE3NjgsM10="}},"Cases_set_case_configuration_request":{"summary":"Set the closure type, custom fields, and default connector for Stack Management cases.","value":{"closure_type":"close-by-user","connector":{"fields":null,"id":"5e656730-e1ca-11ec-be9b-9b1838238ee6","name":"my-jira-connector","type":".jira"},"customFields":[{"defaultValue":"My custom field default value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":false}],"owner":"cases","templates":[{"caseFields":{"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],"category":"Default-category","customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"A text field value for the template."}],"description":"A default description for cases.","tags":["Default case tag"],"title":"Default case title"},"description":"A description of the template.","key":"505932fe-ee3a-4960-a661-c781b5acdb05","name":"template-1","tags":["Template tag 1"]}]}},"Cases_set_case_configuration_response":{"summary":"This is an example response for case settings.","value":{"closure_type":"close-by-user","connector":{"fields":null,"id":"5e656730-e1ca-11ec-be9b-9b1838238ee6","name":"my-jira-connector","type":".jira"},"created_at":"2024-07-01T17:07:17.767Z","created_by":{"email":"null,","full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"defaultValue":"My custom field default value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":false}],"error":null,"id":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","mappings":[{"action_type":"overwrite","source":"title","target":"summary"},{"action_type":"overwrite","source":"description","target":"description"},{"action_type":"append","source":"comments","target":"comments"},{"action_type":"overwrite","source":"tags","target":"labels"}],"owner":"cases","templates":[{"caseFields":{"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],"category":"Default-category","customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"A text field value for the template."}],"description":"A default description for cases.","tags":["Default case tag"],"title":"Default case title"},"description":"A description of the template.","key":"505932fe-ee3a-4960-a661-c781b5acdb05","name":"template-1","tags":["Template tag 1"]}],"updated_at":null,"updated_by":null,"version":"WzIwNzMsMV0="}},"Cases_update_case_configuration_request":{"summary":"Update the case settings.","value":{"closure_type":"close-by-user","connector":{"fields":null,"id":"5e656730-e1ca-11ec-be9b-9b1838238ee6","name":"my-jira-connector","type":".jira"},"customFields":[{"defaultValue":"A new default value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":true},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","label":"my-toggle","type":"toggle","required":false}],"version":"WzExOSw0XQ=="}},"Cases_update_case_configuration_response":{"summary":"This is an example response when the case configuration was updated.","value":{"closure_type":"close-by-user","connector":{"fields":null,"id":"5e656730-e1ca-11ec-be9b-9b1838238ee6","name":"my-jira-connector","type":".jira"},"created_at":"2024-07-01T17:07:17.767Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"defaultValue":"A new default value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":true},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","label":"my-toggle","type":"toggle","required":false}],"error":null,"id":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","mappings":[{"action_type":"overwrite","source":"title","target":"summary"},{"action_type":"overwrite","source":"description","target":"description"},{"action_type":"overwrite","source":"tags","target":"labels"},{"action_type":"append","source":"comments","target":"comments"}],"owner":"cases","templates":[],"updated_at":"2024-07-19T00:52:42.401Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzI2LDNd"}},"Cases_update_case_request":{"summary":"Update the case description, tags, and connector.","value":{"cases":[{"connector":{"fields":{"issueType":"10006","parent":null,"priority":null},"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira"},"customFields":[{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":false},{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My new field value"}],"description":"A case description.","id":"a18b38a0-71b0-11ea-a0b2-c51ea50a58e2","settings":{"syncAlerts":true},"tags":["tag-1"],"version":"WzIzLDFd"}]}},"Cases_update_case_response":{"summary":"This is an example response when the case description, tags, and connector were updated.","value":[{"assignees":[],"category":null,"closed_at":null,"closed_by":null,"comments":[],"connector":{"fields":{"issueType":"10006","parent":null,"priority":null},"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira"},"created_at":"2023-10-13T09:16:17.416Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My new field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":false}],"description":"A case description.","duration":null,"external_service":{"connector_id":"05da469f-1fde-4058-99a3-91e4807e2de8","connector_name":"Jira","external_id":"10003","external_title":"IS-4","external_url":"https://hms.atlassian.net/browse/IS-4","pushed_at":"2023-10-13T09:20:40.672Z","pushed_by":{"email":null,"full_name":null,"username":"elastic"}},"id":"66b9aa00-94fa-11ea-9f74-e7e108796192","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag-1"],"title":"Case title 1","totalAlerts":0,"totalComment":0,"updated_at":"2023-10-13T09:48:33.043Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzU0OCwxXQ=="}]},"Cases_update_comment_request":{"summary":"Updates a comment of a case.","value":{"comment":"An updated comment.","id":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","owner":"cases","type":"user","version":"Wzk1LDFd"}},"Cases_update_comment_response":{"summary":"The add comment to case API returns a JSON object that contains details about the case and its comments.","value":{"assignees":[],"category":null,"closed_at":null,"closed_by":null,"comments":[{"comment":"An updated comment.","created_at":"2023-10-24T00:37:10.832Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","owner":"cases","pushed_at":null,"pushed_by":null,"type":"user","updated_at":"2023-10-24T01:27:06.210Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzIwNjM3LDFd"}],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2023-10-24T00:37:03.906Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My new field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":false}],"description":"A case description.","duration":null,"external_service":null,"id":"293f1bc0-74f6-11ea-b83a-553aecdb28b6","owner":"cases","settings":{"syncAlerts":false},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":1,"updated_at":"2023-10-24T01:27:06.210Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzIwNjM2LDFd"}},"Data_views_create_data_view_request":{"summary":"Create a data view with runtime fields.","value":{"data_view":{"name":"My Logstash data view","runtimeFieldMap":{"runtime_shape_name":{"script":{"source":"emit(doc['shape_name'].value)"},"type":"keyword"}},"title":"logstash-*"}}},"Data_views_create_runtime_field_request":{"summary":"Create a runtime field.","value":{"name":"runtimeFoo","runtimeField":{"script":{"source":"emit(doc[\"foo\"].value)"},"type":"long"}}},"Data_views_get_data_view_response":{"summary":"The get data view API returns a JSON object that contains information about the data view.","value":{"data_view":{"allowNoIndex":false,"fieldAttrs":{"products.manufacturer":{"count":1},"products.price":{"count":1},"products.product_name":{"count":1},"total_quantity":{"count":1}},"fieldFormats":{"products.base_price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.base_unit_price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.min_price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.taxful_price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.taxless_price":{"id":"number","params":{"pattern":"$0,0.00"}},"taxful_total_price":{"id":"number","params":{"pattern":"$0,0.[00]"}},"taxless_total_price":{"id":"number","params":{"pattern":"$0,0.00"}}},"fields":{"_id":{"aggregatable":false,"count":0,"esTypes":["_id"],"format":{"id":"string"},"isMapped":true,"name":"_id","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"_index":{"aggregatable":true,"count":0,"esTypes":["_index"],"format":{"id":"string"},"isMapped":true,"name":"_index","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"_score":{"aggregatable":false,"count":0,"format":{"id":"number"},"isMapped":true,"name":"_score","readFromDocValues":false,"scripted":false,"searchable":false,"shortDotsEnable":false,"type":"number"},"_source":{"aggregatable":false,"count":0,"esTypes":["_source"],"format":{"id":"_source"},"isMapped":true,"name":"_source","readFromDocValues":false,"scripted":false,"searchable":false,"shortDotsEnable":false,"type":"_source"},"category":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"category","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"category.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"category.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"category"}},"type":"string"},"currency":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"currency","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_birth_date":{"aggregatable":true,"count":0,"esTypes":["date"],"format":{"id":"date"},"isMapped":true,"name":"customer_birth_date","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"date"},"customer_first_name":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"customer_first_name","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_first_name.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_first_name.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"customer_first_name"}},"type":"string"},"customer_full_name":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"customer_full_name","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_full_name.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_full_name.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"customer_full_name"}},"type":"string"},"customer_gender":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_gender","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_id":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_id","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_last_name":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"customer_last_name","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_last_name.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_last_name.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"customer_last_name"}},"type":"string"},"customer_phone":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_phone","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"day_of_week":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"day_of_week","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"day_of_week_i":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"day_of_week_i","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"email":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"email","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"event.dataset":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"event.dataset","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"geoip.city_name":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"geoip.city_name","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"geoip.continent_name":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"geoip.continent_name","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"geoip.country_iso_code":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"geoip.country_iso_code","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"geoip.location":{"aggregatable":true,"count":0,"esTypes":["geo_point"],"format":{"id":"geo_point","params":{"transform":"wkt"}},"isMapped":true,"name":"geoip.location","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"geo_point"},"geoip.region_name":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"geoip.region_name","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"manufacturer":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"manufacturer","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"manufacturer.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"manufacturer.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"manufacturer"}},"type":"string"},"order_date":{"aggregatable":true,"count":0,"esTypes":["date"],"format":{"id":"date"},"isMapped":true,"name":"order_date","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"date"},"order_id":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"order_id","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products._id":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"products._id","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products._id.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products._id.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"products._id"}},"type":"string"},"products.base_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.base_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.base_unit_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.base_unit_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.category":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"products.category","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products.category.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products.category.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"products.category"}},"type":"string"},"products.created_on":{"aggregatable":true,"count":0,"esTypes":["date"],"format":{"id":"date"},"isMapped":true,"name":"products.created_on","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"date"},"products.discount_amount":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number"},"isMapped":true,"name":"products.discount_amount","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.discount_percentage":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number"},"isMapped":true,"name":"products.discount_percentage","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.manufacturer":{"aggregatable":false,"count":1,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"products.manufacturer","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products.manufacturer.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products.manufacturer.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"products.manufacturer"}},"type":"string"},"products.min_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.min_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.price":{"aggregatable":true,"count":1,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.product_id":{"aggregatable":true,"count":0,"esTypes":["long"],"format":{"id":"number"},"isMapped":true,"name":"products.product_id","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.product_name":{"aggregatable":false,"count":1,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"products.product_name","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products.product_name.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products.product_name.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"products.product_name"}},"type":"string"},"products.quantity":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"products.quantity","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.sku":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products.sku","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products.tax_amount":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number"},"isMapped":true,"name":"products.tax_amount","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.taxful_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.taxful_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.taxless_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.taxless_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.unit_discount_amount":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number"},"isMapped":true,"name":"products.unit_discount_amount","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"sku":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"sku","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"taxful_total_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.[00]"}},"isMapped":true,"name":"taxful_total_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"taxless_total_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"taxless_total_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"total_quantity":{"aggregatable":true,"count":1,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"total_quantity","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"total_unique_products":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"total_unique_products","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"type":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"type","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"user":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"user","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"}},"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"Kibana Sample Data eCommerce","namespaces":["default"],"runtimeFieldMap":{},"sourceFilters":[],"timeFieldName":"order_date","title":"kibana_sample_data_ecommerce","typeMeta":{},"version":"WzUsMV0="}}},"Data_views_get_data_views_response":{"summary":"The get all data views API returns a list of data views.","value":{"data_view":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"Kibana Sample Data eCommerce","namespaces":["default"],"title":"kibana_sample_data_ecommerce","typeMeta":{}},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"Kibana Sample Data Flights","namespaces":["default"],"title":"kibana_sample_data_flights"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"Kibana Sample Data Logs","namespaces":["default"],"title":"kibana_sample_data_logs"}]}},"Data_views_get_default_data_view_response":{"summary":"The get default data view API returns the default data view identifier.","value":{"data_view_id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f"}},"Data_views_get_runtime_field_response":{"summary":"The get runtime field API returns a JSON object that contains information about the runtime field (`hour_of_day`) and the data view (`d3d7af60-4c81-11e8-b3d7-01146121b73d`).","value":{"data_view":{"allowNoIndex":false,"fieldAttrs":{},"fieldFormats":{"AvgTicketPrice":{"id":"number","params":{"pattern":"$0,0.[00]"}},"hour_of_day":{"id":"number","params":{"pattern":"00"}}},"fields":{"_id":{"aggregatable":false,"count":0,"esTypes":["_id"],"format":{"id":"string"},"isMapped":true,"name":"_id","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"_index":{"aggregatable":true,"count":0,"esTypes":["_index"],"format":{"id":"string"},"isMapped":true,"name":"_index","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"_score":{"aggregatable":false,"count":0,"format":{"id":"number"},"isMapped":true,"name":"_score","readFromDocValues":false,"scripted":false,"searchable":false,"shortDotsEnable":false,"type":"number"},"_source":{"aggregatable":false,"count":0,"esTypes":["_source"],"format":{"id":"_source"},"isMapped":true,"name":"_source","readFromDocValues":false,"scripted":false,"searchable":false,"shortDotsEnable":false,"type":"_source"},"AvgTicketPrice":{"aggregatable":true,"count":0,"esTypes":["float"],"format":{"id":"number","params":{"pattern":"$0,0.[00]"}},"isMapped":true,"name":"AvgTicketPrice","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"Cancelled":{"aggregatable":true,"count":0,"esTypes":["boolean"],"format":{"id":"boolean"},"isMapped":true,"name":"Cancelled","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"boolean"},"Carrier":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"Carrier","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"dayOfWeek":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"dayOfWeek","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"Dest":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"Dest","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestAirportID":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestAirportID","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestCityName":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestCityName","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestCountry":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestCountry","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestLocation":{"aggregatable":true,"count":0,"esTypes":["geo_point"],"format":{"id":"geo_point","params":{"transform":"wkt"}},"isMapped":true,"name":"DestLocation","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"geo_point"},"DestRegion":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestRegion","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestWeather":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestWeather","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DistanceKilometers":{"aggregatable":true,"count":0,"esTypes":["float"],"format":{"id":"number"},"isMapped":true,"name":"DistanceKilometers","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"DistanceMiles":{"aggregatable":true,"count":0,"esTypes":["float"],"format":{"id":"number"},"isMapped":true,"name":"DistanceMiles","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"FlightDelay":{"aggregatable":true,"count":0,"esTypes":["boolean"],"format":{"id":"boolean"},"isMapped":true,"name":"FlightDelay","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"boolean"},"FlightDelayMin":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"FlightDelayMin","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"FlightDelayType":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"FlightDelayType","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"FlightNum":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"FlightNum","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"FlightTimeHour":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"FlightTimeHour","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"FlightTimeMin":{"aggregatable":true,"count":0,"esTypes":["float"],"format":{"id":"number"},"isMapped":true,"name":"FlightTimeMin","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"hour_of_day":{"aggregatable":true,"count":0,"esTypes":["long"],"format":{"id":"number","params":{"pattern":"00"}},"name":"hour_of_day","readFromDocValues":false,"runtimeField":{"script":{"source":"emit(doc['timestamp'].value.getHour());"},"type":"long"},"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"Origin":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"Origin","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginAirportID":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginAirportID","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginCityName":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginCityName","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginCountry":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginCountry","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginLocation":{"aggregatable":true,"count":0,"esTypes":["geo_point"],"format":{"id":"geo_point","params":{"transform":"wkt"}},"isMapped":true,"name":"OriginLocation","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"geo_point"},"OriginRegion":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginRegion","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginWeather":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginWeather","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"timestamp":{"aggregatable":true,"count":0,"esTypes":["date"],"format":{"id":"date"},"isMapped":true,"name":"timestamp","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"date"}},"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"Kibana Sample Data Flights","runtimeFieldMap":{"hour_of_day":{"script":{"source":"emit(doc['timestamp'].value.getHour());"},"type":"long"}},"sourceFilters":[],"timeFieldName":"timestamp","title":"kibana_sample_data_flights","version":"WzM2LDJd"},"fields":[{"aggregatable":true,"count":0,"esTypes":["long"],"name":"hour_of_day","readFromDocValues":false,"runtimeField":{"script":{"source":"emit(doc['timestamp'].value.getHour());"},"type":"long"},"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"}]}},"Data_views_preview_swap_data_view_request":{"summary":"Preview swapping references from data view ID \"abcd-efg\" to \"xyz-123\".","value":{"fromId":"abcd-efg","toId":"xyz-123"}},"Data_views_set_default_data_view_request":{"summary":"Set the default data view identifier.","value":{"data_view_id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","force":true}},"Data_views_swap_data_view_request":{"summary":"Swap references from data view ID \"abcd-efg\" to \"xyz-123\" and remove the data view that is no longer referenced.","value":{"delete":true,"fromId":"abcd-efg","toId":"xyz-123"}},"Data_views_update_data_view_request":{"summary":"Update some properties for a data view.","value":{"data_view":{"allowNoIndex":false,"name":"Kibana Sample Data eCommerce","timeFieldName":"order_date","title":"kibana_sample_data_ecommerce"},"refresh_fields":true}},"Data_views_update_field_metadata_request":{"summary":"Update metadata for multiple fields.","value":{"fields":{"field1":{"count":123,"customLabel":"Field 1 label"},"field2":{"customDescription":"Field 2 description","customLabel":"Field 2 label"}}}},"Data_views_update_runtime_field_request":{"summary":"Update an existing runtime field on a data view.","value":{"runtimeField":{"script":{"source":"emit(doc[\"bar\"].value)"}}}},"Machine_learning_APIs_mlSyncExample":{"summary":"Two anomaly detection jobs required synchronization in this example.","value":{"datafeedsAdded":{},"datafeedsRemoved":{},"savedObjectsCreated":{"anomaly-detector":{"myjob1":{"success":true},"myjob2":{"success":true}}},"savedObjectsDeleted":{}}},"Saved_objects_key_rotation_response":{"summary":"Encryption key rotation using default parameters.","value":{"failed":0,"successful":300,"total":1000}},"Saved_objects_resolve_missing_reference_request":{"value":{"file":"file.ndjson","retries":[{"id":"my-pattern","overwrite":true,"type":"index-pattern"},{"destinationId":"another-vis","id":"my-vis","overwrite":true,"type":"visualization"},{"destinationId":"yet-another-canvas","id":"my-canvas","overwrite":true,"type":"canvas"},{"id":"my-dashboard","type":"dashboard"}]}},"Saved_objects_resolve_missing_reference_response":{"summary":"Resolve missing reference errors.","value":{"success":true,"successCount":3,"successResults":[{"id":"my-vis","meta":{"icon":"visualizeApp","title":"Look at my visualization"},"type":"visualization"},{"id":"my-search","meta":{"icon":"searchApp","title":"Look at my search"},"type":"search"},{"id":"my-dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"},"type":"dashboard"}]}},"Task_manager_health_APIs_health_200response":{"description":"A successful response from `GET api/task_manager/_health`.","value":"{\n \"id\": \"330bbc6a-56cd-44d5-88e3-e3229f14d619\",\n \"timestamp\": \"2025-03-21T21:30:04.780Z\",\n \"status\": \"OK\",\n \"last_update\": \"2025-03-21T21:30:04.455Z\",\n \"stats\": {\n \"configuration\": {\n \"timestamp\": \"2025-03-21T21:26:10.002Z\",\n \"value\": {\n \"request_capacity\": 1000,\n \"monitored_aggregated_stats_refresh_rate\": 60000,\n \"monitored_stats_running_average_window\": 50,\n \"monitored_task_execution_thresholds\": {\n \"custom\": {},\n \"default\": {\n \"error_threshold\": 90,\n \"warn_threshold\": 80\n }\n },\n \"claim_strategy\": \"mget\",\n \"poll_interval\": 500,\n \"capacity\": {\n \"config\": 10,\n \"as_workers\": 10,\n \"as_cost\": 20\n }\n },\n \"status\": \"OK\"\n },\n \"runtime\": {\n \"timestamp\": \"2025-03-21T21:30:04.455Z\",\n \"value\": {\n \"polling\": {\n \"last_successful_poll\": \"2025-03-21T21:30:04.455Z\",\n \"last_polling_delay\": \"2025-03-21T21:26:10.001Z\",\n \"claim_duration\": {\n \"p50\": 17,\n \"p90\": 22,\n \"p95\": 25,\n \"p99\": 27\n },\n \"duration\": {\n \"p50\": 19,\n \"p90\": 25.5,\n \"p95\": 28,\n \"p99\": 28\n },\n \"claim_conflicts\": {\n \"p50\": 0,\n \"p90\": 0,\n \"p95\": 0,\n \"p99\": 0\n },\n \"claim_mismatches\": {\n \"p50\": 0,\n \"p90\": 0,\n \"p95\": 0,\n \"p99\": 0\n },\n \"claim_stale_tasks\": {\n \"p50\": 0,\n \"p90\": 0,\n \"p95\": 0,\n \"p99\": 0\n },\n \"result_frequency_percent_as_number\": {\n \"Failed\": 0,\n \"NoAvailableWorkers\": 0,\n \"NoTasksClaimed\": 100,\n \"RanOutOfCapacity\": 0,\n \"RunningAtCapacity\": 0,\n \"PoolFilled\": 0\n },\n \"persistence\": {\n \"recurring\": 88,\n \"non_recurring\": 12\n }\n },\n \"drift\": {\n \"p50\": 2089,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"drift_by_type\": {\n \"SLO:ORPHAN_SUMMARIES-CLEANUP-TASK\": {\n \"p50\": 2082,\n \"p90\": 2082,\n \"p95\": 2082,\n \"p99\": 2082\n },\n \"fleet:check-deleted-files-task\": {\n \"p50\": 2080,\n \"p90\": 2080,\n \"p95\": 2080,\n \"p99\": 2080\n },\n \"osquery:telemetry-saved-queries\": {\n \"p50\": 2080,\n \"p90\": 2080,\n \"p95\": 2080,\n \"p99\": 2080\n },\n \"task_manager:mark_removed_tasks_as_unrecognized\": {\n \"p50\": 2089,\n \"p90\": 2089,\n \"p95\": 2089,\n \"p99\": 2089\n },\n \"task_manager:delete_inactive_background_task_nodes\": {\n \"p50\": 336.5,\n \"p90\": 2089,\n \"p95\": 2089,\n \"p99\": 2089\n },\n \"alerts_invalidate_api_keys\": {\n \"p50\": 2086,\n \"p90\": 2086,\n \"p95\": 2086,\n \"p99\": 2086\n },\n \"fleet:unenroll-inactive-agents-task\": {\n \"p50\": 2080,\n \"p90\": 2080,\n \"p95\": 2080,\n \"p99\": 2080\n },\n \"alerting_health_check\": {\n \"p50\": 2086,\n \"p90\": 2086,\n \"p95\": 2086,\n \"p99\": 2086\n },\n \"Fleet-Usage-Sender\": {\n \"p50\": 2079,\n \"p90\": 2079,\n \"p95\": 2079,\n \"p99\": 2079\n },\n \"security:endpoint-diagnostics\": {\n \"p50\": 2525,\n \"p90\": 2525,\n \"p95\": 2525,\n \"p99\": 2525\n },\n \"logs-data-telemetry\": {\n \"p50\": 2525,\n \"p90\": 2525,\n \"p95\": 2525,\n \"p99\": 2525\n },\n \"security:telemetry-lists\": {\n \"p50\": 2525,\n \"p90\": 2525,\n \"p95\": 2525,\n \"p99\": 2525\n },\n \"security:telemetry-timelines\": {\n \"p50\": 2526,\n \"p90\": 2526,\n \"p95\": 2526,\n \"p99\": 2526\n },\n \"cases-telemetry-task\": {\n \"p50\": 2083,\n \"p90\": 2083,\n \"p95\": 2083,\n \"p99\": 2083\n },\n \"osquery:telemetry-packs\": {\n \"p50\": 2530,\n \"p90\": 2530,\n \"p95\": 2530,\n \"p99\": 2530\n },\n \"Fleet-Metrics-Task\": {\n \"p50\": 133.5,\n \"p90\": 2530,\n \"p95\": 2530,\n \"p99\": 2530\n },\n \"fleet:delete-unenrolled-agents-task\": {\n \"p50\": 2530,\n \"p90\": 2530,\n \"p95\": 2530,\n \"p99\": 2530\n },\n \"osquery:telemetry-configs\": {\n \"p50\": 2529,\n \"p90\": 2529,\n \"p95\": 2529,\n \"p99\": 2529\n },\n \"endpoint:complete-external-response-actions\": {\n \"p50\": 519,\n \"p90\": 2526,\n \"p95\": 2526,\n \"p99\": 2526\n },\n \"security:telemetry-detection-rules\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:telemetry-prebuilt-rule-alerts\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:endpoint-meta-telemetry\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:telemetry-filterlist-artifact\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:telemetry-diagnostic-timelines\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:telemetry-configuration\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:indices-metadata-telemetry\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"Fleet-Usage-Logger\": {\n \"p50\": 2190,\n \"p90\": 2190,\n \"p95\": 2190,\n \"p99\": 2190\n },\n \"obs-ai-assistant:knowledge-base-migration\": {\n \"p50\": 2189,\n \"p90\": 2189,\n \"p95\": 2189,\n \"p99\": 2189\n },\n \"dashboard_telemetry\": {\n \"p50\": 2452,\n \"p90\": 2452,\n \"p95\": 2452,\n \"p99\": 2452\n },\n \"session_cleanup\": {\n \"p50\": 2569,\n \"p90\": 2569,\n \"p95\": 2569,\n \"p99\": 2569\n },\n \"ProductDocBase:EnsureUpToDate\": {\n \"p50\": 2452,\n \"p90\": 2452,\n \"p95\": 2452,\n \"p99\": 2452\n },\n \"apm-telemetry-task\": {\n \"p50\": 2591,\n \"p90\": 2591,\n \"p95\": 2591,\n \"p99\": 2591\n },\n \"ML:saved-objects-sync\": {\n \"p50\": 2475,\n \"p90\": 2475,\n \"p95\": 2475,\n \"p99\": 2475\n },\n \"apm-source-map-migration-task\": {\n \"p50\": 1603.5,\n \"p90\": 2987,\n \"p95\": 2987,\n \"p99\": 2987\n },\n \"actions_telemetry\": {\n \"p50\": 771,\n \"p90\": 771,\n \"p95\": 771,\n \"p99\": 771\n },\n \"alerting_telemetry\": {\n \"p50\": 768,\n \"p90\": 768,\n \"p95\": 768,\n \"p99\": 768\n },\n \"endpoint:metadata-check-transforms-task\": {\n \"p50\": 834,\n \"p90\": 834,\n \"p95\": 834,\n \"p99\": 834\n },\n \"endpoint:user-artifact-packager\": {\n \"p50\": 529.5,\n \"p90\": 835,\n \"p95\": 835,\n \"p99\": 835\n },\n \"fleet:bump_agent_policies\": {\n \"p50\": 361,\n \"p90\": 361,\n \"p95\": 361,\n \"p99\": 361\n }\n },\n \"load\": {\n \"p50\": 10,\n \"p90\": 100,\n \"p95\": 100,\n \"p99\": 100\n },\n \"execution\": {\n \"duration\": {\n \"SLO:ORPHAN_SUMMARIES-CLEANUP-TASK\": {\n \"p50\": 24,\n \"p90\": 24,\n \"p95\": 24,\n \"p99\": 24\n },\n \"fleet:check-deleted-files-task\": {\n \"p50\": 24,\n \"p90\": 24,\n \"p95\": 24,\n \"p99\": 24\n },\n \"osquery:telemetry-saved-queries\": {\n \"p50\": 25,\n \"p90\": 25,\n \"p95\": 25,\n \"p99\": 25\n },\n \"task_manager:mark_removed_tasks_as_unrecognized\": {\n \"p50\": 28,\n \"p90\": 28,\n \"p95\": 28,\n \"p99\": 28\n },\n \"task_manager:delete_inactive_background_task_nodes\": {\n \"p50\": 7.5,\n \"p90\": 29,\n \"p95\": 29,\n \"p99\": 29\n },\n \"alerts_invalidate_api_keys\": {\n \"p50\": 34,\n \"p90\": 34,\n \"p95\": 34,\n \"p99\": 34\n },\n \"fleet:unenroll-inactive-agents-task\": {\n \"p50\": 39,\n \"p90\": 39,\n \"p95\": 39,\n \"p99\": 39\n },\n \"alerting_health_check\": {\n \"p50\": 42,\n \"p90\": 42,\n \"p95\": 42,\n \"p99\": 42\n },\n \"Fleet-Usage-Sender\": {\n \"p50\": 78,\n \"p90\": 78,\n \"p95\": 78,\n \"p99\": 78\n },\n \"security:endpoint-diagnostics\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"logs-data-telemetry\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:telemetry-lists\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:telemetry-timelines\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"cases-telemetry-task\": {\n \"p50\": 458,\n \"p90\": 458,\n \"p95\": 458,\n \"p99\": 458\n },\n \"osquery:telemetry-packs\": {\n \"p50\": 10,\n \"p90\": 10,\n \"p95\": 10,\n \"p99\": 10\n },\n \"Fleet-Metrics-Task\": {\n \"p50\": 5,\n \"p90\": 10,\n \"p95\": 10,\n \"p99\": 10\n },\n \"fleet:delete-unenrolled-agents-task\": {\n \"p50\": 11,\n \"p90\": 11,\n \"p95\": 11,\n \"p99\": 11\n },\n \"osquery:telemetry-configs\": {\n \"p50\": 12,\n \"p90\": 12,\n \"p95\": 12,\n \"p99\": 12\n },\n \"endpoint:complete-external-response-actions\": {\n \"p50\": 7,\n \"p90\": 11,\n \"p95\": 11,\n \"p99\": 11\n },\n \"security:telemetry-detection-rules\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:telemetry-prebuilt-rule-alerts\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:endpoint-meta-telemetry\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:telemetry-filterlist-artifact\": {\n \"p50\": 5,\n \"p90\": 5,\n \"p95\": 5,\n \"p99\": 5\n },\n \"security:telemetry-diagnostic-timelines\": {\n \"p50\": 5,\n \"p90\": 5,\n \"p95\": 5,\n \"p99\": 5\n },\n \"security:telemetry-configuration\": {\n \"p50\": 5,\n \"p90\": 5,\n \"p95\": 5,\n \"p99\": 5\n },\n \"security:indices-metadata-telemetry\": {\n \"p50\": 5,\n \"p90\": 5,\n \"p95\": 5,\n \"p99\": 5\n },\n \"Fleet-Usage-Logger\": {\n \"p50\": 18,\n \"p90\": 18,\n \"p95\": 18,\n \"p99\": 18\n },\n \"obs-ai-assistant:knowledge-base-migration\": {\n \"p50\": 8,\n \"p90\": 8,\n \"p95\": 8,\n \"p99\": 8\n },\n \"dashboard_telemetry\": {\n \"p50\": 12,\n \"p90\": 12,\n \"p95\": 12,\n \"p99\": 12\n },\n \"session_cleanup\": {\n \"p50\": 58,\n \"p90\": 58,\n \"p95\": 58,\n \"p99\": 58\n },\n \"ProductDocBase:EnsureUpToDate\": {\n \"p50\": 147,\n \"p90\": 147,\n \"p95\": 147,\n \"p99\": 147\n },\n \"apm-telemetry-task\": {\n \"p50\": 543,\n \"p90\": 543,\n \"p95\": 543,\n \"p99\": 543\n },\n \"ML:saved-objects-sync\": {\n \"p50\": 544,\n \"p90\": 544,\n \"p95\": 544,\n \"p99\": 544\n },\n \"apm-source-map-migration-task\": {\n \"p50\": 1649,\n \"p90\": 3282,\n \"p95\": 3282,\n \"p99\": 3282\n },\n \"actions_telemetry\": {\n \"p50\": 19,\n \"p90\": 19,\n \"p95\": 19,\n \"p99\": 19\n },\n \"alerting_telemetry\": {\n \"p50\": 64,\n \"p90\": 64,\n \"p95\": 64,\n \"p99\": 64\n },\n \"endpoint:metadata-check-transforms-task\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"endpoint:user-artifact-packager\": {\n \"p50\": 10,\n \"p90\": 13,\n \"p95\": 13,\n \"p99\": 13\n },\n \"fleet:bump_agent_policies\": {\n \"p50\": 9,\n \"p90\": 9,\n \"p95\": 9,\n \"p99\": 9\n }\n },\n \"duration_by_persistence\": {\n \"recurring\": {\n \"p50\": 9,\n \"p90\": 63.39999999999999,\n \"p95\": 474.99999999999966,\n \"p99\": 544\n },\n \"non_recurring\": {\n \"p50\": 14,\n \"p90\": 2968.500000000001,\n \"p95\": 3282,\n \"p99\": 3282\n }\n },\n \"persistence\": {\n \"recurring\": 88,\n \"non_recurring\": 12\n },\n \"result_frequency_percent_as_number\": {\n \"SLO:ORPHAN_SUMMARIES-CLEANUP-TASK\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"fleet:check-deleted-files-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"osquery:telemetry-saved-queries\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"task_manager:mark_removed_tasks_as_unrecognized\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"task_manager:delete_inactive_background_task_nodes\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"alerts_invalidate_api_keys\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"fleet:unenroll-inactive-agents-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"alerting_health_check\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"Fleet-Usage-Sender\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:endpoint-diagnostics\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"logs-data-telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-lists\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-timelines\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"cases-telemetry-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"osquery:telemetry-packs\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"Fleet-Metrics-Task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"fleet:delete-unenrolled-agents-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"osquery:telemetry-configs\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"endpoint:complete-external-response-actions\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-detection-rules\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-prebuilt-rule-alerts\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:endpoint-meta-telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-filterlist-artifact\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-diagnostic-timelines\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-configuration\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:indices-metadata-telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"Fleet-Usage-Logger\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"obs-ai-assistant:knowledge-base-migration\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"dashboard_telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"session_cleanup\": {\n \"Success\": 0,\n \"RetryScheduled\": 100,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"ProductDocBase:EnsureUpToDate\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"apm-telemetry-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"ML:saved-objects-sync\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"apm-source-map-migration-task\": {\n \"Success\": 50,\n \"RetryScheduled\": 50,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"actions_telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"alerting_telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"endpoint:metadata-check-transforms-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"endpoint:user-artifact-packager\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"fleet:bump_agent_policies\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n }\n }\n }\n },\n \"status\": \"OK\"\n },\n \"workload\": {\n \"timestamp\": \"2025-03-21T21:29:10.367Z\",\n \"value\": {\n \"count\": 35,\n \"cost\": 70,\n \"task_types\": {\n \"Fleet-Metrics-Task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"Fleet-Usage-Logger\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"Fleet-Usage-Sender\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"ML:saved-objects-sync\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"SLO:ORPHAN_SUMMARIES-CLEANUP-TASK\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"actions_telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"alerting_health_check\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"alerting_telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"alerts_invalidate_api_keys\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"apm-telemetry-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"cases-telemetry-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"dashboard_telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"endpoint:complete-external-response-actions\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"endpoint:metadata-check-transforms-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"endpoint:user-artifact-packager\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"fleet:check-deleted-files-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"fleet:delete-unenrolled-agents-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"fleet:unenroll-inactive-agents-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"logs-data-telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"osquery:telemetry-configs\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"osquery:telemetry-packs\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"osquery:telemetry-saved-queries\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:endpoint-diagnostics\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:endpoint-meta-telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:indices-metadata-telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-configuration\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-detection-rules\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-diagnostic-timelines\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-filterlist-artifact\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-lists\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-prebuilt-rule-alerts\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-timelines\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"session_cleanup\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"task_manager:delete_inactive_background_task_nodes\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"task_manager:mark_removed_tasks_as_unrecognized\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n }\n },\n \"non_recurring\": 1,\n \"non_recurring_cost\": 2,\n \"schedule\": [\n [\n \"1m\",\n 2\n ],\n [\n \"60s\",\n 2\n ],\n [\n \"5m\",\n 2\n ],\n [\n \"10m\",\n 1\n ],\n [\n \"15m\",\n 1\n ],\n [\n \"45m\",\n 1\n ],\n [\n \"1h\",\n 9\n ],\n [\n \"3600s\",\n 1\n ],\n [\n \"60m\",\n 1\n ],\n [\n \"2h\",\n 1\n ],\n [\n \"720m\",\n 2\n ],\n [\n \"24h\",\n 7\n ],\n [\n \"1d\",\n 3\n ],\n [\n \"1440m\",\n 1\n ]\n ],\n \"overdue\": 0,\n \"overdue_cost\": 0,\n \"overdue_non_recurring\": 0,\n \"estimated_schedule_density\": [\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ],\n \"capacity_requirements\": {\n \"per_minute\": 4,\n \"per_hour\": 46,\n \"per_day\": 27\n }\n },\n \"status\": \"OK\"\n },\n \"capacity_estimation\": {\n \"status\": \"OK\",\n \"reason\": \"Task Manager is healthy, the assumedRequiredThroughputPerMinutePerKibana (148.78541666666666) \u003c capacityPerMinutePerKibana (1200)\",\n \"timestamp\": \"2025-03-21T21:30:04.780Z\",\n \"value\": {\n \"observed\": {\n \"observed_kibana_instances\": 1,\n \"max_throughput_per_minute_per_kibana\": 1200,\n \"max_throughput_per_minute\": 1200,\n \"minutes_to_drain_overdue\": 0,\n \"avg_recurring_required_throughput_per_minute\": 5,\n \"avg_recurring_required_throughput_per_minute_per_kibana\": 5,\n \"avg_required_throughput_per_minute\": 149,\n \"avg_required_throughput_per_minute_per_kibana\": 149\n },\n \"proposed\": {\n \"provisioned_kibana\": 2,\n \"min_required_kibana\": 1,\n \"avg_recurring_required_throughput_per_minute_per_kibana\": 3,\n \"avg_required_throughput_per_minute_per_kibana\": 75\n }\n }\n }\n }\n}"},"get_connector_types_generativeai_response":{"summary":"A list of connector types for the `generativeAI` feature.","value":[{"id":".gen-ai","name":"OpenAI","enabled":true,"enabled_in_config":true,"enabled_in_license":true,"minimum_license_required":"enterprise","supported_feature_ids":["generativeAIForSecurity","generativeAIForObservability","generativeAIForSearchPlayground"],"is_system_action_type":false},{"id":".bedrock","name":"AWS Bedrock","enabled":true,"enabled_in_config":true,"enabled_in_license":true,"minimum_license_required":"enterprise","supported_feature_ids":["generativeAIForSecurity","generativeAIForObservability","generativeAIForSearchPlayground"],"is_system_action_type":false},{"id":".gemini","name":"Google Gemini","enabled":true,"enabled_in_config":true,"enabled_in_license":true,"minimum_license_required":"enterprise","supported_feature_ids":["generativeAIForSecurity"],"is_system_action_type":false}]},"get_connector_response":{"summary":"Get connector details.","value":{"id":"df770e30-8b8b-11ed-a780-3b746c987a81","name":"my_server_log_connector","config":{},"connector_type_id":".server-log","is_preconfigured":false,"is_deprecated":false,"is_missing_secrets":false,"is_system_action":false}},"update_index_connector_request":{"summary":"Update an index connector.","value":{"name":"updated-connector","config":{"index":"updated-index"}}},"create_email_connector_request":{"summary":"Create an email connector.","value":{"name":"email-connector-1","connector_type_id":".email","config":{"from":"tester@example.com","hasAuth":true,"host":"https://example.com","port":1025,"secure":false,"service":"other"},"secrets":{"user":"username","password":"password"}}},"create_index_connector_request":{"summary":"Create an index connector.","value":{"name":"my-connector","connector_type_id":".index","config":{"index":"test-index"}}},"create_webhook_connector_request":{"summary":"Create a webhook connector with SSL authentication.","value":{"name":"my-webhook-connector","connector_type_id":".webhook","config":{"method":"post","url":"https://example.com","authType":"webhook-authentication-ssl","certType":"ssl-crt-key"},"secrets":{"crt":"QmFnIEF0dH...","key":"LS0tLS1CRUdJ...","password":"my-passphrase"}}},"create_xmatters_connector_request":{"summary":"Create an xMatters connector with URL authentication.","value":{"name":"my-xmatters-connector","connector_type_id":".xmatters","config":{"usesBasic":false},"secrets":{"secretsUrl":"https://example.com?apiKey=xxxxx"}}},"create_email_connector_response":{"summary":"A new email connector.","value":{"id":"90a82c60-478f-11ee-a343-f98a117c727f","connector_type_id":".email","name":"email-connector-1","config":{"from":"tester@example.com","service":"other","host":"https://example.com","port":1025,"secure":false,"hasAuth":true,"tenantId":null,"clientId":null,"oauthTokenUrl":null},"is_preconfigured":false,"is_deprecated":false,"is_missing_secrets":false,"is_system_action":false}},"create_index_connector_response":{"summary":"A new index connector.","value":{"id":"c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad","connector_type_id":".index","name":"my-connector","config":{"index":"test-index","refresh":false,"executionTimeField":null},"is_preconfigured":false,"is_deprecated":false,"is_missing_secrets":false,"is_system_action":false}},"create_webhook_connector_response":{"summary":"A new webhook connector.","value":{"id":"900eb010-3b9d-11ee-a642-8ffbb94e38bd","name":"my-webhook-connector","config":{"method":"post","url":"https://example.com","authType":"webhook-authentication-ssl","certType":"ssl-crt-key","verificationMode":"full","headers":null,"hasAuth":true},"connector_type_id":".webhook","is_preconfigured":false,"is_deprecated":false,"is_missing_secrets":false,"is_system_action":false}},"run_index_connector_request":{"summary":"Run an index connector.","value":{"params":{"documents":[{"id":"my_doc_id","name":"my_doc_name","message":"hello, world"}]}}},"run_jira_connector_request":{"summary":"Run a Jira connector to retrieve the list of issue types.","value":{"params":{"subAction":"issueTypes"}}},"run_servicenow_itom_connector_request":{"summary":"Run a ServiceNow ITOM connector to retrieve the list of choices.","value":{"params":{"subAction":"getChoices","subActionParams":{"fields":["severity","urgency"]}}}},"run_slack_api_connector_request":{"summary":"Run a Slack connector that uses the web API method to post a message on a channel.","value":{"params":{"subAction":"postMessage","subActionParams":{"channelIds":["C123ABC456"],"text":"A test message."}}}},"run_swimlane_connector_request":{"summary":"Run a Swimlane connector to create an incident.","value":{"params":{"subAction":"pushToService","subActionParams":{"comments":[{"commentId":1,"comment":"A comment about the incident."}],"incident":{"caseId":"1000","caseName":"Case name","description":"Description of the incident."}}}}},"run_index_connector_response":{"summary":"Response from running an index connector.","value":{"connector_id":"fd38c600-96a5-11ed-bb79-353b74189cba","data":{"errors":false,"items":[{"create":{"_id":"4JtvwYUBrcyxt2NnfW3y","_index":"my-index","_primary_term":1,"_seq_no":0,"_shards":{"failed":0,"successful":1,"total":2},"_version":1,"result":"created","status":201}}],"took":135},"status":"ok"}},"run_jira_connector_response":{"summary":"Response from retrieving the list of issue types for a Jira connector.","value":{"connector_id":"b3aad810-edbe-11ec-82d1-11348ecbf4a6","data":[{"id":10024,"name":"Improvement"},{"id":10006,"name":"Task"},{"id":10007,"name":"Sub-task"},{"id":10025,"name":"New Feature"},{"id":10023,"name":"Bug"},{"id":10000,"name":"Epic"}],"status":"ok"}},"run_server_log_connector_response":{"summary":"Response from running a server log connector.","value":{"connector_id":"7fc7b9a0-ecc9-11ec-8736-e7d63118c907","status":"ok"}},"run_servicenow_itom_connector_response":{"summary":"Response from retrieving the list of choices for a ServiceNow ITOM connector.","value":{"connector_id":"9d9be270-2fd2-11ed-b0e0-87533c532698","data":[{"dependent_value":"","element":"severity","label":"Critical","value":1},{"dependent_value":"","element":"severity","label":"Major","value":2},{"dependent_value":"","element":"severity","label":"Minor","value":3},{"dependent_value":"","element":"severity","label":"Warning","value":4},{"dependent_value":"","element":"severity","label":"OK","value":5},{"dependent_value":"","element":"severity","label":"Clear","value":0},{"dependent_value":"","element":"urgency","label":"1 - High","value":1},{"dependent_value":"","element":"urgency","label":"2 - Medium","value":2},{"dependent_value":"","element":"urgency","label":"3 - Low","value":3}],"status":"ok"}},"run_slack_api_connector_response":{"summary":"Response from posting a message with a Slack connector.","value":{"status":"ok","data":{"ok":true,"channel":"C123ABC456","ts":"1234567890.123456","message":{"bot_id":"B12BCDEFGHI","type":"message","text":"A test message","user":"U12A345BC6D","ts":"1234567890.123456","app_id":"A01BC2D34EF","blocks":[{"type":"rich_text","block_id":"/NXe","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"A test message."}]}]}],"team":"T01ABCDE2F","bot_profile":{"id":"B12BCDEFGHI","app_id":"A01BC2D34EF","name":"test","icons":{"image_36":"https://a.slack-edge.com/80588/img/plugins/app/bot_36.png"},"deleted":false,"updated":1672169705,"team_id":"T01ABCDE2F"}}},"connector_id":".slack_api"}},"run_swimlane_connector_response":{"summary":"Response from creating a Swimlane incident.","value":{"connector_id":"a4746470-2f94-11ed-b0e0-87533c532698","data":{"id":"aKPmBHWzmdRQtx6Mx","title":"TEST-457","url":"https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx","pushedDate":"2022-09-08T16:52:27.866Z","comments":[{"commentId":1,"pushedDate":"2022-09-08T16:52:27.865Z"}]},"status":"ok"}},"get_connectors_response":{"summary":"A list of connectors","value":[{"id":"preconfigured-email-connector","name":"my-preconfigured-email-notification","connector_type_id":".email","is_preconfigured":true,"is_deprecated":false,"referenced_by_count":0,"is_system_action":false},{"id":"e07d0c80-8b8b-11ed-a780-3b746c987a81","name":"my-index-connector","config":{"index":"test-index","refresh":false,"executionTimeField":null},"connector_type_id":".index","is_preconfigured":false,"is_deprecated":false,"referenced_by_count":2,"is_missing_secrets":false,"is_system_action":false}]},"get_roles_response1":{"summary":"Get all role details","value":[{"name":"my_kibana_role","description":"My kibana role description","metadata":{"version":1},"transient_metadata":{"enabled":true},"elasticsearch":{"indices":[],"cluster":[],"run_as":[]},"kibana":[{"base":["all"],"feature":{},"spaces":["*"]}]},{"name":"my_admin_role","description":"My admin role description","metadata":{"version":1},"transient_metadata":{"enabled":true},"elasticsearch":{"cluster":["all"],"indices":[{"names":["index1","index2"],"privileges":["all"],"field_security":{"grant":["title","body"]},"query":"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}"}]},"kibana":[]}]},"get_role_response1":{"summary":"Get role details","value":{"name":"my_kibana_role","description":"Grants all cluster privileges and full access to index1 and index2. Grants full access to remote_index1 and remote_index2, and the monitor_enrich cluster privilege on remote_cluster1. Grants all Kibana privileges in the default space.","metadata":{"version":1},"transient_metadata":{"enabled":true},"elasticsearch":{"cluster":["all"],"remote_cluster":[{"privileges":["monitor_enrich"],"clusters":["remote_cluster1"]}],"indices":[{"names":["index1","index2"],"privileges":["all"],"allow_restricted_indices":false}],"remote_indices":[{"names":["remote_index1","remote_index2"],"privileges":["all"],"allow_restricted_indices":false,"clusters":["remote_cluster1"]}],"run_as":[]},"kibana":[{"base":["all"],"feature":{},"spaces":["default"]}],"_transform_error":[],"_unrecognized_applications":[]}},"create_role_request1":{"summary":"Feature privileges in multiple spaces","description":"Grant access to various features in some spaces.","value":{"description":"Grant full access to discover and dashboard features in the default space. Grant read access in the marketing, and sales spaces.","metadata":{"version":1},"elasticsearch":{"cluster":[],"indices":[]},"kibana":[{"base":[],"feature":{"discover":["all"],"dashboard":["all"]},"spaces":["default"]},{"base":["read"],"spaces":["marketing","sales"]}]}},"create_role_request2":{"summary":"Dashboard privileges in a space","description":"Grant access to dashboard features in a Marketing space.","value":{"description":"Grant dashboard access in the Marketing space.","metadata":{"version":1},"elasticsearch":{"cluster":[],"indices":[]},"kibana":[{"base":[],"feature":{"dashboard":["read"]},"spaces":["marketing"]}]}},"create_role_request3":{"summary":"Feature privileges in a space","description":"Grant full access to all features in the default space.","value":{"metadata":{"version":1},"elasticsearch":{"cluster":[],"indices":[]},"kibana":[{"base":["all"],"feature":{},"spaces":["default"]}]}},"create_role_request4":{"summary":"Elasticsearch and Kibana feature privileges","description":"Grant Elasticsearch and Kibana feature privileges.","value":{"description":"Grant all cluster privileges and full access to index1 and index2. Grant full access to remote_index1 and remote_index2, and the monitor_enrich cluster privilege on remote_cluster1. Grant all Kibana privileges in the default space.","metadata":{"version":1},"elasticsearch":{"cluster":["all"],"indices":[{"names":["index1","index2"],"privileges":["all"]}],"remote_indices":[{"clusters":["remote_cluster1"],"names":["remote_index1","remote_index2"],"privileges":["all"]}],"remote_cluster":[{"clusters":["remote_cluster1"],"privileges":["monitor_enrich"]}]},"kibana":[{"base":["all"],"feature":{},"spaces":["default"]}]}},"copy_saved_objects_request1":{"summary":"Copy with createNewCopies","description":"Copy a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. In this example, the dashboard has a reference to a visualization and that has a reference to a data view.\n","value":{"objects":[{"type":"dashboard","id":"my-dashboard"}],"spaces":["marketing"],"includeReferences":true}},"copy_saved_objects_request2":{"summary":"Copy without createNewCopies","description":"Copy a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. In this example, the dashboard has a reference to a visualization and that has a reference to a data view.\n","value":{"objects":[{"type":"dashboard","id":"my-dashboard"}],"spaces":["marketing"],"includeReferences":true,"createNewCopies":false}},"copy_saved_objects_response1":{"summary":"Copy with createNewCopies","description":"The response for successfully copying a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. The result indicates a successful copy and all three objects are created. Since these objects were created as new copies, each entry in the successResults array includes a destinationId attribute.\n","value":{"marketing":{"success":true,"successCount":3,"successResults":[{"id":"my-dashboard","type":"dashboard","destinationId":"1e127098-5b80-417f-b0f1-c60c8395358f","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}},{"id":"my-vis","type":"visualization","destinationId":"a610ed80-1c73-4507-9e13-d3af736c8e04","meta":{"icon":"visualizeApp","title":"Look at my visualization"}},{"id":"my-index-pattern","type":"index-pattern","destinationId":"bc3c9c70-bf6f-4bec-b4ce-f4189aa9e26b","meta":{"icon":"indexPatternApp","title":"my-pattern-*"}}]}}},"copy_saved_objects_response2":{"summary":"Copy without createNewCopies","description":"The response for successfully copying a dashboard with the my-dashboard ID with createNewCopies turned off. The result indicates a successful copy and all three objects are created.\n","value":{"marketing":{"success":true,"successCount":3,"successResults":[{"id":"my-dashboard","type":"dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}},{"id":"my-vis","type":"visualization","meta":{"icon":"visualizeApp","title":"Look at my visualization"}},{"id":"my-index-pattern","type":"index-pattern","meta":{"icon":"indexPatternApp","title":"my-pattern-*"}}]}}},"copy_saved_objects_response3":{"summary":"Failed copy response with conflict errors","description":"A response for a failed copy of a dashboard with the my-dashboard ID including all references from the default space to the marketing and sales spaces. In this example, the dashboard has a reference to a visualization and a Canvas workpad and the visualization has a reference to an index pattern. The result indicates a successful copy for the marketing space and an unsuccessful copy for the sales space because the data view, visualization, and Canvas workpad each resulted in a conflict error. Objects are created when the error is resolved using the resolve copy conflicts API.\n","value":{"marketing":{"success":true,"successCount":4,"successResults":[{"id":"my-dashboard","type":"dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}},{"id":"my-vis","type":"visualization","meta":{"icon":"visualizeApp","title":"Look at my visualization"}},{"id":"my-canvas","type":"canvas-workpad","meta":{"icon":"canvasApp","title":"Look at my canvas"}},{"id":"my-index-pattern","type":"index-pattern","meta":{"icon":"indexPatternApp","title":"my-pattern-*"}}]},"sales":{"success":false,"successCount":"1,","errors":[{"id":"my-pattern","type":"index-pattern","title":"my-pattern-*","error":{"type":"conflict"},"meta":{"icon":"indexPatternApp","title":"my-pattern-*"}},{"id":"my-visualization","type":"my-vis","title":"Look at my visualization","error":{"type":"conflict","destinationId":"another-vis"},"meta":{"icon":"visualizeApp","title":"Look at my visualization"}},{"id":"my-canvas","type":"canvas-workpad","title":"Look at my canvas","error":{"type":"ambiguous_conflict","destinations":[{"id":"another-canvas","title":"Look at another canvas","updatedAt":"2020-07-08T16:36:32.377Z"},{"id":"yet-another-canvas","title":"Look at yet another canvas","updatedAt":"2020-07-05T12:29:54.849Z"}]},"meta":{"icon":"canvasApp","title":"Look at my canvas"}}],"successResults\"":[{"id":"my-dashboard","type":"dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}}]}}},"copy_saved_objects_response4":{"summary":"Failed copy with missing reference errors","description":"The response for successfully copying a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. In this example, the dashboard has a reference to a visualization and a Canvas workpad and the visualization has a reference to a data view. The result indicates an unsuccessful copy because the visualization resulted in a missing references error. Objects are created when the errors are resolved using the resolve copy conflicts API.\n","value":{"marketing":{"success":false,"successCount":2,"errors":[{"id":"my-vis","type":"visualization","title":"Look at my visualization","error":{"type":"missing_references","references":[{"type":"index-pattern","id":"my-pattern-*"}]},"meta":{"icon":"visualizeApp","title":"Look at my visualization"}}],"successResults":[{"id":"my-dashboard","type":"dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}},{"id":"my-canvas","type":"canvas-workpad","meta":{"icon":"canvasApp","title":"Look at my canvas"}}]}}},"disable_legacy_url_request1":{"summary":"Disable legacy URL aliases","description":"This request leaves the alias intact but the legacy URL for this alias (http://localhost:5601/s/bills-space/app/dashboards#/view/123) will no longer function. The dashboard still exists and you can access it with the new URL.\n","value":{"aliases":[{"targetSpace":"bills-space","targetType":"dashboard","sourceId":123}]}},"resolve_copy_saved_objects_request1":{"summary":"Resolve conflict errors","description":"Resolve conflict errors for a data view, visualization, and Canvas workpad by overwriting the existing saved objects. NOTE: If a prior copy attempt resulted in resolvable errors, you must include a retry for each object you want to copy, including any that were returned in the successResults array. In this example, we retried copying the dashboard accordingly.\n","value":{"objects":[{"type":"dashboard","id":"my-dashboard"}],"includeReferences":true,"createNewCopies":false,"retries":{"sales":[{"type":"index-pattern","id":"my-pattern","overwrite":true},{"type":"visualization","id":"my-vis","overwrite":"true,","destinationId":"another-vis"},{"type":"canvas","id":"my-canvas","overwrite":true,"destinationId":"yet-another-canvas"},{"type":"dashboard","id":"my-dashboard"}]}}},"resolve_copy_saved_objects_request2":{"summary":"Resolve missing reference errors","description":"Resolve missing reference errors for a visualization by ignoring the error. NOTE: If a prior copy attempt resulted in resolvable errors, you must include a retry for each object you want to copy, including any that were returned in the successResults array. In this example, we retried copying the dashboard and canvas accordingly.\n","value":{"objects":[{"type":"dashboard","id":"my-dashboard"}],"includeReferences":true,"createNewCopies":false,"retries":{"marketing":[{"type":"visualization","id":"my-vis","ignoreMissingReferences":true},{"type":"canvas","id":"my-canvas"},{"type":"dashboard","id":"my-dashboard"}]}}},"update_saved_objects_spaces_request1":{"summary":"Update saved object spaces","description":"Update the spaces of each saved object and all its references.","value":{"objects":[{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247"}],"spacesToAdd":["test"],"spacesToRemove":[]}},"update_saved_objects_spaces_response1":{"summary":"Update saved object spaces","description":"The response from updating the spaces of saved objects.\n","value":{"objects":[{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","spaces":["default","test"]}]}},"get_spaces_response1":{"summary":"Get all spaces","description":"Get all spaces without specifying any options.","value":[{"id":"default","name":"Default","description":"This is the Default Space","disabledFeatures":[],"imageUrl":"","_reserved":true},{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"disabledFeatures":["apm"],"initials":"MK","imageUrl":"data:image/png;base64,iVBORw0KGgoAAAANSU"},{"id":"sales","name":"Sales","initials":"MK","disabledFeatures":["discover"],"imageUr\"":"","solution":"oblt"}]},"get_spaces_response2":{"summary":"Get all spaces with custom options","description":"The user has read-only access to the Sales space. Get all spaces with the following query parameters: \"purpose=shareSavedObjectsIntoSpace\u0026include_authorized_purposes=true\"\n","value":[{"id":"default","name":"Default","description":"This is the Default Space","disabledFeatures":[],"imageUrl":"","_reserved":true,"authorizedPurposes":{"any":true,"copySavedObjectsIntoSpace":true,"findSavedObjects":true,"shareSavedObjectsIntoSpace":true}},{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"disabledFeatures":["apm"],"initials":"MK","imageUrl":"data:image/png;base64,iVBORw0KGgoAAAANSU","authorizedPurposes":{"any":true,"copySavedObjectsIntoSpace":true,"findSavedObjects":true,"shareSavedObjectsIntoSpace":true}},{"id":"sales","name":"Sales","initials":"MK","disabledFeatures":["discover"],"imageUrl":"","authorizedPurposes":{"any":true,"copySavedObjectsIntoSpace":false,"findSavedObjects":true,"shareSavedObjectsIntoSpace":false}}]},"create_space_request":{"summary":"Create a marketing space","value":{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"initials":"MK","disabledFeatures":[],"imageUrl":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAABACAYAAABC6cT1AAAGf0lEQVRoQ+3abYydRRUH8N882xYo0IqagEVjokQJKAiKBjXExC9G/aCkGowCIghCkRcrVSSKIu/FEiqgGL6gBIlAYrAqUTH6hZgQFVEMKlQFfItWoQWhZe8z5uzMLdvbfbkLxb13d+fbvfe588x/zpn/+Z9zJpmnI81T3BaAzzfLL1h8weLzZAcWXH2eGHo7zAWLL1h8nuzAjFw9G1N6Kzq8HnuM36MR8iibF3Fv4q+7cv8yDV6K13bYq2furSP8Ag8ncr/vnSnwRViJT2GfCV7yL1yHGxLb+l3EdM9lluNEnIC9xz+f2ZL4Er6Z2DrdXN3fZwp8CU7OfDHxggle8lTLbQ1nJ/7Z7yKmey5zYGZt4h2IzR8/trRc2PDlxJPTzfVcgJ+CC0wMPOa9F6cm7up3EVM9V9386MxliVdM8GwAv6hh/awCz/w7lY25OtF5ruBz4ZLP42NYNrDAFbC3YPWuILnMAfgq3oaRQQYea/stViV+sgssvjKzLvGySeaaNVfP4d7Btokgvxj/bblgpueuF1hmWcyTCmfE3J3M1lTcv0vMswM88zR+jpw4osu6me8kzkpsfLZWzxyRuabO22buxxOJ12FxnXfWgEe83pB5sOE47BsLymzscOoi7nw2JJfZreUjiUsTyzKPZm5NvBDvSuw268AzNzV8H5/Am+qCnsAXgpgSW2Zq9cyKlksbPlTd+te4quWNieMHBfiNDdciYnwsdI/MaOaWhnMTf54J8CqNj8x8JXFIZltYu+HqlmNT8YSBsHgAPw/vxvlVV4du/s0oaxbxg0TbL/jMni0nNcVjQq7+HZfgtpbzBg342TgQ63AkmsymxBW4IjE6A+D7Vzd/fyWxIM/VuCe+HzTgZ2Jpy/kNJ2FJLmLm24mPJ/42A+Bvrxt4SISwlhsaPodH26LZB8rVA3inwwebsrixJCZzX+KMxI/7AV61eVh3DV6Mx3EOvh4kN6jAg8nfUCXm4d1wE66OyxNPTQc+s3/o/MoXizL3JE5O3F3P/uBZPPF4Zr+Wi5uSO48ZPRdyCwn7YB/A35m5KhWNHox4fcNnIs0ddOCRSBxf8+cQG+Huf0l8NJVYP+nI7NXy2ar4QqIGm69JfKPOE2w/mBavCzwM11R2D+ChsUO7hyUfmwx55qDM1xJvqZ7y08TpifuGBfjeURVJnNIVGpkNiXNS0ds7jcySDitDCCWW56LJ10fRo8sNA+3qXUSZD2CtQlZh9T+1rB7h9oliembflnMbzqgSNZKbKGHdPm7OwXb1CvQ1metSETMpszmzvikCJNh/h5E5PHNl4qga/+/cxqrdeWDYgIe7X5L4cGJPJX2940lOX8pD41FnFnc4riluvQKbK0dcHJFi2IBHNTQSlguru4d2/wPOTNzRA3x5y+U1E1uqWDkETOT026XuUJzx6u7ReLhSYenQ7uHua0fKZmwfmcPqsQjxE5WVONcRxn7X89zgn/EKPMRMxOVQXmP18Mx3q3b/Y/0cQE/IhFtHESMsHFlZ1Ml3CH3DZPHImY+pxcKumNmYirtvqMBfhMuU6s3iqOQkTsMPe1tCQwO8Ajs0lxr7W+vnp1MJc9EgCNd/cy6x+9D4veXmprj5wxMw/3C4egW6zzgZOlYZzfwo3F2J7ael0pJamvlPKgWNKFft1AAcKotXoFEbD7kaoSoQPVKB35+5KHF0lai/rJo+up87jWEE/qqqwY+qrL21LWLm95lPJ16ppKw31XC3PXYPJauPEx7B6BHCgrSizRs18qiaRp8tlN3ueCTYPHH9RNaunjI8Z7wLYpT3jZSCYXQ8e9vTsRE/q+no3XMKeObgGtaintbb/AvXj4JDkNw/5hrwYPfIvlZFUbLn7G5q+eQIN09Vnho6cqvnM/Lt99RixH49wO8K0ZL41WTWHoQzvsNVkOheZqKhEGpsp3SzB+BBtZAYve7uOR9tuTaaB6l0XScdYfEQPpkTUyHEGP+XqyDBzu+NBCITUjNWHynkrbWKOuWFn1xKzqsyx0bdvS78odp0+N503Zao0uCsWuSIDku8/7EO60b41vN5+Ses9BKlTdvd8bhp9EBvJjWJAIn/vxwHe6b3tSk6JFPV4nq85oAOrx555v/x/rh3E6Lo+bnuNS4uB4Cuq0ZfvO8X1rM6q/+vnjLVqZq7v83onttc2oYF4HPJmv1gWbB4P7s0l55ZsPhcsmY/WBYs3s8uzaVn5q3F/wf70mRuBCtbjQAAAABJRU5ErkJggg=="}},"get_space_response":{"summary":"Get details about a marketing space","value":{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"initials":"MK","disabledFeatures":[],"imageUrl":"","solution":"es"}},"update_space_request":{"summary":"Update a marketing space","description":"Update the marketing space to remove the imageUrl.","value":{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"initials":"MK","disabledFeatures":[],"imageUrl":""}}},"parameters":{"APM_UI_elastic_api_version":{"description":"The version of the API to use","in":"header","name":"elastic-api-version","required":true,"schema":{"default":"2023-10-31","enum":["2023-10-31"],"type":"string"}},"APM_UI_kbn_xsrf":{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},"Cases_alert_id":{"description":"An identifier for the alert.","in":"path","name":"alertId","required":true,"schema":{"example":"09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540","type":"string"}},"Cases_assignees_filter":{"description":"Filters the returned cases by assignees. Valid values are `none` or unique identifiers for the user profiles. These identifiers can be found by using the suggest user profile API.\n","in":"query","name":"assignees","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_string"},{"$ref":"#/components/schemas/Cases_string_array"}]}},"Cases_case_id":{"description":"The identifier for the case. To retrieve case IDs, use the find cases API. All non-ASCII characters must be URL encoded.","in":"path","name":"caseId","required":true,"schema":{"example":"9c235210-6834-11ea-a78c-6ffb38a34414","type":"string"}},"Cases_category":{"description":"Filters the returned cases by category.","in":"query","name":"category","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_case_category"},{"$ref":"#/components/schemas/Cases_case_categories"}]}},"Cases_comment_id":{"description":"The identifier for the comment. To retrieve comment IDs, use the get case or find cases APIs.\n","in":"path","name":"commentId","required":true,"schema":{"example":"71ec1870-725b-11ea-a0b2-c51ea50a58e2","type":"string"}},"Cases_configuration_id":{"description":"An identifier for the configuration.","in":"path","name":"configurationId","required":true,"schema":{"example":"3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9","type":"string"}},"Cases_connector_id":{"description":"An identifier for the connector. To retrieve connector IDs, use the find connectors API.","in":"path","name":"connectorId","required":true,"schema":{"example":"abed3a70-71bd-11ea-a0b2-c51ea50a58e2","type":"string"}},"Cases_defaultSearchOperator":{"description":"he default operator to use for the simple_query_string.","example":"OR","in":"query","name":"defaultSearchOperator","schema":{"default":"OR","type":"string"}},"Cases_from":{"description":"Returns only cases that were created after a specific date. The date must be specified as a KQL data range or date match expression.\n","in":"query","name":"from","schema":{"example":"now-1d","type":"string"}},"Cases_ids":{"description":"The cases that you want to removed. All non-ASCII characters must be URL encoded.\n","example":"d4e7abb0-b462-11ec-9a8d-698504725a43","in":"query","name":"ids","required":true,"schema":{"items":{"maxItems":100,"minItems":1,"type":"string"},"type":"array"}},"Cases_kbn_xsrf":{"description":"Cross-site request forgery protection","in":"header","name":"kbn-xsrf","required":true,"schema":{"type":"string"}},"Cases_owner_filter":{"description":"A filter to limit the response to a specific set of applications. If this parameter is omitted, the response contains information about all the cases that the user has access to read.\n","example":"cases","in":"query","name":"owner","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_owner"},{"$ref":"#/components/schemas/Cases_owners"}]}},"Cases_page_index":{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"default":1,"type":"integer"}},"Cases_page_size":{"description":"The number of items to return. Limited to 100 items.","in":"query","name":"perPage","required":false,"schema":{"default":20,"maximum":100,"type":"integer"}},"Cases_reporters":{"description":"Filters the returned cases by the user name of the reporter.","example":"elastic","in":"query","name":"reporters","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_string"},{"$ref":"#/components/schemas/Cases_string_array"}]}},"Cases_search":{"description":"An Elasticsearch simple_query_string query that filters the objects in the response.","in":"query","name":"search","schema":{"type":"string"}},"Cases_searchFields":{"description":"The fields to perform the simple_query_string parsed query against.","in":"query","name":"searchFields","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_searchFieldsType"},{"$ref":"#/components/schemas/Cases_searchFieldsTypeArray"}]}},"Cases_severity":{"description":"The severity of the case.","in":"query","name":"severity","schema":{"enum":["critical","high","low","medium"],"type":"string"}},"Cases_sort_order":{"description":"Determines the sort order.","in":"query","name":"sortOrder","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},"Cases_sortField":{"description":"Determines which field is used to sort the results.","example":"updatedAt","in":"query","name":"sortField","schema":{"default":"createdAt","enum":["createdAt","updatedAt","closedAt","title","category","status","severity"],"type":"string"}},"Cases_status":{"description":"Filters the returned cases by state.","example":"open","in":"query","name":"status","schema":{"enum":["closed","in-progress","open"],"type":"string"}},"Cases_tags":{"description":"Filters the returned cases by tags.","example":"tag-1","in":"query","name":"tags","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_string"},{"$ref":"#/components/schemas/Cases_string_array"}]}},"Cases_to":{"description":"Returns only cases that were created before a specific date. The date must be specified as a KQL data range or date match expression.\n","example":"now+1d","in":"query","name":"to","schema":{"type":"string"}},"Cases_user_action_types":{"description":"Determines the types of user actions to return.","example":"create_case","in":"query","name":"types","schema":{"items":{"enum":["action","alert","assignees","attachment","comment","connector","create_case","description","pushed","settings","severity","status","tags","title","user"],"type":"string"},"type":"array"}},"Data_views_field_name":{"description":"The name of the runtime field.","in":"path","name":"fieldName","required":true,"schema":{"example":"hour_of_day","type":"string"}},"Data_views_kbn_xsrf":{"description":"Cross-site request forgery protection","in":"header","name":"kbn-xsrf","required":true,"schema":{"type":"string"}},"Data_views_view_id":{"description":"An identifier for the data view.","in":"path","name":"viewId","required":true,"schema":{"example":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","type":"string"}},"Machine_learning_APIs_simulateParam":{"description":"When true, simulates the synchronization by returning only the list of actions that would be performed.","example":"true","in":"query","name":"simulate","required":false,"schema":{"type":"boolean"}},"Saved_objects_kbn_xsrf":{"description":"Cross-site request forgery protection","in":"header","name":"kbn-xsrf","required":true,"schema":{"type":"string"}},"Saved_objects_saved_object_id":{"description":"An identifier for the saved object.","in":"path","name":"id","required":true,"schema":{"type":"string"}},"Saved_objects_saved_object_type":{"description":"Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`.","in":"path","name":"type","required":true,"schema":{"type":"string"}},"Short_URL_APIs_idParam":{"description":"The identifier for the short URL.","in":"path","name":"id","required":true,"schema":{"type":"string"}},"SLOs_kbn_xsrf":{"description":"Cross-site request forgery protection","in":"header","name":"kbn-xsrf","required":true,"schema":{"type":"string"}},"SLOs_slo_id":{"description":"An identifier for the slo.","in":"path","name":"sloId","required":true,"schema":{"example":"9c235211-6834-11ea-a78c-6feb38a34414","type":"string"}},"SLOs_space_id":{"description":"An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.","in":"path","name":"spaceId","required":true,"schema":{"example":"default","type":"string"}}},"schemas":{"Alerting_401_response":{"properties":{"error":{"enum":["Unauthorized"],"example":"Unauthorized","type":"string"},"message":{"type":"string"},"statusCode":{"enum":[401],"example":401,"type":"integer"}},"title":"Unsuccessful rule API response","type":"object"},"Alerting_fieldmap_properties":{"title":"Field map objects in the get rule types response","type":"object","properties":{"array":{"description":"Indicates whether the field is an array.","type":"boolean"},"dynamic":{"description":"Indicates whether it is a dynamic field mapping.","type":"boolean"},"format":{"description":"Indicates the format of the field. For example, if the `type` is `date_range`, the `format` can be `epoch_millis||strict_date_optional_time`.\n","type":"string"},"ignore_above":{"description":"Specifies the maximum length of a string field. Longer strings are not indexed or stored.","type":"integer"},"index":{"description":"Indicates whether field values are indexed.","type":"boolean"},"path":{"description":"TBD","type":"string"},"properties":{"additionalProperties":{"type":"object","properties":{"type":{"description":"The data type for each object property.","type":"string"}}},"description":"Details about the object properties. This property is applicable when `type` is `object`.\n","type":"object"},"required":{"description":"Indicates whether the field is required.","type":"boolean"},"scaling_factor":{"description":"The scaling factor to use when encoding values. This property is applicable when `type` is `scaled_float`. Values will be multiplied by this factor at index time and rounded to the closest long value. \n","type":"integer"},"type":{"description":"Specifies the data type for the field.","example":"scaled_float","type":"string"}}},"APM_UI_400_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Not Found","type":"string"},"message":{"description":"Error message","example":"Not Found","type":"string"},"statusCode":{"description":"Error status code","example":400,"type":"number"}}},"APM_UI_401_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Unauthorized","type":"string"},"message":{"description":"Error message","type":"string"},"statusCode":{"description":"Error status code","example":401,"type":"number"}}},"APM_UI_403_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Forbidden","type":"string"},"message":{"description":"Error message","type":"string"},"statusCode":{"description":"Error status code","example":403,"type":"number"}}},"APM_UI_404_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Not Found","type":"string"},"message":{"description":"Error message","example":"Not Found","type":"string"},"statusCode":{"description":"Error status code","example":404,"type":"number"}}},"APM_UI_500_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Internal Server Error","type":"string"},"message":{"description":"Error message","type":"string"},"statusCode":{"description":"Error status code","example":500,"type":"number"}}},"APM_UI_501_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Not Implemented","type":"string"},"message":{"description":"Error message","example":"Not Implemented","type":"string"},"statusCode":{"description":"Error status code","example":501,"type":"number"}}},"APM_UI_agent_configuration_intake_object":{"type":"object","properties":{"agent_name":{"description":"The agent name is used by the UI to determine which settings to display.","type":"string"},"service":{"$ref":"#/components/schemas/APM_UI_service_object"},"settings":{"$ref":"#/components/schemas/APM_UI_settings_object"}},"required":["service","settings"]},"APM_UI_agent_configuration_object":{"description":"Agent configuration","type":"object","properties":{"@timestamp":{"description":"Timestamp","example":1730194190636,"type":"number"},"agent_name":{"description":"Agent name","type":"string"},"applied_by_agent":{"description":"Applied by agent","example":true,"type":"boolean"},"etag":{"description":"`etag` is sent by the APM agent to indicate the `etag` of the last successfully applied configuration. If the `etag` matches an existing configuration its `applied_by_agent` property will be set to `true`. Every time a configuration is edited `applied_by_agent` is reset to `false`.\n","example":"0bc3b5ebf18fba8163fe4c96f491e3767a358f85","type":"string"},"service":{"$ref":"#/components/schemas/APM_UI_service_object"},"settings":{"$ref":"#/components/schemas/APM_UI_settings_object"}},"required":["service","settings","@timestamp","etag"]},"APM_UI_agent_configurations_response":{"type":"object","properties":{"configurations":{"description":"Agent configuration","items":{"$ref":"#/components/schemas/APM_UI_agent_configuration_object"},"type":"array"}}},"APM_UI_agent_keys_object":{"type":"object","properties":{"name":{"description":"The name of the APM agent key.","type":"string"},"privileges":{"description":"The APM agent key privileges. It can take one or more of the following values:\n* `event:write`, which is required for ingesting APM agent events. * `config_agent:read`, which is required for APM agents to read agent configuration remotely.\n","items":{"enum":["event:write","config_agent:read"],"type":"string"},"type":"array"}},"required":["name","privileges"]},"APM_UI_agent_keys_response":{"type":"object","properties":{"agentKey":{"description":"Agent key","type":"object","properties":{"api_key":{"type":"string"},"encoded":{"type":"string"},"expiration":{"format":"int64","type":"integer"},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name","api_key","encoded"]}}},"APM_UI_annotation_search_response":{"type":"object","properties":{"annotations":{"description":"Annotations","items":{"type":"object","properties":{"@timestamp":{"type":"number"},"id":{"type":"string"},"text":{"type":"string"},"type":{"enum":["version"],"type":"string"}}},"type":"array"}}},"APM_UI_base_source_map_object":{"type":"object","properties":{"compressionAlgorithm":{"description":"Compression Algorithm","type":"string"},"created":{"description":"Created date","type":"string"},"decodedSha256":{"description":"Decoded SHA-256","type":"string"},"decodedSize":{"description":"Decoded size","type":"number"},"encodedSha256":{"description":"Encoded SHA-256","type":"string"},"encodedSize":{"description":"Encoded size","type":"number"},"encryptionAlgorithm":{"description":"Encryption Algorithm","type":"string"},"id":{"description":"Identifier","type":"string"},"identifier":{"description":"Identifier","type":"string"},"packageName":{"description":"Package name","type":"string"},"relative_url":{"description":"Relative URL","type":"string"},"type":{"description":"Type","type":"string"}}},"APM_UI_create_annotation_object":{"type":"object","properties":{"@timestamp":{"description":"The date and time of the annotation. It must be in ISO 8601 format.","type":"string"},"message":{"description":"The message displayed in the annotation. It defaults to `service.version`.","type":"string"},"service":{"description":"The service that identifies the configuration to create or update.","type":"object","properties":{"environment":{"description":"The environment of the service.","type":"string"},"version":{"description":"The version of the service.","type":"string"}},"required":["version"]},"tags":{"description":"Tags are used by the Applications UI to distinguish APM annotations from other annotations. Tags may have additional functionality in future releases. It defaults to `[apm]`. While you can add additional tags, you cannot remove the `apm` tag.\n","items":{"type":"string"},"type":"array"}},"required":["@timestamp","service"]},"APM_UI_create_annotation_response":{"type":"object","properties":{"_id":{"description":"Identifier","type":"string"},"_index":{"description":"Index","type":"string"},"_source":{"description":"Response","type":"object","properties":{"@timestamp":{"type":"string"},"annotation":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":"string"}}},"event":{"type":"object","properties":{"created":{"type":"string"}}},"message":{"type":"string"},"service":{"type":"object","properties":{"environment":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"}}},"tags":{"items":{"type":"string"},"type":"array"}}}}},"APM_UI_delete_agent_configurations_response":{"type":"object","properties":{"result":{"description":"Result","type":"string"}}},"APM_UI_search_agent_configuration_object":{"type":"object","properties":{"etag":{"description":"If etags match then `applied_by_agent` field will be set to `true`","example":"0bc3b5ebf18fba8163fe4c96f491e3767a358f85","type":"string"},"mark_as_applied_by_agent":{"description":"`markAsAppliedByAgent=true` means \"force setting it to true regardless of etag\".\nThis is needed for Jaeger agent that doesn't have etags\n","type":"boolean"},"service":{"$ref":"#/components/schemas/APM_UI_service_object"}},"required":["service"]},"APM_UI_search_agent_configuration_response":{"type":"object","properties":{"_id":{"description":"Identifier","type":"string"},"_index":{"description":"Index","type":"string"},"_score":{"description":"Score","type":"number"},"_source":{"$ref":"#/components/schemas/APM_UI_agent_configuration_object"}}},"APM_UI_service_agent_name_response":{"type":"object","properties":{"agentName":{"description":"Agent name","example":"nodejs","type":"string"}}},"APM_UI_service_environment_object":{"type":"object","properties":{"alreadyConfigured":{"description":"Already configured","type":"boolean"},"name":{"description":"Service environment name","example":"ALL_OPTION_VALUE","type":"string"}}},"APM_UI_service_environments_response":{"type":"object","properties":{"environments":{"description":"Service environment list","items":{"$ref":"#/components/schemas/APM_UI_service_environment_object"},"type":"array"}}},"APM_UI_service_object":{"description":"Service","type":"object","properties":{"environment":{"description":"The environment of the service.","example":"prod","type":"string"},"name":{"description":"The name of the service.","example":"node","type":"string"}}},"APM_UI_settings_object":{"additionalProperties":{"type":"string"},"description":"Agent configuration settings","type":"object"},"APM_UI_single_agent_configuration_response":{"allOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"$ref":"#/components/schemas/APM_UI_agent_configuration_object"}]},"APM_UI_source_maps_response":{"type":"object","properties":{"artifacts":{"description":"Artifacts","items":{"allOf":[{"type":"object","properties":{"body":{"type":"object","properties":{"bundleFilepath":{"type":"string"},"serviceName":{"type":"string"},"serviceVersion":{"type":"string"},"sourceMap":{"type":"object","properties":{"file":{"type":"string"},"mappings":{"type":"string"},"sourceRoot":{"type":"string"},"sources":{"items":{"type":"string"},"type":"array"},"sourcesContent":{"items":{"type":"string"},"type":"array"},"version":{"type":"number"}}}}}}},{"$ref":"#/components/schemas/APM_UI_base_source_map_object"}]},"type":"array"}}},"APM_UI_upload_source_map_object":{"type":"object","properties":{"bundle_filepath":{"description":"The absolute path of the final bundle as used in the web application.","type":"string"},"service_name":{"description":"The name of the service that the service map should apply to.","type":"string"},"service_version":{"description":"The version of the service that the service map should apply to.","type":"string"},"sourcemap":{"description":"The source map. It can be a string or file upload. It must follow the\n[source map format specification](https://tc39.es/ecma426/).\n","format":"binary","type":"string"}},"required":["service_name","service_version","bundle_filepath","sourcemap"]},"APM_UI_upload_source_maps_response":{"allOf":[{"type":"object","properties":{"body":{"type":"string"}}},{"$ref":"#/components/schemas/APM_UI_base_source_map_object"}]},"Cases_4xx_response":{"properties":{"error":{"example":"Unauthorized","type":"string"},"message":{"type":"string"},"statusCode":{"example":401,"type":"integer"}},"title":"Unsuccessful cases API response","type":"object"},"Cases_actions":{"enum":["add","create","delete","push_to_service","update"],"example":"create","type":"string"},"Cases_add_alert_comment_request_properties":{"description":"Defines properties for case comment requests when type is alert.","type":"object","properties":{"alertId":{"$ref":"#/components/schemas/Cases_alert_identifiers"},"index":{"$ref":"#/components/schemas/Cases_alert_indices"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"rule":{"$ref":"#/components/schemas/Cases_rule"},"type":{"description":"The type of comment.","enum":["alert"],"example":"alert","type":"string"}},"required":["alertId","index","owner","rule","type"],"title":"Add case comment request properties for alerts"},"Cases_add_case_comment_request":{"description":"The add comment to case API request body varies depending on whether you are adding an alert or a comment.","discriminator":{"mapping":{"alert":"#/components/schemas/Cases_add_alert_comment_request_properties","user":"#/components/schemas/Cases_add_user_comment_request_properties"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Cases_add_alert_comment_request_properties"},{"$ref":"#/components/schemas/Cases_add_user_comment_request_properties"}],"title":"Add case comment request"},"Cases_add_case_file_request":{"description":"Defines the file that will be attached to the case. Optional parameters will be generated automatically from the file metadata if not defined.","type":"object","properties":{"file":{"description":"The file being attached to the case.","format":"binary","type":"string"},"filename":{"description":"The desired name of the file being attached to the case, it can be different than the name of the file in the filesystem. **This should not include the file extension.**","type":"string"}},"required":["file"],"title":"Add case file request properties"},"Cases_add_user_comment_request_properties":{"description":"Defines properties for case comment requests when type is user.","properties":{"comment":{"description":"The new comment. It is required only when `type` is `user`.","example":"A new comment.","maxLength":30000,"type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"type":{"description":"The type of comment.","enum":["user"],"example":"user","type":"string"}},"required":["comment","owner","type"],"title":"Add case comment request properties for user comments","type":"object"},"Cases_alert_comment_response_properties":{"title":"Add case comment response properties for alerts","type":"object","properties":{"alertId":{"items":{"example":"a6e12ac4-7bce-457b-84f6-d7ce8deb8446","type":"string"},"type":"array"},"created_at":{"example":"2023-11-06T19:29:38.424Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"id":{"example":"73362370-ab1a-11ec-985f-97e55adae8b9","type":"string"},"index":{"items":{"example":".internal.alerts-security.alerts-default-000001","type":"string"},"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"pushed_at":{"example":null,"format":"date-time","nullable":true,"type":"string"},"pushed_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"rule":{"type":"object","properties":{"id":{"description":"The rule identifier.","example":"94d80550-aaf4-11ec-985f-97e55adae8b9","type":"string"},"name":{"description":"The rule name.","example":"security_rule","type":"string"}}},"type":{"enum":["alert"],"example":"alert","type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"updated_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"version":{"example":"WzMwNDgsMV0=","type":"string"}},"required":["type"]},"Cases_alert_identifiers":{"description":"The alert identifiers. It is required only when `type` is `alert`. You can use an array of strings to add multiple alerts to a case, provided that they all relate to the same rule; `index` must also be an array with the same length or number of elements. Adding multiple alerts in this manner is recommended rather than calling the API multiple times. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n","example":"6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42","oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":1000,"type":"array"}],"title":"Alert identifiers","x-state":"Technical preview"},"Cases_alert_indices":{"description":"The alert indices. It is required only when `type` is `alert`. If you are adding multiple alerts to a case, use an array of strings; the position of each index name in the array must match the position of the corresponding alert identifier in the `alertId` array. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n","oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":1000,"type":"array"}],"title":"Alert indices","x-state":"Technical preview"},"Cases_alert_response_properties":{"type":"object","properties":{"attached_at":{"format":"date-time","type":"string"},"id":{"description":"The alert identifier.","type":"string"},"index":{"description":"The alert index.","type":"string"}}},"Cases_assignees":{"description":"An array containing users that are assigned to the case.","items":{"type":"object","properties":{"uid":{"description":"A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.","example":"u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0","type":"string"}},"required":["uid"]},"maxItems":10,"nullable":true,"type":"array"},"Cases_case_categories":{"items":{"$ref":"#/components/schemas/Cases_case_category"},"maxItems":100,"type":"array"},"Cases_case_category":{"description":"A word or phrase that categorizes the case.","maxLength":50,"type":"string"},"Cases_case_description":{"description":"The description for the case.","maxLength":30000,"type":"string"},"Cases_case_response_closed_by_properties":{"nullable":true,"properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"],"title":"Case response properties for closed_by","type":"object"},"Cases_case_response_created_by_properties":{"title":"Case response properties for created_by","type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"Cases_case_response_properties":{"title":"Case response properties","type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"category":{"description":"The case category.","nullable":true,"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"closed_by":{"$ref":"#/components/schemas/Cases_case_response_closed_by_properties"},"comments":{"description":"An array of comment objects for the case.","items":{"discriminator":{"mapping":{"alert":"#/components/schemas/Cases_alert_comment_response_properties","user":"#/components/schemas/Cases_user_comment_response_properties"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Cases_alert_comment_response_properties"},{"$ref":"#/components/schemas/Cases_user_comment_response_properties"}]},"maxItems":10000,"title":"Case response properties for comments","type":"array"},"connector":{"discriminator":{"mapping":{".cases-webhook":"#/components/schemas/Cases_connector_properties_cases_webhook",".jira":"#/components/schemas/Cases_connector_properties_jira",".none":"#/components/schemas/Cases_connector_properties_none",".resilient":"#/components/schemas/Cases_connector_properties_resilient",".servicenow":"#/components/schemas/Cases_connector_properties_servicenow",".servicenow-sir":"#/components/schemas/Cases_connector_properties_servicenow_sir",".swimlane":"#/components/schemas/Cases_connector_properties_swimlane"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Cases_connector_properties_none"},{"$ref":"#/components/schemas/Cases_connector_properties_cases_webhook"},{"$ref":"#/components/schemas/Cases_connector_properties_jira"},{"$ref":"#/components/schemas/Cases_connector_properties_resilient"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow_sir"},{"$ref":"#/components/schemas/Cases_connector_properties_swimlane"}],"title":"Case response properties for connectors"},"created_at":{"example":"2022-05-13T09:16:17.416Z","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/Cases_case_response_created_by_properties"},"customFields":{"description":"Custom field values for the case.","items":{"type":"object","properties":{"key":{"description":"The unique identifier for the custom field. The key value must exist in the case configuration settings.\n","type":"string"},"type":{"description":"The custom field type. It must match the type specified in the case configuration settings.\n","enum":["text","toggle"],"type":"string"},"value":{"description":"The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n","oneOf":[{"maxLength":160,"minLength":1,"nullable":true,"type":"string"},{"type":"boolean"}]}}},"type":"array"},"description":{"example":"A case description.","type":"string"},"duration":{"description":"The elapsed time from the creation of the case to its closure (in seconds). If the case has not been closed, the duration is set to null. If the case was closed after less than half a second, the duration is rounded down to zero.\n","example":120,"nullable":true,"type":"integer"},"external_service":{"$ref":"#/components/schemas/Cases_external_service"},"id":{"example":"66b9aa00-94fa-11ea-9f74-e7e108796192","type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"status":{"$ref":"#/components/schemas/Cases_case_status"},"tags":{"example":["tag-1"],"items":{"type":"string"},"type":"array"},"title":{"example":"Case title 1","type":"string"},"totalAlerts":{"example":0,"type":"integer"},"totalComment":{"example":0,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"updated_by":{"$ref":"#/components/schemas/Cases_case_response_updated_by_properties"},"version":{"example":"WzUzMiwxXQ==","type":"string"}},"required":["closed_at","closed_by","comments","connector","created_at","created_by","description","duration","external_service","id","owner","settings","severity","status","tags","title","totalAlerts","totalComment","updated_at","updated_by","version"]},"Cases_case_response_pushed_by_properties":{"nullable":true,"properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"],"title":"Case response properties for pushed_by","type":"object"},"Cases_case_response_updated_by_properties":{"nullable":true,"properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"],"title":"Case response properties for updated_by","type":"object"},"Cases_case_severity":{"default":"low","description":"The severity of the case.","enum":["critical","high","low","medium"],"type":"string"},"Cases_case_status":{"description":"The status of the case.","enum":["closed","in-progress","open"],"type":"string"},"Cases_case_tags":{"description":"The words and phrases that help categorize cases. It can be an empty array.\n","items":{"maxLength":256,"type":"string"},"maxItems":200,"type":"array"},"Cases_case_title":{"description":"A title for the case.","maxLength":160,"type":"string"},"Cases_closure_types":{"description":"Indicates whether a case is automatically closed when it is pushed to external systems (`close-by-pushing`) or not automatically closed (`close-by-user`).","enum":["close-by-pushing","close-by-user"],"example":"close-by-user","type":"string"},"Cases_connector_properties_cases_webhook":{"description":"Defines properties for connectors when type is `.cases-webhook`.","type":"object","properties":{"fields":{"example":null,"nullable":true,"type":"string"},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".cases-webhook"],"example":".cases-webhook","type":"string"}},"required":["fields","id","name","type"],"title":"Create or upate case request properties for Cases Webhook connector"},"Cases_connector_properties_jira":{"description":"Defines properties for connectors when type is `.jira`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","type":"object","properties":{"issueType":{"description":"The type of issue.","nullable":true,"type":"string"},"parent":{"description":"The key of the parent issue, when the issue type is sub-task.","nullable":true,"type":"string"},"priority":{"description":"The priority of the issue.","nullable":true,"type":"string"}},"required":["issueType","parent","priority"]},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".jira"],"example":".jira","type":"string"}},"required":["fields","id","name","type"],"title":"Create or update case request properties for a Jira connector"},"Cases_connector_properties_none":{"description":"Defines properties for connectors when type is `.none`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. To create a case without a connector, specify null. To update a case to remove the connector, specify null.","example":null,"nullable":true,"type":"string"},"id":{"description":"The identifier for the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`.","example":"none","type":"string"},"name":{"description":"The name of the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`.","example":"none","type":"string"},"type":{"description":"The type of connector. To create a case without a connector, use `.none`. To update a case to remove the connector, specify `.none`.","enum":[".none"],"example":".none","type":"string"}},"required":["fields","id","name","type"],"title":"Create or update case request properties for no connector"},"Cases_connector_properties_resilient":{"description":"Defines properties for connectors when type is `.resilient`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","nullable":true,"type":"object","properties":{"issueTypes":{"description":"The type of incident.","items":{"type":"string"},"type":"array"},"severityCode":{"description":"The severity code of the incident.","type":"string"}},"required":["issueTypes","severityCode"]},"id":{"description":"The identifier for the connector.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".resilient"],"example":".resilient","type":"string"}},"required":["fields","id","name","type"],"title":"Create case request properties for a IBM Resilient connector"},"Cases_connector_properties_servicenow":{"description":"Defines properties for connectors when type is `.servicenow`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","type":"object","properties":{"category":{"description":"The category of the incident.","nullable":true,"type":"string"},"impact":{"description":"The effect an incident had on business.","nullable":true,"type":"string"},"severity":{"description":"The severity of the incident.","nullable":true,"type":"string"},"subcategory":{"description":"The subcategory of the incident.","nullable":true,"type":"string"},"urgency":{"description":"The extent to which the incident resolution can be delayed.","nullable":true,"type":"string"}},"required":["category","impact","severity","subcategory","urgency"]},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".servicenow"],"example":".servicenow","type":"string"}},"required":["fields","id","name","type"],"title":"Create case request properties for a ServiceNow ITSM connector"},"Cases_connector_properties_servicenow_sir":{"description":"Defines properties for connectors when type is `.servicenow-sir`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","type":"object","properties":{"category":{"description":"The category of the incident.","nullable":true,"type":"string"},"destIp":{"description":"Indicates whether cases will send a comma-separated list of destination IPs.","nullable":true,"type":"boolean"},"malwareHash":{"description":"Indicates whether cases will send a comma-separated list of malware hashes.","nullable":true,"type":"boolean"},"malwareUrl":{"description":"Indicates whether cases will send a comma-separated list of malware URLs.","nullable":true,"type":"boolean"},"priority":{"description":"The priority of the issue.","nullable":true,"type":"string"},"sourceIp":{"description":"Indicates whether cases will send a comma-separated list of source IPs.","nullable":true,"type":"boolean"},"subcategory":{"description":"The subcategory of the incident.","nullable":true,"type":"string"}},"required":["category","destIp","malwareHash","malwareUrl","priority","sourceIp","subcategory"]},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".servicenow-sir"],"example":".servicenow-sir","type":"string"}},"required":["fields","id","name","type"],"title":"Create case request properties for a ServiceNow SecOps connector"},"Cases_connector_properties_swimlane":{"description":"Defines properties for connectors when type is `.swimlane`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","type":"object","properties":{"caseId":{"description":"The case identifier for Swimlane connectors.","nullable":true,"type":"string"}},"required":["caseId"]},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".swimlane"],"example":".swimlane","type":"string"}},"required":["fields","id","name","type"],"title":"Create case request properties for a Swimlane connector"},"Cases_connector_types":{"description":"The type of connector.","enum":[".cases-webhook",".jira",".none",".resilient",".servicenow",".servicenow-sir",".swimlane"],"example":".none","type":"string"},"Cases_create_case_request":{"description":"The create case API request body varies depending on the type of connector.","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"category":{"$ref":"#/components/schemas/Cases_case_category"},"connector":{"oneOf":[{"$ref":"#/components/schemas/Cases_connector_properties_none"},{"$ref":"#/components/schemas/Cases_connector_properties_cases_webhook"},{"$ref":"#/components/schemas/Cases_connector_properties_jira"},{"$ref":"#/components/schemas/Cases_connector_properties_resilient"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow_sir"},{"$ref":"#/components/schemas/Cases_connector_properties_swimlane"}]},"customFields":{"description":"Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.\n","items":{"type":"object","properties":{"key":{"description":"The unique identifier for the custom field. The key value must exist in the case configuration settings.\n","type":"string"},"type":{"description":"The custom field type. It must match the type specified in the case configuration settings.\n","enum":["text","toggle"],"type":"string"},"value":{"description":"The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n","oneOf":[{"maxLength":160,"minLength":1,"nullable":true,"type":"string"},{"type":"boolean"}]}},"required":["key","type","value"]},"maxItems":10,"minItems":0,"type":"array"},"description":{"$ref":"#/components/schemas/Cases_case_description"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"tags":{"$ref":"#/components/schemas/Cases_case_tags"},"title":{"$ref":"#/components/schemas/Cases_case_title"}},"required":["connector","description","owner","settings","tags","title"],"title":"Create case request","type":"object"},"Cases_external_service":{"nullable":true,"type":"object","properties":{"connector_id":{"type":"string"},"connector_name":{"type":"string"},"external_id":{"type":"string"},"external_title":{"type":"string"},"external_url":{"type":"string"},"pushed_at":{"format":"date-time","type":"string"},"pushed_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}}}}},"Cases_owner":{"description":"The application that owns the cases: Stack Management, Observability, or Elastic Security.\n","enum":["cases","observability","securitySolution"],"example":"cases","type":"string"},"Cases_owners":{"items":{"$ref":"#/components/schemas/Cases_owner"},"type":"array"},"Cases_payload_alert_comment":{"type":"object","properties":{"comment":{"type":"object","properties":{"alertId":{"oneOf":[{"example":"1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d","type":"string"},{"items":{"type":"string"},"type":"array"}]},"index":{"oneOf":[{"example":".alerts-observability.logs.alerts-default","type":"string"},{"items":{"type":"string"},"type":"array"}]},"owner":{"$ref":"#/components/schemas/Cases_owner"},"rule":{"type":"object","properties":{"id":{"description":"The rule identifier.","example":"94d80550-aaf4-11ec-985f-97e55adae8b9","type":"string"},"name":{"description":"The rule name.","example":"security_rule","type":"string"}}},"type":{"enum":["alert"],"type":"string"}}}}},"Cases_payload_assignees":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"}}},"Cases_payload_connector":{"type":"object","properties":{"connector":{"type":"object","properties":{"fields":{"description":"An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.","example":null,"nullable":true,"type":"object","properties":{"caseId":{"description":"The case identifier for Swimlane connectors.","type":"string"},"category":{"description":"The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors.","type":"string"},"destIp":{"description":"Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"impact":{"description":"The effect an incident had on business for ServiceNow ITSM connectors.","type":"string"},"issueType":{"description":"The type of issue for Jira connectors.","type":"string"},"issueTypes":{"description":"The type of incident for IBM Resilient connectors.","items":{"type":"string"},"type":"array"},"malwareHash":{"description":"Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"malwareUrl":{"description":"Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"parent":{"description":"The key of the parent issue, when the issue type is sub-task for Jira connectors.","type":"string"},"priority":{"description":"The priority of the issue for Jira and ServiceNow SecOps connectors.","type":"string"},"severity":{"description":"The severity of the incident for ServiceNow ITSM connectors.","type":"string"},"severityCode":{"description":"The severity code of the incident for IBM Resilient connectors.","type":"string"},"sourceIp":{"description":"Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"subcategory":{"description":"The subcategory of the incident for ServiceNow ITSM connectors.","type":"string"},"urgency":{"description":"The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors.","type":"string"}}},"id":{"description":"The identifier for the connector. To create a case without a connector, use `none`.","example":"none","type":"string"},"name":{"description":"The name of the connector. To create a case without a connector, use `none`.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}}}},"Cases_payload_create_case":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"connector":{"type":"object","properties":{"fields":{"description":"An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.","example":null,"nullable":true,"type":"object","properties":{"caseId":{"description":"The case identifier for Swimlane connectors.","type":"string"},"category":{"description":"The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors.","type":"string"},"destIp":{"description":"Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"impact":{"description":"The effect an incident had on business for ServiceNow ITSM connectors.","type":"string"},"issueType":{"description":"The type of issue for Jira connectors.","type":"string"},"issueTypes":{"description":"The type of incident for IBM Resilient connectors.","items":{"type":"string"},"type":"array"},"malwareHash":{"description":"Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"malwareUrl":{"description":"Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"parent":{"description":"The key of the parent issue, when the issue type is sub-task for Jira connectors.","type":"string"},"priority":{"description":"The priority of the issue for Jira and ServiceNow SecOps connectors.","type":"string"},"severity":{"description":"The severity of the incident for ServiceNow ITSM connectors.","type":"string"},"severityCode":{"description":"The severity code of the incident for IBM Resilient connectors.","type":"string"},"sourceIp":{"description":"Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"subcategory":{"description":"The subcategory of the incident for ServiceNow ITSM connectors.","type":"string"},"urgency":{"description":"The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors.","type":"string"}}},"id":{"description":"The identifier for the connector. To create a case without a connector, use `none`.","example":"none","type":"string"},"name":{"description":"The name of the connector. To create a case without a connector, use `none`.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"description":{"type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"status":{"$ref":"#/components/schemas/Cases_case_status"},"tags":{"items":{"example":["tag-1"],"type":"string"},"type":"array"},"title":{"type":"string"}}},"Cases_payload_delete":{"description":"If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable.","nullable":true,"type":"object"},"Cases_payload_description":{"type":"object","properties":{"description":{"type":"string"}}},"Cases_payload_pushed":{"type":"object","properties":{"externalService":{"$ref":"#/components/schemas/Cases_external_service"}}},"Cases_payload_settings":{"type":"object","properties":{"settings":{"$ref":"#/components/schemas/Cases_settings"}}},"Cases_payload_severity":{"type":"object","properties":{"severity":{"$ref":"#/components/schemas/Cases_case_severity"}}},"Cases_payload_status":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Cases_case_status"}}},"Cases_payload_tags":{"type":"object","properties":{"tags":{"example":["tag-1"],"items":{"type":"string"},"type":"array"}}},"Cases_payload_title":{"type":"object","properties":{"title":{"type":"string"}}},"Cases_payload_user_comment":{"type":"object","properties":{"comment":{"type":"object","properties":{"comment":{"type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"type":{"enum":["user"],"type":"string"}}}}},"Cases_rule":{"description":"The rule that is associated with the alerts. It is required only when `type` is `alert`. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n","title":"Alerting rule","type":"object","properties":{"id":{"description":"The rule identifier.","example":"94d80550-aaf4-11ec-985f-97e55adae8b9","type":"string"},"name":{"description":"The rule name.","example":"security_rule","type":"string"}},"x-state":"Technical preview"},"Cases_searchFieldsType":{"description":"The fields to perform the `simple_query_string` parsed query against.","enum":["description","title"],"type":"string"},"Cases_searchFieldsTypeArray":{"items":{"$ref":"#/components/schemas/Cases_searchFieldsType"},"type":"array"},"Cases_set_case_configuration_request":{"description":"External connection details, such as the closure type and default connector for cases.","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"description":"An object that contains the connector configuration.","type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}},"required":["fields","id","name","type"]},"customFields":{"description":"Custom fields case configuration.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}},"required":["key","label","required","type"]},"maxItems":10,"minItems":0,"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"templates":{"$ref":"#/components/schemas/Cases_templates"}},"required":["closure_type","connector","owner"],"title":"Set case configuration request","type":"object"},"Cases_settings":{"description":"An object that contains the case settings.","type":"object","properties":{"syncAlerts":{"description":"Turns alert syncing on or off.","example":true,"type":"boolean"}},"required":["syncAlerts"]},"Cases_string":{"type":"string"},"Cases_string_array":{"items":{"$ref":"#/components/schemas/Cases_string"},"maxItems":100,"type":"array"},"Cases_template_tags":{"description":"The words and phrases that help categorize templates. It can be an empty array.\n","items":{"maxLength":256,"type":"string"},"maxItems":200,"type":"array"},"Cases_templates":{"items":{"type":"object","properties":{"caseFields":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"category":{"$ref":"#/components/schemas/Cases_case_category"},"connector":{"type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"customFields":{"description":"Custom field values in the template.","items":{"type":"object","properties":{"key":{"description":"The unique key for the custom field.","type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"value":{"description":"The default value for the custom field when a case uses the template. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]}}},"type":"array","x-state":"Technical preview"},"description":{"$ref":"#/components/schemas/Cases_case_description"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"tags":{"$ref":"#/components/schemas/Cases_case_tags"},"title":{"$ref":"#/components/schemas/Cases_case_title"}}},"description":{"description":"A description for the template.","type":"string"},"key":{"description":"A unique key for the template. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific template.\n","type":"string"},"name":{"description":"The name of the template.","type":"string"},"tags":{"$ref":"#/components/schemas/Cases_template_tags"}}},"type":"array","x-state":"Technical preview"},"Cases_update_alert_comment_request_properties":{"description":"Defines properties for case comment requests when type is alert.","type":"object","properties":{"alertId":{"$ref":"#/components/schemas/Cases_alert_identifiers"},"id":{"description":"The identifier for the comment. To retrieve comment IDs, use the get comments API.\n","example":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","type":"string"},"index":{"$ref":"#/components/schemas/Cases_alert_indices"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"rule":{"$ref":"#/components/schemas/Cases_rule"},"type":{"description":"The type of comment.","enum":["alert"],"example":"alert","type":"string"},"version":{"description":"The current comment version. To retrieve version values, use the get comments API.\n","example":"Wzk1LDFd","type":"string"}},"required":["alertId","id","index","owner","rule","type","version"],"title":"Update case comment request properties for alerts"},"Cases_update_case_comment_request":{"description":"The update case comment API request body varies depending on whether you are updating an alert or a comment.","discriminator":{"mapping":{"alert":"#/components/schemas/Cases_update_alert_comment_request_properties","user":"#/components/schemas/Cases_update_user_comment_request_properties"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Cases_update_alert_comment_request_properties"},{"$ref":"#/components/schemas/Cases_update_user_comment_request_properties"}],"title":"Update case comment request"},"Cases_update_case_configuration_request":{"description":"You can update settings such as the closure type, custom fields, templates, and the default connector for cases.\n","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"description":"An object that contains the connector configuration.","type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}},"required":["fields","id","name","type"]},"customFields":{"description":"Custom fields case configuration.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}},"required":["key","label","required","type"]},"type":"array"},"templates":{"$ref":"#/components/schemas/Cases_templates"},"version":{"description":"The version of the connector. To retrieve the version value, use the get configuration API.\n","example":"WzIwMiwxXQ==","type":"string"}},"required":["version"],"title":"Update case configuration request","type":"object"},"Cases_update_case_request":{"description":"The update case API request body varies depending on the type of connector.","properties":{"cases":{"description":"An array containing one or more case objects.","items":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"category":{"$ref":"#/components/schemas/Cases_case_category"},"connector":{"oneOf":[{"$ref":"#/components/schemas/Cases_connector_properties_none"},{"$ref":"#/components/schemas/Cases_connector_properties_cases_webhook"},{"$ref":"#/components/schemas/Cases_connector_properties_jira"},{"$ref":"#/components/schemas/Cases_connector_properties_resilient"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow_sir"},{"$ref":"#/components/schemas/Cases_connector_properties_swimlane"}]},"customFields":{"description":"Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.\n","items":{"type":"object","properties":{"key":{"description":"The unique identifier for the custom field. The key value must exist in the case configuration settings.\n","type":"string"},"type":{"description":"The custom field type. It must match the type specified in the case configuration settings.\n","enum":["text","toggle"],"type":"string"},"value":{"description":"The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n","oneOf":[{"maxLength":160,"minLength":1,"nullable":true,"type":"string"},{"type":"boolean"}]}},"required":["key","type","value"]},"maxItems":10,"minItems":0,"type":"array"},"description":{"$ref":"#/components/schemas/Cases_case_description"},"id":{"description":"The identifier for the case.","maxLength":30000,"type":"string"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"status":{"$ref":"#/components/schemas/Cases_case_status"},"tags":{"$ref":"#/components/schemas/Cases_case_tags"},"title":{"$ref":"#/components/schemas/Cases_case_title"},"version":{"description":"The current version of the case. To determine this value, use the get case or find cases APIs.","type":"string"}},"required":["id","version"]},"maxItems":100,"minItems":1,"type":"array"}},"required":["cases"],"title":"Update case request","type":"object"},"Cases_update_user_comment_request_properties":{"description":"Defines properties for case comment requests when type is user.","properties":{"comment":{"description":"The new comment. It is required only when `type` is `user`.","example":"A new comment.","maxLength":30000,"type":"string"},"id":{"description":"The identifier for the comment. To retrieve comment IDs, use the get comments API.\n","example":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"type":{"description":"The type of comment.","enum":["user"],"example":"user","type":"string"},"version":{"description":"The current comment version. To retrieve version values, use the get comments API.\n","example":"Wzk1LDFd","type":"string"}},"required":["comment","id","owner","type","version"],"title":"Update case comment request properties for user comments","type":"object"},"Cases_user_actions_find_response_properties":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/Cases_actions"},"comment_id":{"example":"578608d0-03b1-11ed-920c-974bfa104448","nullable":true,"type":"string"},"created_at":{"example":"2022-05-13T09:16:17.416Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"id":{"example":"22fd3e30-03b1-11ed-920c-974bfa104448","type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"payload":{"oneOf":[{"$ref":"#/components/schemas/Cases_payload_alert_comment"},{"$ref":"#/components/schemas/Cases_payload_assignees"},{"$ref":"#/components/schemas/Cases_payload_connector"},{"$ref":"#/components/schemas/Cases_payload_create_case"},{"$ref":"#/components/schemas/Cases_payload_delete"},{"$ref":"#/components/schemas/Cases_payload_description"},{"$ref":"#/components/schemas/Cases_payload_pushed"},{"$ref":"#/components/schemas/Cases_payload_settings"},{"$ref":"#/components/schemas/Cases_payload_severity"},{"$ref":"#/components/schemas/Cases_payload_status"},{"$ref":"#/components/schemas/Cases_payload_tags"},{"$ref":"#/components/schemas/Cases_payload_title"},{"$ref":"#/components/schemas/Cases_payload_user_comment"}]},"type":{"description":"The type of action.","enum":["assignees","create_case","comment","connector","description","pushed","tags","title","status","settings","severity"],"example":"create_case","type":"string"},"version":{"example":"WzM1ODg4LDFd","type":"string"}},"required":["action","comment_id","created_at","created_by","id","owner","payload","type","version"]},"Cases_user_comment_response_properties":{"title":"Case response properties for user comments","type":"object","properties":{"comment":{"example":"A new comment.","type":"string"},"created_at":{"example":"2022-05-13T09:16:17.416Z","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/Cases_case_response_created_by_properties"},"id":{"example":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"pushed_at":{"example":null,"format":"date-time","nullable":true,"type":"string"},"pushed_by":{"$ref":"#/components/schemas/Cases_case_response_pushed_by_properties"},"type":{"enum":["user"],"example":"user","type":"string"},"updated_at":{"example":null,"format":"date-time","nullable":true,"type":"string"},"updated_by":{"$ref":"#/components/schemas/Cases_case_response_updated_by_properties"},"version":{"example":"WzIwNDMxLDFd","type":"string"}},"required":["type"]},"Data_views_400_response":{"title":"Bad request","type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"type":"string"},"statusCode":{"example":400,"type":"number"}},"required":["statusCode","error","message"]},"Data_views_404_response":{"type":"object","properties":{"error":{"enum":["Not Found"],"example":"Not Found","type":"string"},"message":{"example":"Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00] not found","type":"string"},"statusCode":{"enum":[404],"example":404,"type":"integer"}}},"Data_views_allownoindex":{"description":"Allows the data view saved object to exist before the data is available.","type":"boolean"},"Data_views_create_data_view_request_object":{"title":"Create data view request","type":"object","properties":{"data_view":{"description":"The data view object.","type":"object","properties":{"allowNoIndex":{"$ref":"#/components/schemas/Data_views_allownoindex"},"fieldAttrs":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_fieldattrs"},"type":"object"},"fieldFormats":{"$ref":"#/components/schemas/Data_views_fieldformats"},"fields":{"type":"object"},"id":{"type":"string"},"name":{"description":"The data view name.","type":"string"},"namespaces":{"$ref":"#/components/schemas/Data_views_namespaces"},"runtimeFieldMap":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_runtimefieldmap"},"type":"object"},"sourceFilters":{"$ref":"#/components/schemas/Data_views_sourcefilters"},"timeFieldName":{"$ref":"#/components/schemas/Data_views_timefieldname"},"title":{"$ref":"#/components/schemas/Data_views_title"},"type":{"$ref":"#/components/schemas/Data_views_type"},"typeMeta":{"$ref":"#/components/schemas/Data_views_typemeta"},"version":{"type":"string"}},"required":["title"]},"override":{"default":false,"description":"Override an existing data view if a data view with the provided title already exists.","type":"boolean"}},"required":["data_view"]},"Data_views_data_view_response_object":{"title":"Data view response properties","type":"object","properties":{"data_view":{"type":"object","properties":{"allowNoIndex":{"$ref":"#/components/schemas/Data_views_allownoindex"},"fieldAttrs":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_fieldattrs"},"type":"object"},"fieldFormats":{"$ref":"#/components/schemas/Data_views_fieldformats"},"fields":{"type":"object"},"id":{"example":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","type":"string"},"name":{"description":"The data view name.","type":"string"},"namespaces":{"$ref":"#/components/schemas/Data_views_namespaces"},"runtimeFieldMap":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_runtimefieldmap"},"type":"object"},"sourceFilters":{"$ref":"#/components/schemas/Data_views_sourcefilters"},"timeFieldName":{"$ref":"#/components/schemas/Data_views_timefieldname"},"title":{"$ref":"#/components/schemas/Data_views_title"},"typeMeta":{"$ref":"#/components/schemas/Data_views_typemeta_response"},"version":{"example":"WzQ2LDJd","type":"string"}}}}},"Data_views_fieldattrs":{"description":"A map of field attributes by field name.","type":"object","properties":{"count":{"description":"Popularity count for the field.","type":"integer"},"customDescription":{"description":"Custom description for the field.","maxLength":300,"type":"string"},"customLabel":{"description":"Custom label for the field.","type":"string"}}},"Data_views_fieldformats":{"description":"A map of field formats by field name.","type":"object"},"Data_views_namespaces":{"description":"An array of space identifiers for sharing the data view between multiple spaces.","items":{"default":"default","type":"string"},"type":"array"},"Data_views_runtimefieldmap":{"description":"A map of runtime field definitions by field name.","type":"object","properties":{"script":{"type":"object","properties":{"source":{"description":"Script for the runtime field.","type":"string"}}},"type":{"description":"Mapping type of the runtime field.","type":"string"}},"required":["script","type"]},"Data_views_sourcefilters":{"description":"The array of field names you want to filter out in Discover.","items":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"type":"array"},"Data_views_swap_data_view_request_object":{"title":"Data view reference swap request","type":"object","properties":{"delete":{"description":"Deletes referenced saved object if all references are removed.","type":"boolean"},"forId":{"description":"Limit the affected saved objects to one or more by identifier.","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"forType":{"description":"Limit the affected saved objects by type.","type":"string"},"fromId":{"description":"The saved object reference to change.","type":"string"},"fromType":{"description":"Specify the type of the saved object reference to alter. The default value is `index-pattern` for data views.\n","type":"string"},"toId":{"description":"New saved object reference value to replace the old value.","type":"string"}},"required":["fromId","toId"]},"Data_views_timefieldname":{"description":"The timestamp field name, which you use for time-based data views.","type":"string"},"Data_views_title":{"description":"Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`).","type":"string"},"Data_views_type":{"description":"When set to `rollup`, identifies the rollup data views.","type":"string"},"Data_views_typemeta":{"description":"When you use rollup indices, contains the field list for the rollup data view API endpoints.","type":"object","properties":{"aggs":{"description":"A map of rollup restrictions by aggregation type and field name.","type":"object"},"params":{"description":"Properties for retrieving rollup fields.","type":"object"}},"required":["aggs","params"]},"Data_views_typemeta_response":{"description":"When you use rollup indices, contains the field list for the rollup data view API endpoints.","nullable":true,"type":"object","properties":{"aggs":{"description":"A map of rollup restrictions by aggregation type and field name.","type":"object"},"params":{"description":"Properties for retrieving rollup fields.","type":"object"}}},"Data_views_update_data_view_request_object":{"title":"Update data view request","type":"object","properties":{"data_view":{"description":"The data view properties you want to update. Only the specified properties are updated in the data view. Unspecified fields stay as they are persisted.\n","type":"object","properties":{"allowNoIndex":{"$ref":"#/components/schemas/Data_views_allownoindex"},"fieldFormats":{"$ref":"#/components/schemas/Data_views_fieldformats"},"fields":{"type":"object"},"name":{"type":"string"},"runtimeFieldMap":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_runtimefieldmap"},"type":"object"},"sourceFilters":{"$ref":"#/components/schemas/Data_views_sourcefilters"},"timeFieldName":{"$ref":"#/components/schemas/Data_views_timefieldname"},"title":{"$ref":"#/components/schemas/Data_views_title"},"type":{"$ref":"#/components/schemas/Data_views_type"},"typeMeta":{"$ref":"#/components/schemas/Data_views_typemeta"}}},"refresh_fields":{"default":false,"description":"Reloads the data view fields after the data view is updated.","type":"boolean"}},"required":["data_view"]},"Kibana_HTTP_APIs_core_status_redactedResponse":{"additionalProperties":false,"description":"A minimal representation of Kibana's operational status.","type":"object","properties":{"status":{"additionalProperties":false,"type":"object","properties":{"overall":{"additionalProperties":false,"type":"object","properties":{"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"}},"required":["level"]}},"required":["overall"]}},"required":["status"]},"Kibana_HTTP_APIs_core_status_response":{"additionalProperties":false,"description":"Kibana's operational status as well as a detailed breakdown of plugin statuses indication of various loads (like event loop utilization and network traffic) at time of request.","type":"object","properties":{"metrics":{"additionalProperties":false,"description":"Metric groups collected by Kibana.","type":"object","properties":{"collection_interval_in_millis":{"description":"The interval at which metrics should be collected.","type":"number"},"elasticsearch_client":{"additionalProperties":false,"description":"Current network metrics of Kibana's Elasticsearch client.","type":"object","properties":{"totalActiveSockets":{"description":"Count of network sockets currently in use.","type":"number"},"totalIdleSockets":{"description":"Count of network sockets currently idle.","type":"number"},"totalQueuedRequests":{"description":"Count of requests not yet assigned to sockets.","type":"number"}},"required":["totalActiveSockets","totalIdleSockets","totalQueuedRequests"]},"last_updated":{"description":"The time metrics were collected.","type":"string"}},"required":["elasticsearch_client","last_updated","collection_interval_in_millis"]},"name":{"description":"Kibana instance name.","type":"string"},"status":{"additionalProperties":false,"type":"object","properties":{"core":{"additionalProperties":false,"description":"Statuses of core Kibana services.","type":"object","properties":{"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"detail":{"description":"Human readable detail of the service status.","type":"string"},"documentationUrl":{"description":"A URL to further documentation regarding this service.","type":"string"},"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"},"meta":{"additionalProperties":{},"description":"An unstructured set of extra metadata about this service.","type":"object"},"summary":{"description":"A human readable summary of the service status.","type":"string"}},"required":["level","summary","meta"]},"savedObjects":{"additionalProperties":false,"type":"object","properties":{"detail":{"description":"Human readable detail of the service status.","type":"string"},"documentationUrl":{"description":"A URL to further documentation regarding this service.","type":"string"},"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"},"meta":{"additionalProperties":{},"description":"An unstructured set of extra metadata about this service.","type":"object"},"summary":{"description":"A human readable summary of the service status.","type":"string"}},"required":["level","summary","meta"]}},"required":["elasticsearch","savedObjects"]},"overall":{"additionalProperties":false,"type":"object","properties":{"detail":{"description":"Human readable detail of the service status.","type":"string"},"documentationUrl":{"description":"A URL to further documentation regarding this service.","type":"string"},"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"},"meta":{"additionalProperties":{},"description":"An unstructured set of extra metadata about this service.","type":"object"},"summary":{"description":"A human readable summary of the service status.","type":"string"}},"required":["level","summary","meta"]},"plugins":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"detail":{"description":"Human readable detail of the service status.","type":"string"},"documentationUrl":{"description":"A URL to further documentation regarding this service.","type":"string"},"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"},"meta":{"additionalProperties":{},"description":"An unstructured set of extra metadata about this service.","type":"object"},"summary":{"description":"A human readable summary of the service status.","type":"string"}},"required":["level","summary","meta"]},"description":"A dynamic mapping of plugin ID to plugin status.","type":"object"}},"required":["overall","core","plugins"]},"uuid":{"description":"Unique, generated Kibana instance UUID. This UUID should persist even if the Kibana process restarts.","type":"string"},"version":{"additionalProperties":false,"type":"object","properties":{"build_date":{"description":"The date and time of this build.","type":"string"},"build_flavor":{"description":"The build flavour determines configuration and behavior of Kibana. On premise users will almost always run the \"traditional\" flavour, while other flavours are reserved for Elastic-specific use cases.","enum":["serverless","traditional"],"type":"string"},"build_hash":{"description":"A unique hash value representing the git commit of this Kibana build.","type":"string"},"build_number":{"description":"A monotonically increasing number, each subsequent build will have a higher number.","type":"number"},"build_snapshot":{"description":"Whether this build is a snapshot build.","type":"boolean"},"number":{"description":"A semantic version number.","type":"string"}},"required":["number","build_hash","build_number","build_snapshot","build_flavor","build_date"]}},"required":["name","uuid","version","status","metrics"]},"Machine_learning_APIs_mlSync200Response":{"properties":{"datafeedsAdded":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds"},"description":"If a saved object for an anomaly detection job is missing a datafeed identifier, it is added when you run the sync machine learning saved objects API.","type":"object"},"datafeedsRemoved":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds"},"description":"If a saved object for an anomaly detection job references a datafeed that no longer exists, it is deleted when you run the sync machine learning saved objects API.","type":"object"},"savedObjectsCreated":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsCreated"},"savedObjectsDeleted":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted"}},"title":"Successful sync API response","type":"object"},"Machine_learning_APIs_mlSync4xxResponse":{"properties":{"error":{"example":"Unauthorized","type":"string"},"message":{"type":"string"},"statusCode":{"example":401,"type":"integer"}},"title":"Unsuccessful sync API response","type":"object"},"Machine_learning_APIs_mlSyncResponseAnomalyDetectors":{"description":"The sync machine learning saved objects API response contains this object when there are anomaly detection jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.","properties":{"success":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess"}},"title":"Sync API response for anomaly detection jobs","type":"object"},"Machine_learning_APIs_mlSyncResponseDatafeeds":{"description":"The sync machine learning saved objects API response contains this object when there are datafeeds affected by the synchronization. There is an object for each relevant datafeed, which contains the synchronization status.","properties":{"success":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess"}},"title":"Sync API response for datafeeds","type":"object"},"Machine_learning_APIs_mlSyncResponseDataFrameAnalytics":{"description":"The sync machine learning saved objects API response contains this object when there are data frame analytics jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.","properties":{"success":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess"}},"title":"Sync API response for data frame analytics jobs","type":"object"},"Machine_learning_APIs_mlSyncResponseSavedObjectsCreated":{"description":"If saved objects are missing for machine learning jobs or trained models, they are created when you run the sync machine learning saved objects API.","properties":{"anomaly-detector":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors"},"description":"If saved objects are missing for anomaly detection jobs, they are created.","type":"object"},"data-frame-analytics":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics"},"description":"If saved objects are missing for data frame analytics jobs, they are created.","type":"object"},"trained-model":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels"},"description":"If saved objects are missing for trained models, they are created.","type":"object"}},"title":"Sync API response for created saved objects","type":"object"},"Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted":{"description":"If saved objects exist for machine learning jobs or trained models that no longer exist, they are deleted when you run the sync machine learning saved objects API.","properties":{"anomaly-detector":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors"},"description":"If there are saved objects exist for nonexistent anomaly detection jobs, they are deleted.","type":"object"},"data-frame-analytics":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics"},"description":"If there are saved objects exist for nonexistent data frame analytics jobs, they are deleted.","type":"object"},"trained-model":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels"},"description":"If there are saved objects exist for nonexistent trained models, they are deleted.","type":"object"}},"title":"Sync API response for deleted saved objects","type":"object"},"Machine_learning_APIs_mlSyncResponseSuccess":{"description":"The success or failure of the synchronization.","type":"boolean"},"Machine_learning_APIs_mlSyncResponseTrainedModels":{"description":"The sync machine learning saved objects API response contains this object when there are trained models affected by the synchronization. There is an object for each relevant trained model, which contains the synchronization status.","properties":{"success":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess"}},"title":"Sync API response for trained models","type":"object"},"Saved_objects_400_response":{"title":"Bad request","type":"object","properties":{"error":{"enum":["Bad Request"],"type":"string"},"message":{"type":"string"},"statusCode":{"enum":[400],"type":"integer"}},"required":["error","message","statusCode"]},"Saved_objects_attributes":{"description":"The data that you want to create. WARNING: When you create saved objects, attributes are not validated, which allows you to pass arbitrary and ill-formed data into the API that can break Kibana. Make sure any data that you send to the API is properly formed.\n","type":"object"},"Saved_objects_initial_namespaces":{"description":"Identifiers for the spaces in which this object is created. If this is provided, the object is created only in the explicitly defined spaces. If this is not provided, the object is created in the current space (default behavior). For shareable object types (registered with `namespaceType: 'multiple'`), this option can be used to specify one or more spaces, including the \"All spaces\" identifier ('*'). For isolated object types (registered with `namespaceType: 'single'` or `namespaceType: 'multiple-isolated'`), this option can only be used to specify a single space, and the \"All spaces\" identifier ('*') is not allowed. For global object types (`registered with `namespaceType: agnostic`), this option cannot be used.\n","type":"array"},"Saved_objects_references":{"description":"Objects with `name`, `id`, and `type` properties that describe the other saved objects that this object references. Use `name` in attributes to refer to the other saved object, but never the `id`, which can update automatically during migrations or import and export.\n","type":"array"},"Security_AI_Assistant_API_AnonymizationFieldCreateProps":{"type":"object","properties":{"allowed":{"description":"Whether this field is allowed to be sent to the model.","example":true,"type":"boolean"},"anonymized":{"description":"Whether this field should be anonymized.","example":false,"type":"boolean"},"field":{"description":"Name of the anonymization field to create.","example":"host.name","type":"string"}},"required":["field"]},"Security_AI_Assistant_API_AnonymizationFieldDetailsInError":{"type":"object","properties":{"id":{"description":"The ID of the anonymization field.","example":"field12","type":"string"},"name":{"description":"Name of the anonymization field.","example":"host.name","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_AnonymizationFieldResponse":{"type":"object","properties":{"allowed":{"description":"Whether this field is allowed to be sent to the model.","example":true,"type":"boolean"},"anonymized":{"description":"Whether this field should be anonymized.","example":false,"type":"boolean"},"createdAt":{"description":"Timestamp of when the anonymization field was created.","example":"2023-10-31T12:00:00Z","type":"string"},"createdBy":{"description":"Username of the person who created the anonymization field.","example":"user1","type":"string"},"field":{"description":"Name of the anonymization field.","example":"url.domain","type":"string"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString","description":"The ID of the anonymization field."},"namespace":{"description":"Kibana space in which this anonymization field exists.","example":"default","type":"string"},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp","description":"Timestamp when the anonymization field was initially created."},"updatedAt":{"description":"Timestamp of the last update.","example":"2023-10-31T12:00:00Z","type":"string"},"updatedBy":{"description":"Username of the person who last updated the field.","example":"user1","type":"string"}},"required":["id","field"]},"Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipReason":{"description":"Reason why the anonymization field was not modified.","enum":["ANONYMIZATION_FIELD_NOT_MODIFIED"],"type":"string"},"Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipResult":{"type":"object","properties":{"id":{"description":"The ID of the anonymization field that was not modified.","example":"field4","type":"string"},"name":{"description":"Name of the anonymization field that was not modified.","example":"user.name","type":"string"},"skip_reason":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipReason","description":"Reason why the anonymization field was not modified."}},"required":["id","skip_reason"]},"Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResponse":{"type":"object","properties":{"anonymization_fields_count":{"description":"Total number of anonymization fields processed.","example":5,"type":"integer"},"attributes":{"type":"object","properties":{"errors":{"description":"List of errors that occurred during the bulk operation.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NormalizedAnonymizationFieldError"},"type":"array"},"results":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResults"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_BulkCrudActionSummary"}},"required":["results","summary"]},"message":{"description":"Message providing information about the bulk action result.","example":"Bulk action completed successfully","type":"string"},"status_code":{"description":"HTTP status code returned.","example":200,"type":"integer"},"success":{"description":"Indicates if the bulk action was successful.","example":true,"type":"boolean"}},"required":["attributes"]},"Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResults":{"type":"object","properties":{"created":{"description":"List of anonymization fields successfully created.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse"},"type":"array"},"deleted":{"items":{"description":"Array of IDs of anonymization fields that were deleted.","example":"field3","type":"string"},"type":"array"},"skipped":{"description":"List of anonymization fields that were skipped during the operation.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipResult"},"type":"array"},"updated":{"description":"List of anonymization fields successfully updated.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse"},"type":"array"}},"required":["updated","created","deleted","skipped"]},"Security_AI_Assistant_API_AnonymizationFieldUpdateProps":{"type":"object","properties":{"allowed":{"description":"Whether this field is allowed to be sent to the model.","example":true,"type":"boolean"},"anonymized":{"description":"Whether this field should be anonymized.","example":false,"type":"boolean"},"id":{"description":"The ID of the anonymization field to update.","example":"field8","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_ApiConfig":{"type":"object","properties":{"actionTypeId":{"description":"Action type ID","example":"actionType456","type":"string"},"connectorId":{"description":"Connector ID","example":"connector123","type":"string"},"defaultSystemPromptId":{"description":"Default system prompt ID","example":"systemPrompt001","type":"string"},"model":{"description":"Model","example":"gpt-4","type":"string"},"provider":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Provider","description":"Provider","example":"OpenAI"}},"required":["connectorId","actionTypeId"]},"Security_AI_Assistant_API_BaseContentReference":{"description":"The basis of a content reference","type":"object","properties":{"id":{"description":"Id of the content reference","example":"content123","type":"string"},"type":{"description":"Type of the content reference","example":"SecurityAlert","type":"string"}},"required":["id","type"]},"Security_AI_Assistant_API_BulkCrudActionSummary":{"type":"object","properties":{"failed":{"description":"The number of failed actions.","example":0,"type":"integer"},"skipped":{"description":"The number of skipped actions.","example":1,"type":"integer"},"succeeded":{"description":"The number of successfully performed actions.","example":10,"type":"integer"},"total":{"description":"The total number of actions attempted.","example":12,"type":"integer"}},"required":["failed","skipped","succeeded","total"]},"Security_AI_Assistant_API_ChatCompleteProps":{"description":"The request payload for creating a chat completion.","example":{"connectorId":"conn-001","conversationId":"abc123","isStream":true,"langSmithApiKey":"sk-abc123","langSmithProject":"security_ai_project","messages":[{"content":"How do I detect ransomware on my endpoints?","data":{"device_id":"device-567"},"fields_to_anonymize":["device.name","file.path"],"role":"user"}],"model":"gpt-4","persist":true,"promptId":"prompt_456","responseLanguage":"en"},"type":"object","properties":{"connectorId":{"description":"Required connector identifier to route the request.","example":"conn-001","type":"string"},"conversationId":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString","description":"Existing conversation ID to continue."},"isStream":{"description":"If true, the response will be streamed in chunks.","example":true,"type":"boolean"},"langSmithApiKey":{"description":"API key for LangSmith integration.","example":"sk-abc123","type":"string"},"langSmithProject":{"description":"LangSmith project name for tracing.","example":"security_ai_project","type":"string"},"messages":{"description":"List of chat messages exchanged so far.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ChatMessage"},"type":"array"},"model":{"description":"Model ID or name to use for the response.","example":"gpt-4","type":"string"},"persist":{"description":"Whether to persist the chat and response to storage.","example":true,"type":"boolean"},"promptId":{"description":"Prompt template identifier.","example":"prompt_001","type":"string"},"responseLanguage":{"description":"ISO language code for the assistant's response.","example":"en","type":"string"}},"required":["messages","persist","connectorId"]},"Security_AI_Assistant_API_ChatMessage":{"description":"A message exchanged within the AI chat conversation.","type":"object","properties":{"content":{"description":"The textual content of the message.","example":"What security incidents have been reported today?","type":"string"},"data":{"$ref":"#/components/schemas/Security_AI_Assistant_API_MessageData","description":"Metadata to attach to the context of the message."},"fields_to_anonymize":{"description":"List of field names within the data object that should be anonymized.","example":["user.name","source.ip"],"items":{"type":"string"},"type":"array"},"role":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ChatMessageRole","description":"The sender role of the message."}},"required":["role"]},"Security_AI_Assistant_API_ChatMessageRole":{"description":"The role associated with the message in the chat.","enum":["system","user","assistant"],"example":"user","type":"string"},"Security_AI_Assistant_API_ContentReferences":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_SecurityAlertContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_SecurityAlertsPageContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_ProductDocumentationContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_EsqlContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_HrefContentReference","additionalProperties":false}]},"description":"A union of all content reference types","type":"object"},"Security_AI_Assistant_API_ConversationCategory":{"description":"The conversation category.","enum":["assistant","insights"],"example":"assistant","type":"string"},"Security_AI_Assistant_API_ConversationConfidence":{"description":"The conversation confidence.","enum":["low","medium","high"],"example":"high","type":"string"},"Security_AI_Assistant_API_ConversationCreateProps":{"type":"object","properties":{"apiConfig":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ApiConfig","description":"LLM API configuration."},"category":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationCategory","description":"The conversation category.","example":"assistant"},"excludeFromLastConversationStorage":{"description":"Exclude from last conversation storage.","type":"boolean"},"id":{"description":"The conversation id.","example":"conversation123","type":"string"},"messages":{"description":"The conversation messages.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Message"},"type":"array"},"replacements":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Replacements"},"title":{"description":"The conversation title.","example":"Security AI Assistant Setup","type":"string"}},"required":["title"]},"Security_AI_Assistant_API_ConversationResponse":{"type":"object","properties":{"apiConfig":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ApiConfig","description":"LLM API configuration."},"category":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationCategory","description":"The conversation category.","example":"assistant"},"createdAt":{"description":"The time conversation was created.","example":"2025-04-30T14:00:00Z","type":"string"},"excludeFromLastConversationStorage":{"description":"Exclude from last conversation storage.","type":"boolean"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"messages":{"description":"The conversation messages.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Message"},"type":"array"},"namespace":{"description":"Kibana space","example":"default","type":"string"},"replacements":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Replacements"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationSummary"},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp"},"title":{"description":"The conversation title.","example":"Security AI Assistant Setup","type":"string"},"updatedAt":{"description":"The last time conversation was updated.","example":"2025-04-30T16:30:00Z","type":"string"},"users":{"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["id","title","createdAt","users","namespace","category"]},"Security_AI_Assistant_API_ConversationSummary":{"type":"object","properties":{"confidence":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationConfidence","description":"How confident you are about this being a correct and useful learning.","example":"high"},"content":{"description":"Summary text of the conversation over time.","example":"This conversation covered how to configure the Security AI Assistant.","type":"string"},"public":{"description":"Define if summary is marked as publicly available.","example":true,"type":"boolean"},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp","description":"The timestamp summary was updated.","example":"2025-04-30T16:00:00Z"}}},"Security_AI_Assistant_API_ConversationUpdateProps":{"type":"object","properties":{"apiConfig":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ApiConfig","description":"LLM API configuration."},"category":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationCategory","description":"The conversation category.","example":"assistant"},"excludeFromLastConversationStorage":{"description":"Exclude from last conversation storage.","type":"boolean"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"messages":{"description":"The conversation messages.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Message"},"type":"array"},"replacements":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Replacements"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationSummary"},"title":{"description":"The conversation title.","example":"Updated Security AI Assistant Setup","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_DeleteResponseFields":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}},"required":["id"]},"Security_AI_Assistant_API_DocumentEntry":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["name","namespace","global","users"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_ResponseFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryResponseFields"}]},"Security_AI_Assistant_API_DocumentEntryCreateFields":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["name"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryRequiredFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryOptionalFields"}]},"Security_AI_Assistant_API_DocumentEntryOptionalFields":{"type":"object","properties":{"required":{"description":"Whether this resource should always be included, defaults to false.","example":false,"type":"boolean"},"vector":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Vector"}}},"Security_AI_Assistant_API_DocumentEntryRequiredFields":{"type":"object","properties":{"kbResource":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseResource"},"source":{"description":"Source document name or filepath.","example":"/documents/example.txt","type":"string"},"text":{"description":"Knowledge Base Entry content.","example":"This is the content of the document.","type":"string"},"type":{"description":"Entry type.","enum":["document"],"example":"document","type":"string"}},"required":["type","kbResource","source","text"]},"Security_AI_Assistant_API_DocumentEntryResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryRequiredFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryOptionalFields"}]},"Security_AI_Assistant_API_DocumentEntryUpdateFields":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["id"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields"}]},"Security_AI_Assistant_API_EsqlContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"label":{"description":"Label of the query","example":"High Severity Alerts","type":"string"},"query":{"description":"An ESQL query","example":"SELECT * FROM alerts WHERE severity = \"high\"","type":"string"},"timerange":{"description":"Time range to select in the time picker.","type":"object","properties":{"from":{"example":"2025-04-01T00:00:00Z","type":"string"},"to":{"example":"2025-04-30T23:59:59Z","type":"string"}},"required":["from","to"]},"type":{"enum":["EsqlQuery"],"example":"EsqlQuery","type":"string"}},"required":["type","query","label"]}],"description":"References an ESQL query"},"Security_AI_Assistant_API_FindAnonymizationFieldsSortField":{"enum":["created_at","anonymized","allowed","field","updated_at"],"type":"string"},"Security_AI_Assistant_API_FindConversationsSortField":{"description":"The field by which to sort the conversations. Possible values are `created_at`, `title`, and `updated_at`.","enum":["created_at","title","updated_at"],"example":"created_at","type":"string"},"Security_AI_Assistant_API_FindKnowledgeBaseEntriesSortField":{"description":"Fields available for sorting Knowledge Base Entries.","enum":["created_at","is_default","title","updated_at"],"example":"title","type":"string"},"Security_AI_Assistant_API_FindPromptsSortField":{"description":"Field by which to sort the prompts.","enum":["created_at","is_default","name","updated_at"],"example":"created_at","type":"string"},"Security_AI_Assistant_API_HrefContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"href":{"description":"URL to the external resource","type":"string"},"label":{"description":"Label of the query","type":"string"},"type":{"enum":["Href"],"type":"string"}},"required":["type","href"]}],"description":"References an external URL"},"Security_AI_Assistant_API_IndexEntry":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["name","namespace","global","users"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_ResponseFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryResponseFields"}]},"Security_AI_Assistant_API_IndexEntryCreateFields":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["name"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryRequiredFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryOptionalFields"}]},"Security_AI_Assistant_API_IndexEntryOptionalFields":{"type":"object","properties":{"inputSchema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_InputSchema"},"outputFields":{"description":"Fields to extract from the query result, defaults to all fields if not provided or empty.","example":["title","author"],"items":{"type":"string"},"type":"array"}}},"Security_AI_Assistant_API_IndexEntryRequiredFields":{"type":"object","properties":{"description":{"description":"Description for when this index or data stream should be queried for Knowledge Base content. Passed to the LLM as a tool description.","example":"Query this index for general knowledge base content.","type":"string"},"field":{"description":"Field to query for Knowledge Base content.","example":"content","type":"string"},"index":{"description":"Index or Data Stream to query for Knowledge Base content.","example":"knowledge_base_index","type":"string"},"queryDescription":{"description":"Description of query field used to fetch Knowledge Base content. Passed to the LLM as part of the tool input schema.","example":"Search for documents containing the specified keywords.","type":"string"},"type":{"description":"Entry type.","enum":["index"],"example":"index","type":"string"}},"required":["type","index","field","description","queryDescription"]},"Security_AI_Assistant_API_IndexEntryResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryRequiredFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryOptionalFields"}]},"Security_AI_Assistant_API_IndexEntryUpdateFields":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["id"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields"}]},"Security_AI_Assistant_API_InputSchema":{"description":"Array of objects defining the input schema, allowing the LLM to extract structured data to be used in retrieval.","items":{"type":"object","properties":{"description":{"description":"Description of the field.","example":"The title of the document.","type":"string"},"fieldName":{"description":"Name of the field.","example":"title","type":"string"},"fieldType":{"description":"Type of the field.","example":"string","type":"string"}},"required":["fieldName","fieldType","description"]},"type":"array"},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkActionSkipReason":{"description":"Reason why a Knowledge Base Entry was skipped during the bulk action.","enum":["KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED"],"type":"string"},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkActionSkipResult":{"type":"object","properties":{"id":{"description":"ID of the skipped Knowledge Base Entry.","example":"123","type":"string"},"name":{"description":"Name of the skipped Knowledge Base Entry.","example":"Skipped Entry","type":"string"},"skip_reason":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkActionSkipReason"}},"required":["id","skip_reason"]},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionResponse":{"type":"object","properties":{"attributes":{"type":"object","properties":{"errors":{"description":"List of errors encountered during the bulk action.","example":[{"err_code":"UPDATE_FAILED","knowledgeBaseEntries":[{"id":"456","name":"Error Entry"}],"message":"Failed to update entry.","statusCode":400}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NormalizedKnowledgeBaseEntryError"},"type":"array"},"results":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionResults"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionSummary"}},"required":["results","summary"]},"knowledgeBaseEntriesCount":{"description":"Total number of Knowledge Base Entries processed.","example":8,"type":"integer"},"message":{"description":"Message describing the result of the bulk action.","example":"Bulk action completed successfully.","type":"string"},"statusCode":{"description":"HTTP status code of the response.","example":200,"type":"integer"},"success":{"description":"Indicates whether the bulk action was successful.","example":true,"type":"boolean"}},"required":["attributes"]},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionResults":{"type":"object","properties":{"created":{"description":"List of Knowledge Base Entries that were successfully created.","example":[{"content":"This is the content of the new entry.","id":"456","title":"New Entry"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"},"type":"array"},"deleted":{"description":"List of IDs of Knowledge Base Entries that were successfully deleted.","example":["789"],"items":{"type":"string"},"type":"array"},"skipped":{"description":"List of Knowledge Base Entries that were skipped during the bulk action.","example":[{"id":"123","name":"Skipped Entry","skip_reason":"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkActionSkipResult"},"type":"array"},"updated":{"description":"List of Knowledge Base Entries that were successfully updated.","example":[{"content":"Updated content.","id":"123","title":"Updated Entry"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"},"type":"array"}},"required":["updated","created","deleted","skipped"]},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionSummary":{"type":"object","properties":{"failed":{"description":"Number of Knowledge Base Entries that failed during the bulk action.","example":2,"type":"integer"},"skipped":{"description":"Number of Knowledge Base Entries that were skipped during the bulk action.","example":1,"type":"integer"},"succeeded":{"description":"Number of Knowledge Base Entries that were successfully processed during the bulk action.","example":5,"type":"integer"},"total":{"description":"Total number of Knowledge Base Entries involved in the bulk action.","example":8,"type":"integer"}},"required":["failed","skipped","succeeded","total"]},"Security_AI_Assistant_API_KnowledgeBaseEntryContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"knowledgeBaseEntryId":{"description":"Id of the Knowledge Base Entry","example":"kbentry456","type":"string"},"knowledgeBaseEntryName":{"description":"Name of the knowledge base entry","example":"Network Security Best Practices","type":"string"},"type":{"enum":["KnowledgeBaseEntry"],"example":"KnowledgeBaseEntry","type":"string"}},"required":["type","knowledgeBaseEntryId","knowledgeBaseEntryName"]}],"description":"References a knowledge base entry"},"Security_AI_Assistant_API_KnowledgeBaseEntryCreateProps":{"anyOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields"}],"discriminator":{"propertyName":"type"}},"Security_AI_Assistant_API_KnowledgeBaseEntryDetailsInError":{"type":"object","properties":{"id":{"description":"ID of the Knowledge Base Entry that encountered an error.","example":"456","type":"string"},"name":{"description":"Name of the Knowledge Base Entry that encountered an error.","example":"Error Entry","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema":{"additionalProperties":false,"type":"object","properties":{"error":{"description":"Error type or category.","example":"Not Found","type":"string"},"message":{"description":"Detailed error message.","example":"The requested Knowledge Base Entry was not found.","type":"string"},"statusCode":{"description":"HTTP status code of the error.","example":404,"type":"number"}},"required":["statusCode","error","message"]},"Security_AI_Assistant_API_KnowledgeBaseEntryResponse":{"anyOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntry"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntry"}],"discriminator":{"propertyName":"type"}},"Security_AI_Assistant_API_KnowledgeBaseEntryUpdateProps":{"anyOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryUpdateFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryUpdateFields"}],"discriminator":{"propertyName":"type"}},"Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps":{"anyOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields"}],"discriminator":{"propertyName":"type"}},"Security_AI_Assistant_API_KnowledgeBaseResource":{"description":"Knowledge Base resource name for grouping entries, e.g. 'security_labs', 'user', etc.","enum":["security_labs","user"],"example":"security_labs","type":"string"},"Security_AI_Assistant_API_KnowledgeBaseResponse":{"description":"AI assistant KnowledgeBase.","type":"object","properties":{"success":{"description":"Identify the success of the method execution.","example":true,"type":"boolean"}}},"Security_AI_Assistant_API_Message":{"description":"AI assistant conversation message.","type":"object","properties":{"content":{"description":"Message content.","example":"Hello, how can I assist you today?","type":"string"},"isError":{"description":"Is error message.","example":false,"type":"boolean"},"metadata":{"$ref":"#/components/schemas/Security_AI_Assistant_API_MessageMetadata","description":"Metadata"},"reader":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Reader","description":"Message content."},"role":{"$ref":"#/components/schemas/Security_AI_Assistant_API_MessageRole","description":"Message role.","example":"assistant"},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp","description":"The timestamp message was sent or received.","example":"2025-04-30T15:30:00Z"},"traceData":{"$ref":"#/components/schemas/Security_AI_Assistant_API_TraceData","description":"Trace data"}},"required":["timestamp","content","role"]},"Security_AI_Assistant_API_MessageData":{"additionalProperties":true,"description":"ECS-style metadata attached to the message.","example":{"alert_id":"alert-456","user_id":"abc123"},"type":"object"},"Security_AI_Assistant_API_MessageMetadata":{"description":"Message metadata","type":"object","properties":{"contentReferences":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ContentReferences","description":"Data referred to by the message content."}}},"Security_AI_Assistant_API_MessageRole":{"description":"Message role.","enum":["system","user","assistant"],"example":"assistant","type":"string"},"Security_AI_Assistant_API_NonEmptyString":{"description":"A string that does not contain only whitespace characters.","example":"I am a string","format":"nonempty","minLength":1,"type":"string"},"Security_AI_Assistant_API_NonEmptyTimestamp":{"description":"A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.","example":"2023-10-31T12:00:00Z","format":"nonempty","minLength":1,"type":"string"},"Security_AI_Assistant_API_NormalizedAnonymizationFieldError":{"type":"object","properties":{"anonymization_fields":{"description":"Array of anonymization fields that caused the error.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldDetailsInError"},"type":"array"},"err_code":{"description":"Error code indicating the type of failure.","example":"UPDATE_FAILED","type":"string"},"message":{"description":"Error message.","example":"Failed to update anonymization field.","type":"string"},"status_code":{"description":"Status code of the response.","example":400,"type":"integer"}},"required":["message","status_code","anonymization_fields"]},"Security_AI_Assistant_API_NormalizedKnowledgeBaseEntryError":{"type":"object","properties":{"err_code":{"description":"Specific error code for the issue.","example":"UPDATE_FAILED","type":"string"},"knowledgeBaseEntries":{"description":"List of Knowledge Base Entries that encountered the error.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryDetailsInError"},"type":"array"},"message":{"description":"Error message describing the issue.","example":"Failed to update entry.","type":"string"},"statusCode":{"description":"HTTP status code associated with the error.","example":400,"type":"integer"}},"required":["message","statusCode","knowledgeBaseEntries"]},"Security_AI_Assistant_API_NormalizedPromptError":{"type":"object","properties":{"err_code":{"description":"A code representing the error type.","type":"string"},"message":{"description":"A message describing the error encountered.","type":"string"},"prompts":{"description":"List of prompts that encountered errors.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptDetailsInError"},"type":"array"},"status_code":{"description":"The HTTP status code associated with the error.","type":"integer"}},"required":["message","status_code","prompts"]},"Security_AI_Assistant_API_ProductDocumentationContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"title":{"description":"Title of the documentation","example":"Getting Started with Security AI Assistant","type":"string"},"type":{"enum":["ProductDocumentation"],"example":"ProductDocumentation","type":"string"},"url":{"description":"URL to the documentation","example":"https://docs.example.com/security-ai-assistant","type":"string"}},"required":["type","title","url"]}],"description":"References the product documentation"},"Security_AI_Assistant_API_PromptCreateProps":{"type":"object","properties":{"categories":{"description":"List of categories for the prompt.","example":["security","verification"],"items":{"type":"string"},"type":"array"},"color":{"description":"The color associated with the prompt.","example":"blue","type":"string"},"consumer":{"description":"The consumer associated with the prompt.","example":"admin","type":"string"},"content":{"description":"The content of the prompt.","example":"Please verify the security settings.","type":"string"},"isDefault":{"description":"Whether this prompt should be the default.","example":false,"type":"boolean"},"isNewConversationDefault":{"description":"Whether this prompt should be the default for new conversations.","example":true,"type":"boolean"},"name":{"description":"The name of the prompt.","example":"New Security Prompt","type":"string"},"promptType":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptType","description":"The type of the prompt.","example":"system"}},"required":["name","content","promptType"]},"Security_AI_Assistant_API_PromptDetailsInError":{"type":"object","properties":{"id":{"description":"The ID of the prompt that encountered an error.","type":"string"},"name":{"description":"The name of the prompt that encountered an error.","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_PromptResponse":{"type":"object","properties":{"categories":{"description":"Categories associated with the prompt.","items":{"type":"string"},"type":"array"},"color":{"description":"The color associated with the prompt.","type":"string"},"consumer":{"description":"The consumer that the prompt is associated with.","type":"string"},"content":{"description":"The content of the prompt.","type":"string"},"createdAt":{"description":"The timestamp of when the prompt was created.","type":"string"},"createdBy":{"description":"The user who created the prompt.","type":"string"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"isDefault":{"description":"Whether this prompt is the default.","type":"boolean"},"isNewConversationDefault":{"description":"Whether this prompt is the default for new conversations.","type":"boolean"},"name":{"description":"The name of the prompt.","type":"string"},"namespace":{"description":"Kibana space where the prompt is located.","type":"string"},"promptType":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptType","description":"The type of the prompt."},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp"},"updatedAt":{"description":"The timestamp of when the prompt was last updated.","type":"string"},"updatedBy":{"description":"The user who last updated the prompt.","type":"string"},"users":{"description":"List of users associated with the prompt.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["id","name","promptType","content"]},"Security_AI_Assistant_API_PromptsBulkActionSkipReason":{"description":"Reason why a prompt was skipped during the bulk action.","enum":["PROMPT_FIELD_NOT_MODIFIED"],"type":"string"},"Security_AI_Assistant_API_PromptsBulkActionSkipResult":{"type":"object","properties":{"id":{"description":"The ID of the prompt that was skipped.","type":"string"},"name":{"description":"The name of the prompt that was skipped.","type":"string"},"skip_reason":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptsBulkActionSkipReason","description":"The reason for skipping the prompt."}},"required":["id","skip_reason"]},"Security_AI_Assistant_API_PromptsBulkCrudActionResponse":{"type":"object","properties":{"attributes":{"type":"object","properties":{"errors":{"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NormalizedPromptError"},"type":"array"},"results":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptsBulkCrudActionResults"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_BulkCrudActionSummary"}},"required":["results","summary"]},"message":{"description":"A message describing the result of the bulk action.","example":"Bulk action completed successfully.","type":"string"},"prompts_count":{"description":"The number of prompts processed in the bulk action.","example":6,"type":"integer"},"status_code":{"description":"The HTTP status code of the response.","example":200,"type":"integer"},"success":{"description":"Indicates if the bulk action was successful.","example":true,"type":"boolean"}},"required":["attributes"]},"Security_AI_Assistant_API_PromptsBulkCrudActionResults":{"type":"object","properties":{"created":{"description":"List of prompts that were created.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptResponse"},"type":"array"},"deleted":{"description":"List of IDs of prompts that were deleted.","items":{"type":"string"},"type":"array"},"skipped":{"description":"List of prompts that were skipped.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptsBulkActionSkipResult"},"type":"array"},"updated":{"description":"List of prompts that were updated.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptResponse"},"type":"array"}},"required":["updated","created","deleted","skipped"]},"Security_AI_Assistant_API_PromptType":{"description":"Type of the prompt (either system or quick).","enum":["system","quick"],"type":"string"},"Security_AI_Assistant_API_PromptUpdateProps":{"type":"object","properties":{"categories":{"description":"The updated categories for the prompt.","example":["security","alert"],"items":{"type":"string"},"type":"array"},"color":{"description":"The updated color associated with the prompt.","example":"green","type":"string"},"consumer":{"description":"The updated consumer for the prompt.","example":"user123","type":"string"},"content":{"description":"The updated content for the prompt.","example":"Updated content for security prompt.","type":"string"},"id":{"description":"The ID of the prompt to update.","example":"prompt123","type":"string"},"isDefault":{"description":"Whether this prompt should be the default.","example":true,"type":"boolean"},"isNewConversationDefault":{"description":"Whether the prompt should be the default for new conversations.","example":false,"type":"boolean"}},"required":["id"]},"Security_AI_Assistant_API_Provider":{"description":"Provider","enum":["OpenAI","Azure OpenAI","Other"],"example":"OpenAI","type":"string"},"Security_AI_Assistant_API_Reader":{"additionalProperties":true,"type":"object"},"Security_AI_Assistant_API_Replacements":{"additionalProperties":{"type":"string"},"description":"Replacements object used to anonymize/deanonymize messages","type":"object"},"Security_AI_Assistant_API_ResponseFields":{"type":"object","properties":{"createdAt":{"description":"Time the Knowledge Base Entry was created.","example":"2023-01-01T12:00:00Z","type":"string"},"createdBy":{"description":"User who created the Knowledge Base Entry.","example":"admin","type":"string"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"updatedAt":{"description":"Time the Knowledge Base Entry was last updated.","example":"2023-01-02T12:00:00Z","type":"string"},"updatedBy":{"description":"User who last updated the Knowledge Base Entry.","example":"editor","type":"string"}},"required":["id","createdAt","createdBy","updatedAt","updatedBy"]},"Security_AI_Assistant_API_SecurityAlertContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"alertId":{"description":"ID of the Alert","example":"alert789","type":"string"},"type":{"enum":["SecurityAlert"],"example":"SecurityAlert","type":"string"}},"required":["type","alertId"]}],"description":"References a security alert"},"Security_AI_Assistant_API_SecurityAlertsPageContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"type":{"enum":["SecurityAlertsPage"],"example":"SecurityAlertsPage","type":"string"}},"required":["type"]}],"description":"References the security alerts page"},"Security_AI_Assistant_API_SortOrder":{"description":"The order in which results are sorted.","enum":["asc","desc"],"example":"asc","type":"string"},"Security_AI_Assistant_API_TraceData":{"description":"Trace Data","type":"object","properties":{"traceId":{"description":"Could be any string, not necessarily a UUID","example":"d9876543-f0a1-2345-6789-abcdef123456","type":"string"},"transactionId":{"description":"Could be any string, not necessarily a UUID","example":"a1234567-bc89-0def-1234-56789abcdef0","type":"string"}}},"Security_AI_Assistant_API_User":{"description":"Could be any string, not necessarily a UUID.","type":"object","properties":{"id":{"description":"User id.","example":"user123","type":"string"},"name":{"description":"User name.","example":"John Doe","type":"string"}}},"Security_AI_Assistant_API_Vector":{"description":"Object containing Knowledge Base Entry text embeddings and modelId used to create the embeddings.","type":"object","properties":{"modelId":{"description":"ID of the model used to create the embeddings.","example":"bert-base-uncased","type":"string"},"tokens":{"additionalProperties":{"type":"number"},"description":"Tokens with their corresponding values.","example":{"token1":0.123,"token2":0.456},"type":"object"}},"required":["modelId","tokens"]},"Security_Detections_API_AlertAssignees":{"type":"object","properties":{"add":{"items":{"description":"A list of users ids to assign.","format":"nonempty","minLength":1,"type":"string"},"type":"array"},"remove":{"items":{"description":"A list of users ids to unassign.","format":"nonempty","minLength":1,"type":"string"},"type":"array"}},"required":["add","remove"]},"Security_Detections_API_AlertIds":{"description":"A list of alerts `id`s.","items":{"format":"nonempty","minLength":1,"type":"string"},"minItems":1,"type":"array"},"Security_Detections_API_AlertsIndex":{"deprecated":true,"description":"(deprecated) Has no effect.","type":"string"},"Security_Detections_API_AlertsIndexMigrationError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"string"}},"required":["message","status_code"]},"index":{"type":"string"}},"required":["index","error"]},"Security_Detections_API_AlertsIndexMigrationSuccess":{"type":"object","properties":{"index":{"type":"string"},"migration_id":{"type":"string"},"migration_index":{"type":"string"}},"required":["index","migration_id","migration_index"]},"Security_Detections_API_AlertsIndexNamespace":{"description":"Has no effect.","type":"string"},"Security_Detections_API_AlertsReindexOptions":{"type":"object","properties":{"requests_per_second":{"description":"The throttle for the migration task in sub-requests per second. Corresponds to requests_per_second on the Reindex API.","minimum":1,"type":"integer"},"size":{"description":"Number of alerts to migrate per batch. Corresponds to the source.size option on the Reindex API.","minimum":1,"type":"integer"},"slices":{"description":"The number of subtasks for the migration task. Corresponds to slices on the Reindex API.","minimum":1,"type":"integer"}}},"Security_Detections_API_AlertsSort":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_AlertsSortCombinations"},{"items":{"$ref":"#/components/schemas/Security_Detections_API_AlertsSortCombinations"},"type":"array"}]},"Security_Detections_API_AlertsSortCombinations":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"Security_Detections_API_AlertStatus":{"description":"The status of an alert, which can be `open`, `acknowledged`, `in-progress`, or `closed`.","enum":["open","closed","acknowledged","in-progress"],"type":"string"},"Security_Detections_API_AlertSuppression":{"description":"Defines alert suppression configuration.","type":"object","properties":{"duration":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionDuration"},"group_by":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionGroupBy"},"missing_fields_strategy":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionMissingFieldsStrategy"}},"required":["group_by"]},"Security_Detections_API_AlertSuppressionDuration":{"type":"object","properties":{"unit":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionDurationUnit"},"value":{"minimum":1,"type":"integer"}},"required":["value","unit"]},"Security_Detections_API_AlertSuppressionDurationUnit":{"description":"Time unit","enum":["s","m","h"],"type":"string"},"Security_Detections_API_AlertSuppressionGroupBy":{"items":{"type":"string"},"maxItems":3,"minItems":1,"type":"array"},"Security_Detections_API_AlertSuppressionMissingFieldsStrategy":{"description":"Describes how alerts will be generated for documents with missing suppress by fields:\ndoNotSuppress - per each document a separate alert will be created\nsuppress - only alert will be created per suppress by bucket","enum":["doNotSuppress","suppress"],"type":"string"},"Security_Detections_API_AlertTag":{"description":"Use alert tags to organize related alerts into categories that you can filter and group.","format":"nonempty","minLength":1,"type":"string"},"Security_Detections_API_AlertTags":{"description":"List of keywords to organize related alerts into categories that you can filter and group.","items":{"$ref":"#/components/schemas/Security_Detections_API_AlertTag"},"type":"array"},"Security_Detections_API_AlertVersion":{"type":"object","properties":{"count":{"type":"integer"},"version":{"type":"integer"}},"required":["version","count"]},"Security_Detections_API_AnomalyThreshold":{"description":"Anomaly score threshold above which the rule creates an alert. Valid values are from 0 to 100.","minimum":0,"type":"integer"},"Security_Detections_API_BuildingBlockType":{"description":"Determines if the rule acts as a building block. If yes, the value must be `default`.\nBy default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts.\nFor more information, refer to [About building block rules](https://www.elastic.co/guide/en/security/current/building-block-rule.html).\n","type":"string"},"Security_Detections_API_BulkActionEditPayload":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadTags"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadIndexPatterns"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadInvestigationFields"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadTimeline"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadRuleActions"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadSchedule"}]},"Security_Detections_API_BulkActionEditPayloadIndexPatterns":{"description":"Edits index patterns of rulesClient.\n\n- `add_index_patterns` adds index patterns to rules. If an index pattern already exists for a rule, no changes are made.\n- `delete_index_patterns` removes index patterns from rules. If an index pattern does not exist for a rule, no changes are made.\n- `set_index_patterns` sets index patterns for rules, overwriting any existing index patterns. If the set of index patterns is the same as the existing index patterns, no changes are made.\n","type":"object","properties":{"overwrite_data_views":{"description":"Resets the data view for the rule.","type":"boolean"},"type":{"enum":["add_index_patterns","delete_index_patterns","set_index_patterns"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadInvestigationFields":{"description":"Edits investigation fields of rules.\n\n- `add_investigation_fields` adds investigation fields to rules. If an investigation field already exists for a rule, no changes are made.\n- `delete_investigation_fields` removes investigation fields from rules. If an investigation field does not exist for a rule, no changes are made.\n- `set_investigation_fields` sets investigation fields for rules. If the set of investigation fields is the same as the existing investigation fields, no changes are made.\n","type":"object","properties":{"type":{"enum":["add_investigation_fields","delete_investigation_fields","set_investigation_fields"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadRuleActions":{"description":"Edits rule actions of rules.\n\n- `add_rule_actions` adds rule actions to rules. This action is non-idempotent, meaning that even if the same rule action already exists for a rule, it will be added again with a new unique ID.\n- `set_rule_actions` sets rule actions for rules. This action is non-idempotent, meaning that even if the same set of rule actions already exists for a rule, it will be set again and the actions will receive new unique IDs.\n","type":"object","properties":{"type":{"enum":["add_rule_actions","set_rule_actions"],"type":"string"},"value":{"type":"object","properties":{"actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NormalizedRuleAction"},"type":"array"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_ThrottleForBulkActions"}},"required":["actions"]}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadSchedule":{"description":"Overwrites schedule of rules. \n\n- `set_schedule` sets a schedule for rules. If the same schedule already exists for a rule, no changes are made.\n\nBoth `interval` and `lookback` have a format of \"{integer}{time_unit}\", where accepted time units are `s` for seconds, `m` for minutes, and `h` for hours. The integer must be positive and larger than 0. Examples: \"45s\", \"30m\", \"6h\"\n","type":"object","properties":{"type":{"enum":["set_schedule"],"type":"string"},"value":{"type":"object","properties":{"interval":{"description":"Interval in which the rule runs. For example, `\"1h\"` means the rule runs every hour.","example":"1h","pattern":"^[1-9]\\d*[smh]$","type":"string"},"lookback":{"description":"Lookback time for the rules.\n\nAdditional look-back time that the rule analyzes. For example, \"10m\" means the rule analyzes the last 10 minutes of data in addition to the frequency interval.\n","example":"1h","pattern":"^[1-9]\\d*[smh]$","type":"string"}},"required":["interval","lookback"]}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadTags":{"description":"Edits tags of rules.\n\n- `add_tags` adds tags to rules. If a tag already exists for a rule, no changes are made.\n- `delete_tags` removes tags from rules. If a tag does not exist for a rule, no changes are made.\n- `set_tags` sets tags for rules, overwriting any existing tags. If the set of tags is the same as the existing tags, no changes are made.\n","type":"object","properties":{"type":{"enum":["add_tags","delete_tags","set_tags"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadTimeline":{"description":"Edits timeline of rules.\n\n- `set_timeline` sets a timeline for rules. If the same timeline already exists for a rule, no changes are made.\n","type":"object","properties":{"type":{"enum":["set_timeline"],"type":"string"},"value":{"type":"object","properties":{"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"}},"required":["timeline_id","timeline_title"]}},"required":["type","value"]},"Security_Detections_API_BulkActionsDryRunErrCode":{"enum":["IMMUTABLE","PREBUILT_CUSTOMIZATION_LICENSE","MACHINE_LEARNING_AUTH","MACHINE_LEARNING_INDEX_PATTERN","ESQL_INDEX_PATTERN","MANUAL_RULE_RUN_FEATURE","MANUAL_RULE_RUN_DISABLED_RULE"],"type":"string"},"Security_Detections_API_BulkActionSkipResult":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"skip_reason":{"$ref":"#/components/schemas/Security_Detections_API_BulkEditSkipReason"}},"required":["id","skip_reason"]},"Security_Detections_API_BulkDeleteRules":{"type":"object","properties":{"action":{"enum":["delete"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkDisableRules":{"type":"object","properties":{"action":{"enum":["disable"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkDuplicateRules":{"type":"object","properties":{"action":{"enum":["duplicate"],"type":"string"},"duplicate":{"description":"Duplicate object that describes applying an update action.","type":"object","properties":{"include_exceptions":{"description":"Whether to copy exceptions from the original rule","type":"boolean"},"include_expired_exceptions":{"description":"Whether to copy expired exceptions from the original rule","type":"boolean"}},"required":["include_exceptions","include_expired_exceptions"]},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkEditActionResponse":{"type":"object","properties":{"attributes":{"type":"object","properties":{"errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NormalizedRuleError"},"type":"array"},"results":{"$ref":"#/components/schemas/Security_Detections_API_BulkEditActionResults"},"summary":{"$ref":"#/components/schemas/Security_Detections_API_BulkEditActionSummary"}},"required":["results","summary"]},"message":{"type":"string"},"rules_count":{"type":"integer"},"status_code":{"type":"integer"},"success":{"type":"boolean"}},"required":["attributes"]},"Security_Detections_API_BulkEditActionResults":{"type":"object","properties":{"created":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"},"type":"array"},"deleted":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"},"type":"array"},"skipped":{"items":{"$ref":"#/components/schemas/Security_Detections_API_BulkActionSkipResult"},"type":"array"},"updated":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"},"type":"array"}},"required":["updated","created","deleted","skipped"]},"Security_Detections_API_BulkEditActionSummary":{"description":"A rule can only be skipped when the bulk action to be performed on it results in nothing being done. For example, if the `edit` action is used to add a tag to a rule that already has that tag, or to delete an index pattern that is not specified in a rule. Objects returned in `attributes.results.skipped` will only include rules' `id`, `name`, and `skip_reason`.","type":"object","properties":{"failed":{"type":"integer"},"skipped":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["failed","skipped","succeeded","total"]},"Security_Detections_API_BulkEditRules":{"type":"object","properties":{"action":{"enum":["edit"],"type":"string"},"edit":{"description":"Array of objects containing the edit operations","items":{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayload"},"minItems":1,"type":"array"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action","edit"]},"Security_Detections_API_BulkEditSkipReason":{"enum":["RULE_NOT_MODIFIED"],"type":"string"},"Security_Detections_API_BulkEnableRules":{"type":"object","properties":{"action":{"enum":["enable"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkExportActionResponse":{"type":"string"},"Security_Detections_API_BulkExportRules":{"type":"object","properties":{"action":{"enum":["export"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkManualRuleRun":{"type":"object","properties":{"action":{"enum":["run"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"},"run":{"description":"Object that describes applying a manual rule run action.","type":"object","properties":{"end_date":{"description":"End date of the manual rule run","type":"string"},"start_date":{"description":"Start date of the manual rule run","type":"string"}},"required":["start_date","end_date"]}},"required":["action","run"]},"Security_Detections_API_ConcurrentSearches":{"minimum":1,"type":"integer"},"Security_Detections_API_DataViewId":{"type":"string"},"Security_Detections_API_DefaultParams":{"type":"object","properties":{"command":{"enum":["isolate"],"type":"string"},"comment":{"type":"string"}},"required":["command"]},"Security_Detections_API_EcsMapping":{"additionalProperties":{"type":"object","properties":{"field":{"type":"string"},"value":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}}},"description":"Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: \"ecs_mapping\": {\"process.pid\": {\"field\": \"pid\"}}","type":"object"},"Security_Detections_API_EndpointResponseAction":{"type":"object","properties":{"action_type_id":{"enum":[".endpoint"],"type":"string"},"params":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_DefaultParams"},{"$ref":"#/components/schemas/Security_Detections_API_ProcessesParams"}]}},"required":["action_type_id","params"]},"Security_Detections_API_EqlOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"event_category_override":{"$ref":"#/components/schemas/Security_Detections_API_EventCategoryOverride"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"tiebreaker_field":{"$ref":"#/components/schemas/Security_Detections_API_TiebreakerField"},"timestamp_field":{"$ref":"#/components/schemas/Security_Detections_API_TimestampField"}}},"Security_Detections_API_EqlQueryLanguage":{"enum":["eql"],"type":"string"},"Security_Detections_API_EqlRequiredFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_EqlQueryLanguage","description":"Query language to use"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["eql"],"type":"string"}},"required":["type","query","language"]},"Security_Detections_API_EqlRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleResponseFields"}]},"Security_Detections_API_EqlRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_EqlOptionalFields"}]},"Security_Detections_API_EqlRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleCreateFields"}]},"Security_Detections_API_EqlRulePatchFields":{"allOf":[{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_EqlQueryLanguage","description":"Query language to use"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["eql"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_EqlOptionalFields"}]},"Security_Detections_API_EqlRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_EqlRulePatchFields"}]},"Security_Detections_API_EqlRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_EqlOptionalFields"}]},"Security_Detections_API_EqlRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleCreateFields"}]},"Security_Detections_API_ErrorSchema":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"minimum":400,"type":"integer"}},"required":["status_code","message"]},"id":{"type":"string"},"item_id":{"minLength":1,"type":"string"},"list_id":{"minLength":1,"type":"string"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"}},"required":["error"]},"Security_Detections_API_EsqlQueryLanguage":{"enum":["esql"],"type":"string"},"Security_Detections_API_EsqlRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleResponseFields"}]},"Security_Detections_API_EsqlRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleRequiredFields"}]},"Security_Detections_API_EsqlRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleCreateFields"}]},"Security_Detections_API_EsqlRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"}}},"Security_Detections_API_EsqlRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"language":{"$ref":"#/components/schemas/Security_Detections_API_EsqlQueryLanguage"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"type":{"description":"Rule type","enum":["esql"],"type":"string"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleOptionalFields"}]},"Security_Detections_API_EsqlRuleRequiredFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_EsqlQueryLanguage"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["esql"],"type":"string"}},"required":["type","language","query"]},"Security_Detections_API_EsqlRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleRequiredFields"}]},"Security_Detections_API_EsqlRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleCreateFields"}]},"Security_Detections_API_EventCategoryOverride":{"type":"string"},"Security_Detections_API_ExceptionListType":{"description":"The exception type","enum":["detection","rule_default","endpoint","endpoint_trusted_apps","endpoint_events","endpoint_host_isolation_exceptions","endpoint_blocklists"],"type":"string"},"Security_Detections_API_ExternalRuleSource":{"description":"Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.","type":"object","properties":{"is_customized":{"$ref":"#/components/schemas/Security_Detections_API_IsExternalRuleCustomized"},"type":{"enum":["external"],"type":"string"}},"required":["type","is_customized"]},"Security_Detections_API_FindRulesSortField":{"enum":["created_at","createdAt","enabled","execution_summary.last_execution.date","execution_summary.last_execution.metrics.execution_gap_duration_s","execution_summary.last_execution.metrics.total_indexing_duration_ms","execution_summary.last_execution.metrics.total_search_duration_ms","execution_summary.last_execution.status","name","risk_score","riskScore","severity","updated_at","updatedAt"],"type":"string"},"Security_Detections_API_HistoryWindowStart":{"description":"Start date to use when checking if a term has been seen before. Supports relative dates – for example, now-30d will search the last 30 days of data when checking if a term is new. We do not recommend using absolute dates, which can cause issues with rule performance due to querying increasing amounts of data over time.","format":"nonempty","minLength":1,"type":"string"},"Security_Detections_API_IndexMigrationStatus":{"type":"object","properties":{"index":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"is_outdated":{"type":"boolean"},"migrations":{"items":{"$ref":"#/components/schemas/Security_Detections_API_MigrationStatus"},"type":"array"},"signal_versions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_AlertVersion"},"type":"array"},"version":{"type":"integer"}},"required":["index","version","signal_versions","migrations","is_outdated"]},"Security_Detections_API_IndexPatternArray":{"description":"Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`).\n\u003e info\n\u003e This field is not supported for ES|QL rules.\n","items":{"type":"string"},"type":"array"},"Security_Detections_API_InternalRuleSource":{"description":"Type of rule source for internally sourced rules, i.e. created within the Kibana apps.","type":"object","properties":{"type":{"enum":["internal"],"type":"string"}},"required":["type"]},"Security_Detections_API_InvestigationFields":{"description":"Schema for fields relating to investigation fields. These are user defined fields we use to highlight\nin various features in the UI such as alert details flyout and exceptions auto-population from alert.\n","type":"object","properties":{"field_names":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"minItems":1,"type":"array"}},"required":["field_names"]},"Security_Detections_API_InvestigationGuide":{"description":"Notes to help investigate alerts produced by the rule.","type":"string"},"Security_Detections_API_IsExternalRuleCustomized":{"description":"Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).","type":"boolean"},"Security_Detections_API_IsRuleEnabled":{"description":"Determines whether the rule is enabled. Defaults to true.","type":"boolean"},"Security_Detections_API_IsRuleImmutable":{"deprecated":true,"description":"This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.","type":"boolean"},"Security_Detections_API_ItemsPerSearch":{"minimum":1,"type":"integer"},"Security_Detections_API_KqlQueryLanguage":{"enum":["kuery","lucene"],"type":"string"},"Security_Detections_API_MachineLearningJobId":{"description":"Machine learning job ID(s) the rule monitors for anomaly scores.","oneOf":[{"type":"string"},{"items":{"type":"string"},"minItems":1,"type":"array"}]},"Security_Detections_API_MachineLearningRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleResponseFields"}]},"Security_Detections_API_MachineLearningRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleOptionalFields"}]},"Security_Detections_API_MachineLearningRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleCreateFields"}]},"Security_Detections_API_MachineLearningRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"}}},"Security_Detections_API_MachineLearningRulePatchFields":{"allOf":[{"type":"object","properties":{"anomaly_threshold":{"$ref":"#/components/schemas/Security_Detections_API_AnomalyThreshold"},"machine_learning_job_id":{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningJobId"},"type":{"description":"Rule type","enum":["machine_learning"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleOptionalFields"}]},"Security_Detections_API_MachineLearningRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRulePatchFields"}]},"Security_Detections_API_MachineLearningRuleRequiredFields":{"type":"object","properties":{"anomaly_threshold":{"$ref":"#/components/schemas/Security_Detections_API_AnomalyThreshold"},"machine_learning_job_id":{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningJobId"},"type":{"description":"Rule type","enum":["machine_learning"],"type":"string"}},"required":["type","machine_learning_job_id","anomaly_threshold"]},"Security_Detections_API_MachineLearningRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleOptionalFields"}]},"Security_Detections_API_MachineLearningRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleCreateFields"}]},"Security_Detections_API_MaxSignals":{"default":100,"description":"Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#rule-ui-advanced-params) value).\n\u003e info\n\u003e This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/guide/en/kibana/current/alert-action-settings-kb.html#alert-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.\n","minimum":1,"type":"integer"},"Security_Detections_API_MigrationCleanupResult":{"type":"object","properties":{"destinationIndex":{"type":"string"},"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["message","status_code"]},"id":{"type":"string"},"sourceIndex":{"type":"string"},"status":{"enum":["success","failure","pending"],"type":"string"},"updated":{"format":"date-time","type":"string"},"version":{"type":"string"}},"required":["id","destinationIndex","status","sourceIndex","version","updated"]},"Security_Detections_API_MigrationFinalizationResult":{"type":"object","properties":{"completed":{"type":"boolean"},"destinationIndex":{"type":"string"},"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["message","status_code"]},"id":{"type":"string"},"sourceIndex":{"type":"string"},"status":{"enum":["success","failure","pending"],"type":"string"},"updated":{"format":"date-time","type":"string"},"version":{"type":"string"}},"required":["id","completed","destinationIndex","status","sourceIndex","version","updated"]},"Security_Detections_API_MigrationStatus":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"status":{"enum":["success","failure","pending"],"type":"string"},"updated":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","status","version","updated"]},"Security_Detections_API_NewTermsFields":{"description":"Fields to monitor for new values.","items":{"type":"string"},"maxItems":3,"minItems":1,"type":"array"},"Security_Detections_API_NewTermsRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleResponseFields"}]},"Security_Detections_API_NewTermsRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleDefaultableFields"}]},"Security_Detections_API_NewTermsRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleCreateFields"}]},"Security_Detections_API_NewTermsRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_NewTermsRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"}}},"Security_Detections_API_NewTermsRulePatchFields":{"allOf":[{"type":"object","properties":{"history_window_start":{"$ref":"#/components/schemas/Security_Detections_API_HistoryWindowStart"},"new_terms_fields":{"$ref":"#/components/schemas/Security_Detections_API_NewTermsFields"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["new_terms"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleDefaultableFields"}]},"Security_Detections_API_NewTermsRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRulePatchFields"}]},"Security_Detections_API_NewTermsRuleRequiredFields":{"type":"object","properties":{"history_window_start":{"$ref":"#/components/schemas/Security_Detections_API_HistoryWindowStart"},"new_terms_fields":{"$ref":"#/components/schemas/Security_Detections_API_NewTermsFields"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["new_terms"],"type":"string"}},"required":["type","query","new_terms_fields","history_window_start"]},"Security_Detections_API_NewTermsRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}},"required":["language"]}]},"Security_Detections_API_NewTermsRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleCreateFields"}]},"Security_Detections_API_NonEmptyString":{"description":"A string that does not contain only whitespace characters","format":"nonempty","minLength":1,"type":"string"},"Security_Detections_API_NormalizedRuleAction":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionAlertsFilter"},"frequency":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionFrequency"},"group":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionGroup"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionId"},"params":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionParams"}},"required":["id","params"]},"Security_Detections_API_NormalizedRuleError":{"type":"object","properties":{"err_code":{"$ref":"#/components/schemas/Security_Detections_API_BulkActionsDryRunErrCode"},"message":{"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleDetailsInError"},"type":"array"},"status_code":{"type":"integer"}},"required":["message","status_code","rules"]},"Security_Detections_API_OsqueryParams":{"type":"object","properties":{"ecs_mapping":{"$ref":"#/components/schemas/Security_Detections_API_EcsMapping"},"pack_id":{"description":"To specify a query pack, use the packId field. Example: \"packId\": \"processes_elastic\"","type":"string"},"queries":{"items":{"$ref":"#/components/schemas/Security_Detections_API_OsqueryQuery"},"type":"array"},"query":{"description":"To run a single query, use the query field and enter a SQL query. Example: \"query\": \"SELECT * FROM processes;\"","type":"string"},"saved_query_id":{"description":"To run a saved query, use the saved_query_id field and specify the saved query ID. Example: \"saved_query_id\": \"processes_elastic\"","type":"string"},"timeout":{"description":"A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: \"timeout\": 120.","type":"number"}}},"Security_Detections_API_OsqueryQuery":{"type":"object","properties":{"ecs_mapping":{"$ref":"#/components/schemas/Security_Detections_API_EcsMapping"},"id":{"description":"Query ID","type":"string"},"platform":{"type":"string"},"query":{"description":"Query to run","type":"string"},"removed":{"type":"boolean"},"snapshot":{"type":"boolean"},"version":{"description":"Query version","type":"string"}},"required":["id","query"]},"Security_Detections_API_OsqueryResponseAction":{"type":"object","properties":{"action_type_id":{"enum":[".osquery"],"type":"string"},"params":{"$ref":"#/components/schemas/Security_Detections_API_OsqueryParams"}},"required":["action_type_id","params"]},"Security_Detections_API_PlatformErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}},"required":["statusCode","error","message"]},"Security_Detections_API_ProcessesParams":{"type":"object","properties":{"command":{"description":"To run an endpoint response action, specify a value for the command field. Example: \"command\": \"isolate\"","enum":["kill-process","suspend-process"],"type":"string"},"comment":{"description":"Add a note that explains or describes the action. You can find your comment in the response actions history log. Example: \"comment\": \"Check processes\"","type":"string"},"config":{"type":"object","properties":{"field":{"description":"Field to use instead of process.pid","type":"string"},"overwrite":{"default":true,"description":"Whether to overwrite field with process.pid","type":"boolean"}},"required":["field"]}},"required":["command","config"]},"Security_Detections_API_QueryRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleResponseFields"}]},"Security_Detections_API_QueryRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleDefaultableFields"}]},"Security_Detections_API_QueryRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleCreateFields"}]},"Security_Detections_API_QueryRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"}}},"Security_Detections_API_QueryRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"}}},"Security_Detections_API_QueryRulePatchFields":{"allOf":[{"type":"object","properties":{"type":{"description":"Rule type","enum":["query"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleDefaultableFields"}]},"Security_Detections_API_QueryRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_QueryRulePatchFields"}]},"Security_Detections_API_QueryRuleRequiredFields":{"type":"object","properties":{"type":{"description":"Rule type","enum":["query"],"type":"string"}},"required":["type"]},"Security_Detections_API_QueryRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"}},"required":["query","language"]}]},"Security_Detections_API_QueryRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleCreateFields"}]},"Security_Detections_API_RelatedIntegration":{"description":"Related integration is a potential dependency of a rule. It's assumed that if the user installs\none of the related integrations of a rule, the rule might start to work properly because it will\nhave source events (generated by this integration) potentially matching the rule's query.\n\nNOTE: Proper work is not guaranteed, because a related integration, if installed, can be\nconfigured differently or generate data that is not necessarily relevant for this rule.\n\nRelated integration is a combination of a Fleet package and (optionally) one of the\npackage's \"integrations\" that this package contains. It is represented by 3 properties:\n\n- `package`: name of the package (required, unique id)\n- `version`: version of the package (required, semver-compatible)\n- `integration`: name of the integration of this package (optional, id within the package)\n\nThere are Fleet packages like `windows` that contain only one integration; in this case,\n`integration` should be unspecified. There are also packages like `aws` and `azure` that contain\nseveral integrations; in this case, `integration` should be specified.\n","example":{"integration":"activitylogs","package":"azure","version":"~1.1.6"},"type":"object","properties":{"integration":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"package":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"version":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}},"required":["package","version"]},"Security_Detections_API_RelatedIntegrationArray":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegration"},"type":"array"},"Security_Detections_API_RequiredField":{"description":"Describes an Elasticsearch field that is needed for the rule to function.\n\nAlmost all types of Security rules check source event documents for a match to some kind of\nquery or filter. If a document has certain field with certain values, then it's a match and\nthe rule will generate an alert.\n\nRequired field is an event field that must be present in the source indices of a given rule.\n\n@example\nconst standardEcsField: RequiredField = {\n name: 'event.action',\n type: 'keyword',\n ecs: true,\n};\n\n@example\nconst nonEcsField: RequiredField = {\n name: 'winlog.event_data.AttributeLDAPDisplayName',\n type: 'keyword',\n ecs: false,\n};\n","type":"object","properties":{"ecs":{"description":"Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.","type":"boolean"},"name":{"description":"Name of an Elasticsearch field","format":"nonempty","minLength":1,"type":"string"},"type":{"description":"Type of the Elasticsearch field","format":"nonempty","minLength":1,"type":"string"}},"required":["name","type","ecs"]},"Security_Detections_API_RequiredFieldArray":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredField"},"type":"array"},"Security_Detections_API_RequiredFieldInput":{"description":"Input parameters to create a RequiredField. Does not include the `ecs` field, because `ecs` is calculated on the backend based on the field name and type.","type":"object","properties":{"name":{"description":"Name of an Elasticsearch field","format":"nonempty","minLength":1,"type":"string"},"type":{"description":"Type of the Elasticsearch field","format":"nonempty","minLength":1,"type":"string"}},"required":["name","type"]},"Security_Detections_API_ResponseAction":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_OsqueryResponseAction"},{"$ref":"#/components/schemas/Security_Detections_API_EndpointResponseAction"}]},"Security_Detections_API_ResponseFields":{"type":"object","properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"type":"string"},"execution_summary":{"$ref":"#/components/schemas/Security_Detections_API_RuleExecutionSummary"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"immutable":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleImmutable"},"required_fields":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldArray"},"revision":{"$ref":"#/components/schemas/Security_Detections_API_RuleRevision"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_source":{"$ref":"#/components/schemas/Security_Detections_API_RuleSource"},"updated_at":{"format":"date-time","type":"string"},"updated_by":{"type":"string"}},"required":["id","rule_id","immutable","rule_source","updated_at","updated_by","created_at","created_by","revision","related_integrations","required_fields"]},"Security_Detections_API_RiskScore":{"description":"A numerical representation of the alert's severity from 0 to 100, where:\n* `0` - `21` represents low severity\n* `22` - `47` represents medium severity\n* `48` - `73` represents high severity\n* `74` - `100` represents critical severity\n","maximum":100,"minimum":0,"type":"integer"},"Security_Detections_API_RiskScoreMapping":{"description":"Overrides generated alerts' risk_score with a value from the source event","items":{"type":"object","properties":{"field":{"description":"Source event field used to override the default `risk_score`.","type":"string"},"operator":{"enum":["equals"],"type":"string"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"value":{"type":"string"}},"required":["field","operator","value"]},"type":"array"},"Security_Detections_API_RuleAction":{"type":"object","properties":{"action_type_id":{"description":"The action type used for sending notifications, can be:\n\n - `.slack`\n - `.slack_api`\n - `.email`\n - `.index`\n - `.pagerduty`\n - `.swimlane`\n - `.webhook`\n - `.servicenow`\n - `.servicenow-itom`\n - `.servicenow-sir`\n - `.jira`\n - `.resilient`\n - `.opsgenie`\n - `.teams`\n - `.torq`\n - `.tines`\n - `.d3security`\n","type":"string"},"alerts_filter":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionAlertsFilter"},"frequency":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionFrequency"},"group":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionGroup"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionId"},"params":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionParams"},"uuid":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}},"required":["action_type_id","id","params"]},"Security_Detections_API_RuleActionAlertsFilter":{"additionalProperties":true,"description":"Object containing an action’s conditional filters.\n\n- `timeframe` (object, optional): Object containing the time frame for when this action can be run.\n - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array.\n - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day.\n - start (string, required): Start time in `hh:mm` format.\n - end (string, required): End time in `hh:mm` format.\n - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST.\n- `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run.\n - `kql` (string, required): A KQL string.\n - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.\n \n","type":"object"},"Security_Detections_API_RuleActionFrequency":{"description":"The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).","type":"object","properties":{"notifyWhen":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionNotifyWhen"},"summary":{"description":"Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert","type":"boolean"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle","nullable":true}},"required":["summary","notifyWhen","throttle"]},"Security_Detections_API_RuleActionGroup":{"description":"Optionally groups actions by use cases. Use `default` for alert notifications.","type":"string"},"Security_Detections_API_RuleActionId":{"description":"The connector ID.","type":"string"},"Security_Detections_API_RuleActionNotifyWhen":{"description":"Defines how often rules run actions.","enum":["onActiveAlert","onThrottleInterval","onActionGroupChange"],"type":"string"},"Security_Detections_API_RuleActionParams":{"additionalProperties":true,"description":"Object containing the allowed connector fields, which varies according to the connector type.\n\nFor Slack:\n\n - `message` (string, required): The notification message.\n\nFor email:\n\n - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value.\n - `subject` (string, optional): Email subject line.\n - `message` (string, required): Email body text.\n\nFor Webhook:\n\n - `body` (string, required): JSON payload.\n\nFor PagerDuty:\n\n - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`.\n - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`.\n - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert.\n - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime).\n - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`.\n - `group` (string, optional): Enables logical grouping of service components.\n - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action.\n - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters.\n - `class` (string, optional): Value indicating the class/type of the event.\n","type":"object"},"Security_Detections_API_RuleActionThrottle":{"description":"Defines how often rule actions are taken.","oneOf":[{"enum":["no_actions","rule"],"type":"string"},{"description":"Time interval in seconds, minutes, hours, or days.","example":"1h","pattern":"^[1-9]\\d*[smhd]$","type":"string"}]},"Security_Detections_API_RuleAuthorArray":{"description":"The rule’s author.","items":{"type":"string"},"type":"array"},"Security_Detections_API_RuleCreateProps":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleCreateProps"}],"discriminator":{"propertyName":"type"}},"Security_Detections_API_RuleDescription":{"description":"The rule’s description.","example":"Detects anomalous Windows process creation events.","minLength":1,"type":"string"},"Security_Detections_API_RuleDetailsInError":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"]},"Security_Detections_API_RuleExceptionList":{"description":"Array of [exception containers](https://www.elastic.co/guide/en/security/current/exceptions-api-overview.html), which define exceptions that prevent the rule from generating alerts even when its other criteria are met.\n","type":"object","properties":{"id":{"description":"ID of the exception container","format":"nonempty","minLength":1,"type":"string"},"list_id":{"description":"List ID of the exception container","format":"nonempty","minLength":1,"type":"string"},"namespace_type":{"description":"Determines the exceptions validity in rule's Kibana space","enum":["agnostic","single"],"type":"string"},"type":{"$ref":"#/components/schemas/Security_Detections_API_ExceptionListType"}},"required":["id","list_id","type","namespace_type"]},"Security_Detections_API_RuleExecutionMetrics":{"type":"object","properties":{"execution_gap_duration_s":{"description":"Duration in seconds of execution gap","minimum":0,"type":"integer"},"frozen_indices_queried_count":{"description":"Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.","minimum":0,"type":"integer"},"gap_range":{"description":"Range of the execution gap","type":"object","properties":{"gte":{"description":"Start date of the execution gap","type":"string"},"lte":{"description":"End date of the execution gap","type":"string"}},"required":["gte","lte"]},"total_enrichment_duration_ms":{"description":"Total time spent enriching documents during current rule execution cycle","minimum":0,"type":"integer"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during current rule execution cycle","minimum":0,"type":"integer"},"total_search_duration_ms":{"description":"Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response","minimum":0,"type":"integer"}}},"Security_Detections_API_RuleExecutionStatus":{"description":"Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule.\n- going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes.\n- running - Rule execution started but not reached any intermediate or final status.\n- partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist.\n- failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function.\n- succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's \"health\". The rule might or might not generate any alerts despite of it.","enum":["going to run","running","partial failure","failed","succeeded"],"type":"string"},"Security_Detections_API_RuleExecutionStatusOrder":{"type":"integer"},"Security_Detections_API_RuleExecutionSummary":{"description":"Summary of the last execution of a rule.\n\u003e info\n\u003e This field is under development and its usage or schema may change\n","type":"object","properties":{"last_execution":{"type":"object","properties":{"date":{"description":"Date of the last execution","format":"date-time","type":"string"},"message":{"type":"string"},"metrics":{"$ref":"#/components/schemas/Security_Detections_API_RuleExecutionMetrics"},"status":{"$ref":"#/components/schemas/Security_Detections_API_RuleExecutionStatus","description":"Status of the last execution"},"status_order":{"$ref":"#/components/schemas/Security_Detections_API_RuleExecutionStatusOrder"}},"required":["date","status","status_order","message","metrics"]}},"required":["last_execution"]},"Security_Detections_API_RuleFalsePositiveArray":{"description":"String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.","items":{"type":"string"},"type":"array"},"Security_Detections_API_RuleFilterArray":{"description":"The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array.\n\u003e info\n\u003e This field is not supported for ES|QL rules.\n","items":{},"type":"array"},"Security_Detections_API_RuleInterval":{"description":"Frequency of rule execution, using a date math range. For example, \"1h\" means the rule runs every hour. Defaults to 5m (5 minutes).","type":"string"},"Security_Detections_API_RuleIntervalFrom":{"description":"Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).","format":"date-math","type":"string"},"Security_Detections_API_RuleIntervalTo":{"type":"string"},"Security_Detections_API_RuleLicense":{"description":"The rule's license.","type":"string"},"Security_Detections_API_RuleMetadata":{"additionalProperties":true,"description":"Placeholder for metadata about the rule.\n\u003e info\n\u003e This field is overwritten when you save changes to the rule’s settings.\n","type":"object"},"Security_Detections_API_RuleName":{"description":"A human-readable name for the rule.","example":"Anomalous Windows Process Creation","minLength":1,"type":"string"},"Security_Detections_API_RuleNameOverride":{"description":"Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.","type":"string"},"Security_Detections_API_RuleObjectId":{"$ref":"#/components/schemas/Security_Detections_API_UUID","description":"A dynamic unique identifier for the rule object. It is randomly generated when a rule is created and cannot be changed after that. It is always a UUID. It is unique within a given Kibana space. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have different object `id`s."},"Security_Detections_API_RulePatchProps":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRulePatchProps"}]},"Security_Detections_API_RulePreviewLoggedRequest":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"duration":{"type":"integer"},"request":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"request_type":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}}},"Security_Detections_API_RulePreviewLogs":{"type":"object","properties":{"duration":{"description":"Execution duration in milliseconds","type":"integer"},"errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"type":"array"},"requests":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewLoggedRequest"},"type":"array"},"startedAt":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"warnings":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"type":"array"}},"required":["errors","warnings","duration"]},"Security_Detections_API_RulePreviewParams":{"type":"object","properties":{"invocationCount":{"type":"integer"},"timeframeEnd":{"format":"date-time","type":"string"}},"required":["invocationCount","timeframeEnd"]},"Security_Detections_API_RuleQuery":{"description":"[Query](https://www.elastic.co/guide/en/kibana/8.17/search.html) used by the rule to create alerts.\n\n- For indicator match rules, only the query’s results are used to determine whether an alert is generated.\n- ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-esql-rule) rules for more information.\n","type":"string"},"Security_Detections_API_RuleReferenceArray":{"description":"Array containing notes about or references to relevant information about the rule. Defaults to an empty array.","items":{"type":"string"},"type":"array"},"Security_Detections_API_RuleResponse":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRule"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRule"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRule"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRule"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRule"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRule"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRule"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRule"}],"discriminator":{"propertyName":"type"}},"Security_Detections_API_RuleRevision":{"description":"The rule's revision number.\n\nIt represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update.\n\u003e info\n\u003e Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.\n","minimum":0,"type":"integer"},"Security_Detections_API_RuleSignatureId":{"description":"A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.","type":"string"},"Security_Detections_API_RuleSource":{"description":"Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_ExternalRuleSource"},{"$ref":"#/components/schemas/Security_Detections_API_InternalRuleSource"}]},"Security_Detections_API_RuleTagArray":{"description":"String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.","items":{"type":"string"},"type":"array"},"Security_Detections_API_RuleUpdateProps":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleUpdateProps"}],"discriminator":{"propertyName":"type"}},"Security_Detections_API_RuleVersion":{"description":"The rule's version number.\n\n- For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). \n- For custom rules it is set to `1` when the rule is created. \n\u003e info\n\u003e It is not incremented on each update. Compare this to the `revision` field.\n","minimum":1,"type":"integer"},"Security_Detections_API_SavedObjectResolveAliasPurpose":{"enum":["savedObjectConversion","savedObjectImport"],"type":"string"},"Security_Detections_API_SavedObjectResolveAliasTargetId":{"type":"string"},"Security_Detections_API_SavedObjectResolveOutcome":{"enum":["exactMatch","aliasMatch","conflict"],"type":"string"},"Security_Detections_API_SavedQueryId":{"description":"Kibana [saved search](https://www.elastic.co/guide/en/kibana/current/save-open-search.html) used by the rule to create alerts.","type":"string"},"Security_Detections_API_SavedQueryRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleResponseFields"}]},"Security_Detections_API_SavedQueryRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleDefaultableFields"}]},"Security_Detections_API_SavedQueryRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleCreateFields"}]},"Security_Detections_API_SavedQueryRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_SavedQueryRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"}}},"Security_Detections_API_SavedQueryRulePatchFields":{"allOf":[{"type":"object","properties":{"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"},"type":{"description":"Rule type","enum":["saved_query"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleDefaultableFields"}]},"Security_Detections_API_SavedQueryRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRulePatchFields"}]},"Security_Detections_API_SavedQueryRuleRequiredFields":{"type":"object","properties":{"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"},"type":{"description":"Rule type","enum":["saved_query"],"type":"string"}},"required":["type","saved_id"]},"Security_Detections_API_SavedQueryRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}},"required":["language"]}]},"Security_Detections_API_SavedQueryRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleCreateFields"}]},"Security_Detections_API_SetAlertsStatusByIds":{"type":"object","properties":{"signal_ids":{"description":"List of alert `id`s.","items":{"format":"nonempty","minLength":1,"type":"string"},"minItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/Security_Detections_API_AlertStatus"}},"required":["signal_ids","status"]},"Security_Detections_API_SetAlertsStatusByQuery":{"type":"object","properties":{"conflicts":{"default":"abort","enum":["abort","proceed"],"type":"string"},"query":{"additionalProperties":true,"type":"object"},"status":{"$ref":"#/components/schemas/Security_Detections_API_AlertStatus"}},"required":["query","status"]},"Security_Detections_API_SetAlertTags":{"description":"Object with list of tags to add and remove.","type":"object","properties":{"tags_to_add":{"$ref":"#/components/schemas/Security_Detections_API_AlertTags"},"tags_to_remove":{"$ref":"#/components/schemas/Security_Detections_API_AlertTags"}},"required":["tags_to_add","tags_to_remove"]},"Security_Detections_API_SetupGuide":{"description":"Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.","type":"string"},"Security_Detections_API_Severity":{"description":"Severity level of alerts produced by the rule, which must be one of the following:\n* `low`: Alerts that are of interest but generally not considered to be security incidents\n* `medium`: Alerts that require investigation\n* `high`: Alerts that require immediate investigation\n* `critical`: Alerts that indicate it is highly likely a security incident has occurred\n","enum":["low","medium","high","critical"],"type":"string"},"Security_Detections_API_SeverityMapping":{"description":"Overrides generated alerts' severity with values from the source event","items":{"type":"object","properties":{"field":{"description":"Source event field used to override the default `severity`.","type":"string"},"operator":{"enum":["equals"],"type":"string"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"value":{"type":"string"}},"required":["field","operator","severity","value"]},"type":"array"},"Security_Detections_API_SiemErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"Security_Detections_API_SkippedAlertsIndexMigration":{"type":"object","properties":{"index":{"type":"string"}},"required":["index"]},"Security_Detections_API_SortOrder":{"enum":["asc","desc"],"type":"string"},"Security_Detections_API_Threat":{"description":"\u003e info\n\u003e Currently, only threats described using the MITRE ATT\u0026CK\u0026trade; framework are supported.\n","type":"object","properties":{"framework":{"description":"Relevant attack framework","type":"string"},"tactic":{"$ref":"#/components/schemas/Security_Detections_API_ThreatTactic"},"technique":{"description":"Array containing information on the attack techniques (optional)","items":{"$ref":"#/components/schemas/Security_Detections_API_ThreatTechnique"},"type":"array"}},"required":["framework","tactic"]},"Security_Detections_API_ThreatArray":{"items":{"$ref":"#/components/schemas/Security_Detections_API_Threat"},"type":"array"},"Security_Detections_API_ThreatFilters":{"items":{"description":"Query and filter context array used to filter documents from the Elasticsearch index containing the threat values"},"type":"array"},"Security_Detections_API_ThreatIndex":{"description":"Elasticsearch indices used to check which field values generate alerts.","items":{"type":"string"},"type":"array"},"Security_Detections_API_ThreatIndicatorPath":{"description":"Defines the path to the threat indicator in the indicator documents (optional)","type":"string"},"Security_Detections_API_ThreatMapping":{"description":"Array of entries objects that define mappings between the source event fields and the values in the Elasticsearch threat index. Each entries object must contain these fields:\n\n- field: field from the event indices on which the rule runs\n- type: must be mapping\n- value: field from the Elasticsearch threat index\n \nYou can use Boolean and and or logic to define the conditions for when matching fields and values generate alerts. Sibling entries objects are evaluated using or logic, whereas multiple entries in a single entries object use and logic. See Example of Threat Match rule which uses both `and` and `or` logic.\n","items":{"type":"object","properties":{"entries":{"items":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"type":{"enum":["mapping"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}},"required":["field","type","value"]},"type":"array"}},"required":["entries"]},"minItems":1,"type":"array"},"Security_Detections_API_ThreatMatchRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleResponseFields"}]},"Security_Detections_API_ThreatMatchRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleDefaultableFields"}]},"Security_Detections_API_ThreatMatchRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleCreateFields"}]},"Security_Detections_API_ThreatMatchRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_ThreatMatchRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"concurrent_searches":{"$ref":"#/components/schemas/Security_Detections_API_ConcurrentSearches"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"items_per_search":{"$ref":"#/components/schemas/Security_Detections_API_ItemsPerSearch"},"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"},"threat_filters":{"$ref":"#/components/schemas/Security_Detections_API_ThreatFilters"},"threat_indicator_path":{"$ref":"#/components/schemas/Security_Detections_API_ThreatIndicatorPath"},"threat_language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_ThreatMatchRulePatchFields":{"allOf":[{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"threat_index":{"$ref":"#/components/schemas/Security_Detections_API_ThreatIndex"},"threat_mapping":{"$ref":"#/components/schemas/Security_Detections_API_ThreatMapping"},"threat_query":{"$ref":"#/components/schemas/Security_Detections_API_ThreatQuery"},"type":{"description":"Rule type","enum":["threat_match"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleDefaultableFields"}]},"Security_Detections_API_ThreatMatchRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRulePatchFields"}]},"Security_Detections_API_ThreatMatchRuleRequiredFields":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"threat_index":{"$ref":"#/components/schemas/Security_Detections_API_ThreatIndex"},"threat_mapping":{"$ref":"#/components/schemas/Security_Detections_API_ThreatMapping"},"threat_query":{"$ref":"#/components/schemas/Security_Detections_API_ThreatQuery"},"type":{"description":"Rule type","enum":["threat_match"],"type":"string"}},"required":["type","query","threat_query","threat_mapping","threat_index"]},"Security_Detections_API_ThreatMatchRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}},"required":["language"]}]},"Security_Detections_API_ThreatMatchRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleCreateFields"}]},"Security_Detections_API_ThreatQuery":{"description":"Query used to determine which fields in the Elasticsearch index are used for generating alerts.","type":"string"},"Security_Detections_API_ThreatSubtechnique":{"type":"object","properties":{"id":{"description":"Subtechnique ID","type":"string"},"name":{"description":"Subtechnique name","type":"string"},"reference":{"description":"Subtechnique reference","type":"string"}},"required":["id","name","reference"]},"Security_Detections_API_ThreatTactic":{"description":"Object containing information on the attack type\n","type":"object","properties":{"id":{"description":"Tactic ID","type":"string"},"name":{"description":"Tactic name","type":"string"},"reference":{"description":"Tactic reference","type":"string"}},"required":["id","name","reference"]},"Security_Detections_API_ThreatTechnique":{"type":"object","properties":{"id":{"description":"Technique ID","type":"string"},"name":{"description":"Technique name","type":"string"},"reference":{"description":"Technique reference","type":"string"},"subtechnique":{"description":"Array containing more specific information on the attack technique.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_ThreatSubtechnique"},"type":"array"}},"required":["id","name","reference"]},"Security_Detections_API_Threshold":{"type":"object","properties":{"cardinality":{"$ref":"#/components/schemas/Security_Detections_API_ThresholdCardinality"},"field":{"$ref":"#/components/schemas/Security_Detections_API_ThresholdField"},"value":{"$ref":"#/components/schemas/Security_Detections_API_ThresholdValue"}},"required":["field","value"]},"Security_Detections_API_ThresholdAlertSuppression":{"description":"Defines alert suppression configuration.","type":"object","properties":{"duration":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionDuration"}},"required":["duration"]},"Security_Detections_API_ThresholdCardinality":{"description":"The field on which the cardinality is applied.","items":{"type":"object","properties":{"field":{"description":"The field on which to calculate and compare the cardinality.","type":"string"},"value":{"description":"The threshold value from which an alert is generated based on unique number of values of cardinality.field.","minimum":0,"type":"integer"}},"required":["field","value"]},"type":"array"},"Security_Detections_API_ThresholdField":{"description":"The field on which the threshold is applied. If you specify an empty array ([]), alerts are generated when the query returns at least the number of results specified in the value field.","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"Security_Detections_API_ThresholdRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleResponseFields"}]},"Security_Detections_API_ThresholdRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleDefaultableFields"}]},"Security_Detections_API_ThresholdRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleCreateFields"}]},"Security_Detections_API_ThresholdRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_ThresholdRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_ThresholdAlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"}}},"Security_Detections_API_ThresholdRulePatchFields":{"allOf":[{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"threshold":{"$ref":"#/components/schemas/Security_Detections_API_Threshold"},"type":{"description":"Rule type","enum":["threshold"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleDefaultableFields"}]},"Security_Detections_API_ThresholdRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRulePatchFields"}]},"Security_Detections_API_ThresholdRuleRequiredFields":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"threshold":{"$ref":"#/components/schemas/Security_Detections_API_Threshold"},"type":{"description":"Rule type","enum":["threshold"],"type":"string"}},"required":["type","query","threshold"]},"Security_Detections_API_ThresholdRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}},"required":["language"]}]},"Security_Detections_API_ThresholdRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleCreateFields"}]},"Security_Detections_API_ThresholdValue":{"description":"The threshold value from which an alert is generated.","minimum":1,"type":"integer"},"Security_Detections_API_ThrottleForBulkActions":{"description":"Defines the maximum interval in which a rule’s actions are executed.\n\u003e info\n\u003e The rule level `throttle` field is deprecated in Elastic Security 8.8 and will remain active for at least the next 12 months.\n\u003e In Elastic Security 8.8 and later, you can use the `frequency` field to define frequencies for individual actions. Actions without frequencies will acquire a converted version of the rule’s `throttle` field. In the response, the converted `throttle` setting appears in the individual actions' `frequency` field.\n","enum":["rule","1h","1d","7d"],"type":"string"},"Security_Detections_API_TiebreakerField":{"description":"Sets a secondary field for sorting events","type":"string"},"Security_Detections_API_TimelineTemplateId":{"description":"Timeline template ID","type":"string"},"Security_Detections_API_TimelineTemplateTitle":{"description":"Timeline template title","type":"string"},"Security_Detections_API_TimestampField":{"description":"Specifies the name of the event timestamp field used for sorting a sequence of events. Not to be confused with `timestamp_override`, which specifies the more general field used for querying events within a range. Defaults to the @timestamp ECS field.","type":"string"},"Security_Detections_API_TimestampOverride":{"description":"Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.","type":"string"},"Security_Detections_API_TimestampOverrideFallbackDisabled":{"description":"Disables the fallback to the event's @timestamp field","type":"boolean"},"Security_Detections_API_UUID":{"description":"A universally unique identifier","format":"uuid","type":"string"},"Security_Detections_API_WarningSchema":{"type":"object","properties":{"actionPath":{"type":"string"},"buttonLabel":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"}},"required":["type","message","actionPath"]},"Security_Endpoint_Exceptions_API_EndpointList":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionList"},{"additionalProperties":false,"type":"object"}]},"Security_Endpoint_Exceptions_API_EndpointListItem":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItem"},"Security_Endpoint_Exceptions_API_ExceptionList":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListDescription"},"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListId"},"immutable":{"type":"boolean"},"list_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListMeta"},"name":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListName"},"namespace_type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionNamespaceType"},"os_types":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListTags"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","type":"string"},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListType"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","type":"string"},"version":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListVersion"}},"required":["id","list_id","type","name","description","immutable","namespace_type","version","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Endpoint_Exceptions_API_ExceptionListDescription":{"description":"Describes the exception list.","example":"This list tracks allowlisted values.","type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListHumanId":{"description":"Exception list's human readable string identifier, e.g. `trusted-linux-processes`.","example":"simple_list","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListId":{"description":"Exception list's identifier.","example":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItem":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"comments":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemCommentArray"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemExpireTime"},"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemId"},"item_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId"},"list_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionNamespaceType"},"os_types":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemTags"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","type":"string"},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemType"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","type":"string"}},"required":["id","item_id","list_id","type","name","description","entries","namespace_type","comments","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Endpoint_Exceptions_API_ExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"}},"required":["id","comment","created_at","created_by"]},"Security_Endpoint_Exceptions_API_ExceptionListItemCommentArray":{"description":"Array of comment fields:\n\n- comment (string): Comments about the exception item.\n","items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemComment"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListItemDescription":{"description":"Describes the exception list.","type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemEntry":{"anyOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatch"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryList"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryExists"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryNested"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchWildcard"}],"discriminator":{"propertyName":"type"}},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryArray":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntry"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryExists":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["exists"],"type":"string"}},"required":["type","field","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryList":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"list":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ListId"},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ListType"}},"required":["id","type"]},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["list"],"type":"string"}},"required":["type","field","list","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatch":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["match"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"}},"required":["type","field","value","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["match_any"],"type":"string"},"value":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"minItems":1,"type":"array"}},"required":["type","field","value","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchWildcard":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["wildcard"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"}},"required":["type","field","value","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryNested":{"type":"object","properties":{"entries":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryNestedEntryItem"},"minItems":1,"type":"array"},"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"type":{"enum":["nested"],"type":"string"}},"required":["type","field","entries"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryNestedEntryItem":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatch"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryExists"}]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator":{"enum":["excluded","included"],"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemExpireTime":{"description":"The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions.","format":"date-time","type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemHumanId":{"description":"Human readable string identifier, e.g. `trusted-linux-processes`","example":"simple_list_item","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemId":{"description":"Exception's identifier.","example":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemMeta":{"additionalProperties":true,"type":"object"},"Security_Endpoint_Exceptions_API_ExceptionListItemName":{"description":"Exception list name.","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListOsType"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListItemTags":{"items":{"description":"String array containing words and phrases to help categorize exception items.","format":"nonempty","minLength":1,"type":"string"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListItemType":{"enum":["simple"],"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListMeta":{"additionalProperties":true,"description":"Placeholder for metadata about the list container.","type":"object"},"Security_Endpoint_Exceptions_API_ExceptionListName":{"description":"The name of the exception list.","example":"My exception list","type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListOsType":{"description":"Use this field to specify the operating system.","enum":["linux","macos","windows"],"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListOsTypeArray":{"description":"Use this field to specify the operating system. Only enter one value.","items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListOsType"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListTags":{"description":"String array containing words and phrases to help categorize exception containers.","items":{"type":"string"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListType":{"description":"The type of exception list to be created. Different list types may denote where they can be utilized.","enum":["detection","rule_default","endpoint","endpoint_trusted_apps","endpoint_events","endpoint_host_isolation_exceptions","endpoint_blocklists"],"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListVersion":{"description":"The document version, automatically increasd on updates.","minimum":1,"type":"integer"},"Security_Endpoint_Exceptions_API_ExceptionNamespaceType":{"description":"Determines whether the exception container is available in all Kibana spaces or just the space\nin which it is created, where:\n\n- `single`: Only available in the Kibana space in which it is created.\n- `agnostic`: Available in all Kibana spaces.\n","enum":["agnostic","single"],"type":"string"},"Security_Endpoint_Exceptions_API_FindEndpointListItemsFilter":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"Security_Endpoint_Exceptions_API_ListId":{"description":"Value list's identifier.","example":"21b01cfb-058d-44b9-838c-282be16c91cd","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ListType":{"description":"Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:\n\n- `keyword`: Many ECS fields are Elasticsearch keywords\n- `ip`: IP addresses\n- `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation)\n","enum":["binary","boolean","byte","date","date_nanos","date_range","double","double_range","float","float_range","geo_point","geo_shape","half_float","integer","integer_range","ip","ip_range","keyword","long","long_range","shape","short","text"],"type":"string"},"Security_Endpoint_Exceptions_API_NonEmptyString":{"description":"A string that does not contain only whitespace characters","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_PlatformErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}},"required":["statusCode","error","message"]},"Security_Endpoint_Exceptions_API_SiemErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"Security_Endpoint_Management_API_ActionStateSuccessResponse":{"type":"object","properties":{"body":{"type":"object","properties":{"data":{"type":"object","properties":{"canEncrypt":{"type":"boolean"}}}},"required":["data"]}},"required":["body"]},"Security_Endpoint_Management_API_ActionStatusSuccessResponse":{"type":"object","properties":{"body":{"type":"object","properties":{"data":{"type":"object","properties":{"agent_id":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentId"},"pending_actions":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionsSchema"}},"required":["agent_id","pending_actions"]}},"required":["data"]}},"required":["body"]},"Security_Endpoint_Management_API_AgentId":{"description":"Agent ID","type":"string"},"Security_Endpoint_Management_API_AgentIds":{"description":"A list of agent IDs. Max of 50.","example":["agent-id-1","agent-id-2"],"minLength":1,"oneOf":[{"items":{"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"minLength":1,"type":"string"}]},"Security_Endpoint_Management_API_AgentTypes":{"description":"List of agent types to retrieve. Defaults to `endpoint`.","enum":["endpoint","sentinel_one","crowdstrike","microsoft_defender_endpoint"],"example":"endpoint","type":"string"},"Security_Endpoint_Management_API_AlertIds":{"description":"A list of alerts `id`s.","items":{"format":"nonempty","minLength":1,"type":"string"},"minItems":1,"type":"array"},"Security_Endpoint_Management_API_CaseIds":{"description":"Case IDs to be updated (cannot contain empty strings)","example":["case-id-1","case-id-2"],"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"Security_Endpoint_Management_API_CloudFileScriptParameters":{"type":"object","properties":{"cloudFile":{"description":"Script name in cloud storage.","minLength":1,"type":"string"},"commandLine":{"description":"Command line arguments.","minLength":1,"type":"string"},"timeout":{"description":"Timeout in seconds.","minimum":1,"type":"integer"}},"required":["cloudFile"]},"Security_Endpoint_Management_API_Command":{"description":"The command to be executed (cannot be an empty string)","enum":["isolate","unisolate","kill-process","suspend-process","running-processes","get-file","execute","upload","scan"],"minLength":1,"type":"string"},"Security_Endpoint_Management_API_Commands":{"description":"A list of response action command names.","example":["isolate","unisolate"],"items":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Command"},"type":"array"},"Security_Endpoint_Management_API_Comment":{"description":"Optional comment","example":"This is a comment","type":"string"},"Security_Endpoint_Management_API_EndDate":{"description":"An end date in ISO format or Date Math format.","example":"2023-10-31T23:59:59.999Z","type":"string"},"Security_Endpoint_Management_API_EndpointIds":{"description":"List of endpoint IDs (cannot contain empty strings)","example":["endpoint-id-1","endpoint-id-2"],"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"Security_Endpoint_Management_API_EndpointMetadataResponse":{"example":{"host_status":"healthy","last_checkin":"2023-07-04T15:48:57.360Z","metadata":{"@timestamp":"2023-07-04T15:48:57.3609346Z","agent":{"build":{"original":"version: 7.16.0, compiled: Tue Nov 16 17:00:00 2021, branch: 7.16, commit: 73a51033db85e0fb3be1c934697ef6a2b08979ab"},"id":"abb8a826-6812-448c-a571-6d8269b51449","type":"endpoint","version":"7.16.0"},"data_stream":{"dataset":"endpoint.metadata","namespace":"default","type":"metrics"},"ecs":{"version":"1.11.0"},"elastic":{"agent":{"id":"abb8a826-6812-448c-a571-6d8269b51449"}},"Endpoint":{"capabilities":["isolation"],"configuration":{"isolation":false},"policy":{"applied":{"endpoint_policy_version":"2","id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","name":"test","status":"success","version":"3"}},"state":{"isolation":false},"status":"enrolled"},"event":{"action":"endpoint_metadata","agent_id_status":"verified","category":["host"],"created":"2023-07-04T15:48:57.3609346Z","dataset":"endpoint.metadata","id":"MNtRc++KoKHXXwlj+++++OhZ","ingested":"2023-07-04T15:48:58Z","kind":"metric","module":"endpoint","sequence":43757,"type":["info"]},"host":{"architecture":"x86_64","hostname":"WinDev2104Eval","id":"17d9cabc-7edd-43bc-bacb-8da5f5e6c0e5","ip":["10.0.2.15","fe80::21a6:63d3:d70e:e3ad","127.0.0.1","::1"],"mac":["08:00:27:b1:1d:5a"],"name":"WinDev2104Eval","os":{"Ext":{"variant":"Windows 10 Enterprise Evaluation"},"family":"windows","full":"Windows 10 Enterprise Evaluation 20H2 (10.0.19042.906)","kernel":"20H2 (10.0.19042.906)","name":"Windows","platform":"windows","type":"windows","version":"20H2 (10.0.19042.906)"}},"message":"Endpoint metadata","policy_info":{"agent":{"applied":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":3},"configured":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":3}},"endpoint":{"id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","revision":2}}}},"type":"object","properties":{}},"Security_Endpoint_Management_API_ExecuteRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"type":"object","properties":{"command":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Command"},"timeout":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Timeout"}},"required":["command"]}},"required":["parameters"]}],"example":{"comment":"Get list of all files","endpoint_ids":["b3d6de74-36b0-4fa8-be46-c375bf1771bf"],"parameters":{"command":"ls -al","timeout":600}}},"Security_Endpoint_Management_API_ExecuteRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentState":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"isCompleted":false,"wasSuccessful":false}},"agentType":"endpoint","command":"execute","comment":"Get list of all files","createdBy":"myuser","hosts":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"name":"gke-endpoint-gke-clu-endpoint-node-po-e1a3ab89-4c4r"}},"id":"9f934028-2300-4927-b531-b26376793dc4","isCompleted":false,"isExpired":false,"outputs":{},"parameters":{"command":"ls -al","timeout":600},"startedAt":"2023-07-28T18:43:27.362Z","status":"pending","wasSuccessful":false}},"type":"object","properties":{}},"Security_Endpoint_Management_API_GetEndpointActionListResponse":{"example":{"data":[{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"running-processes","completedAt":"2022-08-08T09:50:47.672Z","createdBy":"elastic","id":"b3d6de74-36b0-4fa8-be46-c375bf1771bf","isCompleted":true,"isExpired":false,"startedAt":"2022-08-08T15:24:57.402Z","wasSuccessful":true},{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"isolate","completedAt":"2022-08-08T10:41:57.352Z","createdBy":"elastic","id":"43b4098b-8752-4fbb-a7a7-6df7c74d0ee3","isCompleted":true,"isExpired":false,"startedAt":"2022-08-08T15:23:37.359Z","wasSuccessful":true},{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"kill-process","comment":"bad process - taking up too much cpu","completedAt":"2022-08-08T09:44:50.952Z","createdBy":"elastic","id":"5bc92c86-b8e6-42dd-837f-12ad29e09caa","isCompleted":true,"isExpired":false,"startedAt":"2022-08-08T14:38:44.125Z","wasSuccessful":true},{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"unisolate","comment":"Not a threat to the network","completedAt":"2022-08-08T09:40:47.398Z","createdBy":"elastic","id":"790d54e0-3aa3-4e5b-8255-3ce9d851246a","isCompleted":true,"isExpired":false,"startedAt":"2022-08-08T14:38:15.391Z","wasSuccessful":true}],"elasticAgentIds":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"endDate":"now","page":1,"pageSize":10,"startDate":"now-24h/h","total":4},"type":"object","properties":{}},"Security_Endpoint_Management_API_GetEndpointActionResponse":{"example":{"data":{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"running-processes","completedAt":"2022-08-08T09:50:47.672Z","createdBy":"elastic","id":"b3d6de74-36b0-4fa8-be46-c375bf1771bf","isCompleted":true,"isExpired":false,"outputs":{"afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0":{"content":{"entries":[{"command":"/opt/cmd1","entity_id":"fk2ym7bl3oiu3okjcik0xosc0i0m75x3eh49nu3uaqt4dqanjt","pid":"822","user":"Dexter"},{"command":"/opt/cmd3/opt/cmd3/opt/cmd3/opt/cmd3","entity_id":"pwvz91m48wpj9j7ov9gtw8fp7u2rat4eu5ipte37hnhdcbi2pt","pid":"984","user":"Jada"}]},"type":"json"}},"startedAt":"2022-08-08T15:24:57.402Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_GetFileRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"]}},"required":["parameters"]}],"example":{"comment":"Get my file","endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"parameters":{"path":"/usr/my-file.txt"}}},"Security_Endpoint_Management_API_GetFileRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentState":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"isCompleted":false,"wasSuccessful":false}},"agentType":"endpoint","command":"get-file","createdBy":"myuser","hosts":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"name":"gke-endpoint-gke-clu-endpoint-node-po-e1a3ab89-4c4r"}},"id":"27ba1b42-7cc6-4e53-86ce-675c876092b2","isCompleted":false,"isExpired":false,"outputs":{},"parameters":{"path":"/usr/my-file.txt"},"startedAt":"2023-07-28T19:00:03.911Z","status":"pending","wasSuccessful":false}},"type":"object","properties":{}},"Security_Endpoint_Management_API_GetProcessesRouteRequestBody":{"example":{"endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"]},"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},"Security_Endpoint_Management_API_GetProcessesRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"running-processes","comment":"","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_HostPathScriptParameters":{"type":"object","properties":{"commandLine":{"description":"Command line arguments.","minLength":1,"type":"string"},"hostPath":{"description":"Absolute or relative path of script on host machine.","minLength":1,"type":"string"},"timeout":{"description":"Timeout in seconds.","minimum":1,"type":"integer"}},"required":["hostPath"]},"Security_Endpoint_Management_API_HostStatuses":{"description":"A set of agent health statuses to filter by.","example":["healthy","updating"],"items":{"enum":["healthy","offline","updating","inactive","unenrolled"],"type":"string"},"type":"array"},"Security_Endpoint_Management_API_IsolateRouteResponse":{"example":{"action":"233db9ea-6733-4849-9226-5a7039c7161d","data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"suspend-process","comment":"suspend the process","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{"entity_id":"abc123"},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_KillProcessRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"oneOf":[{"type":"object","properties":{"pid":{"description":"The process ID (PID) of the process to terminate.","example":123,"minimum":1,"type":"integer"}}},{"type":"object","properties":{"entity_id":{"description":"The entity ID of the process to terminate.","example":"abc123","minLength":1,"type":"string"}}},{"type":"object","properties":{"process_name":{"description":"The name of the process to terminate. Valid for SentinelOne agent type only.","example":"Elastic","minLength":1,"type":"string"}}}]}},"required":["parameters"]}],"example":{"comment":"terminate the process","endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"parameters":{"entity_id":"abc123"}}},"Security_Endpoint_Management_API_KillProcessRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"kill-process","comment":"terminate the process","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{"entity_id":"abc123"},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_Kuery":{"description":"A KQL string.","example":"united.endpoint.host.os.name : 'Windows'","type":"string"},"Security_Endpoint_Management_API_MetadataListResponse":{"example":{"data":[{"host_status":"healthy","last_checkin":"2023-07-04T15:47:57.432Z","metadata":{"@timestamp":"2023-07-04T15:47:57.432173535Z","agent":{"build":{"original":"version: 7.16.0, compiled: Tue Nov 16 16:00:00 2021, branch: 7.16, commit: 73a51033db85e0fb3be1c934697ef6a2b08979ab"},"id":"285297c6-3bff-4b83-9a07-f3e749801123","type":"endpoint","version":"7.16.0"},"data_stream":{"dataset":"endpoint.metadata","namespace":"default","type":"metrics"},"ecs":{"version":"1.11.0"},"elastic":{"agent":{"id":"285297c6-3bff-4b83-9a07-f3e749801123"}},"Endpoint":{"capabilities":["isolation"],"configuration":{"isolation":false},"policy":{"applied":{"endpoint_policy_version":"2","id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","name":"test","status":"success","version":"3"}},"state":{"isolation":false},"status":"enrolled"},"event":{"action":"endpoint_metadata","agent_id_status":"verified","category":["host"],"created":"2023-07-04T15:47:57.432173535Z","dataset":"endpoint.metadata","id":"MNtSXK/SkhEBnmgt++++++7S","ingested":"2023-07-04T15:47:58Z","kind":"metric","module":"endpoint","sequence":400,"type":["info"]},"host":{"architecture":"x86_64","hostname":"david-Xubuntu","id":"0cfead88e2024bd8a27476352b5ab264","ip":["127.0.0.1","::1","10.0.2.15","fe80::2ac7:8e15:b957:2fa1"],"mac":["08:00:27:e6:78:8b"],"name":"david-Xubuntu","os":{"Ext":{"variant":"Ubuntu"},"family":"ubuntu","full":"Ubuntu 20.04.2","kernel":"5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021","name":"Linux","platform":"ubuntu","type":"linux","version":"20.04.2"}},"message":"Endpoint metadata"},"policy_info":{"agent":{"applied":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":0},"configured":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":3}},"endpoint":{"id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","revision":2}}},{"host_status":"healthy","last_checkin":"2023-07-04T15:44:31.491Z","metadata":{"@timestamp":"2023-07-04T15:44:31.4917849Z","agent":{"build":{"original":"version: 7.16.0, compiled: Tue Nov 16 17:00:00 2021, branch: 7.16, commit: 73a51033db85e0fb3be1c934697ef6a2b08979ab"},"id":"abb8a826-6812-448c-a571-6d8269b51449","type":"endpoint","version":"7.16.0"},"data_stream":{"dataset":"endpoint.metadata","namespace":"default","type":"metrics"},"ecs":{"version":"1.11.0"},"elastic":{"agent":{"id":"abb8a826-6812-448c-a571-6d8269b51449"}},"Endpoint":{"capabilities":["isolation"],"configuration":{"isolation":false},"policy":{"applied":{"endpoint_policy_version":"2","id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","name":"test","status":"success","version":"3"}},"state":{"isolation":false},"status":"enrolled"},"event":{"action":"endpoint_metadata","agent_id_status":"verified","category":["host"],"created":"2023-07-04T15:44:31.4917849Z","dataset":"endpoint.metadata","id":"MNtRc++KoKHXXwlj+++++/N9","ingested":"2023-07-04T15:44:33Z","kind":"metric","module":"endpoint","sequence":5159,"type":["info"]},"host":{"architecture":"x86_64","hostname":"WinDev2104Eval","id":"17d9cabc-7edd-43bc-bacb-8da5f5e6c0e5","ip":["10.0.2.15","fe80::21a6:63d3:d70e:e3ad","127.0.0.1","::1"],"mac":["08:00:27:b1:1d:5a"],"name":"WinDev2104Eval","os":{"Ext":{"variant":"Windows 10 Enterprise Evaluation"},"family":"windows","full":"Windows 10 Enterprise Evaluation 20H2 (10.0.19042.906)","kernel":"20H2 (10.0.19042.906)","name":"Windows","platform":"windows","type":"windows","version":"20H2 (10.0.19042.906)"}},"message":"Endpoint metadata"},"policy_info":{"agent":{"applied":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":0},"configured":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":3}},"endpoint":{"id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","revision":2}}}],"page":0,"pageSize":10,"sortDirection":"desc","sortField":"enrolled_at","total":2},"type":"object","properties":{}},"Security_Endpoint_Management_API_Page":{"default":1,"description":"Page number","example":1,"minimum":1,"type":"integer"},"Security_Endpoint_Management_API_PageSize":{"default":10,"description":"Number of items per page","example":10,"maximum":100,"minimum":1,"type":"integer"},"Security_Endpoint_Management_API_Parameters":{"description":"Optional parameters object","type":"object"},"Security_Endpoint_Management_API_PendingActionDataType":{"type":"integer"},"Security_Endpoint_Management_API_PendingActionsSchema":{"oneOf":[{"type":"object","properties":{"execute":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"get-file":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"isolate":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"kill-process":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"running-processes":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"scan":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"suspend-process":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"unisolate":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"upload":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"}}},{"additionalProperties":true,"type":"object"}]},"Security_Endpoint_Management_API_ProtectionUpdatesNoteResponse":{"type":"object","properties":{"note":{"type":"string"}}},"Security_Endpoint_Management_API_RawScriptParameters":{"type":"object","properties":{"commandLine":{"description":"Command line arguments.","minLength":1,"type":"string"},"raw":{"description":"Raw script content.","minLength":1,"type":"string"},"timeout":{"description":"Timeout in seconds.","minimum":1,"type":"integer"}},"required":["raw"]},"Security_Endpoint_Management_API_RunScriptRouteRequestBody":{"type":"object","properties":{"parameters":{"description":"Exactly one of 'Raw', 'HostPath', or 'CloudFile' must be provided. CommandLine and Timeout are optional for all.","oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Management_API_RawScriptParameters"},{"$ref":"#/components/schemas/Security_Endpoint_Management_API_HostPathScriptParameters"},{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CloudFileScriptParameters"}]}},"required":["parameters"]},"Security_Endpoint_Management_API_ScanRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"type":"object","properties":{"path":{"description":"The folder or file’s full path (including the file name).","example":"/usr/my-file.txt","type":"string"}},"required":["path"]}},"required":["parameters"]}],"example":{"comment":"Scan the file for malware","endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"parameters":{"path":"/usr/my-file.txt"}}},"Security_Endpoint_Management_API_ScanRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentState":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"isCompleted":false,"wasSuccessful":false}},"agentType":"endpoint","command":"scan","createdBy":"myuser","hosts":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"name":"gke-endpoint-gke-clu-endpoint-node-po-e1a3ab89-4c4r"}},"id":"27ba1b42-7cc6-4e53-86ce-675c876092b2","isCompleted":false,"isExpired":false,"outputs":{},"parameters":{"path":"/usr/my-file.txt"},"startedAt":"2023-07-28T19:00:03.911Z","status":"pending","wasSuccessful":false}},"type":"object","properties":{}},"Security_Endpoint_Management_API_SortDirection":{"description":"Determines the sort order.","enum":["asc","desc"],"example":"desc","type":"string"},"Security_Endpoint_Management_API_SortField":{"description":"Determines which field is used to sort the results.","enum":["enrolled_at","metadata.host.hostname","host_status","metadata.Endpoint.policy.applied.name","metadata.Endpoint.policy.applied.status","metadata.host.os.name","metadata.host.ip","metadata.agent.version","last_checkin"],"example":"enrolled_at","type":"string"},"Security_Endpoint_Management_API_StartDate":{"description":"A start date in ISO 8601 format or Date Math format.","example":"2023-10-31T00:00:00.000Z","type":"string"},"Security_Endpoint_Management_API_SuccessResponse":{"type":"object","properties":{}},"Security_Endpoint_Management_API_SuspendProcessRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"oneOf":[{"type":"object","properties":{"pid":{"description":"The process ID (PID) of the process to suspend.","example":123,"minimum":1,"type":"integer"}}},{"type":"object","properties":{"entity_id":{"description":"The entity ID of the process to suspend.","example":"abc123","minLength":1,"type":"string"}}}]}},"required":["parameters"]}],"example":{"comment":"suspend the process","endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"parameters":{"entity_id":"abc123"}}},"Security_Endpoint_Management_API_SuspendProcessRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"suspend-process","comment":"suspend the process","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{"entity_id":"abc123"},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_Timeout":{"description":"The maximum timeout value in milliseconds (optional)","minimum":1,"type":"integer"},"Security_Endpoint_Management_API_Type":{"description":"Type of response action","enum":["automated","manual"],"type":"string"},"Security_Endpoint_Management_API_Types":{"description":"List of types of response actions","example":["automated","manual"],"items":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Type"},"maxLength":2,"minLength":1,"type":"array"},"Security_Endpoint_Management_API_UnisolateRouteResponse":{"example":{"action":"233db9ea-6733-4849-9226-5a7039c7161d","data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"suspend-process","comment":"suspend the process","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{"entity_id":"abc123"},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_UploadRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"file":{"description":"The binary content of the file.","example":"RWxhc3RpYw==","format":"binary","type":"string"},"parameters":{"type":"object","properties":{"overwrite":{"default":false,"description":"Overwrite the file on the host if it already exists.","example":false,"type":"boolean"}}}},"required":["parameters","file"]}],"example":{"endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"file":"RWxhc3RpYw==","parameters":{}}},"Security_Endpoint_Management_API_UploadRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentState":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"isCompleted":false,"wasSuccessful":false}},"agentType":"endpoint","command":"upload","createdBy":"elastic","hosts":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"name":"Host-5i6cuc8kdv"}},"id":"9ff6aebc-2cb6-481e-8869-9b30036c9731","isCompleted":false,"isExpired":false,"outputs":{},"parameters":{"file_id":"10e4ce3d-4abb-4f93-a0cd-eaf63a489280","file_name":"fix-malware.sh","file_sha256":"a0bed94220193ba4895c0aa5b4e7e293381d15765cb164ddf7be5cdd010ae42a","file_size":69},"startedAt":"2023-07-03T15:07:22.837Z","status":"pending","wasSuccessful":false}},"type":"object","properties":{}},"Security_Endpoint_Management_API_UserIds":{"description":"A list of user IDs.","example":["user-id-1","user-id-2"],"oneOf":[{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},{"minLength":1,"type":"string"}]},"Security_Endpoint_Management_API_WithOutputs":{"description":"A list of action IDs that should include the complete output of the action.","example":["action-id-1","action-id-2"],"oneOf":[{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},{"minLength":1,"type":"string"}]},"Security_Entity_Analytics_API_AssetCriticalityBulkUploadErrorItem":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"string"}},"required":["message","index"]},"Security_Entity_Analytics_API_AssetCriticalityBulkUploadStats":{"type":"object","properties":{"failed":{"type":"integer"},"successful":{"type":"integer"},"total":{"type":"integer"}},"required":["successful","failed","total"]},"Security_Entity_Analytics_API_AssetCriticalityLevel":{"description":"The criticality level of the asset.","enum":["low_impact","medium_impact","high_impact","extreme_impact"],"type":"string"},"Security_Entity_Analytics_API_AssetCriticalityLevelsForBulkUpload":{"description":"The criticality level of the asset for bulk upload. The value `unassigned` is used to indicate that the criticality level is not assigned and is only used for bulk upload.","enum":["low_impact","medium_impact","high_impact","extreme_impact","unassigned"],"type":"string"},"Security_Entity_Analytics_API_AssetCriticalityRecord":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_CreateAssetCriticalityRecord"},{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecordEcsParts"},{"type":"object","properties":{"@timestamp":{"description":"The time the record was created or updated.","example":"2017-07-21T17:32:28Z","format":"date-time","type":"string"}},"required":["@timestamp"]}],"example":{"@timestamp":"2024-08-02T11:15:34.290Z","asset":{"criticality":"high_impact"},"criticality_level":"high_impact","host":{"asset":{"criticality":"high_impact"},"name":"my_host"},"id_field":"host.name","id_value":"my_host"}},"Security_Entity_Analytics_API_AssetCriticalityRecordEcsParts":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["asset"]},"entity":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"id":{"type":"string"}},"required":["id"]},"host":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"name":{"type":"string"}},"required":["name"]},"service":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"name":{"type":"string"}},"required":["name"]},"user":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"name":{"type":"string"}},"required":["name"]}},"required":["asset"]},"Security_Entity_Analytics_API_AssetCriticalityRecordIdParts":{"type":"object","properties":{"id_field":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IdField","description":"The field representing the ID.","example":"host.name"},"id_value":{"description":"The ID value of the asset.","type":"string"}},"required":["id_value","id_field"]},"Security_Entity_Analytics_API_CleanUpRiskEngineErrorResponse":{"type":"object","properties":{"cleanup_successful":{"example":false,"type":"boolean"},"errors":{"items":{"type":"object","properties":{"error":{"type":"string"},"seq":{"type":"integer"}},"required":["seq","error"]},"type":"array"}},"required":["cleanup_successful","errors"]},"Security_Entity_Analytics_API_ConfigureRiskEngineSavedObjectErrorResponse":{"type":"object","properties":{"errors":{"items":{"type":"object","properties":{"error":{"type":"string"},"seq":{"type":"integer"}},"required":["seq","error"]},"type":"array"},"risk_engine_saved_object_configured":{"example":false,"type":"boolean"}},"required":["risk_engine_saved_object_configured","errors"]},"Security_Entity_Analytics_API_CreateAssetCriticalityRecord":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecordIdParts"},{"type":"object","properties":{"criticality_level":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality_level"]}]},"Security_Entity_Analytics_API_EngineComponentResource":{"enum":["entity_engine","entity_definition","index","component_template","index_template","ingest_pipeline","enrich_policy","task","transform"],"type":"string"},"Security_Entity_Analytics_API_EngineComponentStatus":{"type":"object","properties":{"errors":{"items":{"type":"object","properties":{"message":{"type":"string"},"title":{"type":"string"}}},"type":"array"},"health":{"enum":["green","yellow","red","unknown"],"type":"string"},"id":{"type":"string"},"installed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_Metadata"},"resource":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineComponentResource"}},"required":["id","installed","resource"]},"Security_Entity_Analytics_API_EngineDataviewUpdateResult":{"type":"object","properties":{"changes":{"type":"object","properties":{"indexPatterns":{"items":{"type":"string"},"type":"array"}}},"type":{"type":"string"}},"required":["type"]},"Security_Entity_Analytics_API_EngineDescriptor":{"type":"object","properties":{"delay":{"default":"1m","pattern":"[smdh]$","type":"string"},"docsPerSecond":{"type":"integer"},"error":{"type":"object","properties":{"action":{"enum":["init"],"type":"string"},"message":{"type":"string"}},"required":["message","action"]},"fieldHistoryLength":{"type":"integer"},"filter":{"type":"string"},"frequency":{"default":"1m","pattern":"[smdh]$","type":"string"},"indexPattern":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IndexPattern"},"lookbackPeriod":{"default":"24h","pattern":"[smdh]$","type":"string"},"status":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineStatus"},"timeout":{"default":"180s","pattern":"[smdh]$","type":"string"},"timestampField":{"type":"string"},"type":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}},"required":["type","indexPattern","status","fieldHistoryLength"]},"Security_Entity_Analytics_API_EngineMetadata":{"type":"object","properties":{"Type":{"type":"string"}},"required":["Type"]},"Security_Entity_Analytics_API_EngineStatus":{"enum":["installing","started","stopped","updating","error"],"type":"string"},"Security_Entity_Analytics_API_Entity":{"oneOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_UserEntity"},{"$ref":"#/components/schemas/Security_Entity_Analytics_API_HostEntity"},{"$ref":"#/components/schemas/Security_Entity_Analytics_API_ServiceEntity"},{"$ref":"#/components/schemas/Security_Entity_Analytics_API_GenericEntity"}]},"Security_Entity_Analytics_API_EntityRiskLevels":{"enum":["Unknown","Low","Moderate","High","Critical"],"type":"string"},"Security_Entity_Analytics_API_EntityRiskScoreRecord":{"type":"object","properties":{"@timestamp":{"description":"The time at which the risk score was calculated.","example":"2017-07-21T17:32:28Z","format":"date-time","type":"string"},"calculated_level":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityRiskLevels","description":"Lexical description of the entity's risk.","example":"Critical"},"calculated_score":{"description":"The raw numeric value of the given entity's risk score.","format":"double","type":"number"},"calculated_score_norm":{"description":"The normalized numeric value of the given entity's risk score. Useful for comparing with other entities.","format":"double","maximum":100,"minimum":0,"type":"number"},"category_1_count":{"description":"The number of risk input documents that contributed to the Category 1 score (`category_1_score`).","format":"integer","type":"number"},"category_1_score":{"description":"The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.","format":"double","type":"number"},"category_2_count":{"format":"integer","type":"number"},"category_2_score":{"format":"double","type":"number"},"criticality_level":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"},"criticality_modifier":{"format":"double","type":"number"},"id_field":{"description":"The identifier field defining this risk score. Coupled with `id_value`, uniquely identifies the entity being scored.","example":"host.name","type":"string"},"id_value":{"description":"The identifier value defining this risk score. Coupled with `id_field`, uniquely identifies the entity being scored.","example":"example.host","type":"string"},"inputs":{"description":"A list of the highest-risk documents contributing to this risk score. Useful for investigative purposes.","items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_RiskScoreInput"},"type":"array"},"notes":{"items":{"type":"string"},"type":"array"}},"required":["@timestamp","id_field","id_value","calculated_level","calculated_score","calculated_score_norm","category_1_score","category_1_count","inputs","notes"]},"Security_Entity_Analytics_API_EntityType":{"enum":["user","host","service","generic"],"type":"string"},"Security_Entity_Analytics_API_GenericEntity":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"entity":{"type":"object","properties":{"category":{"type":"string"},"EngineMetadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineMetadata"},"id":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"]}},"required":["entity"]},"Security_Entity_Analytics_API_HostEntity":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"entity":{"type":"object","properties":{"EngineMetadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineMetadata"},"name":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"required":["name","source","type"]},"event":{"type":"object","properties":{"ingested":{"format":"date-time","type":"string"}}},"host":{"type":"object","properties":{"architecture":{"items":{"type":"string"},"type":"array"},"domain":{"items":{"type":"string"},"type":"array"},"hostname":{"items":{"type":"string"},"type":"array"},"id":{"items":{"type":"string"},"type":"array"},"ip":{"items":{"type":"string"},"type":"array"},"mac":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"risk":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityRiskScoreRecord"},"type":{"items":{"type":"string"},"type":"array"}},"required":["name"]}},"required":["host","entity"]},"Security_Entity_Analytics_API_IdField":{"enum":["host.name","user.name","service.name","entity.id"],"type":"string"},"Security_Entity_Analytics_API_IndexPattern":{"type":"string"},"Security_Entity_Analytics_API_InspectQuery":{"type":"object","properties":{"dsl":{"items":{"type":"string"},"type":"array"},"response":{"items":{"type":"string"},"type":"array"}},"required":["dsl","response"]},"Security_Entity_Analytics_API_Interval":{"description":"Interval in which enrich policy runs. For example, `\"1h\"` means the rule runs every hour. Must be less than or equal to half the duration of the lookback period,","example":"1h","pattern":"^[1-9]\\d*[smh]$","type":"string"},"Security_Entity_Analytics_API_Metadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_TransformStatsMetadata"},"Security_Entity_Analytics_API_MonitoredUserDoc":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"entity_analytics_monitoring":{"type":"object","properties":{"labels":{"items":{"type":"object","properties":{"field":{"type":"string"},"source":{"type":"string"},"value":{"type":"string"}}},"type":"array"}}},"event":{"type":"object","properties":{"ingested":{"format":"date-time","type":"string"}}},"id":{"type":"string"},"labels":{"type":"object","properties":{"monitoring":{"type":"object","properties":{"privileged_users":{"enum":["monitored","deleted"],"type":"string"}}},"source_indices":{"items":{"type":"string"},"type":"array"},"source_integrations":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"enum":["csv","index_sync","api"]},"type":"array"}}},"user":{"type":"object","properties":{"name":{"type":"string"}}}}},"Security_Entity_Analytics_API_MonitoringEngineDescriptor":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineStatus"}},"required":["type","status"]},"Security_Entity_Analytics_API_RiskEngineScheduleNowErrorResponse":{"type":"object","properties":{"full_error":{"type":"string"},"message":{"type":"string"}},"required":["message","full_error"]},"Security_Entity_Analytics_API_RiskEngineScheduleNowResponse":{"type":"object","properties":{"success":{"type":"boolean"}}},"Security_Entity_Analytics_API_RiskScoreInput":{"description":"A generic representation of a document contributing to a Risk Score.","type":"object","properties":{"category":{"description":"The risk category of the risk input document.","example":"category_1","type":"string"},"contribution_score":{"format":"double","type":"number"},"description":{"description":"A human-readable description of the risk input document.","example":"Generated from Detection Engine Rule: Malware Prevention Alert","type":"string"},"id":{"description":"The unique identifier (`_id`) of the original source document","example":"91a93376a507e86cfbf282166275b89f9dbdb1f0be6c8103c6ff2909ca8e1a1c","type":"string"},"index":{"description":"The unique index (`_index`) of the original source document","example":".internal.alerts-security.alerts-default-000001","type":"string"},"risk_score":{"description":"The weighted risk score of the risk input document.","format":"double","maximum":100,"minimum":0,"type":"number"},"timestamp":{"description":"The @timestamp of the risk input document.","example":"2017-07-21T17:32:28Z","type":"string"}},"required":["id","index","description","category"]},"Security_Entity_Analytics_API_ServiceEntity":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"entity":{"type":"object","properties":{"EngineMetadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineMetadata"},"name":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"required":["name","source","type"]},"event":{"type":"object","properties":{"ingested":{"format":"date-time","type":"string"}}},"service":{"type":"object","properties":{"name":{"type":"string"},"risk":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityRiskScoreRecord"}},"required":["name"]}},"required":["service","entity"]},"Security_Entity_Analytics_API_StoreStatus":{"enum":["not_installed","installing","running","stopped","error"],"type":"string"},"Security_Entity_Analytics_API_TaskManagerUnavailableResponse":{"description":"Task manager is unavailable","type":"object","properties":{"message":{"type":"string"},"status_code":{"minimum":400,"type":"integer"}},"required":["status_code","message"]},"Security_Entity_Analytics_API_TransformStatsMetadata":{"type":"object","properties":{"delete_time_in_ms":{"type":"integer"},"documents_deleted":{"type":"integer"},"documents_indexed":{"type":"integer"},"documents_processed":{"type":"integer"},"exponential_avg_checkpoint_duration_ms":{"type":"integer"},"exponential_avg_documents_indexed":{"type":"integer"},"exponential_avg_documents_processed":{"type":"integer"},"index_failures":{"type":"integer"},"index_time_in_ms":{"type":"integer"},"index_total":{"type":"integer"},"pages_processed":{"type":"integer"},"processing_time_in_ms":{"type":"integer"},"processing_total":{"type":"integer"},"search_failures":{"type":"integer"},"search_time_in_ms":{"type":"integer"},"search_total":{"type":"integer"},"trigger_count":{"type":"integer"}},"required":["pages_processed","documents_processed","documents_indexed","trigger_count","index_time_in_ms","index_total","index_failures","search_time_in_ms","search_total","search_failures","processing_time_in_ms","processing_total","exponential_avg_checkpoint_duration_ms","exponential_avg_documents_indexed","exponential_avg_documents_processed"]},"Security_Entity_Analytics_API_UserEntity":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"entity":{"type":"object","properties":{"EngineMetadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineMetadata"},"name":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"required":["name","source","type"]},"event":{"type":"object","properties":{"ingested":{"format":"date-time","type":"string"}}},"user":{"type":"object","properties":{"domain":{"items":{"type":"string"},"type":"array"},"email":{"items":{"type":"string"},"type":"array"},"full_name":{"items":{"type":"string"},"type":"array"},"hash":{"items":{"type":"string"},"type":"array"},"id":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"risk":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityRiskScoreRecord"},"roles":{"items":{"type":"string"},"type":"array"}},"required":["name"]}},"required":["user","entity"]},"Security_Entity_Analytics_API_UserName":{"type":"object","properties":{"user":{"type":"object","properties":{"name":{"description":"The name of the user.","type":"string"}}}}},"Security_Exceptions_API_CreateExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["comment"]},"Security_Exceptions_API_CreateExceptionListItemCommentArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateExceptionListItemComment"},"type":"array"},"Security_Exceptions_API_CreateRuleExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["comment"]},"Security_Exceptions_API_CreateRuleExceptionListItemCommentArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateRuleExceptionListItemComment"},"type":"array"},"Security_Exceptions_API_CreateRuleExceptionListItemProps":{"type":"object","properties":{"comments":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateRuleExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"format":"date-time","type":"string"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemTags","default":[]},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemType"}},"required":["type","name","description","entries"]},"Security_Exceptions_API_ExceptionList":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListDescription"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"},"immutable":{"type":"boolean"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListTags"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","type":"string"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListType"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","type":"string"},"version":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListVersion"}},"required":["id","list_id","type","name","description","immutable","namespace_type","version","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Exceptions_API_ExceptionListDescription":{"description":"Describes the exception list.","example":"This list tracks allowlisted values.","type":"string"},"Security_Exceptions_API_ExceptionListHumanId":{"description":"Exception list's human readable string identifier, e.g. `trusted-linux-processes`.","example":"simple_list","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListId":{"description":"Exception list's identifier.","example":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListItem":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"comments":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemCommentArray"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemExpireTime"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemId"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemTags"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","type":"string"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemType"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","type":"string"}},"required":["id","item_id","list_id","type","name","description","entries","namespace_type","comments","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Exceptions_API_ExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["id","comment","created_at","created_by"]},"Security_Exceptions_API_ExceptionListItemCommentArray":{"description":"Array of comment fields:\n\n- comment (string): Comments about the exception item.\n","items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemComment"},"type":"array"},"Security_Exceptions_API_ExceptionListItemDescription":{"description":"Describes the exception list.","type":"string"},"Security_Exceptions_API_ExceptionListItemEntry":{"anyOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatch"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatchAny"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryList"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryExists"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryNested"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatchWildcard"}],"discriminator":{"propertyName":"type"}},"Security_Exceptions_API_ExceptionListItemEntryArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntry"},"type":"array"},"Security_Exceptions_API_ExceptionListItemEntryExists":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["exists"],"type":"string"}},"required":["type","field","operator"]},"Security_Exceptions_API_ExceptionListItemEntryList":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"list":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ListId"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ListType"}},"required":["id","type"]},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["list"],"type":"string"}},"required":["type","field","list","operator"]},"Security_Exceptions_API_ExceptionListItemEntryMatch":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["match"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["type","field","value","operator"]},"Security_Exceptions_API_ExceptionListItemEntryMatchAny":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["match_any"],"type":"string"},"value":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"minItems":1,"type":"array"}},"required":["type","field","value","operator"]},"Security_Exceptions_API_ExceptionListItemEntryMatchWildcard":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["wildcard"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["type","field","value","operator"]},"Security_Exceptions_API_ExceptionListItemEntryNested":{"type":"object","properties":{"entries":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryNestedEntryItem"},"minItems":1,"type":"array"},"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"type":{"enum":["nested"],"type":"string"}},"required":["type","field","entries"]},"Security_Exceptions_API_ExceptionListItemEntryNestedEntryItem":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatch"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatchAny"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryExists"}]},"Security_Exceptions_API_ExceptionListItemEntryOperator":{"enum":["excluded","included"],"type":"string"},"Security_Exceptions_API_ExceptionListItemExpireTime":{"description":"The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions.","format":"date-time","type":"string"},"Security_Exceptions_API_ExceptionListItemHumanId":{"description":"Human readable string identifier, e.g. `trusted-linux-processes`","example":"simple_list_item","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListItemId":{"description":"Exception's identifier.","example":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListItemMeta":{"additionalProperties":true,"type":"object"},"Security_Exceptions_API_ExceptionListItemName":{"description":"Exception list name.","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListItemOsTypeArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsType"},"type":"array"},"Security_Exceptions_API_ExceptionListItemTags":{"items":{"description":"String array containing words and phrases to help categorize exception items.","format":"nonempty","minLength":1,"type":"string"},"type":"array"},"Security_Exceptions_API_ExceptionListItemType":{"enum":["simple"],"type":"string"},"Security_Exceptions_API_ExceptionListMeta":{"additionalProperties":true,"description":"Placeholder for metadata about the list container.","type":"object"},"Security_Exceptions_API_ExceptionListName":{"description":"The name of the exception list.","example":"My exception list","type":"string"},"Security_Exceptions_API_ExceptionListOsType":{"description":"Use this field to specify the operating system.","enum":["linux","macos","windows"],"type":"string"},"Security_Exceptions_API_ExceptionListOsTypeArray":{"description":"Use this field to specify the operating system. Only enter one value.","items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsType"},"type":"array"},"Security_Exceptions_API_ExceptionListsImportBulkError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},"required":["error"]},"Security_Exceptions_API_ExceptionListsImportBulkErrorArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListsImportBulkError"},"type":"array"},"Security_Exceptions_API_ExceptionListTags":{"description":"String array containing words and phrases to help categorize exception containers.","items":{"type":"string"},"type":"array"},"Security_Exceptions_API_ExceptionListType":{"description":"The type of exception list to be created. Different list types may denote where they can be utilized.","enum":["detection","rule_default","endpoint","endpoint_trusted_apps","endpoint_events","endpoint_host_isolation_exceptions","endpoint_blocklists"],"type":"string"},"Security_Exceptions_API_ExceptionListVersion":{"description":"The document version, automatically increasd on updates.","minimum":1,"type":"integer"},"Security_Exceptions_API_ExceptionNamespaceType":{"description":"Determines whether the exception container is available in all Kibana spaces or just the space\nin which it is created, where:\n\n- `single`: Only available in the Kibana space in which it is created.\n- `agnostic`: Available in all Kibana spaces.\n","enum":["agnostic","single"],"type":"string"},"Security_Exceptions_API_FindExceptionListItemsFilter":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"Security_Exceptions_API_FindExceptionListsFilter":{"example":"exception-list.attributes.name:%Detection%20List","type":"string"},"Security_Exceptions_API_ListId":{"description":"Value list's identifier.","example":"21b01cfb-058d-44b9-838c-282be16c91cd","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ListType":{"description":"Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:\n\n- `keyword`: Many ECS fields are Elasticsearch keywords\n- `ip`: IP addresses\n- `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation)\n","enum":["binary","boolean","byte","date","date_nanos","date_range","double","double_range","float","float_range","geo_point","geo_shape","half_float","integer","integer_range","ip","ip_range","keyword","long","long_range","shape","short","text"],"type":"string"},"Security_Exceptions_API_NonEmptyString":{"description":"A string that does not contain only whitespace characters","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_PlatformErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}},"required":["statusCode","error","message"]},"Security_Exceptions_API_RuleId":{"$ref":"#/components/schemas/Security_Exceptions_API_UUID"},"Security_Exceptions_API_SiemErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"Security_Exceptions_API_UpdateExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["comment"]},"Security_Exceptions_API_UpdateExceptionListItemCommentArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_UpdateExceptionListItemComment"},"type":"array"},"Security_Exceptions_API_UUID":{"description":"A universally unique identifier","format":"uuid","type":"string"},"Security_Lists_API_FindListItemsCursor":{"description":"Returns the items that come after the last item returned in the previous call (use the `cursor` value returned in the previous call). This parameter uses the `tie_breaker_id` field to ensure all items are sorted and returned correctly.","example":"WzIwLFsiYjU3Yzc2MmMtMzAzNi00NjVjLTliZmItN2JmYjVlNmU1MTVhIl1d","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_FindListItemsFilter":{"example":"value:127.0.0.1","type":"string"},"Security_Lists_API_FindListsCursor":{"example":"WzIwLFsiYjU3Yzc2MmMtMzAzNi00NjVjLTliZmItN2JmYjVlNmU1MTVhIl1d","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_FindListsFilter":{"example":"value:127.0.0.1","type":"string"},"Security_Lists_API_List":{"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"@timestamp":{"example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"created_at":{"description":"Autogenerated date of object creation.","example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","example":"elastic","type":"string"},"description":{"$ref":"#/components/schemas/Security_Lists_API_ListDescription"},"deserializer":{"$ref":"#/components/schemas/Security_Lists_API_ListDeserializer"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"immutable":{"type":"boolean"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListMetadata"},"name":{"$ref":"#/components/schemas/Security_Lists_API_ListName"},"serializer":{"$ref":"#/components/schemas/Security_Lists_API_ListSerializer"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","example":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"string"},"type":{"$ref":"#/components/schemas/Security_Lists_API_ListType"},"updated_at":{"description":"Autogenerated date of last object update.","example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","example":"elastic","type":"string"},"version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersion"}},"required":["id","type","name","description","immutable","version","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Lists_API_ListDescription":{"description":"Describes the value list.","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListDeserializer":{"description":"Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:\n\n- `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`.\n- `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.\n- `{{{gte}}},{{{lte}}}` - Date range values.\n","example":"{{value}}","type":"string"},"Security_Lists_API_ListId":{"description":"Value list's identifier.","example":"21b01cfb-058d-44b9-838c-282be16c91cd","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListItem":{"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"@timestamp":{"example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"created_at":{"description":"Autogenerated date of object creation.","example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","example":"elastic","type":"string"},"deserializer":{"$ref":"#/components/schemas/Security_Lists_API_ListDeserializer"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"},"list_id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListItemMetadata"},"serializer":{"$ref":"#/components/schemas/Security_Lists_API_ListSerializer"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","example":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"string"},"type":{"$ref":"#/components/schemas/Security_Lists_API_ListType"},"updated_at":{"description":"Autogenerated date of last object update.","example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","example":"elastic","type":"string"},"value":{"$ref":"#/components/schemas/Security_Lists_API_ListItemValue"}},"required":["id","type","list_id","value","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Lists_API_ListItemId":{"description":"Value list item's identifier.","example":"54b01cfb-058d-44b9-838c-282be16c91cd","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListItemMetadata":{"additionalProperties":true,"description":"Placeholder for metadata about the value list item.","type":"object"},"Security_Lists_API_ListItemPrivileges":{"type":"object","properties":{"application":{"additionalProperties":{"type":"boolean"},"type":"object"},"cluster":{"additionalProperties":{"type":"boolean"},"type":"object"},"has_all_requested":{"type":"boolean"},"index":{"additionalProperties":{"additionalProperties":{"type":"boolean"},"type":"object"},"type":"object"},"username":{"type":"string"}},"required":["username","has_all_requested","cluster","index","application"]},"Security_Lists_API_ListItemValue":{"description":"The value used to evaluate exceptions.","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListMetadata":{"additionalProperties":true,"description":"Placeholder for metadata about the value list.","type":"object"},"Security_Lists_API_ListName":{"description":"Value list's name.","example":"List of bad IPs","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListPrivileges":{"type":"object","properties":{"application":{"additionalProperties":{"type":"boolean"},"type":"object"},"cluster":{"additionalProperties":{"type":"boolean"},"type":"object"},"has_all_requested":{"type":"boolean"},"index":{"additionalProperties":{"additionalProperties":{"type":"boolean"},"type":"object"},"type":"object"},"username":{"type":"string"}},"required":["username","has_all_requested","cluster","index","application"]},"Security_Lists_API_ListSerializer":{"description":"Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:\n\n- `(?\u003cvalue\u003e.+)` - Single value item types, such as ip, long, date, keyword, and text.\n- `(?\u003cgte\u003e.+)-(?\u003clte\u003e.+)|(?\u003cvalue\u003e.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.\n","example":"(?\u003cvalue\u003e((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))","type":"string"},"Security_Lists_API_ListType":{"description":"Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:\n\n- `keyword`: Many ECS fields are Elasticsearch keywords\n- `ip`: IP addresses\n- `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation)\n","enum":["binary","boolean","byte","date","date_nanos","date_range","double","double_range","float","float_range","geo_point","geo_shape","half_float","integer","integer_range","ip","ip_range","keyword","long","long_range","shape","short","text"],"type":"string"},"Security_Lists_API_ListVersion":{"description":"The document version number.","example":1,"minimum":1,"type":"integer"},"Security_Lists_API_ListVersionId":{"description":"The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version.\n","example":"WzIsMV0=","type":"string"},"Security_Lists_API_PlatformErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}},"required":["statusCode","error","message"]},"Security_Lists_API_SiemErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"Security_Osquery_API_ArrayQueries":{"description":"An array of queries to run.","items":{"$ref":"#/components/schemas/Security_Osquery_API_ArrayQueriesItem"},"type":"array"},"Security_Osquery_API_ArrayQueriesItem":{"type":"object","properties":{"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"id":{"$ref":"#/components/schemas/Security_Osquery_API_QueryId"},"platform":{"$ref":"#/components/schemas/Security_Osquery_API_PlatformOrUndefined"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_Query"},"removed":{"$ref":"#/components/schemas/Security_Osquery_API_RemovedOrUndefined"},"snapshot":{"$ref":"#/components/schemas/Security_Osquery_API_SnapshotOrUndefined"},"version":{"$ref":"#/components/schemas/Security_Osquery_API_VersionOrUndefined"}}},"Security_Osquery_API_CreateLiveQueryRequestBody":{"example":{"agent_all":true,"ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"query":"select * from uptime;"},"type":"object","properties":{"agent_all":{"description":"When `true`, the query runs on all agents.","type":"boolean"},"agent_ids":{"description":"A list of agent IDs to run the query on.","items":{"type":"string"},"type":"array"},"agent_platforms":{"description":"A list of agent platforms to run the query on.","items":{"type":"string"},"type":"array"},"agent_policy_ids":{"description":"A list of agent policy IDs to run the query on.","items":{"type":"string"},"type":"array"},"alert_ids":{"description":"A list of alert IDs associated with the live query.","items":{"type":"string"},"type":"array"},"case_ids":{"description":"A list of case IDs associated with the live query.","items":{"type":"string"},"type":"array"},"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"event_ids":{"description":"A list of event IDs associated with the live query.","items":{"type":"string"},"type":"array"},"metadata":{"description":"Custom metadata object associated with the live query.","nullable":true,"type":"object"},"pack_id":{"$ref":"#/components/schemas/Security_Osquery_API_PackIdOrUndefined"},"queries":{"$ref":"#/components/schemas/Security_Osquery_API_ArrayQueries"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_QueryOrUndefined"},"saved_query_id":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryIdOrUndefined"}}},"Security_Osquery_API_CreateLiveQueryResponse":{"example":{"data":{"@timestamp":"2022-07-26T09:59:32.220Z","action_id":"3c42c847-eb30-4452-80e0-728584042334","agent_all":true,"agent_ids":[],"agent_platforms":[],"agent_policy_ids":[],"agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"expiration":"2022-07-26T10:04:32.220Z","input_type":"osquery","metadata":{"execution_context":{"name":"osquery","url":"/app/osquery/live_queries/new"}},"queries":[{"action_id":"609c4c66-ba3d-43fa-afdd-53e244577aa0","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"6724a474-cbba-41ef-a1aa-66aebf0879e2","query":"select * from uptime;","timeout":120}],"type":"INPUT_ACTION","user_id":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_CreatePacksRequestBody":{"example":{"description":"My pack","enabled":true,"name":"my_pack","policy_ids":["my_policy_id","fleet-server-policy"],"queries":{"my_query":{"ecs_mapping":{"client.port":{"field":"port"},"tags":{"value":["tag1","tag2"]}},"interval":60,"query":"SELECT * FROM listening_ports;","timeout":120}},"shards":{"fleet-server-policy":58,"my_policy_id":35}},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Osquery_API_PackDescriptionOrUndefined"},"enabled":{"$ref":"#/components/schemas/Security_Osquery_API_EnabledOrUndefined"},"name":{"$ref":"#/components/schemas/Security_Osquery_API_PackName"},"policy_ids":{"$ref":"#/components/schemas/Security_Osquery_API_PolicyIdsOrUndefined"},"queries":{"$ref":"#/components/schemas/Security_Osquery_API_ObjectQueries"},"shards":{"$ref":"#/components/schemas/Security_Osquery_API_Shards"}}},"Security_Osquery_API_CreatePacksResponse":{"example":{"data":{"created_at":"2025-02-26T13:37:30.452Z","created_by":"elastic","description":"My pack","enabled":true,"name":"my_pack","queries":{"ports":{"ecs_mapping":{"client.port":{"field":"port"}},"interval":60,"query":"SELECT * FROM listening_ports;","removed":false,"snapshot":true,"timeout":120}},"saved_object_id":"1c266590-381f-428c-878f-c80c1334f856","shards":[{"key":"47638692-7c4c-4053-aa3e-7186f28df349","value":35},{"key":"5e267651-fe50-443e-8d3f-3bbc9171b618","value":58}],"updated_at":"2025-02-26T13:37:30.452Z","updated_by":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_CreateSavedQueryRequestBody":{"example":{"description":"Saved query description","ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"saved_query_id","interval":"60","platform":"linux,darwin","query":"select * from uptime;","timeout":120,"version":"2.8.0"},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryDescriptionOrUndefined"},"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"id":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"},"interval":{"$ref":"#/components/schemas/Security_Osquery_API_Interval"},"platform":{"$ref":"#/components/schemas/Security_Osquery_API_PlatformOrUndefined"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_QueryOrUndefined"},"removed":{"$ref":"#/components/schemas/Security_Osquery_API_RemovedOrUndefined"},"snapshot":{"$ref":"#/components/schemas/Security_Osquery_API_SnapshotOrUndefined"},"version":{"$ref":"#/components/schemas/Security_Osquery_API_VersionOrUndefined"}}},"Security_Osquery_API_CreateSavedQueryResponse":{"example":{"data":{}},"type":"object","properties":{}},"Security_Osquery_API_DefaultSuccessResponse":{"type":"object","properties":{}},"Security_Osquery_API_ECSMapping":{"additionalProperties":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingItem"},"description":"Map osquery results columns or static values to Elastic Common Schema (ECS) fields","example":{"host.uptime":{"field":"total_seconds"}},"type":"object"},"Security_Osquery_API_ECSMappingItem":{"type":"object","properties":{"field":{"description":"The ECS field to map to.","example":"host.uptime","type":"string"},"value":{"description":"The value to map to the ECS field.","example":"total_seconds","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}}},"Security_Osquery_API_ECSMappingOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMapping","nullable":true},"Security_Osquery_API_Enabled":{"description":"Enables the pack.","example":true,"type":"boolean"},"Security_Osquery_API_EnabledOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Enabled","nullable":true},"Security_Osquery_API_FindLiveQueryDetailsResponse":{"example":{"data":{"@timestamp":"2022-07-26T09:59:32.220Z","action_id":"3c42c847-eb30-4452-80e0-728584042334","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"expiration":"2022-07-26T10:04:32.220Z","queries":[{"action_id":"609c4c66-ba3d-43fa-afdd-53e244577aa0","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"docs":0,"ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"failed":1,"id":"6724a474-cbba-41ef-a1aa-66aebf0879e2","pending":0,"query":"select * from uptime;","responded":1,"saved_query_id":"42ba9c50-0cc5-11ed-aa1d-2b27890bc90d","status":"completed","successful":0}],"status":"completed","user_id":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_FindLiveQueryResponse":{"example":{"data":{"items":[{"fields":{"@timestamp":"2023-10-31T00:00:00Z","action_id":"3c42c847-eb30-4452-80e0-728584042334","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"expiration":"2023-10-31T00:00:00Z","queries":[{"action_id":"609c4c66-ba3d-43fa-afdd-53e244577aa0","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"6724a474-cbba-41ef-a1aa-66aebf0879e2","query":"select * from uptime;","saved_query_id":"42ba9c50-0cc5-11ed-aa1d-2b27890bc90d"}],"user_id":"elastic"}}]}},"type":"object","properties":{}},"Security_Osquery_API_FindPackResponse":{"example":{"data":{"created_at":"2022-07-25T19:41:10.263Z","created_by":"elastic","description":"","enabled":true,"id":"3c42c847-eb30-4452-80e0-728584042334","name":"test_pack","namespaces":["default"],"policy_ids":[],"queries":{"uptime":{"ecs_mapping":{"message":{"field":"days"}},"interval":3600,"query":"select * from uptime"}},"read_only":false,"type":"osquery-pack","updated_at":"2022-07-25T20:12:01.455Z","updated_by":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_FindPacksResponse":{"example":{"data":[{"attributes":{"created_at":"2023-10-31T00:00:00Z","created_by":"elastic","description":"My pack description","enabled":true,"name":"My Pack","queries":[{"ecs_mapping":[{"host.uptime":{"field":"total_seconds"}}],"id":"uptime","interval":"3600","query":"select * from uptime;"}],"updated_at":"2023-10-31T00:00:00Z","updated_by":"elastic"},"id":"42ba9c50-0cc5-11ed-aa1d-2b27890bc90d","namespaces":["default"],"type":"osquery-pack"}],"page":1,"pageSize":10,"policy_ids":[],"total":1},"type":"object","properties":{}},"Security_Osquery_API_FindSavedQueryDetailResponse":{"example":{"data":{"attributes":{"created_at":"2022-07-26T09:28:08.597Z","created_by":"elastic","description":"Saved query description","ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"saved_query_id","interval":"60","platform":"linux,darwin","prebuilt":false,"query":"select * from uptime;","updated_at":"2022-07-26T09:28:08.597Z","updated_by":"elastic","version":"2.8.0"},"coreMigrationVersion":"8.4.0","id":"3c42c847-eb30-4452-80e0-728584042334","namespaces":["default"],"references":[],"type":"osquery-saved-query","updated_at":"2022-07-26T09:28:08.600Z","version":"WzQzMTcsMV0="}},"type":"object","properties":{}},"Security_Osquery_API_FindSavedQueryResponse":{"example":{"data":[{"attributes":{"created_at":"2022-07-26T09:28:08.597Z","created_by":"elastic","description":"Saved query description","ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"saved_query_id","interval":"60","platform":"linux,darwin","prebuilt":false,"query":"select * from uptime;","updated_at":"2022-07-26T09:28:08.597Z","updated_by":"elastic","version":"2.8.0"},"id":"42ba9c50-0cc5-11ed-aa1d-2b27890bc90d","namespaces":["default"],"type":"osquery-saved-query"}],"page":1,"per_page":100,"total":11},"type":"object","properties":{}},"Security_Osquery_API_GetLiveQueryResultsResponse":{"description":"The response for getting live query results.","example":{"data":{"edges":[{},{}],"total":2}},"type":"object","properties":{}},"Security_Osquery_API_Interval":{"description":"An interval, in seconds, on which to run the query.","example":"60","type":"string"},"Security_Osquery_API_IntervalOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Interval","nullable":true},"Security_Osquery_API_KueryOrUndefined":{"description":"The kuery to filter the results by.","example":"agent.id: 16d7caf5-efd2-4212-9b62-73dafc91fa13","nullable":true,"type":"string"},"Security_Osquery_API_ObjectQueries":{"additionalProperties":{"$ref":"#/components/schemas/Security_Osquery_API_ObjectQueriesItem"},"description":"An object of queries.","type":"object"},"Security_Osquery_API_ObjectQueriesItem":{"type":"object","properties":{"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"id":{"$ref":"#/components/schemas/Security_Osquery_API_QueryId"},"platform":{"$ref":"#/components/schemas/Security_Osquery_API_PlatformOrUndefined"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_Query"},"removed":{"$ref":"#/components/schemas/Security_Osquery_API_RemovedOrUndefined"},"saved_query_id":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryIdOrUndefined"},"snapshot":{"$ref":"#/components/schemas/Security_Osquery_API_SnapshotOrUndefined"},"version":{"$ref":"#/components/schemas/Security_Osquery_API_VersionOrUndefined"}}},"Security_Osquery_API_PackDescription":{"description":"The pack description.","example":"Pack description","type":"string"},"Security_Osquery_API_PackDescriptionOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_PackDescription","nullable":true},"Security_Osquery_API_PackId":{"description":"The ID of the pack you want to run, retrieve, update, or delete.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"},"Security_Osquery_API_PackIdOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_PackId","nullable":true},"Security_Osquery_API_PackName":{"description":"The pack name.","type":"string"},"Security_Osquery_API_PageOrUndefined":{"description":"The page number to return. The default is 1.","example":1,"nullable":true,"type":"integer"},"Security_Osquery_API_PageSizeOrUndefined":{"description":"The number of results to return per page. The default is 20.","example":20,"nullable":true,"type":"integer"},"Security_Osquery_API_Platform":{"description":"Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, `linux,darwin`.","example":"linux,darwin","type":"string"},"Security_Osquery_API_PlatformOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Platform","nullable":true},"Security_Osquery_API_PolicyIds":{"description":"A list of agents policy IDs.","example":["policyId1","policyId2"],"items":{"type":"string"},"type":"array"},"Security_Osquery_API_PolicyIdsOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_PolicyIds","nullable":true},"Security_Osquery_API_Query":{"description":"The SQL query you want to run.","example":"select * from uptime;","type":"string"},"Security_Osquery_API_QueryId":{"description":"The ID of the query.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"},"Security_Osquery_API_QueryOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Query","nullable":true},"Security_Osquery_API_Removed":{"description":"Indicates whether the query is removed.","example":false,"type":"boolean"},"Security_Osquery_API_RemovedOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Removed","nullable":true},"Security_Osquery_API_SavedQueryDescription":{"description":"The saved query description.","example":"Saved query description","type":"string"},"Security_Osquery_API_SavedQueryDescriptionOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryDescription","nullable":true},"Security_Osquery_API_SavedQueryId":{"description":"The ID of a saved query.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"},"Security_Osquery_API_SavedQueryIdOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId","nullable":true},"Security_Osquery_API_Shards":{"additionalProperties":{"type":"number"},"description":"An object with shard configuration for policies included in the pack. For each policy, set the shard configuration to a percentage (1–100) of target hosts.","example":{"policy_id":50},"type":"object"},"Security_Osquery_API_Snapshot":{"description":"Indicates whether the query is a snapshot.","example":true,"type":"boolean"},"Security_Osquery_API_SnapshotOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Snapshot","nullable":true},"Security_Osquery_API_SortOrderOrUndefined":{"description":"Specifies the sort order.","enum":["asc","desc"],"example":"desc","type":"string"},"Security_Osquery_API_SortOrUndefined":{"default":"createdAt","description":"The field that is used to sort the results.","example":"createdAt","nullable":true,"type":"string"},"Security_Osquery_API_UpdatePacksRequestBody":{"example":{"name":"updated_my_pack_name"},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Osquery_API_PackDescriptionOrUndefined"},"enabled":{"$ref":"#/components/schemas/Security_Osquery_API_EnabledOrUndefined"},"name":{"$ref":"#/components/schemas/Security_Osquery_API_PackName"},"policy_ids":{"$ref":"#/components/schemas/Security_Osquery_API_PolicyIdsOrUndefined"},"queries":{"$ref":"#/components/schemas/Security_Osquery_API_ObjectQueries"},"shards":{"$ref":"#/components/schemas/Security_Osquery_API_Shards"}}},"Security_Osquery_API_UpdatePacksResponse":{"example":{"data":{"created_at":"2025-02-26T13:37:30.452Z","created_by":"elastic","description":"My pack","enabled":true,"name":"updated_my_pack_name","queries":{"ports":{"ecs_mapping":{"client.port":{"field":"port"}},"interval":60,"query":"SELECT * FROM listening_ports;","removed":false,"snapshot":true,"timeout":120}},"saved_object_id":"1c266590-381f-428c-878f-c80c1334f856","shards":[{"key":"47638692-7c4c-4053-aa3e-7186f28df349","value":35},{"key":"5e267651-fe50-443e-8d3f-3bbc9171b618","value":58}],"updated_at":"2025-02-26T13:40:16.297Z","updated_by":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_UpdateSavedQueryRequestBody":{"example":{"id":"updated_my_saved_query_name"},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryDescriptionOrUndefined"},"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"id":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"},"interval":{"$ref":"#/components/schemas/Security_Osquery_API_IntervalOrUndefined"},"platform":{"$ref":"#/components/schemas/Security_Osquery_API_PlatformOrUndefined"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_QueryOrUndefined"},"removed":{"$ref":"#/components/schemas/Security_Osquery_API_RemovedOrUndefined"},"snapshot":{"$ref":"#/components/schemas/Security_Osquery_API_SnapshotOrUndefined"},"version":{"$ref":"#/components/schemas/Security_Osquery_API_VersionOrUndefined"}}},"Security_Osquery_API_UpdateSavedQueryResponse":{"example":{"data":{}},"type":"object","properties":{}},"Security_Osquery_API_Version":{"description":"Uses the Osquery versions greater than or equal to the specified version string.","example":"1.0.0","type":"string"},"Security_Osquery_API_VersionOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Version","nullable":true},"Security_Timeline_API_AssociatedFilterType":{"description":"Filter notes based on their association with a document or saved object.","enum":["all","document_only","saved_object_only","document_and_saved_object","orphan"],"type":"string"},"Security_Timeline_API_BareNote":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_NoteCreatedAndUpdatedMetadata"},{"type":"object","properties":{"eventId":{"description":"The `_id` of the associated event for this note.","example":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bc","nullable":true,"type":"string"},"note":{"description":"The text of the note","example":"This is an example text","nullable":true,"type":"string"},"timelineId":{"description":"The `savedObjectId` of the Timeline that this note is associated with","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","type":"string"}},"required":["timelineId"]}]},"Security_Timeline_API_BarePinnedEvent":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_PinnedEventCreatedAndUpdatedMetadata"},{"type":"object","properties":{"eventId":{"description":"The `_id` of the associated event for this pinned event.","example":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bc","type":"string"},"timelineId":{"description":"The `savedObjectId` of the timeline that this pinned event is associated with","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","type":"string"}},"required":["eventId","timelineId"]}]},"Security_Timeline_API_ColumnHeaderResult":{"type":"object","properties":{"aggregatable":{"nullable":true,"type":"boolean"},"category":{"nullable":true,"type":"string"},"columnHeaderType":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"example":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"string"},"indexes":{"items":{"type":"string"},"nullable":true,"type":"array"},"name":{"nullable":true,"type":"string"},"placeholder":{"nullable":true,"type":"string"},"searchable":{"nullable":true,"type":"boolean"},"type":{"nullable":true,"type":"string"}}},"Security_Timeline_API_DataProviderQueryMatch":{"type":"object","properties":{"enabled":{"nullable":true,"type":"boolean"},"excluded":{"nullable":true,"type":"boolean"},"id":{"nullable":true,"type":"string"},"kqlQuery":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"queryMatch":{"$ref":"#/components/schemas/Security_Timeline_API_QueryMatchResult","nullable":true},"type":{"$ref":"#/components/schemas/Security_Timeline_API_DataProviderType","nullable":true}}},"Security_Timeline_API_DataProviderResult":{"type":"object","properties":{"and":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_DataProviderQueryMatch"},"nullable":true,"type":"array"},"enabled":{"nullable":true,"type":"boolean"},"excluded":{"nullable":true,"type":"boolean"},"id":{"nullable":true,"type":"string"},"kqlQuery":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"queryMatch":{"$ref":"#/components/schemas/Security_Timeline_API_QueryMatchResult","nullable":true},"type":{"$ref":"#/components/schemas/Security_Timeline_API_DataProviderType","nullable":true}}},"Security_Timeline_API_DataProviderType":{"description":"The type of data provider.","enum":["default","template"],"type":"string"},"Security_Timeline_API_DocumentIds":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"Security_Timeline_API_FavoriteTimelineResponse":{"type":"object","properties":{"favorite":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_FavoriteTimelineResult"},"type":"array"},"savedObjectId":{"type":"string"},"templateTimelineId":{"nullable":true,"type":"string"},"templateTimelineVersion":{"nullable":true,"type":"number"},"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType"},"version":{"type":"string"}},"required":["savedObjectId","version"]},"Security_Timeline_API_FavoriteTimelineResult":{"description":"Indicates when and who marked a Timeline as a favorite.","example":{"favoriteDate":1741337636741,"userName":"elastic"},"type":"object","properties":{"favoriteDate":{"nullable":true,"type":"number"},"fullName":{"nullable":true,"type":"string"},"userName":{"nullable":true,"type":"string"}}},"Security_Timeline_API_FilterTimelineResult":{"example":{"meta":{"alias":"Custom filter name","disabled":false,"index":".alerts-security.alerts-default,logs-*","key":"@timestamp","negate":"false,","type":"exists","value":"exists"},"query":"{\"exists\":{\"field\":\"@timestamp\"}}"},"type":"object","properties":{"exists":{"nullable":true,"type":"string"},"match_all":{"nullable":true,"type":"string"},"meta":{"nullable":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"nullable":true,"type":"string"},"disabled":{"nullable":true,"type":"boolean"},"field":{"nullable":true,"type":"string"},"formattedValue":{"nullable":true,"type":"string"},"index":{"nullable":true,"type":"string"},"key":{"nullable":true,"type":"string"},"negate":{"nullable":true,"type":"boolean"},"params":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}}},"missing":{"nullable":true,"type":"string"},"query":{"nullable":true,"type":"string"},"range":{"nullable":true,"type":"string"},"script":{"nullable":true,"type":"string"}}},"Security_Timeline_API_GetNotesResult":{"type":"object","properties":{"notes":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"type":"array"},"totalCount":{"type":"number"}},"required":["totalCount","notes"]},"Security_Timeline_API_ImportTimelineResult":{"type":"object","properties":{"errors":{"description":"The list of failed Timeline imports","items":{"type":"object","properties":{"error":{"description":"The error containing the reason why the timeline could not be imported","type":"object","properties":{"message":{"description":"The reason why the timeline could not be imported","example":"Malformed JSON","type":"string"},"status_code":{"description":"The HTTP status code of the error","example":400,"type":"number"}}},"id":{"description":"The ID of the timeline that failed to import","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","type":"string"}}},"type":"array"},"success":{"description":"Indicates whether any of the Timelines were successfully imports","type":"boolean"},"success_count":{"description":"The amount of successfully imported/updated Timelines","example":99,"type":"number"},"timelines_installed":{"description":"The amount of successfully installed Timelines","example":80,"type":"number"},"timelines_updated":{"description":"The amount of successfully updated Timelines","example":19,"type":"number"}}},"Security_Timeline_API_ImportTimelines":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},{"type":"object","properties":{"eventNotes":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_BareNote"},"nullable":true,"type":"array"},"globalNotes":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_BareNote"},"nullable":true,"type":"array"},"pinnedEventIds":{"items":{"type":"string"},"nullable":true,"type":"array"},"savedObjectId":{"nullable":true,"type":"string"},"version":{"nullable":true,"type":"string"}},"required":["savedObjectId","version","pinnedEventIds","eventNotes","globalNotes"]}]},"Security_Timeline_API_Note":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_BareNote"},{"type":"object","properties":{"noteId":{"description":"The `savedObjectId` of the note","example":"709f99c6-89b6-4953-9160-35945c8e174e","type":"string"},"version":{"description":"The version of the note","example":"WzQ2LDFd","type":"string"}},"required":["noteId","version"]}]},"Security_Timeline_API_NoteCreatedAndUpdatedMetadata":{"type":"object","properties":{"created":{"description":"The time the note was created, using a 13-digit Epoch timestamp.","example":1587468588922,"nullable":true,"type":"number"},"createdBy":{"description":"The user who created the note.","example":"casetester","nullable":true,"type":"string"},"updated":{"description":"The last time the note was updated, using a 13-digit Epoch timestamp","example":1741344876825,"nullable":true,"type":"number"},"updatedBy":{"description":"The user who last updated the note","example":"casetester","nullable":true,"type":"string"}}},"Security_Timeline_API_PersistPinnedEventResponse":{"oneOf":[{"$ref":"#/components/schemas/Security_Timeline_API_PinnedEvent"},{"type":"object","properties":{"unpinned":{"description":"Indicates whether the event was successfully unpinned","type":"boolean"}},"required":["unpinned"]}]},"Security_Timeline_API_PersistTimelineResponse":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineResponse"},"Security_Timeline_API_PinnedEvent":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_BarePinnedEvent"},{"type":"object","properties":{"pinnedEventId":{"description":"The `savedObjectId` of this pinned event","example":"10r1929b-0af7-42bd-85a8-56e234f98h2f3","type":"string"},"version":{"description":"The version of this pinned event","example":"WzQ2LDFe","type":"string"}},"required":["pinnedEventId","version"]}]},"Security_Timeline_API_PinnedEventCreatedAndUpdatedMetadata":{"type":"object","properties":{"created":{"description":"The time the pinned event was created, using a 13-digit Epoch timestamp.","example":1587468588922,"nullable":true,"type":"number"},"createdBy":{"description":"The user who created the pinned event.","example":"casetester","nullable":true,"type":"string"},"updated":{"description":"The last time the pinned event was updated, using a 13-digit Epoch timestamp","example":1741344876825,"nullable":true,"type":"number"},"updatedBy":{"description":"The user who last updated the pinned event","example":"casetester","nullable":true,"type":"string"}}},"Security_Timeline_API_QueryMatchResult":{"type":"object","properties":{"displayField":{"nullable":true,"type":"string"},"displayValue":{"nullable":true,"type":"string"},"field":{"nullable":true,"type":"string"},"operator":{"nullable":true,"type":"string"},"value":{"oneOf":[{"nullable":true,"type":"string"},{"items":{"type":"string"},"nullable":true,"type":"array"}]}}},"Security_Timeline_API_ResolvedTimeline":{"type":"object","properties":{"alias_purpose":{"$ref":"#/components/schemas/Security_Timeline_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"type":"string"},"outcome":{"$ref":"#/components/schemas/Security_Timeline_API_SavedObjectResolveOutcome"},"timeline":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineSavedToReturnObject"}},"required":["timeline","outcome"]},"Security_Timeline_API_ResponseNote":{"type":"object","properties":{"note":{"$ref":"#/components/schemas/Security_Timeline_API_Note"}},"required":["note"]},"Security_Timeline_API_RowRendererId":{"description":"Identifies the available row renderers","enum":["alert","alerts","auditd","auditd_file","library","netflow","plain","registry","suricata","system","system_dns","system_endgame_process","system_file","system_fim","system_security_event","system_socket","threat_match","zeek"],"type":"string"},"Security_Timeline_API_SavedObjectIds":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"Security_Timeline_API_SavedObjectResolveAliasPurpose":{"enum":["savedObjectConversion","savedObjectImport"],"type":"string"},"Security_Timeline_API_SavedObjectResolveOutcome":{"enum":["exactMatch","aliasMatch","conflict"],"type":"string"},"Security_Timeline_API_SavedTimeline":{"type":"object","properties":{"columns":{"description":"The Timeline's columns","example":[{"columnHeaderType":"not-filtered","id":"@timestamp"},{"columnHeaderType":"not-filtered","id":"event.category"}],"items":{"$ref":"#/components/schemas/Security_Timeline_API_ColumnHeaderResult"},"nullable":true,"type":"array"},"created":{"description":"The time the Timeline was created, using a 13-digit Epoch timestamp.","example":1587468588922,"nullable":true,"type":"number"},"createdBy":{"description":"The user who created the Timeline.","example":"casetester","nullable":true,"type":"string"},"dataProviders":{"description":"Object containing query clauses","example":[{"enabled":true,"excluded":false,"id":"id-d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bcbf66f57d124dcc739c98e6b","name":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bcbf66f57d124dcc739c98e6b","queryMatch":{"field":"_id,","operator":":","value":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bcbf66f57d124dcc739c98e6b,"}}],"items":{"$ref":"#/components/schemas/Security_Timeline_API_DataProviderResult"},"nullable":true,"type":"array"},"dataViewId":{"description":"ID of the Timeline's Data View","example":"security-solution-default","nullable":true,"type":"string"},"dateRange":{"description":"The Timeline's search period.","example":{"end":1587456479201,"start":1587370079200},"nullable":true,"type":"object","properties":{"end":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"number"}]},"start":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"number"}]}}},"description":{"description":"The Timeline's description","example":"Investigating exposure of CVE XYZ","nullable":true,"type":"string"},"eqlOptions":{"description":"EQL query that is used in the correlation tab","example":{"eventCategoryField":"event.category","query":"sequence\\n[process where process.name == \"sudo\"]\\n[any where true]","size":100,"timestampField":"@timestamp"},"nullable":true,"type":"object","properties":{"eventCategoryField":{"nullable":true,"type":"string"},"query":{"nullable":true,"type":"string"},"size":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"number"}]},"tiebreakerField":{"nullable":true,"type":"string"},"timestampField":{"nullable":true,"type":"string"}}},"eventType":{"deprecated":true,"description":"Event types displayed in the Timeline","example":"all","nullable":true,"type":"string"},"excludedRowRendererIds":{"description":"A list of row renderers that should not be used when in `Event renderers` mode","items":{"$ref":"#/components/schemas/Security_Timeline_API_RowRendererId"},"nullable":true,"type":"array"},"favorite":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_FavoriteTimelineResult"},"nullable":true,"type":"array"},"filters":{"description":"A list of filters that should be applied to the query","items":{"$ref":"#/components/schemas/Security_Timeline_API_FilterTimelineResult"},"nullable":true,"type":"array"},"indexNames":{"description":"A list of index names to use in the query (e.g. when the default data view has been modified)","example":[".logs*"],"items":{"type":"string"},"nullable":true,"type":"array"},"kqlMode":{"description":"Indicates whether the KQL bar filters the query results or searches for additional results, where:\n * `filter`: filters query results\n * `search`: displays additional search results","example":"search","nullable":true,"type":"string"},"kqlQuery":{"$ref":"#/components/schemas/Security_Timeline_API_SerializedFilterQueryResult","nullable":true},"savedQueryId":{"description":"The ID of the saved query that might be used in the Query tab","example":"c7b16904-02d7-4f32-b8f2-cc20f9625d6e","nullable":true,"type":"string"},"savedSearchId":{"description":"The ID of the saved search that is used in the ES|QL tab","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","nullable":true,"type":"string"},"sort":{"$ref":"#/components/schemas/Security_Timeline_API_Sort","nullable":true},"status":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineStatus","nullable":true},"templateTimelineId":{"description":"A unique ID (UUID) for Timeline templates. For Timelines, the value is `null`.","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","nullable":true,"type":"string"},"templateTimelineVersion":{"description":"Timeline template version number. For Timelines, the value is `null`.","example":12,"nullable":true,"type":"number"},"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType","nullable":true},"title":{"description":"The Timeline's title.","example":"CVE XYZ investigation","nullable":true,"type":"string"},"updated":{"description":"The last time the Timeline was updated, using a 13-digit Epoch timestamp","example":1741344876825,"nullable":true,"type":"number"},"updatedBy":{"description":"The user who last updated the Timeline","example":"casetester","nullable":true,"type":"string"}}},"Security_Timeline_API_SavedTimelineWithSavedObjectId":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},{"type":"object","properties":{"savedObjectId":{"description":"The `savedObjectId` of the Timeline or Timeline template","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","type":"string"},"version":{"description":"The version of the Timeline or Timeline template","example":"WzE0LDFd","type":"string"}},"required":["savedObjectId","version"]}]},"Security_Timeline_API_SerializedFilterQueryResult":{"description":"KQL bar query.","example":{"filterQuery":null,"kuery":{"expression":"_id : *","kind":"kuery"},"serializedQuery":"{\"bool\":{\"should\":[{\"exists\":{\"field\":\"_id\"}}],\"minimum_should_match\":1}}"},"type":"object","properties":{"filterQuery":{"nullable":true,"type":"object","properties":{"kuery":{"nullable":true,"type":"object","properties":{"expression":{"nullable":true,"type":"string"},"kind":{"nullable":true,"type":"string"}}},"serializedQuery":{"nullable":true,"type":"string"}}}}},"Security_Timeline_API_Sort":{"oneOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SortObject"},{"items":{"$ref":"#/components/schemas/Security_Timeline_API_SortObject"},"type":"array"}]},"Security_Timeline_API_SortFieldTimeline":{"description":"The field to sort the timelines by.","enum":["title","description","updated","created"],"type":"string"},"Security_Timeline_API_SortObject":{"description":"Object indicating how rows are sorted in the Timeline's grid","example":{"columnId":"@timestamp","sortDirection":"desc"},"type":"object","properties":{"columnId":{"nullable":true,"type":"string"},"columnType":{"nullable":true,"type":"string"},"sortDirection":{"nullable":true,"type":"string"}}},"Security_Timeline_API_TimelineResponse":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimelineWithSavedObjectId"},{"type":"object","properties":{"eventIdToNoteIds":{"description":"A list of all the notes that are associated to this Timeline.","items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"nullable":true,"type":"array"},"noteIds":{"description":"A list of all the ids of notes that are associated to this Timeline.","example":["709f99c6-89b6-4953-9160-35945c8e174e"],"items":{"type":"string"},"nullable":true,"type":"array"},"notes":{"description":"A list of all the notes that are associated to this Timeline.","items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"nullable":true,"type":"array"},"pinnedEventIds":{"description":"A list of all the ids of pinned events that are associated to this Timeline.","example":["983f99c6-89b6-4953-9160-35945c8a194f"],"items":{"type":"string"},"nullable":true,"type":"array"},"pinnedEventsSaveObject":{"description":"A list of all the pinned events that are associated to this Timeline.","items":{"$ref":"#/components/schemas/Security_Timeline_API_PinnedEvent"},"nullable":true,"type":"array"}}}]},"Security_Timeline_API_TimelineSavedToReturnObject":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},{"type":"object","properties":{"eventIdToNoteIds":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"nullable":true,"type":"array"},"noteIds":{"items":{"type":"string"},"nullable":true,"type":"array"},"notes":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"nullable":true,"type":"array"},"pinnedEventIds":{"items":{"type":"string"},"nullable":true,"type":"array"},"pinnedEventsSaveObject":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_PinnedEvent"},"nullable":true,"type":"array"},"savedObjectId":{"type":"string"},"version":{"type":"string"}},"required":["savedObjectId","version"]}]},"Security_Timeline_API_TimelineStatus":{"description":"The status of the Timeline.","enum":["active","draft","immutable"],"type":"string"},"Security_Timeline_API_TimelineType":{"description":"The type of Timeline.","enum":["default","template"],"type":"string"},"Short_URL_APIs_urlResponse":{"type":"object","properties":{"accessCount":{"type":"integer"},"accessDate":{"type":"string"},"createDate":{"type":"string"},"id":{"description":"The identifier for the short URL.","type":"string"},"locator":{"type":"object","properties":{"id":{"description":"The identifier for the locator.","type":"string"},"state":{"description":"The locator parameters.","type":"object"},"version":{"description":"The version of Kibana when the short URL was created.","type":"string"}}},"slug":{"description":"A random human-readable slug is automatically generated if the `humanReadableSlug` parameter is set to `true`. If it is set to `false`, a random short string is generated.\n","type":"string"}}},"SLOs_400_response":{"title":"Bad request","type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Invalid value 'foo' supplied to: [...]","type":"string"},"statusCode":{"example":400,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_401_response":{"title":"Unauthorized","type":"object","properties":{"error":{"example":"Unauthorized","type":"string"},"message":{"example":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]","type":"string"},"statusCode":{"example":401,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_403_response":{"title":"Unauthorized","type":"object","properties":{"error":{"example":"Unauthorized","type":"string"},"message":{"example":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]","type":"string"},"statusCode":{"example":403,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_404_response":{"title":"Not found","type":"object","properties":{"error":{"example":"Not Found","type":"string"},"message":{"example":"SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found","type":"string"},"statusCode":{"example":404,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_409_response":{"title":"Conflict","type":"object","properties":{"error":{"example":"Conflict","type":"string"},"message":{"example":"SLO [d077e940-1515-11ee-9c50-9d096392f520] already exists","type":"string"},"statusCode":{"example":409,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_budgeting_method":{"description":"The budgeting method to use when computing the rollup data.","enum":["occurrences","timeslices"],"example":"occurrences","title":"Budgeting method","type":"string"},"SLOs_bulk_delete_request":{"description":"The bulk delete SLO request takes a list of SLOs Definition id to delete.\n","properties":{"list":{"description":"An array of SLO Definition id","items":{"description":"The SLO Definition id","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"type":"array"}},"required":["list"],"title":"Bulk delete SLO request","type":"object"},"SLOs_bulk_delete_response":{"description":"The bulk delete SLO response returns a taskId that can be used to poll for its status\n","properties":{"taskId":{"description":"The taskId of the bulk delete operation","example":"d08506b7-f0e8-4f8b-a06a-a83940f4db91","type":"string"}},"title":"Bulk delete SLO response","type":"object"},"SLOs_bulk_delete_status_response":{"description":"Indicates if the bulk deletion is completed, with the detailed results of the operation.","properties":{"error":{"description":"The error message if the bulk deletion operation failed","example":"Task not found","type":"string"},"isDone":{"description":"Indicates if the bulk deletion operation is completed","example":true,"type":"boolean"},"results":{"description":"The results of the bulk deletion operation, including the success status and any errors for each SLO","items":{"type":"object","properties":{"error":{"description":"The error message if the deletion operation failed for this SLO","example":"SLO [d08506b7-f0e8-4f8b-a06a-a83940f4db91] not found","type":"string"},"id":{"description":"The ID of the SLO that was deleted","example":"d08506b7-f0e8-4f8b-a06a-a83940f4db91","type":"string"},"success":{"description":"The result of the deletion operation for this SLO","example":true,"type":"boolean"}}},"type":"array"}},"title":"The status of the bulk deletion","type":"object"},"SLOs_bulk_purge_rollup_request":{"description":"The bulk purge rollup data request takes a list of SLO ids and a purge policy, then deletes the rollup data according to the purge policy. This API can be used to remove the staled data of an instance SLO that no longer get updated.\n","properties":{"list":{"description":"An array of slo ids","items":{"description":"The SLO Definition id","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"type":"array"},"purgePolicy":{"description":"Policy that dictates which SLI documents to purge based on age","oneOf":[{"type":"object","properties":{"age":{"description":"The duration to determine which documents to purge, formatted as {duration}{unit}. This value should be greater than or equal to the time window of every SLO provided.","example":"7d","type":"string"},"purgeType":{"description":"Specifies whether documents will be purged based on a specific age or on a timestamp","enum":["fixed-age"],"type":"string"}}},{"type":"object","properties":{"purgeType":{"description":"Specifies whether documents will be purged based on a specific age or on a timestamp","enum":["fixed-time"],"type":"string"},"timestamp":{"description":"The timestamp to determine which documents to purge, formatted in ISO. This value should be older than the applicable time window of every SLO provided.","example":"2024-12-31T00:00:00.000Z","type":"string"}}}],"type":"object"}},"required":["list","purgePolicy"],"title":"Bulk Purge Rollup data request","type":"object"},"SLOs_bulk_purge_rollup_response":{"description":"The bulk purge rollup data response returns a task id from the elasticsearch deleteByQuery response.\n","properties":{"taskId":{"description":"The task id of the purge operation","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"}},"title":"Bulk Purge Rollup data response","type":"object"},"SLOs_create_slo_request":{"description":"The create SLO API request body varies depending on the type of indicator, time window and budgeting method.\n","properties":{"budgetingMethod":{"$ref":"#/components/schemas/SLOs_budgeting_method"},"description":{"description":"A description for the SLO.","type":"string"},"groupBy":{"$ref":"#/components/schemas/SLOs_group_by"},"id":{"description":"A optional and unique identifier for the SLO. Must be between 8 and 36 chars","example":"my-super-slo-id","type":"string"},"indicator":{"oneOf":[{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_kql"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_availability"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_latency"},{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_metric"},{"$ref":"#/components/schemas/SLOs_indicator_properties_histogram"},{"$ref":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"}]},"name":{"description":"A name for the SLO.","type":"string"},"objective":{"$ref":"#/components/schemas/SLOs_objective"},"settings":{"$ref":"#/components/schemas/SLOs_settings"},"tags":{"description":"List of tags","items":{"type":"string"},"type":"array"},"timeWindow":{"$ref":"#/components/schemas/SLOs_time_window"}},"required":["name","description","indicator","timeWindow","budgetingMethod","objective"],"title":"Create SLO request","type":"object"},"SLOs_create_slo_response":{"title":"Create SLO response","type":"object","properties":{"id":{"example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"}},"required":["id"]},"SLOs_delete_slo_instances_request":{"description":"The delete SLO instances request takes a list of SLO id and instance id, then delete the rollup and summary data. This API can be used to remove the staled data of an instance SLO that no longer get updated.\n","properties":{"list":{"description":"An array of slo id and instance id","items":{"type":"object","properties":{"instanceId":{"description":"The SLO instance identifier","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"sloId":{"description":"The SLO unique identifier","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"}},"required":["sloId","instanceId"]},"type":"array"}},"required":["list"],"title":"Delete SLO instances request","type":"object"},"SLOs_error_budget":{"title":"Error budget","type":"object","properties":{"consumed":{"description":"The error budget consummed, as a percentage of the initial value.","example":0.8,"type":"number"},"initial":{"description":"The initial error budget, as 1 - objective","example":0.02,"type":"number"},"isEstimated":{"description":"Only for SLO defined with occurrences budgeting method and calendar aligned time window.","example":true,"type":"boolean"},"remaining":{"description":"The error budget remaining, as a percentage of the initial value.","example":0.2,"type":"number"}},"required":["initial","consumed","remaining","isEstimated"]},"SLOs_filter":{"description":"Defines properties for a filter","properties":{"meta":{"$ref":"#/components/schemas/SLOs_filter_meta"},"query":{"type":"object"}},"title":"Filter","type":"object"},"SLOs_filter_meta":{"description":"Defines properties for a filter","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{"type":"object"},"type":{"type":"string"},"value":{"type":"string"}},"title":"FilterMeta","type":"object"},"SLOs_find_slo_definitions_response":{"description":"A paginated response of SLO definitions matching the query.\n","oneOf":[{"type":"object","properties":{"page":{"example":1,"type":"number"},"perPage":{"example":25,"type":"number"},"results":{"items":{"$ref":"#/components/schemas/SLOs_slo_with_summary_response"},"type":"array"},"total":{"example":34,"type":"number"}}},{"type":"object","properties":{"page":{"default":1,"description":"for backward compability","type":"number"},"perPage":{"description":"for backward compability","example":25,"type":"number"},"results":{"items":{"$ref":"#/components/schemas/SLOs_slo_with_summary_response"},"type":"array"},"searchAfter":{"description":"the cursor to provide to get the next paged results","example":["some-slo-id","other-cursor-id"],"items":{"type":"string"},"type":"array"},"size":{"example":25,"type":"number"},"total":{"example":34,"type":"number"}}}],"title":"Find SLO definitions response","type":"object"},"SLOs_find_slo_response":{"description":"A paginated response of SLOs matching the query.\n","properties":{"page":{"example":1,"type":"number"},"perPage":{"example":25,"type":"number"},"results":{"items":{"$ref":"#/components/schemas/SLOs_slo_with_summary_response"},"type":"array"},"searchAfter":{"type":"string"},"size":{"description":"Size provided for cursor based pagination","example":25,"type":"number"},"total":{"example":34,"type":"number"}},"title":"Find SLO response","type":"object"},"SLOs_group_by":{"description":"optional group by field or fields to use to generate an SLO per distinct value","example":[["service.name"],"service.name",["service.name","service.environment"]],"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Group by"},"SLOs_indicator_properties_apm_availability":{"description":"Defines properties for the APM availability indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"environment":{"description":"The APM service environment or \"*\"","example":"production","type":"string"},"filter":{"description":"KQL query used for filtering the data","example":"service.foo : \"bar\"","type":"string"},"index":{"description":"The index used by APM metrics","example":"metrics-apm*,apm*","type":"string"},"service":{"description":"The APM service name","example":"o11y-app","type":"string"},"transactionName":{"description":"The APM transaction name or \"*\"","example":"GET /my/api","type":"string"},"transactionType":{"description":"The APM transaction type or \"*\"","example":"request","type":"string"}},"required":["service","environment","transactionType","transactionName","index"]},"type":{"description":"The type of indicator.","example":"sli.apm.transactionDuration","type":"string"}},"required":["type","params"],"title":"APM availability"},"SLOs_indicator_properties_apm_latency":{"description":"Defines properties for the APM latency indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"environment":{"description":"The APM service environment or \"*\"","example":"production","type":"string"},"filter":{"description":"KQL query used for filtering the data","example":"service.foo : \"bar\"","type":"string"},"index":{"description":"The index used by APM metrics","example":"metrics-apm*,apm*","type":"string"},"service":{"description":"The APM service name","example":"o11y-app","type":"string"},"threshold":{"description":"The latency threshold in milliseconds","example":250,"type":"number"},"transactionName":{"description":"The APM transaction name or \"*\"","example":"GET /my/api","type":"string"},"transactionType":{"description":"The APM transaction type or \"*\"","example":"request","type":"string"}},"required":["service","environment","transactionType","transactionName","index","threshold"]},"type":{"description":"The type of indicator.","example":"sli.apm.transactionDuration","type":"string"}},"required":["type","params"],"title":"APM latency"},"SLOs_indicator_properties_custom_kql":{"description":"Defines properties for a custom query indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"dataViewId":{"description":"The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.","example":"03b80ab3-003d-498b-881c-3beedbaf1162","type":"string"},"filter":{"$ref":"#/components/schemas/SLOs_kql_with_filters"},"good":{"$ref":"#/components/schemas/SLOs_kql_with_filters_good"},"index":{"description":"The index or index pattern to use","example":"my-service-*","type":"string"},"timestampField":{"description":"The timestamp field used in the source indice.\n","example":"timestamp","type":"string"},"total":{"$ref":"#/components/schemas/SLOs_kql_with_filters_total"}},"required":["index","timestampField","good","total"]},"type":{"description":"The type of indicator.","example":"sli.kql.custom","type":"string"}},"required":["type","params"],"title":"Custom Query"},"SLOs_indicator_properties_custom_metric":{"description":"Defines properties for a custom metric indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"dataViewId":{"description":"The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.","example":"03b80ab3-003d-498b-881c-3beedbaf1162","type":"string"},"filter":{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},"good":{"description":"An object defining the \"good\" metrics and equation\n","type":"object","properties":{"equation":{"description":"The equation to calculate the \"good\" metric.","example":"A","type":"string"},"metrics":{"description":"List of metrics with their name, aggregation type, and field.","items":{"oneOf":[{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["sum"],"example":"sum","type":"string"},"field":{"description":"The field of the metric.","example":"processor.processed","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: *","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation","field"]},{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["doc_count"],"example":"doc_count","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: *","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation"]}]},"type":"array"}},"required":["metrics","equation"]},"index":{"description":"The index or index pattern to use","example":"my-service-*","type":"string"},"timestampField":{"description":"The timestamp field used in the source indice.\n","example":"timestamp","type":"string"},"total":{"description":"An object defining the \"total\" metrics and equation\n","type":"object","properties":{"equation":{"description":"The equation to calculate the \"total\" metric.","example":"A","type":"string"},"metrics":{"description":"List of metrics with their name, aggregation type, and field.","items":{"oneOf":[{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["sum"],"example":"sum","type":"string"},"field":{"description":"The field of the metric.","example":"processor.processed","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: *","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation","field"]},{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["doc_count"],"example":"doc_count","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: *","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation"]}]},"type":"array"}},"required":["metrics","equation"]}},"required":["index","timestampField","good","total"]},"type":{"description":"The type of indicator.","example":"sli.metric.custom","type":"string"}},"required":["type","params"],"title":"Custom metric"},"SLOs_indicator_properties_histogram":{"description":"Defines properties for a histogram indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"dataViewId":{"description":"The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.","example":"03b80ab3-003d-498b-881c-3beedbaf1162","type":"string"},"filter":{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},"good":{"description":"An object defining the \"good\" events\n","type":"object","properties":{"aggregation":{"description":"The type of aggregation to use.","enum":["value_count","range"],"example":"value_count","type":"string"},"field":{"description":"The field use to aggregate the good events.","example":"processor.latency","type":"string"},"filter":{"description":"The filter for good events.","example":"processor.outcome: \"success\"","type":"string"},"from":{"description":"The starting value of the range. Only required for \"range\" aggregations.","example":0,"type":"number"},"to":{"description":"The ending value of the range. Only required for \"range\" aggregations.","example":100,"type":"number"}},"required":["aggregation","field"]},"index":{"description":"The index or index pattern to use","example":"my-service-*","type":"string"},"timestampField":{"description":"The timestamp field used in the source indice.\n","example":"timestamp","type":"string"},"total":{"description":"An object defining the \"total\" events\n","type":"object","properties":{"aggregation":{"description":"The type of aggregation to use.","enum":["value_count","range"],"example":"value_count","type":"string"},"field":{"description":"The field use to aggregate the good events.","example":"processor.latency","type":"string"},"filter":{"description":"The filter for total events.","example":"processor.outcome : *","type":"string"},"from":{"description":"The starting value of the range. Only required for \"range\" aggregations.","example":0,"type":"number"},"to":{"description":"The ending value of the range. Only required for \"range\" aggregations.","example":100,"type":"number"}},"required":["aggregation","field"]}},"required":["index","timestampField","good","total"]},"type":{"description":"The type of indicator.","example":"sli.histogram.custom","type":"string"}},"required":["type","params"],"title":"Histogram indicator"},"SLOs_indicator_properties_timeslice_metric":{"description":"Defines properties for a timeslice metric indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"dataViewId":{"description":"The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.","example":"03b80ab3-003d-498b-881c-3beedbaf1162","type":"string"},"filter":{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},"index":{"description":"The index or index pattern to use","example":"my-service-*","type":"string"},"metric":{"description":"An object defining the metrics, equation, and threshold to determine if it's a good slice or not\n","type":"object","properties":{"comparator":{"description":"The comparator to use to compare the equation to the threshold.","enum":["GT","GTE","LT","LTE"],"example":"GT","type":"string"},"equation":{"description":"The equation to calculate the metric.","example":"A","type":"string"},"metrics":{"description":"List of metrics with their name, aggregation type, and field.","items":{"anyOf":[{"$ref":"#/components/schemas/SLOs_timeslice_metric_basic_metric_with_field"},{"$ref":"#/components/schemas/SLOs_timeslice_metric_percentile_metric"},{"$ref":"#/components/schemas/SLOs_timeslice_metric_doc_count_metric"}]},"type":"array"},"threshold":{"description":"The threshold used to determine if the metric is a good slice or not.","example":100,"type":"number"}},"required":["metrics","equation","comparator","threshold"]},"timestampField":{"description":"The timestamp field used in the source indice.\n","example":"timestamp","type":"string"}},"required":["index","timestampField","metric"]},"type":{"description":"The type of indicator.","example":"sli.metric.timeslice","type":"string"}},"required":["type","params"],"title":"Timeslice metric"},"SLOs_kql_with_filters":{"description":"Defines properties for a filter","oneOf":[{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},{"type":"object","properties":{"filters":{"items":{"$ref":"#/components/schemas/SLOs_filter"},"type":"array"},"kqlQuery":{"type":"string"}}}],"title":"KQL with filters"},"SLOs_kql_with_filters_good":{"description":"The KQL query used to define the good events.","oneOf":[{"description":"the KQL query to filter the documents with.","example":"request.latency \u003c= 150 and request.status_code : \"2xx\"","type":"string"},{"type":"object","properties":{"filters":{"items":{"$ref":"#/components/schemas/SLOs_filter"},"type":"array"},"kqlQuery":{"type":"string"}}}],"title":"KQL query for good events"},"SLOs_kql_with_filters_total":{"description":"The KQL query used to define all events.","oneOf":[{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},{"type":"object","properties":{"filters":{"items":{"$ref":"#/components/schemas/SLOs_filter"},"type":"array"},"kqlQuery":{"type":"string"}}}],"title":"KQL query for all events"},"SLOs_objective":{"description":"Defines properties for the SLO objective","type":"object","properties":{"target":{"description":"the target objective between 0 and 1 excluded","example":0.99,"exclusiveMaximum":true,"exclusiveMinimum":true,"maximum":100,"minimum":0,"type":"number"},"timesliceTarget":{"description":"the target objective for each slice when using a timeslices budgeting method","example":0.995,"maximum":100,"minimum":0,"type":"number"},"timesliceWindow":{"description":"the duration of each slice when using a timeslices budgeting method, as {duraton}{unit}","example":"5m","type":"string"}},"required":["target"],"title":"Objective"},"SLOs_settings":{"description":"Defines properties for SLO settings.","properties":{"frequency":{"default":"1m","description":"The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute.","example":"5m","type":"string"},"preventInitialBackfill":{"default":false,"description":"Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window.","example":true,"type":"boolean"},"syncDelay":{"default":"1m","description":"The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval.","example":"5m","type":"string"},"syncField":{"description":"The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field.","example":"event.ingested","type":"string"}},"title":"Settings","type":"object"},"SLOs_slo_definition_response":{"title":"SLO definition response","type":"object","properties":{"budgetingMethod":{"$ref":"#/components/schemas/SLOs_budgeting_method"},"createdAt":{"description":"The creation date","example":"2023-01-12T10:03:19.000Z","type":"string"},"description":{"description":"The description of the SLO.","example":"My SLO description","type":"string"},"enabled":{"description":"Indicate if the SLO is enabled","example":true,"type":"boolean"},"groupBy":{"$ref":"#/components/schemas/SLOs_group_by"},"id":{"description":"The identifier of the SLO.","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"indicator":{"discriminator":{"mapping":{"sli.apm.transactionDuration":"#/components/schemas/SLOs_indicator_properties_apm_latency","sli.apm.transactionErrorRate":"#/components/schemas/SLOs_indicator_properties_apm_availability","sli.histogram.custom":"#/components/schemas/SLOs_indicator_properties_histogram","sli.kql.custom":"#/components/schemas/SLOs_indicator_properties_custom_kql","sli.metric.custom":"#/components/schemas/SLOs_indicator_properties_custom_metric","sli.metric.timeslice":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_kql"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_availability"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_latency"},{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_metric"},{"$ref":"#/components/schemas/SLOs_indicator_properties_histogram"},{"$ref":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"}]},"name":{"description":"The name of the SLO.","example":"My Service SLO","type":"string"},"objective":{"$ref":"#/components/schemas/SLOs_objective"},"revision":{"description":"The SLO revision","example":2,"type":"number"},"settings":{"$ref":"#/components/schemas/SLOs_settings"},"tags":{"description":"List of tags","items":{"type":"string"},"type":"array"},"timeWindow":{"$ref":"#/components/schemas/SLOs_time_window"},"updatedAt":{"description":"The last update date","example":"2023-01-12T10:03:19.000Z","type":"string"},"version":{"description":"The internal SLO version","example":2,"type":"number"}},"required":["id","name","description","indicator","timeWindow","budgetingMethod","objective","settings","revision","enabled","groupBy","tags","createdAt","updatedAt","version"]},"SLOs_slo_with_summary_response":{"title":"SLO response","type":"object","properties":{"budgetingMethod":{"$ref":"#/components/schemas/SLOs_budgeting_method"},"createdAt":{"description":"The creation date","example":"2023-01-12T10:03:19.000Z","type":"string"},"description":{"description":"The description of the SLO.","example":"My SLO description","type":"string"},"enabled":{"description":"Indicate if the SLO is enabled","example":true,"type":"boolean"},"groupBy":{"$ref":"#/components/schemas/SLOs_group_by"},"id":{"description":"The identifier of the SLO.","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"indicator":{"discriminator":{"mapping":{"sli.apm.transactionDuration":"#/components/schemas/SLOs_indicator_properties_apm_latency","sli.apm.transactionErrorRate":"#/components/schemas/SLOs_indicator_properties_apm_availability","sli.histogram.custom":"#/components/schemas/SLOs_indicator_properties_histogram","sli.kql.custom":"#/components/schemas/SLOs_indicator_properties_custom_kql","sli.metric.custom":"#/components/schemas/SLOs_indicator_properties_custom_metric","sli.metric.timeslice":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_kql"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_availability"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_latency"},{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_metric"},{"$ref":"#/components/schemas/SLOs_indicator_properties_histogram"},{"$ref":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"}]},"instanceId":{"description":"the value derived from the groupBy field, if present, otherwise '*'","example":"host-abcde","type":"string"},"name":{"description":"The name of the SLO.","example":"My Service SLO","type":"string"},"objective":{"$ref":"#/components/schemas/SLOs_objective"},"revision":{"description":"The SLO revision","example":2,"type":"number"},"settings":{"$ref":"#/components/schemas/SLOs_settings"},"summary":{"$ref":"#/components/schemas/SLOs_summary"},"tags":{"description":"List of tags","items":{"type":"string"},"type":"array"},"timeWindow":{"$ref":"#/components/schemas/SLOs_time_window"},"updatedAt":{"description":"The last update date","example":"2023-01-12T10:03:19.000Z","type":"string"},"version":{"description":"The internal SLO version","example":2,"type":"number"}},"required":["id","name","description","indicator","timeWindow","budgetingMethod","objective","settings","revision","summary","enabled","groupBy","instanceId","tags","createdAt","updatedAt","version"]},"SLOs_summary":{"description":"The SLO computed data","properties":{"errorBudget":{"$ref":"#/components/schemas/SLOs_error_budget"},"sliValue":{"example":0.9836,"type":"number"},"status":{"$ref":"#/components/schemas/SLOs_summary_status"}},"required":["status","sliValue","errorBudget"],"title":"Summary","type":"object"},"SLOs_summary_status":{"enum":["NO_DATA","HEALTHY","DEGRADING","VIOLATED"],"example":"HEALTHY","title":"summary status","type":"string"},"SLOs_time_window":{"description":"Defines properties for the SLO time window","type":"object","properties":{"duration":{"description":"the duration formatted as {duration}{unit}. Accepted values for rolling: 7d, 30d, 90d. Accepted values for calendar aligned: 1w (weekly) or 1M (monthly)","example":"30d","type":"string"},"type":{"description":"Indicates weither the time window is a rolling or a calendar aligned time window.","enum":["rolling","calendarAligned"],"example":"rolling","type":"string"}},"required":["duration","type"],"title":"Time window"},"SLOs_timeslice_metric_basic_metric_with_field":{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["sum","avg","min","max","std_deviation","last_value","cardinality"],"example":"sum","type":"string"},"field":{"description":"The field of the metric.","example":"processor.processed","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: \"success\"","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation","field"],"title":"Timeslice Metric Basic Metric with Field"},"SLOs_timeslice_metric_doc_count_metric":{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric. Only valid option is \"doc_count\"","enum":["doc_count"],"example":"doc_count","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: \"success\"","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation"],"title":"Timeslice Metric Doc Count Metric"},"SLOs_timeslice_metric_percentile_metric":{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric. Only valid option is \"percentile\"","enum":["percentile"],"example":"percentile","type":"string"},"field":{"description":"The field of the metric.","example":"processor.processed","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: \"success\"","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"},"percentile":{"description":"The percentile value.","example":95,"type":"number"}},"required":["name","aggregation","field","percentile"],"title":"Timeslice Metric Percentile Metric"},"SLOs_update_slo_request":{"description":"The update SLO API request body varies depending on the type of indicator, time window and budgeting method. Partial update is handled.\n","properties":{"budgetingMethod":{"$ref":"#/components/schemas/SLOs_budgeting_method"},"description":{"description":"A description for the SLO.","type":"string"},"groupBy":{"$ref":"#/components/schemas/SLOs_group_by"},"indicator":{"oneOf":[{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_kql"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_availability"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_latency"},{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_metric"},{"$ref":"#/components/schemas/SLOs_indicator_properties_histogram"},{"$ref":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"}]},"name":{"description":"A name for the SLO.","type":"string"},"objective":{"$ref":"#/components/schemas/SLOs_objective"},"settings":{"$ref":"#/components/schemas/SLOs_settings"},"tags":{"description":"List of tags","items":{"type":"string"},"type":"array"},"timeWindow":{"$ref":"#/components/schemas/SLOs_time_window"}},"title":"Update SLO request","type":"object"},"Synthetics_browserMonitorFields":{"allOf":[{"$ref":"#/components/schemas/Synthetics_commonMonitorFields"},{"additionalProperties":true,"type":"object","properties":{"ignore_https_errors":{"default":false,"description":"Ignore HTTPS errors.","type":"boolean"},"inline_script":{"description":"The inline script.","type":"string"},"playwright_options":{"description":"Playwright options.","type":"object"},"screenshots":{"default":"on","description":"The screenshot option.","enum":["on","off","only-on-failure"],"type":"string"},"synthetics_args":{"description":"Synthetics agent CLI arguments.","type":"array"},"type":{"description":"The monitor type.","enum":["browser"],"type":"string"}},"required":["inline_script","type"]}],"title":"Browser monitor fields"},"Synthetics_commonMonitorFields":{"title":"Common monitor fields","type":"object","properties":{"alert":{"description":"The alert configuration. The default is `{ status: { enabled: true }, tls: { enabled: true } }`.\n","type":"object"},"enabled":{"default":true,"description":"Specify whether the monitor is enabled.","type":"boolean"},"locations":{"description":"The location to deploy the monitor.\nMonitors can be deployed in multiple locations so that you can detect differences in availability and response times across those locations.\nTo list available locations you can:\n\n- Run the `elastic-synthetics locations` command with the deployment's Kibana URL.\n- Go to *Synthetics \u003e Management* and click *Create monitor*. Locations will be listed in *Locations*.\n","externalDocs":{"url":"https://github.com/elastic/synthetics/blob/main/src/locations/public-locations.ts"},"items":{"type":"string"},"type":"array"},"name":{"description":"The monitor name.","type":"string"},"namespace":{"default":"default","description":"The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters: `*`, `\\`, `/`, `?`, `\"`, `\u003c`, `\u003e`, `|`, whitespace, `,`, `#`, `:`, or `-`.\n","type":"string"},"params":{"description":"The monitor parameters.","type":"string"},"private_locations":{"description":"The private locations to which the monitors will be deployed.\nThese private locations refer to locations hosted and managed by you, whereas `locations` are hosted by Elastic.\nYou can specify a private location using the location's name.\nTo list available private locations you can:\n\n- Run the `elastic-synthetics locations` command with the deployment's Kibana URL.\n- Go to *Synthetics \u003e Settings* and click *Private locationsr*. Private locations will be listed in the table.\n\n\u003e info\n\u003e You can provide `locations` or `private_locations` or both. At least one is required.\n","items":{"type":"string"},"type":"array"},"retest_on_failure":{"default":true,"description":"Turn retesting for when a monitor fails on or off. By default, monitors are automatically retested if the monitor goes from \"up\" to \"down\". If the result of the retest is also \"down\", an error will be created and if configured, an alert sent. The monitor will then resume running according to the defined schedule. Using `retest_on_failure` can reduce noise related to transient problems.\n","type":"boolean"},"schedule":{"description":"The monitor's schedule in minutes. Supported values are `1`, `3`, `5`, `10`, `15`, `30`, `60`, `120`, and `240`. The default value is `3` minutes for HTTP, TCP, and ICMP monitors. The default value is `10` minutes for Browser monitors.\n","type":"number"},"service.name":{"description":"The APM service name.","type":"string"},"tags":{"description":"An array of tags.","items":{"type":"string"},"type":"array"},"timeout":{"default":16,"description":"The monitor timeout in seconds. The monitor will fail if it doesn't complete within this time.\n","type":"number"}},"required":["name"]},"Synthetics_getParameterResponse":{"title":"Get parameter response","type":"object","properties":{"description":{"description":"The description of the parameter. It is included in the response if the user has read-only permissions to the Synthetics app.\n","type":"string"},"id":{"description":"The unique identifier of the parameter.","type":"string"},"key":{"description":"The key of the parameter.","type":"string"},"namespaces":{"description":"The namespaces associated with the parameter. It is included in the response if the user has read-only permissions to the Synthetics app.\n","items":{"type":"string"},"type":"array"},"tags":{"description":"An array of tags associated with the parameter. It is included in the response if the user has read-only permissions to the Synthetics app.\n","items":{"type":"string"},"type":"array"},"value":{"description":"The value associated with the parameter. It will be included in the response if the user has write permissions. \n","type":"string"}},"required":null},"Synthetics_getPrivateLocation":{"additionalProperties":true,"properties":{"agentPolicyId":{"description":"The ID of the agent policy associated with the private location.","type":"string"},"geo":{"description":"Geographic coordinates (WGS84) for the location.","type":"object","properties":{"lat":{"description":"The latitude of the location.","type":"number"},"lon":{"description":"The longitude of the location.","type":"number"}},"required":["lat","lon"]},"id":{"description":"The unique identifier of the private location.","type":"string"},"isInvalid":{"description":"Indicates whether the location is invalid. If `true`, the location is invalid, which means the agent policy associated with the location is deleted.\n","type":"boolean"},"label":{"description":"A label for the private location.","type":"string"},"namespace":{"description":"The namespace of the location, which is the same as the namespace of the agent policy associated with the location.","type":"string"}},"title":"Post a private location","type":"object"},"Synthetics_httpMonitorFields":{"allOf":[{"$ref":"#/components/schemas/Synthetics_commonMonitorFields"},{"additionalproperties":true,"type":"object","properties":{"check":{"description":"The check request settings.","type":"objects","properties":{"request":{"description":"An optional request to send to the remote host.","type":"object","properties":{"body":{"description":"Optional request body content.","type":"string"},"headers":{"description":"A dictionary of additional HTTP headers to send. By default, Synthetics will set the User-Agent header to identify itself.\n","type":"object"},"method":{"description":"The HTTP method to use.","enum":["HEAD","GET","POST","OPTIONS"],"type":"string"}}},"response":{"additionalProperties":true,"description":"The expected response.","type":"object","properties":{"body":{"type":"object"},"headers":{"description":"A dictionary of expected HTTP headers. If the header is not found, the check fails.","type":"object"}}}}},"ipv4":{"default":true,"description":"If `true`, ping using the ipv4 protocol.","type":"boolean"},"ipv6":{"default":true,"description":"If `true`, ping using the ipv6 protocol.","type":"boolean"},"max_redirects":{"default":0,"description":"The maximum number of redirects to follow.","type":"number"},"mode":{"default":"any","description":"The mode of the monitor. If it is `all`, the monitor pings all resolvable IPs for a hostname. If it is `any`, the monitor pings only one IP address for a hostname. If you're using a DNS-load balancer and want to ping every IP address for the specified hostname, you should use `all`.\n","enum":["all","any"],"type":"string"},"password":{"description":"The password for authenticating with the server. The credentials are passed with the request.\n","type":"string"},"proxy_headers":{"description":"Additional headers to send to proxies during CONNECT requests.","type":"object"},"proxy_url":{"description":"The URL of the proxy to use for this monitor.","type":"string"},"response":{"description":"Controls the indexing of the HTTP response body contents to the `http.response.body.contents field`.","type":"object"},"ssl":{"description":"The TLS/SSL connection settings for use with the HTTPS endpoint. If you don't specify settings, the system defaults are used.\n","type":"object"},"type":{"description":"The monitor type.","enum":["http"],"type":"string"},"url":{"description":"The URL to monitor.","type":"string"},"username":{"description":"The username for authenticating with the server. The credentials are passed with the request.\n","type":"string"}},"required":["type","url"]}],"title":"HTTP monitor fields"},"Synthetics_icmpMonitorFields":{"allOf":[{"$ref":"#/components/schemas/Synthetics_commonMonitorFields"},{"additionalProperties":true,"type":"object","properties":{"host":{"description":"The host to ping.","type":"string"},"type":{"description":"The monitor type.","enum":["icmp"],"type":"string"},"wait":{"default":1,"description":"The wait time in seconds.","type":"number"}},"required":["host","type"]}],"title":"ICMP monitor fields"},"Synthetics_parameterRequest":{"title":"Parameter request","type":"object","properties":{"description":{"description":"A description of the parameter.","type":"string"},"key":{"description":"The key of the parameter.","type":"string"},"share_across_spaces":{"description":"Specify whether the parameter should be shared across spaces.","type":"boolean"},"tags":{"description":"An array of tags to categorize the parameter.","items":{"type":"string"},"type":"array"},"value":{"description":"The value associated with the parameter.","type":"string"}},"required":["key","value"]},"Synthetics_postParameterResponse":{"title":"Post parameter response","type":"object","properties":{"description":{"description":"A description of the parameter.","type":"string"},"id":{"description":"The unique identifier for the parameter.","type":"string"},"key":{"description":"The parameter key.","type":"string"},"share_across_spaces":{"description":"Indicates whether the parameter is shared across spaces.","type":"boolean"},"tags":{"description":"An array of tags associated with the parameter.","items":{"type":"string"},"type":"array"},"value":{"description":"The value associated with the parameter.","type":"string"}}},"Synthetics_tcpMonitorFields":{"allOf":[{"$ref":"#/components/schemas/Synthetics_commonMonitorFields"},{"additionalProperties":true,"type":"object","properties":{"host":{"description":"The host to monitor; it can be an IP address or a hostname. The host can include the port using a colon, for example \"example.com:9200\".\n","type":"string"},"proxy_url":{"description":"The URL of the SOCKS5 proxy to use when connecting to the server. The value must be a URL with a scheme of `socks5://`. If the SOCKS5 proxy server requires client authentication, then a username and password can be embedded in the URL. When using a proxy, hostnames are resolved on the proxy server instead of on the client. You can change this behavior by setting the `proxy_use_local_resolver` option.\n","type":"string"},"proxy_use_local_resolver":{"default":false,"description":"Specify that hostnames are resolved locally instead of being resolved on the proxy server. If `false`, name resolution occurs on the proxy server.\n","type":"boolean"},"ssl":{"description":"The TLS/SSL connection settings for use with the HTTPS endpoint. If you don't specify settings, the system defaults are used.\n","type":"object"},"type":{"description":"The monitor type.","enum":["tcp"],"type":"string"}},"required":["host","type"]}],"title":"TCP monitor fields"},"Task_manager_health_APIs_configuration":{"description":"This object summarizes the current configuration of Task Manager. This includes dynamic configurations that change over time, such as `poll_interval` and `max_workers`, which can adjust in reaction to changing load on the system.\n","type":"object"},"Task_manager_health_APIs_health_response":{"title":"Task health response properties","type":"object","properties":{"id":{"type":"string"},"last_update":{"type":"string"},"stats":{"type":"object","properties":{"capacity_estimation":{"description":"This object provides a rough estimate about the sufficiency of its capacity. These are estimates based on historical data and should not be used as predictions.\n","type":"object"},"configuration":{"$ref":"#/components/schemas/Task_manager_health_APIs_configuration"},"runtime":{"description":"This object tracks runtime performance of Task Manager, tracking task drift, worker load, and stats broken down by type, including duration and run results.\n","type":"object"},"workload":{"$ref":"#/components/schemas/Task_manager_health_APIs_workload"}}},"status":{"type":"string"},"timestamp":{"type":"string"}}},"Task_manager_health_APIs_workload":{"description":"This object summarizes the work load across the cluster, including the tasks in the system, their types, and current status.\n","type":"object"},"bedrock_config":{"title":"Connector request properties for an Amazon Bedrock connector","description":"Defines properties for connectors when type is `.bedrock`.","type":"object","required":["apiUrl"],"properties":{"apiUrl":{"type":"string","description":"The Amazon Bedrock request URL."},"defaultModel":{"type":"string","description":"The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.\n","default":"us.anthropic.claude-3-7-sonnet-20250219-v1:0"}}},"crowdstrike_config":{"title":"Connector request config properties for a Crowdstrike connector","required":["url"],"description":"Defines config properties for connectors when type is `.crowdstrike`.","type":"object","properties":{"url":{"description":"The CrowdStrike tenant URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n","type":"string"}}},"d3security_config":{"title":"Connector request properties for a D3 Security connector","description":"Defines properties for connectors when type is `.d3security`.","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The D3 Security API request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"}}},"email_config":{"title":"Connector request properties for an email connector","description":"Defines properties for connectors when type is `.email`.","required":["from"],"type":"object","properties":{"clientId":{"description":"The client identifier, which is a part of OAuth 2.0 client credentials authentication, in GUID format. If `service` is `exchange_server`, this property is required.\n","type":"string","nullable":true},"from":{"description":"The from address for all emails sent by the connector. It must be specified in `user@host-name` format.\n","type":"string"},"hasAuth":{"description":"Specifies whether a user and password are required inside the secrets configuration.\n","default":true,"type":"boolean"},"host":{"description":"The host name of the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.\n","type":"string"},"oauthTokenUrl":{"type":"string","nullable":true},"port":{"description":"The port to connect to on the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.\n","type":"integer"},"secure":{"description":"Specifies whether the connection to the service provider will use TLS. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored.\n","type":"boolean"},"service":{"description":"The name of the email service.\n","type":"string","enum":["elastic_cloud","exchange_server","gmail","other","outlook365","ses"]},"tenantId":{"description":"The tenant identifier, which is part of OAuth 2.0 client credentials authentication, in GUID format. If `service` is `exchange_server`, this property is required.\n","type":"string","nullable":true}}},"gemini_config":{"title":"Connector request properties for an Google Gemini connector","description":"Defines properties for connectors when type is `.gemini`.","type":"object","required":["apiUrl","gcpRegion","gcpProjectID"],"properties":{"apiUrl":{"type":"string","description":"The Google Gemini request URL."},"defaultModel":{"type":"string","description":"The generative artificial intelligence model for Google Gemini to use.","default":"gemini-1.5-pro-002"},"gcpRegion":{"type":"string","description":"The GCP region where the Vertex AI endpoint enabled."},"gcpProjectID":{"type":"string","description":"The Google ProjectID that has Vertex AI endpoint enabled."}}},"resilient_config":{"title":"Connector request properties for a IBM Resilient connector","required":["apiUrl","orgId"],"description":"Defines properties for connectors when type is `.resilient`.","type":"object","properties":{"apiUrl":{"description":"The IBM Resilient instance URL.","type":"string"},"orgId":{"description":"The IBM Resilient organization ID.","type":"string"}}},"index_config":{"title":"Connector request properties for an index connector","required":["index"],"description":"Defines properties for connectors when type is `.index`.","type":"object","properties":{"executionTimeField":{"description":"A field that indicates when the document was indexed.","default":null,"type":"string","nullable":true},"index":{"description":"The Elasticsearch index to be written to.","type":"string"},"refresh":{"description":"The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs.\n","default":false,"type":"boolean"}}},"jira_config":{"title":"Connector request properties for a Jira connector","required":["apiUrl","projectKey"],"description":"Defines properties for connectors when type is `.jira`.","type":"object","properties":{"apiUrl":{"description":"The Jira instance URL.","type":"string"},"projectKey":{"description":"The Jira project key.","type":"string"}}},"defender_config":{"title":"Connector request properties for a Microsoft Defender for Endpoint connector","required":["apiUrl","projectKey"],"description":"Defines properties for connectors when type is `.microsoft_defender_endpoint`.","type":"object","properties":{"apiUrl":{"type":"string","description":"The URL of the Microsoft Defender for Endpoint API. If you are using the `xpack.actions.allowedHosts` setting, make sure the hostname is added to the allowed hosts.\n"},"clientId":{"type":"string","description":"The application (client) identifier for your app in the Azure portal."},"oAuthScope":{"type":"string","description":"The OAuth scopes or permission sets for the Microsoft Defender for Endpoint API."},"oAuthServerUrl":{"type":"string","description":"The OAuth server URL where authentication is sent and received for the Microsoft Defender for Endpoint API."},"tenantId":{"description":"The tenant identifier for your app in the Azure portal.","type":"string"}}},"genai_azure_config":{"title":"Connector request properties for an OpenAI connector that uses Azure OpenAI","description":"Defines properties for connectors when type is `.gen-ai` and the API provider is `Azure OpenAI`.\n","type":"object","required":["apiProvider","apiUrl"],"properties":{"apiProvider":{"type":"string","description":"The OpenAI API provider.","enum":["Azure OpenAI"]},"apiUrl":{"type":"string","description":"The OpenAI API endpoint."}}},"genai_openai_config":{"title":"Connector request properties for an OpenAI connector","description":"Defines properties for connectors when type is `.gen-ai` and the API provider is `OpenAI`.\n","type":"object","required":["apiProvider","apiUrl"],"properties":{"apiProvider":{"type":"string","description":"The OpenAI API provider.","enum":["OpenAI"]},"apiUrl":{"type":"string","description":"The OpenAI API endpoint."},"defaultModel":{"type":"string","description":"The default model to use for requests."}}},"opsgenie_config":{"title":"Connector request properties for an Opsgenie connector","required":["apiUrl"],"description":"Defines properties for connectors when type is `.opsgenie`.","type":"object","properties":{"apiUrl":{"description":"The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n","type":"string"}}},"pagerduty_config":{"title":"Connector request properties for a PagerDuty connector","description":"Defines properties for connectors when type is `.pagerduty`.","type":"object","properties":{"apiUrl":{"description":"The PagerDuty event URL.","type":"string","nullable":true,"example":"https://events.pagerduty.com/v2/enqueue"}}},"sentinelone_config":{"title":"Connector request properties for a SentinelOne connector","required":["url"],"description":"Defines properties for connectors when type is `.sentinelone`.","type":"object","properties":{"url":{"description":"The SentinelOne tenant URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n","type":"string"}}},"servicenow_config":{"title":"Connector request properties for a ServiceNow ITSM connector","required":["apiUrl"],"description":"Defines properties for connectors when type is `.servicenow`.","type":"object","properties":{"apiUrl":{"type":"string","description":"The ServiceNow instance URL."},"clientId":{"description":"The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n","type":"string"},"isOAuth":{"description":"The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n","default":false,"type":"boolean"},"jwtKeyId":{"description":"The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`.\n","type":"string"},"userIdentifierValue":{"description":"The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.\n","type":"string"},"usesTableApi":{"description":"Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow.\n","default":true,"type":"boolean"}}},"servicenow_itom_config":{"title":"Connector request properties for a ServiceNow ITOM connector","required":["apiUrl"],"description":"Defines properties for connectors when type is `.servicenow-itom`.","type":"object","properties":{"apiUrl":{"type":"string","description":"The ServiceNow instance URL."},"clientId":{"description":"The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n","type":"string"},"isOAuth":{"description":"The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n","default":false,"type":"boolean"},"jwtKeyId":{"description":"The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`.\n","type":"string"},"userIdentifierValue":{"description":"The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.\n","type":"string"}}},"slack_api_config":{"title":"Connector request properties for a Slack connector","description":"Defines properties for connectors when type is `.slack_api`.","type":"object","properties":{"allowedChannels":{"type":"array","description":"A list of valid Slack channels.","items":{"type":"object","required":["id","name"],"maxItems":25,"properties":{"id":{"type":"string","description":"The Slack channel ID.","example":"C123ABC456","minLength":1},"name":{"type":"string","description":"The Slack channel name.","minLength":1}}}}}},"swimlane_config":{"title":"Connector request properties for a Swimlane connector","required":["apiUrl","appId","connectorType"],"description":"Defines properties for connectors when type is `.swimlane`.","type":"object","properties":{"apiUrl":{"description":"The Swimlane instance URL.","type":"string"},"appId":{"description":"The Swimlane application ID.","type":"string"},"connectorType":{"description":"The type of connector. Valid values are `all`, `alerts`, and `cases`.","type":"string","enum":["all","alerts","cases"]},"mappings":{"title":"Connector mappings properties for a Swimlane connector","description":"The field mapping.","type":"object","properties":{"alertIdConfig":{"title":"Alert identifier mapping","description":"Mapping for the alert ID.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"caseIdConfig":{"title":"Case identifier mapping","description":"Mapping for the case ID.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"caseNameConfig":{"title":"Case name mapping","description":"Mapping for the case name.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"commentsConfig":{"title":"Case comment mapping","description":"Mapping for the case comments.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"descriptionConfig":{"title":"Case description mapping","description":"Mapping for the case description.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"ruleNameConfig":{"title":"Rule name mapping","description":"Mapping for the name of the alert's rule.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"severityConfig":{"title":"Severity mapping","description":"Mapping for the severity.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}}}}}},"thehive_config":{"title":"Connector request properties for a TheHive connector","description":"Defines configuration properties for connectors when type is `.thehive`.","type":"object","required":["url"],"properties":{"organisation":{"type":"string","description":"The organisation in TheHive that will contain the alerts or cases. By default, the connector uses the default organisation of the user account that created the API key.\n"},"url":{"type":"string","description":"The instance URL in TheHive. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"}}},"tines_config":{"title":"Connector request properties for a Tines connector","description":"Defines properties for connectors when type is `.tines`.","type":"object","required":["url"],"properties":{"url":{"description":"The Tines tenant URL. If you are using the `xpack.actions.allowedHosts` setting, make sure this hostname is added to the allowed hosts.\n","type":"string"}}},"torq_config":{"title":"Connector request properties for a Torq connector","description":"Defines properties for connectors when type is `.torq`.","type":"object","required":["webhookIntegrationUrl"],"properties":{"webhookIntegrationUrl":{"description":"The endpoint URL of the Elastic Security integration in Torq.","type":"string"}}},"auth_type":{"title":"Authentication type","type":"string","nullable":true,"enum":["webhook-authentication-basic","webhook-authentication-ssl"],"description":"The type of authentication to use: basic, SSL, or none.\n"},"ca":{"title":"Certificate authority","type":"string","description":"A base64 encoded version of the certificate authority file that the connector can trust to sign and validate certificates. This option is available for all authentication types.\n"},"cert_type":{"title":"Certificate type","type":"string","description":"If the `authType` is `webhook-authentication-ssl`, specifies whether the certificate authentication data is in a CRT and key file format or a PFX file format.\n","enum":["ssl-crt-key","ssl-pfx"]},"has_auth":{"title":"Has authentication","type":"boolean","description":"If true, a username and password for login type authentication must be provided.","default":true},"verification_mode":{"title":"Verification mode","type":"string","enum":["certificate","full","none"],"default":"full","description":"Controls the verification of certificates. Use `full` to validate that the certificate has an issue date within the `not_before` and `not_after` dates, chains to a trusted certificate authority (CA), and has a hostname or IP address that matches the names within the certificate. Use `certificate` to validate the certificate and verify that it is signed by a trusted authority; this option does not check the certificate hostname. Use `none` to skip certificate validation.\n"},"webhook_config":{"title":"Connector request properties for a Webhook connector","description":"Defines properties for connectors when type is `.webhook`.","type":"object","properties":{"authType":{"$ref":"#/components/schemas/auth_type"},"ca":{"$ref":"#/components/schemas/ca"},"certType":{"$ref":"#/components/schemas/cert_type"},"hasAuth":{"$ref":"#/components/schemas/has_auth"},"headers":{"type":"object","nullable":true,"description":"A set of key-value pairs sent as headers with the request."},"method":{"type":"string","default":"post","enum":["post","put"],"description":"The HTTP request method, either `post` or `put`.\n"},"url":{"type":"string","description":"The request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"},"verificationMode":{"$ref":"#/components/schemas/verification_mode"}}},"cases_webhook_config":{"title":"Connector request properties for Webhook - Case Management connector","required":["createIncidentJson","createIncidentResponseKey","createIncidentUrl","getIncidentResponseExternalTitleKey","getIncidentUrl","updateIncidentJson","updateIncidentUrl","viewIncidentUrl"],"description":"Defines properties for connectors when type is `.cases-webhook`.","type":"object","properties":{"authType":{"$ref":"#/components/schemas/auth_type"},"ca":{"$ref":"#/components/schemas/ca"},"certType":{"$ref":"#/components/schemas/cert_type"},"createCommentJson":{"type":"string","description":"A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n","example":"{\"body\": {{{case.comment}}}}"},"createCommentMethod":{"type":"string","description":"The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`.\n","default":"put","enum":["patch","post","put"]},"createCommentUrl":{"type":"string","description":"The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts.\n","example":"https://example.com/issue/{{{external.system.id}}}/comment"},"createIncidentJson":{"type":"string","description":"A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n","example":"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"},"createIncidentMethod":{"type":"string","description":"The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`.\n","enum":["patch","post","put"],"default":"post"},"createIncidentResponseKey":{"type":"string","description":"The JSON key in the create external case response that contains the case ID."},"createIncidentUrl":{"type":"string","description":"The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"},"getIncidentResponseExternalTitleKey":{"type":"string","description":"The JSON key in get external case response that contains the case title."},"getIncidentUrl":{"type":"string","description":"The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n","example":"https://example.com/issue/{{{external.system.id}}}"},"hasAuth":{"$ref":"#/components/schemas/has_auth"},"headers":{"type":"string","description":"A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods.\n"},"updateIncidentJson":{"type":"string","description":"The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n","example":"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"},"updateIncidentMethod":{"type":"string","description":"The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`.\n","default":"put","enum":["patch","post","put"]},"updateIncidentUrl":{"type":"string","description":"The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n","example":"https://example.com/issue/{{{external.system.ID}}}"},"verificationMode":{"$ref":"#/components/schemas/verification_mode"},"viewIncidentUrl":{"type":"string","description":"The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL.\n","example":"https://testing-jira.atlassian.net/browse/{{{external.system.title}}}"}}},"xmatters_config":{"title":"Connector request properties for an xMatters connector","description":"Defines properties for connectors when type is `.xmatters`.","type":"object","properties":{"configUrl":{"description":"The request URL for the Elastic Alerts trigger in xMatters. It is applicable only when `usesBasic` is `true`.\n","type":"string","nullable":true},"usesBasic":{"description":"Specifies whether the connector uses HTTP basic authentication (`true`) or URL authentication (`false`).","type":"boolean","default":true}}},"bedrock_secrets":{"title":"Connector secrets properties for an Amazon Bedrock connector","description":"Defines secrets for connectors when type is `.bedrock`.","type":"object","required":["accessKey","secret"],"properties":{"accessKey":{"type":"string","description":"The AWS access key for authentication."},"secret":{"type":"string","description":"The AWS secret for authentication."}}},"crowdstrike_secrets":{"title":"Connector secrets properties for a Crowdstrike connector","description":"Defines secrets for connectors when type is `.crowdstrike`.","type":"object","required":["clientId","clientSecret"],"properties":{"clientId":{"description":"The CrowdStrike API client identifier.","type":"string"},"clientSecret":{"description":"The CrowdStrike API client secret to authenticate the `clientId`.","type":"string"}}},"d3security_secrets":{"title":"Connector secrets properties for a D3 Security connector","description":"Defines secrets for connectors when type is `.d3security`.","required":["token"],"type":"object","properties":{"token":{"type":"string","description":"The D3 Security token."}}},"email_secrets":{"title":"Connector secrets properties for an email connector","description":"Defines secrets for connectors when type is `.email`.","type":"object","properties":{"clientSecret":{"type":"string","description":"The Microsoft Exchange Client secret for OAuth 2.0 client credentials authentication. It must be URL-encoded. If `service` is `exchange_server`, this property is required.\n"},"password":{"type":"string","description":"The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required.\n"},"user":{"type":"string","description":"The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required.\n"}}},"gemini_secrets":{"title":"Connector secrets properties for a Google Gemini connector","description":"Defines secrets for connectors when type is `.gemini`.","type":"object","required":["credentialsJson"],"properties":{"credentialsJson":{"type":"string","description":"The service account credentials JSON file. The service account should have Vertex AI user IAM role assigned to it."}}},"resilient_secrets":{"title":"Connector secrets properties for IBM Resilient connector","required":["apiKeyId","apiKeySecret"],"description":"Defines secrets for connectors when type is `.resilient`.","type":"object","properties":{"apiKeyId":{"type":"string","description":"The authentication key ID for HTTP Basic authentication."},"apiKeySecret":{"type":"string","description":"The authentication key secret for HTTP Basic authentication."}}},"jira_secrets":{"title":"Connector secrets properties for a Jira connector","required":["apiToken","email"],"description":"Defines secrets for connectors when type is `.jira`.","type":"object","properties":{"apiToken":{"description":"The Jira API authentication token for HTTP basic authentication.","type":"string"},"email":{"description":"The account email for HTTP Basic authentication.","type":"string"}}},"teams_secrets":{"title":"Connector secrets properties for a Microsoft Teams connector","description":"Defines secrets for connectors when type is `.teams`.","type":"object","required":["webhookUrl"],"properties":{"webhookUrl":{"type":"string","description":"The URL of the incoming webhook. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"}}},"genai_secrets":{"title":"Connector secrets properties for an OpenAI connector","description":"Defines secrets for connectors when type is `.gen-ai`.","type":"object","properties":{"apiKey":{"type":"string","description":"The OpenAI API key."}}},"opsgenie_secrets":{"title":"Connector secrets properties for an Opsgenie connector","required":["apiKey"],"description":"Defines secrets for connectors when type is `.opsgenie`.","type":"object","properties":{"apiKey":{"description":"The Opsgenie API authentication key for HTTP Basic authentication.","type":"string"}}},"pagerduty_secrets":{"title":"Connector secrets properties for a PagerDuty connector","description":"Defines secrets for connectors when type is `.pagerduty`.","type":"object","required":["routingKey"],"properties":{"routingKey":{"description":"A 32 character PagerDuty Integration Key for an integration on a service.\n","type":"string"}}},"sentinelone_secrets":{"title":"Connector secrets properties for a SentinelOne connector","description":"Defines secrets for connectors when type is `.sentinelone`.","type":"object","required":["token"],"properties":{"token":{"description":"The A SentinelOne API token.","type":"string"}}},"servicenow_secrets":{"title":"Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors","description":"Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`.","type":"object","properties":{"clientSecret":{"type":"string","description":"The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`."},"password":{"type":"string","description":"The password for HTTP basic authentication. This property is required when `isOAuth` is `false`."},"privateKey":{"type":"string","description":"The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`."},"privateKeyPassword":{"type":"string","description":"The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key."},"username":{"type":"string","description":"The username for HTTP basic authentication. This property is required when `isOAuth` is `false`."}}},"slack_api_secrets":{"title":"Connector secrets properties for a Web API Slack connector","description":"Defines secrets for connectors when type is `.slack`.","required":["token"],"type":"object","properties":{"token":{"type":"string","description":"Slack bot user OAuth token."}}},"swimlane_secrets":{"title":"Connector secrets properties for a Swimlane connector","description":"Defines secrets for connectors when type is `.swimlane`.","type":"object","properties":{"apiToken":{"description":"Swimlane API authentication token.","type":"string"}}},"thehive_secrets":{"title":"Connector secrets properties for a TheHive connector","description":"Defines secrets for connectors when type is `.thehive`.","required":["apiKey"],"type":"object","properties":{"apiKey":{"type":"string","description":"The API key for authentication in TheHive."}}},"tines_secrets":{"title":"Connector secrets properties for a Tines connector","description":"Defines secrets for connectors when type is `.tines`.","type":"object","required":["email","token"],"properties":{"email":{"description":"The email used to sign in to Tines.","type":"string"},"token":{"description":"The Tines API token.","type":"string"}}},"torq_secrets":{"title":"Connector secrets properties for a Torq connector","description":"Defines secrets for connectors when type is `.torq`.","type":"object","required":["token"],"properties":{"token":{"description":"The secret of the webhook authentication header.","type":"string"}}},"crt":{"title":"Certificate","type":"string","description":"If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT file."},"key":{"title":"Certificate key","type":"string","description":"If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the KEY file."},"pfx":{"title":"Personal information exchange","type":"string","description":"If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file."},"webhook_secrets":{"title":"Connector secrets properties for a Webhook connector","description":"Defines secrets for connectors when type is `.webhook`.","type":"object","properties":{"crt":{"$ref":"#/components/schemas/crt"},"key":{"$ref":"#/components/schemas/key"},"pfx":{"$ref":"#/components/schemas/pfx"},"password":{"type":"string","description":"The password for HTTP basic authentication or the passphrase for the SSL certificate files. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n"},"user":{"type":"string","description":"The username for HTTP basic authentication. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n"}}},"cases_webhook_secrets":{"title":"Connector secrets properties for Webhook - Case Management connector","type":"object","properties":{"crt":{"$ref":"#/components/schemas/crt"},"key":{"$ref":"#/components/schemas/key"},"pfx":{"$ref":"#/components/schemas/pfx"},"password":{"type":"string","description":"The password for HTTP basic authentication. If `hasAuth` is set to `true` and and `authType` is `webhook-authentication-basic`, this property is required.\n"},"user":{"type":"string","description":"The username for HTTP basic authentication. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n"}}},"xmatters_secrets":{"title":"Connector secrets properties for an xMatters connector","description":"Defines secrets for connectors when type is `.xmatters`.","type":"object","properties":{"password":{"description":"A user name for HTTP basic authentication. It is applicable only when `usesBasic` is `true`.\n","type":"string"},"secretsUrl":{"description":"The request URL for the Elastic Alerts trigger in xMatters with the API key included in the URL. It is applicable only when `usesBasic` is `false`.\n","type":"string"},"user":{"description":"A password for HTTP basic authentication. It is applicable only when `usesBasic` is `true`.\n","type":"string"}}},"defender_secrets":{"title":"Connector secrets properties for a Microsoft Defender for Endpoint connector","required":["clientSecret"],"description":"Defines secrets for connectors when type is `..microsoft_defender_endpoint`.","type":"object","properties":{"clientSecret":{"description":"The client secret for your app in the Azure portal.","type":"string"}}},"run_acknowledge_resolve_pagerduty":{"title":"PagerDuty connector parameters","description":"Test an action that acknowledges or resolves a PagerDuty alert.","type":"object","required":["dedupKey","eventAction"],"properties":{"dedupKey":{"description":"The deduplication key for the PagerDuty alert.","type":"string","maxLength":255},"eventAction":{"description":"The type of event.","type":"string","enum":["acknowledge","resolve"]}}},"run_documents":{"title":"Index connector parameters","description":"Test an action that indexes a document into Elasticsearch.","type":"object","required":["documents"],"properties":{"documents":{"type":"array","description":"The documents in JSON format for index connectors.","items":{"type":"object","additionalProperties":true}}}},"run_message_email":{"title":"Email connector parameters","description":"Test an action that sends an email message. There must be at least one recipient in `to`, `cc`, or `bcc`.\n","type":"object","required":["message","subject",{"anyOf":["to","cc","bcc"]}],"properties":{"bcc":{"type":"array","items":{"type":"string"},"description":"A list of \"blind carbon copy\" email addresses. Addresses can be specified in `user@host-name` format or in name `\u003cuser@host-name\u003e` format\n"},"cc":{"type":"array","items":{"type":"string"},"description":"A list of \"carbon copy\" email addresses. Addresses can be specified in `user@host-name` format or in name `\u003cuser@host-name\u003e` format \n"},"message":{"type":"string","description":"The email message text. Markdown format is supported."},"subject":{"type":"string","description":"The subject line of the email."},"to":{"type":"array","description":"A list of email addresses. Addresses can be specified in `user@host-name` format or in name `\u003cuser@host-name\u003e` format.\n","items":{"type":"string"}}}},"run_message_serverlog":{"title":"Server log connector parameters","description":"Test an action that writes an entry to the Kibana server log.","type":"object","required":["message"],"properties":{"level":{"type":"string","description":"The log level of the message for server log connectors.","enum":["debug","error","fatal","info","trace","warn"],"default":"info"},"message":{"type":"string","description":"The message for server log connectors."}}},"run_message_slack":{"title":"Slack connector parameters","description":"Test an action that sends a message to Slack. It is applicable only when the connector type is `.slack`.\n","type":"object","required":["message"],"properties":{"message":{"type":"string","description":"The Slack message text, which cannot contain Markdown, images, or other advanced formatting."}}},"run_trigger_pagerduty":{"title":"PagerDuty connector parameters","description":"Test an action that triggers a PagerDuty alert.","type":"object","required":["eventAction"],"properties":{"class":{"description":"The class or type of the event.","type":"string","example":"cpu load"},"component":{"description":"The component of the source machine that is responsible for the event.","type":"string","example":"eth0"},"customDetails":{"description":"Additional details to add to the event.","type":"object"},"dedupKey":{"description":"All actions sharing this key will be associated with the same PagerDuty alert. This value is used to correlate trigger and resolution.\n","type":"string","maxLength":255},"eventAction":{"description":"The type of event.","type":"string","enum":["trigger"]},"group":{"description":"The logical grouping of components of a service.","type":"string","example":"app-stack"},"links":{"description":"A list of links to add to the event.","type":"array","items":{"type":"object","properties":{"href":{"description":"The URL for the link.","type":"string"},"text":{"description":"A plain text description of the purpose of the link.","type":"string"}}}},"severity":{"description":"The severity of the event on the affected system.","type":"string","enum":["critical","error","info","warning"],"default":"info"},"source":{"description":"The affected system, such as a hostname or fully qualified domain name. Defaults to the Kibana saved object id of the action.\n","type":"string"},"summary":{"description":"A summery of the event.","type":"string","maxLength":1024},"timestamp":{"description":"An ISO-8601 timestamp that indicates when the event was detected or generated.","type":"string","format":"date-time"}}},"run_addevent":{"title":"The addEvent subaction","type":"object","required":["subAction"],"description":"The `addEvent` subaction for ServiceNow ITOM connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["addEvent"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","properties":{"additional_info":{"type":"string","description":"Additional information about the event."},"description":{"type":"string","description":"The details about the event."},"event_class":{"type":"string","description":"A specific instance of the source."},"message_key":{"type":"string","description":"All actions sharing this key are associated with the same ServiceNow alert. The default value is `\u003crule ID\u003e:\u003calert instance ID\u003e`."},"metric_name":{"type":"string","description":"The name of the metric."},"node":{"type":"string","description":"The host that the event was triggered for."},"resource":{"type":"string","description":"The name of the resource."},"severity":{"type":"string","description":"The severity of the event."},"source":{"type":"string","description":"The name of the event source type."},"time_of_event":{"type":"string","description":"The time of the event."},"type":{"type":"string","description":"The type of event."}}}}},"run_closealert":{"title":"The closeAlert subaction","type":"object","required":["subAction","subActionParams"],"description":"The `closeAlert` subaction for Opsgenie connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["closeAlert"]},"subActionParams":{"type":"object","required":["alias"],"properties":{"alias":{"type":"string","description":"The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert."},"note":{"type":"string","description":"Additional information for the alert."},"source":{"type":"string","description":"The display name for the source of the alert."},"user":{"type":"string","description":"The display name for the owner."}}}}},"run_closeincident":{"title":"The closeIncident subaction","type":"object","required":["subAction","subActionParams"],"description":"The `closeIncident` subaction for ServiceNow ITSM connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["closeIncident"]},"subActionParams":{"type":"object","required":["incident"],"properties":{"incident":{"type":"object","anyOf":[{"required":["correlation_id"]},{"required":["externalId"]}],"properties":{"correlation_id":{"type":"string","nullable":true,"description":"An identifier that is assigned to the incident when it is created by the connector. NOTE: If you use the default value and the rule generates multiple alerts that use the same alert IDs, the latest open incident for this correlation ID is closed unless you specify the external ID.\n","maxLength":100,"default":"{{rule.id}}:{{alert.id}}"},"externalId":{"type":"string","nullable":true,"description":"The unique identifier (`incidentId`) for the incident in ServiceNow."}}}}}}},"run_createalert":{"title":"The createAlert subaction","type":"object","required":["subAction","subActionParams"],"description":"The `createAlert` subaction for Opsgenie and TheHive connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["createAlert"]},"subActionParams":{"type":"object","properties":{"actions":{"type":"array","description":"The custom actions available to the alert in Opsgenie connectors.","items":{"type":"string"}},"alias":{"type":"string","description":"The unique identifier used for alert deduplication in Opsgenie."},"description":{"type":"string","description":"A description that provides detailed information about the alert."},"details":{"type":"object","description":"The custom properties of the alert in Opsgenie connectors.","additionalProperties":true,"example":{"key1":"value1","key2":"value2"}},"entity":{"type":"string","description":"The domain of the alert in Opsgenie connectors. For example, the application or server name."},"message":{"type":"string","description":"The alert message in Opsgenie connectors."},"note":{"type":"string","description":"Additional information for the alert in Opsgenie connectors."},"priority":{"type":"string","description":"The priority level for the alert in Opsgenie connectors.","enum":["P1","P2","P3","P4","P5"]},"responders":{"type":"array","description":"The entities to receive notifications about the alert in Opsgenie connectors. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required.\n","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier for the entity."},"name":{"type":"string","description":"The name of the entity."},"type":{"type":"string","description":"The type of responders, in this case `escalation`.","enum":["escalation","schedule","team","user"]},"username":{"type":"string","description":"A valid email address for the user."}}}},"severity":{"type":"integer","minimum":1,"maximum":4,"description":"The severity of the incident for TheHive connectors. The value ranges from 1 (low) to 4 (critical) with a default value of 2 (medium).\n"},"source":{"type":"string","description":"The display name for the source of the alert in Opsgenie and TheHive connectors."},"sourceRef":{"type":"string","description":"A source reference for the alert in TheHive connectors."},"tags":{"type":"array","description":"The tags for the alert in Opsgenie and TheHive connectors.","items":{"type":"string"}},"title":{"type":"string","description":"A title for the incident for TheHive connectors. It is used for searching the contents of the knowledge base.\n"},"tlp":{"type":"integer","minimum":0,"maximum":4,"default":2,"description":"The traffic light protocol designation for the incident in TheHive connectors. Valid values include: 0 (clear), 1 (green), 2 (amber), 3 (amber and strict), and 4 (red).\n"},"type":{"type":"string","description":"The type of alert in TheHive connectors."},"user":{"type":"string","description":"The display name for the owner."},"visibleTo":{"type":"array","description":"The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required.","items":{"type":"object","required":["type"],"properties":{"id":{"type":"string","description":"The identifier for the entity."},"name":{"type":"string","description":"The name of the entity."},"type":{"type":"string","description":"Valid values are `team` and `user`.","enum":["team","user"]},"username":{"type":"string","description":"The user name. This property is required only when the `type` is `user`."}}}}}}}},"run_fieldsbyissuetype":{"title":"The fieldsByIssueType subaction","type":"object","required":["subAction","subActionParams"],"description":"The `fieldsByIssueType` subaction for Jira connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["fieldsByIssueType"]},"subActionParams":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The Jira issue type identifier.","example":10024}}}}},"run_getagentdetails":{"title":"The getAgentDetails subaction","type":"object","required":["subAction","subActionParams"],"description":"The `getAgentDetails` subaction for CrowdStrike connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getAgentDetails"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","required":["ids"],"properties":{"ids":{"type":"array","description":"An array of CrowdStrike agent identifiers.","items":{"type":"string"}}}}}},"run_getagents":{"title":"The getAgents subaction","type":"object","required":["subAction"],"description":"The `getAgents` subaction for SentinelOne connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getAgents"]}}},"run_getchoices":{"title":"The getChoices subaction","type":"object","required":["subAction","subActionParams"],"description":"The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getChoices"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","required":["fields"],"properties":{"fields":{"type":"array","description":"An array of fields.","items":{"type":"string"}}}}}},"run_getfields":{"title":"The getFields subaction","type":"object","required":["subAction"],"description":"The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getFields"]}}},"run_getincident":{"title":"The getIncident subaction","type":"object","description":"The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors.","required":["subAction","subActionParams"],"properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getIncident"]},"subActionParams":{"type":"object","required":["externalId"],"properties":{"externalId":{"type":"string","description":"The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier.","example":71778}}}}},"run_issue":{"title":"The issue subaction","type":"object","required":["subAction"],"description":"The `issue` subaction for Jira connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["issue"]},"subActionParams":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The Jira issue identifier.","example":71778}}}}},"run_issues":{"title":"The issues subaction","type":"object","required":["subAction","subActionParams"],"description":"The `issues` subaction for Jira connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["issues"]},"subActionParams":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"The title of the Jira issue."}}}}},"run_issuetypes":{"title":"The issueTypes subaction","type":"object","required":["subAction"],"description":"The `issueTypes` subaction for Jira connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["issueTypes"]}}},"run_postmessage":{"title":"The postMessage subaction","type":"object","description":"Test an action that sends a message to Slack. It is applicable only when the connector type is `.slack_api`.\n","required":["subAction","subActionParams"],"properties":{"subAction":{"type":"string","description":"The action to test.","enum":["postMessage"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","properties":{"channelIds":{"type":"array","maxItems":1,"description":"The Slack channel identifier, which must be one of the `allowedChannels` in the connector configuration.\n","items":{"type":"string"}},"channels":{"type":"array","deprecated":true,"description":"The name of a channel that your Slack app has access to.\n","maxItems":1,"items":{"type":"string"}},"text":{"type":"string","description":"The Slack message text. If it is a Slack webhook connector, the text cannot contain Markdown, images, or other advanced formatting. If it is a Slack web API connector, it can contain either plain text or block kit messages.\n","minLength":1}}}}},"run_pushtoservice":{"title":"The pushToService subaction","type":"object","required":["subAction","subActionParams"],"description":"The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, Swimlane, TheHive, and Webhook - Case Management connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["pushToService"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","properties":{"comments":{"type":"array","description":"Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, Swimlane, or TheHive.","items":{"type":"object","properties":{"comment":{"type":"string","description":"A comment related to the incident. For example, describe how to troubleshoot the issue."},"commentId":{"type":"integer","description":"A unique identifier for the comment."}}}},"incident":{"type":"object","description":"Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, Swimlane, or TheHive incident.","properties":{"additional_fields":{"type":"string","nullable":true,"maxLength":20,"description":"Additional fields for ServiceNow ITSM and ServiveNow SecOps connectors. The fields must exist in the Elastic ServiceNow application and must be specified in JSON format.\n"},"alertId":{"type":"string","description":"The alert identifier for Swimlane connectors."},"caseId":{"type":"string","description":"The case identifier for the incident for Swimlane connectors."},"caseName":{"type":"string","description":"The case name for the incident for Swimlane connectors."},"category":{"type":"string","description":"The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors."},"correlation_display":{"type":"string","description":"A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors."},"correlation_id":{"type":"string","description":"The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert.\n"},"description":{"type":"string","description":"The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, Swimlane, TheHive, and Webhook - Case Management connectors."},"dest_ip":{"description":"A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"externalId":{"type":"string","description":"The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created.\n"},"id":{"type":"string","description":"The external case identifier for Webhook - Case Management connectors."},"impact":{"type":"string","description":"The impact of the incident for ServiceNow ITSM connectors."},"issueType":{"type":"integer","description":"The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`."},"labels":{"type":"array","items":{"type":"string"},"description":"The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces.\n"},"malware_hash":{"description":"A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"malware_url":{"type":"string","description":"A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"otherFields":{"type":"object","additionalProperties":true,"maxProperties":20,"description":"Custom field identifiers and their values for Jira connectors.\n"},"parent":{"type":"string","description":"The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues."},"priority":{"type":"string","description":"The priority of the incident in Jira and ServiceNow SecOps connectors."},"ruleName":{"type":"string","description":"The rule name for Swimlane connectors."},"severity":{"type":"integer","description":"The severity of the incident for ServiceNow ITSM, Swimlane, and TheHive connectors. In TheHive connectors, the severity value ranges from 1 (low) to 4 (critical) with a default value of 2 (medium).\n"},"short_description":{"type":"string","description":"A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base.\n"},"source_ip":{"description":"A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"status":{"type":"string","description":"The status of the incident for Webhook - Case Management connectors."},"subcategory":{"type":"string","description":"The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors."},"summary":{"type":"string","description":"A summary of the incident for Jira connectors."},"tags":{"type":"array","items":{"type":"string"},"description":"A list of tags for TheHive and Webhook - Case Management connectors."},"title":{"type":"string","description":"A title for the incident for Jira, TheHive, and Webhook - Case Management connectors. It is used for searching the contents of the knowledge base.\n"},"tlp":{"type":"integer","minimum":0,"maximum":4,"default":2,"description":"The traffic light protocol designation for the incident in TheHive connectors. Valid values include: 0 (clear), 1 (green), 2 (amber), 3 (amber and strict), and 4 (red).\n"},"urgency":{"type":"string","description":"The urgency of the incident for ServiceNow ITSM connectors."}}}}}}},"run_validchannelid":{"title":"The validChannelId subaction","type":"object","description":"Retrieves information about a valid Slack channel identifier. It is applicable only when the connector type is `.slack_api`.\n","required":["subAction","subActionParams"],"properties":{"subAction":{"type":"string","description":"The action to test.","enum":["validChannelId"]},"subActionParams":{"type":"object","required":["channelId"],"properties":{"channelId":{"type":"string","description":"The Slack channel identifier.","example":"C123ABC456"}}}}},"params_property_apm_anomaly":{"required":["windowSize","windowUnit","environment","anomalySeverityType"],"properties":{"serviceName":{"type":"string","description":"Filter the rule to apply to a specific service name."},"transactionType":{"type":"string","description":"Filter the rule to apply to a specific transaction type."},"windowSize":{"type":"number","example":6,"description":"The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n"},"windowUnit":{"type":"string","description":"The type of units for the time window. For example: minutes, hours, or days.\n","enum":["m","h","d"]},"environment":{"type":"string","description":"Filter the rule to apply to a specific environment."},"anomalySeverityType":{"type":"string","description":"The severity of anomalies that will generate alerts: critical, major, minor, or warning.\n","enum":["critical","major","minor","warning"]}}},"params_property_apm_error_count":{"required":["windowSize","windowUnit","threshold","environment"],"properties":{"serviceName":{"type":"string","description":"Filter the errors coming from your application to apply the rule to a specific service."},"windowSize":{"type":"number","description":"The time frame in which the errors must occur (in `windowUnit` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n","example":6},"windowUnit":{"type":"string","description":"The type of units for the time window: minutes, hours, or days.\n","enum":["m","h","d"]},"environment":{"type":"string","description":"Filter the errors coming from your application to apply the rule to a specific environment."},"threshold":{"type":"number","description":"The error count threshold."},"groupBy":{"type":"array","default":["service.name","service.environment"],"uniqueItems":true,"items":{"type":"string","enum":["service.name","service.environment","transaction.name","error.grouping_key"]},"description":"Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.\n"},"errorGroupingKey":{"type":"string","description":"Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.\n"}}},"params_property_apm_transaction_duration":{"required":["windowSize","windowUnit","threshold","environment","aggregationType"],"properties":{"serviceName":{"type":"string","description":"Filter the rule to apply to a specific service."},"transactionType":{"type":"string","description":"Filter the rule to apply to a specific transaction type."},"transactionName":{"type":"string","description":"Filter the rule to apply to a specific transaction name."},"windowSize":{"type":"number","description":"The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n","example":6},"windowUnit":{"type":"string","description":"The type of units for the time window. For example: minutes, hours, or days.\n","enum":["m","h","d"]},"environment":{"type":"string","description":"Filter the rule to apply to a specific environment."},"threshold":{"type":"number","description":"The latency threshold value."},"groupBy":{"type":"array","default":["service.name","service.environment","transaction.type"],"uniqueItems":true,"items":{"type":"string","enum":["service.name","service.environment","transaction.type","transaction.name"]},"description":"Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.\n"},"aggregationType":{"type":"string","enum":["avg","95th","99th"],"description":"The type of aggregation to perform."}}},"params_property_apm_transaction_error_rate":{"required":["windowSize","windowUnit","threshold","environment"],"properties":{"serviceName":{"type":"string","description":"The service name from APM"},"transactionType":{"type":"string","description":"The transaction type from APM"},"transactionName":{"type":"string","description":"The transaction name from APM"},"windowSize":{"type":"number","description":"The window size","example":6},"windowUnit":{"type":"string","description":"The window size unit","enum":["m","h","d"]},"environment":{"type":"string","description":"The environment from APM"},"threshold":{"type":"number","description":"The error rate threshold value"},"groupBy":{"type":"array","default":["service.name","service.environment","transaction.type"],"uniqueItems":true,"items":{"type":"string","enum":["service.name","service.environment","transaction.type","transaction.name"]}}}},"aggfield":{"description":"The name of the numeric field that is used in the aggregation. This property is required when `aggType` is `avg`, `max`, `min` or `sum`.\n","type":"string"},"aggtype":{"description":"The type of aggregation to perform.","type":"string","enum":["avg","count","max","min","sum"],"default":"count"},"excludehitsfrompreviousrun":{"description":"Indicates whether to exclude matches from previous runs. If `true`, you can avoid alert duplication by excluding documents that have already been detected by the previous rule run. This option is not available when a grouping field is specified.\n","type":"boolean"},"groupby":{"description":"Indicates whether the aggregation is applied over all documents (`all`) or split into groups (`top`) using a grouping field (`termField`). If grouping is used, an alert will be created for each group when it exceeds the threshold; only the top groups (up to `termSize` number of groups) are checked.\n","type":"string","enum":["all","top"],"default":"all"},"size":{"description":"The number of documents to pass to the configured actions when the threshold condition is met.\n","type":"integer"},"termfield":{"description":"The names of up to four fields that are used for grouping the aggregation. This property is required when `groupBy` is `top`.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":4}]},"termsize":{"description":"This property is required when `groupBy` is `top`. It specifies the number of groups to check against the threshold and therefore limits the number of alerts on high cardinality fields.\n","type":"integer"},"threshold":{"description":"The threshold value that is used with the `thresholdComparator`. If the `thresholdComparator` is `between` or `notBetween`, you must specify the boundary values.\n","type":"array","items":{"type":"integer","example":4000}},"thresholdcomparator":{"description":"The comparison function for the threshold. For example, \"is above\", \"is above or equals\", \"is below\", \"is below or equals\", \"is between\", and \"is not between\".","type":"string","enum":["\u003e","\u003e=","\u003c","\u003c=","between","notBetween"],"example":"\u003e"},"timefield":{"description":"The field that is used to calculate the time window.","type":"string"},"timewindowsize":{"description":"The size of the time window (in `timeWindowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n","type":"integer","example":5},"timewindowunit":{"description":"The type of units for the time window: seconds, minutes, hours, or days.\n","type":"string","enum":["s","m","h","d"],"example":"m"},"params_es_query_dsl_rule":{"title":"Elasticsearch DSL query rule params","description":"An Elasticsearch query rule can run a query defined in Elasticsearch Query DSL and compare the number of matches to a configured threshold. These parameters are appropriate when `rule_type_id` is `.es-query`.\n","type":"object","required":["esQuery","index","threshold","thresholdComparator","timeField","timeWindowSize","timeWindowUnit"],"properties":{"aggField":{"$ref":"#/components/schemas/aggfield"},"aggType":{"$ref":"#/components/schemas/aggtype"},"esQuery":{"description":"The query definition, which uses Elasticsearch Query DSL.","type":"string"},"excludeHitsFromPreviousRun":{"$ref":"#/components/schemas/excludehitsfrompreviousrun"},"groupBy":{"$ref":"#/components/schemas/groupby"},"index":{"description":"The indices to query.","oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"searchType":{"description":"The type of query, in this case a query that uses Elasticsearch Query DSL.","type":"string","enum":["esQuery"],"default":"esQuery","example":"esQuery"},"size":{"$ref":"#/components/schemas/size"},"termField":{"$ref":"#/components/schemas/termfield"},"termSize":{"$ref":"#/components/schemas/termsize"},"threshold":{"$ref":"#/components/schemas/threshold"},"thresholdComparator":{"$ref":"#/components/schemas/thresholdcomparator"},"timeField":{"$ref":"#/components/schemas/timefield"},"timeWindowSize":{"$ref":"#/components/schemas/timewindowsize"},"timeWindowUnit":{"$ref":"#/components/schemas/timewindowunit"}}},"params_es_query_esql_rule":{"title":"Elasticsearch ES|QL query rule params","description":"An Elasticsearch query rule can run an ES|QL query and compare the number of matches to a configured threshold. These parameters are appropriate when `rule_type_id` is `.es-query`.\n","type":"object","required":["esqlQuery","searchType","size","threshold","thresholdComparator","timeWindowSize","timeWindowUnit"],"properties":{"aggField":{"$ref":"#/components/schemas/aggfield"},"aggType":{"$ref":"#/components/schemas/aggtype"},"esqlQuery":{"type":"object","required":["esql"],"properties":{"esql":{"description":"The query definition, which uses Elasticsearch Query Language.","type":"string"}}},"excludeHitsFromPreviousRun":{"$ref":"#/components/schemas/excludehitsfrompreviousrun"},"groupBy":{"$ref":"#/components/schemas/groupby"},"searchType":{"description":"The type of query, in this case a query that uses Elasticsearch Query Language (ES|QL).","type":"string","enum":["esqlQuery"],"example":"esqlQuery"},"size":{"type":"integer","description":"When `searchType` is `esqlQuery`, this property is required but it does not affect the rule behavior.\n","example":0},"termSize":{"$ref":"#/components/schemas/termsize"},"threshold":{"type":"array","items":{"type":"integer","minimum":0,"maximum":0},"description":"The threshold value that is used with the `thresholdComparator`. When `searchType` is `esqlQuery`, this property is required and must be set to zero.\n"},"thresholdComparator":{"type":"string","description":"The comparison function for the threshold. When `searchType` is `esqlQuery`, this property is required and must be set to \"\u003e\". Since the `threshold` value must be `0`, the result is that an alert occurs whenever the query returns results.\n","enum":["\u003e"],"example":"\u003e"},"timeField":{"$ref":"#/components/schemas/timefield"},"timeWindowSize":{"$ref":"#/components/schemas/timewindowsize"},"timeWindowUnit":{"$ref":"#/components/schemas/timewindowunit"}}},"filter":{"type":"object","description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","properties":{"meta":{"type":"object","properties":{"alias":{"type":"string","nullable":true},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{"type":"object"},"type":{"type":"string"},"value":{"type":"string"}}},"query":{"type":"object"},"$state":{"type":"object"}}},"params_es_query_kql_rule":{"title":"Elasticsearch KQL query rule params","description":"An Elasticsearch query rule can run a query defined in KQL or Lucene and compare the number of matches to a configured threshold. These parameters are appropriate when `rule_type_id` is `.es-query`.\n","type":"object","required":["searchType","size","threshold","thresholdComparator","timeWindowSize","timeWindowUnit"],"properties":{"aggField":{"$ref":"#/components/schemas/aggfield"},"aggType":{"$ref":"#/components/schemas/aggtype"},"excludeHitsFromPreviousRun":{"$ref":"#/components/schemas/excludehitsfrompreviousrun"},"groupBy":{"$ref":"#/components/schemas/groupby"},"searchConfiguration":{"description":"The query definition, which uses KQL or Lucene to fetch the documents from Elasticsearch.","type":"object","properties":{"filter":{"type":"array","items":{"$ref":"#/components/schemas/filter"}},"index":{"description":"The indices to query.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"query":{"type":"object","properties":{"language":{"type":"string","example":"kuery"},"query":{"type":"string"}}}}},"searchType":{"description":"The type of query, in this case a text-based query that uses KQL or Lucene.","type":"string","enum":["searchSource"],"example":"searchSource"},"size":{"$ref":"#/components/schemas/size"},"termField":{"$ref":"#/components/schemas/termfield"},"termSize":{"$ref":"#/components/schemas/termsize"},"threshold":{"$ref":"#/components/schemas/threshold"},"thresholdComparator":{"$ref":"#/components/schemas/thresholdcomparator"},"timeField":{"$ref":"#/components/schemas/timefield"},"timeWindowSize":{"$ref":"#/components/schemas/timewindowsize"},"timeWindowUnit":{"$ref":"#/components/schemas/timewindowunit"}}},"params_index_threshold_rule":{"title":"Index threshold rule params","description":"An index threshold rule runs an Elasticsearch query, aggregates field values from documents, compares them to threshold values, and schedules actions to run when the thresholds are met. These parameters are appropriate when `rule_type_id` is `.index-threshold`.","type":"object","required":["index","threshold","thresholdComparator","timeField","timeWindowSize","timeWindowUnit"],"properties":{"aggField":{"$ref":"#/components/schemas/aggfield"},"aggType":{"$ref":"#/components/schemas/aggtype"},"filterKuery":{"description":"A KQL expression thats limits the scope of alerts.","type":"string"},"groupBy":{"$ref":"#/components/schemas/groupby"},"index":{"description":"The indices to query.","type":"array","items":{"type":"string"}},"termField":{"$ref":"#/components/schemas/termfield"},"termSize":{"$ref":"#/components/schemas/termsize"},"threshold":{"$ref":"#/components/schemas/threshold"},"thresholdComparator":{"$ref":"#/components/schemas/thresholdcomparator"},"timeField":{"$ref":"#/components/schemas/timefield"},"timeWindowSize":{"$ref":"#/components/schemas/timewindowsize"},"timeWindowUnit":{"$ref":"#/components/schemas/timewindowunit"}}},"params_property_infra_inventory":{"properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["count","cpu","diskLatency","load","memory","memoryTotal","tx","rx","logRate","diskIOReadBytes","diskIOWriteBytes","s3TotalRequests","s3NumberOfObjects","s3BucketSize","s3DownloadBytes","s3UploadBytes","rdsConnections","rdsQueriesExecuted","rdsActiveTransactions","rdsLatency","sqsMessagesVisible","sqsMessagesDelayed","sqsMessagesSent","sqsMessagesEmpty","sqsOldestMessage","custom"]},"timeSize":{"type":"number"},"timeUnit":{"type":"string","enum":["s","m","h","d"]},"sourceId":{"type":"string"},"threshold":{"type":"array","items":{"type":"number"}},"comparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"customMetric":{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"field":{"type":"string"},"aggregation":{"type":"string","enum":["avg","max","min","rate"]},"id":{"type":"string"},"label":{"type":"string"}}},"warningThreshold":{"type":"array","items":{"type":"number"}},"warningComparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]}}}},"filterQuery":{"type":"string"},"filterQueryText":{"type":"string"},"nodeType":{"type":"string","enum":["host","pod","container","awsEC2","awsS3","awsSQS","awsRDS"]},"sourceId":{"type":"string"},"alertOnNoData":{"type":"boolean"}}},"params_property_log_threshold":{"oneOf":[{"title":"Count","type":"object","required":["count","timeSize","timeUnit","logView"],"properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","example":"my.field"},"comparator":{"type":"string","enum":["more than","more than or equals","less than","less than or equals","equals","does not equal","matches","does not match","matches phrase","does not match phrase"]},"value":{"oneOf":[{"type":"number","example":42},{"type":"string","example":"value"}]}}}},"count":{"type":"object","properties":{"comparator":{"type":"string","enum":["more than","more than or equals","less than","less than or equals","equals","does not equal","matches","does not match","matches phrase","does not match phrase"]},"value":{"type":"number","example":100}}},"timeSize":{"type":"number","example":6},"timeUnit":{"type":"string","enum":["s","m","h","d"]},"logView":{"type":"object","properties":{"logViewId":{"type":"string"},"type":{"type":"string","enum":["log-view-reference"],"example":"log-view-reference"}}},"groupBy":{"type":"array","items":{"type":"string"}}}},{"title":"Ratio","type":"object","required":["count","timeSize","timeUnit","logView"],"properties":{"criteria":{"type":"array","items":{"minItems":2,"maxItems":2,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","example":"my.field"},"comparator":{"type":"string","enum":["more than","more than or equals","less than","less than or equals","equals","does not equal","matches","does not match","matches phrase","does not match phrase"]},"value":{"oneOf":[{"type":"number","example":42},{"type":"string","example":"value"}]}}}}},"count":{"type":"object","properties":{"comparator":{"type":"string","enum":["more than","more than or equals","less than","less than or equals","equals","does not equal","matches","does not match","matches phrase","does not match phrase"]},"value":{"type":"number","example":100}}},"timeSize":{"type":"number","example":6},"timeUnit":{"type":"string","enum":["s","m","h","d"]},"logView":{"type":"object","properties":{"logViewId":{"type":"string"},"type":{"type":"string","enum":["log-view-reference"],"example":"log-view-reference"}}},"groupBy":{"type":"array","items":{"type":"string"}}}}]},"params_property_infra_metric_threshold":{"properties":{"criteria":{"type":"array","items":{"oneOf":[{"title":"non count criterion","type":"object","properties":{"threshold":{"type":"array","items":{"type":"number"},"description":"The threshold value that is used with the `comparator`. If the `comparator` is `between`, you must specify the boundary values.\n"},"comparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"],"description":"The comparison function for the threshold. For example, \"is above\", \"is above or equals\", \"is below\", \"is below or equals\", \"is between\", and \"outside\".\n"},"timeUnit":{"type":"string","enum":["s","m","h","d"],"description":"The type of units for the time window: seconds, minutes, hours, or days.\n"},"timeSize":{"type":"number","description":"The size of the time window (in `timeUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n"},"warningThreshold":{"type":"array","items":{"type":"number"},"description":"The threshold value that is used with the `warningComparator`. If the `warningComparator` is `between`, you must specify the boundary values.\n"},"warningComparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"metric":{"type":"string"},"aggType":{"type":"string","enum":["avg","max","min","cardinality","rate","count","sum","p95","p99","custom"]}}},{"title":"count criterion","type":"object","properties":{"threshold":{"type":"array","items":{"type":"number"}},"comparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"timeUnit":{"type":"string","enum":["s","m","h","d"],"description":"The type of units for the time window: seconds, minutes, hours, or days.\n"},"timeSize":{"type":"number","description":"The size of the time window (in `timeUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n"},"warningThreshold":{"type":"array","items":{"type":"number"}},"warningComparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"aggType":{"type":"string","enum":["count"]}}},{"title":"custom criterion","type":"object","properties":{"threshold":{"type":"array","items":{"type":"number"}},"comparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"timeUnit":{"type":"string","enum":["s","m","h","d"],"description":"The type of units for the time window: seconds, minutes, hours, or days.\n"},"timeSize":{"type":"number","description":"The size of the time window (in `timeUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n"},"warningThreshold":{"type":"array","items":{"type":"number"}},"warningComparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"aggType":{"type":"string","enum":["custom"]},"customMetric":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"name":{"type":"string"},"aggType":{"type":"string","enum":["avg","sum","max","min","cardinality"],"description":"An aggregation to gather data for the rule. For example, find the average, highest or lowest value of a numeric field. Or use a cardinality aggregation to find the approximate number of unique values in a field. \n"},"field":{"type":"string"}}},{"type":"object","properties":{"name":{"type":"string"},"aggType":{"type":"string","enum":["count"]},"filter":{"type":"string"}}}]}},"equation":{"type":"string"},"label":{"type":"string"}}}]}},"groupBy":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Create an alert for every unique value of the specified fields. For example, you can create a rule per host or every mount point of each host.\nIMPORTANT: If you include the same field in both the `filterQuery` and `groupBy`, you might receive fewer results than you expect. For example, if you filter by `cloud.region: us-east`, grouping by `cloud.region` will have no effect because the filter query can match only one region.\n"},"filterQuery":{"type":"string","description":"A query that limits the scope of the rule. The rule evaluates only metric data that matches the query.\n"},"sourceId":{"type":"string"},"alertOnNoData":{"type":"boolean","description":"If true, an alert occurs if the metrics do not report any data over the expected period or if the query fails."},"alertOnGroupDisappear":{"type":"boolean","description":"If true, an alert occurs if a group that previously reported metrics does not report them again over the expected time period. This check is not recommended for dynamically scaling infrastructures that might rapidly start and stop nodes automatically.\n"}}},"params_property_slo_burn_rate":{"properties":{"sloId":{"description":"The SLO identifier used by the rule","type":"string","example":"8853df00-ae2e-11ed-90af-09bb6422b258"},"burnRateThreshold":{"description":"The burn rate threshold used to trigger the alert","type":"number","example":14.4},"maxBurnRateThreshold":{"description":"The maximum burn rate threshold value defined by the SLO error budget","type":"number","example":168},"longWindow":{"description":"The duration of the long window used to compute the burn rate","type":"object","properties":{"value":{"description":"The duration value","type":"number","example":6},"unit":{"description":"The duration unit","type":"string","example":"h"}}},"shortWindow":{"description":"The duration of the short window used to compute the burn rate","type":"object","properties":{"value":{"description":"The duration value","type":"number","example":30},"unit":{"description":"The duration unit","type":"string","example":"m"}}}}},"params_property_synthetics_uptime_tls":{"properties":{"search":{"type":"string"},"certExpirationThreshold":{"type":"number"},"certAgeThreshold":{"type":"number"}}},"params_property_synthetics_monitor_status":{"required":["numTimes","shouldCheckStatus","shouldCheckAvailability"],"properties":{"availability":{"type":"object","properties":{"range":{"type":"number"},"rangeUnit":{"type":"string"},"threshold":{"type":"string"}}},"filters":{"oneOf":[{"type":"string"},{"type":"object","deprecated":true,"properties":{"monitor.type":{"type":"array","items":{"type":"string"}},"observer.geo.name":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"url.port":{"type":"array","items":{"type":"string"}}}}]},"locations":{"deprecated":true,"type":"array","items":{"type":"string"}},"numTimes":{"type":"number"},"search":{"type":"string"},"shouldCheckStatus":{"type":"boolean"},"shouldCheckAvailability":{"type":"boolean"},"timerangeCount":{"type":"number"},"timerangeUnit":{"type":"string"},"timerange":{"deprecated":true,"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"version":{"type":"number"},"isAutoGenerated":{"type":"boolean"}}}},"securitySchemes":{"apiKeyAuth":{"description":"These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`\n","in":"header","name":"Authorization","type":"apiKey"},"basicAuth":{"scheme":"basic","type":"http"}}},"x-topics":[{"title":"Kibana spaces","content":"Spaces enable you to organize your dashboards and other saved objects into meaningful categories.\nYou can use the default space or create your own spaces.\n\nTo run APIs in non-default spaces, you must add `s/{space_id}/` to the path.\nFor example:\n\n```\ncurl -X GET \"http://localhost:5601/s/marketing/api/data_views\"\n```\n\nIf you use the Kibana console to send API requests, it automatically adds the appropriate space identifier.\n\nTo learn more, check out [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces).\n"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"contact":{"name":"Kibana Team"},"description":"The Kibana REST APIs enable you to manage resources such as connectors, data views, and saved objects.\nThe API calls are stateless.\nEach request that you make happens in isolation from other calls and must include all of the necessary information for Kibana to fulfill the\nrequest.\nAPI requests return JSON output, which is a format that is machine-readable and works well for automation.\n\nTo interact with Kibana APIs, use the following operations:\n\n- GET: Fetches the information.\n- PATCH: Applies partial modifications to the existing information.\n- POST: Adds new information.\n- PUT: Updates the existing information.\n- DELETE: Removes the information.\n\nYou can prepend any Kibana API endpoint with `kbn:` and run the request in **Dev Tools → Console**.\nFor example:\n\n```\nGET kbn:/api/data_views\n```\n\nFor more information about the console, refer to [Run API requests](https://www.elastic.co/docs/explore-analyze/query-filter/tools/console).\n\nNOTE: Access to internal Kibana API endpoints will be restricted in Kibana version 9.0. Please move any integrations to publicly documented APIs.\n\n## Documentation source and versions\n\nThis documentation is derived from the `main` branch of the [kibana](https://github.com/elastic/kibana) repository.\nIt is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).\n\nThis documentation contains work-in-progress information for future Elastic Stack releases.\n","title":"Kibana APIs","version":"1.0.2","x-doc-license":{"name":"Attribution-NonCommercial-NoDerivatives 4.0 International","url":"https://creativecommons.org/licenses/by-nc-nd/4.0/"},"x-feedbackLink":{"label":"Feedback","url":"https://github.com/elastic/docs-content/issues/new?assignees=\u0026labels=feedback%2Ccommunity\u0026projects=\u0026template=api-feedback.yaml\u0026title=%5BFeedback%5D%3A+"}},"servers":[{"url":"https://{kibana_url}","variables":{"kibana_url":{"default":"localhost:5601"}}}],"security":[{"apiKeyAuth":[]},{"basicAuth":[]}],"tags":[{"name":"alerting","description":"Alerting enables you to define rules, which detect complex conditions within your data. When a condition is met, the rule tracks it as an alert and runs the actions that are defined in the rule. Actions typically involve the use of connectors to interact with Kibana services or third party integrations.\n","externalDocs":{"description":"Alerting documentation","url":"https://www.elastic.co/docs/explore-analyze/alerts-cases/alerts"},"x-displayName":"Alerting"},{"description":"Adjust APM agent configuration without need to redeploy your application.\n","name":"APM agent configuration"},{"description":"Configure APM agent keys to authorize requests from APM agents to the APM Server.\n","name":"APM agent keys"},{"description":"Annotate visualizations in the APM app with significant events. Annotations enable you to easily see how events are impacting the performance of your applications.\n","name":"APM annotations"},{"description":"Create APM fleet server schema.","name":"APM server schema"},{"description":"Configure APM source maps. A source map allows minified files to be mapped back to original source code--allowing you to maintain the speed advantage of minified code, without losing the ability to quickly and easily debug your application.\nFor best results, uploading source maps should become a part of your deployment procedure, and not something you only do when you see unhelpful errors. That's because uploading source maps after errors happen won't make old errors magically readable--errors must occur again for source mapping to occur.\n","name":"APM sourcemaps"},{"description":"Cases are used to open and track issues. You can add assignees and tags to your cases, set their severity and status, and add alerts, comments, and visualizations. You can also send cases to external incident management systems by configuring connectors.\n","name":"cases","externalDocs":{"description":"Cases documentation","url":"https://www.elastic.co/docs/explore-analyze/alerts-cases/cases"},"x-displayName":"Cases"},{"name":"connectors","description":"Connectors provide a central place to store connection information for services and integrations with Elastic or third party systems. Alerting rules can use connectors to run actions when rule conditions are met.\n","externalDocs":{"description":"Connector documentation","url":"https://www.elastic.co/docs/reference/kibana/connectors-kibana"},"x-displayName":"Connectors"},{"name":"Dashboards"},{"name":"Data streams"},{"description":"Data view APIs enable you to manage data views, formerly known as Kibana index patterns.","name":"data views","x-displayName":"Data views"},{"name":"Elastic Agent actions"},{"name":"Elastic Agent binary download sources"},{"name":"Elastic Agent policies"},{"name":"Elastic Agent status"},{"name":"Elastic Agents"},{"name":"Elastic Package Manager (EPM)"},{"name":"Fleet enrollment API keys"},{"name":"Fleet internals"},{"name":"Fleet outputs"},{"name":"Fleet package policies"},{"name":"Fleet proxies"},{"name":"Fleet Server hosts"},{"name":"Fleet service tokens"},{"name":"Fleet uninstall tokens"},{"description":"Programmatically integrate with Logstash configuration management.\n\u003e warn\n\u003e Do not directly access the `.logstash` index. The structure of the `.logstash` index is subject to change, which could cause your integration to break. Instead, use the Logstash configuration management APIs.\n","externalDocs":{"description":"Centralized pipeline management","url":"https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management"},"name":"logstash","x-displayName":"Logstash configuration management"},{"name":"maintenance-window","description":"You can schedule single or recurring maintenance windows to temporarily reduce rule notifications. For example, a maintenance window prevents false alarms during planned outages.\n","externalDocs":{"description":"Maintenance window documentation","url":"https://www.elastic.co/docs/explore-analyze/alerts-cases/alerts/maintenance-windows"},"x-displayName":"Maintenance windows"},{"name":"Message Signing Service"},{"description":"Machine learning","name":"ml","x-displayName":"Machine learning"},{"name":"roles","x-displayName":"Roles","description":"Manage the roles that grant Elasticsearch and Kibana privileges.","externalDocs":{"description":"Kibana role management","url":"https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles"}},{"name":"saved objects","x-displayName":"Saved objects","description":"Export sets of saved objects that you want to import into Kibana, resolve import errors, and rotate an encryption key for encrypted saved objects with the saved objects APIs.\n\nTo manage a specific type of saved object, use the corresponding APIs.\nFor example, use:\n\n* [Data views](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-data-views)\n* [Spaces](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-spaces)\n* [Short URLs](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-short-url)\n\nWarning: Do not write documents directly to the `.kibana` index. When you write directly to the `.kibana` index, the data becomes corrupted and permanently breaks future Kibana versions\n"},{"description":"Manage and interact with Security Assistant resources.","name":"Security AI Assistant API","x-displayName":"Security AI assistant"},{"description":"Use the detections APIs to create and manage detection rules. Detection rules search events and external alerts sent to Elastic Security and generate detection alerts from any hits. Alerts are displayed on the **Alerts** page and can be assigned and triaged, using the alert status to mark them as open, closed, or acknowledged.\n\nThis API supports both key-based authentication and basic authentication.\n\nTo use key-based authentication, create an API key, then specify the key in the header of your API calls.\n\nTo use basic authentication, provide a username and password; this automatically creates an API key that matches the current user’s privileges.\n\nIn both cases, the API key is subsequently used for authorization when the rule runs.\n\u003e warn\n\u003e If the API key used for authorization has different privileges than the key that created or most recently updated a rule, the rule behavior might change.\n\n\u003e If the API key that created a rule is deleted, or the user that created the rule becomes inactive, the rule will stop running.\n\nTo create and run rules, the user must meet specific requirements for the Kibana space. Refer to the [Detections requirements](https://www.elastic.co/guide/en/security/current/detections-permissions-section.html) for a complete list of requirements.\n","name":"Security Detections API","x-displayName":"Security detections"},{"description":"Endpoint Exceptions API allows you to manage detection rule endpoint exceptions to prevent a rule from generating an alert from incoming events even when the rule's other criteria are met.","name":"Security Endpoint Exceptions API","x-displayName":"Security endpoint exceptions"},{"description":"Interact with and manage endpoints running the Elastic Defend integration.","name":"Security Endpoint Management API","x-displayName":"Security endpoint management"},{"description":"","name":"Security Entity Analytics API","x-displayName":"Security entity analytics"},{"description":"Exceptions are associated with detection and endpoint rules, and are used to prevent a rule from generating an alert from incoming events, even when the rule's other criteria are met. They can help reduce the number of false positives and prevent trusted processes and network activity from generating unnecessary alerts.\n\nExceptions are made up of:\n\n* **Exception containers**: A container for related exceptions. Generally, a single exception container contains all the exception items relevant for a subset of rules. For example, a container can be used to group together network-related exceptions that are relevant for a large number of network rules. The container can then be associated with all the relevant rules.\n* **Exception items**: The query (fields, values, and logic) used to prevent rules from generating alerts. When an exception item's query evaluates to `true`, the rule does not generate an alert.\n\nFor detection rules, you can also use lists to define rule exceptions. A list holds multiple values of the same Elasticsearch data type, such as IP addresses. These values are used to determine when an exception prevents an alert from being generated.\n\u003e info\n\u003e You cannot use lists with endpoint rule exceptions.\n\n\u003e info\n\u003e Only exception containers can be associated with rules. You cannot directly associate an exception item or a list container with a rule. To use list exceptions, create an exception item that references the relevant list container.\n\n## Exceptions requirements\n\nBefore you can start working with exceptions that use value lists, you must create the `.lists` and `.items` data streams for the relevant Kibana space. To do this, use the [Create list data streams](https://www.elastic.co/docs/api/doc/kibana/operation/operation-createlistindex) endpoint. Once these data streams are created, your role needs privileges to manage rules. For a complete list of requirements, refer to [Enable and access detections](https://www.elastic.co/guide/en/security/current/detections-permissions-section.html#enable-detections-ui).\n","name":"Security Exceptions API","x-displayName":"Security exceptions"},{"description":"Lists can be used with detection rule exceptions to define values that prevent a rule from generating alerts.\n\nLists are made up of:\n\n* **List containers**: A container for values of the same Elasticsearch data type. The following data types can be used:\n * `boolean`\n * `byte`\n * `date`\n * `date_nanos`\n * `date_range`\n * `double`\n * `double_range`\n * `float`\n * `float_range`\n * `half_float`\n * `integer`\n * `integer_range`\n * `ip`\n * `ip_range`\n * `keyword`\n * `long`\n * `long_range`\n * `short`\n * `text`\n* **List items**: The values used to determine whether the exception prevents an alert from being generated.\n\nAll list items in the same list container must be of the same data type, and each item defines a single value. For example, an IP list container named `internal-ip-addresses-southport` contains five items, where each item defines one internal IP address:\n1. `192.168.1.1`\n2. `192.168.1.3`\n3. `192.168.1.18`\n4. `192.168.1.12`\n5. `192.168.1.7`\n\nTo use these IP addresses as values for defining rule exceptions, use the Security exceptions API to [create an exception list item](https://www.elastic.co/docs/api/doc/kibana/operation/operation-createexceptionlistitem) that references the `internal-ip-addresses-southport` list.\n\u003e info\n\u003e Lists cannot be added directly to rules, nor do they define the operators used to determine when exceptions are applied (`is in list`, `is not in list`). Use an exception item to define the operator and associate it with an [exception container](https://www.elastic.co/docs/api/doc/kibana/operation/operation-createexceptionlist). You can then add the exception container to a rule's `exceptions_list` object.\n\n## Lists requirements\n\nBefore you can start using lists, you must create the `.lists` and `.items` data streams for the relevant Kibana space. To do this, use the [Create list data streams](https://www.elastic.co/docs/api/doc/kibana/operation/operation-createlistindex) endpoint. Once these data streams are created, your role needs privileges to manage rules. Refer to [Enable and access detections](https://www.elastic.co/guide/en/security/current/detections-permissions-section.html#enable-detections-ui) for a complete list of requirements.\n","name":"Security Lists API","x-displayName":"Security lists"},{"description":"Run live queries, manage packs and saved queries.","name":"Security Osquery API","x-displayName":"Security Osquery"},{"description":"You can create Timelines and Timeline templates via the API, as well as import new Timelines from an ndjson file.","name":"Security Timeline API","x-displayName":"Security timeline"},{"description":"Manage Kibana short URLs.","name":"short url","x-displayName":"Short URLs"},{"description":"SLO APIs enable you to define, manage and track service-level objectives","name":"slo","x-displayName":"Service level objectives"},{"name":"spaces","x-displayName":"Spaces","description":"Manage your Kibana spaces.","externalDocs":{"url":"https://www.elastic.co/docs/deploy-manage/manage-spaces","description":"Space overview"}},{"name":"streams","description":"Streams is a new and experimental way to manage your data in Kibana (currently experimental - expect changes).\n","x-displayName":"Streams"},{"name":"synthetics","x-displayName":"Synthetics","externalDocs":{"description":"Synthetic monitoring","url":"https://www.elastic.co/docs/solutions/observability/synthetics"}},{"name":"system","x-displayName":"System","description":"Get information about the system status, resource usage, features, and installed plugins.\n"},{"description":"Get information about the system status, resource usage, features, and installed plugins.\n","name":"system","x-displayName":"System"},{"externalDocs":{"description":"Task manager","url":"https://www.elastic.co/docs/deploy-manage/distributed-architecture/kibana-tasks-management"},"name":"task manager","x-displayName":"Task manager"},{"description":"The assistant helps you prepare for the next major version of Elasticsearch.","name":"upgrade","x-displayName":"Upgrade assistant"},{"externalDocs":{"description":"Uptime monitoring","url":"https://www.elastic.co/docs/solutions/observability/uptime"},"name":"uptime","x-displayName":"Uptime"},{"name":"user session","x-displayName":"User session management"}],"paths":{"/api/actions/connector_types":{"get":{"description":"You do not need any Kibana feature privileges to run this API.","operationId":"get-actions-connector-types","parameters":[{"description":"A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases).","in":"query","name":"feature_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getConnectorTypesServerlessResponse":{"$ref":"#/components/examples/get_connector_types_generativeai_response"}}}}}},"summary":"Get connector types","tags":["connectors"]}},"/api/actions/connector/{id}":{"delete":{"description":"WARNING: When you delete a connector, it cannot be recovered.","operationId":"delete-actions-connector-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."}},"summary":"Delete a connector","tags":["connectors"]},"get":{"operationId":"get-actions-connector-id","parameters":[{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{},"type":"object"},"connector_type_id":{"description":"The connector type identifier.","type":"string"},"id":{"description":"The identifier for the connector.","type":"string"},"is_deprecated":{"description":"Indicates whether the connector is deprecated.","type":"boolean"},"is_missing_secrets":{"description":"Indicates whether the connector is missing secrets.","type":"boolean"},"is_preconfigured":{"description":"Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ","type":"boolean"},"is_system_action":{"description":"Indicates whether the connector is used for system actions.","type":"boolean"},"name":{"description":" The name of the rule.","type":"string"}},"required":["id","name","connector_type_id","is_preconfigured","is_deprecated","is_system_action"]},"examples":{"getConnectorResponse":{"$ref":"#/components/examples/get_connector_response"}}}},"description":"Indicates a successful call."}},"summary":"Get connector information","tags":["connectors"]},"post":{"operationId":"post-actions-connector-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"connector_type_id":{"description":"The type of connector.","type":"string"},"name":{"description":"The display name for the connector.","type":"string"},"config":{"additionalProperties":{},"default":{},"description":"The connector configuration details.","oneOf":[{"$ref":"#/components/schemas/bedrock_config"},{"$ref":"#/components/schemas/crowdstrike_config"},{"$ref":"#/components/schemas/d3security_config"},{"$ref":"#/components/schemas/email_config"},{"$ref":"#/components/schemas/gemini_config"},{"$ref":"#/components/schemas/resilient_config"},{"$ref":"#/components/schemas/index_config"},{"$ref":"#/components/schemas/jira_config"},{"$ref":"#/components/schemas/genai_azure_config"},{"$ref":"#/components/schemas/genai_openai_config"},{"$ref":"#/components/schemas/opsgenie_config"},{"$ref":"#/components/schemas/pagerduty_config"},{"$ref":"#/components/schemas/sentinelone_config"},{"$ref":"#/components/schemas/servicenow_config"},{"$ref":"#/components/schemas/servicenow_itom_config"},{"$ref":"#/components/schemas/slack_api_config"},{"$ref":"#/components/schemas/swimlane_config"},{"$ref":"#/components/schemas/thehive_config"},{"$ref":"#/components/schemas/tines_config"},{"$ref":"#/components/schemas/torq_config"},{"$ref":"#/components/schemas/webhook_config"},{"$ref":"#/components/schemas/cases_webhook_config"},{"$ref":"#/components/schemas/xmatters_config"}]},"secrets":{"additionalProperties":{},"default":{},"oneOf":[{"$ref":"#/components/schemas/bedrock_secrets"},{"$ref":"#/components/schemas/crowdstrike_secrets"},{"$ref":"#/components/schemas/d3security_secrets"},{"$ref":"#/components/schemas/email_secrets"},{"$ref":"#/components/schemas/gemini_secrets"},{"$ref":"#/components/schemas/resilient_secrets"},{"$ref":"#/components/schemas/jira_secrets"},{"$ref":"#/components/schemas/defender_secrets"},{"$ref":"#/components/schemas/teams_secrets"},{"$ref":"#/components/schemas/genai_secrets"},{"$ref":"#/components/schemas/opsgenie_secrets"},{"$ref":"#/components/schemas/pagerduty_secrets"},{"$ref":"#/components/schemas/sentinelone_secrets"},{"$ref":"#/components/schemas/servicenow_secrets"},{"$ref":"#/components/schemas/slack_api_secrets"},{"$ref":"#/components/schemas/swimlane_secrets"},{"$ref":"#/components/schemas/thehive_secrets"},{"$ref":"#/components/schemas/tines_secrets"},{"$ref":"#/components/schemas/torq_secrets"},{"$ref":"#/components/schemas/webhook_secrets"},{"$ref":"#/components/schemas/cases_webhook_secrets"},{"$ref":"#/components/schemas/xmatters_secrets"}]}},"required":["name","connector_type_id"]},"examples":{"createEmailConnectorRequest":{"$ref":"#/components/examples/create_email_connector_request"},"createIndexConnectorRequest":{"$ref":"#/components/examples/create_index_connector_request"},"createWebhookConnectorRequest":{"$ref":"#/components/examples/create_webhook_connector_request"},"createXmattersConnectorRequest":{"$ref":"#/components/examples/create_xmatters_connector_request"}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{},"type":"object"},"connector_type_id":{"description":"The connector type identifier.","type":"string"},"id":{"description":"The identifier for the connector.","type":"string"},"is_deprecated":{"description":"Indicates whether the connector is deprecated.","type":"boolean"},"is_missing_secrets":{"description":"Indicates whether the connector is missing secrets.","type":"boolean"},"is_preconfigured":{"description":"Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ","type":"boolean"},"is_system_action":{"description":"Indicates whether the connector is used for system actions.","type":"boolean"},"name":{"description":" The name of the rule.","type":"string"}},"required":["id","name","connector_type_id","is_preconfigured","is_deprecated","is_system_action"]},"examples":{"createEmailConnectorResponse":{"$ref":"#/components/examples/create_email_connector_response"},"createIndexConnectorResponse":{"$ref":"#/components/examples/create_index_connector_response"},"createWebhookConnectorResponse":{"$ref":"#/components/examples/create_webhook_connector_response"},"createXmattersConnectorResponse":{"$ref":"#/components/examples/get_connector_response"}}}},"description":"Indicates a successful call."}},"summary":"Create a connector","tags":["connectors"]},"put":{"operationId":"put-actions-connector-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"description":"The display name for the connector.","type":"string"},"config":{"additionalProperties":{},"default":{},"description":"The connector configuration details.","oneOf":[{"$ref":"#/components/schemas/bedrock_config"},{"$ref":"#/components/schemas/crowdstrike_config"},{"$ref":"#/components/schemas/d3security_config"},{"$ref":"#/components/schemas/email_config"},{"$ref":"#/components/schemas/gemini_config"},{"$ref":"#/components/schemas/resilient_config"},{"$ref":"#/components/schemas/index_config"},{"$ref":"#/components/schemas/jira_config"},{"$ref":"#/components/schemas/defender_config"},{"$ref":"#/components/schemas/genai_azure_config"},{"$ref":"#/components/schemas/genai_openai_config"},{"$ref":"#/components/schemas/opsgenie_config"},{"$ref":"#/components/schemas/pagerduty_config"},{"$ref":"#/components/schemas/sentinelone_config"},{"$ref":"#/components/schemas/servicenow_config"},{"$ref":"#/components/schemas/servicenow_itom_config"},{"$ref":"#/components/schemas/slack_api_config"},{"$ref":"#/components/schemas/swimlane_config"},{"$ref":"#/components/schemas/thehive_config"},{"$ref":"#/components/schemas/tines_config"},{"$ref":"#/components/schemas/torq_config"},{"$ref":"#/components/schemas/webhook_config"},{"$ref":"#/components/schemas/cases_webhook_config"},{"$ref":"#/components/schemas/xmatters_config"}]},"secrets":{"additionalProperties":{},"default":{},"oneOf":[{"$ref":"#/components/schemas/bedrock_secrets"},{"$ref":"#/components/schemas/crowdstrike_secrets"},{"$ref":"#/components/schemas/d3security_secrets"},{"$ref":"#/components/schemas/email_secrets"},{"$ref":"#/components/schemas/gemini_secrets"},{"$ref":"#/components/schemas/resilient_secrets"},{"$ref":"#/components/schemas/jira_secrets"},{"$ref":"#/components/schemas/teams_secrets"},{"$ref":"#/components/schemas/genai_secrets"},{"$ref":"#/components/schemas/opsgenie_secrets"},{"$ref":"#/components/schemas/pagerduty_secrets"},{"$ref":"#/components/schemas/sentinelone_secrets"},{"$ref":"#/components/schemas/servicenow_secrets"},{"$ref":"#/components/schemas/slack_api_secrets"},{"$ref":"#/components/schemas/swimlane_secrets"},{"$ref":"#/components/schemas/thehive_secrets"},{"$ref":"#/components/schemas/tines_secrets"},{"$ref":"#/components/schemas/torq_secrets"},{"$ref":"#/components/schemas/webhook_secrets"},{"$ref":"#/components/schemas/cases_webhook_secrets"},{"$ref":"#/components/schemas/xmatters_secrets"}]}},"required":["name"]},"examples":{"updateIndexConnectorRequest":{"$ref":"#/components/examples/update_index_connector_request"}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{},"type":"object"},"connector_type_id":{"description":"The connector type identifier.","type":"string"},"id":{"description":"The identifier for the connector.","type":"string"},"is_deprecated":{"description":"Indicates whether the connector is deprecated.","type":"boolean"},"is_missing_secrets":{"description":"Indicates whether the connector is missing secrets.","type":"boolean"},"is_preconfigured":{"description":"Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ","type":"boolean"},"is_system_action":{"description":"Indicates whether the connector is used for system actions.","type":"boolean"},"name":{"description":" The name of the rule.","type":"string"}},"required":["id","name","connector_type_id","is_preconfigured","is_deprecated","is_system_action"]}}},"description":"Indicates a successful call."}},"summary":"Update a connector","tags":["connectors"]}},"/api/actions/connector/{id}/_execute":{"post":{"description":"You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems.","operationId":"post-actions-connector-id-execute","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"An identifier for the connector.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"params":{"additionalProperties":{},"oneOf":[{"$ref":"#/components/schemas/run_acknowledge_resolve_pagerduty"},{"$ref":"#/components/schemas/run_documents"},{"$ref":"#/components/schemas/run_message_email"},{"$ref":"#/components/schemas/run_message_serverlog"},{"$ref":"#/components/schemas/run_message_slack"},{"$ref":"#/components/schemas/run_trigger_pagerduty"},{"$ref":"#/components/schemas/run_addevent"},{"$ref":"#/components/schemas/run_closealert"},{"$ref":"#/components/schemas/run_closeincident"},{"$ref":"#/components/schemas/run_createalert"},{"$ref":"#/components/schemas/run_fieldsbyissuetype"},{"$ref":"#/components/schemas/run_getagentdetails"},{"$ref":"#/components/schemas/run_getagents"},{"$ref":"#/components/schemas/run_getchoices"},{"$ref":"#/components/schemas/run_getfields"},{"$ref":"#/components/schemas/run_getincident"},{"$ref":"#/components/schemas/run_issue"},{"$ref":"#/components/schemas/run_issues"},{"$ref":"#/components/schemas/run_issuetypes"},{"$ref":"#/components/schemas/run_postmessage"},{"$ref":"#/components/schemas/run_pushtoservice"},{"$ref":"#/components/schemas/run_validchannelid"}]}},"required":["params"]},"examples":{"runIndexConnectorRequest":{"$ref":"#/components/examples/run_index_connector_request"},"runJiraConnectorRequest":{"$ref":"#/components/examples/run_jira_connector_request"},"runServerLogConnectorRequest":{"$ref":"#/components/examples/run_servicenow_itom_connector_request"},"runSlackConnectorRequest":{"$ref":"#/components/examples/run_slack_api_connector_request"},"runSwimlaneConnectorRequest":{"$ref":"#/components/examples/run_swimlane_connector_request"}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{},"type":"object"},"connector_type_id":{"description":"The connector type identifier.","type":"string"},"id":{"description":"The identifier for the connector.","type":"string"},"is_deprecated":{"description":"Indicates whether the connector is deprecated.","type":"boolean"},"is_missing_secrets":{"description":"Indicates whether the connector is missing secrets.","type":"boolean"},"is_preconfigured":{"description":"Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ","type":"boolean"},"is_system_action":{"description":"Indicates whether the connector is used for system actions.","type":"boolean"},"name":{"description":" The name of the rule.","type":"string"}},"required":["id","name","connector_type_id","is_preconfigured","is_deprecated","is_system_action"]},"examples":{"runIndexConnectorResponse":{"$ref":"#/components/examples/run_index_connector_response"},"runJiraConnectorResponse":{"$ref":"#/components/examples/run_jira_connector_response"},"runServerLogConnectorResponse":{"$ref":"#/components/examples/run_server_log_connector_response"},"runServiceNowITOMConnectorResponse":{"$ref":"#/components/examples/run_servicenow_itom_connector_response"},"runSlackConnectorResponse":{"$ref":"#/components/examples/run_slack_api_connector_response"},"runSwimlaneConnectorResponse":{"$ref":"#/components/examples/run_swimlane_connector_response"}}}},"description":"Indicates a successful call."}},"summary":"Run a connector","tags":["connectors"]}},"/api/actions/connectors":{"get":{"operationId":"get-actions-connectors","parameters":[],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getConnectorsResponse":{"$ref":"#/components/examples/get_connectors_response"}}}}}},"summary":"Get all connectors","tags":["connectors"]}},"/api/alerting/_health":{"get":{"description":"You must have `read` privileges for the **Management \u003e Stack Rules** feature or for at least one of the **Analytics \u003e Discover**, **Analytics \u003e Machine Learning**, **Observability**, or **Security** features.\n","operationId":"getAlertingHealth","responses":{"200":{"content":{"application/json":{"examples":{"getAlertingHealthResponse":{"$ref":"#/components/examples/Alerting_get_health_response"}},"schema":{"type":"object","properties":{"alerting_framework_health":{"description":"Three substates identify the health of the alerting framework: `decryption_health`, `execution_health`, and `read_health`.\n","type":"object","properties":{"decryption_health":{"description":"The timestamp and status of the rule decryption.","type":"object","properties":{"status":{"enum":["error","ok","warn"],"example":"ok","type":"string"},"timestamp":{"example":"2023-01-13T01:28:00.280Z","format":"date-time","type":"string"}}},"execution_health":{"description":"The timestamp and status of the rule run.","type":"object","properties":{"status":{"enum":["error","ok","warn"],"example":"ok","type":"string"},"timestamp":{"example":"2023-01-13T01:28:00.280Z","format":"date-time","type":"string"}}},"read_health":{"description":"The timestamp and status of the rule reading events.","type":"object","properties":{"status":{"enum":["error","ok","warn"],"example":"ok","type":"string"},"timestamp":{"example":"2023-01-13T01:28:00.280Z","format":"date-time","type":"string"}}}}},"has_permanent_encryption_key":{"description":"If `false`, the encrypted saved object plugin does not have a permanent encryption key.","example":true,"type":"boolean"},"is_sufficiently_secure":{"description":"If `false`, security is enabled but TLS is not.","example":true,"type":"boolean"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alerting_401_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get the alerting framework health","tags":["alerting"]}},"/api/alerting/rule_types":{"get":{"description":"If you have `read` privileges for one or more Kibana features, the API response contains information about the appropriate rule types. For example, there are rule types associated with the **Management \u003e Stack Rules** feature, **Analytics \u003e Discover** and **Machine Learning** features, **Observability** features, and **Security** features. To get rule types associated with the **Stack Monitoring** feature, use the `monitoring_user` built-in role.\n","operationId":"getRuleTypes","responses":{"200":{"content":{"application/json":{"examples":{"getRuleTypesResponse":{"$ref":"#/components/examples/Alerting_get_rule_types_response"}},"schema":{"items":{"type":"object","properties":{"action_groups":{"description":"An explicit list of groups for which the rule type can schedule actions, each with the action group's unique ID and human readable name. Rule actions validation uses this configuration to ensure that groups are valid.\n","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"type":"array"},"action_variables":{"description":"A list of action variables that the rule type makes available via context and state in action parameter templates, and a short human readable description. When you create a rule in Kibana, it uses this information to prompt you for these variables in action parameter editors.\n","type":"object","properties":{"context":{"items":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"useWithTripleBracesInTemplates":{"type":"boolean"}}},"type":"array"},"params":{"items":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}}},"type":"array"},"state":{"items":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}}},"type":"array"}}},"alerts":{"description":"Details for writing alerts as data documents for this rule type.\n","type":"object","properties":{"context":{"description":"The namespace for this rule type.\n","enum":["ml.anomaly-detection","observability.apm","observability.logs","observability.metrics","observability.slo","observability.threshold","observability.uptime","security","stack"],"type":"string"},"dynamic":{"description":"Indicates whether new fields are added dynamically.","enum":["false","runtime","strict","true"],"type":"string"},"isSpaceAware":{"description":"Indicates whether the alerts are space-aware. If true, space-specific alert indices are used.\n","type":"boolean"},"mappings":{"type":"object","properties":{"fieldMap":{"additionalProperties":{"$ref":"#/components/schemas/Alerting_fieldmap_properties"},"description":"Mapping information for each field supported in alerts as data documents for this rule type. For more information about mapping parameters, refer to the Elasticsearch documentation.\n","type":"object"}}},"secondaryAlias":{"description":"A secondary alias. It is typically used to support the signals alias for detection rules.\n","type":"string"},"shouldWrite":{"description":"Indicates whether the rule should write out alerts as data.\n","type":"boolean"},"useEcs":{"description":"Indicates whether to include the ECS component template for the alerts.\n","type":"boolean"},"useLegacyAlerts":{"default":false,"description":"Indicates whether to include the legacy component template for the alerts.\n","type":"boolean"}}},"authorized_consumers":{"description":"The list of the plugins IDs that have access to the rule type.","type":"object","properties":{"alerts":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"apm":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"discover":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"infrastructure":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"logs":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"ml":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"monitoring":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"siem":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"slo":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"stackAlerts":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}},"uptime":{"type":"object","properties":{"all":{"type":"boolean"},"read":{"type":"boolean"}}}}},"category":{"description":"The rule category, which is used by features such as category-specific maintenance windows.","enum":["management","observability","securitySolution"],"type":"string"},"default_action_group_id":{"description":"The default identifier for the rule type group.","type":"string"},"does_set_recovery_context":{"description":"Indicates whether the rule passes context variables to its recovery action.","type":"boolean"},"enabled_in_license":{"description":"Indicates whether the rule type is enabled or disabled based on the subscription.","type":"boolean"},"has_alerts_mappings":{"description":"Indicates whether the rule type has custom mappings for the alert data.","type":"boolean"},"has_fields_for_a_a_d":{"type":"boolean"},"id":{"description":"The unique identifier for the rule type.","type":"string"},"is_exportable":{"description":"Indicates whether the rule type is exportable in **Stack Management \u003e Saved Objects**.","type":"boolean"},"minimum_license_required":{"description":"The subscriptions required to use the rule type.","example":"basic","type":"string"},"name":{"description":"The descriptive name of the rule type.","type":"string"},"producer":{"description":"An identifier for the application that produces this rule type.","example":"stackAlerts","type":"string"},"recovery_action_group":{"description":"An action group to use when an alert goes from an active state to an inactive one.","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"rule_task_timeout":{"example":"5m","type":"string"}}},"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alerting_401_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get the rule types","tags":["alerting"]}},"/api/alerting/rule/{id}":{"delete":{"operationId":"delete-alerting-rule-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Delete a rule","tags":["alerting"]},"get":{"operationId":"get-alerting-rule-id","parameters":[{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"items":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"connector_type_id":{"description":"The type of connector. This property appears in responses but cannot be set in requests.","type":"string"},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id","connector_type_id","params"]},"type":"array"},"active_snoozes":{"items":{"description":"List of active snoozes for the rule.","type":"string"},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"api_key_created_by_user":{"description":"Indicates whether the API key that is associated with the rule was created by the user.","nullable":true,"type":"boolean"},"api_key_owner":{"description":"The owner of the API key that is associated with the rule and used to run background tasks.","nullable":true,"type":"string"},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"description":"User-created content that describes alert causes and remdiation.","type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"created_at":{"description":"The date and time that the rule was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the rule.","nullable":true,"type":"string"},"enabled":{"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"execution_status":{"additionalProperties":false,"type":"object","properties":{"error":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Error message.","type":"string"},"reason":{"description":"Reason for error.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate"],"type":"string"}},"required":["reason","message"]},"last_duration":{"description":"Duration of last execution of the rule.","type":"number"},"last_execution_date":{"description":"The date and time when rule was executed last.","type":"string"},"status":{"description":"Status of rule execution.","enum":["ok","active","error","warning","pending","unknown"],"type":"string"},"warning":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Warning message.","type":"string"},"reason":{"description":"Reason for warning.","enum":["maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"type":"string"}},"required":["reason","message"]}},"required":["status","last_execution_date"]},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"id":{"description":"The identifier for the rule.","type":"string"},"is_snoozed_until":{"description":"The date when the rule will no longer be snoozed.","nullable":true,"type":"string"},"last_run":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"alerts_count":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"Number of active alerts during last run.","nullable":true,"type":"number"},"ignored":{"description":"Number of ignored alerts during last run.","nullable":true,"type":"number"},"new":{"description":"Number of new alerts during last run.","nullable":true,"type":"number"},"recovered":{"description":"Number of recovered alerts during last run.","nullable":true,"type":"number"}}},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"outcome_msg":{"items":{"description":"Outcome message generated during last rule run.","type":"string"},"nullable":true,"type":"array"},"outcome_order":{"description":"Order of the outcome.","type":"number"},"warning":{"description":"Warning of last rule execution.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate","maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"nullable":true,"type":"string"}},"required":["outcome","alerts_count"]},"mapped_params":{"additionalProperties":{},"type":"object"},"monitoring":{"additionalProperties":false,"description":"Monitoring details of the rule.","type":"object","properties":{"run":{"additionalProperties":false,"description":"Rule run details.","type":"object","properties":{"calculated_metrics":{"additionalProperties":false,"description":"Calculation of different percentiles and success ratio.","type":"object","properties":{"p50":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"},"success_ratio":{"type":"number"}},"required":["success_ratio"]},"history":{"description":"History of the rule run.","items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule run.","type":"number"},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"success":{"description":"Indicates whether the rule run was successful.","type":"boolean"},"timestamp":{"description":"Time of rule run.","type":"number"}},"required":["success","timestamp"]},"type":"array"},"last_run":{"additionalProperties":false,"type":"object","properties":{"metrics":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of most recent rule run.","type":"number"},"gap_duration_s":{"description":"Duration in seconds of rule run gap.","nullable":true,"type":"number"},"gap_range":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"gte":{"description":"End of the gap range.","type":"string"},"lte":{"description":"Start of the gap range.","type":"string"}},"required":["lte","gte"]},"total_alerts_created":{"description":"Total number of alerts created during last rule run.","nullable":true,"type":"number"},"total_alerts_detected":{"description":"Total number of alerts detected during last rule run.","nullable":true,"type":"number"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during last rule run in milliseconds.","nullable":true,"type":"number"},"total_search_duration_ms":{"description":"Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.","nullable":true,"type":"number"}}},"timestamp":{"description":"Time of the most recent rule run.","type":"string"}},"required":["timestamp","metrics"]}},"required":["history","calculated_metrics","last_run"]}},"required":["run"]},"mute_all":{"description":"Indicates whether all alerts are muted.","type":"boolean"},"muted_alert_ids":{"items":{"description":"List of identifiers of muted alerts. ","type":"string"},"type":"array"},"name":{"description":" The name of the rule.","type":"string"},"next_run":{"description":"Date and time of the next run of the rule.","nullable":true,"type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the rule.","type":"object"},"revision":{"description":"The rule revision number.","type":"number"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"running":{"description":"Indicates whether the rule is running.","nullable":true,"type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"scheduled_task_id":{"description":"Identifier of the scheduled task.","type":"string"},"snooze_schedule":{"items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule snooze schedule.","type":"number"},"id":{"description":"Identifier of the rule snooze schedule.","type":"string"},"rRule":{"additionalProperties":false,"type":"object","properties":{"byhour":{"items":{"description":"Indicates hours of the day to recur.","type":"number"},"nullable":true,"type":"array"},"byminute":{"items":{"description":"Indicates minutes of the hour to recur.","type":"number"},"nullable":true,"type":"array"},"bymonth":{"items":{"description":"Indicates months of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"bymonthday":{"items":{"description":"Indicates the days of the month to recur.","type":"number"},"nullable":true,"type":"array"},"bysecond":{"items":{"description":"Indicates seconds of the day to recur.","type":"number"},"nullable":true,"type":"array"},"bysetpos":{"items":{"description":"A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.","type":"number"},"nullable":true,"type":"array"},"byweekday":{"items":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination."},"nullable":true,"type":"array"},"byweekno":{"items":{"description":"Indicates number of the week hours to recur.","type":"number"},"nullable":true,"type":"array"},"byyearday":{"items":{"description":"Indicates the days of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"count":{"description":"Number of times the rule should recur until it stops.","type":"number"},"dtstart":{"description":"Rule start date in Coordinated Universal Time (UTC).","type":"string"},"freq":{"description":"Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.","enum":[0,1,2,3,4,5,6],"type":"integer"},"interval":{"description":"Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.","type":"number"},"tzid":{"description":"Indicates timezone abbreviation.","type":"string"},"until":{"description":"Recur the rule until this date.","type":"string"},"wkst":{"description":"Indicates the start of week, defaults to Monday.","enum":["MO","TU","WE","TH","FR","SA","SU"],"type":"string"}},"required":["dtstart","tzid"]},"skipRecurrences":{"items":{"description":"Skips recurrence of rule on this date.","type":"string"},"type":"array"}},"required":["duration","rRule"]},"type":"array"},"tags":{"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"deprecated":true,"description":"Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"updated_at":{"description":"The date and time that the rule was updated most recently.","type":"string"},"updated_by":{"description":"The identifier for the user that updated this rule most recently.","nullable":true,"type":"string"},"view_in_app_relative_url":{"description":"Relative URL to view rule in the app.","nullable":true,"type":"string"}},"required":["id","enabled","name","tags","rule_type_id","consumer","schedule","actions","params","created_by","updated_by","created_at","updated_at","api_key_owner","mute_all","muted_alert_ids","execution_status","revision"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Get rule details","tags":["alerting"]},"post":{"operationId":"post-alerting-rule-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule. If it is omitted, an ID is randomly generated.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"createEsQueryEsqlRuleRequest":{"description":"Create an Elasticsearch query rule that uses Elasticsearch Query Language (ES|QL) to define its query and a server log connector to send notifications.\n","summary":"Elasticsearch query rule (ES|QL)","value":{"actions":[{"frequency":{"notify_when":"onActiveAlert","summary":false},"group":"query matched","id":"d0db1fe0-78d6-11ee-9177-f7d404c8c945","params":{"level":"info","message":"Elasticsearch query rule '{{rule.name}}' is active:\n- Value: {{context.value}} - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date}} - Link: {{context.link}}"}}],"consumer":"stackAlerts","name":"my Elasticsearch query ESQL rule","params":{"esqlQuery":{"esql":"FROM kibana_sample_data_logs | KEEP bytes, clientip, host, geo.dest | where geo.dest != \"GB\" | STATS sumbytes = sum(bytes) by clientip, host | WHERE sumbytes \u003e 5000 | SORT sumbytes desc | LIMIT 10"},"searchType":"esqlQuery","size":0,"threshold":[0],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"d"},"rule_type_id":".es-query","schedule":{"interval":"1d"}}},"createEsQueryKqlRuleRequest":{"description":"Create an Elasticsearch query rule that uses Kibana query language (KQL).","summary":"Elasticsearch query rule (KQL)","value":{"consumer":"alerts","name":"my Elasticsearch query KQL rule","params":{"aggType":"count","excludeHitsFromPreviousRun":true,"groupBy":"all","searchConfiguration":{"index":"90943e30-9a47-11e8-b64d-95841ca0b247","query":{"language":"kuery","query":"\"\"geo.src : \"US\" \"\""}},"searchType":"searchSource","size":100,"threshold":[1000],"thresholdComparator":"\u003e","timeWindowSize":5,"timeWindowUnit":"m"},"rule_type_id":".es-query","schedule":{"interval":"1m"}}},"createEsQueryRuleRequest":{"description":"Create an Elasticsearch query rule that uses Elasticsearch query domain specific language (DSL) to define its query and a server log connector to send notifications.\n","summary":"Elasticsearch query rule (DSL)","value":{"actions":[{"frequency":{"notify_when":"onThrottleInterval","summary":true,"throttle":"1d"},"group":"query matched","id":"fdbece50-406c-11ee-850e-c71febc4ca7f","params":{"level":"info","message":"The system has detected {{alerts.new.count}} new, {{alerts.ongoing.count}} ongoing, and {{alerts.recovered.count}} recovered alerts."}},{"frequency":{"notify_when":"onActionGroupChange","summary":false},"group":"recovered","id":"fdbece50-406c-11ee-850e-c71febc4ca7f","params":{"level":"info","message":"Recovered"}}],"consumer":"alerts","name":"my Elasticsearch query rule","params":{"esQuery":"\"\"\"{\"query\":{\"match_all\" : {}}}\"\"\"","index":["kibana_sample_data_logs"],"size":100,"threshold":[100],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"d"},"rule_type_id":".es-query","schedule":{"interval":"1d"}}},"createIndexThresholdRuleRequest":{"description":"Create an index threshold rule that uses a server log connector to send notifications when the threshold is met.\n","summary":"Index threshold rule","value":{"actions":[{"frequency":{"notify_when":"onActionGroupChange","summary":false},"group":"threshold met","id":"48de3460-f401-11ed-9f8e-399c75a2deeb","params":{"level":"info","message":"Rule '{{rule.name}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}"}}],"alert_delay":{"active":3},"consumer":"alerts","name":"my rule","params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":[".test-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"rule_type_id":".index-threshold","schedule":{"interval":"1m"},"tags":["cpu"]}},"createTrackingContainmentRuleRequest":{"description":"Create a tracking containment rule that checks when an entity is contained or no longer contained within a boundary.\n","summary":"Tracking containment rule","value":{"consumer":"alerts","name":"my tracking rule","params":{"boundaryGeoField":"location","boundaryIndexId":"0cd90abf-abe7-44c7-909a-f621bbbcfefc","boundaryIndexTitle":"boundary*","boundaryNameField":"name","boundaryType":"entireIndex","dateField\"":"@timestamp","entity":"agent.keyword","geoField":"geo.coordinates","index":"kibana_sample_data_logs","indexId":"90943e30-9a47-11e8-b64d-95841ca0b247"},"rule_type_id":".geo-containment","schedule":{"interval":"1h"}}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"default":[],"items":{"additionalProperties":false,"description":"An action that runs under defined conditions.","type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Conditions that affect whether the action runs. If you specify multiple conditions, all conditions must be met for the action to run. For example, if an alert occurs within the specified time frame and matches the query, the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"description":"Defines the range of time in a day that the action can run. If the `start` value is `00:00` and the `end` value is `24:00`, actions be generated all day.","type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"default":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id"]},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"maxItems":10,"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"maxLength":1000,"type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"enabled":{"default":true,"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"name":{"description":"The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule.","type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"schedule":{"additionalProperties":false,"description":"The check interval, which specifies how frequently the rule conditions are checked.","type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"tags":{"default":[],"description":"The tags for the rule.","items":{"type":"string"},"type":"array"},"throttle":{"description":"Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"params":{"additionalProperties":{},"default":{},"description":"The parameters for the rule.","anyOf":[{"$ref":"#/components/schemas/params_property_apm_anomaly"},{"$ref":"#/components/schemas/params_property_apm_error_count"},{"$ref":"#/components/schemas/params_property_apm_transaction_duration"},{"$ref":"#/components/schemas/params_property_apm_transaction_error_rate"},{"$ref":"#/components/schemas/params_es_query_dsl_rule"},{"$ref":"#/components/schemas/params_es_query_esql_rule"},{"$ref":"#/components/schemas/params_es_query_kql_rule"},{"$ref":"#/components/schemas/params_index_threshold_rule"},{"$ref":"#/components/schemas/params_property_infra_inventory"},{"$ref":"#/components/schemas/params_property_log_threshold"},{"$ref":"#/components/schemas/params_property_infra_metric_threshold"},{"$ref":"#/components/schemas/params_property_slo_burn_rate"},{"$ref":"#/components/schemas/params_property_synthetics_uptime_tls"},{"$ref":"#/components/schemas/params_property_synthetics_monitor_status"}]}},"required":["name","rule_type_id","consumer","schedule"]}}}},"responses":{"200":{"content":{"application/json":{"examples":{"createEsQueryEsqlRuleResponse":{"description":"The response for successfully creating an Elasticsearch query rule that uses Elasticsearch Query Language (ES|QL).","summary":"Elasticsearch query rule (ES|QL)","value":{"actions":[{"connector_type_id":".server-log","frequency":{"notify_when":"onActiveAlert","summary":false,"throttle":null},"group":"query matched","id":"d0db1fe0-78d6-11ee-9177-f7d404c8c945","params":{"level":"info","message":"Elasticsearch query rule '{{rule.name}}' is active:\n- Value: {{context.value}} - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date}} - Link: {{context.link}}"},"uuid":"bfe370a3-531b-4855-bbe6-ad739f578844"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"stackAlerts","created_at":"2023-11-01T19:00:10.453Z","created_by":"elastic","enabled":true,"execution_status":{"last_execution_date":"2023-11-01T19:00:10.453Z","status":"pending"},"id":"e0d62360-78e8-11ee-9177-f7d404c8c945","mute_all":false,"muted_alert_ids":[],"name":"my Elasticsearch query ESQL rule","notify_when":null,"params":{"aggType":"count","esqlQuery":{"esql":"FROM kibana_sample_data_logs | keep bytes, clientip, host, geo.dest | WHERE geo.dest != \"GB\" | stats sumbytes = sum(bytes) by clientip, host | WHERE sumbytes \u003e 5000 | sort sumbytes desc | limit 10"},"excludeHitsFromPreviousRun\"":"true,","groupBy":"all","searchType":"esqlQuery","size":0,"threshold":[0],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"d"},"revision":0,"rule_type_id":".es-query","running":false,"schedule":{"interval":"1d"},"scheduled_task_id":"e0d62360-78e8-11ee-9177-f7d404c8c945","tags":[],"throttle":null,"updated_at":"2023-11-01T19:00:10.453Z","updated_by":"elastic\","}},"createEsQueryKqlRuleResponse":{"description":"The response for successfully creating an Elasticsearch query rule that uses Kibana query language (KQL).","summary":"Elasticsearch query rule (KQL)","value":{"actions":[],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2023-07-14T20:24:50.729Z","created_by":"elastic","enabled":true,"execution_status":{"last_execution_date":"2023-07-14T20:24:50.729Z","status":"pending"},"id":"7bd506d0-2284-11ee-8fad-6101956ced88","mute_all":false,"muted_alert_ids":[],"name":"my Elasticsearch query KQL rule\"","notify_when":null,"params":{"aggType":"count","excludeHitsFromPreviousRun":true,"groupBy":"all","searchConfiguration":{"index":"90943e30-9a47-11e8-b64d-95841ca0b247","query":{"language":"kuery","query":"\"\"geo.src : \"US\" \"\""}},"searchType":"searchSource","size":100,"threshold":[1000],"thresholdComparator":"\u003e","timeWindowSize":5,"timeWindowUnit":"m"},"revision":0,"rule_type_id":".es-query","running":false,"schedule":{"interval":"1m"},"scheduled_task_id":"7bd506d0-2284-11ee-8fad-6101956ced88","tags":[],"throttle":null,"updated_at":"2023-07-14T20:24:50.729Z","updated_by":"elastic"}},"createEsQueryRuleResponse":{"description":"The response for successfully creating an Elasticsearch query rule that uses Elasticsearch query domain specific language (DSL).","summary":"Elasticsearch query rule (DSL)","value":{"actions":[{"connector_type_id":".server-log","frequency":{"notify_when":"onThrottleInterval","summary":true,"throttle":"1d"},"group":"query matched","id":"fdbece50-406c-11ee-850e-c71febc4ca7f","params":{"level":"info","message":"The system has detected {{alerts.new.count}} new, {{alerts.ongoing.count}} ongoing, and {{alerts.recovered.count}} recovered alerts."},"uuid":"53f3c2a3-e5d0-4cfa-af3b-6f0881385e78"},{"connector_type_id":".server-log","frequency":{"notify_when":"onActionGroupChange","summary":false,"throttle":null},"group":"recovered","id":"fdbece50-406c-11ee-850e-c71febc4ca7f","params":{"level":"info","message":"Recovered"},"uuid":"2324e45b-c0df-45c7-9d70-4993e30be758"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2023-08-22T00:03:38.263Z","created_by":"elastic","enabled":true,"execution_status":{"last_execution_date":"2023-08-22T00:03:38.263Z","status":"pending"},"id":"58148c70-407f-11ee-850e-c71febc4ca7f","mute_all":false,"muted_alert_ids":[],"name":"my Elasticsearch query rule","notify_when":null,"params":{"aggType":"count","esQuery":"\"\"\"{\"query\":{\"match_all\" : {}}}\"\"\"","excludeHitsFromPreviousRun":true,"groupBy":"all","index":["kibana_sample_data_logs"],"searchType":"esQuery","size":100,"threshold":[100],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"d"},"revision":0,"rule_type_id":".es-query","running":false,"schedule":{"interval":"1d"},"scheduled_task_id":"58148c70-407f-11ee-850e-c71febc4ca7f","tags":[],"throttle":null,"updated_at":"2023-08-22T00:03:38.263Z","updated_by":"elastic"}},"createIndexThresholdRuleResponse":{"description":"The response for successfully creating an index threshold rule.","summary":"Index threshold rule","value":{"actions":[{"connector_type_id":".server-log","frequency":{"notify_when":"onActionGroupChange","summary":false,"throttle":null},"group":"threshold met","id":"dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2","params":{"level":"info","message":"Rule {{rule.name}} is active for group {{context.group} :\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}"},"uuid":"07aef2a0-9eed-4ef9-94ec-39ba58eb609d"}],"alert_delay":{"active":3},"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2022-06-08T17:20:31.632Z","created_by":"elastic","enabled":true,"execution_status":{"last_execution_date":"2022-06-08T17:20:31.632Z","status":"pending"},"id":"41893910-6bca-11eb-9e0d-85d233e3ee35","mute_all":false,"muted_alert_ids":[],"name":"my rule","notify_when":null,"params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":[".test-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"revision":0,"rule_type_id":".index-threshold","running":false,"schedule":{"interval":"1m"},"scheduled_task_id":"425b0800-6bca-11eb-9e0d-85d233e3ee35","tags":["cpu"],"throttle":null,"updated_at":"2022-06-08T17:20:31.632Z","updated_by":"elastic"}},"createTrackingContainmentRuleResponse":{"description":"The response for successfully creating a tracking containment rule.","summary":"Tracking containment rule","value":{"actions":[],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2024-02-14T19:52:55.920Z","created_by":"elastic","enabled":true,"execution_status":{"last_duration":74,"last_execution_date":"2024-02-15T03:25:38.125Z","status":"ok"},"id":"b6883f9d-5f70-4758-a66e-369d7c26012f","last_run":{"alerts_count":{"active":0,"ignored":0,"new":0,"recovered":0},"outcome":"succeeded","outcome_msg":null,"outcome_order":0,"warning":null},"mute_all":false,"muted_alert_ids":[],"name":"my tracking rule","next_run":"2024-02-15T03:26:38.033Z","notify_when":null,"params":{"boundaryGeoField":"location","boundaryIndexId":"0cd90abf-abe7-44c7-909a-f621bbbcfefc","boundaryIndexTitle":"boundary*","boundaryNameField":"name","boundaryType":"entireIndex","dateField":"@timestamp","entity":"agent.keyword","geoField":"geo.coordinates","index":"kibana_sample_data_logs","indexId":"90943e30-9a47-11e8-b64d-95841ca0b247"},"revision":1,"rule_type_id":".geo-containment","running":false,"schedule":{"interval":"1h"},"scheduled_task_id":"b6883f9d-5f70-4758-a66e-369d7c26012f","tags":[],"throttle":null,"updated_at":"2024-02-15T03:24:32.574Z","updated_by":"elastic"}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"items":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"connector_type_id":{"description":"The type of connector. This property appears in responses but cannot be set in requests.","type":"string"},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id","connector_type_id","params"]},"type":"array"},"active_snoozes":{"items":{"description":"List of active snoozes for the rule.","type":"string"},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"api_key_created_by_user":{"description":"Indicates whether the API key that is associated with the rule was created by the user.","nullable":true,"type":"boolean"},"api_key_owner":{"description":"The owner of the API key that is associated with the rule and used to run background tasks.","nullable":true,"type":"string"},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"description":"User-created content that describes alert causes and remdiation.","type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"created_at":{"description":"The date and time that the rule was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the rule.","nullable":true,"type":"string"},"enabled":{"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"execution_status":{"additionalProperties":false,"type":"object","properties":{"error":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Error message.","type":"string"},"reason":{"description":"Reason for error.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate"],"type":"string"}},"required":["reason","message"]},"last_duration":{"description":"Duration of last execution of the rule.","type":"number"},"last_execution_date":{"description":"The date and time when rule was executed last.","type":"string"},"status":{"description":"Status of rule execution.","enum":["ok","active","error","warning","pending","unknown"],"type":"string"},"warning":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Warning message.","type":"string"},"reason":{"description":"Reason for warning.","enum":["maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"type":"string"}},"required":["reason","message"]}},"required":["status","last_execution_date"]},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"id":{"description":"The identifier for the rule.","type":"string"},"is_snoozed_until":{"description":"The date when the rule will no longer be snoozed.","nullable":true,"type":"string"},"last_run":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"alerts_count":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"Number of active alerts during last run.","nullable":true,"type":"number"},"ignored":{"description":"Number of ignored alerts during last run.","nullable":true,"type":"number"},"new":{"description":"Number of new alerts during last run.","nullable":true,"type":"number"},"recovered":{"description":"Number of recovered alerts during last run.","nullable":true,"type":"number"}}},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"outcome_msg":{"items":{"description":"Outcome message generated during last rule run.","type":"string"},"nullable":true,"type":"array"},"outcome_order":{"description":"Order of the outcome.","type":"number"},"warning":{"description":"Warning of last rule execution.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate","maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"nullable":true,"type":"string"}},"required":["outcome","alerts_count"]},"mapped_params":{"additionalProperties":{},"type":"object"},"monitoring":{"additionalProperties":false,"description":"Monitoring details of the rule.","type":"object","properties":{"run":{"additionalProperties":false,"description":"Rule run details.","type":"object","properties":{"calculated_metrics":{"additionalProperties":false,"description":"Calculation of different percentiles and success ratio.","type":"object","properties":{"p50":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"},"success_ratio":{"type":"number"}},"required":["success_ratio"]},"history":{"description":"History of the rule run.","items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule run.","type":"number"},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"success":{"description":"Indicates whether the rule run was successful.","type":"boolean"},"timestamp":{"description":"Time of rule run.","type":"number"}},"required":["success","timestamp"]},"type":"array"},"last_run":{"additionalProperties":false,"type":"object","properties":{"metrics":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of most recent rule run.","type":"number"},"gap_duration_s":{"description":"Duration in seconds of rule run gap.","nullable":true,"type":"number"},"gap_range":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"gte":{"description":"End of the gap range.","type":"string"},"lte":{"description":"Start of the gap range.","type":"string"}},"required":["lte","gte"]},"total_alerts_created":{"description":"Total number of alerts created during last rule run.","nullable":true,"type":"number"},"total_alerts_detected":{"description":"Total number of alerts detected during last rule run.","nullable":true,"type":"number"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during last rule run in milliseconds.","nullable":true,"type":"number"},"total_search_duration_ms":{"description":"Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.","nullable":true,"type":"number"}}},"timestamp":{"description":"Time of the most recent rule run.","type":"string"}},"required":["timestamp","metrics"]}},"required":["history","calculated_metrics","last_run"]}},"required":["run"]},"mute_all":{"description":"Indicates whether all alerts are muted.","type":"boolean"},"muted_alert_ids":{"items":{"description":"List of identifiers of muted alerts. ","type":"string"},"type":"array"},"name":{"description":" The name of the rule.","type":"string"},"next_run":{"description":"Date and time of the next run of the rule.","nullable":true,"type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the rule.","type":"object"},"revision":{"description":"The rule revision number.","type":"number"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"running":{"description":"Indicates whether the rule is running.","nullable":true,"type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"scheduled_task_id":{"description":"Identifier of the scheduled task.","type":"string"},"snooze_schedule":{"items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule snooze schedule.","type":"number"},"id":{"description":"Identifier of the rule snooze schedule.","type":"string"},"rRule":{"additionalProperties":false,"type":"object","properties":{"byhour":{"items":{"description":"Indicates hours of the day to recur.","type":"number"},"nullable":true,"type":"array"},"byminute":{"items":{"description":"Indicates minutes of the hour to recur.","type":"number"},"nullable":true,"type":"array"},"bymonth":{"items":{"description":"Indicates months of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"bymonthday":{"items":{"description":"Indicates the days of the month to recur.","type":"number"},"nullable":true,"type":"array"},"bysecond":{"items":{"description":"Indicates seconds of the day to recur.","type":"number"},"nullable":true,"type":"array"},"bysetpos":{"items":{"description":"A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.","type":"number"},"nullable":true,"type":"array"},"byweekday":{"items":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination."},"nullable":true,"type":"array"},"byweekno":{"items":{"description":"Indicates number of the week hours to recur.","type":"number"},"nullable":true,"type":"array"},"byyearday":{"items":{"description":"Indicates the days of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"count":{"description":"Number of times the rule should recur until it stops.","type":"number"},"dtstart":{"description":"Rule start date in Coordinated Universal Time (UTC).","type":"string"},"freq":{"description":"Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.","enum":[0,1,2,3,4,5,6],"type":"integer"},"interval":{"description":"Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.","type":"number"},"tzid":{"description":"Indicates timezone abbreviation.","type":"string"},"until":{"description":"Recur the rule until this date.","type":"string"},"wkst":{"description":"Indicates the start of week, defaults to Monday.","enum":["MO","TU","WE","TH","FR","SA","SU"],"type":"string"}},"required":["dtstart","tzid"]},"skipRecurrences":{"items":{"description":"Skips recurrence of rule on this date.","type":"string"},"type":"array"}},"required":["duration","rRule"]},"type":"array"},"tags":{"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"deprecated":true,"description":"Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"updated_at":{"description":"The date and time that the rule was updated most recently.","type":"string"},"updated_by":{"description":"The identifier for the user that updated this rule most recently.","nullable":true,"type":"string"},"view_in_app_relative_url":{"description":"Relative URL to view rule in the app.","nullable":true,"type":"string"}},"required":["id","enabled","name","tags","rule_type_id","consumer","schedule","actions","params","created_by","updated_by","created_at","updated_at","api_key_owner","mute_all","muted_alert_ids","execution_status","revision"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"409":{"description":"Indicates that the rule id is already in use."}},"summary":"Create a rule","tags":["alerting"]},"put":{"operationId":"put-alerting-rule-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"updateRuleRequest":{"description":"Update an index threshold rule that uses a server log connector to send notifications when the threshold is met.","summary":"Index threshold rule","value":{"actions":[{"frequency":{"notify_when":"onActionGroupChange","summary":false},"group":"threshold met","id":"96b668d0-a1b6-11ed-afdf-d39a49596974","params":{"level":"info","message":"Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}"}}],"name":"new name","params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":[".updated-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"schedule":{"interval":"1m"},"tags":[]}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"default":[],"items":{"additionalProperties":false,"description":"An action that runs under defined conditions.","type":"object","properties":{"alerts_filter":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"description":"Defines the range of time in a day that the action can run. If the `start` value is `00:00` and the `end` value is `24:00`, actions be generated all day.","type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"default":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id"]},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"maxItems":10,"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"maxLength":1000,"type":"string"}},"required":["blob"]}}},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"name":{"description":"The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule.","type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"default":{},"description":"The parameters for the rule.","type":"object"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"tags":{"default":[],"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"description":"Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["name","schedule"]}}}},"responses":{"200":{"content":{"application/json":{"examples":{"updateRuleResponse":{"description":"The response for successfully updating an index threshold rule.","summary":"Index threshold rule","value":{"actions":[{"connector_type_id":".server-log","frequency":{"notify_when":"onActionGroupChange","summary":false,"throttle":null},"group":"threshold met","id":"96b668d0-a1b6-11ed-afdf-d39a49596974","params":{"level":"info","message":"Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}"},"uuid":"07aef2a0-9eed-4ef9-94ec-39ba58eb609d"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2024-03-26T23:13:20.985Z","created_by":"elastic","enabled":true,"execution_status":{"last_duration":52,"last_execution_date":"2024-03-26T23:22:51.390Z","status":"ok"},"id":"ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74","last_run":{"alerts_count":{"active":0,"ignored":0,"new":0,"recovered":0},"outcome":"succeeded","outcome_msg":null,"warning":null},"mute_all":false,"muted_alert_ids":[],"name":"new name","next_run":"2024-03-26T23:23:51.316Z","params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":[".updated-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"revision":1,"rule_type_id":".index-threshold","running":false,"schedule":{"interval":"1m"},"scheduled_task_id":"4c5eda00-e74f-11ec-b72f-5b18752ff9ea","tags":[],"throttle":null,"updated_at":"2024-03-26T23:22:59.949Z","updated_by":"elastic"}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"items":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"connector_type_id":{"description":"The type of connector. This property appears in responses but cannot be set in requests.","type":"string"},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id","connector_type_id","params"]},"type":"array"},"active_snoozes":{"items":{"description":"List of active snoozes for the rule.","type":"string"},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"api_key_created_by_user":{"description":"Indicates whether the API key that is associated with the rule was created by the user.","nullable":true,"type":"boolean"},"api_key_owner":{"description":"The owner of the API key that is associated with the rule and used to run background tasks.","nullable":true,"type":"string"},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"description":"User-created content that describes alert causes and remdiation.","type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"created_at":{"description":"The date and time that the rule was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the rule.","nullable":true,"type":"string"},"enabled":{"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"execution_status":{"additionalProperties":false,"type":"object","properties":{"error":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Error message.","type":"string"},"reason":{"description":"Reason for error.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate"],"type":"string"}},"required":["reason","message"]},"last_duration":{"description":"Duration of last execution of the rule.","type":"number"},"last_execution_date":{"description":"The date and time when rule was executed last.","type":"string"},"status":{"description":"Status of rule execution.","enum":["ok","active","error","warning","pending","unknown"],"type":"string"},"warning":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Warning message.","type":"string"},"reason":{"description":"Reason for warning.","enum":["maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"type":"string"}},"required":["reason","message"]}},"required":["status","last_execution_date"]},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"id":{"description":"The identifier for the rule.","type":"string"},"is_snoozed_until":{"description":"The date when the rule will no longer be snoozed.","nullable":true,"type":"string"},"last_run":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"alerts_count":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"Number of active alerts during last run.","nullable":true,"type":"number"},"ignored":{"description":"Number of ignored alerts during last run.","nullable":true,"type":"number"},"new":{"description":"Number of new alerts during last run.","nullable":true,"type":"number"},"recovered":{"description":"Number of recovered alerts during last run.","nullable":true,"type":"number"}}},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"outcome_msg":{"items":{"description":"Outcome message generated during last rule run.","type":"string"},"nullable":true,"type":"array"},"outcome_order":{"description":"Order of the outcome.","type":"number"},"warning":{"description":"Warning of last rule execution.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate","maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"nullable":true,"type":"string"}},"required":["outcome","alerts_count"]},"mapped_params":{"additionalProperties":{},"type":"object"},"monitoring":{"additionalProperties":false,"description":"Monitoring details of the rule.","type":"object","properties":{"run":{"additionalProperties":false,"description":"Rule run details.","type":"object","properties":{"calculated_metrics":{"additionalProperties":false,"description":"Calculation of different percentiles and success ratio.","type":"object","properties":{"p50":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"},"success_ratio":{"type":"number"}},"required":["success_ratio"]},"history":{"description":"History of the rule run.","items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule run.","type":"number"},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"success":{"description":"Indicates whether the rule run was successful.","type":"boolean"},"timestamp":{"description":"Time of rule run.","type":"number"}},"required":["success","timestamp"]},"type":"array"},"last_run":{"additionalProperties":false,"type":"object","properties":{"metrics":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of most recent rule run.","type":"number"},"gap_duration_s":{"description":"Duration in seconds of rule run gap.","nullable":true,"type":"number"},"gap_range":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"gte":{"description":"End of the gap range.","type":"string"},"lte":{"description":"Start of the gap range.","type":"string"}},"required":["lte","gte"]},"total_alerts_created":{"description":"Total number of alerts created during last rule run.","nullable":true,"type":"number"},"total_alerts_detected":{"description":"Total number of alerts detected during last rule run.","nullable":true,"type":"number"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during last rule run in milliseconds.","nullable":true,"type":"number"},"total_search_duration_ms":{"description":"Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.","nullable":true,"type":"number"}}},"timestamp":{"description":"Time of the most recent rule run.","type":"string"}},"required":["timestamp","metrics"]}},"required":["history","calculated_metrics","last_run"]}},"required":["run"]},"mute_all":{"description":"Indicates whether all alerts are muted.","type":"boolean"},"muted_alert_ids":{"items":{"description":"List of identifiers of muted alerts. ","type":"string"},"type":"array"},"name":{"description":" The name of the rule.","type":"string"},"next_run":{"description":"Date and time of the next run of the rule.","nullable":true,"type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the rule.","type":"object"},"revision":{"description":"The rule revision number.","type":"number"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"running":{"description":"Indicates whether the rule is running.","nullable":true,"type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"scheduled_task_id":{"description":"Identifier of the scheduled task.","type":"string"},"snooze_schedule":{"items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule snooze schedule.","type":"number"},"id":{"description":"Identifier of the rule snooze schedule.","type":"string"},"rRule":{"additionalProperties":false,"type":"object","properties":{"byhour":{"items":{"description":"Indicates hours of the day to recur.","type":"number"},"nullable":true,"type":"array"},"byminute":{"items":{"description":"Indicates minutes of the hour to recur.","type":"number"},"nullable":true,"type":"array"},"bymonth":{"items":{"description":"Indicates months of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"bymonthday":{"items":{"description":"Indicates the days of the month to recur.","type":"number"},"nullable":true,"type":"array"},"bysecond":{"items":{"description":"Indicates seconds of the day to recur.","type":"number"},"nullable":true,"type":"array"},"bysetpos":{"items":{"description":"A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.","type":"number"},"nullable":true,"type":"array"},"byweekday":{"items":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination."},"nullable":true,"type":"array"},"byweekno":{"items":{"description":"Indicates number of the week hours to recur.","type":"number"},"nullable":true,"type":"array"},"byyearday":{"items":{"description":"Indicates the days of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"count":{"description":"Number of times the rule should recur until it stops.","type":"number"},"dtstart":{"description":"Rule start date in Coordinated Universal Time (UTC).","type":"string"},"freq":{"description":"Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.","enum":[0,1,2,3,4,5,6],"type":"integer"},"interval":{"description":"Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.","type":"number"},"tzid":{"description":"Indicates timezone abbreviation.","type":"string"},"until":{"description":"Recur the rule until this date.","type":"string"},"wkst":{"description":"Indicates the start of week, defaults to Monday.","enum":["MO","TU","WE","TH","FR","SA","SU"],"type":"string"}},"required":["dtstart","tzid"]},"skipRecurrences":{"items":{"description":"Skips recurrence of rule on this date.","type":"string"},"type":"array"}},"required":["duration","rRule"]},"type":"array"},"tags":{"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"deprecated":true,"description":"Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"updated_at":{"description":"The date and time that the rule was updated most recently.","type":"string"},"updated_by":{"description":"The identifier for the user that updated this rule most recently.","nullable":true,"type":"string"},"view_in_app_relative_url":{"description":"Relative URL to view rule in the app.","nullable":true,"type":"string"}},"required":["id","enabled","name","tags","rule_type_id","consumer","schedule","actions","params","created_by","updated_by","created_at","updated_at","api_key_owner","mute_all","muted_alert_ids","execution_status","revision"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."},"409":{"description":"Indicates that the rule has already been updated by another user."}},"summary":"Update a rule","tags":["alerting"]}},"/api/alerting/rule/{id}/_disable":{"post":{"operationId":"post-alerting-rule-id-disable","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"untrack":{"description":"Defines whether this rule's alerts should be untracked.","type":"boolean"}},"x-oas-optional":true}}}},"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Disable a rule","tags":["alerting"]}},"/api/alerting/rule/{id}/_enable":{"post":{"operationId":"post-alerting-rule-id-enable","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Enable a rule","tags":["alerting"]}},"/api/alerting/rule/{id}/_mute_all":{"post":{"operationId":"post-alerting-rule-id-mute-all","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Mute all alerts","tags":["alerting"]}},"/api/alerting/rule/{id}/_unmute_all":{"post":{"operationId":"post-alerting-rule-id-unmute-all","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."}},"summary":"Unmute all alerts","tags":["alerting"]}},"/api/alerting/rule/{id}/_update_api_key":{"post":{"operationId":"post-alerting-rule-id-update-api-key","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given ID does not exist."},"409":{"description":"Indicates that the rule has already been updated by another user."}},"summary":"Update the API key for a rule","tags":["alerting"]}},"/api/alerting/rule/{id}/snooze_schedule":{"post":{"description":"When you snooze a rule, the rule checks continue to run but alerts will not generate actions. You can snooze for a specified period of time and schedule single or recurring downtimes.","operationId":"post-alerting-rule-id-snooze-schedule","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"Identifier of the rule.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","minimum":1,"type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"maximum":12,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"maximum":31,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"minItems":1,"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}}}},"required":["schedule"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"body":{"additionalProperties":false,"type":"object","properties":{"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","minimum":1,"type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"maximum":12,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"maximum":31,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"minItems":1,"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]},"id":{"description":"Identifier of the snooze schedule.","type":"string"}},"required":["id"]}},"required":["schedule"]}},"required":["body"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given id does not exist."}},"summary":"Schedule a snooze for the rule","tags":["alerting"],"x-state":"Generally available; added in 8.19.0"}},"/api/alerting/rule/{rule_id}/alert/{alert_id}/_mute":{"post":{"operationId":"post-alerting-rule-rule-id-alert-alert-id-mute","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"rule_id","required":true,"schema":{"type":"string"}},{"description":"The identifier for the alert.","in":"path","name":"alert_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule or alert with the given ID does not exist."}},"summary":"Mute an alert","tags":["alerting"]}},"/api/alerting/rule/{rule_id}/alert/{alert_id}/_unmute":{"post":{"operationId":"post-alerting-rule-rule-id-alert-alert-id-unmute","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"rule_id","required":true,"schema":{"type":"string"}},{"description":"The identifier for the alert.","in":"path","name":"alert_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule or alert with the given ID does not exist."}},"summary":"Unmute an alert","tags":["alerting"]}},"/api/alerting/rule/{ruleId}/snooze_schedule/{scheduleId}":{"delete":{"operationId":"delete-alerting-rule-ruleid-snooze-schedule-scheduleid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the rule.","in":"path","name":"ruleId","required":true,"schema":{"type":"string"}},{"description":"The identifier for the snooze schedule.","in":"path","name":"scheduleId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a rule with the given id does not exist."}},"summary":"Delete a snooze schedule for a rule","tags":["alerting"],"x-state":"Generally available; added in 8.19.0"}},"/api/alerting/rules/_find":{"get":{"operationId":"get-alerting-rules-find","parameters":[{"description":"The number of rules to return per page.","in":"query","name":"per_page","required":false,"schema":{"default":10,"minimum":0,"type":"number"}},{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"number"}},{"description":"An Elasticsearch simple_query_string query that filters the objects in the response.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"The default operator to use for the simple_query_string.","in":"query","name":"default_search_operator","required":false,"schema":{"default":"OR","enum":["OR","AND"],"type":"string"}},{"description":"The fields to perform the simple_query_string parsed query against.","in":"query","name":"search_fields","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]}},{"description":"Determines which field is used to sort the results. The field must exist in the `attributes` key of the response.","in":"query","name":"sort_field","required":false,"schema":{"type":"string"}},{"description":"Determines the sort order.","in":"query","name":"sort_order","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"description":"Filters the rules that have a relation with the reference objects with a specific type and identifier.","in":"query","name":"has_reference","required":false,"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]}},{"in":"query","name":"fields","required":false,"schema":{"items":{"description":"The fields to return in the `attributes` key of the response.","type":"string"},"type":"array"}},{"description":"A KQL string that you filter with an attribute from your saved object. It should look like `savedObjectType.attributes.title: \"myTitle\"`. However, if you used a direct attribute of a saved object, such as `updatedAt`, you must define your filter, for example, `savedObjectType.updatedAt \u003e 2018-12-22`.","in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"in":"query","name":"filter_consumers","required":false,"schema":{"items":{"description":"List of consumers to filter.","type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"examples":{"findConditionalActionRulesResponse":{"description":"A response that contains information about an index threshold rule.","summary":"Index threshold rule","value":{"data":[{"actions":[{"frequency":{"notify_when":"onActionGroupChange","summary":false,"throttle":null},"group":"threshold met","id":"9dca3e00-74f5-11ed-9801-35303b735aef","params":{"connector_type_id":".server-log","level":"info","message":"Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}"},"uuid":"1c7a1280-f28c-4e06-96b2-e4e5f05d1d61"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"alerts","created_at":"2022-12-05T23:40:33.132Z","created_by":"elastic","enabled":true,"execution_status":{"last_duration":48,"last_execution_date":"2022-12-06T01:44:23.983Z","status":"ok"},"id":"3583a470-74f6-11ed-9801-35303b735aef","last_run":{"alerts_count":{"active":0,"ignored":0,"new":0,"recovered":0},"outcome":"succeeded","outcome_msg":null,"warning":null},"mute_all":false,"muted_alert_ids":[],"name":"my alert","next_run":"2022-12-06T01:45:23.912Z","params":{"aggField":"sheet.version","aggType":"avg","groupBy":"top","index":["test-index"],"termField":"name.keyword","termSize":6,"threshold":[1000],"thresholdComparator":"\u003e","timeField":"@timestamp","timeWindowSize":5,"timeWindowUnit":"m"},"revision":1,"rule_type_id":".index-threshold","schedule":{"interval":"1m"},"scheduled_task_id":"3583a470-74f6-11ed-9801-35303b735aef","tags":["cpu"],"throttle":null,"updated_at":"2022-12-05T23:40:33.132Z","updated_by":"elastic"}],"page":1,"per_page":10,"total":1}},"findRulesResponse":{"description":"A response that contains information about a security rule that has conditional actions.","summary":"Security rule","value":{"data":[{"actions":[{"alerts_filter":{"query":{"filters":[{"$state":{"store":"appState"},"meta":{"alias":null,"disabled":false,"field":"client.geo.region_iso_code","index":"c4bdca79-e69e-4d80-82a1-e5192c621bea","key":"client.geo.region_iso_code","negate":false,"params":{"query":"CA-QC","type":"phrase"}},"query":{"match_phrase":{"client.geo.region_iso_code":"CA-QC"}}}],"kql":""},"timeframe":{"days":[7],"hours":{"end":"17:00","start":"08:00"},"timezone":"UTC"}},"connector_type_id":".index","frequency":{"notify_when":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"49eae970-f401-11ed-9f8e-399c75a2deeb","params":{"documents":[{"alert_id":{"[object Object]":null},"context_message":{"[object Object]":null},"rule_id":{"[object Object]":null},"rule_name":{"[object Object]":null}}]},"uuid":"1c7a1280-f28c-4e06-96b2-e4e5f05d1d61"}],"api_key_created_by_user":false,"api_key_owner":"elastic","consumer":"siem","created_at":"2023-05-16T15:50:28.358Z","created_by":"elastic","enabled":true,"execution_status":{"last_duration":166,"last_execution_date":"2023-05-16T20:26:49.590Z","status":"ok"},"id":"6107a8f0-f401-11ed-9f8e-399c75a2deeb","last_run":{"alerts_count":{"active":0,"ignored":0,"new":0,"recovered":0},"outcome":"succeeded","outcome_msg":["Rule execution completed successfully"],"outcome_order":0,"warning":null},"mute_all":false,"muted_alert_ids":[],"name":"security_rule","next_run":"2023-05-16T20:27:49.507Z","notify_when":null,"params":{"author":[],"description":"A security threshold rule.","exceptionsList":[],"falsePositives":[],"filters":[],"from":"now-3660s","immutable":false,"index":["kibana_sample_data_logs"],"language":"kuery","license":"","maxSignals":100,"meta":{"from":"1h","kibana_siem_app_url":"https://localhost:5601/app/security"},"outputIndex":"","query":"*","references":[],"riskScore":21,"riskScoreMapping":[],"ruleId":"an_internal_rule_id","severity":"low","severityMapping":[],"threat":[],"threshold":{"cardinality":[],"field":["bytes"],"value":1},"to":"now","type":"threshold","version":1},"revision":1,"rule_type_id":"siem.thresholdRule","running":false,"schedule":{"interval":"1m"},"scheduled_task_id":"6107a8f0-f401-11ed-9f8e-399c75a2deeb","tags":[],"throttle":null,"updated_at":"2023-05-16T20:25:42.559Z","updated_by":"elastic"}],"page":1,"per_page":10,"total":1}}},"schema":{"additionalProperties":false,"type":"object","properties":{"actions":{"items":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"additionalProperties":false,"description":"Defines a period that limits whether the action runs.","type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"dsl":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL).","type":"string"},"filters":{"description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","items":{"additionalProperties":false,"type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"A filter can be either specific to an application context or applied globally.","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":{},"type":"object"},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql","filters"]},"timeframe":{"additionalProperties":false,"type":"object","properties":{"days":{"description":"Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.","items":{"enum":[1,2,3,4,5,6,7],"type":"integer"},"type":"array"},"hours":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end of the time frame in 24-hour notation (`hh:mm`).","type":"string"},"start":{"description":"The start of the time frame in 24-hour notation (`hh:mm`).","type":"string"}},"required":["start","end"]},"timezone":{"description":"The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.","type":"string"}},"required":["days","hours","timezone"]}}},"connector_type_id":{"description":"The type of connector. This property appears in responses but cannot be set in requests.","type":"string"},"frequency":{"additionalProperties":false,"type":"object","properties":{"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"type":"string"},"summary":{"description":"Indicates whether the action is a summary.","type":"boolean"},"throttle":{"description":"The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"}},"required":["summary","notify_when","throttle"]},"group":{"description":"The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.","type":"string"},"id":{"description":"The identifier for the connector saved object.","type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.","type":"object"},"use_alert_data_for_template":{"description":"Indicates whether to use alert data as a template.","type":"boolean"},"uuid":{"description":"A universally unique identifier (UUID) for the action.","type":"string"}},"required":["id","connector_type_id","params"]},"type":"array"},"active_snoozes":{"items":{"description":"List of active snoozes for the rule.","type":"string"},"type":"array"},"alert_delay":{"additionalProperties":false,"description":"Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.","type":"object","properties":{"active":{"description":"The number of consecutive runs that must meet the rule conditions.","type":"number"}},"required":["active"]},"api_key_created_by_user":{"description":"Indicates whether the API key that is associated with the rule was created by the user.","nullable":true,"type":"boolean"},"api_key_owner":{"description":"The owner of the API key that is associated with the rule and used to run background tasks.","nullable":true,"type":"string"},"artifacts":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"investigation_guide":{"additionalProperties":false,"type":"object","properties":{"blob":{"description":"User-created content that describes alert causes and remdiation.","type":"string"}},"required":["blob"]}}},"consumer":{"description":"The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.","type":"string"},"created_at":{"description":"The date and time that the rule was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the rule.","nullable":true,"type":"string"},"enabled":{"description":"Indicates whether you want to run the rule on an interval basis after it is created.","type":"boolean"},"execution_status":{"additionalProperties":false,"type":"object","properties":{"error":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Error message.","type":"string"},"reason":{"description":"Reason for error.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate"],"type":"string"}},"required":["reason","message"]},"last_duration":{"description":"Duration of last execution of the rule.","type":"number"},"last_execution_date":{"description":"The date and time when rule was executed last.","type":"string"},"status":{"description":"Status of rule execution.","enum":["ok","active","error","warning","pending","unknown"],"type":"string"},"warning":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"Warning message.","type":"string"},"reason":{"description":"Reason for warning.","enum":["maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"type":"string"}},"required":["reason","message"]}},"required":["status","last_execution_date"]},"flapping":{"additionalProperties":false,"description":"When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.","nullable":true,"type":"object","properties":{"look_back_window":{"description":"The minimum number of runs in which the threshold must be met.","maximum":20,"minimum":2,"type":"number"},"status_change_threshold":{"description":"The minimum number of times an alert must switch states in the look back window.","maximum":20,"minimum":2,"type":"number"}},"required":["look_back_window","status_change_threshold"]},"id":{"description":"The identifier for the rule.","type":"string"},"is_snoozed_until":{"description":"The date when the rule will no longer be snoozed.","nullable":true,"type":"string"},"last_run":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"alerts_count":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"Number of active alerts during last run.","nullable":true,"type":"number"},"ignored":{"description":"Number of ignored alerts during last run.","nullable":true,"type":"number"},"new":{"description":"Number of new alerts during last run.","nullable":true,"type":"number"},"recovered":{"description":"Number of recovered alerts during last run.","nullable":true,"type":"number"}}},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"outcome_msg":{"items":{"description":"Outcome message generated during last rule run.","type":"string"},"nullable":true,"type":"array"},"outcome_order":{"description":"Order of the outcome.","type":"number"},"warning":{"description":"Warning of last rule execution.","enum":["read","decrypt","execute","unknown","license","timeout","disabled","validate","maxExecutableActions","maxAlerts","maxQueuedActions","ruleExecution"],"nullable":true,"type":"string"}},"required":["outcome","alerts_count"]},"mapped_params":{"additionalProperties":{},"type":"object"},"monitoring":{"additionalProperties":false,"description":"Monitoring details of the rule.","type":"object","properties":{"run":{"additionalProperties":false,"description":"Rule run details.","type":"object","properties":{"calculated_metrics":{"additionalProperties":false,"description":"Calculation of different percentiles and success ratio.","type":"object","properties":{"p50":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"},"success_ratio":{"type":"number"}},"required":["success_ratio"]},"history":{"description":"History of the rule run.","items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule run.","type":"number"},"outcome":{"description":"Outcome of last run of the rule. Value could be succeeded, warning or failed.","enum":["succeeded","warning","failed"],"type":"string"},"success":{"description":"Indicates whether the rule run was successful.","type":"boolean"},"timestamp":{"description":"Time of rule run.","type":"number"}},"required":["success","timestamp"]},"type":"array"},"last_run":{"additionalProperties":false,"type":"object","properties":{"metrics":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of most recent rule run.","type":"number"},"gap_duration_s":{"description":"Duration in seconds of rule run gap.","nullable":true,"type":"number"},"gap_range":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"gte":{"description":"End of the gap range.","type":"string"},"lte":{"description":"Start of the gap range.","type":"string"}},"required":["lte","gte"]},"total_alerts_created":{"description":"Total number of alerts created during last rule run.","nullable":true,"type":"number"},"total_alerts_detected":{"description":"Total number of alerts detected during last rule run.","nullable":true,"type":"number"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during last rule run in milliseconds.","nullable":true,"type":"number"},"total_search_duration_ms":{"description":"Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.","nullable":true,"type":"number"}}},"timestamp":{"description":"Time of the most recent rule run.","type":"string"}},"required":["timestamp","metrics"]}},"required":["history","calculated_metrics","last_run"]}},"required":["run"]},"mute_all":{"description":"Indicates whether all alerts are muted.","type":"boolean"},"muted_alert_ids":{"items":{"description":"List of identifiers of muted alerts. ","type":"string"},"type":"array"},"name":{"description":" The name of the rule.","type":"string"},"next_run":{"description":"Date and time of the next run of the rule.","nullable":true,"type":"string"},"notify_when":{"description":"Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","enum":["onActionGroupChange","onActiveAlert","onThrottleInterval"],"nullable":true,"type":"string"},"params":{"additionalProperties":{},"description":"The parameters for the rule.","type":"object"},"revision":{"description":"The rule revision number.","type":"number"},"rule_type_id":{"description":"The rule type identifier.","type":"string"},"running":{"description":"Indicates whether the rule is running.","nullable":true,"type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"interval":{"description":"The interval is specified in seconds, minutes, hours, or days.","type":"string"}},"required":["interval"]},"scheduled_task_id":{"description":"Identifier of the scheduled task.","type":"string"},"snooze_schedule":{"items":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"Duration of the rule snooze schedule.","type":"number"},"id":{"description":"Identifier of the rule snooze schedule.","type":"string"},"rRule":{"additionalProperties":false,"type":"object","properties":{"byhour":{"items":{"description":"Indicates hours of the day to recur.","type":"number"},"nullable":true,"type":"array"},"byminute":{"items":{"description":"Indicates minutes of the hour to recur.","type":"number"},"nullable":true,"type":"array"},"bymonth":{"items":{"description":"Indicates months of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"bymonthday":{"items":{"description":"Indicates the days of the month to recur.","type":"number"},"nullable":true,"type":"array"},"bysecond":{"items":{"description":"Indicates seconds of the day to recur.","type":"number"},"nullable":true,"type":"array"},"bysetpos":{"items":{"description":"A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.","type":"number"},"nullable":true,"type":"array"},"byweekday":{"items":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination."},"nullable":true,"type":"array"},"byweekno":{"items":{"description":"Indicates number of the week hours to recur.","type":"number"},"nullable":true,"type":"array"},"byyearday":{"items":{"description":"Indicates the days of the year that this rule should recur.","type":"number"},"nullable":true,"type":"array"},"count":{"description":"Number of times the rule should recur until it stops.","type":"number"},"dtstart":{"description":"Rule start date in Coordinated Universal Time (UTC).","type":"string"},"freq":{"description":"Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.","enum":[0,1,2,3,4,5,6],"type":"integer"},"interval":{"description":"Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.","type":"number"},"tzid":{"description":"Indicates timezone abbreviation.","type":"string"},"until":{"description":"Recur the rule until this date.","type":"string"},"wkst":{"description":"Indicates the start of week, defaults to Monday.","enum":["MO","TU","WE","TH","FR","SA","SU"],"type":"string"}},"required":["dtstart","tzid"]},"skipRecurrences":{"items":{"description":"Skips recurrence of rule on this date.","type":"string"},"type":"array"}},"required":["duration","rRule"]},"type":"array"},"tags":{"items":{"description":"The tags for the rule.","type":"string"},"type":"array"},"throttle":{"deprecated":true,"description":"Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.","nullable":true,"type":"string"},"updated_at":{"description":"The date and time that the rule was updated most recently.","type":"string"},"updated_by":{"description":"The identifier for the user that updated this rule most recently.","nullable":true,"type":"string"},"view_in_app_relative_url":{"description":"Relative URL to view rule in the app.","nullable":true,"type":"string"}},"required":["id","enabled","name","tags","rule_type_id","consumer","schedule","actions","params","created_by","updated_by","created_at","updated_at","api_key_owner","mute_all","muted_alert_ids","execution_status","revision"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."}},"summary":"Get information about rules","tags":["alerting"]}},"/api/apm/agent_keys":{"post":{"description":"Create a new agent key for APM.\nThe user creating an APM agent API key must have at least the `manage_own_api_key` cluster privilege and the APM application-level privileges that it wishes to grant.\nAfter it is created, you can copy the API key (Base64 encoded) and use it to to authorize requests from APM agents to the APM Server.\n","operationId":"createAgentKey","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"createAgentKeyRequest1":{"$ref":"#/components/examples/APM_UI_agent_keys_object_post_request1"}},"schema":{"$ref":"#/components/schemas/APM_UI_agent_keys_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"createAgentKeyResponse1":{"$ref":"#/components/examples/APM_UI_agent_keys_object_post_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_agent_keys_response"}}},"description":"Agent key created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"}},"summary":"Create an APM agent key","tags":["APM agent keys"]}},"/api/apm/fleet/apm_server_schema":{"post":{"operationId":"saveApmServerSchema","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"additionalProperties":true,"description":"Schema object","example":{"foo":"bar"},"type":"object"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Save APM server schema","tags":["APM server schema"]}},"/api/apm/services/{serviceName}/annotation":{"post":{"description":"Create a new annotation for a specific service.","operationId":"createAnnotation","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"},{"description":"The name of the service","in":"path","name":"serviceName","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_create_annotation_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"createAnnotationResponse1":{"$ref":"#/components/examples/APM_UI_annotation_object_post_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_create_annotation_response"}}},"description":"Annotation created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Create a service annotation","tags":["APM annotations"],"x-codeSamples":[{"lang":"Curl","source":"curl -X POST \\\nhttp://localhost:5601/api/apm/services/opbeans-java/annotation \\\n-H 'Content-Type: application/json' \\\n-H 'kbn-xsrf: true' \\\n-H 'Authorization: Basic YhUlubWZhM0FDbnlQeE6WRtaW49FQmSGZ4RUWXdX' \\\n-d '{\n \"@timestamp\": \"2020-05-08T10:31:30.452Z\",\n \"service\": {\n \"version\": \"1.2\"\n },\n \"message\": \"Deployment 1.2\"\n }'\n"}]}},"/api/apm/services/{serviceName}/annotation/search":{"get":{"description":"Search for annotations related to a specific service.","operationId":"getAnnotation","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"The name of the service","in":"path","name":"serviceName","required":true,"schema":{"type":"string"}},{"description":"The environment to filter annotations by","in":"query","name":"environment","required":false,"schema":{"type":"string"}},{"description":"The start date for the search","in":"query","name":"start","required":false,"schema":{"type":"string"}},{"description":"The end date for the search","in":"query","name":"end","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_annotation_search_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"}},"summary":"Search for annotations","tags":["APM annotations"]}},"/api/apm/settings/agent-configuration":{"delete":{"operationId":"deleteAgentConfiguration","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"deleteAgentConfigurationRequest1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_delete_request1"}},"schema":{"$ref":"#/components/schemas/APM_UI_service_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_delete_agent_configurations_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Delete agent configuration","tags":["APM agent configuration"]},"get":{"operationId":"getAgentConfigurations","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"}],"responses":{"200":{"content":{"application/json":{"examples":{"getAgentConfigurationsResponseExample1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_get_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_agent_configurations_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Get a list of agent configurations","tags":["APM agent configuration"]},"put":{"operationId":"createUpdateAgentConfiguration","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"},{"description":"If the config exists ?overwrite=true is required","in":"query","name":"overwrite","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"examples":{"createUpdateAgentConfigurationRequestExample1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_put_request1"}},"schema":{"$ref":"#/components/schemas/APM_UI_agent_configuration_intake_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Create or update agent configuration","tags":["APM agent configuration"]}},"/api/apm/settings/agent-configuration/agent_name":{"get":{"description":"Retrieve `agentName` for a service.","operationId":"getAgentNameForService","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"The name of the service","example":"node","in":"query","name":"serviceName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_service_agent_name_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Get agent name for service","tags":["APM agent configuration"]}},"/api/apm/settings/agent-configuration/environments":{"get":{"operationId":"getEnvironmentsForService","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"The name of the service","in":"query","name":"serviceName","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_service_environments_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Get environments for service","tags":["APM agent configuration"]}},"/api/apm/settings/agent-configuration/search":{"post":{"description":"This endpoint enables you to search for a single agent configuration and update the 'applied_by_agent' field.\n","operationId":"searchSingleConfiguration","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"searchSingleConfigurationRequest1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_search_request1"}},"schema":{"$ref":"#/components/schemas/APM_UI_search_agent_configuration_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"searchSingleConfigurationResponse1":{"$ref":"#/components/examples/APM_UI_agent_configuration_intake_object_search_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_search_agent_configuration_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Lookup single agent configuration","tags":["APM agent configuration"]}},"/api/apm/settings/agent-configuration/view":{"get":{"operationId":"getSingleAgentConfiguration","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"Service name","example":"node","in":"query","name":"name","schema":{"type":"string"}},{"description":"Service environment","example":"prod","in":"query","name":"environment","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_single_agent_configuration_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_404_response"}}},"description":"Not found response"}},"summary":"Get single agent configuration","tags":["APM agent configuration"]}},"/api/apm/sourcemaps":{"get":{"description":"Get an array of Fleet artifacts, including source map uploads. You must have `read` or `all` Kibana privileges for the APM and User Experience feature.\n","operationId":"getSourceMaps","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"description":"Page number","in":"query","name":"page","schema":{"type":"number"}},{"description":"Number of records per page","in":"query","name":"perPage","schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getSourceMapsResponse1":{"$ref":"#/components/examples/APM_UI_source_maps_get_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_source_maps_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_501_response"}}},"description":"Not Implemented response"}},"summary":"Get source maps","tags":["APM sourcemaps"],"x-codeSamples":[{"lang":"Curl","source":"curl -X GET \"http://localhost:5601/api/apm/sourcemaps\" \\\n-H 'Content-Type: application/json' \\\n-H 'kbn-xsrf: true' \\\n-H 'Authorization: ApiKey ${YOUR_API_KEY}'\n"}]},"post":{"description":"Upload a source map for a specific service and version. You must have `all` Kibana privileges for the APM and User Experience feature.\nThe maximum payload size is `1mb`. If you attempt to upload a source map that exceeds the maximum payload size, you will get a 413 error. Before uploading source maps that exceed this default, change the maximum payload size allowed by Kibana with the `server.maxPayload` variable.\n","operationId":"uploadSourceMap","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/APM_UI_upload_source_map_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"uploadSourceMapResponse1":{"$ref":"#/components/examples/APM_UI_source_maps_upload_200_response1"}},"schema":{"$ref":"#/components/schemas/APM_UI_upload_source_maps_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_501_response"}}},"description":"Not Implemented response"}},"summary":"Upload a source map","tags":["APM sourcemaps"],"x-codeSamples":[{"lang":"Curl","source":"curl -X POST \"http://localhost:5601/api/apm/sourcemaps\" \\\n-H 'Content-Type: multipart/form-data' \\\n-H 'kbn-xsrf: true' \\\n-H 'Authorization: ApiKey ${YOUR_API_KEY}' \\\n-F 'service_name=\"foo\"' \\\n-F 'service_version=\"1.0.0\"' \\\n-F 'bundle_filepath=\"/test/e2e/general-usecase/bundle.js\"' \\\n-F 'sourcemap=\"{\\\"version\\\":3,\\\"file\\\":\\\"static/js/main.chunk.js\\\",\\\"sources\\\":[\\\"fleet-source-map-client/src/index.css\\\",\\\"fleet-source-map-client/src/App.js\\\",\\\"webpack:///./src/index.css?bb0a\\\",\\\"fleet-source-map-client/src/index.js\\\",\\\"fleet-source-map-client/src/reportWebVitals.js\\\"],\\\"sourcesContent\\\":[\\\"content\\\"],\\\"mappings\\\":\\\"mapping\\\",\\\"sourceRoot\\\":\\\"\\\"}\"' \n"}]}},"/api/apm/sourcemaps/{id}":{"delete":{"description":"Delete a previously uploaded source map. You must have `all` Kibana privileges for the APM and User Experience feature.\n","operationId":"deleteSourceMap","parameters":[{"$ref":"#/components/parameters/APM_UI_elastic_api_version"},{"$ref":"#/components/parameters/APM_UI_kbn_xsrf"},{"description":"Source map identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_400_response"}}},"description":"Bad Request response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_403_response"}}},"description":"Forbidden response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_500_response"}}},"description":"Internal Server Error response"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APM_UI_501_response"}}},"description":"Not Implemented response"}},"summary":"Delete source map","tags":["APM sourcemaps"],"x-codeSamples":[{"lang":"Curl","source":"curl -X DELETE \"http://localhost:5601/api/apm/sourcemaps/apm:foo-1.0.0-644fd5a9\" \\\n-H 'Content-Type: application/json' \\\n-H 'kbn-xsrf: true' \\\n-H 'Authorization: ApiKey ${YOUR_API_KEY}'\n"}]}},"/api/asset_criticality":{"delete":{"description":"Delete the asset criticality record for a specific entity.","operationId":"DeleteAssetCriticalityRecord","parameters":[{"description":"The ID value of the asset.","example":"my_host","in":"query","name":"id_value","required":true,"schema":{"type":"string"}},{"description":"The field representing the ID.","example":"host.name","in":"query","name":"id_field","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IdField"}},{"description":"If 'wait_for' the request will wait for the index refresh.","in":"query","name":"refresh","required":false,"schema":{"enum":["wait_for"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"description":"True if the record was deleted or false if the record did not exist.","type":"boolean"},"record":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecord","description":"The deleted record if it existed."}},"required":["deleted"]}}},"description":"Successful response"},"400":{"description":"Invalid request"}},"summary":"Delete an asset criticality record","tags":["Security Entity Analytics API"]},"get":{"description":"Get the asset criticality record for a specific entity.","operationId":"GetAssetCriticalityRecord","parameters":[{"description":"The ID value of the asset.","example":"my_host","in":"query","name":"id_value","required":true,"schema":{"type":"string"}},{"description":"The field representing the ID.","example":"host.name","in":"query","name":"id_field","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IdField"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecord"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"404":{"description":"Criticality record not found"}},"summary":"Get an asset criticality record","tags":["Security Entity Analytics API"]},"post":{"description":"Create or update an asset criticality record for a specific entity.\n\nIf a record already exists for the specified entity, that record is overwritten with the specified value. If a record doesn't exist for the specified entity, a new record is created.\n","operationId":"CreateAssetCriticalityRecord","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_CreateAssetCriticalityRecord"},{"type":"object","properties":{"refresh":{"description":"If 'wait_for' the request will wait for the index refresh.","enum":["wait_for"],"type":"string"}}}],"example":{"criticality_level":"high_impact","id_field":"host.name","id_value":"my_host"}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecord"}}},"description":"Successful response"},"400":{"description":"Invalid request"}},"summary":"Upsert an asset criticality record","tags":["Security Entity Analytics API"]}},"/api/asset_criticality/bulk":{"post":{"description":"Bulk upsert up to 1000 asset criticality records.\n\nIf asset criticality records already exist for the specified entities, those records are overwritten with the specified values. If asset criticality records don't exist for the specified entities, new records are created.\n","operationId":"BulkUpsertAssetCriticalityRecords","requestBody":{"content":{"application/json":{"schema":{"example":{"records":[{"criticality_level":"low_impact","id_field":"host.name","id_value":"host-1"},{"criticality_level":"medium_impact","id_field":"host.name","id_value":"host-2"}]},"type":"object","properties":{"records":{"items":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecordIdParts"},{"type":"object","properties":{"criticality_level":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevelsForBulkUpload"}},"required":["criticality_level"]}]},"maxItems":1000,"minItems":1,"type":"array"}},"required":["records"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"example":{"errors":[{"index":0,"message":"Invalid ID field"}],"stats":{"failed":1,"successful":1,"total":2}},"type":"object","properties":{"errors":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityBulkUploadErrorItem"},"type":"array"},"stats":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityBulkUploadStats"}},"required":["errors","stats"]}}},"description":"Bulk upload successful"},"413":{"description":"File too large"}},"summary":"Bulk upsert asset criticality records","tags":["Security Entity Analytics API"]}},"/api/asset_criticality/list":{"get":{"description":"List asset criticality records, paging, sorting and filtering as needed.","operationId":"FindAssetCriticalityRecords","parameters":[{"description":"The field to sort by.","in":"query","name":"sort_field","required":false,"schema":{"enum":["id_value","id_field","criticality_level","\\@timestamp"],"type":"string"}},{"description":"The order to sort by.","in":"query","name":"sort_direction","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"The number of records to return per page.","in":"query","name":"per_page","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"The kuery to filter by.","in":"query","name":"kuery","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"page":1,"per_page":10,"records":[{"@timestamp":"2024-08-02T14:40:35.705Z","asset":{"criticality":"medium_impact"},"criticality_level":"medium_impact","host":{"asset":{"criticality":"medium_impact"},"name":"my_other_host"},"id_field":"host.name","id_value":"my_other_host"},{"@timestamp":"2024-08-02T11:15:34.290Z","asset":{"criticality":"high_impact"},"criticality_level":"high_impact","host":{"asset":{"criticality":"high_impact"},"name":"my_host"},"id_field":"host.name","id_value":"my_host"}],"total":2},"type":"object","properties":{"page":{"minimum":1,"type":"integer"},"per_page":{"maximum":1000,"minimum":1,"type":"integer"},"records":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecord"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["records","page","per_page","total"]}}},"description":"Successfully retrieved asset criticality records"}},"summary":"List asset criticality records","tags":["Security Entity Analytics API"]}},"/api/cases":{"delete":{"description":"You must have `read` or `all` privileges and the `delete` sub-feature privilege for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n","operationId":"deleteCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_ids"}],"responses":{"204":{"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Delete cases","tags":["cases"]},"patch":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating.\n","operationId":"updateCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"updateCaseRequest":{"$ref":"#/components/examples/Cases_update_case_request"}},"schema":{"$ref":"#/components/schemas/Cases_update_case_request"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"updateCaseResponse":{"$ref":"#/components/examples/Cases_update_case_response"}},"schema":{"items":{"$ref":"#/components/schemas/Cases_case_response_properties"},"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Update cases","tags":["cases"]},"post":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating.\n","operationId":"createCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"createCaseRequest":{"$ref":"#/components/examples/Cases_create_case_request"}},"schema":{"$ref":"#/components/schemas/Cases_create_case_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"createCaseResponse":{"$ref":"#/components/examples/Cases_create_case_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Create a case","tags":["cases"]}},"/api/cases/_find":{"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n","operationId":"findCasesDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_assignees_filter"},{"$ref":"#/components/parameters/Cases_category"},{"$ref":"#/components/parameters/Cases_defaultSearchOperator"},{"$ref":"#/components/parameters/Cases_from"},{"$ref":"#/components/parameters/Cases_owner_filter"},{"$ref":"#/components/parameters/Cases_page_index"},{"$ref":"#/components/parameters/Cases_page_size"},{"$ref":"#/components/parameters/Cases_reporters"},{"$ref":"#/components/parameters/Cases_search"},{"$ref":"#/components/parameters/Cases_searchFields"},{"$ref":"#/components/parameters/Cases_severity"},{"$ref":"#/components/parameters/Cases_sortField"},{"$ref":"#/components/parameters/Cases_sort_order"},{"$ref":"#/components/parameters/Cases_status"},{"$ref":"#/components/parameters/Cases_tags"},{"$ref":"#/components/parameters/Cases_to"}],"responses":{"200":{"content":{"application/json":{"examples":{"findCaseResponse":{"$ref":"#/components/examples/Cases_find_case_response"}},"schema":{"type":"object","properties":{"cases":{"items":{"$ref":"#/components/schemas/Cases_case_response_properties"},"maxItems":10000,"type":"array"},"count_closed_cases":{"type":"integer"},"count_in_progress_cases":{"type":"integer"},"count_open_cases":{"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Search cases","tags":["cases"]}},"/api/cases/{caseId}":{"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n","operationId":"getCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getDefaultCaseResponse":{"$ref":"#/components/examples/Cases_get_case_response"},"getDefaultObservabilityCaseReponse":{"$ref":"#/components/examples/Cases_get_case_observability_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case information","tags":["cases"]}},"/api/cases/{caseId}/alerts":{"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n","operationId":"getCaseAlertsDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getCaseAlertsResponse":{"$ref":"#/components/examples/Cases_get_case_alerts_response"}},"schema":{"items":{"$ref":"#/components/schemas/Cases_alert_response_properties"},"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get all alerts for a case","tags":["cases"],"x-state":"Technical preview"}},"/api/cases/{caseId}/comments":{"delete":{"description":"Deletes all comments and alerts from a case. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n","operationId":"deleteCaseCommentsDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"}],"responses":{"204":{"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Delete all case comments and alerts","tags":["cases"]},"patch":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. NOTE: You cannot change the comment type or the owner of a comment.\n","operationId":"updateCaseCommentDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateCaseCommentRequest":{"$ref":"#/components/examples/Cases_update_comment_request"}},"schema":{"$ref":"#/components/schemas/Cases_update_case_comment_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"updateCaseCommentResponse":{"$ref":"#/components/examples/Cases_update_comment_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Update a case comment or alert","tags":["cases"]},"post":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. NOTE: Each case can have a maximum of 1,000 alerts.\n","operationId":"addCaseCommentDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"}],"requestBody":{"content":{"application/json":{"examples":{"createCaseCommentRequest":{"$ref":"#/components/examples/Cases_add_comment_request"}},"schema":{"$ref":"#/components/schemas/Cases_add_case_comment_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"createCaseCommentResponse":{"$ref":"#/components/examples/Cases_add_comment_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Add a case comment or alert","tags":["cases"]}},"/api/cases/{caseId}/comments/_find":{"get":{"description":"Retrieves a paginated list of comments for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n","operationId":"findCaseCommentsDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_page_index"},{"$ref":"#/components/parameters/Cases_page_size"},{"$ref":"#/components/parameters/Cases_sort_order"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Find case comments and alerts","tags":["cases"]}},"/api/cases/{caseId}/comments/{commentId}":{"delete":{"description":"You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n","operationId":"deleteCaseCommentDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_comment_id"}],"responses":{"204":{"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Delete a case comment or alert","tags":["cases"]},"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n","operationId":"getCaseCommentDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_comment_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getCaseCommentResponse":{"$ref":"#/components/examples/Cases_get_comment_response"}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_alert_comment_response_properties"},{"$ref":"#/components/schemas/Cases_user_comment_response_properties"}]}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get a case comment or alert","tags":["cases"]}},"/api/cases/{caseId}/connector/{connectorId}/_push":{"post":{"description":"You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. You must also have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're pushing.\n","operationId":"pushCaseDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_connector_id"},{"$ref":"#/components/parameters/Cases_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"nullable":true,"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"pushCaseResponse":{"$ref":"#/components/examples/Cases_push_case_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Push a case to an external service","tags":["cases"]}},"/api/cases/{caseId}/files":{"post":{"description":"Attach a file to a case. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. The request must include:\n- The `Content-Type: multipart/form-data` HTTP header.\n- The location of the file that is being uploaded.\n","operationId":"addCaseFileDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_case_id"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Cases_add_case_file_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"addCaseFileResponse":{"$ref":"#/components/examples/Cases_add_comment_response"}},"schema":{"$ref":"#/components/schemas/Cases_case_response_properties"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Attach a file to a case","tags":["cases"]}},"/api/cases/{caseId}/user_actions/_find":{"get":{"description":"Retrives a paginated list of user activity for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n","operationId":"findCaseActivityDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_case_id"},{"$ref":"#/components/parameters/Cases_page_index"},{"$ref":"#/components/parameters/Cases_page_size"},{"$ref":"#/components/parameters/Cases_sort_order"},{"$ref":"#/components/parameters/Cases_user_action_types"}],"responses":{"200":{"content":{"application/json":{"examples":{"findCaseActivityResponse":{"$ref":"#/components/examples/Cases_find_case_activity_response"}},"schema":{"type":"object","properties":{"page":{"type":"integer"},"perPage":{"type":"integer"},"total":{"type":"integer"},"userActions":{"items":{"$ref":"#/components/schemas/Cases_user_actions_find_response_properties"},"maxItems":10000,"type":"array"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Find case activity","tags":["cases"]}},"/api/cases/alerts/{alertId}":{"get":{"description":"You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n","operationId":"getCasesByAlertDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_alert_id"},{"$ref":"#/components/parameters/Cases_owner_filter"}],"responses":{"200":{"content":{"application/json":{"schema":{"example":[{"id":"06116b80-e1c3-11ec-be9b-9b1838238ee6","title":"security_case"}],"items":{"type":"object","properties":{"id":{"description":"The case identifier.","type":"string"},"title":{"description":"The case title.","type":"string"}}},"maxItems":10000,"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get cases for an alert","tags":["cases"],"x-state":"Technical preview"}},"/api/cases/configure":{"get":{"description":"Get setting details such as the closure type, custom fields, templatse, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.\n","operationId":"getCaseConfigurationDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_owner_filter"}],"responses":{"200":{"content":{"application/json":{"examples":{"getConfigurationResponse":{"$ref":"#/components/examples/Cases_get_case_configuration_response"}},"schema":{"items":{"type":"object","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"created_at":{"example":"2022-06-01T17:07:17.767Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"customFields":{"description":"Custom fields configuration details.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}}},"type":"array"},"error":{"example":null,"nullable":true,"type":"string"},"id":{"example":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","type":"string"},"mappings":{"items":{"type":"object","properties":{"action_type":{"example":"overwrite","type":"string"},"source":{"example":"title","type":"string"},"target":{"example":"summary","type":"string"}}},"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"templates":{"$ref":"#/components/schemas/Cases_templates"},"updated_at":{"example":"2022-06-01T19:58:48.169Z","format":"date-time","nullable":true,"type":"string"},"updated_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"version":{"example":"WzIwNzMsMV0=","type":"string"}}},"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case settings","tags":["cases"]},"post":{"description":"Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.\n","operationId":"setCaseConfigurationDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"setCaseConfigRequest":{"$ref":"#/components/examples/Cases_set_case_configuration_request"}},"schema":{"$ref":"#/components/schemas/Cases_set_case_configuration_request"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"setCaseConfigResponse":{"$ref":"#/components/examples/Cases_set_case_configuration_response"}},"schema":{"type":"object","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"created_at":{"example":"2022-06-01T17:07:17.767Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"customFields":{"description":"Custom fields configuration details.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}}},"type":"array"},"error":{"example":null,"nullable":true,"type":"string"},"id":{"example":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","type":"string"},"mappings":{"items":{"type":"object","properties":{"action_type":{"example":"overwrite","type":"string"},"source":{"example":"title","type":"string"},"target":{"example":"summary","type":"string"}}},"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"templates":{"$ref":"#/components/schemas/Cases_templates"},"updated_at":{"example":"2022-06-01T19:58:48.169Z","format":"date-time","nullable":true,"type":"string"},"updated_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"version":{"example":"WzIwNzMsMV0=","type":"string"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Add case settings","tags":["cases"]}},"/api/cases/configure/{configurationId}":{"patch":{"description":"Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.\n","operationId":"updateCaseConfigurationDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_kbn_xsrf"},{"$ref":"#/components/parameters/Cases_configuration_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateCaseConfigurationRequest":{"$ref":"#/components/examples/Cases_update_case_configuration_request"}},"schema":{"$ref":"#/components/schemas/Cases_update_case_configuration_request"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"updateCaseConfigurationResponse":{"$ref":"#/components/examples/Cases_update_case_configuration_response"}},"schema":{"type":"object","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"created_at":{"example":"2022-06-01T17:07:17.767Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"customFields":{"description":"Custom fields configuration details.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}}},"type":"array"},"error":{"example":null,"nullable":true,"type":"string"},"id":{"example":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","type":"string"},"mappings":{"items":{"type":"object","properties":{"action_type":{"example":"overwrite","type":"string"},"source":{"example":"title","type":"string"},"target":{"example":"summary","type":"string"}}},"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"templates":{"$ref":"#/components/schemas/Cases_templates"},"updated_at":{"example":"2022-06-01T19:58:48.169Z","format":"date-time","nullable":true,"type":"string"},"updated_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"version":{"example":"WzIwNzMsMV0=","type":"string"}}}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Update case settings","tags":["cases"]}},"/api/cases/configure/connectors/_find":{"get":{"description":"Get information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n","operationId":"findCaseConnectorsDefaultSpace","responses":{"200":{"content":{"application/json":{"examples":{"findConnectorResponse":{"$ref":"#/components/examples/Cases_find_connector_response"}},"schema":{"items":{"type":"object","properties":{"actionTypeId":{"$ref":"#/components/schemas/Cases_connector_types"},"config":{"additionalProperties":true,"type":"object","properties":{"apiUrl":{"type":"string"},"projectKey":{"type":"string"}}},"id":{"type":"string"},"isDeprecated":{"type":"boolean"},"isMissingSecrets":{"type":"boolean"},"isPreconfigured":{"type":"boolean"},"name":{"type":"string"},"referencedByCount":{"type":"integer"}}},"maxItems":1000,"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case connectors","tags":["cases"]}},"/api/cases/reporters":{"get":{"description":"Returns information about the users who opened cases. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged.\n","operationId":"getCaseReportersDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_owner_filter"}],"responses":{"200":{"content":{"application/json":{"examples":{"getReportersResponse":{"$ref":"#/components/examples/Cases_get_reporters_response"}},"schema":{"items":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"maxItems":10000,"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case creators","tags":["cases"]}},"/api/cases/tags":{"get":{"description":"Aggregates and returns a list of case tags. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n","operationId":"getCaseTagsDefaultSpace","parameters":[{"$ref":"#/components/parameters/Cases_owner_filter"}],"responses":{"200":{"content":{"application/json":{"examples":{"getTagsResponse":{"$ref":"#/components/examples/Cases_get_tags_response"}},"schema":{"items":{"type":"string"},"maxItems":10000,"type":"array"}}},"description":"Indicates a successful call."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cases_4xx_response"}}},"description":"Authorization information is missing or invalid."}},"summary":"Get case tags","tags":["cases"]}},"/api/dashboards/dashboard":{"get":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"get-dashboards-dashboard","parameters":[{"description":"The page number to return. Default is \"1\".","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"number"}},{"description":"The number of dashboards to display on each page (max 1000). Default is \"20\".","in":"query","name":"perPage","required":false,"schema":{"maximum":1000,"minimum":1,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":true,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"description":{"default":"","description":"A short description.","type":"string"},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"title":{"description":"A human-readable title for the dashboard","type":"string"}},"required":["title"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"error":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"metadata":{"additionalProperties":true,"type":"object","properties":{}},"statusCode":{"type":"number"}},"required":["error","message","statusCode"]},"id":{"type":"string"},"managed":{"type":"boolean"},"namespaces":{"items":{"type":"string"},"type":"array"},"originId":{"type":"string"},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"string"}},"required":["id","type","attributes","references"]},"type":"array"},"total":{"type":"number"}},"required":["items","total"]}}}}},"summary":"Get a list of dashboards","tags":["Dashboards"],"x-state":"Technical Preview"}},"/api/dashboards/dashboard/{id}":{"delete":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"delete-dashboards-dashboard-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"A unique identifier for the dashboard.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{},"summary":"Delete a dashboard","tags":["Dashboards"],"x-state":"Technical Preview"},"get":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"get-dashboards-dashboard-id","parameters":[{"description":"A unique identifier for the dashboard.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y","i"]},"panels":{"items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData","panels"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"error":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"metadata":{"additionalProperties":true,"type":"object","properties":{}},"statusCode":{"type":"number"}},"required":["error","message","statusCode"]},"id":{"type":"string"},"managed":{"type":"boolean"},"namespaces":{"items":{"type":"string"},"type":"array"},"originId":{"type":"string"},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"string"}},"required":["id","type","attributes","references"]},"meta":{"additionalProperties":false,"type":"object","properties":{"aliasPurpose":{"enum":["savedObjectConversion","savedObjectImport"],"type":"string"},"aliasTargetId":{"type":"string"},"outcome":{"enum":["exactMatch","aliasMatch","conflict"],"type":"string"}},"required":["outcome"]}},"required":["item","meta"]}}}}},"summary":"Get a dashboard","tags":["Dashboards"],"x-state":"Technical Preview"},"post":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"post-dashboards-dashboard-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"A unique identifier for the dashboard.","in":"path","name":"id","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"description":"The unique identifier of the panel","type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"description":"The unique ID of the panel.","type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"description":"The unique identifier of the section","type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y"]},"panels":{"default":[],"description":"The panels that belong to the section.","items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"description":"The unique identifier of the panel","type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"description":"The unique ID of the panel.","type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"spaces":{"items":{"type":"string"},"type":"array"}},"required":["attributes"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y","i"]},"panels":{"items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData","panels"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"error":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"metadata":{"additionalProperties":true,"type":"object","properties":{}},"statusCode":{"type":"number"}},"required":["error","message","statusCode"]},"id":{"type":"string"},"managed":{"type":"boolean"},"namespaces":{"items":{"type":"string"},"type":"array"},"originId":{"type":"string"},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"string"}},"required":["id","type","attributes","references"]}},"required":["item"]}}}}},"summary":"Create a dashboard","tags":["Dashboards"],"x-state":"Technical Preview"},"put":{"description":"This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.","operationId":"put-dashboards-dashboard-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"A unique identifier for the dashboard.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"description":"The unique identifier of the panel","type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"description":"The unique ID of the panel.","type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"description":"The unique identifier of the section","type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y"]},"panels":{"default":[],"description":"The panels that belong to the section.","items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"description":"The unique identifier of the panel","type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"description":"The unique ID of the panel.","type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"}},"required":["attributes"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"attributes":{"additionalProperties":false,"type":"object","properties":{"controlGroupInput":{"additionalProperties":false,"type":"object","properties":{"autoApplySelections":{"default":true,"description":"Show apply selections button in controls.","type":"boolean"},"chainingSystem":{"default":"HIERARCHICAL","description":"The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".","enum":["NONE","HIERARCHICAL"],"type":"string"},"controls":{"default":[],"description":"An array of control panels and their state in the control group.","items":{"additionalProperties":true,"type":"object","properties":{"controlConfig":{"additionalProperties":{},"type":"object"},"grow":{"default":false,"description":"Expand width of the control panel to fit available space.","type":"boolean"},"id":{"description":"The unique ID of the control.","type":"string"},"order":{"description":"The order of the control panel in the control group.","type":"number"},"type":{"description":"The type of the control panel.","type":"string"},"width":{"default":"medium","description":"Minimum width of the control panel in the control group.","enum":["small","medium","large"],"type":"string"}},"required":["type","order"]},"type":"array"},"enhancements":{"additionalProperties":{},"type":"object"},"ignoreParentSettings":{"additionalProperties":false,"type":"object","properties":{"ignoreFilters":{"default":false,"description":"Ignore global filters in controls.","type":"boolean"},"ignoreQuery":{"default":false,"description":"Ignore the global query bar in controls.","type":"boolean"},"ignoreTimerange":{"default":false,"description":"Ignore the global time range in controls.","type":"boolean"},"ignoreValidations":{"default":false,"description":"Ignore validations in controls.","type":"boolean"}}},"labelPosition":{"default":"oneLine","description":"Position of the labels for controls. For example, \"oneLine\", \"twoLine\".","enum":["oneLine","twoLine"],"type":"string"}},"required":["ignoreParentSettings"]},"description":{"default":"","description":"A short description.","type":"string"},"kibanaSavedObjectMeta":{"additionalProperties":false,"default":{},"description":"A container for various metadata","type":"object","properties":{"searchSource":{"additionalProperties":true,"type":"object","properties":{"filter":{"items":{"additionalProperties":false,"description":"A filter for the search source.","type":"object","properties":{"$state":{"additionalProperties":false,"type":"object","properties":{"store":{"description":"Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').","enum":["appState","globalState"],"type":"string"}},"required":["store"]},"meta":{"additionalProperties":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{},"type":{"type":"string"},"value":{"type":"string"}},"required":["params"]},"query":{"additionalProperties":{},"type":"object"}},"required":["meta"]},"type":"array"},"query":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The query language such as KQL or Lucene.","type":"string"},"query":{"anyOf":[{"description":"A text-based query such as Kibana Query Language (KQL) or Lucene query language.","type":"string"},{"additionalProperties":{},"type":"object"}]}},"required":["query","language"]},"sort":{"items":{"additionalProperties":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"additionalProperties":false,"type":"object","properties":{"format":{"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]},{"additionalProperties":false,"type":"object","properties":{"numeric_type":{"enum":["double","long","date","date_nanos"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["order"]}]},"type":"object"},"type":"array"},"type":{"type":"string"}}}}},"options":{"additionalProperties":false,"type":"object","properties":{"hidePanelTitles":{"default":false,"description":"Hide the panel titles in the dashboard.","type":"boolean"},"syncColors":{"default":true,"description":"Synchronize colors between related panels in the dashboard.","type":"boolean"},"syncCursor":{"default":true,"description":"Synchronize cursor position between related panels in the dashboard.","type":"boolean"},"syncTooltips":{"default":true,"description":"Synchronize tooltips between related panels in the dashboard.","type":"boolean"},"useMargins":{"default":true,"description":"Show margins between panels in the dashboard layout.","type":"boolean"}}},"panels":{"default":[],"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},{"additionalProperties":false,"type":"object","properties":{"collapsed":{"description":"The collapsed state of the section.","type":"boolean"},"gridData":{"additionalProperties":false,"type":"object","properties":{"i":{"type":"string"},"y":{"description":"The y coordinate of the section in grid units","type":"number"}},"required":["y","i"]},"panels":{"items":{"additionalProperties":false,"type":"object","properties":{"gridData":{"additionalProperties":false,"type":"object","properties":{"h":{"default":15,"description":"The height of the panel in grid units","minimum":1,"type":"number"},"i":{"type":"string"},"w":{"default":24,"description":"The width of the panel in grid units","maximum":48,"minimum":1,"type":"number"},"x":{"description":"The x coordinate of the panel in grid units","type":"number"},"y":{"description":"The y coordinate of the panel in grid units","type":"number"}},"required":["x","y","i"]},"id":{"description":"The saved object id for by reference panels","type":"string"},"panelConfig":{"additionalProperties":true,"type":"object","properties":{"description":{"description":"The description of the panel","type":"string"},"enhancements":{"additionalProperties":{},"type":"object"},"hidePanelTitles":{"description":"Set to true to hide the panel title in its container.","type":"boolean"},"savedObjectId":{"description":"The unique id of the library item to construct the embeddable.","type":"string"},"title":{"description":"The title of the panel","type":"string"},"version":{"description":"The version of the embeddable in the panel.","type":"string"}}},"panelIndex":{"type":"string"},"panelRefName":{"type":"string"},"title":{"description":"The title of the panel","type":"string"},"type":{"description":"The embeddable type","type":"string"},"version":{"deprecated":true,"description":"The version was used to store Kibana version information from versions 7.3.0 -\u003e 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).","type":"string"}},"required":["panelConfig","type","gridData","panelIndex"]},"type":"array"},"title":{"description":"The title of the section.","type":"string"}},"required":["title","gridData","panels"]}]},"type":"array"},"refreshInterval":{"additionalProperties":false,"description":"A container for various refresh interval settings","type":"object","properties":{"display":{"deprecated":true,"description":"A human-readable string indicating the refresh frequency. No longer used.","type":"string"},"pause":{"description":"Whether the refresh interval is set to be paused while viewing the dashboard.","type":"boolean"},"section":{"deprecated":true,"description":"No longer used.","type":"number"},"value":{"description":"A numeric value indicating refresh frequency in milliseconds.","type":"number"}},"required":["pause","value"]},"tags":{"items":{"description":"An array of tags applied to this dashboard","type":"string"},"type":"array"},"timeFrom":{"description":"An ISO string indicating when to restore time from","type":"string"},"timeRestore":{"default":false,"description":"Whether to restore time upon viewing this dashboard","type":"boolean"},"timeTo":{"description":"An ISO string indicating when to restore time from","type":"string"},"title":{"description":"A human-readable title for the dashboard","type":"string"},"version":{"deprecated":true,"type":"number"}},"required":["title","options"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"error":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"metadata":{"additionalProperties":true,"type":"object","properties":{}},"statusCode":{"type":"number"}},"required":["error","message","statusCode"]},"id":{"type":"string"},"managed":{"type":"boolean"},"namespaces":{"items":{"type":"string"},"type":"array"},"originId":{"type":"string"},"references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","id"]},"type":"array"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"string"}},"required":["id","type","attributes","references"]}},"required":["item"]}}}}},"summary":"Update an existing dashboard","tags":["Dashboards"],"x-state":"Technical Preview"}},"/api/data_views":{"get":{"operationId":"getAllDataViewsDefault","responses":{"200":{"content":{"application/json":{"examples":{"getAllDataViewsResponse":{"$ref":"#/components/examples/Data_views_get_data_views_response"}},"schema":{"type":"object","properties":{"data_view":{"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"typeMeta":{"type":"object"}}},"type":"array"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Get all data views","tags":["data views"]}},"/api/data_views/data_view":{"post":{"operationId":"createDataViewDefaultw","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"createDataViewRequest":{"$ref":"#/components/examples/Data_views_create_data_view_request"}},"schema":{"$ref":"#/components/schemas/Data_views_create_data_view_request_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_data_view_response_object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Create a data view","tags":["data views"]}},"/api/data_views/data_view/{viewId}":{"delete":{"description":"WARNING: When you delete a data view, it cannot be recovered.\n","operationId":"deleteDataViewDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"$ref":"#/components/parameters/Data_views_view_id"}],"responses":{"204":{"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_404_response"}}},"description":"Object is not found."}},"summary":"Delete a data view","tags":["data views"]},"get":{"operationId":"getDataViewDefault","parameters":[{"$ref":"#/components/parameters/Data_views_view_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getDataViewResponse":{"$ref":"#/components/examples/Data_views_get_data_view_response"}},"schema":{"$ref":"#/components/schemas/Data_views_data_view_response_object"}}},"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_404_response"}}},"description":"Object is not found."}},"summary":"Get a data view","tags":["data views"]},"post":{"operationId":"updateDataViewDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"$ref":"#/components/parameters/Data_views_view_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateDataViewRequest":{"$ref":"#/components/examples/Data_views_update_data_view_request"}},"schema":{"$ref":"#/components/schemas/Data_views_update_data_view_request_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_data_view_response_object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Update a data view","tags":["data views"]}},"/api/data_views/data_view/{viewId}/fields":{"post":{"description":"Update fields presentation metadata such as count, customLabel, customDescription, and format.\n","operationId":"updateFieldsMetadataDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"$ref":"#/components/parameters/Data_views_view_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateFieldsMetadataRequest":{"$ref":"#/components/examples/Data_views_update_field_metadata_request"}},"schema":{"type":"object","properties":{"fields":{"description":"The field object.","type":"object"}},"required":["fields"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Update data view fields metadata","tags":["data views"]}},"/api/data_views/data_view/{viewId}/runtime_field":{"post":{"operationId":"createRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"$ref":"#/components/parameters/Data_views_view_id"}],"requestBody":{"content":{"application/json":{"examples":{"createRuntimeFieldRequest":{"$ref":"#/components/examples/Data_views_create_runtime_field_request"}},"schema":{"type":"object","properties":{"name":{"description":"The name for a runtime field.\n","type":"string"},"runtimeField":{"description":"The runtime field definition object.\n","type":"object"}},"required":["name","runtimeField"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."}},"summary":"Create a runtime field","tags":["data views"]},"put":{"operationId":"createUpdateRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"},{"description":"The ID of the data view fields you want to update.\n","in":"path","name":"viewId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"updateRuntimeFieldRequest":{"$ref":"#/components/examples/Data_views_create_runtime_field_request"}},"schema":{"type":"object","properties":{"name":{"description":"The name for a runtime field.\n","type":"string"},"runtimeField":{"description":"The runtime field definition object.\n","type":"object"}},"required":["name","runtimeField"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data_view":{"type":"object"},"fields":{"items":{"type":"object"},"type":"array"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Create or update a runtime field","tags":["data views"]}},"/api/data_views/data_view/{viewId}/runtime_field/{fieldName}":{"delete":{"operationId":"deleteRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_field_name"},{"$ref":"#/components/parameters/Data_views_view_id"}],"responses":{"200":{"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_404_response"}}},"description":"Object is not found."}},"summary":"Delete a runtime field from a data view","tags":["data views"]},"get":{"operationId":"getRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_field_name"},{"$ref":"#/components/parameters/Data_views_view_id"}],"responses":{"200":{"content":{"application/json":{"examples":{"getRuntimeFieldResponse":{"$ref":"#/components/examples/Data_views_get_runtime_field_response"}},"schema":{"type":"object","properties":{"data_view":{"type":"object"},"fields":{"items":{"type":"object"},"type":"array"}}}}},"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_404_response"}}},"description":"Object is not found."}},"summary":"Get a runtime field","tags":["data views"]},"post":{"operationId":"updateRuntimeFieldDefault","parameters":[{"$ref":"#/components/parameters/Data_views_field_name"},{"$ref":"#/components/parameters/Data_views_view_id"}],"requestBody":{"content":{"application/json":{"examples":{"updateRuntimeFieldRequest":{"$ref":"#/components/examples/Data_views_update_runtime_field_request"}},"schema":{"type":"object","properties":{"runtimeField":{"description":"The runtime field definition object.\n\nYou can update following fields:\n\n- `type`\n- `script`\n","type":"object"}},"required":["runtimeField"]}}},"required":true},"responses":{"200":{"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Update a runtime field","tags":["data views"]}},"/api/data_views/default":{"get":{"operationId":"getDefaultDataViewDefault","responses":{"200":{"content":{"application/json":{"examples":{"getDefaultDataViewResponse":{"$ref":"#/components/examples/Data_views_get_default_data_view_response"}},"schema":{"type":"object","properties":{"data_view_id":{"type":"string"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Get the default data view","tags":["data views"]},"post":{"operationId":"setDefaultDatailViewDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"setDefaultDataViewRequest":{"$ref":"#/components/examples/Data_views_set_default_data_view_request"}},"schema":{"type":"object","properties":{"data_view_id":{"description":"The data view identifier. NOTE: The API does not validate whether it is a valid identifier. Use `null` to unset the default data view.\n","nullable":true,"type":"string"},"force":{"default":false,"description":"Update an existing default data view identifier.","type":"boolean"}},"required":["data_view_id"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Data_views_400_response"}}},"description":"Bad request"}},"summary":"Set the default data view","tags":["data views"]}},"/api/data_views/swap_references":{"post":{"description":"Changes saved object references from one data view identifier to another. WARNING: Misuse can break large numbers of saved objects! Practicing with a backup is recommended.\n","operationId":"swapDataViewsDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"swapDataViewRequest":{"$ref":"#/components/examples/Data_views_swap_data_view_request"}},"schema":{"$ref":"#/components/schemas/Data_views_swap_data_view_request_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"deleteStatus":{"type":"object","properties":{"deletePerformed":{"type":"boolean"},"remainingRefs":{"type":"integer"}}},"result":{"items":{"type":"object","properties":{"id":{"description":"A saved object identifier.","type":"string"},"type":{"description":"The saved object type.","type":"string"}}},"type":"array"}}}}},"description":"Indicates a successful call."}},"summary":"Swap saved object references","tags":["data views"]}},"/api/data_views/swap_references/_preview":{"post":{"description":"Preview the impact of swapping saved object references from one data view identifier to another.\n","operationId":"previewSwapDataViewsDefault","parameters":[{"$ref":"#/components/parameters/Data_views_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"examples":{"previewSwapDataViewRequest":{"$ref":"#/components/examples/Data_views_preview_swap_data_view_request"}},"schema":{"$ref":"#/components/schemas/Data_views_swap_data_view_request_object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"items":{"type":"object","properties":{"id":{"description":"A saved object identifier.","type":"string"},"type":{"description":"The saved object type.","type":"string"}}},"type":"array"}}}}},"description":"Indicates a successful call."}},"summary":"Preview a saved object reference swap","tags":["data views"]}},"/api/detection_engine/index":{"delete":{"operationId":"DeleteAlertsIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}},"required":["acknowledged"]}}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not enough permissions response"},"404":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Index does not exist response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete an alerts index","tags":["Security Detections API"]},"get":{"operationId":"ReadAlertsIndex","responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"index_mapping_outdated":false,"name":".alerts-security.alerts-default"}}},"schema":{"type":"object","properties":{"index_mapping_outdated":{"nullable":true,"type":"boolean"},"name":{"type":"string"}},"required":["name","index_mapping_outdated"]}}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not enough permissions response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Reads the alert index name if it exists","tags":["Security Detections API"]},"post":{"operationId":"CreateAlertsIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}},"required":["acknowledged"]}}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not enough permissions response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create an alerts index","tags":["Security Detections API"]}},"/api/detection_engine/privileges":{"get":{"description":"Retrieves whether or not the user is authenticated, and the user's Kibana\nspace and index privileges, which determine if the user can create an\nindex for the Elastic Security alerts generated by\ndetection engine rules.\n","operationId":"ReadPrivileges","responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"application":{},"cluster":{"all":true,"manage":true,"manage_api_key":true,"manage_index_templates":true,"manage_ml":true,"manage_own_api_key":true,"manage_pipeline":true,"manage_security":true,"manage_transform":true,"monitor":true,"monitor_ml":true,"monitor_transform":true},"has_all_requested":true,"has_encryption_key":true,"index":{".alerts-security.alerts-default":{"all":true,"create":true,"create_doc":true,"create_index":true,"delete":true,"delete_index":true,"index":true,"maintenance":true,"manage":true,"monitor":true,"read":true,"view_index_metadata":true,"write":true}},"is_authenticated":true,"username":"elastic"}}},"schema":{"type":"object","properties":{"has_encryption_key":{"type":"boolean"},"is_authenticated":{"type":"boolean"}},"required":["is_authenticated","has_encryption_key"]}}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Returns user privileges for the Kibana space","tags":["Security Detections API"]}},"/api/detection_engine/rules":{"delete":{"description":"Delete a detection rule using the `rule_id` or `id` field.\n\nThe URL query must include one of the following:\n\n* `id` - `DELETE /api/detection_engine/rules?id=\u003cid\u003e`\n* `rule_id`- `DELETE /api/detection_engine/rules?rule_id=\u003crule_id\u003e`\n\nThe difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.\n","operationId":"DeleteRule","parameters":[{"description":"The rule's `id` value.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"}},{"description":"The rule's `rule_id` value.","in":"query","name":"rule_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call."}},"summary":"Delete a detection rule","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl \\\n --request DELETE https://localhost:5601/api/detection_engine/rules?rule_id=bfeaf89b-a2a7-48a3-817f-e41829dc61ee \\\n --header \"Content-Type: application/json; Elastic-Api-Version=2023-10-31\"\n"}]},"get":{"description":"Retrieve a detection rule using the `rule_id` or `id` field.\n\nThe URL query must include one of the following:\n\n* `id` - `GET /api/detection_engine/rules?id=\u003cid\u003e`\n* `rule_id` - `GET /api/detection_engine/rules?rule_id=\u003crule_id\u003e`\n\nThe difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.\n","operationId":"ReadRule","parameters":[{"description":"The rule's `id` value.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"}},{"description":"The rule's `rule_id` value.","in":"query","name":"rule_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"summary":"Example response for a retrieved rule","value":{"created_at":"2020-02-03T11:19:04.259Z","created_by":"elastic","description":"Process started by MS Office program in user folder","enabled":false,"execution_summary":{"last_execution":{"date":"2022-03-23T16:06:12.787Z","message":"This rule attempted to query data from Elasticsearch indices listed in the \"Index pattern\" section of the rule definition, but no matching index was found.","metrics":{"execution_gap_duration_s":0,"total_indexing_duration_ms":15,"total_search_duration_ms":135},"status":"partial failure","status_order":20}},"false_positives":[],"filters":[{"query":{"match":{"event.action":{"query":"Process Create (rule: ProcessCreate)","type":"phrase"}}}}],"from":"now-4200s","id":"c41d170b-8ba6-4de6-b8ec-76440a35ace3","immutable":false,"interval":"1h","language":"kuery","max_signals":100,"name":"MS Office child process","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"process.name","type":"keyword"},{"ecs":true,"name":"process.parent.name","type":"keyword"}],"risk_score":21,"rule_id":"process_started_by_ms_office_user_folder","setup":"","severity":"low","tags":["child process","ms office"],"threat":[{"framework":"MITRE ATT\u0026CK","tactic":{"id":"TA0001","name":"Initial Access","reference":"https://attack.mitre.org/tactics/TA0001"},"technique":[{"id":"T1193","name":"Spearphishing Attachment","reference":"https://attack.mitre.org/techniques/T1193"}]}],"to":"now-300s","type":"query","updated_at":"2020-02-03T11:19:04.462Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call.\n\u003e info\n\u003e These fields are under development and their usage or schema may change: execution_summary.\n"}},"summary":"Retrieve a detection rule","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl \\\n --request GET https://localhost:5601/api/detection_engine/rules?rule_id=bfeaf89b-a2a7-48a3-817f-e41829dc61ee \\\n --header \"Content-Type: application/json; Elastic-Api-Version=2023-10-31\"\n"}]},"patch":{"description":"Update specific fields of an existing detection rule using the `rule_id` or `id` field.\n\nThe difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n","operationId":"PatchRule","requestBody":{"content":{"application/json":{"examples":{"example1":{"summary":"Patch query rule","value":{"id":"14b7b513-3d8d-4b22-b7da-a7ae632f7e76","name":"New name"}},"example2":{"summary":"Patch EQL rule","value":{"rule_id":"process_started_by_ms_office_program_possible_payload","threat":[{"framework":"MITRE ATT\u0026CK","tactic":{"id":"TA0001","name":"Initial Access","reference":"https://attack.mitre.org/tactics/TA0001"},"technique":[{"id":"T1193","name":"Spearphishing Attachment","reference":"https://attack.mitre.org/techniques/T1193"}]}]}},"example3":{"summary":"Patch threshold rule","value":{"id":"005d2c4f-51ca-493d-a2bd-20ef076339b1","query":"agent.version : * and agent.id : \"243d9b4f-ca01-4311-8e5c-9abbee91afd8\"","threshold":{"cardinality":[],"field":[],"value":600}}},"example4":{"summary":"Patch new terms rule","value":{"history_window_start":"now-3d","id":"569aac91-40dc-4807-a8ae-a2c8698089c4","new_terms_fields":["Endpoint.policy.applied.artifacts.global.identifiers.name"]}},"example5":{"summary":"Patch esql rule","value":{"id":"0b15e8a2-49b6-47e0-a8e6-d63a6cc335bd","query":"FROM logs-abc*\n| STATS count = COUNT(*), min_timestamp = MIN(@timestamp)\n| EVAL event_rate = count / DATE_DIFF(\"seconds\", min_timestamp, NOW()) \n| KEEP event_rate\n"}},"example6":{"summary":"Patch indicator match rule","value":{"id":"462f1986-10fe-40a3-a22c-2b1c9c4c48fd","threat_query":"@timestamp \u003e= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.ip:* and not labels.is_ioc_transform_source:\"false\""}},"example7":{"summary":"Patch machine learning rule","value":{"anomaly_threshold":50,"id":"60b13926-289b-41b1-a537-197ef1fa5059","machine_learning_job_id":["auth_high_count_logon_events"]}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RulePatchProps"}}},"description":"\u003e info\n\u003e You cannot modify the `id` or `rule_id` values.\n","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"summary":"Example response for an updated rule","value":{"actions":[],"created_at":"2020-04-07T14:51:09.755Z","created_by":"elastic","description":"Updated description for the rule.","enabled":false,"false_positives":[],"filters":[{"query":null}],"from":"now-70m","id":"6541b99a-dee9-4f6d-a86d-dbd1869d73b1","immutable":false,"interval":"1h","language":"kuery","max_signals":100,"name":"Updated Rule Name","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","references":[],"related_integrations":[{"package":"o365"}],"required_fields":[{"name":"process.parent.name"}],"risk_score":50,"rule_id":"process_started_by_ms_office_program","setup":"","severity":"low","tags":["child process","ms office"],"threat":[],"to":"now","type":"query","updated_at":"2020-04-07T14:51:09.970Z","updated_by":"elastic","version":2}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call."}},"summary":"Patch a detection rule","tags":["Security Detections API"]},"post":{"description":"Create a new detection rule.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n\nYou can create the following types of rules:\n\n* **Custom query**: Searches the defined indices and creates an alert when a document matches the rule's KQL query.\n* **Event correlation**: Searches the defined indices and creates an alert when results match an [Event Query Language (EQL)](https://www.elastic.co/guide/en/elasticsearch/reference/current/eql.html) query.\n* **Threshold**: Searches the defined indices and creates an alert when the number of times the specified field's value meets the threshold during a single execution. When there are multiple values that meet the threshold, an alert is generated for each value.\n For example, if the threshold `field` is `source.ip` and its `value` is `10`, an alert is generated for every source IP address that appears in at least 10 of the rule's search results. If you're interested, see [Terms Aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html) for more information.\n* **Indicator match**: Creates an alert when fields match values defined in the specified [Elasticsearch index](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html). For example, you can create an index for IP addresses and use this index to create an alert whenever an event's `destination.ip` equals a value in the index. The index's field mappings should be [ECS-compliant](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html).\n* **New terms**: Generates an alert for each new term detected in source documents within a specified time range.\n* **ES|QL**: Uses [Elasticsearch Query Language (ES|QL)](https://www.elastic.co/guide/en/elasticsearch/reference/current/esql.html) to find events and aggregate search results.\n* **Machine learning rules**: Creates an alert when a machine learning job discovers an anomaly above the defined threshold.\n\u003e info\n\u003e To create machine learning rules, you must have the [appropriate license](https://www.elastic.co/subscriptions) or use a [cloud deployment](https://cloud.elastic.co/registration). Additionally, for the machine learning rule to function correctly, the associated machine learning job must be running.\n\nTo retrieve machine learning job IDs, which are required to create machine learning jobs, call the [Elasticsearch Get jobs API](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html). Machine learning jobs that contain `siem` in the `groups` field can be used to create rules:\n\n```json\n...\n\"job_id\": \"linux_anomalous_network_activity_ecs\",\n\"job_type\": \"anomaly_detector\",\n\"job_version\": \"7.7.0\",\n\"groups\": [\n \"auditbeat\",\n \"process\",\n \"siem\"\n],\n...\n```\n\nAdditionally, you can set up notifications for when rules create alerts. The notifications use the [Alerting and Actions framework](https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html). Each action type requires a connector. Connectors store the information required to send notifications via external systems. The following connector types are supported for rule notifications:\n\n* Slack\n* Email\n* PagerDuty\n* Webhook\n* Microsoft Teams\n* IBM Resilient\n* Jira\n* ServiceNow ITSM\n\u003e info\n\u003e For more information on PagerDuty fields, see [Send a v2 Event](https://developer.pagerduty.com/docs/events-api-v2/trigger-events/).\n\nTo retrieve connector IDs, which are required to configure rule notifications, call the [Find objects API](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html) with `\"type\": \"action\"` in the request payload.\n\nFor detailed information on Kibana actions and alerting, and additional API calls, see:\n\n* [Alerting API](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-alerting)\n* [Alerting and Actions framework](https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html)\n* [Connectors API](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-connectors)\n","operationId":"CreateRule","requestBody":{"content":{"application/json":{"examples":{"example1":{"description":"Query rule that searches for processes started by MS Office","summary":"Query rule","value":{"description":"Process started by MS Office program - possible payload","enabled":false,"filters":[{"query":{"match":{"event.action":{"query":"Process Create (rule: ProcessCreate)","type":"phrase"}}}}],"from":"now-70m","interval":"1h","language":"kuery","name":"MS Office child process","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"name":"process.parent.name","type":"keyword"}],"risk_score":50,"rule_id":"process_started_by_ms_office_program","severity":"low","tags":["child process","ms office"],"type":"query"}},"example2":{"description":"Threshold rule that detects multiple failed login attempts to a Windows host from the same external source IP address","summary":"Threshold rule","value":{"description":"Detects when there are 20 or more failed login attempts from the same IP address with a 2 minute time frame.","enabled":true,"exceptions_list":[{"id":"int-ips","namespace_type":"single","type":"detection"}],"from":"now-180s","index":["winlogbeat-*"],"interval":"2m","name":"Windows server prml-19","query":"host.name:prml-19 and event.category:authentication and event.outcome:failure","required_fields":[{"name":"source.ip","type":"ip"}],"risk_score":30,"rule_id":"liv-win-ser-logins","severity":"low","severity_mapping":[{"field":"source.geo.city_name","operator":"equals","severity":"low","value":"Manchester"},{"field":"source.geo.city_name","operator":"equals","severity":"medium","value":"London"},{"field":"source.geo.city_name","operator":"equals","severity":"high","value":"Birmingham"},{"field":"source.geo.city_name","operator":"equals","severity":"critical","value":"Wallingford"}],"tags":["Brute force"],"threshold":{"field":"source.ip","value":20},"type":"threshold"}},"example3":{"description":"Machine learning rule that creates alerts, and sends Slack notifications, when the linux_anomalous_network_activity_ecs machine learning job discovers anomalies with a threshold of 70 or above.","summary":"Machine learning rule","value":{"actions":[{"action_type_id":".slack","group":"default","id":"5ad22cd5-5e6e-4c6c-a81a-54b626a4cec5","params":{"message":"Urgent: {{context.rule.description}}"}}],"anomaly_threshold":70,"description":"Generates alerts when the job discovers anomalies over 70","enabled":true,"from":"now-6m","interval":"5m","machine_learning_job_id":"linux_anomalous_network_activity_ecs","name":"Anomalous Linux network activity","note":"Shut down the internet.","risk_score":70,"rule_id":"ml_linux_network_high_threshold","setup":"This rule requires data coming in from Elastic Defend.","severity":"high","tags":["machine learning","Linux"],"type":"machine_learning"}},"example4":{"description":"Event correlation rule that creates alerts when the Windows rundll32.exe process makes unusual network connections","summary":"EQL rule","value":{"description":"Unusual rundll32.exe network connection","language":"eql","name":"rundll32.exe network connection","query":"sequence by process.entity_id with maxspan=2h [process where event.type in (\"start\", \"process_started\") and (process.name == \"rundll32.exe\" or process.pe.original_file_name == \"rundll32.exe\") and ((process.args == \"rundll32.exe\" and process.args_count == 1) or (process.args != \"rundll32.exe\" and process.args_count == 0))] [network where event.type == \"connection\" and (process.name == \"rundll32.exe\" or process.pe.original_file_name == \"rundll32.exe\")]","required_fields":[{"name":"event.type","type":"keyword"},{"name":"process.args","type":"keyword"},{"name":"process.args_count","type":"long"},{"name":"process.entity_id","type":"keyword"},{"name":"process.name","type":"keyword"},{"name":"process.pe.original_file_name","type":"keyword"}],"risk_score":21,"rule_id":"eql-outbound-rundll32-connections","severity":"low","tags":["EQL","Windows","rundll32.exe"],"type":"eql"}},"example5":{"description":"Indicator match rule that creates an alert when one of the following is true: The event's destination IP address and port number matches destination IP and port values in the threat_index index; The event's source IP address matches a host IP address value in the threat_index index.\n","summary":"Indicator match rule","value":{"actions":[],"description":"Checks for bad IP addresses listed in the ip-threat-list index","index":["packetbeat-*"],"name":"Bad IP threat match","query":"destination.ip:* or host.ip:*","required_fields":[{"name":"destination.ip","type":"ip"},{"name":"destination.port","type":"long"},{"name":"host.ip","type":"ip"}],"risk_score":50,"severity":"medium","threat_index":["ip-threat-list"],"threat_mapping":[{"entries":[{"field":"destination.ip","type":"mapping","value":"destination.ip"},{"field":"destination.port","type":"mapping","value":"destination.port"}]},{"entries":[{"field":"source.ip","type":"mapping","value":"host.ip"}]}],"threat_query":"*:*","type":"threat_match"}},"example6":{"description":"New terms rule that creates alerts a new IP address is detected for a user","summary":"New terms rule","value":{"description":"Detects a user associated with a new IP address","history_window_start":"now-30d","index":["auditbeat*"],"language":"kuery","name":"New User IP Detected","new_terms_fields":["user.id","source.ip"],"query":"*","required_fields":[{"name":"user.id","type":"keyword"},{"name":"source.ip","type":"ip"}],"risk_score":21,"severity":"medium","type":"new_terms"}},"example7":{"description":"esql rule that creates alerts from events that match an Excel parent process","summary":"Esql rule","value":{"description":"Find Excel events","enabled":false,"from":"now-360s","interval":"5m","language":"esql","name":"Find Excel events","query":"from auditbeat-8.10.2 METADATA _id, _version, _index | where process.parent.name == \"EXCEL.EXE\"","required_fields":[{"name":"process.parent.name","type":"keyword"}],"risk_score":21,"severity":"low","tags":[],"to":"now","type":"esql"}},"example8":{"description":"Query rule that searches for processes started by MS Office and suppresses alerts by the process.parent.name field within a 5-hour time period","summary":"Query rule 2","value":{"alert_suppression":{"duration":{"unit":"h","value":5},"group_by":["process.parent.name"],"missing_fields_strategy":"suppress"},"description":"Process started by MS Office program - possible payload","enabled":false,"filters":[{"query":{"match":{"event.action":{"query":"Process Create (rule: ProcessCreate)","type":"phrase"}}}}],"from":"now-70m","interval":"1h","language":"kuery","name":"MS Office child process","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","risk_score":50,"rule_id":"process_started_by_ms_office_program","severity":"low","tags":["child process","ms office"],"type":"query"}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleCreateProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"description":"Example response for a query rule","summary":"Query rule response","value":{"actions":[],"created_at":"2020-04-07T14:51:09.755Z","created_by":"elastic","description":"Process started by MS Office program - possible payload","enabled":false,"false_positives":[],"filters":[{"query":{"match":{"event.action":{"query":"Process Create (rule: ProcessCreate)","type":"phrase"}}}}],"from":"now-70m","id":"6541b99a-dee9-4f6d-a86d-dbd1869d73b1","immutable":false,"interval":"1h","language":"kuery","max_signals":100,"name":"MS Office child process","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"},{"integration":"graphactivitylogs","package":"azure","version":"^1.11.4"}],"required_fields":[{"ecs":true,"name":"process.parent.name","type":"keyword"}],"risk_score":50,"rule_id":"process_started_by_ms_office_program","setup":"","severity":"low","tags":["child process","ms office"],"threat":[],"to":"now","type":"query","updated_at":"2020-04-07T14:51:09.970Z","updated_by":"elastic","version":1}},"example2":{"description":"Example response for a machine learning job rule","summary":"Machine learning response","value":{"actions":[{"action_type_id":".slack","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"5ad22cd5-5e6e-4c6c-a81a-54b626a4cec5","params":{"message":"Urgent: {{context.rule.description}}"}}],"anomaly_threshold":70,"created_at":"2020-04-07T14:45:15.679Z","created_by":"elastic","description":"Generates alerts when the job discovers anomalies over 70","enabled":true,"false_positives":[],"from":"now-6m","id":"83876f66-3a57-4a99-bf37-416494c80f3b","immutable":false,"interval":"5m","machine_learning_job_id":"linux_anomalous_network_activity_ecs","max_signals":100,"name":"Anomalous Linux network activity","note":"Shut down the internet.","references":[],"related_integrations":[],"required_fields":[],"risk_score":70,"rule_id":"ml_linux_network_high_threshold","setup":"","severity":"high","status":"going to run","status_date":"2020-04-07T14:45:21.685Z","tags":["machine learning","Linux"],"threat":[],"to":"now","type":"machine_learning","updated_at":"2020-04-07T14:45:15.892Z","updated_by":"elastic","version":1}},"example3":{"description":"Example response for a threshold rule","summary":"Threshold rule response","value":{"actions":[],"author":[],"created_at":"2020-07-22T10:27:23.486Z","created_by":"elastic","description":"Detects when there are 20 or more failed login attempts from the same IP address with a 2 minute time frame.","enabled":true,"exceptions_list":[{"id":"int-ips","namespace_type":"single","type":"detection"}],"false_positives":[],"from":"now-180s","id":"15dbde26-b627-4d74-bb1f-a5e0ed9e4993","immutable":false,"index":["winlogbeat-*"],"interval":"2m","language":"kuery","max_signals":100,"name":"Windows server prml-19","query":"host.name:prml-19 and event.category:authentication and event.outcome:failure","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"source.ip","type":"ip"}],"risk_score":30,"risk_score_mapping":[],"rule_id":"liv-win-ser-logins","setup":"","severity":"low","severity_mapping":[{"field":"source.geo.city_name","operator":"equals","severity":"low","value":"Manchester"},{"field":"source.geo.city_name","operator":"equals","severity":"medium","value":"London"},{"field":"source.geo.city_name","operator":"equals","severity":"high","value":"Birmingham"},{"field":"source.geo.city_name","operator":"equals","severity":"critical","value":"Wallingford"}],"tags":["Brute force"],"threat":[],"threshold":{"field":"source.ip","value":20},"to":"now","type":"threshold","updated_at":"2020-07-22T10:27:23.673Z","updated_by":"elastic","version":1}},"example4":{"description":"Example response for an EQL rule","summary":"EQL rule response","value":{"author":[],"created_at":"2020-10-05T09:06:16.392Z","created_by":"elastic","description":"Unusual rundll32.exe network connection","enabled":true,"exceptions_list":[],"false_positives":[],"from":"now-6m","id":"93808cae-b05b-4dc9-8479-73574b50f8b1","immutable":false,"interval":"5m","language":"eql","max_signals":100,"name":"rundll32.exe network connection","query":"sequence by process.entity_id with maxspan=2h [process where event.type in (\"start\", \"process_started\") and (process.name == \"rundll32.exe\" or process.pe.original_file_name == \"rundll32.exe\") and ((process.args == \"rundll32.exe\" and process.args_count == 1) or (process.args != \"rundll32.exe\" and process.args_count == 0))] [network where event.type == \"connection\" and (process.name == \"rundll32.exe\" or process.pe.original_file_name == \"rundll32.exe\")]","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"event.type","type":"keyword"},{"ecs":true,"name":"process.args","type":"keyword"},{"ecs":true,"name":"process.args_count","type":"long"},{"ecs":true,"name":"process.entity_id","type":"keyword"},{"ecs":true,"name":"process.name","type":"keyword"},{"ecs":true,"name":"process.pe.original_file_name","type":"keyword"}],"risk_score":21,"risk_score_mapping":[],"rule_id":"eql-outbound-rundll32-connections","setup":"","severity":"low","severity_mapping":[],"tags":["EQL","Windows","rundll32.exe"],"threat":[],"throttle":"no_actions","to":"now","type":"eql","updated_at":"2020-10-05T09:06:16.403Z","updated_by":"elastic","version":1}},"example5":{"description":"Example response for an indicator match rule","summary":"Indicator match rule response","value":{"author":[],"created_at":"2020-10-06T07:07:58.227Z","created_by":"elastic","description":"Checks for bad IP addresses listed in the ip-threat-list index","enabled":true,"exceptions_list":[],"false_positives":[],"from":"now-6m","id":"d5daa13f-81fb-4b13-be2f-31011e1d9ae1","immutable":false,"index":["packetbeat-*"],"interval":"5m","language":"kuery","max_signals":100,"name":"Bad IP threat match","query":"destination.ip:* or host.ip:*","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"destination.ip","type":"ip"},{"ecs":true,"name":"destination.port","type":"long"},{"ecs":true,"name":"host.ip","type":"ip"}],"risk_score":50,"risk_score_mapping":[],"rule_id":"608501e4-c768-4f64-9326-cec55b5d439b","setup":"","severity":"medium","severity_mapping":[],"tags":[],"threat":[],"threat_index":["ip-threat-list"],"threat_mapping":[{"entries":[{"field":"destination.ip","type":"mapping","value":"destination.ip"},{"field":"destination.port","type":"mapping","value":"destination.port"}]},{"entries":[{"field":"source.ip","type":"mapping","value":"host.ip"}]}],"threat_query":"*:*","to":"now","type":"threat_match","updated_at":"2020-10-06T07:07:58.237Z","updated_by":"elastic","version":1}},"example6":{"description":"Example response for a new terms rule","summary":"New terms rule response","value":{"author":[],"created_at":"2020-10-06T07:07:58.227Z","created_by":"elastic","description":"Detects a user associated with a new IP address","enabled":true,"exceptions_list":[],"false_positives":[],"from":"now-6m","history_window_start":"now-30d","id":"eb7225c0-566b-11ee-8b4f-bbf3afdeb9f4","immutable":false,"index":["auditbeat*"],"interval":"5m","language":"kuery","max_signals":100,"name":"New User IP Detected","new_terms_fields":["user.id","source.ip"],"query":"*","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"user.id","type":"keyword"},{"ecs":true,"name":"source.ip","type":"ip"}],"risk_score":21,"risk_score_mapping":[],"rule_id":"c6f5d0bc-7be9-47d4-b2f3-073d22641e30","setup":"","severity":"medium","severity_mapping":[],"tags":[],"threat":[],"to":"now","type":"new_terms","updated_at":"2020-10-06T07:07:58.237Z","updated_by":"elastic","version":1}},"example7":{"description":"Example response for an Esql rule","summary":"Esql rule response","value":{"actions":[],"author":[],"created_at":"2023-10-18T10:55:14.269Z","created_by":"elastic","description":"Find Excel events","enabled":false,"exceptions_list":[],"false_positives":[],"from":"now-360s","id":"d0f20490-6da4-11ee-b85e-09e9b661f2e2","immutable":false,"interval":"5m","language":"esql","max_signals":100,"name":"Find Excel events","output_index":"","query":"from auditbeat-8.10.2 METADATA _id | where process.parent.name == \"EXCEL.EXE\"","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"process.parent.name","type":"keyword"}],"revision":0,"risk_score":21,"risk_score_mapping":[],"rule_id":"e4b53a89-debd-4a0d-a3e3-20606952e589","setup":"","severity":"low","severity_mapping":[],"tags":[],"threat":[],"to":"now","type":"esql","updated_at":"2023-10-18T10:55:14.269Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call."}},"summary":"Create a detection rule","tags":["Security Detections API"]},"put":{"description":"Update a detection rule using the `rule_id` or `id` field. The original rule is replaced, and all unspecified fields are deleted.\n\nThe difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n","operationId":"UpdateRule","requestBody":{"content":{"application/json":{"examples":{"example1":{"summary":"Update query rule","value":{"description":"A new description","id":"14b7b513-3d8d-4b22-b7da-a7ae632f7e76","name":"A new name for the rule","risk_score":22,"severity":"medium","type":"query"}},"example2":{"summary":"Update EQL rule","value":{"description":"eql rule test","id":"9b684efb-acf9-4323-9bff-8335b3867d14","index":["apm-*-transaction*"],"language":"eql","name":"New name for EQL rule","query":"process where process.name == \"regsvr32.exe\"","risk_score":21,"severity":"low","type":"eql"}},"example3":{"summary":"Update threshold rule","value":{"description":"Description of threat rule test","id":"005d2c4f-51ca-493d-a2bd-20ef076339b1","language":"kuery","name":"New name for threat rule","query":"agent.version : * and agent.id : \"243d9b4f-ca01-4311-8e5c-9abbee91afd8\"","risk_score":21,"severity":"low","tags":["new_tag"],"threshold":{"cardinality":[],"field":[],"value":400},"type":"threshold"}},"example4":{"summary":"Update new terms rule","value":{"description":"New description","history_window_start":"now-7d","id":"569aac91-40dc-4807-a8ae-a2c8698089c4","interval":"5m","name":"New terms rule name","new_terms_fields":["Endpoint.policy.applied.artifacts.global.identifiers.name"],"query":"agent.version : \"9.1.0\"","risk_score":21,"severity":"low","type":"new_terms"}},"example5":{"summary":"Update esql rule","value":{"description":"New description for esql rule","id":"0b15e8a2-49b6-47e0-a8e6-d63a6cc335bd","language":"esql","name":"New name for esql rule","query":"FROM logs*\n| STATS count = COUNT(*), min_timestamp = MIN(@timestamp) /* MIN(dateField) finds the earliest timestamp in the dataset. */\n| EVAL event_rate = count / DATE_DIFF(\"seconds\", min_timestamp, NOW()) /* Calculates the event rate by dividing the total count of events by the time difference (in seconds) between the earliest event and the current time. */\n| KEEP event_rate\n","risk_score":21,"severity":"low","type":"esql"}},"example6":{"summary":"Update indicator match rule","value":{"description":"New description","id":"462f1986-10fe-40a3-a22c-2b1c9c4c48fd","name":"New name for Indicator Match rule","query":"source.ip:* or destination.ip:*\\n","risk_score":99,"severity":"critical","threat_index":["filebeat-*","logs-ti_*"],"threat_mapping":[{"entries":[{"field":"source.ip","type":"mapping","value":"threat.indicator.ip"}]},{"entries":[{"field":"destination.ip","type":"mapping","value":"threat.indicator.ip"}]}],"threat_query":"@timestamp \u003e= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.ip:* and not labels.is_ioc_transform_source:\"true\"","type":"threat_match"}},"example7":{"summary":"Update machine learning rule","value":{"anomaly_threshold":50,"description":"New description of ml rule","id":"60b13926-289b-41b1-a537-197ef1fa5059","machine_learning_job_id":["auth_high_count_logon_events"],"name":"New name of ml rule","risk_score":21,"severity":"low","type":"machine_learning"}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleUpdateProps"}}},"description":"\u003e info\n\u003e All unspecified fields are deleted. You cannot modify the `id` or `rule_id` values.\n","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"summary":"Example response for an updated rule","value":{"actions":[],"created_at":"2020-04-07T14:51:09.755Z","created_by":"elastic","description":"Updated description for the rule.","enabled":false,"false_positives":[],"filters":[{"query":null}],"from":"now-70m","id":"6541b99a-dee9-4f6d-a86d-dbd1869d73b1","immutable":false,"interval":"1h","language":"kuery","max_signals":100,"name":"Updated Rule Name","query":"process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE","references":[],"related_integrations":[{"package":"o365"}],"required_fields":[{"name":"process.parent.name"}],"risk_score":50,"rule_id":"process_started_by_ms_office_program","setup":"","severity":"low","tags":["child process","ms office"],"threat":[],"to":"now","type":"query","updated_at":"2020-04-07T14:51:09.970Z","updated_by":"elastic","version":2}}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"}}},"description":"Indicates a successful call."}},"summary":"Update a detection rule","tags":["Security Detections API"]}},"/api/detection_engine/rules/_bulk_action":{"post":{"description":"Apply a bulk action, such as bulk edit, duplicate, or delete, to multiple detection rules. The bulk action is applied to all rules that match the query or to the rules listed by their IDs.\n\nThe edit action allows you to add, delete, or set tags, index patterns, investigation fields, rule actions and schedules for multiple rules at once. \nThe edit action is idempotent, meaning that if you add a tag to a rule that already has that tag, no changes are made. The same is true for other edit actions, for example removing an index pattern that is not specified in a rule will not result in any changes. The only exception is the `add_rule_actions` and `set_rule_actions` action, which is non-idempotent. This means that if you add or set a rule action to a rule that already has that action, a new action is created with a new unique ID.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n","operationId":"PerformRulesBulkAction","parameters":[{"description":"Enables dry run mode for the request call.\n\nEnable dry run mode to verify that bulk actions can be applied to specified rules. Certain rules, such as prebuilt Elastic rules on a Basic subscription, can’t be edited and will return errors in the request response. Error details will contain an explanation, the rule name and/or ID, and additional troubleshooting information.\n\nTo enable dry run mode on a request, add the query parameter `dry_run=true` to the end of the request URL. Rules specified in the request will be temporarily updated. These updates won’t be written to Elasticsearch.\n\u003e info\n\u003e Dry run mode is not supported for the `export` bulk action. A 400 error will be returned in the request response.\n","in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"examples":{"example01":{"description":"The following request activates all rules with the test tag.","summary":"Enable - Enable all rules with the test tag","value":{"action":"enable","query":"alert.attributes.tags: \"test\""}},"example02":{"description":"The following request enables the rule with the specified ID.","summary":"Enable - Enable a specific rule by ID.","value":{"action":"enable","ids":["748694f0-6977-4ea5-8384-cd2e39730779"]}},"example03":{"description":"The following request disables the rule with the specified ID.","summary":"Disable - Disable a specific rule by ID","value":{"action":"disable","ids":["748694f0-6977-4ea5-8384-cd2e39730779"]}},"example04":{"description":"The following request duplicates rules with the specified IDs, including exceptions but not expired exceptions.","summary":"Duplicate - Duplicate rules with specific IDs","value":{"action":"duplicate","duplicate":{"include_exceptions":true,"include_expired_exceptions":false},"ids":["748694f0-6977-4ea5-8384-cd2e39730779","461a4c22-416e-4009-a9a7-cf79656454bf"]}},"example05":{"description":"The following request deletes the rule with the specified ID.","summary":"Delete - Delete a specific rule by ID","value":{"action":"delete","ids":["cf4abfd1-7c37-4519-ab0f-5ea5c75fac60"]}},"example06":{"description":"The following request runs the rule with the specified ID within the given date range.","summary":"Run - Run a specific rule by ID","value":{"action":"run","ids":["748694f0-6977-4ea5-8384-cd2e39730779"],"run":{"end_date":"2025-03-10T23:59:59.999Z","start_date":"2025-03-01T00:00:00.000Z"}}},"example07":{"description":"The following request exports the rules with the specified IDs.","summary":"Export - Export specific rules by ID","value":{"action":"export","ids":["748694f0-6977-4ea5-8384-cd2e39730779"]}},"example08":{"description":"The following request will validate that the add_index_patterns bulk action can be successfully applied to three rules. The dry_run parameter is specified in query parameters, e.g. POST api/detection_engine/rules/_bulk_action?dry_run=true","summary":"Edit - dry run - Validate add_index_patterns bulk action","value":{"action":"edit","edit":[{"type":"add_index_patterns","value":["test-*"]}],"ids":["81aa0480-06af-11ed-94fb-dd1a0597d8d2","dc015d10-0831-11ed-ac8b-05a222bd8d4a","de8f5af0-0831-11ed-ac8b-05a222bd8d4a"]}},"example09":{"description":"The following request adds the tag \"tag-1\" to the rules with the specified IDs. If the tag already exists for a rule, no changes are made.","summary":"Edit - Add a tag to rules (idempotent)","value":{"action":"edit","edit":[{"type":"add_tags","value":["tag-1"]}],"ids":["8bc7dad0-9320-11ec-9265-8b772383a08d","8e5c1a40-9320-11ec-9265-8b772383a08d"]}},"example10":{"description":"The following request adds two tags at the same time, tag-1 and tag-2, to the rules that have the IDs sent in the payload. If the tags already exist for a rule, no changes are made.","summary":"Edit - Add two tags to rules (idempotent)","value":{"action":"edit","edit":[{"type":"add_tags","value":["tag-1","tag-2"]}],"ids":["8bc7dad0-9320-11ec-9265-8b772383a08d","8e5c1a40-9320-11ec-9265-8b772383a08d"]}},"example11":{"description":"The following request removes the tag \"tag-1\" from the rules with the specified IDs. If the tag does not exist for a rule, no changes are made.","summary":"Edit - Delete a tag from rules (idempotent)","value":{"action":"edit","edit":[{"type":"delete_tags","value":["tag-1"]}],"ids":["8bc7dad0-9320-11ec-9265-8b772383a08d","8e5c1a40-9320-11ec-9265-8b772383a08d"]}},"example12":{"description":"The following request sets the tags \"tag-1\" and \"tag-2\" for the rules with the specified IDs, overwriting any existing tags. If the set of tags is the same as the existing tags, no changes are made.","summary":"Edit - Set (overwrite existing) tags for rules (idempotent)","value":{"action":"edit","edit":[{"type":"set_tags","value":["tag-1","tag-2"]}],"ids":["8bc7dad0-9320-11ec-9265-8b772383a08d","8e5c1a40-9320-11ec-9265-8b772383a08d"]}},"example13":{"description":"The following request adds the index pattern \"test-*\" to the rules with the specified IDs. If the index pattern already exists for a rule, no changes are made.","summary":"Edit - Add index patterns to rules (idempotent)","value":{"action":"edit","edit":[{"type":"add_index_patterns","value":["test-*"]}],"ids":["81aa0480-06af-11ed-94fb-dd1a0597d8d2","dc015d10-0831-11ed-ac8b-05a222bd8d4a"]}},"example14":{"description":"The following request removes the index pattern \"test-*\" from the rules with the specified IDs. If the index pattern does not exist for a rule, no changes are made.","summary":"Edit - Remove index patterns from rules (idempotent)","value":{"action":"edit","edit":[{"type":"delete_index_patterns","value":["test-*"]}],"ids":["81aa0480-06af-11ed-94fb-dd1a0597d8d2","dc015d10-0831-11ed-ac8b-05a222bd8d4a"]}},"example15":{"description":"The following request sets the index patterns \"test-*\" and \"prod-*\" for the rules with the specified IDs, overwriting any existing index patterns. If the set of index patterns is the same as the existing index patterns, no changes are made.","summary":"Edit - Set (overwrite existing) index patterns for rules patterns (idempotent)","value":{"action":"edit","edit":[{"type":"set_index_patterns","value":["test-*"]}],"ids":["81aa0480-06af-11ed-94fb-dd1a0597d8d2","dc015d10-0831-11ed-ac8b-05a222bd8d4a"]}},"example16":{"description":"The following request adds investigation field to the rules with the specified IDs.","summary":"Edit - Add investigation field to rules","value":{"action":"edit","edit":[{"type":"add_investigation_fields","value":{"field_names":["alert.status"]}}],"ids":["12345678-1234-1234-1234-1234567890ab","87654321-4321-4321-4321-0987654321ba"]}},"example17":{"description":"The following request deletes investigation fields from the rules with the specified IDs. If the field does not exist for a rule, no changes are made.","summary":"Edit - Delete investigation fields from rules (idempotent)","value":{"action":"edit","edit":[{"type":"delete_investigation_fields"}],"ids":["12345678-1234-1234-1234-1234567890ab","87654321-4321-4321-4321-0987654321ba"],"value":["field1","field2"]}},"example18":{"description":"The following request sets investigation fields for the rules with the specified IDs, overwriting any existing investigation fields. If the set of investigation fields is the same as the existing investigation fields, no changes are made.","summary":"Edit - Set (overwrite existing) investigation fields for rules (idempotent)","value":{"action":"edit","edit":[{"type":"set_investigation_fields","value":["field1","field2"]}],"ids":["12345678-1234-1234-1234-1234567890ab","87654321-4321-4321-4321-0987654321ba"]}},"example19":{"description":"The following request sets a timeline template for the rules with the specified IDs. If the same timeline template is already set for a rule, no changes are made.","summary":"Edit - Set (overwrite existing) timeline template for rules (idempotent)","value":{"action":"edit","edit":[{"type":"set_timeline","value":{"timeline_id":"3e827bab-838a-469f-bd1e-5e19a2bff2fd","timeline_title":"Alerts Involving a Single User Timeline"}}],"ids":["eacdfc95-e007-41c9-986e-4b2cbdfdc71b"]}},"example20":{"description":"The following request sets a schedule for the rules with the specified IDs. If the same schedule is already set for a rule, no changes are made.","summary":"Edit - Set (overwrite existing) schedule for rules (idempotent)","value":{"action":"edit","edit":[{"type":"set_schedule","value":{"interval":"1h","lookback":"30m"}}],"ids":["99887766-5544-3322-1100-aabbccddeeff"]}},"example21":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules (non-idempotent)","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"The message body"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191928"]}},"example22":{"description":"The following request sets rule actions for the rules with the specified IDs. Each action receives its own unique ID.","summary":"Edit - Set (overwrite existing) rule actions for rules (non-idempotent)","value":{"action":"edit","edit":[{"type":"set_rule_actions","value":{"actions":[{"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"The message body"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191928"]}},"example23":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules for a webhook connector","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default3","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"The message body"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191921"]}},"example24":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules for an email connector","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default3","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"message":"The message body","subject":"Subject","to":"address@domain.com"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191921"]}},"example25":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules for a slack connector","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default3","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"message":"The content of the message"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191921"]}},"example26":{"description":"The following request adds rule actions to the rules with the specified IDs. Each new action receives its own unique ID.","summary":"Edit - Add rule actions to rules for a PagerDuty connector","value":{"action":"edit","edit":[{"type":"add_rule_actions","value":{"actions":[{"group":"default3","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"eventAction":"trigger","severity":"critical","summary":"The message body","timestamp":"2023-10-31T00:00:00.000Z"}}]}}],"ids":["9e946bfc-3118-4c77-bb25-67d781191921"]}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_BulkDeleteRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkDisableRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkEnableRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkExportRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkDuplicateRules"},{"$ref":"#/components/schemas/Security_Detections_API_BulkManualRuleRun"},{"$ref":"#/components/schemas/Security_Detections_API_BulkEditRules"}]}}}},"responses":{"200":{"content":{"application/json":{"examples":{"example01":{"description":"In this response one rule was updated and one was skipped. Objects returned in attributes.results.skipped will only include rules' id, name, and skip_reason.","summary":"Successful response","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[{"id":"51658332-a15e-4c9e-912a-67214e2e2359","name":"Skipped rule","skip_reason":"RULE_NOT_MODIFIED"}],"updated":[{"anomaly_threshold":50,"author":["Elastic"],"created_at":"2022-02-21T14:14:13.801Z","created_by":"elastic","description":"A machine learning job detected unusually large numbers of DNS queries for a single top-level DNS domain, which is often used for DNS tunneling. DNS tunneling can be used for command-and-control, persistence, or data exfiltration activity. For example, dnscat tends to generate many DNS questions for a top-level domain as it uses the DNS protocol to tunnel data.","enabled":true,"exceptions_list":[],"execution_summary":{"last_execution":{"date":"2022-03-23T16:06:12.787Z","message":"This rule attempted to query data from Elasticsearch indices listed in the \"Index pattern\" section of the rule definition, but no matching index was found.","metrics":{"execution_gap_duration_s":0,"total_indexing_duration_ms":15,"total_search_duration_ms":135},"status":"partial failure","status_order":20}},"false_positives":["DNS domains that use large numbers of child domains, such as software or content distribution networks, can trigger this alert and such parent domains can be excluded."],"from":"now-45m","id":"8bc7dad0-9320-11ec-9265-8b772383a08d","immutable":false,"interval":"15m","license":"Elastic License v2","machine_learning_job_id":["packetbeat_dns_tunneling"],"max_signals":100,"name":"DNS Tunneling [Duplicate]","references":["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"],"related_integrations":[],"required_fields":[],"risk_score":21,"risk_score_mapping":[],"rule_id":"7289bf08-4e91-4c70-bf01-e04c4c5d7756","setup":"","severity":"low","severity_mapping":[],"tags":["Elastic","Network","Threat Detection","ML"],"threat":[],"to":"now","type":"machine_learning","updated_at":"2022-02-21T17:05:50.883Z","updated_by":"elastic","version":6}]},"summary":{"failed":0,"skipped":1,"succeeded":1,"total":2}},"rules_count":1,"success":true}},"example02":{"description":"If processing of any rule fails, a partial error outputs the ID and/or name of the affected rule and the corresponding error, as well as successfully processed rules (in the same format as a successful 200 request).","summary":"Partial failure","value":{"value":{"attributes":{"errors":[{"message":"Index patterns can't be added. Machine learning rule doesn't have index patterns property","rules":[{"id":"8bc7dad0-9320-11ec-9265-8b772383a08d","name":"DNS Tunneling [Duplicate]"}],"status_code":500}],"results":{"created":[],"deleted":[],"skipped":[],"updated":[{"actions":[],"author":["Elastic"],"created_at":"2022-02-21T14:14:17.883Z","created_by":"elastic","description":"Generates a detection alert for each external alert written to the configured indices. Enabling this rule allows you to immediately begin investigating external alerts in the app.","enabled":true,"exceptions_list":[],"execution_summary":{"last_execution":{"date":"2022-03-23T16:06:12.787Z","message":"This rule attempted to query data from Elasticsearch indices listed in the \"Index pattern\" section of the rule definition, but no matching index was found.","metrics":{"execution_gap_duration_s":0,"total_indexing_duration_ms":15,"total_search_duration_ms":135},"status":"partial failure","status_order":20}},"false_positives":[],"from":"now-6m","id":"8e5c1a40-9320-11ec-9265-8b772383a08d","immutable":false,"index":["apm-*-transaction*","traces-apm*","auditbeat-*","filebeat-*","logs-*","packetbeat-*","winlogbeat-*","added-by-id-*"],"interval":"5m","language":"kuery","license":"Elastic License v2","max_signals":10000,"name":"External Alerts [Duplicate]","query":"event.kind:alert and not event.module:(endgame or endpoint)\n","references":[],"related_integrations":[],"required_fields":[],"risk_score":47,"risk_score_mapping":[{"field":"event.risk_score","operator":"equals","value":""}],"rule_id":"941faf98-0cdc-4569-b16d-4af962914d61","rule_name_override":"message","setup":"","severity":"medium","severity_mapping":[{"field":"event.severity","operator":"equals","severity":"low","value":"21"},{"field":"event.severity","operator":"equals","severity":"medium","value":"47"},{"field":"event.severity","operator":"equals","severity":"high","value":"73"},{"field":"event.severity","operator":"equals","severity":"critical","value":"99"}],"tags":["Elastic","Network","Windows","APM","macOS","Linux"],"threat":[],"timestamp_override":"event.ingested","to":"now","type":"query","updated_at":"2022-02-21T16:56:22.818Z","updated_by":"elastic","version":5}]},"summary":{"failed":1,"skipped":0,"succeeded":1,"total":2}},"message":"Bulk edit partially failed","rules_count":2,"status_code":500,"success":false}}},"example03":{"description":"The attributes.errors section of the response shows that two rules failed to update and one succeeded. The same results would be returned if you ran the request without dry run mode enabled. Notice that there are no arrays in attributes.results. In dry run mode, rule updates are not applied and saved to Elasticsearch, so the endpoint wouldn’t return results for rules that have been updated, created, or deleted.","summary":"Dry run","value":{"attributes":{"errors":[{"err_code":"IMMUTABLE","message":"Elastic rule can't be edited","rules":[{"id":"81aa0480-06af-11ed-94fb-dd1a0597d8d2","name":"Unusual AWS Command for a User"}],"status_code":500},{"err_code":"MACHINE_LEARNING_INDEX_PATTERN","message":"Machine learning rule doesn't have index patterns","rules":[{"id":"dc015d10-0831-11ed-ac8b-05a222bd8d4a","name":"Suspicious Powershell Script [Duplicate]"}],"status_code":500}],"results":{"created":[],"deleted":[],"skipped":[],"updated":[]},"summary":{"failed":2,"skipped":0,"succeeded":1,"total":3}},"message":"Bulk edit partially failed","status_code":500}},"example04":{"description":"This example presents the successful setting of tags for 2 rules. There was a difference between the set of tags that were being added and the tags that were already set in the rules, that's why the rules were updated.","summary":"Set tags successsully for 2 rules","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[],"updated":[{"actions":[],"author":[],"created_at":"2025-03-25T11:46:41.899Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-6m","id":"738112cd-6cfa-414a-8457-2a658845d6ba","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"5m","language":"kuery","license":"","max_signals":100,"meta":{"kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Rule 1","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":1,"risk_score":21,"risk_score_mapping":[],"rule_id":"6fb746a0-dfe5-40fa-b03f-5cbb84f3e32e","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":["tag-1","tag-2"],"threat":[],"to":"now","type":"query","updated_at":"2025-03-25T11:47:11.350Z","updated_by":"elastic","version":2},{"actions":[{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"Hello"},"uuid":"580e2e16-5e91-411c-999b-7b75a11ed441"}],"author":[],"created_at":"2025-03-25T09:49:08.343Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-360s","id":"eacdfc95-e007-41c9-986e-4b2cbdfdc71b","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"3m","investigation_fields":{"field_names":["alert.status","Endpoint.policy.applied.artifacts.global.channel"]},"language":"kuery","license":"","max_signals":100,"meta":{"from":"3m","kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Rule 2","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":33,"risk_score":21,"risk_score_mapping":[],"rule_id":"43250a55-53a3-4ddd-96cb-82a1bd720180","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":["tag-1","tag-2"],"threat":[],"timeline_id":"3e827bab-838a-469f-bd1e-5e19a2bff2fd","timeline_title":"Alerts Involving a Single User Timeline","to":"now","type":"query","updated_at":"2025-03-25T11:47:11.357Z","updated_by":"elastic","version":24}]},"summary":{"failed":0,"skipped":0,"succeeded":2,"total":2}},"rules_count":2,"success":true}},"example05":{"description":"This example presents the idempotent behavior of the edit action with set_tags request. Both rules already had exactly the same tags that were being added, so no changes were made in any of them.","summary":"Idempotent behavior of set_tags","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[{"id":"eacdfc95-e007-41c9-986e-4b2cbdfdc71b","name":"Rule 1","skip_reason":"RULE_NOT_MODIFIED"},{"id":"738112cd-6cfa-414a-8457-2a658845d6ba","name":"Rule 2","skip_reason":"RULE_NOT_MODIFIED"}],"updated":[]},"summary":{"failed":0,"skipped":2,"succeeded":0,"total":2}},"rules_count":2,"success":true}},"example06":{"description":"This example presents the idempotent behavior of the edit action with add_tags request. One rule was updated and one was skipped. The rule that was skipped already had all the tags that were being added.","summary":"Idempotent behavior of add_tags","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[{"id":"738112cd-6cfa-414a-8457-2a658845d6ba","name":"Test Rule 2","skip_reason":"RULE_NOT_MODIFIED"}],"updated":[{"actions":[{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"Hello"},"uuid":"580e2e16-5e91-411c-999b-7b75a11ed441"}],"author":[],"created_at":"2025-03-25T09:49:08.343Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-360s","id":"eacdfc95-e007-41c9-986e-4b2cbdfdc71b","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"3m","investigation_fields":{"field_names":["alert.status","Endpoint.policy.applied.artifacts.global.channel"]},"language":"kuery","license":"","max_signals":100,"meta":{"from":"3m","kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Test rule","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":34,"risk_score":21,"risk_score_mapping":[],"rule_id":"43250a55-53a3-4ddd-96cb-82a1bd720180","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":["tag-1","tag-2","tag-4"],"threat":[],"timeline_id":"3e827bab-838a-469f-bd1e-5e19a2bff2fd","timeline_title":"Alerts Involving a Single User Timeline","to":"now","type":"query","updated_at":"2025-03-25T11:55:12.752Z","updated_by":"elastic","version":25}]},"summary":{"failed":0,"skipped":1,"succeeded":1,"total":2}},"rules_count":2,"success":true}},"example07":{"description":"This example shows a non-idempotent nature of the set_rule_actions requests. Regardless if the actions are the same as the existing actions for a rule, the actions are always set in the rule and receive a new unique ID.","summary":"Non-idempotent behavior for set_rule_actions","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[],"updated":[{"actions":[{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"20fbf986-a270-460e-80f3-7b83c08b430f","params":{"body":"Hello"},"uuid":"e48428e5-efac-4856-b8ad-b271c14eaa91"}],"author":[],"created_at":"2025-03-25T09:49:08.343Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-360s","id":"eacdfc95-e007-41c9-986e-4b2cbdfdc71b","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"3m","investigation_fields":{"field_names":["alert.status","Endpoint.policy.applied.artifacts.global.channel"]},"language":"kuery","license":"","max_signals":100,"meta":{"from":"3m","kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Test rule","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":39,"risk_score":21,"risk_score_mapping":[],"rule_id":"43250a55-53a3-4ddd-96cb-82a1bd720180","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":["tag-1","tag-2","tag-4"],"threat":[],"timeline_id":"3e827bab-838a-469f-bd1e-5e19a2bff2fd","timeline_title":"Alerts Involving a Single User Timeline","to":"now","type":"query","updated_at":"2025-03-25T12:17:40.528Z","updated_by":"elastic","version":30}]},"summary":{"failed":0,"skipped":0,"succeeded":1,"total":1}},"rules_count":1,"success":true}},"example08":{"description":"This example shows a non-idempotent nature of the add_rule_actions requests. Regardless if the added action is the same as another existing action for a rule, the new action is added to the rule and receives a new unique ID.","summary":"Non-idempotent behavior for add_rule_actions","value":{"attributes":{"results":{"created":[],"deleted":[],"skipped":[],"updated":[{"actions":[{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"76af173d-38d8-4a9a-b2cc-a3c695b845b4","params":{"body":"Message body"},"uuid":"0309347e-3954-429c-9168-5da2663389af"},{"action_type_id":".webhook","frequency":{"notifyWhen":"onActiveAlert","summary":true,"throttle":null},"group":"default","id":"76af173d-38d8-4a9a-b2cc-a3c695b845b4","params":{"body":"Message body"},"uuid":"49ddaa94-d63d-410e-90dc-8c1bad9552bd"}],"author":[],"created_at":"2025-04-02T12:42:03.400Z","created_by":"elastic","description":"test","enabled":false,"exceptions_list":[],"false_positives":[],"filters":[],"from":"now-6m","id":"0d3eb0cd-88c4-4651-ac87-6d9f0cb87217","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","traces-apm*","winlogbeat-*","-*elastic-cloud-logs-*"],"interval":"5m","language":"kuery","license":"","max_signals":100,"meta":{"kibana_siem_app_url":"http://localhost:5601/kbn/app/security"},"name":"Jacek test rule","output_index":"","query":"*","references":[],"related_integrations":[],"required_fields":[],"revision":2,"risk_score":21,"risk_score_mapping":[],"rule_id":"2684c020-1370-4719-ac27-eafe6428fe10","rule_source":{"type":"internal"},"setup":"","severity":"low","severity_mapping":[],"tags":[],"threat":[],"to":"now","type":"query","updated_at":"2025-04-02T12:51:40.215Z","updated_by":"elastic","version":2}]},"summary":{"failed":0,"skipped":0,"succeeded":1,"total":1}},"rules_count":1,"success":true}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_BulkEditActionResponse"},{"$ref":"#/components/schemas/Security_Detections_API_BulkExportActionResponse"}]}}},"description":"OK"}},"summary":"Apply a bulk action to detection rules","tags":["Security Detections API"]}},"/api/detection_engine/rules/_export":{"post":{"description":"Export detection rules to an `.ndjson` file. The following configuration items are also included in the `.ndjson` file:\n- Actions\n- Exception lists\n\u003e info\n\u003e Rule actions and connectors are included in the exported file, but sensitive information about the connector (such as authentication credentials) is not included. You must re-add missing connector details after importing detection rules.\n\n\u003e You can use Kibana’s [Saved Objects](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html) UI (Stack Management → Kibana → Saved Objects) or the Saved Objects APIs (experimental) to [export](https://www.elastic.co/docs/api/doc/kibana/operation/operation-exportsavedobjectsdefault) and [import](https://www.elastic.co/docs/api/doc/kibana/operation/operation-importsavedobjectsdefault) any necessary connectors before importing detection rules.\n\n\u003e Similarly, any value lists used for rule exceptions are not included in rule exports or imports. Use the [Manage value lists](https://www.elastic.co/guide/en/security/current/value-lists-exceptions.html#manage-value-lists) UI (Rules → Detection rules (SIEM) → Manage value lists) to export and import value lists separately.\n","operationId":"ExportRules","parameters":[{"description":"Determines whether a summary of the exported rules is returned.","in":"query","name":"exclude_export_details","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"File name for saving the exported rules.\n\u003e info\n\u003e When using cURL to export rules to a file, use the -O and -J options to save the rules to the file name specified in the URL.\n","in":"query","name":"file_name","required":false,"schema":{"default":"export.ndjson","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"nullable":true,"type":"object","properties":{"objects":{"description":"Array of `rule_id` fields. Exports all rules when unspecified.","items":{"type":"object","properties":{"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"}},"required":["rule_id"]},"type":"array"}},"required":["objects"]}}},"required":false},"responses":{"200":{"content":{"application/ndjson":{"schema":{"description":"An `.ndjson` file containing the returned rules.\n\nEach line in the file represents an object (a rule, exception list parent container, or exception list item), and the last line includes a summary of what was exported.\n","format":"binary","type":"string"}}},"description":"Indicates a successful call."}},"summary":"Export detection rules","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"localhost:5601/api/detection_engine/rules/_export?exclude_export_details=true\u0026file_name=exported_rules.ndjson\" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'\n{\n \"objects\": [\n {\n \"rule_id\":\"343580b5-c811-447c-8d2d-2ccf052c6900\"\n },\n {\n \"rule_id\":\"2938c9fa-53eb-4c04-b79c-33cbf041b18d\"\n }\n ]\n}\n"}]}},"/api/detection_engine/rules/_find":{"get":{"description":"Retrieve a paginated list of detection rules. By default, the first page is returned, with 20 results per page.","operationId":"FindRules","parameters":[{"in":"query","name":"fields","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"Search query\n\nFilters the returned results according to the value of the specified field, using the alert.attributes.\u003cfield name\u003e:\u003cfield value\u003e syntax, where \u003cfield name\u003e can be:\n- name\n- enabled\n- tags\n- createdBy\n- interval\n- updatedBy\n\u003e info\n\u003e Even though the JSON rule object uses created_by and updated_by fields, you must use createdBy and updatedBy fields in the filter.\n","in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"description":"Field to sort by","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_FindRulesSortField"}},{"description":"Sort order","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_Detections_API_SortOrder"}},{"description":"Page number","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Rules per page","in":"query","name":"per_page","required":false,"schema":{"default":20,"minimum":0,"type":"integer"}},{"description":"Gaps range start","in":"query","name":"gaps_range_start","required":false,"schema":{"type":"string"}},{"description":"Gaps range end","in":"query","name":"gaps_range_end","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"value":{"data":[{"created_at":"2020-02-02T10:05:19.613Z","created_by":"elastic","description":"Identifies a PowerShell process launched by either cscript.exe or wscript.exe. Observing Windows scripting processes executing a PowerShell script, may be indicative of malicious activity.","enabled":false,"execution_summary":{"last_execution":{"date":"2022-03-23T16:06:12.787Z","message":"This rule attempted to query data from Elasticsearch indices listed in the \"Index pattern\" section of the rule definition, but no matching index was found.","metrics":{"execution_gap_duration_s":0,"total_indexing_duration_ms":15,"total_search_duration_ms":135},"status":"partial failure","status_order":20}},"false_positives":[],"from":"now-6m","id":"89761517-fdb0-4223-b67b-7621acc48f9e","immutable":true,"index":["winlogbeat-*"],"interval":"5m","language":"kuery","max_signals":33,"name":"Windows Script Executing PowerShell","query":"event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:(\"wscript.exe\" or \"cscript.exe\") and process.name:\"powershell.exe\"","references":[],"related_integrations":[{"package":"o365","version":"^2.3.2"}],"required_fields":[{"ecs":true,"name":"event.action","type":"keyword"},{"ecs":true,"name":"process.name","type":"keyword"},{"ecs":true,"name":"process.parent.name","type":"keyword"}],"risk_score":21,"rule_id":"f545ff26-3c94-4fd0-bd33-3c7f95a3a0fc","setup":"","severity":"low","tags":["Elastic","Windows"],"threat":[{"framework":"MITRE ATT\u0026CK","tactic":{"id":"TA0002","name":"Execution","reference":"https://attack.mitre.org/tactics/TA0002/"},"technique":[{"id":"T1193","name":"Spearphishing Attachment","reference":"https://attack.mitre.org/techniques/T1193/"}]}],"to":"now","type":"query","updated_at":"2020-02-02T10:05:19.830Z","updated_by":"elastic"}],"page":1,"perPage":5,"total":4}}},"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"},"type":"array"},"page":{"type":"integer"},"perPage":{"type":"integer"},"total":{"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response\n\u003e info\n\u003e These fields are under development and their usage or schema may change: execution_summary.\n"}},"summary":"List all detection rules","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl -X GET \"localhost:5601/api/detection_engine/rules/_find?page=1\u0026per_page=5\u0026sort_field=enabled\u0026sort_order=asc\u0026filter=alert.attributes.name:windows\" -H 'kbn-xsrf: true'\n"}]}},"/api/detection_engine/rules/_import":{"post":{"description":"Import detection rules from an `.ndjson` file, including actions and exception lists. The request must include:\n- The `Content-Type: multipart/form-data` HTTP header.\n- A link to the `.ndjson` file containing the rules.\n\u003e warn\n\u003e When used with [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.\n\n\u003e If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.\n\u003e info\n\u003e To import rules with actions, you need at least Read privileges for the Action and Connectors feature. To overwrite or add new connectors, you need All privileges for the Actions and Connectors feature. To import rules without actions, you don’t need Actions and Connectors privileges. Refer to [Enable and access detections](https://www.elastic.co/guide/en/security/current/detections-permissions-section.html#enable-detections-ui) for more information.\n\n\u003e info\n\u003e Rule actions and connectors are included in the exported file, but sensitive information about the connector (such as authentication credentials) is not included. You must re-add missing connector details after importing detection rules.\n\n\u003e You can use Kibana’s [Saved Objects](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html) UI (Stack Management → Kibana → Saved Objects) or the Saved Objects APIs (experimental) to [export](https://www.elastic.co/docs/api/doc/kibana/operation/operation-exportsavedobjectsdefault) and [import](https://www.elastic.co/docs/api/doc/kibana/operation/operation-importsavedobjectsdefault) any necessary connectors before importing detection rules.\n\n\u003e Similarly, any value lists used for rule exceptions are not included in rule exports or imports. Use the [Manage value lists](https://www.elastic.co/guide/en/security/current/value-lists-exceptions.html#manage-value-lists) UI (Rules → Detection rules (SIEM) → Manage value lists) to export and import value lists separately.\n","operationId":"ImportRules","parameters":[{"description":"Determines whether existing rules with the same `rule_id` are overwritten.","in":"query","name":"overwrite","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Determines whether existing exception lists with the same `list_id` are overwritten. Both the exception list container and its items are overwritten.","in":"query","name":"overwrite_exceptions","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Determines whether existing actions with the same `kibana.alert.rule.actions.id` are overwritten.","in":"query","name":"overwrite_action_connectors","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Generates a new list ID for each imported exception list.","in":"query","name":"as_new_list","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"The `.ndjson` file containing the rules.","format":"binary","type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example1":{"summary":"Import rules with success","value":{"errors":[],"exceptions_errors":[],"exceptions_success":true,"exceptions_success_count":0,"rules_count":1,"success":true,"success_count":1}}},"schema":{"additionalProperties":false,"type":"object","properties":{"action_connectors_errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ErrorSchema"},"type":"array"},"action_connectors_success":{"type":"boolean"},"action_connectors_success_count":{"minimum":0,"type":"integer"},"action_connectors_warnings":{"items":{"$ref":"#/components/schemas/Security_Detections_API_WarningSchema"},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ErrorSchema"},"type":"array"},"exceptions_errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ErrorSchema"},"type":"array"},"exceptions_success":{"type":"boolean"},"exceptions_success_count":{"minimum":0,"type":"integer"},"rules_count":{"minimum":0,"type":"integer"},"success":{"type":"boolean"},"success_count":{"minimum":0,"type":"integer"}},"required":["exceptions_success","exceptions_success_count","exceptions_errors","rules_count","success","success_count","errors","action_connectors_errors","action_connectors_warnings","action_connectors_success","action_connectors_success_count"]}}},"description":"Indicates a successful call."}},"summary":"Import detection rules","tags":["Security Detections API"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"\u003cKibanaURL\u003e/api/detection_engine/rules/_import\"\n-u \u003cusername\u003e:\u003cpassword\u003e -H 'kbn-xsrf: true'\n-H 'Content-Type: multipart/form-data'\n--form \"file=@\u003clink to file\u003e\"\n"}]}},"/api/detection_engine/rules/{id}/exceptions":{"post":{"description":"Create exception items that apply to a single detection rule.","operationId":"CreateRuleExceptionListItems","parameters":[{"description":"Detection rule's identifier","examples":{"id":{"value":"330bdd28-eedf-40e1-bed0-f10176c7f9e0"}},"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_RuleId"}}],"requestBody":{"content":{"application/json":{"schema":{"example":{"items":[{"description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"type":"simple"}]},"type":"object","properties":{"items":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateRuleExceptionListItemProps"},"type":"array"}},"required":["items"]}}},"description":"Rule exception items.","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ruleExceptionItems":{"value":[{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}]}},"schema":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"},"type":"array"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badPayload":{"value":{"error":"Bad Request","message":"Invalid request payload JSON format","statusCode":400}},"badRequest":{"value":{"error":"Bad Request","message":"[request params]: id: Invalid uuid","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"message":"Unable to create exception-list","status_code":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create rule exception items","tags":["Security Exceptions API"]}},"/api/detection_engine/rules/prepackaged":{"put":{"description":"Install and update all Elastic prebuilt detection rules and Timelines.\n\nThis endpoint allows you to install and update prebuilt detection rules and Timelines provided by Elastic. \nWhen you call this endpoint, it will:\n- Install any new prebuilt detection rules that are not currently installed in your system.\n- Update any existing prebuilt detection rules that have been modified or improved by Elastic.\n- Install any new prebuilt Timelines that are not currently installed in your system.\n- Update any existing prebuilt Timelines that have been modified or improved by Elastic.\n\nThis ensures that your detection engine is always up-to-date with the latest rules and Timelines, \nproviding you with the most current and effective threat detection capabilities.\n","operationId":"InstallPrebuiltRulesAndTimelines","responses":{"200":{"content":{"application/json":{"examples":{"example1":{"value":{"rules_installed":112,"rules_updated":0,"timelines_installed":5,"timelines_updated":2}}},"schema":{"additionalProperties":false,"type":"object","properties":{"rules_installed":{"description":"The number of rules installed","minimum":0,"type":"integer"},"rules_updated":{"description":"The number of rules updated","minimum":0,"type":"integer"},"timelines_installed":{"description":"The number of timelines installed","minimum":0,"type":"integer"},"timelines_updated":{"description":"The number of timelines updated","minimum":0,"type":"integer"}},"required":["rules_installed","rules_updated","timelines_installed","timelines_updated"]}}},"description":"Indicates a successful call"}},"summary":"Install prebuilt detection rules and Timelines","tags":["Security Detections API"]}},"/api/detection_engine/rules/prepackaged/_status":{"get":{"description":"Retrieve the status of all Elastic prebuilt detection rules and Timelines. \n\nThis endpoint provides detailed information about the number of custom rules, installed prebuilt rules, available prebuilt rules that are not installed, outdated prebuilt rules, installed prebuilt timelines, available prebuilt timelines that are not installed, and outdated prebuilt timelines.\n","operationId":"ReadPrebuiltRulesAndTimelinesStatus","responses":{"200":{"content":{"application/json":{"examples":{"example1":{"value":{"rules_custom_installed":0,"rules_installed":0,"rules_not_installed":112,"rules_not_updated":0,"timelines_installed":0,"timelines_not_installed":0,"timelines_not_updated":0}}},"schema":{"additionalProperties":false,"type":"object","properties":{"rules_custom_installed":{"description":"The total number of custom rules","minimum":0,"type":"integer"},"rules_installed":{"description":"The total number of installed prebuilt rules","minimum":0,"type":"integer"},"rules_not_installed":{"description":"The total number of available prebuilt rules that are not installed","minimum":0,"type":"integer"},"rules_not_updated":{"description":"The total number of outdated prebuilt rules","minimum":0,"type":"integer"},"timelines_installed":{"description":"The total number of installed prebuilt timelines","minimum":0,"type":"integer"},"timelines_not_installed":{"description":"The total number of available prebuilt timelines that are not installed","minimum":0,"type":"integer"},"timelines_not_updated":{"description":"The total number of outdated prebuilt timelines","minimum":0,"type":"integer"}},"required":["rules_custom_installed","rules_installed","rules_not_installed","rules_not_updated","timelines_installed","timelines_not_installed","timelines_not_updated"]}}},"description":"Indicates a successful call"}},"summary":"Retrieve the status of prebuilt detection rules and Timelines","tags":["Security Detections API"]}},"/api/detection_engine/rules/preview":{"post":{"operationId":"RulePreview","parameters":[{"description":"Enables logging and returning in response ES queries, performed during rule execution","in":"query","name":"enable_logged_requests","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]},{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewParams"}]}],"discriminator":{"propertyName":"type"}}}},"description":"An object containing tags to add or remove and alert ids the changes will be applied","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"isAborted":{"type":"boolean"},"logs":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewLogs"},"type":"array"},"previewId":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}},"required":["logs"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Preview rule alerts generated on specified time range","tags":["Security Detections API"]}},"/api/detection_engine/signals/assignees":{"post":{"description":"Assign users to detection alerts, and unassign them from alerts.\n\u003e info\n\u003e You cannot add and remove the same assignee in the same request.\n","operationId":"SetAlertAssignees","requestBody":{"content":{"application/json":{"examples":{"add":{"value":{"assignees":{"add":["u_MxY0jbrft7EcfC6iNZSUGeI_n6iYrSwZj5mWF5EqmSU_0"],"remove":[]},"ids":["681c2a707335aa7df5f349b70013d87254746191712ecf0ced9b3e2d538503a6"]}},"remove":{"value":{"assignees":{"add":[],"remove":["u_MxY0jbrft7EcfC6iNZSUGeI_n6iYrSwZj5mWF5EqmSU_0"]},"ids":["681c2a707335aa7df5f349b70013d87254746191712ecf0ced9b3e2d538503a6"]}}},"schema":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Security_Detections_API_AlertAssignees","description":"Details about the assignees to assign and unassign."},"ids":{"$ref":"#/components/schemas/Security_Detections_API_AlertIds"}},"required":["assignees","ids"]}}},"required":true},"responses":{"200":{"content":{"application/ndjson":{"examples":{"add":{"value":{"batches":"1,","deleted":"0,","failures":[],"noops":"0,","requests_per_second":"-1,","retries":[{"bulk":"0,"},{"search":0}],"throttled_millis":"0,","throttled_until_millis":"0,","timed_out":"false,","took":"76,","total":"1,","updated":"1,","version_conflicts":"0,"}}}}},"description":"Indicates a successful call."},"400":{"description":"Invalid request."}},"summary":"Assign and unassign users from detection alerts","tags":["Security Detections API"]}},"/api/detection_engine/signals/finalize_migration":{"post":{"deprecated":true,"description":"Finalize successful migrations of detection alerts. This replaces the original index's alias with the successfully migrated index's alias.\nThe endpoint is idempotent; therefore, it can safely be used to poll a given migration and, upon completion,\nfinalize it.\n","operationId":"FinalizeAlertsMigration","requestBody":{"content":{"application/json":{"schema":{"example":{"migration_ids":["924f7c50-505f-11eb-ae0a-3fa2e626a51d"]},"type":"object","properties":{"migration_ids":{"description":"Array of `migration_id`s to finalize.","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["migration_ids"]}}},"description":"Array of `migration_id`s to finalize","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"migrations":[{"completed":true,"destinationIndex":".siem-signals-default-000002-r000016","id":"924f7c50-505f-11eb-ae0a-3fa2e626a51d","sourceIndex":".siem-signals-default-000002","status":"success","updated":"2021-01-06T22:05:56.859Z","version":16}]}}},"schema":{"items":{"$ref":"#/components/schemas/Security_Detections_API_MigrationFinalizationResult"},"type":"array"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Finalize detection alert migrations","tags":["Security Detections API"]}},"/api/detection_engine/signals/migration":{"delete":{"deprecated":true,"description":"Migrations favor data integrity over shard size. Consequently, unused or orphaned indices are artifacts of\nthe migration process. A successful migration will result in both the old and new indices being present.\nAs such, the old, orphaned index can (and likely should) be deleted.\n\nWhile you can delete these indices manually,\nthe endpoint accomplishes this task by applying a deletion policy to the relevant index, causing it to be deleted\nafter 30 days. It also deletes other artifacts specific to the migration implementation.\n","operationId":"AlertsMigrationCleanup","requestBody":{"content":{"application/json":{"schema":{"example":{"migration_ids":["924f7c50-505f-11eb-ae0a-3fa2e626a51d"]},"type":"object","properties":{"migration_ids":{"description":"Array of `migration_id`s to cleanup.","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["migration_ids"]}}},"description":"Array of `migration_id`s to cleanup","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"migrations":[{"destinationIndex":".siem-signals-default-000002-r000016","id":"924f7c50-505f-11eb-ae0a-3fa2e626a51d","sourceIndex":".siem-signals-default-000002","status":"success","updated":"2021-01-06T22:05:56.859Z","version":16}]}}},"schema":{"items":{"$ref":"#/components/schemas/Security_Detections_API_MigrationCleanupResult"},"type":"array"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Clean up detection alert migrations","tags":["Security Detections API"]},"post":{"deprecated":true,"description":"Initiate a migration of detection alerts.\nMigrations are initiated per index. While the process is neither destructive nor interferes with existing data, it may be resource-intensive. As such, it is recommended that you plan your migrations accordingly.\n","operationId":"CreateAlertsMigration","requestBody":{"content":{"application/json":{"examples":{"singleIndex":{"value":{"index":[".siem-signals-default-000001"]}}},"schema":{"allOf":[{"type":"object","properties":{"index":{"description":"Array of index names to migrate.","items":{"format":"nonempty","minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["index"]},{"$ref":"#/components/schemas/Security_Detections_API_AlertsReindexOptions"}]}}},"description":"Alerts migration parameters","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"indices":[{"index":".siem-signals-default-000001,","migration_id":"923f7c50-505f-11eb-ae0a-3fa2e626a51d","migration_index":".siem-signals-default-000001-r000016"}]}}},"schema":{"type":"object","properties":{"indices":{"items":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexMigrationSuccess"},{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexMigrationError"},{"$ref":"#/components/schemas/Security_Detections_API_SkippedAlertsIndexMigration"}]},"type":"array"}},"required":["indices"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Initiate a detection alert migration","tags":["Security Detections API"]}},"/api/detection_engine/signals/migration_status":{"get":{"deprecated":true,"description":"Retrieve indices that contain detection alerts of a particular age, along with migration information for each of those indices.","operationId":"ReadAlertsMigrationStatus","parameters":[{"description":"Maximum age of qualifying detection alerts","in":"query","name":"from","required":true,"schema":{"description":"Time from which data is analyzed. For example, now-4200s means the rule analyzes data from 70 minutes\nbefore its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).\n","example":"now-30d","format":"date-math","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"indices":[{"index":".siem-signals-default-000002","is_outdated":true,"migrations":[{"id":"924f7c50-505f-11eb-ae0a-3fa2e626a51d","status":"pending","updated":"2021-01-06T20:41:37.173Z","version":16}],"signal_versions":[{"count":100,"version":15},{"count":87,"version":16}],"version":15},{"index":".siem-signals-default-000003","is_outdated":false,"migrations":[],"signal_versions":[{"count":54,"version":16}],"version":16}]}}},"schema":{"type":"object","properties":{"indices":{"items":{"$ref":"#/components/schemas/Security_Detections_API_IndexMigrationStatus"},"type":"array"}},"required":["indices"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Retrieve the status of detection alert migrations","tags":["Security Detections API"]}},"/api/detection_engine/signals/search":{"post":{"description":"Find and/or aggregate detection alerts that match the given query.","operationId":"SearchAlerts","requestBody":{"content":{"application/json":{"examples":{"query":{"value":{"aggs":{"alertsByGrouping":{"terms":{"field":"host.name","size":10}},"missingFields":{"missing":{"field":"host.name"}}},"query":{"bool":{"filter":[{"bool":{"filter":[{"match_phrase":{"kibana.alert.workflow_status":"open"}}],"must":[],"must_not":[{"exists":{"field":"kibana.alert.building_block_type"}}],"should":[]}},{"range":{"@timestamp":{"gte":"2025-01-17T08:00:00.000Z","lte":"2025-01-18T07:59:59.999Z"}}}]}},"runtime_mappings":{},"size":0}}},"schema":{"description":"Elasticsearch query and aggregation request","type":"object","properties":{"_source":{"oneOf":[{"type":"boolean"},{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"aggs":{"additionalProperties":true,"type":"object"},"fields":{"items":{"type":"string"},"type":"array"},"query":{"additionalProperties":true,"type":"object"},"runtime_mappings":{"additionalProperties":true,"type":"object"},"size":{"minimum":0,"type":"integer"},"sort":{"$ref":"#/components/schemas/Security_Detections_API_AlertsSort"},"track_total_hits":{"type":"boolean"}}}}},"description":"Search and/or aggregation query","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"_shards":{"failed":0,"skipped":0,"successful":1,"total":1},"aggregations":{"alertsByGrouping":{"buckets":[{"doc_count":5,"key":"Host-f43kkddfyc"}],"doc_count_error_upper_bound":0,"sum_other_doc_count":0},"missingFields":{"doc_count":0}},"hits":{"hits":[],"max_score":null,"total":{"relation":"eq","value":5}},"timed_out":false,"took":0}}},"schema":{"additionalProperties":true,"description":"Elasticsearch search response","type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Find and/or aggregate detection alerts","tags":["Security Detections API"]}},"/api/detection_engine/signals/status":{"post":{"description":"Set the status of one or more detection alerts.","operationId":"SetAlertsStatus","requestBody":{"content":{"application/json":{"examples":{"byId":{"value":{"signal_ids":["80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1"],"status":"closed"}},"byQuery":{"value":{"conflicts":"proceed","query":{"bool":{"filter":[{"@timestamp":{"format":"strict_date_optional_time","gte":"2024-10-23T07:00:00.000Z","lte":"2025-01-21T20:12:11.704Z"},"range":null},{"bool":{"filter":{"bool":{"filter":[{"match_phrase":{"kibana.alert.workflow_status":"open"}},{"@timestamp":{"format":"strict_date_optional_time","gte":"2024-10-23T07:00:00.000Z","lte":"2025-01-21T20:12:11.704Z"},"range":null}],"must":[],"must_not":[{"exists":{"field":"kibana.alert.building_block_type"}}],"should":[]}}}}],"must":[],"must_not":[],"should":[]}},"status":"closed"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_SetAlertsStatusByIds"},{"$ref":"#/components/schemas/Security_Detections_API_SetAlertsStatusByQuery"}]}}},"description":"An object containing desired status and explicit alert ids or a query to select alerts","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"byId":{"value":{"batches":1,"deleted":0,"failures":[],"noops":0,"requests_per_second":-1,"retries":{"bulk":0,"search":0},"throttled_millis":0,"throttled_until_millis":0,"timed_out":false,"took":81,"total":1,"updated":1,"version_conflicts":0}},"byQuery":{"value":{"batches":1,"deleted":0,"failures":[],"noops":0,"requests_per_second":-1,"retries":{"bulk":0,"search":0},"throttled_millis":0,"throttled_until_millis":0,"timed_out":false,"took":100,"total":17,"updated":17,"version_conflicts":0}}},"schema":{"additionalProperties":true,"description":"Elasticsearch update by query response","type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Set a detection alert status","tags":["Security Detections API"]}},"/api/detection_engine/signals/tags":{"post":{"description":"And tags to detection alerts, and remove them from alerts.\n\u003e info\n\u003e You cannot add and remove the same alert tag in the same request.\n","operationId":"SetAlertTags","requestBody":{"content":{"application/json":{"examples":{"add":{"value":{"ids":["549c7129c76cbd554aba1bd638f8a49dde95088f5832e50218358e7eca1cf16e"],"tags":{"tags_to_add":["Duplicate"],"tags_to_remove":[]}}},"remove":{"value":{"ids":["549c7129c76cbd554aba1bd638f8a49dde95088f5832e50218358e7eca1cf16e"],"tags":{"tags_to_add":[],"tags_to_remove":["Duplicate"]}}}},"schema":{"type":"object","properties":{"ids":{"$ref":"#/components/schemas/Security_Detections_API_AlertIds"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_SetAlertTags"}},"required":["ids","tags"]}}},"description":"An object containing tags to add or remove and alert ids the changes will be applied","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"batches":"1,","deleted":"0,","failures":[],"noops":"0,","requests_per_second":"-1,","retries":{"bulk":"0,","search":0},"throttled_millis":"0,","throttled_until_millis":"0,","timed_out":"false,","took":"68,","total":"1,","updated":"1,","version_conflicts":"0,"}}},"schema":{"additionalProperties":true,"description":"Elasticsearch update by query response","type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Detections_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Add and remove detection alert tags","tags":["Security Detections API"]}},"/api/detection_engine/tags":{"get":{"description":"List all unique tags from all detection rules.","operationId":"ReadTags","responses":{"200":{"content":{"application/json":{"examples":{"example1":{"value":["zeek","suricata","windows","linux","network","initial access","remote access","phishing"]}},"schema":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"}}},"description":"Indicates a successful call"}},"summary":"List all detection rule tags","tags":["Security Detections API"]}},"/api/encrypted_saved_objects/_rotate_key":{"post":{"description":"Superuser role required.\n\nIf a saved object cannot be decrypted using the primary encryption key, then Kibana will attempt to decrypt it using the specified decryption-only keys. In most of the cases this overhead is negligible, but if you're dealing with a large number of saved objects and experiencing performance issues, you may want to rotate the encryption key.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n","operationId":"rotateEncryptionKey","parameters":[{"description":"Specifies a maximum number of saved objects that Kibana can process in a single batch. Bulk key rotation is an iterative process since Kibana may not be able to fetch and process all required saved objects in one go and splits processing into consequent batches. By default, the batch size is 10000, which is also a maximum allowed value.\n","in":"query","name":"batch_size","required":false,"schema":{"default":10000,"type":"number"}},{"description":"Limits encryption key rotation only to the saved objects with the specified type. By default, Kibana tries to rotate the encryption key for all saved object types that may contain encrypted attributes.\n","in":"query","name":"type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"rotateEncryptionKeyResponse":{"$ref":"#/components/examples/Saved_objects_key_rotation_response"}},"schema":{"type":"object","properties":{"failed":{"description":"Indicates the number of the saved objects that were still encrypted with one of the old encryption keys that Kibana failed to re-encrypt with the primary key.\n","type":"number"},"successful":{"description":"Indicates the total number of all encrypted saved objects (optionally filtered by the requested `type`), regardless of the key Kibana used for encryption.\n\nNOTE: In most cases, `total` will be greater than `successful` even if `failed` is zero. The reason is that Kibana may not need or may not be able to rotate encryption keys for all encrypted saved objects.\n","type":"number"},"total":{"description":"Indicates the total number of all encrypted saved objects (optionally filtered by the requested `type`), regardless of the key Kibana used for encryption.\n","type":"number"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Already in progress."}},"summary":"Rotate a key for encrypted saved objects","tags":["saved objects"]}},"/api/endpoint_list":{"post":{"description":"Create an endpoint exception list, which groups endpoint exception list items. If an endpoint exception list already exists, an empty response is returned.","operationId":"CreateEndpointList","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Create an endpoint exception list","tags":["Security Endpoint Exceptions API"]}},"/api/endpoint_list/items":{"delete":{"description":"Delete an endpoint exception list item using the `id` or `item_id` field.","operationId":"DeleteEndpointListItem","parameters":[{"description":"Either `id` or `item_id` must be specified","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemId"}},{"description":"Either `id` or `item_id` must be specified","in":"query","name":"item_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list item not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Delete an endpoint exception list item","tags":["Security Endpoint Exceptions API"]},"get":{"description":"Get the details of an endpoint exception list item using the `id` or `item_id` field.","operationId":"ReadEndpointListItem","parameters":[{"description":"Either `id` or `item_id` must be specified","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemId"}},{"description":"Either `id` or `item_id` must be specified","in":"query","name":"item_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"},"type":"array"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list item not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Get an endpoint exception list item","tags":["Security Endpoint Exceptions API"]},"post":{"description":"Create an endpoint exception list item, and associate it with the endpoint exception list.","operationId":"CreateEndpointListItem","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryArray"},"item_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId"},"meta":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemName"},"os_types":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemTags","default":[]},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemType"}},"required":["type","name","description","entries"]}}},"description":"Exception list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list item already exists"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Create an endpoint exception list item","tags":["Security Endpoint Exceptions API"]},"put":{"description":"Update an endpoint exception list item using the `id` or `item_id` field.","operationId":"UpdateEndpointListItem","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"_version":{"type":"string"},"comments":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryArray"},"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemId","description":"Either `id` or `item_id` must be specified"},"item_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId","description":"Either `id` or `item_id` must be specified"},"meta":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemName"},"os_types":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemTags"},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemType"}},"required":["type","name","description","entries"]}}},"description":"Exception list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list item not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Update an endpoint exception list item","tags":["Security Endpoint Exceptions API"]}},"/api/endpoint_list/items/_find":{"get":{"description":"Get a list of all endpoint exception list items.","operationId":"FindEndpointListItems","parameters":[{"description":"Filters the returned results according to the value of the specified field,\nusing the `\u003cfield name\u003e:\u003cfield value\u003e` syntax.\n","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_FindEndpointListItemsFilter"}},{"description":"The page number to return","in":"query","name":"page","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"The number of exception list items to return per page","in":"query","name":"per_page","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Determines which field is used to sort the results","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"}},{"description":"Determines the sort order, which can be `desc` or `asc`","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_EndpointListItem"},"type":"array"},"page":{"minimum":0,"type":"integer"},"per_page":{"minimum":0,"type":"integer"},"pit":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_PlatformErrorResponse"}}},"description":"Insufficient privileges"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Endpoint list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error"}},"summary":"Get endpoint exception list items","tags":["Security Endpoint Exceptions API"]}},"/api/endpoint/action":{"get":{"description":"Get a list of all response actions.","operationId":"EndpointGetActionsList","parameters":[{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Page"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PageSize"}},{"in":"query","name":"commands","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Commands"}},{"in":"query","name":"agentIds","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentIds"}},{"in":"query","name":"userIds","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_UserIds"}},{"in":"query","name":"startDate","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_StartDate"}},{"in":"query","name":"endDate","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndDate"}},{"in":"query","name":"agentTypes","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"}},{"in":"query","name":"withOutputs","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_WithOutputs"}},{"in":"query","name":"types","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Types"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetEndpointActionListResponse"}}},"description":"OK"}},"summary":"Get response actions","tags":["Security Endpoint Management API"]}},"/api/endpoint/action_status":{"get":{"description":"Get the status of response actions for the specified agent IDs.","operationId":"EndpointGetActionsStatus","parameters":[{"in":"query","name":"query","required":true,"schema":{"type":"object","properties":{"agent_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentIds"}}}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ActionStatusSuccessResponse"}}},"description":"OK"}},"summary":"Get response actions status","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/{action_id}":{"get":{"description":"Get the details of a response action using the action ID.","operationId":"EndpointGetActionsDetails","parameters":[{"in":"path","name":"action_id","required":true,"schema":{"description":"The ID of the action to retrieve.","example":"fr518850-681a-4y60-aa98-e22640cae2b8","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetEndpointActionResponse"}}},"description":"OK"}},"summary":"Get action details","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/{action_id}/file/{file_id}":{"get":{"description":"Get information for the specified file using the file ID.","operationId":"EndpointFileInfo","parameters":[{"in":"path","name":"action_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"file_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuccessResponse"}}},"description":"OK"}},"summary":"Get file information","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/{action_id}/file/{file_id}/download":{"get":{"description":"Download a file from an endpoint.","operationId":"EndpointFileDownload","parameters":[{"in":"path","name":"action_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"file_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuccessResponse"}}},"description":"OK"}},"summary":"Download a file","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/execute":{"post":{"description":"Run a shell command on an endpoint.","operationId":"EndpointExecuteAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ExecuteRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ExecuteRouteResponse"}}},"description":"OK"}},"summary":"Run a command","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/get_file":{"post":{"description":"Get a file from an endpoint.","operationId":"EndpointGetFileAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetFileRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetFileRouteResponse"}}},"description":"OK"}},"summary":"Get a file","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/isolate":{"post":{"description":"Isolate an endpoint from the network. The endpoint remains isolated until it's released.","operationId":"EndpointIsolateAction","requestBody":{"content":{"application/json":{"examples":{"multiple_endpoints":{"summary":"Isolates several hosts; includes a comment","value":{"comment":"Locked down, pending further investigation","endpoint_ids":["9972d10e-4b9e-41aa-a534-a85e2a28ea42","bc0e4f0c-3bca-4633-9fee-156c0b505d16","fa89271b-b9d4-43f2-a684-307cffddeb5a"]}},"single_endpoint":{"summary":"Isolates a single host with an endpoint_id value of ed518850-681a-4d60-bb98-e22640cae2a8","value":{"endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"]}},"with_case_id":{"summary":"Isolates a single host with a case_id value of 1234","value":{"case_ids":["4976be38-c134-4554-bd5e-0fd89ce63667"],"comment":"Isolating as initial response","endpoint_ids":["1aa1f8fd-0fb0-4fe4-8c30-92068272d3f0","b30a11bf-1395-4707-b508-fbb45ef9793e"]}}},"schema":{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_IsolateRouteResponse"}}},"description":"OK"}},"summary":"Isolate an endpoint","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/kill_process":{"post":{"description":"Terminate a running process on an endpoint.","operationId":"EndpointKillProcessAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_KillProcessRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_KillProcessRouteResponse"}}},"description":"OK"}},"summary":"Terminate a process","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/running_procs":{"post":{"description":"Get a list of all processes running on an endpoint.","operationId":"EndpointGetProcessesAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetProcessesRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_GetProcessesRouteResponse"}}},"description":"OK"}},"summary":"Get running processes","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/runscript":{"post":{"description":"Run a shell command on an endpoint.","operationId":"RunScriptAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_RunScriptRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuccessResponse"}}},"description":"OK"}},"summary":"Run a script","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/scan":{"post":{"description":"Scan a specific file or directory on an endpoint for malware.","operationId":"EndpointScanAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ScanRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ScanRouteResponse"}}},"description":"OK"}},"summary":"Scan a file or directory","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/state":{"get":{"description":"Get a response actions state, which reports whether encryption is enabled.","operationId":"EndpointGetActionsState","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ActionStateSuccessResponse"}}},"description":"OK"}},"summary":"Get actions state","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/suspend_process":{"post":{"description":"Suspend a running process on an endpoint.","operationId":"EndpointSuspendProcessAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuspendProcessRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuspendProcessRouteResponse"}}},"description":"OK"}},"summary":"Suspend a process","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/unisolate":{"post":{"description":"Release an isolated endpoint, allowing it to rejoin a network.","operationId":"EndpointUnisolateAction","requestBody":{"content":{"application/json":{"examples":{"multipleHosts":{"summary":"Releases several hosts; includes a comment:","value":{"comment":"Benign process identified, releasing group","endpoint_ids":["9972d10e-4b9e-41aa-a534-a85e2a28ea42","bc0e4f0c-3bca-4633-9fee-156c0b505d16","fa89271b-b9d4-43f2-a684-307cffddeb5a"]}},"singleHost":{"summary":"Releases a single host with an endpoint_id value of ed518850-681a-4d60-bb98-e22640cae2a8","value":{"endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"]}},"withCaseId":{"summary":"Releases hosts with an associated case; includes a comment.","value":{"case_ids":["4976be38-c134-4554-bd5e-0fd89ce63667"],"comment":"Remediation complete, restoring network","endpoint_ids":["1aa1f8fd-0fb0-4fe4-8c30-92068272d3f0","b30a11bf-1395-4707-b508-fbb45ef9793e"]}}},"schema":{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_UnisolateRouteResponse"}}},"description":"OK"}},"summary":"Release an isolated endpoint","tags":["Security Endpoint Management API"]}},"/api/endpoint/action/upload":{"post":{"description":"Upload a file to an endpoint.","operationId":"EndpointUploadAction","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_UploadRouteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_UploadRouteResponse"}}},"description":"OK"}},"summary":"Upload a file","tags":["Security Endpoint Management API"]}},"/api/endpoint/metadata":{"get":{"operationId":"GetEndpointMetadataList","parameters":[{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Page"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PageSize"}},{"in":"query","name":"kuery","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Kuery"}},{"in":"query","name":"hostStatuses","required":true,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_HostStatuses"}},{"in":"query","name":"sortField","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SortField"}},{"in":"query","name":"sortDirection","required":false,"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SortDirection"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_MetadataListResponse"}}},"description":"OK"}},"summary":"Get a metadata list","tags":["Security Endpoint Management API"]}},"/api/endpoint/metadata/{id}":{"get":{"operationId":"GetEndpointMetadata","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"ed518850-681a-4d60-bb98-e22640cae2a8","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointMetadataResponse"}}},"description":"OK"}},"summary":"Get metadata","tags":["Security Endpoint Management API"]}},"/api/endpoint/policy_response":{"get":{"operationId":"GetPolicyResponse","parameters":[{"in":"query","name":"query","required":true,"schema":{"type":"object","properties":{"agentId":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentId"}}}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_SuccessResponse"}}},"description":"OK"}},"summary":"Get a policy response","tags":["Security Endpoint Management API"]}},"/api/endpoint/protection_updates_note/{package_policy_id}":{"get":{"operationId":"GetProtectionUpdatesNote","parameters":[{"in":"path","name":"package_policy_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ProtectionUpdatesNoteResponse"}}},"description":"OK"}},"summary":"Get a protection updates note","tags":["Security Endpoint Management API"]},"post":{"operationId":"CreateUpdateProtectionUpdatesNote","parameters":[{"in":"path","name":"package_policy_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_ProtectionUpdatesNoteResponse"}}},"description":"OK"}},"summary":"Create or update a protection updates note","tags":["Security Endpoint Management API"]}},"/api/entity_analytics/monitoring/engine/init":{"post":{"operationId":"InitMonitoringEngine","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoringEngineDescriptor"}}},"description":"Successful response"}},"summary":"Initialize the Privilege Monitoring Engine","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/privileges/health":{"get":{"operationId":"PrivMonHealth","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}},"description":"Successful response"}},"summary":"Health check on Privilege Monitoring","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users":{"post":{"operationId":"CreatePrivMonUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_UserName"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"}}},"description":"User created successfully"}},"summary":"Create a new monitored user","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users/_csv":{"post":{"operationId":"BulkUploadUsersCSV","requestBody":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"CSV file containing users to upsert","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"upserted_count":{"type":"integer"}}}}},"description":"Successful response"}},"summary":"Upsert multiple monitored users via CSV upload","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users/_json":{"post":{"operationId":"BulkUploadUsersJSON","requestBody":{"content":{"text/json":{"schema":{"type":"object","properties":{"users":{"items":{"type":"object","properties":{"is_monitored":{"type":"boolean"},"user_name":{"type":"string"}}},"type":"array"}}}}},"description":"JSON file containing users to upsert","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"upserted_count":{"type":"integer"}}}}},"description":"Successful response"}},"summary":"Upsert multiple monitored users via JSON upload","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users/{id}":{"delete":{"operationId":"DeletePrivMonUser","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"aknowledged":{"description":"Indicates if the deletion was successful","type":"boolean"},"message":{"description":"A message providing additional information about the deletion status","type":"string"}},"required":["success"]}}},"description":"User deleted successfully"}},"summary":"Delete a monitored user","tags":["Security Entity Analytics API"]},"get":{"operationId":"GetPrivMonUser","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"}}},"description":"User details retrieved"}},"summary":"Retrieve a monitored user by ID","tags":["Security Entity Analytics API"]},"put":{"operationId":"UpdatePrivMonUser","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"}}},"description":"User updated successfully"}},"summary":"Update a monitored user","tags":["Security Entity Analytics API"]}},"/api/entity_analytics/monitoring/users/list":{"get":{"operationId":"ListPrivMonUsers","parameters":[{"description":"KQL query to filter the list of monitored users","in":"query","name":"kql","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_MonitoredUserDoc"},"type":"array"}}},"description":"List of monitored users"}},"summary":"List all monitored users","tags":["Security Entity Analytics API"]}},"/api/entity_store/enable":{"post":{"operationId":"InitEntityStore","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delay":{"default":"1m","description":"The delay before the transform will run.","pattern":"[smdh]$","type":"string"},"docsPerSecond":{"description":"The number of documents per second to process.","type":"integer"},"enrichPolicyExecutionInterval":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_Interval"},"entityTypes":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"},"type":"array"},"fieldHistoryLength":{"default":10,"description":"The number of historical values to keep for each field.","type":"integer"},"filter":{"type":"string"},"frequency":{"default":"1m","description":"The frequency at which the transform will run.","pattern":"[smdh]$","type":"string"},"indexPattern":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IndexPattern"},"lookbackPeriod":{"default":"24h","description":"The amount of time the transform looks back to calculate the aggregations.","pattern":"[smdh]$","type":"string"},"timeout":{"default":"180s","description":"The timeout for initializing the aggregating transform.","pattern":"[smdh]$","type":"string"},"timestampField":{"default":"@timestamp","description":"The field to use as the timestamp.","type":"string"}}}}},"description":"Schema for the entity store initialization","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"engines":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"},"type":"array"},"succeeded":{"type":"boolean"}}}}},"description":"Successful response"},"400":{"description":"Invalid request"}},"summary":"Initialize the Entity Store","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines":{"get":{"operationId":"ListEntityEngines","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"engines":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"},"type":"array"}}}}},"description":"Successful response"}},"summary":"List the Entity Engines","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/{entityType}":{"delete":{"operationId":"DeleteEntityEngine","parameters":[{"description":"The entity type of the engine (either 'user' or 'host').","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}},{"description":"Control flag to also delete the entity data.","in":"query","name":"data","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}},"description":"Successful response"}},"summary":"Delete the Entity Engine","tags":["Security Entity Analytics API"]},"get":{"operationId":"GetEntityEngine","parameters":[{"description":"The entity type of the engine (either 'user' or 'host').","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"}}},"description":"Successful response"}},"summary":"Get an Entity Engine","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/{entityType}/init":{"post":{"operationId":"InitEntityEngine","parameters":[{"description":"The entity type of the engine (either 'user' or 'host').","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delay":{"default":"1m","description":"The delay before the transform will run.","pattern":"[smdh]$","type":"string"},"docsPerSecond":{"description":"The number of documents per second to process.","type":"integer"},"enrichPolicyExecutionInterval":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_Interval"},"fieldHistoryLength":{"default":10,"description":"The number of historical values to keep for each field.","type":"integer"},"filter":{"type":"string"},"frequency":{"default":"1m","description":"The frequency at which the transform will run.","pattern":"[smdh]$","type":"string"},"indexPattern":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IndexPattern"},"lookbackPeriod":{"default":"24h","description":"The amount of time the transform looks back to calculate the aggregations.","pattern":"[smdh]$","type":"string"},"timeout":{"default":"180s","description":"The timeout for initializing the aggregating transform.","pattern":"[smdh]$","type":"string"},"timestampField":{"default":"@timestamp","description":"The field to use as the timestamp for the entity type.","type":"string"}}}}},"description":"Schema for the engine initialization","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"}}},"description":"Successful response"},"400":{"description":"Invalid request"}},"summary":"Initialize an Entity Engine","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/{entityType}/start":{"post":{"operationId":"StartEntityEngine","parameters":[{"description":"The entity type of the engine","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean"}}}}},"description":"Successful response"}},"summary":"Start an Entity Engine","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/{entityType}/stop":{"post":{"operationId":"StopEntityEngine","parameters":[{"description":"The entity type of the engine (either 'user' or 'host').","in":"path","name":"entityType","required":true,"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"stopped":{"type":"boolean"}}}}},"description":"Successful response"}},"summary":"Stop an Entity Engine","tags":["Security Entity Analytics API"]}},"/api/entity_store/engines/apply_dataview_indices":{"post":{"operationId":"ApplyEntityEngineDataviewIndices","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDataviewUpdateResult"},"type":"array"},"success":{"type":"boolean"}}}}},"description":"Successful response"},"207":{"content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"items":{"type":"string"},"type":"array"},"result":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDataviewUpdateResult"},"type":"array"},"success":{"type":"boolean"}}}}},"description":"Partial successful response"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Error response"}},"summary":"Apply DataView indices to all installed engines","tags":["Security Entity Analytics API"]}},"/api/entity_store/entities/list":{"get":{"description":"List entities records, paging, sorting and filtering as needed.","operationId":"ListEntities","parameters":[{"in":"query","name":"sort_field","required":false,"schema":{"type":"string"}},{"in":"query","name":"sort_order","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"maximum":10000,"minimum":1,"type":"integer"}},{"description":"An ES query to filter by.","in":"query","name":"filterQuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"entity_types","required":true,"schema":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"inspect":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_InspectQuery"},"page":{"minimum":1,"type":"integer"},"per_page":{"maximum":1000,"minimum":1,"type":"integer"},"records":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_Entity"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["records","page","per_page","total"]}}},"description":"Entities returned successfully"}},"summary":"List Entity Store Entities","tags":["Security Entity Analytics API"]}},"/api/entity_store/status":{"get":{"operationId":"GetEntityStoreStatus","parameters":[{"description":"If true returns a detailed status of the engine including all it's components","in":"query","name":"include_components","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"engines":{"items":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineDescriptor"},{"type":"object","properties":{"components":{"items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineComponentStatus"},"type":"array"}}}]},"type":"array"},"status":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_StoreStatus"}},"required":["status","engines"]}}},"description":"Successful response"}},"summary":"Get the status of the Entity Store","tags":["Security Entity Analytics API"]}},"/api/exception_lists":{"delete":{"description":"Delete an exception list using the `id` or `list_id` field.","operationId":"DeleteExceptionList","parameters":[{"description":"Exception list's identifier. Either `id` or `list_id` must be specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"}},{"description":"Human readable exception list string identifier, e.g. `trusted-linux-processes`. Either `id` or `list_id` must be specified.","examples":{"autogeneratedId":{"value":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2"},"list_id":{"value":"simple_list"}},"in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}}],"responses":{"200":{"content":{"application/json":{"examples":{"detectionExceptionList":{"value":{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [DELETE /api/exception_lists?list_id=simple_list\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list list_id: \"foo\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete an exception list","tags":["Security Exceptions API"]},"get":{"description":"Get the details of an exception list using the `id` or `list_id` field.","operationId":"ReadExceptionList","parameters":[{"description":"Exception list's identifier. Either `id` or `list_id` must be specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"}},{"description":"Human readable exception list string identifier, e.g. `trusted-linux-processes`. Either `id` or `list_id` must be specified.","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}}],"responses":{"200":{"content":{"application/json":{"examples":{"detectionType":{"value":{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists?list_id=simple_list\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get exception list details","tags":["Security Exceptions API"]},"post":{"description":"An exception list groups exception items and can be associated with detection rules. You can assign exception lists to multiple detection rules.\n\u003e info\n\u003e All exception items added to the same list are evaluated using `OR` logic. That is, if any of the items in a list evaluate to `true`, the exception prevents the rule from generating an alert. Likewise, `OR` logic is used for evaluating exceptions when more than one exception list is assigned to a rule. To use the `AND` operator, you can define multiple clauses (`entries`) in a single exception item.\n","operationId":"CreateExceptionList","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"This is a sample detection type exception list.","list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"type":"detection"},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListDescription"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListTags","default":[]},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListType"},"version":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListVersion","default":1}},"required":["name","description","type"]}}},"description":"Exception list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"autogeneratedListId":{"value":{"_version":"WzMsMV0=","created_at":"2025-01-09T01:05:23.019Z","created_by":"elastic","description":"This is a sample detection type exception with an autogenerated list_id.","id":"28243c2f-624a-4443-823d-c0b894880931","immutable":false,"list_id":"8c1aae4c-1ef5-4bce-a2e3-16584b501783","name":"Sample Detection Exception List","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"ad94de31-39f7-4ad7-b8e4-988bfa95f338","type":"detection","updated_at":"2025-01-09T01:05:23.020Z","updated_by":"elastic","version":1}},"namespaceAgnostic":{"value":{"_version":"WzUsMV0=","created_at":"2025-01-09T01:10:36.369Z","created_by":"elastic","description":"This is a sample agnostic endpoint type exception.","id":"1a744e77-22ca-4b6b-9085-54f55275ebe5","immutable":false,"list_id":"b935eb55-7b21-4c1c-b235-faa1df23b3d6","name":"Sample Agnostic Endpoint Exception List","namespace_type":"agnostic","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"49ea0adc-a2b8-4d83-a8f3-2fb98301dea3","type":"endpoint","updated_at":"2025-01-09T01:10:36.369Z","updated_by":"elastic","version":1}},"typeDetection":{"value":{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}},"typeEndpoint":{"value":{"_version":"WzQsMV0=","created_at":"2025-01-09T01:07:49.658Z","created_by":"elastic","description":"This is a sample endpoint type exception list.","id":"a79f4730-6e32-4278-abfc-349c0add7d54","immutable":false,"list_id":"endpoint_list","name":"Sample Endpoint Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"94a028af-8f47-427a-aca5-ffaf829e64ee","type":"endpoint","updated_at":"2025-01-09T01:07:49.658Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: list_id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"exception list id: \"simple_list\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create an exception list","tags":["Security Exceptions API"]},"put":{"description":"Update an exception list using the `id` or `list_id` field.","operationId":"UpdateExceptionList","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"Different description","list_id":"simple_list","name":"Updated exception list name","os_types":["linux"],"tags":["draft malware"],"type":"detection"},"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListDescription"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListTags"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListType"},"version":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListVersion"}},"required":["name","description","type"]}}},"description":"Exception list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"simpleList":{"value":{"_version":"WzExLDFd","created_at":"2025-01-07T20:43:55.264Z","created_by":"elastic","description":"Different description","id":"fa7f545f-191b-4d32-b1f0-c7cd62a79e55","immutable":false,"list_id":"simple_list","name":"Updated exception list name","namespace_type":"single","os_types":[],"tags":["draft malware"],"tie_breaker_id":"319fe983-acdd-4806-b6c4-3098eae9392f","type":"detection","updated_at":"2025-01-07T21:32:03.726Z","updated_by":"elastic","version":2}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: list_id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PUT /api/exception_lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Update an exception list","tags":["Security Exceptions API"]}},"/api/exception_lists/_duplicate":{"post":{"description":"Duplicate an existing exception list.","operationId":"DuplicateExceptionList","parameters":[{"in":"query","name":"list_id","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"}},{"description":"Determines whether to include expired exceptions in the duplicated list. Expiration date defined by `expire_time`.","in":"query","name":"include_expired_exceptions","required":true,"schema":{"default":"true","enum":["true","false"],"example":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"detectionExceptionList":{"value":{"_version":"WzExNDY1LDFd","created_at":"2025-01-09T16:19:50.280Z","created_by":"elastic","description":"This is a sample detection type exception","id":"b2f4a715-6ab1-444c-8b1e-3fa1b1049429","immutable":false,"list_id":"d6390d60-bce3-4a48-9002-52db600f329c","name":"Sample Detection Exception List [Duplicate]","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"6fa670bd-666d-4c9c-9f1e-d1dbc516e985","type":"detection","updated_at":"2025-01-09T16:19:50.280Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type: Invalid enum value. Expected 'agnostic' | 'single', received 'foo'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists/_duplicate] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Exception list not found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list to duplicate not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Duplicate an exception list","tags":["Security Exceptions API"]}},"/api/exception_lists/_export":{"post":{"description":"Export an exception list and its associated items to an NDJSON file.","operationId":"ExportExceptionList","parameters":[{"in":"query","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"}},{"in":"query","name":"list_id","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":true,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"}},{"description":"Determines whether to include expired exceptions in the exported list. Expiration date defined by `expire_time`.","example":true,"in":"query","name":"include_expired_exceptions","required":true,"schema":{"default":"true","enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/ndjson":{"examples":{"exportSavedObjectsResponse":{"value":"{\"_version\":\"WzExNDU5LDFd\",\"created_at\":\"2025-01-09T16:18:17.757Z\",\"created_by\":\"elastic\",\"description\":\"This is a sample detection type exception\",\"id\":\"c86c2da0-2ab6-4343-b81c-216ef27e8d75\",\"immutable\":false,\"list_id\":\"simple_list\",\"name\":\"Sample Detection Exception List\",\"namespace_type\":\"single\",\"os_types\":[],\"tags\":[\"user added string for a tag\",\"malware\"],\"tie_breaker_id\":\"cf4a7b92-732d-47f0-a0d5-49a35a1736bf\",\"type\":\"detection\",\"updated_at\":\"2025-01-09T16:18:17.757Z\",\"updated_by\":\"elastic\",\"version\":1}\n{\"_version\":\"WzExNDYxLDFd\",\"comments\":[],\"created_at\":\"2025-01-09T16:18:42.308Z\",\"created_by\":\"elastic\",\"description\":\"This is a sample endpoint type exception\",\"entries\":[{\"type\":\"exists\",\"field\":\"actingProcess.file.signer\",\"operator\":\"excluded\"},{\"type\":\"match_any\",\"field\":\"host.name\",\"value\":[\"some host\",\"another host\"],\"operator\":\"included\"}],\"id\":\"f37597ce-eaa7-4b64-9100-4301118f6806\",\"item_id\":\"simple_list_item\",\"list_id\":\"simple_list\",\"name\":\"Sample Endpoint Exception List\",\"namespace_type\":\"single\",\"os_types\":[\"linux\"],\"tags\":[\"user added string for a tag\",\"malware\"],\"tie_breaker_id\":\"4ca3ef3e-9721-42c0-8107-cf47e094d40f\",\"type\":\"simple\",\"updated_at\":\"2025-01-09T16:18:42.308Z\",\"updated_by\":\"elastic\"}\n{\"exported_exception_list_count\":1,\"exported_exception_list_item_count\":1,\"missing_exception_list_item_count\":0,\"missing_exception_list_items\":[],\"missing_exception_lists\":[],\"missing_exception_lists_count\":0}\n"}},"schema":{"description":"A `.ndjson` file containing specified exception list and its items","format":"binary","type":"string"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: list_id: Required, namespace_type: Required","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists/_export] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Export an exception list","tags":["Security Exceptions API"]}},"/api/exception_lists/_find":{"get":{"description":"Get a list of all exception list containers.","operationId":"FindExceptionLists","parameters":[{"description":"Filters the returned results according to the value of the specified field.\n\nUses the `so type.field name:field` value syntax, where `so type` can be:\n\n- `exception-list`: Specify a space-aware exception list.\n- `exception-list-agnostic`: Specify an exception list that is shared across spaces.\n","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_FindExceptionListsFilter"}},{"description":"Determines whether the returned containers are Kibana associated with a Kibana space\nor available in all spaces (`agnostic` or `single`)\n","examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"default":["single"],"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"},"type":"array"}},{"description":"The page number to return","in":"query","name":"page","required":false,"schema":{"example":1,"minimum":1,"type":"integer"}},{"description":"The number of exception lists to return per page","in":"query","name":"per_page","required":false,"schema":{"example":20,"minimum":1,"type":"integer"}},{"description":"Determines which field is used to sort the results.","in":"query","name":"sort_field","required":false,"schema":{"example":"name","type":"string"}},{"description":"Determines the sort order, which can be `desc` or `asc`.","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"example":"desc","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"simpleLists":{"value":{"data":[{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Detection Exception List","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}],"page":1,"per_page":20,"total":1}}},"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists/_find?namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get exception lists","tags":["Security Exceptions API"]}},"/api/exception_lists/_import":{"post":{"description":"Import an exception list and its associated items from an NDJSON file.","operationId":"ImportExceptionList","parameters":[{"description":"Determines whether existing exception lists with the same `list_id` are overwritten.\nIf any exception items have the same `item_id`, those are also overwritten.\n","in":"query","name":"overwrite","required":false,"schema":{"default":false,"example":false,"type":"boolean"}},{"description":"Determines whether the list being imported will have a new `list_id` generated.\nAdditional `item_id`'s are generated for each exception item. Both the exception\nlist and its items are overwritten.\n","in":"query","name":"as_new_list","required":false,"schema":{"default":false,"example":false,"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"A `.ndjson` file containing the exception list","example":"{\"_version\":\"WzExNDU5LDFd\",\"created_at\":\"2025-01-09T16:18:17.757Z\",\"created_by\":\"elastic\",\"description\":\"This is a sample detection type exception\",\"id\":\"c86c2da0-2ab6-4343-b81c-216ef27e8d75\",\"immutable\":false,\"list_id\":\"simple_list\",\"name\":\"Sample Detection Exception List\",\"namespace_type\":\"single\",\"os_types\":[],\"tags\":[\"user added string for a tag\",\"malware\"],\"tie_breaker_id\":\"cf4a7b92-732d-47f0-a0d5-49a35a1736bf\",\"type\":\"detection\",\"updated_at\":\"2025-01-09T16:18:17.757Z\",\"updated_by\":\"elastic\",\"version\":1}\n{\"_version\":\"WzExNDYxLDFd\",\"comments\":[],\"created_at\":\"2025-01-09T16:18:42.308Z\",\"created_by\":\"elastic\",\"description\":\"This is a sample endpoint type exception\",\"entries\":[{\"type\":\"exists\",\"field\":\"actingProcess.file.signer\",\"operator\":\"excluded\"},{\"type\":\"match_any\",\"field\":\"host.name\",\"value\":[\"some host\",\"another host\"],\"operator\":\"included\"}],\"id\":\"f37597ce-eaa7-4b64-9100-4301118f6806\",\"item_id\":\"simple_list_item\",\"list_id\":\"simple_list\",\"name\":\"Sample Endpoint Exception List\",\"namespace_type\":\"single\",\"os_types\":[\"linux\"],\"tags\":[\"user added string for a tag\",\"malware\"],\"tie_breaker_id\":\"4ca3ef3e-9721-42c0-8107-cf47e094d40f\",\"type\":\"simple\",\"updated_at\":\"2025-01-09T16:18:42.308Z\",\"updated_by\":\"elastic\"}\n","format":"binary","type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"withErrors":{"value":{"errors":[{"error":{"message":"Error found importing exception list: Invalid value \\\"4\\\" supplied to \\\"list_id\\\"","status_code":400},"list_id":"(unknown list_id)"},{"error":{"message":"Found that item_id: \\\"f7fd00bb-dba8-4c93-9d59-6cbd427b6330\\\" already exists. Import of item_id: \\\"f7fd00bb-dba8-4c93-9d59-6cbd427b6330\\\" skipped.","status_code":409},"item_id":"f7fd00bb-dba8-4c93-9d59-6cbd427b6330","list_id":"7d7cccb8-db72-4667-b1f3-648efad7c1ee"}],"success":"false,","success_count":"0,","success_count_exception_list_items":0,"success_count_exception_lists":"0,","success_exception_list_items":"false,","success_exception_lists":"false,"}},"withoutErrors":{"value":{"errors":[],"success":true,"success_count":2,"success_count_exception_list_items":1,"success_count_exception_lists":1,"success_exception_list_items":true,"success_exception_lists":"true,"}}},"schema":{"type":"object","properties":{"errors":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListsImportBulkErrorArray"},"success":{"type":"boolean"},"success_count":{"minimum":0,"type":"integer"},"success_count_exception_list_items":{"minimum":0,"type":"integer"},"success_count_exception_lists":{"minimum":0,"type":"integer"},"success_exception_list_items":{"type":"boolean"},"success_exception_lists":{"type":"boolean"}},"required":["errors","success","success_count","success_exception_lists","success_count_exception_lists","success_exception_list_items","success_count_exception_list_items"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists/_import] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Import an exception list","tags":["Security Exceptions API"]}},"/api/exception_lists/items":{"delete":{"description":"Delete an exception list item using the `id` or `item_id` field.","operationId":"DeleteExceptionListItem","parameters":[{"description":"Exception item's identifier. Either `id` or `item_id` must be specified","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemId"}},{"description":"Human readable exception item string identifier, e.g. `trusted-linux-processes`. Either `id` or `item_id` must be specified","in":"query","name":"item_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}}],"responses":{"200":{"content":{"application/json":{"examples":{"simpleExceptionItem":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"example":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400},"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [DELETE /api/exception_lists/items?item_id=simple_list\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list item item_id: \\\"foo\\\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete an exception list item","tags":["Security Exceptions API"]},"get":{"description":"Get the details of an exception list item using the `id` or `item_id` field.","operationId":"ReadExceptionListItem","parameters":[{"description":"Exception list item's identifier. Either `id` or `item_id` must be specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemId"}},{"description":"Human readable exception item string identifier, e.g. `trusted-linux-processes`. Either `id` or `item_id` must be specified.","in":"query","name":"item_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}}],"responses":{"200":{"content":{"application/json":{"examples":{"simpleListItem":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists/items?item_id=\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list item item_id: \\\"foo\\\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get an exception list item","tags":["Security Exceptions API"]},"post":{"description":"Create an exception item and associate it with the specified exception list.\n\u003e info\n\u003e Before creating exception items, you must create an exception list.\n","operationId":"CreateExceptionListItem","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"type":"simple"},"type":"object","properties":{"comments":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemExpireTime"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemTags","default":[]},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemType"}},"required":["list_id","type","name","description","entries"]}}},"description":"Exception list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"autogeneratedItemId":{"value":{"_version":"WzYsMV0=","comments":[],"created_at":"2025-01-09T01:16:23.322Z","created_by":"elastic","description":"This is a sample exception that has no item_id so it is autogenerated.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"}],"id":"323faa75-c657-4fa0-9084-8827612c207b","item_id":"80e6edf7-4b13-4414-858f-2fa74aa52b37","list_id":"8c1aae4c-1ef5-4bce-a2e3-16584b501783","name":"Sample Autogenerated Exception List Item ID","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"d6799986-3a23-4213-bc6d-ed9463a32f23","type":"simple","updated_at":"2025-01-09T01:16:23.322Z","updated_by":"elastic"}},"detectionExceptionListItem":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withExistEntry":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withMatchAnyEntry":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"host.name","operator":"included","type":"match_any","value":["saturn","jupiter"]}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withMatchEntry":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"field":"actingProcess.file.signer","operator":"included","type":"match","value":"Elastic N.V."}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withNestedEntry":{"value":{"_version":"WzQsMV0=","comments":[],"created_at":"2025-01-07T20:07:33.119Z","created_by":"elastic","description":"This is a sample detection type exception item.","entries":[{"entries":[{"field":"signer","operator":"included","type":"match","value":"Evil"},{"field":"trusted","operator":"included","type":"match","value":true}],"field":"file.signature","type":"nested"}],"id":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"09434836-9db9-4942-a234-5a9268e0b34c","type":"simple","updated_at":"2025-01-07T20:07:33.119Z","updated_by":"elastic"}},"withValueListEntry":{"value":{"_version":"WzcsMV0=","comments":[],"created_at":"2025-01-09T01:31:12.614Z","created_by":"elastic","description":"Don't signal when agent.name is rock01 and source.ip is in the goodguys.txt list","entries":[{"field":"source.ip","list":{"id":"goodguys.txt","type":"ip"},"operator":"excluded","type":"list"}],"id":"deb26876-297d-4677-8a1f-35467d2f1c4f","item_id":"686b129e-9b8d-4c59-8d8d-c93a9ea82c71","list_id":"8c1aae4c-1ef5-4bce-a2e3-16584b501783","name":"Filter out good guys ip and agent.name rock01","namespace_type":"single","os_types":[],"tags":["malware"],"tie_breaker_id":"5e0288ce-6657-4c18-9dcc-00ec9e8cc6c8","type":"simple","updated_at":"2025-01-09T01:31:12.614Z","updated_by":"elastic"}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request,","message":"[request body]: list_id: Expected string, received number","statusCode":"400,"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/exception_lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"exception list item id: \\\"simple_list_item\\\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create an exception list item","tags":["Security Exceptions API"]},"put":{"description":"Update an exception list item using the `id` or `item_id` field.","operationId":"UpdateExceptionListItem","requestBody":{"content":{"application/json":{"example":{"comments":[],"description":"Updated description","entries":[{"field":"host.name","operator":"included","type":"match","value":"rock01"}],"item_id":"simple_list_item","name":"Updated name","namespace_type":"single","tags":[],"type":"simple"},"schema":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"comments":{"$ref":"#/components/schemas/Security_Exceptions_API_UpdateExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemExpireTime"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemId","description":"Either `id` or `item_id` must be specified"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId","description":"Either `id` or `item_id` must be specified"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemTags"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemType"}},"required":["type","name","description","entries"]}}},"description":"Exception list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"simpleListItem":{"value":{"_version":"WzEyLDFd","comments":[],"created_at":"2025-01-07T21:12:25.512Z","created_by":"elastic","description":"Updated description","entries":[{"field":"host.name","operator":"included","type":"match","value":"rock01"}],"id":"459c5e7e-f8b2-4f0b-b136-c1fc702f72da","item_id":"simple_list_item","list_id":"simple_list","name":"Updated name","namespace_type":"single","os_types":[],"tags":[],"tie_breaker_id":"ad0754ff-7b19-49ca-b73e-e6aff6bfa2d0","type":"simple","updated_at":"2025-01-07T21:34:50.233Z","updated_by":"elastic"}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: item_id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PUT /api/exception_lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list item item_id: \\\"foo\\\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Update an exception list item","tags":["Security Exceptions API"]}},"/api/exception_lists/items/_find":{"get":{"description":"Get a list of all exception list items in the specified list.","operationId":"FindExceptionListItems","parameters":[{"description":"The `list_id`s of the items to fetch.","in":"query","name":"list_id","required":true,"schema":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"type":"array"}},{"description":"Filters the returned results according to the value of the specified field,\nusing the `\u003cfield name\u003e:\u003cfield value\u003e` syntax.\n","examples":{"singleFilter":{"value":["exception-list.attributes.name:%My%20item"]}},"in":"query","name":"filter","required":false,"schema":{"default":[],"items":{"$ref":"#/components/schemas/Security_Exceptions_API_FindExceptionListItemsFilter"},"type":"array"}},{"description":"Determines whether the returned containers are Kibana associated with a Kibana space\nor available in all spaces (`agnostic` or `single`)\n","examples":{"single":{"value":["single"]}},"in":"query","name":"namespace_type","required":false,"schema":{"default":["single"],"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"},"type":"array"}},{"in":"query","name":"search","required":false,"schema":{"example":"host.name","type":"string"}},{"description":"The page number to return","in":"query","name":"page","required":false,"schema":{"example":1,"minimum":0,"type":"integer"}},{"description":"The number of exception list items to return per page","in":"query","name":"per_page","required":false,"schema":{"example":20,"minimum":0,"type":"integer"}},{"description":"Determines which field is used to sort the results.","example":"name","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},{"description":"Determines the sort order, which can be `desc` or `asc`.","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"example":"desc","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"simpleListItems":{"value":{"data":[{"_version":"WzgsMV0=","comments":[],"created_at":"2025-01-07T21:12:25.512Z","created_by":"elastic","description":"This is a sample exception item.","entries":[{"field":"actingProcess.file.signer","operator":"excluded","type":"exists"},{"field":"host.name","operator":"included","type":"match_any","value":["jupiter","saturn"]}],"id":"459c5e7e-f8b2-4f0b-b136-c1fc702f72da","item_id":"simple_list_item","list_id":"simple_list","name":"Sample Exception List Item","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"ad0754ff-7b19-49ca-b73e-e6aff6bfa2d0","type":"simple","updated_at":"2025-01-07T21:12:25.512Z","updated_by":"elastic"}],"page":1,"per_page":20,"total":1}}},"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItem"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"minimum":1,"type":"integer"},"pit":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists/items/_find?list_id=simple_list\u0026namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"exception list list_id: \"foo\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get exception list items","tags":["Security Exceptions API"]}},"/api/exception_lists/summary":{"get":{"description":"Get a summary of the specified exception list.","operationId":"ReadExceptionListSummary","parameters":[{"description":"Exception list's identifier generated upon creation.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"}},{"description":"Exception list's human readable identifier.","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},{"examples":{"agnostic":{"value":"agnostic"},"single":{"value":"single"}},"in":"query","name":"namespace_type","required":false,"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"}},{"description":"Search filter clause","in":"query","name":"filter","required":false,"schema":{"example":"exception-list-agnostic.attributes.tags:\"policy:policy-1\" OR exception-list-agnostic.attributes.tags:\"policy:all\"","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"summary":{"value":{"linux":0,"macos":0,"total":0,"windows":0}}},"schema":{"type":"object","properties":{"linux":{"minimum":0,"type":"integer"},"macos":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"},"windows":{"minimum":0,"type":"integer"}}}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/exception_lists/summary?list_id=simple_list\u0026namespace_type=agnostic] is unauthorized for user, this action is granted by the Kibana privileges [lists-summary]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message\"":"exception list id: \"foo\" does not exist","status_code\"":404}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get an exception list summary","tags":["Security Exceptions API"]}},"/api/exceptions/shared":{"post":{"description":"An exception list groups exception items and can be associated with detection rules. A shared exception list can apply to multiple detection rules.\n\u003e info\n\u003e All exception items added to the same list are evaluated using `OR` logic. That is, if any of the items in a list evaluate to `true`, the exception prevents the rule from generating an alert. Likewise, `OR` logic is used for evaluating exceptions when more than one exception list is assigned to a rule. To use the `AND` operator, you can define multiple clauses (`entries`) in a single exception item.\n","operationId":"CreateSharedExceptionList","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"This is a sample detection type exception list.","list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"]},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListDescription"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListName"}},"required":["name","description"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"sharedList":{"value":{"_version":"WzIsMV0=","created_at":"2025-01-07T19:34:27.942Z","created_by":"elastic","description":"This is a sample detection type exception list.","id":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","immutable":false,"list_id":"simple_list","name":"Sample Detection Exception List","namespace_type":"single","os_types":["linux"],"tags":["malware"],"tie_breaker_id":"78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3","type":"detection","updated_at":"2025-01-07T19:34:27.942Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionList"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: list_id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"message":"Unable to create exception-list","status_code":403}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"exception list id: \"simple_list\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Exception list already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Exceptions_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create a shared exception list","tags":["Security Exceptions API"]}},"/api/features":{"get":{"description":"Get information about all Kibana features. Features are used by spaces and security to refine and secure access to Kibana.\n","operationId":"get-features","responses":{"200":{"content":{"application/json":{"examples":{"getFeaturesExample":{"value":"{\n \"features\": [\n {\n \"name\": \"tasks\",\n \"description\": \"Manages task results\"\n },\n {\n \"name\": \"security\",\n \"description\": \"Manages configuration for Security features, such as users and roles\"\n },\n {\n \"name\": \"searchable_snapshots\",\n \"description\": \"Manages caches and configuration for searchable snapshots\"\n },\n {\n \"name\": \"logstash_management\",\n \"description\": \"Enables Logstash Central Management pipeline storage\"\n },\n {\n \"name\": \"transform\",\n \"description\": \"Manages configuration and state for transforms\"\n },\n {\n \"name\": \"kibana\",\n \"description\": \"Manages Kibana configuration and reports\"\n },\n {\n \"name\": \"synonyms\",\n \"description\": \"Manages synonyms\"\n },\n {\n \"name\": \"async_search\",\n \"description\": \"Manages results of async searches\"\n },\n {\n \"name\": \"ent_search\",\n \"description\": \"Manages configuration for Enterprise Search features\"\n },\n {\n \"name\": \"machine_learning\",\n \"description\": \"Provides anomaly detection and forecasting functionality\"\n },\n {\n \"name\": \"geoip\",\n \"description\": \"Manages data related to GeoIP database downloader\"\n },\n {\n \"name\": \"watcher\",\n \"description\": \"Manages Watch definitions and state\"\n },\n {\n \"name\": \"fleet\",\n \"description\": \"Manages configuration for Fleet\"\n },\n {\n \"name\": \"enrich\",\n \"description\": \"Manages data related to Enrich policies\"\n },\n {\n \"name\": \"inference_plugin\",\n \"description\": \"Inference plugin for managing inference services and inference\"\n }\n ]\n}\n"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Get features","tags":["system"],"x-state":"Technical Preview"}},"/api/fleet/agent_download_sources":{"get":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-settings-read.","operationId":"get-fleet-agent-download-sources","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["id","name","host"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent binary download sources","tags":["Elastic Agent binary download sources"]},"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-agent-download-sources","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["name","host"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["id","name","host"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create an agent binary download source","tags":["Elastic Agent binary download sources"]}},"/api/fleet/agent_download_sources/{sourceId}":{"delete":{"description":"Delete an agent binary download source by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"delete-fleet-agent-download-sources-sourceid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete an agent binary download source","tags":["Elastic Agent binary download sources"]},"get":{"description":"Get an agent binary download source by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-settings-read.","operationId":"get-fleet-agent-download-sources-sourceid","parameters":[{"in":"path","name":"sourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["id","name","host"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent binary download source","tags":["Elastic Agent binary download sources"]},"put":{"description":"Update an agent binary download source by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"put-fleet-agent-download-sources-sourceid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["name","host"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host":{"format":"uri","type":"string"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"description":"The ID of the proxy to use for this download source. See the proxies API for more information.","nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}}}},"required":["id","name","host"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update an agent binary download source","tags":["Elastic Agent binary download sources"]}},"/api/fleet/agent_policies":{"get":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup.","operationId":"get-fleet-agent-policies","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"type":"number"}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortOrder","required":false,"schema":{"enum":["desc","asc"],"type":"string"}},{"in":"query","name":"showUpgradeable","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}},{"description":"use withAgentCount instead","in":"query","name":"noAgentCount","required":false,"schema":{"deprecated":true,"type":"boolean"}},{"description":"get policies with agent count","in":"query","name":"withAgentCount","required":false,"schema":{"type":"boolean"}},{"description":"get full policies with package policies populated","in":"query","name":"full","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent policies","tags":["Elastic Agent policies"]},"post":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-all.","operationId":"post-fleet-agent-policies","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"sys_monitoring","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"force":{"type":"boolean"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_protected":{"type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"space_ids":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"}},"required":["name","namespace"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/_bulk_get":{"post":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup.","operationId":"post-fleet-agent-policies-bulk-get","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"full":{"description":"get full policies with package policies populated","type":"boolean"},"ids":{"description":"list of package policy ids","items":{"type":"string"},"type":"array"},"ignoreMissing":{"type":"boolean"}},"required":["ids"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk get agent policies","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}":{"get":{"description":"Get an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup.","operationId":"get-fleet-agent-policies-agentpolicyid","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent policy","tags":["Elastic Agent policies"]},"put":{"description":"Update an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all.","operationId":"put-fleet-agent-policies-agentpolicyid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"bumpRevision":{"type":"boolean"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"force":{"type":"boolean"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_protected":{"type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"space_ids":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"}},"required":["name","namespace"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status":{"get":{"description":"Get auto upgrade agent status\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agent-policies-agentpolicyid-auto-upgrade-agents-status","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"currentVersions":{"items":{"additionalProperties":false,"type":"object","properties":{"agents":{"type":"number"},"failedUpgradeAgents":{"type":"number"},"version":{"type":"string"}},"required":["version","agents","failedUpgradeAgents"]},"type":"array"},"totalAgents":{"type":"number"}},"required":["currentVersions","totalAgents"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get auto upgrade agent status","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/copy":{"post":{"description":"Copy an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all.","operationId":"post-fleet-agent-policies-agentpolicyid-copy","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["name"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"advanced_settings":{"additionalProperties":false,"type":"object","properties":{"agent_download_target_directory":{"nullable":true},"agent_download_timeout":{"nullable":true},"agent_limits_go_max_procs":{"nullable":true},"agent_logging_files_interval":{"nullable":true},"agent_logging_files_keepfiles":{"nullable":true},"agent_logging_files_rotateeverybytes":{"nullable":true},"agent_logging_level":{"nullable":true},"agent_logging_metrics_period":{"nullable":true},"agent_logging_to_files":{"nullable":true}}},"agent_features":{"items":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"}},"required":["name","enabled"]},"type":"array"},"agentless":{"additionalProperties":false,"type":"object","properties":{"cloud_connectors":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"target_csp":{"type":"string"}},"required":["enabled"]},"resources":{"additionalProperties":false,"type":"object","properties":{"requests":{"additionalProperties":false,"type":"object","properties":{"cpu":{"type":"string"},"memory":{"type":"string"}}}}}}},"agents":{"type":"number"},"data_output_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"download_source_id":{"nullable":true,"type":"string"},"fleet_server_host_id":{"nullable":true,"type":"string"},"global_data_tags":{"description":"User defined data tags that are added to all of the inputs. The values can be strings or numbers.","items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["name","value"]},"type":"array"},"has_fleet_server":{"type":"boolean"},"id":{"type":"string"},"inactivity_timeout":{"default":1209600,"minimum":0,"type":"number"},"is_default":{"type":"boolean"},"is_default_fleet_server":{"type":"boolean"},"is_managed":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"is_protected":{"description":"Indicates whether the agent policy has tamper protection enabled. Default false.","type":"boolean"},"keep_monitoring_alive":{"default":false,"description":"When set to true, monitoring will be enabled but logs/metrics collection will be disabled","nullable":true,"type":"boolean"},"monitoring_diagnostics":{"additionalProperties":false,"type":"object","properties":{"limit":{"additionalProperties":false,"type":"object","properties":{"burst":{"type":"number"},"interval":{"type":"string"}}},"uploader":{"additionalProperties":false,"type":"object","properties":{"init_dur":{"type":"string"},"max_dur":{"type":"string"},"max_retries":{"type":"number"}}}}},"monitoring_enabled":{"items":{"enum":["logs","metrics","traces"],"type":"string"},"type":"array"},"monitoring_http":{"additionalProperties":false,"type":"object","properties":{"buffer":{"additionalProperties":false,"type":"object","properties":{"enabled":{"default":false,"type":"boolean"}}},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"maximum":65353,"minimum":0,"type":"number"}}},"monitoring_output_id":{"nullable":true,"type":"string"},"monitoring_pprof_enabled":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"namespace":{"minLength":1,"type":"string"},"overrides":{"additionalProperties":{},"description":"Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object"},"package_policies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"description":"This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter","items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}]},"required_versions":{"items":{"additionalProperties":false,"type":"object","properties":{"percentage":{"description":"Target percentage of agents to auto upgrade","maximum":100,"minimum":0,"type":"number"},"version":{"description":"Target version for automatic agent upgrade","type":"string"}},"required":["version","percentage"]},"nullable":true,"type":"array"},"revision":{"type":"number"},"schema_version":{"type":"string"},"space_ids":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"supports_agentless":{"default":false,"description":"Indicates whether the agent policy supports agentless integrations.","nullable":true,"type":"boolean"},"unenroll_timeout":{"minimum":0,"type":"number"},"unprivileged_agents":{"type":"number"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"version":{"type":"string"}},"required":["id","name","namespace","is_managed","is_protected","status","updated_at","updated_by","revision"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Copy an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/download":{"get":{"description":"Download an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-setup.","operationId":"get-fleet-agent-policies-agentpolicyid-download","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"download","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"standalone","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"kubernetes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Download an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/full":{"get":{"description":"Get a full agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read.","operationId":"get-fleet-agent-policies-agentpolicyid-full","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"download","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"standalone","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"kubernetes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"anyOf":[{"type":"string"},{"additionalProperties":false,"type":"object","properties":{"agent":{"additionalProperties":false,"type":"object","properties":{"download":{"additionalProperties":false,"type":"object","properties":{"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}}}},"required":["key"]}}},"sourceURI":{"type":"string"},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"renegotiation":{"type":"string"},"verification_mode":{"type":"string"}}}},"required":["sourceURI"]},"features":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"type":"object"},"limits":{"additionalProperties":false,"type":"object","properties":{"go_max_procs":{"type":"number"}}},"logging":{"additionalProperties":false,"type":"object","properties":{"files":{"additionalProperties":false,"type":"object","properties":{"interval":{"type":"string"},"keepfiles":{"type":"number"},"rotateeverybytes":{"type":"number"}}},"level":{"type":"string"},"to_files":{"type":"boolean"}}},"monitoring":{"additionalProperties":false,"type":"object","properties":{"apm":{},"enabled":{"type":"boolean"},"logs":{"type":"boolean"},"metrics":{"type":"boolean"},"namespace":{"type":"string"},"traces":{"type":"boolean"},"use_output":{"type":"string"}},"required":["enabled","metrics","logs","traces","apm"]},"protection":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"signing_key":{"type":"string"},"uninstall_token_hash":{"type":"string"}},"required":["enabled","uninstall_token_hash","signing_key"]}},"required":["monitoring","download","features"]},"fleet":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"hosts":{"items":{"type":"string"},"type":"array"},"proxy_headers":{},"proxy_url":{"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}}}},"required":["key"]}}},"ssl":{"additionalProperties":false,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"renegotiation":{"type":"string"},"verification_mode":{"type":"string"}}}},"required":["hosts","proxy_headers"]},{"additionalProperties":false,"type":"object","properties":{"kibana":{"additionalProperties":false,"type":"object","properties":{"hosts":{"items":{"type":"string"},"type":"array"},"path":{"type":"string"},"protocol":{"type":"string"}},"required":["hosts","protocol"]}},"required":["kibana"]}]},"id":{"type":"string"},"inputs":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"namespace":{"type":"string"}},"required":["namespace"]},"id":{"type":"string"},"meta":{"additionalProperties":true,"type":"object","properties":{"package":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]}}},"name":{"type":"string"},"package_policy_id":{"type":"string"},"processors":{"items":{"additionalProperties":true,"type":"object","properties":{"add_fields":{"additionalProperties":true,"type":"object","properties":{"fields":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]},"type":"object"},"target":{"type":"string"}},"required":["target","fields"]}},"required":["add_fields"]},"type":"array"},"revision":{"type":"number"},"streams":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"dataset":{"type":"string"},"type":{"type":"string"}},"required":["dataset"]},"id":{"type":"string"}},"required":["id","data_stream"]},"type":"array"},"type":{"type":"string"},"use_output":{"type":"string"}},"required":["id","name","revision","type","data_stream","use_output","package_policy_id"]},"type":"array"},"namespaces":{"items":{"type":"string"},"type":"array"},"output_permissions":{"additionalProperties":{"additionalProperties":{},"type":"object"},"type":"object"},"outputs":{"additionalProperties":{"additionalProperties":true,"type":"object","properties":{"ca_sha256":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"type":"array"},"proxy_headers":{},"proxy_url":{"type":"string"},"type":{"type":"string"}},"required":["type","proxy_headers"]},"type":"object"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"signed":{"additionalProperties":false,"type":"object","properties":{"data":{"type":"string"},"signature":{"type":"string"}},"required":["data","signature"]}},"required":["id","outputs","inputs"]}]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a full agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/{agentPolicyId}/outputs":{"get":{"description":"Get a list of outputs associated with agent policy by policy id.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read.","operationId":"get-fleet-agent-policies-agentpolicyid-outputs","parameters":[{"in":"path","name":"agentPolicyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"agentPolicyId":{"type":"string"},"data":{"additionalProperties":false,"type":"object","properties":{"integrations":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"integrationPolicyName":{"type":"string"},"name":{"type":"string"},"pkgName":{"type":"string"}}},"type":"array"},"output":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["output"]},"monitoring":{"additionalProperties":false,"type":"object","properties":{"output":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["output"]}},"required":["monitoring","data"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get outputs for an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/delete":{"post":{"description":"Delete an agent policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all.","operationId":"post-fleet-agent-policies-delete","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agentPolicyId":{"type":"string"},"force":{"description":"bypass validation checks that can prevent agent policy deletion","type":"boolean"}},"required":["agentPolicyId"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete an agent policy","tags":["Elastic Agent policies"]}},"/api/fleet/agent_policies/outputs":{"post":{"description":"Get a list of outputs associated with agent policies.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read.","operationId":"post-fleet-agent-policies-outputs","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"ids":{"description":"list of package policy ids","items":{"type":"string"},"type":"array"}},"required":["ids"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"agentPolicyId":{"type":"string"},"data":{"additionalProperties":false,"type":"object","properties":{"integrations":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"integrationPolicyName":{"type":"string"},"name":{"type":"string"},"pkgName":{"type":"string"}}},"type":"array"},"output":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["output"]},"monitoring":{"additionalProperties":false,"type":"object","properties":{"output":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["output"]}},"required":["monitoring","data"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get outputs for agent policies","tags":["Elastic Agent policies"]}},"/api/fleet/agent_status":{"get":{"operationId":"get-fleet-agent-status","parameters":[{"in":"query","name":"policyId","required":false,"schema":{"type":"string"}},{"in":"query","name":"policyIds","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"results":{"additionalProperties":false,"type":"object","properties":{"active":{"type":"number"},"all":{"type":"number"},"error":{"type":"number"},"events":{"type":"number"},"inactive":{"type":"number"},"offline":{"type":"number"},"online":{"type":"number"},"orphaned":{"type":"number"},"other":{"type":"number"},"unenrolled":{"type":"number"},"uninstalled":{"type":"number"},"updating":{"type":"number"}},"required":["events","online","error","offline","other","updating","inactive","unenrolled","all","active"]}},"required":["results"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent status summary","tags":["Elastic Agent status"]}},"/api/fleet/agent_status/data":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agent-status-data","parameters":[{"in":"query","name":"agentsIds","required":true,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]}},{"in":"query","name":"pkgName","required":false,"schema":{"type":"string"}},{"in":"query","name":"pkgVersion","required":false,"schema":{"type":"string"}},{"in":"query","name":"previewData","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"dataPreview":{"items":{},"type":"array"},"items":{"items":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"data":{"type":"boolean"}},"required":["data"]},"type":"object"},"type":"array"}},"required":["items","dataPreview"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get incoming agent data","tags":["Elastic Agents"]}},"/api/fleet/agents":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"default":20,"type":"number"}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"showAgentless","required":false,"schema":{"default":true,"type":"boolean"}},{"in":"query","name":"showInactive","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"withMetrics","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"showUpgradeable","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"getStatusSummary","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortOrder","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"in":"query","name":"searchAfter","required":false,"schema":{"type":"string"}},{"in":"query","name":"openPit","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"pitId","required":false,"schema":{"type":"string"}},{"in":"query","name":"pitKeepAlive","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"access_api_key":{"type":"string"},"access_api_key_id":{"type":"string"},"active":{"type":"boolean"},"agent":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"}},"required":["id","version"]},"audit_unenrolled_reason":{"type":"string"},"components":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"type":"string"},"units":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"payload":{"additionalProperties":{},"type":"object"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"enum":["input","output"],"type":"string"}},"required":["id","type","status","message"]},"type":"array"}},"required":["id","type","status","message"]},"type":"array"},"default_api_key":{"type":"string"},"default_api_key_history":{"items":{"additionalProperties":false,"deprecated":true,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"default_api_key_id":{"type":"string"},"enrolled_at":{"type":"string"},"id":{"type":"string"},"last_checkin":{"type":"string"},"last_checkin_message":{"type":"string"},"last_checkin_status":{"enum":["error","online","degraded","updating","starting"],"type":"string"},"local_metadata":{"additionalProperties":{},"type":"object"},"metrics":{"additionalProperties":false,"type":"object","properties":{"cpu_avg":{"type":"number"},"memory_size_byte_avg":{"type":"number"}}},"namespaces":{"items":{"type":"string"},"type":"array"},"outputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"api_key_id":{"type":"string"},"to_retire_api_key_ids":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"type":{"type":"string"}}},"type":"object"},"packages":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_revision":{"nullable":true,"type":"number"},"sort":{"items":{},"type":"array"},"status":{"enum":["offline","error","online","inactive","enrolling","unenrolling","unenrolled","updating","degraded","uninstalled","orphaned"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"type":{"enum":["PERMANENT","EPHEMERAL","TEMPORARY"],"type":"string"},"unenrolled_at":{"type":"string"},"unenrollment_started_at":{"type":"string"},"unhealthy_reason":{"items":{"enum":["input","output","other"],"type":"string"},"nullable":true,"type":"array"},"upgrade_attempts":{"items":{"type":"string"},"nullable":true,"type":"array"},"upgrade_details":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"action_id":{"type":"string"},"metadata":{"additionalProperties":false,"type":"object","properties":{"download_percent":{"type":"number"},"download_rate":{"type":"number"},"error_msg":{"type":"string"},"failed_state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"retry_error_msg":{"type":"string"},"retry_until":{"type":"string"},"scheduled_at":{"type":"string"}}},"state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"target_version":{"type":"string"}},"required":["target_version","action_id","state"]},"upgrade_started_at":{"nullable":true,"type":"string"},"upgraded_at":{"nullable":true,"type":"string"},"user_provided_metadata":{"additionalProperties":{},"type":"object"}},"required":["id","packages","type","active","enrolled_at","local_metadata"]},"type":"array"},"nextSearchAfter":{"type":"string"},"page":{"type":"number"},"perPage":{"type":"number"},"pit":{"type":"string"},"statusSummary":{"additionalProperties":{"type":"number"},"type":"object"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agents","tags":["Elastic Agents"]},"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"post-fleet-agents","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionIds":{"items":{"type":"string"},"type":"array"}},"required":["actionIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"type":"string"},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agents by action ids","tags":["Elastic Agents"]}},"/api/fleet/agents/{agentId}":{"delete":{"description":"Delete an agent by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"delete-fleet-agents-agentid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"action":{"enum":["deleted"],"type":"string"}},"required":["action"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete an agent","tags":["Elastic Agents"]},"get":{"description":"Get an agent by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-agentid","parameters":[{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}},{"in":"query","name":"withMetrics","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"access_api_key":{"type":"string"},"access_api_key_id":{"type":"string"},"active":{"type":"boolean"},"agent":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"}},"required":["id","version"]},"audit_unenrolled_reason":{"type":"string"},"components":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"type":"string"},"units":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"payload":{"additionalProperties":{},"type":"object"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"enum":["input","output"],"type":"string"}},"required":["id","type","status","message"]},"type":"array"}},"required":["id","type","status","message"]},"type":"array"},"default_api_key":{"type":"string"},"default_api_key_history":{"items":{"additionalProperties":false,"deprecated":true,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"default_api_key_id":{"type":"string"},"enrolled_at":{"type":"string"},"id":{"type":"string"},"last_checkin":{"type":"string"},"last_checkin_message":{"type":"string"},"last_checkin_status":{"enum":["error","online","degraded","updating","starting"],"type":"string"},"local_metadata":{"additionalProperties":{},"type":"object"},"metrics":{"additionalProperties":false,"type":"object","properties":{"cpu_avg":{"type":"number"},"memory_size_byte_avg":{"type":"number"}}},"namespaces":{"items":{"type":"string"},"type":"array"},"outputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"api_key_id":{"type":"string"},"to_retire_api_key_ids":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"type":{"type":"string"}}},"type":"object"},"packages":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_revision":{"nullable":true,"type":"number"},"sort":{"items":{},"type":"array"},"status":{"enum":["offline","error","online","inactive","enrolling","unenrolling","unenrolled","updating","degraded","uninstalled","orphaned"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"type":{"enum":["PERMANENT","EPHEMERAL","TEMPORARY"],"type":"string"},"unenrolled_at":{"type":"string"},"unenrollment_started_at":{"type":"string"},"unhealthy_reason":{"items":{"enum":["input","output","other"],"type":"string"},"nullable":true,"type":"array"},"upgrade_attempts":{"items":{"type":"string"},"nullable":true,"type":"array"},"upgrade_details":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"action_id":{"type":"string"},"metadata":{"additionalProperties":false,"type":"object","properties":{"download_percent":{"type":"number"},"download_rate":{"type":"number"},"error_msg":{"type":"string"},"failed_state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"retry_error_msg":{"type":"string"},"retry_until":{"type":"string"},"scheduled_at":{"type":"string"}}},"state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"target_version":{"type":"string"}},"required":["target_version","action_id","state"]},"upgrade_started_at":{"nullable":true,"type":"string"},"upgraded_at":{"nullable":true,"type":"string"},"user_provided_metadata":{"additionalProperties":{},"type":"object"}},"required":["id","packages","type","active","enrolled_at","local_metadata"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent","tags":["Elastic Agents"]},"put":{"description":"Update an agent by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"put-fleet-agents-agentid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"tags":{"items":{"type":"string"},"type":"array"},"user_provided_metadata":{"additionalProperties":{},"type":"object"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"access_api_key":{"type":"string"},"access_api_key_id":{"type":"string"},"active":{"type":"boolean"},"agent":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"}},"required":["id","version"]},"audit_unenrolled_reason":{"type":"string"},"components":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"type":"string"},"units":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"payload":{"additionalProperties":{},"type":"object"},"status":{"enum":["STARTING","CONFIGURING","HEALTHY","DEGRADED","FAILED","STOPPING","STOPPED"],"type":"string"},"type":{"enum":["input","output"],"type":"string"}},"required":["id","type","status","message"]},"type":"array"}},"required":["id","type","status","message"]},"type":"array"},"default_api_key":{"type":"string"},"default_api_key_history":{"items":{"additionalProperties":false,"deprecated":true,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"default_api_key_id":{"type":"string"},"enrolled_at":{"type":"string"},"id":{"type":"string"},"last_checkin":{"type":"string"},"last_checkin_message":{"type":"string"},"last_checkin_status":{"enum":["error","online","degraded","updating","starting"],"type":"string"},"local_metadata":{"additionalProperties":{},"type":"object"},"metrics":{"additionalProperties":false,"type":"object","properties":{"cpu_avg":{"type":"number"},"memory_size_byte_avg":{"type":"number"}}},"namespaces":{"items":{"type":"string"},"type":"array"},"outputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"api_key_id":{"type":"string"},"to_retire_api_key_ids":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"retired_at":{"type":"string"}},"required":["id","retired_at"]},"type":"array"},"type":{"type":"string"}}},"type":"object"},"packages":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_revision":{"nullable":true,"type":"number"},"sort":{"items":{},"type":"array"},"status":{"enum":["offline","error","online","inactive","enrolling","unenrolling","unenrolled","updating","degraded","uninstalled","orphaned"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"type":{"enum":["PERMANENT","EPHEMERAL","TEMPORARY"],"type":"string"},"unenrolled_at":{"type":"string"},"unenrollment_started_at":{"type":"string"},"unhealthy_reason":{"items":{"enum":["input","output","other"],"type":"string"},"nullable":true,"type":"array"},"upgrade_attempts":{"items":{"type":"string"},"nullable":true,"type":"array"},"upgrade_details":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"action_id":{"type":"string"},"metadata":{"additionalProperties":false,"type":"object","properties":{"download_percent":{"type":"number"},"download_rate":{"type":"number"},"error_msg":{"type":"string"},"failed_state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"retry_error_msg":{"type":"string"},"retry_until":{"type":"string"},"scheduled_at":{"type":"string"}}},"state":{"enum":["UPG_REQUESTED","UPG_SCHEDULED","UPG_DOWNLOADING","UPG_EXTRACTING","UPG_REPLACING","UPG_RESTARTING","UPG_FAILED","UPG_WATCHING","UPG_ROLLBACK"],"type":"string"},"target_version":{"type":"string"}},"required":["target_version","action_id","state"]},"upgrade_started_at":{"nullable":true,"type":"string"},"upgraded_at":{"nullable":true,"type":"string"},"user_provided_metadata":{"additionalProperties":{},"type":"object"}},"required":["id","packages","type","active","enrolled_at","local_metadata"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update an agent","tags":["Elastic Agents"]}},"/api/fleet/agents/{agentId}/actions":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-actions","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"action":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"ack_data":{},"data":{},"type":{"enum":["UNENROLL","UPGRADE","POLICY_REASSIGN"],"type":"string"}},"required":["type","data","ack_data"]},{"additionalProperties":false,"type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"log_level":{"enum":["debug","info","warning","error"],"nullable":true,"type":"string"}},"required":["log_level"]},"type":{"enum":["SETTINGS"],"type":"string"}},"required":["type","data"]}]}},"required":["action"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"ack_data":{},"agents":{"items":{"type":"string"},"type":"array"},"created_at":{"type":"string"},"data":{},"expiration":{"type":"string"},"id":{"type":"string"},"minimum_execution_duration":{"type":"number"},"namespaces":{"items":{"type":"string"},"type":"array"},"rollout_duration_seconds":{"type":"number"},"sent_at":{"type":"string"},"source_uri":{"type":"string"},"start_time":{"type":"string"},"total":{"type":"number"},"type":{"type":"string"}},"required":["id","type","data","created_at","ack_data"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create an agent action","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/migrate":{"post":{"description":"Migrate a single agent to another cluster.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-migrate","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"enrollment_token":{"type":"string"},"settings":{"additionalProperties":false,"type":"object","properties":{"ca_sha256":{"type":"string"},"certificate_authorities":{"type":"string"},"elastic_agent_cert":{"type":"string"},"elastic_agent_cert_key":{"type":"string"},"elastic_agent_cert_key_passphrase":{"type":"string"},"headers":{"additionalProperties":{"type":"string"},"type":"object"},"insecure":{"type":"boolean"},"proxy_disabled":{"type":"boolean"},"proxy_headers":{"additionalProperties":{"type":"string"},"type":"object"},"proxy_url":{"type":"string"},"replace_token":{"type":"boolean"},"staging":{"type":"boolean"},"tags":{"items":{"type":"string"},"type":"array"}}},"uri":{"format":"uri","type":"string"}},"required":["uri","enrollment_token"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Migrate a single agent","tags":["Elastic Agents"]}},"/api/fleet/agents/{agentId}/reassign":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-reassign","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"policy_id":{"type":"string"}},"required":["policy_id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{}}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Reassign an agent","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/request_diagnostics":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"post-fleet-agents-agentid-request-diagnostics","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"additional_metrics":{"items":{"enum":["CPU"],"type":"string"},"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Request agent diagnostics","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/unenroll":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-unenroll","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"force":{"type":"boolean"},"revoke":{"type":"boolean"}}}}}},"responses":{},"summary":"Unenroll an agent","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/upgrade":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-agentid-upgrade","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"force":{"type":"boolean"},"skipRateLimitCheck":{"type":"boolean"},"source_uri":{"type":"string"},"version":{"type":"string"}},"required":["version"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{}}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Upgrade an agent","tags":["Elastic Agent actions"]}},"/api/fleet/agents/{agentId}/uploads":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-agentid-uploads","parameters":[{"in":"path","name":"agentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"},"createTime":{"type":"string"},"error":{"type":"string"},"filePath":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"enum":["READY","AWAITING_UPLOAD","DELETED","EXPIRED","IN_PROGRESS","FAILED"],"type":"string"}},"required":["id","name","filePath","createTime","status","actionId"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent uploads","tags":["Elastic Agents"]}},"/api/fleet/agents/action_status":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-action-status","parameters":[{"in":"query","name":"page","required":false,"schema":{"default":0,"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"default":20,"type":"number"}},{"in":"query","name":"date","required":false,"schema":{"type":"string"}},{"in":"query","name":"latest","required":false,"schema":{"type":"number"}},{"in":"query","name":"errorSize","required":false,"schema":{"default":5,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"},"cancellationTime":{"type":"string"},"completionTime":{"type":"string"},"creationTime":{"description":"creation time of action","type":"string"},"expiration":{"type":"string"},"hasRolloutPeriod":{"type":"boolean"},"is_automatic":{"type":"boolean"},"latestErrors":{"items":{"additionalProperties":false,"description":"latest errors that happened when the agents executed the action","type":"object","properties":{"agentId":{"type":"string"},"error":{"type":"string"},"hostname":{"type":"string"},"timestamp":{"type":"string"}},"required":["agentId","error","timestamp"]},"type":"array"},"nbAgentsAck":{"description":"number of agents that acknowledged the action","type":"number"},"nbAgentsActionCreated":{"description":"number of agents included in action from kibana","type":"number"},"nbAgentsActioned":{"description":"number of agents actioned","type":"number"},"nbAgentsFailed":{"description":"number of agents that failed to execute the action","type":"number"},"newPolicyId":{"description":"new policy id (POLICY_REASSIGN action)","type":"string"},"policyId":{"description":"policy id (POLICY_CHANGE action)","type":"string"},"revision":{"description":"new policy revision (POLICY_CHANGE action)","type":"number"},"startTime":{"description":"start time of action (scheduled actions)","type":"string"},"status":{"enum":["COMPLETE","EXPIRED","CANCELLED","FAILED","IN_PROGRESS","ROLLOUT_PASSED"],"type":"string"},"type":{"enum":["UPGRADE","UNENROLL","SETTINGS","POLICY_REASSIGN","CANCEL","FORCE_UNENROLL","REQUEST_DIAGNOSTICS","UPDATE_TAGS","POLICY_CHANGE","INPUT_ACTION","MIGRATE"],"type":"string"},"version":{"description":"agent version number (UPGRADE action)","type":"string"}},"required":["actionId","nbAgentsActionCreated","nbAgentsAck","nbAgentsFailed","type","nbAgentsActioned","status","creationTime"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an agent action status","tags":["Elastic Agent actions"]}},"/api/fleet/agents/actions/{actionId}/cancel":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-actions-actionid-cancel","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"actionId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"ack_data":{},"agents":{"items":{"type":"string"},"type":"array"},"created_at":{"type":"string"},"data":{},"expiration":{"type":"string"},"id":{"type":"string"},"minimum_execution_duration":{"type":"number"},"namespaces":{"items":{"type":"string"},"type":"array"},"rollout_duration_seconds":{"type":"number"},"sent_at":{"type":"string"},"source_uri":{"type":"string"},"start_time":{"type":"string"},"total":{"type":"number"},"type":{"type":"string"}},"required":["id","type","data","created_at","ack_data"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Cancel an agent action","tags":["Elastic Agent actions"]}},"/api/fleet/agents/available_versions":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-available-versions","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"type":"string"},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get available agent versions","tags":["Elastic Agents"]}},"/api/fleet/agents/bulk_reassign":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-bulk-reassign","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"batchSize":{"type":"number"},"includeInactive":{"default":false,"type":"boolean"},"policy_id":{"type":"string"}},"required":["policy_id","agents"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk reassign agents","tags":["Elastic Agent actions"]}},"/api/fleet/agents/bulk_request_diagnostics":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"post-fleet-agents-bulk-request-diagnostics","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"additional_metrics":{"items":{"enum":["CPU"],"type":"string"},"type":"array"},"agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"batchSize":{"type":"number"}},"required":["agents"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk request diagnostics from agents","tags":["Elastic Agent actions"]}},"/api/fleet/agents/bulk_unenroll":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-bulk-unenroll","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agents":{"anyOf":[{"items":{"description":"KQL query string, leave empty to action all agents","type":"string"},"type":"array"},{"description":"list of agent IDs","type":"string"}]},"batchSize":{"type":"number"},"force":{"description":"Unenrolls hosted agents too","type":"boolean"},"includeInactive":{"description":"When passing agents by KQL query, unenrolls inactive agents too","type":"boolean"},"revoke":{"description":"Revokes API keys of agents","type":"boolean"}},"required":["agents"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk unenroll agents","tags":["Elastic Agent actions"]}},"/api/fleet/agents/bulk_update_agent_tags":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-bulk-update-agent-tags","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"batchSize":{"type":"number"},"includeInactive":{"default":false,"type":"boolean"},"tagsToAdd":{"items":{"type":"string"},"type":"array"},"tagsToRemove":{"items":{"type":"string"},"type":"array"}},"required":["agents"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk update agent tags","tags":["Elastic Agent actions"]}},"/api/fleet/agents/bulk_upgrade":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-agents-bulk-upgrade","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"batchSize":{"type":"number"},"force":{"type":"boolean"},"includeInactive":{"default":false,"type":"boolean"},"rollout_duration_seconds":{"minimum":600,"type":"number"},"skipRateLimitCheck":{"type":"boolean"},"source_uri":{"type":"string"},"start_time":{"type":"string"},"version":{"type":"string"}},"required":["agents","version"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk upgrade agents","tags":["Elastic Agent actions"]}},"/api/fleet/agents/files/{fileId}":{"delete":{"description":"Delete a file uploaded by an agent.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"delete-fleet-agents-files-fileid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"fileId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"deleted":{"type":"boolean"},"id":{"type":"string"}},"required":["id","deleted"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete an uploaded file","tags":["Elastic Agents"]}},"/api/fleet/agents/files/{fileId}/{fileName}":{"get":{"description":"Get a file uploaded by an agent.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-files-fileid-filename","parameters":[{"in":"path","name":"fileId","required":true,"schema":{"type":"string"}},{"in":"path","name":"fileName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an uploaded file","tags":["Elastic Agents"]}},"/api/fleet/agents/setup":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup.","operationId":"get-fleet-agents-setup","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"A summary of the agent setup status. `isReady` indicates whether the setup is ready. If the setup is not ready, `missing_requirements` lists which requirements are missing.","type":"object","properties":{"is_secrets_storage_enabled":{"type":"boolean"},"is_space_awareness_enabled":{"type":"boolean"},"isReady":{"type":"boolean"},"missing_optional_features":{"items":{"enum":["encrypted_saved_object_encryption_key_required"],"type":"string"},"type":"array"},"missing_requirements":{"items":{"enum":["security_required","tls_required","api_keys","fleet_admin_user","fleet_server"],"type":"string"},"type":"array"},"package_verification_key_id":{"type":"string"}},"required":["isReady","missing_requirements","missing_optional_features"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent setup info","tags":["Elastic Agents"]},"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup.","operationId":"post-fleet-agents-setup","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"A summary of the result of Fleet's `setup` lifecycle. If `isInitialized` is true, Fleet is ready to accept agent enrollment. `nonFatalErrors` may include useful insight into non-blocking issues with Fleet setup.","type":"object","properties":{"isInitialized":{"type":"boolean"},"nonFatalErrors":{"items":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"}},"required":["name","message"]},"type":"array"}},"required":["isInitialized","nonFatalErrors"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Initiate agent setup","tags":["Elastic Agents"]}},"/api/fleet/agents/tags":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-read.","operationId":"get-fleet-agents-tags","parameters":[{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"showInactive","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"type":"string"},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get agent tags","tags":["Elastic Agents"]}},"/api/fleet/check-permissions":{"get":{"operationId":"get-fleet-check-permissions","parameters":[{"in":"query","name":"fleetServerSetup","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"error":{"enum":["MISSING_SECURITY","MISSING_PRIVILEGES","MISSING_FLEET_SERVER_SETUP_PRIVILEGES"],"type":"string"},"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Check permissions","tags":["Fleet internals"]}},"/api/fleet/data_streams":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all.","operationId":"get-fleet-data-streams","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"data_streams":{"items":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"type":"array"},"dataset":{"type":"string"},"index":{"type":"string"},"last_activity_ms":{"type":"number"},"namespace":{"type":"string"},"package":{"type":"string"},"package_version":{"type":"string"},"serviceDetails":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"environment":{"type":"string"},"serviceName":{"type":"string"}},"required":["environment","serviceName"]},"size_in_bytes":{"type":"number"},"size_in_bytes_formatted":{"anyOf":[{"type":"number"},{"type":"string"}]},"type":{"type":"string"}},"required":["index","dataset","namespace","type","package","package_version","last_activity_ms","size_in_bytes","size_in_bytes_formatted","dashboards","serviceDetails"]},"type":"array"}},"required":["data_streams"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get data streams","tags":["Data streams"]}},"/api/fleet/enrollment_api_keys":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup.","operationId":"get-fleet-enrollment-api-keys","parameters":[{"in":"query","name":"page","required":false,"schema":{"default":1,"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"default":20,"type":"number"}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.","type":"boolean"},"api_key":{"description":"The enrollment API key (token) used for enrolling Elastic Agents.","type":"string"},"api_key_id":{"description":"The ID of the API key in the Security API.","type":"string"},"created_at":{"type":"string"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"description":"The name of the enrollment API key.","type":"string"},"policy_id":{"description":"The ID of the agent policy the Elastic Agent will be enrolled in.","type":"string"}},"required":["id","api_key_id","api_key","active","created_at"]},"type":"array"},"list":{"deprecated":true,"items":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.","type":"boolean"},"api_key":{"description":"The enrollment API key (token) used for enrolling Elastic Agents.","type":"string"},"api_key_id":{"description":"The ID of the API key in the Security API.","type":"string"},"created_at":{"type":"string"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"description":"The name of the enrollment API key.","type":"string"},"policy_id":{"description":"The ID of the agent policy the Elastic Agent will be enrolled in.","type":"string"}},"required":["id","api_key_id","api_key","active","created_at"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage","list"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get enrollment API keys","tags":["Fleet enrollment API keys"]},"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-enrollment-api-keys","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"expiration":{"type":"string"},"name":{"type":"string"},"policy_id":{"type":"string"}},"required":["policy_id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"action":{"enum":["created"],"type":"string"},"item":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.","type":"boolean"},"api_key":{"description":"The enrollment API key (token) used for enrolling Elastic Agents.","type":"string"},"api_key_id":{"description":"The ID of the API key in the Security API.","type":"string"},"created_at":{"type":"string"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"description":"The name of the enrollment API key.","type":"string"},"policy_id":{"description":"The ID of the agent policy the Elastic Agent will be enrolled in.","type":"string"}},"required":["id","api_key_id","api_key","active","created_at"]}},"required":["item","action"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create an enrollment API key","tags":["Fleet enrollment API keys"]}},"/api/fleet/enrollment_api_keys/{keyId}":{"delete":{"description":"Revoke an enrollment API key by ID by marking it as inactive.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"delete-fleet-enrollment-api-keys-keyid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"keyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"action":{"enum":["deleted"],"type":"string"}},"required":["action"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Revoke an enrollment API key","tags":["Fleet enrollment API keys"]},"get":{"description":"Get an enrollment API key by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup.","operationId":"get-fleet-enrollment-api-keys-keyid","parameters":[{"in":"path","name":"keyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"active":{"description":"When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.","type":"boolean"},"api_key":{"description":"The enrollment API key (token) used for enrolling Elastic Agents.","type":"string"},"api_key_id":{"description":"The ID of the API key in the Security API.","type":"string"},"created_at":{"type":"string"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"description":"The name of the enrollment API key.","type":"string"},"policy_id":{"description":"The ID of the agent policy the Elastic Agent will be enrolled in.","type":"string"}},"required":["id","api_key_id","api_key","active","created_at"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an enrollment API key","tags":["Fleet enrollment API keys"]}},"/api/fleet/epm/bulk_assets":{"post":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"post-fleet-epm-bulk-assets","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"assetIds":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"]},"type":"array"}},"required":["assetIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"appLink":{"type":"string"},"attributes":{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"service":{"type":"string"},"title":{"type":"string"}}},"id":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","attributes"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk get assets","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/categories":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-categories","parameters":[{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"include_policy_templates","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"count":{"type":"number"},"id":{"type":"string"},"parent_id":{"type":"string"},"parent_title":{"type":"string"},"title":{"type":"string"}},"required":["id","title","count"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get package categories","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/custom_integrations":{"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-custom-integrations","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"datasets":{"items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["logs","metrics","traces","synthetics","profiling"],"type":"string"}},"required":["name","type"]},"type":"array"},"force":{"type":"boolean"},"integrationName":{"type":"string"}},"required":["integrationName","datasets"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"_meta":{"additionalProperties":false,"type":"object","properties":{"install_source":{"type":"string"},"name":{"type":"string"}},"required":["install_source","name"]},"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"}},"required":["items","_meta"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a custom integration","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/custom_integrations/{pkgName}":{"put":{"description":"[Required authorization] Route required privileges: fleet-settings-all AND integrations-all.","operationId":"put-fleet-epm-custom-integrations-pkgname","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"categories":{"items":{"type":"string"},"type":"array"},"readMeData":{"type":"string"}},"required":["readMeData"]}}}},"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update a custom integration","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/data_streams":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-data-streams","parameters":[{"in":"query","name":"type","required":false,"schema":{"enum":["logs","metrics","traces","synthetics","profiling"],"type":"string"}},{"in":"query","name":"datasetQuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortOrder","required":false,"schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},{"in":"query","name":"uncategorisedOnly","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get data streams","tags":["Data streams"]}},"/api/fleet/epm/packages":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages","parameters":[{"in":"query","name":"category","required":false,"schema":{"type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"excludeInstallStatus","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"withPackagePoliciesCount","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":true,"type":"object","properties":{"categories":{"items":{"type":"string"},"type":"array"},"conditions":{"additionalProperties":true,"type":"object","properties":{"elastic":{"additionalProperties":true,"type":"object","properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"subscription":{"type":"string"}}},"kibana":{"additionalProperties":true,"type":"object","properties":{"version":{"type":"string"}}}}},"data_streams":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"description":{"type":"string"},"discovery":{"additionalProperties":true,"type":"object","properties":{"fields":{"items":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"type":"array"}}},"download":{"type":"string"},"format_version":{"type":"string"},"icons":{"items":{"additionalProperties":true,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"id":{"type":"string"},"installationInfo":{"additionalProperties":true,"type":"object","properties":{"additional_spaces_installed_kibana":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"type":"object"},"created_at":{"type":"string"},"experimental_data_stream_features":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":true,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"install_format_schema_version":{"type":"string"},"install_source":{"enum":["registry","upload","bundled","custom"],"type":"string"},"install_status":{"enum":["installed","installing","install_failed"],"type":"string"},"installed_es":{"items":{"additionalProperties":true,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]},"type":"array"},"installed_kibana":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"installed_kibana_space_id":{"type":"string"},"latest_executed_state":{"additionalProperties":true,"type":"object","properties":{"error":{"type":"string"},"name":{"type":"string"},"started_at":{"type":"string"}}},"latest_install_failed_attempts":{"items":{"additionalProperties":true,"type":"object","properties":{"created_at":{"type":"string"},"error":{"additionalProperties":true,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"]},"target_version":{"type":"string"}},"required":["created_at","target_version","error"]},"type":"array"},"name":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"updated_at":{"type":"string"},"verification_key_id":{"nullable":true,"type":"string"},"verification_status":{"enum":["unverified","verified","unknown"],"type":"string"},"version":{"type":"string"}},"required":["type","installed_kibana","installed_es","name","version","install_status","install_source","verification_status"]},"integration":{"type":"string"},"internal":{"type":"boolean"},"latestVersion":{"type":"string"},"name":{"type":"string"},"owner":{"additionalProperties":true,"type":"object","properties":{"github":{"type":"string"},"type":{"enum":["elastic","partner","community"],"type":"string"}}},"path":{"type":"string"},"policy_templates":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"readme":{"type":"string"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"signature_path":{"type":"string"},"source":{"additionalProperties":true,"type":"object","properties":{"license":{"type":"string"}},"required":["license"]},"status":{"type":"string"},"title":{"type":"string"},"type":{"anyOf":[{"enum":["integration"],"type":"string"},{"enum":["input"],"type":"string"},{"enum":["content"],"type":"string"},{"type":"string"}]},"vars":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"version":{"type":"string"}},"required":["name","version","title","id"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get packages","tags":["Elastic Package Manager (EPM)"]},"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-packages","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"ignoreMappingUpdateErrors","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"skipDataStreamRollover","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/gzip; application/zip":{"schema":{"format":"binary","type":"string"}}}},"responses":{"200":{"content":{"application/gzip; application/zip":{"schema":{"additionalProperties":false,"type":"object","properties":{"_meta":{"additionalProperties":false,"type":"object","properties":{"install_source":{"type":"string"},"name":{"type":"string"}},"required":["install_source","name"]},"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"}},"required":["items","_meta"]}}}},"400":{"content":{"application/gzip; application/zip":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Install a package by upload","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/_bulk":{"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-packages-bulk","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"force":{"default":false,"type":"boolean"},"packages":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"prerelease":{"type":"boolean"},"version":{"type":"string"}},"required":["name","version"]}]},"minItems":1,"type":"array"}},"required":["packages"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"result":{"additionalProperties":false,"type":"object","properties":{"assets":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"},"error":{},"installSource":{"type":"string"},"installType":{"type":"string"},"status":{"enum":["installed","already_installed"],"type":"string"}},"required":["error","installType"]},"version":{"type":"string"}},"required":["name","version","result"]},{"additionalProperties":false,"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{}]},"name":{"type":"string"},"statusCode":{"type":"number"}},"required":["name","statusCode","error"]}]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk install packages","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}":{"delete":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"delete-fleet-epm-packages-pkgname-pkgversion","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":false,"schema":{"type":"string"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete a package","tags":["Elastic Package Manager (EPM)"]},"get":{"operationId":"get-fleet-epm-packages-pkgname-pkgversion","parameters":[{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":false,"schema":{"type":"string"}},{"in":"query","name":"ignoreUnverified","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"full","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"withMetadata","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"agent":{"additionalProperties":false,"type":"object","properties":{"privileges":{"additionalProperties":false,"type":"object","properties":{"root":{"type":"boolean"}}}}},"asset_tags":{"items":{"additionalProperties":false,"type":"object","properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"asset_types":{"items":{"type":"string"},"type":"array"},"text":{"type":"string"}},"required":["text"]},"type":"array"},"assets":{"additionalProperties":{},"type":"object"},"categories":{"items":{"type":"string"},"type":"array"},"conditions":{"additionalProperties":true,"type":"object","properties":{"elastic":{"additionalProperties":true,"type":"object","properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"subscription":{"type":"string"}}},"kibana":{"additionalProperties":true,"type":"object","properties":{"version":{"type":"string"}}}}},"data_streams":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"description":{"type":"string"},"discovery":{"additionalProperties":true,"type":"object","properties":{"fields":{"items":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"type":"array"}}},"download":{"type":"string"},"elasticsearch":{"additionalProperties":{},"type":"object"},"format_version":{"type":"string"},"icons":{"items":{"additionalProperties":true,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"installationInfo":{"additionalProperties":true,"type":"object","properties":{"additional_spaces_installed_kibana":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"type":"object"},"created_at":{"type":"string"},"experimental_data_stream_features":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":true,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"install_format_schema_version":{"type":"string"},"install_source":{"enum":["registry","upload","bundled","custom"],"type":"string"},"install_status":{"enum":["installed","installing","install_failed"],"type":"string"},"installed_es":{"items":{"additionalProperties":true,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]},"type":"array"},"installed_kibana":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"installed_kibana_space_id":{"type":"string"},"latest_executed_state":{"additionalProperties":true,"type":"object","properties":{"error":{"type":"string"},"name":{"type":"string"},"started_at":{"type":"string"}}},"latest_install_failed_attempts":{"items":{"additionalProperties":true,"type":"object","properties":{"created_at":{"type":"string"},"error":{"additionalProperties":true,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"]},"target_version":{"type":"string"}},"required":["created_at","target_version","error"]},"type":"array"},"name":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"updated_at":{"type":"string"},"verification_key_id":{"nullable":true,"type":"string"},"verification_status":{"enum":["unverified","verified","unknown"],"type":"string"},"version":{"type":"string"}},"required":["type","installed_kibana","installed_es","name","version","install_status","install_source","verification_status"]},"internal":{"type":"boolean"},"keepPoliciesUpToDate":{"type":"boolean"},"latestVersion":{"type":"string"},"license":{"type":"string"},"licensePath":{"type":"string"},"name":{"type":"string"},"notice":{"type":"string"},"owner":{"additionalProperties":true,"type":"object","properties":{"github":{"type":"string"},"type":{"enum":["elastic","partner","community"],"type":"string"}}},"path":{"type":"string"},"policy_templates":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"readme":{"type":"string"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"screenshots":{"items":{"additionalProperties":false,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"signature_path":{"type":"string"},"source":{"additionalProperties":true,"type":"object","properties":{"license":{"type":"string"}},"required":["license"]},"status":{"type":"string"},"title":{"type":"string"},"type":{"anyOf":[{"enum":["integration"],"type":"string"},{"enum":["input"],"type":"string"},{"enum":["content"],"type":"string"},{"type":"string"}]},"vars":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"version":{"type":"string"}},"required":["name","version","title","assets"]},"metadata":{"additionalProperties":false,"type":"object","properties":{"has_policies":{"type":"boolean"}},"required":["has_policies"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a package","tags":["Elastic Package Manager (EPM)"]},"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-packages-pkgname-pkgversion","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":false,"schema":{"type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"ignoreMappingUpdateErrors","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"skipDataStreamRollover","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"force":{"default":false,"type":"boolean"},"ignore_constraints":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"_meta":{"additionalProperties":false,"type":"object","properties":{"install_source":{"type":"string"},"name":{"type":"string"}},"required":["install_source","name"]},"items":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},{"additionalProperties":false,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]}]},"type":"array"}},"required":["items","_meta"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Install a package from the registry","tags":["Elastic Package Manager (EPM)"]},"put":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"put-fleet-epm-packages-pkgname-pkgversion","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"keepPoliciesUpToDate":{"type":"boolean"}},"required":["keepPoliciesUpToDate"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":true,"type":"object","properties":{"agent":{"additionalProperties":false,"type":"object","properties":{"privileges":{"additionalProperties":false,"type":"object","properties":{"root":{"type":"boolean"}}}}},"asset_tags":{"items":{"additionalProperties":false,"type":"object","properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"asset_types":{"items":{"type":"string"},"type":"array"},"text":{"type":"string"}},"required":["text"]},"type":"array"},"assets":{"additionalProperties":{},"type":"object"},"categories":{"items":{"type":"string"},"type":"array"},"conditions":{"additionalProperties":true,"type":"object","properties":{"elastic":{"additionalProperties":true,"type":"object","properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"subscription":{"type":"string"}}},"kibana":{"additionalProperties":true,"type":"object","properties":{"version":{"type":"string"}}}}},"data_streams":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"description":{"type":"string"},"discovery":{"additionalProperties":true,"type":"object","properties":{"fields":{"items":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"type":"array"}}},"download":{"type":"string"},"elasticsearch":{"additionalProperties":{},"type":"object"},"format_version":{"type":"string"},"icons":{"items":{"additionalProperties":true,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"installationInfo":{"additionalProperties":true,"type":"object","properties":{"additional_spaces_installed_kibana":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"type":"object"},"created_at":{"type":"string"},"experimental_data_stream_features":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":true,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"install_format_schema_version":{"type":"string"},"install_source":{"enum":["registry","upload","bundled","custom"],"type":"string"},"install_status":{"enum":["installed","installing","install_failed"],"type":"string"},"installed_es":{"items":{"additionalProperties":true,"type":"object","properties":{"deferred":{"type":"boolean"},"id":{"type":"string"},"type":{"enum":["index","index_template","component_template","ingest_pipeline","ilm_policy","data_stream_ilm_policy","transform","ml_model"],"type":"string"},"version":{"type":"string"}},"required":["id","type"]},"type":"array"},"installed_kibana":{"items":{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"},"originId":{"type":"string"},"type":{"anyOf":[{"enum":["dashboard","lens","visualization","search","index-pattern","map","ml-module","security-rule","csp-rule-template","osquery-pack-asset","osquery-saved-query","tag"],"type":"string"},{"type":"string"}]}},"required":["id","type"]},"type":"array"},"installed_kibana_space_id":{"type":"string"},"latest_executed_state":{"additionalProperties":true,"type":"object","properties":{"error":{"type":"string"},"name":{"type":"string"},"started_at":{"type":"string"}}},"latest_install_failed_attempts":{"items":{"additionalProperties":true,"type":"object","properties":{"created_at":{"type":"string"},"error":{"additionalProperties":true,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"]},"target_version":{"type":"string"}},"required":["created_at","target_version","error"]},"type":"array"},"name":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"updated_at":{"type":"string"},"verification_key_id":{"nullable":true,"type":"string"},"verification_status":{"enum":["unverified","verified","unknown"],"type":"string"},"version":{"type":"string"}},"required":["type","installed_kibana","installed_es","name","version","install_status","install_source","verification_status"]},"internal":{"type":"boolean"},"keepPoliciesUpToDate":{"type":"boolean"},"latestVersion":{"type":"string"},"license":{"type":"string"},"licensePath":{"type":"string"},"name":{"type":"string"},"notice":{"type":"string"},"owner":{"additionalProperties":true,"type":"object","properties":{"github":{"type":"string"},"type":{"enum":["elastic","partner","community"],"type":"string"}}},"path":{"type":"string"},"policy_templates":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"readme":{"type":"string"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"screenshots":{"items":{"additionalProperties":false,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"signature_path":{"type":"string"},"source":{"additionalProperties":true,"type":"object","properties":{"license":{"type":"string"}},"required":["license"]},"status":{"type":"string"},"title":{"type":"string"},"type":{"anyOf":[{"enum":["integration"],"type":"string"},{"enum":["input"],"type":"string"},{"enum":["content"],"type":"string"},{"type":"string"}]},"vars":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"version":{"type":"string"}},"required":["name","version","title","assets"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update package settings","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages-pkgname-pkgversion-filepath","parameters":[{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}},{"in":"path","name":"filePath","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a package file","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets":{"delete":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"delete-fleet-epm-packages-pkgname-pkgversion-datastream-assets","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}},{"in":"query","name":"packagePolicyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete assets for an input package","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets":{"delete":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"delete-fleet-epm-packages-pkgname-pkgversion-kibana-assets","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete Kibana assets for a package","tags":["Elastic Package Manager (EPM)"]},"post":{"description":"[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.","operationId":"post-fleet-epm-packages-pkgname-pkgversion-kibana-assets","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"force":{"type":"boolean"},"space_ids":{"description":"When provided install assets in the specified spaces instead of the current space.","items":{"type":"string"},"minItems":1,"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Install Kibana assets for a package","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize":{"post":{"operationId":"post-fleet-epm-packages-pkgname-pkgversion-transforms-authorize","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"transforms":{"items":{"additionalProperties":false,"type":"object","properties":{"transformId":{"type":"string"}},"required":["transformId"]},"type":"array"}},"required":["transforms"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"type":"object","properties":{"error":{"nullable":true},"success":{"type":"boolean"},"transformId":{"type":"string"}},"required":["transformId","success","error"]},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Authorize transforms","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/{pkgName}/stats":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages-pkgname-stats","parameters":[{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"response":{"additionalProperties":false,"type":"object","properties":{"agent_policy_count":{"type":"number"}},"required":["agent_policy_count"]}},"required":["response"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get package stats","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/installed":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages-installed","parameters":[{"in":"query","name":"dataStreamType","required":false,"schema":{"enum":["logs","metrics","traces","synthetics","profiling"],"type":"string"}},{"in":"query","name":"showOnlyActiveDataStreams","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"nameQuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"searchAfter","required":false,"schema":{"items":{"anyOf":[{"type":"string"},{"type":"number"}]},"type":"array"}},{"in":"query","name":"perPage","required":false,"schema":{"default":15,"type":"number"}},{"in":"query","name":"sortOrder","required":false,"schema":{"default":"asc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"dataStreams":{"items":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"}},"required":["name","title"]},"type":"array"},"description":{"type":"string"},"icons":{"items":{"additionalProperties":false,"type":"object","properties":{"dark_mode":{"type":"boolean"},"path":{"type":"string"},"size":{"type":"string"},"src":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"required":["src"]},"type":"array"},"name":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"version":{"type":"string"}},"required":["name","version","status","dataStreams"]},"type":"array"},"searchAfter":{"items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":[],"nullable":true},{}]},"type":"array"},"total":{"type":"number"}},"required":["items","total"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get installed packages","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/packages/limited":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-packages-limited","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"type":"string"},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a limited package list","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-templates-pkgname-pkgversion-inputs","parameters":[{"in":"path","name":"pkgName","required":true,"schema":{"type":"string"}},{"in":"path","name":"pkgVersion","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","yml","yaml"],"type":"string"}},{"in":"query","name":"prerelease","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"ignoreUnverified","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"type":"string"},{"additionalProperties":false,"type":"object","properties":{"inputs":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"streams":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"dataset":{"type":"string"},"type":{"type":"string"}},"required":["dataset"]},"id":{"type":"string"}},"required":["id","data_stream"]},"type":"array"},"type":{"type":"string"}},"required":["id","type"]},"type":"array"}},"required":["inputs"]}]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get an inputs template","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/epm/verification_key_id":{"get":{"description":"[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.","operationId":"get-fleet-epm-verification-key-id","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"nullable":true,"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a package signature verification key ID","tags":["Elastic Package Manager (EPM)"]}},"/api/fleet/fleet_server_hosts":{"get":{"description":"[Required authorization] Route required privileges: fleet-agents-all OR fleet-settings-read.","operationId":"get-fleet-fleet-server-hosts","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls","id"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get Fleet Server hosts","tags":["Fleet Server hosts"]},"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-fleet-server-hosts","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls","id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a Fleet Server host","tags":["Fleet Server hosts"]}},"/api/fleet/fleet_server_hosts/{itemId}":{"delete":{"description":"Delete a Fleet Server host by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"delete-fleet-fleet-server-hosts-itemid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete a Fleet Server host","tags":["Fleet Server hosts"]},"get":{"description":"Get a Fleet Server host by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-fleet-server-hosts-itemid","parameters":[{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls","id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a Fleet Server host","tags":["Fleet Server hosts"]},"put":{"description":"Update a Fleet Server host by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"put-fleet-fleet-server-hosts-itemid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"is_default":{"type":"boolean"},"is_internal":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["proxy_id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"host_urls":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"es_key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"client_auth":{"enum":["optional","required","none"],"type":"string"},"es_certificate":{"type":"string"},"es_certificate_authorities":{"items":{"type":"string"},"type":"array"},"es_key":{"type":"string"},"key":{"type":"string"}}}},"required":["name","host_urls","id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update a Fleet Server host","tags":["Fleet Server hosts"]}},"/api/fleet/health_check":{"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-health-check","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"host_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Check Fleet Server health","tags":["Fleet internals"]}},"/api/fleet/kubernetes":{"get":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-setup.","operationId":"get-fleet-kubernetes","parameters":[{"in":"query","name":"download","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"fleetServer","required":false,"schema":{"type":"string"}},{"in":"query","name":"enrolToken","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"type":"string"}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a full K8s agent manifest","tags":["Elastic Agent policies"]}},"/api/fleet/kubernetes/download":{"get":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-setup.","operationId":"get-fleet-kubernetes-download","parameters":[{"in":"query","name":"download","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"fleetServer","required":false,"schema":{"type":"string"}},{"in":"query","name":"enrolToken","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Download an agent manifest","tags":["Elastic Agent policies"]}},"/api/fleet/logstash_api_keys":{"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-logstash-api-keys","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"api_key":{"type":"string"}},"required":["api_key"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Generate a Logstash API key","tags":["Fleet outputs"]}},"/api/fleet/message_signing_service/rotate_key_pair":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all.","operationId":"post-fleet-message-signing-service-rotate-key-pair","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"acknowledge","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"500":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Rotate a Fleet message signing key pair","tags":["Message Signing Service"]}},"/api/fleet/outputs":{"get":{"description":"[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read.","operationId":"get-fleet-outputs","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":true,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":true,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":true,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get outputs","tags":["Fleet outputs"]},"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-outputs","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":false,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":false,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":false,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":false,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":false,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":true,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":true,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":true,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create output","tags":["Fleet outputs"]}},"/api/fleet/outputs/{outputId}":{"delete":{"description":"Delete output by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"delete-fleet-outputs-outputid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"outputId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete output","tags":["Fleet outputs"]},"get":{"description":"Get output by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read.","operationId":"get-fleet-outputs-outputid","parameters":[{"in":"path","name":"outputId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":true,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":true,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":true,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get output","tags":["Fleet outputs"]},"put":{"description":"Update output by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all OR fleet-agent-policies-all.","operationId":"put-fleet-outputs-outputid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"outputId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"type":"boolean"},"is_default_monitoring":{"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"type":"boolean"},"is_default_monitoring":{"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"type":"boolean"},"is_default_monitoring":{"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":false,"type":"object","properties":{"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":false,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":false,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":false,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":false,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":false,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":false,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","compression_level","connection_type","username","password"]}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"kibana_api_key":{"nullable":true,"type":"string"},"kibana_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"preset":{"enum":["balanced","custom","throughput","scale","latency"],"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"service_token":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"service_token":{"nullable":true,"type":"string"},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"sync_integrations":{"type":"boolean"},"sync_uninstalled_integrations":{"type":"boolean"},"type":{"enum":["remote_elasticsearch"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"config_yaml":{"nullable":true,"type":"string"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"name":{"type":"string"},"proxy_id":{"nullable":true,"type":"string"},"secrets":{"additionalProperties":true,"type":"object","properties":{"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}}}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"type":{"enum":["logstash"],"type":"string"}},"required":["name","type","hosts"]},{"additionalProperties":true,"type":"object","properties":{"allow_edit":{"items":{"type":"string"},"type":"array"},"auth_type":{"enum":["none","user_pass","ssl","kerberos"],"type":"string"},"broker_timeout":{"type":"number"},"ca_sha256":{"nullable":true,"type":"string"},"ca_trusted_fingerprint":{"nullable":true,"type":"string"},"client_id":{"type":"string"},"compression":{"enum":["gzip","snappy","lz4","none"],"type":"string"},"compression_level":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"number"},{"not":{}}]},"config_yaml":{"nullable":true,"type":"string"},"connection_type":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":["plaintext","encryption"],"type":"string"},{"not":{}}]},"hash":{"additionalProperties":true,"type":"object","properties":{"hash":{"type":"string"},"random":{"type":"boolean"}}},"headers":{"items":{"additionalProperties":true,"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"type":"array"},"hosts":{"items":{"type":"string"},"minItems":1,"type":"array"},"id":{"type":"string"},"is_default":{"default":false,"type":"boolean"},"is_default_monitoring":{"default":false,"type":"boolean"},"is_internal":{"type":"boolean"},"is_preconfigured":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"partition":{"enum":["random","round_robin","hash"],"type":"string"},"password":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"not":{}},{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]}]},"proxy_id":{"nullable":true,"type":"string"},"random":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"required_acks":{"enum":[1,0,-1],"type":"integer"},"round_robin":{"additionalProperties":true,"type":"object","properties":{"group_events":{"type":"number"}}},"sasl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"mechanism":{"enum":["PLAIN","SCRAM-SHA-256","SCRAM-SHA-512"],"type":"string"}}},"secrets":{"additionalProperties":true,"type":"object","properties":{"password":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]},"ssl":{"additionalProperties":true,"type":"object","properties":{"key":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"string"}]}},"required":["key"]}}},"shipper":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"compression_level":{"nullable":true,"type":"number"},"disk_queue_compression_enabled":{"nullable":true,"type":"boolean"},"disk_queue_enabled":{"default":false,"nullable":true,"type":"boolean"},"disk_queue_encryption_enabled":{"nullable":true,"type":"boolean"},"disk_queue_max_size":{"nullable":true,"type":"number"},"disk_queue_path":{"nullable":true,"type":"string"},"loadbalance":{"nullable":true,"type":"boolean"},"max_batch_bytes":{"nullable":true,"type":"number"},"mem_queue_events":{"nullable":true,"type":"number"},"queue_flush_timeout":{"nullable":true,"type":"number"}},"required":["disk_queue_path","disk_queue_max_size","disk_queue_encryption_enabled","disk_queue_compression_enabled","compression_level","loadbalance","mem_queue_events","queue_flush_timeout","max_batch_bytes"]},"ssl":{"additionalProperties":true,"nullable":true,"type":"object","properties":{"certificate":{"type":"string"},"certificate_authorities":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"verification_mode":{"enum":["full","none","certificate","strict"],"type":"string"}}},"timeout":{"type":"number"},"topic":{"type":"string"},"type":{"enum":["kafka"],"type":"string"},"username":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"type":"string"},{"not":{}}]},"version":{"type":"string"}},"required":["name","type","hosts","compression_level","auth_type","connection_type","username","password"]}]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update output","tags":["Fleet outputs"]}},"/api/fleet/outputs/{outputId}/health":{"get":{"description":"[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-outputs-outputid-health","parameters":[{"in":"path","name":"outputId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"description":"long message if unhealthy","type":"string"},"state":{"description":"state of output, HEALTHY or DEGRADED","type":"string"},"timestamp":{"description":"timestamp of reported state","type":"string"}},"required":["state","message","timestamp"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get the latest output health","tags":["Fleet outputs"]}},"/api/fleet/package_policies":{"get":{"operationId":"get-fleet-package-policies","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"perPage","required":false,"schema":{"type":"number"}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortOrder","required":false,"schema":{"enum":["desc","asc"],"type":"string"}},{"in":"query","name":"showUpgradeable","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"kuery","required":false,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}},{"in":"query","name":"withAgentCount","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get package policies","tags":["Fleet package policies"]},"post":{"operationId":"post-fleet-package-policies","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"description":{"description":"Package policy description","type":"string"},"enabled":{"type":"boolean"},"force":{"description":"Force package policy creation even if package is not verified, or if the agent policy is managed.","type":"boolean"},"id":{"description":"Package policy unique identifier","type":"string"},"inputs":{"items":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled"]},"type":"array"},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["name","inputs"]},{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"description":{"type":"string"},"force":{"type":"boolean"},"id":{"type":"string"},"inputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object"},"name":{"type":"string"},"namespace":{"type":"string"},"output_id":{"nullable":true,"type":"string"},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"nullable":true,"type":"string"},"policy_ids":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}},"required":["name","package"]}],"description":"You should use inputs as an object and not use the deprecated inputs array."}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"409":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a package policy","tags":["Fleet package policies"]}},"/api/fleet/package_policies/_bulk_get":{"post":{"operationId":"post-fleet-package-policies-bulk-get","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"ids":{"description":"list of package policy ids","items":{"type":"string"},"type":"array"},"ignoreMissing":{"type":"boolean"}},"required":["ids"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]},"type":"array"}},"required":["items"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Bulk get package policies","tags":["Fleet package policies"]}},"/api/fleet/package_policies/{packagePolicyId}":{"delete":{"description":"Delete a package policy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.","operationId":"delete-fleet-package-policies-packagepolicyid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"packagePolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete a package policy","tags":["Fleet package policies"]},"get":{"description":"Get a package policy by ID.","operationId":"get-fleet-package-policies-packagepolicyid","parameters":[{"in":"path","name":"packagePolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Get a package policy","tags":["Fleet package policies"]},"put":{"description":"Update a package policy by ID.","operationId":"put-fleet-package-policies-packagepolicyid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"packagePolicyId","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"enum":["simplified","legacy"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"description":{"description":"Package policy description","type":"string"},"enabled":{"type":"boolean"},"force":{"type":"boolean"},"inputs":{"items":{"additionalProperties":false,"type":"object","properties":{"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled"]},"type":"array"},"is_managed":{"type":"boolean"},"name":{"type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"version":{"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"description":{"type":"string"},"force":{"type":"boolean"},"id":{"type":"string"},"inputs":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object"},"name":{"type":"string"},"namespace":{"type":"string"},"output_id":{"nullable":true,"type":"string"},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"nullable":true,"type":"string"},"policy_ids":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}},"required":["name","package"]}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","id","revision","updated_at","updated_by","created_at","created_by"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"403":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update a package policy","tags":["Fleet package policies"]}},"/api/fleet/package_policies/delete":{"post":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.","operationId":"post-fleet-package-policies-delete","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"force":{"type":"boolean"},"packagePolicyIds":{"items":{"type":"string"},"type":"array"}},"required":["packagePolicyIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"type":"object","properties":{"body":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"id":{"type":"string"},"name":{"type":"string"},"output_id":{"nullable":true,"type":"string"},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Use `policy_ids` instead","nullable":true,"type":"string"},"policy_ids":{"items":{"type":"string"},"type":"array"},"statusCode":{"type":"number"},"success":{"type":"boolean"}},"required":["id","success","policy_ids","package"]},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Bulk delete package policies","tags":["Fleet package policies"]}},"/api/fleet/package_policies/upgrade":{"post":{"description":"Upgrade a package policy to a newer package version.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.","operationId":"post-fleet-package-policies-upgrade","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"packagePolicyIds":{"items":{"type":"string"},"type":"array"}},"required":["packagePolicyIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"type":"object","properties":{"body":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"id":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"number"},"success":{"type":"boolean"}},"required":["id","success"]},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Upgrade a package policy","tags":["Fleet package policies"]}},"/api/fleet/package_policies/upgrade/dryrun":{"post":{"description":"[Required authorization] Route required privileges: fleet-agent-policies-read AND integrations-read.","operationId":"post-fleet-package-policies-upgrade-dryrun","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"packagePolicyIds":{"items":{"type":"string"},"type":"array"},"packageVersion":{"type":"string"}},"required":["packagePolicyIds"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"type":"object","properties":{"agent_diff":{"items":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"namespace":{"type":"string"}},"required":["namespace"]},"id":{"type":"string"},"meta":{"additionalProperties":true,"type":"object","properties":{"package":{"additionalProperties":true,"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]}},"required":["package"]},"name":{"type":"string"},"package_policy_id":{"type":"string"},"processors":{"items":{"additionalProperties":true,"type":"object","properties":{"add_fields":{"additionalProperties":true,"type":"object","properties":{"fields":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]},"type":"object"},"target":{"type":"string"}},"required":["target","fields"]}},"required":["add_fields"]},"type":"array"},"revision":{"type":"number"},"streams":{"items":{"additionalProperties":true,"type":"object","properties":{"data_stream":{"additionalProperties":true,"type":"object","properties":{"dataset":{"type":"string"},"type":{"type":"string"}},"required":["dataset"]},"id":{"type":"string"}},"required":["data_stream"]},"type":"array"},"type":{"type":"string"},"use_output":{"type":"string"}},"required":["id","name","revision","type","data_stream","use_output","package_policy_id"]},"type":"array"},"type":"array"},"body":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"diff":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"agents":{"type":"number"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"id":{"type":"string"},"inputs":{"anyOf":[{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that input, (default to true)","type":"boolean"},"streams":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"enable or disable that stream, (default to true)","type":"boolean"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Input streams (see integration documentation to know what streams are available)","type":"object"},"vars":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object"}}},"description":"Package policy inputs (see integration documentation to know what inputs are available)","type":"object","x-oas-optional":true}]},"is_managed":{"type":"boolean"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"spaceIds":{"items":{"type":"string"},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"anyOf":[{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"isSecretRef":{"type":"boolean"}},"required":["id","isSecretRef"]}],"nullable":true},"description":"Input/stream level variable (see integration documentation for more information)","type":"object","x-oas-optional":true}]},"version":{"type":"string"}},"required":["name","enabled","inputs","revision","updated_at","updated_by","created_at","created_by"]},{"additionalProperties":true,"type":"object","properties":{"additional_datastreams_permissions":{"description":"Additional datastream permissions, that will be added to the agent policy.","items":{"type":"string"},"nullable":true,"type":"array"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"description":"Package policy description","type":"string"},"elasticsearch":{"additionalProperties":true,"type":"object","properties":{"privileges":{"additionalProperties":true,"type":"object","properties":{"cluster":{"items":{"type":"string"},"type":"array"}}}}},"enabled":{"type":"boolean"},"errors":{"items":{"additionalProperties":false,"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"required":["message"]},"type":"array"},"force":{"type":"boolean"},"id":{"type":"string"},"inputs":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_input":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"policy_template":{"type":"string"},"streams":{"items":{"additionalProperties":false,"type":"object","properties":{"compiled_stream":{},"config":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"data_stream":{"additionalProperties":false,"type":"object","properties":{"dataset":{"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"dynamic_dataset":{"type":"boolean"},"dynamic_namespace":{"type":"boolean"},"privileges":{"additionalProperties":false,"type":"object","properties":{"indices":{"items":{"type":"string"},"type":"array"}}}}},"type":{"type":"string"}},"required":["dataset","type"]},"enabled":{"type":"boolean"},"id":{"type":"string"},"keep_enabled":{"type":"boolean"},"release":{"enum":["ga","beta","experimental"],"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["enabled","data_stream","compiled_stream"]},"type":"array"},"type":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"}},"required":["type","enabled","streams","compiled_input"]},"type":"array"},"is_managed":{"type":"boolean"},"missingVars":{"items":{"type":"string"},"type":"array"},"name":{"description":"Package policy name (should be unique)","type":"string"},"namespace":{"description":"The package policy namespace. Leave blank to inherit the agent policy's namespace.","type":"string"},"output_id":{"nullable":true,"type":"string"},"overrides":{"additionalProperties":false,"description":"Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.","nullable":true,"type":"object","properties":{"inputs":{"additionalProperties":{},"type":"object"}}},"package":{"additionalProperties":false,"type":"object","properties":{"experimental_data_stream_features":{"items":{"additionalProperties":false,"type":"object","properties":{"data_stream":{"type":"string"},"features":{"additionalProperties":false,"type":"object","properties":{"doc_value_only_numeric":{"type":"boolean"},"doc_value_only_other":{"type":"boolean"},"synthetic_source":{"type":"boolean"},"tsdb":{"type":"boolean"}}}},"required":["data_stream","features"]},"type":"array"},"name":{"description":"Package name","type":"string"},"requires_root":{"type":"boolean"},"title":{"type":"string"},"version":{"description":"Package version","type":"string"}},"required":["name","version"]},"policy_id":{"deprecated":true,"description":"Agent policy ID where that package policy will be added","nullable":true,"type":"string"},"policy_ids":{"items":{"description":"Agent policy IDs where that package policy will be added","type":"string"},"type":"array"},"revision":{"type":"number"},"secret_references":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"type":"array"},"supports_agentless":{"default":false,"description":"Indicates whether the package policy belongs to an agentless agent policy.","nullable":true,"type":"boolean"},"updated_at":{"type":"string"},"updated_by":{"type":"string"},"vars":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"frozen":{"type":"boolean"},"type":{"type":"string"},"value":{}},"required":["value"]},"description":"Package variable (see integration documentation for more information)","type":"object"},"version":{"type":"string"}},"required":["name","enabled","inputs"]}]},"type":"array"},"hasErrors":{"type":"boolean"},"name":{"type":"string"},"statusCode":{"type":"number"}},"required":["hasErrors"]},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Dry run a package policy upgrade","tags":["Fleet package policies"]}},"/api/fleet/proxies":{"get":{"description":"[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-proxies","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["id","url","name"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get proxies","tags":["Fleet proxies"]},"post":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"post-fleet-proxies","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["url","name"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["id","url","name"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a proxy","tags":["Fleet proxies"]}},"/api/fleet/proxies/{itemId}":{"delete":{"description":"Delete a proxy by ID\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"delete-fleet-proxies-itemid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Delete a proxy","tags":["Fleet proxies"]},"get":{"description":"Get a proxy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-proxies-itemid","parameters":[{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["id","url","name"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a proxy","tags":["Fleet proxies"]},"put":{"description":"Update a proxy by ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-settings-all.","operationId":"put-fleet-proxies-itemid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["proxy_headers","certificate_authorities","certificate","certificate_key"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"certificate":{"nullable":true,"type":"string"},"certificate_authorities":{"nullable":true,"type":"string"},"certificate_key":{"nullable":true,"type":"string"},"id":{"type":"string"},"is_preconfigured":{"default":false,"type":"boolean"},"name":{"type":"string"},"proxy_headers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"nullable":true,"type":"object"},"url":{"type":"string"}},"required":["id","url","name"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Update a proxy","tags":["Fleet proxies"]}},"/api/fleet/service_tokens":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-all.","operationId":"post-fleet-service-tokens","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"nullable":true,"type":"object","properties":{"remote":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Create a service token","tags":["Fleet service tokens"]}},"/api/fleet/settings":{"get":{"description":"[Required authorization] Route required privileges: fleet-settings-read.","operationId":"get-fleet-settings","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"delete_unenrolled_agents":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"is_preconfigured":{"type":"boolean"}},"required":["enabled","is_preconfigured"]},"has_seen_add_data_notice":{"type":"boolean"},"id":{"type":"string"},"output_secret_storage_requirements_met":{"type":"boolean"},"preconfigured_fields":{"items":{"enum":["fleet_server_hosts"],"type":"string"},"type":"array"},"prerelease_integrations_enabled":{"type":"boolean"},"secret_storage_requirements_met":{"type":"boolean"},"use_space_awareness_migration_started_at":{"nullable":true,"type":"string"},"use_space_awareness_migration_status":{"enum":["pending","success","error"],"type":"string"},"version":{"type":"string"}},"required":["id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Get settings","tags":["Fleet internals"]},"put":{"description":"[Required authorization] Route required privileges: fleet-settings-all.","operationId":"put-fleet-settings","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"additional_yaml_config":{"type":"string"},"delete_unenrolled_agents":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"is_preconfigured":{"type":"boolean"}},"required":["enabled","is_preconfigured"]},"has_seen_add_data_notice":{"type":"boolean"},"kibana_ca_sha256":{"type":"string"},"kibana_urls":{"items":{"format":"uri","type":"string"},"type":"array"},"prerelease_integrations_enabled":{"type":"boolean"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"delete_unenrolled_agents":{"additionalProperties":false,"type":"object","properties":{"enabled":{"type":"boolean"},"is_preconfigured":{"type":"boolean"}},"required":["enabled","is_preconfigured"]},"has_seen_add_data_notice":{"type":"boolean"},"id":{"type":"string"},"output_secret_storage_requirements_met":{"type":"boolean"},"preconfigured_fields":{"items":{"enum":["fleet_server_hosts"],"type":"string"},"type":"array"},"prerelease_integrations_enabled":{"type":"boolean"},"secret_storage_requirements_met":{"type":"boolean"},"use_space_awareness_migration_started_at":{"nullable":true,"type":"string"},"use_space_awareness_migration_status":{"enum":["pending","success","error"],"type":"string"},"version":{"type":"string"}},"required":["id"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Update settings","tags":["Fleet internals"]}},"/api/fleet/setup":{"post":{"description":"[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup.","operationId":"post-fleet-setup","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"A summary of the result of Fleet's `setup` lifecycle. If `isInitialized` is true, Fleet is ready to accept agent enrollment. `nonFatalErrors` may include useful insight into non-blocking issues with Fleet setup.","type":"object","properties":{"isInitialized":{"type":"boolean"},"nonFatalErrors":{"items":{"additionalProperties":false,"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"}},"required":["name","message"]},"type":"array"}},"required":["isInitialized","nonFatalErrors"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}},"500":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Internal Server Error","type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}},"summary":"Initiate Fleet setup","tags":["Fleet internals"]}},"/api/fleet/uninstall_tokens":{"get":{"description":"List the metadata for the latest uninstall tokens per agent policy.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"get-fleet-uninstall-tokens","parameters":[{"description":"Partial match filtering for policy IDs","in":"query","name":"policyId","required":false,"schema":{"maxLength":50,"type":"string"}},{"in":"query","name":"search","required":false,"schema":{"maxLength":50,"type":"string"}},{"description":"The number of items to return","in":"query","name":"perPage","required":false,"schema":{"minimum":5,"type":"number"}},{"in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"items":{"items":{"additionalProperties":false,"type":"object","properties":{"created_at":{"type":"string"},"id":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_name":{"nullable":true,"type":"string"}},"required":["id","policy_id","created_at"]},"type":"array"},"page":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}},"required":["items","total","page","perPage"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get metadata for latest uninstall tokens","tags":["Fleet uninstall tokens"]}},"/api/fleet/uninstall_tokens/{uninstallTokenId}":{"get":{"description":"Get one decrypted uninstall token by its ID.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: fleet-agents-all.","operationId":"get-fleet-uninstall-tokens-uninstalltokenid","parameters":[{"in":"path","name":"uninstallTokenId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"item":{"additionalProperties":false,"type":"object","properties":{"created_at":{"type":"string"},"id":{"type":"string"},"namespaces":{"items":{"type":"string"},"type":"array"},"policy_id":{"type":"string"},"policy_name":{"nullable":true,"type":"string"},"token":{"type":"string"}},"required":["id","policy_id","created_at","token"]}},"required":["item"]}}}},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Generic Error","type":"object","properties":{"attributes":{},"error":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","attributes"]}}}}},"summary":"Get a decrypted uninstall token","tags":["Fleet uninstall tokens"]}},"/api/lists":{"delete":{"description":"Delete a value list using the list ID.\n\u003e info\n\u003e When you delete a list, all of its list items are also deleted.\n","operationId":"DeleteList","parameters":[{"in":"query","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"Determines whether exception items referencing this value list should be deleted.","in":"query","name":"deleteReferences","required":false,"schema":{"default":false,"example":false,"type":"boolean"}},{"description":"Determines whether to delete value list without performing any additional checks of where this list may be utilized.","in":"query","name":"ignoreReferences","required":false,"schema":{"default":false,"example":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ipList":{"value":{"_version":"WzIsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"List of bad internet ips.","id":"21b01cfb-058d-44b9-838c-282be16c91cd","immutable":false,"name":"Bad ips","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T05:39:39.292Z","updated_by":"elastic","version":3}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: id: Required","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [DELETE /api/lists?id=ip_list] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list id: \\\"ip_list\\\" was not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete a value list","tags":["Security Lists API"]},"get":{"description":"Get the details of a value list using the list ID.","operationId":"ReadList","parameters":[{"in":"query","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzEsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"This list describes bad internet ip","id":"ip_list","immutable":false,"name":"My bad ips","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T05:21:53.843Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: id: Required","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists?id=ip_list] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get value list details","tags":["Security Lists API"]},"patch":{"description":"Update specific fields of an existing list using the list `id`.","operationId":"PatchList","requestBody":{"content":{"application/json":{"schema":{"example":{"id":"ip_list","name":"Bad ips list - UPDATED"},"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"description":{"$ref":"#/components/schemas/Security_Lists_API_ListDescription"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListMetadata"},"name":{"$ref":"#/components/schemas/Security_Lists_API_ListName"},"version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersion"}},"required":["id"]}}},"description":"Value list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzEsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"This list describes bad internet ips","id":"ip_list","immutable":false,"name":"Bad ips list - UPDATED","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T05:21:53.843Z","updated_by":"elastic","version":2}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: name: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PATCH /api/lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Patch a value list","tags":["Security Lists API"]},"post":{"description":"Create a new value list.","operationId":"CreateList","requestBody":{"content":{"application/json":{"examples":{"ip":{"value":{"description":"This list describes bad internet ips","id":"ip_list","name":"Simple list with ips","type":"ip"}},"ip_range":{"value":{"description":"This list has ip ranges","id":"ip_range_list","name":"Simple list with ip ranges","type":"ip_range"}},"keyword":{"value":{"description":"This list describes bad host names","id":"keyword_list","name":"Simple list with a keyword","type":"keyword"}},"keyword_custom_format":{"value":{"description":"This parses the first found ipv4 only","deserializer":"{{value}}","id":"keyword_custom_format_list","name":"Simple list with a keyword using a custom format","serializer":"(?\u003cvalue\u003e((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))","type":"keyword"}}},"schema":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Lists_API_ListDescription"},"deserializer":{"$ref":"#/components/schemas/Security_Lists_API_ListDeserializer"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListMetadata"},"name":{"$ref":"#/components/schemas/Security_Lists_API_ListName"},"serializer":{"$ref":"#/components/schemas/Security_Lists_API_ListSerializer"},"type":{"$ref":"#/components/schemas/Security_Lists_API_ListType"},"version":{"default":1,"minimum":1,"type":"integer"}},"required":["name","description","type"]}}},"description":"Value list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"This list describes bad internet ips","id":"ip_list","immutable":false,"name":"Simple list with ips","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T04:47:34.273Z","updated_by":"elastic","version":1}},"ip_range":{"value":{"_version":"WzAsMV0=","@timestamp":"2025-01-09T18:23:52.241Z","created_at":"2025-01-09T18:23:52.241Z","created_by":"elastic","description":"This list has ip ranges","id":"ip_range_list","immutable":false,"name":"Simple list with ip ranges","tie_breaker_id":"74aebdaf-601f-4940-b351-155728ff7003","type":"ip_range","updated_at":"2025-01-09T18:23:52.241Z","updated_by":"elastic","version":1}},"keyword":{"value":{"_version":"WzEsMV0=","@timestamp":"2025-01-09T18:24:55.786Z","created_at":"2025-01-09T18:24:55.786Z","created_by":"elastic","description":"This list describes bad host names","id":"keyword_list","immutable":false,"name":"Simple list with a keyword","tie_breaker_id":"f7e7dbaa-daf7-4c9a-a3dc-56643923ef68","type":"keyword","updated_at":"2025-01-09T18:24:55.786Z","updated_by":"elastic","version":1}},"keyword_custom_format":{"value":{"_version":"WzIsMV0=","@timestamp":"2025-01-09T18:25:39.604Z","created_at":"2025-01-09T18:25:39.604Z","created_by":"elastic","description":"This parses the first found ipv4 only","deserializer":"{{value}}","id":"keyword_custom_format_list","immutable":false,"name":"Simple list with a keyword using a custom format","serializer":"(?\u003cvalue\u003e((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))","tie_breaker_id":"8247ae63-b780-47b8-9a89-948b643e9ec2","type":"keyword","updated_at":"2025-01-09T18:25:39.604Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"To create a list, the data stream must exist first. Data stream \\\".lists-default\\\" does not exist","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"list id: \"keyword_custom_format_list\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create a value list","tags":["Security Lists API"]},"put":{"description":"Update a value list using the list `id`. The original list is replaced, and all unspecified fields are deleted.\n\u003e info\n\u003e You cannot modify the `id` value.\n","operationId":"UpdateList","requestBody":{"content":{"application/json":{"schema":{"example":{"description":"Latest list of bad ips","id":"ip_list","name":"Bad ips - updated"},"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"description":{"$ref":"#/components/schemas/Security_Lists_API_ListDescription"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListMetadata"},"name":{"$ref":"#/components/schemas/Security_Lists_API_ListName"},"version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersion"}},"required":["id","name","description"]}}},"description":"Value list's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzIsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"Latest list of bad ips","id":"ip_list","immutable":false,"name":"Bad ips - updated","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T05:39:39.292Z","updated_by":"elastic","version":3}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PUT /api/lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Update a value list","tags":["Security Lists API"]}},"/api/lists/_find":{"get":{"description":"Get a paginated subset of value lists. By default, the first page is returned, with 20 results per page.","operationId":"FindLists","parameters":[{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"example":1,"type":"integer"}},{"description":"The number of value lists to return per page.","in":"query","name":"per_page","required":false,"schema":{"example":20,"type":"integer"}},{"description":"Determines which field is used to sort the results.","in":"query","name":"sort_field","required":false,"schema":{"example":"name","format":"nonempty","minLength":1,"type":"string"}},{"description":"Determines the sort order, which can be `desc` or `asc`","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"example":"asc","type":"string"}},{"description":"Returns the lists that come after the last lists returned in the previous call (use the `cursor` value returned in the previous call). This parameter uses the `tie_breaker_id` field to ensure all lists are sorted and returned correctly.","in":"query","name":"cursor","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_FindListsCursor"}},{"description":"Filters the returned results according to the value of the specified field,\nusing the \u003cfield name\u003e:\u003cfield value\u003e syntax.\n","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_FindListsFilter"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ipList":{"value":{"cursor":"WzIwLFsiZjU1MDgxODgtYjFlOS00ZTZlLTk2NjItZDAzOWE3ZDg5ODk5Il1d","data":[{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:47:34.273Z\n","created_at":"2025-01-08T04:47:34.273Z\n","created_by":"elastic","description":"This list describes bad internet ip","id":"ip_list","immutable":false,"name":"Simple list with an ip","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T04:47:34.273Z\n","updated_by":"elastic","version":1}],"page":1,"per_page":20,"total":1}}},"schema":{"type":"object","properties":{"cursor":{"$ref":"#/components/schemas/Security_Lists_API_FindListsCursor"},"data":{"items":{"$ref":"#/components/schemas/Security_Lists_API_List"},"type":"array"},"page":{"minimum":0,"type":"integer"},"per_page":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total","cursor"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request query]: page: Expected number, received nan","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists/_find?page=1\u0026per_page=20] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get value lists","tags":["Security Lists API"]}},"/api/lists/index":{"delete":{"description":"Delete the `.lists` and `.items` data streams.","operationId":"DeleteListIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}},"required":["acknowledged"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List data stream not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete value list data streams","tags":["Security Lists API"]},"get":{"description":"Verify that `.lists` and `.items` data streams exist.","operationId":"ReadListIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"list_index":{"type":"boolean"},"list_item_index":{"type":"boolean"}},"required":["list_index","list_item_index"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List data stream(s) not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get status of value list data streams","tags":["Security Lists API"]},"post":{"description":"Create `.lists` and `.items` data streams in the relevant space.","operationId":"CreateListIndex","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean"}},"required":["acknowledged"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]\n","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"data stream: \\\".lists-default\\\" and \\\".items-default\\\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List data stream exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create list data streams","tags":["Security Lists API"]}},"/api/lists/items":{"delete":{"description":"Delete a value list item using its `id`, or its `list_id` and `value` fields.","operationId":"DeleteListItem","parameters":[{"description":"Value list item's identifier. Required if `list_id` and `value` are not specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"}},{"description":"Value list's identifier. Required if `id` is not specified.","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"The value used to evaluate exceptions. Required if `id` is not specified.","in":"query","name":"value","required":false,"schema":{"example":"255.255.255.255","type":"string"}},{"description":"Determines when changes made by the request are made visible to search.","in":"query","name":"refresh","required":false,"schema":{"default":"false","enum":["true","false","wait_for"],"example":false,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzIwLDFd","@timestamp":"2025-01-08T05:15:05.159Z","created_at":"2025-01-08T05:15:05.159Z","created_by":"elastic","id":"pd1WRJQBs4HAK3VQeHFI","list_id":"ip_list","tie_breaker_id":"eee41dc7-1666-4876-982f-8b0f7b59eca3","type":"ip","updated_at":"2025-01-08T05:44:14.009Z","updated_by":"elastic","value":"255.255.255.255"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},{"items":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},"type":"array"}]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"message":"Either \\\"list_id\\\" or \\\"id\\\" needs to be defined in the request","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [DELETE /api/lists/items?id=pd1WRJQBs4HAK3VQeHFI] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list item with id: \\\"pd1WRJQBs4HAK3VQeHFI\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Delete a value list item","tags":["Security Lists API"]},"get":{"description":"Get the details of a value list item.","operationId":"ReadListItem","parameters":[{"description":"Value list item identifier. Required if `list_id` and `value` are not specified.","in":"query","name":"id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"Value list item list's `id` identfier. Required if `id` is not specified.","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"The value used to evaluate exceptions. Required if `id` is not specified.","in":"query","name":"value","required":false,"schema":{"example":"127.0.0.2","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzExLDFd","@timestamp":"2025-01-08T05:16:25.882Z","created_at":"2025-01-08T05:16:25.882Z","created_by":"elastic","id":"qN1XRJQBs4HAK3VQs3Gc","list_id":"ip_list","tie_breaker_id":"a9a34c02-a385-436e-86a0-02a3942f3537","type":"ip","updated_at":"2025-01-08T05:16:25.882Z","updated_by":"elastic","value":"127.0.0.2"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},{"items":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},"type":"array"}]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"message":"Either \\\"list_id\\\" or \\\"id\\\" needs to be defined in the request","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists/items?id=qN1XRJQBs4HAK3VQs3Gc] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list item id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get a value list item","tags":["Security Lists API"]},"patch":{"description":"Update specific fields of an existing value list item using the item `id`.","operationId":"PatchListItem","requestBody":{"content":{"application/json":{"schema":{"example":{"id":"pd1WRJQBs4HAK3VQeHFI","value":"255.255.255.255"},"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListItemMetadata"},"refresh":{"description":"Determines when changes made by the request are made visible to search.","enum":["true","false","wait_for"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Lists_API_ListItemValue"}},"required":["id"]}}},"description":"Value list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ipItem":{"value":{"_version":"WzE5LDFd","@timestamp":"2025-01-08T05:15:05.159Z","created_at":"2025-01-08T05:15:05.159Z","created_by":"elastic","id":"pd1WRJQBs4HAK3VQeHFI","list_id":"ip_list","tie_breaker_id":"eee41dc7-1666-4876-982f-8b0f7b59eca3","type":"ip","updated_at":"2025-01-08T05:23:37.602Z","updated_by":"elastic","value":"255.255.255.255"}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"message":"{\"took\":15,\"timed_out\":false,\"total\":1,\"updated\":0,\"deleted\":0,\"batches\":1,\"version_conflicts\":0,\"noops\":0,\"retries\":{\"bulk\":0,\"search\":0},\"throttled_millis\":0,\"requests_per_second\":-1,\"throttled_until_millis\":0,\"failures\":[{\"index\":\".ds-.items-default-2025.01.09-000001\",\"id\":\"ip_item\",\"cause\":{\"type\":\"document_parsing_exception\",\"reason\":\"[1:107] failed to parse field [ip] of type [ip] in document with id ip_item. Preview of fields value: 2\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"2 is not an IP string literal.\"}},\"status\":400}]}","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PATCH /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list item id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Patch a value list item","tags":["Security Lists API"]},"post":{"description":"Create a value list item and associate it with the specified value list.\n\nAll value list items in the same list must be the same type. For example, each list item in an `ip` list must define a specific IP address.\n\u003e info\n\u003e Before creating a list item, you must create a list.\n","operationId":"CreateListItem","requestBody":{"content":{"application/json":{"examples":{"ip":{"value":{"list_id":"ip_list","value":"127.0.0.1"}},"ip_range":{"value":{"list_id":"ip_range_list","value":"192.168.0.0/16"}},"keyword":{"value":{"list_id":"keyword_list","value":"zeek"}}},"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"},"list_id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListItemMetadata"},"refresh":{"description":"Determines when changes made by the request are made visible to search.","enum":["true","false","wait_for"],"example":"wait_for","type":"string"},"value":{"$ref":"#/components/schemas/Security_Lists_API_ListItemValue"}},"required":["list_id","value"]}}},"description":"Value list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:59:06.154Z","created_at":"2025-01-08T04:59:06.154Z","created_by":"elastic","id":"21b01cfb-058d-44b9-838c-282be16c91cc","list_id":"ip_list","tie_breaker_id":"b57c762c-3036-465c-9bfb-7bfb5e6e515a","type":"ip","updated_at":"2025-01-08T04:59:06.154Z","updated_by":"elastic","value":"127.0.0.1"}},"ip_range":{"value":{"_version":"WzEsMV0=","@timestamp":"2025-01-09T18:33:08.202Z","created_at":"2025-01-09T18:33:08.202Z","created_by":"elastic","id":"ip_range_item","list_id":"ip_range_list","tie_breaker_id":"ea1b4189-efda-4637-b8f9-74655a5ebb61","type":"ip_range","updated_at":"2025-01-09T18:33:08.202Z","updated_by":"elastic","value":"192.168.0.0/16"}},"keyword":{"value":{"_version":"WzIsMV0=","@timestamp":"2025-01-09T18:34:29.422Z","created_at":"2025-01-09T18:34:29.422Z","created_by":"elastic","id":"7f24737d-1da8-4626-a568-33070591bb4e","list_id":"keyword_list","tie_breaker_id":"2108ced2-5e5d-401e-a88e-4dd69fc5fa27","type":"keyword","updated_at":"2025-01-09T18:34:29.422Z","updated_by":"elastic","value":"zeek"}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"uri [/api/lists/items] with method [post] exists but is not available with the current configuration","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"listNotFound":{"value":{"message":"list id: \\\"ip_list\\\" does not exist","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"examples":{"alreadyExists":{"value":{"message":"list item id: \\\"ip_item\\\" already exists","status_code":409}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item already exists response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Create a value list item","tags":["Security Lists API"]},"put":{"description":"Update a value list item using the list item ID. The original list item is replaced, and all unspecified fields are deleted.\n\u003e info\n\u003e You cannot modify the `id` value.\n","operationId":"UpdateListItem","requestBody":{"content":{"application/json":{"example":{"id":"ip_item","value":"255.255.255.255"},"schema":{"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListItemMetadata"},"value":{"$ref":"#/components/schemas/Security_Lists_API_ListItemValue"}},"required":["id","value"]}}},"description":"Value list item's properties","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzIwLDFd","@timestamp":"2025-01-08T05:15:05.159Z","created_at":"2025-01-08T05:15:05.159Z","created_by":"elastic","id":"pd1WRJQBs4HAK3VQeHFI","list_id":"ip_list","tie_breaker_id":"eee41dc7-1666-4876-982f-8b0f7b59eca3","type":"ip","updated_at":"2025-01-08T05:44:14.009Z","updated_by":"elastic","value":"255.255.255.255"}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request","message":"[request body]: id: Expected string, received number","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [PATCH /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"examples":{"notFound":{"value":{"message":"list item id: \\\"foo\\\" not found","status_code":404}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List item not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Update a value list item","tags":["Security Lists API"]}},"/api/lists/items/_export":{"post":{"description":"Export list item values from the specified value list.","operationId":"ExportListItems","parameters":[{"description":"Value list's `id` to export.","in":"query","name":"list_id","required":true,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}}],"responses":{"200":{"content":{"application/ndjson":{"schema":{"description":"A `.txt` file containing list items from the specified list","example":"127.0.0.1\n127.0.0.2\n127.0.0.3\n127.0.0.4\n127.0.0.5\n127.0.0.6\n127.0.0.7\n127.0.0.8\n127.0.0.9\n","format":"binary","type":"string"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request\",\"message\":\"[request query]: list_id: Required","statusCode":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/lists/items/_export?list_id=ips.txt] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List not found response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Export value list items","tags":["Security Lists API"]}},"/api/lists/items/_find":{"get":{"description":"Get all value list items in the specified list.","operationId":"FindListItems","parameters":[{"in":"query","name":"list_id","required":true,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"example":1,"type":"integer"}},{"description":"The number of list items to return per page.","in":"query","name":"per_page","required":false,"schema":{"example":20,"type":"integer"}},{"description":"Determines which field is used to sort the results.","in":"query","name":"sort_field","required":false,"schema":{"example":"value","format":"nonempty","minLength":1,"type":"string"}},{"description":"Determines the sort order, which can be `desc` or `asc`","in":"query","name":"sort_order","required":false,"schema":{"enum":["desc","asc"],"example":"asc","type":"string"}},{"in":"query","name":"cursor","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_FindListItemsCursor"}},{"description":"Filters the returned results according to the value of the specified field,\nusing the \u003cfield name\u003e:\u003cfield value\u003e syntax.\n","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_FindListItemsFilter"}}],"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"cursor":"WzIwLFsiYjU3Yzc2MmMtMzAzNi00NjVjLTliZmItN2JmYjVlNmU1MTVhIl1d","data":[{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:59:06.154Z","created_at":"2025-01-08T04:59:06.154Z","created_by":"elastic","id":"21b01cfb-058d-44b9-838c-282be16c91cc","list_id":"ip_list","tie_breaker_id":"b57c762c-3036-465c-9bfb-7bfb5e6e515a","type":"ip","updated_at":"2025-01-08T04:59:06.154Z","updated_by":"elastic","value":"127.0.0.1"}],"page":1,"per_page":20,"total":1}}},"schema":{"type":"object","properties":{"cursor":{"$ref":"#/components/schemas/Security_Lists_API_FindListItemsCursor"},"data":{"items":{"$ref":"#/components/schemas/Security_Lists_API_ListItem"},"type":"array"},"page":{"minimum":0,"type":"integer"},"per_page":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["data","page","per_page","total","cursor"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"error":"Bad Request,","message":"[request query]: list_id: Required","statusCode":"400,"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists/items/_find?list_id=ip_list\u0026page=1\u0026per_page=20] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get value list items","tags":["Security Lists API"]}},"/api/lists/items/_import":{"post":{"description":"Import value list items from a TXT or CSV file. The maximum file size is 9 million bytes.\n\nYou can import items to a new or existing list.\n","operationId":"ImportListItems","parameters":[{"description":"List's id.\n\nRequired when importing to an existing list.\n","in":"query","name":"list_id","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListId"}},{"description":"Type of the importing list.\n\nRequired when importing a new list whose list `id` is not specified.\n","examples":{"ip":{"value":"ip"}},"in":"query","name":"type","required":false,"schema":{"$ref":"#/components/schemas/Security_Lists_API_ListType"}},{"description":"Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:\n\n- `(?\u003cvalue\u003e.+)` - Single value item types, such as ip, long, date, keyword, and text.\n- `(?\u003cgte\u003e.+)-(?\u003clte\u003e.+)|(?\u003cvalue\u003e.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.\n","in":"query","name":"serializer","required":false,"schema":{"example":"(?\u003cvalue\u003e((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))","type":"string"}},{"description":"Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:\n\n- `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`.\n- `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.\n- `{{{gte}}},{{{lte}}}` - Date range values.\n","in":"query","name":"deserializer","required":false,"schema":{"example":"{{value}}","type":"string"}},{"description":"Determines when changes made by the request are made visible to search.","in":"query","name":"refresh","required":false,"schema":{"enum":["true","false","wait_for"],"example":true,"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"A `.txt` or `.csv` file containing newline separated list items.","example":"127.0.0.1\n127.0.0.2\n127.0.0.3\n127.0.0.4\n127.0.0.5\n127.0.0.6\n127.0.0.7\n127.0.0.8\n127.0.0.9\n","format":"binary","type":"string"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"ip":{"value":{"_version":"WzAsMV0=","@timestamp":"2025-01-08T04:47:34.273Z","created_at":"2025-01-08T04:47:34.273Z","created_by":"elastic","description":"This list describes bad internet ip","id":"ip_list","immutable":false,"name":"Simple list with an ip","tie_breaker_id":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"ip","updated_at":"2025-01-08T04:47:34.273Z","updated_by":"elastic","version":1}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_List"}}},"description":"Successful response"},"400":{"content":{"application/json":{"examples":{"badRequest":{"value":{"message":"Either type or list_id need to be defined in the query","status_code":400}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [POST /api/lists/items/_import?list_id=ip_list] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"List with specified list_id does not exist response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Import value list items","tags":["Security Lists API"]}},"/api/lists/privileges":{"get":{"operationId":"ReadListPrivileges","responses":{"200":{"content":{"application/json":{"examples":{"privileges":{"value":{"is_authenticated":true,"listItems":{"application":{},"cluster":{"all":true,"manage":true,"manage_api_key":true,"manage_index_templates":true,"manage_ml":true,"manage_own_api_key":true,"manage_pipeline":true,"manage_security":true,"manage_transform":true,"monitor":true,"monitor_ml":true,"monitor_transform":true},"has_all_requested":true,"index":{".items-default":{"all":true,"create":true,"create_doc":true,"create_index":true,"delete":true,"delete_index":true,"index":true,"maintenance":true,"manage":true,"monitor":true,"read":true,"view_index_metadata":true,"write":true}},"username":"elastic"},"lists":{"application":{},"cluster":{"all":true,"manage":true,"manage_api_key":true,"manage_index_templates":true,"manage_ml":true,"manage_own_api_key":true,"manage_pipeline":true,"manage_security":true,"manage_transform":true,"monitor":true,"monitor_ml":true,"monitor_transform":true},"has_all_requested":true,"index":{".lists-default":{"all":true,"create":true,"create_doc":true,"create_index":true,"delete":true,"delete_index":true,"index":true,"maintenance":true,"manage":true,"monitor":true,"read":true,"view_index_metadata":true,"write":true}},"username":"elastic"}}}},"schema":{"type":"object","properties":{"is_authenticated":{"type":"boolean"},"listItems":{"$ref":"#/components/schemas/Security_Lists_API_ListItemPrivileges"},"lists":{"$ref":"#/components/schemas/Security_Lists_API_ListPrivileges"}},"required":["lists","listItems","is_authenticated"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"},{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}]}}},"description":"Invalid input data response"},"401":{"content":{"application/json":{"examples":{"unauthorized":{"value":{"error":"Unauthorized","message":"[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]","statusCode":401}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Unsuccessful authentication response"},"403":{"content":{"application/json":{"examples":{"forbidden":{"value":{"error":"Forbidden","message":"API [GET /api/lists/privileges] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]","statusCode":403}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_PlatformErrorResponse"}}},"description":"Not enough privileges response"},"500":{"content":{"application/json":{"examples":{"serverError":{"value":{"message":"Internal Server Error","status_code":500}}},"schema":{"$ref":"#/components/schemas/Security_Lists_API_SiemErrorResponse"}}},"description":"Internal server error response"}},"summary":"Get value list privileges","tags":["Security Lists API"]}},"/api/logstash/pipeline/{id}":{"delete":{"description":"Delete a centrally-managed Logstash pipeline.\nIf your Elasticsearch cluster is protected with basic authentication, you must have either the `logstash_admin` built-in role or a customized Logstash writer role.\n","externalDocs":{"description":"Secure your connection","url":"https://www.elastic.co/docs/reference/logstash/secure-connection"},"operationId":"delete-logstash-pipeline","parameters":[{"description":"An identifier for the pipeline.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call"}},"summary":"Delete a Logstash pipeline","tags":["logstash"],"x-state":"Technical Preview"},"get":{"description":"Get information for a centrally-managed Logstash pipeline.\nTo use this API, you must have either the `logstash_admin` built-in role or a customized Logstash reader role.\n","externalDocs":{"description":"Secure your connection","url":"https://www.elastic.co/docs/reference/logstash/secure-connection"},"operationId":"get-logstash-pipeline","parameters":[{"description":"An identifier for the pipeline.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getLogstashPipelineResponseExample1":{"value":"{\n \"id\": \"hello-world\",\n \"description\": \"Just a simple pipeline\",\n \"username\": \"elastic\",\n \"pipeline\": \"input { stdin {} } output { stdout {} }\",\n \"settings\": {\n \"queue.type\": \"persistent\"\n }\n}"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Get a Logstash pipeline","tags":["logstash"],"x-state":"Technical Preview"},"put":{"description":"Create a centrally-managed Logstash pipeline or update a pipeline.\nTo use this API, you must have either the `logstash_admin` built-in role or a customized Logstash writer role.\n","externalDocs":{"description":"Secure your connection","url":"https://www.elastic.co/docs/reference/logstash/secure-connection"},"operationId":"put-logstash-pipeline","parameters":[{"description":"An identifier for the pipeline. Only alphanumeric characters, hyphens, and underscores are supported.\n","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"putLogstashPipelineRequestExample1":{"value":"{\n \"pipeline\": \"input { stdin {} } output { stdout {} }\",\n \"settings\": {\n \"queue.type\": \"persisted\"\n }\n}"}},"schema":{"type":"object","properties":{"description":{"description":"A description of the pipeline.","type":"string"},"pipeline":{"description":"A definition for the pipeline.","type":"string"},"settings":{"description":"Supported settings, represented as object keys, include the following:\n\n- `pipeline.workers`\n- `pipeline.batch.size`\n- `pipeline.batch.delay`\n- `pipeline.ecs_compatibility`\n- `pipeline.ordered`\n- `queue.type`\n- `queue.max_bytes`\n- `queue.checkpoint.writes`\n","type":"object"}},"required":["pipeline"]}}}},"responses":{"204":{"description":"Indicates a successful call"}},"summary":"Create or update a Logstash pipeline","tags":["logstash"],"x-state":"Technical Preview"}},"/api/logstash/pipelines":{"get":{"description":"Get a list of all centrally-managed Logstash pipelines.\n\nTo use this API, you must have either the `logstash_admin` built-in role or a customized Logstash reader role.\n\u003e info\n\u003e Limit the number of pipelines to 10,000 or fewer. As the number of pipelines nears and surpasses 10,000, you may see performance issues on Kibana.\n\nThe `username` property appears in the response when security is enabled and depends on when the pipeline was created or last updated.\n","externalDocs":{"description":"Secure your connection","url":"https://www.elastic.co/docs/reference/logstash/secure-connection"},"operationId":"get-logstash-pipelines","responses":{"200":{"content":{"application/json":{"examples":{"getLogstashPipelinesResponseExample1":{"value":"{\n \"pipelines\": [\n {\n \"id\": \"hello-world\",\n \"description\": \"Just a simple pipeline\",\n \"last_modified\": \"2018-04-14T12:23:29.772Z\",\n \"username\": \"elastic\" \n },\n {\n \"id\": \"sleepy-pipeline\",\n \"description\": \"\",\n \"last_modified\": \"2018-03-24T03:41:30.554Z\"\n }\n ]\n}"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Get all Logstash pipelines","tags":["logstash"],"x-state":"Technical Preview"}},"/api/maintenance_window":{"post":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"post-maintenance-window","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","minimum":1,"type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"maximum":12,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"maximum":31,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"minItems":1,"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL). Only alerts matching this query will be supressed by the maintenance window.","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"title":{"description":"The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window.","type":"string"}},"required":["title","schedule"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."}},"summary":"Create a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"}},"/api/maintenance_window/{id}":{"delete":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"delete-maintenance-window-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the maintenance window to be deleted.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."}},"summary":"Delete a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"},"get":{"description":"[Required authorization] Route required privileges: read-maintenance-window.","operationId":"get-maintenance-window-id","parameters":[{"description":"The identifier for the maintenance window.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."}},"summary":"Get maintenance window details.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"},"patch":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"patch-maintenance-window-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","minimum":1,"type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"maximum":12,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"maximum":31,"minimum":1,"type":"number"},"minItems":1,"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"minItems":1,"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL). Only alerts matching this query will be supressed by the maintenance window.","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"title":{"description":"The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window.","type":"string"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."},"409":{"description":"Indicates that the maintenance window has already been updated by another user."}},"summary":"Update a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"}},"/api/maintenance_window/{id}/_archive":{"post":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"post-maintenance-window-id-archive","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the maintenance window to be archived.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."}},"summary":"Archive a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"}},"/api/maintenance_window/{id}/_unarchive":{"post":{"description":"[Required authorization] Route required privileges: write-maintenance-window.","operationId":"post-maintenance-window-id-unarchive","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The identifier for the maintenance window to be unarchived.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"created_at":{"description":"The date and time when the maintenance window was created.","type":"string"},"created_by":{"description":"The identifier for the user that created the maintenance window.","nullable":true,"type":"string"},"enabled":{"description":"Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.","type":"boolean"},"id":{"description":"The identifier for the maintenance window.","type":"string"},"schedule":{"additionalProperties":false,"type":"object","properties":{"custom":{"additionalProperties":false,"type":"object","properties":{"duration":{"description":"The duration of the schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.","type":"string"},"recurring":{"additionalProperties":false,"type":"object","properties":{"end":{"description":"The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.","type":"string"},"every":{"description":"The interval and frequency of a recurring schedule. It allows values in `\u003cinteger\u003e\u003cunit\u003e` format. `\u003cunit\u003e` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.","type":"string"},"occurrences":{"description":"The total number of recurrences of the schedule.","type":"number"},"onMonth":{"description":"The specific months for a recurring schedule. Valid values are 1-12.","items":{"type":"number"},"type":"array"},"onMonthDay":{"description":"The specific days of the month for a recurring schedule. Valid values are 1-31.","items":{"type":"number"},"type":"array"},"onWeekDay":{"description":"The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.","items":{"type":"string"},"type":"array"}}},"start":{"description":"The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.","type":"string"},"timezone":{"description":"The timezone of the schedule. The default timezone is UTC.","type":"string"}},"required":["start","duration"]}},"required":["custom"]},"scope":{"additionalProperties":false,"type":"object","properties":{"alerting":{"additionalProperties":false,"type":"object","properties":{"query":{"additionalProperties":false,"type":"object","properties":{"kql":{"description":"A filter written in Kibana Query Language (KQL).","type":"string"}},"required":["kql"]}},"required":["query"]}},"required":["alerting"]},"status":{"description":"The current status of the maintenance window.","enum":["running","upcoming","finished","archived"],"type":"string"},"title":{"description":"The name of the maintenance window.","type":"string"},"updated_at":{"description":"The date and time when the maintenance window was last updated.","type":"string"},"updated_by":{"description":"The identifier for the user that last updated this maintenance window.","nullable":true,"type":"string"}},"required":["id","title","enabled","created_by","updated_by","created_at","updated_at","status","schedule"]}}},"description":"Indicates a successful call."},"400":{"description":"Indicates an invalid schema or parameters."},"403":{"description":"Indicates that this call is forbidden."},"404":{"description":"Indicates a maintenance window with the given ID does not exist."}},"summary":"Unarchive a maintenance window.","tags":["maintenance-window"],"x-state":"Generally available; added in 9.1.0"}},"/api/ml/saved_objects/sync":{"get":{"description":"Synchronizes Kibana saved objects for machine learning jobs and trained models in the default space. You must have `all` privileges for the **Machine Learning** feature in the **Analytics** section of the Kibana feature privileges. This API runs automatically when you start Kibana and periodically thereafter.\n","operationId":"mlSync","parameters":[{"$ref":"#/components/parameters/Machine_learning_APIs_simulateParam"}],"responses":{"200":{"content":{"application/json":{"examples":{"syncExample":{"$ref":"#/components/examples/Machine_learning_APIs_mlSyncExample"}},"schema":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSync200Response"}}},"description":"Indicates a successful call"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSync4xxResponse"}}},"description":"Authorization information is missing or invalid."}},"summary":"Sync saved objects in the default space","tags":["ml"]}},"/api/note":{"delete":{"description":"Delete a note from a Timeline using the note ID.","operationId":"DeleteNote","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"nullable":true,"type":"object","properties":{"noteId":{"type":"string"}},"required":["noteId"]},{"nullable":true,"type":"object","properties":{"noteIds":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["noteIds"]}]}}},"description":"The ID of the note to delete.","required":true},"responses":{"200":{"description":"Indicates the note was successfully deleted."}},"summary":"Delete a note","tags":["Security Timeline API"]},"get":{"description":"Get all notes for a given document.","operationId":"GetNotes","parameters":[{"in":"query","name":"documentIds","schema":{"$ref":"#/components/schemas/Security_Timeline_API_DocumentIds"}},{"in":"query","name":"savedObjectIds","schema":{"$ref":"#/components/schemas/Security_Timeline_API_SavedObjectIds"}},{"in":"query","name":"page","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"perPage","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"search","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"sortField","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"sortOrder","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"filter","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"createdByFilter","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"associatedFilter","schema":{"$ref":"#/components/schemas/Security_Timeline_API_AssociatedFilterType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_GetNotesResult"}}},"description":"Indicates the requested notes were returned."}},"summary":"Get notes","tags":["Security Timeline API"]},"patch":{"description":"Add a note to a Timeline or update an existing note.","operationId":"PersistNoteRoute","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"$ref":"#/components/schemas/Security_Timeline_API_BareNote","description":"The note to add or update."},"noteId":{"description":"The `savedObjectId` of the note","example":"709f99c6-89b6-4953-9160-35945c8e174e","nullable":true,"type":"string"},"version":{"description":"The version of the note","example":"WzQ2LDFd","nullable":true,"type":"string"}},"required":["note"]}}},"description":"The note to add or update, along with additional metadata.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_ResponseNote"}}},"description":"Indicates the note was successfully created."}},"summary":"Add or update a note","tags":["Security Timeline API"]}},"/api/osquery/live_queries":{"get":{"description":"Get a list of all live queries.","operationId":"OsqueryFindLiveQueries","parameters":[{"in":"query","name":"kuery","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_KueryOrUndefined"}},{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageOrUndefined"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageSizeOrUndefined"}},{"in":"query","name":"sort","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrUndefined"}},{"in":"query","name":"sortOrder","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrderOrUndefined"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindLiveQueryResponse"}}},"description":"OK"}},"summary":"Get live queries","tags":["Security Osquery API"]},"post":{"description":"Create and run a live query.","operationId":"OsqueryCreateLiveQuery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreateLiveQueryRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreateLiveQueryResponse"}}},"description":"OK"}},"summary":"Create a live query","tags":["Security Osquery API"]}},"/api/osquery/live_queries/{id}":{"get":{"description":"Get the details of a live query using the query ID.","operationId":"OsqueryGetLiveQueryDetails","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"The ID of the live query result you want to retrieve.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindLiveQueryDetailsResponse"}}},"description":"OK"}},"summary":"Get live query details","tags":["Security Osquery API"]}},"/api/osquery/live_queries/{id}/results/{actionId}":{"get":{"description":"Get the results of a live query using the query action ID.","operationId":"OsqueryGetLiveQueryResults","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"The ID of the live query result you want to retrieve.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"}},{"in":"path","name":"actionId","required":true,"schema":{"description":"The ID of the query action that generated the live query results.","example":"609c4c66-ba3d-43fa-afdd-53e244577aa0","type":"string"}},{"in":"query","name":"kuery","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_KueryOrUndefined"}},{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageOrUndefined"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageSizeOrUndefined"}},{"in":"query","name":"sort","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrUndefined"}},{"in":"query","name":"sortOrder","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrderOrUndefined"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_GetLiveQueryResultsResponse"}}},"description":"OK"}},"summary":"Get live query results","tags":["Security Osquery API"]}},"/api/osquery/packs":{"get":{"description":"Get a list of all query packs.","operationId":"OsqueryFindPacks","parameters":[{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageOrUndefined"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageSizeOrUndefined"}},{"in":"query","name":"sort","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrUndefined"}},{"in":"query","name":"sortOrder","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrderOrUndefined"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindPacksResponse"}}},"description":"OK"}},"summary":"Get packs","tags":["Security Osquery API"]},"post":{"description":"Create a query pack.","operationId":"OsqueryCreatePacks","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreatePacksRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreatePacksResponse"}}},"description":"OK"}},"summary":"Create a pack","tags":["Security Osquery API"]}},"/api/osquery/packs/{id}":{"delete":{"description":"Delete a query pack using the pack ID.","operationId":"OsqueryDeletePacks","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PackId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{},"type":"object","properties":{}}}},"description":"OK"}},"summary":"Delete a pack","tags":["Security Osquery API"]},"get":{"description":"Get the details of a query pack using the pack ID.","operationId":"OsqueryGetPacksDetails","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PackId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindPackResponse"}}},"description":"OK"}},"summary":"Get pack details","tags":["Security Osquery API"]},"put":{"description":"Update a query pack using the pack ID.\n\u003e info\n\u003e You cannot update a prebuilt pack.\n","operationId":"OsqueryUpdatePacks","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PackId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_UpdatePacksRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_UpdatePacksResponse"}}},"description":"OK"}},"summary":"Update a pack","tags":["Security Osquery API"]}},"/api/osquery/saved_queries":{"get":{"description":"Get a list of all saved queries.","operationId":"OsqueryFindSavedQueries","parameters":[{"in":"query","name":"page","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageOrUndefined"}},{"in":"query","name":"pageSize","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_PageSizeOrUndefined"}},{"in":"query","name":"sort","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrUndefined"}},{"in":"query","name":"sortOrder","required":false,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SortOrderOrUndefined"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindSavedQueryResponse"}}},"description":"OK"}},"summary":"Get saved queries","tags":["Security Osquery API"]},"post":{"description":"Create and run a saved query.","operationId":"OsqueryCreateSavedQuery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreateSavedQueryRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_CreateSavedQueryResponse"}}},"description":"OK"}},"summary":"Create a saved query","tags":["Security Osquery API"]}},"/api/osquery/saved_queries/{id}":{"delete":{"description":"Delete a saved query using the query ID.","operationId":"OsqueryDeleteSavedQuery","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_DefaultSuccessResponse"}}},"description":"OK"}},"summary":"Delete a saved query","tags":["Security Osquery API"]},"get":{"description":"Get the details of a saved query using the query ID.","operationId":"OsqueryGetSavedQueryDetails","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_FindSavedQueryDetailResponse"}}},"description":"OK"}},"summary":"Get saved query details","tags":["Security Osquery API"]},"put":{"description":"Update a saved query using the query ID.\n\u003e info\n\u003e You cannot update a prebuilt saved query.\n","operationId":"OsqueryUpdateSavedQuery","parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_UpdateSavedQueryRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Osquery_API_UpdateSavedQueryResponse"}}},"description":"OK"}},"summary":"Update a saved query","tags":["Security Osquery API"]}},"/api/pinned_event":{"patch":{"description":"Pin/unpin an event to/from an existing Timeline.","operationId":"PersistPinnedEventRoute","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"description":"The `_id` of the associated event for this pinned event.","example":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bc","type":"string"},"pinnedEventId":{"description":"The `savedObjectId` of the pinned event you want to unpin.","example":"10r1929b-0af7-42bd-85a8-56e234f98h2f3","nullable":true,"type":"string"},"timelineId":{"description":"The `savedObjectId` of the timeline that you want this pinned event unpinned from.","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","type":"string"}},"required":["eventId","timelineId"]}}},"description":"The pinned event to add or unpin, along with additional metadata.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistPinnedEventResponse"}}},"description":"Indicates the event was successfully pinned to or unpinned from the Timeline."}},"summary":"Pin/unpin an event","tags":["Security Timeline API"]}},"/api/risk_score/engine/dangerously_delete_data":{"delete":{"description":"Cleaning up the the Risk Engine by removing the indices, mapping and transforms","operationId":"CleanUpRiskEngine","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"cleanup_successful":{"type":"boolean"}}}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_TaskManagerUnavailableResponse"}}},"description":"Task manager is unavailable"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_CleanUpRiskEngineErrorResponse"}}},"description":"Unexpected error"}},"summary":"Cleanup the Risk Engine","tags":["Security Entity Analytics API"]}},"/api/risk_score/engine/saved_object/configure":{"patch":{"description":"Configuring the Risk Engine Saved Object","operationId":"ConfigureRiskEngineSavedObject","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"exclude_alert_statuses":{"items":{"type":"string"},"type":"array"},"exclude_alert_tags":{"items":{"type":"string"},"type":"array"},"range":{"type":"object","properties":{"end":{"type":"string"},"start":{"type":"string"}}}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"risk_engine_saved_object_configured":{"type":"boolean"}}}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_TaskManagerUnavailableResponse"}}},"description":"Task manager is unavailable"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_ConfigureRiskEngineSavedObjectErrorResponse"}}},"description":"Unexpected error"}},"summary":"Configure the Risk Engine Saved Object","tags":["Security Entity Analytics API"]}},"/api/risk_score/engine/schedule_now":{"post":{"description":"Schedule the risk scoring engine to run as soon as possible. You can use this to recalculate entity risk scores after updating their asset criticality.","operationId":"ScheduleRiskEngineNow","requestBody":{"content":{"application/json":{}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_RiskEngineScheduleNowResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_TaskManagerUnavailableResponse"}}},"description":"Task manager is unavailable"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_RiskEngineScheduleNowErrorResponse"}}},"description":"Unexpected error"}},"summary":"Run the risk scoring engine","tags":["Security Entity Analytics API"]}},"/api/saved_objects/_bulk_create":{"post":{"deprecated":true,"operationId":"bulkCreateSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"description":"When true, overwrites the document with the same identifier.","in":"query","name":"overwrite","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Create saved objects","tags":["saved objects"]}},"/api/saved_objects/_bulk_delete":{"post":{"deprecated":true,"description":"WARNING: When you delete a saved object, it cannot be recovered.\n","operationId":"bulkDeleteSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"description":"When true, force delete objects that exist in multiple namespaces. Note that the option applies to the whole request. Use the delete object API to specify per-object deletion behavior. TIP: Use this if you attempted to delete objects and received an HTTP 400 error with the following message: \"Unable to delete saved object that exists in multiple namespaces, use the force option to delete it anyway\". WARNING: When you bulk delete objects that exist in multiple namespaces, the API also deletes legacy url aliases that reference the object. These requests are batched to minimise the impact but they can place a heavy load on Kibana. Make sure you limit the number of objects that exist in multiple namespaces in a single bulk delete operation.\n","in":"query","name":"force","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call. NOTE: This HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual objects will be returned in the response body.\n"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Delete saved objects","tags":["saved objects"]}},"/api/saved_objects/_bulk_get":{"post":{"deprecated":true,"operationId":"bulkGetSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Get saved objects","tags":["saved objects"]}},"/api/saved_objects/_bulk_resolve":{"post":{"deprecated":true,"description":"Retrieve multiple Kibana saved objects by identifier using any legacy URL aliases if they exist. Under certain circumstances when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved by the bulk resolve API using either its new ID or its old ID.\n","operationId":"bulkResolveSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call. NOTE: This HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual objects will be returned in the response body. \n"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Resolve saved objects","tags":["saved objects"]}},"/api/saved_objects/_bulk_update":{"post":{"deprecated":true,"description":"Update the attributes for multiple Kibana saved objects.","operationId":"bulkUpdateSavedObjects","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call. NOTE: This HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual objects will be returned in the response body. \n"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Update saved objects","tags":["saved objects"]}},"/api/saved_objects/_export":{"post":{"description":"Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body.\n\nExported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.","operationId":"post-saved-objects-export","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"exportSavedObjectsRequest":{"summary":"Export a specific saved object.","value":{"excludeExportDetails":true,"includeReferencesDeep":false,"objects":[{"id":"de71f4f0-1902-11e9-919b-ffe5949a18d2","type":"map"}]}}},"schema":{"additionalProperties":false,"type":"object","properties":{"excludeExportDetails":{"default":false,"description":"Do not add export details entry at the end of the stream.","type":"boolean"},"hasReference":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},"type":"array"}]},"includeReferencesDeep":{"default":false,"description":"Includes all of the referenced objects in the exported objects.","type":"boolean"},"objects":{"description":"A list of objects to export. NOTE: this optiona cannot be combined with `types` option","items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},"maxItems":10000,"type":"array"},"search":{"description":"Search for documents to export using the Elasticsearch Simple Query String syntax.","type":"string"},"type":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"The saved object types to include in the export. Use `*` to export all the types."}}}}}},"responses":{"200":{"content":{"application/x-ndjson":{"examples":{"exportSavedObjectsResponse":{"summary":"The export objects API response contains a JSON record for each exported object.","value":{"attributes":{"description":"","layerListJSON":"[{\"id\":\"0hmz5\",\"alpha\":1,\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"isAutoSelect\":true,\"lightModeDefault\":\"road_map_desaturated\"},\"visible\":true,\"style\":{},\"type\":\"EMS_VECTOR_TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"edh66\",\"label\":\"Total Requests by Destination\",\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.5,\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"world_countries\",\"tooltipProperties\":[\"name\",\"iso2\"]},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"__kbnjoin__count__673ff994-fc75-4c67-909b-69fcb0e1060e\",\"origin\":\"join\"},\"color\":\"Greys\",\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\",\"joins\":[{\"leftField\":\"iso2\",\"right\":{\"type\":\"ES_TERM_SOURCE\",\"id\":\"673ff994-fc75-4c67-909b-69fcb0e1060e\",\"indexPatternTitle\":\"kibana_sample_data_logs\",\"term\":\"geo.dest\",\"indexPatternRefName\":\"layer_1_join_0_index_pattern\",\"metrics\":[{\"type\":\"count\",\"label\":\"web logs count\"}],\"applyGlobalQuery\":true}}]},{\"id\":\"gaxya\",\"label\":\"Actual Requests\",\"minZoom\":9,\"maxZoom\":24,\"alpha\":1,\"sourceDescriptor\":{\"id\":\"b7486535-171b-4d3b-bb2e-33c1a0a2854c\",\"type\":\"ES_SEARCH\",\"geoField\":\"geo.coordinates\",\"limit\":2048,\"filterByMapBounds\":true,\"tooltipProperties\":[\"clientip\",\"timestamp\",\"host\",\"request\",\"response\",\"machine.os\",\"agent\",\"bytes\"],\"indexPatternRefName\":\"layer_2_source_index_pattern\",\"applyGlobalQuery\":true,\"scalingType\":\"LIMIT\"},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#2200ff\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":2}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"bytes\",\"origin\":\"source\"},\"minSize\":1,\"maxSize\":23,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\"},{\"id\":\"tfi3f\",\"label\":\"Total Requests and Bytes\",\"minZoom\":0,\"maxZoom\":9,\"alpha\":1,\"sourceDescriptor\":{\"type\":\"ES_GEO_GRID\",\"resolution\":\"COARSE\",\"id\":\"8aaa65b5-a4e9-448b-9560-c98cb1c5ac5b\",\"geoField\":\"geo.coordinates\",\"requestType\":\"point\",\"metrics\":[{\"type\":\"count\",\"label\":\"web logs count\"},{\"type\":\"sum\",\"field\":\"bytes\"}],\"indexPatternRefName\":\"layer_3_source_index_pattern\",\"applyGlobalQuery\":true},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"color\":\"Blues\",\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#cccccc\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"sum_of_bytes\",\"origin\":\"source\"},\"minSize\":7,\"maxSize\":25,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"labelText\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"labelSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"minSize\":12,\"maxSize\":24,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\"}]","mapStateJSON":"{\"zoom\":3.64,\"center\":{\"lon\":-88.92107,\"lat\":42.16337},\"timeFilters\":{\"from\":\"now-7d\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":true,\"interval\":0},\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"settings\":{\"autoFitToDataBounds\":false}}","title":"[Logs] Total Requests and Bytes","uiStateJSON":"{\"isDarkMode\":false}"},"coreMigrationVersion":"8.8.0","created_at":"2023-08-23T20:03:32.204Z","id":"de71f4f0-1902-11e9-919b-ffe5949a18d2","managed":false,"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"layer_1_join_0_index_pattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"layer_2_source_index_pattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"layer_3_source_index_pattern","type":"index-pattern"}],"type":"map","typeMigrationVersion":"8.4.0","updated_at":"2023-08-23T20:03:32.204Z","version":"WzEzLDFd"}}},"schema":{}}},"description":"Indicates a successfull call."},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Indicates an unsuccessful response.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"enum":[400],"type":"integer"}},"required":["error","message","statusCode"]}}},"description":"Bad request."}},"summary":"Export saved objects","tags":["saved objects"]}},"/api/saved_objects/_find":{"get":{"deprecated":true,"description":"Retrieve a paginated set of Kibana saved objects.","operationId":"findSavedObjects","parameters":[{"description":"An aggregation structure, serialized as a string. The field format is similar to filter, meaning that to use a saved object type attribute in the aggregation, the `savedObjectType.attributes.title: \"myTitle\"` format must be used. For root fields, the syntax is `savedObjectType.rootField`. NOTE: As objects change in Kibana, the results on each page of the response also change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data.\n","in":"query","name":"aggs","schema":{"type":"string"}},{"description":"The default operator to use for the `simple_query_string`.","in":"query","name":"default_search_operator","schema":{"type":"string"}},{"description":"The fields to return in the attributes key of the response.","in":"query","name":"fields","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"The filter is a KQL string with the caveat that if you filter with an attribute from your saved object type, it should look like that: `savedObjectType.attributes.title: \"myTitle\"`. However, if you use a root attribute of a saved object such as `updated_at`, you will have to define your filter like that: `savedObjectType.updated_at \u003e 2018-12-22`.\n","in":"query","name":"filter","schema":{"type":"string"}},{"description":"Filters to objects that do not have a relationship with the type and identifier combination.","in":"query","name":"has_no_reference","schema":{"type":"object"}},{"description":"The operator to use for the `has_no_reference` parameter. Either `OR` or `AND`. Defaults to `OR`.","in":"query","name":"has_no_reference_operator","schema":{"type":"string"}},{"description":"Filters to objects that have a relationship with the type and ID combination.","in":"query","name":"has_reference","schema":{"type":"object"}},{"description":"The operator to use for the `has_reference` parameter. Either `OR` or `AND`. Defaults to `OR`.","in":"query","name":"has_reference_operator","schema":{"type":"string"}},{"description":"The page of objects to return.","in":"query","name":"page","schema":{"type":"integer"}},{"description":"The number of objects to return per page.","in":"query","name":"per_page","schema":{"type":"integer"}},{"description":"An Elasticsearch `simple_query_string` query that filters the objects in the response.","in":"query","name":"search","schema":{"type":"string"}},{"description":"The fields to perform the `simple_query_string` parsed query against.","in":"query","name":"search_fields","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"Sorts the response. Includes \"root\" and \"type\" fields. \"root\" fields exist for all saved objects, such as \"updated_at\". \"type\" fields are specific to an object type, such as fields returned in the attributes key of the response. When a single type is defined in the type parameter, the \"root\" and \"type\" fields are allowed, and validity checks are made in that order. When multiple types are defined in the type parameter, only \"root\" fields are allowed.\n","in":"query","name":"sort_field","schema":{"type":"string"}},{"description":"The saved object types to include.","in":"query","name":"type","required":true,"schema":{"oneOf":[{"type":"string"},{"type":"array"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request"}},"summary":"Search for saved objects","tags":["saved objects"]}},"/api/saved_objects/_import":{"post":{"description":"Create sets of Kibana saved objects from a file created by the export API. Saved objects can only be imported into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.","operationId":"post-saved-objects-import","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the `createNewCopies` option.","in":"query","name":"overwrite","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options.","in":"query","name":"createNewCopies","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the `createNewCopies` option.","in":"query","name":"compatibilityMode","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"examples":{"importObjectsRequest":{"value":{"file":"file.ndjson"}}},"schema":{"additionalProperties":false,"type":"object","properties":{"file":{"description":"A file exported using the export API. Changing the contents of the exported file in any way before importing it can cause errors, crashes or data loss. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be included in this file. Similarly, the `savedObjects.maxImportPayloadBytes` setting limits the overall size of the file that can be imported.","type":"object"}},"required":["file"]}}}},"responses":{"200":{"content":{"application/json":{"examples":{"importObjectsResponse":{"summary":"The import objects API response indicates a successful import and the objects are created. Since these objects are created as new copies, each entry in the successResults array includes a destinationId attribute.","value":{"success":true,"successCount":1,"successResults":[{"destinationId":"82d2760c-468f-49cf-83aa-b9a35b6a8943","id":"90943e30-9a47-11e8-b64d-95841ca0b247","managed":false,"meta":{"icon":"indexPatternApp","title":"Kibana Sample Data Logs"},"type":"index-pattern"}]}}},"schema":{"additionalProperties":false,"type":"object","properties":{"errors":{"description":"Indicates the import was unsuccessful and specifies the objects that failed to import.\n\nNOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error.","items":{"additionalProperties":true,"type":"object","properties":{}},"type":"array"},"success":{"description":"Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties.","type":"boolean"},"successCount":{"description":"Indicates the number of successfully imported records.","type":"number"},"successResults":{"description":"Indicates the objects that are successfully imported, with any metadata if applicable.\n\nNOTE: Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the `successResults` array includes a `destinationId` attribute.","items":{"additionalProperties":true,"type":"object","properties":{}},"type":"array"}},"required":["success","successCount","errors","successResults"]}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Indicates an unsuccessful response.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"enum":[400],"type":"integer"}},"required":["error","message","statusCode"]}}},"description":"Bad request."}},"summary":"Import saved objects","tags":["saved objects"],"x-codeSamples":[{"label":"Import with createNewCopies","lang":"cURL","source":"curl \\\n -X POST api/saved_objects/_import?createNewCopies=true\n -H \"kbn-xsrf: true\"\n --form file=@file.ndjson\n"}]}},"/api/saved_objects/_resolve_import_errors":{"post":{"description":"To resolve errors from the Import objects API, you can:\n\n* Retry certain saved objects\n* Overwrite specific saved objects\n* Change references to different saved objects\n","operationId":"resolveImportErrors","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"description":"Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. When enabled during the initial import, also enable when resolving import errors. This option cannot be used with the `createNewCopies` option.\n","in":"query","name":"compatibilityMode","required":false,"schema":{"type":"boolean"}},{"description":"Creates copies of the saved objects, regenerates each object ID, and resets the origin. When enabled during the initial import, also enable when resolving import errors.\n","in":"query","name":"createNewCopies","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"examples":{"resolveImportErrorsRequest":{"$ref":"#/components/examples/Saved_objects_resolve_missing_reference_request"}},"schema":{"type":"object","properties":{"file":{"description":"The same file given to the import API.","format":"binary","type":"string"},"retries":{"description":"The retry operations, which can specify how to resolve different types of errors.","items":{"type":"object","properties":{"destinationId":{"description":"Specifies the destination ID that the imported object should have, if different from the current ID.","type":"string"},"id":{"description":"The saved object ID.","type":"string"},"ignoreMissingReferences":{"description":"When set to `true`, ignores missing reference errors. When set to `false`, does nothing.","type":"boolean"},"overwrite":{"description":"When set to `true`, the source object overwrites the conflicting destination object. When set to `false`, does nothing.","type":"boolean"},"replaceReferences":{"description":"A list of `type`, `from`, and `to` used to change the object references.","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"type":{"type":"string"}}},"type":"array"},"type":{"description":"The saved object type.","type":"string"}},"required":["type","id"]},"type":"array"}},"required":["retries"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"resolveImportErrorsResponse":{"$ref":"#/components/examples/Saved_objects_resolve_missing_reference_response"}},"schema":{"type":"object","properties":{"errors":{"description":"Specifies the objects that failed to resolve.\n\nNOTE: One object can result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and a `conflict` error.\n","items":{"type":"object"},"type":"array"},"success":{"description":"Indicates a successful import. When set to `false`, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties.\n","type":"boolean"},"successCount":{"description":"Indicates the number of successfully resolved records.\n","type":"number"},"successResults":{"description":"Indicates the objects that are successfully imported, with any metadata if applicable.\n\nNOTE: Objects are only created when all resolvable errors are addressed, including conflict and missing references.\n","items":{"type":"object"},"type":"array"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request."}},"summary":"Resolve import errors","tags":["saved objects"]}},"/api/saved_objects/{type}":{"post":{"deprecated":true,"description":"Create a Kibana saved object with a randomly generated identifier.","operationId":"createSavedObject","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"},{"description":"If true, overwrites the document with the same identifier.","in":"query","name":"overwrite","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"$ref":"#/components/schemas/Saved_objects_attributes"},"initialNamespaces":{"$ref":"#/components/schemas/Saved_objects_initial_namespaces"},"references":{"$ref":"#/components/schemas/Saved_objects_references"}},"required":["attributes"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"409":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a conflict error."}},"summary":"Create a saved object","tags":["saved objects"]}},"/api/saved_objects/{type}/{id}":{"get":{"deprecated":true,"description":"Retrieve a single Kibana saved object by identifier.","operationId":"getSavedObject","parameters":[{"$ref":"#/components/parameters/Saved_objects_saved_object_id"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request."}},"summary":"Get a saved object","tags":["saved objects"]},"post":{"deprecated":true,"description":"Create a Kibana saved object and specify its identifier instead of using a randomly generated ID.","operationId":"createSavedObjectId","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"$ref":"#/components/parameters/Saved_objects_saved_object_id"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"},{"description":"If true, overwrites the document with the same identifier.","in":"query","name":"overwrite","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"$ref":"#/components/schemas/Saved_objects_attributes"},"initialNamespaces":{"$ref":"#/components/schemas/Saved_objects_initial_namespaces"},"references":{"$ref":"#/components/schemas/Saved_objects_initial_namespaces"}},"required":["attributes"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"409":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a conflict error."}},"summary":"Create a saved object","tags":["saved objects"]},"put":{"deprecated":true,"description":"Update the attributes for Kibana saved objects.","operationId":"updateSavedObject","parameters":[{"$ref":"#/components/parameters/Saved_objects_kbn_xsrf"},{"$ref":"#/components/parameters/Saved_objects_saved_object_id"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"404":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates the object was not found."},"409":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a conflict error."}},"summary":"Update a saved object","tags":["saved objects"]}},"/api/saved_objects/resolve/{type}/{id}":{"get":{"deprecated":true,"description":"Retrieve a single Kibana saved object by identifier using any legacy URL alias if it exists. Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved using either its new ID or its old ID.\n","operationId":"resolveSavedObject","parameters":[{"$ref":"#/components/parameters/Saved_objects_saved_object_id"},{"$ref":"#/components/parameters/Saved_objects_saved_object_type"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saved_objects_400_response"}}},"description":"Bad request."}},"summary":"Resolve a saved object","tags":["saved objects"]}},"/api/security_ai_assistant/anonymization_fields/_bulk_action":{"post":{"description":"Apply a bulk action to multiple anonymization fields. The bulk action is applied to all anonymization fields that match the filter or to the list of anonymization fields by their IDs.","operationId":"PerformAnonymizationFieldsBulkAction","requestBody":{"content":{"application/json":{"schema":{"example":{"create":[{"allowed":true,"anonymized":false,"field":"host.name"},{"allowed":false,"anonymized":true,"field":"user.name"}],"delete":{"ids":["field5","field6"],"query":"field: host.name"},"update":[{"allowed":true,"anonymized":false,"id":"field8"},{"allowed":false,"anonymized":true,"id":"field9"}]},"type":"object","properties":{"create":{"description":"Array of anonymization fields to create.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldCreateProps"},"type":"array"},"delete":{"description":"Object containing the query to filter anonymization fields and/or an array of anonymization field IDs to delete.","type":"object","properties":{"ids":{"description":"Array of IDs to apply the action to.","example":["1234","5678"],"items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter the bulk action.","example":"status: 'inactive'","type":"string"}}},"update":{"description":"Array of anonymization fields to update.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldUpdateProps"},"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"example":{"anonymization_fields_count":5,"attributes":{"results":{"created":[{"allowed":false,"anonymized":true,"createdAt":"2023-10-31T12:00:00Z","createdBy":"user1","field":"host.name","id":"field2","namespace":"default","timestamp":"2023-10-31T12:00:00Z","updatedAt":"2023-10-31T12:00:00Z","updatedBy":"user1"}],"deleted":["field3"],"skipped":[{"id":"field4","name":"user.name","skip_reason":"ANONYMIZATION_FIELD_NOT_MODIFIED"}],"updated":[{"allowed":true,"anonymized":false,"createdAt":"2023-10-31T12:00:00Z","createdBy":"user1","field":"url.domain","id":"field8","namespace":"default","timestamp":"2023-10-31T12:00:00Z","updatedAt":"2023-10-31T12:00:00Z","updatedBy":"user1"}]},"summary":{"failed":1,"skipped":1,"succeeded":2,"total":5}},"message":"Bulk action completed successfully","status_code":200,"success":true},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResponse"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"example":{"error":"Bad Request","message":"Invalid request body","statusCode":400},"schema":{"type":"object","properties":{"error":{"description":"Error type or name.","type":"string"},"message":{"description":"Detailed error message.","type":"string"},"statusCode":{"description":"Status code of the response.","type":"number"}}}}},"description":"Generic Error"}},"summary":"Apply a bulk action to anonymization fields","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/anonymization_fields/_find":{"get":{"description":"Get a list of all anonymization fields.","operationId":"FindAnonymizationFields","parameters":[{"description":"Fields to return","example":["id","field","anonymized","allowed"],"in":"query","name":"fields","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"Search query","example":"field: \"user.name\"","in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"description":"Field to sort by","example":"created_at","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_FindAnonymizationFieldsSortField"}},{"description":"Sort order","example":"asc","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_SortOrder"}},{"description":"Page number","example":1,"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"AnonymizationFields per page","example":20,"in":"query","name":"per_page","required":false,"schema":{"default":20,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"allowed":true,"anonymized":true,"createdAt":"2023-10-31T12:00:00Z","createdBy":"user1","field":"user.name","id":"1","namespace":"default","timestamp":"2023-10-31T12:00:00Z","updatedAt":"2023-10-31T12:00:00Z","updatedBy":"user1"}],"page":1,"perPage":20,"total":100},"schema":{"type":"object","properties":{"data":{"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse"},"type":"array"},"page":{"type":"integer"},"perPage":{"type":"integer"},"total":{"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"error":"Bad Request","message":"Invalid request parameters","statusCode":400},"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Generic Error"}},"summary":"Get anonymization fields","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/chat/complete":{"post":{"description":"Create a model response for the given chat conversation.","operationId":"ChatComplete","parameters":[{"description":"If true, the response will not include content references.","example":false,"in":"query","name":"content_references_disabled","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/json":{"example":{"connectorId":"conn-001","conversationId":"abc123","isStream":true,"langSmithApiKey":"sk-abc123","langSmithProject":"security_ai_project","messages":[{"content":"What are some common phishing techniques?","data":{"user_id":"user_789"},"fields_to_anonymize":["user.name","source.ip"],"role":"user"}],"model":"gpt-4","persist":true,"promptId":"prompt_456","responseLanguage":"en"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ChatCompleteProps"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Indicates a successful model response call."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error type.","example":"Bad Request","type":"string"},"message":{"description":"Human-readable error message.","example":"Invalid request payload.","type":"string"},"statusCode":{"description":"HTTP status code.","example":400,"type":"number"}}}}},"description":"Generic Error"}},"summary":"Create a model response","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/current_user/conversations":{"post":{"description":"Create a new Security AI Assistant conversation. This endpoint allows the user to initiate a conversation with the Security AI Assistant by providing the required parameters.","operationId":"CreateConversation","requestBody":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"67890","connectorId":"12345"},"category":"assistant","excludeFromLastConversationStorage":false,"messages":[{"content":"Hello, how can I assist you today?","role":"system","timestamp":"2023-10-31T12:00:00Z"}],"replacements":{},"title":"Security Discussion"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationCreateProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"67890","connectorId":"12345"},"category":"assistant","createdAt":"2023-10-31T12:01:00Z","excludeFromLastConversationStorage":false,"id":"abc123","messages":[{"content":"Hello, how can I assist you today?","role":"system","timestamp":"2023-10-31T12:00:00Z"}],"replacements":{},"title":"Security Discussion","updatedAt":"2023-10-31T12:01:00Z","users":[{"id":"user1","name":"John Doe"}]},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"}}},"description":"Indicates a successful call. The conversation was created successfully."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Missing required parameter: title","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. This response indicates an issue with the request, such as missing required parameters or incorrect data."}},"summary":"Create a conversation","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/current_user/conversations/_find":{"get":{"description":"Get a list of all conversations for the current user. This endpoint allows users to search, filter, sort, and paginate through their conversations.","operationId":"FindConversations","parameters":[{"description":"A list of fields to include in the response. If omitted, all fields are returned.","in":"query","name":"fields","required":false,"schema":{"example":["id","title","createdAt"],"items":{"type":"string"},"type":"array"}},{"description":"A search query to filter the conversations. Can match against titles, messages, or other conversation attributes.","in":"query","name":"filter","required":false,"schema":{"example":"Security Issue","type":"string"}},{"description":"The field by which to sort the results. Valid fields are `created_at`, `title`, and `updated_at`.","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_FindConversationsSortField","example":"created_at"}},{"description":"The order in which to sort the results. Can be either `asc` for ascending or `desc` for descending.","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_SortOrder","example":"desc"}},{"description":"The page number of the results to retrieve. Default is 1.","in":"query","name":"page","required":false,"schema":{"default":1,"example":1,"minimum":1,"type":"integer"}},{"description":"The number of conversations to return per page. Default is 20.","in":"query","name":"per_page","required":false,"schema":{"default":20,"example":20,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"A list of conversations.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"},"type":"array"},"page":{"description":"The current page of the results.","example":1,"type":"integer"},"perPage":{"description":"The number of results returned per page.","example":20,"type":"integer"},"total":{"description":"The total number of conversations matching the filter criteria.","example":100,"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response, returns a paginated list of conversations matching the specified criteria."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Invalid filter query parameter","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. The request could not be processed due to an invalid query parameter or other issue."}},"summary":"Get conversations","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/current_user/conversations/{id}":{"delete":{"description":"Delete an existing conversation using the conversation ID. This endpoint allows users to permanently delete a conversation.","operationId":"DeleteConversation","parameters":[{"description":"The conversation's `id` value.","example":"abc123","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"responses":{"200":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"67890","connectorId":"12345"},"category":"assistant","createdAt":"2023-10-31T12:01:00Z","excludeFromLastConversationStorage":false,"id":"abc123","messages":[{"content":"The conversation has been deleted.","role":"system","timestamp":"2023-10-31T12:35:00Z"}],"replacements":{},"title":"Deleted Security Discussion","updatedAt":"2023-10-31T12:01:00Z","users":[{"id":"user1","name":"John Doe"}]},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"}}},"description":"Indicates a successful call. The conversation was deleted successfully."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Invalid conversation ID","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. This response indicates an issue with the request."}},"summary":"Delete a conversation","tags":["Security AI Assistant API"]},"get":{"description":"Get the details of an existing conversation using the conversation ID. This allows users to fetch the specific conversation data by its unique ID.","operationId":"ReadConversation","parameters":[{"description":"The conversation's `id` value, a unique identifier for the conversation.","example":"abc123","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"responses":{"200":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"67890","connectorId":"12345"},"category":"assistant","createdAt":"2023-10-31T12:01:00Z","excludeFromLastConversationStorage":false,"id":"abc123","messages":[{"content":"Hello, how can I assist you today?","role":"system","timestamp":"2023-10-31T12:00:00Z"}],"replacements":{},"title":"Security Discussion","updatedAt":"2023-10-31T12:01:00Z","users":[{"id":"user1","name":"John Doe"}]},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"}}},"description":"Indicates a successful call. The conversation details are returned."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Invalid conversation ID","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. The request could not be processed due to an error."}},"summary":"Get a conversation","tags":["Security AI Assistant API"]},"put":{"description":"Update an existing conversation using the conversation ID. This endpoint allows users to modify the details of an existing conversation.","operationId":"UpdateConversation","parameters":[{"description":"The conversation's `id` value.","example":"abc123","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"requestBody":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"09876","connectorId":"54321"},"category":"insights","excludeFromLastConversationStorage":true,"messages":[{"content":"The issue was resolved.","role":"assistant","timestamp":"2023-10-31T12:30:00Z"}],"replacements":{},"title":"Updated Security Discussion"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationUpdateProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"apiConfig":{"actionTypeId":"09876","connectorId":"54321"},"category":"insights","createdAt":"2023-10-31T12:01:00Z","excludeFromLastConversationStorage":true,"id":"abc123","messages":[{"content":"The issue was resolved.","role":"assistant","timestamp":"2023-10-31T12:30:00Z"}],"replacements":{},"title":"Updated Security Discussion","updatedAt":"2023-10-31T12:31:00Z","users":[{"id":"user1","name":"John Doe"}]},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationResponse"}}},"description":"Indicates a successful call. The conversation was updated successfully."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Missing required field: title","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Generic Error. This response indicates an issue with the request, such as missing required parameters or incorrect data."}},"summary":"Update a conversation","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/{resource}":{"get":{"description":"Read a single KB","operationId":"ReadKnowledgeBase","parameters":[{"description":"The KnowledgeBase `resource` value.","example":"kb12345","in":"path","name":"resource","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"elser_exists":{"description":"Indicates if the ELSER model exists for the KnowledgeBase.","example":true,"type":"boolean"},"is_setup_available":{"description":"Indicates if the setup process is available for the KnowledgeBase.","example":true,"type":"boolean"},"is_setup_in_progress":{"description":"Indicates if the setup process is currently in progress.","example":false,"type":"boolean"},"product_documentation_status":{"description":"The status of the product documentation in the KnowledgeBase.","example":"complete","type":"string"},"security_labs_exists":{"description":"Indicates if Security Labs documentation exists in the KnowledgeBase.","example":true,"type":"boolean"},"user_data_exists":{"description":"Indicates if user data exists in the KnowledgeBase.","example":false,"type":"boolean"}}}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"A short description of the error.","example":"Bad Request","type":"string"},"message":{"description":"A detailed error message.","example":"Invalid resource ID provided.","type":"string"},"statusCode":{"description":"The HTTP status code of the error.","example":400,"type":"number"}}}}},"description":"Generic Error"}},"summary":"Read a KnowledgeBase","tags":["Security AI Assistant API"]},"post":{"description":"Create a KnowledgeBase","operationId":"CreateKnowledgeBase","parameters":[{"description":"The KnowledgeBase `resource` value.","example":"kb12345","in":"path","name":"resource","schema":{"type":"string"}},{"description":"ELSER modelId to use when setting up the Knowledge Base. If not provided, a default model will be used.","example":"elser-model-001","in":"query","name":"modelId","required":false,"schema":{"type":"string"}},{"description":"Indicates whether we should or should not install Security Labs docs when setting up the Knowledge Base. Defaults to `false`.","example":true,"in":"query","name":"ignoreSecurityLabs","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseResponse"}}},"description":"Indicates a successful call."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"A short description of the error.","example":"Bad Request","type":"string"},"message":{"description":"A detailed error message.","example":"Invalid resource ID provided.","type":"string"},"statusCode":{"description":"The HTTP status code of the error.","example":400,"type":"number"}}}}},"description":"Generic Error"}},"summary":"Create a KnowledgeBase","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/entries":{"post":{"description":"Create a Knowledge Base Entry","operationId":"CreateKnowledgeBaseEntry","requestBody":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page and click 'Reset Password'.","tags":["password","reset","help"],"title":"How to reset a password"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryCreateProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page and click 'Reset Password'.","id":"12345","tags":["password","reset","help"],"title":"How to reset a password"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"}}},"description":"Successful request returning Knowledge Base Entries"},"400":{"content":{"application/json":{"example":{"error":"Invalid input","message":"The 'title' field is required."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"A generic error occurred, such as invalid input or missing required fields."}},"summary":"Create a Knowledge Base Entry","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/entries/_bulk_action":{"post":{"description":"The bulk action is applied to all Knowledge Base Entries that match the filter or to the list of Knowledge Base Entries by their IDs.","operationId":"PerformKnowledgeBaseEntryBulkAction","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"create":{"description":"List of Knowledge Base Entries to create.","example":[{"content":"This is the content of the new entry.","title":"New Entry"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryCreateProps"},"type":"array"},"delete":{"type":"object","properties":{"ids":{"description":"Array of Knowledge Base Entry IDs.","example":["123","456","789"],"items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter Knowledge Base Entries.","example":"status:active AND category:technology","type":"string"}}},"update":{"description":"List of Knowledge Base Entries to update.","example":[{"content":"Updated content.","id":"123","title":"Updated Entry"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateProps"},"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionResponse"}}},"description":"Successful bulk operation request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"Generic Error"}},"summary":"Applies a bulk action to multiple Knowledge Base Entries","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/entries/_find":{"get":{"description":"Finds Knowledge Base Entries that match the given query.","operationId":"FindKnowledgeBaseEntries","parameters":[{"description":"A list of fields to include in the response. If not provided, all fields will be included.","in":"query","name":"fields","required":false,"schema":{"example":["title","created_at"],"items":{"type":"string"},"type":"array"}},{"description":"Search query to filter Knowledge Base Entries by specific criteria.","in":"query","name":"filter","required":false,"schema":{"example":"error handling","type":"string"}},{"description":"Field to sort the Knowledge Base Entries by.","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_FindKnowledgeBaseEntriesSortField","example":"created_at"}},{"description":"Sort order for the results, either asc or desc.","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_SortOrder","example":"asc"}},{"description":"Page number for paginated results. Defaults to 1.","in":"query","name":"page","required":false,"schema":{"default":1,"example":2,"minimum":1,"type":"integer"}},{"description":"Number of Knowledge Base Entries to return per page. Defaults to 20.","in":"query","name":"per_page","required":false,"schema":{"default":20,"example":10,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The list of Knowledge Base Entries for the current page.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"},"type":"array"},"page":{"description":"The current page number.","example":1,"type":"integer"},"perPage":{"description":"The number of Knowledge Base Entries returned per page.","example":20,"type":"integer"},"total":{"description":"The total number of Knowledge Base Entries available.","example":100,"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response containing the paginated Knowledge Base Entries."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"A short description of the error.","example":"Bad Request","type":"string"},"message":{"description":"A detailed message explaining the error.","example":"Invalid query parameter: sort_order","type":"string"},"statusCode":{"description":"The HTTP status code of the error.","example":400,"type":"number"}}}}},"description":"Generic Error indicating an issue with the request."}},"summary":"Finds Knowledge Base Entries that match the given query.","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/knowledge_base/entries/{id}":{"delete":{"description":"Delete a Knowledge Base Entry by its unique `id`.","operationId":"DeleteKnowledgeBaseEntry","parameters":[{"description":"The unique identifier (`id`) of the Knowledge Base Entry to delete.","example":"12345","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"responses":{"200":{"content":{"application/json":{"example":{"id":"12345","message":"Knowledge Base Entry successfully deleted."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_DeleteResponseFields"}}},"description":"Successful request returning the `id` of the deleted Knowledge Base Entry."},"400":{"content":{"application/json":{"example":{"error":"Not Found","message":"No Knowledge Base Entry found with the provided `id`."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"A generic error occurred, such as an invalid `id` or the entry not being found."}},"summary":"Deletes a single Knowledge Base Entry using the `id` field","tags":["Security AI Assistant API"]},"get":{"description":"Retrieve a Knowledge Base Entry by its unique `id`.","operationId":"ReadKnowledgeBaseEntry","parameters":[{"description":"The unique identifier (`id`) of the Knowledge Base Entry to retrieve.","example":"12345","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"responses":{"200":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page and click 'Reset Password'.","id":"12345","tags":["password","reset","help"],"title":"How to reset a password"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"}}},"description":"Successful request returning the requested Knowledge Base Entry."},"400":{"content":{"application/json":{"example":{"error":"Not Found","message":"No Knowledge Base Entry found with the provided `id`."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"A generic error occurred, such as an invalid `id` or the entry not being found."}},"summary":"Read a Knowledge Base Entry","tags":["Security AI Assistant API"]},"put":{"description":"Update an existing Knowledge Base Entry by its unique `id`.","operationId":"UpdateKnowledgeBaseEntry","parameters":[{"description":"The unique identifier (`id`) of the Knowledge Base Entry to update.","example":"12345","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}}],"requestBody":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page, click 'Reset Password', and follow the instructions.","tags":["password","reset","help","update"],"title":"How to reset a password (updated)"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"content":"To reset your password, go to the settings page, click 'Reset Password', and follow the instructions.","id":"12345","tags":["password","reset","help","update"],"title":"How to reset a password (updated)"},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"}}},"description":"Successful request returning the updated Knowledge Base Entry."},"400":{"content":{"application/json":{"example":{"error":"Invalid input","message":"The 'content' field cannot be empty."},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema"}}},"description":"A generic error occurred, such as invalid input or the entry not being found."}},"summary":"Update a Knowledge Base Entry","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/prompts/_bulk_action":{"post":{"description":"Apply a bulk action to multiple prompts. The bulk action is applied to all prompts that match the filter or to the list of prompts by their IDs. This action allows for bulk create, update, or delete operations.","operationId":"PerformPromptsBulkAction","requestBody":{"content":{"application/json":{"example":{"create":[{"content":"Please verify the security settings.","name":"New Security Prompt","promptType":"system"}],"delete":{"ids":["prompt1","prompt2"]},"update":[{"content":"Updated content for security prompt.","id":"prompt123"}]},"schema":{"type":"object","properties":{"create":{"description":"List of prompts to be created.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptCreateProps"},"type":"array"},"delete":{"description":"Criteria for deleting prompts in bulk.","type":"object","properties":{"ids":{"description":"Array of IDs to apply the action to.","example":["1234","5678"],"items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter the bulk action.","example":"status: 'inactive'","type":"string"}}},"update":{"description":"List of prompts to be updated.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptUpdateProps"},"type":"array"}}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"success":{"value":{"attributes":{"errors":[],"results":{"created":[{"content":"Please verify the security settings.","id":"prompt6","name":"New Security Prompt","promptType":"system"}],"deleted":["prompt2","prompt3"],"skipped":[{"id":"prompt4","name":"Security Prompt","skip_reason":"PROMPT_FIELD_NOT_MODIFIED"}],"updated":[{"content":"Updated security settings prompt","id":"prompt1","name":"Security Prompt","promptType":"system"}]},"summary":{"failed":0,"skipped":1,"succeeded":4,"total":5}},"message":"Bulk action completed successfully.","prompts_count":5,"status_code":200,"success":true}}},"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptsBulkCrudActionResponse"}}},"description":"Indicates a successful call with the results of the bulk action."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"A short error message.","example":"Bad Request","type":"string"},"message":{"description":"A detailed error message.","example":"Invalid prompt ID or missing required fields.","type":"string"},"statusCode":{"description":"The HTTP status code for the error.","example":400,"type":"number"}}}}},"description":"Indicates a generic error due to a bad request."}},"summary":"Apply a bulk action to prompts","tags":["Security AI Assistant API"]}},"/api/security_ai_assistant/prompts/_find":{"get":{"description":"Get a list of all prompts based on optional filters, sorting, and pagination.","operationId":"FindPrompts","parameters":[{"description":"List of specific fields to include in each returned prompt.","in":"query","name":"fields","required":false,"schema":{"example":["id","name","content"],"items":{"type":"string"},"type":"array"}},{"description":"Search query string to filter prompts by matching fields.","in":"query","name":"filter","required":false,"schema":{"example":"error handling","type":"string"}},{"description":"Field to sort prompts by.","in":"query","name":"sort_field","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_FindPromptsSortField"}},{"description":"Sort order, either asc or desc.","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_SortOrder"}},{"description":"Page number for pagination.","in":"query","name":"page","required":false,"schema":{"default":1,"example":1,"minimum":1,"type":"integer"}},{"description":"Number of prompts per page.","in":"query","name":"per_page","required":false,"schema":{"default":20,"example":20,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"data":[{"categories":["troubleshooting","logging"],"color":"#FF5733","consumer":"security","content":"If you encounter an error, check the logs and retry.","createdAt":"2025-04-20T21:00:00Z","createdBy":"jdoe","id":"prompt-123","isDefault":true,"isNewConversationDefault":false,"name":"Error Troubleshooting Prompt","namespace":"default","promptType":"standard","timestamp":"2025-04-30T22:30:00Z","updatedAt":"2025-04-30T22:45:00Z","updatedBy":"jdoe","users":[{"full_name":"John Doe","username":"jdoe"}]}],"page":1,"perPage":20,"total":142},"type":"object","properties":{"data":{"description":"The list of prompts returned based on the search query, sorting, and pagination.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptResponse"},"type":"array"},"page":{"description":"Current page number.","example":1,"type":"integer"},"perPage":{"description":"Number of prompts per page.","example":20,"type":"integer"},"total":{"description":"Total number of prompts matching the query.","example":142,"type":"integer"}},"required":["page","perPage","total","data"]}}},"description":"Successful response containing a list of prompts."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Short error message.","example":"Bad Request","type":"string"},"message":{"description":"Detailed description of the error.","example":"Invalid sort order value provided.","type":"string"},"statusCode":{"description":"HTTP status code for the error.","example":400,"type":"number"}}}}},"description":"Bad request due to invalid parameters or malformed query."}},"summary":"Get prompts","tags":["Security AI Assistant API"]}},"/api/security/role":{"get":{"operationId":"get-security-role","parameters":[{"description":"If `true` and the response contains any privileges that are associated with deprecated features, they are omitted in favor of details about the appropriate replacement feature privileges.","in":"query","name":"replaceDeprecatedPrivileges","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getRolesResponse1":{"$ref":"#/components/examples/get_roles_response1"}}}}}},"summary":"Get all roles","tags":["roles"]}},"/api/security/role/_query":{"post":{"operationId":"post-security-role-query","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"filters":{"additionalProperties":false,"type":"object","properties":{"showReservedRoles":{"type":"boolean"}}},"from":{"type":"number"},"query":{"type":"string"},"size":{"type":"number"},"sort":{"additionalProperties":false,"type":"object","properties":{"direction":{"enum":["asc","desc"],"type":"string"},"field":{"type":"string"}},"required":["field","direction"]}}}}}},"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Query roles","tags":[]}},"/api/security/role/{name}":{"delete":{"operationId":"delete-security-role-name","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."}},"summary":"Delete a role","tags":["roles"]},"get":{"operationId":"get-security-role-name","parameters":[{"description":"The role name.","in":"path","name":"name","required":true,"schema":{"minLength":1,"type":"string"}},{"description":"If `true` and the response contains any privileges that are associated with deprecated features, they are omitted in favor of details about the appropriate replacement feature privileges.","in":"query","name":"replaceDeprecatedPrivileges","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getRoleResponse1":{"$ref":"#/components/examples/get_role_response1"}}}}}},"summary":"Get a role","tags":["roles"]},"put":{"description":"Create a new Kibana role or update the attributes of an existing role. Kibana roles are stored in the Elasticsearch native realm.","operationId":"put-security-role-name","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The role name.","in":"path","name":"name","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}},{"description":"When true, a role is not overwritten if it already exists.","in":"query","name":"createOnly","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"description":{"description":"A description for the role.","maxLength":2048,"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"cluster":{"items":{"description":"Cluster privileges that define the cluster level actions that users can perform.","type":"string"},"type":"array"},"indices":{"items":{"additionalProperties":false,"type":"object","properties":{"allow_restricted_indices":{"description":"Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field covers the restricted indices too.","type":"boolean"},"field_security":{"additionalProperties":{"items":{"description":"The document fields that the role members have read access to.","type":"string"},"type":"array"},"type":"object"},"names":{"items":{"description":"The data streams, indices, and aliases to which the permissions in this entry apply. It supports wildcards (*).","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The index level privileges that the role members have for the data streams and indices.","type":"string"},"minItems":1,"type":"array"},"query":{"description":"A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members.","type":"string"}},"required":["names","privileges"]},"type":"array"},"remote_cluster":{"items":{"additionalProperties":false,"type":"object","properties":{"clusters":{"items":{"description":"A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The cluster level privileges for the remote cluster. The allowed values are a subset of the cluster privileges.","type":"string"},"minItems":1,"type":"array"}},"required":["privileges","clusters"]},"type":"array"},"remote_indices":{"items":{"additionalProperties":false,"type":"object","properties":{"allow_restricted_indices":{"description":"Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field will cover the restricted indices too.","type":"boolean"},"clusters":{"items":{"description":"A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.","type":"string"},"minItems":1,"type":"array"},"field_security":{"additionalProperties":{"items":{"description":"The document fields that the role members have read access to.","type":"string"},"type":"array"},"type":"object"},"names":{"items":{"description":"A list of remote aliases, data streams, or indices to which the permissions apply. It supports wildcards (*).","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The index level privileges that role members have for the specified indices.","type":"string"},"minItems":1,"type":"array"},"query":{"description":"A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members. ","type":"string"}},"required":["clusters","names","privileges"]},"type":"array"},"run_as":{"items":{"description":"A user name that the role member can impersonate.","type":"string"},"type":"array"}}},"kibana":{"items":{"additionalProperties":false,"type":"object","properties":{"base":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"items":{"description":"A base privilege that grants applies to all spaces.","type":"string"},"type":"array"},{"items":{"description":"A base privilege that applies to specific spaces.","type":"string"},"type":"array"}]},"feature":{"additionalProperties":{"items":{"description":"The privileges that the role member has for the feature.","type":"string"},"type":"array"},"type":"object"},"spaces":{"anyOf":[{"items":{"enum":["*"],"type":"string"},"maxItems":1,"minItems":1,"type":"array"},{"items":{"description":"A space that the privilege applies to.","type":"string"},"type":"array"}],"default":["*"]}},"required":["base"]},"type":"array"},"metadata":{"additionalProperties":{},"type":"object"}},"required":["elasticsearch"]},"examples":{"createRoleRequest1":{"$ref":"#/components/examples/create_role_request1"},"createRoleRequest2":{"$ref":"#/components/examples/create_role_request2"},"createRoleRequest3":{"$ref":"#/components/examples/create_role_request3"},"createRoleRequest4":{"$ref":"#/components/examples/create_role_request4"}}}}},"responses":{"204":{"description":"Indicates a successful call."}},"summary":"Create or update a role","tags":["roles"]}},"/api/security/roles":{"post":{"operationId":"post-security-roles","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"roles":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"description":{"description":"A description for the role.","maxLength":2048,"type":"string"},"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"cluster":{"items":{"description":"Cluster privileges that define the cluster level actions that users can perform.","type":"string"},"type":"array"},"indices":{"items":{"additionalProperties":false,"type":"object","properties":{"allow_restricted_indices":{"description":"Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field covers the restricted indices too.","type":"boolean"},"field_security":{"additionalProperties":{"items":{"description":"The document fields that the role members have read access to.","type":"string"},"type":"array"},"type":"object"},"names":{"items":{"description":"The data streams, indices, and aliases to which the permissions in this entry apply. It supports wildcards (*).","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The index level privileges that the role members have for the data streams and indices.","type":"string"},"minItems":1,"type":"array"},"query":{"description":"A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members.","type":"string"}},"required":["names","privileges"]},"type":"array"},"remote_cluster":{"items":{"additionalProperties":false,"type":"object","properties":{"clusters":{"items":{"description":"A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The cluster level privileges for the remote cluster. The allowed values are a subset of the cluster privileges.","type":"string"},"minItems":1,"type":"array"}},"required":["privileges","clusters"]},"type":"array"},"remote_indices":{"items":{"additionalProperties":false,"type":"object","properties":{"allow_restricted_indices":{"description":"Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field will cover the restricted indices too.","type":"boolean"},"clusters":{"items":{"description":"A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.","type":"string"},"minItems":1,"type":"array"},"field_security":{"additionalProperties":{"items":{"description":"The document fields that the role members have read access to.","type":"string"},"type":"array"},"type":"object"},"names":{"items":{"description":"A list of remote aliases, data streams, or indices to which the permissions apply. It supports wildcards (*).","type":"string"},"minItems":1,"type":"array"},"privileges":{"items":{"description":"The index level privileges that role members have for the specified indices.","type":"string"},"minItems":1,"type":"array"},"query":{"description":"A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members. ","type":"string"}},"required":["clusters","names","privileges"]},"type":"array"},"run_as":{"items":{"description":"A user name that the role member can impersonate.","type":"string"},"type":"array"}}},"kibana":{"items":{"additionalProperties":false,"type":"object","properties":{"base":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"items":{"description":"A base privilege that grants applies to all spaces.","type":"string"},"type":"array"},{"items":{"description":"A base privilege that applies to specific spaces.","type":"string"},"type":"array"}]},"feature":{"additionalProperties":{"items":{"description":"The privileges that the role member has for the feature.","type":"string"},"type":"array"},"type":"object"},"spaces":{"anyOf":[{"items":{"enum":["*"],"type":"string"},"maxItems":1,"minItems":1,"type":"array"},{"items":{"description":"A space that the privilege applies to.","type":"string"},"type":"array"}],"default":["*"]}},"required":["base"]},"type":"array"},"metadata":{"additionalProperties":{},"type":"object"}},"required":["elasticsearch"]},"type":"object"}},"required":["roles"]}}}},"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Create or update roles","tags":["roles"]}},"/api/security/session/_invalidate":{"post":{"description":"Invalidate user sessions that match a query. To use this API, you must be a superuser.\n","operationId":"post-security-session-invalidate","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"invalidateRequestExample1":{"description":"Run `POST api/security/session/_invalidate` to invalidate all existing sessions.","summary":"Invalidate all sessions","value":"{\n \"match\" : \"all\"\n}"},"invalidateRequestExample2":{"description":"Run `POST api/security/session/_invalidate` to invalidate sessions that were created by any SAML authentication provider.","summary":"Invalidate all SAML sessions","value":"{\n \"match\" : \"query\",\n \"query\": {\n \"provider\" : { \"type\": \"saml\" }\n }\n}"},"invalidateRequestExample3":{"description":"Run `POST api/security/session/_invalidate` to invalidate sessions that were created by the SAML authentication provider named `saml1`.","summary":"Invalidate sessions for a provider","value":"{\n \"match\" : \"query\",\n \"query\": {\n \"provider\" : { \"type\": \"saml\", \"name\": \"saml1\" }\n }\n}"},"invalidateRequestExample4":{"description":"Run `POST api/security/session/_invalidate` to invalidate sessions that were created by any OpenID Connect authentication provider for the user with the username `user@my-oidc-sso.com`.","summary":"Invalidate sessions for a user","value":"{\n \"match\" : \"query\",\n \"query\": {\n \"provider\" : { \"type\": \"oidc\" },\n \"username\": \"user@my-oidc-sso.com\"\n }\n}"}},"schema":{"type":"object","properties":{"match":{"description":"The method Kibana uses to determine which sessions to invalidate. If it is `all`, all existing sessions will be invalidated. If it is `query`, only the sessions that match the query will be invalidated.\n","enum":["all","query"],"type":"string"},"query":{"description":"The query that Kibana uses to match the sessions to invalidate when the `match` parameter is set to `query`.\n","type":"object","properties":{"provider":{"description":"The authentication providers that will have their user sessions invalidated.","type":"object","properties":{"name":{"description":"The authentication provider name.","type":"string"},"type":{"description":"The authentication provide type. For example: `basic`, `token`, `saml`, `oidc`, `kerberos`, or `pki`.\n","type":"string"}},"required":["type"]},"username":{"description":"The username that will have its sessions invalidated.","type":"string"}},"required":["provider"]}},"required":["match"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"description":"The number of sessions that were successfully invalidated.","type":"integer"}}}}},"description":"Indicates a successful call"},"403":{"description":"Indicates that the user may not be authorized to invalidate sessions for other users."}},"summary":"Invalidate user sessions","tags":["user session"],"x-state":"Technical Preview"}},"/api/short_url":{"post":{"description":"Kibana URLs may be long and cumbersome, short URLs are much easier to remember and share.\nShort URLs are created by specifying the locator ID and locator parameters. When a short URL is resolved, the locator ID and locator parameters are used to redirect user to the right Kibana page.\n","operationId":"post-url","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"humanReadableSlug":{"description":"When the `slug` parameter is omitted, the API will generate a random human-readable slug if `humanReadableSlug` is set to true.\n","type":"boolean"},"locatorId":{"description":"The identifier for the locator.","type":"string"},"params":{"description":"An object which contains all necessary parameters for the given locator to resolve to a Kibana location.\n\u003e warn\n\u003e When you create a short URL, locator params are not validated, which allows you to pass arbitrary and ill-formed data into the API that can break Kibana. Make sure any data that you send to the API is properly formed.\n","type":"object"},"slug":{"description":"A custom short URL slug. The slug is the part of the short URL that identifies it. You can provide a custom slug which consists of latin alphabet letters, numbers, and `-._` characters. The slug must be at least 3 characters long, but no longer than 255 characters.\n","type":"string"}},"required":["locatorId","params"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Short_URL_APIs_urlResponse"}}},"description":"Indicates a successful call."}},"summary":"Create a short URL","tags":["short url"],"x-state":"Technical Preview"}},"/api/short_url/_slug/{slug}":{"get":{"description":"Resolve a Kibana short URL by its slug.\n","operationId":"resolve-url","parameters":[{"description":"The slug of the short URL.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Short_URL_APIs_urlResponse"}}},"description":"Indicates a successful call."}},"summary":"Resolve a short URL","tags":["short url"],"x-state":"Technical Preview"}},"/api/short_url/{id}":{"delete":{"description":"Delete a Kibana short URL.\n","operationId":"delete-url","parameters":[{"$ref":"#/components/parameters/Short_URL_APIs_idParam"}],"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Delete a short URL","tags":["short url"],"x-state":"Technical Preview"},"get":{"description":"Get a single Kibana short URL.\n","operationId":"get-url","parameters":[{"$ref":"#/components/parameters/Short_URL_APIs_idParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Short_URL_APIs_urlResponse"}}},"description":"Indicates a successful call."}},"summary":"Get a short URL","tags":["short url"],"x-state":"Technical Preview"}},"/api/spaces/_copy_saved_objects":{"post":{"description":"It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved Discover sessions, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: copySavedObjectsToSpaces.","operationId":"post-spaces-copy-saved-objects","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"compatibilityMode":{"default":false,"description":"Apply various adjustments to the saved objects that are being copied to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with copied saved objects. This option cannot be used with the `createNewCopies` option.","type":"boolean"},"createNewCopies":{"default":true,"description":"Create new copies of saved objects, regenerate each object identifier, and reset the origin. When used, potential conflict errors are avoided. This option cannot be used with the `overwrite` and `compatibilityMode` options.","type":"boolean"},"includeReferences":{"default":false,"description":"When set to true, all saved objects related to the specified saved objects will also be copied into the target spaces.","type":"boolean"},"objects":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"description":"The identifier of the saved object to copy.","type":"string"},"type":{"description":"The type of the saved object to copy.","type":"string"}},"required":["type","id"]},"type":"array"},"overwrite":{"default":false,"description":"When set to true, all conflicts are automatically overridden. When a saved object with a matching type and identifier exists in the target space, that version is replaced with the version from the source space. This option cannot be used with the `createNewCopies` option.","type":"boolean"},"spaces":{"items":{"description":"The identifiers of the spaces where you want to copy the specified objects.","type":"string"},"type":"array"}},"required":["spaces","objects"]},"examples":{"copySavedObjectsRequestExample1":{"$ref":"#/components/examples/copy_saved_objects_request1"},"copySavedObjectsRequestExample2":{"$ref":"#/components/examples/copy_saved_objects_request2"}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"copySavedObjectsResponseExample1":{"$ref":"#/components/examples/copy_saved_objects_response1"},"copySavedObjectsResponseExample2":{"$ref":"#/components/examples/copy_saved_objects_response2"},"copySavedObjectsResponseExample3":{"$ref":"#/components/examples/copy_saved_objects_response3"},"copySavedObjectsResponseExample4":{"$ref":"#/components/examples/copy_saved_objects_response4"}}}}}},"summary":"Copy saved objects between spaces","tags":["spaces"]}},"/api/spaces/_disable_legacy_url_aliases":{"post":{"operationId":"post-spaces-disable-legacy-url-aliases","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"aliases":{"items":{"additionalProperties":false,"type":"object","properties":{"sourceId":{"description":"The alias source object identifier. This is the legacy object identifier.","type":"string"},"targetSpace":{"description":"The space where the alias target object exists.","type":"string"},"targetType":{"description":"The type of alias target object. ","type":"string"}},"required":["targetSpace","targetType","sourceId"]},"type":"array"}},"required":["aliases"]},"examples":{"disableLegacyURLRequestExample1":{"$ref":"#/components/examples/disable_legacy_url_request1"}}}}},"responses":{},"summary":"Disable legacy URL aliases","tags":["spaces"]}},"/api/spaces/_get_shareable_references":{"post":{"description":"Collect references and space contexts for saved objects.","operationId":"post-spaces-get-shareable-references","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"objects":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},"type":"array"}},"required":["objects"]}}}},"responses":{},"summary":"Get shareable references","tags":["spaces"]}},"/api/spaces/_resolve_copy_saved_objects_errors":{"post":{"description":"Overwrite saved objects that are returned as errors from the copy saved objects to space API.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: copySavedObjectsToSpaces.","operationId":"post-spaces-resolve-copy-saved-objects-errors","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"compatibilityMode":{"default":false,"type":"boolean"},"createNewCopies":{"default":true,"type":"boolean"},"includeReferences":{"default":false,"type":"boolean"},"objects":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type","id"]},"type":"array"},"retries":{"additionalProperties":{"items":{"additionalProperties":false,"type":"object","properties":{"createNewCopy":{"description":"Creates new copies of the saved objects, regenerates each object ID, and resets the origin.","type":"boolean"},"destinationId":{"description":"Specifies the destination identifier that the copied object should have, if different from the current identifier.","type":"string"},"id":{"description":"The saved object identifier.","type":"string"},"ignoreMissingReferences":{"description":"When set to true, any missing references errors are ignored.","type":"boolean"},"overwrite":{"default":false,"description":"When set to true, the saved object from the source space overwrites the conflicting object in the destination space.","type":"boolean"},"type":{"description":"The saved object type.","type":"string"}},"required":["type","id"]},"type":"array"},"type":"object"}},"required":["retries","objects"]},"examples":{"resolveCopySavedObjectsRequestExample1":{"$ref":"#/components/examples/resolve_copy_saved_objects_request1"},"resolveCopySavedObjectsRequestExample2":{"$ref":"#/components/examples/resolve_copy_saved_objects_request2"}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"resolveCopySavedObjectsResponseExample1":{"$ref":"#/components/examples/copy_saved_objects_response1"},"resolveCopySavedObjectsResponseExample2":{"$ref":"#/components/examples/copy_saved_objects_response2"}}}}}},"summary":"Resolve conflicts copying saved objects","tags":[]}},"/api/spaces/_update_objects_spaces":{"post":{"description":"Update one or more saved objects to add or remove them from some spaces.","operationId":"post-spaces-update-objects-spaces","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"objects":{"items":{"additionalProperties":false,"type":"object","properties":{"id":{"description":"The identifier of the saved object to update.","type":"string"},"type":{"description":"The type of the saved object to update.","type":"string"}},"required":["type","id"]},"type":"array"},"spacesToAdd":{"items":{"description":"The identifiers of the spaces the saved objects should be added to or removed from.","type":"string"},"type":"array"},"spacesToRemove":{"items":{"description":"The identifiers of the spaces the saved objects should be added to or removed from.","type":"string"},"type":"array"}},"required":["objects","spacesToAdd","spacesToRemove"]},"examples":{"updateObjectSpacesRequestExample1":{"$ref":"#/components/examples/update_saved_objects_spaces_request1"}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"updateObjectSpacesResponseExample1":{"$ref":"#/components/examples/update_saved_objects_spaces_response1"}}}}}},"summary":"Update saved objects in spaces","tags":["spaces"]}},"/api/spaces/space":{"get":{"operationId":"get-spaces-space","parameters":[{"description":"Specifies which authorization checks are applied to the API call. The default value is `any`.","in":"query","name":"purpose","required":false,"schema":{"enum":["any","copySavedObjectsIntoSpace","shareSavedObjectsIntoSpace"],"type":"string"}},{"description":"When enabled, the API returns any spaces that the user is authorized to access in any capacity and each space will contain the purposes for which the user is authorized. This can be useful to determine which spaces a user can read but not take a specific action in. If the security plugin is not enabled, this parameter has no effect, since no authorization checks take place. This parameter cannot be used in with the `purpose` parameter.","in":"query","name":"include_authorized_purposes","required":true,"schema":{"anyOf":[{"items":{},"type":"array"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"string"}],"nullable":true,"oneOf":[{"enum":[false],"type":"boolean","x-oas-optional":true},{"type":"boolean","x-oas-optional":true}]}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getSpacesResponseExample1":{"$ref":"#/components/examples/get_spaces_response1"},"getSpacesResponseExample2":{"$ref":"#/components/examples/get_spaces_response2"}}}}}},"summary":"Get all spaces","tags":["spaces"]},"post":{"operationId":"post-spaces-space","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"_reserved":{"type":"boolean"},"color":{"description":"The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.","type":"string"},"description":{"description":"A description for the space.","type":"string"},"disabledFeatures":{"default":[],"items":{"description":"The list of features that are turned off in the space.","type":"string"},"type":"array"},"id":{"description":"The space ID that is part of the Kibana URL when inside the space. Space IDs are limited to lowercase alphanumeric, underscore, and hyphen characters (a-z, 0-9, _, and -). You are cannot change the ID with the update operation.","type":"string"},"imageUrl":{"description":"The data-URL encoded image to display in the space avatar. If specified, initials will not be displayed and the color will be visible as the background color for transparent images. For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.","type":"string"},"initials":{"description":"One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.","maxLength":2,"type":"string"},"name":{"description":"The display name for the space. ","minLength":1,"type":"string"},"solution":{"enum":["security","oblt","es","classic"],"type":"string"}},"required":["id","name"]},"examples":{"createSpaceRequest":{"$ref":"#/components/examples/create_space_request"}}}}},"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Create a space","tags":["spaces"]}},"/api/spaces/space/{id}":{"delete":{"description":"When you delete a space, all saved objects that belong to the space are automatically deleted, which is permanent and cannot be undone.","operationId":"delete-spaces-space-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The space identifier.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates a successful call."},"404":{"description":"Indicates that the request failed."}},"summary":"Delete a space","tags":["spaces"]},"get":{"operationId":"get-spaces-space-id","parameters":[{"description":"The space identifier.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Indicates a successful call.","content":{"application/json":{"examples":{"getSpaceResponseExample":{"$ref":"#/components/examples/get_space_response"}}}}}},"summary":"Get a space","tags":["spaces"]},"put":{"operationId":"put-spaces-space-id","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"description":"The space identifier. You are unable to change the ID with the update operation.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"_reserved":{"type":"boolean"},"color":{"description":"The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.","type":"string"},"description":{"description":"A description for the space.","type":"string"},"disabledFeatures":{"default":[],"items":{"description":"The list of features that are turned off in the space.","type":"string"},"type":"array"},"id":{"description":"The space ID that is part of the Kibana URL when inside the space. Space IDs are limited to lowercase alphanumeric, underscore, and hyphen characters (a-z, 0-9, _, and -). You are cannot change the ID with the update operation.","type":"string"},"imageUrl":{"description":"The data-URL encoded image to display in the space avatar. If specified, initials will not be displayed and the color will be visible as the background color for transparent images. For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.","type":"string"},"initials":{"description":"One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.","maxLength":2,"type":"string"},"name":{"description":"The display name for the space. ","minLength":1,"type":"string"},"solution":{"enum":["security","oblt","es","classic"],"type":"string"}},"required":["id","name"]},"examples":{"updateSpaceRequest":{"$ref":"#/components/examples/update_space_request"}}}}},"responses":{"200":{"description":"Indicates a successful call."}},"summary":"Update a space","tags":["spaces"]}},"/api/status":{"get":{"operationId":"get-status","parameters":[{"description":"Set to \"true\" to get the response in v7 format.","in":"query","name":"v7format","required":false,"schema":{"type":"boolean"}},{"description":"Set to \"true\" to get the response in v8 format.","in":"query","name":"v8format","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Kibana_HTTP_APIs_core_status_response"},{"$ref":"#/components/schemas/Kibana_HTTP_APIs_core_status_redactedResponse"}],"description":"Kibana's operational status. A minimal response is sent for unauthorized users."}}},"description":"Overall status is OK and Kibana should be functioning normally."},"503":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Kibana_HTTP_APIs_core_status_response"},{"$ref":"#/components/schemas/Kibana_HTTP_APIs_core_status_redactedResponse"}],"description":"Kibana's operational status. A minimal response is sent for unauthorized users."}}},"description":"Kibana or some of it's essential services are unavailable. Kibana may be degraded or unavailable."}},"summary":"Get Kibana's current status","tags":["system"]}},"/api/streams":{"get":{"description":"Fetches list of all streams\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get stream list","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/_disable":{"post":{"description":"Disables wired streams and deletes all existing stream definitions. The data of wired streams is deleted, but the data of classic streams is preserved.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-disable","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Disable streams","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/_enable":{"post":{"description":"Enables wired streams\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-enable","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Enable streams","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/_resync":{"post":{"description":"Resyncs all streams, making sure that Elasticsearch assets are up to date\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-resync","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Resync streams","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}":{"delete":{"description":"Deletes a stream definition and the underlying data stream\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"delete-streams-name","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Delete a stream","tags":["streams"],"x-state":"Technical Preview"},"get":{"description":"Fetches a stream definition and associated dashboards\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get a stream","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Creates or updates a stream definition. Classic streams can not be created through this API, only updated\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]},{"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]}},"required":["ingest"]},{"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"wired":{"additionalProperties":false,"type":"object","properties":{"fields":{"additionalProperties":{"allOf":[{"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"not":{}}]},{"items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"not":{}}]},"type":"array"},{}]},"type":"object"},{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"format":{"minLength":1,"type":"string"},"type":{"enum":["keyword","match_only_text","long","double","date","boolean","ip"],"type":"string"}},"required":["type"]},{"additionalProperties":false,"type":"object","properties":{"type":{"enum":["system"],"type":"string"}},"required":["type"]}]}]},"type":"object"},"routing":{"items":{"additionalProperties":false,"type":"object","properties":{"destination":{"minLength":1,"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]}},"required":["destination","if"]},"type":"array"}},"required":["fields","routing"]}},"required":["wired"]}},"required":["ingest"]}]}]}},"required":["stream"]},{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]}},"required":["ingest"]}]}},"required":["stream"]},{"type":"object","properties":{}},{"type":"object","properties":{}}]},{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]},{"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]}},"required":["ingest"]},{"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"unwired":{"additionalProperties":false,"type":"object","properties":{}}},"required":["unwired"]}},"required":["ingest"]}]}]}},"required":["stream"]},{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"ingest":{"additionalProperties":false,"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]}},"required":["ingest"]}]}},"required":["stream"]},{"type":"object","properties":{}},{"type":"object","properties":{}}]}]},{"allOf":[{"type":"object","properties":{}},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"]}]}},"required":["stream"]},{"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"},"queries":{"items":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]},"type":"array"}},"required":["dashboards","queries"]},{"type":"object","properties":{"stream":{"allOf":[{"additionalProperties":true,"type":"object","properties":{"name":{"not":{}}}},{"additionalProperties":false,"type":"object","properties":{"group":{"additionalProperties":false,"type":"object","properties":{"members":{"items":{"type":"string"},"type":"array"}},"required":["members"]}},"required":["group"]}]}},"required":["stream"]},{"type":"object","properties":{}}]}]}}}},"responses":{},"summary":"Create or update a stream","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/_fork":{"post":{"description":"Forks a wired stream and creates a child stream\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-fork","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"stream":{"additionalProperties":false,"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["stream","if"]}}}},"responses":{},"summary":"Fork a stream","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/_group":{"get":{"description":"Fetches the group settings of a group stream definition\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-group","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get group stream settings","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Upserts the group settings of a group stream definition\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name-group","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"group":{"additionalProperties":false,"type":"object","properties":{"members":{"items":{"type":"string"},"type":"array"}},"required":["members"]}},"required":["group"]}}}},"responses":{},"summary":"Upsert group stream settings","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/_ingest":{"get":{"description":"Fetches the ingest settings of an ingest stream definition\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-ingest","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get ingest stream settings","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Upserts the ingest settings of an ingest stream definition\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name-ingest","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"ingest":{"anyOf":[{"allOf":[{"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]},{"type":"object","properties":{"wired":{"additionalProperties":false,"type":"object","properties":{"fields":{"additionalProperties":{"allOf":[{"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"not":{}}]},{"items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"not":{}}]},"type":"array"},{}]},"type":"object"},{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"format":{"minLength":1,"type":"string"},"type":{"enum":["keyword","match_only_text","long","double","date","boolean","ip"],"type":"string"}},"required":["type"]},{"additionalProperties":false,"type":"object","properties":{"type":{"enum":["system"],"type":"string"}},"required":["type"]}]}]},"type":"object"},"routing":{"items":{"additionalProperties":false,"type":"object","properties":{"destination":{"minLength":1,"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]}},"required":["destination","if"]},"type":"array"}},"required":["fields","routing"]}},"required":["wired"]}]},{"allOf":[{"type":"object","properties":{"lifecycle":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"dsl":{"additionalProperties":false,"type":"object","properties":{"data_retention":{"minLength":1,"type":"string"}}}},"required":["dsl"]},{"additionalProperties":false,"type":"object","properties":{"ilm":{"additionalProperties":false,"type":"object","properties":{"policy":{"minLength":1,"type":"string"}},"required":["policy"]}},"required":["ilm"]},{"additionalProperties":false,"type":"object","properties":{"inherit":{"additionalProperties":false,"type":"object","properties":{}}},"required":["inherit"]}]},"processing":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"date":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"formats":{"items":{"minLength":1,"type":"string"},"type":"array"},"locale":{"minLength":1,"type":"string"},"output_format":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["field","formats"]}]}},"required":["date"]},{"additionalProperties":false,"type":"object","properties":{"dissect":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"append_separator":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern":{"minLength":1,"type":"string"}},"required":["field","pattern"]}]}},"required":["dissect"]},{"additionalProperties":false,"type":"object","properties":{"grok":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"pattern_definitions":{"additionalProperties":{"type":"string"},"type":"object"},"patterns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["field","patterns"]}]}},"required":["grok"]},{"additionalProperties":false,"type":"object","properties":{"kv":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"exclude_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"field":{"minLength":1,"type":"string"},"field_split":{"type":"string"},"ignore_missing":{"type":"boolean"},"include_keys":{"items":{"minLength":1,"type":"string"},"type":"array"},"prefix":{"minLength":1,"type":"string"},"strip_brackets":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"},"trim_key":{"minLength":1,"type":"string"},"trim_value":{"minLength":1,"type":"string"},"value_split":{"type":"string"}},"required":["field","field_split","value_split"]}]}},"required":["kv"]},{"additionalProperties":false,"type":"object","properties":{"geoip":{"additionalProperties":false,"type":"object","properties":{"database_file":{"minLength":1,"type":"string"},"field":{"minLength":1,"type":"string"},"first_only":{"type":"boolean"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["geoip"]},{"additionalProperties":false,"type":"object","properties":{"rename":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"override":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field","target_field"]}]}},"required":["rename"]},{"additionalProperties":false,"type":"object","properties":{"set":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_empty_value":{"type":"boolean"},"media_type":{"type":"string"},"override":{"type":"boolean"},"value":{"minLength":1,"type":"string"}},"required":["field","value"]}]}},"required":["set"]},{"additionalProperties":false,"type":"object","properties":{"urldecode":{"allOf":[{"type":"object","properties":{"description":{"type":"string"},"if":{"anyOf":[{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["exists","notExists"],"type":"string"}},"required":["field","operator"]},{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"operator":{"enum":["eq","neq","lt","lte","gt","gte","contains","startsWith","endsWith"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"]}]},{"additionalProperties":false,"type":"object","properties":{"and":{"items":{},"type":"array"}},"required":["and"]},{"additionalProperties":false,"type":"object","properties":{"or":{"items":{},"type":"array"}},"required":["or"]},{"additionalProperties":false,"type":"object","properties":{"never":{"additionalProperties":false,"type":"object","properties":{}}},"required":["never"]},{"additionalProperties":false,"type":"object","properties":{"always":{"additionalProperties":false,"type":"object","properties":{}}},"required":["always"]}]},"ignore_failure":{"type":"boolean"}}},{"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}]}},"required":["urldecode"]},{"additionalProperties":false,"type":"object","properties":{"user_agent":{"additionalProperties":false,"type":"object","properties":{"field":{"minLength":1,"type":"string"},"ignore_missing":{"type":"boolean"},"properties":{"items":{"minLength":1,"type":"string"},"type":"array"},"regex_file":{"minLength":1,"type":"string"},"target_field":{"minLength":1,"type":"string"}},"required":["field"]}},"required":["user_agent"]}]},"type":"array"}},"required":["lifecycle","processing"]},{"type":"object","properties":{"unwired":{"additionalProperties":false,"type":"object","properties":{}}},"required":["unwired"]}]}]}},"required":["ingest"]}}}},"responses":{},"summary":"Update ingest stream settings","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/content/export":{"post":{"description":"Exports the content associated to a stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-content-export","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"description":{"type":"string"},"include":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"objects":{"additionalProperties":false,"type":"object","properties":{"dashboards":{"items":{"type":"string"},"type":"array"}},"required":["dashboards"]}},"required":["objects"]},{"additionalProperties":false,"type":"object","properties":{"all":{"additionalProperties":false,"type":"object","properties":{}}},"required":["all"]}]},"name":{"type":"string"},"replaced_patterns":{"items":{"type":"string"},"type":"array"},"version":{"type":"string"}},"required":["name","description","version","replaced_patterns","include"]}}}},"responses":{},"summary":"Export stream content","tags":["streams"]}},"/api/streams/{name}/content/import":{"post":{"description":"Links content objects to a stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-content-import","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"additionalProperties":false,"type":"object","properties":{"content":{},"include":{"type":"string"}},"required":["include","content"]}}}},"responses":{},"summary":"Import content into a stream","tags":["streams"]}},"/api/streams/{name}/dashboards":{"get":{"description":"Fetches all dashboards linked to a stream that are visible to the current user in the current space.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-dashboards","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get stream dashboards","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/dashboards/_bulk":{"post":{"description":"Bulk update dashboards linked to a stream. Can link new dashboards and delete existing ones.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-dashboards-bulk","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"operations":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"index":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["index"]},{"additionalProperties":false,"type":"object","properties":{"delete":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["delete"]}]},"type":"array"}},"required":["operations"]}}}},"responses":{},"summary":"Bulk update dashboards","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/dashboards/{dashboardId}":{"delete":{"description":"Unlinks a dashboard from a stream. Noop if the dashboard is not linked to the stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"delete-streams-name-dashboards-dashboardid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"dashboardId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Unlink a dashboard from a stream","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Links a dashboard to a stream. Noop if the dashboard is already linked to the stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name-dashboards-dashboardid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"dashboardId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Link a dashboard to a stream","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/queries":{"get":{"description":"Fetches all queries linked to a stream that are visible to the current user in the current space.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-queries","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Get stream queries","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/queries/_bulk":{"post":{"description":"Bulk update queries of a stream. Can add new queries and delete existing ones.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"post-streams-name-queries-bulk","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"operations":{"items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"index":{"allOf":[{"type":"object","properties":{"id":{"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["id","title"]},{"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]}},"required":["kql"]}]}},"required":["index"]},{"additionalProperties":false,"type":"object","properties":{"delete":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["delete"]}]},"type":"array"}},"required":["operations"]}}}},"responses":{},"summary":"Bulk update queries","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/queries/{queryId}":{"delete":{"description":"Remove a query from a stream. Noop if the query is not found on the stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"delete-streams-name-queries-queryid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"queryId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Remove a query from a stream","tags":["streams"],"x-state":"Technical Preview"},"put":{"description":"Adds a query to a stream. Noop if the query is already present on the stream.\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: manage_stream.","operationId":"put-streams-name-queries-queryid","parameters":[{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"queryId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"kql":{"additionalProperties":false,"type":"object","properties":{"query":{"minLength":1,"type":"string"}},"required":["query"]},"title":{"minLength":1,"type":"string"}},"required":["title","kql"]}}}},"responses":{},"summary":"Upsert a query to a stream","tags":["streams"],"x-state":"Technical Preview"}},"/api/streams/{name}/significant_events":{"get":{"description":"Read the significant events\u003cbr/\u003e\u003cbr/\u003e[Required authorization] Route required privileges: read_stream.","operationId":"get-streams-name-significant-events","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"query","name":"from","required":true,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"bucketSize","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{}},{"enum":["null"],"nullable":true},{"not":{}}]}}}},"responses":{},"summary":"Read the significant events","tags":["streams"],"x-state":"Technical Preview"}},"/api/synthetics/monitors":{"get":{"description":"Get a list of monitors.\nYou must have `read` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-synthetic-monitors","parameters":[{"description":"Additional filtering criteria.","in":"query","name":"filter","schema":{"type":"string"}},{"description":"The locations to filter by.","in":"query","name":"locations","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"The monitor types to filter.","in":"query","name":"monitorTypes","schema":{"oneOf":[{"enum":["browser","http","icmp","tcp"],"type":"string"},{"type":"array"}]}},{"description":"The page number for paginated results.","in":"query","name":"page","schema":{"type":"integer"}},{"description":"The number of items to return per page.","in":"query","name":"per_page","schema":{"type":"integer"}},{"description":"The projects to filter by.","in":"query","name":"projects","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"A free-text query string.","in":"query","name":"query","schema":{"type":"string"}},{"description":"The schedules to filter by.","in":"query","name":"schedules","schema":{"oneOf":[{"type":"array"},{"type":"string"}]}},{"description":"The field to sort the results by.","in":"query","name":"sortField","schema":{"enum":["name","createdAt","updatedAt","status"],"type":"string"}},{"description":"The sort order.","in":"query","name":"sortOrder","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"The status to filter by.","in":"query","name":"status","schema":{"oneOf":[{"type":"array"},{"type":"string"}]}},{"description":"Tags to filter monitors.","in":"query","name":"tags","schema":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"description":"Specifies whether to apply logical AND filtering for specific fields. Accepts either a string with values \"tags\" or \"locations\" or an array containing both.\n","in":"query","name":"useLogicalAndFor","schema":{"oneOf":[{"enum":["tags","locations"],"type":"string"},{"items":{"enum":["tags","locations"],"type":"string"},"type":"array"}]}}],"responses":{"200":{"content":{"application/json":{"examples":{"getSyntheticMonitorsResponseExample1":{"description":"A successful response from `GET /api/synthetics/monitors?tags=prod\u0026monitorTypes=http\u0026locations=us-east-1\u0026projects=project1\u0026status=up`.","value":"{\n \"page\": 1,\n \"total\": 24,\n \"monitors\": [\n {\n \"type\": \"icmp\",\n \"enabled\": false,\n \"alert\": {\n \"status\": {\n \"enabled\": true\n },\n \"tls\": {\n \"enabled\": true\n }\n },\n \"schedule\": {\n \"number\": \"3\",\n \"unit\": \"m\"\n },\n \"config_id\": \"e59142e5-1fe3-4aae-b0b0-19d6345e65a1\",\n \"timeout\": \"16\",\n \"name\": \"8.8.8.8:80\",\n \"locations\": [\n {\n \"id\": \"us_central\",\n \"label\": \"North America - US Central\",\n \"geo\": {\n \"lat\": 41.25,\n \"lon\": -95.86\n },\n \"isServiceManaged\": true\n }\n ],\n \"namespace\": \"default\",\n \"origin\": \"ui\",\n \"id\": \"e59142e5-1fe3-4aae-b0b0-19d6345e65a1\",\n \"max_attempts\": 2,\n \"wait\": \"7\",\n \"revision\": 3,\n \"mode\": \"all\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"created_at\": \"2023-11-07T09:57:04.152Z\",\n \"updated_at\": \"2023-12-04T19:19:34.039Z\",\n \"host\": \"8.8.8.8:80\"\n }\n ],\n \"absoluteTotal\": 24,\n \"perPage\": 10,\n}"}},"schema":{"type":"object"}}},"description":"A successful response."}},"summary":"Get monitors","tags":["synthetics"]},"post":{"description":"Create a new monitor with the specified attributes. A monitor can be one of the following types: HTTP, TCP, ICMP, or Browser. The required and default fields may vary based on the monitor type.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"post-synthetic-monitors","requestBody":{"content":{"application/json":{"examples":{"postSyntheticMonitorsRequestExample1":{"description":"Create an HTTP monitor to check a website's availability.","summary":"HTTP monitor","value":"{\n \"type\": \"http\",\n \"name\": \"Website Availability\",\n \"url\": \"https://example.com\",\n \"tags\": [\"website\", \"availability\"],\n \"locations\": [\"united_kingdom\"]\n}"},"postSyntheticMonitorsRequestExample2":{"description":"Create a TCP monitor to monitor a server's availability.","summary":"TCP monitor","value":"{\n \"type\": \"tcp\",\n \"name\": \"Server Availability\",\n \"host\": \"example.com\",\n \"private_locations\": [\"my_private_location\"]\n}"},"postSyntheticMonitorsRequestExample3":{"description":"Create an ICMP monitor to perform ping checks.","summary":"ICMP monitor","value":"{\n \"type\": \"icmp\",\n \"name\": \"Ping Test\",\n \"host\": \"example.com\",\n \"locations\": [\"united_kingdom\"]\n}"},"postSyntheticMonitorsRequestExample4":{"description":"Create a browser monitor to check a website.","summary":"Browser monitor","value":"{\n \"type\": \"browser\",\n \"name\": \"Example journey\",\n \"inline_script\": \"step('Go to https://google.com.co', () =\u003e page.goto('https://www.google.com'))\",\n \"locations\": [\"united_kingdom\"]\n}"}},"schema":{"description":"The request body should contain the attributes of the monitor you want to create. The required and default fields differ depending on the monitor type.\n","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Synthetics_browserMonitorFields"},{"$ref":"#/components/schemas/Synthetics_httpMonitorFields"},{"$ref":"#/components/schemas/Synthetics_icmpMonitorFields"},{"$ref":"#/components/schemas/Synthetics_tcpMonitorFields"}]}}},"required":true},"responses":{"200":{"description":"A successful response."}},"summary":"Create a monitor","tags":["synthetics"]}},"/api/synthetics/monitors/_bulk_delete":{"post":{"description":"Delete multiple monitors by sending a list of config IDs.\n","operationId":"delete-synthetic-monitors","requestBody":{"content":{"application/json":{"examples":{"bulkDeleteRequestExample1":{"description":"Run `POST /api/synthetics/monitors/_bulk_delete` to delete a list of monitors.","value":"{\n \"ids\": [\n \"monitor1-id\",\n \"monitor2-id\"\n ]\n}"}},"schema":{"type":"object","properties":{"ids":{"description":"An array of monitor IDs to delete.","items":{"type":"string"},"type":"array"}},"required":["ids"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"deleteMonitorsResponseExample1":{"description":"A response from successfully deleting multiple monitors.","value":"[\n {\n \"id\": \"monitor1-id\",\n \"deleted\": true\n },\n {\n \"id\": \"monitor2-id\",\n \"deleted\": true\n }\n]"}},"schema":{"items":{"description":"The API response includes information about the deleted monitors.","type":"object","properties":{"deleted":{"description":"If it is `true`, the monitor was successfully deleted If it is `false`, the monitor was not deleted.\n","type":"boolean"},"ids":{"description":"The unique identifier of the deleted monitor.","type":"string"}}},"type":"array"}}}}},"summary":"Delete monitors","tags":["synthetics"]}},"/api/synthetics/monitors/{id}":{"delete":{"description":"Delete a monitor from the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"delete-synthetic-monitor","parameters":[{"description":"The identifier for the monitor that you want to delete.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"summary":"Delete a monitor","tags":["synthetics"]},"get":{"operationId":"get-synthetic-monitor","parameters":[{"description":"The ID of the monitor.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getSyntheticMonitorResponseExample1":{"description":"A successful response from `GET /api/synthetics/monitors/\u003cid\u003e`.","value":"{\n \"type\": \"http\",\n \"enabled\": true,\n \"alert\": {\n \"status\": {\n \"enabled\": true\n },\n \"tls\": {\n \"enabled\": true\n }\n },\n \"schedule\": {\n \"number\": \"3\",\n \"unit\": \"m\"\n },\n \"config_id\": \"a8188705-d01e-4bb6-87a1-64fa5e4b07ec\",\n \"timeout\": \"16\",\n \"name\": \"am i something\",\n \"locations\": [\n {\n \"id\": \"us_central\",\n \"label\": \"North America - US Central\",\n \"geo\": {\n \"lat\": 41.25,\n \"lon\": -95.86\n },\n \"isServiceManaged\": true\n }\n ],\n \"namespace\": \"default\",\n \"origin\": \"ui\",\n \"id\": \"a8188705-d01e-4bb6-87a1-64fa5e4b07ec\",\n \"max_attempts\": 2,\n \"__ui\": {\n \"is_tls_enabled\": false\n },\n \"max_redirects\": \"0\",\n \"response.include_body\": \"on_error\",\n \"response.include_headers\": true,\n \"check.request.method\": \"GET\",\n \"mode\": \"any\",\n \"response.include_body_max_bytes\": \"1024\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"ssl.verification_mode\": \"full\",\n \"ssl.supported_protocols\": [\n \"TLSv1.1\",\n \"TLSv1.2\",\n \"TLSv1.3\"\n ],\n \"revision\": 13,\n \"created_at\": \"2023-11-08T08:45:29.334Z\",\n \"updated_at\": \"2023-12-18T20:31:44.770Z\",\n \"url\": \"https://fast.com\"\n}"}},"schema":{"type":"object"}}}},"404":{"description":"If the monitor is not found, the API returns a 404 error."}},"summary":"Get a monitor","tags":["synthetics"]},"put":{"description":"Update a monitor with the specified attributes. The required and default fields may vary based on the monitor type.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\nYou can also partially update a monitor. This will only update the fields that are specified in the request body. All other fields are left unchanged. The specified fields should conform to the monitor type. For example, you can't update the `inline_scipt` field of a HTTP monitor.\n","operationId":"put-synthetic-monitor","parameters":[{"description":"The identifier for the monitor that you want to update.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"putSyntheticMonitorsRequestExample1":{"description":"Update an HTTP monitor that checks a website's availability.","summary":"HTTP monitor","value":"{\n \"type\": \"http\",\n \"name\": \"Website Availability\",\n \"url\": \"https://example.com\",\n \"tags\": [\"website\", \"availability\"],\n \"locations\": [\"united_kingdom\"]\n}"},"putSyntheticMonitorsRequestExample2":{"description":"Update a TCP monitor that monitors a server's availability.","summary":"TCP monitor","value":"{\n \"type\": \"tcp\",\n \"name\": \"Server Availability\",\n \"host\": \"example.com\",\n \"private_locations\": [\"my_private_location\"]\n}"},"putSyntheticMonitorsRequestExample3":{"description":"Update an ICMP monitor that performs ping checks.","summary":"ICMP monitor","value":"{\n \"type\": \"icmp\",\n \"name\": \"Ping Test\",\n \"host\": \"example.com\",\n \"locations\": [\"united_kingdom\"]\n}"},"putSyntheticMonitorsRequestExample4":{"description":"Update a browser monitor that checks a website.","summary":"Browser monitor","value":"{\n \"type\": \"browser\",\n \"name\": \"Example journey\",\n \"inline_script\": \"step('Go to https://google.com.co', () =\u003e page.goto('https://www.google.com'))\",\n \"locations\": [\"united_kingdom\"]\n}"}},"schema":{"description":"The request body should contain the attributes of the monitor you want to update. The required and default fields differ depending on the monitor type.\n","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Synthetics_browserMonitorFields"},{"$ref":"#/components/schemas/Synthetics_httpMonitorFields"},{"$ref":"#/components/schemas/Synthetics_icmpMonitorFields"},{"$ref":"#/components/schemas/Synthetics_tcpMonitorFields"}],"type":"object"}}},"required":true},"summary":"Update a monitor","tags":["synthetics"]}},"/api/synthetics/params":{"get":{"description":"Get a list of all parameters. You must have `read` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-parameters","responses":{"200":{"content":{"application/json":{"examples":{"getParametersResponseExample1":{"description":"A successful response for a user with read-only permissions to get a list of parameters.","summary":"Read access","value":"[\n {\n \"id\": \"param1-id\",\n \"key\": \"param1\",\n \"description\": \"Description for param1\",\n \"tags\": [\"tag1\", \"tag2\"],\n \"namespaces\": [\"namespace1\"]\n },\n {\n \"id\": \"param2-id\",\n \"key\": \"param2\",\n \"description\": \"Description for param2\",\n \"tags\": [\"tag3\"],\n \"namespaces\": [\"namespace2\"]\n }\n]"},"getParametersResponseExample2":{"description":"A successful response for a user with write permissions to get a list of parameters.","summary":"Write access","value":"[\n {\n \"id\": \"param1-id\",\n \"key\": \"param1\",\n \"description\": \"Description for param1\",\n \"tags\": [\"tag1\", \"tag2\"],\n \"namespaces\": [\"namespace1\"],\n \"value\": \"value1\"\n },\n {\n \"id\": \"param2-id\",\n \"key\": \"param2\",\n \"description\": \"Description for param2\",\n \"tags\": [\"tag3\"],\n \"namespaces\": [\"namespace2\"],\n \"value\": \"value2\"\n }\n]"}},"schema":{"items":[{"$ref":"#/components/schemas/Synthetics_getParameterResponse"}],"type":"array"}}},"description":"A successful response."}},"summary":"Get parameters","tags":["synthetics"]},"post":{"description":"Add one or more parameters to the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"post-parameters","requestBody":{"content":{"application/json":{"examples":{"postParametersRequestExample1":{"description":"Add a single parameter.","summary":"Single parameter","value":"{\n \"key\": \"your-key-name\",\n \"value\": \"your-parameter-value\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"share_across_spaces\": true\n}"},"postParametersRequestExample2":{"description":"Add multiple parameters.","summary":"Multiple parameters","value":"[\n {\n \"key\": \"param1\",\n \"value\": \"value1\"\n },\n {\n \"key\": \"param2\",\n \"value\": \"value2\"\n }\n]"}},"schema":{"oneOf":[{"items":{"$ref":"#/components/schemas/Synthetics_parameterRequest"},"type":"array"},{"$ref":"#/components/schemas/Synthetics_parameterRequest"}]}}},"description":"The request body can contain either a single parameter object or an array of parameter objects.","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"postParametersResponseExample1":{"description":"A successful response for a single added parameter.","summary":"Single parameter","value":"{\n \"id\": \"unique-parameter-id\",\n \"key\": \"your-key-name\",\n \"value\": \"your-param-value\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"share_across_spaces\": true\n}"},"postParametersResponseExample2":{"description":"A successful response for multiple added parameters.","summary":"Multiple parameters","value":"[\n {\n \"id\": \"param1-id\",\n \"key\": \"param1\",\n \"value\": \"value1\"\n },\n {\n \"id\": \"param2-id\",\n \"key\": \"param2\",\n \"value\": \"value2\"\n }\n]"}},"schema":{"oneOf":[{"items":{"$ref":"#/components/schemas/Synthetics_postParameterResponse"},"type":"array"},{"$ref":"#/components/schemas/Synthetics_postParameterResponse"}]}}},"description":"A successful response."}},"summary":"Add parameters","tags":["synthetics"]}},"/api/synthetics/params/_bulk_delete":{"delete":{"description":"Delete parameters from the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"delete-parameters","requestBody":{"content":{"application/json":{"examples":{"deleteParametersRequestExample1":{"description":"Run `POST /api/synthetics/params/_bulk_delete` to delete multiple parameters.","value":"{\n \"ids\": [\"param1-id\", \"param2-id\"]\n}"}},"schema":{"property":{"ids":{"description":"An array of parameter IDs to delete.","items":{"type":"string"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"deleteParametersResponseExample1":{"value":"[\n {\n \"id\": \"param1-id\",\n \"deleted\": true\n }\n]"}},"schema":{"items":{"type":"object","properties":{"deleted":{"description":"Indicates whether the parameter was successfully deleted. It is `true` if it was deleted. It is `false` if it was not deleted.\n","type":"boolean"},"id":{"description":"The unique identifier for the deleted parameter.","type":"string"}}},"type":"array"}}},"description":"A successful response."}},"summary":"Delete parameters","tags":["synthetics"]}},"/api/synthetics/params/{id}":{"delete":{"description":"Delete a parameter from the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"delete-parameter","parameters":[{"description":"The ID for the parameter to delete.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"summary":"Delete a parameter","tags":["synthetics"]},"get":{"description":"Get a parameter from the Synthetics app.\nYou must have `read` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-parameter","parameters":[{"description":"The unique identifier for the parameter.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getParameterResponseExample1":{"description":"A successful response for a user with read-only permissions to get a single parameter.","summary":"Read access","value":"{\n \"id\": \"unique-parameter-id\",\n \"key\": \"your-api-key\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"namespaces\": [\"namespace1\", \"namespace2\"]\n}"},"getParameterResponseExample2":{"description":"A successful response for a user with write permissions to get a single parameter.","summary":"Write access","value":"{\n \"id\": \"unique-parameter-id\",\n \"key\": \"your-param-key\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"namespaces\": [\"namespace1\", \"namespace2\"],\n \"value\": \"your-param-value\"\n}"}},"schema":{"$ref":"#/components/schemas/Synthetics_getParameterResponse"}}},"description":"A successful response."}},"summary":"Get a parameter","tags":["synthetics"]},"put":{"description":"Update a parameter in the Synthetics app.\nYou must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.\n","operationId":"put-parameter","parameters":[{"description":"The unique identifier for the parameter.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"putParameterRequestExample1":{"value":"{\n \"key\": \"updated_param_key\",\n \"value\": \"updated-param-value\",\n \"description\": \"Updated Param to be used in browser monitor\",\n \"tags\": [\"authentication\", \"security\", \"updated\"]\n}"}},"schema":{"type":"object","properties":{"description":{"description":"The updated description of the parameter.","type":"string"},"key":{"description":"The key of the parameter.","type":"string"},"tags":{"description":"An array of updated tags to categorize the parameter.","items":{"type":"string"},"type":"array"},"value":{"description":"The updated value associated with the parameter.","type":"string"}}}}},"description":"The request body cannot be empty; at least one attribute is required.","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"putParameterResponseExample1":{"value":"{\n \"id\": \"param_id1\",\n \"key\": \"updated_param_key\",\n \"value\": \"updated-param-value\",\n \"description\": \"Updated Param to be used in browser monitor\",\n \"tags\": [\"authentication\", \"security\", \"updated\"]\n}"}},"schema":{"type":"object"}}},"description":"A successful response."}},"summary":"Update a parameter","tags":["synthetics"]}},"/api/synthetics/private_locations":{"get":{"description":"Get a list of private locations.\nYou must have `read` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-private-locations","responses":{"200":{"content":{"application/json":{"examples":{"getPrivateLocationsResponseExample1":{"value":"[\n {\n \"label\": \"Test private location\",\n \"id\": \"fleet-server-policy\",\n \"agentPolicyId\": \"fleet-server-policy\",\n \"isInvalid\": false,\n \"geo\": {\n \"lat\": 0,\n \"lon\": 0\n },\n \"namespace\": \"default\"\n },\n {\n \"label\": \"Test private location 2\",\n \"id\": \"691225b0-6ced-11ee-8f5a-376306ee85ae\",\n \"agentPolicyId\": \"691225b0-6ced-11ee-8f5a-376306ee85ae\",\n \"isInvalid\": false,\n \"geo\": {\n \"lat\": 0,\n \"lon\": 0\n },\n \"namespace\": \"test\"\n }\n]"}},"schema":{"items":{"$ref":"#/components/schemas/Synthetics_getPrivateLocation"},"type":"array"}}},"description":"A successful response."}},"summary":"Get private locations","tags":["synthetics"]},"post":{"description":"You must have `all` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.","operationId":"post-private-location","requestBody":{"content":{"application/json":{"examples":{"postPrivateLocationRequestExample1":{"description":"Run `POST /api/private_locations` to create a private location.","value":"{\n \"label\": \"Private Location 1\",\n \"agentPolicyId\": \"abcd1234\",\n \"tags\": [\"private\", \"testing\"],\n \"geo\": {\n \"lat\": 40.7128,\n \"lon\": -74.0060\n }\n \"spaces\": [\"default\"]\n}"}},"schema":{"type":"object","properties":{"agentPolicyId":{"description":"The ID of the agent policy associated with the private location.","type":"string"},"geo":{"description":"Geographic coordinates (WGS84) for the location.","type":"object","properties":{"lat":{"description":"The latitude of the location.","type":"number"},"lon":{"description":"The longitude of the location.","type":"number"}},"required":["lat","lon"]},"label":{"description":"A label for the private location.","type":"string"},"spaces":{"description":"An array of space IDs where the private location is available. If it is not provided, the private location is available in all spaces.\n","items":{"type":"string"},"type":"array"},"tags":{"description":"An array of tags to categorize the private location.","items":{"type":"string"},"type":"array"}},"required":["agentPolicyId","label"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"postPrivateLocationResponseExample1":{"value":"{\n \"id\": \"abcd1234\",\n \"label\": \"Private Location 1\",\n \"agentPolicyId\": \"abcd1234\",\n \"tags\": [\"private\", \"testing\"],\n \"geo\": {\n \"lat\": 40.7128,\n \"lon\": -74.0060\n }\n}"}},"schema":{"type":"object"}}},"description":"A successful response."},"400":{"description":"If the `agentPolicyId` is already used by an existing private location or if the `label` already exists, the API will return a 400 Bad Request response with a corresponding error message."}},"summary":"Create a private location","tags":["synthetics"]}},"/api/synthetics/private_locations/{id}":{"delete":{"description":"You must have `all` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.\nThe API does not return a response body for deletion, but it will return an appropriate status code upon successful deletion.\nA location cannot be deleted if it has associated monitors in use. You must delete all monitors associated with the location before deleting the location.\n","operationId":"delete-private-location","parameters":[{"description":"The unique identifier of the private location to be deleted.","in":"path","name":"id","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}}],"summary":"Delete a private location","tags":["synthetics"]},"get":{"description":"You must have `read` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-private-location","parameters":[{"description":"A private location identifier or label.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"getPrivateLocationResponseExample1":{"value":"{\n \"label\": \"Test private location\",\n \"id\": \"test-private-location-id\",\n \"agentPolicyId\": \"test-private-location-id\",\n \"isServiceManaged\": false,\n \"isInvalid\": false,\n \"geo\": {\n \"lat\": 0,\n \"lon\": 0\n },\n \"namespace\": \"default\"\n}"}},"schema":{"$ref":"#/components/schemas/Synthetics_getPrivateLocation"}}},"description":"A successful response."}},"summary":"Get a private location","tags":["synthetics"]}},"/api/task_manager/_health":{"get":{"description":"Get the health status of the Kibana task manager.\n","operationId":"task-manager-health","responses":{"200":{"content":{"application/json":{"examples":{"taskManagerHealthResponse1":{"$ref":"#/components/examples/Task_manager_health_APIs_health_200response"}},"schema":{"$ref":"#/components/schemas/Task_manager_health_APIs_health_response"}}},"description":"Indicates a successful call"}},"summary":"Get the task manager health","tags":["task manager"]}},"/api/timeline":{"delete":{"description":"Delete one or more Timelines or Timeline templates.","operationId":"DeleteTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"savedObjectIds":{"description":"The list of IDs of the Timelines or Timeline templates to delete","example":["15c1929b-0af7-42bd-85a8-56e234cc7c4e"],"items":{"type":"string"},"type":"array"},"searchIds":{"description":"Saved search IDs that should be deleted alongside the timelines","example":["23f3-43g34g322-e5g5hrh6h-45454","6ce1b592-84e3-4b4a-9552-f189d4b82075"],"items":{"type":"string"},"type":"array"}},"required":["savedObjectIds"]}}},"description":"The IDs of the Timelines or Timeline templates to delete.","required":true},"responses":{"200":{"description":"Indicates the Timeline was successfully deleted."}},"summary":"Delete Timelines or Timeline templates","tags":["Security Timeline API"]},"get":{"description":"Get the details of an existing saved Timeline or Timeline template.","operationId":"GetTimeline","parameters":[{"description":"The `savedObjectId` of the template timeline to retrieve","in":"query","name":"template_timeline_id","schema":{"type":"string"}},{"description":"The `savedObjectId` of the Timeline to retrieve.","in":"query","name":"id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineResponse"}}},"description":"Indicates that the (template) Timeline was found and returned."}},"summary":"Get Timeline or Timeline template details","tags":["Security Timeline API"]},"patch":{"description":"Update an existing Timeline. You can update the title, description, date range, pinned events, pinned queries, and/or pinned saved queries of an existing Timeline.","operationId":"PatchTimeline","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timeline":{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline","description":"The timeline object of the Timeline or Timeline template that you’re updating."},"timelineId":{"description":"The `savedObjectId` of the Timeline or Timeline template that you’re updating.","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","nullable":true,"type":"string"},"version":{"description":"The version of the Timeline or Timeline template that you’re updating.","example":"WzE0LDFd","nullable":true,"type":"string"}},"required":["timelineId","version","timeline"]}}},"description":"The Timeline updates, along with the Timeline ID and version.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates that the Timeline was successfully updated."},"405":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"update timeline error","type":"string"},"statusCode":{"example":405,"type":"number"}}}}},"description":"Indicates that the user does not have the required access to create a Timeline."}},"summary":"Update a Timeline","tags":["Security Timeline API"]},"post":{"description":"Create a new Timeline or Timeline template.","operationId":"CreateTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineStatus","nullable":true},"templateTimelineId":{"description":"A unique identifier for the Timeline template.","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","nullable":true,"type":"string"},"templateTimelineVersion":{"description":"Timeline template version number.","example":12,"nullable":true,"type":"number"},"timeline":{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},"timelineId":{"description":"A unique identifier for the Timeline.","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","nullable":true,"type":"string"},"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType","nullable":true},"version":{"nullable":true,"type":"string"}},"required":["timeline"]}}},"description":"The required Timeline fields used to create a new Timeline, along with optional fields that will be created if not provided.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates the Timeline was successfully created."},"405":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"update timeline error","type":"string"},"statusCode":{"example":405,"type":"number"}}}}},"description":"Indicates that there was an error in the Timeline creation."}},"summary":"Create a Timeline or Timeline template","tags":["Security Timeline API"]}},"/api/timeline/_copy":{"get":{"description":"Copies and returns a timeline or timeline template.\n","operationId":"CopyTimeline","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timeline":{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},"timelineIdToCopy":{"type":"string"}},"required":["timeline","timelineIdToCopy"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates that the timeline has been successfully copied."}},"summary":"Copies timeline or timeline template","tags":["Security Timeline API"]}},"/api/timeline/_draft":{"get":{"description":"Get the details of the draft Timeline or Timeline template for the current user. If the user doesn't have a draft Timeline, an empty Timeline is returned.","operationId":"GetDraftTimelines","parameters":[{"in":"query","name":"timelineType","required":true,"schema":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates that the draft Timeline was successfully retrieved."},"403":{"content":{"application:json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"number"}}}}},"description":"If a draft Timeline was not found and we attempted to create one, it indicates that the user does not have the required permissions to create a draft Timeline."},"409":{"content":{"application:json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"number"}}}}},"description":"This should never happen, but if a draft Timeline was not found and we attempted to create one, it indicates that there is already a draft Timeline with the given `timelineId`."}},"summary":"Get draft Timeline or Timeline template details","tags":["Security Timeline API"]},"post":{"description":"Create a clean draft Timeline or Timeline template for the current user.\n\u003e info\n\u003e If the user already has a draft Timeline, the existing draft Timeline is cleared and returned.\n","operationId":"CleanDraftTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType"}},"required":["timelineType"]}}},"description":"The type of Timeline to create. Valid values are `default` and `template`.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_PersistTimelineResponse"}}},"description":"Indicates that the draft Timeline was successfully created. In the event the user already has a draft Timeline, the existing draft Timeline is cleared and returned."},"403":{"content":{"application:json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"number"}}}}},"description":"Indicates that the user does not have the required permissions to create a draft Timeline."},"409":{"content":{"application:json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"number"}}}}},"description":"Indicates that there is already a draft Timeline with the given `timelineId`."}},"summary":"Create a clean draft Timeline or Timeline template","tags":["Security Timeline API"]}},"/api/timeline/_export":{"post":{"description":"Export Timelines as an NDJSON file.","operationId":"ExportTimelines","parameters":[{"description":"The name of the file to export","in":"query","name":"file_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"items":{"type":"string"},"nullable":true,"type":"array"}}}}},"description":"The IDs of the Timelines to export.","required":true},"responses":{"200":{"content":{"application/ndjson":{"schema":{"description":"NDJSON of the exported Timelines","type":"string"}}},"description":"Indicates the Timelines were successfully exported."},"400":{"content":{"application/ndjson":{"schema":{"type":"object","properties":{"body":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Indicates that the export size limit was exceeded."}},"summary":"Export Timelines","tags":["Security Timeline API"]}},"/api/timeline/_favorite":{"patch":{"description":"Favorite a Timeline or Timeline template for the current user.","operationId":"PersistFavoriteRoute","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateTimelineId":{"nullable":true,"type":"string"},"templateTimelineVersion":{"nullable":true,"type":"number"},"timelineId":{"nullable":true,"type":"string"},"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType","nullable":true}},"required":["timelineId","templateTimelineId","templateTimelineVersion","timelineType"]}}},"description":"The required fields used to favorite a (template) Timeline.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_FavoriteTimelineResponse"}}},"description":"Indicates the favorite status was successfully updated."},"403":{"content":{"application:json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Indicates the user does not have the required permissions to persist the favorite status."}},"summary":"Favorite a Timeline or Timeline template","tags":["Security Timeline API"]}},"/api/timeline/_import":{"post":{"description":"Import Timelines.","operationId":"ImportTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{},"isImmutable":{"description":"Whether the Timeline should be immutable","enum":["true","false"],"type":"string"}},"required":["file"]}}},"description":"The Timelines to import as a readable stream.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_ImportTimelineResult"}}},"description":"Indicates the import of Timelines was successful."},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"Invalid file extension","type":"string"},"statusCode":{"example":400,"type":"number"}}}}},"description":"Indicates the import of Timelines was unsuccessful because of an invalid file extension."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"Unable to find saved object client","type":"string"},"statusCode":{"example":404,"type":"number"}}}}},"description":"Indicates that we were unable to locate the saved object client necessary to handle the import."},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"Could not import timelines","type":"string"},"statusCode":{"example":409,"type":"number"}}}}},"description":"Indicates the import of Timelines was unsuccessful."}},"summary":"Import Timelines","tags":["Security Timeline API"]}},"/api/timeline/_prepackaged":{"post":{"description":"Install or update prepackaged Timelines.","operationId":"InstallPrepackedTimelines","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prepackagedTimelines":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineSavedToReturnObject","nullable":true},"type":"array"},"timelinesToInstall":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_ImportTimelines","nullable":true},"type":"array"},"timelinesToUpdate":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_ImportTimelines","nullable":true},"type":"array"}},"required":["timelinesToInstall","timelinesToUpdate","prepackagedTimelines"]}}},"description":"The Timelines to install or update.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_ImportTimelineResult"}}},"description":"Indicates the installation of prepackaged Timelines was successful."},"500":{"content":{"application:json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"statusCode":{"type":"number"}}}}},"description":"Indicates the installation of prepackaged Timelines was unsuccessful."}},"summary":"Install prepackaged Timelines","tags":["Security Timeline API"]}},"/api/timeline/resolve":{"get":{"operationId":"ResolveTimeline","parameters":[{"description":"The ID of the template timeline to resolve","in":"query","name":"template_timeline_id","schema":{"type":"string"}},{"description":"The ID of the timeline to resolve","in":"query","name":"id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security_Timeline_API_ResolvedTimeline"}}},"description":"The (template) Timeline has been found"},"400":{"description":"The request is missing parameters"},"404":{"description":"The (template) Timeline was not found"}},"summary":"Get an existing saved Timeline or Timeline template","tags":["Security Timeline API"]}},"/api/timelines":{"get":{"description":"Get a list of all saved Timelines or Timeline templates.","operationId":"GetTimelines","parameters":[{"description":"If true, only timelines that are marked as favorites by the user are returned.","in":"query","name":"only_user_favorite","schema":{"enum":["true","false"],"nullable":true,"type":"string"}},{"in":"query","name":"timeline_type","schema":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType","nullable":true}},{"in":"query","name":"sort_field","schema":{"$ref":"#/components/schemas/Security_Timeline_API_SortFieldTimeline"}},{"description":"Whether to sort the results `ascending` or `descending`","in":"query","name":"sort_order","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"How many results should returned at once","in":"query","name":"page_size","schema":{"nullable":true,"type":"string"}},{"description":"How many pages should be skipped","in":"query","name":"page_index","schema":{"nullable":true,"type":"string"}},{"description":"Allows to search for timelines by their title","in":"query","name":"search","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"status","schema":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineStatus","nullable":true}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"customTemplateTimelineCount":{"description":"The amount of custom Timeline templates in the results","example":2,"type":"number"},"defaultTimelineCount":{"description":"The amount of `default` type Timelines in the results","example":90,"type":"number"},"elasticTemplateTimelineCount":{"description":"The amount of Elastic's Timeline templates in the results","example":8,"type":"number"},"favoriteCount":{"description":"The amount of favorited Timelines","example":5,"type":"number"},"templateTimelineCount":{"description":"The amount of Timeline templates in the results","example":10,"type":"number"},"timeline":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineResponse"},"type":"array"},"totalCount":{"description":"The total amount of results","example":100,"type":"number"}},"required":["timeline","totalCount"]}}},"description":"Indicates that the (template) Timelines were found and returned."},"400":{"content":{"application:json":{"schema":{"type":"object","properties":{"body":{"description":"The error message","example":"get timeline error","type":"string"},"statusCode":{"example":405,"type":"number"}}}}},"description":"Bad request. The user supplied invalid data."}},"summary":"Get Timelines or Timeline templates","tags":["Security Timeline API"]}},"/api/upgrade_assistant/status":{"get":{"description":"Check the status of your cluster.","operationId":"get-upgrade-status","responses":{"200":{"content":{"application/json":{"examples":{"getUpgradeStatusResponseExample1":{"value":"{\n \"readyForUpgrade\": false,\n \"cluster\": [\n {\n \"message\": \"Cluster deprecated issue\",\n \"details\":\"You have 2 system indices that must be migrated and 5 Elasticsearch deprecation issues and 0 Kibana deprecation issues that must be resolved before upgrading.\"\n }\n ]\n}"}}}},"description":"Indicates a successful call."}},"summary":"Get the upgrade readiness status","tags":["upgrade"],"x-state":"Technical Preview"}},"/api/uptime/settings":{"get":{"description":"You must have `read` privileges for the uptime feature in the Observability section of the Kibana feature privileges.\n","operationId":"get-uptime-settings","responses":{"200":{"content":{"application/json":{"examples":{"getUptimeSettingsResponseExample1":{"value":"{\n \"heartbeatIndices\": \"heartbeat-8*\",\n \"certExpirationThreshold\": 30,\n \"certAgeThreshold\": 730,\n \"defaultConnectors\": [\n \"08990f40-09c5-11ee-97ae-912b222b13d4\",\n \"db25f830-2318-11ee-9391-6b0c030836d6\"\n ],\n \"defaultEmail\": {\n \"to\": [],\n \"cc\": [],\n \"bcc\": []\n }\n}"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Get uptime settings","tags":["uptime"]},"put":{"description":"Update uptime setting attributes like `heartbeatIndices`, `certExpirationThreshold`, `certAgeThreshold`, `defaultConnectors`, or `defaultEmail`. You must have `all` privileges for the uptime feature in the Observability section of the Kibana feature privileges. A partial update is supported, provided settings keys will be merged with existing settings.\n","operationId":"put-uptime-settings","requestBody":{"content":{"application/json":{"examples":{"putUptimeSettingsRequestExample1":{"description":"Run `PUT api/uptime/settings` to update multiple Uptime settings.","summary":"Update multiple settings","value":"{\n \"heartbeatIndices\": \"heartbeat-8*\",\n \"certExpirationThreshold\": 30,\n \"certAgeThreshold\": 730,\n \"defaultConnectors\": [\n \"08990f40-09c5-11ee-97ae-912b222b13d4\",\n \"db25f830-2318-11ee-9391-6b0c030836d6\"\n ],\n \"defaultEmail\": {\n \"to\": [],\n \"cc\": [],\n \"bcc\": []\n }\n}"},"putUptimeSettingsRequestExample2":{"description":"Run `PUT api/uptime/settings` to update a single Uptime setting.","summary":"Update a setting","value":"{\n \"heartbeatIndices\": \"heartbeat-8*\",\n}"}},"schema":{"type":"object","properties":{"certAgeThreshold":{"default":730,"description":"The number of days after a certificate is created to trigger an alert.","type":"number"},"certExpirationThreshold":{"default":30,"description":"The number of days before a certificate expires to trigger an alert.","type":"number"},"defaultConnectors":{"default":[],"description":"A list of connector IDs to be used as default connectors for new alerts.","type":"array"},"defaultEmail":{"description":"The default email configuration for new alerts.\n","type":"object","properties":{"bcc":{"default":[],"items":[{"type":"string"}],"type":"array"},"cc":{"default":[],"items":[{"type":"string"}],"type":"array"},"to":{"default":[],"items":[{"type":"string"}],"type":"array"}}},"heartbeatIndices":{"default":"heartbeat-*","description":"An index pattern string to be used within the Uptime app and alerts to query Heartbeat data. \n","type":"string"}}}}}},"responses":{"200":{"content":{"application/json":{"examples":{"putUptimeSettingsResponseExample1":{"description":"A successful response from `PUT api/uptime/settings`.","value":"{\n \"heartbeatIndices\": \"heartbeat-8*\",\n \"certExpirationThreshold\": 30,\n \"certAgeThreshold\": 730,\n \"defaultConnectors\": [\n \"08990f40-09c5-11ee-97ae-912b222b13d4\",\n \"db25f830-2318-11ee-9391-6b0c030836d6\"\n ],\n \"defaultEmail\": {\n \"to\": [],\n \"cc\": [],\n \"bcc\": []\n }\n}"}},"schema":{"type":"object"}}},"description":"Indicates a successful call"}},"summary":"Update uptime settings","tags":["uptime"]}},"/s/{spaceId}/api/observability/slos":{"get":{"description":"You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"findSlosOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"description":"A valid kql query to filter the SLO with","example":"slo.name:latency* and slo.tags : \"prod\"","in":"query","name":"kqlQuery","schema":{"type":"string"}},{"description":"The page size to use for cursor-based pagination, must be greater or equal than 1","example":1,"in":"query","name":"size","schema":{"default":1,"type":"integer"}},{"description":"The cursor to use for fetching the results from, when using a cursor-base pagination.","in":"query","name":"searchAfter","schema":{"items":{"type":"string"},"type":"array"}},{"description":"The page to use for pagination, must be greater or equal than 1","example":1,"in":"query","name":"page","schema":{"default":1,"type":"integer"}},{"description":"Number of SLOs returned by page","example":25,"in":"query","name":"perPage","schema":{"default":25,"maximum":5000,"type":"integer"}},{"description":"Sort by field","example":"status","in":"query","name":"sortBy","schema":{"default":"status","enum":["sli_value","status","error_budget_consumed","error_budget_remaining"],"type":"string"}},{"description":"Sort order","example":"asc","in":"query","name":"sortDirection","schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},{"description":"Hide stale SLOs from the list as defined by stale SLO threshold in SLO settings","in":"query","name":"hideStale","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_find_slo_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Get a paginated list of SLOs","tags":["slo"]},"post":{"description":"You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"createSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_create_slo_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_create_slo_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_409_response"}}},"description":"Conflict - The SLO id already exists"}},"summary":"Create an SLO","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/_bulk_delete":{"post":{"description":"Bulk delete SLO definitions and their associated summary and rollup data. This endpoint initiates a bulk deletion operation for SLOs, which may take some time to complete. The status of the operation can be checked using the `GET /api/slo/_bulk_delete/{taskId}` endpoint.\n","operationId":"bulkDeleteOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_delete_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_delete_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Bulk delete SLO definitions and their associated summary and rollup data.","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/_bulk_delete/{taskId}":{"get":{"description":"Retrieve the status of the bulk deletion operation for SLOs. This endpoint returns the status of the bulk deletion operation, including whether it is completed and the results of the operation.\n","operationId":"bulkDeleteStatusOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"description":"The task id of the bulk delete operation","in":"path","name":"taskId","required":true,"schema":{"example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_delete_status_response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Retrieve the status of the bulk deletion","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/_bulk_purge_rollup":{"post":{"description":"The deletion occurs for the specified list of `sloId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"deleteRollupDataOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_purge_rollup_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_bulk_purge_rollup_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Batch delete rollup and summary data","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/_delete_instances":{"post":{"description":"The deletion occurs for the specified list of `sloId` and `instanceId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"deleteSloInstancesOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_delete_slo_instances_request"}}},"required":true},"responses":{"204":{"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Batch delete rollup and summary data","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/{sloId}":{"delete":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"deleteSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"responses":{"204":{"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Delete an SLO","tags":["slo"]},"get":{"description":"You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"getSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"},{"description":"the specific instanceId used by the summary calculation","example":"host-abcde","in":"query","name":"instanceId","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_slo_with_summary_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Get an SLO","tags":["slo"]},"put":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"updateSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_update_slo_request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_slo_definition_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Update an SLO","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/{sloId}/_reset":{"post":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"resetSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_slo_definition_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Reset an SLO","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/{sloId}/disable":{"post":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"disableSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"responses":{"204":{"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Disable an SLO","tags":["slo"]}},"/s/{spaceId}/api/observability/slos/{sloId}/enable":{"post":{"description":"You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"enableSloOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"$ref":"#/components/parameters/SLOs_slo_id"}],"responses":{"204":{"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_404_response"}}},"description":"Not found response"}},"summary":"Enable an SLO","tags":["slo"]}},"/s/{spaceId}/internal/observability/slos/_definitions":{"get":{"description":"You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n","operationId":"getDefinitionsOp","parameters":[{"$ref":"#/components/parameters/SLOs_kbn_xsrf"},{"$ref":"#/components/parameters/SLOs_space_id"},{"description":"Indicates if the API returns only outdated SLO or all SLO definitions","example":true,"in":"query","name":"includeOutdatedOnly","schema":{"type":"boolean"}},{"description":"Filters the SLOs by tag","in":"query","name":"tags","schema":{"type":"string"}},{"description":"Filters the SLOs by name","example":"my service availability","in":"query","name":"search","schema":{"type":"string"}},{"description":"The page to use for pagination, must be greater or equal than 1","example":1,"in":"query","name":"page","schema":{"type":"number"}},{"description":"Number of SLOs returned by page","example":100,"in":"query","name":"perPage","schema":{"default":100,"maximum":1000,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_find_slo_definitions_response"}}},"description":"Successful request"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_400_response"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_401_response"}}},"description":"Unauthorized response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLOs_403_response"}}},"description":"Unauthorized response"}},"summary":"Get the SLO definitions","tags":["slo"]}}},"components":{"examples":{"Alerting_get_health_response":{"summary":"Retrieve information about the health of the alerting framework.","value":{"alerting_framework_health":{"decryption_health":{"status":"ok","timestamp":"2023-01-13T01:28:00.280Z"},"execution_health":{"status":"ok","timestamp":"2023-01-13T01:28:00.280Z"},"read_health":{"status":"ok","timestamp":"2023-01-13T01:28:00.280Z"}},"has_permanent_encryption_key":true,"is_sufficiently_secure":true}},"Alerting_get_rule_types_response":{"summary":"Retrieve rule types associated with Kibana machine learning features","value":[{"action_groups":[{"id":"anomaly_score_match","name":"Anomaly score matched the condition"},{"id":"recovered","name":"Recovered"}],"action_variables":{"context":[{"description":"The bucket timestamp of the anomaly","name":"timestamp"},{"description":"The bucket time of the anomaly in ISO8601 format","name":"timestampIso8601"},{"description":"List of job IDs that triggered the alert","name":"jobIds"},{"description":"Alert info message","name":"message"},{"description":"Indicate if top hits contain interim results","name":"isInterim"},{"description":"Anomaly score at the time of the notification action","name":"score"},{"description":"Top records","name":"topRecords"},{"description":"Top influencers","name":"topInfluencers"},{"description":"URL to open in the Anomaly Explorer","name":"anomalyExplorerUrl","useWithTripleBracesInTemplates":true}],"params":[],"state":[]},"alerts":{"context":"ml.anomaly-detection","mappings":{"fieldMap":{"kibana.alert.anomaly_score":{"array":false,"type":"double","required":false},"kibana.alert.anomaly_timestamp":{"array":false,"type":"date","required":false},"kibana.alert.is_interim":{"array":false,"type":"boolean","required":false},"kibana.alert.job_id":{"array":false,"type":"keyword","required":true},"kibana.alert.top_influencers":{"array":true,"dynamic":false,"type":"object","properties":{"influencer_field_name":{"type":"keyword"},"influencer_field_value":{"type":"keyword"},"influencer_score":{"type":"double"},"initial_influencer_score":{"type":"double"},"is_interim":{"type":"boolean"},"job_id":{"type":"keyword"},"timestamp":{"type":"date"}},"required":false},"kibana.alert.top_records":{"array":true,"dynamic":false,"type":"object","properties":{"actual":{"type":"double"},"by_field_name":{"type":"keyword"},"by_field_value":{"type":"keyword"},"detector_index":{"type":"integer"},"field_name":{"type":"keyword"},"function":{"type":"keyword"},"initial_record_score":{"type":"double"},"is_interim":{"type":"boolean"},"job_id":{"type":"keyword"},"over_field_name":{"type":"keyword"},"over_field_value":{"type":"keyword"},"partition_field_name":{"type":"keyword"},"partition_field_value":{"type":"keyword"},"record_score":{"type":"double"},"timestamp":{"type":"date"},"typical":{"type":"double"}},"required":false}}},"shouldWrite":true},"authorized_consumers":{"alerts":{"all":true,"read":true},"apm":{"all":true,"read":true},"discover":{"all":true,"read":true},"infrastructure":{"all":true,"read":true},"logs":{"all":true,"read":true},"ml":{"all":true,"read":true},"monitoring":{"all":true,"read":true},"siem":{"all":true,"read":true},"slo":{"all":true,"read":true},"stackAlerts":{"all":true,"read":true},"uptime":{"all":true,"read":true}},"category":"management","default_action_group_id":"anomaly_score_match","does_set_recovery_context":true,"enabled_in_license":true,"has_alerts_mappings":true,"has_fields_for_a_a_d":true,"id":"xpack.ml.anomaly_detection_alert","is_exportable":true,"minimum_license_required":"platinum","name":"Anomaly detection alert","producer":"ml","recovery_action_group":{"id":"recovered","name":"Recovered"},"rule_task_timeout":"5m"},{"action_groups":[{"id":"anomaly_detection_realtime_issue","name":"Issue detected"},{"id":"recovered","name":"Recovered"}],"action_variables":{"context":[{"description":"Results of the rule execution","name":"results"},{"description":"Alert info message","name":"message"}],"params":[],"state":[]},"authorized_consumers":{"alerts":{"all":true,"read":true},"apm":{"all":true,"read":true},"discover":{"all":true,"read":true},"infrastructure":{"all":true,"read":true},"logs":{"all":true,"read":true},"ml":{"all":true,"read":true},"monitoring":{"all":true,"read":true},"siem":{"all":true,"read":true},"slo":{"all":true,"read":true},"stackAlerts":{"all":true,"read":true},"uptime":{"all":true,"read":true}},"category":"management","default_action_group_id":"anomaly_detection_realtime_issue","does_set_recovery_context":true,"enabled_in_license":true,"has_alerts_mappings":false,"has_fields_for_a_a_d":false,"id":"xpack.ml.anomaly_detection_jobs_health","is_exportable":true,"minimum_license_required":"platinum","name":"Anomaly detection jobs health","producer":"ml","recovery_action_group":{"id":"recovered","name":"Recovered"},"rule_task_timeout":"5m"}]},"APM_UI_agent_configuration_intake_object_delete_request1":{"description":"Run `DELETE /api/apm/settings/agent-configuration` to delete a configuration.","value":"{\n \"service\" : {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n }\n}\n"},"APM_UI_agent_configuration_intake_object_get_200_response1":{"description":"An example of a successful response from `GET /api/apm/settings/agent-configuration`.","value":"[\n {\n \"agent_name\": \"go\",\n \"service\": {\n \"name\": \"opbeans-go\",\n \"environment\": \"production\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"1\",\n \"capture_body\": \"off\",\n \"transaction_max_spans\": \"200\"\n },\n \"@timestamp\": 1581934104843,\n \"applied_by_agent\": false,\n \"etag\": \"1e58c178efeebae15c25c539da740d21dee422fc\"\n },\n {\n \"agent_name\": \"go\",\n \"service\": {\n \"name\": \"opbeans-go\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"1\",\n \"capture_body\": \"off\",\n \"transaction_max_spans\": \"300\"\n },\n \"@timestamp\": 1581934111727,\n \"applied_by_agent\": false,\n \"etag\": \"3eed916d3db434d9fb7f039daa681c7a04539a64\"\n },\n {\n \"agent_name\": \"nodejs\",\n \"service\": {\n \"name\": \"frontend\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"1\",\n },\n \"@timestamp\": 1582031336265,\n \"applied_by_agent\": false,\n \"etag\": \"5080ed25785b7b19f32713681e79f46996801a5b\"\n }\n]\n"},"APM_UI_agent_configuration_intake_object_put_request1":{"description":"Run `PUT /api/apm/settings/agent-configuration` to create or update configuration details.","value":"{\n \"service\": {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"0.4\",\n \"capture_body\": \"off\",\n \"transaction_max_spans\": \"500\"\n },\n \"agent_name\": \"nodejs\"\n}\n"},"APM_UI_agent_configuration_intake_object_search_200_response1":{"description":"An example of a successful response from `POST /api/apm/settings/agent-configuration/search`.","value":"{\n \"_index\": \".apm-agent-configuration\",\n \"_id\": \"CIaqXXABmQCdPphWj8EJ\",\n \"_score\": 2,\n \"_source\": {\n \"agent_name\": \"nodejs\",\n \"service\": {\n \"name\": \"frontend\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"1\",\n },\n \"@timestamp\": 1582031336265,\n \"applied_by_agent\": false,\n \"etag\": \"5080ed25785b7b19f32713681e79f46996801a5b\"\n }\n}\n"},"APM_UI_agent_configuration_intake_object_search_request1":{"description":"Run `POST /api/apm/settings/agent-configuration/search` to search configuration details.","value":"{\n \"etag\": \"1e58c178efeebae15c25c539da740d21dee422fc\",\n \"service\" : {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n }\n}\n"},"APM_UI_agent_keys_object_post_200_response1":{"description":"An example of a successful response from `POST /api/apm/agent_keys`, which creates an APM agent API key.","value":"{\n \"agentKey\": {\n \"id\": \"3DCLmn0B3ZMhLUa7WBG9\",\n \"name\": \"apm-key\",\n \"api_key\": \"PjGloCGOTzaZr8ilUPvkjA\",\n \"encoded\": \"M0RDTG1uMEIzWk1oTFVhN1dCRzk6UGpHbG9DR09UemFacjhpbFVQdmtqQQ==\"\n }\n}\n"},"APM_UI_agent_keys_object_post_request1":{"description":"Run `POST /api/apm/agent_keys` to create an APM agent API key with the specified privileges.","value":"{\n \"name\": \"apm-key\",\n \"privileges\": [\"event:write\", \"config_agent:read\"]\n}\n"},"APM_UI_annotation_object_post_200_response1":{"description":"An example of a successful response from `POST /api/apm/services/opbeans-java/annotation`, which creates an annotation for a service named `opbeans-java`.","value":"{\n \"_index\": \"observability-annotations\",\n \"_id\": \"Lc9I93EBh6DbmkeV7nFX\",\n \"_version\": 1,\n \"_seq_no\": 12,\n \"_primary_term\": 1,\n \"found\": true,\n \"_source\": {\n \"message\": \"Deployment 1.2\",\n \"@timestamp\": \"2020-05-08T10:31:30.452Z\",\n \"service\": {\n \"version\": \"1.2\",\n \"name\": \"opbeans-java\"\n },\n \"tags\": [\n \"apm\",\n \"elastic.co\",\n \"customer\"\n ],\n \"annotation\": {\n \"type\": \"deployment\"\n },\n \"event\": {\n \"created\": \"2020-05-09T02:34:43.937Z\"\n }\n }\n}\n"},"APM_UI_source_maps_get_200_response1":{"description":"A successful response from `GET /api/apm/sourcemaps`.","value":"{\n \"artifacts\": [\n {\n \"type\": \"sourcemap\",\n \"identifier\": \"foo-1.0.0\",\n \"relative_url\": \"/api/fleet/artifacts/foo-1.0.0/644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456\",\n \"body\": {\n \"serviceName\": \"foo\",\n \"serviceVersion\": \"1.0.0\",\n \"bundleFilepath\": \"/test/e2e/general-usecase/bundle.js\",\n \"sourceMap\": {\n \"version\": 3,\n \"file\": \"static/js/main.chunk.js\",\n \"sources\": [\n \"fleet-source-map-client/src/index.css\",\n \"fleet-source-map-client/src/App.js\",\n \"webpack:///./src/index.css?bb0a\",\n \"fleet-source-map-client/src/index.js\",\n \"fleet-source-map-client/src/reportWebVitals.js\"\n ],\n \"sourcesContent\": [\n \"content\"\n ],\n \"mappings\": \"mapping\",\n \"sourceRoot\": \"\"\n }\n },\n \"created\": \"2021-07-09T20:47:44.812Z\",\n \"id\": \"apm:foo-1.0.0-644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456\",\n \"compressionAlgorithm\": \"zlib\",\n \"decodedSha256\": \"644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456\",\n \"decodedSize\": 441,\n \"encodedSha256\": \"024c72749c3e3dd411b103f7040ae62633558608f480bce4b108cf5b2275bd24\",\n \"encodedSize\": 237,\n \"encryptionAlgorithm\": \"none\",\n \"packageName\": \"apm\"\n }\n ]\n}\n"},"APM_UI_source_maps_upload_200_response1":{"description":"A successful response from `POST /api/apm/sourcemaps`.","value":{"body":"eJyFkL1OwzAUhd/Fc+MbYMuCEBIbHRjKgBgc96R16tiWr1OQqr47NwqJxEK3q/PzWccXxchnZ7E1A1SjuhjVZtF2yOxiEPlO17oWox3D3uPFeSRTjmJQARfCPeiAgGx8NTKsYdAc1T3rwaSJGcds8Sp3c1HnhfywUZ3QhMTFFGepZxqMC9oex3CS9tpk1XyozgOlmoVKuJX1DqEQZ0su7PGtLU+V/3JPKc3cL7TJ2FNDRPov4bFta3MDM4f7W69lpJjLO9qdK8bzVPhcJz3HUCQ4LbO/p5hCSC4cZPByrp/wFqOklbpefwAhzpqI","compressionAlgorithm":"zlib","created":"2021-07-09T20:47:44.812Z","decodedSha256":"644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456","decodedSize":441,"encodedSha256":"024c72749c3e3dd411b103f7040ae62633558608f480bce4b108cf5b2275bd24","encodedSize":237,"encryptionAlgorithm":"none","id":"apm:foo-1.0.0-644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456","identifier":"foo-1.0.0","packageName":"apm","relative_url":"/api/fleet/artifacts/foo-1.0.0/644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456","type":"sourcemap"}},"Cases_add_comment_request":{"summary":"Adds a comment to a case.","value":{"comment":"A new comment.","owner":"cases","type":"user"}},"Cases_add_comment_response":{"summary":"The add comment to case API returns a JSON object that contains details about the case and its comments.","value":{"assignees":[],"category":null,"closed_at":null,"closed_by":null,"comments":[{"comment":"A new comment.","created_at":"2022-10-02T00:49:47.716Z","created_by":{"email":null,"full_name":null,"username":"elastic"},"id":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","owner":"cases","type":"user","version":"WzIwNDMxLDFd"}],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2022-03-24T00:37:03.906Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"Field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":true}],"description":"A case description.","duration":null,"external_service":null,"id":"293f1bc0-74f6-11ea-b83a-553aecdb28b6","owner":"cases","settings":{"syncAlerts":false},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":1,"updated_at":"2022-06-03T00:49:47.716Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzIzMzgsMV0="}},"Cases_create_case_request":{"summary":"Create a security case that uses a Jira connector.","value":{"connector":{"fields":{"issueType":"10006","parent":null,"priority":"High"},"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"}],"description":"A case description.","owner":"cases","settings":{"syncAlerts":true},"tags":["tag-1"],"title":"Case title 1"}},"Cases_create_case_response":{"summary":"The create case API returns a JSON object that contains details about the case.","value":{"assignees":[],"closed_at":null,"closed_by":null,"comments":[],"connector":{"fields":{"issueType":"10006","parent":null,"priority":"High"},"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira"},"created_at":"2022-10-13T15:33:50.604Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":null}],"description":"A case description.","duration":null,"external_service":null,"id":"66b9aa00-94fa-11ea-9f74-e7e108796192","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":0,"updated_at":null,"updated_by":null,"version":"WzUzMiwxXQ=="}},"Cases_find_case_activity_response":{"summary":"Retrieves all activity for a case","value":{"page":1,"perPage":20,"total":3,"userActions":[{"action":"create","comment_id":null,"created_at":"2023-10-20T01:17:22.150Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"b4cd0770-07c9-11ed-a5fd-47154cb8767e","owner":"cases","payload":{"assignees":[],"category":null,"connector":{"fields":null,"id":"none","name":"none","type":".none"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":null}],"description":"A case description.","owner":"cases","settings":{"syncAlerts":false},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1"},"type":"create_case","version":"WzM1ODg4LDFd"},{"action":"create","comment_id":"578608d0-03b1-11ed-920c-974bfa104448","created_at":"2023-10-14T20:12:53.354Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"57af14a0-03b1-11ed-920c-974bfa104448","owner":"cases","payload":{"comment":"A new comment","owner":"cases","type":"user"},"type":"comment","version":"WzM1ODg4LDFa"},{"action":"add","comment_id":null,"created_at":"2023-10-20T01:10:28.238Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"573c6980-6123-11ed-aa41-81a0a61fe447","owner":"cases","payload":{"assignees":{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}},"type":"assignees","version":"WzM1ODg4LDFb"}]}},"Cases_find_case_response":{"summary":"Retrieve the first five cases with the `tag-1` tag, in ascending order by last update time.","value":{"cases":[{"assignees":[],"category":null,"closed_at":null,"closed_by":null,"comments":[],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2023-10-12T00:16:36.371Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":null}],"description":"Case description","duration":null,"external_service":null,"id":"abed3a70-71bd-11ea-a0b2-c51ea50a58e2","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag-1"],"title":"Case title","totalAlerts":0,"totalComment":1,"updated_at":"2023-10-12T00:27:58.162Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzExMCwxXQ=="}],"count_closed_cases":0,"count_in_progress_cases":0,"count_open_cases":1,"page":1,"per_page":5,"total":1}},"Cases_find_connector_response":{"summary":"Retrieve information about the connectors and their settings.","value":[{"actionTypeId":".jira","config":{"apiUrl":"https://elastic.atlassian.net/","projectKey":"ES"},"id":"61787f53-4eee-4741-8df6-8fe84fa616f7","isDeprecated":false,"isMissingSecrets":false,"isPreconfigured":false,"name":"my-Jira","referencedByCount":0}]},"Cases_get_case_alerts_response":{"summary":"Retrieves all alerts attached to a case","value":[{"attached_at":"2022-07-25T20:09:40.963Z","id":"f6a7d0c3-d52d-432c-b2e6-447cd7fce04d","index":".alerts-observability.logs.alerts-default"}]},"Cases_get_case_configuration_response":{"summary":"Get the case configuration.","value":[{"closure_type":"close-by-user","connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2024-07-01T17:07:17.767Z","created_by":{"email":null,"full_name":null,"username":"elastic"},"customFields":[{"defaultValue":"Custom text field value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":false}],"error":null,"id":"856ee650-6c82-11ee-a20a-6164169afa58","mappings":[],"owner":"cases","templates":[{"caseFields":{"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],"category":"Default-category","connector":{"fields":null,"id":"none","name":"none","type":".none"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"Default text field value."}],"description":"A default description for cases.","settings":{"syncAlerts":false},"tags":["Default case tag"],"title":"Default case title"},"description":"A description of the template.","key":"505932fe-ee3a-4960-a661-c781b5acdb05","name":"template-1","tags":["Template tag 1"]}],"updated_at":null,"updated_by":null,"version":"WzEyLDNd"}]},"Cases_get_case_observability_response":{"summary":"Retrieves information about an Observability case including its alerts and comments.","value":{"assignees":[{"uid":"u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"}],"category":null,"closed_at":null,"closed_by":null,"comments":[{"alertId":["a6e12ac4-7bce-457b-84f6-d7ce8deb8446"],"created_at":"2023-11-06T19:29:38.424Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"59d438d0-79a9-4864-8d4b-e63adacebf6e","index":[".internal.alerts-observability.logs.alerts-default-000001"],"owner":"observability","pushed_at":null,"pushed_by":null,"rule":{"id":"03e4eb87-62ca-4e5d-9570-3d7625e9669d","name":"Observability rule"},"type":"alert","updated_at":null,"updated_by":null,"version":"WzY3LDJd"},{"comment":"The first comment.","created_at":"2023-11-06T19:29:57.812Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"d99342d3-3aa3-4b80-90ec-a702607604f5","owner":"observability","pushed_at":null,"pushed_by":null,"type":"user","updated_at":null,"updated_by":null,"version":"WzcyLDJd"}],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2023-11-06T19:29:04.086Z","created_by":{"email":null,"full_name":null,"username":"elastic"},"customFields":[],"description":"An Observability case description.","duration":null,"external_service":null,"id":"c3ff7550-def1-4e90-b6bc-c9969a4a09b1","owner":"observability","settings":{"syncAlerts":false},"severity":"low","status":"in-progress","tags":["observability","tag 1"],"title":"Observability case title 1","totalAlerts":1,"totalComment":1,"updated_at":"2023-11-06T19:47:55.662Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzI0NywyXQ=="}},"Cases_get_case_response":{"summary":"Retrieves information about a case including its comments.","value":{"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],"category":null,"closed_at":null,"closed_by":null,"comments":[{"comment":"A new comment","created_at":"2023-10-13T15:40:32.335Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"2134c1d0-02c2-11ed-85f2-4f7c222ca2fa","owner":"cases","pushed_at":null,"pushed_by":null,"type":"user","updated_at":null,"updated_by":null,"version":"WzM3LDFd"}],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2023-10-13T15:33:50.604Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":null}],"description":"A case description","duration":null,"external_service":null,"id":"31cdada0-02c1-11ed-85f2-4f7c222ca2fa","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":1,"updated_at":"2023-10-13T15:40:32.335Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzM2LDFd"}},"Cases_get_comment_response":{"summary":"A single user comment retrieved from a case","value":{"comment":"A new comment","created_at":"2023-10-07T19:32:13.104Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"8048b460-fe2b-11ec-b15d-779a7c8bbcc3","owner":"cases","pushed_at":null,"pushed_by":null,"type":"user","updated_at":null,"updated_by":null,"version":"WzIzLDFd"}},"Cases_get_reporters_response":{"summary":"A list of two users that opened cases","value":[{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},{"email":"jdoe@example.com","full_name":"Jane Doe","profile_uid":"u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0","username":"jdoe"}]},"Cases_get_tags_response":{"summary":"A list of tags that are used in cases","value":["observability","security","tag 1","tag 2"]},"Cases_push_case_response":{"summary":"The push case API returns a JSON object with details about the case and the external service.","value":{"closed_at":null,"closed_by":null,"comments":[],"connector":{"fields":{"issueType":"10006","parent":null,"priority":"Low"},"id":"09f8c0b0-0eda-11ed-bd18-65557fe66949","name":"My connector","type":".jira"},"created_at":"2022-07-29T00:59:39.444Z","created_by":{"email":null,"full_name":null,"username":"elastic"},"description":"A case description.","duration":null,"external_service":{"connector_id":"09f8c0b0-0eda-11ed-bd18-65557fe66949","connector_name":"My connector","external_id":"71926","external_title":"ES-554","external_url":"https://cases.jira.com","pushed_at":"2022-07-29T01:20:58.436Z","pushed_by":{"email":null,"full_name":null,"username":"elastic"}},"id":"b917f300-0ed9-11ed-bd18-65557fe66949","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":0,"updated_at":"2022-07-29T01:20:58.436Z","updated_by":{"email":null,"full_name":null,"username":"elastic"},"version":"WzE3NjgsM10="}},"Cases_set_case_configuration_request":{"summary":"Set the closure type, custom fields, and default connector for Stack Management cases.","value":{"closure_type":"close-by-user","connector":{"fields":null,"id":"5e656730-e1ca-11ec-be9b-9b1838238ee6","name":"my-jira-connector","type":".jira"},"customFields":[{"defaultValue":"My custom field default value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":false}],"owner":"cases","templates":[{"caseFields":{"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],"category":"Default-category","customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"A text field value for the template."}],"description":"A default description for cases.","tags":["Default case tag"],"title":"Default case title"},"description":"A description of the template.","key":"505932fe-ee3a-4960-a661-c781b5acdb05","name":"template-1","tags":["Template tag 1"]}]}},"Cases_set_case_configuration_response":{"summary":"This is an example response for case settings.","value":{"closure_type":"close-by-user","connector":{"fields":null,"id":"5e656730-e1ca-11ec-be9b-9b1838238ee6","name":"my-jira-connector","type":".jira"},"created_at":"2024-07-01T17:07:17.767Z","created_by":{"email":"null,","full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"defaultValue":"My custom field default value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":false}],"error":null,"id":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","mappings":[{"action_type":"overwrite","source":"title","target":"summary"},{"action_type":"overwrite","source":"description","target":"description"},{"action_type":"append","source":"comments","target":"comments"},{"action_type":"overwrite","source":"tags","target":"labels"}],"owner":"cases","templates":[{"caseFields":{"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],"category":"Default-category","customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"A text field value for the template."}],"description":"A default description for cases.","tags":["Default case tag"],"title":"Default case title"},"description":"A description of the template.","key":"505932fe-ee3a-4960-a661-c781b5acdb05","name":"template-1","tags":["Template tag 1"]}],"updated_at":null,"updated_by":null,"version":"WzIwNzMsMV0="}},"Cases_update_case_configuration_request":{"summary":"Update the case settings.","value":{"closure_type":"close-by-user","connector":{"fields":null,"id":"5e656730-e1ca-11ec-be9b-9b1838238ee6","name":"my-jira-connector","type":".jira"},"customFields":[{"defaultValue":"A new default value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":true},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","label":"my-toggle","type":"toggle","required":false}],"version":"WzExOSw0XQ=="}},"Cases_update_case_configuration_response":{"summary":"This is an example response when the case configuration was updated.","value":{"closure_type":"close-by-user","connector":{"fields":null,"id":"5e656730-e1ca-11ec-be9b-9b1838238ee6","name":"my-jira-connector","type":".jira"},"created_at":"2024-07-01T17:07:17.767Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"defaultValue":"A new default value.","key":"d312efda-ec2b-42ec-9e2c-84981795c581","label":"my-text-field","type":"text","required":true},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","label":"my-toggle","type":"toggle","required":false}],"error":null,"id":"4a97a440-e1cd-11ec-be9b-9b1838238ee6","mappings":[{"action_type":"overwrite","source":"title","target":"summary"},{"action_type":"overwrite","source":"description","target":"description"},{"action_type":"overwrite","source":"tags","target":"labels"},{"action_type":"append","source":"comments","target":"comments"}],"owner":"cases","templates":[],"updated_at":"2024-07-19T00:52:42.401Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzI2LDNd"}},"Cases_update_case_request":{"summary":"Update the case description, tags, and connector.","value":{"cases":[{"connector":{"fields":{"issueType":"10006","parent":null,"priority":null},"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira"},"customFields":[{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":false},{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My new field value"}],"description":"A case description.","id":"a18b38a0-71b0-11ea-a0b2-c51ea50a58e2","settings":{"syncAlerts":true},"tags":["tag-1"],"version":"WzIzLDFd"}]}},"Cases_update_case_response":{"summary":"This is an example response when the case description, tags, and connector were updated.","value":[{"assignees":[],"category":null,"closed_at":null,"closed_by":null,"comments":[],"connector":{"fields":{"issueType":"10006","parent":null,"priority":null},"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira"},"created_at":"2023-10-13T09:16:17.416Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My new field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":false}],"description":"A case description.","duration":null,"external_service":{"connector_id":"05da469f-1fde-4058-99a3-91e4807e2de8","connector_name":"Jira","external_id":"10003","external_title":"IS-4","external_url":"https://hms.atlassian.net/browse/IS-4","pushed_at":"2023-10-13T09:20:40.672Z","pushed_by":{"email":null,"full_name":null,"username":"elastic"}},"id":"66b9aa00-94fa-11ea-9f74-e7e108796192","owner":"cases","settings":{"syncAlerts":true},"severity":"low","status":"open","tags":["tag-1"],"title":"Case title 1","totalAlerts":0,"totalComment":0,"updated_at":"2023-10-13T09:48:33.043Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzU0OCwxXQ=="}]},"Cases_update_comment_request":{"summary":"Updates a comment of a case.","value":{"comment":"An updated comment.","id":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","owner":"cases","type":"user","version":"Wzk1LDFd"}},"Cases_update_comment_response":{"summary":"The add comment to case API returns a JSON object that contains details about the case and its comments.","value":{"assignees":[],"category":null,"closed_at":null,"closed_by":null,"comments":[{"comment":"An updated comment.","created_at":"2023-10-24T00:37:10.832Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"id":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","owner":"cases","pushed_at":null,"pushed_by":null,"type":"user","updated_at":"2023-10-24T01:27:06.210Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzIwNjM3LDFd"}],"connector":{"fields":null,"id":"none","name":"none","type":".none"},"created_at":"2023-10-24T00:37:03.906Z","created_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My new field value"},{"key":"fcc6840d-eb14-42df-8aaf-232201a705ec","type":"toggle","value":false}],"description":"A case description.","duration":null,"external_service":null,"id":"293f1bc0-74f6-11ea-b83a-553aecdb28b6","owner":"cases","settings":{"syncAlerts":false},"severity":"low","status":"open","tags":["tag 1"],"title":"Case title 1","totalAlerts":0,"totalComment":1,"updated_at":"2023-10-24T01:27:06.210Z","updated_by":{"email":null,"full_name":null,"profile_uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","username":"elastic"},"version":"WzIwNjM2LDFd"}},"Data_views_create_data_view_request":{"summary":"Create a data view with runtime fields.","value":{"data_view":{"name":"My Logstash data view","runtimeFieldMap":{"runtime_shape_name":{"script":{"source":"emit(doc['shape_name'].value)"},"type":"keyword"}},"title":"logstash-*"}}},"Data_views_create_runtime_field_request":{"summary":"Create a runtime field.","value":{"name":"runtimeFoo","runtimeField":{"script":{"source":"emit(doc[\"foo\"].value)"},"type":"long"}}},"Data_views_get_data_view_response":{"summary":"The get data view API returns a JSON object that contains information about the data view.","value":{"data_view":{"allowNoIndex":false,"fieldAttrs":{"products.manufacturer":{"count":1},"products.price":{"count":1},"products.product_name":{"count":1},"total_quantity":{"count":1}},"fieldFormats":{"products.base_price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.base_unit_price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.min_price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.taxful_price":{"id":"number","params":{"pattern":"$0,0.00"}},"products.taxless_price":{"id":"number","params":{"pattern":"$0,0.00"}},"taxful_total_price":{"id":"number","params":{"pattern":"$0,0.[00]"}},"taxless_total_price":{"id":"number","params":{"pattern":"$0,0.00"}}},"fields":{"_id":{"aggregatable":false,"count":0,"esTypes":["_id"],"format":{"id":"string"},"isMapped":true,"name":"_id","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"_index":{"aggregatable":true,"count":0,"esTypes":["_index"],"format":{"id":"string"},"isMapped":true,"name":"_index","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"_score":{"aggregatable":false,"count":0,"format":{"id":"number"},"isMapped":true,"name":"_score","readFromDocValues":false,"scripted":false,"searchable":false,"shortDotsEnable":false,"type":"number"},"_source":{"aggregatable":false,"count":0,"esTypes":["_source"],"format":{"id":"_source"},"isMapped":true,"name":"_source","readFromDocValues":false,"scripted":false,"searchable":false,"shortDotsEnable":false,"type":"_source"},"category":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"category","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"category.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"category.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"category"}},"type":"string"},"currency":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"currency","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_birth_date":{"aggregatable":true,"count":0,"esTypes":["date"],"format":{"id":"date"},"isMapped":true,"name":"customer_birth_date","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"date"},"customer_first_name":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"customer_first_name","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_first_name.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_first_name.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"customer_first_name"}},"type":"string"},"customer_full_name":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"customer_full_name","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_full_name.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_full_name.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"customer_full_name"}},"type":"string"},"customer_gender":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_gender","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_id":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_id","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_last_name":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"customer_last_name","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"customer_last_name.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_last_name.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"customer_last_name"}},"type":"string"},"customer_phone":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"customer_phone","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"day_of_week":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"day_of_week","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"day_of_week_i":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"day_of_week_i","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"email":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"email","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"event.dataset":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"event.dataset","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"geoip.city_name":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"geoip.city_name","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"geoip.continent_name":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"geoip.continent_name","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"geoip.country_iso_code":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"geoip.country_iso_code","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"geoip.location":{"aggregatable":true,"count":0,"esTypes":["geo_point"],"format":{"id":"geo_point","params":{"transform":"wkt"}},"isMapped":true,"name":"geoip.location","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"geo_point"},"geoip.region_name":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"geoip.region_name","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"manufacturer":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"manufacturer","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"manufacturer.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"manufacturer.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"manufacturer"}},"type":"string"},"order_date":{"aggregatable":true,"count":0,"esTypes":["date"],"format":{"id":"date"},"isMapped":true,"name":"order_date","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"date"},"order_id":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"order_id","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products._id":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"products._id","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products._id.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products._id.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"products._id"}},"type":"string"},"products.base_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.base_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.base_unit_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.base_unit_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.category":{"aggregatable":false,"count":0,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"products.category","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products.category.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products.category.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"products.category"}},"type":"string"},"products.created_on":{"aggregatable":true,"count":0,"esTypes":["date"],"format":{"id":"date"},"isMapped":true,"name":"products.created_on","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"date"},"products.discount_amount":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number"},"isMapped":true,"name":"products.discount_amount","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.discount_percentage":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number"},"isMapped":true,"name":"products.discount_percentage","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.manufacturer":{"aggregatable":false,"count":1,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"products.manufacturer","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products.manufacturer.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products.manufacturer.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"products.manufacturer"}},"type":"string"},"products.min_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.min_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.price":{"aggregatable":true,"count":1,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.product_id":{"aggregatable":true,"count":0,"esTypes":["long"],"format":{"id":"number"},"isMapped":true,"name":"products.product_id","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.product_name":{"aggregatable":false,"count":1,"esTypes":["text"],"format":{"id":"string"},"isMapped":true,"name":"products.product_name","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products.product_name.keyword":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products.product_name.keyword","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"subType":{"multi":{"parent":"products.product_name"}},"type":"string"},"products.quantity":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"products.quantity","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.sku":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"products.sku","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"products.tax_amount":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number"},"isMapped":true,"name":"products.tax_amount","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.taxful_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.taxful_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.taxless_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"products.taxless_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"products.unit_discount_amount":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number"},"isMapped":true,"name":"products.unit_discount_amount","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"sku":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"sku","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"taxful_total_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.[00]"}},"isMapped":true,"name":"taxful_total_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"taxless_total_price":{"aggregatable":true,"count":0,"esTypes":["half_float"],"format":{"id":"number","params":{"pattern":"$0,0.00"}},"isMapped":true,"name":"taxless_total_price","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"total_quantity":{"aggregatable":true,"count":1,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"total_quantity","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"total_unique_products":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"total_unique_products","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"type":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"type","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"user":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"user","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"}},"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"Kibana Sample Data eCommerce","namespaces":["default"],"runtimeFieldMap":{},"sourceFilters":[],"timeFieldName":"order_date","title":"kibana_sample_data_ecommerce","typeMeta":{},"version":"WzUsMV0="}}},"Data_views_get_data_views_response":{"summary":"The get all data views API returns a list of data views.","value":{"data_view":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"Kibana Sample Data eCommerce","namespaces":["default"],"title":"kibana_sample_data_ecommerce","typeMeta":{}},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"Kibana Sample Data Flights","namespaces":["default"],"title":"kibana_sample_data_flights"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"Kibana Sample Data Logs","namespaces":["default"],"title":"kibana_sample_data_logs"}]}},"Data_views_get_default_data_view_response":{"summary":"The get default data view API returns the default data view identifier.","value":{"data_view_id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f"}},"Data_views_get_runtime_field_response":{"summary":"The get runtime field API returns a JSON object that contains information about the runtime field (`hour_of_day`) and the data view (`d3d7af60-4c81-11e8-b3d7-01146121b73d`).","value":{"data_view":{"allowNoIndex":false,"fieldAttrs":{},"fieldFormats":{"AvgTicketPrice":{"id":"number","params":{"pattern":"$0,0.[00]"}},"hour_of_day":{"id":"number","params":{"pattern":"00"}}},"fields":{"_id":{"aggregatable":false,"count":0,"esTypes":["_id"],"format":{"id":"string"},"isMapped":true,"name":"_id","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"_index":{"aggregatable":true,"count":0,"esTypes":["_index"],"format":{"id":"string"},"isMapped":true,"name":"_index","readFromDocValues":false,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"_score":{"aggregatable":false,"count":0,"format":{"id":"number"},"isMapped":true,"name":"_score","readFromDocValues":false,"scripted":false,"searchable":false,"shortDotsEnable":false,"type":"number"},"_source":{"aggregatable":false,"count":0,"esTypes":["_source"],"format":{"id":"_source"},"isMapped":true,"name":"_source","readFromDocValues":false,"scripted":false,"searchable":false,"shortDotsEnable":false,"type":"_source"},"AvgTicketPrice":{"aggregatable":true,"count":0,"esTypes":["float"],"format":{"id":"number","params":{"pattern":"$0,0.[00]"}},"isMapped":true,"name":"AvgTicketPrice","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"Cancelled":{"aggregatable":true,"count":0,"esTypes":["boolean"],"format":{"id":"boolean"},"isMapped":true,"name":"Cancelled","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"boolean"},"Carrier":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"Carrier","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"dayOfWeek":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"dayOfWeek","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"Dest":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"Dest","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestAirportID":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestAirportID","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestCityName":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestCityName","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestCountry":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestCountry","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestLocation":{"aggregatable":true,"count":0,"esTypes":["geo_point"],"format":{"id":"geo_point","params":{"transform":"wkt"}},"isMapped":true,"name":"DestLocation","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"geo_point"},"DestRegion":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestRegion","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DestWeather":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"DestWeather","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"DistanceKilometers":{"aggregatable":true,"count":0,"esTypes":["float"],"format":{"id":"number"},"isMapped":true,"name":"DistanceKilometers","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"DistanceMiles":{"aggregatable":true,"count":0,"esTypes":["float"],"format":{"id":"number"},"isMapped":true,"name":"DistanceMiles","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"FlightDelay":{"aggregatable":true,"count":0,"esTypes":["boolean"],"format":{"id":"boolean"},"isMapped":true,"name":"FlightDelay","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"boolean"},"FlightDelayMin":{"aggregatable":true,"count":0,"esTypes":["integer"],"format":{"id":"number"},"isMapped":true,"name":"FlightDelayMin","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"FlightDelayType":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"FlightDelayType","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"FlightNum":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"FlightNum","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"FlightTimeHour":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"FlightTimeHour","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"FlightTimeMin":{"aggregatable":true,"count":0,"esTypes":["float"],"format":{"id":"number"},"isMapped":true,"name":"FlightTimeMin","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"hour_of_day":{"aggregatable":true,"count":0,"esTypes":["long"],"format":{"id":"number","params":{"pattern":"00"}},"name":"hour_of_day","readFromDocValues":false,"runtimeField":{"script":{"source":"emit(doc['timestamp'].value.getHour());"},"type":"long"},"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"},"Origin":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"Origin","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginAirportID":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginAirportID","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginCityName":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginCityName","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginCountry":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginCountry","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginLocation":{"aggregatable":true,"count":0,"esTypes":["geo_point"],"format":{"id":"geo_point","params":{"transform":"wkt"}},"isMapped":true,"name":"OriginLocation","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"geo_point"},"OriginRegion":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginRegion","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"OriginWeather":{"aggregatable":true,"count":0,"esTypes":["keyword"],"format":{"id":"string"},"isMapped":true,"name":"OriginWeather","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"string"},"timestamp":{"aggregatable":true,"count":0,"esTypes":["date"],"format":{"id":"date"},"isMapped":true,"name":"timestamp","readFromDocValues":true,"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"date"}},"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"Kibana Sample Data Flights","runtimeFieldMap":{"hour_of_day":{"script":{"source":"emit(doc['timestamp'].value.getHour());"},"type":"long"}},"sourceFilters":[],"timeFieldName":"timestamp","title":"kibana_sample_data_flights","version":"WzM2LDJd"},"fields":[{"aggregatable":true,"count":0,"esTypes":["long"],"name":"hour_of_day","readFromDocValues":false,"runtimeField":{"script":{"source":"emit(doc['timestamp'].value.getHour());"},"type":"long"},"scripted":false,"searchable":true,"shortDotsEnable":false,"type":"number"}]}},"Data_views_preview_swap_data_view_request":{"summary":"Preview swapping references from data view ID \"abcd-efg\" to \"xyz-123\".","value":{"fromId":"abcd-efg","toId":"xyz-123"}},"Data_views_set_default_data_view_request":{"summary":"Set the default data view identifier.","value":{"data_view_id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","force":true}},"Data_views_swap_data_view_request":{"summary":"Swap references from data view ID \"abcd-efg\" to \"xyz-123\" and remove the data view that is no longer referenced.","value":{"delete":true,"fromId":"abcd-efg","toId":"xyz-123"}},"Data_views_update_data_view_request":{"summary":"Update some properties for a data view.","value":{"data_view":{"allowNoIndex":false,"name":"Kibana Sample Data eCommerce","timeFieldName":"order_date","title":"kibana_sample_data_ecommerce"},"refresh_fields":true}},"Data_views_update_field_metadata_request":{"summary":"Update metadata for multiple fields.","value":{"fields":{"field1":{"count":123,"customLabel":"Field 1 label"},"field2":{"customDescription":"Field 2 description","customLabel":"Field 2 label"}}}},"Data_views_update_runtime_field_request":{"summary":"Update an existing runtime field on a data view.","value":{"runtimeField":{"script":{"source":"emit(doc[\"bar\"].value)"}}}},"Machine_learning_APIs_mlSyncExample":{"summary":"Two anomaly detection jobs required synchronization in this example.","value":{"datafeedsAdded":{},"datafeedsRemoved":{},"savedObjectsCreated":{"anomaly-detector":{"myjob1":{"success":true},"myjob2":{"success":true}}},"savedObjectsDeleted":{}}},"Saved_objects_key_rotation_response":{"summary":"Encryption key rotation using default parameters.","value":{"failed":0,"successful":300,"total":1000}},"Saved_objects_resolve_missing_reference_request":{"value":{"file":"file.ndjson","retries":[{"id":"my-pattern","overwrite":true,"type":"index-pattern"},{"destinationId":"another-vis","id":"my-vis","overwrite":true,"type":"visualization"},{"destinationId":"yet-another-canvas","id":"my-canvas","overwrite":true,"type":"canvas"},{"id":"my-dashboard","type":"dashboard"}]}},"Saved_objects_resolve_missing_reference_response":{"summary":"Resolve missing reference errors.","value":{"success":true,"successCount":3,"successResults":[{"id":"my-vis","meta":{"icon":"visualizeApp","title":"Look at my visualization"},"type":"visualization"},{"id":"my-search","meta":{"icon":"searchApp","title":"Look at my search"},"type":"search"},{"id":"my-dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"},"type":"dashboard"}]}},"Task_manager_health_APIs_health_200response":{"description":"A successful response from `GET api/task_manager/_health`.","value":"{\n \"id\": \"330bbc6a-56cd-44d5-88e3-e3229f14d619\",\n \"timestamp\": \"2025-03-21T21:30:04.780Z\",\n \"status\": \"OK\",\n \"last_update\": \"2025-03-21T21:30:04.455Z\",\n \"stats\": {\n \"configuration\": {\n \"timestamp\": \"2025-03-21T21:26:10.002Z\",\n \"value\": {\n \"request_capacity\": 1000,\n \"monitored_aggregated_stats_refresh_rate\": 60000,\n \"monitored_stats_running_average_window\": 50,\n \"monitored_task_execution_thresholds\": {\n \"custom\": {},\n \"default\": {\n \"error_threshold\": 90,\n \"warn_threshold\": 80\n }\n },\n \"claim_strategy\": \"mget\",\n \"poll_interval\": 500,\n \"capacity\": {\n \"config\": 10,\n \"as_workers\": 10,\n \"as_cost\": 20\n }\n },\n \"status\": \"OK\"\n },\n \"runtime\": {\n \"timestamp\": \"2025-03-21T21:30:04.455Z\",\n \"value\": {\n \"polling\": {\n \"last_successful_poll\": \"2025-03-21T21:30:04.455Z\",\n \"last_polling_delay\": \"2025-03-21T21:26:10.001Z\",\n \"claim_duration\": {\n \"p50\": 17,\n \"p90\": 22,\n \"p95\": 25,\n \"p99\": 27\n },\n \"duration\": {\n \"p50\": 19,\n \"p90\": 25.5,\n \"p95\": 28,\n \"p99\": 28\n },\n \"claim_conflicts\": {\n \"p50\": 0,\n \"p90\": 0,\n \"p95\": 0,\n \"p99\": 0\n },\n \"claim_mismatches\": {\n \"p50\": 0,\n \"p90\": 0,\n \"p95\": 0,\n \"p99\": 0\n },\n \"claim_stale_tasks\": {\n \"p50\": 0,\n \"p90\": 0,\n \"p95\": 0,\n \"p99\": 0\n },\n \"result_frequency_percent_as_number\": {\n \"Failed\": 0,\n \"NoAvailableWorkers\": 0,\n \"NoTasksClaimed\": 100,\n \"RanOutOfCapacity\": 0,\n \"RunningAtCapacity\": 0,\n \"PoolFilled\": 0\n },\n \"persistence\": {\n \"recurring\": 88,\n \"non_recurring\": 12\n }\n },\n \"drift\": {\n \"p50\": 2089,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"drift_by_type\": {\n \"SLO:ORPHAN_SUMMARIES-CLEANUP-TASK\": {\n \"p50\": 2082,\n \"p90\": 2082,\n \"p95\": 2082,\n \"p99\": 2082\n },\n \"fleet:check-deleted-files-task\": {\n \"p50\": 2080,\n \"p90\": 2080,\n \"p95\": 2080,\n \"p99\": 2080\n },\n \"osquery:telemetry-saved-queries\": {\n \"p50\": 2080,\n \"p90\": 2080,\n \"p95\": 2080,\n \"p99\": 2080\n },\n \"task_manager:mark_removed_tasks_as_unrecognized\": {\n \"p50\": 2089,\n \"p90\": 2089,\n \"p95\": 2089,\n \"p99\": 2089\n },\n \"task_manager:delete_inactive_background_task_nodes\": {\n \"p50\": 336.5,\n \"p90\": 2089,\n \"p95\": 2089,\n \"p99\": 2089\n },\n \"alerts_invalidate_api_keys\": {\n \"p50\": 2086,\n \"p90\": 2086,\n \"p95\": 2086,\n \"p99\": 2086\n },\n \"fleet:unenroll-inactive-agents-task\": {\n \"p50\": 2080,\n \"p90\": 2080,\n \"p95\": 2080,\n \"p99\": 2080\n },\n \"alerting_health_check\": {\n \"p50\": 2086,\n \"p90\": 2086,\n \"p95\": 2086,\n \"p99\": 2086\n },\n \"Fleet-Usage-Sender\": {\n \"p50\": 2079,\n \"p90\": 2079,\n \"p95\": 2079,\n \"p99\": 2079\n },\n \"security:endpoint-diagnostics\": {\n \"p50\": 2525,\n \"p90\": 2525,\n \"p95\": 2525,\n \"p99\": 2525\n },\n \"logs-data-telemetry\": {\n \"p50\": 2525,\n \"p90\": 2525,\n \"p95\": 2525,\n \"p99\": 2525\n },\n \"security:telemetry-lists\": {\n \"p50\": 2525,\n \"p90\": 2525,\n \"p95\": 2525,\n \"p99\": 2525\n },\n \"security:telemetry-timelines\": {\n \"p50\": 2526,\n \"p90\": 2526,\n \"p95\": 2526,\n \"p99\": 2526\n },\n \"cases-telemetry-task\": {\n \"p50\": 2083,\n \"p90\": 2083,\n \"p95\": 2083,\n \"p99\": 2083\n },\n \"osquery:telemetry-packs\": {\n \"p50\": 2530,\n \"p90\": 2530,\n \"p95\": 2530,\n \"p99\": 2530\n },\n \"Fleet-Metrics-Task\": {\n \"p50\": 133.5,\n \"p90\": 2530,\n \"p95\": 2530,\n \"p99\": 2530\n },\n \"fleet:delete-unenrolled-agents-task\": {\n \"p50\": 2530,\n \"p90\": 2530,\n \"p95\": 2530,\n \"p99\": 2530\n },\n \"osquery:telemetry-configs\": {\n \"p50\": 2529,\n \"p90\": 2529,\n \"p95\": 2529,\n \"p99\": 2529\n },\n \"endpoint:complete-external-response-actions\": {\n \"p50\": 519,\n \"p90\": 2526,\n \"p95\": 2526,\n \"p99\": 2526\n },\n \"security:telemetry-detection-rules\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:telemetry-prebuilt-rule-alerts\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:endpoint-meta-telemetry\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:telemetry-filterlist-artifact\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:telemetry-diagnostic-timelines\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:telemetry-configuration\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"security:indices-metadata-telemetry\": {\n \"p50\": 3037,\n \"p90\": 3037,\n \"p95\": 3037,\n \"p99\": 3037\n },\n \"Fleet-Usage-Logger\": {\n \"p50\": 2190,\n \"p90\": 2190,\n \"p95\": 2190,\n \"p99\": 2190\n },\n \"obs-ai-assistant:knowledge-base-migration\": {\n \"p50\": 2189,\n \"p90\": 2189,\n \"p95\": 2189,\n \"p99\": 2189\n },\n \"dashboard_telemetry\": {\n \"p50\": 2452,\n \"p90\": 2452,\n \"p95\": 2452,\n \"p99\": 2452\n },\n \"session_cleanup\": {\n \"p50\": 2569,\n \"p90\": 2569,\n \"p95\": 2569,\n \"p99\": 2569\n },\n \"ProductDocBase:EnsureUpToDate\": {\n \"p50\": 2452,\n \"p90\": 2452,\n \"p95\": 2452,\n \"p99\": 2452\n },\n \"apm-telemetry-task\": {\n \"p50\": 2591,\n \"p90\": 2591,\n \"p95\": 2591,\n \"p99\": 2591\n },\n \"ML:saved-objects-sync\": {\n \"p50\": 2475,\n \"p90\": 2475,\n \"p95\": 2475,\n \"p99\": 2475\n },\n \"apm-source-map-migration-task\": {\n \"p50\": 1603.5,\n \"p90\": 2987,\n \"p95\": 2987,\n \"p99\": 2987\n },\n \"actions_telemetry\": {\n \"p50\": 771,\n \"p90\": 771,\n \"p95\": 771,\n \"p99\": 771\n },\n \"alerting_telemetry\": {\n \"p50\": 768,\n \"p90\": 768,\n \"p95\": 768,\n \"p99\": 768\n },\n \"endpoint:metadata-check-transforms-task\": {\n \"p50\": 834,\n \"p90\": 834,\n \"p95\": 834,\n \"p99\": 834\n },\n \"endpoint:user-artifact-packager\": {\n \"p50\": 529.5,\n \"p90\": 835,\n \"p95\": 835,\n \"p99\": 835\n },\n \"fleet:bump_agent_policies\": {\n \"p50\": 361,\n \"p90\": 361,\n \"p95\": 361,\n \"p99\": 361\n }\n },\n \"load\": {\n \"p50\": 10,\n \"p90\": 100,\n \"p95\": 100,\n \"p99\": 100\n },\n \"execution\": {\n \"duration\": {\n \"SLO:ORPHAN_SUMMARIES-CLEANUP-TASK\": {\n \"p50\": 24,\n \"p90\": 24,\n \"p95\": 24,\n \"p99\": 24\n },\n \"fleet:check-deleted-files-task\": {\n \"p50\": 24,\n \"p90\": 24,\n \"p95\": 24,\n \"p99\": 24\n },\n \"osquery:telemetry-saved-queries\": {\n \"p50\": 25,\n \"p90\": 25,\n \"p95\": 25,\n \"p99\": 25\n },\n \"task_manager:mark_removed_tasks_as_unrecognized\": {\n \"p50\": 28,\n \"p90\": 28,\n \"p95\": 28,\n \"p99\": 28\n },\n \"task_manager:delete_inactive_background_task_nodes\": {\n \"p50\": 7.5,\n \"p90\": 29,\n \"p95\": 29,\n \"p99\": 29\n },\n \"alerts_invalidate_api_keys\": {\n \"p50\": 34,\n \"p90\": 34,\n \"p95\": 34,\n \"p99\": 34\n },\n \"fleet:unenroll-inactive-agents-task\": {\n \"p50\": 39,\n \"p90\": 39,\n \"p95\": 39,\n \"p99\": 39\n },\n \"alerting_health_check\": {\n \"p50\": 42,\n \"p90\": 42,\n \"p95\": 42,\n \"p99\": 42\n },\n \"Fleet-Usage-Sender\": {\n \"p50\": 78,\n \"p90\": 78,\n \"p95\": 78,\n \"p99\": 78\n },\n \"security:endpoint-diagnostics\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"logs-data-telemetry\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:telemetry-lists\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:telemetry-timelines\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"cases-telemetry-task\": {\n \"p50\": 458,\n \"p90\": 458,\n \"p95\": 458,\n \"p99\": 458\n },\n \"osquery:telemetry-packs\": {\n \"p50\": 10,\n \"p90\": 10,\n \"p95\": 10,\n \"p99\": 10\n },\n \"Fleet-Metrics-Task\": {\n \"p50\": 5,\n \"p90\": 10,\n \"p95\": 10,\n \"p99\": 10\n },\n \"fleet:delete-unenrolled-agents-task\": {\n \"p50\": 11,\n \"p90\": 11,\n \"p95\": 11,\n \"p99\": 11\n },\n \"osquery:telemetry-configs\": {\n \"p50\": 12,\n \"p90\": 12,\n \"p95\": 12,\n \"p99\": 12\n },\n \"endpoint:complete-external-response-actions\": {\n \"p50\": 7,\n \"p90\": 11,\n \"p95\": 11,\n \"p99\": 11\n },\n \"security:telemetry-detection-rules\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:telemetry-prebuilt-rule-alerts\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:endpoint-meta-telemetry\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"security:telemetry-filterlist-artifact\": {\n \"p50\": 5,\n \"p90\": 5,\n \"p95\": 5,\n \"p99\": 5\n },\n \"security:telemetry-diagnostic-timelines\": {\n \"p50\": 5,\n \"p90\": 5,\n \"p95\": 5,\n \"p99\": 5\n },\n \"security:telemetry-configuration\": {\n \"p50\": 5,\n \"p90\": 5,\n \"p95\": 5,\n \"p99\": 5\n },\n \"security:indices-metadata-telemetry\": {\n \"p50\": 5,\n \"p90\": 5,\n \"p95\": 5,\n \"p99\": 5\n },\n \"Fleet-Usage-Logger\": {\n \"p50\": 18,\n \"p90\": 18,\n \"p95\": 18,\n \"p99\": 18\n },\n \"obs-ai-assistant:knowledge-base-migration\": {\n \"p50\": 8,\n \"p90\": 8,\n \"p95\": 8,\n \"p99\": 8\n },\n \"dashboard_telemetry\": {\n \"p50\": 12,\n \"p90\": 12,\n \"p95\": 12,\n \"p99\": 12\n },\n \"session_cleanup\": {\n \"p50\": 58,\n \"p90\": 58,\n \"p95\": 58,\n \"p99\": 58\n },\n \"ProductDocBase:EnsureUpToDate\": {\n \"p50\": 147,\n \"p90\": 147,\n \"p95\": 147,\n \"p99\": 147\n },\n \"apm-telemetry-task\": {\n \"p50\": 543,\n \"p90\": 543,\n \"p95\": 543,\n \"p99\": 543\n },\n \"ML:saved-objects-sync\": {\n \"p50\": 544,\n \"p90\": 544,\n \"p95\": 544,\n \"p99\": 544\n },\n \"apm-source-map-migration-task\": {\n \"p50\": 1649,\n \"p90\": 3282,\n \"p95\": 3282,\n \"p99\": 3282\n },\n \"actions_telemetry\": {\n \"p50\": 19,\n \"p90\": 19,\n \"p95\": 19,\n \"p99\": 19\n },\n \"alerting_telemetry\": {\n \"p50\": 64,\n \"p90\": 64,\n \"p95\": 64,\n \"p99\": 64\n },\n \"endpoint:metadata-check-transforms-task\": {\n \"p50\": 6,\n \"p90\": 6,\n \"p95\": 6,\n \"p99\": 6\n },\n \"endpoint:user-artifact-packager\": {\n \"p50\": 10,\n \"p90\": 13,\n \"p95\": 13,\n \"p99\": 13\n },\n \"fleet:bump_agent_policies\": {\n \"p50\": 9,\n \"p90\": 9,\n \"p95\": 9,\n \"p99\": 9\n }\n },\n \"duration_by_persistence\": {\n \"recurring\": {\n \"p50\": 9,\n \"p90\": 63.39999999999999,\n \"p95\": 474.99999999999966,\n \"p99\": 544\n },\n \"non_recurring\": {\n \"p50\": 14,\n \"p90\": 2968.500000000001,\n \"p95\": 3282,\n \"p99\": 3282\n }\n },\n \"persistence\": {\n \"recurring\": 88,\n \"non_recurring\": 12\n },\n \"result_frequency_percent_as_number\": {\n \"SLO:ORPHAN_SUMMARIES-CLEANUP-TASK\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"fleet:check-deleted-files-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"osquery:telemetry-saved-queries\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"task_manager:mark_removed_tasks_as_unrecognized\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"task_manager:delete_inactive_background_task_nodes\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"alerts_invalidate_api_keys\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"fleet:unenroll-inactive-agents-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"alerting_health_check\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"Fleet-Usage-Sender\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:endpoint-diagnostics\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"logs-data-telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-lists\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-timelines\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"cases-telemetry-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"osquery:telemetry-packs\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"Fleet-Metrics-Task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"fleet:delete-unenrolled-agents-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"osquery:telemetry-configs\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"endpoint:complete-external-response-actions\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-detection-rules\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-prebuilt-rule-alerts\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:endpoint-meta-telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-filterlist-artifact\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-diagnostic-timelines\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:telemetry-configuration\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"security:indices-metadata-telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"Fleet-Usage-Logger\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"obs-ai-assistant:knowledge-base-migration\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"dashboard_telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"session_cleanup\": {\n \"Success\": 0,\n \"RetryScheduled\": 100,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"ProductDocBase:EnsureUpToDate\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"apm-telemetry-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"ML:saved-objects-sync\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"apm-source-map-migration-task\": {\n \"Success\": 50,\n \"RetryScheduled\": 50,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"actions_telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"alerting_telemetry\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"endpoint:metadata-check-transforms-task\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"endpoint:user-artifact-packager\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n },\n \"fleet:bump_agent_policies\": {\n \"Success\": 100,\n \"RetryScheduled\": 0,\n \"Failed\": 0,\n \"status\": \"OK\"\n }\n }\n }\n },\n \"status\": \"OK\"\n },\n \"workload\": {\n \"timestamp\": \"2025-03-21T21:29:10.367Z\",\n \"value\": {\n \"count\": 35,\n \"cost\": 70,\n \"task_types\": {\n \"Fleet-Metrics-Task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"Fleet-Usage-Logger\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"Fleet-Usage-Sender\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"ML:saved-objects-sync\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"SLO:ORPHAN_SUMMARIES-CLEANUP-TASK\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"actions_telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"alerting_health_check\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"alerting_telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"alerts_invalidate_api_keys\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"apm-telemetry-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"cases-telemetry-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"dashboard_telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"endpoint:complete-external-response-actions\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"endpoint:metadata-check-transforms-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"endpoint:user-artifact-packager\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"fleet:check-deleted-files-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"fleet:delete-unenrolled-agents-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"fleet:unenroll-inactive-agents-task\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"logs-data-telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"osquery:telemetry-configs\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"osquery:telemetry-packs\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"osquery:telemetry-saved-queries\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:endpoint-diagnostics\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:endpoint-meta-telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:indices-metadata-telemetry\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-configuration\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-detection-rules\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-diagnostic-timelines\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-filterlist-artifact\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-lists\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-prebuilt-rule-alerts\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"security:telemetry-timelines\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"session_cleanup\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"task_manager:delete_inactive_background_task_nodes\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n },\n \"task_manager:mark_removed_tasks_as_unrecognized\": {\n \"count\": 1,\n \"cost\": 2,\n \"status\": {\n \"idle\": 1\n }\n }\n },\n \"non_recurring\": 1,\n \"non_recurring_cost\": 2,\n \"schedule\": [\n [\n \"1m\",\n 2\n ],\n [\n \"60s\",\n 2\n ],\n [\n \"5m\",\n 2\n ],\n [\n \"10m\",\n 1\n ],\n [\n \"15m\",\n 1\n ],\n [\n \"45m\",\n 1\n ],\n [\n \"1h\",\n 9\n ],\n [\n \"3600s\",\n 1\n ],\n [\n \"60m\",\n 1\n ],\n [\n \"2h\",\n 1\n ],\n [\n \"720m\",\n 2\n ],\n [\n \"24h\",\n 7\n ],\n [\n \"1d\",\n 3\n ],\n [\n \"1440m\",\n 1\n ]\n ],\n \"overdue\": 0,\n \"overdue_cost\": 0,\n \"overdue_non_recurring\": 0,\n \"estimated_schedule_density\": [\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ],\n \"capacity_requirements\": {\n \"per_minute\": 4,\n \"per_hour\": 46,\n \"per_day\": 27\n }\n },\n \"status\": \"OK\"\n },\n \"capacity_estimation\": {\n \"status\": \"OK\",\n \"reason\": \"Task Manager is healthy, the assumedRequiredThroughputPerMinutePerKibana (148.78541666666666) \u003c capacityPerMinutePerKibana (1200)\",\n \"timestamp\": \"2025-03-21T21:30:04.780Z\",\n \"value\": {\n \"observed\": {\n \"observed_kibana_instances\": 1,\n \"max_throughput_per_minute_per_kibana\": 1200,\n \"max_throughput_per_minute\": 1200,\n \"minutes_to_drain_overdue\": 0,\n \"avg_recurring_required_throughput_per_minute\": 5,\n \"avg_recurring_required_throughput_per_minute_per_kibana\": 5,\n \"avg_required_throughput_per_minute\": 149,\n \"avg_required_throughput_per_minute_per_kibana\": 149\n },\n \"proposed\": {\n \"provisioned_kibana\": 2,\n \"min_required_kibana\": 1,\n \"avg_recurring_required_throughput_per_minute_per_kibana\": 3,\n \"avg_required_throughput_per_minute_per_kibana\": 75\n }\n }\n }\n }\n}"},"get_connector_types_generativeai_response":{"summary":"A list of connector types for the `generativeAI` feature.","value":[{"id":".gen-ai","name":"OpenAI","enabled":true,"enabled_in_config":true,"enabled_in_license":true,"minimum_license_required":"enterprise","supported_feature_ids":["generativeAIForSecurity","generativeAIForObservability","generativeAIForSearchPlayground"],"is_system_action_type":false},{"id":".bedrock","name":"AWS Bedrock","enabled":true,"enabled_in_config":true,"enabled_in_license":true,"minimum_license_required":"enterprise","supported_feature_ids":["generativeAIForSecurity","generativeAIForObservability","generativeAIForSearchPlayground"],"is_system_action_type":false},{"id":".gemini","name":"Google Gemini","enabled":true,"enabled_in_config":true,"enabled_in_license":true,"minimum_license_required":"enterprise","supported_feature_ids":["generativeAIForSecurity"],"is_system_action_type":false}]},"get_connector_response":{"summary":"Get connector details.","value":{"id":"df770e30-8b8b-11ed-a780-3b746c987a81","name":"my_server_log_connector","config":{},"connector_type_id":".server-log","is_preconfigured":false,"is_deprecated":false,"is_missing_secrets":false,"is_system_action":false}},"update_index_connector_request":{"summary":"Update an index connector.","value":{"name":"updated-connector","config":{"index":"updated-index"}}},"create_email_connector_request":{"summary":"Create an email connector.","value":{"name":"email-connector-1","connector_type_id":".email","config":{"from":"tester@example.com","hasAuth":true,"host":"https://example.com","port":1025,"secure":false,"service":"other"},"secrets":{"user":"username","password":"password"}}},"create_index_connector_request":{"summary":"Create an index connector.","value":{"name":"my-connector","connector_type_id":".index","config":{"index":"test-index"}}},"create_webhook_connector_request":{"summary":"Create a webhook connector with SSL authentication.","value":{"name":"my-webhook-connector","connector_type_id":".webhook","config":{"method":"post","url":"https://example.com","authType":"webhook-authentication-ssl","certType":"ssl-crt-key"},"secrets":{"crt":"QmFnIEF0dH...","key":"LS0tLS1CRUdJ...","password":"my-passphrase"}}},"create_xmatters_connector_request":{"summary":"Create an xMatters connector with URL authentication.","value":{"name":"my-xmatters-connector","connector_type_id":".xmatters","config":{"usesBasic":false},"secrets":{"secretsUrl":"https://example.com?apiKey=xxxxx"}}},"create_email_connector_response":{"summary":"A new email connector.","value":{"id":"90a82c60-478f-11ee-a343-f98a117c727f","connector_type_id":".email","name":"email-connector-1","config":{"from":"tester@example.com","service":"other","host":"https://example.com","port":1025,"secure":false,"hasAuth":true,"tenantId":null,"clientId":null,"oauthTokenUrl":null},"is_preconfigured":false,"is_deprecated":false,"is_missing_secrets":false,"is_system_action":false}},"create_index_connector_response":{"summary":"A new index connector.","value":{"id":"c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad","connector_type_id":".index","name":"my-connector","config":{"index":"test-index","refresh":false,"executionTimeField":null},"is_preconfigured":false,"is_deprecated":false,"is_missing_secrets":false,"is_system_action":false}},"create_webhook_connector_response":{"summary":"A new webhook connector.","value":{"id":"900eb010-3b9d-11ee-a642-8ffbb94e38bd","name":"my-webhook-connector","config":{"method":"post","url":"https://example.com","authType":"webhook-authentication-ssl","certType":"ssl-crt-key","verificationMode":"full","headers":null,"hasAuth":true},"connector_type_id":".webhook","is_preconfigured":false,"is_deprecated":false,"is_missing_secrets":false,"is_system_action":false}},"run_index_connector_request":{"summary":"Run an index connector.","value":{"params":{"documents":[{"id":"my_doc_id","name":"my_doc_name","message":"hello, world"}]}}},"run_jira_connector_request":{"summary":"Run a Jira connector to retrieve the list of issue types.","value":{"params":{"subAction":"issueTypes"}}},"run_servicenow_itom_connector_request":{"summary":"Run a ServiceNow ITOM connector to retrieve the list of choices.","value":{"params":{"subAction":"getChoices","subActionParams":{"fields":["severity","urgency"]}}}},"run_slack_api_connector_request":{"summary":"Run a Slack connector that uses the web API method to post a message on a channel.","value":{"params":{"subAction":"postMessage","subActionParams":{"channelIds":["C123ABC456"],"text":"A test message."}}}},"run_swimlane_connector_request":{"summary":"Run a Swimlane connector to create an incident.","value":{"params":{"subAction":"pushToService","subActionParams":{"comments":[{"commentId":1,"comment":"A comment about the incident."}],"incident":{"caseId":"1000","caseName":"Case name","description":"Description of the incident."}}}}},"run_index_connector_response":{"summary":"Response from running an index connector.","value":{"connector_id":"fd38c600-96a5-11ed-bb79-353b74189cba","data":{"errors":false,"items":[{"create":{"_id":"4JtvwYUBrcyxt2NnfW3y","_index":"my-index","_primary_term":1,"_seq_no":0,"_shards":{"failed":0,"successful":1,"total":2},"_version":1,"result":"created","status":201}}],"took":135},"status":"ok"}},"run_jira_connector_response":{"summary":"Response from retrieving the list of issue types for a Jira connector.","value":{"connector_id":"b3aad810-edbe-11ec-82d1-11348ecbf4a6","data":[{"id":10024,"name":"Improvement"},{"id":10006,"name":"Task"},{"id":10007,"name":"Sub-task"},{"id":10025,"name":"New Feature"},{"id":10023,"name":"Bug"},{"id":10000,"name":"Epic"}],"status":"ok"}},"run_server_log_connector_response":{"summary":"Response from running a server log connector.","value":{"connector_id":"7fc7b9a0-ecc9-11ec-8736-e7d63118c907","status":"ok"}},"run_servicenow_itom_connector_response":{"summary":"Response from retrieving the list of choices for a ServiceNow ITOM connector.","value":{"connector_id":"9d9be270-2fd2-11ed-b0e0-87533c532698","data":[{"dependent_value":"","element":"severity","label":"Critical","value":1},{"dependent_value":"","element":"severity","label":"Major","value":2},{"dependent_value":"","element":"severity","label":"Minor","value":3},{"dependent_value":"","element":"severity","label":"Warning","value":4},{"dependent_value":"","element":"severity","label":"OK","value":5},{"dependent_value":"","element":"severity","label":"Clear","value":0},{"dependent_value":"","element":"urgency","label":"1 - High","value":1},{"dependent_value":"","element":"urgency","label":"2 - Medium","value":2},{"dependent_value":"","element":"urgency","label":"3 - Low","value":3}],"status":"ok"}},"run_slack_api_connector_response":{"summary":"Response from posting a message with a Slack connector.","value":{"status":"ok","data":{"ok":true,"channel":"C123ABC456","ts":"1234567890.123456","message":{"bot_id":"B12BCDEFGHI","type":"message","text":"A test message","user":"U12A345BC6D","ts":"1234567890.123456","app_id":"A01BC2D34EF","blocks":[{"type":"rich_text","block_id":"/NXe","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"A test message."}]}]}],"team":"T01ABCDE2F","bot_profile":{"id":"B12BCDEFGHI","app_id":"A01BC2D34EF","name":"test","icons":{"image_36":"https://a.slack-edge.com/80588/img/plugins/app/bot_36.png"},"deleted":false,"updated":1672169705,"team_id":"T01ABCDE2F"}}},"connector_id":".slack_api"}},"run_swimlane_connector_response":{"summary":"Response from creating a Swimlane incident.","value":{"connector_id":"a4746470-2f94-11ed-b0e0-87533c532698","data":{"id":"aKPmBHWzmdRQtx6Mx","title":"TEST-457","url":"https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx","pushedDate":"2022-09-08T16:52:27.866Z","comments":[{"commentId":1,"pushedDate":"2022-09-08T16:52:27.865Z"}]},"status":"ok"}},"get_connectors_response":{"summary":"A list of connectors","value":[{"id":"preconfigured-email-connector","name":"my-preconfigured-email-notification","connector_type_id":".email","is_preconfigured":true,"is_deprecated":false,"referenced_by_count":0,"is_system_action":false},{"id":"e07d0c80-8b8b-11ed-a780-3b746c987a81","name":"my-index-connector","config":{"index":"test-index","refresh":false,"executionTimeField":null},"connector_type_id":".index","is_preconfigured":false,"is_deprecated":false,"referenced_by_count":2,"is_missing_secrets":false,"is_system_action":false}]},"get_roles_response1":{"summary":"Get all role details","value":[{"name":"my_kibana_role","description":"My kibana role description","metadata":{"version":1},"transient_metadata":{"enabled":true},"elasticsearch":{"indices":[],"cluster":[],"run_as":[]},"kibana":[{"base":["all"],"feature":{},"spaces":["*"]}]},{"name":"my_admin_role","description":"My admin role description","metadata":{"version":1},"transient_metadata":{"enabled":true},"elasticsearch":{"cluster":["all"],"indices":[{"names":["index1","index2"],"privileges":["all"],"field_security":{"grant":["title","body"]},"query":"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}"}]},"kibana":[]}]},"get_role_response1":{"summary":"Get role details","value":{"name":"my_kibana_role","description":"Grants all cluster privileges and full access to index1 and index2. Grants full access to remote_index1 and remote_index2, and the monitor_enrich cluster privilege on remote_cluster1. Grants all Kibana privileges in the default space.","metadata":{"version":1},"transient_metadata":{"enabled":true},"elasticsearch":{"cluster":["all"],"remote_cluster":[{"privileges":["monitor_enrich"],"clusters":["remote_cluster1"]}],"indices":[{"names":["index1","index2"],"privileges":["all"],"allow_restricted_indices":false}],"remote_indices":[{"names":["remote_index1","remote_index2"],"privileges":["all"],"allow_restricted_indices":false,"clusters":["remote_cluster1"]}],"run_as":[]},"kibana":[{"base":["all"],"feature":{},"spaces":["default"]}],"_transform_error":[],"_unrecognized_applications":[]}},"create_role_request1":{"summary":"Feature privileges in multiple spaces","description":"Grant access to various features in some spaces.","value":{"description":"Grant full access to discover and dashboard features in the default space. Grant read access in the marketing, and sales spaces.","metadata":{"version":1},"elasticsearch":{"cluster":[],"indices":[]},"kibana":[{"base":[],"feature":{"discover":["all"],"dashboard":["all"]},"spaces":["default"]},{"base":["read"],"spaces":["marketing","sales"]}]}},"create_role_request2":{"summary":"Dashboard privileges in a space","description":"Grant access to dashboard features in a Marketing space.","value":{"description":"Grant dashboard access in the Marketing space.","metadata":{"version":1},"elasticsearch":{"cluster":[],"indices":[]},"kibana":[{"base":[],"feature":{"dashboard":["read"]},"spaces":["marketing"]}]}},"create_role_request3":{"summary":"Feature privileges in a space","description":"Grant full access to all features in the default space.","value":{"metadata":{"version":1},"elasticsearch":{"cluster":[],"indices":[]},"kibana":[{"base":["all"],"feature":{},"spaces":["default"]}]}},"create_role_request4":{"summary":"Elasticsearch and Kibana feature privileges","description":"Grant Elasticsearch and Kibana feature privileges.","value":{"description":"Grant all cluster privileges and full access to index1 and index2. Grant full access to remote_index1 and remote_index2, and the monitor_enrich cluster privilege on remote_cluster1. Grant all Kibana privileges in the default space.","metadata":{"version":1},"elasticsearch":{"cluster":["all"],"indices":[{"names":["index1","index2"],"privileges":["all"]}],"remote_indices":[{"clusters":["remote_cluster1"],"names":["remote_index1","remote_index2"],"privileges":["all"]}],"remote_cluster":[{"clusters":["remote_cluster1"],"privileges":["monitor_enrich"]}]},"kibana":[{"base":["all"],"feature":{},"spaces":["default"]}]}},"copy_saved_objects_request1":{"summary":"Copy with createNewCopies","description":"Copy a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. In this example, the dashboard has a reference to a visualization and that has a reference to a data view.\n","value":{"objects":[{"type":"dashboard","id":"my-dashboard"}],"spaces":["marketing"],"includeReferences":true}},"copy_saved_objects_request2":{"summary":"Copy without createNewCopies","description":"Copy a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. In this example, the dashboard has a reference to a visualization and that has a reference to a data view.\n","value":{"objects":[{"type":"dashboard","id":"my-dashboard"}],"spaces":["marketing"],"includeReferences":true,"createNewCopies":false}},"copy_saved_objects_response1":{"summary":"Copy with createNewCopies","description":"The response for successfully copying a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. The result indicates a successful copy and all three objects are created. Since these objects were created as new copies, each entry in the successResults array includes a destinationId attribute.\n","value":{"marketing":{"success":true,"successCount":3,"successResults":[{"id":"my-dashboard","type":"dashboard","destinationId":"1e127098-5b80-417f-b0f1-c60c8395358f","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}},{"id":"my-vis","type":"visualization","destinationId":"a610ed80-1c73-4507-9e13-d3af736c8e04","meta":{"icon":"visualizeApp","title":"Look at my visualization"}},{"id":"my-index-pattern","type":"index-pattern","destinationId":"bc3c9c70-bf6f-4bec-b4ce-f4189aa9e26b","meta":{"icon":"indexPatternApp","title":"my-pattern-*"}}]}}},"copy_saved_objects_response2":{"summary":"Copy without createNewCopies","description":"The response for successfully copying a dashboard with the my-dashboard ID with createNewCopies turned off. The result indicates a successful copy and all three objects are created.\n","value":{"marketing":{"success":true,"successCount":3,"successResults":[{"id":"my-dashboard","type":"dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}},{"id":"my-vis","type":"visualization","meta":{"icon":"visualizeApp","title":"Look at my visualization"}},{"id":"my-index-pattern","type":"index-pattern","meta":{"icon":"indexPatternApp","title":"my-pattern-*"}}]}}},"copy_saved_objects_response3":{"summary":"Failed copy response with conflict errors","description":"A response for a failed copy of a dashboard with the my-dashboard ID including all references from the default space to the marketing and sales spaces. In this example, the dashboard has a reference to a visualization and a Canvas workpad and the visualization has a reference to an index pattern. The result indicates a successful copy for the marketing space and an unsuccessful copy for the sales space because the data view, visualization, and Canvas workpad each resulted in a conflict error. Objects are created when the error is resolved using the resolve copy conflicts API.\n","value":{"marketing":{"success":true,"successCount":4,"successResults":[{"id":"my-dashboard","type":"dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}},{"id":"my-vis","type":"visualization","meta":{"icon":"visualizeApp","title":"Look at my visualization"}},{"id":"my-canvas","type":"canvas-workpad","meta":{"icon":"canvasApp","title":"Look at my canvas"}},{"id":"my-index-pattern","type":"index-pattern","meta":{"icon":"indexPatternApp","title":"my-pattern-*"}}]},"sales":{"success":false,"successCount":"1,","errors":[{"id":"my-pattern","type":"index-pattern","title":"my-pattern-*","error":{"type":"conflict"},"meta":{"icon":"indexPatternApp","title":"my-pattern-*"}},{"id":"my-visualization","type":"my-vis","title":"Look at my visualization","error":{"type":"conflict","destinationId":"another-vis"},"meta":{"icon":"visualizeApp","title":"Look at my visualization"}},{"id":"my-canvas","type":"canvas-workpad","title":"Look at my canvas","error":{"type":"ambiguous_conflict","destinations":[{"id":"another-canvas","title":"Look at another canvas","updatedAt":"2020-07-08T16:36:32.377Z"},{"id":"yet-another-canvas","title":"Look at yet another canvas","updatedAt":"2020-07-05T12:29:54.849Z"}]},"meta":{"icon":"canvasApp","title":"Look at my canvas"}}],"successResults\"":[{"id":"my-dashboard","type":"dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}}]}}},"copy_saved_objects_response4":{"summary":"Failed copy with missing reference errors","description":"The response for successfully copying a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. In this example, the dashboard has a reference to a visualization and a Canvas workpad and the visualization has a reference to a data view. The result indicates an unsuccessful copy because the visualization resulted in a missing references error. Objects are created when the errors are resolved using the resolve copy conflicts API.\n","value":{"marketing":{"success":false,"successCount":2,"errors":[{"id":"my-vis","type":"visualization","title":"Look at my visualization","error":{"type":"missing_references","references":[{"type":"index-pattern","id":"my-pattern-*"}]},"meta":{"icon":"visualizeApp","title":"Look at my visualization"}}],"successResults":[{"id":"my-dashboard","type":"dashboard","meta":{"icon":"dashboardApp","title":"Look at my dashboard"}},{"id":"my-canvas","type":"canvas-workpad","meta":{"icon":"canvasApp","title":"Look at my canvas"}}]}}},"disable_legacy_url_request1":{"summary":"Disable legacy URL aliases","description":"This request leaves the alias intact but the legacy URL for this alias (http://localhost:5601/s/bills-space/app/dashboards#/view/123) will no longer function. The dashboard still exists and you can access it with the new URL.\n","value":{"aliases":[{"targetSpace":"bills-space","targetType":"dashboard","sourceId":123}]}},"resolve_copy_saved_objects_request1":{"summary":"Resolve conflict errors","description":"Resolve conflict errors for a data view, visualization, and Canvas workpad by overwriting the existing saved objects. NOTE: If a prior copy attempt resulted in resolvable errors, you must include a retry for each object you want to copy, including any that were returned in the successResults array. In this example, we retried copying the dashboard accordingly.\n","value":{"objects":[{"type":"dashboard","id":"my-dashboard"}],"includeReferences":true,"createNewCopies":false,"retries":{"sales":[{"type":"index-pattern","id":"my-pattern","overwrite":true},{"type":"visualization","id":"my-vis","overwrite":"true,","destinationId":"another-vis"},{"type":"canvas","id":"my-canvas","overwrite":true,"destinationId":"yet-another-canvas"},{"type":"dashboard","id":"my-dashboard"}]}}},"resolve_copy_saved_objects_request2":{"summary":"Resolve missing reference errors","description":"Resolve missing reference errors for a visualization by ignoring the error. NOTE: If a prior copy attempt resulted in resolvable errors, you must include a retry for each object you want to copy, including any that were returned in the successResults array. In this example, we retried copying the dashboard and canvas accordingly.\n","value":{"objects":[{"type":"dashboard","id":"my-dashboard"}],"includeReferences":true,"createNewCopies":false,"retries":{"marketing":[{"type":"visualization","id":"my-vis","ignoreMissingReferences":true},{"type":"canvas","id":"my-canvas"},{"type":"dashboard","id":"my-dashboard"}]}}},"update_saved_objects_spaces_request1":{"summary":"Update saved object spaces","description":"Update the spaces of each saved object and all its references.","value":{"objects":[{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247"}],"spacesToAdd":["test"],"spacesToRemove":[]}},"update_saved_objects_spaces_response1":{"summary":"Update saved object spaces","description":"The response from updating the spaces of saved objects.\n","value":{"objects":[{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","spaces":["default","test"]}]}},"get_spaces_response1":{"summary":"Get all spaces","description":"Get all spaces without specifying any options.","value":[{"id":"default","name":"Default","description":"This is the Default Space","disabledFeatures":[],"imageUrl":"","_reserved":true},{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"disabledFeatures":["apm"],"initials":"MK","imageUrl":"data:image/png;base64,iVBORw0KGgoAAAANSU"},{"id":"sales","name":"Sales","initials":"MK","disabledFeatures":["discover"],"imageUr\"":"","solution":"oblt"}]},"get_spaces_response2":{"summary":"Get all spaces with custom options","description":"The user has read-only access to the Sales space. Get all spaces with the following query parameters: \"purpose=shareSavedObjectsIntoSpace\u0026include_authorized_purposes=true\"\n","value":[{"id":"default","name":"Default","description":"This is the Default Space","disabledFeatures":[],"imageUrl":"","_reserved":true,"authorizedPurposes":{"any":true,"copySavedObjectsIntoSpace":true,"findSavedObjects":true,"shareSavedObjectsIntoSpace":true}},{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"disabledFeatures":["apm"],"initials":"MK","imageUrl":"data:image/png;base64,iVBORw0KGgoAAAANSU","authorizedPurposes":{"any":true,"copySavedObjectsIntoSpace":true,"findSavedObjects":true,"shareSavedObjectsIntoSpace":true}},{"id":"sales","name":"Sales","initials":"MK","disabledFeatures":["discover"],"imageUrl":"","authorizedPurposes":{"any":true,"copySavedObjectsIntoSpace":false,"findSavedObjects":true,"shareSavedObjectsIntoSpace":false}}]},"create_space_request":{"summary":"Create a marketing space","value":{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"initials":"MK","disabledFeatures":[],"imageUrl":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAABACAYAAABC6cT1AAAGf0lEQVRoQ+3abYydRRUH8N882xYo0IqagEVjokQJKAiKBjXExC9G/aCkGowCIghCkRcrVSSKIu/FEiqgGL6gBIlAYrAqUTH6hZgQFVEMKlQFfItWoQWhZe8z5uzMLdvbfbkLxb13d+fbvfe588x/zpn/+Z9zJpmnI81T3BaAzzfLL1h8weLzZAcWXH2eGHo7zAWLL1h8nuzAjFw9G1N6Kzq8HnuM36MR8iibF3Fv4q+7cv8yDV6K13bYq2furSP8Ag8ncr/vnSnwRViJT2GfCV7yL1yHGxLb+l3EdM9lluNEnIC9xz+f2ZL4Er6Z2DrdXN3fZwp8CU7OfDHxggle8lTLbQ1nJ/7Z7yKmey5zYGZt4h2IzR8/trRc2PDlxJPTzfVcgJ+CC0wMPOa9F6cm7up3EVM9V9386MxliVdM8GwAv6hh/awCz/w7lY25OtF5ruBz4ZLP42NYNrDAFbC3YPWuILnMAfgq3oaRQQYea/stViV+sgssvjKzLvGySeaaNVfP4d7Btokgvxj/bblgpueuF1hmWcyTCmfE3J3M1lTcv0vMswM88zR+jpw4osu6me8kzkpsfLZWzxyRuabO22buxxOJ12FxnXfWgEe83pB5sOE47BsLymzscOoi7nw2JJfZreUjiUsTyzKPZm5NvBDvSuw268AzNzV8H5/Am+qCnsAXgpgSW2Zq9cyKlksbPlTd+te4quWNieMHBfiNDdciYnwsdI/MaOaWhnMTf54J8CqNj8x8JXFIZltYu+HqlmNT8YSBsHgAPw/vxvlVV4du/s0oaxbxg0TbL/jMni0nNcVjQq7+HZfgtpbzBg342TgQ63AkmsymxBW4IjE6A+D7Vzd/fyWxIM/VuCe+HzTgZ2Jpy/kNJ2FJLmLm24mPJ/42A+Bvrxt4SISwlhsaPodH26LZB8rVA3inwwebsrixJCZzX+KMxI/7AV61eVh3DV6Mx3EOvh4kN6jAg8nfUCXm4d1wE66OyxNPTQc+s3/o/MoXizL3JE5O3F3P/uBZPPF4Zr+Wi5uSO48ZPRdyCwn7YB/A35m5KhWNHox4fcNnIs0ddOCRSBxf8+cQG+Huf0l8NJVYP+nI7NXy2ar4QqIGm69JfKPOE2w/mBavCzwM11R2D+ChsUO7hyUfmwx55qDM1xJvqZ7y08TpifuGBfjeURVJnNIVGpkNiXNS0ds7jcySDitDCCWW56LJ10fRo8sNA+3qXUSZD2CtQlZh9T+1rB7h9oliembflnMbzqgSNZKbKGHdPm7OwXb1CvQ1metSETMpszmzvikCJNh/h5E5PHNl4qga/+/cxqrdeWDYgIe7X5L4cGJPJX2940lOX8pD41FnFnc4riluvQKbK0dcHJFi2IBHNTQSlguru4d2/wPOTNzRA3x5y+U1E1uqWDkETOT026XuUJzx6u7ReLhSYenQ7uHua0fKZmwfmcPqsQjxE5WVONcRxn7X89zgn/EKPMRMxOVQXmP18Mx3q3b/Y/0cQE/IhFtHESMsHFlZ1Ml3CH3DZPHImY+pxcKumNmYirtvqMBfhMuU6s3iqOQkTsMPe1tCQwO8Ajs0lxr7W+vnp1MJc9EgCNd/cy6x+9D4veXmprj5wxMw/3C4egW6zzgZOlYZzfwo3F2J7ael0pJamvlPKgWNKFft1AAcKotXoFEbD7kaoSoQPVKB35+5KHF0lai/rJo+up87jWEE/qqqwY+qrL21LWLm95lPJ16ppKw31XC3PXYPJauPEx7B6BHCgrSizRs18qiaRp8tlN3ueCTYPHH9RNaunjI8Z7wLYpT3jZSCYXQ8e9vTsRE/q+no3XMKeObgGtaintbb/AvXj4JDkNw/5hrwYPfIvlZFUbLn7G5q+eQIN09Vnho6cqvnM/Lt99RixH49wO8K0ZL41WTWHoQzvsNVkOheZqKhEGpsp3SzB+BBtZAYve7uOR9tuTaaB6l0XScdYfEQPpkTUyHEGP+XqyDBzu+NBCITUjNWHynkrbWKOuWFn1xKzqsyx0bdvS78odp0+N503Zao0uCsWuSIDku8/7EO60b41vN5+Ses9BKlTdvd8bhp9EBvJjWJAIn/vxwHe6b3tSk6JFPV4nq85oAOrx555v/x/rh3E6Lo+bnuNS4uB4Cuq0ZfvO8X1rM6q/+vnjLVqZq7v83onttc2oYF4HPJmv1gWbB4P7s0l55ZsPhcsmY/WBYs3s8uzaVn5q3F/wf70mRuBCtbjQAAAABJRU5ErkJggg=="}},"get_space_response":{"summary":"Get details about a marketing space","value":{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"initials":"MK","disabledFeatures":[],"imageUrl":"","solution":"es"}},"update_space_request":{"summary":"Update a marketing space","description":"Update the marketing space to remove the imageUrl.","value":{"id":"marketing","name":"Marketing","description":"This is the Marketing Space","color":null,"initials":"MK","disabledFeatures":[],"imageUrl":""}}},"parameters":{"APM_UI_elastic_api_version":{"description":"The version of the API to use","in":"header","name":"elastic-api-version","required":true,"schema":{"default":"2023-10-31","enum":["2023-10-31"],"type":"string"}},"APM_UI_kbn_xsrf":{"description":"A required header to protect against CSRF attacks","in":"header","name":"kbn-xsrf","required":true,"schema":{"example":"true","type":"string"}},"Cases_alert_id":{"description":"An identifier for the alert.","in":"path","name":"alertId","required":true,"schema":{"example":"09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540","type":"string"}},"Cases_assignees_filter":{"description":"Filters the returned cases by assignees. Valid values are `none` or unique identifiers for the user profiles. These identifiers can be found by using the suggest user profile API.\n","in":"query","name":"assignees","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_string"},{"$ref":"#/components/schemas/Cases_string_array"}]}},"Cases_case_id":{"description":"The identifier for the case. To retrieve case IDs, use the find cases API. All non-ASCII characters must be URL encoded.","in":"path","name":"caseId","required":true,"schema":{"example":"9c235210-6834-11ea-a78c-6ffb38a34414","type":"string"}},"Cases_category":{"description":"Filters the returned cases by category.","in":"query","name":"category","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_case_category"},{"$ref":"#/components/schemas/Cases_case_categories"}]}},"Cases_comment_id":{"description":"The identifier for the comment. To retrieve comment IDs, use the get case or find cases APIs.\n","in":"path","name":"commentId","required":true,"schema":{"example":"71ec1870-725b-11ea-a0b2-c51ea50a58e2","type":"string"}},"Cases_configuration_id":{"description":"An identifier for the configuration.","in":"path","name":"configurationId","required":true,"schema":{"example":"3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9","type":"string"}},"Cases_connector_id":{"description":"An identifier for the connector. To retrieve connector IDs, use the find connectors API.","in":"path","name":"connectorId","required":true,"schema":{"example":"abed3a70-71bd-11ea-a0b2-c51ea50a58e2","type":"string"}},"Cases_defaultSearchOperator":{"description":"he default operator to use for the simple_query_string.","example":"OR","in":"query","name":"defaultSearchOperator","schema":{"default":"OR","type":"string"}},"Cases_from":{"description":"Returns only cases that were created after a specific date. The date must be specified as a KQL data range or date match expression.\n","in":"query","name":"from","schema":{"example":"now-1d","type":"string"}},"Cases_ids":{"description":"The cases that you want to removed. All non-ASCII characters must be URL encoded.\n","example":"d4e7abb0-b462-11ec-9a8d-698504725a43","in":"query","name":"ids","required":true,"schema":{"items":{"maxItems":100,"minItems":1,"type":"string"},"type":"array"}},"Cases_kbn_xsrf":{"description":"Cross-site request forgery protection","in":"header","name":"kbn-xsrf","required":true,"schema":{"type":"string"}},"Cases_owner_filter":{"description":"A filter to limit the response to a specific set of applications. If this parameter is omitted, the response contains information about all the cases that the user has access to read.\n","example":"cases","in":"query","name":"owner","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_owner"},{"$ref":"#/components/schemas/Cases_owners"}]}},"Cases_page_index":{"description":"The page number to return.","in":"query","name":"page","required":false,"schema":{"default":1,"type":"integer"}},"Cases_page_size":{"description":"The number of items to return. Limited to 100 items.","in":"query","name":"perPage","required":false,"schema":{"default":20,"maximum":100,"type":"integer"}},"Cases_reporters":{"description":"Filters the returned cases by the user name of the reporter.","example":"elastic","in":"query","name":"reporters","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_string"},{"$ref":"#/components/schemas/Cases_string_array"}]}},"Cases_search":{"description":"An Elasticsearch simple_query_string query that filters the objects in the response.","in":"query","name":"search","schema":{"type":"string"}},"Cases_searchFields":{"description":"The fields to perform the simple_query_string parsed query against.","in":"query","name":"searchFields","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_searchFieldsType"},{"$ref":"#/components/schemas/Cases_searchFieldsTypeArray"}]}},"Cases_severity":{"description":"The severity of the case.","in":"query","name":"severity","schema":{"enum":["critical","high","low","medium"],"type":"string"}},"Cases_sort_order":{"description":"Determines the sort order.","in":"query","name":"sortOrder","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},"Cases_sortField":{"description":"Determines which field is used to sort the results.","example":"updatedAt","in":"query","name":"sortField","schema":{"default":"createdAt","enum":["createdAt","updatedAt","closedAt","title","category","status","severity"],"type":"string"}},"Cases_status":{"description":"Filters the returned cases by state.","example":"open","in":"query","name":"status","schema":{"enum":["closed","in-progress","open"],"type":"string"}},"Cases_tags":{"description":"Filters the returned cases by tags.","example":"tag-1","in":"query","name":"tags","schema":{"oneOf":[{"$ref":"#/components/schemas/Cases_string"},{"$ref":"#/components/schemas/Cases_string_array"}]}},"Cases_to":{"description":"Returns only cases that were created before a specific date. The date must be specified as a KQL data range or date match expression.\n","example":"now+1d","in":"query","name":"to","schema":{"type":"string"}},"Cases_user_action_types":{"description":"Determines the types of user actions to return.","example":"create_case","in":"query","name":"types","schema":{"items":{"enum":["action","alert","assignees","attachment","comment","connector","create_case","description","pushed","settings","severity","status","tags","title","user"],"type":"string"},"type":"array"}},"Data_views_field_name":{"description":"The name of the runtime field.","in":"path","name":"fieldName","required":true,"schema":{"example":"hour_of_day","type":"string"}},"Data_views_kbn_xsrf":{"description":"Cross-site request forgery protection","in":"header","name":"kbn-xsrf","required":true,"schema":{"type":"string"}},"Data_views_view_id":{"description":"An identifier for the data view.","in":"path","name":"viewId","required":true,"schema":{"example":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","type":"string"}},"Machine_learning_APIs_simulateParam":{"description":"When true, simulates the synchronization by returning only the list of actions that would be performed.","example":"true","in":"query","name":"simulate","required":false,"schema":{"type":"boolean"}},"Saved_objects_kbn_xsrf":{"description":"Cross-site request forgery protection","in":"header","name":"kbn-xsrf","required":true,"schema":{"type":"string"}},"Saved_objects_saved_object_id":{"description":"An identifier for the saved object.","in":"path","name":"id","required":true,"schema":{"type":"string"}},"Saved_objects_saved_object_type":{"description":"Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`.","in":"path","name":"type","required":true,"schema":{"type":"string"}},"Short_URL_APIs_idParam":{"description":"The identifier for the short URL.","in":"path","name":"id","required":true,"schema":{"type":"string"}},"SLOs_kbn_xsrf":{"description":"Cross-site request forgery protection","in":"header","name":"kbn-xsrf","required":true,"schema":{"type":"string"}},"SLOs_slo_id":{"description":"An identifier for the slo.","in":"path","name":"sloId","required":true,"schema":{"example":"9c235211-6834-11ea-a78c-6feb38a34414","type":"string"}},"SLOs_space_id":{"description":"An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.","in":"path","name":"spaceId","required":true,"schema":{"example":"default","type":"string"}}},"schemas":{"Alerting_401_response":{"properties":{"error":{"enum":["Unauthorized"],"example":"Unauthorized","type":"string"},"message":{"type":"string"},"statusCode":{"enum":[401],"example":401,"type":"integer"}},"title":"Unsuccessful rule API response","type":"object"},"Alerting_fieldmap_properties":{"title":"Field map objects in the get rule types response","type":"object","properties":{"array":{"description":"Indicates whether the field is an array.","type":"boolean"},"dynamic":{"description":"Indicates whether it is a dynamic field mapping.","type":"boolean"},"format":{"description":"Indicates the format of the field. For example, if the `type` is `date_range`, the `format` can be `epoch_millis||strict_date_optional_time`.\n","type":"string"},"ignore_above":{"description":"Specifies the maximum length of a string field. Longer strings are not indexed or stored.","type":"integer"},"index":{"description":"Indicates whether field values are indexed.","type":"boolean"},"path":{"description":"TBD","type":"string"},"properties":{"additionalProperties":{"type":"object","properties":{"type":{"description":"The data type for each object property.","type":"string"}}},"description":"Details about the object properties. This property is applicable when `type` is `object`.\n","type":"object"},"required":{"description":"Indicates whether the field is required.","type":"boolean"},"scaling_factor":{"description":"The scaling factor to use when encoding values. This property is applicable when `type` is `scaled_float`. Values will be multiplied by this factor at index time and rounded to the closest long value. \n","type":"integer"},"type":{"description":"Specifies the data type for the field.","example":"scaled_float","type":"string"}}},"APM_UI_400_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Not Found","type":"string"},"message":{"description":"Error message","example":"Not Found","type":"string"},"statusCode":{"description":"Error status code","example":400,"type":"number"}}},"APM_UI_401_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Unauthorized","type":"string"},"message":{"description":"Error message","type":"string"},"statusCode":{"description":"Error status code","example":401,"type":"number"}}},"APM_UI_403_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Forbidden","type":"string"},"message":{"description":"Error message","type":"string"},"statusCode":{"description":"Error status code","example":403,"type":"number"}}},"APM_UI_404_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Not Found","type":"string"},"message":{"description":"Error message","example":"Not Found","type":"string"},"statusCode":{"description":"Error status code","example":404,"type":"number"}}},"APM_UI_500_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Internal Server Error","type":"string"},"message":{"description":"Error message","type":"string"},"statusCode":{"description":"Error status code","example":500,"type":"number"}}},"APM_UI_501_response":{"type":"object","properties":{"error":{"description":"Error type","example":"Not Implemented","type":"string"},"message":{"description":"Error message","example":"Not Implemented","type":"string"},"statusCode":{"description":"Error status code","example":501,"type":"number"}}},"APM_UI_agent_configuration_intake_object":{"type":"object","properties":{"agent_name":{"description":"The agent name is used by the UI to determine which settings to display.","type":"string"},"service":{"$ref":"#/components/schemas/APM_UI_service_object"},"settings":{"$ref":"#/components/schemas/APM_UI_settings_object"}},"required":["service","settings"]},"APM_UI_agent_configuration_object":{"description":"Agent configuration","type":"object","properties":{"@timestamp":{"description":"Timestamp","example":1730194190636,"type":"number"},"agent_name":{"description":"Agent name","type":"string"},"applied_by_agent":{"description":"Applied by agent","example":true,"type":"boolean"},"etag":{"description":"`etag` is sent by the APM agent to indicate the `etag` of the last successfully applied configuration. If the `etag` matches an existing configuration its `applied_by_agent` property will be set to `true`. Every time a configuration is edited `applied_by_agent` is reset to `false`.\n","example":"0bc3b5ebf18fba8163fe4c96f491e3767a358f85","type":"string"},"service":{"$ref":"#/components/schemas/APM_UI_service_object"},"settings":{"$ref":"#/components/schemas/APM_UI_settings_object"}},"required":["service","settings","@timestamp","etag"]},"APM_UI_agent_configurations_response":{"type":"object","properties":{"configurations":{"description":"Agent configuration","items":{"$ref":"#/components/schemas/APM_UI_agent_configuration_object"},"type":"array"}}},"APM_UI_agent_keys_object":{"type":"object","properties":{"name":{"description":"The name of the APM agent key.","type":"string"},"privileges":{"description":"The APM agent key privileges. It can take one or more of the following values:\n* `event:write`, which is required for ingesting APM agent events. * `config_agent:read`, which is required for APM agents to read agent configuration remotely.\n","items":{"enum":["event:write","config_agent:read"],"type":"string"},"type":"array"}},"required":["name","privileges"]},"APM_UI_agent_keys_response":{"type":"object","properties":{"agentKey":{"description":"Agent key","type":"object","properties":{"api_key":{"type":"string"},"encoded":{"type":"string"},"expiration":{"format":"int64","type":"integer"},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name","api_key","encoded"]}}},"APM_UI_annotation_search_response":{"type":"object","properties":{"annotations":{"description":"Annotations","items":{"type":"object","properties":{"@timestamp":{"type":"number"},"id":{"type":"string"},"text":{"type":"string"},"type":{"enum":["version"],"type":"string"}}},"type":"array"}}},"APM_UI_base_source_map_object":{"type":"object","properties":{"compressionAlgorithm":{"description":"Compression Algorithm","type":"string"},"created":{"description":"Created date","type":"string"},"decodedSha256":{"description":"Decoded SHA-256","type":"string"},"decodedSize":{"description":"Decoded size","type":"number"},"encodedSha256":{"description":"Encoded SHA-256","type":"string"},"encodedSize":{"description":"Encoded size","type":"number"},"encryptionAlgorithm":{"description":"Encryption Algorithm","type":"string"},"id":{"description":"Identifier","type":"string"},"identifier":{"description":"Identifier","type":"string"},"packageName":{"description":"Package name","type":"string"},"relative_url":{"description":"Relative URL","type":"string"},"type":{"description":"Type","type":"string"}}},"APM_UI_create_annotation_object":{"type":"object","properties":{"@timestamp":{"description":"The date and time of the annotation. It must be in ISO 8601 format.","type":"string"},"message":{"description":"The message displayed in the annotation. It defaults to `service.version`.","type":"string"},"service":{"description":"The service that identifies the configuration to create or update.","type":"object","properties":{"environment":{"description":"The environment of the service.","type":"string"},"version":{"description":"The version of the service.","type":"string"}},"required":["version"]},"tags":{"description":"Tags are used by the Applications UI to distinguish APM annotations from other annotations. Tags may have additional functionality in future releases. It defaults to `[apm]`. While you can add additional tags, you cannot remove the `apm` tag.\n","items":{"type":"string"},"type":"array"}},"required":["@timestamp","service"]},"APM_UI_create_annotation_response":{"type":"object","properties":{"_id":{"description":"Identifier","type":"string"},"_index":{"description":"Index","type":"string"},"_source":{"description":"Response","type":"object","properties":{"@timestamp":{"type":"string"},"annotation":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":"string"}}},"event":{"type":"object","properties":{"created":{"type":"string"}}},"message":{"type":"string"},"service":{"type":"object","properties":{"environment":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"}}},"tags":{"items":{"type":"string"},"type":"array"}}}}},"APM_UI_delete_agent_configurations_response":{"type":"object","properties":{"result":{"description":"Result","type":"string"}}},"APM_UI_search_agent_configuration_object":{"type":"object","properties":{"etag":{"description":"If etags match then `applied_by_agent` field will be set to `true`","example":"0bc3b5ebf18fba8163fe4c96f491e3767a358f85","type":"string"},"mark_as_applied_by_agent":{"description":"`markAsAppliedByAgent=true` means \"force setting it to true regardless of etag\".\nThis is needed for Jaeger agent that doesn't have etags\n","type":"boolean"},"service":{"$ref":"#/components/schemas/APM_UI_service_object"}},"required":["service"]},"APM_UI_search_agent_configuration_response":{"type":"object","properties":{"_id":{"description":"Identifier","type":"string"},"_index":{"description":"Index","type":"string"},"_score":{"description":"Score","type":"number"},"_source":{"$ref":"#/components/schemas/APM_UI_agent_configuration_object"}}},"APM_UI_service_agent_name_response":{"type":"object","properties":{"agentName":{"description":"Agent name","example":"nodejs","type":"string"}}},"APM_UI_service_environment_object":{"type":"object","properties":{"alreadyConfigured":{"description":"Already configured","type":"boolean"},"name":{"description":"Service environment name","example":"ALL_OPTION_VALUE","type":"string"}}},"APM_UI_service_environments_response":{"type":"object","properties":{"environments":{"description":"Service environment list","items":{"$ref":"#/components/schemas/APM_UI_service_environment_object"},"type":"array"}}},"APM_UI_service_object":{"description":"Service","type":"object","properties":{"environment":{"description":"The environment of the service.","example":"prod","type":"string"},"name":{"description":"The name of the service.","example":"node","type":"string"}}},"APM_UI_settings_object":{"additionalProperties":{"type":"string"},"description":"Agent configuration settings","type":"object"},"APM_UI_single_agent_configuration_response":{"allOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"$ref":"#/components/schemas/APM_UI_agent_configuration_object"}]},"APM_UI_source_maps_response":{"type":"object","properties":{"artifacts":{"description":"Artifacts","items":{"allOf":[{"type":"object","properties":{"body":{"type":"object","properties":{"bundleFilepath":{"type":"string"},"serviceName":{"type":"string"},"serviceVersion":{"type":"string"},"sourceMap":{"type":"object","properties":{"file":{"type":"string"},"mappings":{"type":"string"},"sourceRoot":{"type":"string"},"sources":{"items":{"type":"string"},"type":"array"},"sourcesContent":{"items":{"type":"string"},"type":"array"},"version":{"type":"number"}}}}}}},{"$ref":"#/components/schemas/APM_UI_base_source_map_object"}]},"type":"array"}}},"APM_UI_upload_source_map_object":{"type":"object","properties":{"bundle_filepath":{"description":"The absolute path of the final bundle as used in the web application.","type":"string"},"service_name":{"description":"The name of the service that the service map should apply to.","type":"string"},"service_version":{"description":"The version of the service that the service map should apply to.","type":"string"},"sourcemap":{"description":"The source map. It can be a string or file upload. It must follow the\n[source map format specification](https://tc39.es/ecma426/).\n","format":"binary","type":"string"}},"required":["service_name","service_version","bundle_filepath","sourcemap"]},"APM_UI_upload_source_maps_response":{"allOf":[{"type":"object","properties":{"body":{"type":"string"}}},{"$ref":"#/components/schemas/APM_UI_base_source_map_object"}]},"Cases_4xx_response":{"properties":{"error":{"example":"Unauthorized","type":"string"},"message":{"type":"string"},"statusCode":{"example":401,"type":"integer"}},"title":"Unsuccessful cases API response","type":"object"},"Cases_actions":{"enum":["add","create","delete","push_to_service","update"],"example":"create","type":"string"},"Cases_add_alert_comment_request_properties":{"description":"Defines properties for case comment requests when type is alert.","type":"object","properties":{"alertId":{"$ref":"#/components/schemas/Cases_alert_identifiers"},"index":{"$ref":"#/components/schemas/Cases_alert_indices"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"rule":{"$ref":"#/components/schemas/Cases_rule"},"type":{"description":"The type of comment.","enum":["alert"],"example":"alert","type":"string"}},"required":["alertId","index","owner","rule","type"],"title":"Add case comment request properties for alerts"},"Cases_add_case_comment_request":{"description":"The add comment to case API request body varies depending on whether you are adding an alert or a comment.","discriminator":{"mapping":{"alert":"#/components/schemas/Cases_add_alert_comment_request_properties","user":"#/components/schemas/Cases_add_user_comment_request_properties"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Cases_add_alert_comment_request_properties"},{"$ref":"#/components/schemas/Cases_add_user_comment_request_properties"}],"title":"Add case comment request"},"Cases_add_case_file_request":{"description":"Defines the file that will be attached to the case. Optional parameters will be generated automatically from the file metadata if not defined.","type":"object","properties":{"file":{"description":"The file being attached to the case.","format":"binary","type":"string"},"filename":{"description":"The desired name of the file being attached to the case, it can be different than the name of the file in the filesystem. **This should not include the file extension.**","type":"string"}},"required":["file"],"title":"Add case file request properties"},"Cases_add_user_comment_request_properties":{"description":"Defines properties for case comment requests when type is user.","properties":{"comment":{"description":"The new comment. It is required only when `type` is `user`.","example":"A new comment.","maxLength":30000,"type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"type":{"description":"The type of comment.","enum":["user"],"example":"user","type":"string"}},"required":["comment","owner","type"],"title":"Add case comment request properties for user comments","type":"object"},"Cases_alert_comment_response_properties":{"title":"Add case comment response properties for alerts","type":"object","properties":{"alertId":{"items":{"example":"a6e12ac4-7bce-457b-84f6-d7ce8deb8446","type":"string"},"type":"array"},"created_at":{"example":"2023-11-06T19:29:38.424Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"id":{"example":"73362370-ab1a-11ec-985f-97e55adae8b9","type":"string"},"index":{"items":{"example":".internal.alerts-security.alerts-default-000001","type":"string"},"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"pushed_at":{"example":null,"format":"date-time","nullable":true,"type":"string"},"pushed_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"rule":{"type":"object","properties":{"id":{"description":"The rule identifier.","example":"94d80550-aaf4-11ec-985f-97e55adae8b9","type":"string"},"name":{"description":"The rule name.","example":"security_rule","type":"string"}}},"type":{"enum":["alert"],"example":"alert","type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"updated_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"version":{"example":"WzMwNDgsMV0=","type":"string"}},"required":["type"]},"Cases_alert_identifiers":{"description":"The alert identifiers. It is required only when `type` is `alert`. You can use an array of strings to add multiple alerts to a case, provided that they all relate to the same rule; `index` must also be an array with the same length or number of elements. Adding multiple alerts in this manner is recommended rather than calling the API multiple times. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n","example":"6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42","oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":1000,"type":"array"}],"title":"Alert identifiers","x-state":"Technical preview"},"Cases_alert_indices":{"description":"The alert indices. It is required only when `type` is `alert`. If you are adding multiple alerts to a case, use an array of strings; the position of each index name in the array must match the position of the corresponding alert identifier in the `alertId` array. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n","oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":1000,"type":"array"}],"title":"Alert indices","x-state":"Technical preview"},"Cases_alert_response_properties":{"type":"object","properties":{"attached_at":{"format":"date-time","type":"string"},"id":{"description":"The alert identifier.","type":"string"},"index":{"description":"The alert index.","type":"string"}}},"Cases_assignees":{"description":"An array containing users that are assigned to the case.","items":{"type":"object","properties":{"uid":{"description":"A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.","example":"u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0","type":"string"}},"required":["uid"]},"maxItems":10,"nullable":true,"type":"array"},"Cases_case_categories":{"items":{"$ref":"#/components/schemas/Cases_case_category"},"maxItems":100,"type":"array"},"Cases_case_category":{"description":"A word or phrase that categorizes the case.","maxLength":50,"type":"string"},"Cases_case_description":{"description":"The description for the case.","maxLength":30000,"type":"string"},"Cases_case_response_closed_by_properties":{"nullable":true,"properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"],"title":"Case response properties for closed_by","type":"object"},"Cases_case_response_created_by_properties":{"title":"Case response properties for created_by","type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"Cases_case_response_properties":{"title":"Case response properties","type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"category":{"description":"The case category.","nullable":true,"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"closed_by":{"$ref":"#/components/schemas/Cases_case_response_closed_by_properties"},"comments":{"description":"An array of comment objects for the case.","items":{"discriminator":{"mapping":{"alert":"#/components/schemas/Cases_alert_comment_response_properties","user":"#/components/schemas/Cases_user_comment_response_properties"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Cases_alert_comment_response_properties"},{"$ref":"#/components/schemas/Cases_user_comment_response_properties"}]},"maxItems":10000,"title":"Case response properties for comments","type":"array"},"connector":{"discriminator":{"mapping":{".cases-webhook":"#/components/schemas/Cases_connector_properties_cases_webhook",".jira":"#/components/schemas/Cases_connector_properties_jira",".none":"#/components/schemas/Cases_connector_properties_none",".resilient":"#/components/schemas/Cases_connector_properties_resilient",".servicenow":"#/components/schemas/Cases_connector_properties_servicenow",".servicenow-sir":"#/components/schemas/Cases_connector_properties_servicenow_sir",".swimlane":"#/components/schemas/Cases_connector_properties_swimlane"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Cases_connector_properties_none"},{"$ref":"#/components/schemas/Cases_connector_properties_cases_webhook"},{"$ref":"#/components/schemas/Cases_connector_properties_jira"},{"$ref":"#/components/schemas/Cases_connector_properties_resilient"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow_sir"},{"$ref":"#/components/schemas/Cases_connector_properties_swimlane"}],"title":"Case response properties for connectors"},"created_at":{"example":"2022-05-13T09:16:17.416Z","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/Cases_case_response_created_by_properties"},"customFields":{"description":"Custom field values for the case.","items":{"type":"object","properties":{"key":{"description":"The unique identifier for the custom field. The key value must exist in the case configuration settings.\n","type":"string"},"type":{"description":"The custom field type. It must match the type specified in the case configuration settings.\n","enum":["text","toggle"],"type":"string"},"value":{"description":"The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n","oneOf":[{"maxLength":160,"minLength":1,"nullable":true,"type":"string"},{"type":"boolean"}]}}},"type":"array"},"description":{"example":"A case description.","type":"string"},"duration":{"description":"The elapsed time from the creation of the case to its closure (in seconds). If the case has not been closed, the duration is set to null. If the case was closed after less than half a second, the duration is rounded down to zero.\n","example":120,"nullable":true,"type":"integer"},"external_service":{"$ref":"#/components/schemas/Cases_external_service"},"id":{"example":"66b9aa00-94fa-11ea-9f74-e7e108796192","type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"status":{"$ref":"#/components/schemas/Cases_case_status"},"tags":{"example":["tag-1"],"items":{"type":"string"},"type":"array"},"title":{"example":"Case title 1","type":"string"},"totalAlerts":{"example":0,"type":"integer"},"totalComment":{"example":0,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"updated_by":{"$ref":"#/components/schemas/Cases_case_response_updated_by_properties"},"version":{"example":"WzUzMiwxXQ==","type":"string"}},"required":["closed_at","closed_by","comments","connector","created_at","created_by","description","duration","external_service","id","owner","settings","severity","status","tags","title","totalAlerts","totalComment","updated_at","updated_by","version"]},"Cases_case_response_pushed_by_properties":{"nullable":true,"properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"],"title":"Case response properties for pushed_by","type":"object"},"Cases_case_response_updated_by_properties":{"nullable":true,"properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"],"title":"Case response properties for updated_by","type":"object"},"Cases_case_severity":{"default":"low","description":"The severity of the case.","enum":["critical","high","low","medium"],"type":"string"},"Cases_case_status":{"description":"The status of the case.","enum":["closed","in-progress","open"],"type":"string"},"Cases_case_tags":{"description":"The words and phrases that help categorize cases. It can be an empty array.\n","items":{"maxLength":256,"type":"string"},"maxItems":200,"type":"array"},"Cases_case_title":{"description":"A title for the case.","maxLength":160,"type":"string"},"Cases_closure_types":{"description":"Indicates whether a case is automatically closed when it is pushed to external systems (`close-by-pushing`) or not automatically closed (`close-by-user`).","enum":["close-by-pushing","close-by-user"],"example":"close-by-user","type":"string"},"Cases_connector_properties_cases_webhook":{"description":"Defines properties for connectors when type is `.cases-webhook`.","type":"object","properties":{"fields":{"example":null,"nullable":true,"type":"string"},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".cases-webhook"],"example":".cases-webhook","type":"string"}},"required":["fields","id","name","type"],"title":"Create or upate case request properties for Cases Webhook connector"},"Cases_connector_properties_jira":{"description":"Defines properties for connectors when type is `.jira`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","type":"object","properties":{"issueType":{"description":"The type of issue.","nullable":true,"type":"string"},"parent":{"description":"The key of the parent issue, when the issue type is sub-task.","nullable":true,"type":"string"},"priority":{"description":"The priority of the issue.","nullable":true,"type":"string"}},"required":["issueType","parent","priority"]},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".jira"],"example":".jira","type":"string"}},"required":["fields","id","name","type"],"title":"Create or update case request properties for a Jira connector"},"Cases_connector_properties_none":{"description":"Defines properties for connectors when type is `.none`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. To create a case without a connector, specify null. To update a case to remove the connector, specify null.","example":null,"nullable":true,"type":"string"},"id":{"description":"The identifier for the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`.","example":"none","type":"string"},"name":{"description":"The name of the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`.","example":"none","type":"string"},"type":{"description":"The type of connector. To create a case without a connector, use `.none`. To update a case to remove the connector, specify `.none`.","enum":[".none"],"example":".none","type":"string"}},"required":["fields","id","name","type"],"title":"Create or update case request properties for no connector"},"Cases_connector_properties_resilient":{"description":"Defines properties for connectors when type is `.resilient`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","nullable":true,"type":"object","properties":{"issueTypes":{"description":"The type of incident.","items":{"type":"string"},"type":"array"},"severityCode":{"description":"The severity code of the incident.","type":"string"}},"required":["issueTypes","severityCode"]},"id":{"description":"The identifier for the connector.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".resilient"],"example":".resilient","type":"string"}},"required":["fields","id","name","type"],"title":"Create case request properties for a IBM Resilient connector"},"Cases_connector_properties_servicenow":{"description":"Defines properties for connectors when type is `.servicenow`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","type":"object","properties":{"category":{"description":"The category of the incident.","nullable":true,"type":"string"},"impact":{"description":"The effect an incident had on business.","nullable":true,"type":"string"},"severity":{"description":"The severity of the incident.","nullable":true,"type":"string"},"subcategory":{"description":"The subcategory of the incident.","nullable":true,"type":"string"},"urgency":{"description":"The extent to which the incident resolution can be delayed.","nullable":true,"type":"string"}},"required":["category","impact","severity","subcategory","urgency"]},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".servicenow"],"example":".servicenow","type":"string"}},"required":["fields","id","name","type"],"title":"Create case request properties for a ServiceNow ITSM connector"},"Cases_connector_properties_servicenow_sir":{"description":"Defines properties for connectors when type is `.servicenow-sir`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","type":"object","properties":{"category":{"description":"The category of the incident.","nullable":true,"type":"string"},"destIp":{"description":"Indicates whether cases will send a comma-separated list of destination IPs.","nullable":true,"type":"boolean"},"malwareHash":{"description":"Indicates whether cases will send a comma-separated list of malware hashes.","nullable":true,"type":"boolean"},"malwareUrl":{"description":"Indicates whether cases will send a comma-separated list of malware URLs.","nullable":true,"type":"boolean"},"priority":{"description":"The priority of the issue.","nullable":true,"type":"string"},"sourceIp":{"description":"Indicates whether cases will send a comma-separated list of source IPs.","nullable":true,"type":"boolean"},"subcategory":{"description":"The subcategory of the incident.","nullable":true,"type":"string"}},"required":["category","destIp","malwareHash","malwareUrl","priority","sourceIp","subcategory"]},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".servicenow-sir"],"example":".servicenow-sir","type":"string"}},"required":["fields","id","name","type"],"title":"Create case request properties for a ServiceNow SecOps connector"},"Cases_connector_properties_swimlane":{"description":"Defines properties for connectors when type is `.swimlane`.","type":"object","properties":{"fields":{"description":"An object containing the connector fields. If you want to omit any individual field, specify null as its value.","type":"object","properties":{"caseId":{"description":"The case identifier for Swimlane connectors.","nullable":true,"type":"string"}},"required":["caseId"]},"id":{"description":"The identifier for the connector. To retrieve connector IDs, use the find connectors API.","type":"string"},"name":{"description":"The name of the connector.","type":"string"},"type":{"description":"The type of connector.","enum":[".swimlane"],"example":".swimlane","type":"string"}},"required":["fields","id","name","type"],"title":"Create case request properties for a Swimlane connector"},"Cases_connector_types":{"description":"The type of connector.","enum":[".cases-webhook",".jira",".none",".resilient",".servicenow",".servicenow-sir",".swimlane"],"example":".none","type":"string"},"Cases_create_case_request":{"description":"The create case API request body varies depending on the type of connector.","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"category":{"$ref":"#/components/schemas/Cases_case_category"},"connector":{"oneOf":[{"$ref":"#/components/schemas/Cases_connector_properties_none"},{"$ref":"#/components/schemas/Cases_connector_properties_cases_webhook"},{"$ref":"#/components/schemas/Cases_connector_properties_jira"},{"$ref":"#/components/schemas/Cases_connector_properties_resilient"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow_sir"},{"$ref":"#/components/schemas/Cases_connector_properties_swimlane"}]},"customFields":{"description":"Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.\n","items":{"type":"object","properties":{"key":{"description":"The unique identifier for the custom field. The key value must exist in the case configuration settings.\n","type":"string"},"type":{"description":"The custom field type. It must match the type specified in the case configuration settings.\n","enum":["text","toggle"],"type":"string"},"value":{"description":"The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n","oneOf":[{"maxLength":160,"minLength":1,"nullable":true,"type":"string"},{"type":"boolean"}]}},"required":["key","type","value"]},"maxItems":10,"minItems":0,"type":"array"},"description":{"$ref":"#/components/schemas/Cases_case_description"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"tags":{"$ref":"#/components/schemas/Cases_case_tags"},"title":{"$ref":"#/components/schemas/Cases_case_title"}},"required":["connector","description","owner","settings","tags","title"],"title":"Create case request","type":"object"},"Cases_external_service":{"nullable":true,"type":"object","properties":{"connector_id":{"type":"string"},"connector_name":{"type":"string"},"external_id":{"type":"string"},"external_title":{"type":"string"},"external_url":{"type":"string"},"pushed_at":{"format":"date-time","type":"string"},"pushed_by":{"nullable":true,"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}}}}},"Cases_owner":{"description":"The application that owns the cases: Stack Management, Observability, or Elastic Security.\n","enum":["cases","observability","securitySolution"],"example":"cases","type":"string"},"Cases_owners":{"items":{"$ref":"#/components/schemas/Cases_owner"},"type":"array"},"Cases_payload_alert_comment":{"type":"object","properties":{"comment":{"type":"object","properties":{"alertId":{"oneOf":[{"example":"1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d","type":"string"},{"items":{"type":"string"},"type":"array"}]},"index":{"oneOf":[{"example":".alerts-observability.logs.alerts-default","type":"string"},{"items":{"type":"string"},"type":"array"}]},"owner":{"$ref":"#/components/schemas/Cases_owner"},"rule":{"type":"object","properties":{"id":{"description":"The rule identifier.","example":"94d80550-aaf4-11ec-985f-97e55adae8b9","type":"string"},"name":{"description":"The rule name.","example":"security_rule","type":"string"}}},"type":{"enum":["alert"],"type":"string"}}}}},"Cases_payload_assignees":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"}}},"Cases_payload_connector":{"type":"object","properties":{"connector":{"type":"object","properties":{"fields":{"description":"An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.","example":null,"nullable":true,"type":"object","properties":{"caseId":{"description":"The case identifier for Swimlane connectors.","type":"string"},"category":{"description":"The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors.","type":"string"},"destIp":{"description":"Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"impact":{"description":"The effect an incident had on business for ServiceNow ITSM connectors.","type":"string"},"issueType":{"description":"The type of issue for Jira connectors.","type":"string"},"issueTypes":{"description":"The type of incident for IBM Resilient connectors.","items":{"type":"string"},"type":"array"},"malwareHash":{"description":"Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"malwareUrl":{"description":"Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"parent":{"description":"The key of the parent issue, when the issue type is sub-task for Jira connectors.","type":"string"},"priority":{"description":"The priority of the issue for Jira and ServiceNow SecOps connectors.","type":"string"},"severity":{"description":"The severity of the incident for ServiceNow ITSM connectors.","type":"string"},"severityCode":{"description":"The severity code of the incident for IBM Resilient connectors.","type":"string"},"sourceIp":{"description":"Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"subcategory":{"description":"The subcategory of the incident for ServiceNow ITSM connectors.","type":"string"},"urgency":{"description":"The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors.","type":"string"}}},"id":{"description":"The identifier for the connector. To create a case without a connector, use `none`.","example":"none","type":"string"},"name":{"description":"The name of the connector. To create a case without a connector, use `none`.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}}}},"Cases_payload_create_case":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"connector":{"type":"object","properties":{"fields":{"description":"An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.","example":null,"nullable":true,"type":"object","properties":{"caseId":{"description":"The case identifier for Swimlane connectors.","type":"string"},"category":{"description":"The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors.","type":"string"},"destIp":{"description":"Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"impact":{"description":"The effect an incident had on business for ServiceNow ITSM connectors.","type":"string"},"issueType":{"description":"The type of issue for Jira connectors.","type":"string"},"issueTypes":{"description":"The type of incident for IBM Resilient connectors.","items":{"type":"string"},"type":"array"},"malwareHash":{"description":"Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"malwareUrl":{"description":"Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"parent":{"description":"The key of the parent issue, when the issue type is sub-task for Jira connectors.","type":"string"},"priority":{"description":"The priority of the issue for Jira and ServiceNow SecOps connectors.","type":"string"},"severity":{"description":"The severity of the incident for ServiceNow ITSM connectors.","type":"string"},"severityCode":{"description":"The severity code of the incident for IBM Resilient connectors.","type":"string"},"sourceIp":{"description":"Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors.","nullable":true,"type":"boolean"},"subcategory":{"description":"The subcategory of the incident for ServiceNow ITSM connectors.","type":"string"},"urgency":{"description":"The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors.","type":"string"}}},"id":{"description":"The identifier for the connector. To create a case without a connector, use `none`.","example":"none","type":"string"},"name":{"description":"The name of the connector. To create a case without a connector, use `none`.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"description":{"type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"status":{"$ref":"#/components/schemas/Cases_case_status"},"tags":{"items":{"example":["tag-1"],"type":"string"},"type":"array"},"title":{"type":"string"}}},"Cases_payload_delete":{"description":"If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable.","nullable":true,"type":"object"},"Cases_payload_description":{"type":"object","properties":{"description":{"type":"string"}}},"Cases_payload_pushed":{"type":"object","properties":{"externalService":{"$ref":"#/components/schemas/Cases_external_service"}}},"Cases_payload_settings":{"type":"object","properties":{"settings":{"$ref":"#/components/schemas/Cases_settings"}}},"Cases_payload_severity":{"type":"object","properties":{"severity":{"$ref":"#/components/schemas/Cases_case_severity"}}},"Cases_payload_status":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Cases_case_status"}}},"Cases_payload_tags":{"type":"object","properties":{"tags":{"example":["tag-1"],"items":{"type":"string"},"type":"array"}}},"Cases_payload_title":{"type":"object","properties":{"title":{"type":"string"}}},"Cases_payload_user_comment":{"type":"object","properties":{"comment":{"type":"object","properties":{"comment":{"type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"type":{"enum":["user"],"type":"string"}}}}},"Cases_rule":{"description":"The rule that is associated with the alerts. It is required only when `type` is `alert`. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n","title":"Alerting rule","type":"object","properties":{"id":{"description":"The rule identifier.","example":"94d80550-aaf4-11ec-985f-97e55adae8b9","type":"string"},"name":{"description":"The rule name.","example":"security_rule","type":"string"}},"x-state":"Technical preview"},"Cases_searchFieldsType":{"description":"The fields to perform the `simple_query_string` parsed query against.","enum":["description","title"],"type":"string"},"Cases_searchFieldsTypeArray":{"items":{"$ref":"#/components/schemas/Cases_searchFieldsType"},"type":"array"},"Cases_set_case_configuration_request":{"description":"External connection details, such as the closure type and default connector for cases.","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"description":"An object that contains the connector configuration.","type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}},"required":["fields","id","name","type"]},"customFields":{"description":"Custom fields case configuration.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}},"required":["key","label","required","type"]},"maxItems":10,"minItems":0,"type":"array"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"templates":{"$ref":"#/components/schemas/Cases_templates"}},"required":["closure_type","connector","owner"],"title":"Set case configuration request","type":"object"},"Cases_settings":{"description":"An object that contains the case settings.","type":"object","properties":{"syncAlerts":{"description":"Turns alert syncing on or off.","example":true,"type":"boolean"}},"required":["syncAlerts"]},"Cases_string":{"type":"string"},"Cases_string_array":{"items":{"$ref":"#/components/schemas/Cases_string"},"maxItems":100,"type":"array"},"Cases_template_tags":{"description":"The words and phrases that help categorize templates. It can be an empty array.\n","items":{"maxLength":256,"type":"string"},"maxItems":200,"type":"array"},"Cases_templates":{"items":{"type":"object","properties":{"caseFields":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"category":{"$ref":"#/components/schemas/Cases_case_category"},"connector":{"type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}}},"customFields":{"description":"Custom field values in the template.","items":{"type":"object","properties":{"key":{"description":"The unique key for the custom field.","type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"value":{"description":"The default value for the custom field when a case uses the template. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]}}},"type":"array","x-state":"Technical preview"},"description":{"$ref":"#/components/schemas/Cases_case_description"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"tags":{"$ref":"#/components/schemas/Cases_case_tags"},"title":{"$ref":"#/components/schemas/Cases_case_title"}}},"description":{"description":"A description for the template.","type":"string"},"key":{"description":"A unique key for the template. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific template.\n","type":"string"},"name":{"description":"The name of the template.","type":"string"},"tags":{"$ref":"#/components/schemas/Cases_template_tags"}}},"type":"array","x-state":"Technical preview"},"Cases_update_alert_comment_request_properties":{"description":"Defines properties for case comment requests when type is alert.","type":"object","properties":{"alertId":{"$ref":"#/components/schemas/Cases_alert_identifiers"},"id":{"description":"The identifier for the comment. To retrieve comment IDs, use the get comments API.\n","example":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","type":"string"},"index":{"$ref":"#/components/schemas/Cases_alert_indices"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"rule":{"$ref":"#/components/schemas/Cases_rule"},"type":{"description":"The type of comment.","enum":["alert"],"example":"alert","type":"string"},"version":{"description":"The current comment version. To retrieve version values, use the get comments API.\n","example":"Wzk1LDFd","type":"string"}},"required":["alertId","id","index","owner","rule","type","version"],"title":"Update case comment request properties for alerts"},"Cases_update_case_comment_request":{"description":"The update case comment API request body varies depending on whether you are updating an alert or a comment.","discriminator":{"mapping":{"alert":"#/components/schemas/Cases_update_alert_comment_request_properties","user":"#/components/schemas/Cases_update_user_comment_request_properties"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Cases_update_alert_comment_request_properties"},{"$ref":"#/components/schemas/Cases_update_user_comment_request_properties"}],"title":"Update case comment request"},"Cases_update_case_configuration_request":{"description":"You can update settings such as the closure type, custom fields, templates, and the default connector for cases.\n","properties":{"closure_type":{"$ref":"#/components/schemas/Cases_closure_types"},"connector":{"description":"An object that contains the connector configuration.","type":"object","properties":{"fields":{"description":"The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.","nullable":true,"type":"object"},"id":{"description":"The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.","example":"none","type":"string"},"name":{"description":"The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.","example":"none","type":"string"},"type":{"$ref":"#/components/schemas/Cases_connector_types"}},"required":["fields","id","name","type"]},"customFields":{"description":"Custom fields case configuration.","items":{"type":"object","properties":{"defaultValue":{"description":"A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n","oneOf":[{"type":"string"},{"type":"boolean"}]},"key":{"description":"A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n","maxLength":36,"minLength":1,"type":"string"},"label":{"description":"The custom field label that is displayed in the case.","maxLength":50,"minLength":1,"type":"string"},"type":{"description":"The type of the custom field.","enum":["text","toggle"],"type":"string"},"required":{"description":"Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n","type":"boolean"}},"required":["key","label","required","type"]},"type":"array"},"templates":{"$ref":"#/components/schemas/Cases_templates"},"version":{"description":"The version of the connector. To retrieve the version value, use the get configuration API.\n","example":"WzIwMiwxXQ==","type":"string"}},"required":["version"],"title":"Update case configuration request","type":"object"},"Cases_update_case_request":{"description":"The update case API request body varies depending on the type of connector.","properties":{"cases":{"description":"An array containing one or more case objects.","items":{"type":"object","properties":{"assignees":{"$ref":"#/components/schemas/Cases_assignees"},"category":{"$ref":"#/components/schemas/Cases_case_category"},"connector":{"oneOf":[{"$ref":"#/components/schemas/Cases_connector_properties_none"},{"$ref":"#/components/schemas/Cases_connector_properties_cases_webhook"},{"$ref":"#/components/schemas/Cases_connector_properties_jira"},{"$ref":"#/components/schemas/Cases_connector_properties_resilient"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow"},{"$ref":"#/components/schemas/Cases_connector_properties_servicenow_sir"},{"$ref":"#/components/schemas/Cases_connector_properties_swimlane"}]},"customFields":{"description":"Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.\n","items":{"type":"object","properties":{"key":{"description":"The unique identifier for the custom field. The key value must exist in the case configuration settings.\n","type":"string"},"type":{"description":"The custom field type. It must match the type specified in the case configuration settings.\n","enum":["text","toggle"],"type":"string"},"value":{"description":"The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n","oneOf":[{"maxLength":160,"minLength":1,"nullable":true,"type":"string"},{"type":"boolean"}]}},"required":["key","type","value"]},"maxItems":10,"minItems":0,"type":"array"},"description":{"$ref":"#/components/schemas/Cases_case_description"},"id":{"description":"The identifier for the case.","maxLength":30000,"type":"string"},"settings":{"$ref":"#/components/schemas/Cases_settings"},"severity":{"$ref":"#/components/schemas/Cases_case_severity"},"status":{"$ref":"#/components/schemas/Cases_case_status"},"tags":{"$ref":"#/components/schemas/Cases_case_tags"},"title":{"$ref":"#/components/schemas/Cases_case_title"},"version":{"description":"The current version of the case. To determine this value, use the get case or find cases APIs.","type":"string"}},"required":["id","version"]},"maxItems":100,"minItems":1,"type":"array"}},"required":["cases"],"title":"Update case request","type":"object"},"Cases_update_user_comment_request_properties":{"description":"Defines properties for case comment requests when type is user.","properties":{"comment":{"description":"The new comment. It is required only when `type` is `user`.","example":"A new comment.","maxLength":30000,"type":"string"},"id":{"description":"The identifier for the comment. To retrieve comment IDs, use the get comments API.\n","example":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"type":{"description":"The type of comment.","enum":["user"],"example":"user","type":"string"},"version":{"description":"The current comment version. To retrieve version values, use the get comments API.\n","example":"Wzk1LDFd","type":"string"}},"required":["comment","id","owner","type","version"],"title":"Update case comment request properties for user comments","type":"object"},"Cases_user_actions_find_response_properties":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/Cases_actions"},"comment_id":{"example":"578608d0-03b1-11ed-920c-974bfa104448","nullable":true,"type":"string"},"created_at":{"example":"2022-05-13T09:16:17.416Z","format":"date-time","type":"string"},"created_by":{"type":"object","properties":{"email":{"example":null,"nullable":true,"type":"string"},"full_name":{"example":null,"nullable":true,"type":"string"},"profile_uid":{"example":"u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0","type":"string"},"username":{"example":"elastic","nullable":true,"type":"string"}},"required":["email","full_name","username"]},"id":{"example":"22fd3e30-03b1-11ed-920c-974bfa104448","type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"payload":{"oneOf":[{"$ref":"#/components/schemas/Cases_payload_alert_comment"},{"$ref":"#/components/schemas/Cases_payload_assignees"},{"$ref":"#/components/schemas/Cases_payload_connector"},{"$ref":"#/components/schemas/Cases_payload_create_case"},{"$ref":"#/components/schemas/Cases_payload_delete"},{"$ref":"#/components/schemas/Cases_payload_description"},{"$ref":"#/components/schemas/Cases_payload_pushed"},{"$ref":"#/components/schemas/Cases_payload_settings"},{"$ref":"#/components/schemas/Cases_payload_severity"},{"$ref":"#/components/schemas/Cases_payload_status"},{"$ref":"#/components/schemas/Cases_payload_tags"},{"$ref":"#/components/schemas/Cases_payload_title"},{"$ref":"#/components/schemas/Cases_payload_user_comment"}]},"type":{"description":"The type of action.","enum":["assignees","create_case","comment","connector","description","pushed","tags","title","status","settings","severity"],"example":"create_case","type":"string"},"version":{"example":"WzM1ODg4LDFd","type":"string"}},"required":["action","comment_id","created_at","created_by","id","owner","payload","type","version"]},"Cases_user_comment_response_properties":{"title":"Case response properties for user comments","type":"object","properties":{"comment":{"example":"A new comment.","type":"string"},"created_at":{"example":"2022-05-13T09:16:17.416Z","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/Cases_case_response_created_by_properties"},"id":{"example":"8af6ac20-74f6-11ea-b83a-553aecdb28b6","type":"string"},"owner":{"$ref":"#/components/schemas/Cases_owner"},"pushed_at":{"example":null,"format":"date-time","nullable":true,"type":"string"},"pushed_by":{"$ref":"#/components/schemas/Cases_case_response_pushed_by_properties"},"type":{"enum":["user"],"example":"user","type":"string"},"updated_at":{"example":null,"format":"date-time","nullable":true,"type":"string"},"updated_by":{"$ref":"#/components/schemas/Cases_case_response_updated_by_properties"},"version":{"example":"WzIwNDMxLDFd","type":"string"}},"required":["type"]},"Data_views_400_response":{"title":"Bad request","type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"type":"string"},"statusCode":{"example":400,"type":"number"}},"required":["statusCode","error","message"]},"Data_views_404_response":{"type":"object","properties":{"error":{"enum":["Not Found"],"example":"Not Found","type":"string"},"message":{"example":"Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00] not found","type":"string"},"statusCode":{"enum":[404],"example":404,"type":"integer"}}},"Data_views_allownoindex":{"description":"Allows the data view saved object to exist before the data is available.","type":"boolean"},"Data_views_create_data_view_request_object":{"title":"Create data view request","type":"object","properties":{"data_view":{"description":"The data view object.","type":"object","properties":{"allowNoIndex":{"$ref":"#/components/schemas/Data_views_allownoindex"},"fieldAttrs":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_fieldattrs"},"type":"object"},"fieldFormats":{"$ref":"#/components/schemas/Data_views_fieldformats"},"fields":{"type":"object"},"id":{"type":"string"},"name":{"description":"The data view name.","type":"string"},"namespaces":{"$ref":"#/components/schemas/Data_views_namespaces"},"runtimeFieldMap":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_runtimefieldmap"},"type":"object"},"sourceFilters":{"$ref":"#/components/schemas/Data_views_sourcefilters"},"timeFieldName":{"$ref":"#/components/schemas/Data_views_timefieldname"},"title":{"$ref":"#/components/schemas/Data_views_title"},"type":{"$ref":"#/components/schemas/Data_views_type"},"typeMeta":{"$ref":"#/components/schemas/Data_views_typemeta"},"version":{"type":"string"}},"required":["title"]},"override":{"default":false,"description":"Override an existing data view if a data view with the provided title already exists.","type":"boolean"}},"required":["data_view"]},"Data_views_data_view_response_object":{"title":"Data view response properties","type":"object","properties":{"data_view":{"type":"object","properties":{"allowNoIndex":{"$ref":"#/components/schemas/Data_views_allownoindex"},"fieldAttrs":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_fieldattrs"},"type":"object"},"fieldFormats":{"$ref":"#/components/schemas/Data_views_fieldformats"},"fields":{"type":"object"},"id":{"example":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","type":"string"},"name":{"description":"The data view name.","type":"string"},"namespaces":{"$ref":"#/components/schemas/Data_views_namespaces"},"runtimeFieldMap":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_runtimefieldmap"},"type":"object"},"sourceFilters":{"$ref":"#/components/schemas/Data_views_sourcefilters"},"timeFieldName":{"$ref":"#/components/schemas/Data_views_timefieldname"},"title":{"$ref":"#/components/schemas/Data_views_title"},"typeMeta":{"$ref":"#/components/schemas/Data_views_typemeta_response"},"version":{"example":"WzQ2LDJd","type":"string"}}}}},"Data_views_fieldattrs":{"description":"A map of field attributes by field name.","type":"object","properties":{"count":{"description":"Popularity count for the field.","type":"integer"},"customDescription":{"description":"Custom description for the field.","maxLength":300,"type":"string"},"customLabel":{"description":"Custom label for the field.","type":"string"}}},"Data_views_fieldformats":{"description":"A map of field formats by field name.","type":"object"},"Data_views_namespaces":{"description":"An array of space identifiers for sharing the data view between multiple spaces.","items":{"default":"default","type":"string"},"type":"array"},"Data_views_runtimefieldmap":{"description":"A map of runtime field definitions by field name.","type":"object","properties":{"script":{"type":"object","properties":{"source":{"description":"Script for the runtime field.","type":"string"}}},"type":{"description":"Mapping type of the runtime field.","type":"string"}},"required":["script","type"]},"Data_views_sourcefilters":{"description":"The array of field names you want to filter out in Discover.","items":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"type":"array"},"Data_views_swap_data_view_request_object":{"title":"Data view reference swap request","type":"object","properties":{"delete":{"description":"Deletes referenced saved object if all references are removed.","type":"boolean"},"forId":{"description":"Limit the affected saved objects to one or more by identifier.","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"forType":{"description":"Limit the affected saved objects by type.","type":"string"},"fromId":{"description":"The saved object reference to change.","type":"string"},"fromType":{"description":"Specify the type of the saved object reference to alter. The default value is `index-pattern` for data views.\n","type":"string"},"toId":{"description":"New saved object reference value to replace the old value.","type":"string"}},"required":["fromId","toId"]},"Data_views_timefieldname":{"description":"The timestamp field name, which you use for time-based data views.","type":"string"},"Data_views_title":{"description":"Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`).","type":"string"},"Data_views_type":{"description":"When set to `rollup`, identifies the rollup data views.","type":"string"},"Data_views_typemeta":{"description":"When you use rollup indices, contains the field list for the rollup data view API endpoints.","type":"object","properties":{"aggs":{"description":"A map of rollup restrictions by aggregation type and field name.","type":"object"},"params":{"description":"Properties for retrieving rollup fields.","type":"object"}},"required":["aggs","params"]},"Data_views_typemeta_response":{"description":"When you use rollup indices, contains the field list for the rollup data view API endpoints.","nullable":true,"type":"object","properties":{"aggs":{"description":"A map of rollup restrictions by aggregation type and field name.","type":"object"},"params":{"description":"Properties for retrieving rollup fields.","type":"object"}}},"Data_views_update_data_view_request_object":{"title":"Update data view request","type":"object","properties":{"data_view":{"description":"The data view properties you want to update. Only the specified properties are updated in the data view. Unspecified fields stay as they are persisted.\n","type":"object","properties":{"allowNoIndex":{"$ref":"#/components/schemas/Data_views_allownoindex"},"fieldFormats":{"$ref":"#/components/schemas/Data_views_fieldformats"},"fields":{"type":"object"},"name":{"type":"string"},"runtimeFieldMap":{"additionalProperties":{"$ref":"#/components/schemas/Data_views_runtimefieldmap"},"type":"object"},"sourceFilters":{"$ref":"#/components/schemas/Data_views_sourcefilters"},"timeFieldName":{"$ref":"#/components/schemas/Data_views_timefieldname"},"title":{"$ref":"#/components/schemas/Data_views_title"},"type":{"$ref":"#/components/schemas/Data_views_type"},"typeMeta":{"$ref":"#/components/schemas/Data_views_typemeta"}}},"refresh_fields":{"default":false,"description":"Reloads the data view fields after the data view is updated.","type":"boolean"}},"required":["data_view"]},"Kibana_HTTP_APIs_core_status_redactedResponse":{"additionalProperties":false,"description":"A minimal representation of Kibana's operational status.","type":"object","properties":{"status":{"additionalProperties":false,"type":"object","properties":{"overall":{"additionalProperties":false,"type":"object","properties":{"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"}},"required":["level"]}},"required":["overall"]}},"required":["status"]},"Kibana_HTTP_APIs_core_status_response":{"additionalProperties":false,"description":"Kibana's operational status as well as a detailed breakdown of plugin statuses indication of various loads (like event loop utilization and network traffic) at time of request.","type":"object","properties":{"metrics":{"additionalProperties":false,"description":"Metric groups collected by Kibana.","type":"object","properties":{"collection_interval_in_millis":{"description":"The interval at which metrics should be collected.","type":"number"},"elasticsearch_client":{"additionalProperties":false,"description":"Current network metrics of Kibana's Elasticsearch client.","type":"object","properties":{"totalActiveSockets":{"description":"Count of network sockets currently in use.","type":"number"},"totalIdleSockets":{"description":"Count of network sockets currently idle.","type":"number"},"totalQueuedRequests":{"description":"Count of requests not yet assigned to sockets.","type":"number"}},"required":["totalActiveSockets","totalIdleSockets","totalQueuedRequests"]},"last_updated":{"description":"The time metrics were collected.","type":"string"}},"required":["elasticsearch_client","last_updated","collection_interval_in_millis"]},"name":{"description":"Kibana instance name.","type":"string"},"status":{"additionalProperties":false,"type":"object","properties":{"core":{"additionalProperties":false,"description":"Statuses of core Kibana services.","type":"object","properties":{"elasticsearch":{"additionalProperties":false,"type":"object","properties":{"detail":{"description":"Human readable detail of the service status.","type":"string"},"documentationUrl":{"description":"A URL to further documentation regarding this service.","type":"string"},"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"},"meta":{"additionalProperties":{},"description":"An unstructured set of extra metadata about this service.","type":"object"},"summary":{"description":"A human readable summary of the service status.","type":"string"}},"required":["level","summary","meta"]},"savedObjects":{"additionalProperties":false,"type":"object","properties":{"detail":{"description":"Human readable detail of the service status.","type":"string"},"documentationUrl":{"description":"A URL to further documentation regarding this service.","type":"string"},"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"},"meta":{"additionalProperties":{},"description":"An unstructured set of extra metadata about this service.","type":"object"},"summary":{"description":"A human readable summary of the service status.","type":"string"}},"required":["level","summary","meta"]}},"required":["elasticsearch","savedObjects"]},"overall":{"additionalProperties":false,"type":"object","properties":{"detail":{"description":"Human readable detail of the service status.","type":"string"},"documentationUrl":{"description":"A URL to further documentation regarding this service.","type":"string"},"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"},"meta":{"additionalProperties":{},"description":"An unstructured set of extra metadata about this service.","type":"object"},"summary":{"description":"A human readable summary of the service status.","type":"string"}},"required":["level","summary","meta"]},"plugins":{"additionalProperties":{"additionalProperties":false,"type":"object","properties":{"detail":{"description":"Human readable detail of the service status.","type":"string"},"documentationUrl":{"description":"A URL to further documentation regarding this service.","type":"string"},"level":{"description":"Service status levels as human and machine readable values.","enum":["available","degraded","unavailable","critical"],"type":"string"},"meta":{"additionalProperties":{},"description":"An unstructured set of extra metadata about this service.","type":"object"},"summary":{"description":"A human readable summary of the service status.","type":"string"}},"required":["level","summary","meta"]},"description":"A dynamic mapping of plugin ID to plugin status.","type":"object"}},"required":["overall","core","plugins"]},"uuid":{"description":"Unique, generated Kibana instance UUID. This UUID should persist even if the Kibana process restarts.","type":"string"},"version":{"additionalProperties":false,"type":"object","properties":{"build_date":{"description":"The date and time of this build.","type":"string"},"build_flavor":{"description":"The build flavour determines configuration and behavior of Kibana. On premise users will almost always run the \"traditional\" flavour, while other flavours are reserved for Elastic-specific use cases.","enum":["serverless","traditional"],"type":"string"},"build_hash":{"description":"A unique hash value representing the git commit of this Kibana build.","type":"string"},"build_number":{"description":"A monotonically increasing number, each subsequent build will have a higher number.","type":"number"},"build_snapshot":{"description":"Whether this build is a snapshot build.","type":"boolean"},"number":{"description":"A semantic version number.","type":"string"}},"required":["number","build_hash","build_number","build_snapshot","build_flavor","build_date"]}},"required":["name","uuid","version","status","metrics"]},"Machine_learning_APIs_mlSync200Response":{"properties":{"datafeedsAdded":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds"},"description":"If a saved object for an anomaly detection job is missing a datafeed identifier, it is added when you run the sync machine learning saved objects API.","type":"object"},"datafeedsRemoved":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds"},"description":"If a saved object for an anomaly detection job references a datafeed that no longer exists, it is deleted when you run the sync machine learning saved objects API.","type":"object"},"savedObjectsCreated":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsCreated"},"savedObjectsDeleted":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted"}},"title":"Successful sync API response","type":"object"},"Machine_learning_APIs_mlSync4xxResponse":{"properties":{"error":{"example":"Unauthorized","type":"string"},"message":{"type":"string"},"statusCode":{"example":401,"type":"integer"}},"title":"Unsuccessful sync API response","type":"object"},"Machine_learning_APIs_mlSyncResponseAnomalyDetectors":{"description":"The sync machine learning saved objects API response contains this object when there are anomaly detection jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.","properties":{"success":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess"}},"title":"Sync API response for anomaly detection jobs","type":"object"},"Machine_learning_APIs_mlSyncResponseDatafeeds":{"description":"The sync machine learning saved objects API response contains this object when there are datafeeds affected by the synchronization. There is an object for each relevant datafeed, which contains the synchronization status.","properties":{"success":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess"}},"title":"Sync API response for datafeeds","type":"object"},"Machine_learning_APIs_mlSyncResponseDataFrameAnalytics":{"description":"The sync machine learning saved objects API response contains this object when there are data frame analytics jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.","properties":{"success":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess"}},"title":"Sync API response for data frame analytics jobs","type":"object"},"Machine_learning_APIs_mlSyncResponseSavedObjectsCreated":{"description":"If saved objects are missing for machine learning jobs or trained models, they are created when you run the sync machine learning saved objects API.","properties":{"anomaly-detector":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors"},"description":"If saved objects are missing for anomaly detection jobs, they are created.","type":"object"},"data-frame-analytics":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics"},"description":"If saved objects are missing for data frame analytics jobs, they are created.","type":"object"},"trained-model":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels"},"description":"If saved objects are missing for trained models, they are created.","type":"object"}},"title":"Sync API response for created saved objects","type":"object"},"Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted":{"description":"If saved objects exist for machine learning jobs or trained models that no longer exist, they are deleted when you run the sync machine learning saved objects API.","properties":{"anomaly-detector":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors"},"description":"If there are saved objects exist for nonexistent anomaly detection jobs, they are deleted.","type":"object"},"data-frame-analytics":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics"},"description":"If there are saved objects exist for nonexistent data frame analytics jobs, they are deleted.","type":"object"},"trained-model":{"additionalProperties":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels"},"description":"If there are saved objects exist for nonexistent trained models, they are deleted.","type":"object"}},"title":"Sync API response for deleted saved objects","type":"object"},"Machine_learning_APIs_mlSyncResponseSuccess":{"description":"The success or failure of the synchronization.","type":"boolean"},"Machine_learning_APIs_mlSyncResponseTrainedModels":{"description":"The sync machine learning saved objects API response contains this object when there are trained models affected by the synchronization. There is an object for each relevant trained model, which contains the synchronization status.","properties":{"success":{"$ref":"#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess"}},"title":"Sync API response for trained models","type":"object"},"Saved_objects_400_response":{"title":"Bad request","type":"object","properties":{"error":{"enum":["Bad Request"],"type":"string"},"message":{"type":"string"},"statusCode":{"enum":[400],"type":"integer"}},"required":["error","message","statusCode"]},"Saved_objects_attributes":{"description":"The data that you want to create. WARNING: When you create saved objects, attributes are not validated, which allows you to pass arbitrary and ill-formed data into the API that can break Kibana. Make sure any data that you send to the API is properly formed.\n","type":"object"},"Saved_objects_initial_namespaces":{"description":"Identifiers for the spaces in which this object is created. If this is provided, the object is created only in the explicitly defined spaces. If this is not provided, the object is created in the current space (default behavior). For shareable object types (registered with `namespaceType: 'multiple'`), this option can be used to specify one or more spaces, including the \"All spaces\" identifier ('*'). For isolated object types (registered with `namespaceType: 'single'` or `namespaceType: 'multiple-isolated'`), this option can only be used to specify a single space, and the \"All spaces\" identifier ('*') is not allowed. For global object types (`registered with `namespaceType: agnostic`), this option cannot be used.\n","type":"array"},"Saved_objects_references":{"description":"Objects with `name`, `id`, and `type` properties that describe the other saved objects that this object references. Use `name` in attributes to refer to the other saved object, but never the `id`, which can update automatically during migrations or import and export.\n","type":"array"},"Security_AI_Assistant_API_AnonymizationFieldCreateProps":{"type":"object","properties":{"allowed":{"description":"Whether this field is allowed to be sent to the model.","example":true,"type":"boolean"},"anonymized":{"description":"Whether this field should be anonymized.","example":false,"type":"boolean"},"field":{"description":"Name of the anonymization field to create.","example":"host.name","type":"string"}},"required":["field"]},"Security_AI_Assistant_API_AnonymizationFieldDetailsInError":{"type":"object","properties":{"id":{"description":"The ID of the anonymization field.","example":"field12","type":"string"},"name":{"description":"Name of the anonymization field.","example":"host.name","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_AnonymizationFieldResponse":{"type":"object","properties":{"allowed":{"description":"Whether this field is allowed to be sent to the model.","example":true,"type":"boolean"},"anonymized":{"description":"Whether this field should be anonymized.","example":false,"type":"boolean"},"createdAt":{"description":"Timestamp of when the anonymization field was created.","example":"2023-10-31T12:00:00Z","type":"string"},"createdBy":{"description":"Username of the person who created the anonymization field.","example":"user1","type":"string"},"field":{"description":"Name of the anonymization field.","example":"url.domain","type":"string"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString","description":"The ID of the anonymization field."},"namespace":{"description":"Kibana space in which this anonymization field exists.","example":"default","type":"string"},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp","description":"Timestamp when the anonymization field was initially created."},"updatedAt":{"description":"Timestamp of the last update.","example":"2023-10-31T12:00:00Z","type":"string"},"updatedBy":{"description":"Username of the person who last updated the field.","example":"user1","type":"string"}},"required":["id","field"]},"Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipReason":{"description":"Reason why the anonymization field was not modified.","enum":["ANONYMIZATION_FIELD_NOT_MODIFIED"],"type":"string"},"Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipResult":{"type":"object","properties":{"id":{"description":"The ID of the anonymization field that was not modified.","example":"field4","type":"string"},"name":{"description":"Name of the anonymization field that was not modified.","example":"user.name","type":"string"},"skip_reason":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipReason","description":"Reason why the anonymization field was not modified."}},"required":["id","skip_reason"]},"Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResponse":{"type":"object","properties":{"anonymization_fields_count":{"description":"Total number of anonymization fields processed.","example":5,"type":"integer"},"attributes":{"type":"object","properties":{"errors":{"description":"List of errors that occurred during the bulk operation.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NormalizedAnonymizationFieldError"},"type":"array"},"results":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResults"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_BulkCrudActionSummary"}},"required":["results","summary"]},"message":{"description":"Message providing information about the bulk action result.","example":"Bulk action completed successfully","type":"string"},"status_code":{"description":"HTTP status code returned.","example":200,"type":"integer"},"success":{"description":"Indicates if the bulk action was successful.","example":true,"type":"boolean"}},"required":["attributes"]},"Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResults":{"type":"object","properties":{"created":{"description":"List of anonymization fields successfully created.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse"},"type":"array"},"deleted":{"items":{"description":"Array of IDs of anonymization fields that were deleted.","example":"field3","type":"string"},"type":"array"},"skipped":{"description":"List of anonymization fields that were skipped during the operation.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipResult"},"type":"array"},"updated":{"description":"List of anonymization fields successfully updated.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse"},"type":"array"}},"required":["updated","created","deleted","skipped"]},"Security_AI_Assistant_API_AnonymizationFieldUpdateProps":{"type":"object","properties":{"allowed":{"description":"Whether this field is allowed to be sent to the model.","example":true,"type":"boolean"},"anonymized":{"description":"Whether this field should be anonymized.","example":false,"type":"boolean"},"id":{"description":"The ID of the anonymization field to update.","example":"field8","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_ApiConfig":{"type":"object","properties":{"actionTypeId":{"description":"Action type ID","example":"actionType456","type":"string"},"connectorId":{"description":"Connector ID","example":"connector123","type":"string"},"defaultSystemPromptId":{"description":"Default system prompt ID","example":"systemPrompt001","type":"string"},"model":{"description":"Model","example":"gpt-4","type":"string"},"provider":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Provider","description":"Provider","example":"OpenAI"}},"required":["connectorId","actionTypeId"]},"Security_AI_Assistant_API_BaseContentReference":{"description":"The basis of a content reference","type":"object","properties":{"id":{"description":"Id of the content reference","example":"content123","type":"string"},"type":{"description":"Type of the content reference","example":"SecurityAlert","type":"string"}},"required":["id","type"]},"Security_AI_Assistant_API_BulkCrudActionSummary":{"type":"object","properties":{"failed":{"description":"The number of failed actions.","example":0,"type":"integer"},"skipped":{"description":"The number of skipped actions.","example":1,"type":"integer"},"succeeded":{"description":"The number of successfully performed actions.","example":10,"type":"integer"},"total":{"description":"The total number of actions attempted.","example":12,"type":"integer"}},"required":["failed","skipped","succeeded","total"]},"Security_AI_Assistant_API_ChatCompleteProps":{"description":"The request payload for creating a chat completion.","example":{"connectorId":"conn-001","conversationId":"abc123","isStream":true,"langSmithApiKey":"sk-abc123","langSmithProject":"security_ai_project","messages":[{"content":"How do I detect ransomware on my endpoints?","data":{"device_id":"device-567"},"fields_to_anonymize":["device.name","file.path"],"role":"user"}],"model":"gpt-4","persist":true,"promptId":"prompt_456","responseLanguage":"en"},"type":"object","properties":{"connectorId":{"description":"Required connector identifier to route the request.","example":"conn-001","type":"string"},"conversationId":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString","description":"Existing conversation ID to continue."},"isStream":{"description":"If true, the response will be streamed in chunks.","example":true,"type":"boolean"},"langSmithApiKey":{"description":"API key for LangSmith integration.","example":"sk-abc123","type":"string"},"langSmithProject":{"description":"LangSmith project name for tracing.","example":"security_ai_project","type":"string"},"messages":{"description":"List of chat messages exchanged so far.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ChatMessage"},"type":"array"},"model":{"description":"Model ID or name to use for the response.","example":"gpt-4","type":"string"},"persist":{"description":"Whether to persist the chat and response to storage.","example":true,"type":"boolean"},"promptId":{"description":"Prompt template identifier.","example":"prompt_001","type":"string"},"responseLanguage":{"description":"ISO language code for the assistant's response.","example":"en","type":"string"}},"required":["messages","persist","connectorId"]},"Security_AI_Assistant_API_ChatMessage":{"description":"A message exchanged within the AI chat conversation.","type":"object","properties":{"content":{"description":"The textual content of the message.","example":"What security incidents have been reported today?","type":"string"},"data":{"$ref":"#/components/schemas/Security_AI_Assistant_API_MessageData","description":"Metadata to attach to the context of the message."},"fields_to_anonymize":{"description":"List of field names within the data object that should be anonymized.","example":["user.name","source.ip"],"items":{"type":"string"},"type":"array"},"role":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ChatMessageRole","description":"The sender role of the message."}},"required":["role"]},"Security_AI_Assistant_API_ChatMessageRole":{"description":"The role associated with the message in the chat.","enum":["system","user","assistant"],"example":"user","type":"string"},"Security_AI_Assistant_API_ContentReferences":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_SecurityAlertContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_SecurityAlertsPageContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_ProductDocumentationContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_EsqlContentReference"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_HrefContentReference","additionalProperties":false}]},"description":"A union of all content reference types","type":"object"},"Security_AI_Assistant_API_ConversationCategory":{"description":"The conversation category.","enum":["assistant","insights"],"example":"assistant","type":"string"},"Security_AI_Assistant_API_ConversationConfidence":{"description":"The conversation confidence.","enum":["low","medium","high"],"example":"high","type":"string"},"Security_AI_Assistant_API_ConversationCreateProps":{"type":"object","properties":{"apiConfig":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ApiConfig","description":"LLM API configuration."},"category":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationCategory","description":"The conversation category.","example":"assistant"},"excludeFromLastConversationStorage":{"description":"Exclude from last conversation storage.","type":"boolean"},"id":{"description":"The conversation id.","example":"conversation123","type":"string"},"messages":{"description":"The conversation messages.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Message"},"type":"array"},"replacements":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Replacements"},"title":{"description":"The conversation title.","example":"Security AI Assistant Setup","type":"string"}},"required":["title"]},"Security_AI_Assistant_API_ConversationResponse":{"type":"object","properties":{"apiConfig":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ApiConfig","description":"LLM API configuration."},"category":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationCategory","description":"The conversation category.","example":"assistant"},"createdAt":{"description":"The time conversation was created.","example":"2025-04-30T14:00:00Z","type":"string"},"excludeFromLastConversationStorage":{"description":"Exclude from last conversation storage.","type":"boolean"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"messages":{"description":"The conversation messages.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Message"},"type":"array"},"namespace":{"description":"Kibana space","example":"default","type":"string"},"replacements":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Replacements"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationSummary"},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp"},"title":{"description":"The conversation title.","example":"Security AI Assistant Setup","type":"string"},"updatedAt":{"description":"The last time conversation was updated.","example":"2025-04-30T16:30:00Z","type":"string"},"users":{"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["id","title","createdAt","users","namespace","category"]},"Security_AI_Assistant_API_ConversationSummary":{"type":"object","properties":{"confidence":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationConfidence","description":"How confident you are about this being a correct and useful learning.","example":"high"},"content":{"description":"Summary text of the conversation over time.","example":"This conversation covered how to configure the Security AI Assistant.","type":"string"},"public":{"description":"Define if summary is marked as publicly available.","example":true,"type":"boolean"},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp","description":"The timestamp summary was updated.","example":"2025-04-30T16:00:00Z"}}},"Security_AI_Assistant_API_ConversationUpdateProps":{"type":"object","properties":{"apiConfig":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ApiConfig","description":"LLM API configuration."},"category":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationCategory","description":"The conversation category.","example":"assistant"},"excludeFromLastConversationStorage":{"description":"Exclude from last conversation storage.","type":"boolean"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"messages":{"description":"The conversation messages.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Message"},"type":"array"},"replacements":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Replacements"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ConversationSummary"},"title":{"description":"The conversation title.","example":"Updated Security AI Assistant Setup","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_DeleteResponseFields":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"}},"required":["id"]},"Security_AI_Assistant_API_DocumentEntry":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["name","namespace","global","users"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_ResponseFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryResponseFields"}]},"Security_AI_Assistant_API_DocumentEntryCreateFields":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["name"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryRequiredFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryOptionalFields"}]},"Security_AI_Assistant_API_DocumentEntryOptionalFields":{"type":"object","properties":{"required":{"description":"Whether this resource should always be included, defaults to false.","example":false,"type":"boolean"},"vector":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Vector"}}},"Security_AI_Assistant_API_DocumentEntryRequiredFields":{"type":"object","properties":{"kbResource":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseResource"},"source":{"description":"Source document name or filepath.","example":"/documents/example.txt","type":"string"},"text":{"description":"Knowledge Base Entry content.","example":"This is the content of the document.","type":"string"},"type":{"description":"Entry type.","enum":["document"],"example":"document","type":"string"}},"required":["type","kbResource","source","text"]},"Security_AI_Assistant_API_DocumentEntryResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryRequiredFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryOptionalFields"}]},"Security_AI_Assistant_API_DocumentEntryUpdateFields":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["id"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields"}]},"Security_AI_Assistant_API_EsqlContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"label":{"description":"Label of the query","example":"High Severity Alerts","type":"string"},"query":{"description":"An ESQL query","example":"SELECT * FROM alerts WHERE severity = \"high\"","type":"string"},"timerange":{"description":"Time range to select in the time picker.","type":"object","properties":{"from":{"example":"2025-04-01T00:00:00Z","type":"string"},"to":{"example":"2025-04-30T23:59:59Z","type":"string"}},"required":["from","to"]},"type":{"enum":["EsqlQuery"],"example":"EsqlQuery","type":"string"}},"required":["type","query","label"]}],"description":"References an ESQL query"},"Security_AI_Assistant_API_FindAnonymizationFieldsSortField":{"enum":["created_at","anonymized","allowed","field","updated_at"],"type":"string"},"Security_AI_Assistant_API_FindConversationsSortField":{"description":"The field by which to sort the conversations. Possible values are `created_at`, `title`, and `updated_at`.","enum":["created_at","title","updated_at"],"example":"created_at","type":"string"},"Security_AI_Assistant_API_FindKnowledgeBaseEntriesSortField":{"description":"Fields available for sorting Knowledge Base Entries.","enum":["created_at","is_default","title","updated_at"],"example":"title","type":"string"},"Security_AI_Assistant_API_FindPromptsSortField":{"description":"Field by which to sort the prompts.","enum":["created_at","is_default","name","updated_at"],"example":"created_at","type":"string"},"Security_AI_Assistant_API_HrefContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"href":{"description":"URL to the external resource","type":"string"},"label":{"description":"Label of the query","type":"string"},"type":{"enum":["Href"],"type":"string"}},"required":["type","href"]}],"description":"References an external URL"},"Security_AI_Assistant_API_IndexEntry":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["name","namespace","global","users"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_ResponseFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryResponseFields"}]},"Security_AI_Assistant_API_IndexEntryCreateFields":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["name"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryRequiredFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryOptionalFields"}]},"Security_AI_Assistant_API_IndexEntryOptionalFields":{"type":"object","properties":{"inputSchema":{"$ref":"#/components/schemas/Security_AI_Assistant_API_InputSchema"},"outputFields":{"description":"Fields to extract from the query result, defaults to all fields if not provided or empty.","example":["title","author"],"items":{"type":"string"},"type":"array"}}},"Security_AI_Assistant_API_IndexEntryRequiredFields":{"type":"object","properties":{"description":{"description":"Description for when this index or data stream should be queried for Knowledge Base content. Passed to the LLM as a tool description.","example":"Query this index for general knowledge base content.","type":"string"},"field":{"description":"Field to query for Knowledge Base content.","example":"content","type":"string"},"index":{"description":"Index or Data Stream to query for Knowledge Base content.","example":"knowledge_base_index","type":"string"},"queryDescription":{"description":"Description of query field used to fetch Knowledge Base content. Passed to the LLM as part of the tool input schema.","example":"Search for documents containing the specified keywords.","type":"string"},"type":{"description":"Entry type.","enum":["index"],"example":"index","type":"string"}},"required":["type","index","field","description","queryDescription"]},"Security_AI_Assistant_API_IndexEntryResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryRequiredFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryOptionalFields"}]},"Security_AI_Assistant_API_IndexEntryUpdateFields":{"allOf":[{"type":"object","properties":{"global":{"description":"Whether this Knowledge Base Entry is global, defaults to false.","example":false,"type":"boolean"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"name":{"description":"Name of the Knowledge Base Entry.","example":"Example Entry","type":"string"},"namespace":{"description":"Kibana Space, defaults to 'default' space.","example":"default","type":"string"},"users":{"description":"Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["id"]},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields"}]},"Security_AI_Assistant_API_InputSchema":{"description":"Array of objects defining the input schema, allowing the LLM to extract structured data to be used in retrieval.","items":{"type":"object","properties":{"description":{"description":"Description of the field.","example":"The title of the document.","type":"string"},"fieldName":{"description":"Name of the field.","example":"title","type":"string"},"fieldType":{"description":"Type of the field.","example":"string","type":"string"}},"required":["fieldName","fieldType","description"]},"type":"array"},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkActionSkipReason":{"description":"Reason why a Knowledge Base Entry was skipped during the bulk action.","enum":["KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED"],"type":"string"},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkActionSkipResult":{"type":"object","properties":{"id":{"description":"ID of the skipped Knowledge Base Entry.","example":"123","type":"string"},"name":{"description":"Name of the skipped Knowledge Base Entry.","example":"Skipped Entry","type":"string"},"skip_reason":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkActionSkipReason"}},"required":["id","skip_reason"]},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionResponse":{"type":"object","properties":{"attributes":{"type":"object","properties":{"errors":{"description":"List of errors encountered during the bulk action.","example":[{"err_code":"UPDATE_FAILED","knowledgeBaseEntries":[{"id":"456","name":"Error Entry"}],"message":"Failed to update entry.","statusCode":400}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NormalizedKnowledgeBaseEntryError"},"type":"array"},"results":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionResults"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionSummary"}},"required":["results","summary"]},"knowledgeBaseEntriesCount":{"description":"Total number of Knowledge Base Entries processed.","example":8,"type":"integer"},"message":{"description":"Message describing the result of the bulk action.","example":"Bulk action completed successfully.","type":"string"},"statusCode":{"description":"HTTP status code of the response.","example":200,"type":"integer"},"success":{"description":"Indicates whether the bulk action was successful.","example":true,"type":"boolean"}},"required":["attributes"]},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionResults":{"type":"object","properties":{"created":{"description":"List of Knowledge Base Entries that were successfully created.","example":[{"content":"This is the content of the new entry.","id":"456","title":"New Entry"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"},"type":"array"},"deleted":{"description":"List of IDs of Knowledge Base Entries that were successfully deleted.","example":["789"],"items":{"type":"string"},"type":"array"},"skipped":{"description":"List of Knowledge Base Entries that were skipped during the bulk action.","example":[{"id":"123","name":"Skipped Entry","skip_reason":"KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryBulkActionSkipResult"},"type":"array"},"updated":{"description":"List of Knowledge Base Entries that were successfully updated.","example":[{"content":"Updated content.","id":"123","title":"Updated Entry"}],"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryResponse"},"type":"array"}},"required":["updated","created","deleted","skipped"]},"Security_AI_Assistant_API_KnowledgeBaseEntryBulkCrudActionSummary":{"type":"object","properties":{"failed":{"description":"Number of Knowledge Base Entries that failed during the bulk action.","example":2,"type":"integer"},"skipped":{"description":"Number of Knowledge Base Entries that were skipped during the bulk action.","example":1,"type":"integer"},"succeeded":{"description":"Number of Knowledge Base Entries that were successfully processed during the bulk action.","example":5,"type":"integer"},"total":{"description":"Total number of Knowledge Base Entries involved in the bulk action.","example":8,"type":"integer"}},"required":["failed","skipped","succeeded","total"]},"Security_AI_Assistant_API_KnowledgeBaseEntryContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"knowledgeBaseEntryId":{"description":"Id of the Knowledge Base Entry","example":"kbentry456","type":"string"},"knowledgeBaseEntryName":{"description":"Name of the knowledge base entry","example":"Network Security Best Practices","type":"string"},"type":{"enum":["KnowledgeBaseEntry"],"example":"KnowledgeBaseEntry","type":"string"}},"required":["type","knowledgeBaseEntryId","knowledgeBaseEntryName"]}],"description":"References a knowledge base entry"},"Security_AI_Assistant_API_KnowledgeBaseEntryCreateProps":{"anyOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields"}],"discriminator":{"propertyName":"type"}},"Security_AI_Assistant_API_KnowledgeBaseEntryDetailsInError":{"type":"object","properties":{"id":{"description":"ID of the Knowledge Base Entry that encountered an error.","example":"456","type":"string"},"name":{"description":"Name of the Knowledge Base Entry that encountered an error.","example":"Error Entry","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_KnowledgeBaseEntryErrorSchema":{"additionalProperties":false,"type":"object","properties":{"error":{"description":"Error type or category.","example":"Not Found","type":"string"},"message":{"description":"Detailed error message.","example":"The requested Knowledge Base Entry was not found.","type":"string"},"statusCode":{"description":"HTTP status code of the error.","example":404,"type":"number"}},"required":["statusCode","error","message"]},"Security_AI_Assistant_API_KnowledgeBaseEntryResponse":{"anyOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntry"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntry"}],"discriminator":{"propertyName":"type"}},"Security_AI_Assistant_API_KnowledgeBaseEntryUpdateProps":{"anyOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryUpdateFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryUpdateFields"}],"discriminator":{"propertyName":"type"}},"Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps":{"anyOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields"},{"$ref":"#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields"}],"discriminator":{"propertyName":"type"}},"Security_AI_Assistant_API_KnowledgeBaseResource":{"description":"Knowledge Base resource name for grouping entries, e.g. 'security_labs', 'user', etc.","enum":["security_labs","user"],"example":"security_labs","type":"string"},"Security_AI_Assistant_API_KnowledgeBaseResponse":{"description":"AI assistant KnowledgeBase.","type":"object","properties":{"success":{"description":"Identify the success of the method execution.","example":true,"type":"boolean"}}},"Security_AI_Assistant_API_Message":{"description":"AI assistant conversation message.","type":"object","properties":{"content":{"description":"Message content.","example":"Hello, how can I assist you today?","type":"string"},"isError":{"description":"Is error message.","example":false,"type":"boolean"},"metadata":{"$ref":"#/components/schemas/Security_AI_Assistant_API_MessageMetadata","description":"Metadata"},"reader":{"$ref":"#/components/schemas/Security_AI_Assistant_API_Reader","description":"Message content."},"role":{"$ref":"#/components/schemas/Security_AI_Assistant_API_MessageRole","description":"Message role.","example":"assistant"},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp","description":"The timestamp message was sent or received.","example":"2025-04-30T15:30:00Z"},"traceData":{"$ref":"#/components/schemas/Security_AI_Assistant_API_TraceData","description":"Trace data"}},"required":["timestamp","content","role"]},"Security_AI_Assistant_API_MessageData":{"additionalProperties":true,"description":"ECS-style metadata attached to the message.","example":{"alert_id":"alert-456","user_id":"abc123"},"type":"object"},"Security_AI_Assistant_API_MessageMetadata":{"description":"Message metadata","type":"object","properties":{"contentReferences":{"$ref":"#/components/schemas/Security_AI_Assistant_API_ContentReferences","description":"Data referred to by the message content."}}},"Security_AI_Assistant_API_MessageRole":{"description":"Message role.","enum":["system","user","assistant"],"example":"assistant","type":"string"},"Security_AI_Assistant_API_NonEmptyString":{"description":"A string that does not contain only whitespace characters.","example":"I am a string","format":"nonempty","minLength":1,"type":"string"},"Security_AI_Assistant_API_NonEmptyTimestamp":{"description":"A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.","example":"2023-10-31T12:00:00Z","format":"nonempty","minLength":1,"type":"string"},"Security_AI_Assistant_API_NormalizedAnonymizationFieldError":{"type":"object","properties":{"anonymization_fields":{"description":"Array of anonymization fields that caused the error.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_AnonymizationFieldDetailsInError"},"type":"array"},"err_code":{"description":"Error code indicating the type of failure.","example":"UPDATE_FAILED","type":"string"},"message":{"description":"Error message.","example":"Failed to update anonymization field.","type":"string"},"status_code":{"description":"Status code of the response.","example":400,"type":"integer"}},"required":["message","status_code","anonymization_fields"]},"Security_AI_Assistant_API_NormalizedKnowledgeBaseEntryError":{"type":"object","properties":{"err_code":{"description":"Specific error code for the issue.","example":"UPDATE_FAILED","type":"string"},"knowledgeBaseEntries":{"description":"List of Knowledge Base Entries that encountered the error.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryDetailsInError"},"type":"array"},"message":{"description":"Error message describing the issue.","example":"Failed to update entry.","type":"string"},"statusCode":{"description":"HTTP status code associated with the error.","example":400,"type":"integer"}},"required":["message","statusCode","knowledgeBaseEntries"]},"Security_AI_Assistant_API_NormalizedPromptError":{"type":"object","properties":{"err_code":{"description":"A code representing the error type.","type":"string"},"message":{"description":"A message describing the error encountered.","type":"string"},"prompts":{"description":"List of prompts that encountered errors.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptDetailsInError"},"type":"array"},"status_code":{"description":"The HTTP status code associated with the error.","type":"integer"}},"required":["message","status_code","prompts"]},"Security_AI_Assistant_API_ProductDocumentationContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"title":{"description":"Title of the documentation","example":"Getting Started with Security AI Assistant","type":"string"},"type":{"enum":["ProductDocumentation"],"example":"ProductDocumentation","type":"string"},"url":{"description":"URL to the documentation","example":"https://docs.example.com/security-ai-assistant","type":"string"}},"required":["type","title","url"]}],"description":"References the product documentation"},"Security_AI_Assistant_API_PromptCreateProps":{"type":"object","properties":{"categories":{"description":"List of categories for the prompt.","example":["security","verification"],"items":{"type":"string"},"type":"array"},"color":{"description":"The color associated with the prompt.","example":"blue","type":"string"},"consumer":{"description":"The consumer associated with the prompt.","example":"admin","type":"string"},"content":{"description":"The content of the prompt.","example":"Please verify the security settings.","type":"string"},"isDefault":{"description":"Whether this prompt should be the default.","example":false,"type":"boolean"},"isNewConversationDefault":{"description":"Whether this prompt should be the default for new conversations.","example":true,"type":"boolean"},"name":{"description":"The name of the prompt.","example":"New Security Prompt","type":"string"},"promptType":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptType","description":"The type of the prompt.","example":"system"}},"required":["name","content","promptType"]},"Security_AI_Assistant_API_PromptDetailsInError":{"type":"object","properties":{"id":{"description":"The ID of the prompt that encountered an error.","type":"string"},"name":{"description":"The name of the prompt that encountered an error.","type":"string"}},"required":["id"]},"Security_AI_Assistant_API_PromptResponse":{"type":"object","properties":{"categories":{"description":"Categories associated with the prompt.","items":{"type":"string"},"type":"array"},"color":{"description":"The color associated with the prompt.","type":"string"},"consumer":{"description":"The consumer that the prompt is associated with.","type":"string"},"content":{"description":"The content of the prompt.","type":"string"},"createdAt":{"description":"The timestamp of when the prompt was created.","type":"string"},"createdBy":{"description":"The user who created the prompt.","type":"string"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"isDefault":{"description":"Whether this prompt is the default.","type":"boolean"},"isNewConversationDefault":{"description":"Whether this prompt is the default for new conversations.","type":"boolean"},"name":{"description":"The name of the prompt.","type":"string"},"namespace":{"description":"Kibana space where the prompt is located.","type":"string"},"promptType":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptType","description":"The type of the prompt."},"timestamp":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp"},"updatedAt":{"description":"The timestamp of when the prompt was last updated.","type":"string"},"updatedBy":{"description":"The user who last updated the prompt.","type":"string"},"users":{"description":"List of users associated with the prompt.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_User"},"type":"array"}},"required":["id","name","promptType","content"]},"Security_AI_Assistant_API_PromptsBulkActionSkipReason":{"description":"Reason why a prompt was skipped during the bulk action.","enum":["PROMPT_FIELD_NOT_MODIFIED"],"type":"string"},"Security_AI_Assistant_API_PromptsBulkActionSkipResult":{"type":"object","properties":{"id":{"description":"The ID of the prompt that was skipped.","type":"string"},"name":{"description":"The name of the prompt that was skipped.","type":"string"},"skip_reason":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptsBulkActionSkipReason","description":"The reason for skipping the prompt."}},"required":["id","skip_reason"]},"Security_AI_Assistant_API_PromptsBulkCrudActionResponse":{"type":"object","properties":{"attributes":{"type":"object","properties":{"errors":{"items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NormalizedPromptError"},"type":"array"},"results":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptsBulkCrudActionResults"},"summary":{"$ref":"#/components/schemas/Security_AI_Assistant_API_BulkCrudActionSummary"}},"required":["results","summary"]},"message":{"description":"A message describing the result of the bulk action.","example":"Bulk action completed successfully.","type":"string"},"prompts_count":{"description":"The number of prompts processed in the bulk action.","example":6,"type":"integer"},"status_code":{"description":"The HTTP status code of the response.","example":200,"type":"integer"},"success":{"description":"Indicates if the bulk action was successful.","example":true,"type":"boolean"}},"required":["attributes"]},"Security_AI_Assistant_API_PromptsBulkCrudActionResults":{"type":"object","properties":{"created":{"description":"List of prompts that were created.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptResponse"},"type":"array"},"deleted":{"description":"List of IDs of prompts that were deleted.","items":{"type":"string"},"type":"array"},"skipped":{"description":"List of prompts that were skipped.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptsBulkActionSkipResult"},"type":"array"},"updated":{"description":"List of prompts that were updated.","items":{"$ref":"#/components/schemas/Security_AI_Assistant_API_PromptResponse"},"type":"array"}},"required":["updated","created","deleted","skipped"]},"Security_AI_Assistant_API_PromptType":{"description":"Type of the prompt (either system or quick).","enum":["system","quick"],"type":"string"},"Security_AI_Assistant_API_PromptUpdateProps":{"type":"object","properties":{"categories":{"description":"The updated categories for the prompt.","example":["security","alert"],"items":{"type":"string"},"type":"array"},"color":{"description":"The updated color associated with the prompt.","example":"green","type":"string"},"consumer":{"description":"The updated consumer for the prompt.","example":"user123","type":"string"},"content":{"description":"The updated content for the prompt.","example":"Updated content for security prompt.","type":"string"},"id":{"description":"The ID of the prompt to update.","example":"prompt123","type":"string"},"isDefault":{"description":"Whether this prompt should be the default.","example":true,"type":"boolean"},"isNewConversationDefault":{"description":"Whether the prompt should be the default for new conversations.","example":false,"type":"boolean"}},"required":["id"]},"Security_AI_Assistant_API_Provider":{"description":"Provider","enum":["OpenAI","Azure OpenAI","Other"],"example":"OpenAI","type":"string"},"Security_AI_Assistant_API_Reader":{"additionalProperties":true,"type":"object"},"Security_AI_Assistant_API_Replacements":{"additionalProperties":{"type":"string"},"description":"Replacements object used to anonymize/deanonymize messages","type":"object"},"Security_AI_Assistant_API_ResponseFields":{"type":"object","properties":{"createdAt":{"description":"Time the Knowledge Base Entry was created.","example":"2023-01-01T12:00:00Z","type":"string"},"createdBy":{"description":"User who created the Knowledge Base Entry.","example":"admin","type":"string"},"id":{"$ref":"#/components/schemas/Security_AI_Assistant_API_NonEmptyString"},"updatedAt":{"description":"Time the Knowledge Base Entry was last updated.","example":"2023-01-02T12:00:00Z","type":"string"},"updatedBy":{"description":"User who last updated the Knowledge Base Entry.","example":"editor","type":"string"}},"required":["id","createdAt","createdBy","updatedAt","updatedBy"]},"Security_AI_Assistant_API_SecurityAlertContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"alertId":{"description":"ID of the Alert","example":"alert789","type":"string"},"type":{"enum":["SecurityAlert"],"example":"SecurityAlert","type":"string"}},"required":["type","alertId"]}],"description":"References a security alert"},"Security_AI_Assistant_API_SecurityAlertsPageContentReference":{"allOf":[{"$ref":"#/components/schemas/Security_AI_Assistant_API_BaseContentReference"},{"type":"object","properties":{"type":{"enum":["SecurityAlertsPage"],"example":"SecurityAlertsPage","type":"string"}},"required":["type"]}],"description":"References the security alerts page"},"Security_AI_Assistant_API_SortOrder":{"description":"The order in which results are sorted.","enum":["asc","desc"],"example":"asc","type":"string"},"Security_AI_Assistant_API_TraceData":{"description":"Trace Data","type":"object","properties":{"traceId":{"description":"Could be any string, not necessarily a UUID","example":"d9876543-f0a1-2345-6789-abcdef123456","type":"string"},"transactionId":{"description":"Could be any string, not necessarily a UUID","example":"a1234567-bc89-0def-1234-56789abcdef0","type":"string"}}},"Security_AI_Assistant_API_User":{"description":"Could be any string, not necessarily a UUID.","type":"object","properties":{"id":{"description":"User id.","example":"user123","type":"string"},"name":{"description":"User name.","example":"John Doe","type":"string"}}},"Security_AI_Assistant_API_Vector":{"description":"Object containing Knowledge Base Entry text embeddings and modelId used to create the embeddings.","type":"object","properties":{"modelId":{"description":"ID of the model used to create the embeddings.","example":"bert-base-uncased","type":"string"},"tokens":{"additionalProperties":{"type":"number"},"description":"Tokens with their corresponding values.","example":{"token1":0.123,"token2":0.456},"type":"object"}},"required":["modelId","tokens"]},"Security_Detections_API_AlertAssignees":{"type":"object","properties":{"add":{"items":{"description":"A list of users ids to assign.","format":"nonempty","minLength":1,"type":"string"},"type":"array"},"remove":{"items":{"description":"A list of users ids to unassign.","format":"nonempty","minLength":1,"type":"string"},"type":"array"}},"required":["add","remove"]},"Security_Detections_API_AlertIds":{"description":"A list of alerts `id`s.","items":{"format":"nonempty","minLength":1,"type":"string"},"minItems":1,"type":"array"},"Security_Detections_API_AlertsIndex":{"deprecated":true,"description":"(deprecated) Has no effect.","type":"string"},"Security_Detections_API_AlertsIndexMigrationError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"string"}},"required":["message","status_code"]},"index":{"type":"string"}},"required":["index","error"]},"Security_Detections_API_AlertsIndexMigrationSuccess":{"type":"object","properties":{"index":{"type":"string"},"migration_id":{"type":"string"},"migration_index":{"type":"string"}},"required":["index","migration_id","migration_index"]},"Security_Detections_API_AlertsIndexNamespace":{"description":"Has no effect.","type":"string"},"Security_Detections_API_AlertsReindexOptions":{"type":"object","properties":{"requests_per_second":{"description":"The throttle for the migration task in sub-requests per second. Corresponds to requests_per_second on the Reindex API.","minimum":1,"type":"integer"},"size":{"description":"Number of alerts to migrate per batch. Corresponds to the source.size option on the Reindex API.","minimum":1,"type":"integer"},"slices":{"description":"The number of subtasks for the migration task. Corresponds to slices on the Reindex API.","minimum":1,"type":"integer"}}},"Security_Detections_API_AlertsSort":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_AlertsSortCombinations"},{"items":{"$ref":"#/components/schemas/Security_Detections_API_AlertsSortCombinations"},"type":"array"}]},"Security_Detections_API_AlertsSortCombinations":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"Security_Detections_API_AlertStatus":{"description":"The status of an alert, which can be `open`, `acknowledged`, `in-progress`, or `closed`.","enum":["open","closed","acknowledged","in-progress"],"type":"string"},"Security_Detections_API_AlertSuppression":{"description":"Defines alert suppression configuration.","type":"object","properties":{"duration":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionDuration"},"group_by":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionGroupBy"},"missing_fields_strategy":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionMissingFieldsStrategy"}},"required":["group_by"]},"Security_Detections_API_AlertSuppressionDuration":{"type":"object","properties":{"unit":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionDurationUnit"},"value":{"minimum":1,"type":"integer"}},"required":["value","unit"]},"Security_Detections_API_AlertSuppressionDurationUnit":{"description":"Time unit","enum":["s","m","h"],"type":"string"},"Security_Detections_API_AlertSuppressionGroupBy":{"items":{"type":"string"},"maxItems":3,"minItems":1,"type":"array"},"Security_Detections_API_AlertSuppressionMissingFieldsStrategy":{"description":"Describes how alerts will be generated for documents with missing suppress by fields:\ndoNotSuppress - per each document a separate alert will be created\nsuppress - only alert will be created per suppress by bucket","enum":["doNotSuppress","suppress"],"type":"string"},"Security_Detections_API_AlertTag":{"description":"Use alert tags to organize related alerts into categories that you can filter and group.","format":"nonempty","minLength":1,"type":"string"},"Security_Detections_API_AlertTags":{"description":"List of keywords to organize related alerts into categories that you can filter and group.","items":{"$ref":"#/components/schemas/Security_Detections_API_AlertTag"},"type":"array"},"Security_Detections_API_AlertVersion":{"type":"object","properties":{"count":{"type":"integer"},"version":{"type":"integer"}},"required":["version","count"]},"Security_Detections_API_AnomalyThreshold":{"description":"Anomaly score threshold above which the rule creates an alert. Valid values are from 0 to 100.","minimum":0,"type":"integer"},"Security_Detections_API_BuildingBlockType":{"description":"Determines if the rule acts as a building block. If yes, the value must be `default`.\nBy default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts.\nFor more information, refer to [About building block rules](https://www.elastic.co/guide/en/security/current/building-block-rule.html).\n","type":"string"},"Security_Detections_API_BulkActionEditPayload":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadTags"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadIndexPatterns"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadInvestigationFields"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadTimeline"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadRuleActions"},{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayloadSchedule"}]},"Security_Detections_API_BulkActionEditPayloadIndexPatterns":{"description":"Edits index patterns of rulesClient.\n\n- `add_index_patterns` adds index patterns to rules. If an index pattern already exists for a rule, no changes are made.\n- `delete_index_patterns` removes index patterns from rules. If an index pattern does not exist for a rule, no changes are made.\n- `set_index_patterns` sets index patterns for rules, overwriting any existing index patterns. If the set of index patterns is the same as the existing index patterns, no changes are made.\n","type":"object","properties":{"overwrite_data_views":{"description":"Resets the data view for the rule.","type":"boolean"},"type":{"enum":["add_index_patterns","delete_index_patterns","set_index_patterns"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadInvestigationFields":{"description":"Edits investigation fields of rules.\n\n- `add_investigation_fields` adds investigation fields to rules. If an investigation field already exists for a rule, no changes are made.\n- `delete_investigation_fields` removes investigation fields from rules. If an investigation field does not exist for a rule, no changes are made.\n- `set_investigation_fields` sets investigation fields for rules. If the set of investigation fields is the same as the existing investigation fields, no changes are made.\n","type":"object","properties":{"type":{"enum":["add_investigation_fields","delete_investigation_fields","set_investigation_fields"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadRuleActions":{"description":"Edits rule actions of rules.\n\n- `add_rule_actions` adds rule actions to rules. This action is non-idempotent, meaning that even if the same rule action already exists for a rule, it will be added again with a new unique ID.\n- `set_rule_actions` sets rule actions for rules. This action is non-idempotent, meaning that even if the same set of rule actions already exists for a rule, it will be set again and the actions will receive new unique IDs.\n","type":"object","properties":{"type":{"enum":["add_rule_actions","set_rule_actions"],"type":"string"},"value":{"type":"object","properties":{"actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NormalizedRuleAction"},"type":"array"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_ThrottleForBulkActions"}},"required":["actions"]}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadSchedule":{"description":"Overwrites schedule of rules. \n\n- `set_schedule` sets a schedule for rules. If the same schedule already exists for a rule, no changes are made.\n\nBoth `interval` and `lookback` have a format of \"{integer}{time_unit}\", where accepted time units are `s` for seconds, `m` for minutes, and `h` for hours. The integer must be positive and larger than 0. Examples: \"45s\", \"30m\", \"6h\"\n","type":"object","properties":{"type":{"enum":["set_schedule"],"type":"string"},"value":{"type":"object","properties":{"interval":{"description":"Interval in which the rule runs. For example, `\"1h\"` means the rule runs every hour.","example":"1h","pattern":"^[1-9]\\d*[smh]$","type":"string"},"lookback":{"description":"Lookback time for the rules.\n\nAdditional look-back time that the rule analyzes. For example, \"10m\" means the rule analyzes the last 10 minutes of data in addition to the frequency interval.\n","example":"1h","pattern":"^[1-9]\\d*[smh]$","type":"string"}},"required":["interval","lookback"]}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadTags":{"description":"Edits tags of rules.\n\n- `add_tags` adds tags to rules. If a tag already exists for a rule, no changes are made.\n- `delete_tags` removes tags from rules. If a tag does not exist for a rule, no changes are made.\n- `set_tags` sets tags for rules, overwriting any existing tags. If the set of tags is the same as the existing tags, no changes are made.\n","type":"object","properties":{"type":{"enum":["add_tags","delete_tags","set_tags"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"}},"required":["type","value"]},"Security_Detections_API_BulkActionEditPayloadTimeline":{"description":"Edits timeline of rules.\n\n- `set_timeline` sets a timeline for rules. If the same timeline already exists for a rule, no changes are made.\n","type":"object","properties":{"type":{"enum":["set_timeline"],"type":"string"},"value":{"type":"object","properties":{"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"}},"required":["timeline_id","timeline_title"]}},"required":["type","value"]},"Security_Detections_API_BulkActionsDryRunErrCode":{"enum":["IMMUTABLE","PREBUILT_CUSTOMIZATION_LICENSE","MACHINE_LEARNING_AUTH","MACHINE_LEARNING_INDEX_PATTERN","ESQL_INDEX_PATTERN","MANUAL_RULE_RUN_FEATURE","MANUAL_RULE_RUN_DISABLED_RULE"],"type":"string"},"Security_Detections_API_BulkActionSkipResult":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"skip_reason":{"$ref":"#/components/schemas/Security_Detections_API_BulkEditSkipReason"}},"required":["id","skip_reason"]},"Security_Detections_API_BulkDeleteRules":{"type":"object","properties":{"action":{"enum":["delete"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkDisableRules":{"type":"object","properties":{"action":{"enum":["disable"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkDuplicateRules":{"type":"object","properties":{"action":{"enum":["duplicate"],"type":"string"},"duplicate":{"description":"Duplicate object that describes applying an update action.","type":"object","properties":{"include_exceptions":{"description":"Whether to copy exceptions from the original rule","type":"boolean"},"include_expired_exceptions":{"description":"Whether to copy expired exceptions from the original rule","type":"boolean"}},"required":["include_exceptions","include_expired_exceptions"]},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkEditActionResponse":{"type":"object","properties":{"attributes":{"type":"object","properties":{"errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NormalizedRuleError"},"type":"array"},"results":{"$ref":"#/components/schemas/Security_Detections_API_BulkEditActionResults"},"summary":{"$ref":"#/components/schemas/Security_Detections_API_BulkEditActionSummary"}},"required":["results","summary"]},"message":{"type":"string"},"rules_count":{"type":"integer"},"status_code":{"type":"integer"},"success":{"type":"boolean"}},"required":["attributes"]},"Security_Detections_API_BulkEditActionResults":{"type":"object","properties":{"created":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"},"type":"array"},"deleted":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"},"type":"array"},"skipped":{"items":{"$ref":"#/components/schemas/Security_Detections_API_BulkActionSkipResult"},"type":"array"},"updated":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleResponse"},"type":"array"}},"required":["updated","created","deleted","skipped"]},"Security_Detections_API_BulkEditActionSummary":{"description":"A rule can only be skipped when the bulk action to be performed on it results in nothing being done. For example, if the `edit` action is used to add a tag to a rule that already has that tag, or to delete an index pattern that is not specified in a rule. Objects returned in `attributes.results.skipped` will only include rules' `id`, `name`, and `skip_reason`.","type":"object","properties":{"failed":{"type":"integer"},"skipped":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["failed","skipped","succeeded","total"]},"Security_Detections_API_BulkEditRules":{"type":"object","properties":{"action":{"enum":["edit"],"type":"string"},"edit":{"description":"Array of objects containing the edit operations","items":{"$ref":"#/components/schemas/Security_Detections_API_BulkActionEditPayload"},"minItems":1,"type":"array"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action","edit"]},"Security_Detections_API_BulkEditSkipReason":{"enum":["RULE_NOT_MODIFIED"],"type":"string"},"Security_Detections_API_BulkEnableRules":{"type":"object","properties":{"action":{"enum":["enable"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkExportActionResponse":{"type":"string"},"Security_Detections_API_BulkExportRules":{"type":"object","properties":{"action":{"enum":["export"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"}},"required":["action"]},"Security_Detections_API_BulkManualRuleRun":{"type":"object","properties":{"action":{"enum":["run"],"type":"string"},"ids":{"description":"Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.","items":{"type":"string"},"minItems":1,"type":"array"},"query":{"description":"Query to filter rules.","type":"string"},"run":{"description":"Object that describes applying a manual rule run action.","type":"object","properties":{"end_date":{"description":"End date of the manual rule run","type":"string"},"start_date":{"description":"Start date of the manual rule run","type":"string"}},"required":["start_date","end_date"]}},"required":["action","run"]},"Security_Detections_API_ConcurrentSearches":{"minimum":1,"type":"integer"},"Security_Detections_API_DataViewId":{"type":"string"},"Security_Detections_API_DefaultParams":{"type":"object","properties":{"command":{"enum":["isolate"],"type":"string"},"comment":{"type":"string"}},"required":["command"]},"Security_Detections_API_EcsMapping":{"additionalProperties":{"type":"object","properties":{"field":{"type":"string"},"value":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}}},"description":"Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: \"ecs_mapping\": {\"process.pid\": {\"field\": \"pid\"}}","type":"object"},"Security_Detections_API_EndpointResponseAction":{"type":"object","properties":{"action_type_id":{"enum":[".endpoint"],"type":"string"},"params":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_DefaultParams"},{"$ref":"#/components/schemas/Security_Detections_API_ProcessesParams"}]}},"required":["action_type_id","params"]},"Security_Detections_API_EqlOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"event_category_override":{"$ref":"#/components/schemas/Security_Detections_API_EventCategoryOverride"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"tiebreaker_field":{"$ref":"#/components/schemas/Security_Detections_API_TiebreakerField"},"timestamp_field":{"$ref":"#/components/schemas/Security_Detections_API_TimestampField"}}},"Security_Detections_API_EqlQueryLanguage":{"enum":["eql"],"type":"string"},"Security_Detections_API_EqlRequiredFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_EqlQueryLanguage","description":"Query language to use"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["eql"],"type":"string"}},"required":["type","query","language"]},"Security_Detections_API_EqlRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleResponseFields"}]},"Security_Detections_API_EqlRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_EqlOptionalFields"}]},"Security_Detections_API_EqlRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleCreateFields"}]},"Security_Detections_API_EqlRulePatchFields":{"allOf":[{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_EqlQueryLanguage","description":"Query language to use"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["eql"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_EqlOptionalFields"}]},"Security_Detections_API_EqlRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_EqlRulePatchFields"}]},"Security_Detections_API_EqlRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_EqlOptionalFields"}]},"Security_Detections_API_EqlRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleCreateFields"}]},"Security_Detections_API_ErrorSchema":{"additionalProperties":false,"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"minimum":400,"type":"integer"}},"required":["status_code","message"]},"id":{"type":"string"},"item_id":{"minLength":1,"type":"string"},"list_id":{"minLength":1,"type":"string"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"}},"required":["error"]},"Security_Detections_API_EsqlQueryLanguage":{"enum":["esql"],"type":"string"},"Security_Detections_API_EsqlRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleResponseFields"}]},"Security_Detections_API_EsqlRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleRequiredFields"}]},"Security_Detections_API_EsqlRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleCreateFields"}]},"Security_Detections_API_EsqlRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"}}},"Security_Detections_API_EsqlRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"language":{"$ref":"#/components/schemas/Security_Detections_API_EsqlQueryLanguage"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"type":{"description":"Rule type","enum":["esql"],"type":"string"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleOptionalFields"}]},"Security_Detections_API_EsqlRuleRequiredFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_EsqlQueryLanguage"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["esql"],"type":"string"}},"required":["type","language","query"]},"Security_Detections_API_EsqlRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleRequiredFields"}]},"Security_Detections_API_EsqlRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleCreateFields"}]},"Security_Detections_API_EventCategoryOverride":{"type":"string"},"Security_Detections_API_ExceptionListType":{"description":"The exception type","enum":["detection","rule_default","endpoint","endpoint_trusted_apps","endpoint_events","endpoint_host_isolation_exceptions","endpoint_blocklists"],"type":"string"},"Security_Detections_API_ExternalRuleSource":{"description":"Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.","type":"object","properties":{"is_customized":{"$ref":"#/components/schemas/Security_Detections_API_IsExternalRuleCustomized"},"type":{"enum":["external"],"type":"string"}},"required":["type","is_customized"]},"Security_Detections_API_FindRulesSortField":{"enum":["created_at","createdAt","enabled","execution_summary.last_execution.date","execution_summary.last_execution.metrics.execution_gap_duration_s","execution_summary.last_execution.metrics.total_indexing_duration_ms","execution_summary.last_execution.metrics.total_search_duration_ms","execution_summary.last_execution.status","name","risk_score","riskScore","severity","updated_at","updatedAt"],"type":"string"},"Security_Detections_API_HistoryWindowStart":{"description":"Start date to use when checking if a term has been seen before. Supports relative dates – for example, now-30d will search the last 30 days of data when checking if a term is new. We do not recommend using absolute dates, which can cause issues with rule performance due to querying increasing amounts of data over time.","format":"nonempty","minLength":1,"type":"string"},"Security_Detections_API_IndexMigrationStatus":{"type":"object","properties":{"index":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"is_outdated":{"type":"boolean"},"migrations":{"items":{"$ref":"#/components/schemas/Security_Detections_API_MigrationStatus"},"type":"array"},"signal_versions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_AlertVersion"},"type":"array"},"version":{"type":"integer"}},"required":["index","version","signal_versions","migrations","is_outdated"]},"Security_Detections_API_IndexPatternArray":{"description":"Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`).\n\u003e info\n\u003e This field is not supported for ES|QL rules.\n","items":{"type":"string"},"type":"array"},"Security_Detections_API_InternalRuleSource":{"description":"Type of rule source for internally sourced rules, i.e. created within the Kibana apps.","type":"object","properties":{"type":{"enum":["internal"],"type":"string"}},"required":["type"]},"Security_Detections_API_InvestigationFields":{"description":"Schema for fields relating to investigation fields. These are user defined fields we use to highlight\nin various features in the UI such as alert details flyout and exceptions auto-population from alert.\n","type":"object","properties":{"field_names":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"minItems":1,"type":"array"}},"required":["field_names"]},"Security_Detections_API_InvestigationGuide":{"description":"Notes to help investigate alerts produced by the rule.","type":"string"},"Security_Detections_API_IsExternalRuleCustomized":{"description":"Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).","type":"boolean"},"Security_Detections_API_IsRuleEnabled":{"description":"Determines whether the rule is enabled. Defaults to true.","type":"boolean"},"Security_Detections_API_IsRuleImmutable":{"deprecated":true,"description":"This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.","type":"boolean"},"Security_Detections_API_ItemsPerSearch":{"minimum":1,"type":"integer"},"Security_Detections_API_KqlQueryLanguage":{"enum":["kuery","lucene"],"type":"string"},"Security_Detections_API_MachineLearningJobId":{"description":"Machine learning job ID(s) the rule monitors for anomaly scores.","oneOf":[{"type":"string"},{"items":{"type":"string"},"minItems":1,"type":"array"}]},"Security_Detections_API_MachineLearningRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleResponseFields"}]},"Security_Detections_API_MachineLearningRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleOptionalFields"}]},"Security_Detections_API_MachineLearningRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleCreateFields"}]},"Security_Detections_API_MachineLearningRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"}}},"Security_Detections_API_MachineLearningRulePatchFields":{"allOf":[{"type":"object","properties":{"anomaly_threshold":{"$ref":"#/components/schemas/Security_Detections_API_AnomalyThreshold"},"machine_learning_job_id":{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningJobId"},"type":{"description":"Rule type","enum":["machine_learning"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleOptionalFields"}]},"Security_Detections_API_MachineLearningRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRulePatchFields"}]},"Security_Detections_API_MachineLearningRuleRequiredFields":{"type":"object","properties":{"anomaly_threshold":{"$ref":"#/components/schemas/Security_Detections_API_AnomalyThreshold"},"machine_learning_job_id":{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningJobId"},"type":{"description":"Rule type","enum":["machine_learning"],"type":"string"}},"required":["type","machine_learning_job_id","anomaly_threshold"]},"Security_Detections_API_MachineLearningRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleOptionalFields"}]},"Security_Detections_API_MachineLearningRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleCreateFields"}]},"Security_Detections_API_MaxSignals":{"default":100,"description":"Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#rule-ui-advanced-params) value).\n\u003e info\n\u003e This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/guide/en/kibana/current/alert-action-settings-kb.html#alert-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.\n","minimum":1,"type":"integer"},"Security_Detections_API_MigrationCleanupResult":{"type":"object","properties":{"destinationIndex":{"type":"string"},"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["message","status_code"]},"id":{"type":"string"},"sourceIndex":{"type":"string"},"status":{"enum":["success","failure","pending"],"type":"string"},"updated":{"format":"date-time","type":"string"},"version":{"type":"string"}},"required":["id","destinationIndex","status","sourceIndex","version","updated"]},"Security_Detections_API_MigrationFinalizationResult":{"type":"object","properties":{"completed":{"type":"boolean"},"destinationIndex":{"type":"string"},"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["message","status_code"]},"id":{"type":"string"},"sourceIndex":{"type":"string"},"status":{"enum":["success","failure","pending"],"type":"string"},"updated":{"format":"date-time","type":"string"},"version":{"type":"string"}},"required":["id","completed","destinationIndex","status","sourceIndex","version","updated"]},"Security_Detections_API_MigrationStatus":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"status":{"enum":["success","failure","pending"],"type":"string"},"updated":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","status","version","updated"]},"Security_Detections_API_NewTermsFields":{"description":"Fields to monitor for new values.","items":{"type":"string"},"maxItems":3,"minItems":1,"type":"array"},"Security_Detections_API_NewTermsRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleResponseFields"}]},"Security_Detections_API_NewTermsRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleDefaultableFields"}]},"Security_Detections_API_NewTermsRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleCreateFields"}]},"Security_Detections_API_NewTermsRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_NewTermsRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"}}},"Security_Detections_API_NewTermsRulePatchFields":{"allOf":[{"type":"object","properties":{"history_window_start":{"$ref":"#/components/schemas/Security_Detections_API_HistoryWindowStart"},"new_terms_fields":{"$ref":"#/components/schemas/Security_Detections_API_NewTermsFields"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["new_terms"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleDefaultableFields"}]},"Security_Detections_API_NewTermsRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRulePatchFields"}]},"Security_Detections_API_NewTermsRuleRequiredFields":{"type":"object","properties":{"history_window_start":{"$ref":"#/components/schemas/Security_Detections_API_HistoryWindowStart"},"new_terms_fields":{"$ref":"#/components/schemas/Security_Detections_API_NewTermsFields"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"type":{"description":"Rule type","enum":["new_terms"],"type":"string"}},"required":["type","query","new_terms_fields","history_window_start"]},"Security_Detections_API_NewTermsRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}},"required":["language"]}]},"Security_Detections_API_NewTermsRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleCreateFields"}]},"Security_Detections_API_NonEmptyString":{"description":"A string that does not contain only whitespace characters","format":"nonempty","minLength":1,"type":"string"},"Security_Detections_API_NormalizedRuleAction":{"additionalProperties":false,"type":"object","properties":{"alerts_filter":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionAlertsFilter"},"frequency":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionFrequency"},"group":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionGroup"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionId"},"params":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionParams"}},"required":["id","params"]},"Security_Detections_API_NormalizedRuleError":{"type":"object","properties":{"err_code":{"$ref":"#/components/schemas/Security_Detections_API_BulkActionsDryRunErrCode"},"message":{"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleDetailsInError"},"type":"array"},"status_code":{"type":"integer"}},"required":["message","status_code","rules"]},"Security_Detections_API_OsqueryParams":{"type":"object","properties":{"ecs_mapping":{"$ref":"#/components/schemas/Security_Detections_API_EcsMapping"},"pack_id":{"description":"To specify a query pack, use the packId field. Example: \"packId\": \"processes_elastic\"","type":"string"},"queries":{"items":{"$ref":"#/components/schemas/Security_Detections_API_OsqueryQuery"},"type":"array"},"query":{"description":"To run a single query, use the query field and enter a SQL query. Example: \"query\": \"SELECT * FROM processes;\"","type":"string"},"saved_query_id":{"description":"To run a saved query, use the saved_query_id field and specify the saved query ID. Example: \"saved_query_id\": \"processes_elastic\"","type":"string"},"timeout":{"description":"A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: \"timeout\": 120.","type":"number"}}},"Security_Detections_API_OsqueryQuery":{"type":"object","properties":{"ecs_mapping":{"$ref":"#/components/schemas/Security_Detections_API_EcsMapping"},"id":{"description":"Query ID","type":"string"},"platform":{"type":"string"},"query":{"description":"Query to run","type":"string"},"removed":{"type":"boolean"},"snapshot":{"type":"boolean"},"version":{"description":"Query version","type":"string"}},"required":["id","query"]},"Security_Detections_API_OsqueryResponseAction":{"type":"object","properties":{"action_type_id":{"enum":[".osquery"],"type":"string"},"params":{"$ref":"#/components/schemas/Security_Detections_API_OsqueryParams"}},"required":["action_type_id","params"]},"Security_Detections_API_PlatformErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}},"required":["statusCode","error","message"]},"Security_Detections_API_ProcessesParams":{"type":"object","properties":{"command":{"description":"To run an endpoint response action, specify a value for the command field. Example: \"command\": \"isolate\"","enum":["kill-process","suspend-process"],"type":"string"},"comment":{"description":"Add a note that explains or describes the action. You can find your comment in the response actions history log. Example: \"comment\": \"Check processes\"","type":"string"},"config":{"type":"object","properties":{"field":{"description":"Field to use instead of process.pid","type":"string"},"overwrite":{"default":true,"description":"Whether to overwrite field with process.pid","type":"boolean"}},"required":["field"]}},"required":["command","config"]},"Security_Detections_API_QueryRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleResponseFields"}]},"Security_Detections_API_QueryRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleDefaultableFields"}]},"Security_Detections_API_QueryRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleCreateFields"}]},"Security_Detections_API_QueryRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"}}},"Security_Detections_API_QueryRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"}}},"Security_Detections_API_QueryRulePatchFields":{"allOf":[{"type":"object","properties":{"type":{"description":"Rule type","enum":["query"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleDefaultableFields"}]},"Security_Detections_API_QueryRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_QueryRulePatchFields"}]},"Security_Detections_API_QueryRuleRequiredFields":{"type":"object","properties":{"type":{"description":"Rule type","enum":["query"],"type":"string"}},"required":["type"]},"Security_Detections_API_QueryRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"}},"required":["query","language"]}]},"Security_Detections_API_QueryRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleCreateFields"}]},"Security_Detections_API_RelatedIntegration":{"description":"Related integration is a potential dependency of a rule. It's assumed that if the user installs\none of the related integrations of a rule, the rule might start to work properly because it will\nhave source events (generated by this integration) potentially matching the rule's query.\n\nNOTE: Proper work is not guaranteed, because a related integration, if installed, can be\nconfigured differently or generate data that is not necessarily relevant for this rule.\n\nRelated integration is a combination of a Fleet package and (optionally) one of the\npackage's \"integrations\" that this package contains. It is represented by 3 properties:\n\n- `package`: name of the package (required, unique id)\n- `version`: version of the package (required, semver-compatible)\n- `integration`: name of the integration of this package (optional, id within the package)\n\nThere are Fleet packages like `windows` that contain only one integration; in this case,\n`integration` should be unspecified. There are also packages like `aws` and `azure` that contain\nseveral integrations; in this case, `integration` should be specified.\n","example":{"integration":"activitylogs","package":"azure","version":"~1.1.6"},"type":"object","properties":{"integration":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"package":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"version":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}},"required":["package","version"]},"Security_Detections_API_RelatedIntegrationArray":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegration"},"type":"array"},"Security_Detections_API_RequiredField":{"description":"Describes an Elasticsearch field that is needed for the rule to function.\n\nAlmost all types of Security rules check source event documents for a match to some kind of\nquery or filter. If a document has certain field with certain values, then it's a match and\nthe rule will generate an alert.\n\nRequired field is an event field that must be present in the source indices of a given rule.\n\n@example\nconst standardEcsField: RequiredField = {\n name: 'event.action',\n type: 'keyword',\n ecs: true,\n};\n\n@example\nconst nonEcsField: RequiredField = {\n name: 'winlog.event_data.AttributeLDAPDisplayName',\n type: 'keyword',\n ecs: false,\n};\n","type":"object","properties":{"ecs":{"description":"Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.","type":"boolean"},"name":{"description":"Name of an Elasticsearch field","format":"nonempty","minLength":1,"type":"string"},"type":{"description":"Type of the Elasticsearch field","format":"nonempty","minLength":1,"type":"string"}},"required":["name","type","ecs"]},"Security_Detections_API_RequiredFieldArray":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredField"},"type":"array"},"Security_Detections_API_RequiredFieldInput":{"description":"Input parameters to create a RequiredField. Does not include the `ecs` field, because `ecs` is calculated on the backend based on the field name and type.","type":"object","properties":{"name":{"description":"Name of an Elasticsearch field","format":"nonempty","minLength":1,"type":"string"},"type":{"description":"Type of the Elasticsearch field","format":"nonempty","minLength":1,"type":"string"}},"required":["name","type"]},"Security_Detections_API_ResponseAction":{"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_OsqueryResponseAction"},{"$ref":"#/components/schemas/Security_Detections_API_EndpointResponseAction"}]},"Security_Detections_API_ResponseFields":{"type":"object","properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"type":"string"},"execution_summary":{"$ref":"#/components/schemas/Security_Detections_API_RuleExecutionSummary"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"immutable":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleImmutable"},"required_fields":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldArray"},"revision":{"$ref":"#/components/schemas/Security_Detections_API_RuleRevision"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_source":{"$ref":"#/components/schemas/Security_Detections_API_RuleSource"},"updated_at":{"format":"date-time","type":"string"},"updated_by":{"type":"string"}},"required":["id","rule_id","immutable","rule_source","updated_at","updated_by","created_at","created_by","revision","related_integrations","required_fields"]},"Security_Detections_API_RiskScore":{"description":"A numerical representation of the alert's severity from 0 to 100, where:\n* `0` - `21` represents low severity\n* `22` - `47` represents medium severity\n* `48` - `73` represents high severity\n* `74` - `100` represents critical severity\n","maximum":100,"minimum":0,"type":"integer"},"Security_Detections_API_RiskScoreMapping":{"description":"Overrides generated alerts' risk_score with a value from the source event","items":{"type":"object","properties":{"field":{"description":"Source event field used to override the default `risk_score`.","type":"string"},"operator":{"enum":["equals"],"type":"string"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"value":{"type":"string"}},"required":["field","operator","value"]},"type":"array"},"Security_Detections_API_RuleAction":{"type":"object","properties":{"action_type_id":{"description":"The action type used for sending notifications, can be:\n\n - `.slack`\n - `.slack_api`\n - `.email`\n - `.index`\n - `.pagerduty`\n - `.swimlane`\n - `.webhook`\n - `.servicenow`\n - `.servicenow-itom`\n - `.servicenow-sir`\n - `.jira`\n - `.resilient`\n - `.opsgenie`\n - `.teams`\n - `.torq`\n - `.tines`\n - `.d3security`\n","type":"string"},"alerts_filter":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionAlertsFilter"},"frequency":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionFrequency"},"group":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionGroup"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionId"},"params":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionParams"},"uuid":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}},"required":["action_type_id","id","params"]},"Security_Detections_API_RuleActionAlertsFilter":{"additionalProperties":true,"description":"Object containing an action’s conditional filters.\n\n- `timeframe` (object, optional): Object containing the time frame for when this action can be run.\n - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array.\n - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day.\n - start (string, required): Start time in `hh:mm` format.\n - end (string, required): End time in `hh:mm` format.\n - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST.\n- `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run.\n - `kql` (string, required): A KQL string.\n - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.\n \n","type":"object"},"Security_Detections_API_RuleActionFrequency":{"description":"The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).","type":"object","properties":{"notifyWhen":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionNotifyWhen"},"summary":{"description":"Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert","type":"boolean"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle","nullable":true}},"required":["summary","notifyWhen","throttle"]},"Security_Detections_API_RuleActionGroup":{"description":"Optionally groups actions by use cases. Use `default` for alert notifications.","type":"string"},"Security_Detections_API_RuleActionId":{"description":"The connector ID.","type":"string"},"Security_Detections_API_RuleActionNotifyWhen":{"description":"Defines how often rules run actions.","enum":["onActiveAlert","onThrottleInterval","onActionGroupChange"],"type":"string"},"Security_Detections_API_RuleActionParams":{"additionalProperties":true,"description":"Object containing the allowed connector fields, which varies according to the connector type.\n\nFor Slack:\n\n - `message` (string, required): The notification message.\n\nFor email:\n\n - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value.\n - `subject` (string, optional): Email subject line.\n - `message` (string, required): Email body text.\n\nFor Webhook:\n\n - `body` (string, required): JSON payload.\n\nFor PagerDuty:\n\n - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`.\n - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`.\n - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert.\n - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime).\n - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`.\n - `group` (string, optional): Enables logical grouping of service components.\n - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action.\n - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters.\n - `class` (string, optional): Value indicating the class/type of the event.\n","type":"object"},"Security_Detections_API_RuleActionThrottle":{"description":"Defines how often rule actions are taken.","oneOf":[{"enum":["no_actions","rule"],"type":"string"},{"description":"Time interval in seconds, minutes, hours, or days.","example":"1h","pattern":"^[1-9]\\d*[smhd]$","type":"string"}]},"Security_Detections_API_RuleAuthorArray":{"description":"The rule’s author.","items":{"type":"string"},"type":"array"},"Security_Detections_API_RuleCreateProps":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleCreateProps"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleCreateProps"}],"discriminator":{"propertyName":"type"}},"Security_Detections_API_RuleDescription":{"description":"The rule’s description.","example":"Detects anomalous Windows process creation events.","minLength":1,"type":"string"},"Security_Detections_API_RuleDetailsInError":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"]},"Security_Detections_API_RuleExceptionList":{"description":"Array of [exception containers](https://www.elastic.co/guide/en/security/current/exceptions-api-overview.html), which define exceptions that prevent the rule from generating alerts even when its other criteria are met.\n","type":"object","properties":{"id":{"description":"ID of the exception container","format":"nonempty","minLength":1,"type":"string"},"list_id":{"description":"List ID of the exception container","format":"nonempty","minLength":1,"type":"string"},"namespace_type":{"description":"Determines the exceptions validity in rule's Kibana space","enum":["agnostic","single"],"type":"string"},"type":{"$ref":"#/components/schemas/Security_Detections_API_ExceptionListType"}},"required":["id","list_id","type","namespace_type"]},"Security_Detections_API_RuleExecutionMetrics":{"type":"object","properties":{"execution_gap_duration_s":{"description":"Duration in seconds of execution gap","minimum":0,"type":"integer"},"frozen_indices_queried_count":{"description":"Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.","minimum":0,"type":"integer"},"gap_range":{"description":"Range of the execution gap","type":"object","properties":{"gte":{"description":"Start date of the execution gap","type":"string"},"lte":{"description":"End date of the execution gap","type":"string"}},"required":["gte","lte"]},"total_enrichment_duration_ms":{"description":"Total time spent enriching documents during current rule execution cycle","minimum":0,"type":"integer"},"total_indexing_duration_ms":{"description":"Total time spent indexing documents during current rule execution cycle","minimum":0,"type":"integer"},"total_search_duration_ms":{"description":"Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response","minimum":0,"type":"integer"}}},"Security_Detections_API_RuleExecutionStatus":{"description":"Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule.\n- going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes.\n- running - Rule execution started but not reached any intermediate or final status.\n- partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist.\n- failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function.\n- succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's \"health\". The rule might or might not generate any alerts despite of it.","enum":["going to run","running","partial failure","failed","succeeded"],"type":"string"},"Security_Detections_API_RuleExecutionStatusOrder":{"type":"integer"},"Security_Detections_API_RuleExecutionSummary":{"description":"Summary of the last execution of a rule.\n\u003e info\n\u003e This field is under development and its usage or schema may change\n","type":"object","properties":{"last_execution":{"type":"object","properties":{"date":{"description":"Date of the last execution","format":"date-time","type":"string"},"message":{"type":"string"},"metrics":{"$ref":"#/components/schemas/Security_Detections_API_RuleExecutionMetrics"},"status":{"$ref":"#/components/schemas/Security_Detections_API_RuleExecutionStatus","description":"Status of the last execution"},"status_order":{"$ref":"#/components/schemas/Security_Detections_API_RuleExecutionStatusOrder"}},"required":["date","status","status_order","message","metrics"]}},"required":["last_execution"]},"Security_Detections_API_RuleFalsePositiveArray":{"description":"String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.","items":{"type":"string"},"type":"array"},"Security_Detections_API_RuleFilterArray":{"description":"The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array.\n\u003e info\n\u003e This field is not supported for ES|QL rules.\n","items":{},"type":"array"},"Security_Detections_API_RuleInterval":{"description":"Frequency of rule execution, using a date math range. For example, \"1h\" means the rule runs every hour. Defaults to 5m (5 minutes).","type":"string"},"Security_Detections_API_RuleIntervalFrom":{"description":"Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).","format":"date-math","type":"string"},"Security_Detections_API_RuleIntervalTo":{"type":"string"},"Security_Detections_API_RuleLicense":{"description":"The rule's license.","type":"string"},"Security_Detections_API_RuleMetadata":{"additionalProperties":true,"description":"Placeholder for metadata about the rule.\n\u003e info\n\u003e This field is overwritten when you save changes to the rule’s settings.\n","type":"object"},"Security_Detections_API_RuleName":{"description":"A human-readable name for the rule.","example":"Anomalous Windows Process Creation","minLength":1,"type":"string"},"Security_Detections_API_RuleNameOverride":{"description":"Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.","type":"string"},"Security_Detections_API_RuleObjectId":{"$ref":"#/components/schemas/Security_Detections_API_UUID","description":"A dynamic unique identifier for the rule object. It is randomly generated when a rule is created and cannot be changed after that. It is always a UUID. It is unique within a given Kibana space. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have different object `id`s."},"Security_Detections_API_RulePatchProps":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRulePatchProps"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRulePatchProps"}]},"Security_Detections_API_RulePreviewLoggedRequest":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"duration":{"type":"integer"},"request":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"request_type":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}}},"Security_Detections_API_RulePreviewLogs":{"type":"object","properties":{"duration":{"description":"Execution duration in milliseconds","type":"integer"},"errors":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"type":"array"},"requests":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RulePreviewLoggedRequest"},"type":"array"},"startedAt":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"warnings":{"items":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"type":"array"}},"required":["errors","warnings","duration"]},"Security_Detections_API_RulePreviewParams":{"type":"object","properties":{"invocationCount":{"type":"integer"},"timeframeEnd":{"format":"date-time","type":"string"}},"required":["invocationCount","timeframeEnd"]},"Security_Detections_API_RuleQuery":{"description":"[Query](https://www.elastic.co/guide/en/kibana/8.17/search.html) used by the rule to create alerts.\n\n- For indicator match rules, only the query’s results are used to determine whether an alert is generated.\n- ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-esql-rule) rules for more information.\n","type":"string"},"Security_Detections_API_RuleReferenceArray":{"description":"Array containing notes about or references to relevant information about the rule. Defaults to an empty array.","items":{"type":"string"},"type":"array"},"Security_Detections_API_RuleResponse":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRule"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRule"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRule"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRule"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRule"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRule"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRule"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRule"}],"discriminator":{"propertyName":"type"}},"Security_Detections_API_RuleRevision":{"description":"The rule's revision number.\n\nIt represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update.\n\u003e info\n\u003e Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.\n","minimum":0,"type":"integer"},"Security_Detections_API_RuleSignatureId":{"description":"A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.","type":"string"},"Security_Detections_API_RuleSource":{"description":"Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Security_Detections_API_ExternalRuleSource"},{"$ref":"#/components/schemas/Security_Detections_API_InternalRuleSource"}]},"Security_Detections_API_RuleTagArray":{"description":"String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.","items":{"type":"string"},"type":"array"},"Security_Detections_API_RuleUpdateProps":{"anyOf":[{"$ref":"#/components/schemas/Security_Detections_API_EqlRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_QueryRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_MachineLearningRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_NewTermsRuleUpdateProps"},{"$ref":"#/components/schemas/Security_Detections_API_EsqlRuleUpdateProps"}],"discriminator":{"propertyName":"type"}},"Security_Detections_API_RuleVersion":{"description":"The rule's version number.\n\n- For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). \n- For custom rules it is set to `1` when the rule is created. \n\u003e info\n\u003e It is not incremented on each update. Compare this to the `revision` field.\n","minimum":1,"type":"integer"},"Security_Detections_API_SavedObjectResolveAliasPurpose":{"enum":["savedObjectConversion","savedObjectImport"],"type":"string"},"Security_Detections_API_SavedObjectResolveAliasTargetId":{"type":"string"},"Security_Detections_API_SavedObjectResolveOutcome":{"enum":["exactMatch","aliasMatch","conflict"],"type":"string"},"Security_Detections_API_SavedQueryId":{"description":"Kibana [saved search](https://www.elastic.co/guide/en/kibana/current/save-open-search.html) used by the rule to create alerts.","type":"string"},"Security_Detections_API_SavedQueryRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleResponseFields"}]},"Security_Detections_API_SavedQueryRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleDefaultableFields"}]},"Security_Detections_API_SavedQueryRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleCreateFields"}]},"Security_Detections_API_SavedQueryRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_SavedQueryRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"}}},"Security_Detections_API_SavedQueryRulePatchFields":{"allOf":[{"type":"object","properties":{"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"},"type":{"description":"Rule type","enum":["saved_query"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleDefaultableFields"}]},"Security_Detections_API_SavedQueryRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRulePatchFields"}]},"Security_Detections_API_SavedQueryRuleRequiredFields":{"type":"object","properties":{"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"},"type":{"description":"Rule type","enum":["saved_query"],"type":"string"}},"required":["type","saved_id"]},"Security_Detections_API_SavedQueryRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}},"required":["language"]}]},"Security_Detections_API_SavedQueryRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryRuleCreateFields"}]},"Security_Detections_API_SetAlertsStatusByIds":{"type":"object","properties":{"signal_ids":{"description":"List of alert `id`s.","items":{"format":"nonempty","minLength":1,"type":"string"},"minItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/Security_Detections_API_AlertStatus"}},"required":["signal_ids","status"]},"Security_Detections_API_SetAlertsStatusByQuery":{"type":"object","properties":{"conflicts":{"default":"abort","enum":["abort","proceed"],"type":"string"},"query":{"additionalProperties":true,"type":"object"},"status":{"$ref":"#/components/schemas/Security_Detections_API_AlertStatus"}},"required":["query","status"]},"Security_Detections_API_SetAlertTags":{"description":"Object with list of tags to add and remove.","type":"object","properties":{"tags_to_add":{"$ref":"#/components/schemas/Security_Detections_API_AlertTags"},"tags_to_remove":{"$ref":"#/components/schemas/Security_Detections_API_AlertTags"}},"required":["tags_to_add","tags_to_remove"]},"Security_Detections_API_SetupGuide":{"description":"Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.","type":"string"},"Security_Detections_API_Severity":{"description":"Severity level of alerts produced by the rule, which must be one of the following:\n* `low`: Alerts that are of interest but generally not considered to be security incidents\n* `medium`: Alerts that require investigation\n* `high`: Alerts that require immediate investigation\n* `critical`: Alerts that indicate it is highly likely a security incident has occurred\n","enum":["low","medium","high","critical"],"type":"string"},"Security_Detections_API_SeverityMapping":{"description":"Overrides generated alerts' severity with values from the source event","items":{"type":"object","properties":{"field":{"description":"Source event field used to override the default `severity`.","type":"string"},"operator":{"enum":["equals"],"type":"string"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"value":{"type":"string"}},"required":["field","operator","severity","value"]},"type":"array"},"Security_Detections_API_SiemErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"Security_Detections_API_SkippedAlertsIndexMigration":{"type":"object","properties":{"index":{"type":"string"}},"required":["index"]},"Security_Detections_API_SortOrder":{"enum":["asc","desc"],"type":"string"},"Security_Detections_API_Threat":{"description":"\u003e info\n\u003e Currently, only threats described using the MITRE ATT\u0026CK\u0026trade; framework are supported.\n","type":"object","properties":{"framework":{"description":"Relevant attack framework","type":"string"},"tactic":{"$ref":"#/components/schemas/Security_Detections_API_ThreatTactic"},"technique":{"description":"Array containing information on the attack techniques (optional)","items":{"$ref":"#/components/schemas/Security_Detections_API_ThreatTechnique"},"type":"array"}},"required":["framework","tactic"]},"Security_Detections_API_ThreatArray":{"items":{"$ref":"#/components/schemas/Security_Detections_API_Threat"},"type":"array"},"Security_Detections_API_ThreatFilters":{"items":{"description":"Query and filter context array used to filter documents from the Elasticsearch index containing the threat values"},"type":"array"},"Security_Detections_API_ThreatIndex":{"description":"Elasticsearch indices used to check which field values generate alerts.","items":{"type":"string"},"type":"array"},"Security_Detections_API_ThreatIndicatorPath":{"description":"Defines the path to the threat indicator in the indicator documents (optional)","type":"string"},"Security_Detections_API_ThreatMapping":{"description":"Array of entries objects that define mappings between the source event fields and the values in the Elasticsearch threat index. Each entries object must contain these fields:\n\n- field: field from the event indices on which the rule runs\n- type: must be mapping\n- value: field from the Elasticsearch threat index\n \nYou can use Boolean and and or logic to define the conditions for when matching fields and values generate alerts. Sibling entries objects are evaluated using or logic, whereas multiple entries in a single entries object use and logic. See Example of Threat Match rule which uses both `and` and `or` logic.\n","items":{"type":"object","properties":{"entries":{"items":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"},"type":{"enum":["mapping"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Detections_API_NonEmptyString"}},"required":["field","type","value"]},"type":"array"}},"required":["entries"]},"minItems":1,"type":"array"},"Security_Detections_API_ThreatMatchRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleResponseFields"}]},"Security_Detections_API_ThreatMatchRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleDefaultableFields"}]},"Security_Detections_API_ThreatMatchRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleCreateFields"}]},"Security_Detections_API_ThreatMatchRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_ThreatMatchRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppression"},"concurrent_searches":{"$ref":"#/components/schemas/Security_Detections_API_ConcurrentSearches"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"items_per_search":{"$ref":"#/components/schemas/Security_Detections_API_ItemsPerSearch"},"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"},"threat_filters":{"$ref":"#/components/schemas/Security_Detections_API_ThreatFilters"},"threat_indicator_path":{"$ref":"#/components/schemas/Security_Detections_API_ThreatIndicatorPath"},"threat_language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_ThreatMatchRulePatchFields":{"allOf":[{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"threat_index":{"$ref":"#/components/schemas/Security_Detections_API_ThreatIndex"},"threat_mapping":{"$ref":"#/components/schemas/Security_Detections_API_ThreatMapping"},"threat_query":{"$ref":"#/components/schemas/Security_Detections_API_ThreatQuery"},"type":{"description":"Rule type","enum":["threat_match"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleDefaultableFields"}]},"Security_Detections_API_ThreatMatchRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRulePatchFields"}]},"Security_Detections_API_ThreatMatchRuleRequiredFields":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"threat_index":{"$ref":"#/components/schemas/Security_Detections_API_ThreatIndex"},"threat_mapping":{"$ref":"#/components/schemas/Security_Detections_API_ThreatMapping"},"threat_query":{"$ref":"#/components/schemas/Security_Detections_API_ThreatQuery"},"type":{"description":"Rule type","enum":["threat_match"],"type":"string"}},"required":["type","query","threat_query","threat_mapping","threat_index"]},"Security_Detections_API_ThreatMatchRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}},"required":["language"]}]},"Security_Detections_API_ThreatMatchRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_ThreatMatchRuleCreateFields"}]},"Security_Detections_API_ThreatQuery":{"description":"Query used to determine which fields in the Elasticsearch index are used for generating alerts.","type":"string"},"Security_Detections_API_ThreatSubtechnique":{"type":"object","properties":{"id":{"description":"Subtechnique ID","type":"string"},"name":{"description":"Subtechnique name","type":"string"},"reference":{"description":"Subtechnique reference","type":"string"}},"required":["id","name","reference"]},"Security_Detections_API_ThreatTactic":{"description":"Object containing information on the attack type\n","type":"object","properties":{"id":{"description":"Tactic ID","type":"string"},"name":{"description":"Tactic name","type":"string"},"reference":{"description":"Tactic reference","type":"string"}},"required":["id","name","reference"]},"Security_Detections_API_ThreatTechnique":{"type":"object","properties":{"id":{"description":"Technique ID","type":"string"},"name":{"description":"Technique name","type":"string"},"reference":{"description":"Technique reference","type":"string"},"subtechnique":{"description":"Array containing more specific information on the attack technique.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_ThreatSubtechnique"},"type":"array"}},"required":["id","name","reference"]},"Security_Detections_API_Threshold":{"type":"object","properties":{"cardinality":{"$ref":"#/components/schemas/Security_Detections_API_ThresholdCardinality"},"field":{"$ref":"#/components/schemas/Security_Detections_API_ThresholdField"},"value":{"$ref":"#/components/schemas/Security_Detections_API_ThresholdValue"}},"required":["field","value"]},"Security_Detections_API_ThresholdAlertSuppression":{"description":"Defines alert suppression configuration.","type":"object","properties":{"duration":{"$ref":"#/components/schemas/Security_Detections_API_AlertSuppressionDuration"}},"required":["duration"]},"Security_Detections_API_ThresholdCardinality":{"description":"The field on which the cardinality is applied.","items":{"type":"object","properties":{"field":{"description":"The field on which to calculate and compare the cardinality.","type":"string"},"value":{"description":"The threshold value from which an alert is generated based on unique number of values of cardinality.field.","minimum":0,"type":"integer"}},"required":["field","value"]},"type":"array"},"Security_Detections_API_ThresholdField":{"description":"The field on which the threshold is applied. If you specify an empty array ([]), alerts are generated when the query returns at least the number of results specified in the value field.","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"Security_Detections_API_ThresholdRule":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity","version","tags","enabled","risk_score_mapping","severity_mapping","interval","from","to","actions","exceptions_list","author","false_positives","references","max_signals","threat","setup","related_integrations","required_fields"]},{"$ref":"#/components/schemas/Security_Detections_API_ResponseFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleResponseFields"}]},"Security_Detections_API_ThresholdRuleCreateFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleDefaultableFields"}]},"Security_Detections_API_ThresholdRuleCreateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleCreateFields"}]},"Security_Detections_API_ThresholdRuleDefaultableFields":{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}}},"Security_Detections_API_ThresholdRuleOptionalFields":{"type":"object","properties":{"alert_suppression":{"$ref":"#/components/schemas/Security_Detections_API_ThresholdAlertSuppression"},"data_view_id":{"$ref":"#/components/schemas/Security_Detections_API_DataViewId"},"filters":{"$ref":"#/components/schemas/Security_Detections_API_RuleFilterArray"},"index":{"$ref":"#/components/schemas/Security_Detections_API_IndexPatternArray"},"saved_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedQueryId"}}},"Security_Detections_API_ThresholdRulePatchFields":{"allOf":[{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"threshold":{"$ref":"#/components/schemas/Security_Detections_API_Threshold"},"type":{"description":"Rule type","enum":["threshold"],"type":"string"}}},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleOptionalFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleDefaultableFields"}]},"Security_Detections_API_ThresholdRulePatchProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}}},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRulePatchFields"}]},"Security_Detections_API_ThresholdRuleRequiredFields":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Security_Detections_API_RuleQuery"},"threshold":{"$ref":"#/components/schemas/Security_Detections_API_Threshold"},"type":{"description":"Rule type","enum":["threshold"],"type":"string"}},"required":["type","query","threshold"]},"Security_Detections_API_ThresholdRuleResponseFields":{"allOf":[{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleRequiredFields"},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleOptionalFields"},{"type":"object","properties":{"language":{"$ref":"#/components/schemas/Security_Detections_API_KqlQueryLanguage"}},"required":["language"]}]},"Security_Detections_API_ThresholdRuleUpdateProps":{"allOf":[{"type":"object","properties":{"actions":{"description":"Array defining the automated actions (notifications) taken when alerts are generated.","items":{"$ref":"#/components/schemas/Security_Detections_API_RuleAction"},"type":"array"},"alias_purpose":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveAliasTargetId"},"author":{"$ref":"#/components/schemas/Security_Detections_API_RuleAuthorArray"},"building_block_type":{"$ref":"#/components/schemas/Security_Detections_API_BuildingBlockType"},"description":{"$ref":"#/components/schemas/Security_Detections_API_RuleDescription"},"enabled":{"$ref":"#/components/schemas/Security_Detections_API_IsRuleEnabled"},"exceptions_list":{"items":{"$ref":"#/components/schemas/Security_Detections_API_RuleExceptionList"},"type":"array"},"false_positives":{"$ref":"#/components/schemas/Security_Detections_API_RuleFalsePositiveArray"},"from":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalFrom"},"id":{"$ref":"#/components/schemas/Security_Detections_API_RuleObjectId"},"interval":{"$ref":"#/components/schemas/Security_Detections_API_RuleInterval"},"investigation_fields":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationFields"},"license":{"$ref":"#/components/schemas/Security_Detections_API_RuleLicense"},"max_signals":{"$ref":"#/components/schemas/Security_Detections_API_MaxSignals"},"meta":{"$ref":"#/components/schemas/Security_Detections_API_RuleMetadata"},"name":{"$ref":"#/components/schemas/Security_Detections_API_RuleName"},"namespace":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndexNamespace"},"note":{"$ref":"#/components/schemas/Security_Detections_API_InvestigationGuide"},"outcome":{"$ref":"#/components/schemas/Security_Detections_API_SavedObjectResolveOutcome"},"output_index":{"$ref":"#/components/schemas/Security_Detections_API_AlertsIndex"},"references":{"$ref":"#/components/schemas/Security_Detections_API_RuleReferenceArray"},"related_integrations":{"$ref":"#/components/schemas/Security_Detections_API_RelatedIntegrationArray"},"required_fields":{"description":"Elasticsearch fields and their types that need to be present for the rule to function.\n\u003e info\n\u003e The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.\n","items":{"$ref":"#/components/schemas/Security_Detections_API_RequiredFieldInput"},"type":"array"},"response_actions":{"items":{"$ref":"#/components/schemas/Security_Detections_API_ResponseAction"},"type":"array"},"risk_score":{"$ref":"#/components/schemas/Security_Detections_API_RiskScore"},"risk_score_mapping":{"$ref":"#/components/schemas/Security_Detections_API_RiskScoreMapping"},"rule_id":{"$ref":"#/components/schemas/Security_Detections_API_RuleSignatureId"},"rule_name_override":{"$ref":"#/components/schemas/Security_Detections_API_RuleNameOverride"},"setup":{"$ref":"#/components/schemas/Security_Detections_API_SetupGuide"},"severity":{"$ref":"#/components/schemas/Security_Detections_API_Severity"},"severity_mapping":{"$ref":"#/components/schemas/Security_Detections_API_SeverityMapping"},"tags":{"$ref":"#/components/schemas/Security_Detections_API_RuleTagArray"},"threat":{"$ref":"#/components/schemas/Security_Detections_API_ThreatArray"},"throttle":{"$ref":"#/components/schemas/Security_Detections_API_RuleActionThrottle"},"timeline_id":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateId"},"timeline_title":{"$ref":"#/components/schemas/Security_Detections_API_TimelineTemplateTitle"},"timestamp_override":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverride"},"timestamp_override_fallback_disabled":{"$ref":"#/components/schemas/Security_Detections_API_TimestampOverrideFallbackDisabled"},"to":{"$ref":"#/components/schemas/Security_Detections_API_RuleIntervalTo"},"version":{"$ref":"#/components/schemas/Security_Detections_API_RuleVersion"}},"required":["name","description","risk_score","severity"]},{"$ref":"#/components/schemas/Security_Detections_API_ThresholdRuleCreateFields"}]},"Security_Detections_API_ThresholdValue":{"description":"The threshold value from which an alert is generated.","minimum":1,"type":"integer"},"Security_Detections_API_ThrottleForBulkActions":{"description":"Defines the maximum interval in which a rule’s actions are executed.\n\u003e info\n\u003e The rule level `throttle` field is deprecated in Elastic Security 8.8 and will remain active for at least the next 12 months.\n\u003e In Elastic Security 8.8 and later, you can use the `frequency` field to define frequencies for individual actions. Actions without frequencies will acquire a converted version of the rule’s `throttle` field. In the response, the converted `throttle` setting appears in the individual actions' `frequency` field.\n","enum":["rule","1h","1d","7d"],"type":"string"},"Security_Detections_API_TiebreakerField":{"description":"Sets a secondary field for sorting events","type":"string"},"Security_Detections_API_TimelineTemplateId":{"description":"Timeline template ID","type":"string"},"Security_Detections_API_TimelineTemplateTitle":{"description":"Timeline template title","type":"string"},"Security_Detections_API_TimestampField":{"description":"Specifies the name of the event timestamp field used for sorting a sequence of events. Not to be confused with `timestamp_override`, which specifies the more general field used for querying events within a range. Defaults to the @timestamp ECS field.","type":"string"},"Security_Detections_API_TimestampOverride":{"description":"Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.","type":"string"},"Security_Detections_API_TimestampOverrideFallbackDisabled":{"description":"Disables the fallback to the event's @timestamp field","type":"boolean"},"Security_Detections_API_UUID":{"description":"A universally unique identifier","format":"uuid","type":"string"},"Security_Detections_API_WarningSchema":{"type":"object","properties":{"actionPath":{"type":"string"},"buttonLabel":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"}},"required":["type","message","actionPath"]},"Security_Endpoint_Exceptions_API_EndpointList":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionList"},{"additionalProperties":false,"type":"object"}]},"Security_Endpoint_Exceptions_API_EndpointListItem":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItem"},"Security_Endpoint_Exceptions_API_ExceptionList":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListDescription"},"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListId"},"immutable":{"type":"boolean"},"list_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListMeta"},"name":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListName"},"namespace_type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionNamespaceType"},"os_types":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListTags"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","type":"string"},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListType"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","type":"string"},"version":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListVersion"}},"required":["id","list_id","type","name","description","immutable","namespace_type","version","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Endpoint_Exceptions_API_ExceptionListDescription":{"description":"Describes the exception list.","example":"This list tracks allowlisted values.","type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListHumanId":{"description":"Exception list's human readable string identifier, e.g. `trusted-linux-processes`.","example":"simple_list","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListId":{"description":"Exception list's identifier.","example":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItem":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"comments":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemCommentArray"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemExpireTime"},"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemId"},"item_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemHumanId"},"list_id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionNamespaceType"},"os_types":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemTags"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","type":"string"},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemType"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","type":"string"}},"required":["id","item_id","list_id","type","name","description","entries","namespace_type","comments","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Endpoint_Exceptions_API_ExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"}},"required":["id","comment","created_at","created_by"]},"Security_Endpoint_Exceptions_API_ExceptionListItemCommentArray":{"description":"Array of comment fields:\n\n- comment (string): Comments about the exception item.\n","items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemComment"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListItemDescription":{"description":"Describes the exception list.","type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemEntry":{"anyOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatch"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryList"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryExists"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryNested"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchWildcard"}],"discriminator":{"propertyName":"type"}},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryArray":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntry"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryExists":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["exists"],"type":"string"}},"required":["type","field","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryList":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"list":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ListId"},"type":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ListType"}},"required":["id","type"]},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["list"],"type":"string"}},"required":["type","field","list","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatch":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["match"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"}},"required":["type","field","value","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["match_any"],"type":"string"},"value":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"minItems":1,"type":"array"}},"required":["type","field","value","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchWildcard":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["wildcard"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"}},"required":["type","field","value","operator"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryNested":{"type":"object","properties":{"entries":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryNestedEntryItem"},"minItems":1,"type":"array"},"field":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"type":{"enum":["nested"],"type":"string"}},"required":["type","field","entries"]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryNestedEntryItem":{"oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatch"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny"},{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListItemEntryExists"}]},"Security_Endpoint_Exceptions_API_ExceptionListItemEntryOperator":{"enum":["excluded","included"],"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemExpireTime":{"description":"The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions.","format":"date-time","type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemHumanId":{"description":"Human readable string identifier, e.g. `trusted-linux-processes`","example":"simple_list_item","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemId":{"description":"Exception's identifier.","example":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemMeta":{"additionalProperties":true,"type":"object"},"Security_Endpoint_Exceptions_API_ExceptionListItemName":{"description":"Exception list name.","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray":{"items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListOsType"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListItemTags":{"items":{"description":"String array containing words and phrases to help categorize exception items.","format":"nonempty","minLength":1,"type":"string"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListItemType":{"enum":["simple"],"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListMeta":{"additionalProperties":true,"description":"Placeholder for metadata about the list container.","type":"object"},"Security_Endpoint_Exceptions_API_ExceptionListName":{"description":"The name of the exception list.","example":"My exception list","type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListOsType":{"description":"Use this field to specify the operating system.","enum":["linux","macos","windows"],"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListOsTypeArray":{"description":"Use this field to specify the operating system. Only enter one value.","items":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_ExceptionListOsType"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListTags":{"description":"String array containing words and phrases to help categorize exception containers.","items":{"type":"string"},"type":"array"},"Security_Endpoint_Exceptions_API_ExceptionListType":{"description":"The type of exception list to be created. Different list types may denote where they can be utilized.","enum":["detection","rule_default","endpoint","endpoint_trusted_apps","endpoint_events","endpoint_host_isolation_exceptions","endpoint_blocklists"],"type":"string"},"Security_Endpoint_Exceptions_API_ExceptionListVersion":{"description":"The document version, automatically increasd on updates.","minimum":1,"type":"integer"},"Security_Endpoint_Exceptions_API_ExceptionNamespaceType":{"description":"Determines whether the exception container is available in all Kibana spaces or just the space\nin which it is created, where:\n\n- `single`: Only available in the Kibana space in which it is created.\n- `agnostic`: Available in all Kibana spaces.\n","enum":["agnostic","single"],"type":"string"},"Security_Endpoint_Exceptions_API_FindEndpointListItemsFilter":{"$ref":"#/components/schemas/Security_Endpoint_Exceptions_API_NonEmptyString"},"Security_Endpoint_Exceptions_API_ListId":{"description":"Value list's identifier.","example":"21b01cfb-058d-44b9-838c-282be16c91cd","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_ListType":{"description":"Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:\n\n- `keyword`: Many ECS fields are Elasticsearch keywords\n- `ip`: IP addresses\n- `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation)\n","enum":["binary","boolean","byte","date","date_nanos","date_range","double","double_range","float","float_range","geo_point","geo_shape","half_float","integer","integer_range","ip","ip_range","keyword","long","long_range","shape","short","text"],"type":"string"},"Security_Endpoint_Exceptions_API_NonEmptyString":{"description":"A string that does not contain only whitespace characters","format":"nonempty","minLength":1,"type":"string"},"Security_Endpoint_Exceptions_API_PlatformErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}},"required":["statusCode","error","message"]},"Security_Endpoint_Exceptions_API_SiemErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"Security_Endpoint_Management_API_ActionStateSuccessResponse":{"type":"object","properties":{"body":{"type":"object","properties":{"data":{"type":"object","properties":{"canEncrypt":{"type":"boolean"}}}},"required":["data"]}},"required":["body"]},"Security_Endpoint_Management_API_ActionStatusSuccessResponse":{"type":"object","properties":{"body":{"type":"object","properties":{"data":{"type":"object","properties":{"agent_id":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentId"},"pending_actions":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionsSchema"}},"required":["agent_id","pending_actions"]}},"required":["data"]}},"required":["body"]},"Security_Endpoint_Management_API_AgentId":{"description":"Agent ID","type":"string"},"Security_Endpoint_Management_API_AgentIds":{"description":"A list of agent IDs. Max of 50.","example":["agent-id-1","agent-id-2"],"minLength":1,"oneOf":[{"items":{"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"minLength":1,"type":"string"}]},"Security_Endpoint_Management_API_AgentTypes":{"description":"List of agent types to retrieve. Defaults to `endpoint`.","enum":["endpoint","sentinel_one","crowdstrike","microsoft_defender_endpoint"],"example":"endpoint","type":"string"},"Security_Endpoint_Management_API_AlertIds":{"description":"A list of alerts `id`s.","items":{"format":"nonempty","minLength":1,"type":"string"},"minItems":1,"type":"array"},"Security_Endpoint_Management_API_CaseIds":{"description":"Case IDs to be updated (cannot contain empty strings)","example":["case-id-1","case-id-2"],"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"Security_Endpoint_Management_API_CloudFileScriptParameters":{"type":"object","properties":{"cloudFile":{"description":"Script name in cloud storage.","minLength":1,"type":"string"},"commandLine":{"description":"Command line arguments.","minLength":1,"type":"string"},"timeout":{"description":"Timeout in seconds.","minimum":1,"type":"integer"}},"required":["cloudFile"]},"Security_Endpoint_Management_API_Command":{"description":"The command to be executed (cannot be an empty string)","enum":["isolate","unisolate","kill-process","suspend-process","running-processes","get-file","execute","upload","scan"],"minLength":1,"type":"string"},"Security_Endpoint_Management_API_Commands":{"description":"A list of response action command names.","example":["isolate","unisolate"],"items":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Command"},"type":"array"},"Security_Endpoint_Management_API_Comment":{"description":"Optional comment","example":"This is a comment","type":"string"},"Security_Endpoint_Management_API_EndDate":{"description":"An end date in ISO format or Date Math format.","example":"2023-10-31T23:59:59.999Z","type":"string"},"Security_Endpoint_Management_API_EndpointIds":{"description":"List of endpoint IDs (cannot contain empty strings)","example":["endpoint-id-1","endpoint-id-2"],"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"Security_Endpoint_Management_API_EndpointMetadataResponse":{"example":{"host_status":"healthy","last_checkin":"2023-07-04T15:48:57.360Z","metadata":{"@timestamp":"2023-07-04T15:48:57.3609346Z","agent":{"build":{"original":"version: 7.16.0, compiled: Tue Nov 16 17:00:00 2021, branch: 7.16, commit: 73a51033db85e0fb3be1c934697ef6a2b08979ab"},"id":"abb8a826-6812-448c-a571-6d8269b51449","type":"endpoint","version":"7.16.0"},"data_stream":{"dataset":"endpoint.metadata","namespace":"default","type":"metrics"},"ecs":{"version":"1.11.0"},"elastic":{"agent":{"id":"abb8a826-6812-448c-a571-6d8269b51449"}},"Endpoint":{"capabilities":["isolation"],"configuration":{"isolation":false},"policy":{"applied":{"endpoint_policy_version":"2","id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","name":"test","status":"success","version":"3"}},"state":{"isolation":false},"status":"enrolled"},"event":{"action":"endpoint_metadata","agent_id_status":"verified","category":["host"],"created":"2023-07-04T15:48:57.3609346Z","dataset":"endpoint.metadata","id":"MNtRc++KoKHXXwlj+++++OhZ","ingested":"2023-07-04T15:48:58Z","kind":"metric","module":"endpoint","sequence":43757,"type":["info"]},"host":{"architecture":"x86_64","hostname":"WinDev2104Eval","id":"17d9cabc-7edd-43bc-bacb-8da5f5e6c0e5","ip":["10.0.2.15","fe80::21a6:63d3:d70e:e3ad","127.0.0.1","::1"],"mac":["08:00:27:b1:1d:5a"],"name":"WinDev2104Eval","os":{"Ext":{"variant":"Windows 10 Enterprise Evaluation"},"family":"windows","full":"Windows 10 Enterprise Evaluation 20H2 (10.0.19042.906)","kernel":"20H2 (10.0.19042.906)","name":"Windows","platform":"windows","type":"windows","version":"20H2 (10.0.19042.906)"}},"message":"Endpoint metadata","policy_info":{"agent":{"applied":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":3},"configured":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":3}},"endpoint":{"id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","revision":2}}}},"type":"object","properties":{}},"Security_Endpoint_Management_API_ExecuteRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"type":"object","properties":{"command":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Command"},"timeout":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Timeout"}},"required":["command"]}},"required":["parameters"]}],"example":{"comment":"Get list of all files","endpoint_ids":["b3d6de74-36b0-4fa8-be46-c375bf1771bf"],"parameters":{"command":"ls -al","timeout":600}}},"Security_Endpoint_Management_API_ExecuteRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentState":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"isCompleted":false,"wasSuccessful":false}},"agentType":"endpoint","command":"execute","comment":"Get list of all files","createdBy":"myuser","hosts":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"name":"gke-endpoint-gke-clu-endpoint-node-po-e1a3ab89-4c4r"}},"id":"9f934028-2300-4927-b531-b26376793dc4","isCompleted":false,"isExpired":false,"outputs":{},"parameters":{"command":"ls -al","timeout":600},"startedAt":"2023-07-28T18:43:27.362Z","status":"pending","wasSuccessful":false}},"type":"object","properties":{}},"Security_Endpoint_Management_API_GetEndpointActionListResponse":{"example":{"data":[{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"running-processes","completedAt":"2022-08-08T09:50:47.672Z","createdBy":"elastic","id":"b3d6de74-36b0-4fa8-be46-c375bf1771bf","isCompleted":true,"isExpired":false,"startedAt":"2022-08-08T15:24:57.402Z","wasSuccessful":true},{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"isolate","completedAt":"2022-08-08T10:41:57.352Z","createdBy":"elastic","id":"43b4098b-8752-4fbb-a7a7-6df7c74d0ee3","isCompleted":true,"isExpired":false,"startedAt":"2022-08-08T15:23:37.359Z","wasSuccessful":true},{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"kill-process","comment":"bad process - taking up too much cpu","completedAt":"2022-08-08T09:44:50.952Z","createdBy":"elastic","id":"5bc92c86-b8e6-42dd-837f-12ad29e09caa","isCompleted":true,"isExpired":false,"startedAt":"2022-08-08T14:38:44.125Z","wasSuccessful":true},{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"unisolate","comment":"Not a threat to the network","completedAt":"2022-08-08T09:40:47.398Z","createdBy":"elastic","id":"790d54e0-3aa3-4e5b-8255-3ce9d851246a","isCompleted":true,"isExpired":false,"startedAt":"2022-08-08T14:38:15.391Z","wasSuccessful":true}],"elasticAgentIds":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"endDate":"now","page":1,"pageSize":10,"startDate":"now-24h/h","total":4},"type":"object","properties":{}},"Security_Endpoint_Management_API_GetEndpointActionResponse":{"example":{"data":{"agents":["afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"],"agentType":"endpoint","command":"running-processes","completedAt":"2022-08-08T09:50:47.672Z","createdBy":"elastic","id":"b3d6de74-36b0-4fa8-be46-c375bf1771bf","isCompleted":true,"isExpired":false,"outputs":{"afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0":{"content":{"entries":[{"command":"/opt/cmd1","entity_id":"fk2ym7bl3oiu3okjcik0xosc0i0m75x3eh49nu3uaqt4dqanjt","pid":"822","user":"Dexter"},{"command":"/opt/cmd3/opt/cmd3/opt/cmd3/opt/cmd3","entity_id":"pwvz91m48wpj9j7ov9gtw8fp7u2rat4eu5ipte37hnhdcbi2pt","pid":"984","user":"Jada"}]},"type":"json"}},"startedAt":"2022-08-08T15:24:57.402Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_GetFileRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"]}},"required":["parameters"]}],"example":{"comment":"Get my file","endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"parameters":{"path":"/usr/my-file.txt"}}},"Security_Endpoint_Management_API_GetFileRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentState":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"isCompleted":false,"wasSuccessful":false}},"agentType":"endpoint","command":"get-file","createdBy":"myuser","hosts":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"name":"gke-endpoint-gke-clu-endpoint-node-po-e1a3ab89-4c4r"}},"id":"27ba1b42-7cc6-4e53-86ce-675c876092b2","isCompleted":false,"isExpired":false,"outputs":{},"parameters":{"path":"/usr/my-file.txt"},"startedAt":"2023-07-28T19:00:03.911Z","status":"pending","wasSuccessful":false}},"type":"object","properties":{}},"Security_Endpoint_Management_API_GetProcessesRouteRequestBody":{"example":{"endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"]},"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},"Security_Endpoint_Management_API_GetProcessesRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"running-processes","comment":"","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_HostPathScriptParameters":{"type":"object","properties":{"commandLine":{"description":"Command line arguments.","minLength":1,"type":"string"},"hostPath":{"description":"Absolute or relative path of script on host machine.","minLength":1,"type":"string"},"timeout":{"description":"Timeout in seconds.","minimum":1,"type":"integer"}},"required":["hostPath"]},"Security_Endpoint_Management_API_HostStatuses":{"description":"A set of agent health statuses to filter by.","example":["healthy","updating"],"items":{"enum":["healthy","offline","updating","inactive","unenrolled"],"type":"string"},"type":"array"},"Security_Endpoint_Management_API_IsolateRouteResponse":{"example":{"action":"233db9ea-6733-4849-9226-5a7039c7161d","data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"suspend-process","comment":"suspend the process","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{"entity_id":"abc123"},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_KillProcessRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"oneOf":[{"type":"object","properties":{"pid":{"description":"The process ID (PID) of the process to terminate.","example":123,"minimum":1,"type":"integer"}}},{"type":"object","properties":{"entity_id":{"description":"The entity ID of the process to terminate.","example":"abc123","minLength":1,"type":"string"}}},{"type":"object","properties":{"process_name":{"description":"The name of the process to terminate. Valid for SentinelOne agent type only.","example":"Elastic","minLength":1,"type":"string"}}}]}},"required":["parameters"]}],"example":{"comment":"terminate the process","endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"parameters":{"entity_id":"abc123"}}},"Security_Endpoint_Management_API_KillProcessRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"kill-process","comment":"terminate the process","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{"entity_id":"abc123"},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_Kuery":{"description":"A KQL string.","example":"united.endpoint.host.os.name : 'Windows'","type":"string"},"Security_Endpoint_Management_API_MetadataListResponse":{"example":{"data":[{"host_status":"healthy","last_checkin":"2023-07-04T15:47:57.432Z","metadata":{"@timestamp":"2023-07-04T15:47:57.432173535Z","agent":{"build":{"original":"version: 7.16.0, compiled: Tue Nov 16 16:00:00 2021, branch: 7.16, commit: 73a51033db85e0fb3be1c934697ef6a2b08979ab"},"id":"285297c6-3bff-4b83-9a07-f3e749801123","type":"endpoint","version":"7.16.0"},"data_stream":{"dataset":"endpoint.metadata","namespace":"default","type":"metrics"},"ecs":{"version":"1.11.0"},"elastic":{"agent":{"id":"285297c6-3bff-4b83-9a07-f3e749801123"}},"Endpoint":{"capabilities":["isolation"],"configuration":{"isolation":false},"policy":{"applied":{"endpoint_policy_version":"2","id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","name":"test","status":"success","version":"3"}},"state":{"isolation":false},"status":"enrolled"},"event":{"action":"endpoint_metadata","agent_id_status":"verified","category":["host"],"created":"2023-07-04T15:47:57.432173535Z","dataset":"endpoint.metadata","id":"MNtSXK/SkhEBnmgt++++++7S","ingested":"2023-07-04T15:47:58Z","kind":"metric","module":"endpoint","sequence":400,"type":["info"]},"host":{"architecture":"x86_64","hostname":"david-Xubuntu","id":"0cfead88e2024bd8a27476352b5ab264","ip":["127.0.0.1","::1","10.0.2.15","fe80::2ac7:8e15:b957:2fa1"],"mac":["08:00:27:e6:78:8b"],"name":"david-Xubuntu","os":{"Ext":{"variant":"Ubuntu"},"family":"ubuntu","full":"Ubuntu 20.04.2","kernel":"5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021","name":"Linux","platform":"ubuntu","type":"linux","version":"20.04.2"}},"message":"Endpoint metadata"},"policy_info":{"agent":{"applied":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":0},"configured":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":3}},"endpoint":{"id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","revision":2}}},{"host_status":"healthy","last_checkin":"2023-07-04T15:44:31.491Z","metadata":{"@timestamp":"2023-07-04T15:44:31.4917849Z","agent":{"build":{"original":"version: 7.16.0, compiled: Tue Nov 16 17:00:00 2021, branch: 7.16, commit: 73a51033db85e0fb3be1c934697ef6a2b08979ab"},"id":"abb8a826-6812-448c-a571-6d8269b51449","type":"endpoint","version":"7.16.0"},"data_stream":{"dataset":"endpoint.metadata","namespace":"default","type":"metrics"},"ecs":{"version":"1.11.0"},"elastic":{"agent":{"id":"abb8a826-6812-448c-a571-6d8269b51449"}},"Endpoint":{"capabilities":["isolation"],"configuration":{"isolation":false},"policy":{"applied":{"endpoint_policy_version":"2","id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","name":"test","status":"success","version":"3"}},"state":{"isolation":false},"status":"enrolled"},"event":{"action":"endpoint_metadata","agent_id_status":"verified","category":["host"],"created":"2023-07-04T15:44:31.4917849Z","dataset":"endpoint.metadata","id":"MNtRc++KoKHXXwlj+++++/N9","ingested":"2023-07-04T15:44:33Z","kind":"metric","module":"endpoint","sequence":5159,"type":["info"]},"host":{"architecture":"x86_64","hostname":"WinDev2104Eval","id":"17d9cabc-7edd-43bc-bacb-8da5f5e6c0e5","ip":["10.0.2.15","fe80::21a6:63d3:d70e:e3ad","127.0.0.1","::1"],"mac":["08:00:27:b1:1d:5a"],"name":"WinDev2104Eval","os":{"Ext":{"variant":"Windows 10 Enterprise Evaluation"},"family":"windows","full":"Windows 10 Enterprise Evaluation 20H2 (10.0.19042.906)","kernel":"20H2 (10.0.19042.906)","name":"Windows","platform":"windows","type":"windows","version":"20H2 (10.0.19042.906)"}},"message":"Endpoint metadata"},"policy_info":{"agent":{"applied":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":0},"configured":{"id":"ed7e3720-4bad-11ec-a2a8-fb22e62a5753","revision":3}},"endpoint":{"id":"d5371dcd-93b7-4627-af88-4084f7d6aa3e","revision":2}}}],"page":0,"pageSize":10,"sortDirection":"desc","sortField":"enrolled_at","total":2},"type":"object","properties":{}},"Security_Endpoint_Management_API_Page":{"default":1,"description":"Page number","example":1,"minimum":1,"type":"integer"},"Security_Endpoint_Management_API_PageSize":{"default":10,"description":"Number of items per page","example":10,"maximum":100,"minimum":1,"type":"integer"},"Security_Endpoint_Management_API_Parameters":{"description":"Optional parameters object","type":"object"},"Security_Endpoint_Management_API_PendingActionDataType":{"type":"integer"},"Security_Endpoint_Management_API_PendingActionsSchema":{"oneOf":[{"type":"object","properties":{"execute":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"get-file":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"isolate":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"kill-process":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"running-processes":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"scan":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"suspend-process":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"unisolate":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"},"upload":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_PendingActionDataType"}}},{"additionalProperties":true,"type":"object"}]},"Security_Endpoint_Management_API_ProtectionUpdatesNoteResponse":{"type":"object","properties":{"note":{"type":"string"}}},"Security_Endpoint_Management_API_RawScriptParameters":{"type":"object","properties":{"commandLine":{"description":"Command line arguments.","minLength":1,"type":"string"},"raw":{"description":"Raw script content.","minLength":1,"type":"string"},"timeout":{"description":"Timeout in seconds.","minimum":1,"type":"integer"}},"required":["raw"]},"Security_Endpoint_Management_API_RunScriptRouteRequestBody":{"type":"object","properties":{"parameters":{"description":"Exactly one of 'Raw', 'HostPath', or 'CloudFile' must be provided. CommandLine and Timeout are optional for all.","oneOf":[{"$ref":"#/components/schemas/Security_Endpoint_Management_API_RawScriptParameters"},{"$ref":"#/components/schemas/Security_Endpoint_Management_API_HostPathScriptParameters"},{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CloudFileScriptParameters"}]}},"required":["parameters"]},"Security_Endpoint_Management_API_ScanRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"type":"object","properties":{"path":{"description":"The folder or file’s full path (including the file name).","example":"/usr/my-file.txt","type":"string"}},"required":["path"]}},"required":["parameters"]}],"example":{"comment":"Scan the file for malware","endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"parameters":{"path":"/usr/my-file.txt"}}},"Security_Endpoint_Management_API_ScanRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentState":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"isCompleted":false,"wasSuccessful":false}},"agentType":"endpoint","command":"scan","createdBy":"myuser","hosts":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"name":"gke-endpoint-gke-clu-endpoint-node-po-e1a3ab89-4c4r"}},"id":"27ba1b42-7cc6-4e53-86ce-675c876092b2","isCompleted":false,"isExpired":false,"outputs":{},"parameters":{"path":"/usr/my-file.txt"},"startedAt":"2023-07-28T19:00:03.911Z","status":"pending","wasSuccessful":false}},"type":"object","properties":{}},"Security_Endpoint_Management_API_SortDirection":{"description":"Determines the sort order.","enum":["asc","desc"],"example":"desc","type":"string"},"Security_Endpoint_Management_API_SortField":{"description":"Determines which field is used to sort the results.","enum":["enrolled_at","metadata.host.hostname","host_status","metadata.Endpoint.policy.applied.name","metadata.Endpoint.policy.applied.status","metadata.host.os.name","metadata.host.ip","metadata.agent.version","last_checkin"],"example":"enrolled_at","type":"string"},"Security_Endpoint_Management_API_StartDate":{"description":"A start date in ISO 8601 format or Date Math format.","example":"2023-10-31T00:00:00.000Z","type":"string"},"Security_Endpoint_Management_API_SuccessResponse":{"type":"object","properties":{}},"Security_Endpoint_Management_API_SuspendProcessRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"parameters":{"oneOf":[{"type":"object","properties":{"pid":{"description":"The process ID (PID) of the process to suspend.","example":123,"minimum":1,"type":"integer"}}},{"type":"object","properties":{"entity_id":{"description":"The entity ID of the process to suspend.","example":"abc123","minLength":1,"type":"string"}}}]}},"required":["parameters"]}],"example":{"comment":"suspend the process","endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"parameters":{"entity_id":"abc123"}}},"Security_Endpoint_Management_API_SuspendProcessRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"suspend-process","comment":"suspend the process","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{"entity_id":"abc123"},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_Timeout":{"description":"The maximum timeout value in milliseconds (optional)","minimum":1,"type":"integer"},"Security_Endpoint_Management_API_Type":{"description":"Type of response action","enum":["automated","manual"],"type":"string"},"Security_Endpoint_Management_API_Types":{"description":"List of types of response actions","example":["automated","manual"],"items":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Type"},"maxLength":2,"minLength":1,"type":"array"},"Security_Endpoint_Management_API_UnisolateRouteResponse":{"example":{"action":"233db9ea-6733-4849-9226-5a7039c7161d","data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentType":"endpoint","command":"suspend-process","comment":"suspend the process","completedAt":"2022-07-29T19:09:44.961Z","createdBy":"myuser","errors":[],"id":"233db9ea-6733-4849-9226-5a7039c7161d","isCompleted":true,"isExpired":false,"outputs":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"content":{"key":"value"},"type":"json"}},"parameters":{"entity_id":"abc123"},"startedAt":"2022-07-29T19:08:49.126Z","wasSuccessful":true}},"type":"object","properties":{}},"Security_Endpoint_Management_API_UploadRouteRequestBody":{"allOf":[{"type":"object","properties":{"agent_type":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AgentTypes"},"alert_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_AlertIds"},"case_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_CaseIds"},"comment":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Comment"},"endpoint_ids":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_EndpointIds"},"parameters":{"$ref":"#/components/schemas/Security_Endpoint_Management_API_Parameters"}},"required":["endpoint_ids"]},{"type":"object","properties":{"file":{"description":"The binary content of the file.","example":"RWxhc3RpYw==","format":"binary","type":"string"},"parameters":{"type":"object","properties":{"overwrite":{"default":false,"description":"Overwrite the file on the host if it already exists.","example":false,"type":"boolean"}}}},"required":["parameters","file"]}],"example":{"endpoint_ids":["ed518850-681a-4d60-bb98-e22640cae2a8"],"file":"RWxhc3RpYw==","parameters":{}}},"Security_Endpoint_Management_API_UploadRouteResponse":{"example":{"data":{"agents":["ed518850-681a-4d60-bb98-e22640cae2a8"],"agentState":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"isCompleted":false,"wasSuccessful":false}},"agentType":"endpoint","command":"upload","createdBy":"elastic","hosts":{"ed518850-681a-4d60-bb98-e22640cae2a8":{"name":"Host-5i6cuc8kdv"}},"id":"9ff6aebc-2cb6-481e-8869-9b30036c9731","isCompleted":false,"isExpired":false,"outputs":{},"parameters":{"file_id":"10e4ce3d-4abb-4f93-a0cd-eaf63a489280","file_name":"fix-malware.sh","file_sha256":"a0bed94220193ba4895c0aa5b4e7e293381d15765cb164ddf7be5cdd010ae42a","file_size":69},"startedAt":"2023-07-03T15:07:22.837Z","status":"pending","wasSuccessful":false}},"type":"object","properties":{}},"Security_Endpoint_Management_API_UserIds":{"description":"A list of user IDs.","example":["user-id-1","user-id-2"],"oneOf":[{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},{"minLength":1,"type":"string"}]},"Security_Endpoint_Management_API_WithOutputs":{"description":"A list of action IDs that should include the complete output of the action.","example":["action-id-1","action-id-2"],"oneOf":[{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},{"minLength":1,"type":"string"}]},"Security_Entity_Analytics_API_AssetCriticalityBulkUploadErrorItem":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"string"}},"required":["message","index"]},"Security_Entity_Analytics_API_AssetCriticalityBulkUploadStats":{"type":"object","properties":{"failed":{"type":"integer"},"successful":{"type":"integer"},"total":{"type":"integer"}},"required":["successful","failed","total"]},"Security_Entity_Analytics_API_AssetCriticalityLevel":{"description":"The criticality level of the asset.","enum":["low_impact","medium_impact","high_impact","extreme_impact"],"type":"string"},"Security_Entity_Analytics_API_AssetCriticalityLevelsForBulkUpload":{"description":"The criticality level of the asset for bulk upload. The value `unassigned` is used to indicate that the criticality level is not assigned and is only used for bulk upload.","enum":["low_impact","medium_impact","high_impact","extreme_impact","unassigned"],"type":"string"},"Security_Entity_Analytics_API_AssetCriticalityRecord":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_CreateAssetCriticalityRecord"},{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecordEcsParts"},{"type":"object","properties":{"@timestamp":{"description":"The time the record was created or updated.","example":"2017-07-21T17:32:28Z","format":"date-time","type":"string"}},"required":["@timestamp"]}],"example":{"@timestamp":"2024-08-02T11:15:34.290Z","asset":{"criticality":"high_impact"},"criticality_level":"high_impact","host":{"asset":{"criticality":"high_impact"},"name":"my_host"},"id_field":"host.name","id_value":"my_host"}},"Security_Entity_Analytics_API_AssetCriticalityRecordEcsParts":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["asset"]},"entity":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"id":{"type":"string"}},"required":["id"]},"host":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"name":{"type":"string"}},"required":["name"]},"service":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"name":{"type":"string"}},"required":["name"]},"user":{"type":"object","properties":{"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"name":{"type":"string"}},"required":["name"]}},"required":["asset"]},"Security_Entity_Analytics_API_AssetCriticalityRecordIdParts":{"type":"object","properties":{"id_field":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IdField","description":"The field representing the ID.","example":"host.name"},"id_value":{"description":"The ID value of the asset.","type":"string"}},"required":["id_value","id_field"]},"Security_Entity_Analytics_API_CleanUpRiskEngineErrorResponse":{"type":"object","properties":{"cleanup_successful":{"example":false,"type":"boolean"},"errors":{"items":{"type":"object","properties":{"error":{"type":"string"},"seq":{"type":"integer"}},"required":["seq","error"]},"type":"array"}},"required":["cleanup_successful","errors"]},"Security_Entity_Analytics_API_ConfigureRiskEngineSavedObjectErrorResponse":{"type":"object","properties":{"errors":{"items":{"type":"object","properties":{"error":{"type":"string"},"seq":{"type":"integer"}},"required":["seq","error"]},"type":"array"},"risk_engine_saved_object_configured":{"example":false,"type":"boolean"}},"required":["risk_engine_saved_object_configured","errors"]},"Security_Entity_Analytics_API_CreateAssetCriticalityRecord":{"allOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityRecordIdParts"},{"type":"object","properties":{"criticality_level":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality_level"]}]},"Security_Entity_Analytics_API_EngineComponentResource":{"enum":["entity_engine","entity_definition","index","component_template","index_template","ingest_pipeline","enrich_policy","task","transform"],"type":"string"},"Security_Entity_Analytics_API_EngineComponentStatus":{"type":"object","properties":{"errors":{"items":{"type":"object","properties":{"message":{"type":"string"},"title":{"type":"string"}}},"type":"array"},"health":{"enum":["green","yellow","red","unknown"],"type":"string"},"id":{"type":"string"},"installed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_Metadata"},"resource":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineComponentResource"}},"required":["id","installed","resource"]},"Security_Entity_Analytics_API_EngineDataviewUpdateResult":{"type":"object","properties":{"changes":{"type":"object","properties":{"indexPatterns":{"items":{"type":"string"},"type":"array"}}},"type":{"type":"string"}},"required":["type"]},"Security_Entity_Analytics_API_EngineDescriptor":{"type":"object","properties":{"delay":{"default":"1m","pattern":"[smdh]$","type":"string"},"docsPerSecond":{"type":"integer"},"error":{"type":"object","properties":{"action":{"enum":["init"],"type":"string"},"message":{"type":"string"}},"required":["message","action"]},"fieldHistoryLength":{"type":"integer"},"filter":{"type":"string"},"frequency":{"default":"1m","pattern":"[smdh]$","type":"string"},"indexPattern":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_IndexPattern"},"lookbackPeriod":{"default":"24h","pattern":"[smdh]$","type":"string"},"status":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineStatus"},"timeout":{"default":"180s","pattern":"[smdh]$","type":"string"},"timestampField":{"type":"string"},"type":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityType"}},"required":["type","indexPattern","status","fieldHistoryLength"]},"Security_Entity_Analytics_API_EngineMetadata":{"type":"object","properties":{"Type":{"type":"string"}},"required":["Type"]},"Security_Entity_Analytics_API_EngineStatus":{"enum":["installing","started","stopped","updating","error"],"type":"string"},"Security_Entity_Analytics_API_Entity":{"oneOf":[{"$ref":"#/components/schemas/Security_Entity_Analytics_API_UserEntity"},{"$ref":"#/components/schemas/Security_Entity_Analytics_API_HostEntity"},{"$ref":"#/components/schemas/Security_Entity_Analytics_API_ServiceEntity"},{"$ref":"#/components/schemas/Security_Entity_Analytics_API_GenericEntity"}]},"Security_Entity_Analytics_API_EntityRiskLevels":{"enum":["Unknown","Low","Moderate","High","Critical"],"type":"string"},"Security_Entity_Analytics_API_EntityRiskScoreRecord":{"type":"object","properties":{"@timestamp":{"description":"The time at which the risk score was calculated.","example":"2017-07-21T17:32:28Z","format":"date-time","type":"string"},"calculated_level":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityRiskLevels","description":"Lexical description of the entity's risk.","example":"Critical"},"calculated_score":{"description":"The raw numeric value of the given entity's risk score.","format":"double","type":"number"},"calculated_score_norm":{"description":"The normalized numeric value of the given entity's risk score. Useful for comparing with other entities.","format":"double","maximum":100,"minimum":0,"type":"number"},"category_1_count":{"description":"The number of risk input documents that contributed to the Category 1 score (`category_1_score`).","format":"integer","type":"number"},"category_1_score":{"description":"The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.","format":"double","type":"number"},"category_2_count":{"format":"integer","type":"number"},"category_2_score":{"format":"double","type":"number"},"criticality_level":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"},"criticality_modifier":{"format":"double","type":"number"},"id_field":{"description":"The identifier field defining this risk score. Coupled with `id_value`, uniquely identifies the entity being scored.","example":"host.name","type":"string"},"id_value":{"description":"The identifier value defining this risk score. Coupled with `id_field`, uniquely identifies the entity being scored.","example":"example.host","type":"string"},"inputs":{"description":"A list of the highest-risk documents contributing to this risk score. Useful for investigative purposes.","items":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_RiskScoreInput"},"type":"array"},"notes":{"items":{"type":"string"},"type":"array"}},"required":["@timestamp","id_field","id_value","calculated_level","calculated_score","calculated_score_norm","category_1_score","category_1_count","inputs","notes"]},"Security_Entity_Analytics_API_EntityType":{"enum":["user","host","service","generic"],"type":"string"},"Security_Entity_Analytics_API_GenericEntity":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"entity":{"type":"object","properties":{"category":{"type":"string"},"EngineMetadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineMetadata"},"id":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"]}},"required":["entity"]},"Security_Entity_Analytics_API_HostEntity":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"entity":{"type":"object","properties":{"EngineMetadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineMetadata"},"name":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"required":["name","source","type"]},"event":{"type":"object","properties":{"ingested":{"format":"date-time","type":"string"}}},"host":{"type":"object","properties":{"architecture":{"items":{"type":"string"},"type":"array"},"domain":{"items":{"type":"string"},"type":"array"},"hostname":{"items":{"type":"string"},"type":"array"},"id":{"items":{"type":"string"},"type":"array"},"ip":{"items":{"type":"string"},"type":"array"},"mac":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"risk":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityRiskScoreRecord"},"type":{"items":{"type":"string"},"type":"array"}},"required":["name"]}},"required":["host","entity"]},"Security_Entity_Analytics_API_IdField":{"enum":["host.name","user.name","service.name","entity.id"],"type":"string"},"Security_Entity_Analytics_API_IndexPattern":{"type":"string"},"Security_Entity_Analytics_API_InspectQuery":{"type":"object","properties":{"dsl":{"items":{"type":"string"},"type":"array"},"response":{"items":{"type":"string"},"type":"array"}},"required":["dsl","response"]},"Security_Entity_Analytics_API_Interval":{"description":"Interval in which enrich policy runs. For example, `\"1h\"` means the rule runs every hour. Must be less than or equal to half the duration of the lookback period,","example":"1h","pattern":"^[1-9]\\d*[smh]$","type":"string"},"Security_Entity_Analytics_API_Metadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_TransformStatsMetadata"},"Security_Entity_Analytics_API_MonitoredUserDoc":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"entity_analytics_monitoring":{"type":"object","properties":{"labels":{"items":{"type":"object","properties":{"field":{"type":"string"},"source":{"type":"string"},"value":{"type":"string"}}},"type":"array"}}},"event":{"type":"object","properties":{"ingested":{"format":"date-time","type":"string"}}},"id":{"type":"string"},"labels":{"type":"object","properties":{"monitoring":{"type":"object","properties":{"privileged_users":{"enum":["monitored","deleted"],"type":"string"}}},"source_indices":{"items":{"type":"string"},"type":"array"},"source_integrations":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"enum":["csv","index_sync","api"]},"type":"array"}}},"user":{"type":"object","properties":{"name":{"type":"string"}}}}},"Security_Entity_Analytics_API_MonitoringEngineDescriptor":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineStatus"}},"required":["type","status"]},"Security_Entity_Analytics_API_RiskEngineScheduleNowErrorResponse":{"type":"object","properties":{"full_error":{"type":"string"},"message":{"type":"string"}},"required":["message","full_error"]},"Security_Entity_Analytics_API_RiskEngineScheduleNowResponse":{"type":"object","properties":{"success":{"type":"boolean"}}},"Security_Entity_Analytics_API_RiskScoreInput":{"description":"A generic representation of a document contributing to a Risk Score.","type":"object","properties":{"category":{"description":"The risk category of the risk input document.","example":"category_1","type":"string"},"contribution_score":{"format":"double","type":"number"},"description":{"description":"A human-readable description of the risk input document.","example":"Generated from Detection Engine Rule: Malware Prevention Alert","type":"string"},"id":{"description":"The unique identifier (`_id`) of the original source document","example":"91a93376a507e86cfbf282166275b89f9dbdb1f0be6c8103c6ff2909ca8e1a1c","type":"string"},"index":{"description":"The unique index (`_index`) of the original source document","example":".internal.alerts-security.alerts-default-000001","type":"string"},"risk_score":{"description":"The weighted risk score of the risk input document.","format":"double","maximum":100,"minimum":0,"type":"number"},"timestamp":{"description":"The @timestamp of the risk input document.","example":"2017-07-21T17:32:28Z","type":"string"}},"required":["id","index","description","category"]},"Security_Entity_Analytics_API_ServiceEntity":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"entity":{"type":"object","properties":{"EngineMetadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineMetadata"},"name":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"required":["name","source","type"]},"event":{"type":"object","properties":{"ingested":{"format":"date-time","type":"string"}}},"service":{"type":"object","properties":{"name":{"type":"string"},"risk":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityRiskScoreRecord"}},"required":["name"]}},"required":["service","entity"]},"Security_Entity_Analytics_API_StoreStatus":{"enum":["not_installed","installing","running","stopped","error"],"type":"string"},"Security_Entity_Analytics_API_TaskManagerUnavailableResponse":{"description":"Task manager is unavailable","type":"object","properties":{"message":{"type":"string"},"status_code":{"minimum":400,"type":"integer"}},"required":["status_code","message"]},"Security_Entity_Analytics_API_TransformStatsMetadata":{"type":"object","properties":{"delete_time_in_ms":{"type":"integer"},"documents_deleted":{"type":"integer"},"documents_indexed":{"type":"integer"},"documents_processed":{"type":"integer"},"exponential_avg_checkpoint_duration_ms":{"type":"integer"},"exponential_avg_documents_indexed":{"type":"integer"},"exponential_avg_documents_processed":{"type":"integer"},"index_failures":{"type":"integer"},"index_time_in_ms":{"type":"integer"},"index_total":{"type":"integer"},"pages_processed":{"type":"integer"},"processing_time_in_ms":{"type":"integer"},"processing_total":{"type":"integer"},"search_failures":{"type":"integer"},"search_time_in_ms":{"type":"integer"},"search_total":{"type":"integer"},"trigger_count":{"type":"integer"}},"required":["pages_processed","documents_processed","documents_indexed","trigger_count","index_time_in_ms","index_total","index_failures","search_time_in_ms","search_total","search_failures","processing_time_in_ms","processing_total","exponential_avg_checkpoint_duration_ms","exponential_avg_documents_indexed","exponential_avg_documents_processed"]},"Security_Entity_Analytics_API_UserEntity":{"type":"object","properties":{"@timestamp":{"format":"date-time","type":"string"},"asset":{"type":"object","properties":{"criticality":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_AssetCriticalityLevel"}},"required":["criticality"]},"entity":{"type":"object","properties":{"EngineMetadata":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EngineMetadata"},"name":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"required":["name","source","type"]},"event":{"type":"object","properties":{"ingested":{"format":"date-time","type":"string"}}},"user":{"type":"object","properties":{"domain":{"items":{"type":"string"},"type":"array"},"email":{"items":{"type":"string"},"type":"array"},"full_name":{"items":{"type":"string"},"type":"array"},"hash":{"items":{"type":"string"},"type":"array"},"id":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"risk":{"$ref":"#/components/schemas/Security_Entity_Analytics_API_EntityRiskScoreRecord"},"roles":{"items":{"type":"string"},"type":"array"}},"required":["name"]}},"required":["user","entity"]},"Security_Entity_Analytics_API_UserName":{"type":"object","properties":{"user":{"type":"object","properties":{"name":{"description":"The name of the user.","type":"string"}}}}},"Security_Exceptions_API_CreateExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["comment"]},"Security_Exceptions_API_CreateExceptionListItemCommentArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateExceptionListItemComment"},"type":"array"},"Security_Exceptions_API_CreateRuleExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["comment"]},"Security_Exceptions_API_CreateRuleExceptionListItemCommentArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateRuleExceptionListItemComment"},"type":"array"},"Security_Exceptions_API_CreateRuleExceptionListItemProps":{"type":"object","properties":{"comments":{"$ref":"#/components/schemas/Security_Exceptions_API_CreateRuleExceptionListItemCommentArray","default":[]},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"format":"date-time","type":"string"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType","default":"single"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemOsTypeArray","default":[]},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemTags","default":[]},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemType"}},"required":["type","name","description","entries"]},"Security_Exceptions_API_ExceptionList":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListDescription"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"},"immutable":{"type":"boolean"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListTags"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","type":"string"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListType"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","type":"string"},"version":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListVersion"}},"required":["id","list_id","type","name","description","immutable","namespace_type","version","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Exceptions_API_ExceptionListDescription":{"description":"Describes the exception list.","example":"This list tracks allowlisted values.","type":"string"},"Security_Exceptions_API_ExceptionListHumanId":{"description":"Exception list's human readable string identifier, e.g. `trusted-linux-processes`.","example":"simple_list","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListId":{"description":"Exception list's identifier.","example":"9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListItem":{"type":"object","properties":{"_version":{"description":"The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.","type":"string"},"comments":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemCommentArray"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","type":"string"},"description":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemDescription"},"entries":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryArray"},"expire_time":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemExpireTime"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemId"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"},"meta":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemMeta"},"name":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemName"},"namespace_type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionNamespaceType"},"os_types":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemOsTypeArray"},"tags":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemTags"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","type":"string"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemType"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","type":"string"}},"required":["id","item_id","list_id","type","name","description","entries","namespace_type","comments","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Exceptions_API_ExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"created_at":{"description":"Autogenerated date of object creation.","format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"updated_at":{"description":"Autogenerated date of last object update.","format":"date-time","type":"string"},"updated_by":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["id","comment","created_at","created_by"]},"Security_Exceptions_API_ExceptionListItemCommentArray":{"description":"Array of comment fields:\n\n- comment (string): Comments about the exception item.\n","items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemComment"},"type":"array"},"Security_Exceptions_API_ExceptionListItemDescription":{"description":"Describes the exception list.","type":"string"},"Security_Exceptions_API_ExceptionListItemEntry":{"anyOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatch"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatchAny"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryList"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryExists"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryNested"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatchWildcard"}],"discriminator":{"propertyName":"type"}},"Security_Exceptions_API_ExceptionListItemEntryArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntry"},"type":"array"},"Security_Exceptions_API_ExceptionListItemEntryExists":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["exists"],"type":"string"}},"required":["type","field","operator"]},"Security_Exceptions_API_ExceptionListItemEntryList":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"list":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ListId"},"type":{"$ref":"#/components/schemas/Security_Exceptions_API_ListType"}},"required":["id","type"]},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["list"],"type":"string"}},"required":["type","field","list","operator"]},"Security_Exceptions_API_ExceptionListItemEntryMatch":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["match"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["type","field","value","operator"]},"Security_Exceptions_API_ExceptionListItemEntryMatchAny":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["match_any"],"type":"string"},"value":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"minItems":1,"type":"array"}},"required":["type","field","value","operator"]},"Security_Exceptions_API_ExceptionListItemEntryMatchWildcard":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"operator":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryOperator"},"type":{"enum":["wildcard"],"type":"string"},"value":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["type","field","value","operator"]},"Security_Exceptions_API_ExceptionListItemEntryNested":{"type":"object","properties":{"entries":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryNestedEntryItem"},"minItems":1,"type":"array"},"field":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"type":{"enum":["nested"],"type":"string"}},"required":["type","field","entries"]},"Security_Exceptions_API_ExceptionListItemEntryNestedEntryItem":{"oneOf":[{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatch"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryMatchAny"},{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemEntryExists"}]},"Security_Exceptions_API_ExceptionListItemEntryOperator":{"enum":["excluded","included"],"type":"string"},"Security_Exceptions_API_ExceptionListItemExpireTime":{"description":"The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions.","format":"date-time","type":"string"},"Security_Exceptions_API_ExceptionListItemHumanId":{"description":"Human readable string identifier, e.g. `trusted-linux-processes`","example":"simple_list_item","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListItemId":{"description":"Exception's identifier.","example":"71a9f4b2-c85c-49b4-866f-c71eb9e67da2","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListItemMeta":{"additionalProperties":true,"type":"object"},"Security_Exceptions_API_ExceptionListItemName":{"description":"Exception list name.","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ExceptionListItemOsTypeArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsType"},"type":"array"},"Security_Exceptions_API_ExceptionListItemTags":{"items":{"description":"String array containing words and phrases to help categorize exception items.","format":"nonempty","minLength":1,"type":"string"},"type":"array"},"Security_Exceptions_API_ExceptionListItemType":{"enum":["simple"],"type":"string"},"Security_Exceptions_API_ExceptionListMeta":{"additionalProperties":true,"description":"Placeholder for metadata about the list container.","type":"object"},"Security_Exceptions_API_ExceptionListName":{"description":"The name of the exception list.","example":"My exception list","type":"string"},"Security_Exceptions_API_ExceptionListOsType":{"description":"Use this field to specify the operating system.","enum":["linux","macos","windows"],"type":"string"},"Security_Exceptions_API_ExceptionListOsTypeArray":{"description":"Use this field to specify the operating system. Only enter one value.","items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListOsType"},"type":"array"},"Security_Exceptions_API_ExceptionListsImportBulkError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListId"},"item_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListItemHumanId"},"list_id":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListHumanId"}},"required":["error"]},"Security_Exceptions_API_ExceptionListsImportBulkErrorArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_ExceptionListsImportBulkError"},"type":"array"},"Security_Exceptions_API_ExceptionListTags":{"description":"String array containing words and phrases to help categorize exception containers.","items":{"type":"string"},"type":"array"},"Security_Exceptions_API_ExceptionListType":{"description":"The type of exception list to be created. Different list types may denote where they can be utilized.","enum":["detection","rule_default","endpoint","endpoint_trusted_apps","endpoint_events","endpoint_host_isolation_exceptions","endpoint_blocklists"],"type":"string"},"Security_Exceptions_API_ExceptionListVersion":{"description":"The document version, automatically increasd on updates.","minimum":1,"type":"integer"},"Security_Exceptions_API_ExceptionNamespaceType":{"description":"Determines whether the exception container is available in all Kibana spaces or just the space\nin which it is created, where:\n\n- `single`: Only available in the Kibana space in which it is created.\n- `agnostic`: Available in all Kibana spaces.\n","enum":["agnostic","single"],"type":"string"},"Security_Exceptions_API_FindExceptionListItemsFilter":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"Security_Exceptions_API_FindExceptionListsFilter":{"example":"exception-list.attributes.name:%Detection%20List","type":"string"},"Security_Exceptions_API_ListId":{"description":"Value list's identifier.","example":"21b01cfb-058d-44b9-838c-282be16c91cd","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_ListType":{"description":"Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:\n\n- `keyword`: Many ECS fields are Elasticsearch keywords\n- `ip`: IP addresses\n- `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation)\n","enum":["binary","boolean","byte","date","date_nanos","date_range","double","double_range","float","float_range","geo_point","geo_shape","half_float","integer","integer_range","ip","ip_range","keyword","long","long_range","shape","short","text"],"type":"string"},"Security_Exceptions_API_NonEmptyString":{"description":"A string that does not contain only whitespace characters","format":"nonempty","minLength":1,"type":"string"},"Security_Exceptions_API_PlatformErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}},"required":["statusCode","error","message"]},"Security_Exceptions_API_RuleId":{"$ref":"#/components/schemas/Security_Exceptions_API_UUID"},"Security_Exceptions_API_SiemErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"Security_Exceptions_API_UpdateExceptionListItemComment":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"},"id":{"$ref":"#/components/schemas/Security_Exceptions_API_NonEmptyString"}},"required":["comment"]},"Security_Exceptions_API_UpdateExceptionListItemCommentArray":{"items":{"$ref":"#/components/schemas/Security_Exceptions_API_UpdateExceptionListItemComment"},"type":"array"},"Security_Exceptions_API_UUID":{"description":"A universally unique identifier","format":"uuid","type":"string"},"Security_Lists_API_FindListItemsCursor":{"description":"Returns the items that come after the last item returned in the previous call (use the `cursor` value returned in the previous call). This parameter uses the `tie_breaker_id` field to ensure all items are sorted and returned correctly.","example":"WzIwLFsiYjU3Yzc2MmMtMzAzNi00NjVjLTliZmItN2JmYjVlNmU1MTVhIl1d","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_FindListItemsFilter":{"example":"value:127.0.0.1","type":"string"},"Security_Lists_API_FindListsCursor":{"example":"WzIwLFsiYjU3Yzc2MmMtMzAzNi00NjVjLTliZmItN2JmYjVlNmU1MTVhIl1d","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_FindListsFilter":{"example":"value:127.0.0.1","type":"string"},"Security_Lists_API_List":{"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"@timestamp":{"example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"created_at":{"description":"Autogenerated date of object creation.","example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","example":"elastic","type":"string"},"description":{"$ref":"#/components/schemas/Security_Lists_API_ListDescription"},"deserializer":{"$ref":"#/components/schemas/Security_Lists_API_ListDeserializer"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"immutable":{"type":"boolean"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListMetadata"},"name":{"$ref":"#/components/schemas/Security_Lists_API_ListName"},"serializer":{"$ref":"#/components/schemas/Security_Lists_API_ListSerializer"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","example":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"string"},"type":{"$ref":"#/components/schemas/Security_Lists_API_ListType"},"updated_at":{"description":"Autogenerated date of last object update.","example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","example":"elastic","type":"string"},"version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersion"}},"required":["id","type","name","description","immutable","version","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Lists_API_ListDescription":{"description":"Describes the value list.","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListDeserializer":{"description":"Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:\n\n- `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`.\n- `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.\n- `{{{gte}}},{{{lte}}}` - Date range values.\n","example":"{{value}}","type":"string"},"Security_Lists_API_ListId":{"description":"Value list's identifier.","example":"21b01cfb-058d-44b9-838c-282be16c91cd","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListItem":{"type":"object","properties":{"_version":{"$ref":"#/components/schemas/Security_Lists_API_ListVersionId"},"@timestamp":{"example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"created_at":{"description":"Autogenerated date of object creation.","example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"created_by":{"description":"Autogenerated value - user that created object.","example":"elastic","type":"string"},"deserializer":{"$ref":"#/components/schemas/Security_Lists_API_ListDeserializer"},"id":{"$ref":"#/components/schemas/Security_Lists_API_ListItemId"},"list_id":{"$ref":"#/components/schemas/Security_Lists_API_ListId"},"meta":{"$ref":"#/components/schemas/Security_Lists_API_ListItemMetadata"},"serializer":{"$ref":"#/components/schemas/Security_Lists_API_ListSerializer"},"tie_breaker_id":{"description":"Field used in search to ensure all containers are sorted and returned correctly.","example":"f5508188-b1e9-4e6e-9662-d039a7d89899","type":"string"},"type":{"$ref":"#/components/schemas/Security_Lists_API_ListType"},"updated_at":{"description":"Autogenerated date of last object update.","example":"2025-01-08T04:47:34.273Z","format":"date-time","type":"string"},"updated_by":{"description":"Autogenerated value - user that last updated object.","example":"elastic","type":"string"},"value":{"$ref":"#/components/schemas/Security_Lists_API_ListItemValue"}},"required":["id","type","list_id","value","tie_breaker_id","created_at","created_by","updated_at","updated_by"]},"Security_Lists_API_ListItemId":{"description":"Value list item's identifier.","example":"54b01cfb-058d-44b9-838c-282be16c91cd","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListItemMetadata":{"additionalProperties":true,"description":"Placeholder for metadata about the value list item.","type":"object"},"Security_Lists_API_ListItemPrivileges":{"type":"object","properties":{"application":{"additionalProperties":{"type":"boolean"},"type":"object"},"cluster":{"additionalProperties":{"type":"boolean"},"type":"object"},"has_all_requested":{"type":"boolean"},"index":{"additionalProperties":{"additionalProperties":{"type":"boolean"},"type":"object"},"type":"object"},"username":{"type":"string"}},"required":["username","has_all_requested","cluster","index","application"]},"Security_Lists_API_ListItemValue":{"description":"The value used to evaluate exceptions.","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListMetadata":{"additionalProperties":true,"description":"Placeholder for metadata about the value list.","type":"object"},"Security_Lists_API_ListName":{"description":"Value list's name.","example":"List of bad IPs","format":"nonempty","minLength":1,"type":"string"},"Security_Lists_API_ListPrivileges":{"type":"object","properties":{"application":{"additionalProperties":{"type":"boolean"},"type":"object"},"cluster":{"additionalProperties":{"type":"boolean"},"type":"object"},"has_all_requested":{"type":"boolean"},"index":{"additionalProperties":{"additionalProperties":{"type":"boolean"},"type":"object"},"type":"object"},"username":{"type":"string"}},"required":["username","has_all_requested","cluster","index","application"]},"Security_Lists_API_ListSerializer":{"description":"Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:\n\n- `(?\u003cvalue\u003e.+)` - Single value item types, such as ip, long, date, keyword, and text.\n- `(?\u003cgte\u003e.+)-(?\u003clte\u003e.+)|(?\u003cvalue\u003e.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.\n","example":"(?\u003cvalue\u003e((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))","type":"string"},"Security_Lists_API_ListType":{"description":"Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:\n\n- `keyword`: Many ECS fields are Elasticsearch keywords\n- `ip`: IP addresses\n- `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation)\n","enum":["binary","boolean","byte","date","date_nanos","date_range","double","double_range","float","float_range","geo_point","geo_shape","half_float","integer","integer_range","ip","ip_range","keyword","long","long_range","shape","short","text"],"type":"string"},"Security_Lists_API_ListVersion":{"description":"The document version number.","example":1,"minimum":1,"type":"integer"},"Security_Lists_API_ListVersionId":{"description":"The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version.\n","example":"WzIsMV0=","type":"string"},"Security_Lists_API_PlatformErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}},"required":["statusCode","error","message"]},"Security_Lists_API_SiemErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","message"]},"Security_Osquery_API_ArrayQueries":{"description":"An array of queries to run.","items":{"$ref":"#/components/schemas/Security_Osquery_API_ArrayQueriesItem"},"type":"array"},"Security_Osquery_API_ArrayQueriesItem":{"type":"object","properties":{"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"id":{"$ref":"#/components/schemas/Security_Osquery_API_QueryId"},"platform":{"$ref":"#/components/schemas/Security_Osquery_API_PlatformOrUndefined"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_Query"},"removed":{"$ref":"#/components/schemas/Security_Osquery_API_RemovedOrUndefined"},"snapshot":{"$ref":"#/components/schemas/Security_Osquery_API_SnapshotOrUndefined"},"version":{"$ref":"#/components/schemas/Security_Osquery_API_VersionOrUndefined"}}},"Security_Osquery_API_CreateLiveQueryRequestBody":{"example":{"agent_all":true,"ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"query":"select * from uptime;"},"type":"object","properties":{"agent_all":{"description":"When `true`, the query runs on all agents.","type":"boolean"},"agent_ids":{"description":"A list of agent IDs to run the query on.","items":{"type":"string"},"type":"array"},"agent_platforms":{"description":"A list of agent platforms to run the query on.","items":{"type":"string"},"type":"array"},"agent_policy_ids":{"description":"A list of agent policy IDs to run the query on.","items":{"type":"string"},"type":"array"},"alert_ids":{"description":"A list of alert IDs associated with the live query.","items":{"type":"string"},"type":"array"},"case_ids":{"description":"A list of case IDs associated with the live query.","items":{"type":"string"},"type":"array"},"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"event_ids":{"description":"A list of event IDs associated with the live query.","items":{"type":"string"},"type":"array"},"metadata":{"description":"Custom metadata object associated with the live query.","nullable":true,"type":"object"},"pack_id":{"$ref":"#/components/schemas/Security_Osquery_API_PackIdOrUndefined"},"queries":{"$ref":"#/components/schemas/Security_Osquery_API_ArrayQueries"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_QueryOrUndefined"},"saved_query_id":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryIdOrUndefined"}}},"Security_Osquery_API_CreateLiveQueryResponse":{"example":{"data":{"@timestamp":"2022-07-26T09:59:32.220Z","action_id":"3c42c847-eb30-4452-80e0-728584042334","agent_all":true,"agent_ids":[],"agent_platforms":[],"agent_policy_ids":[],"agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"expiration":"2022-07-26T10:04:32.220Z","input_type":"osquery","metadata":{"execution_context":{"name":"osquery","url":"/app/osquery/live_queries/new"}},"queries":[{"action_id":"609c4c66-ba3d-43fa-afdd-53e244577aa0","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"6724a474-cbba-41ef-a1aa-66aebf0879e2","query":"select * from uptime;","timeout":120}],"type":"INPUT_ACTION","user_id":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_CreatePacksRequestBody":{"example":{"description":"My pack","enabled":true,"name":"my_pack","policy_ids":["my_policy_id","fleet-server-policy"],"queries":{"my_query":{"ecs_mapping":{"client.port":{"field":"port"},"tags":{"value":["tag1","tag2"]}},"interval":60,"query":"SELECT * FROM listening_ports;","timeout":120}},"shards":{"fleet-server-policy":58,"my_policy_id":35}},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Osquery_API_PackDescriptionOrUndefined"},"enabled":{"$ref":"#/components/schemas/Security_Osquery_API_EnabledOrUndefined"},"name":{"$ref":"#/components/schemas/Security_Osquery_API_PackName"},"policy_ids":{"$ref":"#/components/schemas/Security_Osquery_API_PolicyIdsOrUndefined"},"queries":{"$ref":"#/components/schemas/Security_Osquery_API_ObjectQueries"},"shards":{"$ref":"#/components/schemas/Security_Osquery_API_Shards"}}},"Security_Osquery_API_CreatePacksResponse":{"example":{"data":{"created_at":"2025-02-26T13:37:30.452Z","created_by":"elastic","description":"My pack","enabled":true,"name":"my_pack","queries":{"ports":{"ecs_mapping":{"client.port":{"field":"port"}},"interval":60,"query":"SELECT * FROM listening_ports;","removed":false,"snapshot":true,"timeout":120}},"saved_object_id":"1c266590-381f-428c-878f-c80c1334f856","shards":[{"key":"47638692-7c4c-4053-aa3e-7186f28df349","value":35},{"key":"5e267651-fe50-443e-8d3f-3bbc9171b618","value":58}],"updated_at":"2025-02-26T13:37:30.452Z","updated_by":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_CreateSavedQueryRequestBody":{"example":{"description":"Saved query description","ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"saved_query_id","interval":"60","platform":"linux,darwin","query":"select * from uptime;","timeout":120,"version":"2.8.0"},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryDescriptionOrUndefined"},"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"id":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"},"interval":{"$ref":"#/components/schemas/Security_Osquery_API_Interval"},"platform":{"$ref":"#/components/schemas/Security_Osquery_API_PlatformOrUndefined"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_QueryOrUndefined"},"removed":{"$ref":"#/components/schemas/Security_Osquery_API_RemovedOrUndefined"},"snapshot":{"$ref":"#/components/schemas/Security_Osquery_API_SnapshotOrUndefined"},"version":{"$ref":"#/components/schemas/Security_Osquery_API_VersionOrUndefined"}}},"Security_Osquery_API_CreateSavedQueryResponse":{"example":{"data":{}},"type":"object","properties":{}},"Security_Osquery_API_DefaultSuccessResponse":{"type":"object","properties":{}},"Security_Osquery_API_ECSMapping":{"additionalProperties":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingItem"},"description":"Map osquery results columns or static values to Elastic Common Schema (ECS) fields","example":{"host.uptime":{"field":"total_seconds"}},"type":"object"},"Security_Osquery_API_ECSMappingItem":{"type":"object","properties":{"field":{"description":"The ECS field to map to.","example":"host.uptime","type":"string"},"value":{"description":"The value to map to the ECS field.","example":"total_seconds","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}}},"Security_Osquery_API_ECSMappingOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMapping","nullable":true},"Security_Osquery_API_Enabled":{"description":"Enables the pack.","example":true,"type":"boolean"},"Security_Osquery_API_EnabledOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Enabled","nullable":true},"Security_Osquery_API_FindLiveQueryDetailsResponse":{"example":{"data":{"@timestamp":"2022-07-26T09:59:32.220Z","action_id":"3c42c847-eb30-4452-80e0-728584042334","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"expiration":"2022-07-26T10:04:32.220Z","queries":[{"action_id":"609c4c66-ba3d-43fa-afdd-53e244577aa0","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"docs":0,"ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"failed":1,"id":"6724a474-cbba-41ef-a1aa-66aebf0879e2","pending":0,"query":"select * from uptime;","responded":1,"saved_query_id":"42ba9c50-0cc5-11ed-aa1d-2b27890bc90d","status":"completed","successful":0}],"status":"completed","user_id":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_FindLiveQueryResponse":{"example":{"data":{"items":[{"fields":{"@timestamp":"2023-10-31T00:00:00Z","action_id":"3c42c847-eb30-4452-80e0-728584042334","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"expiration":"2023-10-31T00:00:00Z","queries":[{"action_id":"609c4c66-ba3d-43fa-afdd-53e244577aa0","agents":["16d7caf5-efd2-4212-9b62-73dafc91fa13"],"ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"6724a474-cbba-41ef-a1aa-66aebf0879e2","query":"select * from uptime;","saved_query_id":"42ba9c50-0cc5-11ed-aa1d-2b27890bc90d"}],"user_id":"elastic"}}]}},"type":"object","properties":{}},"Security_Osquery_API_FindPackResponse":{"example":{"data":{"created_at":"2022-07-25T19:41:10.263Z","created_by":"elastic","description":"","enabled":true,"id":"3c42c847-eb30-4452-80e0-728584042334","name":"test_pack","namespaces":["default"],"policy_ids":[],"queries":{"uptime":{"ecs_mapping":{"message":{"field":"days"}},"interval":3600,"query":"select * from uptime"}},"read_only":false,"type":"osquery-pack","updated_at":"2022-07-25T20:12:01.455Z","updated_by":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_FindPacksResponse":{"example":{"data":[{"attributes":{"created_at":"2023-10-31T00:00:00Z","created_by":"elastic","description":"My pack description","enabled":true,"name":"My Pack","queries":[{"ecs_mapping":[{"host.uptime":{"field":"total_seconds"}}],"id":"uptime","interval":"3600","query":"select * from uptime;"}],"updated_at":"2023-10-31T00:00:00Z","updated_by":"elastic"},"id":"42ba9c50-0cc5-11ed-aa1d-2b27890bc90d","namespaces":["default"],"type":"osquery-pack"}],"page":1,"pageSize":10,"policy_ids":[],"total":1},"type":"object","properties":{}},"Security_Osquery_API_FindSavedQueryDetailResponse":{"example":{"data":{"attributes":{"created_at":"2022-07-26T09:28:08.597Z","created_by":"elastic","description":"Saved query description","ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"saved_query_id","interval":"60","platform":"linux,darwin","prebuilt":false,"query":"select * from uptime;","updated_at":"2022-07-26T09:28:08.597Z","updated_by":"elastic","version":"2.8.0"},"coreMigrationVersion":"8.4.0","id":"3c42c847-eb30-4452-80e0-728584042334","namespaces":["default"],"references":[],"type":"osquery-saved-query","updated_at":"2022-07-26T09:28:08.600Z","version":"WzQzMTcsMV0="}},"type":"object","properties":{}},"Security_Osquery_API_FindSavedQueryResponse":{"example":{"data":[{"attributes":{"created_at":"2022-07-26T09:28:08.597Z","created_by":"elastic","description":"Saved query description","ecs_mapping":{"host.uptime":{"field":"total_seconds"}},"id":"saved_query_id","interval":"60","platform":"linux,darwin","prebuilt":false,"query":"select * from uptime;","updated_at":"2022-07-26T09:28:08.597Z","updated_by":"elastic","version":"2.8.0"},"id":"42ba9c50-0cc5-11ed-aa1d-2b27890bc90d","namespaces":["default"],"type":"osquery-saved-query"}],"page":1,"per_page":100,"total":11},"type":"object","properties":{}},"Security_Osquery_API_GetLiveQueryResultsResponse":{"description":"The response for getting live query results.","example":{"data":{"edges":[{},{}],"total":2}},"type":"object","properties":{}},"Security_Osquery_API_Interval":{"description":"An interval, in seconds, on which to run the query.","example":"60","type":"string"},"Security_Osquery_API_IntervalOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Interval","nullable":true},"Security_Osquery_API_KueryOrUndefined":{"description":"The kuery to filter the results by.","example":"agent.id: 16d7caf5-efd2-4212-9b62-73dafc91fa13","nullable":true,"type":"string"},"Security_Osquery_API_ObjectQueries":{"additionalProperties":{"$ref":"#/components/schemas/Security_Osquery_API_ObjectQueriesItem"},"description":"An object of queries.","type":"object"},"Security_Osquery_API_ObjectQueriesItem":{"type":"object","properties":{"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"id":{"$ref":"#/components/schemas/Security_Osquery_API_QueryId"},"platform":{"$ref":"#/components/schemas/Security_Osquery_API_PlatformOrUndefined"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_Query"},"removed":{"$ref":"#/components/schemas/Security_Osquery_API_RemovedOrUndefined"},"saved_query_id":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryIdOrUndefined"},"snapshot":{"$ref":"#/components/schemas/Security_Osquery_API_SnapshotOrUndefined"},"version":{"$ref":"#/components/schemas/Security_Osquery_API_VersionOrUndefined"}}},"Security_Osquery_API_PackDescription":{"description":"The pack description.","example":"Pack description","type":"string"},"Security_Osquery_API_PackDescriptionOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_PackDescription","nullable":true},"Security_Osquery_API_PackId":{"description":"The ID of the pack you want to run, retrieve, update, or delete.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"},"Security_Osquery_API_PackIdOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_PackId","nullable":true},"Security_Osquery_API_PackName":{"description":"The pack name.","type":"string"},"Security_Osquery_API_PageOrUndefined":{"description":"The page number to return. The default is 1.","example":1,"nullable":true,"type":"integer"},"Security_Osquery_API_PageSizeOrUndefined":{"description":"The number of results to return per page. The default is 20.","example":20,"nullable":true,"type":"integer"},"Security_Osquery_API_Platform":{"description":"Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, `linux,darwin`.","example":"linux,darwin","type":"string"},"Security_Osquery_API_PlatformOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Platform","nullable":true},"Security_Osquery_API_PolicyIds":{"description":"A list of agents policy IDs.","example":["policyId1","policyId2"],"items":{"type":"string"},"type":"array"},"Security_Osquery_API_PolicyIdsOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_PolicyIds","nullable":true},"Security_Osquery_API_Query":{"description":"The SQL query you want to run.","example":"select * from uptime;","type":"string"},"Security_Osquery_API_QueryId":{"description":"The ID of the query.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"},"Security_Osquery_API_QueryOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Query","nullable":true},"Security_Osquery_API_Removed":{"description":"Indicates whether the query is removed.","example":false,"type":"boolean"},"Security_Osquery_API_RemovedOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Removed","nullable":true},"Security_Osquery_API_SavedQueryDescription":{"description":"The saved query description.","example":"Saved query description","type":"string"},"Security_Osquery_API_SavedQueryDescriptionOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryDescription","nullable":true},"Security_Osquery_API_SavedQueryId":{"description":"The ID of a saved query.","example":"3c42c847-eb30-4452-80e0-728584042334","type":"string"},"Security_Osquery_API_SavedQueryIdOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId","nullable":true},"Security_Osquery_API_Shards":{"additionalProperties":{"type":"number"},"description":"An object with shard configuration for policies included in the pack. For each policy, set the shard configuration to a percentage (1–100) of target hosts.","example":{"policy_id":50},"type":"object"},"Security_Osquery_API_Snapshot":{"description":"Indicates whether the query is a snapshot.","example":true,"type":"boolean"},"Security_Osquery_API_SnapshotOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Snapshot","nullable":true},"Security_Osquery_API_SortOrderOrUndefined":{"description":"Specifies the sort order.","enum":["asc","desc"],"example":"desc","type":"string"},"Security_Osquery_API_SortOrUndefined":{"default":"createdAt","description":"The field that is used to sort the results.","example":"createdAt","nullable":true,"type":"string"},"Security_Osquery_API_UpdatePacksRequestBody":{"example":{"name":"updated_my_pack_name"},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Osquery_API_PackDescriptionOrUndefined"},"enabled":{"$ref":"#/components/schemas/Security_Osquery_API_EnabledOrUndefined"},"name":{"$ref":"#/components/schemas/Security_Osquery_API_PackName"},"policy_ids":{"$ref":"#/components/schemas/Security_Osquery_API_PolicyIdsOrUndefined"},"queries":{"$ref":"#/components/schemas/Security_Osquery_API_ObjectQueries"},"shards":{"$ref":"#/components/schemas/Security_Osquery_API_Shards"}}},"Security_Osquery_API_UpdatePacksResponse":{"example":{"data":{"created_at":"2025-02-26T13:37:30.452Z","created_by":"elastic","description":"My pack","enabled":true,"name":"updated_my_pack_name","queries":{"ports":{"ecs_mapping":{"client.port":{"field":"port"}},"interval":60,"query":"SELECT * FROM listening_ports;","removed":false,"snapshot":true,"timeout":120}},"saved_object_id":"1c266590-381f-428c-878f-c80c1334f856","shards":[{"key":"47638692-7c4c-4053-aa3e-7186f28df349","value":35},{"key":"5e267651-fe50-443e-8d3f-3bbc9171b618","value":58}],"updated_at":"2025-02-26T13:40:16.297Z","updated_by":"elastic"}},"type":"object","properties":{}},"Security_Osquery_API_UpdateSavedQueryRequestBody":{"example":{"id":"updated_my_saved_query_name"},"type":"object","properties":{"description":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryDescriptionOrUndefined"},"ecs_mapping":{"$ref":"#/components/schemas/Security_Osquery_API_ECSMappingOrUndefined"},"id":{"$ref":"#/components/schemas/Security_Osquery_API_SavedQueryId"},"interval":{"$ref":"#/components/schemas/Security_Osquery_API_IntervalOrUndefined"},"platform":{"$ref":"#/components/schemas/Security_Osquery_API_PlatformOrUndefined"},"query":{"$ref":"#/components/schemas/Security_Osquery_API_QueryOrUndefined"},"removed":{"$ref":"#/components/schemas/Security_Osquery_API_RemovedOrUndefined"},"snapshot":{"$ref":"#/components/schemas/Security_Osquery_API_SnapshotOrUndefined"},"version":{"$ref":"#/components/schemas/Security_Osquery_API_VersionOrUndefined"}}},"Security_Osquery_API_UpdateSavedQueryResponse":{"example":{"data":{}},"type":"object","properties":{}},"Security_Osquery_API_Version":{"description":"Uses the Osquery versions greater than or equal to the specified version string.","example":"1.0.0","type":"string"},"Security_Osquery_API_VersionOrUndefined":{"$ref":"#/components/schemas/Security_Osquery_API_Version","nullable":true},"Security_Timeline_API_AssociatedFilterType":{"description":"Filter notes based on their association with a document or saved object.","enum":["all","document_only","saved_object_only","document_and_saved_object","orphan"],"type":"string"},"Security_Timeline_API_BareNote":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_NoteCreatedAndUpdatedMetadata"},{"type":"object","properties":{"eventId":{"description":"The `_id` of the associated event for this note.","example":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bc","nullable":true,"type":"string"},"note":{"description":"The text of the note","example":"This is an example text","nullable":true,"type":"string"},"timelineId":{"description":"The `savedObjectId` of the Timeline that this note is associated with","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","type":"string"}},"required":["timelineId"]}]},"Security_Timeline_API_BarePinnedEvent":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_PinnedEventCreatedAndUpdatedMetadata"},{"type":"object","properties":{"eventId":{"description":"The `_id` of the associated event for this pinned event.","example":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bc","type":"string"},"timelineId":{"description":"The `savedObjectId` of the timeline that this pinned event is associated with","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","type":"string"}},"required":["eventId","timelineId"]}]},"Security_Timeline_API_ColumnHeaderResult":{"type":"object","properties":{"aggregatable":{"nullable":true,"type":"boolean"},"category":{"nullable":true,"type":"string"},"columnHeaderType":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"example":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"string"},"indexes":{"items":{"type":"string"},"nullable":true,"type":"array"},"name":{"nullable":true,"type":"string"},"placeholder":{"nullable":true,"type":"string"},"searchable":{"nullable":true,"type":"boolean"},"type":{"nullable":true,"type":"string"}}},"Security_Timeline_API_DataProviderQueryMatch":{"type":"object","properties":{"enabled":{"nullable":true,"type":"boolean"},"excluded":{"nullable":true,"type":"boolean"},"id":{"nullable":true,"type":"string"},"kqlQuery":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"queryMatch":{"$ref":"#/components/schemas/Security_Timeline_API_QueryMatchResult","nullable":true},"type":{"$ref":"#/components/schemas/Security_Timeline_API_DataProviderType","nullable":true}}},"Security_Timeline_API_DataProviderResult":{"type":"object","properties":{"and":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_DataProviderQueryMatch"},"nullable":true,"type":"array"},"enabled":{"nullable":true,"type":"boolean"},"excluded":{"nullable":true,"type":"boolean"},"id":{"nullable":true,"type":"string"},"kqlQuery":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"queryMatch":{"$ref":"#/components/schemas/Security_Timeline_API_QueryMatchResult","nullable":true},"type":{"$ref":"#/components/schemas/Security_Timeline_API_DataProviderType","nullable":true}}},"Security_Timeline_API_DataProviderType":{"description":"The type of data provider.","enum":["default","template"],"type":"string"},"Security_Timeline_API_DocumentIds":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"Security_Timeline_API_FavoriteTimelineResponse":{"type":"object","properties":{"favorite":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_FavoriteTimelineResult"},"type":"array"},"savedObjectId":{"type":"string"},"templateTimelineId":{"nullable":true,"type":"string"},"templateTimelineVersion":{"nullable":true,"type":"number"},"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType"},"version":{"type":"string"}},"required":["savedObjectId","version"]},"Security_Timeline_API_FavoriteTimelineResult":{"description":"Indicates when and who marked a Timeline as a favorite.","example":{"favoriteDate":1741337636741,"userName":"elastic"},"type":"object","properties":{"favoriteDate":{"nullable":true,"type":"number"},"fullName":{"nullable":true,"type":"string"},"userName":{"nullable":true,"type":"string"}}},"Security_Timeline_API_FilterTimelineResult":{"example":{"meta":{"alias":"Custom filter name","disabled":false,"index":".alerts-security.alerts-default,logs-*","key":"@timestamp","negate":"false,","type":"exists","value":"exists"},"query":"{\"exists\":{\"field\":\"@timestamp\"}}"},"type":"object","properties":{"exists":{"nullable":true,"type":"string"},"match_all":{"nullable":true,"type":"string"},"meta":{"nullable":true,"type":"object","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"nullable":true,"type":"string"},"disabled":{"nullable":true,"type":"boolean"},"field":{"nullable":true,"type":"string"},"formattedValue":{"nullable":true,"type":"string"},"index":{"nullable":true,"type":"string"},"key":{"nullable":true,"type":"string"},"negate":{"nullable":true,"type":"boolean"},"params":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}}},"missing":{"nullable":true,"type":"string"},"query":{"nullable":true,"type":"string"},"range":{"nullable":true,"type":"string"},"script":{"nullable":true,"type":"string"}}},"Security_Timeline_API_GetNotesResult":{"type":"object","properties":{"notes":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"type":"array"},"totalCount":{"type":"number"}},"required":["totalCount","notes"]},"Security_Timeline_API_ImportTimelineResult":{"type":"object","properties":{"errors":{"description":"The list of failed Timeline imports","items":{"type":"object","properties":{"error":{"description":"The error containing the reason why the timeline could not be imported","type":"object","properties":{"message":{"description":"The reason why the timeline could not be imported","example":"Malformed JSON","type":"string"},"status_code":{"description":"The HTTP status code of the error","example":400,"type":"number"}}},"id":{"description":"The ID of the timeline that failed to import","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","type":"string"}}},"type":"array"},"success":{"description":"Indicates whether any of the Timelines were successfully imports","type":"boolean"},"success_count":{"description":"The amount of successfully imported/updated Timelines","example":99,"type":"number"},"timelines_installed":{"description":"The amount of successfully installed Timelines","example":80,"type":"number"},"timelines_updated":{"description":"The amount of successfully updated Timelines","example":19,"type":"number"}}},"Security_Timeline_API_ImportTimelines":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},{"type":"object","properties":{"eventNotes":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_BareNote"},"nullable":true,"type":"array"},"globalNotes":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_BareNote"},"nullable":true,"type":"array"},"pinnedEventIds":{"items":{"type":"string"},"nullable":true,"type":"array"},"savedObjectId":{"nullable":true,"type":"string"},"version":{"nullable":true,"type":"string"}},"required":["savedObjectId","version","pinnedEventIds","eventNotes","globalNotes"]}]},"Security_Timeline_API_Note":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_BareNote"},{"type":"object","properties":{"noteId":{"description":"The `savedObjectId` of the note","example":"709f99c6-89b6-4953-9160-35945c8e174e","type":"string"},"version":{"description":"The version of the note","example":"WzQ2LDFd","type":"string"}},"required":["noteId","version"]}]},"Security_Timeline_API_NoteCreatedAndUpdatedMetadata":{"type":"object","properties":{"created":{"description":"The time the note was created, using a 13-digit Epoch timestamp.","example":1587468588922,"nullable":true,"type":"number"},"createdBy":{"description":"The user who created the note.","example":"casetester","nullable":true,"type":"string"},"updated":{"description":"The last time the note was updated, using a 13-digit Epoch timestamp","example":1741344876825,"nullable":true,"type":"number"},"updatedBy":{"description":"The user who last updated the note","example":"casetester","nullable":true,"type":"string"}}},"Security_Timeline_API_PersistPinnedEventResponse":{"oneOf":[{"$ref":"#/components/schemas/Security_Timeline_API_PinnedEvent"},{"type":"object","properties":{"unpinned":{"description":"Indicates whether the event was successfully unpinned","type":"boolean"}},"required":["unpinned"]}]},"Security_Timeline_API_PersistTimelineResponse":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineResponse"},"Security_Timeline_API_PinnedEvent":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_BarePinnedEvent"},{"type":"object","properties":{"pinnedEventId":{"description":"The `savedObjectId` of this pinned event","example":"10r1929b-0af7-42bd-85a8-56e234f98h2f3","type":"string"},"version":{"description":"The version of this pinned event","example":"WzQ2LDFe","type":"string"}},"required":["pinnedEventId","version"]}]},"Security_Timeline_API_PinnedEventCreatedAndUpdatedMetadata":{"type":"object","properties":{"created":{"description":"The time the pinned event was created, using a 13-digit Epoch timestamp.","example":1587468588922,"nullable":true,"type":"number"},"createdBy":{"description":"The user who created the pinned event.","example":"casetester","nullable":true,"type":"string"},"updated":{"description":"The last time the pinned event was updated, using a 13-digit Epoch timestamp","example":1741344876825,"nullable":true,"type":"number"},"updatedBy":{"description":"The user who last updated the pinned event","example":"casetester","nullable":true,"type":"string"}}},"Security_Timeline_API_QueryMatchResult":{"type":"object","properties":{"displayField":{"nullable":true,"type":"string"},"displayValue":{"nullable":true,"type":"string"},"field":{"nullable":true,"type":"string"},"operator":{"nullable":true,"type":"string"},"value":{"oneOf":[{"nullable":true,"type":"string"},{"items":{"type":"string"},"nullable":true,"type":"array"}]}}},"Security_Timeline_API_ResolvedTimeline":{"type":"object","properties":{"alias_purpose":{"$ref":"#/components/schemas/Security_Timeline_API_SavedObjectResolveAliasPurpose"},"alias_target_id":{"type":"string"},"outcome":{"$ref":"#/components/schemas/Security_Timeline_API_SavedObjectResolveOutcome"},"timeline":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineSavedToReturnObject"}},"required":["timeline","outcome"]},"Security_Timeline_API_ResponseNote":{"type":"object","properties":{"note":{"$ref":"#/components/schemas/Security_Timeline_API_Note"}},"required":["note"]},"Security_Timeline_API_RowRendererId":{"description":"Identifies the available row renderers","enum":["alert","alerts","auditd","auditd_file","library","netflow","plain","registry","suricata","system","system_dns","system_endgame_process","system_file","system_fim","system_security_event","system_socket","threat_match","zeek"],"type":"string"},"Security_Timeline_API_SavedObjectIds":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"Security_Timeline_API_SavedObjectResolveAliasPurpose":{"enum":["savedObjectConversion","savedObjectImport"],"type":"string"},"Security_Timeline_API_SavedObjectResolveOutcome":{"enum":["exactMatch","aliasMatch","conflict"],"type":"string"},"Security_Timeline_API_SavedTimeline":{"type":"object","properties":{"columns":{"description":"The Timeline's columns","example":[{"columnHeaderType":"not-filtered","id":"@timestamp"},{"columnHeaderType":"not-filtered","id":"event.category"}],"items":{"$ref":"#/components/schemas/Security_Timeline_API_ColumnHeaderResult"},"nullable":true,"type":"array"},"created":{"description":"The time the Timeline was created, using a 13-digit Epoch timestamp.","example":1587468588922,"nullable":true,"type":"number"},"createdBy":{"description":"The user who created the Timeline.","example":"casetester","nullable":true,"type":"string"},"dataProviders":{"description":"Object containing query clauses","example":[{"enabled":true,"excluded":false,"id":"id-d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bcbf66f57d124dcc739c98e6b","name":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bcbf66f57d124dcc739c98e6b","queryMatch":{"field":"_id,","operator":":","value":"d3a1d35a3e84a81b2f8f3859e064c224cdee1b4bcbf66f57d124dcc739c98e6b,"}}],"items":{"$ref":"#/components/schemas/Security_Timeline_API_DataProviderResult"},"nullable":true,"type":"array"},"dataViewId":{"description":"ID of the Timeline's Data View","example":"security-solution-default","nullable":true,"type":"string"},"dateRange":{"description":"The Timeline's search period.","example":{"end":1587456479201,"start":1587370079200},"nullable":true,"type":"object","properties":{"end":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"number"}]},"start":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"number"}]}}},"description":{"description":"The Timeline's description","example":"Investigating exposure of CVE XYZ","nullable":true,"type":"string"},"eqlOptions":{"description":"EQL query that is used in the correlation tab","example":{"eventCategoryField":"event.category","query":"sequence\\n[process where process.name == \"sudo\"]\\n[any where true]","size":100,"timestampField":"@timestamp"},"nullable":true,"type":"object","properties":{"eventCategoryField":{"nullable":true,"type":"string"},"query":{"nullable":true,"type":"string"},"size":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"number"}]},"tiebreakerField":{"nullable":true,"type":"string"},"timestampField":{"nullable":true,"type":"string"}}},"eventType":{"deprecated":true,"description":"Event types displayed in the Timeline","example":"all","nullable":true,"type":"string"},"excludedRowRendererIds":{"description":"A list of row renderers that should not be used when in `Event renderers` mode","items":{"$ref":"#/components/schemas/Security_Timeline_API_RowRendererId"},"nullable":true,"type":"array"},"favorite":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_FavoriteTimelineResult"},"nullable":true,"type":"array"},"filters":{"description":"A list of filters that should be applied to the query","items":{"$ref":"#/components/schemas/Security_Timeline_API_FilterTimelineResult"},"nullable":true,"type":"array"},"indexNames":{"description":"A list of index names to use in the query (e.g. when the default data view has been modified)","example":[".logs*"],"items":{"type":"string"},"nullable":true,"type":"array"},"kqlMode":{"description":"Indicates whether the KQL bar filters the query results or searches for additional results, where:\n * `filter`: filters query results\n * `search`: displays additional search results","example":"search","nullable":true,"type":"string"},"kqlQuery":{"$ref":"#/components/schemas/Security_Timeline_API_SerializedFilterQueryResult","nullable":true},"savedQueryId":{"description":"The ID of the saved query that might be used in the Query tab","example":"c7b16904-02d7-4f32-b8f2-cc20f9625d6e","nullable":true,"type":"string"},"savedSearchId":{"description":"The ID of the saved search that is used in the ES|QL tab","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","nullable":true,"type":"string"},"sort":{"$ref":"#/components/schemas/Security_Timeline_API_Sort","nullable":true},"status":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineStatus","nullable":true},"templateTimelineId":{"description":"A unique ID (UUID) for Timeline templates. For Timelines, the value is `null`.","example":"6ce1b592-84e3-4b4a-9552-f189d4b82075","nullable":true,"type":"string"},"templateTimelineVersion":{"description":"Timeline template version number. For Timelines, the value is `null`.","example":12,"nullable":true,"type":"number"},"timelineType":{"$ref":"#/components/schemas/Security_Timeline_API_TimelineType","nullable":true},"title":{"description":"The Timeline's title.","example":"CVE XYZ investigation","nullable":true,"type":"string"},"updated":{"description":"The last time the Timeline was updated, using a 13-digit Epoch timestamp","example":1741344876825,"nullable":true,"type":"number"},"updatedBy":{"description":"The user who last updated the Timeline","example":"casetester","nullable":true,"type":"string"}}},"Security_Timeline_API_SavedTimelineWithSavedObjectId":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},{"type":"object","properties":{"savedObjectId":{"description":"The `savedObjectId` of the Timeline or Timeline template","example":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","type":"string"},"version":{"description":"The version of the Timeline or Timeline template","example":"WzE0LDFd","type":"string"}},"required":["savedObjectId","version"]}]},"Security_Timeline_API_SerializedFilterQueryResult":{"description":"KQL bar query.","example":{"filterQuery":null,"kuery":{"expression":"_id : *","kind":"kuery"},"serializedQuery":"{\"bool\":{\"should\":[{\"exists\":{\"field\":\"_id\"}}],\"minimum_should_match\":1}}"},"type":"object","properties":{"filterQuery":{"nullable":true,"type":"object","properties":{"kuery":{"nullable":true,"type":"object","properties":{"expression":{"nullable":true,"type":"string"},"kind":{"nullable":true,"type":"string"}}},"serializedQuery":{"nullable":true,"type":"string"}}}}},"Security_Timeline_API_Sort":{"oneOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SortObject"},{"items":{"$ref":"#/components/schemas/Security_Timeline_API_SortObject"},"type":"array"}]},"Security_Timeline_API_SortFieldTimeline":{"description":"The field to sort the timelines by.","enum":["title","description","updated","created"],"type":"string"},"Security_Timeline_API_SortObject":{"description":"Object indicating how rows are sorted in the Timeline's grid","example":{"columnId":"@timestamp","sortDirection":"desc"},"type":"object","properties":{"columnId":{"nullable":true,"type":"string"},"columnType":{"nullable":true,"type":"string"},"sortDirection":{"nullable":true,"type":"string"}}},"Security_Timeline_API_TimelineResponse":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimelineWithSavedObjectId"},{"type":"object","properties":{"eventIdToNoteIds":{"description":"A list of all the notes that are associated to this Timeline.","items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"nullable":true,"type":"array"},"noteIds":{"description":"A list of all the ids of notes that are associated to this Timeline.","example":["709f99c6-89b6-4953-9160-35945c8e174e"],"items":{"type":"string"},"nullable":true,"type":"array"},"notes":{"description":"A list of all the notes that are associated to this Timeline.","items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"nullable":true,"type":"array"},"pinnedEventIds":{"description":"A list of all the ids of pinned events that are associated to this Timeline.","example":["983f99c6-89b6-4953-9160-35945c8a194f"],"items":{"type":"string"},"nullable":true,"type":"array"},"pinnedEventsSaveObject":{"description":"A list of all the pinned events that are associated to this Timeline.","items":{"$ref":"#/components/schemas/Security_Timeline_API_PinnedEvent"},"nullable":true,"type":"array"}}}]},"Security_Timeline_API_TimelineSavedToReturnObject":{"allOf":[{"$ref":"#/components/schemas/Security_Timeline_API_SavedTimeline"},{"type":"object","properties":{"eventIdToNoteIds":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"nullable":true,"type":"array"},"noteIds":{"items":{"type":"string"},"nullable":true,"type":"array"},"notes":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_Note"},"nullable":true,"type":"array"},"pinnedEventIds":{"items":{"type":"string"},"nullable":true,"type":"array"},"pinnedEventsSaveObject":{"items":{"$ref":"#/components/schemas/Security_Timeline_API_PinnedEvent"},"nullable":true,"type":"array"},"savedObjectId":{"type":"string"},"version":{"type":"string"}},"required":["savedObjectId","version"]}]},"Security_Timeline_API_TimelineStatus":{"description":"The status of the Timeline.","enum":["active","draft","immutable"],"type":"string"},"Security_Timeline_API_TimelineType":{"description":"The type of Timeline.","enum":["default","template"],"type":"string"},"Short_URL_APIs_urlResponse":{"type":"object","properties":{"accessCount":{"type":"integer"},"accessDate":{"type":"string"},"createDate":{"type":"string"},"id":{"description":"The identifier for the short URL.","type":"string"},"locator":{"type":"object","properties":{"id":{"description":"The identifier for the locator.","type":"string"},"state":{"description":"The locator parameters.","type":"object"},"version":{"description":"The version of Kibana when the short URL was created.","type":"string"}}},"slug":{"description":"A random human-readable slug is automatically generated if the `humanReadableSlug` parameter is set to `true`. If it is set to `false`, a random short string is generated.\n","type":"string"}}},"SLOs_400_response":{"title":"Bad request","type":"object","properties":{"error":{"example":"Bad Request","type":"string"},"message":{"example":"Invalid value 'foo' supplied to: [...]","type":"string"},"statusCode":{"example":400,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_401_response":{"title":"Unauthorized","type":"object","properties":{"error":{"example":"Unauthorized","type":"string"},"message":{"example":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]","type":"string"},"statusCode":{"example":401,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_403_response":{"title":"Unauthorized","type":"object","properties":{"error":{"example":"Unauthorized","type":"string"},"message":{"example":"[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]","type":"string"},"statusCode":{"example":403,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_404_response":{"title":"Not found","type":"object","properties":{"error":{"example":"Not Found","type":"string"},"message":{"example":"SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found","type":"string"},"statusCode":{"example":404,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_409_response":{"title":"Conflict","type":"object","properties":{"error":{"example":"Conflict","type":"string"},"message":{"example":"SLO [d077e940-1515-11ee-9c50-9d096392f520] already exists","type":"string"},"statusCode":{"example":409,"type":"number"}},"required":["statusCode","error","message"]},"SLOs_budgeting_method":{"description":"The budgeting method to use when computing the rollup data.","enum":["occurrences","timeslices"],"example":"occurrences","title":"Budgeting method","type":"string"},"SLOs_bulk_delete_request":{"description":"The bulk delete SLO request takes a list of SLOs Definition id to delete.\n","properties":{"list":{"description":"An array of SLO Definition id","items":{"description":"The SLO Definition id","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"type":"array"}},"required":["list"],"title":"Bulk delete SLO request","type":"object"},"SLOs_bulk_delete_response":{"description":"The bulk delete SLO response returns a taskId that can be used to poll for its status\n","properties":{"taskId":{"description":"The taskId of the bulk delete operation","example":"d08506b7-f0e8-4f8b-a06a-a83940f4db91","type":"string"}},"title":"Bulk delete SLO response","type":"object"},"SLOs_bulk_delete_status_response":{"description":"Indicates if the bulk deletion is completed, with the detailed results of the operation.","properties":{"error":{"description":"The error message if the bulk deletion operation failed","example":"Task not found","type":"string"},"isDone":{"description":"Indicates if the bulk deletion operation is completed","example":true,"type":"boolean"},"results":{"description":"The results of the bulk deletion operation, including the success status and any errors for each SLO","items":{"type":"object","properties":{"error":{"description":"The error message if the deletion operation failed for this SLO","example":"SLO [d08506b7-f0e8-4f8b-a06a-a83940f4db91] not found","type":"string"},"id":{"description":"The ID of the SLO that was deleted","example":"d08506b7-f0e8-4f8b-a06a-a83940f4db91","type":"string"},"success":{"description":"The result of the deletion operation for this SLO","example":true,"type":"boolean"}}},"type":"array"}},"title":"The status of the bulk deletion","type":"object"},"SLOs_bulk_purge_rollup_request":{"description":"The bulk purge rollup data request takes a list of SLO ids and a purge policy, then deletes the rollup data according to the purge policy. This API can be used to remove the staled data of an instance SLO that no longer get updated.\n","properties":{"list":{"description":"An array of slo ids","items":{"description":"The SLO Definition id","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"type":"array"},"purgePolicy":{"description":"Policy that dictates which SLI documents to purge based on age","oneOf":[{"type":"object","properties":{"age":{"description":"The duration to determine which documents to purge, formatted as {duration}{unit}. This value should be greater than or equal to the time window of every SLO provided.","example":"7d","type":"string"},"purgeType":{"description":"Specifies whether documents will be purged based on a specific age or on a timestamp","enum":["fixed-age"],"type":"string"}}},{"type":"object","properties":{"purgeType":{"description":"Specifies whether documents will be purged based on a specific age or on a timestamp","enum":["fixed-time"],"type":"string"},"timestamp":{"description":"The timestamp to determine which documents to purge, formatted in ISO. This value should be older than the applicable time window of every SLO provided.","example":"2024-12-31T00:00:00.000Z","type":"string"}}}],"type":"object"}},"required":["list","purgePolicy"],"title":"Bulk Purge Rollup data request","type":"object"},"SLOs_bulk_purge_rollup_response":{"description":"The bulk purge rollup data response returns a task id from the elasticsearch deleteByQuery response.\n","properties":{"taskId":{"description":"The task id of the purge operation","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"}},"title":"Bulk Purge Rollup data response","type":"object"},"SLOs_create_slo_request":{"description":"The create SLO API request body varies depending on the type of indicator, time window and budgeting method.\n","properties":{"budgetingMethod":{"$ref":"#/components/schemas/SLOs_budgeting_method"},"description":{"description":"A description for the SLO.","type":"string"},"groupBy":{"$ref":"#/components/schemas/SLOs_group_by"},"id":{"description":"A optional and unique identifier for the SLO. Must be between 8 and 36 chars","example":"my-super-slo-id","type":"string"},"indicator":{"oneOf":[{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_kql"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_availability"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_latency"},{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_metric"},{"$ref":"#/components/schemas/SLOs_indicator_properties_histogram"},{"$ref":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"}]},"name":{"description":"A name for the SLO.","type":"string"},"objective":{"$ref":"#/components/schemas/SLOs_objective"},"settings":{"$ref":"#/components/schemas/SLOs_settings"},"tags":{"description":"List of tags","items":{"type":"string"},"type":"array"},"timeWindow":{"$ref":"#/components/schemas/SLOs_time_window"}},"required":["name","description","indicator","timeWindow","budgetingMethod","objective"],"title":"Create SLO request","type":"object"},"SLOs_create_slo_response":{"title":"Create SLO response","type":"object","properties":{"id":{"example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"}},"required":["id"]},"SLOs_delete_slo_instances_request":{"description":"The delete SLO instances request takes a list of SLO id and instance id, then delete the rollup and summary data. This API can be used to remove the staled data of an instance SLO that no longer get updated.\n","properties":{"list":{"description":"An array of slo id and instance id","items":{"type":"object","properties":{"instanceId":{"description":"The SLO instance identifier","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"sloId":{"description":"The SLO unique identifier","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"}},"required":["sloId","instanceId"]},"type":"array"}},"required":["list"],"title":"Delete SLO instances request","type":"object"},"SLOs_error_budget":{"title":"Error budget","type":"object","properties":{"consumed":{"description":"The error budget consummed, as a percentage of the initial value.","example":0.8,"type":"number"},"initial":{"description":"The initial error budget, as 1 - objective","example":0.02,"type":"number"},"isEstimated":{"description":"Only for SLO defined with occurrences budgeting method and calendar aligned time window.","example":true,"type":"boolean"},"remaining":{"description":"The error budget remaining, as a percentage of the initial value.","example":0.2,"type":"number"}},"required":["initial","consumed","remaining","isEstimated"]},"SLOs_filter":{"description":"Defines properties for a filter","properties":{"meta":{"$ref":"#/components/schemas/SLOs_filter_meta"},"query":{"type":"object"}},"title":"Filter","type":"object"},"SLOs_filter_meta":{"description":"Defines properties for a filter","properties":{"alias":{"nullable":true,"type":"string"},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{"type":"object"},"type":{"type":"string"},"value":{"type":"string"}},"title":"FilterMeta","type":"object"},"SLOs_find_slo_definitions_response":{"description":"A paginated response of SLO definitions matching the query.\n","oneOf":[{"type":"object","properties":{"page":{"example":1,"type":"number"},"perPage":{"example":25,"type":"number"},"results":{"items":{"$ref":"#/components/schemas/SLOs_slo_with_summary_response"},"type":"array"},"total":{"example":34,"type":"number"}}},{"type":"object","properties":{"page":{"default":1,"description":"for backward compability","type":"number"},"perPage":{"description":"for backward compability","example":25,"type":"number"},"results":{"items":{"$ref":"#/components/schemas/SLOs_slo_with_summary_response"},"type":"array"},"searchAfter":{"description":"the cursor to provide to get the next paged results","example":["some-slo-id","other-cursor-id"],"items":{"type":"string"},"type":"array"},"size":{"example":25,"type":"number"},"total":{"example":34,"type":"number"}}}],"title":"Find SLO definitions response","type":"object"},"SLOs_find_slo_response":{"description":"A paginated response of SLOs matching the query.\n","properties":{"page":{"example":1,"type":"number"},"perPage":{"example":25,"type":"number"},"results":{"items":{"$ref":"#/components/schemas/SLOs_slo_with_summary_response"},"type":"array"},"searchAfter":{"type":"string"},"size":{"description":"Size provided for cursor based pagination","example":25,"type":"number"},"total":{"example":34,"type":"number"}},"title":"Find SLO response","type":"object"},"SLOs_group_by":{"description":"optional group by field or fields to use to generate an SLO per distinct value","example":[["service.name"],"service.name",["service.name","service.environment"]],"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Group by"},"SLOs_indicator_properties_apm_availability":{"description":"Defines properties for the APM availability indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"environment":{"description":"The APM service environment or \"*\"","example":"production","type":"string"},"filter":{"description":"KQL query used for filtering the data","example":"service.foo : \"bar\"","type":"string"},"index":{"description":"The index used by APM metrics","example":"metrics-apm*,apm*","type":"string"},"service":{"description":"The APM service name","example":"o11y-app","type":"string"},"transactionName":{"description":"The APM transaction name or \"*\"","example":"GET /my/api","type":"string"},"transactionType":{"description":"The APM transaction type or \"*\"","example":"request","type":"string"}},"required":["service","environment","transactionType","transactionName","index"]},"type":{"description":"The type of indicator.","example":"sli.apm.transactionDuration","type":"string"}},"required":["type","params"],"title":"APM availability"},"SLOs_indicator_properties_apm_latency":{"description":"Defines properties for the APM latency indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"environment":{"description":"The APM service environment or \"*\"","example":"production","type":"string"},"filter":{"description":"KQL query used for filtering the data","example":"service.foo : \"bar\"","type":"string"},"index":{"description":"The index used by APM metrics","example":"metrics-apm*,apm*","type":"string"},"service":{"description":"The APM service name","example":"o11y-app","type":"string"},"threshold":{"description":"The latency threshold in milliseconds","example":250,"type":"number"},"transactionName":{"description":"The APM transaction name or \"*\"","example":"GET /my/api","type":"string"},"transactionType":{"description":"The APM transaction type or \"*\"","example":"request","type":"string"}},"required":["service","environment","transactionType","transactionName","index","threshold"]},"type":{"description":"The type of indicator.","example":"sli.apm.transactionDuration","type":"string"}},"required":["type","params"],"title":"APM latency"},"SLOs_indicator_properties_custom_kql":{"description":"Defines properties for a custom query indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"dataViewId":{"description":"The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.","example":"03b80ab3-003d-498b-881c-3beedbaf1162","type":"string"},"filter":{"$ref":"#/components/schemas/SLOs_kql_with_filters"},"good":{"$ref":"#/components/schemas/SLOs_kql_with_filters_good"},"index":{"description":"The index or index pattern to use","example":"my-service-*","type":"string"},"timestampField":{"description":"The timestamp field used in the source indice.\n","example":"timestamp","type":"string"},"total":{"$ref":"#/components/schemas/SLOs_kql_with_filters_total"}},"required":["index","timestampField","good","total"]},"type":{"description":"The type of indicator.","example":"sli.kql.custom","type":"string"}},"required":["type","params"],"title":"Custom Query"},"SLOs_indicator_properties_custom_metric":{"description":"Defines properties for a custom metric indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"dataViewId":{"description":"The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.","example":"03b80ab3-003d-498b-881c-3beedbaf1162","type":"string"},"filter":{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},"good":{"description":"An object defining the \"good\" metrics and equation\n","type":"object","properties":{"equation":{"description":"The equation to calculate the \"good\" metric.","example":"A","type":"string"},"metrics":{"description":"List of metrics with their name, aggregation type, and field.","items":{"oneOf":[{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["sum"],"example":"sum","type":"string"},"field":{"description":"The field of the metric.","example":"processor.processed","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: *","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation","field"]},{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["doc_count"],"example":"doc_count","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: *","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation"]}]},"type":"array"}},"required":["metrics","equation"]},"index":{"description":"The index or index pattern to use","example":"my-service-*","type":"string"},"timestampField":{"description":"The timestamp field used in the source indice.\n","example":"timestamp","type":"string"},"total":{"description":"An object defining the \"total\" metrics and equation\n","type":"object","properties":{"equation":{"description":"The equation to calculate the \"total\" metric.","example":"A","type":"string"},"metrics":{"description":"List of metrics with their name, aggregation type, and field.","items":{"oneOf":[{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["sum"],"example":"sum","type":"string"},"field":{"description":"The field of the metric.","example":"processor.processed","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: *","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation","field"]},{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["doc_count"],"example":"doc_count","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: *","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation"]}]},"type":"array"}},"required":["metrics","equation"]}},"required":["index","timestampField","good","total"]},"type":{"description":"The type of indicator.","example":"sli.metric.custom","type":"string"}},"required":["type","params"],"title":"Custom metric"},"SLOs_indicator_properties_histogram":{"description":"Defines properties for a histogram indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"dataViewId":{"description":"The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.","example":"03b80ab3-003d-498b-881c-3beedbaf1162","type":"string"},"filter":{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},"good":{"description":"An object defining the \"good\" events\n","type":"object","properties":{"aggregation":{"description":"The type of aggregation to use.","enum":["value_count","range"],"example":"value_count","type":"string"},"field":{"description":"The field use to aggregate the good events.","example":"processor.latency","type":"string"},"filter":{"description":"The filter for good events.","example":"processor.outcome: \"success\"","type":"string"},"from":{"description":"The starting value of the range. Only required for \"range\" aggregations.","example":0,"type":"number"},"to":{"description":"The ending value of the range. Only required for \"range\" aggregations.","example":100,"type":"number"}},"required":["aggregation","field"]},"index":{"description":"The index or index pattern to use","example":"my-service-*","type":"string"},"timestampField":{"description":"The timestamp field used in the source indice.\n","example":"timestamp","type":"string"},"total":{"description":"An object defining the \"total\" events\n","type":"object","properties":{"aggregation":{"description":"The type of aggregation to use.","enum":["value_count","range"],"example":"value_count","type":"string"},"field":{"description":"The field use to aggregate the good events.","example":"processor.latency","type":"string"},"filter":{"description":"The filter for total events.","example":"processor.outcome : *","type":"string"},"from":{"description":"The starting value of the range. Only required for \"range\" aggregations.","example":0,"type":"number"},"to":{"description":"The ending value of the range. Only required for \"range\" aggregations.","example":100,"type":"number"}},"required":["aggregation","field"]}},"required":["index","timestampField","good","total"]},"type":{"description":"The type of indicator.","example":"sli.histogram.custom","type":"string"}},"required":["type","params"],"title":"Histogram indicator"},"SLOs_indicator_properties_timeslice_metric":{"description":"Defines properties for a timeslice metric indicator type","type":"object","properties":{"params":{"description":"An object containing the indicator parameters.","nullable":false,"type":"object","properties":{"dataViewId":{"description":"The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.","example":"03b80ab3-003d-498b-881c-3beedbaf1162","type":"string"},"filter":{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},"index":{"description":"The index or index pattern to use","example":"my-service-*","type":"string"},"metric":{"description":"An object defining the metrics, equation, and threshold to determine if it's a good slice or not\n","type":"object","properties":{"comparator":{"description":"The comparator to use to compare the equation to the threshold.","enum":["GT","GTE","LT","LTE"],"example":"GT","type":"string"},"equation":{"description":"The equation to calculate the metric.","example":"A","type":"string"},"metrics":{"description":"List of metrics with their name, aggregation type, and field.","items":{"anyOf":[{"$ref":"#/components/schemas/SLOs_timeslice_metric_basic_metric_with_field"},{"$ref":"#/components/schemas/SLOs_timeslice_metric_percentile_metric"},{"$ref":"#/components/schemas/SLOs_timeslice_metric_doc_count_metric"}]},"type":"array"},"threshold":{"description":"The threshold used to determine if the metric is a good slice or not.","example":100,"type":"number"}},"required":["metrics","equation","comparator","threshold"]},"timestampField":{"description":"The timestamp field used in the source indice.\n","example":"timestamp","type":"string"}},"required":["index","timestampField","metric"]},"type":{"description":"The type of indicator.","example":"sli.metric.timeslice","type":"string"}},"required":["type","params"],"title":"Timeslice metric"},"SLOs_kql_with_filters":{"description":"Defines properties for a filter","oneOf":[{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},{"type":"object","properties":{"filters":{"items":{"$ref":"#/components/schemas/SLOs_filter"},"type":"array"},"kqlQuery":{"type":"string"}}}],"title":"KQL with filters"},"SLOs_kql_with_filters_good":{"description":"The KQL query used to define the good events.","oneOf":[{"description":"the KQL query to filter the documents with.","example":"request.latency \u003c= 150 and request.status_code : \"2xx\"","type":"string"},{"type":"object","properties":{"filters":{"items":{"$ref":"#/components/schemas/SLOs_filter"},"type":"array"},"kqlQuery":{"type":"string"}}}],"title":"KQL query for good events"},"SLOs_kql_with_filters_total":{"description":"The KQL query used to define all events.","oneOf":[{"description":"the KQL query to filter the documents with.","example":"field.environment : \"production\" and service.name : \"my-service\"","type":"string"},{"type":"object","properties":{"filters":{"items":{"$ref":"#/components/schemas/SLOs_filter"},"type":"array"},"kqlQuery":{"type":"string"}}}],"title":"KQL query for all events"},"SLOs_objective":{"description":"Defines properties for the SLO objective","type":"object","properties":{"target":{"description":"the target objective between 0 and 1 excluded","example":0.99,"exclusiveMaximum":true,"exclusiveMinimum":true,"maximum":100,"minimum":0,"type":"number"},"timesliceTarget":{"description":"the target objective for each slice when using a timeslices budgeting method","example":0.995,"maximum":100,"minimum":0,"type":"number"},"timesliceWindow":{"description":"the duration of each slice when using a timeslices budgeting method, as {duraton}{unit}","example":"5m","type":"string"}},"required":["target"],"title":"Objective"},"SLOs_settings":{"description":"Defines properties for SLO settings.","properties":{"frequency":{"default":"1m","description":"The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute.","example":"5m","type":"string"},"preventInitialBackfill":{"default":false,"description":"Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window.","example":true,"type":"boolean"},"syncDelay":{"default":"1m","description":"The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval.","example":"5m","type":"string"},"syncField":{"description":"The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field.","example":"event.ingested","type":"string"}},"title":"Settings","type":"object"},"SLOs_slo_definition_response":{"title":"SLO definition response","type":"object","properties":{"budgetingMethod":{"$ref":"#/components/schemas/SLOs_budgeting_method"},"createdAt":{"description":"The creation date","example":"2023-01-12T10:03:19.000Z","type":"string"},"description":{"description":"The description of the SLO.","example":"My SLO description","type":"string"},"enabled":{"description":"Indicate if the SLO is enabled","example":true,"type":"boolean"},"groupBy":{"$ref":"#/components/schemas/SLOs_group_by"},"id":{"description":"The identifier of the SLO.","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"indicator":{"discriminator":{"mapping":{"sli.apm.transactionDuration":"#/components/schemas/SLOs_indicator_properties_apm_latency","sli.apm.transactionErrorRate":"#/components/schemas/SLOs_indicator_properties_apm_availability","sli.histogram.custom":"#/components/schemas/SLOs_indicator_properties_histogram","sli.kql.custom":"#/components/schemas/SLOs_indicator_properties_custom_kql","sli.metric.custom":"#/components/schemas/SLOs_indicator_properties_custom_metric","sli.metric.timeslice":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_kql"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_availability"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_latency"},{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_metric"},{"$ref":"#/components/schemas/SLOs_indicator_properties_histogram"},{"$ref":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"}]},"name":{"description":"The name of the SLO.","example":"My Service SLO","type":"string"},"objective":{"$ref":"#/components/schemas/SLOs_objective"},"revision":{"description":"The SLO revision","example":2,"type":"number"},"settings":{"$ref":"#/components/schemas/SLOs_settings"},"tags":{"description":"List of tags","items":{"type":"string"},"type":"array"},"timeWindow":{"$ref":"#/components/schemas/SLOs_time_window"},"updatedAt":{"description":"The last update date","example":"2023-01-12T10:03:19.000Z","type":"string"},"version":{"description":"The internal SLO version","example":2,"type":"number"}},"required":["id","name","description","indicator","timeWindow","budgetingMethod","objective","settings","revision","enabled","groupBy","tags","createdAt","updatedAt","version"]},"SLOs_slo_with_summary_response":{"title":"SLO response","type":"object","properties":{"budgetingMethod":{"$ref":"#/components/schemas/SLOs_budgeting_method"},"createdAt":{"description":"The creation date","example":"2023-01-12T10:03:19.000Z","type":"string"},"description":{"description":"The description of the SLO.","example":"My SLO description","type":"string"},"enabled":{"description":"Indicate if the SLO is enabled","example":true,"type":"boolean"},"groupBy":{"$ref":"#/components/schemas/SLOs_group_by"},"id":{"description":"The identifier of the SLO.","example":"8853df00-ae2e-11ed-90af-09bb6422b258","type":"string"},"indicator":{"discriminator":{"mapping":{"sli.apm.transactionDuration":"#/components/schemas/SLOs_indicator_properties_apm_latency","sli.apm.transactionErrorRate":"#/components/schemas/SLOs_indicator_properties_apm_availability","sli.histogram.custom":"#/components/schemas/SLOs_indicator_properties_histogram","sli.kql.custom":"#/components/schemas/SLOs_indicator_properties_custom_kql","sli.metric.custom":"#/components/schemas/SLOs_indicator_properties_custom_metric","sli.metric.timeslice":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_kql"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_availability"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_latency"},{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_metric"},{"$ref":"#/components/schemas/SLOs_indicator_properties_histogram"},{"$ref":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"}]},"instanceId":{"description":"the value derived from the groupBy field, if present, otherwise '*'","example":"host-abcde","type":"string"},"name":{"description":"The name of the SLO.","example":"My Service SLO","type":"string"},"objective":{"$ref":"#/components/schemas/SLOs_objective"},"revision":{"description":"The SLO revision","example":2,"type":"number"},"settings":{"$ref":"#/components/schemas/SLOs_settings"},"summary":{"$ref":"#/components/schemas/SLOs_summary"},"tags":{"description":"List of tags","items":{"type":"string"},"type":"array"},"timeWindow":{"$ref":"#/components/schemas/SLOs_time_window"},"updatedAt":{"description":"The last update date","example":"2023-01-12T10:03:19.000Z","type":"string"},"version":{"description":"The internal SLO version","example":2,"type":"number"}},"required":["id","name","description","indicator","timeWindow","budgetingMethod","objective","settings","revision","summary","enabled","groupBy","instanceId","tags","createdAt","updatedAt","version"]},"SLOs_summary":{"description":"The SLO computed data","properties":{"errorBudget":{"$ref":"#/components/schemas/SLOs_error_budget"},"sliValue":{"example":0.9836,"type":"number"},"status":{"$ref":"#/components/schemas/SLOs_summary_status"}},"required":["status","sliValue","errorBudget"],"title":"Summary","type":"object"},"SLOs_summary_status":{"enum":["NO_DATA","HEALTHY","DEGRADING","VIOLATED"],"example":"HEALTHY","title":"summary status","type":"string"},"SLOs_time_window":{"description":"Defines properties for the SLO time window","type":"object","properties":{"duration":{"description":"the duration formatted as {duration}{unit}. Accepted values for rolling: 7d, 30d, 90d. Accepted values for calendar aligned: 1w (weekly) or 1M (monthly)","example":"30d","type":"string"},"type":{"description":"Indicates weither the time window is a rolling or a calendar aligned time window.","enum":["rolling","calendarAligned"],"example":"rolling","type":"string"}},"required":["duration","type"],"title":"Time window"},"SLOs_timeslice_metric_basic_metric_with_field":{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric.","enum":["sum","avg","min","max","std_deviation","last_value","cardinality"],"example":"sum","type":"string"},"field":{"description":"The field of the metric.","example":"processor.processed","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: \"success\"","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation","field"],"title":"Timeslice Metric Basic Metric with Field"},"SLOs_timeslice_metric_doc_count_metric":{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric. Only valid option is \"doc_count\"","enum":["doc_count"],"example":"doc_count","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: \"success\"","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"}},"required":["name","aggregation"],"title":"Timeslice Metric Doc Count Metric"},"SLOs_timeslice_metric_percentile_metric":{"type":"object","properties":{"aggregation":{"description":"The aggregation type of the metric. Only valid option is \"percentile\"","enum":["percentile"],"example":"percentile","type":"string"},"field":{"description":"The field of the metric.","example":"processor.processed","type":"string"},"filter":{"description":"The filter to apply to the metric.","example":"processor.outcome: \"success\"","type":"string"},"name":{"description":"The name of the metric. Only valid options are A-Z","example":"A","pattern":"^[A-Z]$","type":"string"},"percentile":{"description":"The percentile value.","example":95,"type":"number"}},"required":["name","aggregation","field","percentile"],"title":"Timeslice Metric Percentile Metric"},"SLOs_update_slo_request":{"description":"The update SLO API request body varies depending on the type of indicator, time window and budgeting method. Partial update is handled.\n","properties":{"budgetingMethod":{"$ref":"#/components/schemas/SLOs_budgeting_method"},"description":{"description":"A description for the SLO.","type":"string"},"groupBy":{"$ref":"#/components/schemas/SLOs_group_by"},"indicator":{"oneOf":[{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_kql"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_availability"},{"$ref":"#/components/schemas/SLOs_indicator_properties_apm_latency"},{"$ref":"#/components/schemas/SLOs_indicator_properties_custom_metric"},{"$ref":"#/components/schemas/SLOs_indicator_properties_histogram"},{"$ref":"#/components/schemas/SLOs_indicator_properties_timeslice_metric"}]},"name":{"description":"A name for the SLO.","type":"string"},"objective":{"$ref":"#/components/schemas/SLOs_objective"},"settings":{"$ref":"#/components/schemas/SLOs_settings"},"tags":{"description":"List of tags","items":{"type":"string"},"type":"array"},"timeWindow":{"$ref":"#/components/schemas/SLOs_time_window"}},"title":"Update SLO request","type":"object"},"Synthetics_browserMonitorFields":{"allOf":[{"$ref":"#/components/schemas/Synthetics_commonMonitorFields"},{"additionalProperties":true,"type":"object","properties":{"ignore_https_errors":{"default":false,"description":"Ignore HTTPS errors.","type":"boolean"},"inline_script":{"description":"The inline script.","type":"string"},"playwright_options":{"description":"Playwright options.","type":"object"},"screenshots":{"default":"on","description":"The screenshot option.","enum":["on","off","only-on-failure"],"type":"string"},"synthetics_args":{"description":"Synthetics agent CLI arguments.","type":"array"},"type":{"description":"The monitor type.","enum":["browser"],"type":"string"}},"required":["inline_script","type"]}],"title":"Browser monitor fields"},"Synthetics_commonMonitorFields":{"title":"Common monitor fields","type":"object","properties":{"alert":{"description":"The alert configuration. The default is `{ status: { enabled: true }, tls: { enabled: true } }`.\n","type":"object"},"enabled":{"default":true,"description":"Specify whether the monitor is enabled.","type":"boolean"},"locations":{"description":"The location to deploy the monitor.\nMonitors can be deployed in multiple locations so that you can detect differences in availability and response times across those locations.\nTo list available locations you can:\n\n- Run the `elastic-synthetics locations` command with the deployment's Kibana URL.\n- Go to *Synthetics \u003e Management* and click *Create monitor*. Locations will be listed in *Locations*.\n","externalDocs":{"url":"https://github.com/elastic/synthetics/blob/main/src/locations/public-locations.ts"},"items":{"type":"string"},"type":"array"},"name":{"description":"The monitor name.","type":"string"},"namespace":{"default":"default","description":"The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters: `*`, `\\`, `/`, `?`, `\"`, `\u003c`, `\u003e`, `|`, whitespace, `,`, `#`, `:`, or `-`.\n","type":"string"},"params":{"description":"The monitor parameters.","type":"string"},"private_locations":{"description":"The private locations to which the monitors will be deployed.\nThese private locations refer to locations hosted and managed by you, whereas `locations` are hosted by Elastic.\nYou can specify a private location using the location's name.\nTo list available private locations you can:\n\n- Run the `elastic-synthetics locations` command with the deployment's Kibana URL.\n- Go to *Synthetics \u003e Settings* and click *Private locationsr*. Private locations will be listed in the table.\n\n\u003e info\n\u003e You can provide `locations` or `private_locations` or both. At least one is required.\n","items":{"type":"string"},"type":"array"},"retest_on_failure":{"default":true,"description":"Turn retesting for when a monitor fails on or off. By default, monitors are automatically retested if the monitor goes from \"up\" to \"down\". If the result of the retest is also \"down\", an error will be created and if configured, an alert sent. The monitor will then resume running according to the defined schedule. Using `retest_on_failure` can reduce noise related to transient problems.\n","type":"boolean"},"schedule":{"description":"The monitor's schedule in minutes. Supported values are `1`, `3`, `5`, `10`, `15`, `30`, `60`, `120`, and `240`. The default value is `3` minutes for HTTP, TCP, and ICMP monitors. The default value is `10` minutes for Browser monitors.\n","type":"number"},"service.name":{"description":"The APM service name.","type":"string"},"tags":{"description":"An array of tags.","items":{"type":"string"},"type":"array"},"timeout":{"default":16,"description":"The monitor timeout in seconds. The monitor will fail if it doesn't complete within this time.\n","type":"number"}},"required":["name"]},"Synthetics_getParameterResponse":{"title":"Get parameter response","type":"object","properties":{"description":{"description":"The description of the parameter. It is included in the response if the user has read-only permissions to the Synthetics app.\n","type":"string"},"id":{"description":"The unique identifier of the parameter.","type":"string"},"key":{"description":"The key of the parameter.","type":"string"},"namespaces":{"description":"The namespaces associated with the parameter. It is included in the response if the user has read-only permissions to the Synthetics app.\n","items":{"type":"string"},"type":"array"},"tags":{"description":"An array of tags associated with the parameter. It is included in the response if the user has read-only permissions to the Synthetics app.\n","items":{"type":"string"},"type":"array"},"value":{"description":"The value associated with the parameter. It will be included in the response if the user has write permissions. \n","type":"string"}},"required":null},"Synthetics_getPrivateLocation":{"additionalProperties":true,"properties":{"agentPolicyId":{"description":"The ID of the agent policy associated with the private location.","type":"string"},"geo":{"description":"Geographic coordinates (WGS84) for the location.","type":"object","properties":{"lat":{"description":"The latitude of the location.","type":"number"},"lon":{"description":"The longitude of the location.","type":"number"}},"required":["lat","lon"]},"id":{"description":"The unique identifier of the private location.","type":"string"},"isInvalid":{"description":"Indicates whether the location is invalid. If `true`, the location is invalid, which means the agent policy associated with the location is deleted.\n","type":"boolean"},"label":{"description":"A label for the private location.","type":"string"},"namespace":{"description":"The namespace of the location, which is the same as the namespace of the agent policy associated with the location.","type":"string"}},"title":"Post a private location","type":"object"},"Synthetics_httpMonitorFields":{"allOf":[{"$ref":"#/components/schemas/Synthetics_commonMonitorFields"},{"additionalproperties":true,"type":"object","properties":{"check":{"description":"The check request settings.","type":"objects","properties":{"request":{"description":"An optional request to send to the remote host.","type":"object","properties":{"body":{"description":"Optional request body content.","type":"string"},"headers":{"description":"A dictionary of additional HTTP headers to send. By default, Synthetics will set the User-Agent header to identify itself.\n","type":"object"},"method":{"description":"The HTTP method to use.","enum":["HEAD","GET","POST","OPTIONS"],"type":"string"}}},"response":{"additionalProperties":true,"description":"The expected response.","type":"object","properties":{"body":{"type":"object"},"headers":{"description":"A dictionary of expected HTTP headers. If the header is not found, the check fails.","type":"object"}}}}},"ipv4":{"default":true,"description":"If `true`, ping using the ipv4 protocol.","type":"boolean"},"ipv6":{"default":true,"description":"If `true`, ping using the ipv6 protocol.","type":"boolean"},"max_redirects":{"default":0,"description":"The maximum number of redirects to follow.","type":"number"},"mode":{"default":"any","description":"The mode of the monitor. If it is `all`, the monitor pings all resolvable IPs for a hostname. If it is `any`, the monitor pings only one IP address for a hostname. If you're using a DNS-load balancer and want to ping every IP address for the specified hostname, you should use `all`.\n","enum":["all","any"],"type":"string"},"password":{"description":"The password for authenticating with the server. The credentials are passed with the request.\n","type":"string"},"proxy_headers":{"description":"Additional headers to send to proxies during CONNECT requests.","type":"object"},"proxy_url":{"description":"The URL of the proxy to use for this monitor.","type":"string"},"response":{"description":"Controls the indexing of the HTTP response body contents to the `http.response.body.contents field`.","type":"object"},"ssl":{"description":"The TLS/SSL connection settings for use with the HTTPS endpoint. If you don't specify settings, the system defaults are used.\n","type":"object"},"type":{"description":"The monitor type.","enum":["http"],"type":"string"},"url":{"description":"The URL to monitor.","type":"string"},"username":{"description":"The username for authenticating with the server. The credentials are passed with the request.\n","type":"string"}},"required":["type","url"]}],"title":"HTTP monitor fields"},"Synthetics_icmpMonitorFields":{"allOf":[{"$ref":"#/components/schemas/Synthetics_commonMonitorFields"},{"additionalProperties":true,"type":"object","properties":{"host":{"description":"The host to ping.","type":"string"},"type":{"description":"The monitor type.","enum":["icmp"],"type":"string"},"wait":{"default":1,"description":"The wait time in seconds.","type":"number"}},"required":["host","type"]}],"title":"ICMP monitor fields"},"Synthetics_parameterRequest":{"title":"Parameter request","type":"object","properties":{"description":{"description":"A description of the parameter.","type":"string"},"key":{"description":"The key of the parameter.","type":"string"},"share_across_spaces":{"description":"Specify whether the parameter should be shared across spaces.","type":"boolean"},"tags":{"description":"An array of tags to categorize the parameter.","items":{"type":"string"},"type":"array"},"value":{"description":"The value associated with the parameter.","type":"string"}},"required":["key","value"]},"Synthetics_postParameterResponse":{"title":"Post parameter response","type":"object","properties":{"description":{"description":"A description of the parameter.","type":"string"},"id":{"description":"The unique identifier for the parameter.","type":"string"},"key":{"description":"The parameter key.","type":"string"},"share_across_spaces":{"description":"Indicates whether the parameter is shared across spaces.","type":"boolean"},"tags":{"description":"An array of tags associated with the parameter.","items":{"type":"string"},"type":"array"},"value":{"description":"The value associated with the parameter.","type":"string"}}},"Synthetics_tcpMonitorFields":{"allOf":[{"$ref":"#/components/schemas/Synthetics_commonMonitorFields"},{"additionalProperties":true,"type":"object","properties":{"host":{"description":"The host to monitor; it can be an IP address or a hostname. The host can include the port using a colon, for example \"example.com:9200\".\n","type":"string"},"proxy_url":{"description":"The URL of the SOCKS5 proxy to use when connecting to the server. The value must be a URL with a scheme of `socks5://`. If the SOCKS5 proxy server requires client authentication, then a username and password can be embedded in the URL. When using a proxy, hostnames are resolved on the proxy server instead of on the client. You can change this behavior by setting the `proxy_use_local_resolver` option.\n","type":"string"},"proxy_use_local_resolver":{"default":false,"description":"Specify that hostnames are resolved locally instead of being resolved on the proxy server. If `false`, name resolution occurs on the proxy server.\n","type":"boolean"},"ssl":{"description":"The TLS/SSL connection settings for use with the HTTPS endpoint. If you don't specify settings, the system defaults are used.\n","type":"object"},"type":{"description":"The monitor type.","enum":["tcp"],"type":"string"}},"required":["host","type"]}],"title":"TCP monitor fields"},"Task_manager_health_APIs_configuration":{"description":"This object summarizes the current configuration of Task Manager. This includes dynamic configurations that change over time, such as `poll_interval` and `max_workers`, which can adjust in reaction to changing load on the system.\n","type":"object"},"Task_manager_health_APIs_health_response":{"title":"Task health response properties","type":"object","properties":{"id":{"type":"string"},"last_update":{"type":"string"},"stats":{"type":"object","properties":{"capacity_estimation":{"description":"This object provides a rough estimate about the sufficiency of its capacity. These are estimates based on historical data and should not be used as predictions.\n","type":"object"},"configuration":{"$ref":"#/components/schemas/Task_manager_health_APIs_configuration"},"runtime":{"description":"This object tracks runtime performance of Task Manager, tracking task drift, worker load, and stats broken down by type, including duration and run results.\n","type":"object"},"workload":{"$ref":"#/components/schemas/Task_manager_health_APIs_workload"}}},"status":{"type":"string"},"timestamp":{"type":"string"}}},"Task_manager_health_APIs_workload":{"description":"This object summarizes the work load across the cluster, including the tasks in the system, their types, and current status.\n","type":"object"},"bedrock_config":{"title":"Connector request properties for an Amazon Bedrock connector","description":"Defines properties for connectors when type is `.bedrock`.","type":"object","required":["apiUrl"],"properties":{"apiUrl":{"type":"string","description":"The Amazon Bedrock request URL."},"defaultModel":{"type":"string","description":"The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.\n","default":"us.anthropic.claude-3-7-sonnet-20250219-v1:0"}}},"crowdstrike_config":{"title":"Connector request config properties for a Crowdstrike connector","required":["url"],"description":"Defines config properties for connectors when type is `.crowdstrike`.","type":"object","properties":{"url":{"description":"The CrowdStrike tenant URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n","type":"string"}}},"d3security_config":{"title":"Connector request properties for a D3 Security connector","description":"Defines properties for connectors when type is `.d3security`.","type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The D3 Security API request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"}}},"email_config":{"title":"Connector request properties for an email connector","description":"Defines properties for connectors when type is `.email`.","required":["from"],"type":"object","properties":{"clientId":{"description":"The client identifier, which is a part of OAuth 2.0 client credentials authentication, in GUID format. If `service` is `exchange_server`, this property is required.\n","type":"string","nullable":true},"from":{"description":"The from address for all emails sent by the connector. It must be specified in `user@host-name` format.\n","type":"string"},"hasAuth":{"description":"Specifies whether a user and password are required inside the secrets configuration.\n","default":true,"type":"boolean"},"host":{"description":"The host name of the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.\n","type":"string"},"oauthTokenUrl":{"type":"string","nullable":true},"port":{"description":"The port to connect to on the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.\n","type":"integer"},"secure":{"description":"Specifies whether the connection to the service provider will use TLS. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored.\n","type":"boolean"},"service":{"description":"The name of the email service.\n","type":"string","enum":["elastic_cloud","exchange_server","gmail","other","outlook365","ses"]},"tenantId":{"description":"The tenant identifier, which is part of OAuth 2.0 client credentials authentication, in GUID format. If `service` is `exchange_server`, this property is required.\n","type":"string","nullable":true}}},"gemini_config":{"title":"Connector request properties for an Google Gemini connector","description":"Defines properties for connectors when type is `.gemini`.","type":"object","required":["apiUrl","gcpRegion","gcpProjectID"],"properties":{"apiUrl":{"type":"string","description":"The Google Gemini request URL."},"defaultModel":{"type":"string","description":"The generative artificial intelligence model for Google Gemini to use.","default":"gemini-1.5-pro-002"},"gcpRegion":{"type":"string","description":"The GCP region where the Vertex AI endpoint enabled."},"gcpProjectID":{"type":"string","description":"The Google ProjectID that has Vertex AI endpoint enabled."}}},"resilient_config":{"title":"Connector request properties for a IBM Resilient connector","required":["apiUrl","orgId"],"description":"Defines properties for connectors when type is `.resilient`.","type":"object","properties":{"apiUrl":{"description":"The IBM Resilient instance URL.","type":"string"},"orgId":{"description":"The IBM Resilient organization ID.","type":"string"}}},"index_config":{"title":"Connector request properties for an index connector","required":["index"],"description":"Defines properties for connectors when type is `.index`.","type":"object","properties":{"executionTimeField":{"description":"A field that indicates when the document was indexed.","default":null,"type":"string","nullable":true},"index":{"description":"The Elasticsearch index to be written to.","type":"string"},"refresh":{"description":"The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs.\n","default":false,"type":"boolean"}}},"jira_config":{"title":"Connector request properties for a Jira connector","required":["apiUrl","projectKey"],"description":"Defines properties for connectors when type is `.jira`.","type":"object","properties":{"apiUrl":{"description":"The Jira instance URL.","type":"string"},"projectKey":{"description":"The Jira project key.","type":"string"}}},"defender_config":{"title":"Connector request properties for a Microsoft Defender for Endpoint connector","required":["apiUrl","projectKey"],"description":"Defines properties for connectors when type is `.microsoft_defender_endpoint`.","type":"object","properties":{"apiUrl":{"type":"string","description":"The URL of the Microsoft Defender for Endpoint API. If you are using the `xpack.actions.allowedHosts` setting, make sure the hostname is added to the allowed hosts.\n"},"clientId":{"type":"string","description":"The application (client) identifier for your app in the Azure portal."},"oAuthScope":{"type":"string","description":"The OAuth scopes or permission sets for the Microsoft Defender for Endpoint API."},"oAuthServerUrl":{"type":"string","description":"The OAuth server URL where authentication is sent and received for the Microsoft Defender for Endpoint API."},"tenantId":{"description":"The tenant identifier for your app in the Azure portal.","type":"string"}}},"genai_azure_config":{"title":"Connector request properties for an OpenAI connector that uses Azure OpenAI","description":"Defines properties for connectors when type is `.gen-ai` and the API provider is `Azure OpenAI`.\n","type":"object","required":["apiProvider","apiUrl"],"properties":{"apiProvider":{"type":"string","description":"The OpenAI API provider.","enum":["Azure OpenAI"]},"apiUrl":{"type":"string","description":"The OpenAI API endpoint."}}},"genai_openai_config":{"title":"Connector request properties for an OpenAI connector","description":"Defines properties for connectors when type is `.gen-ai` and the API provider is `OpenAI`.\n","type":"object","required":["apiProvider","apiUrl"],"properties":{"apiProvider":{"type":"string","description":"The OpenAI API provider.","enum":["OpenAI"]},"apiUrl":{"type":"string","description":"The OpenAI API endpoint."},"defaultModel":{"type":"string","description":"The default model to use for requests."}}},"opsgenie_config":{"title":"Connector request properties for an Opsgenie connector","required":["apiUrl"],"description":"Defines properties for connectors when type is `.opsgenie`.","type":"object","properties":{"apiUrl":{"description":"The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n","type":"string"}}},"pagerduty_config":{"title":"Connector request properties for a PagerDuty connector","description":"Defines properties for connectors when type is `.pagerduty`.","type":"object","properties":{"apiUrl":{"description":"The PagerDuty event URL.","type":"string","nullable":true,"example":"https://events.pagerduty.com/v2/enqueue"}}},"sentinelone_config":{"title":"Connector request properties for a SentinelOne connector","required":["url"],"description":"Defines properties for connectors when type is `.sentinelone`.","type":"object","properties":{"url":{"description":"The SentinelOne tenant URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n","type":"string"}}},"servicenow_config":{"title":"Connector request properties for a ServiceNow ITSM connector","required":["apiUrl"],"description":"Defines properties for connectors when type is `.servicenow`.","type":"object","properties":{"apiUrl":{"type":"string","description":"The ServiceNow instance URL."},"clientId":{"description":"The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n","type":"string"},"isOAuth":{"description":"The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n","default":false,"type":"boolean"},"jwtKeyId":{"description":"The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`.\n","type":"string"},"userIdentifierValue":{"description":"The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.\n","type":"string"},"usesTableApi":{"description":"Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow.\n","default":true,"type":"boolean"}}},"servicenow_itom_config":{"title":"Connector request properties for a ServiceNow ITOM connector","required":["apiUrl"],"description":"Defines properties for connectors when type is `.servicenow-itom`.","type":"object","properties":{"apiUrl":{"type":"string","description":"The ServiceNow instance URL."},"clientId":{"description":"The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n","type":"string"},"isOAuth":{"description":"The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n","default":false,"type":"boolean"},"jwtKeyId":{"description":"The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`.\n","type":"string"},"userIdentifierValue":{"description":"The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.\n","type":"string"}}},"slack_api_config":{"title":"Connector request properties for a Slack connector","description":"Defines properties for connectors when type is `.slack_api`.","type":"object","properties":{"allowedChannels":{"type":"array","description":"A list of valid Slack channels.","items":{"type":"object","required":["id","name"],"maxItems":25,"properties":{"id":{"type":"string","description":"The Slack channel ID.","example":"C123ABC456","minLength":1},"name":{"type":"string","description":"The Slack channel name.","minLength":1}}}}}},"swimlane_config":{"title":"Connector request properties for a Swimlane connector","required":["apiUrl","appId","connectorType"],"description":"Defines properties for connectors when type is `.swimlane`.","type":"object","properties":{"apiUrl":{"description":"The Swimlane instance URL.","type":"string"},"appId":{"description":"The Swimlane application ID.","type":"string"},"connectorType":{"description":"The type of connector. Valid values are `all`, `alerts`, and `cases`.","type":"string","enum":["all","alerts","cases"]},"mappings":{"title":"Connector mappings properties for a Swimlane connector","description":"The field mapping.","type":"object","properties":{"alertIdConfig":{"title":"Alert identifier mapping","description":"Mapping for the alert ID.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"caseIdConfig":{"title":"Case identifier mapping","description":"Mapping for the case ID.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"caseNameConfig":{"title":"Case name mapping","description":"Mapping for the case name.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"commentsConfig":{"title":"Case comment mapping","description":"Mapping for the case comments.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"descriptionConfig":{"title":"Case description mapping","description":"Mapping for the case description.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"ruleNameConfig":{"title":"Rule name mapping","description":"Mapping for the name of the alert's rule.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}},"severityConfig":{"title":"Severity mapping","description":"Mapping for the severity.","type":"object","required":["fieldType","id","key","name"],"properties":{"fieldType":{"type":"string","description":"The type of field in Swimlane."},"id":{"type":"string","description":"The identifier for the field in Swimlane."},"key":{"type":"string","description":"The key for the field in Swimlane."},"name":{"type":"string","description":"The name of the field in Swimlane."}}}}}}},"thehive_config":{"title":"Connector request properties for a TheHive connector","description":"Defines configuration properties for connectors when type is `.thehive`.","type":"object","required":["url"],"properties":{"organisation":{"type":"string","description":"The organisation in TheHive that will contain the alerts or cases. By default, the connector uses the default organisation of the user account that created the API key.\n"},"url":{"type":"string","description":"The instance URL in TheHive. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"}}},"tines_config":{"title":"Connector request properties for a Tines connector","description":"Defines properties for connectors when type is `.tines`.","type":"object","required":["url"],"properties":{"url":{"description":"The Tines tenant URL. If you are using the `xpack.actions.allowedHosts` setting, make sure this hostname is added to the allowed hosts.\n","type":"string"}}},"torq_config":{"title":"Connector request properties for a Torq connector","description":"Defines properties for connectors when type is `.torq`.","type":"object","required":["webhookIntegrationUrl"],"properties":{"webhookIntegrationUrl":{"description":"The endpoint URL of the Elastic Security integration in Torq.","type":"string"}}},"auth_type":{"title":"Authentication type","type":"string","nullable":true,"enum":["webhook-authentication-basic","webhook-authentication-ssl"],"description":"The type of authentication to use: basic, SSL, or none.\n"},"ca":{"title":"Certificate authority","type":"string","description":"A base64 encoded version of the certificate authority file that the connector can trust to sign and validate certificates. This option is available for all authentication types.\n"},"cert_type":{"title":"Certificate type","type":"string","description":"If the `authType` is `webhook-authentication-ssl`, specifies whether the certificate authentication data is in a CRT and key file format or a PFX file format.\n","enum":["ssl-crt-key","ssl-pfx"]},"has_auth":{"title":"Has authentication","type":"boolean","description":"If true, a username and password for login type authentication must be provided.","default":true},"verification_mode":{"title":"Verification mode","type":"string","enum":["certificate","full","none"],"default":"full","description":"Controls the verification of certificates. Use `full` to validate that the certificate has an issue date within the `not_before` and `not_after` dates, chains to a trusted certificate authority (CA), and has a hostname or IP address that matches the names within the certificate. Use `certificate` to validate the certificate and verify that it is signed by a trusted authority; this option does not check the certificate hostname. Use `none` to skip certificate validation.\n"},"webhook_config":{"title":"Connector request properties for a Webhook connector","description":"Defines properties for connectors when type is `.webhook`.","type":"object","properties":{"authType":{"$ref":"#/components/schemas/auth_type"},"ca":{"$ref":"#/components/schemas/ca"},"certType":{"$ref":"#/components/schemas/cert_type"},"hasAuth":{"$ref":"#/components/schemas/has_auth"},"headers":{"type":"object","nullable":true,"description":"A set of key-value pairs sent as headers with the request."},"method":{"type":"string","default":"post","enum":["post","put"],"description":"The HTTP request method, either `post` or `put`.\n"},"url":{"type":"string","description":"The request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"},"verificationMode":{"$ref":"#/components/schemas/verification_mode"}}},"cases_webhook_config":{"title":"Connector request properties for Webhook - Case Management connector","required":["createIncidentJson","createIncidentResponseKey","createIncidentUrl","getIncidentResponseExternalTitleKey","getIncidentUrl","updateIncidentJson","updateIncidentUrl","viewIncidentUrl"],"description":"Defines properties for connectors when type is `.cases-webhook`.","type":"object","properties":{"authType":{"$ref":"#/components/schemas/auth_type"},"ca":{"$ref":"#/components/schemas/ca"},"certType":{"$ref":"#/components/schemas/cert_type"},"createCommentJson":{"type":"string","description":"A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n","example":"{\"body\": {{{case.comment}}}}"},"createCommentMethod":{"type":"string","description":"The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`.\n","default":"put","enum":["patch","post","put"]},"createCommentUrl":{"type":"string","description":"The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts.\n","example":"https://example.com/issue/{{{external.system.id}}}/comment"},"createIncidentJson":{"type":"string","description":"A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n","example":"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"},"createIncidentMethod":{"type":"string","description":"The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`.\n","enum":["patch","post","put"],"default":"post"},"createIncidentResponseKey":{"type":"string","description":"The JSON key in the create external case response that contains the case ID."},"createIncidentUrl":{"type":"string","description":"The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"},"getIncidentResponseExternalTitleKey":{"type":"string","description":"The JSON key in get external case response that contains the case title."},"getIncidentUrl":{"type":"string","description":"The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n","example":"https://example.com/issue/{{{external.system.id}}}"},"hasAuth":{"$ref":"#/components/schemas/has_auth"},"headers":{"type":"string","description":"A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods.\n"},"updateIncidentJson":{"type":"string","description":"The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n","example":"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"},"updateIncidentMethod":{"type":"string","description":"The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`.\n","default":"put","enum":["patch","post","put"]},"updateIncidentUrl":{"type":"string","description":"The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n","example":"https://example.com/issue/{{{external.system.ID}}}"},"verificationMode":{"$ref":"#/components/schemas/verification_mode"},"viewIncidentUrl":{"type":"string","description":"The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL.\n","example":"https://testing-jira.atlassian.net/browse/{{{external.system.title}}}"}}},"xmatters_config":{"title":"Connector request properties for an xMatters connector","description":"Defines properties for connectors when type is `.xmatters`.","type":"object","properties":{"configUrl":{"description":"The request URL for the Elastic Alerts trigger in xMatters. It is applicable only when `usesBasic` is `true`.\n","type":"string","nullable":true},"usesBasic":{"description":"Specifies whether the connector uses HTTP basic authentication (`true`) or URL authentication (`false`).","type":"boolean","default":true}}},"bedrock_secrets":{"title":"Connector secrets properties for an Amazon Bedrock connector","description":"Defines secrets for connectors when type is `.bedrock`.","type":"object","required":["accessKey","secret"],"properties":{"accessKey":{"type":"string","description":"The AWS access key for authentication."},"secret":{"type":"string","description":"The AWS secret for authentication."}}},"crowdstrike_secrets":{"title":"Connector secrets properties for a Crowdstrike connector","description":"Defines secrets for connectors when type is `.crowdstrike`.","type":"object","required":["clientId","clientSecret"],"properties":{"clientId":{"description":"The CrowdStrike API client identifier.","type":"string"},"clientSecret":{"description":"The CrowdStrike API client secret to authenticate the `clientId`.","type":"string"}}},"d3security_secrets":{"title":"Connector secrets properties for a D3 Security connector","description":"Defines secrets for connectors when type is `.d3security`.","required":["token"],"type":"object","properties":{"token":{"type":"string","description":"The D3 Security token."}}},"email_secrets":{"title":"Connector secrets properties for an email connector","description":"Defines secrets for connectors when type is `.email`.","type":"object","properties":{"clientSecret":{"type":"string","description":"The Microsoft Exchange Client secret for OAuth 2.0 client credentials authentication. It must be URL-encoded. If `service` is `exchange_server`, this property is required.\n"},"password":{"type":"string","description":"The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required.\n"},"user":{"type":"string","description":"The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required.\n"}}},"gemini_secrets":{"title":"Connector secrets properties for a Google Gemini connector","description":"Defines secrets for connectors when type is `.gemini`.","type":"object","required":["credentialsJson"],"properties":{"credentialsJson":{"type":"string","description":"The service account credentials JSON file. The service account should have Vertex AI user IAM role assigned to it."}}},"resilient_secrets":{"title":"Connector secrets properties for IBM Resilient connector","required":["apiKeyId","apiKeySecret"],"description":"Defines secrets for connectors when type is `.resilient`.","type":"object","properties":{"apiKeyId":{"type":"string","description":"The authentication key ID for HTTP Basic authentication."},"apiKeySecret":{"type":"string","description":"The authentication key secret for HTTP Basic authentication."}}},"jira_secrets":{"title":"Connector secrets properties for a Jira connector","required":["apiToken","email"],"description":"Defines secrets for connectors when type is `.jira`.","type":"object","properties":{"apiToken":{"description":"The Jira API authentication token for HTTP basic authentication.","type":"string"},"email":{"description":"The account email for HTTP Basic authentication.","type":"string"}}},"teams_secrets":{"title":"Connector secrets properties for a Microsoft Teams connector","description":"Defines secrets for connectors when type is `.teams`.","type":"object","required":["webhookUrl"],"properties":{"webhookUrl":{"type":"string","description":"The URL of the incoming webhook. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"}}},"genai_secrets":{"title":"Connector secrets properties for an OpenAI connector","description":"Defines secrets for connectors when type is `.gen-ai`.","type":"object","properties":{"apiKey":{"type":"string","description":"The OpenAI API key."}}},"opsgenie_secrets":{"title":"Connector secrets properties for an Opsgenie connector","required":["apiKey"],"description":"Defines secrets for connectors when type is `.opsgenie`.","type":"object","properties":{"apiKey":{"description":"The Opsgenie API authentication key for HTTP Basic authentication.","type":"string"}}},"pagerduty_secrets":{"title":"Connector secrets properties for a PagerDuty connector","description":"Defines secrets for connectors when type is `.pagerduty`.","type":"object","required":["routingKey"],"properties":{"routingKey":{"description":"A 32 character PagerDuty Integration Key for an integration on a service.\n","type":"string"}}},"sentinelone_secrets":{"title":"Connector secrets properties for a SentinelOne connector","description":"Defines secrets for connectors when type is `.sentinelone`.","type":"object","required":["token"],"properties":{"token":{"description":"The A SentinelOne API token.","type":"string"}}},"servicenow_secrets":{"title":"Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors","description":"Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`.","type":"object","properties":{"clientSecret":{"type":"string","description":"The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`."},"password":{"type":"string","description":"The password for HTTP basic authentication. This property is required when `isOAuth` is `false`."},"privateKey":{"type":"string","description":"The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`."},"privateKeyPassword":{"type":"string","description":"The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key."},"username":{"type":"string","description":"The username for HTTP basic authentication. This property is required when `isOAuth` is `false`."}}},"slack_api_secrets":{"title":"Connector secrets properties for a Web API Slack connector","description":"Defines secrets for connectors when type is `.slack`.","required":["token"],"type":"object","properties":{"token":{"type":"string","description":"Slack bot user OAuth token."}}},"swimlane_secrets":{"title":"Connector secrets properties for a Swimlane connector","description":"Defines secrets for connectors when type is `.swimlane`.","type":"object","properties":{"apiToken":{"description":"Swimlane API authentication token.","type":"string"}}},"thehive_secrets":{"title":"Connector secrets properties for a TheHive connector","description":"Defines secrets for connectors when type is `.thehive`.","required":["apiKey"],"type":"object","properties":{"apiKey":{"type":"string","description":"The API key for authentication in TheHive."}}},"tines_secrets":{"title":"Connector secrets properties for a Tines connector","description":"Defines secrets for connectors when type is `.tines`.","type":"object","required":["email","token"],"properties":{"email":{"description":"The email used to sign in to Tines.","type":"string"},"token":{"description":"The Tines API token.","type":"string"}}},"torq_secrets":{"title":"Connector secrets properties for a Torq connector","description":"Defines secrets for connectors when type is `.torq`.","type":"object","required":["token"],"properties":{"token":{"description":"The secret of the webhook authentication header.","type":"string"}}},"crt":{"title":"Certificate","type":"string","description":"If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT file."},"key":{"title":"Certificate key","type":"string","description":"If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the KEY file."},"pfx":{"title":"Personal information exchange","type":"string","description":"If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file."},"webhook_secrets":{"title":"Connector secrets properties for a Webhook connector","description":"Defines secrets for connectors when type is `.webhook`.","type":"object","properties":{"crt":{"$ref":"#/components/schemas/crt"},"key":{"$ref":"#/components/schemas/key"},"pfx":{"$ref":"#/components/schemas/pfx"},"password":{"type":"string","description":"The password for HTTP basic authentication or the passphrase for the SSL certificate files. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n"},"user":{"type":"string","description":"The username for HTTP basic authentication. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n"}}},"cases_webhook_secrets":{"title":"Connector secrets properties for Webhook - Case Management connector","type":"object","properties":{"crt":{"$ref":"#/components/schemas/crt"},"key":{"$ref":"#/components/schemas/key"},"pfx":{"$ref":"#/components/schemas/pfx"},"password":{"type":"string","description":"The password for HTTP basic authentication. If `hasAuth` is set to `true` and and `authType` is `webhook-authentication-basic`, this property is required.\n"},"user":{"type":"string","description":"The username for HTTP basic authentication. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n"}}},"xmatters_secrets":{"title":"Connector secrets properties for an xMatters connector","description":"Defines secrets for connectors when type is `.xmatters`.","type":"object","properties":{"password":{"description":"A user name for HTTP basic authentication. It is applicable only when `usesBasic` is `true`.\n","type":"string"},"secretsUrl":{"description":"The request URL for the Elastic Alerts trigger in xMatters with the API key included in the URL. It is applicable only when `usesBasic` is `false`.\n","type":"string"},"user":{"description":"A password for HTTP basic authentication. It is applicable only when `usesBasic` is `true`.\n","type":"string"}}},"defender_secrets":{"title":"Connector secrets properties for a Microsoft Defender for Endpoint connector","required":["clientSecret"],"description":"Defines secrets for connectors when type is `..microsoft_defender_endpoint`.","type":"object","properties":{"clientSecret":{"description":"The client secret for your app in the Azure portal.","type":"string"}}},"run_acknowledge_resolve_pagerduty":{"title":"PagerDuty connector parameters","description":"Test an action that acknowledges or resolves a PagerDuty alert.","type":"object","required":["dedupKey","eventAction"],"properties":{"dedupKey":{"description":"The deduplication key for the PagerDuty alert.","type":"string","maxLength":255},"eventAction":{"description":"The type of event.","type":"string","enum":["acknowledge","resolve"]}}},"run_documents":{"title":"Index connector parameters","description":"Test an action that indexes a document into Elasticsearch.","type":"object","required":["documents"],"properties":{"documents":{"type":"array","description":"The documents in JSON format for index connectors.","items":{"type":"object","additionalProperties":true}}}},"run_message_email":{"title":"Email connector parameters","description":"Test an action that sends an email message. There must be at least one recipient in `to`, `cc`, or `bcc`.\n","type":"object","required":["message","subject",{"anyOf":["to","cc","bcc"]}],"properties":{"bcc":{"type":"array","items":{"type":"string"},"description":"A list of \"blind carbon copy\" email addresses. Addresses can be specified in `user@host-name` format or in name `\u003cuser@host-name\u003e` format\n"},"cc":{"type":"array","items":{"type":"string"},"description":"A list of \"carbon copy\" email addresses. Addresses can be specified in `user@host-name` format or in name `\u003cuser@host-name\u003e` format \n"},"message":{"type":"string","description":"The email message text. Markdown format is supported."},"subject":{"type":"string","description":"The subject line of the email."},"to":{"type":"array","description":"A list of email addresses. Addresses can be specified in `user@host-name` format or in name `\u003cuser@host-name\u003e` format.\n","items":{"type":"string"}}}},"run_message_serverlog":{"title":"Server log connector parameters","description":"Test an action that writes an entry to the Kibana server log.","type":"object","required":["message"],"properties":{"level":{"type":"string","description":"The log level of the message for server log connectors.","enum":["debug","error","fatal","info","trace","warn"],"default":"info"},"message":{"type":"string","description":"The message for server log connectors."}}},"run_message_slack":{"title":"Slack connector parameters","description":"Test an action that sends a message to Slack. It is applicable only when the connector type is `.slack`.\n","type":"object","required":["message"],"properties":{"message":{"type":"string","description":"The Slack message text, which cannot contain Markdown, images, or other advanced formatting."}}},"run_trigger_pagerduty":{"title":"PagerDuty connector parameters","description":"Test an action that triggers a PagerDuty alert.","type":"object","required":["eventAction"],"properties":{"class":{"description":"The class or type of the event.","type":"string","example":"cpu load"},"component":{"description":"The component of the source machine that is responsible for the event.","type":"string","example":"eth0"},"customDetails":{"description":"Additional details to add to the event.","type":"object"},"dedupKey":{"description":"All actions sharing this key will be associated with the same PagerDuty alert. This value is used to correlate trigger and resolution.\n","type":"string","maxLength":255},"eventAction":{"description":"The type of event.","type":"string","enum":["trigger"]},"group":{"description":"The logical grouping of components of a service.","type":"string","example":"app-stack"},"links":{"description":"A list of links to add to the event.","type":"array","items":{"type":"object","properties":{"href":{"description":"The URL for the link.","type":"string"},"text":{"description":"A plain text description of the purpose of the link.","type":"string"}}}},"severity":{"description":"The severity of the event on the affected system.","type":"string","enum":["critical","error","info","warning"],"default":"info"},"source":{"description":"The affected system, such as a hostname or fully qualified domain name. Defaults to the Kibana saved object id of the action.\n","type":"string"},"summary":{"description":"A summery of the event.","type":"string","maxLength":1024},"timestamp":{"description":"An ISO-8601 timestamp that indicates when the event was detected or generated.","type":"string","format":"date-time"}}},"run_addevent":{"title":"The addEvent subaction","type":"object","required":["subAction"],"description":"The `addEvent` subaction for ServiceNow ITOM connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["addEvent"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","properties":{"additional_info":{"type":"string","description":"Additional information about the event."},"description":{"type":"string","description":"The details about the event."},"event_class":{"type":"string","description":"A specific instance of the source."},"message_key":{"type":"string","description":"All actions sharing this key are associated with the same ServiceNow alert. The default value is `\u003crule ID\u003e:\u003calert instance ID\u003e`."},"metric_name":{"type":"string","description":"The name of the metric."},"node":{"type":"string","description":"The host that the event was triggered for."},"resource":{"type":"string","description":"The name of the resource."},"severity":{"type":"string","description":"The severity of the event."},"source":{"type":"string","description":"The name of the event source type."},"time_of_event":{"type":"string","description":"The time of the event."},"type":{"type":"string","description":"The type of event."}}}}},"run_closealert":{"title":"The closeAlert subaction","type":"object","required":["subAction","subActionParams"],"description":"The `closeAlert` subaction for Opsgenie connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["closeAlert"]},"subActionParams":{"type":"object","required":["alias"],"properties":{"alias":{"type":"string","description":"The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert."},"note":{"type":"string","description":"Additional information for the alert."},"source":{"type":"string","description":"The display name for the source of the alert."},"user":{"type":"string","description":"The display name for the owner."}}}}},"run_closeincident":{"title":"The closeIncident subaction","type":"object","required":["subAction","subActionParams"],"description":"The `closeIncident` subaction for ServiceNow ITSM connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["closeIncident"]},"subActionParams":{"type":"object","required":["incident"],"properties":{"incident":{"type":"object","anyOf":[{"required":["correlation_id"]},{"required":["externalId"]}],"properties":{"correlation_id":{"type":"string","nullable":true,"description":"An identifier that is assigned to the incident when it is created by the connector. NOTE: If you use the default value and the rule generates multiple alerts that use the same alert IDs, the latest open incident for this correlation ID is closed unless you specify the external ID.\n","maxLength":100,"default":"{{rule.id}}:{{alert.id}}"},"externalId":{"type":"string","nullable":true,"description":"The unique identifier (`incidentId`) for the incident in ServiceNow."}}}}}}},"run_createalert":{"title":"The createAlert subaction","type":"object","required":["subAction","subActionParams"],"description":"The `createAlert` subaction for Opsgenie and TheHive connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["createAlert"]},"subActionParams":{"type":"object","properties":{"actions":{"type":"array","description":"The custom actions available to the alert in Opsgenie connectors.","items":{"type":"string"}},"alias":{"type":"string","description":"The unique identifier used for alert deduplication in Opsgenie."},"description":{"type":"string","description":"A description that provides detailed information about the alert."},"details":{"type":"object","description":"The custom properties of the alert in Opsgenie connectors.","additionalProperties":true,"example":{"key1":"value1","key2":"value2"}},"entity":{"type":"string","description":"The domain of the alert in Opsgenie connectors. For example, the application or server name."},"message":{"type":"string","description":"The alert message in Opsgenie connectors."},"note":{"type":"string","description":"Additional information for the alert in Opsgenie connectors."},"priority":{"type":"string","description":"The priority level for the alert in Opsgenie connectors.","enum":["P1","P2","P3","P4","P5"]},"responders":{"type":"array","description":"The entities to receive notifications about the alert in Opsgenie connectors. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required.\n","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier for the entity."},"name":{"type":"string","description":"The name of the entity."},"type":{"type":"string","description":"The type of responders, in this case `escalation`.","enum":["escalation","schedule","team","user"]},"username":{"type":"string","description":"A valid email address for the user."}}}},"severity":{"type":"integer","minimum":1,"maximum":4,"description":"The severity of the incident for TheHive connectors. The value ranges from 1 (low) to 4 (critical) with a default value of 2 (medium).\n"},"source":{"type":"string","description":"The display name for the source of the alert in Opsgenie and TheHive connectors."},"sourceRef":{"type":"string","description":"A source reference for the alert in TheHive connectors."},"tags":{"type":"array","description":"The tags for the alert in Opsgenie and TheHive connectors.","items":{"type":"string"}},"title":{"type":"string","description":"A title for the incident for TheHive connectors. It is used for searching the contents of the knowledge base.\n"},"tlp":{"type":"integer","minimum":0,"maximum":4,"default":2,"description":"The traffic light protocol designation for the incident in TheHive connectors. Valid values include: 0 (clear), 1 (green), 2 (amber), 3 (amber and strict), and 4 (red).\n"},"type":{"type":"string","description":"The type of alert in TheHive connectors."},"user":{"type":"string","description":"The display name for the owner."},"visibleTo":{"type":"array","description":"The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required.","items":{"type":"object","required":["type"],"properties":{"id":{"type":"string","description":"The identifier for the entity."},"name":{"type":"string","description":"The name of the entity."},"type":{"type":"string","description":"Valid values are `team` and `user`.","enum":["team","user"]},"username":{"type":"string","description":"The user name. This property is required only when the `type` is `user`."}}}}}}}},"run_fieldsbyissuetype":{"title":"The fieldsByIssueType subaction","type":"object","required":["subAction","subActionParams"],"description":"The `fieldsByIssueType` subaction for Jira connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["fieldsByIssueType"]},"subActionParams":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The Jira issue type identifier.","example":10024}}}}},"run_getagentdetails":{"title":"The getAgentDetails subaction","type":"object","required":["subAction","subActionParams"],"description":"The `getAgentDetails` subaction for CrowdStrike connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getAgentDetails"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","required":["ids"],"properties":{"ids":{"type":"array","description":"An array of CrowdStrike agent identifiers.","items":{"type":"string"}}}}}},"run_getagents":{"title":"The getAgents subaction","type":"object","required":["subAction"],"description":"The `getAgents` subaction for SentinelOne connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getAgents"]}}},"run_getchoices":{"title":"The getChoices subaction","type":"object","required":["subAction","subActionParams"],"description":"The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getChoices"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","required":["fields"],"properties":{"fields":{"type":"array","description":"An array of fields.","items":{"type":"string"}}}}}},"run_getfields":{"title":"The getFields subaction","type":"object","required":["subAction"],"description":"The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getFields"]}}},"run_getincident":{"title":"The getIncident subaction","type":"object","description":"The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors.","required":["subAction","subActionParams"],"properties":{"subAction":{"type":"string","description":"The action to test.","enum":["getIncident"]},"subActionParams":{"type":"object","required":["externalId"],"properties":{"externalId":{"type":"string","description":"The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier.","example":71778}}}}},"run_issue":{"title":"The issue subaction","type":"object","required":["subAction"],"description":"The `issue` subaction for Jira connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["issue"]},"subActionParams":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The Jira issue identifier.","example":71778}}}}},"run_issues":{"title":"The issues subaction","type":"object","required":["subAction","subActionParams"],"description":"The `issues` subaction for Jira connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["issues"]},"subActionParams":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"The title of the Jira issue."}}}}},"run_issuetypes":{"title":"The issueTypes subaction","type":"object","required":["subAction"],"description":"The `issueTypes` subaction for Jira connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["issueTypes"]}}},"run_postmessage":{"title":"The postMessage subaction","type":"object","description":"Test an action that sends a message to Slack. It is applicable only when the connector type is `.slack_api`.\n","required":["subAction","subActionParams"],"properties":{"subAction":{"type":"string","description":"The action to test.","enum":["postMessage"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","properties":{"channelIds":{"type":"array","maxItems":1,"description":"The Slack channel identifier, which must be one of the `allowedChannels` in the connector configuration.\n","items":{"type":"string"}},"channels":{"type":"array","deprecated":true,"description":"The name of a channel that your Slack app has access to.\n","maxItems":1,"items":{"type":"string"}},"text":{"type":"string","description":"The Slack message text. If it is a Slack webhook connector, the text cannot contain Markdown, images, or other advanced formatting. If it is a Slack web API connector, it can contain either plain text or block kit messages.\n","minLength":1}}}}},"run_pushtoservice":{"title":"The pushToService subaction","type":"object","required":["subAction","subActionParams"],"description":"The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, Swimlane, TheHive, and Webhook - Case Management connectors.","properties":{"subAction":{"type":"string","description":"The action to test.","enum":["pushToService"]},"subActionParams":{"type":"object","description":"The set of configuration properties for the action.","properties":{"comments":{"type":"array","description":"Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, Swimlane, or TheHive.","items":{"type":"object","properties":{"comment":{"type":"string","description":"A comment related to the incident. For example, describe how to troubleshoot the issue."},"commentId":{"type":"integer","description":"A unique identifier for the comment."}}}},"incident":{"type":"object","description":"Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, Swimlane, or TheHive incident.","properties":{"additional_fields":{"type":"string","nullable":true,"maxLength":20,"description":"Additional fields for ServiceNow ITSM and ServiveNow SecOps connectors. The fields must exist in the Elastic ServiceNow application and must be specified in JSON format.\n"},"alertId":{"type":"string","description":"The alert identifier for Swimlane connectors."},"caseId":{"type":"string","description":"The case identifier for the incident for Swimlane connectors."},"caseName":{"type":"string","description":"The case name for the incident for Swimlane connectors."},"category":{"type":"string","description":"The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors."},"correlation_display":{"type":"string","description":"A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors."},"correlation_id":{"type":"string","description":"The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert.\n"},"description":{"type":"string","description":"The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, Swimlane, TheHive, and Webhook - Case Management connectors."},"dest_ip":{"description":"A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"externalId":{"type":"string","description":"The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created.\n"},"id":{"type":"string","description":"The external case identifier for Webhook - Case Management connectors."},"impact":{"type":"string","description":"The impact of the incident for ServiceNow ITSM connectors."},"issueType":{"type":"integer","description":"The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`."},"labels":{"type":"array","items":{"type":"string"},"description":"The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces.\n"},"malware_hash":{"description":"A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"malware_url":{"type":"string","description":"A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"otherFields":{"type":"object","additionalProperties":true,"maxProperties":20,"description":"Custom field identifiers and their values for Jira connectors.\n"},"parent":{"type":"string","description":"The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues."},"priority":{"type":"string","description":"The priority of the incident in Jira and ServiceNow SecOps connectors."},"ruleName":{"type":"string","description":"The rule name for Swimlane connectors."},"severity":{"type":"integer","description":"The severity of the incident for ServiceNow ITSM, Swimlane, and TheHive connectors. In TheHive connectors, the severity value ranges from 1 (low) to 4 (critical) with a default value of 2 (medium).\n"},"short_description":{"type":"string","description":"A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base.\n"},"source_ip":{"description":"A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"status":{"type":"string","description":"The status of the incident for Webhook - Case Management connectors."},"subcategory":{"type":"string","description":"The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors."},"summary":{"type":"string","description":"A summary of the incident for Jira connectors."},"tags":{"type":"array","items":{"type":"string"},"description":"A list of tags for TheHive and Webhook - Case Management connectors."},"title":{"type":"string","description":"A title for the incident for Jira, TheHive, and Webhook - Case Management connectors. It is used for searching the contents of the knowledge base.\n"},"tlp":{"type":"integer","minimum":0,"maximum":4,"default":2,"description":"The traffic light protocol designation for the incident in TheHive connectors. Valid values include: 0 (clear), 1 (green), 2 (amber), 3 (amber and strict), and 4 (red).\n"},"urgency":{"type":"string","description":"The urgency of the incident for ServiceNow ITSM connectors."}}}}}}},"run_validchannelid":{"title":"The validChannelId subaction","type":"object","description":"Retrieves information about a valid Slack channel identifier. It is applicable only when the connector type is `.slack_api`.\n","required":["subAction","subActionParams"],"properties":{"subAction":{"type":"string","description":"The action to test.","enum":["validChannelId"]},"subActionParams":{"type":"object","required":["channelId"],"properties":{"channelId":{"type":"string","description":"The Slack channel identifier.","example":"C123ABC456"}}}}},"params_property_apm_anomaly":{"required":["windowSize","windowUnit","environment","anomalySeverityType"],"properties":{"serviceName":{"type":"string","description":"Filter the rule to apply to a specific service name."},"transactionType":{"type":"string","description":"Filter the rule to apply to a specific transaction type."},"windowSize":{"type":"number","example":6,"description":"The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n"},"windowUnit":{"type":"string","description":"The type of units for the time window. For example: minutes, hours, or days.\n","enum":["m","h","d"]},"environment":{"type":"string","description":"Filter the rule to apply to a specific environment."},"anomalySeverityType":{"type":"string","description":"The severity of anomalies that will generate alerts: critical, major, minor, or warning.\n","enum":["critical","major","minor","warning"]}}},"params_property_apm_error_count":{"required":["windowSize","windowUnit","threshold","environment"],"properties":{"serviceName":{"type":"string","description":"Filter the errors coming from your application to apply the rule to a specific service."},"windowSize":{"type":"number","description":"The time frame in which the errors must occur (in `windowUnit` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n","example":6},"windowUnit":{"type":"string","description":"The type of units for the time window: minutes, hours, or days.\n","enum":["m","h","d"]},"environment":{"type":"string","description":"Filter the errors coming from your application to apply the rule to a specific environment."},"threshold":{"type":"number","description":"The error count threshold."},"groupBy":{"type":"array","default":["service.name","service.environment"],"uniqueItems":true,"items":{"type":"string","enum":["service.name","service.environment","transaction.name","error.grouping_key"]},"description":"Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.\n"},"errorGroupingKey":{"type":"string","description":"Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.\n"}}},"params_property_apm_transaction_duration":{"required":["windowSize","windowUnit","threshold","environment","aggregationType"],"properties":{"serviceName":{"type":"string","description":"Filter the rule to apply to a specific service."},"transactionType":{"type":"string","description":"Filter the rule to apply to a specific transaction type."},"transactionName":{"type":"string","description":"Filter the rule to apply to a specific transaction name."},"windowSize":{"type":"number","description":"The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n","example":6},"windowUnit":{"type":"string","description":"The type of units for the time window. For example: minutes, hours, or days.\n","enum":["m","h","d"]},"environment":{"type":"string","description":"Filter the rule to apply to a specific environment."},"threshold":{"type":"number","description":"The latency threshold value."},"groupBy":{"type":"array","default":["service.name","service.environment","transaction.type"],"uniqueItems":true,"items":{"type":"string","enum":["service.name","service.environment","transaction.type","transaction.name"]},"description":"Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.\n"},"aggregationType":{"type":"string","enum":["avg","95th","99th"],"description":"The type of aggregation to perform."}}},"params_property_apm_transaction_error_rate":{"required":["windowSize","windowUnit","threshold","environment"],"properties":{"serviceName":{"type":"string","description":"The service name from APM"},"transactionType":{"type":"string","description":"The transaction type from APM"},"transactionName":{"type":"string","description":"The transaction name from APM"},"windowSize":{"type":"number","description":"The window size","example":6},"windowUnit":{"type":"string","description":"The window size unit","enum":["m","h","d"]},"environment":{"type":"string","description":"The environment from APM"},"threshold":{"type":"number","description":"The error rate threshold value"},"groupBy":{"type":"array","default":["service.name","service.environment","transaction.type"],"uniqueItems":true,"items":{"type":"string","enum":["service.name","service.environment","transaction.type","transaction.name"]}}}},"aggfield":{"description":"The name of the numeric field that is used in the aggregation. This property is required when `aggType` is `avg`, `max`, `min` or `sum`.\n","type":"string"},"aggtype":{"description":"The type of aggregation to perform.","type":"string","enum":["avg","count","max","min","sum"],"default":"count"},"excludehitsfrompreviousrun":{"description":"Indicates whether to exclude matches from previous runs. If `true`, you can avoid alert duplication by excluding documents that have already been detected by the previous rule run. This option is not available when a grouping field is specified.\n","type":"boolean"},"groupby":{"description":"Indicates whether the aggregation is applied over all documents (`all`) or split into groups (`top`) using a grouping field (`termField`). If grouping is used, an alert will be created for each group when it exceeds the threshold; only the top groups (up to `termSize` number of groups) are checked.\n","type":"string","enum":["all","top"],"default":"all"},"size":{"description":"The number of documents to pass to the configured actions when the threshold condition is met.\n","type":"integer"},"termfield":{"description":"The names of up to four fields that are used for grouping the aggregation. This property is required when `groupBy` is `top`.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":4}]},"termsize":{"description":"This property is required when `groupBy` is `top`. It specifies the number of groups to check against the threshold and therefore limits the number of alerts on high cardinality fields.\n","type":"integer"},"threshold":{"description":"The threshold value that is used with the `thresholdComparator`. If the `thresholdComparator` is `between` or `notBetween`, you must specify the boundary values.\n","type":"array","items":{"type":"integer","example":4000}},"thresholdcomparator":{"description":"The comparison function for the threshold. For example, \"is above\", \"is above or equals\", \"is below\", \"is below or equals\", \"is between\", and \"is not between\".","type":"string","enum":["\u003e","\u003e=","\u003c","\u003c=","between","notBetween"],"example":"\u003e"},"timefield":{"description":"The field that is used to calculate the time window.","type":"string"},"timewindowsize":{"description":"The size of the time window (in `timeWindowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n","type":"integer","example":5},"timewindowunit":{"description":"The type of units for the time window: seconds, minutes, hours, or days.\n","type":"string","enum":["s","m","h","d"],"example":"m"},"params_es_query_dsl_rule":{"title":"Elasticsearch DSL query rule params","description":"An Elasticsearch query rule can run a query defined in Elasticsearch Query DSL and compare the number of matches to a configured threshold. These parameters are appropriate when `rule_type_id` is `.es-query`.\n","type":"object","required":["esQuery","index","threshold","thresholdComparator","timeField","timeWindowSize","timeWindowUnit"],"properties":{"aggField":{"$ref":"#/components/schemas/aggfield"},"aggType":{"$ref":"#/components/schemas/aggtype"},"esQuery":{"description":"The query definition, which uses Elasticsearch Query DSL.","type":"string"},"excludeHitsFromPreviousRun":{"$ref":"#/components/schemas/excludehitsfrompreviousrun"},"groupBy":{"$ref":"#/components/schemas/groupby"},"index":{"description":"The indices to query.","oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"searchType":{"description":"The type of query, in this case a query that uses Elasticsearch Query DSL.","type":"string","enum":["esQuery"],"default":"esQuery","example":"esQuery"},"size":{"$ref":"#/components/schemas/size"},"termField":{"$ref":"#/components/schemas/termfield"},"termSize":{"$ref":"#/components/schemas/termsize"},"threshold":{"$ref":"#/components/schemas/threshold"},"thresholdComparator":{"$ref":"#/components/schemas/thresholdcomparator"},"timeField":{"$ref":"#/components/schemas/timefield"},"timeWindowSize":{"$ref":"#/components/schemas/timewindowsize"},"timeWindowUnit":{"$ref":"#/components/schemas/timewindowunit"}}},"params_es_query_esql_rule":{"title":"Elasticsearch ES|QL query rule params","description":"An Elasticsearch query rule can run an ES|QL query and compare the number of matches to a configured threshold. These parameters are appropriate when `rule_type_id` is `.es-query`.\n","type":"object","required":["esqlQuery","searchType","size","threshold","thresholdComparator","timeWindowSize","timeWindowUnit"],"properties":{"aggField":{"$ref":"#/components/schemas/aggfield"},"aggType":{"$ref":"#/components/schemas/aggtype"},"esqlQuery":{"type":"object","required":["esql"],"properties":{"esql":{"description":"The query definition, which uses Elasticsearch Query Language.","type":"string"}}},"excludeHitsFromPreviousRun":{"$ref":"#/components/schemas/excludehitsfrompreviousrun"},"groupBy":{"$ref":"#/components/schemas/groupby"},"searchType":{"description":"The type of query, in this case a query that uses Elasticsearch Query Language (ES|QL).","type":"string","enum":["esqlQuery"],"example":"esqlQuery"},"size":{"type":"integer","description":"When `searchType` is `esqlQuery`, this property is required but it does not affect the rule behavior.\n","example":0},"termSize":{"$ref":"#/components/schemas/termsize"},"threshold":{"type":"array","items":{"type":"integer","minimum":0,"maximum":0},"description":"The threshold value that is used with the `thresholdComparator`. When `searchType` is `esqlQuery`, this property is required and must be set to zero.\n"},"thresholdComparator":{"type":"string","description":"The comparison function for the threshold. When `searchType` is `esqlQuery`, this property is required and must be set to \"\u003e\". Since the `threshold` value must be `0`, the result is that an alert occurs whenever the query returns results.\n","enum":["\u003e"],"example":"\u003e"},"timeField":{"$ref":"#/components/schemas/timefield"},"timeWindowSize":{"$ref":"#/components/schemas/timewindowsize"},"timeWindowUnit":{"$ref":"#/components/schemas/timewindowunit"}}},"filter":{"type":"object","description":"A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.","properties":{"meta":{"type":"object","properties":{"alias":{"type":"string","nullable":true},"controlledBy":{"type":"string"},"disabled":{"type":"boolean"},"field":{"type":"string"},"group":{"type":"string"},"index":{"type":"string"},"isMultiIndex":{"type":"boolean"},"key":{"type":"string"},"negate":{"type":"boolean"},"params":{"type":"object"},"type":{"type":"string"},"value":{"type":"string"}}},"query":{"type":"object"},"$state":{"type":"object"}}},"params_es_query_kql_rule":{"title":"Elasticsearch KQL query rule params","description":"An Elasticsearch query rule can run a query defined in KQL or Lucene and compare the number of matches to a configured threshold. These parameters are appropriate when `rule_type_id` is `.es-query`.\n","type":"object","required":["searchType","size","threshold","thresholdComparator","timeWindowSize","timeWindowUnit"],"properties":{"aggField":{"$ref":"#/components/schemas/aggfield"},"aggType":{"$ref":"#/components/schemas/aggtype"},"excludeHitsFromPreviousRun":{"$ref":"#/components/schemas/excludehitsfrompreviousrun"},"groupBy":{"$ref":"#/components/schemas/groupby"},"searchConfiguration":{"description":"The query definition, which uses KQL or Lucene to fetch the documents from Elasticsearch.","type":"object","properties":{"filter":{"type":"array","items":{"$ref":"#/components/schemas/filter"}},"index":{"description":"The indices to query.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"query":{"type":"object","properties":{"language":{"type":"string","example":"kuery"},"query":{"type":"string"}}}}},"searchType":{"description":"The type of query, in this case a text-based query that uses KQL or Lucene.","type":"string","enum":["searchSource"],"example":"searchSource"},"size":{"$ref":"#/components/schemas/size"},"termField":{"$ref":"#/components/schemas/termfield"},"termSize":{"$ref":"#/components/schemas/termsize"},"threshold":{"$ref":"#/components/schemas/threshold"},"thresholdComparator":{"$ref":"#/components/schemas/thresholdcomparator"},"timeField":{"$ref":"#/components/schemas/timefield"},"timeWindowSize":{"$ref":"#/components/schemas/timewindowsize"},"timeWindowUnit":{"$ref":"#/components/schemas/timewindowunit"}}},"params_index_threshold_rule":{"title":"Index threshold rule params","description":"An index threshold rule runs an Elasticsearch query, aggregates field values from documents, compares them to threshold values, and schedules actions to run when the thresholds are met. These parameters are appropriate when `rule_type_id` is `.index-threshold`.","type":"object","required":["index","threshold","thresholdComparator","timeField","timeWindowSize","timeWindowUnit"],"properties":{"aggField":{"$ref":"#/components/schemas/aggfield"},"aggType":{"$ref":"#/components/schemas/aggtype"},"filterKuery":{"description":"A KQL expression thats limits the scope of alerts.","type":"string"},"groupBy":{"$ref":"#/components/schemas/groupby"},"index":{"description":"The indices to query.","type":"array","items":{"type":"string"}},"termField":{"$ref":"#/components/schemas/termfield"},"termSize":{"$ref":"#/components/schemas/termsize"},"threshold":{"$ref":"#/components/schemas/threshold"},"thresholdComparator":{"$ref":"#/components/schemas/thresholdcomparator"},"timeField":{"$ref":"#/components/schemas/timefield"},"timeWindowSize":{"$ref":"#/components/schemas/timewindowsize"},"timeWindowUnit":{"$ref":"#/components/schemas/timewindowunit"}}},"params_property_infra_inventory":{"properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["count","cpu","diskLatency","load","memory","memoryTotal","tx","rx","logRate","diskIOReadBytes","diskIOWriteBytes","s3TotalRequests","s3NumberOfObjects","s3BucketSize","s3DownloadBytes","s3UploadBytes","rdsConnections","rdsQueriesExecuted","rdsActiveTransactions","rdsLatency","sqsMessagesVisible","sqsMessagesDelayed","sqsMessagesSent","sqsMessagesEmpty","sqsOldestMessage","custom"]},"timeSize":{"type":"number"},"timeUnit":{"type":"string","enum":["s","m","h","d"]},"sourceId":{"type":"string"},"threshold":{"type":"array","items":{"type":"number"}},"comparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"customMetric":{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"field":{"type":"string"},"aggregation":{"type":"string","enum":["avg","max","min","rate"]},"id":{"type":"string"},"label":{"type":"string"}}},"warningThreshold":{"type":"array","items":{"type":"number"}},"warningComparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]}}}},"filterQuery":{"type":"string"},"filterQueryText":{"type":"string"},"nodeType":{"type":"string","enum":["host","pod","container","awsEC2","awsS3","awsSQS","awsRDS"]},"sourceId":{"type":"string"},"alertOnNoData":{"type":"boolean"}}},"params_property_log_threshold":{"oneOf":[{"title":"Count","type":"object","required":["count","timeSize","timeUnit","logView"],"properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","example":"my.field"},"comparator":{"type":"string","enum":["more than","more than or equals","less than","less than or equals","equals","does not equal","matches","does not match","matches phrase","does not match phrase"]},"value":{"oneOf":[{"type":"number","example":42},{"type":"string","example":"value"}]}}}},"count":{"type":"object","properties":{"comparator":{"type":"string","enum":["more than","more than or equals","less than","less than or equals","equals","does not equal","matches","does not match","matches phrase","does not match phrase"]},"value":{"type":"number","example":100}}},"timeSize":{"type":"number","example":6},"timeUnit":{"type":"string","enum":["s","m","h","d"]},"logView":{"type":"object","properties":{"logViewId":{"type":"string"},"type":{"type":"string","enum":["log-view-reference"],"example":"log-view-reference"}}},"groupBy":{"type":"array","items":{"type":"string"}}}},{"title":"Ratio","type":"object","required":["count","timeSize","timeUnit","logView"],"properties":{"criteria":{"type":"array","items":{"minItems":2,"maxItems":2,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","example":"my.field"},"comparator":{"type":"string","enum":["more than","more than or equals","less than","less than or equals","equals","does not equal","matches","does not match","matches phrase","does not match phrase"]},"value":{"oneOf":[{"type":"number","example":42},{"type":"string","example":"value"}]}}}}},"count":{"type":"object","properties":{"comparator":{"type":"string","enum":["more than","more than or equals","less than","less than or equals","equals","does not equal","matches","does not match","matches phrase","does not match phrase"]},"value":{"type":"number","example":100}}},"timeSize":{"type":"number","example":6},"timeUnit":{"type":"string","enum":["s","m","h","d"]},"logView":{"type":"object","properties":{"logViewId":{"type":"string"},"type":{"type":"string","enum":["log-view-reference"],"example":"log-view-reference"}}},"groupBy":{"type":"array","items":{"type":"string"}}}}]},"params_property_infra_metric_threshold":{"properties":{"criteria":{"type":"array","items":{"oneOf":[{"title":"non count criterion","type":"object","properties":{"threshold":{"type":"array","items":{"type":"number"},"description":"The threshold value that is used with the `comparator`. If the `comparator` is `between`, you must specify the boundary values.\n"},"comparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"],"description":"The comparison function for the threshold. For example, \"is above\", \"is above or equals\", \"is below\", \"is below or equals\", \"is between\", and \"outside\".\n"},"timeUnit":{"type":"string","enum":["s","m","h","d"],"description":"The type of units for the time window: seconds, minutes, hours, or days.\n"},"timeSize":{"type":"number","description":"The size of the time window (in `timeUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n"},"warningThreshold":{"type":"array","items":{"type":"number"},"description":"The threshold value that is used with the `warningComparator`. If the `warningComparator` is `between`, you must specify the boundary values.\n"},"warningComparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"metric":{"type":"string"},"aggType":{"type":"string","enum":["avg","max","min","cardinality","rate","count","sum","p95","p99","custom"]}}},{"title":"count criterion","type":"object","properties":{"threshold":{"type":"array","items":{"type":"number"}},"comparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"timeUnit":{"type":"string","enum":["s","m","h","d"],"description":"The type of units for the time window: seconds, minutes, hours, or days.\n"},"timeSize":{"type":"number","description":"The size of the time window (in `timeUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n"},"warningThreshold":{"type":"array","items":{"type":"number"}},"warningComparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"aggType":{"type":"string","enum":["count"]}}},{"title":"custom criterion","type":"object","properties":{"threshold":{"type":"array","items":{"type":"number"}},"comparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"timeUnit":{"type":"string","enum":["s","m","h","d"],"description":"The type of units for the time window: seconds, minutes, hours, or days.\n"},"timeSize":{"type":"number","description":"The size of the time window (in `timeUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n"},"warningThreshold":{"type":"array","items":{"type":"number"}},"warningComparator":{"type":"string","enum":["\u003c","\u003c=","\u003e","\u003e=","between","outside"]},"aggType":{"type":"string","enum":["custom"]},"customMetric":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"name":{"type":"string"},"aggType":{"type":"string","enum":["avg","sum","max","min","cardinality"],"description":"An aggregation to gather data for the rule. For example, find the average, highest or lowest value of a numeric field. Or use a cardinality aggregation to find the approximate number of unique values in a field. \n"},"field":{"type":"string"}}},{"type":"object","properties":{"name":{"type":"string"},"aggType":{"type":"string","enum":["count"]},"filter":{"type":"string"}}}]}},"equation":{"type":"string"},"label":{"type":"string"}}}]}},"groupBy":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Create an alert for every unique value of the specified fields. For example, you can create a rule per host or every mount point of each host.\nIMPORTANT: If you include the same field in both the `filterQuery` and `groupBy`, you might receive fewer results than you expect. For example, if you filter by `cloud.region: us-east`, grouping by `cloud.region` will have no effect because the filter query can match only one region.\n"},"filterQuery":{"type":"string","description":"A query that limits the scope of the rule. The rule evaluates only metric data that matches the query.\n"},"sourceId":{"type":"string"},"alertOnNoData":{"type":"boolean","description":"If true, an alert occurs if the metrics do not report any data over the expected period or if the query fails."},"alertOnGroupDisappear":{"type":"boolean","description":"If true, an alert occurs if a group that previously reported metrics does not report them again over the expected time period. This check is not recommended for dynamically scaling infrastructures that might rapidly start and stop nodes automatically.\n"}}},"params_property_slo_burn_rate":{"properties":{"sloId":{"description":"The SLO identifier used by the rule","type":"string","example":"8853df00-ae2e-11ed-90af-09bb6422b258"},"burnRateThreshold":{"description":"The burn rate threshold used to trigger the alert","type":"number","example":14.4},"maxBurnRateThreshold":{"description":"The maximum burn rate threshold value defined by the SLO error budget","type":"number","example":168},"longWindow":{"description":"The duration of the long window used to compute the burn rate","type":"object","properties":{"value":{"description":"The duration value","type":"number","example":6},"unit":{"description":"The duration unit","type":"string","example":"h"}}},"shortWindow":{"description":"The duration of the short window used to compute the burn rate","type":"object","properties":{"value":{"description":"The duration value","type":"number","example":30},"unit":{"description":"The duration unit","type":"string","example":"m"}}}}},"params_property_synthetics_uptime_tls":{"properties":{"search":{"type":"string"},"certExpirationThreshold":{"type":"number"},"certAgeThreshold":{"type":"number"}}},"params_property_synthetics_monitor_status":{"required":["numTimes","shouldCheckStatus","shouldCheckAvailability"],"properties":{"availability":{"type":"object","properties":{"range":{"type":"number"},"rangeUnit":{"type":"string"},"threshold":{"type":"string"}}},"filters":{"oneOf":[{"type":"string"},{"type":"object","deprecated":true,"properties":{"monitor.type":{"type":"array","items":{"type":"string"}},"observer.geo.name":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"url.port":{"type":"array","items":{"type":"string"}}}}]},"locations":{"deprecated":true,"type":"array","items":{"type":"string"}},"numTimes":{"type":"number"},"search":{"type":"string"},"shouldCheckStatus":{"type":"boolean"},"shouldCheckAvailability":{"type":"boolean"},"timerangeCount":{"type":"number"},"timerangeUnit":{"type":"string"},"timerange":{"deprecated":true,"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"version":{"type":"number"},"isAutoGenerated":{"type":"boolean"}}}},"securitySchemes":{"apiKeyAuth":{"description":"These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`\n","in":"header","name":"Authorization","type":"apiKey"},"basicAuth":{"scheme":"basic","type":"http"}}},"x-topics":[{"title":"Kibana spaces","content":"Spaces enable you to organize your dashboards and other saved objects into meaningful categories.\nYou can use the default space or create your own spaces.\n\nTo run APIs in non-default spaces, you must add `s/{space_id}/` to the path.\nFor example:\n\n```\ncurl -X GET \"http://localhost:5601/s/marketing/api/data_views\"\n```\n\nIf you use the Kibana console to send API requests, it automatically adds the appropriate space identifier.\n\nTo learn more, check out [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces).\n"}]} \ No newline at end of file diff --git a/src/Elastic.ApiExplorer/Landing/LandingNavigationItem.cs b/src/Elastic.ApiExplorer/Landing/LandingNavigationItem.cs index 56f61dd498..97a8692dde 100644 --- a/src/Elastic.ApiExplorer/Landing/LandingNavigationItem.cs +++ b/src/Elastic.ApiExplorer/Landing/LandingNavigationItem.cs @@ -68,7 +68,7 @@ INodeNavigationItem parent { /// - public string Url => NavigationItems.First().Url; + public virtual string Url => NavigationItems.First().Url; /// public abstract string NavigationTitle { get; } @@ -100,6 +100,9 @@ INodeNavigationItem parent public class ClassificationNavigationItem(ApiClassification classification, LandingNavigationItem rootNavigation, LandingNavigationItem parent) : ApiGroupingNavigationItem(classification, rootNavigation, parent), IRootNavigationItem { + /// Section titles from x-tagGroups are not their own page; the sidebar link targets the main API overview for the product, not a tag (or the first child) page. + public override string Url => rootNavigation.Index.Url; + /// public override string NavigationTitle { get; } = classification.Name; @@ -113,9 +116,20 @@ void IAssignableChildrenNavigation.SetNavigationItems(IReadOnlyCollection rootNavigation, INodeNavigationItem parent) +public class TagNavigationItem( + ApiTag tag, + string? urlPathPrefix, + string apiUrlSuffix, + IRootNavigationItem rootNavigation, + INodeNavigationItem parent +) : ApiGroupingNavigationItem(tag, rootNavigation, parent) { + private readonly string _url = $"{urlPathPrefix?.TrimEnd('/')}/api/{apiUrlSuffix}/tags/{tag.TagUrlSegment}/"; + + /// + public override string Url => _url; + /// public override string NavigationTitle { get; } = tag.DisplayName; diff --git a/src/Elastic.ApiExplorer/Landing/LandingView.cshtml b/src/Elastic.ApiExplorer/Landing/LandingView.cshtml index fb7013098d..ba61291e64 100644 --- a/src/Elastic.ApiExplorer/Landing/LandingView.cshtml +++ b/src/Elastic.ApiExplorer/Landing/LandingView.cshtml @@ -43,7 +43,7 @@ else if (navigationItem is TagNavigationItem tag) { -

@(tag.NavigationTitle)

+

@tag.NavigationTitle

@RenderProduct(tag) } diff --git a/src/Elastic.ApiExplorer/Landing/TagLandingView.cshtml b/src/Elastic.ApiExplorer/Landing/TagLandingView.cshtml new file mode 100644 index 0000000000..9a2748d707 --- /dev/null +++ b/src/Elastic.ApiExplorer/Landing/TagLandingView.cshtml @@ -0,0 +1,97 @@ +@inherits RazorSliceHttpResult +@using Elastic.ApiExplorer +@using Elastic.ApiExplorer.Landing +@using Elastic.ApiExplorer.Operations +@using Elastic.Documentation.Navigation +@using Elastic.Documentation.Site.Navigation +@implements IUsesLayout +@functions { + public ApiLayoutViewModel LayoutModel => Model.CreateGlobalLayoutModel(); + + private IHtmlContent RenderOp(IReadOnlyCollection endpointOperations) + { + + + return HtmlString.Empty; + } + + private IHtmlContent RenderTagChild(INavigationItem item) + { + if (item is INodeNavigationItem node) + { + foreach (var navigationItem in node.NavigationItems) + { + if (navigationItem is EndpointNavigationItem endpoint) + { + var endpointOperations = + endpoint is { NavigationItems.Count: > 0 } && endpoint.NavigationItems.All(n => n.Hidden) + ? endpoint.NavigationItems + : []; + if (endpointOperations.Count > 0) + { + + @(endpoint.NavigationTitle) + @RenderOp(endpointOperations) + + } + else + { + @RenderTagChild(endpoint) + } + } + else if (navigationItem is OperationNavigationItem operation) + { + + @(operation.NavigationTitle) + @RenderOp([operation]) + + } + else + { + throw new System.Exception($"Unexpected type on tag landing: {navigationItem.GetType().FullName}"); + } + } + } + + return HtmlString.Empty; + } +} +
+

@Model.Tag.DisplayName

+ @if (!string.Equals(Model.Tag.Name, Model.Tag.DisplayName, StringComparison.Ordinal)) + { +

@Model.Tag.Name

+ } + @if (!string.IsNullOrEmpty(Model.Tag.Description)) + { +
@Model.RenderMarkdown(Model.Tag.Description)
+ } + @{ + var ed = Model.Tag.ExternalDocs; + } + @if (ed is not null) + { + var externalDocsUrl = ed.Url; + var isElasticDocs = externalDocsUrl.Contains("www.elastic.co/docs", System.StringComparison.Ordinal) || externalDocsUrl.Contains("elastic.co/guide", System.StringComparison.Ordinal); + var linkText = string.IsNullOrWhiteSpace(ed.Description) ? "Documentation" : ed.Description; +

+ @linkText +

+ } +
+ + @RenderTagChild(Model.CurrentNavigationItem) +
+
+
diff --git a/src/Elastic.ApiExplorer/Landing/TagLandingViewModel.cs b/src/Elastic.ApiExplorer/Landing/TagLandingViewModel.cs new file mode 100644 index 0000000000..5adaed9138 --- /dev/null +++ b/src/Elastic.ApiExplorer/Landing/TagLandingViewModel.cs @@ -0,0 +1,15 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +using Elastic.ApiExplorer; + +namespace Elastic.ApiExplorer.Landing; + +public class TagLandingViewModel(ApiRenderContext context) : ApiViewModel(context) +{ + public required ApiTag Tag { get; init; } + + /// + protected override string? LayoutPageTitle => Tag.DisplayName; +} diff --git a/src/Elastic.ApiExplorer/OpenApiGenerator.cs b/src/Elastic.ApiExplorer/OpenApiGenerator.cs index 79e1996d16..15cfeef08e 100644 --- a/src/Elastic.ApiExplorer/OpenApiGenerator.cs +++ b/src/Elastic.ApiExplorer/OpenApiGenerator.cs @@ -17,6 +17,7 @@ using Elastic.Documentation.Site.Navigation; using Microsoft.Extensions.Logging; using Microsoft.OpenApi; +using RazorSlices; namespace Elastic.ApiExplorer; @@ -30,10 +31,24 @@ public record ApiClassification(string Name, string Description, IReadOnlyCollec public Task RenderAsync(FileSystemStream stream, ApiRenderContext context, CancellationToken ctx = default) => Task.CompletedTask; } -public record ApiTag(string Name, string DisplayName, string Description, IReadOnlyCollection Endpoints) : IApiGroupingModel +/// External documentation for an OpenAPI tag (tag-level externalDocs). +public record ApiTagExternalDoc(string? Description, string Url); + +public record ApiTag( + string Name, + string DisplayName, + string Description, + ApiTagExternalDoc? ExternalDocs, + string TagUrlSegment, + IReadOnlyCollection Endpoints) : IApiGroupingModel { /// - public Task RenderAsync(FileSystemStream stream, ApiRenderContext context, CancellationToken ctx = default) => Task.CompletedTask; + public async Task RenderAsync(FileSystemStream stream, ApiRenderContext context, Cancel ctx = default) + { + var viewModel = new TagLandingViewModel(context) { Tag = this }; + var slice = TagLandingView.Create(viewModel); + await slice.RenderAsync(stream, cancellationToken: ctx); + } } public record ApiEndpoint(List Operations, string? Name) : IApiGroupingModel @@ -56,8 +71,7 @@ public LandingNavigationItem CreateNavigation(string apiUrlSuffix, OpenApiDocume var url = $"{context.UrlPathPrefix}/api/" + apiUrlSuffix; var rootNavigation = new LandingNavigationItem(url); - // Parse x-displayName from OpenAPI tags for user-friendly display names - var tagDisplayNames = ParseTagDisplayNames(openApiDocument); + var tagMetadataByName = ParseOpenApiTagMetadata(openApiDocument); var xTagGroups = TryParseXTagGroups(openApiDocument); var orphanTagsLogged = new HashSet(StringComparer.Ordinal); @@ -89,6 +103,12 @@ public LandingNavigationItem CreateNavigation(string apiUrlSuffix, OpenApiDocume }) .ToArray(); + var distinctTagNames = ops + .Select(o => o.Tag ?? "unknown") + .Distinct() + .ToList(); + var tagNameToUrlSegment = BuildTagMonikerMap(distinctTagNames); + // intermediate grouping of models to create the navigation tree // this is two-phased because we need to know if an endpoint has one or more operations var presentClassifications = ops.Select(o => o.Classification).ToHashSet(); @@ -120,8 +140,19 @@ public LandingNavigationItem CreateNavigation(string apiUrlSuffix, OpenApiDocume apis.Add(apiEndpoint); } var tagName = tagGroup.Key ?? "unknown"; - var displayName = tagDisplayNames.TryGetValue(tagName, out var foundDisplayName) ? foundDisplayName : tagName; - var tag = new ApiTag(tagName, displayName, "", apis); + if (!tagMetadataByName.TryGetValue(tagName, out var tagMeta)) + tagMeta = new OpenApiTagMetadataEntry(tagName, string.Empty, null); + if (!tagNameToUrlSegment.TryGetValue(tagName, out var urlSegment)) + throw new InvalidOperationException( + $"Internal error: no URL segment for OpenAPI tag '{tagName}'."); + + var tag = new ApiTag( + tagName, + tagMeta.DisplayName, + tagMeta.Description, + tagMeta.ExternalDocs, + urlSegment, + apis); tags.Add(tag); } @@ -305,25 +336,13 @@ private void CreateTagNavigationItems( List> parentNavigationItems ) { - var hasTags = classification.Tags.Count > 1; foreach (var tag in classification.Tags) { var endpointNavigationItems = new List(); - if (hasTags) - { - var tagNavigationItem = new TagNavigationItem(tag, rootNavigation, parent); - CreateEndpointNavigationItems(apiUrlSuffix, rootNavigation, tag, tagNavigationItem, endpointNavigationItems); - parentNavigationItems.Add(tagNavigationItem); - tagNavigationItem.NavigationItems = endpointNavigationItems; - } - else - { - CreateEndpointNavigationItems(apiUrlSuffix, rootNavigation, tag, parent, endpointNavigationItems); - if (parent is ClassificationNavigationItem classificationNavigationItem) - classificationNavigationItem.NavigationItems = endpointNavigationItems; - else if (parent is LandingNavigationItem landingNavigationItem) - landingNavigationItem.NavigationItems = endpointNavigationItems; - } + var tagNavigationItem = new TagNavigationItem(tag, context.UrlPathPrefix, apiUrlSuffix, rootNavigation, parent); + CreateEndpointNavigationItems(apiUrlSuffix, rootNavigation, tag, tagNavigationItem, endpointNavigationItems); + parentNavigationItems.Add(tagNavigationItem); + tagNavigationItem.NavigationItems = endpointNavigationItems; } } @@ -422,7 +441,8 @@ private async Task RenderNavigationItems( { if (currentNavigation is INodeNavigationItem node) { - _ = await Render(prefix, node, node.Index.Model, renderContext, navigationRenderer, ctx); + if (currentNavigation is not ClassificationNavigationItem) + _ = await Render(prefix, node, node.Index.Model, renderContext, navigationRenderer, ctx); foreach (var child in node.NavigationItems) await RenderNavigationItems(prefix, renderContext, navigationRenderer, child, rootNavigation, ctx); @@ -629,15 +649,14 @@ private static List GetOrderedClassificationKeys(XTagGroupsDocument xTag private sealed record XTagGroupsDocument(IReadOnlyList OrderedGroupNames, IReadOnlyDictionary TagToGroup); /// - /// Parses x-displayName extensions from OpenAPI tag objects to build a mapping of tag names to display names. - /// Falls back to the canonical tag name when no x-displayName is present. + /// Parses global OpenAPI tag objects: description, externalDocs, and x-displayName. /// - private static Dictionary ParseTagDisplayNames(OpenApiDocument openApiDocument) + private static Dictionary ParseOpenApiTagMetadata(OpenApiDocument openApiDocument) { - var displayNames = new Dictionary(); + var result = new Dictionary(StringComparer.Ordinal); if (openApiDocument.Tags is null) - return displayNames; + return result; foreach (var tag in openApiDocument.Tags) { @@ -645,22 +664,69 @@ private static Dictionary ParseTagDisplayNames(OpenApiDocument o if (string.IsNullOrEmpty(tagName)) continue; - var displayName = tagName; // Default fallback + var displayName = tagName; + if (tag.Extensions?.TryGetValue("x-displayName", out var ext) == true && + ext is JsonNodeExtension jsonExt) + { + var v = jsonExt.Node.GetValue(); + if (!string.IsNullOrWhiteSpace(v)) + displayName = v; + } - // Look for x-displayName extension - if (tag.Extensions?.TryGetValue("x-displayName", out var extension) == true && - extension is JsonNodeExtension jsonExtension) + var description = tag.Description ?? string.Empty; + ApiTagExternalDoc? extDoc = null; + if (tag.ExternalDocs?.Url is not null) { - var displayNameValue = jsonExtension.Node.GetValue(); - if (!string.IsNullOrWhiteSpace(displayNameValue)) - { - displayName = displayNameValue; - } + var url = tag.ExternalDocs.Url.ToString(); + if (!string.IsNullOrEmpty(url)) + extDoc = new ApiTagExternalDoc(tag.ExternalDocs.Description, url); } - displayNames[tagName] = displayName; + result[tagName] = new OpenApiTagMetadataEntry(displayName, description, extDoc); } - return displayNames; + return result; } + + /// Deterministic single URL segment for .../tags/{segment}/ from the canonical tag name. + public static string GenerateTagMoniker(string? tagName) + { + if (string.IsNullOrWhiteSpace(tagName)) + return "unknown"; + + var s = tagName.Trim(); + s = string.Join(" ", s.Split(' ', StringSplitOptions.RemoveEmptyEntries)); + s = s.Replace("{", string.Empty, StringComparison.Ordinal); + s = s.Replace("}", string.Empty, StringComparison.Ordinal); + s = s.Replace("/", "-", StringComparison.Ordinal); + s = s.Replace(" ", "-", StringComparison.Ordinal); + if (string.IsNullOrEmpty(s)) + return "unknown"; + + return s; + } + + private static IReadOnlyDictionary BuildTagMonikerMap(IReadOnlyList distinctTagNames) + { + var toSegment = new Dictionary(StringComparer.Ordinal); + var segmentToTagName = new Dictionary(StringComparer.OrdinalIgnoreCase); + + foreach (var name in distinctTagNames) + { + var segment = GenerateTagMoniker(name); + if (segmentToTagName.TryGetValue(segment, out var existing) && !string.Equals(existing, name, StringComparison.Ordinal)) + { + throw new InvalidOperationException( + $"OpenAPI tag URL segment conflict: tags '{existing}' and '{name}' both normalize to the same path segment '{segment}'. " + + "Rename one of the tag names in the spec."); + } + + segmentToTagName[segment] = name; + toSegment[name] = segment; + } + + return toSegment; + } + + private sealed record OpenApiTagMetadataEntry(string DisplayName, string Description, ApiTagExternalDoc? ExternalDocs); } diff --git a/tests/Elastic.ApiExplorer.Tests/TagMetadataTests.cs b/tests/Elastic.ApiExplorer.Tests/TagMetadataTests.cs index 1c9e548b23..bd6b20e5ed 100644 --- a/tests/Elastic.ApiExplorer.Tests/TagMetadataTests.cs +++ b/tests/Elastic.ApiExplorer.Tests/TagMetadataTests.cs @@ -4,6 +4,7 @@ using System.IO.Abstractions; using AwesomeAssertions; +using Elastic.ApiExplorer; using Elastic.ApiExplorer.Landing; using Elastic.Documentation; using Elastic.Documentation.Configuration; @@ -610,6 +611,44 @@ public async Task Tags_WithinClassification_SortedCorrectly() tagItems[1].NavigationTitle.Should().Be("Watcher API", "Should sort by displayName"); } + [Fact] + public async Task XTagGroups_Classification_Url_PointsToApiOverview_NotFirstTag() + { + var openApiJson = /*lang=json,strict*/ """ + { + "openapi": "3.0.3", + "info": { "title": "ES", "version": "1.0" }, + "paths": { + "/a": { "get": { "operationId": "a1", "tags": ["watcher"], "responses": { "200": { "description": "ok" } } } }, + "/b": { "get": { "operationId": "b1", "tags": ["tasks"], "responses": { "200": { "description": "ok" } } } }, + "/c": { "get": { "operationId": "c1", "tags": ["search"], "responses": { "200": { "description": "ok" } } } } + }, + "tags": [ + { "name": "watcher", "x-displayName": "Watcher" }, + { "name": "tasks", "x-displayName": "Task management" }, + { "name": "search" } + ], + "x-tagGroups": [ + { "name": "Information", "tags": ["watcher", "tasks"] }, + { "name": "Search", "tags": ["search"] } + ] + } + """; + + var (generator, openApiDocument) = await CreateGeneratorWithSpec(openApiJson); + var navigation = generator.CreateNavigation("elasticsearch", openApiDocument); + + var expectedOverviewUrl = navigation.Index.Url; + var informationGroup = navigation.NavigationItems + .OfType() + .First(c => c.NavigationTitle == "Information"); + informationGroup.Url.Should().Be(expectedOverviewUrl); + + var firstTag = informationGroup.NavigationItems.OfType().First(); + informationGroup.Url.Should().NotBe(firstTag.Url); + firstTag.Url.Should().Contain("/tags/"); + } + [Fact] public async Task WithoutXTagGroups_ElasticsearchTitle_UsesFlatTagNavigation() { @@ -707,8 +746,7 @@ public async Task XTagGroups_ClassificationOrder_FollowsSpecOrder() [Fact] public async Task XTagGroups_OrphanTag_AssignsUnknownGroup() { - // Two unlisted tags so the "unknown" classification has multiple tags; with a single tag, - // CreateTagNavigationItems attaches operations directly to the parent (no TagNavigationItem). + // Two unlisted tags so the "unknown" classification has multiple tags; each is still a TagNavigationItem. var openApiJson = /*lang=json,strict*/ """ { "openapi": "3.0.3", @@ -764,4 +802,129 @@ public async Task XTagGroups_OrphanTag_AssignsUnknownGroup() .Should() .Equal("not_in_any_group", "other_orphan"); } + + [Fact] + public async Task Single_Tag_Still_Creates_TagNavigationItem() + { + var openApiJson = /*lang=json,strict*/ """ + { + "openapi": "3.0.3", + "info": { "title": "Solo", "version": "1.0" }, + "paths": { + "/solo": { + "get": { + "operationId": "solo-op", + "tags": ["only"], + "responses": { "200": { "description": "ok" } } + } + } + }, + "tags": [ + { "name": "only", "description": "Solo tag group." } + ] + } + """; + + var (generator, openApiDocument) = await CreateGeneratorWithSpec(openApiJson); + var navigation = generator.CreateNavigation("test", openApiDocument); + + var items = navigation.NavigationItems.OfType().ToList(); + items.Should().HaveCount(1); + var tag = items[0].Index.Model.Should().BeOfType().Subject; + tag.Name.Should().Be("only"); + tag.TagUrlSegment.Should().Be("only"); + tag.Description.Should().Be("Solo tag group."); + } + + [Fact] + public void GenerateTagMoniker_DataStream_Uses_Hyphen() + { + OpenApiGenerator.GenerateTagMoniker("data stream").Should().Be("data-stream"); + } + + [Fact] + public async Task Tag_Url_Uses_Tags_Segment() + { + var openApiJson = /*lang=json,strict*/ """ + { + "openapi": "3.0.3", + "info": { "title": "T", "version": "1.0" }, + "paths": { + "/a": { "get": { "operationId": "a1", "tags": ["alpha"], "responses": { "200": { "description": "ok" } } } }, + "/b": { "get": { "operationId": "b1", "tags": ["beta"], "responses": { "200": { "description": "ok" } } } } + }, + "tags": [ { "name": "alpha" }, { "name": "beta" } ] + } + """; + + var (generator, openApiDocument) = await CreateGeneratorWithSpec(openApiJson); + var navigation = generator.CreateNavigation("es", openApiDocument); + + var alpha = FindTagNavigationItem(navigation, "alpha"); + alpha.Should().NotBeNull(); + alpha.Url.Should().EndWith("/api/es/tags/alpha/"); + + alpha.Index.Model.Should().BeOfType().Which.TagUrlSegment.Should().Be("alpha"); + } + + [Fact] + public async Task Tag_Landing_Parses_Description_And_ExternalDocs_Like_Elasticsearch_Connector_Tag() + { + var openApiJson = /*lang=json,strict*/ """ + { + "openapi": "3.0.3", + "info": { "title": "ES", "version": "1.0" }, + "paths": { + "/c": { "get": { "operationId": "c1", "tags": ["connector"], "responses": { "200": { "description": "ok" } } } } + }, + "tags": [ + { + "name": "connector", + "description": "The connector and sync jobs APIs provide a convenient way to create and manage Elastic connectors and sync jobs in an internal index.", + "externalDocs": { + "description": "Learn more.", + "url": "https://www.elastic.co/docs/reference/search-connectors/api-tutorial" + }, + "x-displayName": "Connector" + } + ] + } + """; + + var (generator, openApiDocument) = await CreateGeneratorWithSpec(openApiJson); + var navigation = generator.CreateNavigation("elasticsearch", openApiDocument); + + var t = FindTagNavigationItem(navigation, "connector"); + t.Should().NotBeNull(); + t.NavigationTitle.Should().Be("Connector"); + var model = t.Index.Model.Should().BeOfType().Subject; + model.Description.Should().Contain("sync jobs"); + model.DisplayName.Should().Be("Connector"); + model.ExternalDocs.Should().NotBeNull(); + model.ExternalDocs.Url.Should().Be("https://www.elastic.co/docs/reference/search-connectors/api-tutorial"); + model.ExternalDocs.Description.Should().Be("Learn more."); + } + + [Fact] + public async Task CreateNavigation_Throws_When_Two_Tag_Names_Normalize_To_Same_Url_Segment() + { + var openApiJson = /*lang=json,strict*/ """ + { + "openapi": "3.0.3", + "info": { "title": "X", "version": "1.0" }, + "paths": { + "/a": { "get": { "operationId": "a1", "tags": ["a b"], "responses": { "200": { "description": "ok" } } } }, + "/b": { "get": { "operationId": "b1", "tags": ["a b"], "responses": { "200": { "description": "ok" } } } } + }, + "tags": [ { "name": "a b" }, { "name": "a b" } ] + } + """; + + var (generator, openApiDocument) = await CreateGeneratorWithSpec(openApiJson); + + var act = () => generator.CreateNavigation("test", openApiDocument); + act.Should() + .Throw() + .WithMessage("*tag URL segment conflict*"); + } } From 2b09deecfb22505109aa385dd39f47acff0e7363 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 24 Apr 2026 08:03:01 -0700 Subject: [PATCH 5/6] [API Explorer] Enable code block copy (#3173) --- src/Elastic.ApiExplorer/ApiCodeBlockModel.cs | 8 ++++++++ .../Operations/OperationView.cshtml | 8 ++++---- .../Operations/OperationViewModel.cs | 10 ++++++++++ .../Schemas/SchemaView.cshtml | 3 +-- .../Shared/_ApiCodeBlock.cshtml | 10 ++++++++++ .../CodeSampleTests.cs | 20 +++++++++++++++++++ 6 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 src/Elastic.ApiExplorer/ApiCodeBlockModel.cs create mode 100644 src/Elastic.ApiExplorer/Shared/_ApiCodeBlock.cshtml diff --git a/src/Elastic.ApiExplorer/ApiCodeBlockModel.cs b/src/Elastic.ApiExplorer/ApiCodeBlockModel.cs new file mode 100644 index 0000000000..e09935d55b --- /dev/null +++ b/src/Elastic.ApiExplorer/ApiCodeBlockModel.cs @@ -0,0 +1,8 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +namespace Elastic.ApiExplorer; + +/// Model for the API Explorer code block partial (Myst-style highlight wrappers and copy support). +public record ApiCodeBlockModel(string HighlightClass, string Source); diff --git a/src/Elastic.ApiExplorer/Operations/OperationView.cshtml b/src/Elastic.ApiExplorer/Operations/OperationView.cshtml index c38fbd81e1..e0b92d453a 100644 --- a/src/Elastic.ApiExplorer/Operations/OperationView.cshtml +++ b/src/Elastic.ApiExplorer/Operations/OperationView.cshtml @@ -526,7 +526,7 @@

@codeSamples[0].Language

-
@codeSamples[0].Source
+ @(await RenderPartialAsync<_ApiCodeBlock, ApiCodeBlockModel>(new ApiCodeBlockModel(codeSamples[0].HighlightClass, codeSamples[0].Source)))
} else if (codeSamples.Count > 1) @@ -547,7 +547,7 @@
-
@sample.Source
+ @(await RenderPartialAsync<_ApiCodeBlock, ApiCodeBlockModel>(new ApiCodeBlockModel(sample.HighlightClass, sample.Source)))
} @@ -582,7 +582,7 @@ } @if (example.Value?.Value is not null) { -
@example.Value.Value.ToString()
+ @(await RenderPartialAsync<_ApiCodeBlock, ApiCodeBlockModel>(new ApiCodeBlockModel("language-json", example.Value.Value.ToString()!))) } @if (!string.IsNullOrEmpty(example.Value?.ExternalValue)) { @@ -611,7 +611,7 @@ } @if (example.Value?.Value is not null) { -
@example.Value.Value.ToString()
+ @(await RenderPartialAsync<_ApiCodeBlock, ApiCodeBlockModel>(new ApiCodeBlockModel("language-json", example.Value.Value.ToString()!))) } @if (!string.IsNullOrEmpty(example.Value?.ExternalValue)) { diff --git a/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs b/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs index c570f02613..ca6258bdc7 100644 --- a/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs +++ b/src/Elastic.ApiExplorer/Operations/OperationViewModel.cs @@ -25,6 +25,16 @@ public record CodeSample(string Language, string Source, string HighlightClass) public static string GetHighlightClass(string language) => LanguageHighlightMap.GetValueOrDefault(language, $"language-{language.ToLowerInvariant()}"); + + /// Maps a hljs language-* class to the outer Myst-style wrapper, e.g. language-json to highlight-json. + public static string GetHighlightGroupClass(string? highlightClass) + { + if (string.IsNullOrEmpty(highlightClass) || !highlightClass.StartsWith("language-", StringComparison.Ordinal)) + return "highlight-plaintext"; + + var id = highlightClass["language-".Length..]; + return string.IsNullOrEmpty(id) ? "highlight-plaintext" : $"highlight-{id}"; + } } public class OperationViewModel(ApiRenderContext context) : ApiViewModel(context) diff --git a/src/Elastic.ApiExplorer/Schemas/SchemaView.cshtml b/src/Elastic.ApiExplorer/Schemas/SchemaView.cshtml index 8ebb43d3c4..7491a212bb 100644 --- a/src/Elastic.ApiExplorer/Schemas/SchemaView.cshtml +++ b/src/Elastic.ApiExplorer/Schemas/SchemaView.cshtml @@ -1,7 +1,6 @@ @using Elastic.ApiExplorer.Landing @using Elastic.ApiExplorer.Schema @using Elastic.ApiExplorer.Schemas -@using Elastic.ApiExplorer.Shared @using Microsoft.OpenApi @inherits RazorSliceHttpResult @implements IUsesLayout @@ -210,6 +209,6 @@

Example

-
@openApiSchema.Example
+ @(await RenderPartialAsync<_ApiCodeBlock, ApiCodeBlockModel>(new ApiCodeBlockModel("language-json", openApiSchema.Example!.ToString()!))) } diff --git a/src/Elastic.ApiExplorer/Shared/_ApiCodeBlock.cshtml b/src/Elastic.ApiExplorer/Shared/_ApiCodeBlock.cshtml new file mode 100644 index 0000000000..172f5c08ff --- /dev/null +++ b/src/Elastic.ApiExplorer/Shared/_ApiCodeBlock.cshtml @@ -0,0 +1,10 @@ +@using Elastic.ApiExplorer.Operations +@inherits RazorSlice +@{ + var highlightGroupClass = CodeSample.GetHighlightGroupClass(Model.HighlightClass); +} +
+
+
@Model.Source
+
+
diff --git a/tests/Elastic.ApiExplorer.Tests/CodeSampleTests.cs b/tests/Elastic.ApiExplorer.Tests/CodeSampleTests.cs index cfc0b50f94..e529df336b 100644 --- a/tests/Elastic.ApiExplorer.Tests/CodeSampleTests.cs +++ b/tests/Elastic.ApiExplorer.Tests/CodeSampleTests.cs @@ -151,4 +151,24 @@ public void CodeSamples_SetsCorrectHighlightClass() result[0].HighlightClass.Should().Be("language-bash"); } + + [Theory] + [InlineData("language-json", "highlight-json")] + [InlineData("language-bash", "highlight-bash")] + [InlineData("language-console", "highlight-console")] + [InlineData("language-python", "highlight-python")] + public void GetHighlightGroupClass_MapsLanguageClassToHighlightClass(string input, string expected) => + CodeSample.GetHighlightGroupClass(input).Should().Be(expected); + + [Fact] + public void GetHighlightGroupClass_HandlesNonLanguageClass() => + CodeSample.GetHighlightGroupClass("some-other-class").Should().Be("highlight-plaintext"); + + [Fact] + public void GetHighlightGroupClass_HandlesEmptyInput() => + CodeSample.GetHighlightGroupClass("").Should().Be("highlight-plaintext"); + + [Fact] + public void GetHighlightGroupClass_HandlesLanguagePrefixOnly() => + CodeSample.GetHighlightGroupClass("language-").Should().Be("highlight-plaintext"); } From 757b2533a6fbc2f0c67777174472ba70d90f8256 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Tue, 28 Apr 2026 08:13:42 -0700 Subject: [PATCH 6/6] [API Explorer] Use ES spec with code samples (#3200) --- docs/_docset.yml | 2 +- ...i.json => elasticsearch-openapi-docs.json} | 27448 ++++++++++++++-- 2 files changed, 25427 insertions(+), 2023 deletions(-) rename docs/{elasticsearch-openapi.json => elasticsearch-openapi-docs.json} (80%) diff --git a/docs/_docset.yml b/docs/_docset.yml index aed40e521b..9c732d4802 100644 --- a/docs/_docset.yml +++ b/docs/_docset.yml @@ -50,7 +50,7 @@ suppress: - DeepLinkingVirtualFile api: - elasticsearch: elasticsearch-openapi.json + elasticsearch: elasticsearch-openapi-docs.json kibana: - file: kibana-api-overview.md - spec: kibana-openapi.json diff --git a/docs/elasticsearch-openapi.json b/docs/elasticsearch-openapi-docs.json similarity index 80% rename from docs/elasticsearch-openapi.json rename to docs/elasticsearch-openapi-docs.json index 5ae777d1af..4df59ad466 100644 --- a/docs/elasticsearch-openapi.json +++ b/docs/elasticsearch-openapi-docs.json @@ -85,6 +85,36 @@ ], "x-api": "get.async_search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\n" + }, + { + "lang": "Python", + "source": "resp = client.async_search.get(\n id=\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.asyncSearch.get({\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.async_search.get(\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->asyncSearch()->get([\n \"id\" => \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"" + }, + { + "lang": "Java", + "source": "client.asyncSearch().get(g -> g\n .id(\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -130,6 +160,36 @@ ], "x-api": "delete.async_search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\n" + }, + { + "lang": "Python", + "source": "resp = client.async_search.delete(\n id=\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.asyncSearch.delete({\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.async_search.delete(\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->asyncSearch()->delete([\n \"id\" => \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"" + }, + { + "lang": "Java", + "source": "client.asyncSearch().delete(d -> d\n .id(\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -207,6 +267,36 @@ ], "x-api": "status.async_search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\n" + }, + { + "lang": "Python", + "source": "resp = client.async_search.status(\n id=\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.asyncSearch.status({\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.async_search.status(\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->asyncSearch()->status([\n \"id\" => \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"" + }, + { + "lang": "Java", + "source": "client.asyncSearch().status(s -> s\n .id(\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -347,7 +437,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -437,7 +527,7 @@ { "in": "query", "name": "search_type", - "description": "Search operation type", + "description": "Search operation type\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -480,7 +570,7 @@ { "in": "query", "name": "suggest_mode", - "description": "Specify suggest mode", + "description": "Specify suggest mode\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SuggestMode" @@ -932,6 +1022,36 @@ ], "x-api": "submit.async_search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /sales*/_async_search?size=0\n{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.async_search.submit(\n index=\"sales*\",\n size=\"0\",\n sort=[\n {\n \"date\": {\n \"order\": \"asc\"\n }\n }\n ],\n aggs={\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.asyncSearch.submit({\n index: \"sales*\",\n size: 0,\n sort: [\n {\n date: {\n order: \"asc\",\n },\n },\n ],\n aggs: {\n sale_date: {\n date_histogram: {\n field: \"date\",\n calendar_interval: \"1d\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.async_search.submit(\n index: \"sales*\",\n size: \"0\",\n body: {\n \"sort\": [\n {\n \"date\": {\n \"order\": \"asc\"\n }\n }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->asyncSearch()->submit([\n \"index\" => \"sales*\",\n \"size\" => \"0\",\n \"body\" => [\n \"sort\" => array(\n [\n \"date\" => [\n \"order\" => \"asc\",\n ],\n ],\n ),\n \"aggs\" => [\n \"sale_date\" => [\n \"date_histogram\" => [\n \"field\" => \"date\",\n \"calendar_interval\" => \"1d\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":[{\"date\":{\"order\":\"asc\"}}],\"aggs\":{\"sale_date\":{\"date_histogram\":{\"field\":\"date\",\"calendar_interval\":\"1d\"}}}}' \"$ELASTICSEARCH_URL/sales*/_async_search?size=0\"" + }, + { + "lang": "Java", + "source": "client.asyncSearch().submit(s -> s\n .aggregations(\"sale_date\", a -> a\n .dateHistogram(d -> d\n .calendarInterval(CalendarInterval.Day)\n .field(\"date\")\n )\n )\n .index(\"sales*\")\n .size(0)\n .sort(so -> so\n .field(f -> f\n .field(\"date\")\n .order(SortOrder.Asc)\n )\n )\n,Void.class);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -1083,7 +1203,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -1173,7 +1293,7 @@ { "in": "query", "name": "search_type", - "description": "Search operation type", + "description": "Search operation type\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -1216,7 +1336,7 @@ { "in": "query", "name": "suggest_mode", - "description": "Specify suggest mode", + "description": "Specify suggest mode\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SuggestMode" @@ -1668,6 +1788,36 @@ ], "x-api": "submit.async_search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /sales*/_async_search?size=0\n{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.async_search.submit(\n index=\"sales*\",\n size=\"0\",\n sort=[\n {\n \"date\": {\n \"order\": \"asc\"\n }\n }\n ],\n aggs={\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.asyncSearch.submit({\n index: \"sales*\",\n size: 0,\n sort: [\n {\n date: {\n order: \"asc\",\n },\n },\n ],\n aggs: {\n sale_date: {\n date_histogram: {\n field: \"date\",\n calendar_interval: \"1d\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.async_search.submit(\n index: \"sales*\",\n size: \"0\",\n body: {\n \"sort\": [\n {\n \"date\": {\n \"order\": \"asc\"\n }\n }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->asyncSearch()->submit([\n \"index\" => \"sales*\",\n \"size\" => \"0\",\n \"body\" => [\n \"sort\" => array(\n [\n \"date\" => [\n \"order\" => \"asc\",\n ],\n ],\n ),\n \"aggs\" => [\n \"sale_date\" => [\n \"date_histogram\" => [\n \"field\" => \"date\",\n \"calendar_interval\" => \"1d\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":[{\"date\":{\"order\":\"asc\"}}],\"aggs\":{\"sale_date\":{\"date_histogram\":{\"field\":\"date\",\"calendar_interval\":\"1d\"}}}}' \"$ELASTICSEARCH_URL/sales*/_async_search?size=0\"" + }, + { + "lang": "Java", + "source": "client.asyncSearch().submit(s -> s\n .aggregations(\"sale_date\", a -> a\n .dateHistogram(d -> d\n .calendarInterval(CalendarInterval.Day)\n .field(\"date\")\n )\n )\n .index(\"sales*\")\n .size(0)\n .sort(so -> so\n .field(f -> f\n .field(\"date\")\n .order(SortOrder.Asc)\n )\n )\n,Void.class);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -1920,6 +2070,32 @@ ], "x-api": "bulk", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" + }, + { + "lang": "Python", + "source": "resp = client.bulk(\n operations=[\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.bulk({\n operations: [\n {\n index: {\n _index: \"test\",\n _id: \"1\",\n },\n },\n {\n field1: \"value1\",\n },\n {\n delete: {\n _index: \"test\",\n _id: \"2\",\n },\n },\n {\n create: {\n _index: \"test\",\n _id: \"3\",\n },\n },\n {\n field1: \"value3\",\n },\n {\n update: {\n _id: \"1\",\n _index: \"test\",\n },\n },\n {\n doc: {\n field2: \"value2\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.bulk(\n body: [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->bulk([\n \"body\" => array(\n [\n \"index\" => [\n \"_index\" => \"test\",\n \"_id\" => \"1\",\n ],\n ],\n [\n \"field1\" => \"value1\",\n ],\n [\n \"delete\" => [\n \"_index\" => \"test\",\n \"_id\" => \"2\",\n ],\n ],\n [\n \"create\" => [\n \"_index\" => \"test\",\n \"_id\" => \"3\",\n ],\n ],\n [\n \"field1\" => \"value3\",\n ],\n [\n \"update\" => [\n \"_id\" => \"1\",\n \"_index\" => \"test\",\n ],\n ],\n [\n \"doc\" => [\n \"field2\" => \"value2\",\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{\"index\":{\"_index\":\"test\",\"_id\":\"1\"}}\\n{\"field1\":\"value1\"}\\n{\"delete\":{\"_index\":\"test\",\"_id\":\"2\"}}\\n{\"create\":{\"_index\":\"test\",\"_id\":\"3\"}}\\n{\"field1\":\"value3\"}\\n{\"update\":{\"_id\":\"1\",\"_index\":\"test\"}}\\n{\"doc\":{\"field2\":\"value2\"}}\\n' \"$ELASTICSEARCH_URL/_bulk\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -2170,6 +2346,32 @@ ], "x-api": "bulk", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" + }, + { + "lang": "Python", + "source": "resp = client.bulk(\n operations=[\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.bulk({\n operations: [\n {\n index: {\n _index: \"test\",\n _id: \"1\",\n },\n },\n {\n field1: \"value1\",\n },\n {\n delete: {\n _index: \"test\",\n _id: \"2\",\n },\n },\n {\n create: {\n _index: \"test\",\n _id: \"3\",\n },\n },\n {\n field1: \"value3\",\n },\n {\n update: {\n _id: \"1\",\n _index: \"test\",\n },\n },\n {\n doc: {\n field2: \"value2\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.bulk(\n body: [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->bulk([\n \"body\" => array(\n [\n \"index\" => [\n \"_index\" => \"test\",\n \"_id\" => \"1\",\n ],\n ],\n [\n \"field1\" => \"value1\",\n ],\n [\n \"delete\" => [\n \"_index\" => \"test\",\n \"_id\" => \"2\",\n ],\n ],\n [\n \"create\" => [\n \"_index\" => \"test\",\n \"_id\" => \"3\",\n ],\n ],\n [\n \"field1\" => \"value3\",\n ],\n [\n \"update\" => [\n \"_id\" => \"1\",\n \"_index\" => \"test\",\n ],\n ],\n [\n \"doc\" => [\n \"field2\" => \"value2\",\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{\"index\":{\"_index\":\"test\",\"_id\":\"1\"}}\\n{\"field1\":\"value1\"}\\n{\"delete\":{\"_index\":\"test\",\"_id\":\"2\"}}\\n{\"create\":{\"_index\":\"test\",\"_id\":\"3\"}}\\n{\"field1\":\"value3\"}\\n{\"update\":{\"_id\":\"1\",\"_index\":\"test\"}}\\n{\"doc\":{\"field2\":\"value2\"}}\\n' \"$ELASTICSEARCH_URL/_bulk\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -2433,6 +2635,32 @@ ], "x-api": "bulk", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" + }, + { + "lang": "Python", + "source": "resp = client.bulk(\n operations=[\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.bulk({\n operations: [\n {\n index: {\n _index: \"test\",\n _id: \"1\",\n },\n },\n {\n field1: \"value1\",\n },\n {\n delete: {\n _index: \"test\",\n _id: \"2\",\n },\n },\n {\n create: {\n _index: \"test\",\n _id: \"3\",\n },\n },\n {\n field1: \"value3\",\n },\n {\n update: {\n _id: \"1\",\n _index: \"test\",\n },\n },\n {\n doc: {\n field2: \"value2\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.bulk(\n body: [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->bulk([\n \"body\" => array(\n [\n \"index\" => [\n \"_index\" => \"test\",\n \"_id\" => \"1\",\n ],\n ],\n [\n \"field1\" => \"value1\",\n ],\n [\n \"delete\" => [\n \"_index\" => \"test\",\n \"_id\" => \"2\",\n ],\n ],\n [\n \"create\" => [\n \"_index\" => \"test\",\n \"_id\" => \"3\",\n ],\n ],\n [\n \"field1\" => \"value3\",\n ],\n [\n \"update\" => [\n \"_id\" => \"1\",\n \"_index\" => \"test\",\n ],\n ],\n [\n \"doc\" => [\n \"field2\" => \"value2\",\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{\"index\":{\"_index\":\"test\",\"_id\":\"1\"}}\\n{\"field1\":\"value1\"}\\n{\"delete\":{\"_index\":\"test\",\"_id\":\"2\"}}\\n{\"create\":{\"_index\":\"test\",\"_id\":\"3\"}}\\n{\"field1\":\"value3\"}\\n{\"update\":{\"_id\":\"1\",\"_index\":\"test\"}}\\n{\"doc\":{\"field2\":\"value2\"}}\\n' \"$ELASTICSEARCH_URL/_bulk\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -2694,6 +2922,32 @@ ], "x-api": "bulk", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }" + }, + { + "lang": "Python", + "source": "resp = client.bulk(\n operations=[\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.bulk({\n operations: [\n {\n index: {\n _index: \"test\",\n _id: \"1\",\n },\n },\n {\n field1: \"value1\",\n },\n {\n delete: {\n _index: \"test\",\n _id: \"2\",\n },\n },\n {\n create: {\n _index: \"test\",\n _id: \"3\",\n },\n },\n {\n field1: \"value3\",\n },\n {\n update: {\n _id: \"1\",\n _index: \"test\",\n },\n },\n {\n doc: {\n field2: \"value2\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.bulk(\n body: [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->bulk([\n \"body\" => array(\n [\n \"index\" => [\n \"_index\" => \"test\",\n \"_id\" => \"1\",\n ],\n ],\n [\n \"field1\" => \"value1\",\n ],\n [\n \"delete\" => [\n \"_index\" => \"test\",\n \"_id\" => \"2\",\n ],\n ],\n [\n \"create\" => [\n \"_index\" => \"test\",\n \"_id\" => \"3\",\n ],\n ],\n [\n \"field1\" => \"value3\",\n ],\n [\n \"update\" => [\n \"_id\" => \"1\",\n \"_index\" => \"test\",\n ],\n ],\n [\n \"doc\" => [\n \"field2\" => \"value2\",\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{\"index\":{\"_index\":\"test\",\"_id\":\"1\"}}\\n{\"field1\":\"value1\"}\\n{\"delete\":{\"_index\":\"test\",\"_id\":\"2\"}}\\n{\"create\":{\"_index\":\"test\",\"_id\":\"3\"}}\\n{\"field1\":\"value3\"}\\n{\"update\":{\"_id\":\"1\",\"_index\":\"test\"}}\\n{\"doc\":{\"field2\":\"value2\"}}\\n' \"$ELASTICSEARCH_URL/_bulk\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -2714,7 +2968,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `alias` (or `a`): The name of the alias.\n - `index` (or `i`, `idx`): The name of the index the alias points to.\n - `filter` (or `f`, `fi`): The filter applied to the alias.\n - `routing.index` (or `ri`, `routingIndex`): Index routing value for the alias.\n - `routing.search` (or `rs`, `routingSearch`): Search routing value for the alias.\n - `is_write_index` (or `w`, `isWriteIndex`): Indicates if the index is the write index for the alias.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatAliasesColumns" @@ -2734,7 +2988,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -2782,6 +3036,36 @@ ], "x-api": "aliases.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/aliases?format=json&v=true\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.aliases(\n format=\"json\",\n v=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.aliases({\n format: \"json\",\n v: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.aliases(\n format: \"json\",\n v: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->aliases([\n \"format\" => \"json\",\n \"v\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/aliases?format=json&v=true\"" + }, + { + "lang": "Java", + "source": "client.cat().aliases();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -2813,7 +3097,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `alias` (or `a`): The name of the alias.\n - `index` (or `i`, `idx`): The name of the index the alias points to.\n - `filter` (or `f`, `fi`): The filter applied to the alias.\n - `routing.index` (or `ri`, `routingIndex`): Index routing value for the alias.\n - `routing.search` (or `rs`, `routingSearch`): Search routing value for the alias.\n - `is_write_index` (or `w`, `isWriteIndex`): Indicates if the index is the write index for the alias.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatAliasesColumns" @@ -2833,7 +3117,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -2881,6 +3165,36 @@ ], "x-api": "aliases.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/aliases?format=json&v=true\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.aliases(\n format=\"json\",\n v=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.aliases({\n format: \"json\",\n v: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.aliases(\n format: \"json\",\n v: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->aliases([\n \"format\" => \"json\",\n \"v\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/aliases?format=json&v=true\"" + }, + { + "lang": "Java", + "source": "client.cat().aliases();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -2901,7 +3215,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `shards` (or `s`): The number of shards on the node.\n - `shards.undesired`: The number of shards scheduled to be moved elsewhere in the cluster.\n - `write_load.forecast` (or `wlf`, `writeLoadForecast`): The sum of index write load forecasts.\n - `disk.indices.forecast` (or `dif`, `diskIndicesForecast`): The sum of shard size forecasts.\n - `disk.indices` (or `di`, `diskIndices`): The disk space used by Elasticsearch indices.\n - `disk.used` (or `du`, `diskUsed`): The total disk space used on the node.\n - `disk.avail` (or `da`, `diskAvail`): The available disk space on the node.\n - `disk.total` (or `dt`, `diskTotal`): The total disk capacity of all volumes on the node.\n - `disk.percent` (or `dp`, `diskPercent`): The percentage of disk space used on the node.\n - `host` (or `h`): IThe host of the node.\n - `ip`: The IP address of the node.\n - `node` (or `n`): The name of the node.\n - `node.role` (or `r`, `role`, `nodeRole`): The roles assigned to the node.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatAllocationColumns" @@ -2969,6 +3283,36 @@ ], "x-api": "allocation.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/allocation?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.allocation(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.allocation({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.allocation(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->allocation([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/allocation?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().allocation();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3000,7 +3344,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `shards` (or `s`): The number of shards on the node.\n - `shards.undesired`: The number of shards scheduled to be moved elsewhere in the cluster.\n - `write_load.forecast` (or `wlf`, `writeLoadForecast`): The sum of index write load forecasts.\n - `disk.indices.forecast` (or `dif`, `diskIndicesForecast`): The sum of shard size forecasts.\n - `disk.indices` (or `di`, `diskIndices`): The disk space used by Elasticsearch indices.\n - `disk.used` (or `du`, `diskUsed`): The total disk space used on the node.\n - `disk.avail` (or `da`, `diskAvail`): The available disk space on the node.\n - `disk.total` (or `dt`, `diskTotal`): The total disk capacity of all volumes on the node.\n - `disk.percent` (or `dp`, `diskPercent`): The percentage of disk space used on the node.\n - `host` (or `h`): IThe host of the node.\n - `ip`: The IP address of the node.\n - `node` (or `n`): The name of the node.\n - `node.role` (or `r`, `role`, `nodeRole`): The roles assigned to the node.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatAllocationColumns" @@ -3068,6 +3412,36 @@ ], "x-api": "allocation.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/allocation?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.allocation(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.allocation({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.allocation(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->allocation([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/allocation?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().allocation();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3088,7 +3462,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `node_id` (or `id`): Persistent node ID\n - `node_name` (or `nn`): Node name\n - `breaker` (or `br`): Breaker name\n - `limit` (or `l`): Limit size\n - `limit_bytes` (or `lb`): Limit size in bytes\n - `estimated` (or `e`): Estimated size\n - `estimated_bytes` (or `eb`): Estimated size in bytes\n - `tripped` (or `t`): Tripped count\n - `overhead` (or `o`): Overhead\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatCircuitBreakerColumns" @@ -3156,6 +3530,32 @@ ], "x-api": "circuit_breaker.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/circuit_breaker?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.circuit_breaker(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.circuitBreaker({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.circuit_breaker(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->circuitBreaker([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/circuit_breaker?v=true&format=json\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3197,7 +3597,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `node_id` (or `id`): Persistent node ID\n - `node_name` (or `nn`): Node name\n - `breaker` (or `br`): Breaker name\n - `limit` (or `l`): Limit size\n - `limit_bytes` (or `lb`): Limit size in bytes\n - `estimated` (or `e`): Estimated size\n - `estimated_bytes` (or `eb`): Estimated size in bytes\n - `tripped` (or `t`): Tripped count\n - `overhead` (or `o`): Overhead\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatCircuitBreakerColumns" @@ -3265,6 +3665,32 @@ ], "x-api": "circuit_breaker.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/circuit_breaker?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.circuit_breaker(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.circuitBreaker({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.circuit_breaker(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->circuitBreaker([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/circuit_breaker?v=true&format=json\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3285,7 +3711,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `name` (or `n`): The name of the component template.\n - `version` (or `v`): The version number of the component template.\n - `alias_count` (or `a`): The number of aliases in the component template.\n - `mapping_count` (or `m`): The number of mappings in the component template.\n - `settings_count` (or `s`): The number of settings in the component template.\n - `metadata_count` (or `me`): The number of metadata entries in the component template.\n - `included_in` (or `i`): The index templates that include this component template.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatComponentColumns" @@ -3353,6 +3779,36 @@ ], "x-api": "component_templates.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/component_templates/my-template-*?v=true&s=name&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.component_templates(\n name=\"my-template-*\",\n v=True,\n s=\"name\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.componentTemplates({\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.component_templates(\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->componentTemplates([\n \"name\" => \"my-template-*\",\n \"v\" => \"true\",\n \"s\" => \"name\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/component_templates/my-template-*?v=true&s=name&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().componentTemplates();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3384,7 +3840,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `name` (or `n`): The name of the component template.\n - `version` (or `v`): The version number of the component template.\n - `alias_count` (or `a`): The number of aliases in the component template.\n - `mapping_count` (or `m`): The number of mappings in the component template.\n - `settings_count` (or `s`): The number of settings in the component template.\n - `metadata_count` (or `me`): The number of metadata entries in the component template.\n - `included_in` (or `i`): The index templates that include this component template.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatComponentColumns" @@ -3452,6 +3908,36 @@ ], "x-api": "component_templates.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/component_templates/my-template-*?v=true&s=name&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.component_templates(\n name=\"my-template-*\",\n v=True,\n s=\"name\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.componentTemplates({\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.component_templates(\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->componentTemplates([\n \"name\" => \"my-template-*\",\n \"v\" => \"true\",\n \"s\" => \"name\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/component_templates/my-template-*?v=true&s=name&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().componentTemplates();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3472,7 +3958,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `epoch` (or `t`, `time`): The Unix epoch time in seconds since 1970-01-01 00:00:00.\n - `timestamp` (or `ts`, `hms`, `hhmmss`): The current time in HH:MM:SS format.\n - `count` (or `dc`, `docs.count`, `docsCount`): The document count in the cluster or index.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatCountColumns" @@ -3536,6 +4022,36 @@ ], "x-api": "count.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/count/my-index-000001?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.count(\n index=\"my-index-000001\",\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.count({\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.count(\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->count([\n \"index\" => \"my-index-000001\",\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/count/my-index-000001?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().count();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3554,7 +4070,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `epoch` (or `t`, `time`): The Unix epoch time in seconds since 1970-01-01 00:00:00.\n - `timestamp` (or `ts`, `hms`, `hhmmss`): The current time in HH:MM:SS format.\n - `count` (or `dc`, `docs.count`, `docsCount`): The document count in the cluster or index.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatCountColumns" @@ -3618,6 +4134,36 @@ ], "x-api": "count.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/count/my-index-000001?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.count(\n index=\"my-index-000001\",\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.count({\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.count(\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->count([\n \"index\" => \"my-index-000001\",\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/count/my-index-000001?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().count();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3649,7 +4195,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `epoch` (or `t`, `time`): The Unix epoch time in seconds since 1970-01-01 00:00:00.\n - `timestamp` (or `ts`, `hms`, `hhmmss`): The current time in HH:MM:SS format.\n - `count` (or `dc`, `docs.count`, `docsCount`): The document count in the cluster or index.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatCountColumns" @@ -3713,6 +4259,36 @@ ], "x-api": "count.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/count/my-index-000001?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.count(\n index=\"my-index-000001\",\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.count({\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.count(\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->count([\n \"index\" => \"my-index-000001\",\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/count/my-index-000001?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().count();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3742,7 +4318,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `epoch` (or `t`, `time`): The Unix epoch time in seconds since 1970-01-01 00:00:00.\n - `timestamp` (or `ts`, `hms`, `hhmmss`): The current time in HH:MM:SS format.\n - `count` (or `dc`, `docs.count`, `docsCount`): The document count in the cluster or index.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatCountColumns" @@ -3806,6 +4382,36 @@ ], "x-api": "count.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/count/my-index-000001?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.count(\n index=\"my-index-000001\",\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.count({\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.count(\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->count([\n \"index\" => \"my-index-000001\",\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/count/my-index-000001?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().count();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3836,7 +4442,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `id`: The node ID.\n - `host` (or `h`): The host name of the node.\n - `ip`: The IP address of the node.\n - `node` (or `n`): The node name.\n - `field` (or `f`): The field name.\n - `size` (or `s`): The field data usage.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatFieldDataColumns" @@ -3890,6 +4496,36 @@ ], "x-api": "fielddata.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/fielddata?v=true&fields=body&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.fielddata(\n v=True,\n fields=\"body\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.fielddata({\n v: \"true\",\n fields: \"body\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.fielddata(\n v: \"true\",\n fields: \"body\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->fielddata([\n \"v\" => \"true\",\n \"fields\" => \"body\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/fielddata?v=true&fields=body&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().fielddata();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -3931,7 +4567,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `id`: The node ID.\n - `host` (or `h`): The host name of the node.\n - `ip`: The IP address of the node.\n - `node` (or `n`): The node name.\n - `field` (or `f`): The field name.\n - `size` (or `s`): The field data usage.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatFieldDataColumns" @@ -3985,6 +4621,36 @@ ], "x-api": "fielddata.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/fielddata?v=true&fields=body&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.fielddata(\n v=True,\n fields=\"body\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.fielddata({\n v: \"true\",\n fields: \"body\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.fielddata(\n v: \"true\",\n fields: \"body\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->fielddata([\n \"v\" => \"true\",\n \"fields\" => \"body\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/fielddata?v=true&fields=body&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().fielddata();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4015,7 +4681,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `epoch` (or `t`, `time`): The number of seconds since 1970-01-01 00:00:00.\n - `timestamp` (or `ts`, `hms`, `hhmmss`): The time in HH:MM:SS format.\n - `cluster` (or `cl`): The cluster name.\n - `status` (or `st`): The health status.\n - `node.total` (or `nt`, `nodeTotal`): The total number of nodes that can store data.\n - `node.data` (or `nd`, `nodeData`): The number of nodes that can store data.\n - `shards` (or `t`, `sh`, `shards.total`, `shardsTotal`): The total number of shards.\n - `pri` (or `p`, `shards.primary`, `shardsPrimary`): The number of primary shards.\n - `relo` (or `r`, `shards.relocating`, `shardsRelocating`): The number of relocating nodes.\n - `init` (or `i`, `shards.initializing`, `shardsInitializing`): The number of initializing nodes.\n - `unassign` (or `u`, `shards.unassigned`, `shardsUnassigned`): The number of unassigned shards.\n - `unassign.pri` (or `up`, `shards.unassigned.primary`, `shardsUnassignedPrimary`): The number of unassigned primary shards.\n - `pending_tasks` (or `pt`, `pendingTasks`): The number of pending tasks.\n - `max_task_wait_time` (or `mtwt`, `maxTaskWaitTime`): The wait time of the longest pending task.\n - `active_shards_percent` (or `asp`, `activeShardsPercent`): The percentage of active shards.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatHealthColumns" @@ -4063,6 +4729,36 @@ ], "x-api": "health.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/health?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.health(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.health({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.health(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->health([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/health?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().health();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4117,7 +4813,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.", + "description": "The type of index that wildcard patterns can match.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -4127,7 +4823,7 @@ { "in": "query", "name": "health", - "description": "The health status used to limit returned indices. By default, the response includes indices of any health status.", + "description": "The health status used to limit returned indices. By default, the response includes indices of any health status.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.HealthStatus" @@ -4167,7 +4863,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `health` (or `h`): The current health status.\n - `status` (or `s`): The open/close status.\n - `index` (or `i`, `idx`): The index name.\n - `uuid` (or `id`, `uuid`): The index UUID.\n - `pri` (or `p`, `shards.primary`, `shardsPrimary`): The number of primary shards.\n - `rep` (or `r`, `shards.replica`, `shardsReplica`): The number of replica shards.\n - `docs.count` (or `dc`, `docsCount`): The number of available documents.\n - `docs.deleted` (or `dd`, `docsDeleted`): The number of deleted documents.\n - `creation.date` (or `cd`): The index creation date (millisecond value).\n - `creation.date.string` (or `cds`): The index creation date (as string).\n - `store.size` (or `ss`, `storeSize`): The store size of primaries and replicas.\n - `pri.store.size`: The store size of primaries.\n - `dataset.size`: The total size of the dataset.\n - `completion.size` (or `cs`, `completionSize`): The size of completion for primaries and replicas.\n - `pri.completion.size`: The size of completion for primaries.\n - `fielddata.memory_size` (or `fm`, `fielddataMemory`): The used fielddata cache for primaries and replicas.\n - `pri.fielddata.memory_size`: The used fielddata cache for primaries.\n - `fielddata.evictions` (or `fe`, `fielddataEvictions`): The number of fielddata evictions for primaries and replicas.\n - `pri.fielddata.evictions`: The number of fielddata evictions for primaries.\n - `query_cache.memory_size` (or `qcm`, `queryCacheMemory`): The used query cache for primaries and replicas.\n - `pri.query_cache.memory_size`: The used query cache for primaries.\n - `query_cache.evictions` (or `qce`, `queryCacheEvictions`): The number of query cache evictions for primaries and replicas.\n - `pri.query_cache.evictions`: The number of query cache evictions for primaries.\n - `request_cache.memory_size` (or `rcm`, `requestCacheMemory`): The used request cache for primaries and replicas.\n - `pri.request_cache.memory_size`: The used request cache for primaries.\n - `request_cache.evictions` (or `rce`, `requestCacheEvictions`): The number of request cache evictions for primaries and replicas.\n - `pri.request_cache.evictions`: The number of request cache evictions for primaries.\n - `request_cache.hit_count` (or `rchc`, `requestCacheHitCount`): The request cache hit count for primaries and replicas.\n - `pri.request_cache.hit_count`: The request cache hit count for primaries.\n - `request_cache.miss_count` (or `rcmc`, `requestCacheMissCount`): The request cache miss count for primaries and replicas.\n - `pri.request_cache.miss_count`: The request cache miss count for primaries.\n - `flush.total` (or `ft`, `flushTotal`): The number of flushes for primaries and replicas.\n - `pri.flush.total`: The number of flushes for primaries.\n - `flush.total_time` (or `ftt`, `flushTotalTime`): The time spent in flush for primaries and replicas.\n - `pri.flush.total_time`: The time spent in flush for primaries.\n - `get.current` (or `gc`, `getCurrent`): The number of current get operations for primaries and replicas.\n - `pri.get.current`: The number of current get operations for primaries.\n - `get.time` (or `gti`, `getTime`): The time spent in get for primaries and replicas.\n - `pri.get.time`: The time spent in get for primaries.\n - `get.total` (or `gto`, `getTotal`): The number of get operations for primaries and replicas.\n - `pri.get.total`: The number of get operations for primaries.\n - `get.exists_time` (or `geti`, `getExistsTime`): The time spent in successful gets for primaries and replicas.\n - `pri.get.exists_time`: The time spent in successful gets for primaries.\n - `get.exists_total` (or `geto`, `getExistsTotal`): The number of successful gets for primaries and replicas.\n - `pri.get.exists_total`: The number of successful gets for primaries.\n - `get.missing_time` (or `gmti`, `getMissingTime`): The time spent in failed gets for primaries and replicas.\n - `pri.get.missing_time`: The time spent in failed gets for primaries.\n - `get.missing_total` (or `gmto`, `getMissingTotal`): The number of failed gets for primaries and replicas.\n - `pri.get.missing_total`: The number of failed gets for primaries.\n - `indexing.delete_current` (or `idc`, `indexingDeleteCurrent`): The number of current deletions for primaries and replicas.\n - `pri.indexing.delete_current`: The number of current deletions for primaries.\n - `indexing.delete_time` (or `idti`, `indexingDeleteTime`): The time spent in deletions for primaries and replicas.\n - `pri.indexing.delete_time`: The time spent in deletions for primaries.\n - `indexing.delete_total` (or `idto`, `indexingDeleteTotal`): The number of delete operations for primaries and replicas.\n - `pri.indexing.delete_total`: The number of delete operations for primaries.\n - `indexing.index_current` (or `iic`, `indexingIndexCurrent`): The number of current indexing operations for primaries and replicas.\n - `pri.indexing.index_current`: The number of current indexing operations for primaries.\n - `indexing.index_time` (or `iiti`, `indexingIndexTime`): The time spent in indexing for primaries and replicas.\n - `pri.indexing.index_time`: The time spent in indexing for primaries.\n - `indexing.index_total` (or `iito`, `indexingIndexTotal`): The number of indexing operations for primaries and replicas.\n - `pri.indexing.index_total`: The number of indexing operations for primaries.\n - `indexing.index_failed` (or `iif`, `indexingIndexFailed`): The number of failed indexing operations for primaries and replicas.\n - `pri.indexing.index_failed`: The number of failed indexing operations for primaries.\n - `indexing.index_failed_due_to_version_conflict` (or `iifvc`, `indexingIndexFailedDueToVersionConflict`): The number of failed indexing operations due to version conflict for primaries and replicas.\n - `pri.indexing.index_failed_due_to_version_conflict`: The number of failed indexing operations due to version conflict for primaries.\n - `merges.current` (or `mc`, `mergesCurrent`): The number of current merges for primaries and replicas.\n - `pri.merges.current`: The number of current merges for primaries.\n - `merges.current_docs` (or `mcd`, `mergesCurrentDocs`): The number of current merging documents for primaries and replicas.\n - `pri.merges.current_docs`: The number of current merging documents for primaries.\n - `merges.current_size` (or `mcs`, `mergesCurrentSize`): The size of current merges for primaries and replicas.\n - `pri.merges.current_size`: The size of current merges for primaries.\n - `merges.total` (or `mt`, `mergesTotal`): The number of completed merge operations for primaries and replicas.\n - `pri.merges.total`: The number of completed merge operations for primaries.\n - `merges.total_docs` (or `mtd`, `mergesTotalDocs`): The number of merged documents for primaries and replicas.\n - `pri.merges.total_docs`: The number of merged documents for primaries.\n - `merges.total_size` (or `mts`, `mergesTotalSize`): The merged size for primaries and replicas.\n - `pri.merges.total_size`: The merged size for primaries.\n - `merges.total_time` (or `mtt`, `mergesTotalTime`): The time spent in merges for primaries and replicas.\n - `pri.merges.total_time`: The time spent in merges for primaries.\n - `refresh.total` (or `rto`, `refreshTotal`): The total refreshes for primaries and replicas.\n - `pri.refresh.total`: The total refreshes for primaries.\n - `refresh.time` (or `rti`, `refreshTime`): The time spent in refreshes for primaries and replicas.\n - `pri.refresh.time`: The time spent in refreshes for primaries.\n - `refresh.external_total` (or `rto`, `refreshTotal`): The total external refreshes for primaries and replicas.\n - `pri.refresh.external_total`: The total external refreshes for primaries.\n - `refresh.external_time` (or `rti`, `refreshTime`): The time spent in external refreshes for primaries and replicas.\n - `pri.refresh.external_time`: The time spent in external refreshes for primaries.\n - `refresh.listeners` (or `rli`, `refreshListeners`): The number of pending refresh listeners for primaries and replicas.\n - `pri.refresh.listeners`: The number of pending refresh listeners for primaries.\n - `search.fetch_current` (or `sfc`, `searchFetchCurrent`): The current fetch phase operations for primaries and replicas.\n - `pri.search.fetch_current`: The current fetch phase operations for primaries.\n - `search.fetch_time` (or `sfti`, `searchFetchTime`): The time spent in fetch phase for primaries and replicas.\n - `pri.search.fetch_time`: The time spent in fetch phase for primaries.\n - `search.fetch_total` (or `sfto`, `searchFetchTotal`): The total fetch operations for primaries and replicas.\n - `pri.search.fetch_total`: The total fetch operations for primaries.\n - `search.open_contexts` (or `so`, `searchOpenContexts`): The open search contexts for primaries and replicas.\n - `pri.search.open_contexts`: The open search contexts for primaries.\n - `search.query_current` (or `sqc`, `searchQueryCurrent`): The current query phase operations for primaries and replicas.\n - `pri.search.query_current`: The current query phase operations for primaries.\n - `search.query_time` (or `sqti`, `searchQueryTime`): The time spent in query phase for primaries and replicas.\n - `pri.search.query_time`: The time spent in query phase for primaries.\n - `search.query_total` (or `sqto`, `searchQueryTotal`): The total query phase operations for primaries and replicas.\n - `pri.search.query_total`: The total query phase operations for primaries.\n - `search.scroll_current` (or `scc`, `searchScrollCurrent`): The open scroll contexts for primaries and replicas.\n - `pri.search.scroll_current`: The open scroll contexts for primaries.\n - `search.scroll_time` (or `scti`, `searchScrollTime`): The time scroll contexts held open for primaries and replicas.\n - `pri.search.scroll_time`: The time scroll contexts held open for primaries.\n - `search.scroll_total` (or `scto`, `searchScrollTotal`): The completed scroll contexts for primaries and replicas.\n - `pri.search.scroll_total`: The completed scroll contexts for primaries.\n - `segments.count` (or `sc`, `segmentsCount`): The number of segments for primaries and replicas.\n - `pri.segments.count`: The number of segments for primaries.\n - `segments.memory` (or `sm`, `segmentsMemory`): The memory used by segments for primaries and replicas.\n - `pri.segments.memory`: The memory used by segments for primaries.\n - `segments.index_writer_memory` (or `siwm`, `segmentsIndexWriterMemory`): The memory used by index writer for primaries and replicas.\n - `pri.segments.index_writer_memory`: The memory used by index writer for primaries.\n - `segments.version_map_memory` (or `svmm`, `segmentsVersionMapMemory`): The memory used by version map for primaries and replicas.\n - `pri.segments.version_map_memory`: The memory used by version map for primaries.\n - `segments.fixed_bitset_memory` (or `sfbm`, `fixedBitsetMemory`): The memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields. Applicable for primaries and replicas.\n - `pri.segments.fixed_bitset_memory`: The memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields. Applicable for primaries.\n - `warmer.current` (or `wc`, `warmerCurrent`): The current warmer operations for primaries and replicas.\n - `pri.warmer.current`: The current warmer operations for primaries.\n - `warmer.total` (or `wto`, `warmerTotal`): The total warmer operations for primaries and replicas.\n - `pri.warmer.total`: The total warmer operations for primaries.\n - `warmer.total_time` (or `wtt`, `warmerTotalTime`): The time spent in warmers for primaries and replicas.\n - `pri.warmer.total_time`: The time spent in warmers for primaries.\n - `suggest.current` (or `suc`, `suggestCurrent`): The current suggest operations for primaries and replicas.\n - `pri.suggest.current`: The current suggest operations for primaries.\n - `suggest.time` (or `suti`, `suggestTime`): The time spent in suggest for primaries and replicas.\n - `pri.suggest.time`: The time spent in suggest for primaries.\n - `suggest.total` (or `suto`, `suggestTotal`): The number of suggest operations for primaries and replicas.\n - `pri.suggest.total`: The number of suggest operations for primaries.\n - `memory.total` (or `tm`, `memoryTotal`): The total used memory for primaries and replicas.\n - `pri.memory.total`: The total used memory for primaries.\n - `bulk.total_operations` (or `bto`, `bulkTotalOperation`): The number of bulk shard operations for primaries and replicas.\n - `pri.bulk.total_operations`: The number of bulk shard operations for primaries.\n - `bulk.total_time` (or `btti`, `bulkTotalTime`): The time spent in shard bulk for primaries and replicas.\n - `pri.bulk.total_time`: The time spent in shard bulk for primaries.\n - `bulk.total_size_in_bytes` (or `btsi`, `bulkTotalSizeInBytes`): The total size in bytes of shard bulk for primaries and replicas.\n - `pri.bulk.total_size_in_bytes`: The total size in bytes of shard bulk for primaries.\n - `bulk.avg_time` (or `bati`, `bulkAvgTime`): The average time spent in shard bulk for primaries and replicas.\n - `pri.bulk.avg_time`: The average time spent in shard bulk for primaries.\n - `bulk.avg_size_in_bytes` (or `basi`, `bulkAvgSizeInBytes`): The average size in bytes of shard bulk for primaries and replicas.\n - `pri.bulk.avg_size_in_bytes`: The average size in bytes of shard bulk for primaries.\n - `dense_vector.value_count` (or `dvc`, `denseVectorCount`): The total count of indexed dense vectors for primaries and replicas.\n - `pri.dense_vector.value_count`: The total count of indexed dense vectors for primaries.\n - `sparse_vector.value_count` (or `svc`, `sparseVectorCount`): The total count of indexed sparse vectors for primaries and replicas.\n - `pri.sparse_vector.value_count`: The total count of indexed sparse vectors for primaries.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatIndicesColumns" @@ -4216,6 +4912,36 @@ ], "x-api": "indices.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/indices/my-index-*?v=true&s=index&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.indices(\n index=\"my-index-*\",\n v=True,\n s=\"index\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.indices({\n index: \"my-index-*\",\n v: \"true\",\n s: \"index\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.indices(\n index: \"my-index-*\",\n v: \"true\",\n s: \"index\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->indices([\n \"index\" => \"my-index-*\",\n \"v\" => \"true\",\n \"s\" => \"index\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/indices/my-index-*?v=true&s=index&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().indices();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4247,7 +4973,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.", + "description": "The type of index that wildcard patterns can match.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -4257,7 +4983,7 @@ { "in": "query", "name": "health", - "description": "The health status used to limit returned indices. By default, the response includes indices of any health status.", + "description": "The health status used to limit returned indices. By default, the response includes indices of any health status.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.HealthStatus" @@ -4297,7 +5023,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `health` (or `h`): The current health status.\n - `status` (or `s`): The open/close status.\n - `index` (or `i`, `idx`): The index name.\n - `uuid` (or `id`, `uuid`): The index UUID.\n - `pri` (or `p`, `shards.primary`, `shardsPrimary`): The number of primary shards.\n - `rep` (or `r`, `shards.replica`, `shardsReplica`): The number of replica shards.\n - `docs.count` (or `dc`, `docsCount`): The number of available documents.\n - `docs.deleted` (or `dd`, `docsDeleted`): The number of deleted documents.\n - `creation.date` (or `cd`): The index creation date (millisecond value).\n - `creation.date.string` (or `cds`): The index creation date (as string).\n - `store.size` (or `ss`, `storeSize`): The store size of primaries and replicas.\n - `pri.store.size`: The store size of primaries.\n - `dataset.size`: The total size of the dataset.\n - `completion.size` (or `cs`, `completionSize`): The size of completion for primaries and replicas.\n - `pri.completion.size`: The size of completion for primaries.\n - `fielddata.memory_size` (or `fm`, `fielddataMemory`): The used fielddata cache for primaries and replicas.\n - `pri.fielddata.memory_size`: The used fielddata cache for primaries.\n - `fielddata.evictions` (or `fe`, `fielddataEvictions`): The number of fielddata evictions for primaries and replicas.\n - `pri.fielddata.evictions`: The number of fielddata evictions for primaries.\n - `query_cache.memory_size` (or `qcm`, `queryCacheMemory`): The used query cache for primaries and replicas.\n - `pri.query_cache.memory_size`: The used query cache for primaries.\n - `query_cache.evictions` (or `qce`, `queryCacheEvictions`): The number of query cache evictions for primaries and replicas.\n - `pri.query_cache.evictions`: The number of query cache evictions for primaries.\n - `request_cache.memory_size` (or `rcm`, `requestCacheMemory`): The used request cache for primaries and replicas.\n - `pri.request_cache.memory_size`: The used request cache for primaries.\n - `request_cache.evictions` (or `rce`, `requestCacheEvictions`): The number of request cache evictions for primaries and replicas.\n - `pri.request_cache.evictions`: The number of request cache evictions for primaries.\n - `request_cache.hit_count` (or `rchc`, `requestCacheHitCount`): The request cache hit count for primaries and replicas.\n - `pri.request_cache.hit_count`: The request cache hit count for primaries.\n - `request_cache.miss_count` (or `rcmc`, `requestCacheMissCount`): The request cache miss count for primaries and replicas.\n - `pri.request_cache.miss_count`: The request cache miss count for primaries.\n - `flush.total` (or `ft`, `flushTotal`): The number of flushes for primaries and replicas.\n - `pri.flush.total`: The number of flushes for primaries.\n - `flush.total_time` (or `ftt`, `flushTotalTime`): The time spent in flush for primaries and replicas.\n - `pri.flush.total_time`: The time spent in flush for primaries.\n - `get.current` (or `gc`, `getCurrent`): The number of current get operations for primaries and replicas.\n - `pri.get.current`: The number of current get operations for primaries.\n - `get.time` (or `gti`, `getTime`): The time spent in get for primaries and replicas.\n - `pri.get.time`: The time spent in get for primaries.\n - `get.total` (or `gto`, `getTotal`): The number of get operations for primaries and replicas.\n - `pri.get.total`: The number of get operations for primaries.\n - `get.exists_time` (or `geti`, `getExistsTime`): The time spent in successful gets for primaries and replicas.\n - `pri.get.exists_time`: The time spent in successful gets for primaries.\n - `get.exists_total` (or `geto`, `getExistsTotal`): The number of successful gets for primaries and replicas.\n - `pri.get.exists_total`: The number of successful gets for primaries.\n - `get.missing_time` (or `gmti`, `getMissingTime`): The time spent in failed gets for primaries and replicas.\n - `pri.get.missing_time`: The time spent in failed gets for primaries.\n - `get.missing_total` (or `gmto`, `getMissingTotal`): The number of failed gets for primaries and replicas.\n - `pri.get.missing_total`: The number of failed gets for primaries.\n - `indexing.delete_current` (or `idc`, `indexingDeleteCurrent`): The number of current deletions for primaries and replicas.\n - `pri.indexing.delete_current`: The number of current deletions for primaries.\n - `indexing.delete_time` (or `idti`, `indexingDeleteTime`): The time spent in deletions for primaries and replicas.\n - `pri.indexing.delete_time`: The time spent in deletions for primaries.\n - `indexing.delete_total` (or `idto`, `indexingDeleteTotal`): The number of delete operations for primaries and replicas.\n - `pri.indexing.delete_total`: The number of delete operations for primaries.\n - `indexing.index_current` (or `iic`, `indexingIndexCurrent`): The number of current indexing operations for primaries and replicas.\n - `pri.indexing.index_current`: The number of current indexing operations for primaries.\n - `indexing.index_time` (or `iiti`, `indexingIndexTime`): The time spent in indexing for primaries and replicas.\n - `pri.indexing.index_time`: The time spent in indexing for primaries.\n - `indexing.index_total` (or `iito`, `indexingIndexTotal`): The number of indexing operations for primaries and replicas.\n - `pri.indexing.index_total`: The number of indexing operations for primaries.\n - `indexing.index_failed` (or `iif`, `indexingIndexFailed`): The number of failed indexing operations for primaries and replicas.\n - `pri.indexing.index_failed`: The number of failed indexing operations for primaries.\n - `indexing.index_failed_due_to_version_conflict` (or `iifvc`, `indexingIndexFailedDueToVersionConflict`): The number of failed indexing operations due to version conflict for primaries and replicas.\n - `pri.indexing.index_failed_due_to_version_conflict`: The number of failed indexing operations due to version conflict for primaries.\n - `merges.current` (or `mc`, `mergesCurrent`): The number of current merges for primaries and replicas.\n - `pri.merges.current`: The number of current merges for primaries.\n - `merges.current_docs` (or `mcd`, `mergesCurrentDocs`): The number of current merging documents for primaries and replicas.\n - `pri.merges.current_docs`: The number of current merging documents for primaries.\n - `merges.current_size` (or `mcs`, `mergesCurrentSize`): The size of current merges for primaries and replicas.\n - `pri.merges.current_size`: The size of current merges for primaries.\n - `merges.total` (or `mt`, `mergesTotal`): The number of completed merge operations for primaries and replicas.\n - `pri.merges.total`: The number of completed merge operations for primaries.\n - `merges.total_docs` (or `mtd`, `mergesTotalDocs`): The number of merged documents for primaries and replicas.\n - `pri.merges.total_docs`: The number of merged documents for primaries.\n - `merges.total_size` (or `mts`, `mergesTotalSize`): The merged size for primaries and replicas.\n - `pri.merges.total_size`: The merged size for primaries.\n - `merges.total_time` (or `mtt`, `mergesTotalTime`): The time spent in merges for primaries and replicas.\n - `pri.merges.total_time`: The time spent in merges for primaries.\n - `refresh.total` (or `rto`, `refreshTotal`): The total refreshes for primaries and replicas.\n - `pri.refresh.total`: The total refreshes for primaries.\n - `refresh.time` (or `rti`, `refreshTime`): The time spent in refreshes for primaries and replicas.\n - `pri.refresh.time`: The time spent in refreshes for primaries.\n - `refresh.external_total` (or `rto`, `refreshTotal`): The total external refreshes for primaries and replicas.\n - `pri.refresh.external_total`: The total external refreshes for primaries.\n - `refresh.external_time` (or `rti`, `refreshTime`): The time spent in external refreshes for primaries and replicas.\n - `pri.refresh.external_time`: The time spent in external refreshes for primaries.\n - `refresh.listeners` (or `rli`, `refreshListeners`): The number of pending refresh listeners for primaries and replicas.\n - `pri.refresh.listeners`: The number of pending refresh listeners for primaries.\n - `search.fetch_current` (or `sfc`, `searchFetchCurrent`): The current fetch phase operations for primaries and replicas.\n - `pri.search.fetch_current`: The current fetch phase operations for primaries.\n - `search.fetch_time` (or `sfti`, `searchFetchTime`): The time spent in fetch phase for primaries and replicas.\n - `pri.search.fetch_time`: The time spent in fetch phase for primaries.\n - `search.fetch_total` (or `sfto`, `searchFetchTotal`): The total fetch operations for primaries and replicas.\n - `pri.search.fetch_total`: The total fetch operations for primaries.\n - `search.open_contexts` (or `so`, `searchOpenContexts`): The open search contexts for primaries and replicas.\n - `pri.search.open_contexts`: The open search contexts for primaries.\n - `search.query_current` (or `sqc`, `searchQueryCurrent`): The current query phase operations for primaries and replicas.\n - `pri.search.query_current`: The current query phase operations for primaries.\n - `search.query_time` (or `sqti`, `searchQueryTime`): The time spent in query phase for primaries and replicas.\n - `pri.search.query_time`: The time spent in query phase for primaries.\n - `search.query_total` (or `sqto`, `searchQueryTotal`): The total query phase operations for primaries and replicas.\n - `pri.search.query_total`: The total query phase operations for primaries.\n - `search.scroll_current` (or `scc`, `searchScrollCurrent`): The open scroll contexts for primaries and replicas.\n - `pri.search.scroll_current`: The open scroll contexts for primaries.\n - `search.scroll_time` (or `scti`, `searchScrollTime`): The time scroll contexts held open for primaries and replicas.\n - `pri.search.scroll_time`: The time scroll contexts held open for primaries.\n - `search.scroll_total` (or `scto`, `searchScrollTotal`): The completed scroll contexts for primaries and replicas.\n - `pri.search.scroll_total`: The completed scroll contexts for primaries.\n - `segments.count` (or `sc`, `segmentsCount`): The number of segments for primaries and replicas.\n - `pri.segments.count`: The number of segments for primaries.\n - `segments.memory` (or `sm`, `segmentsMemory`): The memory used by segments for primaries and replicas.\n - `pri.segments.memory`: The memory used by segments for primaries.\n - `segments.index_writer_memory` (or `siwm`, `segmentsIndexWriterMemory`): The memory used by index writer for primaries and replicas.\n - `pri.segments.index_writer_memory`: The memory used by index writer for primaries.\n - `segments.version_map_memory` (or `svmm`, `segmentsVersionMapMemory`): The memory used by version map for primaries and replicas.\n - `pri.segments.version_map_memory`: The memory used by version map for primaries.\n - `segments.fixed_bitset_memory` (or `sfbm`, `fixedBitsetMemory`): The memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields. Applicable for primaries and replicas.\n - `pri.segments.fixed_bitset_memory`: The memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields. Applicable for primaries.\n - `warmer.current` (or `wc`, `warmerCurrent`): The current warmer operations for primaries and replicas.\n - `pri.warmer.current`: The current warmer operations for primaries.\n - `warmer.total` (or `wto`, `warmerTotal`): The total warmer operations for primaries and replicas.\n - `pri.warmer.total`: The total warmer operations for primaries.\n - `warmer.total_time` (or `wtt`, `warmerTotalTime`): The time spent in warmers for primaries and replicas.\n - `pri.warmer.total_time`: The time spent in warmers for primaries.\n - `suggest.current` (or `suc`, `suggestCurrent`): The current suggest operations for primaries and replicas.\n - `pri.suggest.current`: The current suggest operations for primaries.\n - `suggest.time` (or `suti`, `suggestTime`): The time spent in suggest for primaries and replicas.\n - `pri.suggest.time`: The time spent in suggest for primaries.\n - `suggest.total` (or `suto`, `suggestTotal`): The number of suggest operations for primaries and replicas.\n - `pri.suggest.total`: The number of suggest operations for primaries.\n - `memory.total` (or `tm`, `memoryTotal`): The total used memory for primaries and replicas.\n - `pri.memory.total`: The total used memory for primaries.\n - `bulk.total_operations` (or `bto`, `bulkTotalOperation`): The number of bulk shard operations for primaries and replicas.\n - `pri.bulk.total_operations`: The number of bulk shard operations for primaries.\n - `bulk.total_time` (or `btti`, `bulkTotalTime`): The time spent in shard bulk for primaries and replicas.\n - `pri.bulk.total_time`: The time spent in shard bulk for primaries.\n - `bulk.total_size_in_bytes` (or `btsi`, `bulkTotalSizeInBytes`): The total size in bytes of shard bulk for primaries and replicas.\n - `pri.bulk.total_size_in_bytes`: The total size in bytes of shard bulk for primaries.\n - `bulk.avg_time` (or `bati`, `bulkAvgTime`): The average time spent in shard bulk for primaries and replicas.\n - `pri.bulk.avg_time`: The average time spent in shard bulk for primaries.\n - `bulk.avg_size_in_bytes` (or `basi`, `bulkAvgSizeInBytes`): The average size in bytes of shard bulk for primaries and replicas.\n - `pri.bulk.avg_size_in_bytes`: The average size in bytes of shard bulk for primaries.\n - `dense_vector.value_count` (or `dvc`, `denseVectorCount`): The total count of indexed dense vectors for primaries and replicas.\n - `pri.dense_vector.value_count`: The total count of indexed dense vectors for primaries.\n - `sparse_vector.value_count` (or `svc`, `sparseVectorCount`): The total count of indexed sparse vectors for primaries and replicas.\n - `pri.sparse_vector.value_count`: The total count of indexed sparse vectors for primaries.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatIndicesColumns" @@ -4346,6 +5072,36 @@ ], "x-api": "indices.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/indices/my-index-*?v=true&s=index&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.indices(\n index=\"my-index-*\",\n v=True,\n s=\"index\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.indices({\n index: \"my-index-*\",\n v: \"true\",\n s: \"index\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.indices(\n index: \"my-index-*\",\n v: \"true\",\n s: \"index\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->indices([\n \"index\" => \"my-index-*\",\n \"v\" => \"true\",\n \"s\" => \"index\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/indices/my-index-*?v=true&s=index&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().indices();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4366,7 +5122,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `id`: The node ID.\n - `host` (or `h`): The host name of the node.\n - `ip`: The IP address of the node.\n - `node` (or `n`): The node name.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatMasterColumns" @@ -4434,6 +5190,36 @@ ], "x-api": "master.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/master?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.master(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.master({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.master(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->master([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/master?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().master();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4464,7 +5250,7 @@ { "in": "query", "name": "h", - "description": "Comma-separated list of column names to display.", + "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): Contains messages relating to the selection of a node.\n - `create_time` (or `ct`, `createTime`): The time when the data frame analytics job was created.\n - `description` (or `d`): A description of a job.\n - `dest_index` (or `di`, `destIndex`): Name of the destination index.\n - `failure_reason` (or `fr`, `failureReason`): Contains messages about the reason why a data frame analytics job failed.\n - `id`: Identifier for the data frame analytics job.\n - `model_memory_limit` (or `mml`, `modelMemoryLimit`): The approximate maximum amount of memory resources that are permitted for\nthe data frame analytics job.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that the data frame analytics job is\nassigned to.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that the data frame analytics job is assigned\nto.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that the data frame analytics job is\nassigned to.\n - `node.name` (or `nn`, `nodeName`): The name of the node that the data frame analytics job is assigned to.\n - `progress` (or `p`): The progress report of the data frame analytics job by phase.\n - `source_index` (or `si`, `sourceIndex`): Name of the source index.\n - `state` (or `s`): Current state of the data frame analytics job.\n - `type` (or `t`): The type of analysis that the data frame analytics job performs.\n - `version` (or `v`): The Elasticsearch version number in which the data frame analytics job was\ncreated.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatDfaColumns" @@ -4474,7 +5260,7 @@ { "in": "query", "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the\nresponse.", + "description": "Comma-separated list of column names or column aliases used to sort the\nresponse.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): Contains messages relating to the selection of a node.\n - `create_time` (or `ct`, `createTime`): The time when the data frame analytics job was created.\n - `description` (or `d`): A description of a job.\n - `dest_index` (or `di`, `destIndex`): Name of the destination index.\n - `failure_reason` (or `fr`, `failureReason`): Contains messages about the reason why a data frame analytics job failed.\n - `id`: Identifier for the data frame analytics job.\n - `model_memory_limit` (or `mml`, `modelMemoryLimit`): The approximate maximum amount of memory resources that are permitted for\nthe data frame analytics job.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that the data frame analytics job is\nassigned to.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that the data frame analytics job is assigned\nto.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that the data frame analytics job is\nassigned to.\n - `node.name` (or `nn`, `nodeName`): The name of the node that the data frame analytics job is assigned to.\n - `progress` (or `p`): The progress report of the data frame analytics job by phase.\n - `source_index` (or `si`, `sourceIndex`): Name of the source index.\n - `state` (or `s`): Current state of the data frame analytics job.\n - `type` (or `t`): The type of analysis that the data frame analytics job performs.\n - `version` (or `v`): The Elasticsearch version number in which the data frame analytics job was\ncreated.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatDfaColumns" @@ -4512,6 +5298,36 @@ ], "x-api": "ml_data_frame_analytics.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/ml/data_frame/analytics?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.ml_data_frame_analytics(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.mlDataFrameAnalytics({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.ml_data_frame_analytics(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->mlDataFrameAnalytics([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/data_frame/analytics?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().mlDataFrameAnalytics();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4553,7 +5369,7 @@ { "in": "query", "name": "h", - "description": "Comma-separated list of column names to display.", + "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): Contains messages relating to the selection of a node.\n - `create_time` (or `ct`, `createTime`): The time when the data frame analytics job was created.\n - `description` (or `d`): A description of a job.\n - `dest_index` (or `di`, `destIndex`): Name of the destination index.\n - `failure_reason` (or `fr`, `failureReason`): Contains messages about the reason why a data frame analytics job failed.\n - `id`: Identifier for the data frame analytics job.\n - `model_memory_limit` (or `mml`, `modelMemoryLimit`): The approximate maximum amount of memory resources that are permitted for\nthe data frame analytics job.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that the data frame analytics job is\nassigned to.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that the data frame analytics job is assigned\nto.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that the data frame analytics job is\nassigned to.\n - `node.name` (or `nn`, `nodeName`): The name of the node that the data frame analytics job is assigned to.\n - `progress` (or `p`): The progress report of the data frame analytics job by phase.\n - `source_index` (or `si`, `sourceIndex`): Name of the source index.\n - `state` (or `s`): Current state of the data frame analytics job.\n - `type` (or `t`): The type of analysis that the data frame analytics job performs.\n - `version` (or `v`): The Elasticsearch version number in which the data frame analytics job was\ncreated.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatDfaColumns" @@ -4563,7 +5379,7 @@ { "in": "query", "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the\nresponse.", + "description": "Comma-separated list of column names or column aliases used to sort the\nresponse.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): Contains messages relating to the selection of a node.\n - `create_time` (or `ct`, `createTime`): The time when the data frame analytics job was created.\n - `description` (or `d`): A description of a job.\n - `dest_index` (or `di`, `destIndex`): Name of the destination index.\n - `failure_reason` (or `fr`, `failureReason`): Contains messages about the reason why a data frame analytics job failed.\n - `id`: Identifier for the data frame analytics job.\n - `model_memory_limit` (or `mml`, `modelMemoryLimit`): The approximate maximum amount of memory resources that are permitted for\nthe data frame analytics job.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that the data frame analytics job is\nassigned to.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that the data frame analytics job is assigned\nto.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that the data frame analytics job is\nassigned to.\n - `node.name` (or `nn`, `nodeName`): The name of the node that the data frame analytics job is assigned to.\n - `progress` (or `p`): The progress report of the data frame analytics job by phase.\n - `source_index` (or `si`, `sourceIndex`): Name of the source index.\n - `state` (or `s`): Current state of the data frame analytics job.\n - `type` (or `t`): The type of analysis that the data frame analytics job performs.\n - `version` (or `v`): The Elasticsearch version number in which the data frame analytics job was\ncreated.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatDfaColumns" @@ -4601,6 +5417,36 @@ ], "x-api": "ml_data_frame_analytics.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/ml/data_frame/analytics?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.ml_data_frame_analytics(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.mlDataFrameAnalytics({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.ml_data_frame_analytics(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->mlDataFrameAnalytics([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/data_frame/analytics?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().mlDataFrameAnalytics();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4631,7 +5477,7 @@ { "in": "query", "name": "h", - "description": "Comma-separated list of column names to display.", + "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `ae` (or `assignment_explanation`): For started datafeeds only, contains messages relating to the selection of\na node.\n - `bc` (or `buckets.count`, `bucketsCount`): The number of buckets processed.\n - `id`: A numerical character string that uniquely identifies the datafeed.\n - `na` (or `node.address`, `nodeAddress`): For started datafeeds only, the network address of the node where the\ndatafeed is started.\n - `ne` (or `node.ephemeral_id`, `nodeEphemeralId`): For started datafeeds only, the ephemeral ID of the node where the\ndatafeed is started.\n - `ni` (or `node.id`, `nodeId`): For started datafeeds only, the unique identifier of the node where the\ndatafeed is started.\n - `nn` (or `node.name`, `nodeName`): For started datafeeds only, the name of the node where the datafeed is\nstarted.\n - `sba` (or `search.bucket_avg`, `searchBucketAvg`): The average search time per bucket, in milliseconds.\n - `sc` (or `search.count`, `searchCount`): The number of searches run by the datafeed.\n - `seah` (or `search.exp_avg_hour`, `searchExpAvgHour`): The exponential average search time per hour, in milliseconds.\n - `st` (or `search.time`, `searchTime`): The total time the datafeed spent searching, in milliseconds.\n - `s` (or `state`): The status of the datafeed: `starting`, `started`, `stopping`, or `stopped`.\nIf `starting`, the datafeed has been requested to start but has not yet\nstarted. If `started`, the datafeed is actively receiving data. If\n`stopping`, the datafeed has been requested to stop gracefully and is\ncompleting its final action. If `stopped`, the datafeed is stopped and will\nnot receive data until it is re-started.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" @@ -4641,7 +5487,7 @@ { "in": "query", "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.", + "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `ae` (or `assignment_explanation`): For started datafeeds only, contains messages relating to the selection of\na node.\n - `bc` (or `buckets.count`, `bucketsCount`): The number of buckets processed.\n - `id`: A numerical character string that uniquely identifies the datafeed.\n - `na` (or `node.address`, `nodeAddress`): For started datafeeds only, the network address of the node where the\ndatafeed is started.\n - `ne` (or `node.ephemeral_id`, `nodeEphemeralId`): For started datafeeds only, the ephemeral ID of the node where the\ndatafeed is started.\n - `ni` (or `node.id`, `nodeId`): For started datafeeds only, the unique identifier of the node where the\ndatafeed is started.\n - `nn` (or `node.name`, `nodeName`): For started datafeeds only, the name of the node where the datafeed is\nstarted.\n - `sba` (or `search.bucket_avg`, `searchBucketAvg`): The average search time per bucket, in milliseconds.\n - `sc` (or `search.count`, `searchCount`): The number of searches run by the datafeed.\n - `seah` (or `search.exp_avg_hour`, `searchExpAvgHour`): The exponential average search time per hour, in milliseconds.\n - `st` (or `search.time`, `searchTime`): The total time the datafeed spent searching, in milliseconds.\n - `s` (or `state`): The status of the datafeed: `starting`, `started`, `stopping`, or `stopped`.\nIf `starting`, the datafeed has been requested to start but has not yet\nstarted. If `started`, the datafeed is actively receiving data. If\n`stopping`, the datafeed has been requested to stop gracefully and is\ncompleting its final action. If `stopped`, the datafeed is stopped and will\nnot receive data until it is re-started.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" @@ -4679,6 +5525,36 @@ ], "x-api": "ml_datafeeds.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/ml/datafeeds?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.ml_datafeeds(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.mlDatafeeds({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.ml_datafeeds(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->mlDatafeeds([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/datafeeds?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().mlDatafeeds();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4720,7 +5596,7 @@ { "in": "query", "name": "h", - "description": "Comma-separated list of column names to display.", + "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `ae` (or `assignment_explanation`): For started datafeeds only, contains messages relating to the selection of\na node.\n - `bc` (or `buckets.count`, `bucketsCount`): The number of buckets processed.\n - `id`: A numerical character string that uniquely identifies the datafeed.\n - `na` (or `node.address`, `nodeAddress`): For started datafeeds only, the network address of the node where the\ndatafeed is started.\n - `ne` (or `node.ephemeral_id`, `nodeEphemeralId`): For started datafeeds only, the ephemeral ID of the node where the\ndatafeed is started.\n - `ni` (or `node.id`, `nodeId`): For started datafeeds only, the unique identifier of the node where the\ndatafeed is started.\n - `nn` (or `node.name`, `nodeName`): For started datafeeds only, the name of the node where the datafeed is\nstarted.\n - `sba` (or `search.bucket_avg`, `searchBucketAvg`): The average search time per bucket, in milliseconds.\n - `sc` (or `search.count`, `searchCount`): The number of searches run by the datafeed.\n - `seah` (or `search.exp_avg_hour`, `searchExpAvgHour`): The exponential average search time per hour, in milliseconds.\n - `st` (or `search.time`, `searchTime`): The total time the datafeed spent searching, in milliseconds.\n - `s` (or `state`): The status of the datafeed: `starting`, `started`, `stopping`, or `stopped`.\nIf `starting`, the datafeed has been requested to start but has not yet\nstarted. If `started`, the datafeed is actively receiving data. If\n`stopping`, the datafeed has been requested to stop gracefully and is\ncompleting its final action. If `stopped`, the datafeed is stopped and will\nnot receive data until it is re-started.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" @@ -4730,7 +5606,7 @@ { "in": "query", "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.", + "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `ae` (or `assignment_explanation`): For started datafeeds only, contains messages relating to the selection of\na node.\n - `bc` (or `buckets.count`, `bucketsCount`): The number of buckets processed.\n - `id`: A numerical character string that uniquely identifies the datafeed.\n - `na` (or `node.address`, `nodeAddress`): For started datafeeds only, the network address of the node where the\ndatafeed is started.\n - `ne` (or `node.ephemeral_id`, `nodeEphemeralId`): For started datafeeds only, the ephemeral ID of the node where the\ndatafeed is started.\n - `ni` (or `node.id`, `nodeId`): For started datafeeds only, the unique identifier of the node where the\ndatafeed is started.\n - `nn` (or `node.name`, `nodeName`): For started datafeeds only, the name of the node where the datafeed is\nstarted.\n - `sba` (or `search.bucket_avg`, `searchBucketAvg`): The average search time per bucket, in milliseconds.\n - `sc` (or `search.count`, `searchCount`): The number of searches run by the datafeed.\n - `seah` (or `search.exp_avg_hour`, `searchExpAvgHour`): The exponential average search time per hour, in milliseconds.\n - `st` (or `search.time`, `searchTime`): The total time the datafeed spent searching, in milliseconds.\n - `s` (or `state`): The status of the datafeed: `starting`, `started`, `stopping`, or `stopped`.\nIf `starting`, the datafeed has been requested to start but has not yet\nstarted. If `started`, the datafeed is actively receiving data. If\n`stopping`, the datafeed has been requested to stop gracefully and is\ncompleting its final action. If `stopped`, the datafeed is stopped and will\nnot receive data until it is re-started.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatDatafeedColumns" @@ -4768,6 +5644,36 @@ ], "x-api": "ml_datafeeds.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/ml/datafeeds?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.ml_datafeeds(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.mlDatafeeds({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.ml_datafeeds(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->mlDatafeeds([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/datafeeds?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().mlDatafeeds();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4798,7 +5704,7 @@ { "in": "query", "name": "h", - "description": "Comma-separated list of column names to display.", + "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): For open anomaly detection jobs only, contains messages relating to the\nselection of a node to run the job.\n - `buckets.count` (or `bc`, `bucketsCount`): The number of bucket results produced by the job.\n - `buckets.time.exp_avg` (or `btea`, `bucketsTimeExpAvg`): Exponential moving average of all bucket processing times, in milliseconds.\n - `buckets.time.exp_avg_hour` (or `bteah`, `bucketsTimeExpAvgHour`): Exponentially-weighted moving average of bucket processing times calculated\nin a 1 hour time window, in milliseconds.\n - `buckets.time.max` (or `btmax`, `bucketsTimeMax`): Maximum among all bucket processing times, in milliseconds.\n - `buckets.time.min` (or `btmin`, `bucketsTimeMin`): Minimum among all bucket processing times, in milliseconds.\n - `buckets.time.total` (or `btt`, `bucketsTimeTotal`): Sum of all bucket processing times, in milliseconds.\n - `data.buckets` (or `db`, `dataBuckets`): The number of buckets processed.\n - `data.earliest_record` (or `der`, `dataEarliestRecord`): The timestamp of the earliest chronologically input document.\n - `data.empty_buckets` (or `deb`, `dataEmptyBuckets`): The number of buckets which did not contain any data.\n - `data.input_bytes` (or `dib`, `dataInputBytes`): The number of bytes of input data posted to the anomaly detection job.\n - `data.input_fields` (or `dif`, `dataInputFields`): The total number of fields in input documents posted to the anomaly\ndetection job. This count includes fields that are not used in the analysis.\nHowever, be aware that if you are using a datafeed, it extracts only the\nrequired fields from the documents it retrieves before posting them to the job.\n - `data.input_records` (or `dir`, `dataInputRecords`): The number of input documents posted to the anomaly detection job.\n - `data.invalid_dates` (or `did`, `dataInvalidDates`): The number of input documents with either a missing date field or a date\nthat could not be parsed.\n - `data.last` (or `dl`, `dataLast`): The timestamp at which data was last analyzed, according to server time.\n - `data.last_empty_bucket` (or `dleb`, `dataLastEmptyBucket`): The timestamp of the last bucket that did not contain any data.\n - `data.last_sparse_bucket` (or `dlsb`, `dataLastSparseBucket`): The timestamp of the last bucket that was considered sparse.\n - `data.latest_record` (or `dlr`, `dataLatestRecord`): The timestamp of the latest chronologically input document.\n - `data.missing_fields` (or `dmf`, `dataMissingFields`): The number of input documents that are missing a field that the anomaly\ndetection job is configured to analyze. Input documents with missing fields\nare still processed because it is possible that not all fields are missing.\n - `data.out_of_order_timestamps` (or `doot`, `dataOutOfOrderTimestamps`): The number of input documents that have a timestamp chronologically\npreceding the start of the current anomaly detection bucket offset by the\nlatency window. This information is applicable only when you provide data\nto the anomaly detection job by using the post data API. These out of order\ndocuments are discarded, since jobs require time series data to be in\nascending chronological order.\n - `data.processed_fields` (or `dpf`, `dataProcessedFields`): The total number of fields in all the documents that have been processed by\nthe anomaly detection job. Only fields that are specified in the detector\nconfiguration object contribute to this count. The timestamp is not\nincluded in this count.\n - `data.processed_records` (or `dpr`, `dataProcessedRecords`): The number of input documents that have been processed by the anomaly\ndetection job. This value includes documents with missing fields, since\nthey are nonetheless analyzed. If you use datafeeds and have aggregations\nin your search query, the processed record count is the number of\naggregation results processed, not the number of Elasticsearch documents.\n - `data.sparse_buckets` (or `dsb`, `dataSparseBuckets`): The number of buckets that contained few data points compared to the\nexpected number of data points.\n - `forecasts.memory.avg` (or `fmavg`, `forecastsMemoryAvg`): The average memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.max` (or `fmmax`, `forecastsMemoryMax`): The maximum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.min` (or `fmmin`, `forecastsMemoryMin`): The minimum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.total` (or `fmt`, `forecastsMemoryTotal`): The total memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.records.avg` (or `fravg`, `forecastsRecordsAvg`): The average number of `m`odel_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.max` (or `frmax`, `forecastsRecordsMax`): The maximum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.min` (or `frmin`, `forecastsRecordsMin`): The minimum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.total` (or `frt`, `forecastsRecordsTotal`): The total number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.time.avg` (or `ftavg`, `forecastsTimeAvg`): The average runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.max` (or `ftmax`, `forecastsTimeMax`): The maximum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.min` (or `ftmin`, `forecastsTimeMin`): The minimum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.total` (or `ftt`, `forecastsTimeTotal`): The total runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.total` (or `ft`, `forecastsTotal`): The number of individual forecasts currently available for the job.\n - `id`: Identifier for the anomaly detection job.\n - `model.bucket_allocation_failures` (or `mbaf`, `modelBucketAllocationFailures`): The number of buckets for which new entities in incoming data were not\nprocessed due to insufficient model memory.\n - `model.by_fields` (or `mbf`, `modelByFields`): The number of by field values that were analyzed by the models. This value\nis cumulative for all detectors in the job.\n - `model.bytes` (or `mb`, `modelBytes`): The number of bytes of memory used by the models. This is the maximum value\nsince the last time the model was persisted. If the job is closed, this\nvalue indicates the latest size.\n - `model.bytes_exceeded` (or `mbe`, `modelBytesExceeded`): The number of bytes over the high limit for memory usage at the last\nallocation failure.\n - `model.categorization_status` (or `mcs`, `modelCategorizationStatus`): The status of categorization for the job: `ok` or `warn`. If `ok`,\ncategorization is performing acceptably well (or not being used at all). If\n`warn`, categorization is detecting a distribution of categories that\nsuggests the input data is inappropriate for categorization. Problems could\nbe that there is only one category, more than 90% of categories are rare,\nthe number of categories is greater than 50% of the number of categorized\ndocuments, there are no frequently matched categories, or more than 50% of\ncategories are dead.\n - `model.categorized_doc_count` (or `mcdc`, `modelCategorizedDocCount`): The number of documents that have had a field categorized.\n - `model.dead_category_count` (or `mdcc`, `modelDeadCategoryCount`): The number of categories created by categorization that will never be\nassigned again because another category’s definition makes it a superset of\nthe dead category. Dead categories are a side effect of the way\ncategorization has no prior training.\n - `model.failed_category_count` (or `mdcc`, `modelFailedCategoryCount`): The number of times that categorization wanted to create a new category but\ncouldn’t because the job had hit its model memory limit. This count does\nnot track which specific categories failed to be created. Therefore, you\ncannot use this value to determine the number of unique categories that\nwere missed.\n - `model.frequent_category_count` (or `mfcc`, `modelFrequentCategoryCount`): The number of categories that match more than 1% of categorized documents.\n - `model.log_time` (or `mlt`, `modelLogTime`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_limit` (or `mml`, `modelMemoryLimit`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_status` (or `mms`, `modelMemoryStatus`): The status of the mathematical models: `ok`, `soft_limit`, or `hard_limit`.\nIf `ok`, the models stayed below the configured value. If `soft_limit`, the\nmodels used more than 60% of the configured memory limit and older unused\nmodels will be pruned to free up space. Additionally, in categorization jobs\nno further category examples will be stored. If `hard_limit`, the models\nused more space than the configured memory limit. As a result, not all\nincoming data was processed.\n - `model.over_fields` (or `mof`, `modelOverFields`): The number of over field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.partition_fields` (or `mpf`, `modelPartitionFields`): The number of partition field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.rare_category_count` (or `mrcc`, `modelRareCategoryCount`): The number of categories that match just one categorized document.\n - `model.timestamp` (or `mt`, `modelTimestamp`): The timestamp of the last record when the model stats were gathered.\n - `model.total_category_count` (or `mtcc`, `modelTotalCategoryCount`): The number of categories created by categorization.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that runs the job. This information is\navailable only for open jobs.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that runs the job. This information is\navailable only for open jobs.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that runs the job. This information is\navailable only for open jobs.\n - `node.name` (or `nn`, `nodeName`): The name of the node that runs the job. This information is available only\nfor open jobs.\n - `opened_time` (or `ot`): For open jobs only, the elapsed time for which the job has been open.\n - `state` (or `s`): The status of the anomaly detection job: `closed`, `closing`, `failed`,\n`opened`, or `opening`. If `closed`, the job finished successfully with its\nmodel state persisted. The job must be opened before it can accept further\ndata. If `closing`, the job close action is in progress and has not yet\ncompleted. A closing job cannot accept further data. If `failed`, the job\ndid not finish successfully due to an error. This situation can occur due\nto invalid input data, a fatal error occurring during the analysis, or an\nexternal interaction such as the process being killed by the Linux out of\nmemory (OOM) killer. If the job had irrevocably failed, it must be force\nclosed and then deleted. If the datafeed can be corrected, the job can be\nclosed and then re-opened. If `opened`, the job is available to receive and\nprocess data. If `opening`, the job open action is in progress and has not\nyet completed.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns" @@ -4808,7 +5714,7 @@ { "in": "query", "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.", + "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): For open anomaly detection jobs only, contains messages relating to the\nselection of a node to run the job.\n - `buckets.count` (or `bc`, `bucketsCount`): The number of bucket results produced by the job.\n - `buckets.time.exp_avg` (or `btea`, `bucketsTimeExpAvg`): Exponential moving average of all bucket processing times, in milliseconds.\n - `buckets.time.exp_avg_hour` (or `bteah`, `bucketsTimeExpAvgHour`): Exponentially-weighted moving average of bucket processing times calculated\nin a 1 hour time window, in milliseconds.\n - `buckets.time.max` (or `btmax`, `bucketsTimeMax`): Maximum among all bucket processing times, in milliseconds.\n - `buckets.time.min` (or `btmin`, `bucketsTimeMin`): Minimum among all bucket processing times, in milliseconds.\n - `buckets.time.total` (or `btt`, `bucketsTimeTotal`): Sum of all bucket processing times, in milliseconds.\n - `data.buckets` (or `db`, `dataBuckets`): The number of buckets processed.\n - `data.earliest_record` (or `der`, `dataEarliestRecord`): The timestamp of the earliest chronologically input document.\n - `data.empty_buckets` (or `deb`, `dataEmptyBuckets`): The number of buckets which did not contain any data.\n - `data.input_bytes` (or `dib`, `dataInputBytes`): The number of bytes of input data posted to the anomaly detection job.\n - `data.input_fields` (or `dif`, `dataInputFields`): The total number of fields in input documents posted to the anomaly\ndetection job. This count includes fields that are not used in the analysis.\nHowever, be aware that if you are using a datafeed, it extracts only the\nrequired fields from the documents it retrieves before posting them to the job.\n - `data.input_records` (or `dir`, `dataInputRecords`): The number of input documents posted to the anomaly detection job.\n - `data.invalid_dates` (or `did`, `dataInvalidDates`): The number of input documents with either a missing date field or a date\nthat could not be parsed.\n - `data.last` (or `dl`, `dataLast`): The timestamp at which data was last analyzed, according to server time.\n - `data.last_empty_bucket` (or `dleb`, `dataLastEmptyBucket`): The timestamp of the last bucket that did not contain any data.\n - `data.last_sparse_bucket` (or `dlsb`, `dataLastSparseBucket`): The timestamp of the last bucket that was considered sparse.\n - `data.latest_record` (or `dlr`, `dataLatestRecord`): The timestamp of the latest chronologically input document.\n - `data.missing_fields` (or `dmf`, `dataMissingFields`): The number of input documents that are missing a field that the anomaly\ndetection job is configured to analyze. Input documents with missing fields\nare still processed because it is possible that not all fields are missing.\n - `data.out_of_order_timestamps` (or `doot`, `dataOutOfOrderTimestamps`): The number of input documents that have a timestamp chronologically\npreceding the start of the current anomaly detection bucket offset by the\nlatency window. This information is applicable only when you provide data\nto the anomaly detection job by using the post data API. These out of order\ndocuments are discarded, since jobs require time series data to be in\nascending chronological order.\n - `data.processed_fields` (or `dpf`, `dataProcessedFields`): The total number of fields in all the documents that have been processed by\nthe anomaly detection job. Only fields that are specified in the detector\nconfiguration object contribute to this count. The timestamp is not\nincluded in this count.\n - `data.processed_records` (or `dpr`, `dataProcessedRecords`): The number of input documents that have been processed by the anomaly\ndetection job. This value includes documents with missing fields, since\nthey are nonetheless analyzed. If you use datafeeds and have aggregations\nin your search query, the processed record count is the number of\naggregation results processed, not the number of Elasticsearch documents.\n - `data.sparse_buckets` (or `dsb`, `dataSparseBuckets`): The number of buckets that contained few data points compared to the\nexpected number of data points.\n - `forecasts.memory.avg` (or `fmavg`, `forecastsMemoryAvg`): The average memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.max` (or `fmmax`, `forecastsMemoryMax`): The maximum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.min` (or `fmmin`, `forecastsMemoryMin`): The minimum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.total` (or `fmt`, `forecastsMemoryTotal`): The total memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.records.avg` (or `fravg`, `forecastsRecordsAvg`): The average number of `m`odel_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.max` (or `frmax`, `forecastsRecordsMax`): The maximum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.min` (or `frmin`, `forecastsRecordsMin`): The minimum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.total` (or `frt`, `forecastsRecordsTotal`): The total number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.time.avg` (or `ftavg`, `forecastsTimeAvg`): The average runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.max` (or `ftmax`, `forecastsTimeMax`): The maximum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.min` (or `ftmin`, `forecastsTimeMin`): The minimum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.total` (or `ftt`, `forecastsTimeTotal`): The total runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.total` (or `ft`, `forecastsTotal`): The number of individual forecasts currently available for the job.\n - `id`: Identifier for the anomaly detection job.\n - `model.bucket_allocation_failures` (or `mbaf`, `modelBucketAllocationFailures`): The number of buckets for which new entities in incoming data were not\nprocessed due to insufficient model memory.\n - `model.by_fields` (or `mbf`, `modelByFields`): The number of by field values that were analyzed by the models. This value\nis cumulative for all detectors in the job.\n - `model.bytes` (or `mb`, `modelBytes`): The number of bytes of memory used by the models. This is the maximum value\nsince the last time the model was persisted. If the job is closed, this\nvalue indicates the latest size.\n - `model.bytes_exceeded` (or `mbe`, `modelBytesExceeded`): The number of bytes over the high limit for memory usage at the last\nallocation failure.\n - `model.categorization_status` (or `mcs`, `modelCategorizationStatus`): The status of categorization for the job: `ok` or `warn`. If `ok`,\ncategorization is performing acceptably well (or not being used at all). If\n`warn`, categorization is detecting a distribution of categories that\nsuggests the input data is inappropriate for categorization. Problems could\nbe that there is only one category, more than 90% of categories are rare,\nthe number of categories is greater than 50% of the number of categorized\ndocuments, there are no frequently matched categories, or more than 50% of\ncategories are dead.\n - `model.categorized_doc_count` (or `mcdc`, `modelCategorizedDocCount`): The number of documents that have had a field categorized.\n - `model.dead_category_count` (or `mdcc`, `modelDeadCategoryCount`): The number of categories created by categorization that will never be\nassigned again because another category’s definition makes it a superset of\nthe dead category. Dead categories are a side effect of the way\ncategorization has no prior training.\n - `model.failed_category_count` (or `mdcc`, `modelFailedCategoryCount`): The number of times that categorization wanted to create a new category but\ncouldn’t because the job had hit its model memory limit. This count does\nnot track which specific categories failed to be created. Therefore, you\ncannot use this value to determine the number of unique categories that\nwere missed.\n - `model.frequent_category_count` (or `mfcc`, `modelFrequentCategoryCount`): The number of categories that match more than 1% of categorized documents.\n - `model.log_time` (or `mlt`, `modelLogTime`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_limit` (or `mml`, `modelMemoryLimit`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_status` (or `mms`, `modelMemoryStatus`): The status of the mathematical models: `ok`, `soft_limit`, or `hard_limit`.\nIf `ok`, the models stayed below the configured value. If `soft_limit`, the\nmodels used more than 60% of the configured memory limit and older unused\nmodels will be pruned to free up space. Additionally, in categorization jobs\nno further category examples will be stored. If `hard_limit`, the models\nused more space than the configured memory limit. As a result, not all\nincoming data was processed.\n - `model.over_fields` (or `mof`, `modelOverFields`): The number of over field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.partition_fields` (or `mpf`, `modelPartitionFields`): The number of partition field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.rare_category_count` (or `mrcc`, `modelRareCategoryCount`): The number of categories that match just one categorized document.\n - `model.timestamp` (or `mt`, `modelTimestamp`): The timestamp of the last record when the model stats were gathered.\n - `model.total_category_count` (or `mtcc`, `modelTotalCategoryCount`): The number of categories created by categorization.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that runs the job. This information is\navailable only for open jobs.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that runs the job. This information is\navailable only for open jobs.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that runs the job. This information is\navailable only for open jobs.\n - `node.name` (or `nn`, `nodeName`): The name of the node that runs the job. This information is available only\nfor open jobs.\n - `opened_time` (or `ot`): For open jobs only, the elapsed time for which the job has been open.\n - `state` (or `s`): The status of the anomaly detection job: `closed`, `closing`, `failed`,\n`opened`, or `opening`. If `closed`, the job finished successfully with its\nmodel state persisted. The job must be opened before it can accept further\ndata. If `closing`, the job close action is in progress and has not yet\ncompleted. A closing job cannot accept further data. If `failed`, the job\ndid not finish successfully due to an error. This situation can occur due\nto invalid input data, a fatal error occurring during the analysis, or an\nexternal interaction such as the process being killed by the Linux out of\nmemory (OOM) killer. If the job had irrevocably failed, it must be force\nclosed and then deleted. If the datafeed can be corrected, the job can be\nclosed and then re-opened. If `opened`, the job is available to receive and\nprocess data. If `opening`, the job open action is in progress and has not\nyet completed.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns" @@ -4846,6 +5752,36 @@ ], "x-api": "ml_jobs.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.ml_jobs(\n h=\"id,s,dpr,mb\",\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.mlJobs({\n h: \"id,s,dpr,mb\",\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.ml_jobs(\n h: \"id,s,dpr,mb\",\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->mlJobs([\n \"h\" => \"id,s,dpr,mb\",\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().mlJobs();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4887,7 +5823,7 @@ { "in": "query", "name": "h", - "description": "Comma-separated list of column names to display.", + "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): For open anomaly detection jobs only, contains messages relating to the\nselection of a node to run the job.\n - `buckets.count` (or `bc`, `bucketsCount`): The number of bucket results produced by the job.\n - `buckets.time.exp_avg` (or `btea`, `bucketsTimeExpAvg`): Exponential moving average of all bucket processing times, in milliseconds.\n - `buckets.time.exp_avg_hour` (or `bteah`, `bucketsTimeExpAvgHour`): Exponentially-weighted moving average of bucket processing times calculated\nin a 1 hour time window, in milliseconds.\n - `buckets.time.max` (or `btmax`, `bucketsTimeMax`): Maximum among all bucket processing times, in milliseconds.\n - `buckets.time.min` (or `btmin`, `bucketsTimeMin`): Minimum among all bucket processing times, in milliseconds.\n - `buckets.time.total` (or `btt`, `bucketsTimeTotal`): Sum of all bucket processing times, in milliseconds.\n - `data.buckets` (or `db`, `dataBuckets`): The number of buckets processed.\n - `data.earliest_record` (or `der`, `dataEarliestRecord`): The timestamp of the earliest chronologically input document.\n - `data.empty_buckets` (or `deb`, `dataEmptyBuckets`): The number of buckets which did not contain any data.\n - `data.input_bytes` (or `dib`, `dataInputBytes`): The number of bytes of input data posted to the anomaly detection job.\n - `data.input_fields` (or `dif`, `dataInputFields`): The total number of fields in input documents posted to the anomaly\ndetection job. This count includes fields that are not used in the analysis.\nHowever, be aware that if you are using a datafeed, it extracts only the\nrequired fields from the documents it retrieves before posting them to the job.\n - `data.input_records` (or `dir`, `dataInputRecords`): The number of input documents posted to the anomaly detection job.\n - `data.invalid_dates` (or `did`, `dataInvalidDates`): The number of input documents with either a missing date field or a date\nthat could not be parsed.\n - `data.last` (or `dl`, `dataLast`): The timestamp at which data was last analyzed, according to server time.\n - `data.last_empty_bucket` (or `dleb`, `dataLastEmptyBucket`): The timestamp of the last bucket that did not contain any data.\n - `data.last_sparse_bucket` (or `dlsb`, `dataLastSparseBucket`): The timestamp of the last bucket that was considered sparse.\n - `data.latest_record` (or `dlr`, `dataLatestRecord`): The timestamp of the latest chronologically input document.\n - `data.missing_fields` (or `dmf`, `dataMissingFields`): The number of input documents that are missing a field that the anomaly\ndetection job is configured to analyze. Input documents with missing fields\nare still processed because it is possible that not all fields are missing.\n - `data.out_of_order_timestamps` (or `doot`, `dataOutOfOrderTimestamps`): The number of input documents that have a timestamp chronologically\npreceding the start of the current anomaly detection bucket offset by the\nlatency window. This information is applicable only when you provide data\nto the anomaly detection job by using the post data API. These out of order\ndocuments are discarded, since jobs require time series data to be in\nascending chronological order.\n - `data.processed_fields` (or `dpf`, `dataProcessedFields`): The total number of fields in all the documents that have been processed by\nthe anomaly detection job. Only fields that are specified in the detector\nconfiguration object contribute to this count. The timestamp is not\nincluded in this count.\n - `data.processed_records` (or `dpr`, `dataProcessedRecords`): The number of input documents that have been processed by the anomaly\ndetection job. This value includes documents with missing fields, since\nthey are nonetheless analyzed. If you use datafeeds and have aggregations\nin your search query, the processed record count is the number of\naggregation results processed, not the number of Elasticsearch documents.\n - `data.sparse_buckets` (or `dsb`, `dataSparseBuckets`): The number of buckets that contained few data points compared to the\nexpected number of data points.\n - `forecasts.memory.avg` (or `fmavg`, `forecastsMemoryAvg`): The average memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.max` (or `fmmax`, `forecastsMemoryMax`): The maximum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.min` (or `fmmin`, `forecastsMemoryMin`): The minimum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.total` (or `fmt`, `forecastsMemoryTotal`): The total memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.records.avg` (or `fravg`, `forecastsRecordsAvg`): The average number of `m`odel_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.max` (or `frmax`, `forecastsRecordsMax`): The maximum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.min` (or `frmin`, `forecastsRecordsMin`): The minimum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.total` (or `frt`, `forecastsRecordsTotal`): The total number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.time.avg` (or `ftavg`, `forecastsTimeAvg`): The average runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.max` (or `ftmax`, `forecastsTimeMax`): The maximum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.min` (or `ftmin`, `forecastsTimeMin`): The minimum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.total` (or `ftt`, `forecastsTimeTotal`): The total runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.total` (or `ft`, `forecastsTotal`): The number of individual forecasts currently available for the job.\n - `id`: Identifier for the anomaly detection job.\n - `model.bucket_allocation_failures` (or `mbaf`, `modelBucketAllocationFailures`): The number of buckets for which new entities in incoming data were not\nprocessed due to insufficient model memory.\n - `model.by_fields` (or `mbf`, `modelByFields`): The number of by field values that were analyzed by the models. This value\nis cumulative for all detectors in the job.\n - `model.bytes` (or `mb`, `modelBytes`): The number of bytes of memory used by the models. This is the maximum value\nsince the last time the model was persisted. If the job is closed, this\nvalue indicates the latest size.\n - `model.bytes_exceeded` (or `mbe`, `modelBytesExceeded`): The number of bytes over the high limit for memory usage at the last\nallocation failure.\n - `model.categorization_status` (or `mcs`, `modelCategorizationStatus`): The status of categorization for the job: `ok` or `warn`. If `ok`,\ncategorization is performing acceptably well (or not being used at all). If\n`warn`, categorization is detecting a distribution of categories that\nsuggests the input data is inappropriate for categorization. Problems could\nbe that there is only one category, more than 90% of categories are rare,\nthe number of categories is greater than 50% of the number of categorized\ndocuments, there are no frequently matched categories, or more than 50% of\ncategories are dead.\n - `model.categorized_doc_count` (or `mcdc`, `modelCategorizedDocCount`): The number of documents that have had a field categorized.\n - `model.dead_category_count` (or `mdcc`, `modelDeadCategoryCount`): The number of categories created by categorization that will never be\nassigned again because another category’s definition makes it a superset of\nthe dead category. Dead categories are a side effect of the way\ncategorization has no prior training.\n - `model.failed_category_count` (or `mdcc`, `modelFailedCategoryCount`): The number of times that categorization wanted to create a new category but\ncouldn’t because the job had hit its model memory limit. This count does\nnot track which specific categories failed to be created. Therefore, you\ncannot use this value to determine the number of unique categories that\nwere missed.\n - `model.frequent_category_count` (or `mfcc`, `modelFrequentCategoryCount`): The number of categories that match more than 1% of categorized documents.\n - `model.log_time` (or `mlt`, `modelLogTime`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_limit` (or `mml`, `modelMemoryLimit`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_status` (or `mms`, `modelMemoryStatus`): The status of the mathematical models: `ok`, `soft_limit`, or `hard_limit`.\nIf `ok`, the models stayed below the configured value. If `soft_limit`, the\nmodels used more than 60% of the configured memory limit and older unused\nmodels will be pruned to free up space. Additionally, in categorization jobs\nno further category examples will be stored. If `hard_limit`, the models\nused more space than the configured memory limit. As a result, not all\nincoming data was processed.\n - `model.over_fields` (or `mof`, `modelOverFields`): The number of over field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.partition_fields` (or `mpf`, `modelPartitionFields`): The number of partition field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.rare_category_count` (or `mrcc`, `modelRareCategoryCount`): The number of categories that match just one categorized document.\n - `model.timestamp` (or `mt`, `modelTimestamp`): The timestamp of the last record when the model stats were gathered.\n - `model.total_category_count` (or `mtcc`, `modelTotalCategoryCount`): The number of categories created by categorization.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that runs the job. This information is\navailable only for open jobs.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that runs the job. This information is\navailable only for open jobs.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that runs the job. This information is\navailable only for open jobs.\n - `node.name` (or `nn`, `nodeName`): The name of the node that runs the job. This information is available only\nfor open jobs.\n - `opened_time` (or `ot`): For open jobs only, the elapsed time for which the job has been open.\n - `state` (or `s`): The status of the anomaly detection job: `closed`, `closing`, `failed`,\n`opened`, or `opening`. If `closed`, the job finished successfully with its\nmodel state persisted. The job must be opened before it can accept further\ndata. If `closing`, the job close action is in progress and has not yet\ncompleted. A closing job cannot accept further data. If `failed`, the job\ndid not finish successfully due to an error. This situation can occur due\nto invalid input data, a fatal error occurring during the analysis, or an\nexternal interaction such as the process being killed by the Linux out of\nmemory (OOM) killer. If the job had irrevocably failed, it must be force\nclosed and then deleted. If the datafeed can be corrected, the job can be\nclosed and then re-opened. If `opened`, the job is available to receive and\nprocess data. If `opening`, the job open action is in progress and has not\nyet completed.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns" @@ -4897,7 +5833,7 @@ { "in": "query", "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.", + "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `assignment_explanation` (or `ae`): For open anomaly detection jobs only, contains messages relating to the\nselection of a node to run the job.\n - `buckets.count` (or `bc`, `bucketsCount`): The number of bucket results produced by the job.\n - `buckets.time.exp_avg` (or `btea`, `bucketsTimeExpAvg`): Exponential moving average of all bucket processing times, in milliseconds.\n - `buckets.time.exp_avg_hour` (or `bteah`, `bucketsTimeExpAvgHour`): Exponentially-weighted moving average of bucket processing times calculated\nin a 1 hour time window, in milliseconds.\n - `buckets.time.max` (or `btmax`, `bucketsTimeMax`): Maximum among all bucket processing times, in milliseconds.\n - `buckets.time.min` (or `btmin`, `bucketsTimeMin`): Minimum among all bucket processing times, in milliseconds.\n - `buckets.time.total` (or `btt`, `bucketsTimeTotal`): Sum of all bucket processing times, in milliseconds.\n - `data.buckets` (or `db`, `dataBuckets`): The number of buckets processed.\n - `data.earliest_record` (or `der`, `dataEarliestRecord`): The timestamp of the earliest chronologically input document.\n - `data.empty_buckets` (or `deb`, `dataEmptyBuckets`): The number of buckets which did not contain any data.\n - `data.input_bytes` (or `dib`, `dataInputBytes`): The number of bytes of input data posted to the anomaly detection job.\n - `data.input_fields` (or `dif`, `dataInputFields`): The total number of fields in input documents posted to the anomaly\ndetection job. This count includes fields that are not used in the analysis.\nHowever, be aware that if you are using a datafeed, it extracts only the\nrequired fields from the documents it retrieves before posting them to the job.\n - `data.input_records` (or `dir`, `dataInputRecords`): The number of input documents posted to the anomaly detection job.\n - `data.invalid_dates` (or `did`, `dataInvalidDates`): The number of input documents with either a missing date field or a date\nthat could not be parsed.\n - `data.last` (or `dl`, `dataLast`): The timestamp at which data was last analyzed, according to server time.\n - `data.last_empty_bucket` (or `dleb`, `dataLastEmptyBucket`): The timestamp of the last bucket that did not contain any data.\n - `data.last_sparse_bucket` (or `dlsb`, `dataLastSparseBucket`): The timestamp of the last bucket that was considered sparse.\n - `data.latest_record` (or `dlr`, `dataLatestRecord`): The timestamp of the latest chronologically input document.\n - `data.missing_fields` (or `dmf`, `dataMissingFields`): The number of input documents that are missing a field that the anomaly\ndetection job is configured to analyze. Input documents with missing fields\nare still processed because it is possible that not all fields are missing.\n - `data.out_of_order_timestamps` (or `doot`, `dataOutOfOrderTimestamps`): The number of input documents that have a timestamp chronologically\npreceding the start of the current anomaly detection bucket offset by the\nlatency window. This information is applicable only when you provide data\nto the anomaly detection job by using the post data API. These out of order\ndocuments are discarded, since jobs require time series data to be in\nascending chronological order.\n - `data.processed_fields` (or `dpf`, `dataProcessedFields`): The total number of fields in all the documents that have been processed by\nthe anomaly detection job. Only fields that are specified in the detector\nconfiguration object contribute to this count. The timestamp is not\nincluded in this count.\n - `data.processed_records` (or `dpr`, `dataProcessedRecords`): The number of input documents that have been processed by the anomaly\ndetection job. This value includes documents with missing fields, since\nthey are nonetheless analyzed. If you use datafeeds and have aggregations\nin your search query, the processed record count is the number of\naggregation results processed, not the number of Elasticsearch documents.\n - `data.sparse_buckets` (or `dsb`, `dataSparseBuckets`): The number of buckets that contained few data points compared to the\nexpected number of data points.\n - `forecasts.memory.avg` (or `fmavg`, `forecastsMemoryAvg`): The average memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.max` (or `fmmax`, `forecastsMemoryMax`): The maximum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.min` (or `fmmin`, `forecastsMemoryMin`): The minimum memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.memory.total` (or `fmt`, `forecastsMemoryTotal`): The total memory usage in bytes for forecasts related to the anomaly\ndetection job.\n - `forecasts.records.avg` (or `fravg`, `forecastsRecordsAvg`): The average number of `m`odel_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.max` (or `frmax`, `forecastsRecordsMax`): The maximum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.min` (or `frmin`, `forecastsRecordsMin`): The minimum number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.records.total` (or `frt`, `forecastsRecordsTotal`): The total number of `model_forecast` documents written for forecasts\nrelated to the anomaly detection job.\n - `forecasts.time.avg` (or `ftavg`, `forecastsTimeAvg`): The average runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.max` (or `ftmax`, `forecastsTimeMax`): The maximum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.min` (or `ftmin`, `forecastsTimeMin`): The minimum runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.time.total` (or `ftt`, `forecastsTimeTotal`): The total runtime in milliseconds for forecasts related to the anomaly\ndetection job.\n - `forecasts.total` (or `ft`, `forecastsTotal`): The number of individual forecasts currently available for the job.\n - `id`: Identifier for the anomaly detection job.\n - `model.bucket_allocation_failures` (or `mbaf`, `modelBucketAllocationFailures`): The number of buckets for which new entities in incoming data were not\nprocessed due to insufficient model memory.\n - `model.by_fields` (or `mbf`, `modelByFields`): The number of by field values that were analyzed by the models. This value\nis cumulative for all detectors in the job.\n - `model.bytes` (or `mb`, `modelBytes`): The number of bytes of memory used by the models. This is the maximum value\nsince the last time the model was persisted. If the job is closed, this\nvalue indicates the latest size.\n - `model.bytes_exceeded` (or `mbe`, `modelBytesExceeded`): The number of bytes over the high limit for memory usage at the last\nallocation failure.\n - `model.categorization_status` (or `mcs`, `modelCategorizationStatus`): The status of categorization for the job: `ok` or `warn`. If `ok`,\ncategorization is performing acceptably well (or not being used at all). If\n`warn`, categorization is detecting a distribution of categories that\nsuggests the input data is inappropriate for categorization. Problems could\nbe that there is only one category, more than 90% of categories are rare,\nthe number of categories is greater than 50% of the number of categorized\ndocuments, there are no frequently matched categories, or more than 50% of\ncategories are dead.\n - `model.categorized_doc_count` (or `mcdc`, `modelCategorizedDocCount`): The number of documents that have had a field categorized.\n - `model.dead_category_count` (or `mdcc`, `modelDeadCategoryCount`): The number of categories created by categorization that will never be\nassigned again because another category’s definition makes it a superset of\nthe dead category. Dead categories are a side effect of the way\ncategorization has no prior training.\n - `model.failed_category_count` (or `mdcc`, `modelFailedCategoryCount`): The number of times that categorization wanted to create a new category but\ncouldn’t because the job had hit its model memory limit. This count does\nnot track which specific categories failed to be created. Therefore, you\ncannot use this value to determine the number of unique categories that\nwere missed.\n - `model.frequent_category_count` (or `mfcc`, `modelFrequentCategoryCount`): The number of categories that match more than 1% of categorized documents.\n - `model.log_time` (or `mlt`, `modelLogTime`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_limit` (or `mml`, `modelMemoryLimit`): The timestamp when the model stats were gathered, according to server time.\n - `model.memory_status` (or `mms`, `modelMemoryStatus`): The status of the mathematical models: `ok`, `soft_limit`, or `hard_limit`.\nIf `ok`, the models stayed below the configured value. If `soft_limit`, the\nmodels used more than 60% of the configured memory limit and older unused\nmodels will be pruned to free up space. Additionally, in categorization jobs\nno further category examples will be stored. If `hard_limit`, the models\nused more space than the configured memory limit. As a result, not all\nincoming data was processed.\n - `model.over_fields` (or `mof`, `modelOverFields`): The number of over field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.partition_fields` (or `mpf`, `modelPartitionFields`): The number of partition field values that were analyzed by the models. This\nvalue is cumulative for all detectors in the job.\n - `model.rare_category_count` (or `mrcc`, `modelRareCategoryCount`): The number of categories that match just one categorized document.\n - `model.timestamp` (or `mt`, `modelTimestamp`): The timestamp of the last record when the model stats were gathered.\n - `model.total_category_count` (or `mtcc`, `modelTotalCategoryCount`): The number of categories created by categorization.\n - `node.address` (or `na`, `nodeAddress`): The network address of the node that runs the job. This information is\navailable only for open jobs.\n - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that runs the job. This information is\navailable only for open jobs.\n - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that runs the job. This information is\navailable only for open jobs.\n - `node.name` (or `nn`, `nodeName`): The name of the node that runs the job. This information is available only\nfor open jobs.\n - `opened_time` (or `ot`): For open jobs only, the elapsed time for which the job has been open.\n - `state` (or `s`): The status of the anomaly detection job: `closed`, `closing`, `failed`,\n`opened`, or `opening`. If `closed`, the job finished successfully with its\nmodel state persisted. The job must be opened before it can accept further\ndata. If `closing`, the job close action is in progress and has not yet\ncompleted. A closing job cannot accept further data. If `failed`, the job\ndid not finish successfully due to an error. This situation can occur due\nto invalid input data, a fatal error occurring during the analysis, or an\nexternal interaction such as the process being killed by the Linux out of\nmemory (OOM) killer. If the job had irrevocably failed, it must be force\nclosed and then deleted. If the datafeed can be corrected, the job can be\nclosed and then re-opened. If `opened`, the job is available to receive and\nprocess data. If `opening`, the job open action is in progress and has not\nyet completed.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns" @@ -4935,6 +5871,36 @@ ], "x-api": "ml_jobs.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.ml_jobs(\n h=\"id,s,dpr,mb\",\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.mlJobs({\n h: \"id,s,dpr,mb\",\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.ml_jobs(\n h: \"id,s,dpr,mb\",\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->mlJobs([\n \"h\" => \"id,s,dpr,mb\",\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().mlJobs();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -4965,7 +5931,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of column names to display.", + "description": "A comma-separated list of column names to display.\n\nSupported values include:\n - `create_time` (or `ct`): The time when the trained model was created.\n - `created_by` (or `c`, `createdBy`): Information on the creator of the trained model.\n - `data_frame_analytics_id` (or `df`, `dataFrameAnalytics`, `dfid`): Identifier for the data frame analytics job that created the model. Only\ndisplayed if it is still available.\n - `description` (or `d`): The description of the trained model.\n - `heap_size` (or `hs`, `modelHeapSize`): The estimated heap size to keep the trained model in memory.\n - `id`: Identifier for the trained model.\n - `ingest.count` (or `ic`, `ingestCount`): The total number of documents that are processed by the model.\n - `ingest.current` (or `icurr`, `ingestCurrent`): The total number of document that are currently being handled by the\ntrained model.\n - `ingest.failed` (or `if`, `ingestFailed`): The total number of failed ingest attempts with the trained model.\n - `ingest.pipelines` (or `ip`, `ingestPipelines`): The total number of ingest pipelines that are referencing the trained\nmodel.\n - `ingest.time` (or `it`, `ingestTime`): The total time that is spent processing documents with the trained model.\n - `license` (or `l`): The license level of the trained model.\n - `operations` (or `o`, `modelOperations`): The estimated number of operations to use the trained model. This number\nhelps measuring the computational complexity of the model.\n - `version` (or `v`): The Elasticsearch version number in which the trained model was created.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" @@ -4975,7 +5941,7 @@ { "in": "query", "name": "s", - "description": "A comma-separated list of column names or aliases used to sort the response.", + "description": "A comma-separated list of column names or aliases used to sort the response.\n\nSupported values include:\n - `create_time` (or `ct`): The time when the trained model was created.\n - `created_by` (or `c`, `createdBy`): Information on the creator of the trained model.\n - `data_frame_analytics_id` (or `df`, `dataFrameAnalytics`, `dfid`): Identifier for the data frame analytics job that created the model. Only\ndisplayed if it is still available.\n - `description` (or `d`): The description of the trained model.\n - `heap_size` (or `hs`, `modelHeapSize`): The estimated heap size to keep the trained model in memory.\n - `id`: Identifier for the trained model.\n - `ingest.count` (or `ic`, `ingestCount`): The total number of documents that are processed by the model.\n - `ingest.current` (or `icurr`, `ingestCurrent`): The total number of document that are currently being handled by the\ntrained model.\n - `ingest.failed` (or `if`, `ingestFailed`): The total number of failed ingest attempts with the trained model.\n - `ingest.pipelines` (or `ip`, `ingestPipelines`): The total number of ingest pipelines that are referencing the trained\nmodel.\n - `ingest.time` (or `it`, `ingestTime`): The total time that is spent processing documents with the trained model.\n - `license` (or `l`): The license level of the trained model.\n - `operations` (or `o`, `modelOperations`): The estimated number of operations to use the trained model. This number\nhelps measuring the computational complexity of the model.\n - `version` (or `v`): The Elasticsearch version number in which the trained model was created.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" @@ -5033,6 +5999,36 @@ ], "x-api": "ml_trained_models.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/ml/trained_models?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.ml_trained_models(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.mlTrainedModels({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.ml_trained_models(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->mlTrainedModels([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/trained_models?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().mlTrainedModels();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5074,7 +6070,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of column names to display.", + "description": "A comma-separated list of column names to display.\n\nSupported values include:\n - `create_time` (or `ct`): The time when the trained model was created.\n - `created_by` (or `c`, `createdBy`): Information on the creator of the trained model.\n - `data_frame_analytics_id` (or `df`, `dataFrameAnalytics`, `dfid`): Identifier for the data frame analytics job that created the model. Only\ndisplayed if it is still available.\n - `description` (or `d`): The description of the trained model.\n - `heap_size` (or `hs`, `modelHeapSize`): The estimated heap size to keep the trained model in memory.\n - `id`: Identifier for the trained model.\n - `ingest.count` (or `ic`, `ingestCount`): The total number of documents that are processed by the model.\n - `ingest.current` (or `icurr`, `ingestCurrent`): The total number of document that are currently being handled by the\ntrained model.\n - `ingest.failed` (or `if`, `ingestFailed`): The total number of failed ingest attempts with the trained model.\n - `ingest.pipelines` (or `ip`, `ingestPipelines`): The total number of ingest pipelines that are referencing the trained\nmodel.\n - `ingest.time` (or `it`, `ingestTime`): The total time that is spent processing documents with the trained model.\n - `license` (or `l`): The license level of the trained model.\n - `operations` (or `o`, `modelOperations`): The estimated number of operations to use the trained model. This number\nhelps measuring the computational complexity of the model.\n - `version` (or `v`): The Elasticsearch version number in which the trained model was created.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" @@ -5084,7 +6080,7 @@ { "in": "query", "name": "s", - "description": "A comma-separated list of column names or aliases used to sort the response.", + "description": "A comma-separated list of column names or aliases used to sort the response.\n\nSupported values include:\n - `create_time` (or `ct`): The time when the trained model was created.\n - `created_by` (or `c`, `createdBy`): Information on the creator of the trained model.\n - `data_frame_analytics_id` (or `df`, `dataFrameAnalytics`, `dfid`): Identifier for the data frame analytics job that created the model. Only\ndisplayed if it is still available.\n - `description` (or `d`): The description of the trained model.\n - `heap_size` (or `hs`, `modelHeapSize`): The estimated heap size to keep the trained model in memory.\n - `id`: Identifier for the trained model.\n - `ingest.count` (or `ic`, `ingestCount`): The total number of documents that are processed by the model.\n - `ingest.current` (or `icurr`, `ingestCurrent`): The total number of document that are currently being handled by the\ntrained model.\n - `ingest.failed` (or `if`, `ingestFailed`): The total number of failed ingest attempts with the trained model.\n - `ingest.pipelines` (or `ip`, `ingestPipelines`): The total number of ingest pipelines that are referencing the trained\nmodel.\n - `ingest.time` (or `it`, `ingestTime`): The total time that is spent processing documents with the trained model.\n - `license` (or `l`): The license level of the trained model.\n - `operations` (or `o`, `modelOperations`): The estimated number of operations to use the trained model. This number\nhelps measuring the computational complexity of the model.\n - `version` (or `v`): The Elasticsearch version number in which the trained model was created.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumns" @@ -5142,6 +6138,36 @@ ], "x-api": "ml_trained_models.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/ml/trained_models?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.ml_trained_models(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.mlTrainedModels({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.ml_trained_models(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->mlTrainedModels([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/trained_models?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().mlTrainedModels();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5162,7 +6188,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `node`: The node name.\n - `id` (or `id`, `nodeId`): The unique node ID.\n - `pid` (or `p`): The process ID.\n - `host` (or `h`): The host name.\n - `ip` (or `i`): The IP address.\n - `port` (or `po`): The bound transport port.\n - `attr` (or `attr.name`): The attribute description.\n - `value` (or `attr.value`): The attribute value.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatNodeattrsColumns" @@ -5236,6 +6262,36 @@ ], "x-api": "nodeattrs.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/nodeattrs?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.nodeattrs(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.nodeattrs({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.nodeattrs(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->nodeattrs([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/nodeattrs?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().nodeattrs();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5276,7 +6332,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.\n\nSupported values include:\n - `build` (or `b`): The Elasticsearch build hash. For example: `5c03844`.\n - `completion.size` (or `cs`, `completionSize`): The size of completion. For example: `0b`.\n - `cpu`: The percentage of recent system CPU used.\n - `disk.avail` (or `d`, `disk`, `diskAvail`): The available disk space. For example: `198.4gb`.\n - `disk.total` (or `dt`, `diskTotal`): The total disk space. For example: `458.3gb`.\n - `disk.used` (or `du`, `diskUsed`): The used disk space. For example: `259.8gb`.\n - `disk.used_percent` (or `dup`, `diskUsedPercent`): The percentage of disk space used.\n - `fielddata.evictions` (or `fe`, `fielddataEvictions`): The number of fielddata cache evictions.\n - `fielddata.memory_size` (or `fm`, `fielddataMemory`): The fielddata cache memory used. For example: `0b`.\n - `file_desc.current` (or `fdc`, `fileDescriptorCurrent`): The number of file descriptors used.\n - `file_desc.max` (or `fdm`, `fileDescriptorMax`): The maximum number of file descriptors.\n - `file_desc.percent` (or `fdp`, `fileDescriptorPercent`): The percentage of file descriptors used.\n - `flush.total` (or `ft`, `flushTotal`): The number of flushes.\n - `flush.total_time` (or `ftt`, `flushTotalTime`): The amount of time spent in flush.\n - `get.current` (or `gc`, `getCurrent`): The number of current get operations.\n - `get.exists_time` (or `geti`, `getExistsTime`): The time spent in successful get operations. For example: `14ms`.\n - `get.exists_total` (or `geto`, `getExistsTotal`): The number of successful get operations.\n - `get.missing_time` (or `gmti`, `getMissingTime`): The time spent in failed get operations. For example: `0s`.\n - `get.missing_total` (or `gmto`, `getMissingTotal`): The number of failed get operations.\n - `get.time` (or `gti`, `getTime`): The amount of time spent in get operations. For example: `14ms`.\n - `get.total` (or `gto`, `getTotal`): The number of get operations.\n - `heap.current` (or `hc`, `heapCurrent`): The used heap size. For example: `311.2mb`.\n - `heap.max` (or `hm`, `heapMax`): The total heap size. For example: `4gb`.\n - `heap.percent` (or `hp`, `heapPercent`): The used percentage of total allocated Elasticsearch JVM heap.\nThis value reflects only the Elasticsearch process running within the operating system and is the most direct indicator of its JVM, heap, or memory resource performance.\n - `http_address` (or `http`): The bound HTTP address.\n - `id` (or `nodeId`): The identifier for the node.\n - `indexing.delete_current` (or `idc`, `indexingDeleteCurrent`): The number of current deletion operations.\n - `indexing.delete_time` (or `idti`, `indexingDeleteTime`): The time spent in deletion operations. For example: `2ms`.\n - `indexing.delete_total` (or `idto`, `indexingDeleteTotal`): The number of deletion operations.\n - `indexing.index_current` (or `iic`, `indexingIndexCurrent`): The number of current indexing operations.\n - `indexing.index_failed` (or `iif`, `indexingIndexFailed`): The number of failed indexing operations.\n - `indexing.index_failed_due_to_version_conflict` (or `iifvc`, `indexingIndexFailedDueToVersionConflict`): The number of indexing operations that failed due to version conflict.\n - `indexing.index_time` (or `iiti`, `indexingIndexTime`): The time spent in indexing operations. For example: `134ms`.\n - `indexing.index_total` (or `iito`, `indexingIndexTotal`): The number of indexing operations.\n - `ip` (or `i`): The IP address.\n - `jdk` (or `j`): The Java version. For example: `1.8.0`.\n - `load_1m` (or `l`): The most recent load average. For example: `0.22`.\n - `load_5m` (or `l`): The load average for the last five minutes. For example: `0.78`.\n - `load_15m` (or `l`): The load average for the last fifteen minutes. For example: `1.24`.\n - `available_processors` (or `ap`): The number of available processors (logical CPU cores available to the JVM).\n - `mappings.total_count` (or `mtc`, `mappingsTotalCount`): The number of mappings, including runtime and object fields.\n - `mappings.total_estimated_overhead_in_bytes` (or `mteo`, `mappingsTotalEstimatedOverheadInBytes`): The estimated heap overhead, in bytes, of mappings on this node, which allows for 1KiB of heap for every mapped field.\n - `master` (or `m`): Indicates whether the node is the elected master node.\nReturned values include `*` (elected master) and `-` (not elected master).\n - `merges.current` (or `mc`, `mergesCurrent`): The number of current merge operations.\n - `merges.current_docs` (or `mcd`, `mergesCurrentDocs`): The number of current merging documents.\n - `merges.current_size` (or `mcs`, `mergesCurrentSize`): The size of current merges. For example: `0b`.\n - `merges.total` (or `mt`, `mergesTotal`): The number of completed merge operations.\n - `merges.total_docs` (or `mtd`, `mergesTotalDocs`): The number of merged documents.\n - `merges.total_size` (or `mts`, `mergesTotalSize`): The total size of merges. For example: `0b`.\n - `merges.total_time` (or `mtt`, `mergesTotalTime`): The time spent merging documents. For example: `0s`.\n - `name` (or `n`): The node name.\n - `node.role` (or `r`, `role`, `nodeRole`): The roles of the node.\nReturned values include `c` (cold node), `d` (data node), `f` (frozen node), `h` (hot node), `i` (ingest node), `l` (machine learning node), `m` (master-eligible node), `r` (remote cluster client node), `s` (content node), `t` (transform node), `v` (voting-only node), `w` (warm node), and `-` (coordinating node only).\nFor example, `dim` indicates a master-eligible data and ingest node.\n - `pid` (or `p`): The process identifier.\n - `port` (or `po`): The bound transport port number.\n - `query_cache.memory_size` (or `qcm`, `queryCacheMemory`): The used query cache memory. For example: `0b`.\n - `query_cache.evictions` (or `qce`, `queryCacheEvictions`): The number of query cache evictions.\n - `query_cache.hit_count` (or `qchc`, `queryCacheHitCount`): The query cache hit count.\n - `query_cache.miss_count` (or `qcmc`, `queryCacheMissCount`): The query cache miss count.\n - `ram.current` (or `rc`, `ramCurrent`): The used total memory. For example: `513.4mb`.\n - `ram.max` (or `rm`, `ramMax`): The total memory. For example: `2.9gb`.\n - `ram.percent` (or `rp`, `ramPercent`): The used percentage of the total operating system memory.\nThis reflects all processes running on the operating system instead of only Elasticsearch and is not guaranteed to correlate to its performance.\n - `refresh.total` (or `rto`, `refreshTotal`): The number of refresh operations.\n - `refresh.time` (or `rti`, `refreshTime`): The time spent in refresh operations. For example: `91ms`.\n - `request_cache.memory_size` (or `rcm`, `requestCacheMemory`): The used request cache memory. For example: `0b`.\n - `request_cache.evictions` (or `rce`, `requestCacheEvictions`): The number of request cache evictions.\n - `request_cache.hit_count` (or `rchc`, `requestCacheHitCount`): The request cache hit count.\n - `request_cache.miss_count` (or `rcmc`, `requestCacheMissCount`): The request cache miss count.\n - `script.compilations` (or `scrcc`, `scriptCompilations`): The number of total script compilations.\n - `script.cache_evictions` (or `scrce`, `scriptCacheEvictions`): The number of total compiled scripts evicted from cache.\n - `search.fetch_current` (or `sfc`, `searchFetchCurrent`): The number of current fetch phase operations.\n - `search.fetch_time` (or `sfti`, `searchFetchTime`): The time spent in fetch phase. For example: `37ms`.\n - `search.fetch_total` (or `sfto`, `searchFetchTotal`): The number of fetch operations.\n - `search.open_contexts` (or `so`, `searchOpenContexts`): The number of open search contexts.\n - `search.query_current` (or `sqc`, `searchQueryCurrent`): The number of current query phase operations.\n - `search.query_time` (or `sqti`, `searchQueryTime`): The time spent in query phase. For example: `43ms`.\n - `search.query_total` (or `sqto`, `searchQueryTotal`): The number of query operations.\n - `search.scroll_current` (or `scc`, `searchScrollCurrent`): The number of open scroll contexts.\n - `search.scroll_time` (or `scti`, `searchScrollTime`): The amount of time scroll contexts were held open. For example: `2m`.\n - `search.scroll_total` (or `scto`, `searchScrollTotal`): The number of completed scroll contexts.\n - `segments.count` (or `sc`, `segmentsCount`): The number of segments.\n - `segments.fixed_bitset_memory` (or `sfbm`, `fixedBitsetMemory`): The memory used by fixed bit sets for nested object field types and type filters for types referred in join fields.\nFor example: `1.0kb`.\n - `segments.index_writer_memory` (or `siwm`, `segmentsIndexWriterMemory`): The memory used by the index writer. For example: `18mb`.\n - `segments.memory` (or `sm`, `segmentsMemory`): The memory used by segments. For example: `1.4kb`.\n - `segments.version_map_memory` (or `svmm`, `segmentsVersionMapMemory`): The memory used by the version map. For example: `1.0kb`.\n - `shard_stats.total_count` (or `sstc`, `shards`, `shardStatsTotalCount`): The number of shards assigned.\n - `suggest.current` (or `suc`, `suggestCurrent`): The number of current suggest operations.\n - `suggest.time` (or `suti`, `suggestTime`): The time spent in suggest operations.\n - `suggest.total` (or `suto`, `suggestTotal`): The number of suggest operations.\n - `uptime` (or `u`): The amount of node uptime. For example: `17.3m`.\n - `version` (or `v`): The Elasticsearch version. For example: `9.0.0`.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatNodeColumns" @@ -5340,6 +6396,36 @@ ], "x-api": "nodes.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/nodes?v=true&h=id,ip,port,v,m&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.nodes(\n v=True,\n h=\"id,ip,port,v,m\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.nodes({\n v: \"true\",\n h: \"id,ip,port,v,m\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.nodes(\n v: \"true\",\n h: \"id,ip,port,v,m\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->nodes([\n \"v\" => \"true\",\n \"h\" => \"id,ip,port,v,m\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/nodes?v=true&h=id,ip,port,v,m&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().nodes();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5360,7 +6446,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `insertOrder` (or `o`): The task insertion order.\n - `timeInQueue` (or `t`): How long the task has been in the queue.\n - `priority` (or `p`): The task priority.\n - `source` (or `s`): The task source.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatPendingTasksColumns" @@ -5428,6 +6514,36 @@ ], "x-api": "pending_tasks.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/pending_tasks?v=true&h=insertOrder,timeInQueue,priority,source&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.pending_tasks(\n v=True,\n h=\"insertOrder,timeInQueue,priority,source\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.pendingTasks({\n v: \"true\",\n h: \"insertOrder,timeInQueue,priority,source\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.pending_tasks(\n v: \"true\",\n h: \"insertOrder,timeInQueue,priority,source\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->pendingTasks([\n \"v\" => \"true\",\n \"h\" => \"insertOrder,timeInQueue,priority,source\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/pending_tasks?v=true&h=insertOrder,timeInQueue,priority,source&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().pendingTasks();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5448,7 +6564,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `id`: The unique node ID.\n - `name` (or `n`): The node name.\n - `component` (or `c`): The component.\n - `version` (or `v`): The component version.\n - `description` (or `d`): The plugin details.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatPluginsColumns" @@ -5526,6 +6642,36 @@ ], "x-api": "plugins.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/plugins?v=true&s=component&h=name,component,version,description&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.plugins(\n v=True,\n s=\"component\",\n h=\"name,component,version,description\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.plugins({\n v: \"true\",\n s: \"component\",\n h: \"name,component,version,description\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.plugins(\n v: \"true\",\n s: \"component\",\n h: \"name,component,version,description\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->plugins([\n \"v\" => \"true\",\n \"s\" => \"component\",\n \"h\" => \"name,component,version,description\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/plugins?v=true&s=component&h=name,component,version,description&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().plugins();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5576,7 +6722,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.\n\nSupported values include:\n - `index` (or `i`, `idx`): The index name.\n - `shard` (or `s`, `sh`): The shard name.\n - `start_time` (or `start`): The recovery start time.\n - `start_time_millis` (or `start_millis`): The recovery start time in epoch milliseconds.\n - `stop_time` (or `stop`): The recovery stop time.\n - `stop_time_millis` (or `stop_millis`): The recovery stop time in epoch milliseconds.\n - `time` (or `t`, `ti`): The recovery time.\n - `type` (or `ty`): The recovery type.\n - `stage` (or `st`): The recovery stage.\n - `source_host` (or `shost`): The source host.\n - `source_node` (or `snode`): The source node name.\n - `target_host` (or `thost`): The target host.\n - `target_node` (or `tnode`): The target node name.\n - `repository` (or `rep`): The repository.\n - `snapshot` (or `snap`): The snapshot.\n - `files` (or `f`): The number of files to recover.\n - `files_recovered` (or `fr`): The files recovered.\n - `files_percent` (or `fp`): The percent of files recovered.\n - `files_total` (or `tf`): The total number of files.\n - `bytes` (or `b`): The number of bytes to recover.\n - `bytes_recovered` (or `br`): The bytes recovered.\n - `bytes_percent` (or `bp`): The percent of bytes recovered.\n - `bytes_total` (or `tb`): The total number of bytes.\n - `translog_ops` (or `to`): The number of translog ops to recover.\n - `translog_ops_recovered` (or `tor`): The translog ops recovered.\n - `translog_ops_percent` (or `top`): The percent of translog ops recovered.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatRecoveryColumns" @@ -5636,6 +6782,36 @@ ], "x-api": "recovery.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/recovery?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.recovery(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.recovery({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.recovery(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->recovery([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/recovery?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().recovery();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5697,7 +6873,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.\n\nSupported values include:\n - `index` (or `i`, `idx`): The index name.\n - `shard` (or `s`, `sh`): The shard name.\n - `start_time` (or `start`): The recovery start time.\n - `start_time_millis` (or `start_millis`): The recovery start time in epoch milliseconds.\n - `stop_time` (or `stop`): The recovery stop time.\n - `stop_time_millis` (or `stop_millis`): The recovery stop time in epoch milliseconds.\n - `time` (or `t`, `ti`): The recovery time.\n - `type` (or `ty`): The recovery type.\n - `stage` (or `st`): The recovery stage.\n - `source_host` (or `shost`): The source host.\n - `source_node` (or `snode`): The source node name.\n - `target_host` (or `thost`): The target host.\n - `target_node` (or `tnode`): The target node name.\n - `repository` (or `rep`): The repository.\n - `snapshot` (or `snap`): The snapshot.\n - `files` (or `f`): The number of files to recover.\n - `files_recovered` (or `fr`): The files recovered.\n - `files_percent` (or `fp`): The percent of files recovered.\n - `files_total` (or `tf`): The total number of files.\n - `bytes` (or `b`): The number of bytes to recover.\n - `bytes_recovered` (or `br`): The bytes recovered.\n - `bytes_percent` (or `bp`): The percent of bytes recovered.\n - `bytes_total` (or `tb`): The total number of bytes.\n - `translog_ops` (or `to`): The number of translog ops to recover.\n - `translog_ops_recovered` (or `tor`): The translog ops recovered.\n - `translog_ops_percent` (or `top`): The percent of translog ops recovered.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatRecoveryColumns" @@ -5757,6 +6933,36 @@ ], "x-api": "recovery.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/recovery?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.recovery(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.recovery({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.recovery(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->recovery([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/recovery?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().recovery();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5845,6 +7051,36 @@ ], "x-api": "repositories.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/repositories?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.repositories(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.repositories({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.repositories(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->repositories([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/repositories?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().repositories();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -5865,7 +7101,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.\n\nSupported values include:\n - `index` (or `i`, `idx`): The name of the index.\n - `shard` (or `s`, `sh`): The name of the shard.\n - `prirep` (or `p`, `pr`, `primaryOrReplica`): The shard type. Returned values are 'primary' or 'replica'.\n - `ip`: IP address of the segment’s shard, such as '127.0.1.1'.\n - `segment`: The name of the segment, such as '_0'. The segment name is derived from the segment generation and used internally to create file names in the directory of the shard.\n - `generation`: Generation number, such as '0'. Elasticsearch increments this generation number for each segment written. Elasticsearch then uses this number to derive the segment name.\n - `docs.count`: The number of documents as reported by Lucene. This excludes deleted documents and counts any [nested documents](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/nested) separately from their parents. It also excludes documents which were indexed recently and do not yet belong to a segment.\n - `docs.deleted`: The number of deleted documents as reported by Lucene, which may be higher or lower than the number of delete operations you have performed. This number excludes deletes that were performed recently and do not yet belong to a segment. Deleted documents are cleaned up by the [automatic merge process](https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge) if it makes sense to do so. Also, Elasticsearch creates extra deleted documents to internally track the recent history of operations on a shard.\n - `size`: The disk space used by the segment, such as '50kb'.\n - `size.memory`: The bytes of segment data stored in memory for efficient search, such as '1264'. A value of '-1' indicates Elasticsearch was unable to compute this number.\n - `committed`: If 'true', the segments is synced to disk. Segments that are synced can survive a hard reboot. If 'false', the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start.\n - `searchable`: If 'true', the segment is searchable. If 'false', the segment has most likely been written to disk but needs a [refresh](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh) to be searchable.\n - `version`: The version of Lucene used to write the segment.\n - `compound`: If 'true', the segment is stored in a compound file. This means Lucene merged all files from the segment in a single file to save file descriptors.\n - `id`: The ID of the node, such as 'k0zy'.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatSegmentsColumns" @@ -5905,7 +7141,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.", + "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -5984,6 +7220,36 @@ ], "x-api": "segments.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/segments?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.segments(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.segments({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.segments(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->segments([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/segments?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().segments();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6015,7 +7281,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.\n\nSupported values include:\n - `index` (or `i`, `idx`): The name of the index.\n - `shard` (or `s`, `sh`): The name of the shard.\n - `prirep` (or `p`, `pr`, `primaryOrReplica`): The shard type. Returned values are 'primary' or 'replica'.\n - `ip`: IP address of the segment’s shard, such as '127.0.1.1'.\n - `segment`: The name of the segment, such as '_0'. The segment name is derived from the segment generation and used internally to create file names in the directory of the shard.\n - `generation`: Generation number, such as '0'. Elasticsearch increments this generation number for each segment written. Elasticsearch then uses this number to derive the segment name.\n - `docs.count`: The number of documents as reported by Lucene. This excludes deleted documents and counts any [nested documents](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/nested) separately from their parents. It also excludes documents which were indexed recently and do not yet belong to a segment.\n - `docs.deleted`: The number of deleted documents as reported by Lucene, which may be higher or lower than the number of delete operations you have performed. This number excludes deletes that were performed recently and do not yet belong to a segment. Deleted documents are cleaned up by the [automatic merge process](https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge) if it makes sense to do so. Also, Elasticsearch creates extra deleted documents to internally track the recent history of operations on a shard.\n - `size`: The disk space used by the segment, such as '50kb'.\n - `size.memory`: The bytes of segment data stored in memory for efficient search, such as '1264'. A value of '-1' indicates Elasticsearch was unable to compute this number.\n - `committed`: If 'true', the segments is synced to disk. Segments that are synced can survive a hard reboot. If 'false', the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start.\n - `searchable`: If 'true', the segment is searchable. If 'false', the segment has most likely been written to disk but needs a [refresh](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh) to be searchable.\n - `version`: The version of Lucene used to write the segment.\n - `compound`: If 'true', the segment is stored in a compound file. This means Lucene merged all files from the segment in a single file to save file descriptors.\n - `id`: The ID of the node, such as 'k0zy'.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatSegmentsColumns" @@ -6055,7 +7321,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.", + "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -6134,6 +7400,36 @@ ], "x-api": "segments.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/segments?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.segments(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.segments({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.segments(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->segments([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/segments?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().segments();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6154,7 +7450,7 @@ { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "List of columns to appear in the response. Supports simple wildcards.\n\nSupported values include:\n - `completion.size` (or `cs`, `completionSize`): Size of completion. For example: `0b`.\n - `dataset.size`: Disk space used by the shard’s dataset, which may or may not be the size on\ndisk, but includes space used by the shard on object storage. Reported as a size value for example: `5kb`.\n - `dense_vector.value_count` (or `dvc`, `denseVectorCount`): Number of indexed dense vectors.\n - `docs` (or `d`, `dc`): Number of documents in shard, for example: `25`.\n - `fielddata.evictions` (or `fe`, `fielddataEvictions`): Fielddata cache evictions, for example: `0`.\n - `fielddata.memory_size` (or `fm`, `fielddataMemory`): Used fielddata cache memory, for example: `0b`.\n - `flush.total` (or `ft`, `flushTotal`): Number of flushes, for example: `1`.\n - `flush.total_time` (or `ftt`, `flushTotalTime`): Time spent in flush, for example: `1`.\n - `get.current` (or `gc`, `getCurrent`): Number of current get operations, for example: `0`.\n - `get.exists_time` (or `geti`, `getExistsTime`): Time spent in successful gets, for example: `14ms`.\n - `get.exists_total` (or `geto`, `getExistsTotal`): Number of successful get operations, for example: `2`.\n - `get.missing_time` (or `gmti`, `getMissingTime`): Time spent in failed gets, for example: `0s`.\n - `get.missing_total` (or `gmto`, `getMissingTotal`): Number of failed get operations, for example: `1`.\n - `get.time` (or `gti`, `getTime`): Time spent in get, for example: `14ms`.\n - `get.total` (or `gto`, `getTotal`): Number of get operations, for example: `2`.\n - `id`: ID of the node, for example: `k0zy`.\n - `index` (or `i`, `idx`): Name of the index.\n - `indexing.delete_current` (or `idc`, `indexingDeleteCurrent`): Number of current deletion operations, for example: `0`.\n - `indexing.delete_time` (or `idti`, `indexingDeleteTime`): Time spent in deletions, for example: `2ms`.\n - `indexing.delete_total` (or `idto`, `indexingDeleteTotal`): Number of deletion operations, for example: `2`.\n - `indexing.index_current` (or `iic`, `indexingIndexCurrent`): Number of current indexing operations, for example: `0`.\n - `indexing.index_failed_due_to_version_conflict` (or `iifvc`, `indexingIndexFailedDueToVersionConflict`): Number of failed indexing operations due to version conflict, for example: `0`.\n - `indexing.index_failed` (or `iif`, `indexingIndexFailed`): Number of failed indexing operations, for example: `0`.\n - `indexing.index_time` (or `iiti`, `indexingIndexTime`): Time spent in indexing, such as for example: `134ms`.\n - `indexing.index_total` (or `iito`, `indexingIndexTotal`): Number of indexing operations, for example: `1`.\n - `ip`: IP address of the node, for example: `127.0.1.1`.\n - `merges.current` (or `mc`, `mergesCurrent`): Number of current merge operations, for example: `0`.\n - `merges.current_docs` (or `mcd`, `mergesCurrentDocs`): Number of current merging documents, for example: `0`.\n - `merges.current_size` (or `mcs`, `mergesCurrentSize`): Size of current merges, for example: `0b`.\n - `merges.total` (or `mt`, `mergesTotal`): Number of completed merge operations, for example: `0`.\n - `merges.total_docs` (or `mtd`, `mergesTotalDocs`): Number of merged documents, for example: `0`.\n - `merges.total_size` (or `mts`, `mergesTotalSize`): Size of current merges, for example: `0b`.\n - `merges.total_time` (or `mtt`, `mergesTotalTime`): Time spent merging documents, for example: `0s`.\n - `node` (or `n`): Node name, for example: `I8hydUG`.\n - `prirep` (or `p`, `pr`, `primaryOrReplica`): Shard type. Returned values are `primary` or `replica`.\n - `query_cache.evictions` (or `qce`, `queryCacheEvictions`): Query cache evictions, for example: `0`.\n - `query_cache.memory_size` (or `qcm`, `queryCacheMemory`): Used query cache memory, for example: `0b`.\n - `recoverysource.type` (or `rs`): Type of recovery source.\n - `refresh.time` (or `rti`, `refreshTime`): Time spent in refreshes, for example: `91ms`.\n - `refresh.total` (or `rto`, `refreshTotal`): Number of refreshes, for example: `16`.\n - `search.fetch_current` (or `sfc`, `searchFetchCurrent`): Current fetch phase operations, for example: `0`.\n - `search.fetch_time` (or `sfti`, `searchFetchTime`): Time spent in fetch phase, for example: `37ms`.\n - `search.fetch_total` (or `sfto`, `searchFetchTotal`): Number of fetch operations, for example: `7`.\n - `search.open_contexts` (or `so`, `searchOpenContexts`): Open search contexts, for example: `0`.\n - `search.query_current` (or `sqc`, `searchQueryCurrent`): Current query phase operations, for example: `0`.\n - `search.query_time` (or `sqti`, `searchQueryTime`): Time spent in query phase, for example: `43ms`.\n - `search.query_total` (or `sqto`, `searchQueryTotal`): Number of query operations, for example: `9`.\n - `search.scroll_current` (or `scc`, `searchScrollCurrent`): Open scroll contexts, for example: `2`.\n - `search.scroll_time` (or `scti`, `searchScrollTime`): Time scroll contexts held open, for example: `2m`.\n - `search.scroll_total` (or `scto`, `searchScrollTotal`): Completed scroll contexts, for example: `1`.\n - `segments.count` (or `sc`, `segmentsCount`): Number of segments, for example: `4`.\n - `segments.fixed_bitset_memory` (or `sfbm`, `fixedBitsetMemory`): Memory used by fixed bit sets for nested object field types and type filters for types referred in join fields, for example: `1.0kb`.\n - `segments.index_writer_memory` (or `siwm`, `segmentsIndexWriterMemory`): Memory used by index writer, for example: `18mb`.\n - `segments.memory` (or `sm`, `segmentsMemory`): Memory used by segments, for example: `1.4kb`.\n - `segments.version_map_memory` (or `svmm`, `segmentsVersionMapMemory`): Memory used by version map, for example: `1.0kb`.\n - `seq_no.global_checkpoint` (or `sqg`, `globalCheckpoint`): Global checkpoint.\n - `seq_no.local_checkpoint` (or `sql`, `localCheckpoint`): Local checkpoint.\n - `seq_no.max` (or `sqm`, `maxSeqNo`): Maximum sequence number.\n - `shard` (or `s`, `sh`): Name of the shard.\n - `dsparse_vector.value_count` (or `svc`, `sparseVectorCount`): Number of indexed [sparse vectors](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/sparse-vector).\n - `state` (or `st`): State of the shard. Returned values are:\n* `INITIALIZING`: The shard is recovering from a peer shard or gateway.\n* `RELOCATING`: The shard is relocating.\n* `STARTED`: The shard has started.\n* `UNASSIGNED`: The shard is not assigned to any node.\n - `store` (or `sto`): Disk space used by the shard, for example: `5kb`.\n - `suggest.current` (or `suc`, `suggestCurrent`): Number of current suggest operations, for example: `0`.\n - `suggest.time` (or `suti`, `suggestTime`): Time spent in suggest, for example: `0`.\n - `suggest.total` (or `suto`, `suggestTotal`): Number of suggest operations, for example: `0`.\n - `sync_id`: Sync ID of the shard.\n - `unassigned.at` (or `ua`): Time at which the shard became unassigned in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/List_of_UTC_offsets).\n - `unassigned.details` (or `ud`): Details about why the shard became unassigned. This does not explain why the shard is currently unassigned. To understand why a shard\nis not assigned, use the [Cluster allocation explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain) API.\n - `unassigned.for` (or `uf`): Time at which the shard was requested to be unassigned in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/List_of_UTC_offsets).\n - `unassigned.reason` (or `ur`): Indicates the reason for the last change to the state of this unassigned shard. This does not explain why the shard is currently unassigned.\nTo understand why a shard is not assigned, use the [Cluster allocation explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain) API. Returned values include:\n\n* `ALLOCATION_FAILED`: Unassigned as a result of a failed allocation of the shard.\n* `CLUSTER_RECOVERED`: Unassigned as a result of a full cluster recovery.\n* `DANGLING_INDEX_IMPORTED`: Unassigned as a result of importing a dangling index.\n* `EXISTING_INDEX_RESTORED`: Unassigned as a result of restoring into a closed index.\n* `FORCED_EMPTY_PRIMARY`: The shard’s allocation was last modified by forcing an empty primary using the Cluster reroute API.\n* `INDEX_CLOSED`: Unassigned because the index was closed.\n* `INDEX_CREATED`: Unassigned as a result of an API creation of an index.\n* `INDEX_REOPENED`: Unassigned as a result of opening a closed index.\n* `MANUAL_ALLOCATION`: The shard’s allocation was last modified by the Cluster reroute API.\n* `NEW_INDEX_RESTORED`: Unassigned as a result of restoring into a new index.\n* `NODE_LEFT`: Unassigned as a result of the node hosting it leaving the cluster.\n* `NODE_RESTARTING`: Similar to `NODE_LEFT`, except that the node was registered as restarting using the Node shutdown API.\n* `PRIMARY_FAILED`: The shard was initializing as a replica, but the primary shard failed before the initialization completed.\n* `REALLOCATED_REPLICA`: A better replica location is identified and causes the existing replica allocation to be cancelled.\n* `REINITIALIZED`: When a shard moves from started back to initializing.\n* `REPLICA_ADDED`: Unassigned as a result of explicit addition of a replica.\n* `REROUTE_CANCELLED`: Unassigned as a result of explicit cancel reroute command.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatShardColumns" @@ -6234,6 +7530,36 @@ ], "x-api": "shards.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/shards?format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.shards(\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.shards({\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.shards(\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->shards([\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/shards?format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().shards();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6265,7 +7591,7 @@ { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "List of columns to appear in the response. Supports simple wildcards.\n\nSupported values include:\n - `completion.size` (or `cs`, `completionSize`): Size of completion. For example: `0b`.\n - `dataset.size`: Disk space used by the shard’s dataset, which may or may not be the size on\ndisk, but includes space used by the shard on object storage. Reported as a size value for example: `5kb`.\n - `dense_vector.value_count` (or `dvc`, `denseVectorCount`): Number of indexed dense vectors.\n - `docs` (or `d`, `dc`): Number of documents in shard, for example: `25`.\n - `fielddata.evictions` (or `fe`, `fielddataEvictions`): Fielddata cache evictions, for example: `0`.\n - `fielddata.memory_size` (or `fm`, `fielddataMemory`): Used fielddata cache memory, for example: `0b`.\n - `flush.total` (or `ft`, `flushTotal`): Number of flushes, for example: `1`.\n - `flush.total_time` (or `ftt`, `flushTotalTime`): Time spent in flush, for example: `1`.\n - `get.current` (or `gc`, `getCurrent`): Number of current get operations, for example: `0`.\n - `get.exists_time` (or `geti`, `getExistsTime`): Time spent in successful gets, for example: `14ms`.\n - `get.exists_total` (or `geto`, `getExistsTotal`): Number of successful get operations, for example: `2`.\n - `get.missing_time` (or `gmti`, `getMissingTime`): Time spent in failed gets, for example: `0s`.\n - `get.missing_total` (or `gmto`, `getMissingTotal`): Number of failed get operations, for example: `1`.\n - `get.time` (or `gti`, `getTime`): Time spent in get, for example: `14ms`.\n - `get.total` (or `gto`, `getTotal`): Number of get operations, for example: `2`.\n - `id`: ID of the node, for example: `k0zy`.\n - `index` (or `i`, `idx`): Name of the index.\n - `indexing.delete_current` (or `idc`, `indexingDeleteCurrent`): Number of current deletion operations, for example: `0`.\n - `indexing.delete_time` (or `idti`, `indexingDeleteTime`): Time spent in deletions, for example: `2ms`.\n - `indexing.delete_total` (or `idto`, `indexingDeleteTotal`): Number of deletion operations, for example: `2`.\n - `indexing.index_current` (or `iic`, `indexingIndexCurrent`): Number of current indexing operations, for example: `0`.\n - `indexing.index_failed_due_to_version_conflict` (or `iifvc`, `indexingIndexFailedDueToVersionConflict`): Number of failed indexing operations due to version conflict, for example: `0`.\n - `indexing.index_failed` (or `iif`, `indexingIndexFailed`): Number of failed indexing operations, for example: `0`.\n - `indexing.index_time` (or `iiti`, `indexingIndexTime`): Time spent in indexing, such as for example: `134ms`.\n - `indexing.index_total` (or `iito`, `indexingIndexTotal`): Number of indexing operations, for example: `1`.\n - `ip`: IP address of the node, for example: `127.0.1.1`.\n - `merges.current` (or `mc`, `mergesCurrent`): Number of current merge operations, for example: `0`.\n - `merges.current_docs` (or `mcd`, `mergesCurrentDocs`): Number of current merging documents, for example: `0`.\n - `merges.current_size` (or `mcs`, `mergesCurrentSize`): Size of current merges, for example: `0b`.\n - `merges.total` (or `mt`, `mergesTotal`): Number of completed merge operations, for example: `0`.\n - `merges.total_docs` (or `mtd`, `mergesTotalDocs`): Number of merged documents, for example: `0`.\n - `merges.total_size` (or `mts`, `mergesTotalSize`): Size of current merges, for example: `0b`.\n - `merges.total_time` (or `mtt`, `mergesTotalTime`): Time spent merging documents, for example: `0s`.\n - `node` (or `n`): Node name, for example: `I8hydUG`.\n - `prirep` (or `p`, `pr`, `primaryOrReplica`): Shard type. Returned values are `primary` or `replica`.\n - `query_cache.evictions` (or `qce`, `queryCacheEvictions`): Query cache evictions, for example: `0`.\n - `query_cache.memory_size` (or `qcm`, `queryCacheMemory`): Used query cache memory, for example: `0b`.\n - `recoverysource.type` (or `rs`): Type of recovery source.\n - `refresh.time` (or `rti`, `refreshTime`): Time spent in refreshes, for example: `91ms`.\n - `refresh.total` (or `rto`, `refreshTotal`): Number of refreshes, for example: `16`.\n - `search.fetch_current` (or `sfc`, `searchFetchCurrent`): Current fetch phase operations, for example: `0`.\n - `search.fetch_time` (or `sfti`, `searchFetchTime`): Time spent in fetch phase, for example: `37ms`.\n - `search.fetch_total` (or `sfto`, `searchFetchTotal`): Number of fetch operations, for example: `7`.\n - `search.open_contexts` (or `so`, `searchOpenContexts`): Open search contexts, for example: `0`.\n - `search.query_current` (or `sqc`, `searchQueryCurrent`): Current query phase operations, for example: `0`.\n - `search.query_time` (or `sqti`, `searchQueryTime`): Time spent in query phase, for example: `43ms`.\n - `search.query_total` (or `sqto`, `searchQueryTotal`): Number of query operations, for example: `9`.\n - `search.scroll_current` (or `scc`, `searchScrollCurrent`): Open scroll contexts, for example: `2`.\n - `search.scroll_time` (or `scti`, `searchScrollTime`): Time scroll contexts held open, for example: `2m`.\n - `search.scroll_total` (or `scto`, `searchScrollTotal`): Completed scroll contexts, for example: `1`.\n - `segments.count` (or `sc`, `segmentsCount`): Number of segments, for example: `4`.\n - `segments.fixed_bitset_memory` (or `sfbm`, `fixedBitsetMemory`): Memory used by fixed bit sets for nested object field types and type filters for types referred in join fields, for example: `1.0kb`.\n - `segments.index_writer_memory` (or `siwm`, `segmentsIndexWriterMemory`): Memory used by index writer, for example: `18mb`.\n - `segments.memory` (or `sm`, `segmentsMemory`): Memory used by segments, for example: `1.4kb`.\n - `segments.version_map_memory` (or `svmm`, `segmentsVersionMapMemory`): Memory used by version map, for example: `1.0kb`.\n - `seq_no.global_checkpoint` (or `sqg`, `globalCheckpoint`): Global checkpoint.\n - `seq_no.local_checkpoint` (or `sql`, `localCheckpoint`): Local checkpoint.\n - `seq_no.max` (or `sqm`, `maxSeqNo`): Maximum sequence number.\n - `shard` (or `s`, `sh`): Name of the shard.\n - `dsparse_vector.value_count` (or `svc`, `sparseVectorCount`): Number of indexed [sparse vectors](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/sparse-vector).\n - `state` (or `st`): State of the shard. Returned values are:\n* `INITIALIZING`: The shard is recovering from a peer shard or gateway.\n* `RELOCATING`: The shard is relocating.\n* `STARTED`: The shard has started.\n* `UNASSIGNED`: The shard is not assigned to any node.\n - `store` (or `sto`): Disk space used by the shard, for example: `5kb`.\n - `suggest.current` (or `suc`, `suggestCurrent`): Number of current suggest operations, for example: `0`.\n - `suggest.time` (or `suti`, `suggestTime`): Time spent in suggest, for example: `0`.\n - `suggest.total` (or `suto`, `suggestTotal`): Number of suggest operations, for example: `0`.\n - `sync_id`: Sync ID of the shard.\n - `unassigned.at` (or `ua`): Time at which the shard became unassigned in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/List_of_UTC_offsets).\n - `unassigned.details` (or `ud`): Details about why the shard became unassigned. This does not explain why the shard is currently unassigned. To understand why a shard\nis not assigned, use the [Cluster allocation explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain) API.\n - `unassigned.for` (or `uf`): Time at which the shard was requested to be unassigned in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/List_of_UTC_offsets).\n - `unassigned.reason` (or `ur`): Indicates the reason for the last change to the state of this unassigned shard. This does not explain why the shard is currently unassigned.\nTo understand why a shard is not assigned, use the [Cluster allocation explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain) API. Returned values include:\n\n* `ALLOCATION_FAILED`: Unassigned as a result of a failed allocation of the shard.\n* `CLUSTER_RECOVERED`: Unassigned as a result of a full cluster recovery.\n* `DANGLING_INDEX_IMPORTED`: Unassigned as a result of importing a dangling index.\n* `EXISTING_INDEX_RESTORED`: Unassigned as a result of restoring into a closed index.\n* `FORCED_EMPTY_PRIMARY`: The shard’s allocation was last modified by forcing an empty primary using the Cluster reroute API.\n* `INDEX_CLOSED`: Unassigned because the index was closed.\n* `INDEX_CREATED`: Unassigned as a result of an API creation of an index.\n* `INDEX_REOPENED`: Unassigned as a result of opening a closed index.\n* `MANUAL_ALLOCATION`: The shard’s allocation was last modified by the Cluster reroute API.\n* `NEW_INDEX_RESTORED`: Unassigned as a result of restoring into a new index.\n* `NODE_LEFT`: Unassigned as a result of the node hosting it leaving the cluster.\n* `NODE_RESTARTING`: Similar to `NODE_LEFT`, except that the node was registered as restarting using the Node shutdown API.\n* `PRIMARY_FAILED`: The shard was initializing as a replica, but the primary shard failed before the initialization completed.\n* `REALLOCATED_REPLICA`: A better replica location is identified and causes the existing replica allocation to be cancelled.\n* `REINITIALIZED`: When a shard moves from started back to initializing.\n* `REPLICA_ADDED`: Unassigned as a result of explicit addition of a replica.\n* `REROUTE_CANCELLED`: Unassigned as a result of explicit cancel reroute command.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatShardColumns" @@ -6345,6 +7671,36 @@ ], "x-api": "shards.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/shards?format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.shards(\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.shards({\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.shards(\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->shards([\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/shards?format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().shards();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6375,7 +7731,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.\n\nSupported values include:\n - `id` (or `snapshot`): The ID of the snapshot, such as 'snap1'.\n - `repository` (or `re`, `repo`): The name of the repository, such as 'repo1'.\n - `status` (or `s`): State of the snapshot process. Returned values are: 'FAILED': The snapshot process failed. 'INCOMPATIBLE': The snapshot process is incompatible with the current cluster version. 'IN_PROGRESS': The snapshot process started but has not completed. 'PARTIAL': The snapshot process completed with a partial success. 'SUCCESS': The snapshot process completed with a full success.\n - `start_epoch` (or `ste`, `startEpoch`): The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process started.\n - `start_time` (or `sti`, `startTime`): 'HH:MM:SS' time at which the snapshot process started.\n - `end_epoch` (or `ete`, `endEpoch`): The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process ended.\n - `end_time` (or `eti`, `endTime`): 'HH:MM:SS' time at which the snapshot process ended.\n - `duration` (or `dur`): The time it took the snapshot process to complete in [time units](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units).\n - `indices` (or `i`): The number of indices in the snapshot.\n - `successful_shards` (or `ss`): The number of successful shards in the snapshot.\n - `failed_shards` (or `fs`): The number of failed shards in the snapshot.\n - `total_shards` (or `ts`): The total number of shards in the snapshot.\n - `reason` (or `r`): The reason for any snapshot failures.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatSnapshotsColumns" @@ -6433,6 +7789,36 @@ ], "x-api": "snapshots.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/snapshots/repo1?v=true&s=id&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.snapshots(\n repository=\"repo1\",\n v=True,\n s=\"id\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.snapshots({\n repository: \"repo1\",\n v: \"true\",\n s: \"id\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.snapshots(\n repository: \"repo1\",\n v: \"true\",\n s: \"id\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->snapshots([\n \"repository\" => \"repo1\",\n \"v\" => \"true\",\n \"s\" => \"id\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/snapshots/repo1?v=true&s=id&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().snapshots();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6474,7 +7860,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.\n\nSupported values include:\n - `id` (or `snapshot`): The ID of the snapshot, such as 'snap1'.\n - `repository` (or `re`, `repo`): The name of the repository, such as 'repo1'.\n - `status` (or `s`): State of the snapshot process. Returned values are: 'FAILED': The snapshot process failed. 'INCOMPATIBLE': The snapshot process is incompatible with the current cluster version. 'IN_PROGRESS': The snapshot process started but has not completed. 'PARTIAL': The snapshot process completed with a partial success. 'SUCCESS': The snapshot process completed with a full success.\n - `start_epoch` (or `ste`, `startEpoch`): The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process started.\n - `start_time` (or `sti`, `startTime`): 'HH:MM:SS' time at which the snapshot process started.\n - `end_epoch` (or `ete`, `endEpoch`): The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process ended.\n - `end_time` (or `eti`, `endTime`): 'HH:MM:SS' time at which the snapshot process ended.\n - `duration` (or `dur`): The time it took the snapshot process to complete in [time units](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units).\n - `indices` (or `i`): The number of indices in the snapshot.\n - `successful_shards` (or `ss`): The number of successful shards in the snapshot.\n - `failed_shards` (or `fs`): The number of failed shards in the snapshot.\n - `total_shards` (or `ts`): The total number of shards in the snapshot.\n - `reason` (or `r`): The reason for any snapshot failures.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatSnapshotsColumns" @@ -6532,6 +7918,36 @@ ], "x-api": "snapshots.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/snapshots/repo1?v=true&s=id&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.snapshots(\n repository=\"repo1\",\n v=True,\n s=\"id\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.snapshots({\n repository: \"repo1\",\n v: \"true\",\n s: \"id\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.snapshots(\n repository: \"repo1\",\n v: \"true\",\n s: \"id\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->snapshots([\n \"repository\" => \"repo1\",\n \"v\" => \"true\",\n \"s\" => \"id\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/snapshots/repo1?v=true&s=id&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().snapshots();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6598,7 +8014,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `id`: The ID of the task with the node.\n - `action` (or `ac`): The task action.\n - `task_id` (or `ti`): The unique task ID.\n - `parent_task_id` (or `pti`): The parent task ID.\n - `type` (or `ty`): The task type.\n - `start_time` (or `start`): The start time in milliseconds.\n - `timestamp` (or `ts`, `hms`, `hhmmss`): The start time in HH:MM:SS.\n - `running_time_ns` (or `time`): The running time in nanoseconds.\n - `running_time` (or `time`): The running time.\n - `node_id` (or `ni`): The unique node ID.\n - `ip` (or `i`): The IP address.\n - `port` (or `po`): The bound transport port.\n - `node` (or `n`): The node name.\n - `version` (or `v`): The Elasticsearch version.\n - `x_opaque_id` (or `x`): The X-Opaque-ID header.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTasksColumns" @@ -6666,6 +8082,36 @@ ], "x-api": "tasks.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/tasks?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.tasks(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.tasks({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.tasks(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->tasks([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/tasks?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().tasks();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6686,7 +8132,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `name` (or `n`): The template name.\n - `index_patterns` (or `t`): The template index patterns.\n - `order` (or `o`, `p`): The template application order or priority number.\n - `version` (or `v`): The version.\n - `composed_of` (or `c`): The component templates comprising the index template.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTemplatesColumns" @@ -6754,6 +8200,36 @@ ], "x-api": "templates.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/templates/my-template-*?v=true&s=name&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.templates(\n name=\"my-template-*\",\n v=True,\n s=\"name\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.templates({\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.templates(\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->templates([\n \"name\" => \"my-template-*\",\n \"v\" => \"true\",\n \"s\" => \"name\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/templates/my-template-*?v=true&s=name&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().templates();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6785,7 +8261,7 @@ { "in": "query", "name": "h", - "description": "A comma-separated list of columns names to display. It supports simple wildcards.", + "description": "A comma-separated list of columns names to display. It supports simple wildcards.\n\nSupported values include:\n - `name` (or `n`): The template name.\n - `index_patterns` (or `t`): The template index patterns.\n - `order` (or `o`, `p`): The template application order or priority number.\n - `version` (or `v`): The version.\n - `composed_of` (or `c`): The component templates comprising the index template.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTemplatesColumns" @@ -6853,6 +8329,36 @@ ], "x-api": "templates.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cat/templates/my-template-*?v=true&s=name&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.templates(\n name=\"my-template-*\",\n v=True,\n s=\"name\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.templates({\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.templates(\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->templates([\n \"name\" => \"my-template-*\",\n \"v\" => \"true\",\n \"s\" => \"name\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/templates/my-template-*?v=true&s=name&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().templates();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6873,7 +8379,7 @@ { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "List of columns to appear in the response. Supports simple wildcards.\n\nSupported values include:\n - `active` (or `a`): Number of active threads in the current thread pool.\n - `completed` (or `c`): Number of tasks completed by the thread pool executor.\n - `core` (or `cr`): Configured core number of active threads allowed in the current thread pool.\n - `ephemeral_id` (or `eid`): Ephemeral node ID.\n - `host` (or `h`): Hostname for the current node.\n - `ip` (or `i`): IP address for the current node.\n - `keep_alive` (or `k`): Configured keep alive time for threads.\n - `largest` (or `l`): Highest number of active threads in the current thread pool.\n - `max` (or `mx`): Configured maximum number of active threads allowed in the current thread pool.\n - `name`: Name of the thread pool, such as `analyze` or `generic`.\n - `node_id` (or `id`): ID of the node, such as `k0zy`.\n - `node_name`: Node name, such as `I8hydUG`.\n - `pid` (or `p`): Process ID of the running node.\n - `pool_size` (or `psz`): Number of threads in the current thread pool.\n - `port` (or `po`): Bound transport port for the current node.\n - `queue` (or `q`): Number of tasks in the queue for the current thread pool.\n - `queue_size` (or `qs`): Maximum number of tasks permitted in the queue for the current thread pool.\n - `rejected` (or `r`): Number of tasks rejected by the thread pool executor.\n - `size` (or `sz`): Configured fixed number of active threads allowed in the current thread pool.\n - `type` (or `t`): Type of thread pool. Returned values are `fixed`, `fixed_auto_queue_size`, `direct`, or `scaling`.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatThreadPoolColumns" @@ -6947,6 +8453,36 @@ ], "x-api": "thread_pool.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/thread_pool?format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.thread_pool(\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.threadPool({\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.thread_pool(\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->threadPool([\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/thread_pool?format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().threadPool();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -6978,7 +8514,7 @@ { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "List of columns to appear in the response. Supports simple wildcards.\n\nSupported values include:\n - `active` (or `a`): Number of active threads in the current thread pool.\n - `completed` (or `c`): Number of tasks completed by the thread pool executor.\n - `core` (or `cr`): Configured core number of active threads allowed in the current thread pool.\n - `ephemeral_id` (or `eid`): Ephemeral node ID.\n - `host` (or `h`): Hostname for the current node.\n - `ip` (or `i`): IP address for the current node.\n - `keep_alive` (or `k`): Configured keep alive time for threads.\n - `largest` (or `l`): Highest number of active threads in the current thread pool.\n - `max` (or `mx`): Configured maximum number of active threads allowed in the current thread pool.\n - `name`: Name of the thread pool, such as `analyze` or `generic`.\n - `node_id` (or `id`): ID of the node, such as `k0zy`.\n - `node_name`: Node name, such as `I8hydUG`.\n - `pid` (or `p`): Process ID of the running node.\n - `pool_size` (or `psz`): Number of threads in the current thread pool.\n - `port` (or `po`): Bound transport port for the current node.\n - `queue` (or `q`): Number of tasks in the queue for the current thread pool.\n - `queue_size` (or `qs`): Maximum number of tasks permitted in the queue for the current thread pool.\n - `rejected` (or `r`): Number of tasks rejected by the thread pool executor.\n - `size` (or `sz`): Configured fixed number of active threads allowed in the current thread pool.\n - `type` (or `t`): Type of thread pool. Returned values are `fixed`, `fixed_auto_queue_size`, `direct`, or `scaling`.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatThreadPoolColumns" @@ -7052,6 +8588,36 @@ ], "x-api": "thread_pool.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/thread_pool?format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.thread_pool(\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.threadPool({\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.thread_pool(\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->threadPool([\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/thread_pool?format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().threadPool();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -7092,7 +8658,7 @@ { "in": "query", "name": "h", - "description": "Comma-separated list of column names to display.", + "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `changes_last_detection_time` (or `cldt`): The timestamp when changes were last detected in the source indices.\n - `checkpoint` (or `cp`): The sequence number for the checkpoint.\n - `checkpoint_duration_time_exp_avg` (or `cdtea`, `checkpointTimeExpAvg`): Exponential moving average of the duration of the checkpoint, in\nmilliseconds.\n - `checkpoint_progress` (or `c`, `checkpointProgress`): The progress of the next checkpoint that is currently in progress.\n - `create_time` (or `ct`, `createTime`): The time the transform was created.\n - `delete_time` (or `dtime`): The amount of time spent deleting, in milliseconds.\n - `description` (or `d`): The description of the transform.\n - `dest_index` (or `di`, `destIndex`): The destination index for the transform. The mappings of the destination\nindex are deduced based on the source fields when possible. If alternate\nmappings are required, use the Create index API prior to starting the\ntransform.\n - `documents_deleted` (or `docd`): The number of documents that have been deleted from the destination index\ndue to the retention policy for this transform.\n - `documents_indexed` (or `doci`): The number of documents that have been indexed into the destination index\nfor the transform.\n - `docs_per_second` (or `dps`): Specifies a limit on the number of input documents per second. This setting\nthrottles the transform by adding a wait time between search requests. The\ndefault value is `null`, which disables throttling.\n - `documents_processed` (or `docp`): The number of documents that have been processed from the source index of\nthe transform.\n - `frequency` (or `f`): The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is `1s` and the maximum is `1h`. The default\nvalue is `1m`.\n - `id`: Identifier for the transform.\n - `index_failure` (or `if`): The number of indexing failures.\n - `index_time` (or `itime`): The amount of time spent indexing, in milliseconds.\n - `index_total` (or `it`): The number of index operations.\n - `indexed_documents_exp_avg` (or `idea`): Exponential moving average of the number of new documents that have been\nindexed.\n - `last_search_time` (or `lst`, `lastSearchTime`): The timestamp of the last search in the source indices. This field is only\nshown if the transform is running.\n - `max_page_search_size` (or `mpsz`): Defines the initial page size to use for the composite aggregation for each\ncheckpoint. If circuit breaker exceptions occur, the page size is\ndynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`. The default value is `500`.\n - `pages_processed` (or `pp`): The number of search or bulk index operations processed. Documents are\nprocessed in batches instead of individually.\n - `pipeline` (or `p`): The unique identifier for an ingest pipeline.\n - `processed_documents_exp_avg` (or `pdea`): Exponential moving average of the number of documents that have been\nprocessed.\n - `processing_time` (or `pt`): The amount of time spent processing results, in milliseconds.\n - `reason` (or `r`): If a transform has a `failed` state, this property provides details about\nthe reason for the failure.\n - `search_failure` (or `sf`): The number of search failures.\n - `search_time` (or `stime`): The amount of time spent searching, in milliseconds.\n - `search_total` (or `st`): The number of search operations on the source index for the transform.\n - `source_index` (or `si`, `sourceIndex`): The source indices for the transform. It can be a single index, an index\npattern (for example, `\"my-index-*\"`), an array of indices (for example,\n`[\"my-index-000001\", \"my-index-000002\"]`), or an array of index patterns\n(for example, `[\"my-index-*\", \"my-other-index-*\"]`. For remote indices use\nthe syntax `\"remote_name:index_name\"`. If any indices are in remote\nclusters then the master node and at least one transform node must have the\n`remote_cluster_client` node role.\n - `state` (or `s`): The status of the transform, which can be one of the following values:\n\n* `aborting`: The transform is aborting.\n* `failed`: The transform failed. For more information about the failure,\ncheck the reason field.\n* `indexing`: The transform is actively processing data and creating new\ndocuments.\n* `started`: The transform is running but not actively indexing data.\n* `stopped`: The transform is stopped.\n* `stopping`: The transform is stopping.\n - `transform_type` (or `tt`): Indicates the type of transform: `batch` or `continuous`.\n - `trigger_count` (or `tc`): The number of times the transform has been triggered by the scheduler. For\nexample, the scheduler triggers the transform indexer to check for updates\nor ingest new data at an interval specified in the `frequency` property.\n - `version` (or `v`): The version of Elasticsearch that existed on the node when the transform\nwas created.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTransformColumns" @@ -7102,7 +8668,7 @@ { "in": "query", "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.", + "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `changes_last_detection_time` (or `cldt`): The timestamp when changes were last detected in the source indices.\n - `checkpoint` (or `cp`): The sequence number for the checkpoint.\n - `checkpoint_duration_time_exp_avg` (or `cdtea`, `checkpointTimeExpAvg`): Exponential moving average of the duration of the checkpoint, in\nmilliseconds.\n - `checkpoint_progress` (or `c`, `checkpointProgress`): The progress of the next checkpoint that is currently in progress.\n - `create_time` (or `ct`, `createTime`): The time the transform was created.\n - `delete_time` (or `dtime`): The amount of time spent deleting, in milliseconds.\n - `description` (or `d`): The description of the transform.\n - `dest_index` (or `di`, `destIndex`): The destination index for the transform. The mappings of the destination\nindex are deduced based on the source fields when possible. If alternate\nmappings are required, use the Create index API prior to starting the\ntransform.\n - `documents_deleted` (or `docd`): The number of documents that have been deleted from the destination index\ndue to the retention policy for this transform.\n - `documents_indexed` (or `doci`): The number of documents that have been indexed into the destination index\nfor the transform.\n - `docs_per_second` (or `dps`): Specifies a limit on the number of input documents per second. This setting\nthrottles the transform by adding a wait time between search requests. The\ndefault value is `null`, which disables throttling.\n - `documents_processed` (or `docp`): The number of documents that have been processed from the source index of\nthe transform.\n - `frequency` (or `f`): The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is `1s` and the maximum is `1h`. The default\nvalue is `1m`.\n - `id`: Identifier for the transform.\n - `index_failure` (or `if`): The number of indexing failures.\n - `index_time` (or `itime`): The amount of time spent indexing, in milliseconds.\n - `index_total` (or `it`): The number of index operations.\n - `indexed_documents_exp_avg` (or `idea`): Exponential moving average of the number of new documents that have been\nindexed.\n - `last_search_time` (or `lst`, `lastSearchTime`): The timestamp of the last search in the source indices. This field is only\nshown if the transform is running.\n - `max_page_search_size` (or `mpsz`): Defines the initial page size to use for the composite aggregation for each\ncheckpoint. If circuit breaker exceptions occur, the page size is\ndynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`. The default value is `500`.\n - `pages_processed` (or `pp`): The number of search or bulk index operations processed. Documents are\nprocessed in batches instead of individually.\n - `pipeline` (or `p`): The unique identifier for an ingest pipeline.\n - `processed_documents_exp_avg` (or `pdea`): Exponential moving average of the number of documents that have been\nprocessed.\n - `processing_time` (or `pt`): The amount of time spent processing results, in milliseconds.\n - `reason` (or `r`): If a transform has a `failed` state, this property provides details about\nthe reason for the failure.\n - `search_failure` (or `sf`): The number of search failures.\n - `search_time` (or `stime`): The amount of time spent searching, in milliseconds.\n - `search_total` (or `st`): The number of search operations on the source index for the transform.\n - `source_index` (or `si`, `sourceIndex`): The source indices for the transform. It can be a single index, an index\npattern (for example, `\"my-index-*\"`), an array of indices (for example,\n`[\"my-index-000001\", \"my-index-000002\"]`), or an array of index patterns\n(for example, `[\"my-index-*\", \"my-other-index-*\"]`. For remote indices use\nthe syntax `\"remote_name:index_name\"`. If any indices are in remote\nclusters then the master node and at least one transform node must have the\n`remote_cluster_client` node role.\n - `state` (or `s`): The status of the transform, which can be one of the following values:\n\n* `aborting`: The transform is aborting.\n* `failed`: The transform failed. For more information about the failure,\ncheck the reason field.\n* `indexing`: The transform is actively processing data and creating new\ndocuments.\n* `started`: The transform is running but not actively indexing data.\n* `stopped`: The transform is stopped.\n* `stopping`: The transform is stopping.\n - `transform_type` (or `tt`): Indicates the type of transform: `batch` or `continuous`.\n - `trigger_count` (or `tc`): The number of times the transform has been triggered by the scheduler. For\nexample, the scheduler triggers the transform indexer to check for updates\nor ingest new data at an interval specified in the `frequency` property.\n - `version` (or `v`): The version of Elasticsearch that existed on the node when the transform\nwas created.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTransformColumns" @@ -7150,6 +8716,36 @@ ], "x-api": "transforms.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/transforms?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.transforms(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.transforms({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.transforms(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->transforms([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/transforms?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().transforms();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -7201,7 +8797,7 @@ { "in": "query", "name": "h", - "description": "Comma-separated list of column names to display.", + "description": "Comma-separated list of column names to display.\n\nSupported values include:\n - `changes_last_detection_time` (or `cldt`): The timestamp when changes were last detected in the source indices.\n - `checkpoint` (or `cp`): The sequence number for the checkpoint.\n - `checkpoint_duration_time_exp_avg` (or `cdtea`, `checkpointTimeExpAvg`): Exponential moving average of the duration of the checkpoint, in\nmilliseconds.\n - `checkpoint_progress` (or `c`, `checkpointProgress`): The progress of the next checkpoint that is currently in progress.\n - `create_time` (or `ct`, `createTime`): The time the transform was created.\n - `delete_time` (or `dtime`): The amount of time spent deleting, in milliseconds.\n - `description` (or `d`): The description of the transform.\n - `dest_index` (or `di`, `destIndex`): The destination index for the transform. The mappings of the destination\nindex are deduced based on the source fields when possible. If alternate\nmappings are required, use the Create index API prior to starting the\ntransform.\n - `documents_deleted` (or `docd`): The number of documents that have been deleted from the destination index\ndue to the retention policy for this transform.\n - `documents_indexed` (or `doci`): The number of documents that have been indexed into the destination index\nfor the transform.\n - `docs_per_second` (or `dps`): Specifies a limit on the number of input documents per second. This setting\nthrottles the transform by adding a wait time between search requests. The\ndefault value is `null`, which disables throttling.\n - `documents_processed` (or `docp`): The number of documents that have been processed from the source index of\nthe transform.\n - `frequency` (or `f`): The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is `1s` and the maximum is `1h`. The default\nvalue is `1m`.\n - `id`: Identifier for the transform.\n - `index_failure` (or `if`): The number of indexing failures.\n - `index_time` (or `itime`): The amount of time spent indexing, in milliseconds.\n - `index_total` (or `it`): The number of index operations.\n - `indexed_documents_exp_avg` (or `idea`): Exponential moving average of the number of new documents that have been\nindexed.\n - `last_search_time` (or `lst`, `lastSearchTime`): The timestamp of the last search in the source indices. This field is only\nshown if the transform is running.\n - `max_page_search_size` (or `mpsz`): Defines the initial page size to use for the composite aggregation for each\ncheckpoint. If circuit breaker exceptions occur, the page size is\ndynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`. The default value is `500`.\n - `pages_processed` (or `pp`): The number of search or bulk index operations processed. Documents are\nprocessed in batches instead of individually.\n - `pipeline` (or `p`): The unique identifier for an ingest pipeline.\n - `processed_documents_exp_avg` (or `pdea`): Exponential moving average of the number of documents that have been\nprocessed.\n - `processing_time` (or `pt`): The amount of time spent processing results, in milliseconds.\n - `reason` (or `r`): If a transform has a `failed` state, this property provides details about\nthe reason for the failure.\n - `search_failure` (or `sf`): The number of search failures.\n - `search_time` (or `stime`): The amount of time spent searching, in milliseconds.\n - `search_total` (or `st`): The number of search operations on the source index for the transform.\n - `source_index` (or `si`, `sourceIndex`): The source indices for the transform. It can be a single index, an index\npattern (for example, `\"my-index-*\"`), an array of indices (for example,\n`[\"my-index-000001\", \"my-index-000002\"]`), or an array of index patterns\n(for example, `[\"my-index-*\", \"my-other-index-*\"]`. For remote indices use\nthe syntax `\"remote_name:index_name\"`. If any indices are in remote\nclusters then the master node and at least one transform node must have the\n`remote_cluster_client` node role.\n - `state` (or `s`): The status of the transform, which can be one of the following values:\n\n* `aborting`: The transform is aborting.\n* `failed`: The transform failed. For more information about the failure,\ncheck the reason field.\n* `indexing`: The transform is actively processing data and creating new\ndocuments.\n* `started`: The transform is running but not actively indexing data.\n* `stopped`: The transform is stopped.\n* `stopping`: The transform is stopping.\n - `transform_type` (or `tt`): Indicates the type of transform: `batch` or `continuous`.\n - `trigger_count` (or `tc`): The number of times the transform has been triggered by the scheduler. For\nexample, the scheduler triggers the transform indexer to check for updates\nor ingest new data at an interval specified in the `frequency` property.\n - `version` (or `v`): The version of Elasticsearch that existed on the node when the transform\nwas created.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTransformColumns" @@ -7211,7 +8807,7 @@ { "in": "query", "name": "s", - "description": "Comma-separated list of column names or column aliases used to sort the response.", + "description": "Comma-separated list of column names or column aliases used to sort the response.\n\nSupported values include:\n - `changes_last_detection_time` (or `cldt`): The timestamp when changes were last detected in the source indices.\n - `checkpoint` (or `cp`): The sequence number for the checkpoint.\n - `checkpoint_duration_time_exp_avg` (or `cdtea`, `checkpointTimeExpAvg`): Exponential moving average of the duration of the checkpoint, in\nmilliseconds.\n - `checkpoint_progress` (or `c`, `checkpointProgress`): The progress of the next checkpoint that is currently in progress.\n - `create_time` (or `ct`, `createTime`): The time the transform was created.\n - `delete_time` (or `dtime`): The amount of time spent deleting, in milliseconds.\n - `description` (or `d`): The description of the transform.\n - `dest_index` (or `di`, `destIndex`): The destination index for the transform. The mappings of the destination\nindex are deduced based on the source fields when possible. If alternate\nmappings are required, use the Create index API prior to starting the\ntransform.\n - `documents_deleted` (or `docd`): The number of documents that have been deleted from the destination index\ndue to the retention policy for this transform.\n - `documents_indexed` (or `doci`): The number of documents that have been indexed into the destination index\nfor the transform.\n - `docs_per_second` (or `dps`): Specifies a limit on the number of input documents per second. This setting\nthrottles the transform by adding a wait time between search requests. The\ndefault value is `null`, which disables throttling.\n - `documents_processed` (or `docp`): The number of documents that have been processed from the source index of\nthe transform.\n - `frequency` (or `f`): The interval between checks for changes in the source indices when the\ntransform is running continuously. Also determines the retry interval in\nthe event of transient failures while the transform is searching or\nindexing. The minimum value is `1s` and the maximum is `1h`. The default\nvalue is `1m`.\n - `id`: Identifier for the transform.\n - `index_failure` (or `if`): The number of indexing failures.\n - `index_time` (or `itime`): The amount of time spent indexing, in milliseconds.\n - `index_total` (or `it`): The number of index operations.\n - `indexed_documents_exp_avg` (or `idea`): Exponential moving average of the number of new documents that have been\nindexed.\n - `last_search_time` (or `lst`, `lastSearchTime`): The timestamp of the last search in the source indices. This field is only\nshown if the transform is running.\n - `max_page_search_size` (or `mpsz`): Defines the initial page size to use for the composite aggregation for each\ncheckpoint. If circuit breaker exceptions occur, the page size is\ndynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`. The default value is `500`.\n - `pages_processed` (or `pp`): The number of search or bulk index operations processed. Documents are\nprocessed in batches instead of individually.\n - `pipeline` (or `p`): The unique identifier for an ingest pipeline.\n - `processed_documents_exp_avg` (or `pdea`): Exponential moving average of the number of documents that have been\nprocessed.\n - `processing_time` (or `pt`): The amount of time spent processing results, in milliseconds.\n - `reason` (or `r`): If a transform has a `failed` state, this property provides details about\nthe reason for the failure.\n - `search_failure` (or `sf`): The number of search failures.\n - `search_time` (or `stime`): The amount of time spent searching, in milliseconds.\n - `search_total` (or `st`): The number of search operations on the source index for the transform.\n - `source_index` (or `si`, `sourceIndex`): The source indices for the transform. It can be a single index, an index\npattern (for example, `\"my-index-*\"`), an array of indices (for example,\n`[\"my-index-000001\", \"my-index-000002\"]`), or an array of index patterns\n(for example, `[\"my-index-*\", \"my-other-index-*\"]`. For remote indices use\nthe syntax `\"remote_name:index_name\"`. If any indices are in remote\nclusters then the master node and at least one transform node must have the\n`remote_cluster_client` node role.\n - `state` (or `s`): The status of the transform, which can be one of the following values:\n\n* `aborting`: The transform is aborting.\n* `failed`: The transform failed. For more information about the failure,\ncheck the reason field.\n* `indexing`: The transform is actively processing data and creating new\ndocuments.\n* `started`: The transform is running but not actively indexing data.\n* `stopped`: The transform is stopped.\n* `stopping`: The transform is stopping.\n - `transform_type` (or `tt`): Indicates the type of transform: `batch` or `continuous`.\n - `trigger_count` (or `tc`): The number of times the transform has been triggered by the scheduler. For\nexample, the scheduler triggers the transform indexer to check for updates\nor ingest new data at an interval specified in the `frequency` property.\n - `version` (or `v`): The version of Elasticsearch that existed on the node when the transform\nwas created.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/cat._types.CatTransformColumns" @@ -7259,6 +8855,36 @@ ], "x-api": "transforms.cat", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cat/transforms?v=true&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.cat.transforms(\n v=True,\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cat.transforms({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cat.transforms(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cat()->transforms([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/transforms?v=true&format=json\"" + }, + { + "lang": "Java", + "source": "client.cat().transforms();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -7340,6 +8966,36 @@ ], "x-api": "get_auto_follow_pattern.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_ccr/auto_follow/my_auto_follow_pattern\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.get_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.getAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.get_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->getAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern\"" + }, + { + "lang": "Java", + "source": "client.ccr().getAutoFollowPattern(g -> g\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -7531,6 +9187,36 @@ ], "x-api": "put_auto_follow_pattern.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_ccr/auto_follow/my_auto_follow_pattern\n{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ccr.put_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n remote_cluster=\"remote_cluster\",\n leader_index_patterns=[\n \"leader_index*\"\n ],\n follow_index_pattern=\"{{leader_index}}-follower\",\n settings={\n \"index.number_of_replicas\": 0\n },\n max_read_request_operation_count=1024,\n max_outstanding_read_requests=16,\n max_read_request_size=\"1024k\",\n max_write_request_operation_count=32768,\n max_write_request_size=\"16k\",\n max_outstanding_write_requests=8,\n max_write_buffer_count=512,\n max_write_buffer_size=\"512k\",\n max_retry_delay=\"10s\",\n read_poll_timeout=\"30s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.putAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n remote_cluster: \"remote_cluster\",\n leader_index_patterns: [\"leader_index*\"],\n follow_index_pattern: \"{{leader_index}}-follower\",\n settings: {\n \"index.number_of_replicas\": 0,\n },\n max_read_request_operation_count: 1024,\n max_outstanding_read_requests: 16,\n max_read_request_size: \"1024k\",\n max_write_request_operation_count: 32768,\n max_write_request_size: \"16k\",\n max_outstanding_write_requests: 8,\n max_write_buffer_count: 512,\n max_write_buffer_size: \"512k\",\n max_retry_delay: \"10s\",\n read_poll_timeout: \"30s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.put_auto_follow_pattern(\n name: \"my_auto_follow_pattern\",\n body: {\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index_patterns\": [\n \"leader_index*\"\n ],\n \"follow_index_pattern\": \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\": 1024,\n \"max_outstanding_read_requests\": 16,\n \"max_read_request_size\": \"1024k\",\n \"max_write_request_operation_count\": 32768,\n \"max_write_request_size\": \"16k\",\n \"max_outstanding_write_requests\": 8,\n \"max_write_buffer_count\": 512,\n \"max_write_buffer_size\": \"512k\",\n \"max_retry_delay\": \"10s\",\n \"read_poll_timeout\": \"30s\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->putAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n \"body\" => [\n \"remote_cluster\" => \"remote_cluster\",\n \"leader_index_patterns\" => array(\n \"leader_index*\",\n ),\n \"follow_index_pattern\" => \"{{leader_index}}-follower\",\n \"settings\" => [\n \"index.number_of_replicas\" => 0,\n ],\n \"max_read_request_operation_count\" => 1024,\n \"max_outstanding_read_requests\" => 16,\n \"max_read_request_size\" => \"1024k\",\n \"max_write_request_operation_count\" => 32768,\n \"max_write_request_size\" => \"16k\",\n \"max_outstanding_write_requests\" => 8,\n \"max_write_buffer_count\" => 512,\n \"max_write_buffer_size\" => \"512k\",\n \"max_retry_delay\" => \"10s\",\n \"read_poll_timeout\" => \"30s\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"remote_cluster\":\"remote_cluster\",\"leader_index_patterns\":[\"leader_index*\"],\"follow_index_pattern\":\"{{leader_index}}-follower\",\"settings\":{\"index.number_of_replicas\":0},\"max_read_request_operation_count\":1024,\"max_outstanding_read_requests\":16,\"max_read_request_size\":\"1024k\",\"max_write_request_operation_count\":32768,\"max_write_request_size\":\"16k\",\"max_outstanding_write_requests\":8,\"max_write_buffer_count\":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\":\"10s\",\"read_poll_timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern\"" + }, + { + "lang": "Java", + "source": "client.ccr().putAutoFollowPattern(p -> p\n .followIndexPattern(\"{{leader_index}}-follower\")\n .leaderIndexPatterns(\"leader_index*\")\n .maxOutstandingReadRequests(16)\n .maxOutstandingWriteRequests(8)\n .maxReadRequestOperationCount(1024)\n .maxReadRequestSize(\"1024k\")\n .maxRetryDelay(m -> m\n .time(\"10s\")\n )\n .maxWriteBufferCount(512)\n .maxWriteBufferSize(\"512k\")\n .maxWriteRequestOperationCount(32768)\n .maxWriteRequestSize(\"16k\")\n .name(\"my_auto_follow_pattern\")\n .readPollTimeout(r -> r\n .time(\"30s\")\n )\n .remoteCluster(\"remote_cluster\")\n .settings(\"index.number_of_replicas\", JsonData.fromJson(\"0\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -7599,6 +9285,36 @@ ], "x-api": "delete_auto_follow_pattern.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_ccr/auto_follow/my_auto_follow_pattern\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.delete_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.deleteAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.delete_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->deleteAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern\"" + }, + { + "lang": "Java", + "source": "client.ccr().deleteAutoFollowPattern(d -> d\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -7794,6 +9510,36 @@ ], "x-api": "follow.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /follower_index/_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ccr.follow(\n index=\"follower_index\",\n wait_for_active_shards=\"1\",\n remote_cluster=\"remote_cluster\",\n leader_index=\"leader_index\",\n settings={\n \"index.number_of_replicas\": 0\n },\n max_read_request_operation_count=1024,\n max_outstanding_read_requests=16,\n max_read_request_size=\"1024k\",\n max_write_request_operation_count=32768,\n max_write_request_size=\"16k\",\n max_outstanding_write_requests=8,\n max_write_buffer_count=512,\n max_write_buffer_size=\"512k\",\n max_retry_delay=\"10s\",\n read_poll_timeout=\"30s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.follow({\n index: \"follower_index\",\n wait_for_active_shards: 1,\n remote_cluster: \"remote_cluster\",\n leader_index: \"leader_index\",\n settings: {\n \"index.number_of_replicas\": 0,\n },\n max_read_request_operation_count: 1024,\n max_outstanding_read_requests: 16,\n max_read_request_size: \"1024k\",\n max_write_request_operation_count: 32768,\n max_write_request_size: \"16k\",\n max_outstanding_write_requests: 8,\n max_write_buffer_count: 512,\n max_write_buffer_size: \"512k\",\n max_retry_delay: \"10s\",\n read_poll_timeout: \"30s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.follow(\n index: \"follower_index\",\n wait_for_active_shards: \"1\",\n body: {\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index\": \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\": 1024,\n \"max_outstanding_read_requests\": 16,\n \"max_read_request_size\": \"1024k\",\n \"max_write_request_operation_count\": 32768,\n \"max_write_request_size\": \"16k\",\n \"max_outstanding_write_requests\": 8,\n \"max_write_buffer_count\": 512,\n \"max_write_buffer_size\": \"512k\",\n \"max_retry_delay\": \"10s\",\n \"read_poll_timeout\": \"30s\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->follow([\n \"index\" => \"follower_index\",\n \"wait_for_active_shards\" => \"1\",\n \"body\" => [\n \"remote_cluster\" => \"remote_cluster\",\n \"leader_index\" => \"leader_index\",\n \"settings\" => [\n \"index.number_of_replicas\" => 0,\n ],\n \"max_read_request_operation_count\" => 1024,\n \"max_outstanding_read_requests\" => 16,\n \"max_read_request_size\" => \"1024k\",\n \"max_write_request_operation_count\" => 32768,\n \"max_write_request_size\" => \"16k\",\n \"max_outstanding_write_requests\" => 8,\n \"max_write_buffer_count\" => 512,\n \"max_write_buffer_size\" => \"512k\",\n \"max_retry_delay\" => \"10s\",\n \"read_poll_timeout\" => \"30s\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"remote_cluster\":\"remote_cluster\",\"leader_index\":\"leader_index\",\"settings\":{\"index.number_of_replicas\":0},\"max_read_request_operation_count\":1024,\"max_outstanding_read_requests\":16,\"max_read_request_size\":\"1024k\",\"max_write_request_operation_count\":32768,\"max_write_request_size\":\"16k\",\"max_outstanding_write_requests\":8,\"max_write_buffer_count\":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\":\"10s\",\"read_poll_timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/follower_index/_ccr/follow?wait_for_active_shards=1\"" + }, + { + "lang": "Java", + "source": "client.ccr().follow(f -> f\n .index(\"follower_index\")\n .leaderIndex(\"leader_index\")\n .maxOutstandingReadRequests(16L)\n .maxOutstandingWriteRequests(8)\n .maxReadRequestOperationCount(1024)\n .maxReadRequestSize(\"1024k\")\n .maxRetryDelay(m -> m\n .time(\"10s\")\n )\n .maxWriteBufferCount(512)\n .maxWriteBufferSize(\"512k\")\n .maxWriteRequestOperationCount(32768)\n .maxWriteRequestSize(\"16k\")\n .readPollTimeout(r -> r\n .time(\"30s\")\n )\n .remoteCluster(\"remote_cluster\")\n .settings(s -> s\n .otherSettings(\"index.number_of_replicas\", JsonData.fromJson(\"0\"))\n )\n .waitForActiveShards(w -> w\n .count(1)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -7882,6 +9628,36 @@ ], "x-api": "follow_info.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /follower_index/_ccr/info\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.follow_info(\n index=\"follower_index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.followInfo({\n index: \"follower_index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.follow_info(\n index: \"follower_index\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->followInfo([\n \"index\" => \"follower_index\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/follower_index/_ccr/info\"" + }, + { + "lang": "Java", + "source": "client.ccr().followInfo(f -> f\n .index(\"follower_index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -7965,6 +9741,36 @@ ], "x-api": "follow_stats.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /follower_index/_ccr/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.follow_stats(\n index=\"follower_index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.followStats({\n index: \"follower_index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.follow_stats(\n index: \"follower_index\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->followStats([\n \"index\" => \"follower_index\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/follower_index/_ccr/stats\"" + }, + { + "lang": "Java", + "source": "client.ccr().followStats(f -> f\n .index(\"follower_index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8083,6 +9889,36 @@ ], "x-api": "forget_follower.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST //_ccr/forget_follower\n{\n \"follower_cluster\" : \"\",\n \"follower_index\" : \"\",\n \"follower_index_uuid\" : \"\",\n \"leader_remote_cluster\" : \"\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ccr.forget_follower(\n index=\"\",\n follower_cluster=\"\",\n follower_index=\"\",\n follower_index_uuid=\"\",\n leader_remote_cluster=\"\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.forgetFollower({\n index: \"\",\n follower_cluster: \"\",\n follower_index: \"\",\n follower_index_uuid: \"\",\n leader_remote_cluster: \"\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.forget_follower(\n index: \"\",\n body: {\n \"follower_cluster\": \"\",\n \"follower_index\": \"\",\n \"follower_index_uuid\": \"\",\n \"leader_remote_cluster\": \"\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->forgetFollower([\n \"index\" => \"\",\n \"body\" => [\n \"follower_cluster\" => \"\",\n \"follower_index\" => \"\",\n \"follower_index_uuid\" => \"\",\n \"leader_remote_cluster\" => \"\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"follower_cluster\":\"\",\"follower_index\":\"\",\"follower_index_uuid\":\"\",\"leader_remote_cluster\":\"\"}' \"$ELASTICSEARCH_URL//_ccr/forget_follower\"" + }, + { + "lang": "Java", + "source": "client.ccr().forgetFollower(f -> f\n .followerCluster(\"\")\n .followerIndex(\"\")\n .followerIndexUuid(\"\")\n .index(\"\")\n .leaderRemoteCluster(\"\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8153,6 +9989,36 @@ ], "x-api": "get_auto_follow_pattern.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_ccr/auto_follow/my_auto_follow_pattern\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.get_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.getAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.get_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->getAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern\"" + }, + { + "lang": "Java", + "source": "client.ccr().getAutoFollowPattern(g -> g\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8223,6 +10089,36 @@ ], "x-api": "pause_auto_follow_pattern.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ccr/auto_follow/my_auto_follow_pattern/pause\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.pause_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.pauseAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.pause_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->pauseAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern/pause\"" + }, + { + "lang": "Java", + "source": "client.ccr().pauseAutoFollowPattern(p -> p\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8289,6 +10185,36 @@ ], "x-api": "pause_follow.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /follower_index/_ccr/pause_follow\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.pause_follow(\n index=\"follower_index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.pauseFollow({\n index: \"follower_index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.pause_follow(\n index: \"follower_index\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->pauseFollow([\n \"index\" => \"follower_index\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/follower_index/_ccr/pause_follow\"" + }, + { + "lang": "Java", + "source": "client.ccr().pauseFollow(p -> p\n .index(\"follower_index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8359,6 +10285,36 @@ ], "x-api": "resume_auto_follow_pattern.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ccr/auto_follow/my_auto_follow_pattern/resume\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.resume_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.resumeAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.resume_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->resumeAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern/resume\"" + }, + { + "lang": "Java", + "source": "client.ccr().resumeAutoFollowPattern(r -> r\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8482,6 +10438,36 @@ ], "x-api": "resume_follow.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /follower_index/_ccr/resume_follow\n{\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ccr.resume_follow(\n index=\"follower_index\",\n max_read_request_operation_count=1024,\n max_outstanding_read_requests=16,\n max_read_request_size=\"1024k\",\n max_write_request_operation_count=32768,\n max_write_request_size=\"16k\",\n max_outstanding_write_requests=8,\n max_write_buffer_count=512,\n max_write_buffer_size=\"512k\",\n max_retry_delay=\"10s\",\n read_poll_timeout=\"30s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.resumeFollow({\n index: \"follower_index\",\n max_read_request_operation_count: 1024,\n max_outstanding_read_requests: 16,\n max_read_request_size: \"1024k\",\n max_write_request_operation_count: 32768,\n max_write_request_size: \"16k\",\n max_outstanding_write_requests: 8,\n max_write_buffer_count: 512,\n max_write_buffer_size: \"512k\",\n max_retry_delay: \"10s\",\n read_poll_timeout: \"30s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.resume_follow(\n index: \"follower_index\",\n body: {\n \"max_read_request_operation_count\": 1024,\n \"max_outstanding_read_requests\": 16,\n \"max_read_request_size\": \"1024k\",\n \"max_write_request_operation_count\": 32768,\n \"max_write_request_size\": \"16k\",\n \"max_outstanding_write_requests\": 8,\n \"max_write_buffer_count\": 512,\n \"max_write_buffer_size\": \"512k\",\n \"max_retry_delay\": \"10s\",\n \"read_poll_timeout\": \"30s\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->resumeFollow([\n \"index\" => \"follower_index\",\n \"body\" => [\n \"max_read_request_operation_count\" => 1024,\n \"max_outstanding_read_requests\" => 16,\n \"max_read_request_size\" => \"1024k\",\n \"max_write_request_operation_count\" => 32768,\n \"max_write_request_size\" => \"16k\",\n \"max_outstanding_write_requests\" => 8,\n \"max_write_buffer_count\" => 512,\n \"max_write_buffer_size\" => \"512k\",\n \"max_retry_delay\" => \"10s\",\n \"read_poll_timeout\" => \"30s\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"max_read_request_operation_count\":1024,\"max_outstanding_read_requests\":16,\"max_read_request_size\":\"1024k\",\"max_write_request_operation_count\":32768,\"max_write_request_size\":\"16k\",\"max_outstanding_write_requests\":8,\"max_write_buffer_count\":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\":\"10s\",\"read_poll_timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/follower_index/_ccr/resume_follow\"" + }, + { + "lang": "Java", + "source": "client.ccr().resumeFollow(r -> r\n .index(\"follower_index\")\n .maxOutstandingReadRequests(16L)\n .maxOutstandingWriteRequests(8L)\n .maxReadRequestOperationCount(1024L)\n .maxReadRequestSize(\"1024k\")\n .maxRetryDelay(m -> m\n .time(\"10s\")\n )\n .maxWriteBufferCount(512L)\n .maxWriteBufferSize(\"512k\")\n .maxWriteRequestOperationCount(32768L)\n .maxWriteRequestSize(\"16k\")\n .readPollTimeout(re -> re\n .time(\"30s\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8569,6 +10555,36 @@ ], "x-api": "stats.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_ccr/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.stats();" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->stats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/stats\"" + }, + { + "lang": "Java", + "source": "client.ccr().stats(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8640,6 +10656,36 @@ ], "x-api": "unfollow.ccr", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /follower_index/_ccr/unfollow\n" + }, + { + "lang": "Python", + "source": "resp = client.ccr.unfollow(\n index=\"follower_index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ccr.unfollow({\n index: \"follower_index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ccr.unfollow(\n index: \"follower_index\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ccr()->unfollow([\n \"index\" => \"follower_index\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/follower_index/_ccr/unfollow\"" + }, + { + "lang": "Java", + "source": "client.ccr().unfollow(u -> u\n .index(\"follower_index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8751,6 +10797,36 @@ ], "x-api": "scroll", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_search/scroll\n{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.scroll(\n scroll_id=\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.scroll({\n scroll_id: \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.scroll(\n body: {\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->scroll([\n \"body\" => [\n \"scroll_id\" => \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scroll_id\":\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"}' \"$ELASTICSEARCH_URL/_search/scroll\"" + }, + { + "lang": "Java", + "source": "client.scroll(s -> s\n .scrollId(\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8860,6 +10936,36 @@ ], "x-api": "scroll", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_search/scroll\n{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.scroll(\n scroll_id=\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.scroll({\n scroll_id: \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.scroll(\n body: {\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->scroll([\n \"body\" => [\n \"scroll_id\" => \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scroll_id\":\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"}' \"$ELASTICSEARCH_URL/_search/scroll\"" + }, + { + "lang": "Java", + "source": "client.scroll(s -> s\n .scrollId(\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -8935,6 +11041,36 @@ ], "x-api": "clear_scroll", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_search/scroll\n{\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.clear_scroll(\n scroll_id=\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.clearScroll({\n scroll_id: \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.clear_scroll(\n body: {\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->clearScroll([\n \"body\" => [\n \"scroll_id\" => \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scroll_id\":\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"}' \"$ELASTICSEARCH_URL/_search/scroll\"" + }, + { + "lang": "Java", + "source": "client.clearScroll(c -> c\n .scrollId(\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -9057,6 +11193,36 @@ ], "x-api": "scroll", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_search/scroll\n{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.scroll(\n scroll_id=\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.scroll({\n scroll_id: \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.scroll(\n body: {\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->scroll([\n \"body\" => [\n \"scroll_id\" => \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scroll_id\":\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"}' \"$ELASTICSEARCH_URL/_search/scroll\"" + }, + { + "lang": "Java", + "source": "client.scroll(s -> s\n .scrollId(\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -9177,6 +11343,36 @@ ], "x-api": "scroll", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_search/scroll\n{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.scroll(\n scroll_id=\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.scroll({\n scroll_id: \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.scroll(\n body: {\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->scroll([\n \"body\" => [\n \"scroll_id\" => \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scroll_id\":\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"}' \"$ELASTICSEARCH_URL/_search/scroll\"" + }, + { + "lang": "Java", + "source": "client.scroll(s -> s\n .scrollId(\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -9265,6 +11461,36 @@ ], "x-api": "clear_scroll", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_search/scroll\n{\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.clear_scroll(\n scroll_id=\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.clearScroll({\n scroll_id: \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.clear_scroll(\n body: {\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->clearScroll([\n \"body\" => [\n \"scroll_id\" => \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scroll_id\":\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"}' \"$ELASTICSEARCH_URL/_search/scroll\"" + }, + { + "lang": "Java", + "source": "client.clearScroll(c -> c\n .scrollId(\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -9348,6 +11574,36 @@ ], "x-api": "close_point_in_time", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_pit\n{\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.close_point_in_time(\n id=\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.closePointInTime({\n id: \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.close_point_in_time(\n body: {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->closePointInTime([\n \"body\" => [\n \"id\" => \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"}' \"$ELASTICSEARCH_URL/_pit\"" + }, + { + "lang": "Java", + "source": "client.closePointInTime(c -> c\n .id(\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -9671,6 +11927,36 @@ ], "x-api": "allocation_explain.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cluster/allocation/explain\n{\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.cluster.allocation_explain(\n index=\"my-index-000001\",\n shard=0,\n primary=False,\n current_node=\"my-node\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.allocationExplain({\n index: \"my-index-000001\",\n shard: 0,\n primary: false,\n current_node: \"my-node\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.allocation_explain(\n body: {\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->allocationExplain([\n \"body\" => [\n \"index\" => \"my-index-000001\",\n \"shard\" => 0,\n \"primary\" => false,\n \"current_node\" => \"my-node\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"my-index-000001\",\"shard\":0,\"primary\":false,\"current_node\":\"my-node\"}' \"$ELASTICSEARCH_URL/_cluster/allocation/explain\"" + }, + { + "lang": "Java", + "source": "client.cluster().allocationExplain(a -> a\n .currentNode(\"my-node\")\n .index(\"my-index-000001\")\n .primary(false)\n .shard(0)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -9992,6 +12278,36 @@ ], "x-api": "allocation_explain.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cluster/allocation/explain\n{\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.cluster.allocation_explain(\n index=\"my-index-000001\",\n shard=0,\n primary=False,\n current_node=\"my-node\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.allocationExplain({\n index: \"my-index-000001\",\n shard: 0,\n primary: false,\n current_node: \"my-node\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.allocation_explain(\n body: {\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->allocationExplain([\n \"body\" => [\n \"index\" => \"my-index-000001\",\n \"shard\" => 0,\n \"primary\" => false,\n \"current_node\" => \"my-node\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"my-index-000001\",\"shard\":0,\"primary\":false,\"current_node\":\"my-node\"}' \"$ELASTICSEARCH_URL/_cluster/allocation/explain\"" + }, + { + "lang": "Java", + "source": "client.cluster().allocationExplain(a -> a\n .currentNode(\"my-node\")\n .index(\"my-index-000001\")\n .primary(false)\n .shard(0)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -10120,6 +12436,36 @@ ], "x-api": "get_component_template.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_component_template/template_1\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.get_component_template(\n name=\"template_1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.getComponentTemplate({\n name: \"template_1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.get_component_template(\n name: \"template_1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->getComponentTemplate([\n \"name\" => \"template_1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_component_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.cluster().getComponentTemplate(g -> g\n .name(\"template_1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -10253,6 +12599,36 @@ ], "x-api": "put_component_template.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _component_template/template_1\n{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.cluster.put_component_template(\n name=\"template_1\",\n template={\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": False\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.putComponentTemplate({\n name: \"template_1\",\n template: {\n settings: {\n number_of_shards: 1,\n },\n mappings: {\n _source: {\n enabled: false,\n },\n properties: {\n host_name: {\n type: \"keyword\",\n },\n created_at: {\n type: \"date\",\n format: \"EEE MMM dd HH:mm:ss Z yyyy\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.put_component_template(\n name: \"template_1\",\n body: {\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->putComponentTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"template\" => [\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"mappings\" => [\n \"_source\" => [\n \"enabled\" => false,\n ],\n \"properties\" => [\n \"host_name\" => [\n \"type\" => \"keyword\",\n ],\n \"created_at\" => [\n \"type\" => \"date\",\n \"format\" => \"EEE MMM dd HH:mm:ss Z yyyy\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"template\":{\"settings\":{\"number_of_shards\":1},\"mappings\":{\"_source\":{\"enabled\":false},\"properties\":{\"host_name\":{\"type\":\"keyword\"},\"created_at\":{\"type\":\"date\",\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\"}}}}}' \"$ELASTICSEARCH_URL/_component_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.cluster().putComponentTemplate(p -> p\n .name(\"template_1\")\n .template(t -> t\n .mappings(m -> m\n .properties(Map.of(\"created_at\", Property.of(pr -> pr\n .date(d -> d\n .format(\"EEE MMM dd HH:mm:ss Z yyyy\")\n )\n ),\"host_name\", Property.of(pro -> pro\n .keyword(k -> k)\n )))\n .source(s -> s\n .enabled(false)\n )\n )\n .settings(s -> s\n .numberOfShards(\"1\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -10386,6 +12762,36 @@ ], "x-api": "put_component_template.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _component_template/template_1\n{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.cluster.put_component_template(\n name=\"template_1\",\n template={\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": False\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.putComponentTemplate({\n name: \"template_1\",\n template: {\n settings: {\n number_of_shards: 1,\n },\n mappings: {\n _source: {\n enabled: false,\n },\n properties: {\n host_name: {\n type: \"keyword\",\n },\n created_at: {\n type: \"date\",\n format: \"EEE MMM dd HH:mm:ss Z yyyy\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.put_component_template(\n name: \"template_1\",\n body: {\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->putComponentTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"template\" => [\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"mappings\" => [\n \"_source\" => [\n \"enabled\" => false,\n ],\n \"properties\" => [\n \"host_name\" => [\n \"type\" => \"keyword\",\n ],\n \"created_at\" => [\n \"type\" => \"date\",\n \"format\" => \"EEE MMM dd HH:mm:ss Z yyyy\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"template\":{\"settings\":{\"number_of_shards\":1},\"mappings\":{\"_source\":{\"enabled\":false},\"properties\":{\"host_name\":{\"type\":\"keyword\"},\"created_at\":{\"type\":\"date\",\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\"}}}}}' \"$ELASTICSEARCH_URL/_component_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.cluster().putComponentTemplate(p -> p\n .name(\"template_1\")\n .template(t -> t\n .mappings(m -> m\n .properties(Map.of(\"created_at\", Property.of(pr -> pr\n .date(d -> d\n .format(\"EEE MMM dd HH:mm:ss Z yyyy\")\n )\n ),\"host_name\", Property.of(pro -> pro\n .keyword(k -> k)\n )))\n .source(s -> s\n .enabled(false)\n )\n )\n .settings(s -> s\n .numberOfShards(\"1\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -10454,6 +12860,36 @@ ], "x-api": "delete_component_template.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _component_template/template_1\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.delete_component_template(\n name=\"template_1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.deleteComponentTemplate({\n name: \"template_1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.delete_component_template(\n name: \"template_1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->deleteComponentTemplate([\n \"name\" => \"template_1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_component_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.cluster().deleteComponentTemplate(d -> d\n .name(\"template_1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -10762,6 +13198,36 @@ ], "x-api": "get_component_template.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_component_template/template_1\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.get_component_template(\n name=\"template_1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.getComponentTemplate({\n name: \"template_1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.get_component_template(\n name: \"template_1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->getComponentTemplate([\n \"name\" => \"template_1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_component_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.cluster().getComponentTemplate(g -> g\n .name(\"template_1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -10872,6 +13338,36 @@ ], "x-api": "get_settings.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cluster/settings?filter_path=persistent.cluster.remote\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.get_settings(\n filter_path=\"persistent.cluster.remote\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.getSettings({\n filter_path: \"persistent.cluster.remote\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.get_settings(\n filter_path: \"persistent.cluster.remote\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->getSettings([\n \"filter_path\" => \"persistent.cluster.remote\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/settings?filter_path=persistent.cluster.remote\"" + }, + { + "lang": "Java", + "source": "client.cluster().getSettings(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11000,6 +13496,36 @@ ], "x-api": "put_settings.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"50mb\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.cluster.put_settings(\n persistent={\n \"indices.recovery.max_bytes_per_sec\": \"50mb\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.putSettings({\n persistent: {\n \"indices.recovery.max_bytes_per_sec\": \"50mb\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.put_settings(\n body: {\n \"persistent\": {\n \"indices.recovery.max_bytes_per_sec\": \"50mb\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->putSettings([\n \"body\" => [\n \"persistent\" => [\n \"indices.recovery.max_bytes_per_sec\" => \"50mb\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"persistent\":{\"indices.recovery.max_bytes_per_sec\":\"50mb\"}}' \"$ELASTICSEARCH_URL/_cluster/settings\"" + }, + { + "lang": "Java", + "source": "client.cluster().putSettings(p -> p\n .persistent(\"indices.recovery.max_bytes_per_sec\", JsonData.fromJson(\"\\\"50mb\\\"\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11020,7 +13546,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -11120,7 +13646,7 @@ { "in": "query", "name": "wait_for_status", - "description": "Wait (until the timeout expires) for the cluster to reach a specific health status (or a better status).\nA green status is better than yellow and yellow is better than red.\nBy default, the request does not wait for a particular status.", + "description": "Wait (until the timeout expires) for the cluster to reach a specific health status (or a better status).\nA green status is better than yellow and yellow is better than red.\nBy default, the request does not wait for a particular status.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.HealthStatus" @@ -11155,6 +13681,36 @@ ], "x-api": "health.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cluster/health\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.health()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.health();" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.health" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->health();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/health\"" + }, + { + "lang": "Java", + "source": "client.cluster().health(h -> h);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11186,7 +13742,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -11286,7 +13842,7 @@ { "in": "query", "name": "wait_for_status", - "description": "Wait (until the timeout expires) for the cluster to reach a specific health status (or a better status).\nA green status is better than yellow and yellow is better than red.\nBy default, the request does not wait for a particular status.", + "description": "Wait (until the timeout expires) for the cluster to reach a specific health status (or a better status).\nA green status is better than yellow and yellow is better than red.\nBy default, the request does not wait for a particular status.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.HealthStatus" @@ -11321,6 +13877,36 @@ ], "x-api": "health.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cluster/health\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.health()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.health();" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.health" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->health();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/health\"" + }, + { + "lang": "Java", + "source": "client.cluster().health(h -> h);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11341,7 +13927,7 @@ { "in": "path", "name": "target", - "description": "Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest.", + "description": "Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest.\n\nSupported values include: `_all`, `http`, `ingest`, `thread_pool`, `script`\n\n", "required": true, "deprecated": false, "schema": { @@ -11407,6 +13993,36 @@ ], "x-api": "info.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_info/_all\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.info(\n target=\"_all\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.info({\n target: \"_all\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.info(\n target: \"_all\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->info([\n \"target\" => \"_all\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_info/_all\"" + }, + { + "lang": "Java", + "source": "client.cluster().info(i -> i\n .target(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11477,6 +14093,36 @@ ], "x-api": "pending_tasks.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cluster/pending_tasks\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.pending_tasks()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.pendingTasks();" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.pending_tasks" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->pendingTasks();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/pending_tasks\"" + }, + { + "lang": "Java", + "source": "client.cluster().pendingTasks(p -> p);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11521,6 +14167,36 @@ ], "x-api": "remote_info.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_remote/info\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.remote_info()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.remoteInfo();" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.remote_info" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->remoteInfo();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_remote/info\"" + }, + { + "lang": "Java", + "source": "client.cluster().remoteInfo();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11669,6 +14345,36 @@ ], "x-api": "reroute.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_cluster/reroute?metric=none\n{\n \"commands\": [\n {\n \"move\": {\n \"index\": \"test\", \"shard\": 0,\n \"from_node\": \"node1\", \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\", \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.cluster.reroute(\n metric=\"none\",\n commands=[\n {\n \"move\": {\n \"index\": \"test\",\n \"shard\": 0,\n \"from_node\": \"node1\",\n \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\",\n \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.reroute({\n metric: \"none\",\n commands: [\n {\n move: {\n index: \"test\",\n shard: 0,\n from_node: \"node1\",\n to_node: \"node2\",\n },\n },\n {\n allocate_replica: {\n index: \"test\",\n shard: 1,\n node: \"node3\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.reroute(\n metric: \"none\",\n body: {\n \"commands\": [\n {\n \"move\": {\n \"index\": \"test\",\n \"shard\": 0,\n \"from_node\": \"node1\",\n \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\",\n \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->reroute([\n \"metric\" => \"none\",\n \"body\" => [\n \"commands\" => array(\n [\n \"move\" => [\n \"index\" => \"test\",\n \"shard\" => 0,\n \"from_node\" => \"node1\",\n \"to_node\" => \"node2\",\n ],\n ],\n [\n \"allocate_replica\" => [\n \"index\" => \"test\",\n \"shard\" => 1,\n \"node\" => \"node3\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"commands\":[{\"move\":{\"index\":\"test\",\"shard\":0,\"from_node\":\"node1\",\"to_node\":\"node2\"}},{\"allocate_replica\":{\"index\":\"test\",\"shard\":1,\"node\":\"node3\"}}]}' \"$ELASTICSEARCH_URL/_cluster/reroute?metric=none\"" + }, + { + "lang": "Java", + "source": "client.cluster().reroute(r -> r\n .commands(List.of(Command.of(c -> c\n .move(m -> m\n .index(\"test\")\n .shard(0)\n .fromNode(\"node1\")\n .toNode(\"node2\")\n )\n ),Command.of(c -> c\n .allocateReplica(a -> a\n .index(\"test\")\n .shard(1)\n .node(\"node3\")\n )\n )))\n .metric(\"none\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11699,7 +14405,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -11788,6 +14494,36 @@ ], "x-api": "state.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.state(\n filter_path=\"metadata.cluster_coordination.last_committed_config\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.state({\n filter_path: \"metadata.cluster_coordination.last_committed_config\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.state(\n filter_path: \"metadata.cluster_coordination.last_committed_config\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->state([\n \"filter_path\" => \"metadata.cluster_coordination.last_committed_config\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config\"" + }, + { + "lang": "Java", + "source": "client.cluster().state(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11808,7 +14544,7 @@ { "in": "path", "name": "metric", - "description": "Limit the information returned to the specified metrics.", + "description": "Limit the information returned to the specified metrics.\n\nSupported values include: `_all`, `version`, `master_node`, `blocks`, `nodes`, `metadata`, `routing_table`, `routing_nodes`, `customs`\n\n", "required": true, "deprecated": false, "schema": { @@ -11829,7 +14565,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -11918,6 +14654,36 @@ ], "x-api": "state.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.state(\n filter_path=\"metadata.cluster_coordination.last_committed_config\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.state({\n filter_path: \"metadata.cluster_coordination.last_committed_config\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.state(\n filter_path: \"metadata.cluster_coordination.last_committed_config\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->state([\n \"filter_path\" => \"metadata.cluster_coordination.last_committed_config\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config\"" + }, + { + "lang": "Java", + "source": "client.cluster().state(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -11938,7 +14704,7 @@ { "in": "path", "name": "metric", - "description": "Limit the information returned to the specified metrics.", + "description": "Limit the information returned to the specified metrics.\n\nSupported values include: `_all`, `version`, `master_node`, `blocks`, `nodes`, `metadata`, `routing_table`, `routing_nodes`, `customs`\n\n", "required": true, "deprecated": false, "schema": { @@ -11970,7 +14736,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -12059,6 +14825,36 @@ ], "x-api": "state.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.state(\n filter_path=\"metadata.cluster_coordination.last_committed_config\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.state({\n filter_path: \"metadata.cluster_coordination.last_committed_config\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.state(\n filter_path: \"metadata.cluster_coordination.last_committed_config\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->state([\n \"filter_path\" => \"metadata.cluster_coordination.last_committed_config\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config\"" + }, + { + "lang": "Java", + "source": "client.cluster().state(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12118,6 +14914,36 @@ ], "x-api": "stats.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size*\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.stats(\n human=True,\n filter_path=\"indices.mappings.total_deduplicated_mapping_size*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.stats({\n human: \"true\",\n filter_path: \"indices.mappings.total_deduplicated_mapping_size*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.stats(\n human: \"true\",\n filter_path: \"indices.mappings.total_deduplicated_mapping_size*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->stats([\n \"human\" => \"true\",\n \"filter_path\" => \"indices.mappings.total_deduplicated_mapping_size*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size*\"" + }, + { + "lang": "Java", + "source": "client.cluster().stats(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12188,6 +15014,36 @@ ], "x-api": "stats.cluster", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size*\n" + }, + { + "lang": "Python", + "source": "resp = client.cluster.stats(\n human=True,\n filter_path=\"indices.mappings.total_deduplicated_mapping_size*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.cluster.stats({\n human: \"true\",\n filter_path: \"indices.mappings.total_deduplicated_mapping_size*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.cluster.stats(\n human: \"true\",\n filter_path: \"indices.mappings.total_deduplicated_mapping_size*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->cluster()->stats([\n \"human\" => \"true\",\n \"filter_path\" => \"indices.mappings.total_deduplicated_mapping_size*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size*\"" + }, + { + "lang": "Java", + "source": "client.cluster().stats(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12252,6 +15108,36 @@ ], "x-api": "check_in.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_check_in\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.check_in(\n connector_id=\"my-connector\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.checkIn({\n connector_id: \"my-connector\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.check_in(\n connector_id: \"my-connector\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->checkIn([\n \"connector_id\" => \"my-connector\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/my-connector/_check_in\"" + }, + { + "lang": "Java", + "source": "client.connector().checkIn(c -> c\n .connectorId(\"my-connector\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12309,6 +15195,36 @@ ], "x-api": "get.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _connector/my-connector-id\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.get(\n connector_id=\"my-connector-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.get({\n connector_id: \"my-connector-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.get(\n connector_id: \"my-connector-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->get([\n \"connector_id\" => \"my-connector-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/my-connector-id\"" + }, + { + "lang": "Java", + "source": "client.connector().get(g -> g\n .connectorId(\"my-connector-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12419,6 +15335,36 @@ ], "x-api": "put.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector\n{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"service_type\": \"google_drive\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.put(\n connector_id=\"my-connector\",\n index_name=\"search-google-drive\",\n name=\"My Connector\",\n service_type=\"google_drive\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.put({\n connector_id: \"my-connector\",\n index_name: \"search-google-drive\",\n name: \"My Connector\",\n service_type: \"google_drive\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.put(\n connector_id: \"my-connector\",\n body: {\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"service_type\": \"google_drive\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->put([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"index_name\" => \"search-google-drive\",\n \"name\" => \"My Connector\",\n \"service_type\" => \"google_drive\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_name\":\"search-google-drive\",\"name\":\"My Connector\",\"service_type\":\"google_drive\"}' \"$ELASTICSEARCH_URL/_connector/my-connector\"" + }, + { + "lang": "Java", + "source": "client.connector().put(p -> p\n .connectorId(\"my-connector\")\n .indexName(\"search-google-drive\")\n .name(\"My Connector\")\n .serviceType(\"google_drive\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12489,6 +15435,36 @@ ], "x-api": "delete.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _connector/my-connector-id&delete_sync_jobs=true\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.delete(\n connector_id=\"my-connector-id&delete_sync_jobs=true\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.delete({\n connector_id: \"my-connector-id&delete_sync_jobs=true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.delete(\n connector_id: \"my-connector-id&delete_sync_jobs=true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->delete([\n \"connector_id\" => \"my-connector-id&delete_sync_jobs=true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/my-connector-id&delete_sync_jobs=true\"" + }, + { + "lang": "Java", + "source": "client.connector().delete(d -> d\n .connectorId(\"my-connector-id&delete_sync_jobs=true\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12610,6 +15586,36 @@ ], "x-api": "list.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _connector\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.list()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.list();" + }, + { + "lang": "Ruby", + "source": "response = client.connector.list" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->list();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector\"" + }, + { + "lang": "Java", + "source": "client.connector().list(l -> l);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12707,6 +15713,36 @@ ], "x-api": "put.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector\n{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"service_type\": \"google_drive\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.put(\n connector_id=\"my-connector\",\n index_name=\"search-google-drive\",\n name=\"My Connector\",\n service_type=\"google_drive\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.put({\n connector_id: \"my-connector\",\n index_name: \"search-google-drive\",\n name: \"My Connector\",\n service_type: \"google_drive\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.put(\n connector_id: \"my-connector\",\n body: {\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"service_type\": \"google_drive\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->put([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"index_name\" => \"search-google-drive\",\n \"name\" => \"My Connector\",\n \"service_type\" => \"google_drive\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_name\":\"search-google-drive\",\"name\":\"My Connector\",\"service_type\":\"google_drive\"}' \"$ELASTICSEARCH_URL/_connector/my-connector\"" + }, + { + "lang": "Java", + "source": "client.connector().put(p -> p\n .connectorId(\"my-connector\")\n .indexName(\"search-google-drive\")\n .name(\"My Connector\")\n .serviceType(\"google_drive\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12851,6 +15887,36 @@ ], "x-api": "sync_job_cancel.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/_sync_job/my-connector-sync-job-id/_cancel\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_cancel(\n connector_sync_job_id=\"my-connector-sync-job-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobCancel({\n connector_sync_job_id: \"my-connector-sync-job-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_cancel(\n connector_sync_job_id: \"my-connector-sync-job-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobCancel([\n \"connector_sync_job_id\" => \"my-connector-sync-job-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id/_cancel\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobCancel(s -> s\n .connectorSyncJobId(\"my-connector-sync-job-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12898,6 +15964,36 @@ ], "x-api": "sync_job_check_in.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/_sync_job/my-connector-sync-job/_check_in\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_check_in(\n connector_sync_job_id=\"my-connector-sync-job\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobCheckIn({\n connector_sync_job_id: \"my-connector-sync-job\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_check_in(\n connector_sync_job_id: \"my-connector-sync-job\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobCheckIn([\n \"connector_sync_job_id\" => \"my-connector-sync-job\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_check_in\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobCheckIn(s -> s\n .connectorSyncJobId(\"my-connector-sync-job\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -12974,6 +16070,36 @@ ], "x-api": "sync_job_claim.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/_sync_job/my-connector-sync-job-id/_claim\n{\n \"worker_hostname\": \"some-machine\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_claim(\n connector_sync_job_id=\"my-connector-sync-job-id\",\n worker_hostname=\"some-machine\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobClaim({\n connector_sync_job_id: \"my-connector-sync-job-id\",\n worker_hostname: \"some-machine\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_claim(\n connector_sync_job_id: \"my-connector-sync-job-id\",\n body: {\n \"worker_hostname\": \"some-machine\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobClaim([\n \"connector_sync_job_id\" => \"my-connector-sync-job-id\",\n \"body\" => [\n \"worker_hostname\" => \"some-machine\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"worker_hostname\":\"some-machine\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id/_claim\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobClaim(s -> s\n .connectorSyncJobId(\"my-connector-sync-job-id\")\n .workerHostname(\"some-machine\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13020,6 +16146,36 @@ ], "x-api": "sync_job_get.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _connector/_sync_job/my-connector-sync-job\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_get(\n connector_sync_job_id=\"my-connector-sync-job\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobGet({\n connector_sync_job_id: \"my-connector-sync-job\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_get(\n connector_sync_job_id: \"my-connector-sync-job\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobGet([\n \"connector_sync_job_id\" => \"my-connector-sync-job\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobGet(s -> s\n .connectorSyncJobId(\"my-connector-sync-job\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13070,6 +16226,36 @@ ], "x-api": "sync_job_delete.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _connector/_sync_job/my-connector-sync-job-id\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_delete(\n connector_sync_job_id=\"my-connector-sync-job-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobDelete({\n connector_sync_job_id: \"my-connector-sync-job-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_delete(\n connector_sync_job_id: \"my-connector-sync-job-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobDelete([\n \"connector_sync_job_id\" => \"my-connector-sync-job-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobDelete(s -> s\n .connectorSyncJobId(\"my-connector-sync-job-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13141,6 +16327,36 @@ ], "x-api": "sync_job_error.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/_sync_job/my-connector-sync-job/_error\n{\n \"error\": \"some-error\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_error(\n connector_sync_job_id=\"my-connector-sync-job\",\n error=\"some-error\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobError({\n connector_sync_job_id: \"my-connector-sync-job\",\n error: \"some-error\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_error(\n connector_sync_job_id: \"my-connector-sync-job\",\n body: {\n \"error\": \"some-error\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobError([\n \"connector_sync_job_id\" => \"my-connector-sync-job\",\n \"body\" => [\n \"error\" => \"some-error\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"error\":\"some-error\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_error\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobError(s -> s\n .connectorSyncJobId(\"my-connector-sync-job\")\n .error(\"some-error\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13201,7 +16417,7 @@ { "in": "query", "name": "job_type", - "description": "A comma-separated list of job types to fetch the sync jobs for", + "description": "A comma-separated list of job types to fetch the sync jobs for\n\nSupported values include: `full`, `incremental`, `access_control`\n\n", "deprecated": false, "schema": { "oneOf": [ @@ -13252,6 +16468,36 @@ ], "x-api": "sync_job_list.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _connector/_sync_job?connector_id=my-connector-id&size=1\n" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_list(\n connector_id=\"my-connector-id\",\n size=\"1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobList({\n connector_id: \"my-connector-id\",\n size: 1,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_list(\n connector_id: \"my-connector-id\",\n size: \"1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobList([\n \"connector_id\" => \"my-connector-id\",\n \"size\" => \"1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job?connector_id=my-connector-id&size=1\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobList(s -> s\n .connectorId(\"my-connector-id\")\n .size(1)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13338,6 +16584,36 @@ ], "x-api": "sync_job_post.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _connector/_sync_job\n{\n \"id\": \"connector-id\",\n \"job_type\": \"full\",\n \"trigger_method\": \"on_demand\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_post(\n id=\"connector-id\",\n job_type=\"full\",\n trigger_method=\"on_demand\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobPost({\n id: \"connector-id\",\n job_type: \"full\",\n trigger_method: \"on_demand\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_post(\n body: {\n \"id\": \"connector-id\",\n \"job_type\": \"full\",\n \"trigger_method\": \"on_demand\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobPost([\n \"body\" => [\n \"id\" => \"connector-id\",\n \"job_type\" => \"full\",\n \"trigger_method\" => \"on_demand\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"connector-id\",\"job_type\":\"full\",\"trigger_method\":\"on_demand\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobPost(s -> s\n .id(\"connector-id\")\n .jobType(SyncJobType.Full)\n .triggerMethod(SyncJobTriggerMethod.OnDemand)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13440,6 +16716,36 @@ ], "x-api": "sync_job_update_stats.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/_sync_job/my-connector-sync-job/_stats\n{\n \"deleted_document_count\": 10,\n \"indexed_document_count\": 20,\n \"indexed_document_volume\": 1000,\n \"total_document_count\": 2000,\n \"last_seen\": \"2023-01-02T10:00:00Z\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.sync_job_update_stats(\n connector_sync_job_id=\"my-connector-sync-job\",\n deleted_document_count=10,\n indexed_document_count=20,\n indexed_document_volume=1000,\n total_document_count=2000,\n last_seen=\"2023-01-02T10:00:00Z\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.syncJobUpdateStats({\n connector_sync_job_id: \"my-connector-sync-job\",\n deleted_document_count: 10,\n indexed_document_count: 20,\n indexed_document_volume: 1000,\n total_document_count: 2000,\n last_seen: \"2023-01-02T10:00:00Z\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.sync_job_update_stats(\n connector_sync_job_id: \"my-connector-sync-job\",\n body: {\n \"deleted_document_count\": 10,\n \"indexed_document_count\": 20,\n \"indexed_document_volume\": 1000,\n \"total_document_count\": 2000,\n \"last_seen\": \"2023-01-02T10:00:00Z\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->syncJobUpdateStats([\n \"connector_sync_job_id\" => \"my-connector-sync-job\",\n \"body\" => [\n \"deleted_document_count\" => 10,\n \"indexed_document_count\" => 20,\n \"indexed_document_volume\" => 1000,\n \"total_document_count\" => 2000,\n \"last_seen\" => \"2023-01-02T10:00:00Z\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"deleted_document_count\":10,\"indexed_document_count\":20,\"indexed_document_volume\":1000,\"total_document_count\":2000,\"last_seen\":\"2023-01-02T10:00:00Z\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_stats\"" + }, + { + "lang": "Java", + "source": "client.connector().syncJobUpdateStats(s -> s\n .connectorSyncJobId(\"my-connector-sync-job\")\n .deletedDocumentCount(10L)\n .indexedDocumentCount(20L)\n .indexedDocumentVolume(1000L)\n .lastSeen(l -> l\n .time(\"2023-01-02T10:00:00Z\")\n )\n .totalDocumentCount(2000)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13586,6 +16892,36 @@ ], "x-api": "update_api_key_id.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_api_key_id\n{\n \"api_key_id\": \"my-api-key-id\",\n \"api_key_secret_id\": \"my-connector-secret-id\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_api_key_id(\n connector_id=\"my-connector\",\n api_key_id=\"my-api-key-id\",\n api_key_secret_id=\"my-connector-secret-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateApiKeyId({\n connector_id: \"my-connector\",\n api_key_id: \"my-api-key-id\",\n api_key_secret_id: \"my-connector-secret-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_api_key_id(\n connector_id: \"my-connector\",\n body: {\n \"api_key_id\": \"my-api-key-id\",\n \"api_key_secret_id\": \"my-connector-secret-id\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateApiKeyId([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"api_key_id\" => \"my-api-key-id\",\n \"api_key_secret_id\" => \"my-connector-secret-id\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"api_key_id\":\"my-api-key-id\",\"api_key_secret_id\":\"my-connector-secret-id\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_api_key_id\"" + }, + { + "lang": "Java", + "source": "client.connector().updateApiKeyId(u -> u\n .apiKeyId(\"my-api-key-id\")\n .apiKeySecretId(\"my-connector-secret-id\")\n .connectorId(\"my-connector\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13683,6 +17019,36 @@ ], "x-api": "update_configuration.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-spo-connector/_configuration\n{\n \"values\": {\n \"tenant_id\": \"my-tenant-id\",\n \"tenant_name\": \"my-sharepoint-site\",\n \"client_id\": \"foo\",\n \"secret_value\": \"bar\",\n \"site_collections\": \"*\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_configuration(\n connector_id=\"my-spo-connector\",\n values={\n \"tenant_id\": \"my-tenant-id\",\n \"tenant_name\": \"my-sharepoint-site\",\n \"client_id\": \"foo\",\n \"secret_value\": \"bar\",\n \"site_collections\": \"*\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateConfiguration({\n connector_id: \"my-spo-connector\",\n values: {\n tenant_id: \"my-tenant-id\",\n tenant_name: \"my-sharepoint-site\",\n client_id: \"foo\",\n secret_value: \"bar\",\n site_collections: \"*\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_configuration(\n connector_id: \"my-spo-connector\",\n body: {\n \"values\": {\n \"tenant_id\": \"my-tenant-id\",\n \"tenant_name\": \"my-sharepoint-site\",\n \"client_id\": \"foo\",\n \"secret_value\": \"bar\",\n \"site_collections\": \"*\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateConfiguration([\n \"connector_id\" => \"my-spo-connector\",\n \"body\" => [\n \"values\" => [\n \"tenant_id\" => \"my-tenant-id\",\n \"tenant_name\" => \"my-sharepoint-site\",\n \"client_id\" => \"foo\",\n \"secret_value\" => \"bar\",\n \"site_collections\" => \"*\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"values\":{\"tenant_id\":\"my-tenant-id\",\"tenant_name\":\"my-sharepoint-site\",\"client_id\":\"foo\",\"secret_value\":\"bar\",\"site_collections\":\"*\"}}' \"$ELASTICSEARCH_URL/_connector/my-spo-connector/_configuration\"" + }, + { + "lang": "Java", + "source": "client.connector().updateConfiguration(u -> u\n .connectorId(\"my-spo-connector\")\n .values(Map.of(\"tenant_id\", JsonData.fromJson(\"\\\"my-tenant-id\\\"\"),\"tenant_name\", JsonData.fromJson(\"\\\"my-sharepoint-site\\\"\"),\"secret_value\", JsonData.fromJson(\"\\\"bar\\\"\"),\"client_id\", JsonData.fromJson(\"\\\"foo\\\"\"),\"site_collections\", JsonData.fromJson(\"\\\"*\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13777,6 +17143,36 @@ ], "x-api": "update_error.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_error\n{\n \"error\": \"Houston, we have a problem!\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_error(\n connector_id=\"my-connector\",\n error=\"Houston, we have a problem!\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateError({\n connector_id: \"my-connector\",\n error: \"Houston, we have a problem!\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_error(\n connector_id: \"my-connector\",\n body: {\n \"error\": \"Houston, we have a problem!\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateError([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"error\" => \"Houston, we have a problem!\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"error\":\"Houston, we have a problem!\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_error\"" + }, + { + "lang": "Java", + "source": "client.connector().updateError(u -> u\n .connectorId(\"my-connector\")\n .error(\"Houston, we have a problem!\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13871,6 +17267,36 @@ ], "x-api": "update_features.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_features\n{\n \"features\": {\n \"document_level_security\": {\n \"enabled\": true\n },\n \"incremental_sync\": {\n \"enabled\": true\n },\n \"sync_rules\": {\n \"advanced\": {\n \"enabled\": false\n },\n \"basic\": {\n \"enabled\": true\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_features(\n connector_id=\"my-connector\",\n features={\n \"document_level_security\": {\n \"enabled\": True\n },\n \"incremental_sync\": {\n \"enabled\": True\n },\n \"sync_rules\": {\n \"advanced\": {\n \"enabled\": False\n },\n \"basic\": {\n \"enabled\": True\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateFeatures({\n connector_id: \"my-connector\",\n features: {\n document_level_security: {\n enabled: true,\n },\n incremental_sync: {\n enabled: true,\n },\n sync_rules: {\n advanced: {\n enabled: false,\n },\n basic: {\n enabled: true,\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_features(\n connector_id: \"my-connector\",\n body: {\n \"features\": {\n \"document_level_security\": {\n \"enabled\": true\n },\n \"incremental_sync\": {\n \"enabled\": true\n },\n \"sync_rules\": {\n \"advanced\": {\n \"enabled\": false\n },\n \"basic\": {\n \"enabled\": true\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateFeatures([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"features\" => [\n \"document_level_security\" => [\n \"enabled\" => true,\n ],\n \"incremental_sync\" => [\n \"enabled\" => true,\n ],\n \"sync_rules\" => [\n \"advanced\" => [\n \"enabled\" => false,\n ],\n \"basic\" => [\n \"enabled\" => true,\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"features\":{\"document_level_security\":{\"enabled\":true},\"incremental_sync\":{\"enabled\":true},\"sync_rules\":{\"advanced\":{\"enabled\":false},\"basic\":{\"enabled\":true}}}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_features\"" + }, + { + "lang": "Java", + "source": "client.connector().updateFeatures(u -> u\n .connectorId(\"my-connector\")\n .features(f -> f\n .documentLevelSecurity(d -> d\n .enabled(true)\n )\n .incrementalSync(i -> i\n .enabled(true)\n )\n .syncRules(s -> s\n .advanced(a -> a\n .enabled(false)\n )\n .basic(b -> b\n .enabled(true)\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -13974,6 +17400,36 @@ ], "x-api": "update_filtering.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-g-drive-connector/_filtering\n{\n \"rules\": [\n {\n \"field\": \"file_extension\",\n \"id\": \"exclude-txt-files\",\n \"order\": 0,\n \"policy\": \"exclude\",\n \"rule\": \"equals\",\n \"value\": \"txt\"\n },\n {\n \"field\": \"_\",\n \"id\": \"DEFAULT\",\n \"order\": 1,\n \"policy\": \"include\",\n \"rule\": \"regex\",\n \"value\": \".*\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_filtering(\n connector_id=\"my-g-drive-connector\",\n rules=[\n {\n \"field\": \"file_extension\",\n \"id\": \"exclude-txt-files\",\n \"order\": 0,\n \"policy\": \"exclude\",\n \"rule\": \"equals\",\n \"value\": \"txt\"\n },\n {\n \"field\": \"_\",\n \"id\": \"DEFAULT\",\n \"order\": 1,\n \"policy\": \"include\",\n \"rule\": \"regex\",\n \"value\": \".*\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateFiltering({\n connector_id: \"my-g-drive-connector\",\n rules: [\n {\n field: \"file_extension\",\n id: \"exclude-txt-files\",\n order: 0,\n policy: \"exclude\",\n rule: \"equals\",\n value: \"txt\",\n },\n {\n field: \"_\",\n id: \"DEFAULT\",\n order: 1,\n policy: \"include\",\n rule: \"regex\",\n value: \".*\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_filtering(\n connector_id: \"my-g-drive-connector\",\n body: {\n \"rules\": [\n {\n \"field\": \"file_extension\",\n \"id\": \"exclude-txt-files\",\n \"order\": 0,\n \"policy\": \"exclude\",\n \"rule\": \"equals\",\n \"value\": \"txt\"\n },\n {\n \"field\": \"_\",\n \"id\": \"DEFAULT\",\n \"order\": 1,\n \"policy\": \"include\",\n \"rule\": \"regex\",\n \"value\": \".*\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateFiltering([\n \"connector_id\" => \"my-g-drive-connector\",\n \"body\" => [\n \"rules\" => array(\n [\n \"field\" => \"file_extension\",\n \"id\" => \"exclude-txt-files\",\n \"order\" => 0,\n \"policy\" => \"exclude\",\n \"rule\" => \"equals\",\n \"value\" => \"txt\",\n ],\n [\n \"field\" => \"_\",\n \"id\" => \"DEFAULT\",\n \"order\" => 1,\n \"policy\" => \"include\",\n \"rule\" => \"regex\",\n \"value\" => \".*\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"rules\":[{\"field\":\"file_extension\",\"id\":\"exclude-txt-files\",\"order\":0,\"policy\":\"exclude\",\"rule\":\"equals\",\"value\":\"txt\"},{\"field\":\"_\",\"id\":\"DEFAULT\",\"order\":1,\"policy\":\"include\",\"rule\":\"regex\",\"value\":\".*\"}]}' \"$ELASTICSEARCH_URL/_connector/my-g-drive-connector/_filtering\"" + }, + { + "lang": "Java", + "source": "client.connector().updateFiltering(u -> u\n .connectorId(\"my-g-drive-connector\")\n .rules(List.of(FilteringRule.of(f -> f\n .field(\"file_extension\")\n .id(\"exclude-txt-files\")\n .order(0)\n .policy(FilteringPolicy.Exclude)\n .rule(FilteringRuleRule.Equals)\n .value(\"txt\")\n ),FilteringRule.of(f -> f\n .field(\"_\")\n .id(\"DEFAULT\")\n .order(1)\n .policy(FilteringPolicy.Include)\n .rule(FilteringRuleRule.Regex)\n .value(\".*\")\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -14149,6 +17605,36 @@ ], "x-api": "update_index_name.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_index_name\n{\n \"index_name\": \"data-from-my-google-drive\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_index_name(\n connector_id=\"my-connector\",\n index_name=\"data-from-my-google-drive\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateIndexName({\n connector_id: \"my-connector\",\n index_name: \"data-from-my-google-drive\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_index_name(\n connector_id: \"my-connector\",\n body: {\n \"index_name\": \"data-from-my-google-drive\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateIndexName([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"index_name\" => \"data-from-my-google-drive\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_name\":\"data-from-my-google-drive\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_index_name\"" + }, + { + "lang": "Java", + "source": "client.connector().updateIndexName(u -> u\n .connectorId(\"my-connector\")\n .indexName(\"data-from-my-google-drive\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -14235,6 +17721,36 @@ ], "x-api": "update_name.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_name\n{\n \"name\": \"Custom connector\",\n \"description\": \"This is my customized connector\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_name(\n connector_id=\"my-connector\",\n name=\"Custom connector\",\n description=\"This is my customized connector\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateName({\n connector_id: \"my-connector\",\n name: \"Custom connector\",\n description: \"This is my customized connector\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_name(\n connector_id: \"my-connector\",\n body: {\n \"name\": \"Custom connector\",\n \"description\": \"This is my customized connector\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateName([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"name\" => \"Custom connector\",\n \"description\" => \"This is my customized connector\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"Custom connector\",\"description\":\"This is my customized connector\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_name\"" + }, + { + "lang": "Java", + "source": "client.connector().updateName(u -> u\n .connectorId(\"my-connector\")\n .description(\"This is my customized connector\")\n .name(\"Custom connector\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -14402,6 +17918,36 @@ ], "x-api": "update_pipeline.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_pipeline\n{\n \"pipeline\": {\n \"extract_binary_content\": true,\n \"name\": \"my-connector-pipeline\",\n \"reduce_whitespace\": true,\n \"run_ml_inference\": true\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_pipeline(\n connector_id=\"my-connector\",\n pipeline={\n \"extract_binary_content\": True,\n \"name\": \"my-connector-pipeline\",\n \"reduce_whitespace\": True,\n \"run_ml_inference\": True\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updatePipeline({\n connector_id: \"my-connector\",\n pipeline: {\n extract_binary_content: true,\n name: \"my-connector-pipeline\",\n reduce_whitespace: true,\n run_ml_inference: true,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_pipeline(\n connector_id: \"my-connector\",\n body: {\n \"pipeline\": {\n \"extract_binary_content\": true,\n \"name\": \"my-connector-pipeline\",\n \"reduce_whitespace\": true,\n \"run_ml_inference\": true\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updatePipeline([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"pipeline\" => [\n \"extract_binary_content\" => true,\n \"name\" => \"my-connector-pipeline\",\n \"reduce_whitespace\" => true,\n \"run_ml_inference\" => true,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"pipeline\":{\"extract_binary_content\":true,\"name\":\"my-connector-pipeline\",\"reduce_whitespace\":true,\"run_ml_inference\":true}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_pipeline\"" + }, + { + "lang": "Java", + "source": "client.connector().updatePipeline(u -> u\n .connectorId(\"my-connector\")\n .pipeline(p -> p\n .extractBinaryContent(true)\n .name(\"my-connector-pipeline\")\n .reduceWhitespace(true)\n .runMlInference(true)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -14495,6 +18041,36 @@ ], "x-api": "update_scheduling.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_scheduling\n{\n \"scheduling\": {\n \"access_control\": {\n \"enabled\": true,\n \"interval\": \"0 10 0 * * ?\"\n },\n \"full\": {\n \"enabled\": true,\n \"interval\": \"0 20 0 * * ?\"\n },\n \"incremental\": {\n \"enabled\": false,\n \"interval\": \"0 30 0 * * ?\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_scheduling(\n connector_id=\"my-connector\",\n scheduling={\n \"access_control\": {\n \"enabled\": True,\n \"interval\": \"0 10 0 * * ?\"\n },\n \"full\": {\n \"enabled\": True,\n \"interval\": \"0 20 0 * * ?\"\n },\n \"incremental\": {\n \"enabled\": False,\n \"interval\": \"0 30 0 * * ?\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateScheduling({\n connector_id: \"my-connector\",\n scheduling: {\n access_control: {\n enabled: true,\n interval: \"0 10 0 * * ?\",\n },\n full: {\n enabled: true,\n interval: \"0 20 0 * * ?\",\n },\n incremental: {\n enabled: false,\n interval: \"0 30 0 * * ?\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_scheduling(\n connector_id: \"my-connector\",\n body: {\n \"scheduling\": {\n \"access_control\": {\n \"enabled\": true,\n \"interval\": \"0 10 0 * * ?\"\n },\n \"full\": {\n \"enabled\": true,\n \"interval\": \"0 20 0 * * ?\"\n },\n \"incremental\": {\n \"enabled\": false,\n \"interval\": \"0 30 0 * * ?\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateScheduling([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"scheduling\" => [\n \"access_control\" => [\n \"enabled\" => true,\n \"interval\" => \"0 10 0 * * ?\",\n ],\n \"full\" => [\n \"enabled\" => true,\n \"interval\" => \"0 20 0 * * ?\",\n ],\n \"incremental\" => [\n \"enabled\" => false,\n \"interval\" => \"0 30 0 * * ?\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scheduling\":{\"access_control\":{\"enabled\":true,\"interval\":\"0 10 0 * * ?\"},\"full\":{\"enabled\":true,\"interval\":\"0 20 0 * * ?\"},\"incremental\":{\"enabled\":false,\"interval\":\"0 30 0 * * ?\"}}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_scheduling\"" + }, + { + "lang": "Java", + "source": "client.connector().updateScheduling(u -> u\n .connectorId(\"my-connector\")\n .scheduling(s -> s\n .accessControl(a -> a\n .enabled(true)\n .interval(\"0 10 0 * * ?\")\n )\n .full(f -> f\n .enabled(true)\n .interval(\"0 20 0 * * ?\")\n )\n .incremental(i -> i\n .enabled(false)\n .interval(\"0 30 0 * * ?\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -14581,6 +18157,36 @@ ], "x-api": "update_service_type.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_service_type\n{\n \"service_type\": \"sharepoint_online\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_service_type(\n connector_id=\"my-connector\",\n service_type=\"sharepoint_online\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateServiceType({\n connector_id: \"my-connector\",\n service_type: \"sharepoint_online\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_service_type(\n connector_id: \"my-connector\",\n body: {\n \"service_type\": \"sharepoint_online\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateServiceType([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"service_type\" => \"sharepoint_online\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service_type\":\"sharepoint_online\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_service_type\"" + }, + { + "lang": "Java", + "source": "client.connector().updateServiceType(u -> u\n .connectorId(\"my-connector\")\n .serviceType(\"sharepoint_online\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -14671,6 +18277,36 @@ ], "x-api": "update_status.connector", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _connector/my-connector/_status\n{\n \"status\": \"needs_configuration\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.connector.update_status(\n connector_id=\"my-connector\",\n status=\"needs_configuration\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.connector.updateStatus({\n connector_id: \"my-connector\",\n status: \"needs_configuration\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.connector.update_status(\n connector_id: \"my-connector\",\n body: {\n \"status\": \"needs_configuration\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->connector()->updateStatus([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"status\" => \"needs_configuration\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"status\":\"needs_configuration\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_status\"" + }, + { + "lang": "Java", + "source": "client.connector().updateStatus(u -> u\n .connectorId(\"my-connector\")\n .status(ConnectorStatus.NeedsConfiguration)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -14741,7 +18377,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -14898,6 +18534,36 @@ ], "x-api": "count", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_count\n{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.count(\n index=\"my-index-000001\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.count({\n index: \"my-index-000001\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.count(\n index: \"my-index-000001\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->count([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_count\"" + }, + { + "lang": "Java", + "source": "client.count(c -> c\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -14966,7 +18632,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -15123,6 +18789,36 @@ ], "x-api": "count", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_count\n{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.count(\n index=\"my-index-000001\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.count({\n index: \"my-index-000001\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.count(\n index: \"my-index-000001\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->count([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_count\"" + }, + { + "lang": "Java", + "source": "client.count(c -> c\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -15204,7 +18900,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -15361,6 +19057,36 @@ ], "x-api": "count", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_count\n{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.count(\n index=\"my-index-000001\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.count({\n index: \"my-index-000001\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.count(\n index: \"my-index-000001\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->count([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_count\"" + }, + { + "lang": "Java", + "source": "client.count(c -> c\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -15440,7 +19166,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -15597,6 +19323,36 @@ ], "x-api": "count", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_count\n{\n \"query\" : {\n \"term\" : { \"user.id\" : \"kimchy\" }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.count(\n index=\"my-index-000001\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.count({\n index: \"my-index-000001\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.count(\n index: \"my-index-000001\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->count([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_count\"" + }, + { + "lang": "Java", + "source": "client.count(c -> c\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -15724,7 +19480,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -15786,6 +19542,36 @@ ], "x-api": "create", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT my-index-000001/_create/1\n{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.create(\n index=\"my-index-000001\",\n id=\"1\",\n document={\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.create({\n index: \"my-index-000001\",\n id: 1,\n document: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n message: \"GET /search HTTP/1.1 200 1070000\",\n user: {\n id: \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.create(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->create([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"@timestamp\" => \"2099-11-15T13:12:00\",\n \"message\" => \"GET /search HTTP/1.1 200 1070000\",\n \"user\" => [\n \"id\" => \"kimchy\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_create/1\"" + }, + { + "lang": "Java", + "source": "client.create(c -> c\n .id(\"1\")\n .index(\"my-index-000001\")\n .document(JsonData.fromJson(\"{\\\"@timestamp\\\":\\\"2099-11-15T13:12:00\\\",\\\"message\\\":\\\"GET /search HTTP/1.1 200 1070000\\\",\\\"user\\\":{\\\"id\\\":\\\"kimchy\\\"}}\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -15911,7 +19697,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -15973,6 +19759,36 @@ ], "x-api": "create", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT my-index-000001/_create/1\n{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.create(\n index=\"my-index-000001\",\n id=\"1\",\n document={\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.create({\n index: \"my-index-000001\",\n id: 1,\n document: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n message: \"GET /search HTTP/1.1 200 1070000\",\n user: {\n id: \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.create(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->create([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"@timestamp\" => \"2099-11-15T13:12:00\",\n \"message\" => \"GET /search HTTP/1.1 200 1070000\",\n \"user\" => [\n \"id\" => \"kimchy\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_create/1\"" + }, + { + "lang": "Java", + "source": "client.create(c -> c\n .id(\"1\")\n .index(\"my-index-000001\")\n .document(JsonData.fromJson(\"{\\\"@timestamp\\\":\\\"2099-11-15T13:12:00\\\",\\\"message\\\":\\\"GET /search HTTP/1.1 200 1070000\\\",\\\"user\\\":{\\\"id\\\":\\\"kimchy\\\"}}\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -16059,6 +19875,36 @@ ], "x-api": "import_dangling_index.dangling_indices", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true\n" + }, + { + "lang": "Python", + "source": "resp = client.dangling_indices.import_dangling_index(\n index_uuid=\"zmM4e0JtBkeUjiHD-MihPQ\",\n accept_data_loss=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.danglingIndices.importDanglingIndex({\n index_uuid: \"zmM4e0JtBkeUjiHD-MihPQ\",\n accept_data_loss: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.dangling_indices.import_dangling_index(\n index_uuid: \"zmM4e0JtBkeUjiHD-MihPQ\",\n accept_data_loss: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->danglingIndices()->importDanglingIndex([\n \"index_uuid\" => \"zmM4e0JtBkeUjiHD-MihPQ\",\n \"accept_data_loss\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true\"" + }, + { + "lang": "Java", + "source": "client.danglingIndices().importDanglingIndex(i -> i\n .acceptDataLoss(true)\n .indexUuid(\"zmM4e0JtBkeUjiHD-MihPQ\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -16137,6 +19983,36 @@ ], "x-api": "delete_dangling_index.dangling_indices", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_dangling/?accept_data_loss=true\n" + }, + { + "lang": "Python", + "source": "resp = client.dangling_indices.delete_dangling_index(\n index_uuid=\"\",\n accept_data_loss=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.danglingIndices.deleteDanglingIndex({\n index_uuid: \"\",\n accept_data_loss: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.dangling_indices.delete_dangling_index(\n index_uuid: \"\",\n accept_data_loss: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->danglingIndices()->deleteDanglingIndex([\n \"index_uuid\" => \"\",\n \"accept_data_loss\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_dangling/?accept_data_loss=true\"" + }, + { + "lang": "Java", + "source": "client.danglingIndices().deleteDanglingIndex(d -> d\n .acceptDataLoss(true)\n .indexUuid(\"\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -16190,6 +20066,36 @@ ], "x-api": "list_dangling_indices.dangling_indices", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_dangling\n" + }, + { + "lang": "Python", + "source": "resp = client.dangling_indices.list_dangling_indices()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.danglingIndices.listDanglingIndices();" + }, + { + "lang": "Ruby", + "source": "response = client.dangling_indices.list_dangling_indices" + }, + { + "lang": "PHP", + "source": "$resp = $client->danglingIndices()->listDanglingIndices();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_dangling\"" + }, + { + "lang": "Java", + "source": "client.danglingIndices().listDanglingIndices();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -16333,7 +20239,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -16379,6 +20285,36 @@ ], "x-api": "get", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_doc/1?stored_fields=tags,counter\n" + }, + { + "lang": "Python", + "source": "resp = client.get(\n index=\"my-index-000001\",\n id=\"1\",\n stored_fields=\"tags,counter\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.get({\n index: \"my-index-000001\",\n id: 1,\n stored_fields: \"tags,counter\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.get(\n index: \"my-index-000001\",\n id: \"1\",\n stored_fields: \"tags,counter\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->get([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"stored_fields\" => \"tags,counter\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_doc/1?stored_fields=tags,counter\"" + }, + { + "lang": "Java", + "source": "client.get(g -> g\n .id(\"1\")\n .index(\"my-index-000001\")\n .storedFields(List.of(\"tags\",\"counter\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -16454,7 +20390,7 @@ { "in": "query", "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", + "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.\n\nSupported values include:\n - `index`: Overwrite any documents that already exist.\n - `create`: Only index documents that do not already exist.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.OpType" @@ -16514,7 +20450,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -16608,6 +20544,36 @@ ], "x-api": "index", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-000001/_doc/\n{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.index(\n index=\"my-index-000001\",\n document={\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.index({\n index: \"my-index-000001\",\n document: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n message: \"GET /search HTTP/1.1 200 1070000\",\n user: {\n id: \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.index(\n index: \"my-index-000001\",\n body: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->index([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"@timestamp\" => \"2099-11-15T13:12:00\",\n \"message\" => \"GET /search HTTP/1.1 200 1070000\",\n \"user\" => [\n \"id\" => \"kimchy\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_doc/\"" + }, + { + "lang": "Java", + "source": "client.index(i -> i\n .index(\"my-index-000001\")\n .document(JsonData.fromJson(\"{\\\"@timestamp\\\":\\\"2099-11-15T13:12:00\\\",\\\"message\\\":\\\"GET /search HTTP/1.1 200 1070000\\\",\\\"user\\\":{\\\"id\\\":\\\"kimchy\\\"}}\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -16683,7 +20649,7 @@ { "in": "query", "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", + "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.\n\nSupported values include:\n - `index`: Overwrite any documents that already exist.\n - `create`: Only index documents that do not already exist.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.OpType" @@ -16743,7 +20709,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -16837,6 +20803,36 @@ ], "x-api": "index", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-000001/_doc/\n{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.index(\n index=\"my-index-000001\",\n document={\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.index({\n index: \"my-index-000001\",\n document: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n message: \"GET /search HTTP/1.1 200 1070000\",\n user: {\n id: \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.index(\n index: \"my-index-000001\",\n body: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->index([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"@timestamp\" => \"2099-11-15T13:12:00\",\n \"message\" => \"GET /search HTTP/1.1 200 1070000\",\n \"user\" => [\n \"id\" => \"kimchy\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_doc/\"" + }, + { + "lang": "Java", + "source": "client.index(i -> i\n .index(\"my-index-000001\")\n .document(JsonData.fromJson(\"{\\\"@timestamp\\\":\\\"2099-11-15T13:12:00\\\",\\\"message\\\":\\\"GET /search HTTP/1.1 200 1070000\\\",\\\"user\\\":{\\\"id\\\":\\\"kimchy\\\"}}\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -16937,7 +20933,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -16982,6 +20978,36 @@ ], "x-api": "delete", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /my-index-000001/_doc/1\n" + }, + { + "lang": "Python", + "source": "resp = client.delete(\n index=\"my-index-000001\",\n id=\"1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.delete({\n index: \"my-index-000001\",\n id: 1,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.delete(\n index: \"my-index-000001\",\n id: \"1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->delete([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_doc/1\"" + }, + { + "lang": "Java", + "source": "client.delete(d -> d\n .id(\"1\")\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -17112,7 +21138,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -17134,6 +21160,36 @@ ], "x-api": "exists", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "HEAD my-index-000001/_doc/0\n" + }, + { + "lang": "Python", + "source": "resp = client.exists(\n index=\"my-index-000001\",\n id=\"0\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.exists({\n index: \"my-index-000001\",\n id: 0,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.exists(\n index: \"my-index-000001\",\n id: \"0\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->exists([\n \"index\" => \"my-index-000001\",\n \"id\" => \"0\",\n]);" + }, + { + "lang": "curl", + "source": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_doc/0\"" + }, + { + "lang": "Java", + "source": "client.exists(e -> e\n .id(\"0\")\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -17195,7 +21251,7 @@ { "in": "query", "name": "conflicts", - "description": "What to do if delete by query hits version conflicts: `abort` or `proceed`.", + "description": "What to do if delete by query hits version conflicts: `abort` or `proceed`.\n\nSupported values include:\n - `abort`: Stop reindexing if there are conflicts.\n - `proceed`: Continue reindexing even if there are conflicts.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Conflicts" @@ -17225,7 +21281,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -17365,7 +21421,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.\nAvailable options include `query_then_fetch` and `dfs_query_then_fetch`.", + "description": "The type of the search operation.\nAvailable options include `query_then_fetch` and `dfs_query_then_fetch`.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -17648,6 +21704,36 @@ ], "x-api": "delete_by_query", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001,my-index-000002/_delete_by_query\n{\n \"query\": {\n \"match_all\": {}\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.delete_by_query(\n index=\"my-index-000001,my-index-000002\",\n query={\n \"match_all\": {}\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.deleteByQuery({\n index: \"my-index-000001,my-index-000002\",\n query: {\n match_all: {},\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.delete_by_query(\n index: \"my-index-000001,my-index-000002\",\n body: {\n \"query\": {\n \"match_all\": {}\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->deleteByQuery([\n \"index\" => \"my-index-000001,my-index-000002\",\n \"body\" => [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match_all\":{}}}' \"$ELASTICSEARCH_URL/my-index-000001,my-index-000002/_delete_by_query\"" + }, + { + "lang": "Java", + "source": "client.deleteByQuery(d -> d\n .index(List.of(\"my-index-000001\",\"my-index-000002\"))\n .query(q -> q\n .matchAll(m -> m)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -17706,6 +21792,36 @@ ], "x-api": "delete_by_query_rethrottle", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\n" + }, + { + "lang": "Python", + "source": "resp = client.delete_by_query_rethrottle(\n task_id=\"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second=\"-1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.deleteByQueryRethrottle({\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.delete_by_query_rethrottle(\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->deleteByQueryRethrottle([\n \"task_id\" => \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n \"requests_per_second\" => \"-1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\"" + }, + { + "lang": "Java", + "source": "client.deleteByQueryRethrottle(d -> d\n .requestsPerSecond(-1.0F)\n .taskId(\"r1A2WoRbTwKZ516z6NEs5A:36619\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -17789,6 +21905,36 @@ ], "x-api": "get_script", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _scripts/my-search-template\n" + }, + { + "lang": "Python", + "source": "resp = client.get_script(\n id=\"my-search-template\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.getScript({\n id: \"my-search-template\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.get_script(\n id: \"my-search-template\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->getScript([\n \"id\" => \"my-search-template\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + }, + { + "lang": "Java", + "source": "client.getScript(g -> g\n .id(\"my-search-template\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -17907,6 +22053,32 @@ ], "x-api": "put_script", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _scripts/my-search-template\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.put_script(\n id=\"my-search-template\",\n script={\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.putScript({\n id: \"my-search-template\",\n script: {\n lang: \"mustache\",\n source: {\n query: {\n match: {\n message: \"{{query_string}}\",\n },\n },\n from: \"{{from}}\",\n size: \"{{size}}\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.put_script(\n id: \"my-search-template\",\n body: {\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->putScript([\n \"id\" => \"my-search-template\",\n \"body\" => [\n \"script\" => [\n \"lang\" => \"mustache\",\n \"source\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"{{query_string}}\",\n ],\n ],\n \"from\" => \"{{from}}\",\n \"size\" => \"{{size}}\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"lang\":\"mustache\",\"source\":{\"query\":{\"match\":{\"message\":\"{{query_string}}\"}},\"from\":\"{{from}}\",\"size\":\"{{size}}\"}}}' \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18025,6 +22197,32 @@ ], "x-api": "put_script", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _scripts/my-search-template\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.put_script(\n id=\"my-search-template\",\n script={\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.putScript({\n id: \"my-search-template\",\n script: {\n lang: \"mustache\",\n source: {\n query: {\n match: {\n message: \"{{query_string}}\",\n },\n },\n from: \"{{from}}\",\n size: \"{{size}}\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.put_script(\n id: \"my-search-template\",\n body: {\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->putScript([\n \"id\" => \"my-search-template\",\n \"body\" => [\n \"script\" => [\n \"lang\" => \"mustache\",\n \"source\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"{{query_string}}\",\n ],\n ],\n \"from\" => \"{{from}}\",\n \"size\" => \"{{size}}\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"lang\":\"mustache\",\"source\":{\"query\":{\"match\":{\"message\":\"{{query_string}}\"}},\"from\":\"{{from}}\",\"size\":\"{{size}}\"}}}' \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18093,6 +22291,36 @@ ], "x-api": "delete_script", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _scripts/my-search-template\n" + }, + { + "lang": "Python", + "source": "resp = client.delete_script(\n id=\"my-search-template\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.deleteScript({\n id: \"my-search-template\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.delete_script(\n id: \"my-search-template\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->deleteScript([\n \"id\" => \"my-search-template\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + }, + { + "lang": "Java", + "source": "client.deleteScript(d -> d\n .id(\"my-search-template\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18161,6 +22389,36 @@ ], "x-api": "get_policy.enrich", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_enrich/policy/my-policy\n" + }, + { + "lang": "Python", + "source": "resp = client.enrich.get_policy(\n name=\"my-policy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.enrich.getPolicy({\n name: \"my-policy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.enrich.get_policy(\n name: \"my-policy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->enrich()->getPolicy([\n \"name\" => \"my-policy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/policy/my-policy\"" + }, + { + "lang": "Java", + "source": "client.enrich().getPolicy(g -> g\n .name(\"my-policy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18258,6 +22516,36 @@ ], "x-api": "put_policy.enrich", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_enrich/policy/postal_policy\n{\n \"geo_match\": {\n \"indices\": \"postal_codes\",\n \"match_field\": \"location\",\n \"enrich_fields\": [ \"location\", \"postal_code\" ]\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.enrich.put_policy(\n name=\"postal_policy\",\n geo_match={\n \"indices\": \"postal_codes\",\n \"match_field\": \"location\",\n \"enrich_fields\": [\n \"location\",\n \"postal_code\"\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.enrich.putPolicy({\n name: \"postal_policy\",\n geo_match: {\n indices: \"postal_codes\",\n match_field: \"location\",\n enrich_fields: [\"location\", \"postal_code\"],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.enrich.put_policy(\n name: \"postal_policy\",\n body: {\n \"geo_match\": {\n \"indices\": \"postal_codes\",\n \"match_field\": \"location\",\n \"enrich_fields\": [\n \"location\",\n \"postal_code\"\n ]\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->enrich()->putPolicy([\n \"name\" => \"postal_policy\",\n \"body\" => [\n \"geo_match\" => [\n \"indices\" => \"postal_codes\",\n \"match_field\" => \"location\",\n \"enrich_fields\" => array(\n \"location\",\n \"postal_code\",\n ),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"geo_match\":{\"indices\":\"postal_codes\",\"match_field\":\"location\",\"enrich_fields\":[\"location\",\"postal_code\"]}}' \"$ELASTICSEARCH_URL/_enrich/policy/postal_policy\"" + }, + { + "lang": "Java", + "source": "client.enrich().putPolicy(p -> p\n .geoMatch(g -> g\n .enrichFields(List.of(\"location\",\"postal_code\"))\n .indices(\"postal_codes\")\n .matchField(\"location\")\n )\n .name(\"postal_policy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18313,6 +22601,36 @@ ], "x-api": "delete_policy.enrich", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_enrich/policy/my-policy\n" + }, + { + "lang": "Python", + "source": "resp = client.enrich.delete_policy(\n name=\"my-policy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.enrich.deletePolicy({\n name: \"my-policy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.enrich.delete_policy(\n name: \"my-policy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->enrich()->deletePolicy([\n \"name\" => \"my-policy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/policy/my-policy\"" + }, + { + "lang": "Java", + "source": "client.enrich().deletePolicy(d -> d\n .name(\"my-policy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18396,6 +22714,36 @@ ], "x-api": "execute_policy.enrich", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_enrich/policy/my-policy/_execute?wait_for_completion=false\n" + }, + { + "lang": "Python", + "source": "resp = client.enrich.execute_policy(\n name=\"my-policy\",\n wait_for_completion=False,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.enrich.executePolicy({\n name: \"my-policy\",\n wait_for_completion: \"false\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.enrich.execute_policy(\n name: \"my-policy\",\n wait_for_completion: \"false\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->enrich()->executePolicy([\n \"name\" => \"my-policy\",\n \"wait_for_completion\" => \"false\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/policy/my-policy/_execute?wait_for_completion=false\"" + }, + { + "lang": "Java", + "source": "client.enrich().executePolicy(e -> e\n .name(\"my-policy\")\n .waitForCompletion(false)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18453,6 +22801,36 @@ ], "x-api": "get_policy.enrich", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_enrich/policy/my-policy\n" + }, + { + "lang": "Python", + "source": "resp = client.enrich.get_policy(\n name=\"my-policy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.enrich.getPolicy({\n name: \"my-policy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.enrich.get_policy(\n name: \"my-policy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->enrich()->getPolicy([\n \"name\" => \"my-policy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/policy/my-policy\"" + }, + { + "lang": "Java", + "source": "client.enrich().getPolicy(g -> g\n .name(\"my-policy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18527,6 +22905,36 @@ ], "x-api": "stats.enrich", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_enrich/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.enrich.stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.enrich.stats();" + }, + { + "lang": "Ruby", + "source": "response = client.enrich.stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->enrich()->stats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/_stats\"" + }, + { + "lang": "Java", + "source": "client.enrich().stats(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18594,6 +23002,36 @@ ], "x-api": "get.eql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=2s\n" + }, + { + "lang": "Python", + "source": "resp = client.eql.get(\n id=\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout=\"2s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.eql.get({\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout: \"2s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.eql.get(\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout: \"2s\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->eql()->get([\n \"id\" => \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"wait_for_completion_timeout\" => \"2s\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=2s\"" + }, + { + "lang": "Java", + "source": "client.eql().get(g -> g\n .id(\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\")\n .waitForCompletionTimeout(w -> w\n .offset(2)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18639,6 +23077,36 @@ ], "x-api": "delete.eql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\n" + }, + { + "lang": "Python", + "source": "resp = client.eql.delete(\n id=\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.eql.delete({\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.eql.delete(\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->eql()->delete([\n \"id\" => \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\"" + }, + { + "lang": "Java", + "source": "client.eql().delete(d -> d\n .id(\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18735,6 +23203,36 @@ ], "x-api": "get_status.eql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_eql/search/status/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\n" + }, + { + "lang": "Python", + "source": "resp = client.eql.get_status(\n id=\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.eql.getStatus({\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.eql.get_status(\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->eql()->getStatus([\n \"id\" => \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_eql/search/status/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\"" + }, + { + "lang": "Java", + "source": "client.eql().getStatus(g -> g\n .id(\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -18801,7 +23299,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -18971,6 +23469,7 @@ ] }, "result_position": { + "description": "\n\nSupported values include:\n - `tail`: Return the most recent matches, similar to the Unix tail command.\n - `head`: Return the earliest matches, similar to the Unix head command.\n\n", "default": "tail", "allOf": [ { @@ -19038,6 +23537,36 @@ ], "x-api": "search.eql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-data-stream/_eql/search\n{\n \"query\": \"\"\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \"\"\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.eql.search(\n index=\"my-data-stream\",\n query=\"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.eql.search({\n index: \"my-data-stream\",\n query:\n '\\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\\n ',\n});" + }, + { + "lang": "Ruby", + "source": "response = client.eql.search(\n index: \"my-data-stream\",\n body: {\n \"query\": \"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->eql()->search([\n \"index\" => \"my-data-stream\",\n \"body\" => [\n \"query\" => \"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \"}' \"$ELASTICSEARCH_URL/my-data-stream/_eql/search\"" + }, + { + "lang": "Java", + "source": "client.eql().search(s -> s\n .index(\"my-data-stream\")\n .query(\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -19102,7 +23631,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -19272,6 +23801,7 @@ ] }, "result_position": { + "description": "\n\nSupported values include:\n - `tail`: Return the most recent matches, similar to the Unix tail command.\n - `head`: Return the earliest matches, similar to the Unix head command.\n\n", "default": "tail", "allOf": [ { @@ -19339,6 +23869,36 @@ ], "x-api": "search.eql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-data-stream/_eql/search\n{\n \"query\": \"\"\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \"\"\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.eql.search(\n index=\"my-data-stream\",\n query=\"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.eql.search({\n index: \"my-data-stream\",\n query:\n '\\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\\n ',\n});" + }, + { + "lang": "Ruby", + "source": "response = client.eql.search(\n index: \"my-data-stream\",\n body: {\n \"query\": \"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->eql()->search([\n \"index\" => \"my-data-stream\",\n \"body\" => [\n \"query\" => \"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \"}' \"$ELASTICSEARCH_URL/my-data-stream/_eql/search\"" + }, + { + "lang": "Java", + "source": "client.eql().search(s -> s\n .index(\"my-data-stream\")\n .query(\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -19522,6 +24082,32 @@ ], "x-api": "async_query.esql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_query/async\n{\n \"query\": \"\"\"\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \"\"\",\n \"wait_for_completion_timeout\": \"2s\",\n \"include_ccs_metadata\": true\n}" + }, + { + "lang": "Python", + "source": "resp = client.esql.async_query(\n query=\"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n wait_for_completion_timeout=\"2s\",\n include_ccs_metadata=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.esql.asyncQuery({\n query:\n \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n wait_for_completion_timeout: \"2s\",\n include_ccs_metadata: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.esql.async_query(\n body: {\n \"query\": \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n \"wait_for_completion_timeout\": \"2s\",\n \"include_ccs_metadata\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->esql()->asyncQuery([\n \"body\" => [\n \"query\" => \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n \"wait_for_completion_timeout\" => \"2s\",\n \"include_ccs_metadata\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\"wait_for_completion_timeout\":\"2s\",\"include_ccs_metadata\":true}' \"$ELASTICSEARCH_URL/_query/async\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -19614,6 +24200,32 @@ ], "x-api": "async_query_get.esql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=30s\n" + }, + { + "lang": "Python", + "source": "resp = client.esql.async_query_get(\n id=\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout=\"30s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.esql.asyncQueryGet({\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout: \"30s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.esql.async_query_get(\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout: \"30s\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->esql()->asyncQueryGet([\n \"id\" => \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"wait_for_completion_timeout\" => \"30s\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=30s\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -19664,6 +24276,32 @@ ], "x-api": "async_query_delete.esql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_query/async/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\n" + }, + { + "lang": "Python", + "source": "resp = client.esql.async_query_delete(\n id=\"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.esql.asyncQueryDelete({\n id: \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.esql.async_query_delete(\n id: \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->esql()->asyncQueryDelete([\n \"id\" => \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query/async/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -19725,6 +24363,32 @@ ], "x-api": "async_query_stop.esql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=/stop\n" + }, + { + "lang": "Python", + "source": "resp = client.esql.async_query_stop(\n id=\"FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.esql.asyncQueryStop({\n id: \"FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.esql.async_query_stop(\n id: \"FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->esql()->asyncQueryStop([\n \"id\" => \"FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=/stop\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -20024,6 +24688,36 @@ ], "x-api": "query.esql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_query\n{\n \"query\": \"\"\"\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \"\"\",\n \"include_ccs_metadata\": true\n}" + }, + { + "lang": "Python", + "source": "resp = client.esql.query(\n query=\"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n include_ccs_metadata=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.esql.query({\n query:\n \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n include_ccs_metadata: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.esql.query(\n body: {\n \"query\": \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n \"include_ccs_metadata\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->esql()->query([\n \"body\" => [\n \"query\" => \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n \"include_ccs_metadata\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\"include_ccs_metadata\":true}' \"$ELASTICSEARCH_URL/_query\"" + }, + { + "lang": "Java", + "source": "client.esql().query(q -> q\n .includeCcsMetadata(true)\n .query(\"\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -20150,7 +24844,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -20179,6 +24873,36 @@ ], "x-api": "get_source", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_source/1\n" + }, + { + "lang": "Python", + "source": "resp = client.get_source(\n index=\"my-index-000001\",\n id=\"1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.getSource({\n index: \"my-index-000001\",\n id: 1,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.get_source(\n index: \"my-index-000001\",\n id: \"1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->getSource([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_source/1\"" + }, + { + "lang": "Java", + "source": "client.getSource(g -> g\n .id(\"1\")\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -20303,7 +25027,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -20328,6 +25052,36 @@ ], "x-api": "exists_source", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "HEAD my-index-000001/_source/1\n" + }, + { + "lang": "Python", + "source": "resp = client.exists_source(\n index=\"my-index-000001\",\n id=\"1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.existsSource({\n index: \"my-index-000001\",\n id: 1,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.exists_source(\n index: \"my-index-000001\",\n id: \"1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->existsSource([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n]);" + }, + { + "lang": "curl", + "source": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_source/1\"" + }, + { + "lang": "Java", + "source": "client.existsSource(e -> e\n .id(\"1\")\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -20579,6 +25333,36 @@ ], "x-api": "explain", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_explain/0\n{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.explain(\n index=\"my-index-000001\",\n id=\"0\",\n query={\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.explain({\n index: \"my-index-000001\",\n id: 0,\n query: {\n match: {\n message: \"elasticsearch\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.explain(\n index: \"my-index-000001\",\n id: \"0\",\n body: {\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->explain([\n \"index\" => \"my-index-000001\",\n \"id\" => \"0\",\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"elasticsearch\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match\":{\"message\":\"elasticsearch\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_explain/0\"" + }, + { + "lang": "Java", + "source": "client.explain(e -> e\n .id(\"0\")\n .index(\"my-index-000001\")\n .query(q -> q\n .match(m -> m\n .field(\"message\")\n .query(FieldValue.of(\"elasticsearch\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -20828,6 +25612,36 @@ ], "x-api": "explain", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_explain/0\n{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.explain(\n index=\"my-index-000001\",\n id=\"0\",\n query={\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.explain({\n index: \"my-index-000001\",\n id: 0,\n query: {\n match: {\n message: \"elasticsearch\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.explain(\n index: \"my-index-000001\",\n id: \"0\",\n body: {\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->explain([\n \"index\" => \"my-index-000001\",\n \"id\" => \"0\",\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"elasticsearch\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match\":{\"message\":\"elasticsearch\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_explain/0\"" + }, + { + "lang": "Java", + "source": "client.explain(e -> e\n .id(\"0\")\n .index(\"my-index-000001\")\n .query(q -> q\n .match(m -> m\n .field(\"message\")\n .query(FieldValue.of(\"elasticsearch\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -20896,6 +25710,36 @@ ], "x-api": "get_features.features", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _features\n" + }, + { + "lang": "Python", + "source": "resp = client.features.get_features()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.features.getFeatures();" + }, + { + "lang": "Ruby", + "source": "response = client.features.get_features" + }, + { + "lang": "PHP", + "source": "$resp = $client->features()->getFeatures();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_features\"" + }, + { + "lang": "Java", + "source": "client.features().getFeatures(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -20959,6 +25803,36 @@ ], "x-api": "reset_features.features", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_features/_reset\n" + }, + { + "lang": "Python", + "source": "resp = client.features.reset_features()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.features.resetFeatures();" + }, + { + "lang": "Ruby", + "source": "response = client.features.reset_features" + }, + { + "lang": "PHP", + "source": "$resp = $client->features()->resetFeatures();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_features/_reset\"" + }, + { + "lang": "Java", + "source": "client.features().resetFeatures(r -> r);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -20989,7 +25863,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The 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 comma-separated values, such as `open,hidden`.", + "description": "The 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 comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -21173,246 +26047,51 @@ ], "x-api": "field_caps", "x-category": "unknown", - "x-metaTags": [ - { - "content": "Elasticsearch", - "name": "product_name" - } - ] - }, - "post": { - "tags": [ - "search" - ], - "summary": "Get the field capabilities", - "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", - "operationId": "field-caps-1", - "parameters": [ - { - "in": "query", - "name": "allow_no_indices", - "description": "If false, the request returns an error if any wildcard expression, index alias,\nor `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, + "x-codeSamples": [ { - "in": "query", - "name": "expand_wildcards", - "description": "The 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 comma-separated values, such as `open,hidden`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" + "lang": "Console", + "source": "POST my-index-*/_field_caps?fields=rating\n{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" }, { - "in": "query", - "name": "fields", - "description": "A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" + "lang": "Python", + "source": "resp = client.field_caps(\n index=\"my-index-*\",\n fields=\"rating\",\n index_filter={\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n },\n)" }, { - "in": "query", - "name": "ignore_unavailable", - "description": "If `true`, missing or closed indices are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "lang": "JavaScript", + "source": "const response = await client.fieldCaps({\n index: \"my-index-*\",\n fields: \"rating\",\n index_filter: {\n range: {\n \"@timestamp\": {\n gte: \"2018\",\n },\n },\n },\n});" }, { - "in": "query", - "name": "include_unmapped", - "description": "If true, unmapped fields are included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "lang": "Ruby", + "source": "response = client.field_caps(\n index: \"my-index-*\",\n fields: \"rating\",\n body: {\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n }\n)" }, { - "in": "query", - "name": "filters", - "description": "A comma-separated list of filters to apply to the response.", - "deprecated": false, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "x-state": "Generally available; Added in 8.2.0", - "style": "form" + "lang": "PHP", + "source": "$resp = $client->fieldCaps([\n \"index\" => \"my-index-*\",\n \"fields\" => \"rating\",\n \"body\" => [\n \"index_filter\" => [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"2018\",\n ],\n ],\n ],\n ],\n]);" }, { - "in": "query", - "name": "types", - "description": "A comma-separated list of field types to include.\nAny fields that do not match one of these types will be excluded from the results.\nIt defaults to empty, meaning that all field types are returned.", - "deprecated": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-state": "Generally available; Added in 8.2.0", - "style": "form" + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_filter\":{\"range\":{\"@timestamp\":{\"gte\":\"2018\"}}}}' \"$ELASTICSEARCH_URL/my-index-*/_field_caps?fields=rating\"" }, { - "in": "query", - "name": "include_empty_fields", - "description": "If false, empty fields are not included in the response.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "x-state": "Generally available; Added in 8.13.0", - "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "fields": { - "description": "A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", - "x-state": "Generally available; Added in 8.5.0", - "allOf": [ - { - "$ref": "#/components/schemas/_types.Fields" - } - ] - }, - "index_filter": { - "description": "Filter indices if the provided query rewrites to `match_none` on every shard.\n\nIMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to `match_none` instead of fully running the request.\nFor instance a range query over a date field can rewrite to `match_none` if all documents within a shard (including deleted documents) are outside of the provided range.\nHowever, not all queries can rewrite to `match_none` so this API may return an index even if the provided filter matches no document.", - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - ] - }, - "runtime_mappings": { - "description": "Define ad-hoc runtime fields in the request similar to the way it is done in search requests.\nThese fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.", - "x-state": "Generally available; Added in 7.12.0", - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - } - ] - } - } - }, - "examples": { - "FieldCapabilitiesRequestExample1": { - "description": "Run `POST my-index-*/_field_caps?fields=rating` to get field capabilities and filter indices with a query. Indices that rewrite the provided filter to `match_none` on every shard will be filtered from the response.\n", - "value": "{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "indices": { - "description": "The list of indices where this field has the same type family, or null if all indices have the same type family for the field.", - "allOf": [ - { - "$ref": "#/components/schemas/_types.Indices" - } - ] - }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.field_caps.FieldCapability" - } - } - } - }, - "required": [ - "indices", - "fields" - ] - }, - "examples": { - "FieldCapabilitiesResponseExample1": { - "summary": "Get two fields", - "description": "A successful response from `GET _field_caps?fields=rating,title`. The field `rating` is defined as a long in `index1` and `index2` and as a `keyword` in `index3` and `index4`. The field `rating` is not aggregatable in `index1`. The field `rating` is not searchable in `index4`. The field `title` is defined as text in all indices.\n", - "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" - }, - "FieldCapabilitiesResponseExample2": { - "summary": "Get unmapped fields", - "description": "A successful response from `GET _field_caps?fields=rating,title&include_unmapped`. The response contains an entry for each field that is present in some indices but not all. For example, the `rating` and `title` fields are unmapped in `index5`.\n", - "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" - } - } - } - } + "lang": "Java", + "source": "client.fieldCaps(f -> f\n .fields(\"rating\")\n .index(\"my-index-*\")\n .indexFilter(i -> i\n .range(r -> r\n .untyped(u -> u\n .field(\"@timestamp\")\n .gte(JsonData.fromJson(\"\\\"2018\\\"\"))\n )\n )\n )\n);\n" } - }, - "x-state": "Generally available; Added in 5.4.0", - "x-variations": [ - "
\n GET\n /_field_caps\n
\n ", - "
\n POST\n /_field_caps\n
\n " ], - "x-req-auth": [ - "Index privileges: `view_index_metadata`,`read`\n" - ], - "x-api": "field_caps", - "x-category": "unknown", "x-metaTags": [ { "content": "Elasticsearch", "name": "product_name" } ] - } - }, - "/{index}/_field_caps": { - "get": { + }, + "post": { "tags": [ "search" ], "summary": "Get the field capabilities", "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", - "operationId": "field-caps-2", + "operationId": "field-caps-1", "parameters": [ - { - "in": "path", - "name": "index", - "description": "A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, { "in": "query", "name": "allow_no_indices", @@ -21426,7 +26105,262 @@ { "in": "query", "name": "expand_wildcards", - "description": "The 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 comma-separated values, such as `open,hidden`.", + "description": "The 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 comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "fields", + "description": "A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `true`, missing or closed indices are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "include_unmapped", + "description": "If true, unmapped fields are included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "filters", + "description": "A comma-separated list of filters to apply to the response.", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "x-state": "Generally available; Added in 8.2.0", + "style": "form" + }, + { + "in": "query", + "name": "types", + "description": "A comma-separated list of field types to include.\nAny fields that do not match one of these types will be excluded from the results.\nIt defaults to empty, meaning that all field types are returned.", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "x-state": "Generally available; Added in 8.2.0", + "style": "form" + }, + { + "in": "query", + "name": "include_empty_fields", + "description": "If false, empty fields are not included in the response.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "x-state": "Generally available; Added in 8.13.0", + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fields": { + "description": "A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.", + "x-state": "Generally available; Added in 8.5.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Fields" + } + ] + }, + "index_filter": { + "description": "Filter indices if the provided query rewrites to `match_none` on every shard.\n\nIMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to `match_none` instead of fully running the request.\nFor instance a range query over a date field can rewrite to `match_none` if all documents within a shard (including deleted documents) are outside of the provided range.\nHowever, not all queries can rewrite to `match_none` so this API may return an index even if the provided filter matches no document.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "runtime_mappings": { + "description": "Define ad-hoc runtime fields in the request similar to the way it is done in search requests.\nThese fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.", + "x-state": "Generally available; Added in 7.12.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + ] + } + } + }, + "examples": { + "FieldCapabilitiesRequestExample1": { + "description": "Run `POST my-index-*/_field_caps?fields=rating` to get field capabilities and filter indices with a query. Indices that rewrite the provided filter to `match_none` on every shard will be filtered from the response.\n", + "value": "{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "indices": { + "description": "The list of indices where this field has the same type family, or null if all indices have the same type family for the field.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Indices" + } + ] + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_global.field_caps.FieldCapability" + } + } + } + }, + "required": [ + "indices", + "fields" + ] + }, + "examples": { + "FieldCapabilitiesResponseExample1": { + "summary": "Get two fields", + "description": "A successful response from `GET _field_caps?fields=rating,title`. The field `rating` is defined as a long in `index1` and `index2` and as a `keyword` in `index3` and `index4`. The field `rating` is not aggregatable in `index1`. The field `rating` is not searchable in `index4`. The field `title` is defined as text in all indices.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + }, + "FieldCapabilitiesResponseExample2": { + "summary": "Get unmapped fields", + "description": "A successful response from `GET _field_caps?fields=rating,title&include_unmapped`. The response contains an entry for each field that is present in some indices but not all. For example, the `rating` and `title` fields are unmapped in `index5`.\n", + "value": "{\n \"indices\": [ \"index1\", \"index2\", \"index3\", \"index4\", \"index5\" ],\n \"fields\": {\n \"rating\": { \n \"long\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [ \"index1\", \"index2\" ],\n \"non_aggregatable_indices\": [ \"index1\" ] \n },\n \"keyword\": {\n \"metadata_field\": false,\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [ \"index3\", \"index4\" ],\n \"non_searchable_indices\": [ \"index4\" ] \n }\n },\n \"title\": { \n \"text\": {\n \"metadata_field\": false,\n \"searchable\": true,\n \"aggregatable\": false\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.4.0", + "x-variations": [ + "
\n GET\n /_field_caps\n
\n ", + "
\n POST\n /_field_caps\n
\n " + ], + "x-req-auth": [ + "Index privileges: `view_index_metadata`,`read`\n" + ], + "x-api": "field_caps", + "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-*/_field_caps?fields=rating\n{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.field_caps(\n index=\"my-index-*\",\n fields=\"rating\",\n index_filter={\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.fieldCaps({\n index: \"my-index-*\",\n fields: \"rating\",\n index_filter: {\n range: {\n \"@timestamp\": {\n gte: \"2018\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.field_caps(\n index: \"my-index-*\",\n fields: \"rating\",\n body: {\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->fieldCaps([\n \"index\" => \"my-index-*\",\n \"fields\" => \"rating\",\n \"body\" => [\n \"index_filter\" => [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"2018\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_filter\":{\"range\":{\"@timestamp\":{\"gte\":\"2018\"}}}}' \"$ELASTICSEARCH_URL/my-index-*/_field_caps?fields=rating\"" + }, + { + "lang": "Java", + "source": "client.fieldCaps(f -> f\n .fields(\"rating\")\n .index(\"my-index-*\")\n .indexFilter(i -> i\n .range(r -> r\n .untyped(u -> u\n .field(\"@timestamp\")\n .gte(JsonData.fromJson(\"\\\"2018\\\"\"))\n )\n )\n )\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_field_caps": { + "get": { + "tags": [ + "search" + ], + "summary": "Get the field capabilities", + "description": "Get information about the capabilities of fields among multiple indices.\n\nFor data streams, the API returns field capabilities among the stream’s backing indices.\nIt returns runtime fields like any other field.\nFor example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.", + "operationId": "field-caps-2", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If false, the request returns an error if any wildcard expression, index alias,\nor `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request\ntargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The 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 comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -21610,6 +26544,36 @@ ], "x-api": "field_caps", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-*/_field_caps?fields=rating\n{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.field_caps(\n index=\"my-index-*\",\n fields=\"rating\",\n index_filter={\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.fieldCaps({\n index: \"my-index-*\",\n fields: \"rating\",\n index_filter: {\n range: {\n \"@timestamp\": {\n gte: \"2018\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.field_caps(\n index: \"my-index-*\",\n fields: \"rating\",\n body: {\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->fieldCaps([\n \"index\" => \"my-index-*\",\n \"fields\" => \"rating\",\n \"body\" => [\n \"index_filter\" => [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"2018\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_filter\":{\"range\":{\"@timestamp\":{\"gte\":\"2018\"}}}}' \"$ELASTICSEARCH_URL/my-index-*/_field_caps?fields=rating\"" + }, + { + "lang": "Java", + "source": "client.fieldCaps(f -> f\n .fields(\"rating\")\n .index(\"my-index-*\")\n .indexFilter(i -> i\n .range(r -> r\n .untyped(u -> u\n .field(\"@timestamp\")\n .gte(JsonData.fromJson(\"\\\"2018\\\"\"))\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -21649,7 +26613,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The 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 comma-separated values, such as `open,hidden`.", + "description": "The 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 comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -21833,6 +26797,36 @@ ], "x-api": "field_caps", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-*/_field_caps?fields=rating\n{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.field_caps(\n index=\"my-index-*\",\n fields=\"rating\",\n index_filter={\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.fieldCaps({\n index: \"my-index-*\",\n fields: \"rating\",\n index_filter: {\n range: {\n \"@timestamp\": {\n gte: \"2018\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.field_caps(\n index: \"my-index-*\",\n fields: \"rating\",\n body: {\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->fieldCaps([\n \"index\" => \"my-index-*\",\n \"fields\" => \"rating\",\n \"body\" => [\n \"index_filter\" => [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"2018\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_filter\":{\"range\":{\"@timestamp\":{\"gte\":\"2018\"}}}}' \"$ELASTICSEARCH_URL/my-index-*/_field_caps?fields=rating\"" + }, + { + "lang": "Java", + "source": "client.fieldCaps(f -> f\n .fields(\"rating\")\n .index(\"my-index-*\")\n .indexFilter(i -> i\n .range(r -> r\n .untyped(u -> u\n .field(\"@timestamp\")\n .gte(JsonData.fromJson(\"\\\"2018\\\"\"))\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -21985,7 +26979,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "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.", + "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -22045,7 +27039,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -22180,7 +27174,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "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.", + "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -22240,7 +27234,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -22395,7 +27389,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "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.", + "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -22455,7 +27449,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -22608,7 +27602,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "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.", + "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -22668,7 +27662,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -22875,6 +27869,7 @@ { "in": "query", "name": "expand_wildcards", + "description": "\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -22974,6 +27969,7 @@ { "in": "query", "name": "search_type", + "description": "\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -23014,6 +28010,7 @@ { "in": "query", "name": "suggest_mode", + "description": "\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SuggestMode" @@ -23644,6 +28641,7 @@ { "in": "query", "name": "expand_wildcards", + "description": "\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -23743,6 +28741,7 @@ { "in": "query", "name": "search_type", + "description": "\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -23783,6 +28782,7 @@ { "in": "query", "name": "suggest_mode", + "description": "\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SuggestMode" @@ -24353,6 +29353,36 @@ ], "x-api": "get_script_context", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _script_context\n" + }, + { + "lang": "Python", + "source": "resp = client.get_script_context()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.getScriptContext();" + }, + { + "lang": "Ruby", + "source": "response = client.get_script_context" + }, + { + "lang": "PHP", + "source": "$resp = $client->getScriptContext();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_script_context\"" + }, + { + "lang": "Java", + "source": "client.getScriptContext();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -24408,6 +29438,36 @@ ], "x-api": "get_script_languages", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _script_language\n" + }, + { + "lang": "Python", + "source": "resp = client.get_script_languages()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.getScriptLanguages();" + }, + { + "lang": "Ruby", + "source": "response = client.get_script_languages" + }, + { + "lang": "PHP", + "source": "$resp = $client->getScriptLanguages();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_script_language\"" + }, + { + "lang": "Java", + "source": "client.getScriptLanguages();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -24563,6 +29623,36 @@ ], "x-api": "explore.graph", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST clicklogs/_graph/explore\n{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.graph.explore(\n index=\"clicklogs\",\n query={\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n vertices=[\n {\n \"field\": \"product\"\n }\n ],\n connections={\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.graph.explore({\n index: \"clicklogs\",\n query: {\n match: {\n \"query.raw\": \"midi\",\n },\n },\n vertices: [\n {\n field: \"product\",\n },\n ],\n connections: {\n vertices: [\n {\n field: \"query.raw\",\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.graph.explore(\n index: \"clicklogs\",\n body: {\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->graph()->explore([\n \"index\" => \"clicklogs\",\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"query.raw\" => \"midi\",\n ],\n ],\n \"vertices\" => array(\n [\n \"field\" => \"product\",\n ],\n ),\n \"connections\" => [\n \"vertices\" => array(\n [\n \"field\" => \"query.raw\",\n ],\n ),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match\":{\"query.raw\":\"midi\"}},\"vertices\":[{\"field\":\"product\"}],\"connections\":{\"vertices\":[{\"field\":\"query.raw\"}]}}' \"$ELASTICSEARCH_URL/clicklogs/_graph/explore\"" + }, + { + "lang": "Java", + "source": "client.graph().explore(e -> e\n .connections(c -> c\n .vertices(v -> v\n .field(\"query.raw\")\n )\n )\n .index(\"clicklogs\")\n .query(q -> q\n .match(m -> m\n .field(\"query.raw\")\n .query(FieldValue.of(\"midi\"))\n )\n )\n .vertices(v -> v\n .field(\"product\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -24716,6 +29806,36 @@ ], "x-api": "explore.graph", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST clicklogs/_graph/explore\n{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.graph.explore(\n index=\"clicklogs\",\n query={\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n vertices=[\n {\n \"field\": \"product\"\n }\n ],\n connections={\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.graph.explore({\n index: \"clicklogs\",\n query: {\n match: {\n \"query.raw\": \"midi\",\n },\n },\n vertices: [\n {\n field: \"product\",\n },\n ],\n connections: {\n vertices: [\n {\n field: \"query.raw\",\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.graph.explore(\n index: \"clicklogs\",\n body: {\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->graph()->explore([\n \"index\" => \"clicklogs\",\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"query.raw\" => \"midi\",\n ],\n ],\n \"vertices\" => array(\n [\n \"field\" => \"product\",\n ],\n ),\n \"connections\" => [\n \"vertices\" => array(\n [\n \"field\" => \"query.raw\",\n ],\n ),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match\":{\"query.raw\":\"midi\"}},\"vertices\":[{\"field\":\"product\"}],\"connections\":{\"vertices\":[{\"field\":\"query.raw\"}]}}' \"$ELASTICSEARCH_URL/clicklogs/_graph/explore\"" + }, + { + "lang": "Java", + "source": "client.graph().explore(e -> e\n .connections(c -> c\n .vertices(v -> v\n .field(\"query.raw\")\n )\n )\n .index(\"clicklogs\")\n .query(q -> q\n .match(m -> m\n .field(\"query.raw\")\n .query(FieldValue.of(\"midi\"))\n )\n )\n .vertices(v -> v\n .field(\"product\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -24805,6 +29925,36 @@ ], "x-api": "health_report", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _health_report\n" + }, + { + "lang": "Python", + "source": "resp = client.health_report()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.healthReport();" + }, + { + "lang": "Ruby", + "source": "response = client.health_report" + }, + { + "lang": "PHP", + "source": "$resp = $client->healthReport();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_health_report\"" + }, + { + "lang": "Java", + "source": "client.healthReport(h -> h);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -24915,203 +30065,293 @@ ], "x-api": "health_report", "x-category": "info", - "x-metaTags": [ - { - "content": "Elasticsearch", - "name": "product_name" - } - ] - } - }, - "/_ilm/policy/{policy}": { - "get": { - "tags": [ - "ilm" - ], - "summary": "Get lifecycle policies", - "operationId": "ilm-get-lifecycle", - "parameters": [ + "x-codeSamples": [ { - "in": "path", - "name": "policy", - "description": "Identifier for the policy.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" + "lang": "Console", + "source": "GET _health_report\n" }, { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "lang": "Python", + "source": "resp = client.health_report()" }, { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ilm.get_lifecycle.Lifecycle" - } - }, - "examples": { - "GetLifecycleResponseExample1": { - "description": "A successful response when retrieving a lifecycle policy.", - "value": "{\n \"my_policy\": {\n \"version\": 1,\n \"modified_date\": 82392349,\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {\n \"delete_searchable_snapshot\": true\n }\n }\n }\n }\n },\n \"in_use_by\" : {\n \"indices\" : [],\n \"data_streams\" : [],\n \"composable_templates\" : []\n }\n }\n}" - } - } - } - } - } - }, - "x-state": "Generally available; Added in 6.6.0", - "x-variations": [ - "
\n GET\n /_ilm/policy/{policy}\n
\n " - ], - "x-req-auth": [ - "Cluster privileges: `manage_ilm`,`read_ilm`\n" - ], - "x-api": "get_lifecycle.ilm", - "x-category": "management", - "x-metaTags": [ - { - "content": "Elasticsearch", - "name": "product_name" - } - ] - }, - "put": { - "tags": [ - "ilm" - ], - "summary": "Create or update a lifecycle policy", - "description": "If the specified policy exists, it is replaced and the policy version is incremented.\n\nNOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.", - "externalDocs": { - "description": "Index lifecycle management (ILM) in Elasticsearch", - "url": "https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/index-lifecycle", - "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-put-lifecycle.html" - }, - "operationId": "ilm-put-lifecycle", - "parameters": [ + "lang": "JavaScript", + "source": "const response = await client.healthReport();" + }, { - "in": "path", - "name": "policy", - "description": "Identifier for the policy.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" + "lang": "Ruby", + "source": "response = client.health_report" }, { - "in": "query", - "name": "master_timeout", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "lang": "PHP", + "source": "$resp = $client->healthReport();" }, { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "policy": { - "allOf": [ - { - "$ref": "#/components/schemas/ilm._types.Policy" - } - ] - } - } - }, - "examples": { - "PutLifecycleRequestExample1": { - "description": "Run `PUT _ilm/policy/my_policy` to create a new policy with arbitrary metadata.\n", - "value": "{\n \"policy\": {\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}" - } - } - } + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_health_report\"" }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - }, - "examples": { - "PutLifecycleResponseExample1": { - "description": "A successful response when creating a new lifecycle policy.", - "value": "{\n \"acknowledged\": true\n}" - } - } - } - } + { + "lang": "Java", + "source": "client.healthReport(h -> h);\n" } - }, - "x-state": "Generally available; Added in 6.6.0", - "x-variations": [ - "
\n PUT\n /_ilm/policy/{policy}\n
\n " - ], - "x-req-auth": [ - "Index privileges: `manage`\n", - "Cluster privileges: `manage_ilm`\n" ], - "x-api": "put_lifecycle.ilm", - "x-category": "management", "x-metaTags": [ { "content": "Elasticsearch", "name": "product_name" } ] - }, - "delete": { + } + }, + "/_ilm/policy/{policy}": { + "get": { "tags": [ "ilm" ], - "summary": "Delete a lifecycle policy", - "description": "You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.", - "operationId": "ilm-delete-lifecycle", + "summary": "Get lifecycle policies", + "operationId": "ilm-get-lifecycle", + "parameters": [ + { + "in": "path", + "name": "policy", + "description": "Identifier for the policy.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ilm.get_lifecycle.Lifecycle" + } + }, + "examples": { + "GetLifecycleResponseExample1": { + "description": "A successful response when retrieving a lifecycle policy.", + "value": "{\n \"my_policy\": {\n \"version\": 1,\n \"modified_date\": 82392349,\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {\n \"delete_searchable_snapshot\": true\n }\n }\n }\n }\n },\n \"in_use_by\" : {\n \"indices\" : [],\n \"data_streams\" : [],\n \"composable_templates\" : []\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n GET\n /_ilm/policy/{policy}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_ilm`,`read_ilm`\n" + ], + "x-api": "get_lifecycle.ilm", + "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ilm/policy/my_policy\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.get_lifecycle(\n name=\"my_policy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.getLifecycle({\n name: \"my_policy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.get_lifecycle(\n policy: \"my_policy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->getLifecycle([\n \"policy\" => \"my_policy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/policy/my_policy\"" + }, + { + "lang": "Java", + "source": "client.ilm().getLifecycle(g -> g\n .name(\"my_policy\")\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "ilm" + ], + "summary": "Create or update a lifecycle policy", + "description": "If the specified policy exists, it is replaced and the policy version is incremented.\n\nNOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.", + "externalDocs": { + "description": "Index lifecycle management (ILM) in Elasticsearch", + "url": "https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/index-lifecycle", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-put-lifecycle.html" + }, + "operationId": "ilm-put-lifecycle", + "parameters": [ + { + "in": "path", + "name": "policy", + "description": "Identifier for the policy.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "policy": { + "allOf": [ + { + "$ref": "#/components/schemas/ilm._types.Policy" + } + ] + } + } + }, + "examples": { + "PutLifecycleRequestExample1": { + "description": "Run `PUT _ilm/policy/my_policy` to create a new policy with arbitrary metadata.\n", + "value": "{\n \"policy\": {\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "PutLifecycleResponseExample1": { + "description": "A successful response when creating a new lifecycle policy.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 6.6.0", + "x-variations": [ + "
\n PUT\n /_ilm/policy/{policy}\n
\n " + ], + "x-req-auth": [ + "Index privileges: `manage`\n", + "Cluster privileges: `manage_ilm`\n" + ], + "x-api": "put_lifecycle.ilm", + "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ilm.put_lifecycle(\n name=\"my_policy\",\n policy={\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.putLifecycle({\n name: \"my_policy\",\n policy: {\n _meta: {\n description: \"used for nginx log\",\n project: {\n name: \"myProject\",\n department: \"myDepartment\",\n },\n },\n phases: {\n warm: {\n min_age: \"10d\",\n actions: {\n forcemerge: {\n max_num_segments: 1,\n },\n },\n },\n delete: {\n min_age: \"30d\",\n actions: {\n delete: {},\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.put_lifecycle(\n policy: \"my_policy\",\n body: {\n \"policy\": {\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->putLifecycle([\n \"policy\" => \"my_policy\",\n \"body\" => [\n \"policy\" => [\n \"_meta\" => [\n \"description\" => \"used for nginx log\",\n \"project\" => [\n \"name\" => \"myProject\",\n \"department\" => \"myDepartment\",\n ],\n ],\n \"phases\" => [\n \"warm\" => [\n \"min_age\" => \"10d\",\n \"actions\" => [\n \"forcemerge\" => [\n \"max_num_segments\" => 1,\n ],\n ],\n ],\n \"delete\" => [\n \"min_age\" => \"30d\",\n \"actions\" => [\n \"delete\" => new ArrayObject([]),\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"policy\":{\"_meta\":{\"description\":\"used for nginx log\",\"project\":{\"name\":\"myProject\",\"department\":\"myDepartment\"}},\"phases\":{\"warm\":{\"min_age\":\"10d\",\"actions\":{\"forcemerge\":{\"max_num_segments\":1}}},\"delete\":{\"min_age\":\"30d\",\"actions\":{\"delete\":{}}}}}}' \"$ELASTICSEARCH_URL/_ilm/policy/my_policy\"" + }, + { + "lang": "Java", + "source": "client.ilm().putLifecycle(p -> p\n .name(\"my_policy\")\n .policy(po -> po\n .phases(ph -> ph\n .delete(d -> d\n .actions(a -> a\n .delete(de -> de)\n )\n .minAge(m -> m\n .time(\"30d\")\n )\n )\n .warm(w -> w\n .actions(a -> a\n .forcemerge(f -> f\n .maxNumSegments(1)\n )\n )\n .minAge(m -> m\n .time(\"10d\")\n )\n )\n )\n .meta(Map.of(\"description\", JsonData.fromJson(\"\\\"used for nginx log\\\"\"),\"project\", JsonData.fromJson(\"{\\\"name\\\":\\\"myProject\\\",\\\"department\\\":\\\"myDepartment\\\"}\")))\n )\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "ilm" + ], + "summary": "Delete a lifecycle policy", + "description": "You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.", + "operationId": "ilm-delete-lifecycle", "parameters": [ { "in": "path", @@ -25172,6 +30412,36 @@ ], "x-api": "delete_lifecycle.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ilm/policy/my_policy\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.delete_lifecycle(\n name=\"my_policy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.deleteLifecycle({\n name: \"my_policy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.delete_lifecycle(\n policy: \"my_policy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->deleteLifecycle([\n \"policy\" => \"my_policy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/policy/my_policy\"" + }, + { + "lang": "Java", + "source": "client.ilm().deleteLifecycle(d -> d\n .name(\"my_policy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25269,6 +30539,36 @@ ], "x-api": "explain_lifecycle.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET .ds-timeseries-*/_ilm/explain\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.explain_lifecycle(\n index=\".ds-timeseries-*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.explainLifecycle({\n index: \".ds-timeseries-*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.explain_lifecycle(\n index: \".ds-timeseries-*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->explainLifecycle([\n \"index\" => \".ds-timeseries-*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/.ds-timeseries-*/_ilm/explain\"" + }, + { + "lang": "Java", + "source": "client.ilm().explainLifecycle(e -> e\n .index(\".ds-timeseries-*\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25336,6 +30636,36 @@ ], "x-api": "get_lifecycle.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ilm/policy/my_policy\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.get_lifecycle(\n name=\"my_policy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.getLifecycle({\n name: \"my_policy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.get_lifecycle(\n policy: \"my_policy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->getLifecycle([\n \"policy\" => \"my_policy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/policy/my_policy\"" + }, + { + "lang": "Java", + "source": "client.ilm().getLifecycle(g -> g\n .name(\"my_policy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25391,6 +30721,36 @@ ], "x-api": "get_status.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ilm/status\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.get_status()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.getStatus();" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.get_status" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->getStatus();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/status\"" + }, + { + "lang": "Java", + "source": "client.ilm().getStatus();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25534,6 +30894,36 @@ ], "x-api": "migrate_to_data_tiers.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ilm/migrate_to_data_tiers\n{\n \"legacy_template_to_delete\": \"global-template\",\n \"node_attribute\": \"custom_attribute_name\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ilm.migrate_to_data_tiers(\n legacy_template_to_delete=\"global-template\",\n node_attribute=\"custom_attribute_name\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.migrateToDataTiers({\n legacy_template_to_delete: \"global-template\",\n node_attribute: \"custom_attribute_name\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.migrate_to_data_tiers(\n body: {\n \"legacy_template_to_delete\": \"global-template\",\n \"node_attribute\": \"custom_attribute_name\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->migrateToDataTiers([\n \"body\" => [\n \"legacy_template_to_delete\" => \"global-template\",\n \"node_attribute\" => \"custom_attribute_name\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"legacy_template_to_delete\":\"global-template\",\"node_attribute\":\"custom_attribute_name\"}' \"$ELASTICSEARCH_URL/_ilm/migrate_to_data_tiers\"" + }, + { + "lang": "Java", + "source": "client.ilm().migrateToDataTiers(m -> m\n .legacyTemplateToDelete(\"global-template\")\n .nodeAttribute(\"custom_attribute_name\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25634,6 +31024,36 @@ ], "x-api": "move_to_step.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ilm/move/my-index-000001\n{\n \"current_step\": {\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ilm.move_to_step(\n index=\"my-index-000001\",\n current_step={\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n next_step={\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.moveToStep({\n index: \"my-index-000001\",\n current_step: {\n phase: \"new\",\n action: \"complete\",\n name: \"complete\",\n },\n next_step: {\n phase: \"warm\",\n action: \"forcemerge\",\n name: \"forcemerge\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.move_to_step(\n index: \"my-index-000001\",\n body: {\n \"current_step\": {\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->moveToStep([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"current_step\" => [\n \"phase\" => \"new\",\n \"action\" => \"complete\",\n \"name\" => \"complete\",\n ],\n \"next_step\" => [\n \"phase\" => \"warm\",\n \"action\" => \"forcemerge\",\n \"name\" => \"forcemerge\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"current_step\":{\"phase\":\"new\",\"action\":\"complete\",\"name\":\"complete\"},\"next_step\":{\"phase\":\"warm\",\"action\":\"forcemerge\",\"name\":\"forcemerge\"}}' \"$ELASTICSEARCH_URL/_ilm/move/my-index-000001\"" + }, + { + "lang": "Java", + "source": "client.ilm().moveToStep(m -> m\n .currentStep(c -> c\n .action(\"complete\")\n .name(\"complete\")\n .phase(\"new\")\n )\n .index(\"my-index-000001\")\n .nextStep(n -> n\n .action(\"forcemerge\")\n .name(\"forcemerge\")\n .phase(\"warm\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25705,6 +31125,36 @@ ], "x-api": "remove_policy.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST logs-my_app-default/_ilm/remove\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.remove_policy(\n index=\"logs-my_app-default\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.removePolicy({\n index: \"logs-my_app-default\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.remove_policy(\n index: \"logs-my_app-default\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->removePolicy([\n \"index\" => \"logs-my_app-default\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/logs-my_app-default/_ilm/remove\"" + }, + { + "lang": "Java", + "source": "client.ilm().removePolicy(r -> r\n .index(\"logs-my_app-default\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25755,6 +31205,36 @@ ], "x-api": "retry.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_ilm/retry\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.retry(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.retry({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.retry(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->retry([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_ilm/retry\"" + }, + { + "lang": "Java", + "source": "client.ilm().retry(r -> r\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25820,6 +31300,36 @@ ], "x-api": "start.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ilm/start\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.start()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.start();" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.start" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->start();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/start\"" + }, + { + "lang": "Java", + "source": "client.ilm().start(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25885,6 +31395,36 @@ ], "x-api": "stop.ilm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ilm/stop\n" + }, + { + "lang": "Python", + "source": "resp = client.ilm.stop()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ilm.stop();" + }, + { + "lang": "Ruby", + "source": "response = client.ilm.stop" + }, + { + "lang": "PHP", + "source": "$resp = $client->ilm()->stop();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/stop\"" + }, + { + "lang": "Java", + "source": "client.ilm().stop(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -25951,7 +31491,7 @@ { "in": "query", "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", + "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.\n\nSupported values include:\n - `index`: Overwrite any documents that already exist.\n - `create`: Only index documents that do not already exist.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.OpType" @@ -26011,7 +31551,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -26104,6 +31644,36 @@ ], "x-api": "index", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-000001/_doc/\n{\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.index(\n index=\"my-index-000001\",\n document={\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.index({\n index: \"my-index-000001\",\n document: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n message: \"GET /search HTTP/1.1 200 1070000\",\n user: {\n id: \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.index(\n index: \"my-index-000001\",\n body: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->index([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"@timestamp\" => \"2099-11-15T13:12:00\",\n \"message\" => \"GET /search HTTP/1.1 200 1070000\",\n \"user\" => [\n \"id\" => \"kimchy\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_doc/\"" + }, + { + "lang": "Java", + "source": "client.index(i -> i\n .index(\"my-index-000001\")\n .document(JsonData.fromJson(\"{\\\"@timestamp\\\":\\\"2099-11-15T13:12:00\\\",\\\"message\\\":\\\"GET /search HTTP/1.1 200 1070000\\\",\\\"user\\\":{\\\"id\\\":\\\"kimchy\\\"}}\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -26135,7 +31705,7 @@ { "in": "path", "name": "block", - "description": "The block type to add to the index.", + "description": "The block type to add to the index.\n\nSupported values include:\n - `metadata`: Disable metadata changes, such as closing the index.\n - `read`: Disable read operations.\n - `read_only`: Disable write operations and metadata changes.\n - `write`: Disable write operations. However, metadata changes are still allowed.\n\n", "required": true, "deprecated": false, "schema": { @@ -26156,7 +31726,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -26237,6 +31807,36 @@ ], "x-api": "add_block.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /my-index-000001/_block/write\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.add_block(\n index=\"my-index-000001\",\n block=\"write\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.addBlock({\n index: \"my-index-000001\",\n block: \"write\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.add_block(\n index: \"my-index-000001\",\n block: \"write\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->addBlock([\n \"index\" => \"my-index-000001\",\n \"block\" => \"write\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_block/write\"" + }, + { + "lang": "Java", + "source": "client.indices().addBlock(a -> a\n .block(IndicesBlockOptions.Write)\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -26266,7 +31866,7 @@ { "in": "path", "name": "block", - "description": "The block type to remove from the index.", + "description": "The block type to remove from the index.\n\nSupported values include:\n - `metadata`: Disable metadata changes, such as closing the index.\n - `read`: Disable read operations.\n - `read_only`: Disable write operations and metadata changes.\n - `write`: Disable write operations. However, metadata changes are still allowed.\n\n", "required": true, "deprecated": false, "schema": { @@ -26287,7 +31887,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -26367,6 +31967,36 @@ ], "x-api": "remove_block.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /my-index-000001/_block/write\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.remove_block(\n index=\"my-index-000001\",\n block=\"write\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.removeBlock({\n index: \"my-index-000001\",\n block: \"write\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.remove_block(\n index: \"my-index-000001\",\n block: \"write\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->removeBlock([\n \"index\" => \"my-index-000001\",\n \"block\" => \"write\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_block/write\"" + }, + { + "lang": "Java", + "source": "client.indices().removeBlock(r -> r\n .block(IndicesBlockOptions.Write)\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -26549,6 +32179,36 @@ ], "x-api": "analyze.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_analyze\n{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.analyze(\n analyzer=\"standard\",\n text=\"this is a test\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.analyze({\n analyzer: \"standard\",\n text: \"this is a test\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.analyze(\n body: {\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"analyzer\" => \"standard\",\n \"text\" => \"this is a test\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analyzer\":\"standard\",\"text\":\"this is a test\"}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "lang": "Java", + "source": "client.indices().analyze(a -> a\n .analyzer(\"standard\")\n .text(\"this is a test\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -26729,6 +32389,36 @@ ], "x-api": "analyze.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_analyze\n{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.analyze(\n analyzer=\"standard\",\n text=\"this is a test\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.analyze({\n analyzer: \"standard\",\n text: \"this is a test\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.analyze(\n body: {\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"analyzer\" => \"standard\",\n \"text\" => \"this is a test\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analyzer\":\"standard\",\"text\":\"this is a test\"}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "lang": "Java", + "source": "client.indices().analyze(a -> a\n .analyzer(\"standard\")\n .text(\"this is a test\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -26922,6 +32612,36 @@ ], "x-api": "analyze.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_analyze\n{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.analyze(\n analyzer=\"standard\",\n text=\"this is a test\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.analyze({\n analyzer: \"standard\",\n text: \"this is a test\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.analyze(\n body: {\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"analyzer\" => \"standard\",\n \"text\" => \"this is a test\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analyzer\":\"standard\",\"text\":\"this is a test\"}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "lang": "Java", + "source": "client.indices().analyze(a -> a\n .analyzer(\"standard\")\n .text(\"this is a test\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -27113,6 +32833,36 @@ ], "x-api": "analyze.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_analyze\n{\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.analyze(\n analyzer=\"standard\",\n text=\"this is a test\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.analyze({\n analyzer: \"standard\",\n text: \"this is a test\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.analyze(\n body: {\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"analyzer\" => \"standard\",\n \"text\" => \"this is a test\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analyzer\":\"standard\",\"text\":\"this is a test\"}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "lang": "Java", + "source": "client.indices().analyze(a -> a\n .analyzer(\"standard\")\n .text(\"this is a test\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -27160,6 +32910,36 @@ ], "x-api": "cancel_migrate_reindex.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_migration/reindex/my-data-stream/_cancel\n" + }, + { + "lang": "Python", + "source": "resp = client.perform_request(\n \"POST\",\n \"/_migration/reindex/my-data-stream/_cancel\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_migration/reindex/my-data-stream/_cancel\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.perform_request(\n \"POST\",\n \"/_migration/reindex/my-data-stream/_cancel\",\n {},\n)" + }, + { + "lang": "PHP", + "source": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_migration/reindex/my-data-stream/_cancel\",\n);\n$resp = $client->sendRequest($request);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/reindex/my-data-stream/_cancel\"" + }, + { + "lang": "Java", + "source": "client.indices().cancelMigrateReindex(c -> c\n .index(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -27200,7 +32980,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -27279,6 +33059,36 @@ ], "x-api": "clear_cache.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001,my-index-000002/_cache/clear?request=true\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.clear_cache(\n index=\"my-index-000001,my-index-000002\",\n request=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.clearCache({\n index: \"my-index-000001,my-index-000002\",\n request: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.clear_cache(\n index: \"my-index-000001,my-index-000002\",\n request: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->clearCache([\n \"index\" => \"my-index-000001,my-index-000002\",\n \"request\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001,my-index-000002/_cache/clear?request=true\"" + }, + { + "lang": "Java", + "source": "client.indices().clearCache(c -> c\n .index(List.of(\"my-index-000001\",\"my-index-000002\"))\n .request(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -27330,7 +33140,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -27409,6 +33219,36 @@ ], "x-api": "clear_cache.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001,my-index-000002/_cache/clear?request=true\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.clear_cache(\n index=\"my-index-000001,my-index-000002\",\n request=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.clearCache({\n index: \"my-index-000001,my-index-000002\",\n request: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.clear_cache(\n index: \"my-index-000001,my-index-000002\",\n request: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->clearCache([\n \"index\" => \"my-index-000001,my-index-000002\",\n \"request\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001,my-index-000002/_cache/clear?request=true\"" + }, + { + "lang": "Java", + "source": "client.indices().clearCache(c -> c\n .index(List.of(\"my-index-000001\",\"my-index-000002\"))\n .request(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -27553,6 +33393,36 @@ ], "x-api": "clone.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my_source_index/_clone/my_target_index\n{\n \"settings\": {\n \"index.refresh_interval\": \"2s\"\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.clone(\n index=\"my_source_index\",\n target=\"my_target_index\",\n settings={\n \"index.refresh_interval\": \"2s\"\n },\n aliases={\n \"my_search_indices\": {}\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.clone({\n index: \"my_source_index\",\n target: \"my_target_index\",\n settings: {\n \"index.refresh_interval\": \"2s\",\n },\n aliases: {\n my_search_indices: {},\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.clone(\n index: \"my_source_index\",\n target: \"my_target_index\",\n body: {\n \"settings\": {\n \"index.refresh_interval\": \"2s\"\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->clone([\n \"index\" => \"my_source_index\",\n \"target\" => \"my_target_index\",\n \"body\" => [\n \"settings\" => [\n \"index.refresh_interval\" => \"2s\",\n ],\n \"aliases\" => [\n \"my_search_indices\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.refresh_interval\":\"2s\"},\"aliases\":{\"my_search_indices\":{}}}' \"$ELASTICSEARCH_URL/my_source_index/_clone/my_target_index\"" + }, + { + "lang": "Java", + "source": "client.indices().clone(c -> c\n .aliases(\"my_search_indices\", a -> a)\n .index(\"my_source_index\")\n .settings(\"index.refresh_interval\", JsonData.fromJson(\"\\\"2s\\\"\"))\n .target(\"my_target_index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -27695,6 +33565,36 @@ ], "x-api": "clone.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my_source_index/_clone/my_target_index\n{\n \"settings\": {\n \"index.refresh_interval\": \"2s\"\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.clone(\n index=\"my_source_index\",\n target=\"my_target_index\",\n settings={\n \"index.refresh_interval\": \"2s\"\n },\n aliases={\n \"my_search_indices\": {}\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.clone({\n index: \"my_source_index\",\n target: \"my_target_index\",\n settings: {\n \"index.refresh_interval\": \"2s\",\n },\n aliases: {\n my_search_indices: {},\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.clone(\n index: \"my_source_index\",\n target: \"my_target_index\",\n body: {\n \"settings\": {\n \"index.refresh_interval\": \"2s\"\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->clone([\n \"index\" => \"my_source_index\",\n \"target\" => \"my_target_index\",\n \"body\" => [\n \"settings\" => [\n \"index.refresh_interval\" => \"2s\",\n ],\n \"aliases\" => [\n \"my_search_indices\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.refresh_interval\":\"2s\"},\"aliases\":{\"my_search_indices\":{}}}' \"$ELASTICSEARCH_URL/my_source_index/_clone/my_target_index\"" + }, + { + "lang": "Java", + "source": "client.indices().clone(c -> c\n .aliases(\"my_search_indices\", a -> a)\n .index(\"my_source_index\")\n .settings(\"index.refresh_interval\", JsonData.fromJson(\"\\\"2s\\\"\"))\n .target(\"my_target_index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -27736,7 +33636,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -27830,6 +33730,36 @@ ], "x-api": "close.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-00001/_close\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.close(\n index=\"my-index-00001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.close({\n index: \"my-index-00001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.close(\n index: \"my-index-00001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->close([\n \"index\" => \"my-index-00001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-00001/_close\"" + }, + { + "lang": "Java", + "source": "client.indices().close(c -> c\n .index(\"my-index-00001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -27871,7 +33801,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.", + "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as open,hidden.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -27931,7 +33861,7 @@ { "in": "query", "name": "features", - "description": "Return only information on specified index features", + "description": "Return only information on specified index features\n\nSupported values include: `aliases`, `mappings`, `settings`\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/indices.get.Features" @@ -27964,6 +33894,36 @@ ], "x-api": "get.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.get({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->get([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001\"" + }, + { + "lang": "Java", + "source": "client.indices().get(g -> g\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28113,6 +34073,36 @@ ], "x-api": "create.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /my-index-000001\n{\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\": 2\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.create(\n index=\"my-index-000001\",\n settings={\n \"number_of_shards\": 3,\n \"number_of_replicas\": 2\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.create({\n index: \"my-index-000001\",\n settings: {\n number_of_shards: 3,\n number_of_replicas: 2,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.create(\n index: \"my-index-000001\",\n body: {\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\": 2\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->create([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"settings\" => [\n \"number_of_shards\" => 3,\n \"number_of_replicas\" => 2,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"number_of_shards\":3,\"number_of_replicas\":2}}' \"$ELASTICSEARCH_URL/my-index-000001\"" + }, + { + "lang": "Java", + "source": "client.indices().create(c -> c\n .index(\"my-index-000001\")\n .settings(s -> s\n .numberOfShards(\"3\")\n .numberOfReplicas(\"2\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28152,7 +34142,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -28211,6 +34201,36 @@ ], "x-api": "delete.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /books\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.delete(\n index=\"books\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.delete({\n index: \"books\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.delete(\n index: \"books\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->delete([\n \"index\" => \"books\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/books\"" + }, + { + "lang": "Java", + "source": "client.indices().delete(d -> d\n .index(\"books\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28250,7 +34270,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -28312,6 +34332,36 @@ ], "x-api": "exists.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "HEAD my-data-stream\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.exists(\n index=\"my-data-stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.exists({\n index: \"my-data-stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.exists(\n index: \"my-data-stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->exists([\n \"index\" => \"my-data-stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-data-stream\"" + }, + { + "lang": "Java", + "source": "client.indices().exists(e -> e\n .index(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28343,7 +34393,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -28420,6 +34470,36 @@ ], "x-api": "get_data_stream.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _data_stream/my-data-stream\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_data_stream(\n name=\"my-data-stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getDataStream({\n name: \"my-data-stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_data_stream(\n name: \"my-data-stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getDataStream([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream\"" + }, + { + "lang": "Java", + "source": "client.indices().getDataStream(g -> g\n .name(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28488,6 +34568,36 @@ ], "x-api": "create_data_stream.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _data_stream/logs-foo-bar\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.create_data_stream(\n name=\"logs-foo-bar\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.createDataStream({\n name: \"logs-foo-bar\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.create_data_stream(\n name: \"logs-foo-bar\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->createDataStream([\n \"name\" => \"logs-foo-bar\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/logs-foo-bar\"" + }, + { + "lang": "Java", + "source": "client.indices().createDataStream(c -> c\n .name(\"logs-foo-bar\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28527,7 +34637,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match. Supports comma-separated values,such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match. Supports comma-separated values,such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -28556,6 +34666,36 @@ ], "x-api": "delete_data_stream.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _data_stream/my-data-stream\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.delete_data_stream(\n name=\"my-data-stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.deleteDataStream({\n name: \"my-data-stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.delete_data_stream(\n name: \"my-data-stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->deleteDataStream([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream\"" + }, + { + "lang": "Java", + "source": "client.indices().deleteDataStream(d -> d\n .name(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28644,6 +34784,36 @@ ], "x-api": "create_from.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _create_from/my-index/my-new-index\n" + }, + { + "lang": "Python", + "source": "resp = client.perform_request(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_create_from/my-index/my-new-index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.perform_request(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n {},\n)" + }, + { + "lang": "PHP", + "source": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n);\n$resp = $client->sendRequest($request);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_create_from/my-index/my-new-index\"" + }, + { + "lang": "Java", + "source": "client.indices().createFrom(c -> c\n .dest(\"my-new-index\")\n .source(\"my-index\")\n .createFrom(cr -> cr)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28730,6 +34900,36 @@ ], "x-api": "create_from.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _create_from/my-index/my-new-index\n" + }, + { + "lang": "Python", + "source": "resp = client.perform_request(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_create_from/my-index/my-new-index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.perform_request(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n {},\n)" + }, + { + "lang": "PHP", + "source": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n);\n$resp = $client->sendRequest($request);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_create_from/my-index/my-new-index\"" + }, + { + "lang": "Java", + "source": "client.indices().createFrom(c -> c\n .dest(\"my-new-index\")\n .source(\"my-index\")\n .createFrom(cr -> cr)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28750,7 +34950,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -28829,6 +35029,36 @@ ], "x-api": "data_streams_stats.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/my-index-000001/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.data_streams_stats(\n name=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.dataStreamsStats({\n name: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.data_streams_stats(\n name: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->dataStreamsStats([\n \"name\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-index-000001/_stats\"" + }, + { + "lang": "Java", + "source": "client.indices().dataStreamsStats(d -> d\n .name(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28860,7 +35090,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -28939,6 +35169,36 @@ ], "x-api": "data_streams_stats.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/my-index-000001/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.data_streams_stats(\n name=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.dataStreamsStats({\n name: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.data_streams_stats(\n name: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->dataStreamsStats([\n \"name\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-index-000001/_stats\"" + }, + { + "lang": "Java", + "source": "client.indices().dataStreamsStats(d -> d\n .name(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -28991,7 +35251,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -29043,152 +35303,36 @@ ], "x-api": "get_alias.indices", "x-category": "management", - "x-metaTags": [ + "x-codeSamples": [ { - "content": "Elasticsearch", - "name": "product_name" - } - ] - }, - "put": { - "tags": [ - "indices" - ], - "summary": "Create or update an alias", - "description": "Adds a data stream or index to an alias.", - "externalDocs": { - "description": "Aliases", - "url": "https://www.elastic.co/docs/manage-data/data-store/aliases", - "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-add-alias.html" - }, - "operationId": "indices-put-alias", - "parameters": [ + "lang": "Console", + "source": "GET _alias\n" + }, { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams or indices to add.\nSupports wildcards (`*`).\nWildcard patterns that match both data streams and indices return an error.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" + "lang": "Python", + "source": "resp = client.indices.get_alias()" }, { - "in": "path", - "name": "name", - "description": "Alias to update.\nIf the alias doesn’t exist, the request creates it.\nIndex alias names support date math.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" + "lang": "JavaScript", + "source": "const response = await client.indices.getAlias();" }, { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "lang": "Ruby", + "source": "response = client.indices.get_alias" }, { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "filter": { - "description": "Query used to limit documents the alias can access.", - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - ] - }, - "index_routing": { - "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.\nData stream aliases don’t support this parameter.", - "allOf": [ - { - "$ref": "#/components/schemas/_types.Routing" - } - ] - }, - "is_write_index": { - "description": "If `true`, sets the write index or data stream for the alias.\nIf an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.\nIf an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.\nData stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.", - "type": "boolean" - }, - "routing": { - "description": "Value used to route indexing and search operations to a specific shard.\nData stream aliases don’t support this parameter.", - "allOf": [ - { - "$ref": "#/components/schemas/_types.Routing" - } - ] - }, - "search_routing": { - "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.\nData stream aliases don’t support this parameter.", - "allOf": [ - { - "$ref": "#/components/schemas/_types.Routing" - } - ] - } - } - }, - "examples": { - "indicesPutAliasRequestExample1": { - "summary": "Filter an alias", - "description": "The filter option uses Query DSL to limit the documents an alias can access.", - "value": "{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" - }, - "indicesPutAliasRequestExample2": { - "summary": "Write index", - "description": "You can use is_write_index to specify a write index or data stream for an alias. Elasticsearch routes any write requests for the alias to this index or data stream.", - "value": "{\n \"is_write_index\": true\n}" - }, - "indicesPutAliasRequestExample3": { - "summary": "Routing", - "description": "Use the routing option to route requests for an alias to a specific shard.", - "value": "{\n \"routing\": \"1\"\n}" - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } + "lang": "PHP", + "source": "$resp = $client->indices()->getAlias();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_alias\"" + }, + { + "lang": "Java", + "source": "client.indices().getAlias(g -> g);\n" } - }, - "x-state": "Generally available", - "x-variations": [ - "
\n PUT\n /{index}/_alias/{name}\n
\n ", - "
\n POST\n /{index}/_alias/{name}\n
\n " ], - "x-api": "put_alias.indices", - "x-category": "management", "x-metaTags": [ { "content": "Elasticsearch", @@ -29196,7 +35340,7 @@ } ] }, - "post": { + "put": { "tags": [ "indices" ], @@ -29207,7 +35351,7 @@ "url": "https://www.elastic.co/docs/manage-data/data-store/aliases", "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-add-alias.html" }, - "operationId": "indices-put-alias-1", + "operationId": "indices-put-alias", "parameters": [ { "in": "path", @@ -29335,6 +35479,212 @@ ], "x-api": "put_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-2099.05.06-000001/_alias/my-alias\n{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_alias(\n index=\"my-index-2099.05.06-000001\",\n name=\"my-alias\",\n filter={\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putAlias({\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n filter: {\n bool: {\n filter: [\n {\n range: {\n \"@timestamp\": {\n gte: \"now-1d/d\",\n lt: \"now/d\",\n },\n },\n },\n {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n ],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_alias(\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n body: {\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putAlias([\n \"index\" => \"my-index-2099.05.06-000001\",\n \"name\" => \"my-alias\",\n \"body\" => [\n \"filter\" => [\n \"bool\" => [\n \"filter\" => array(\n [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"now-1d/d\",\n \"lt\" => \"now/d\",\n ],\n ],\n ],\n [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"filter\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":\"now-1d/d\",\"lt\":\"now/d\"}}},{\"term\":{\"user.id\":\"kimchy\"}}]}}}' \"$ELASTICSEARCH_URL/my-index-2099.05.06-000001/_alias/my-alias\"" + }, + { + "lang": "Java", + "source": "client.indices().putAlias(p -> p\n .filter(f -> f\n .bool(b -> b\n .filter(List.of(Query.of(q -> q\n .range(r -> r\n .untyped(u -> u\n .field(\"@timestamp\")\n .gte(JsonData.fromJson(\"\\\"now-1d/d\\\"\"))\n .lt(JsonData.fromJson(\"\\\"now/d\\\"\"))\n )\n )\n ),Query.of(qu -> qu\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )))\n )\n )\n .index(\"my-index-2099.05.06-000001\")\n .name(\"my-alias\")\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "indices" + ], + "summary": "Create or update an alias", + "description": "Adds a data stream or index to an alias.", + "externalDocs": { + "description": "Aliases", + "url": "https://www.elastic.co/docs/manage-data/data-store/aliases", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-add-alias.html" + }, + "operationId": "indices-put-alias-1", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams or indices to add.\nSupports wildcards (`*`).\nWildcard patterns that match both data streams and indices return an error.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "path", + "name": "name", + "description": "Alias to update.\nIf the alias doesn’t exist, the request creates it.\nIndex alias names support date math.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filter": { + "description": "Query used to limit documents the alias can access.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + } + ] + }, + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "is_write_index": { + "description": "If `true`, sets the write index or data stream for the alias.\nIf an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.\nIf an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.\nData stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.", + "type": "boolean" + }, + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + }, + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.\nData stream aliases don’t support this parameter.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Routing" + } + ] + } + } + }, + "examples": { + "indicesPutAliasRequestExample1": { + "summary": "Filter an alias", + "description": "The filter option uses Query DSL to limit the documents an alias can access.", + "value": "{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + "indicesPutAliasRequestExample2": { + "summary": "Write index", + "description": "You can use is_write_index to specify a write index or data stream for an alias. Elasticsearch routes any write requests for the alias to this index or data stream.", + "value": "{\n \"is_write_index\": true\n}" + }, + "indicesPutAliasRequestExample3": { + "summary": "Routing", + "description": "Use the routing option to route requests for an alias to a specific shard.", + "value": "{\n \"routing\": \"1\"\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n PUT\n /{index}/_alias/{name}\n
\n ", + "
\n POST\n /{index}/_alias/{name}\n
\n " + ], + "x-api": "put_alias.indices", + "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-2099.05.06-000001/_alias/my-alias\n{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_alias(\n index=\"my-index-2099.05.06-000001\",\n name=\"my-alias\",\n filter={\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putAlias({\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n filter: {\n bool: {\n filter: [\n {\n range: {\n \"@timestamp\": {\n gte: \"now-1d/d\",\n lt: \"now/d\",\n },\n },\n },\n {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n ],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_alias(\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n body: {\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putAlias([\n \"index\" => \"my-index-2099.05.06-000001\",\n \"name\" => \"my-alias\",\n \"body\" => [\n \"filter\" => [\n \"bool\" => [\n \"filter\" => array(\n [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"now-1d/d\",\n \"lt\" => \"now/d\",\n ],\n ],\n ],\n [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"filter\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":\"now-1d/d\",\"lt\":\"now/d\"}}},{\"term\":{\"user.id\":\"kimchy\"}}]}}}' \"$ELASTICSEARCH_URL/my-index-2099.05.06-000001/_alias/my-alias\"" + }, + { + "lang": "Java", + "source": "client.indices().putAlias(p -> p\n .filter(f -> f\n .bool(b -> b\n .filter(List.of(Query.of(q -> q\n .range(r -> r\n .untyped(u -> u\n .field(\"@timestamp\")\n .gte(JsonData.fromJson(\"\\\"now-1d/d\\\"\"))\n .lt(JsonData.fromJson(\"\\\"now/d\\\"\"))\n )\n )\n ),Query.of(qu -> qu\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )))\n )\n )\n .index(\"my-index-2099.05.06-000001\")\n .name(\"my-alias\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -29414,6 +35764,36 @@ ], "x-api": "delete_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE my-data-stream/_alias/my-alias\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.delete_alias(\n index=\"my-data-stream\",\n name=\"my-alias\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.deleteAlias({\n index: \"my-data-stream\",\n name: \"my-alias\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.delete_alias(\n index: \"my-data-stream\",\n name: \"my-alias\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->deleteAlias([\n \"index\" => \"my-data-stream\",\n \"name\" => \"my-alias\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-data-stream/_alias/my-alias\"" + }, + { + "lang": "Java", + "source": "client.indices().deleteAlias(d -> d\n .index(\"my-data-stream\")\n .name(\"my-alias\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -29464,7 +35844,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -29506,6 +35886,36 @@ ], "x-api": "exists_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "HEAD _alias/my-alias\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.exists_alias(\n name=\"my-alias\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.existsAlias({\n name: \"my-alias\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.exists_alias(\n name: \"my-alias\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->existsAlias([\n \"name\" => \"my-alias\",\n]);" + }, + { + "lang": "curl", + "source": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_alias/my-alias\"" + }, + { + "lang": "Java", + "source": "client.indices().existsAlias(e -> e\n .name(\"my-alias\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -29654,6 +36064,36 @@ ], "x-api": "put_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-2099.05.06-000001/_alias/my-alias\n{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_alias(\n index=\"my-index-2099.05.06-000001\",\n name=\"my-alias\",\n filter={\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putAlias({\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n filter: {\n bool: {\n filter: [\n {\n range: {\n \"@timestamp\": {\n gte: \"now-1d/d\",\n lt: \"now/d\",\n },\n },\n },\n {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n ],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_alias(\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n body: {\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putAlias([\n \"index\" => \"my-index-2099.05.06-000001\",\n \"name\" => \"my-alias\",\n \"body\" => [\n \"filter\" => [\n \"bool\" => [\n \"filter\" => array(\n [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"now-1d/d\",\n \"lt\" => \"now/d\",\n ],\n ],\n ],\n [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"filter\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":\"now-1d/d\",\"lt\":\"now/d\"}}},{\"term\":{\"user.id\":\"kimchy\"}}]}}}' \"$ELASTICSEARCH_URL/my-index-2099.05.06-000001/_alias/my-alias\"" + }, + { + "lang": "Java", + "source": "client.indices().putAlias(p -> p\n .filter(f -> f\n .bool(b -> b\n .filter(List.of(Query.of(q -> q\n .range(r -> r\n .untyped(u -> u\n .field(\"@timestamp\")\n .gte(JsonData.fromJson(\"\\\"now-1d/d\\\"\"))\n .lt(JsonData.fromJson(\"\\\"now/d\\\"\"))\n )\n )\n ),Query.of(qu -> qu\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )))\n )\n )\n .index(\"my-index-2099.05.06-000001\")\n .name(\"my-alias\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -29800,6 +36240,36 @@ ], "x-api": "put_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-2099.05.06-000001/_alias/my-alias\n{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_alias(\n index=\"my-index-2099.05.06-000001\",\n name=\"my-alias\",\n filter={\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putAlias({\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n filter: {\n bool: {\n filter: [\n {\n range: {\n \"@timestamp\": {\n gte: \"now-1d/d\",\n lt: \"now/d\",\n },\n },\n },\n {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n ],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_alias(\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n body: {\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putAlias([\n \"index\" => \"my-index-2099.05.06-000001\",\n \"name\" => \"my-alias\",\n \"body\" => [\n \"filter\" => [\n \"bool\" => [\n \"filter\" => array(\n [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"now-1d/d\",\n \"lt\" => \"now/d\",\n ],\n ],\n ],\n [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"filter\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":\"now-1d/d\",\"lt\":\"now/d\"}}},{\"term\":{\"user.id\":\"kimchy\"}}]}}}' \"$ELASTICSEARCH_URL/my-index-2099.05.06-000001/_alias/my-alias\"" + }, + { + "lang": "Java", + "source": "client.indices().putAlias(p -> p\n .filter(f -> f\n .bool(b -> b\n .filter(List.of(Query.of(q -> q\n .range(r -> r\n .untyped(u -> u\n .field(\"@timestamp\")\n .gte(JsonData.fromJson(\"\\\"now-1d/d\\\"\"))\n .lt(JsonData.fromJson(\"\\\"now/d\\\"\"))\n )\n )\n ),Query.of(qu -> qu\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )))\n )\n )\n .index(\"my-index-2099.05.06-000001\")\n .name(\"my-alias\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -29879,6 +36349,36 @@ ], "x-api": "delete_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE my-data-stream/_alias/my-alias\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.delete_alias(\n index=\"my-data-stream\",\n name=\"my-alias\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.deleteAlias({\n index: \"my-data-stream\",\n name: \"my-alias\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.delete_alias(\n index: \"my-data-stream\",\n name: \"my-alias\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->deleteAlias([\n \"index\" => \"my-data-stream\",\n \"name\" => \"my-alias\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-data-stream/_alias/my-alias\"" + }, + { + "lang": "Java", + "source": "client.indices().deleteAlias(d -> d\n .index(\"my-data-stream\")\n .name(\"my-alias\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -29914,7 +36414,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -29977,6 +36477,36 @@ ], "x-api": "get_data_lifecycle.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/{name}/_lifecycle?human&pretty\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_data_lifecycle(\n name=\"{name}\",\n human=True,\n pretty=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getDataLifecycle({\n name: \"{name}\",\n human: \"true\",\n pretty: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_data_lifecycle(\n name: \"{name}\",\n human: \"true\",\n pretty: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getDataLifecycle([\n \"name\" => \"{name}\",\n \"human\" => \"true\",\n \"pretty\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/%7Bname%7D/_lifecycle?human&pretty\"" + }, + { + "lang": "Java", + "source": "client.indices().getDataLifecycle(g -> g\n .name(\"{name}\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -30010,7 +36540,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -30113,6 +36643,36 @@ ], "x-api": "put_data_lifecycle.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _data_stream/my-data-stream/_lifecycle\n{\n \"data_retention\": \"7d\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_data_lifecycle(\n name=\"my-data-stream\",\n data_retention=\"7d\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putDataLifecycle({\n name: \"my-data-stream\",\n data_retention: \"7d\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_data_lifecycle(\n name: \"my-data-stream\",\n body: {\n \"data_retention\": \"7d\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putDataLifecycle([\n \"name\" => \"my-data-stream\",\n \"body\" => [\n \"data_retention\" => \"7d\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"data_retention\":\"7d\"}' \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_lifecycle\"" + }, + { + "lang": "Java", + "source": "client.indices().putDataLifecycle(p -> p\n .dataRetention(d -> d\n .time(\"7d\")\n )\n .name(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -30146,7 +36706,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)", + "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -30198,6 +36758,36 @@ ], "x-api": "delete_data_lifecycle.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _data_stream/my-data-stream/_lifecycle\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.delete_data_lifecycle(\n name=\"my-data-stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.deleteDataLifecycle({\n name: \"my-data-stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.delete_data_lifecycle(\n name: \"my-data-stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->deleteDataLifecycle([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_lifecycle\"" + }, + { + "lang": "Java", + "source": "client.indices().deleteDataLifecycle(d -> d\n .name(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -30229,7 +36819,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -30305,7 +36895,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -30400,7 +36990,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether wildcard expressions should get expanded to open or closed indices", + "description": "Whether wildcard expressions should get expanded to open or closed indices\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -30560,6 +37150,36 @@ ], "x-api": "get_index_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_index_template(\n name=\"*\",\n filter_path=\"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getIndexTemplate({\n name: \"*\",\n filter_path:\n \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_index_template(\n name: \"*\",\n filter_path: \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getIndexTemplate([\n \"name\" => \"*\",\n \"filter_path\" => \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\"" + }, + { + "lang": "Java", + "source": "client.indices().getIndexTemplate(g -> g\n .name(\"*\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -30728,6 +37348,36 @@ ], "x-api": "put_index_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_index_template/template_1\n{\n \"index_patterns\" : [\"template*\"],\n \"priority\" : 1,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 2\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_index_template(\n name=\"template_1\",\n index_patterns=[\n \"template*\"\n ],\n priority=1,\n template={\n \"settings\": {\n \"number_of_shards\": 2\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putIndexTemplate({\n name: \"template_1\",\n index_patterns: [\"template*\"],\n priority: 1,\n template: {\n settings: {\n number_of_shards: 2,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_index_template(\n name: \"template_1\",\n body: {\n \"index_patterns\": [\n \"template*\"\n ],\n \"priority\": 1,\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 2\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putIndexTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"index_patterns\" => array(\n \"template*\",\n ),\n \"priority\" => 1,\n \"template\" => [\n \"settings\" => [\n \"number_of_shards\" => 2,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"template*\"],\"priority\":1,\"template\":{\"settings\":{\"number_of_shards\":2}}}' \"$ELASTICSEARCH_URL/_index_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.indices().putIndexTemplate(p -> p\n .indexPatterns(\"template*\")\n .name(\"template_1\")\n .priority(1L)\n .template(t -> t\n .settings(s -> s\n .numberOfShards(\"2\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -30896,6 +37546,36 @@ ], "x-api": "put_index_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_index_template/template_1\n{\n \"index_patterns\" : [\"template*\"],\n \"priority\" : 1,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 2\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_index_template(\n name=\"template_1\",\n index_patterns=[\n \"template*\"\n ],\n priority=1,\n template={\n \"settings\": {\n \"number_of_shards\": 2\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putIndexTemplate({\n name: \"template_1\",\n index_patterns: [\"template*\"],\n priority: 1,\n template: {\n settings: {\n number_of_shards: 2,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_index_template(\n name: \"template_1\",\n body: {\n \"index_patterns\": [\n \"template*\"\n ],\n \"priority\": 1,\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 2\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putIndexTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"index_patterns\" => array(\n \"template*\",\n ),\n \"priority\" => 1,\n \"template\" => [\n \"settings\" => [\n \"number_of_shards\" => 2,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"template*\"],\"priority\":1,\"template\":{\"settings\":{\"number_of_shards\":2}}}' \"$ELASTICSEARCH_URL/_index_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.indices().putIndexTemplate(p -> p\n .indexPatterns(\"template*\")\n .name(\"template_1\")\n .priority(1L)\n .template(t -> t\n .settings(s -> s\n .numberOfShards(\"2\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -30964,6 +37644,36 @@ ], "x-api": "delete_index_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_index_template/my-index-template\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.delete_index_template(\n name=\"my-index-template\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.deleteIndexTemplate({\n name: \"my-index-template\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.delete_index_template(\n name: \"my-index-template\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->deleteIndexTemplate([\n \"name\" => \"my-index-template\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_index_template/my-index-template\"" + }, + { + "lang": "Java", + "source": "client.indices().deleteIndexTemplate(d -> d\n .name(\"my-index-template\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31126,6 +37836,36 @@ ], "x-api": "get_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_template/.monitoring-*\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_template(\n name=\".monitoring-*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getTemplate({\n name: \".monitoring-*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_template(\n name: \".monitoring-*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getTemplate([\n \"name\" => \".monitoring-*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_template/.monitoring-*\"" + }, + { + "lang": "Java", + "source": "client.indices().getTemplate(g -> g\n .name(\".monitoring-*\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31292,6 +38032,36 @@ ], "x-api": "put_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _template/template_1\n{\n \"index_patterns\": [\n \"te*\",\n \"bar*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_template(\n name=\"template_1\",\n index_patterns=[\n \"te*\",\n \"bar*\"\n ],\n settings={\n \"number_of_shards\": 1\n },\n mappings={\n \"_source\": {\n \"enabled\": False\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putTemplate({\n name: \"template_1\",\n index_patterns: [\"te*\", \"bar*\"],\n settings: {\n number_of_shards: 1,\n },\n mappings: {\n _source: {\n enabled: false,\n },\n properties: {\n host_name: {\n type: \"keyword\",\n },\n created_at: {\n type: \"date\",\n format: \"EEE MMM dd HH:mm:ss Z yyyy\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_template(\n name: \"template_1\",\n body: {\n \"index_patterns\": [\n \"te*\",\n \"bar*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"index_patterns\" => array(\n \"te*\",\n \"bar*\",\n ),\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"mappings\" => [\n \"_source\" => [\n \"enabled\" => false,\n ],\n \"properties\" => [\n \"host_name\" => [\n \"type\" => \"keyword\",\n ],\n \"created_at\" => [\n \"type\" => \"date\",\n \"format\" => \"EEE MMM dd HH:mm:ss Z yyyy\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"te*\",\"bar*\"],\"settings\":{\"number_of_shards\":1},\"mappings\":{\"_source\":{\"enabled\":false},\"properties\":{\"host_name\":{\"type\":\"keyword\"},\"created_at\":{\"type\":\"date\",\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\"}}}}' \"$ELASTICSEARCH_URL/_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.indices().putTemplate(p -> p\n .indexPatterns(List.of(\"te*\",\"bar*\"))\n .mappings(m -> m\n .properties(Map.of(\"created_at\", Property.of(pr -> pr\n .date(d -> d\n .format(\"EEE MMM dd HH:mm:ss Z yyyy\")\n )\n ),\"host_name\", Property.of(pro -> pro\n .keyword(k -> k)\n )))\n .source(s -> s\n .enabled(false)\n )\n )\n .name(\"template_1\")\n .settings(s -> s\n .numberOfShards(\"1\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31458,6 +38228,36 @@ ], "x-api": "put_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _template/template_1\n{\n \"index_patterns\": [\n \"te*\",\n \"bar*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_template(\n name=\"template_1\",\n index_patterns=[\n \"te*\",\n \"bar*\"\n ],\n settings={\n \"number_of_shards\": 1\n },\n mappings={\n \"_source\": {\n \"enabled\": False\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putTemplate({\n name: \"template_1\",\n index_patterns: [\"te*\", \"bar*\"],\n settings: {\n number_of_shards: 1,\n },\n mappings: {\n _source: {\n enabled: false,\n },\n properties: {\n host_name: {\n type: \"keyword\",\n },\n created_at: {\n type: \"date\",\n format: \"EEE MMM dd HH:mm:ss Z yyyy\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_template(\n name: \"template_1\",\n body: {\n \"index_patterns\": [\n \"te*\",\n \"bar*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"index_patterns\" => array(\n \"te*\",\n \"bar*\",\n ),\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"mappings\" => [\n \"_source\" => [\n \"enabled\" => false,\n ],\n \"properties\" => [\n \"host_name\" => [\n \"type\" => \"keyword\",\n ],\n \"created_at\" => [\n \"type\" => \"date\",\n \"format\" => \"EEE MMM dd HH:mm:ss Z yyyy\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"te*\",\"bar*\"],\"settings\":{\"number_of_shards\":1},\"mappings\":{\"_source\":{\"enabled\":false},\"properties\":{\"host_name\":{\"type\":\"keyword\"},\"created_at\":{\"type\":\"date\",\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\"}}}}' \"$ELASTICSEARCH_URL/_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.indices().putTemplate(p -> p\n .indexPatterns(List.of(\"te*\",\"bar*\"))\n .mappings(m -> m\n .properties(Map.of(\"created_at\", Property.of(pr -> pr\n .date(d -> d\n .format(\"EEE MMM dd HH:mm:ss Z yyyy\")\n )\n ),\"host_name\", Property.of(pro -> pro\n .keyword(k -> k)\n )))\n .source(s -> s\n .enabled(false)\n )\n )\n .name(\"template_1\")\n .settings(s -> s\n .numberOfShards(\"1\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31527,6 +38327,36 @@ ], "x-api": "delete_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _template/.cloud-hot-warm-allocation-0\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.delete_template(\n name=\".cloud-hot-warm-allocation-0\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.deleteTemplate({\n name: \".cloud-hot-warm-allocation-0\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.delete_template(\n name: \".cloud-hot-warm-allocation-0\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->deleteTemplate([\n \"name\" => \".cloud-hot-warm-allocation-0\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_template/.cloud-hot-warm-allocation-0\"" + }, + { + "lang": "Java", + "source": "client.indices().deleteTemplate(d -> d\n .name(\".cloud-hot-warm-allocation-0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31605,6 +38435,36 @@ ], "x-api": "exists_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "HEAD /_template/template_1\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.exists_template(\n name=\"template_1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.existsTemplate({\n name: \"template_1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.exists_template(\n name: \"template_1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->existsTemplate([\n \"name\" => \"template_1\",\n]);" + }, + { + "lang": "curl", + "source": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_template/template_1\"" + }, + { + "lang": "Java", + "source": "client.indices().existsTemplate(e -> e\n .name(\"template_1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31650,7 +38510,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -31712,6 +38572,36 @@ ], "x-api": "disk_usage.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_disk_usage?run_expensive_tasks=true\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.disk_usage(\n index=\"my-index-000001\",\n run_expensive_tasks=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.diskUsage({\n index: \"my-index-000001\",\n run_expensive_tasks: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.disk_usage(\n index: \"my-index-000001\",\n run_expensive_tasks: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->diskUsage([\n \"index\" => \"my-index-000001\",\n \"run_expensive_tasks\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_disk_usage?run_expensive_tasks=true\"" + }, + { + "lang": "Java", + "source": "client.indices().diskUsage(d -> d\n .index(\"my-index-000001\")\n .runExpensiveTasks(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31785,6 +38675,36 @@ ], "x-api": "downsample.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-time-series-index/_downsample/my-downsampled-time-series-index\n{\n \"fixed_interval\": \"1d\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.downsample(\n index=\"my-time-series-index\",\n target_index=\"my-downsampled-time-series-index\",\n config={\n \"fixed_interval\": \"1d\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.downsample({\n index: \"my-time-series-index\",\n target_index: \"my-downsampled-time-series-index\",\n config: {\n fixed_interval: \"1d\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.downsample(\n index: \"my-time-series-index\",\n target_index: \"my-downsampled-time-series-index\",\n body: {\n \"fixed_interval\": \"1d\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->downsample([\n \"index\" => \"my-time-series-index\",\n \"target_index\" => \"my-downsampled-time-series-index\",\n \"body\" => [\n \"fixed_interval\" => \"1d\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fixed_interval\":\"1d\"}' \"$ELASTICSEARCH_URL/my-time-series-index/_downsample/my-downsampled-time-series-index\"" + }, + { + "lang": "Java", + "source": "client.indices().downsample(d -> d\n .index(\"my-time-series-index\")\n .targetIndex(\"my-downsampled-time-series-index\")\n .config(c -> c\n .fixedInterval(f -> f\n .time(\"1d\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31826,7 +38746,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -31878,6 +38798,36 @@ ], "x-api": "get_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _alias\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_alias()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getAlias();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_alias" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getAlias();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_alias\"" + }, + { + "lang": "Java", + "source": "client.indices().getAlias(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -31917,7 +38867,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -31959,6 +38909,36 @@ ], "x-api": "exists_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "HEAD _alias/my-alias\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.exists_alias(\n name=\"my-alias\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.existsAlias({\n name: \"my-alias\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.exists_alias(\n name: \"my-alias\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->existsAlias([\n \"name\" => \"my-alias\",\n]);" + }, + { + "lang": "curl", + "source": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_alias/my-alias\"" + }, + { + "lang": "Java", + "source": "client.indices().existsAlias(e -> e\n .name(\"my-alias\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32053,6 +39033,36 @@ ], "x-api": "explain_data_lifecycle.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET .ds-metrics-2023.03.22-000001/_lifecycle/explain\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.explain_data_lifecycle(\n index=\".ds-metrics-2023.03.22-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.explainDataLifecycle({\n index: \".ds-metrics-2023.03.22-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.explain_data_lifecycle(\n index: \".ds-metrics-2023.03.22-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->explainDataLifecycle([\n \"index\" => \".ds-metrics-2023.03.22-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/.ds-metrics-2023.03.22-000001/_lifecycle/explain\"" + }, + { + "lang": "Java", + "source": "client.indices().explainDataLifecycle(e -> e\n .index(\".ds-metrics-2023.03.22-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32094,7 +39104,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32149,6 +39159,36 @@ ], "x-api": "field_usage_stats.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_field_usage_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.field_usage_stats(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.fieldUsageStats({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.field_usage_stats(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->fieldUsageStats([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_field_usage_stats\"" + }, + { + "lang": "Java", + "source": "client.indices().fieldUsageStats(f -> f\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32179,7 +39219,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32239,6 +39279,36 @@ ], "x-api": "flush.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_flush\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.flush()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.flush();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.flush" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->flush();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_flush\"" + }, + { + "lang": "Java", + "source": "client.indices().flush(f -> f);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32267,7 +39337,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32327,6 +39397,36 @@ ], "x-api": "flush.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_flush\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.flush()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.flush();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.flush" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->flush();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_flush\"" + }, + { + "lang": "Java", + "source": "client.indices().flush(f -> f);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32368,7 +39468,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32428,6 +39528,36 @@ ], "x-api": "flush.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_flush\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.flush()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.flush();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.flush" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->flush();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_flush\"" + }, + { + "lang": "Java", + "source": "client.indices().flush(f -> f);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32467,7 +39597,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32527,6 +39657,36 @@ ], "x-api": "flush.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_flush\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.flush()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.flush();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.flush" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->flush();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_flush\"" + }, + { + "lang": "Java", + "source": "client.indices().flush(f -> f);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32561,7 +39721,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32640,6 +39800,36 @@ ], "x-api": "forcemerge.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-000001/_forcemerge\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.forcemerge(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.forcemerge({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.forcemerge(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->forcemerge([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_forcemerge\"" + }, + { + "lang": "Java", + "source": "client.indices().forcemerge(f -> f\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32685,7 +39875,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32764,6 +39954,36 @@ ], "x-api": "forcemerge.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-000001/_forcemerge\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.forcemerge(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.forcemerge({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.forcemerge(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->forcemerge([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_forcemerge\"" + }, + { + "lang": "Java", + "source": "client.indices().forcemerge(f -> f\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32794,7 +40014,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32846,6 +40066,36 @@ ], "x-api": "get_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _alias\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_alias()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getAlias();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_alias" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getAlias();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_alias\"" + }, + { + "lang": "Java", + "source": "client.indices().getAlias(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -32887,7 +40137,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -32939,6 +40189,36 @@ ], "x-api": "get_alias.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _alias\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_alias()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getAlias();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_alias" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getAlias();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_alias\"" + }, + { + "lang": "Java", + "source": "client.indices().getAlias(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33019,6 +40299,36 @@ ], "x-api": "get_data_lifecycle_stats.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _lifecycle/stats?human&pretty\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_data_lifecycle_stats(\n human=True,\n pretty=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getDataLifecycleStats({\n human: \"true\",\n pretty: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_data_lifecycle_stats(\n human: \"true\",\n pretty: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getDataLifecycleStats([\n \"human\" => \"true\",\n \"pretty\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_lifecycle/stats?human&pretty\"" + }, + { + "lang": "Java", + "source": "client.indices().getDataLifecycleStats();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33039,7 +40349,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -33116,6 +40426,36 @@ ], "x-api": "get_data_stream.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _data_stream/my-data-stream\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_data_stream(\n name=\"my-data-stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getDataStream({\n name: \"my-data-stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_data_stream(\n name: \"my-data-stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getDataStream([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream\"" + }, + { + "lang": "Java", + "source": "client.indices().getDataStream(g -> g\n .name(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33194,6 +40534,36 @@ ], "x-api": "get_data_stream_mappings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/my-data-stream/_mappings\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_data_stream_mappings(\n name=\"my-data-stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getDataStreamMappings({\n name: \"my-data-stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_data_stream_mappings(\n name: \"my-data-stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getDataStreamMappings([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_mappings\"" + }, + { + "lang": "Java", + "source": "client.indices().getDataStreamMappings(g -> g\n .name(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33312,6 +40682,36 @@ ], "x-api": "put_data_stream_mappings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_data_stream/my-data-stream/_mappings\n{\n \"properties\":{\n \"field1\":{\n \"type\":\"ip\"\n },\n \"field3\":{\n \"type\":\"text\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_data_stream_mappings(\n name=\"my-data-stream\",\n mappings={\n \"properties\": {\n \"field1\": {\n \"type\": \"ip\"\n },\n \"field3\": {\n \"type\": \"text\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putDataStreamMappings({\n name: \"my-data-stream\",\n mappings: {\n properties: {\n field1: {\n type: \"ip\",\n },\n field3: {\n type: \"text\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_data_stream_mappings(\n name: \"my-data-stream\",\n body: {\n \"properties\": {\n \"field1\": {\n \"type\": \"ip\"\n },\n \"field3\": {\n \"type\": \"text\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putDataStreamMappings([\n \"name\" => \"my-data-stream\",\n \"body\" => [\n \"properties\" => [\n \"field1\" => [\n \"type\" => \"ip\",\n ],\n \"field3\" => [\n \"type\" => \"text\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"properties\":{\"field1\":{\"type\":\"ip\"},\"field3\":{\"type\":\"text\"}}}' \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_mappings\"" + }, + { + "lang": "Java", + "source": "client.indices().putDataStreamMappings(p -> p\n .name(\"my-data-stream\")\n .mappings(m -> m\n .properties(Map.of(\"field1\", Property.of(pr -> pr\n .ip(i -> i)\n ),\"field3\", Property.of(pro -> pro\n .text(t -> t)\n )))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33390,6 +40790,36 @@ ], "x-api": "get_data_stream_settings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/my-data-stream/_settings\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_data_stream_settings(\n name=\"my-data-stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getDataStreamSettings({\n name: \"my-data-stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_data_stream_settings(\n name: \"my-data-stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getDataStreamSettings([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_settings\"" + }, + { + "lang": "Java", + "source": "client.indices().getDataStreamSettings(g -> g\n .name(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33513,6 +40943,36 @@ ], "x-api": "put_data_stream_settings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_data_stream/my-data-stream/_settings\n{\n \"index.lifecycle.name\" : \"new-test-policy\",\n \"index.number_of_shards\": 11\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_data_stream_settings(\n name=\"my-data-stream\",\n settings={\n \"index.lifecycle.name\": \"new-test-policy\",\n \"index.number_of_shards\": 11\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putDataStreamSettings({\n name: \"my-data-stream\",\n settings: {\n \"index.lifecycle.name\": \"new-test-policy\",\n \"index.number_of_shards\": 11,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_data_stream_settings(\n name: \"my-data-stream\",\n body: {\n \"index.lifecycle.name\": \"new-test-policy\",\n \"index.number_of_shards\": 11\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putDataStreamSettings([\n \"name\" => \"my-data-stream\",\n \"body\" => [\n \"index.lifecycle.name\" => \"new-test-policy\",\n \"index.number_of_shards\" => 11,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index.lifecycle.name\":\"new-test-policy\",\"index.number_of_shards\":11}' \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_settings\"" + }, + { + "lang": "Java", + "source": "client.indices().putDataStreamSettings(p -> p\n .name(\"my-data-stream\")\n .settings(s -> s\n .otherSettings(Map.of(\"index.lifecycle.name\", JsonData.fromJson(\"\\\"new-test-policy\\\"\"),\"index.number_of_shards\", JsonData.fromJson(\"11\")))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33554,7 +41014,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -33623,6 +41083,36 @@ ], "x-api": "get_field_mapping.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET publications/_mapping/field/title\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_field_mapping(\n index=\"publications\",\n fields=\"title\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getFieldMapping({\n index: \"publications\",\n fields: \"title\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_field_mapping(\n index: \"publications\",\n fields: \"title\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getFieldMapping([\n \"index\" => \"publications\",\n \"fields\" => \"title\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/publications/_mapping/field/title\"" + }, + { + "lang": "Java", + "source": "client.indices().getFieldMapping(g -> g\n .fields(\"title\")\n .index(\"publications\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33675,7 +41165,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -33744,6 +41234,36 @@ ], "x-api": "get_field_mapping.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET publications/_mapping/field/title\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_field_mapping(\n index=\"publications\",\n fields=\"title\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getFieldMapping({\n index: \"publications\",\n fields: \"title\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_field_mapping(\n index: \"publications\",\n fields: \"title\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getFieldMapping([\n \"index\" => \"publications\",\n \"fields\" => \"title\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/publications/_mapping/field/title\"" + }, + { + "lang": "Java", + "source": "client.indices().getFieldMapping(g -> g\n .fields(\"title\")\n .index(\"publications\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33841,6 +41361,36 @@ ], "x-api": "get_index_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_index_template(\n name=\"*\",\n filter_path=\"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getIndexTemplate({\n name: \"*\",\n filter_path:\n \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_index_template(\n name: \"*\",\n filter_path: \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getIndexTemplate([\n \"name\" => \"*\",\n \"filter_path\" => \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\"" + }, + { + "lang": "Java", + "source": "client.indices().getIndexTemplate(g -> g\n .name(\"*\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33871,7 +41421,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -33933,6 +41483,36 @@ ], "x-api": "get_mapping.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /books/_mapping\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_mapping(\n index=\"books\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getMapping({\n index: \"books\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_mapping(\n index: \"books\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getMapping([\n \"index\" => \"books\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/books/_mapping\"" + }, + { + "lang": "Java", + "source": "client.indices().getMapping(g -> g\n .index(\"books\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -33974,7 +41554,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -34036,6 +41616,36 @@ ], "x-api": "get_mapping.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /books/_mapping\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_mapping(\n index=\"books\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getMapping({\n index: \"books\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_mapping(\n index: \"books\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getMapping([\n \"index\" => \"books\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/books/_mapping\"" + }, + { + "lang": "Java", + "source": "client.indices().getMapping(g -> g\n .index(\"books\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -34079,7 +41689,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -34251,6 +41861,36 @@ ], "x-api": "put_mapping.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /my-index-000001/_mapping\n{\n \"properties\": {\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_mapping(\n index=\"my-index-000001\",\n properties={\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putMapping({\n index: \"my-index-000001\",\n properties: {\n user: {\n properties: {\n name: {\n type: \"keyword\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_mapping(\n index: \"my-index-000001\",\n body: {\n \"properties\": {\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putMapping([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"properties\" => [\n \"user\" => [\n \"properties\" => [\n \"name\" => [\n \"type\" => \"keyword\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"properties\":{\"user\":{\"properties\":{\"name\":{\"type\":\"keyword\"}}}}}' \"$ELASTICSEARCH_URL/my-index-000001/_mapping\"" + }, + { + "lang": "Java", + "source": "client.indices().putMapping(p -> p\n .index(\"my-index-000001\")\n .properties(\"user\", pr -> pr\n .object(o -> o\n .properties(\"name\", pro -> pro\n .keyword(k -> k)\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -34294,7 +41934,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -34466,6 +42106,36 @@ ], "x-api": "put_mapping.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /my-index-000001/_mapping\n{\n \"properties\": {\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_mapping(\n index=\"my-index-000001\",\n properties={\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putMapping({\n index: \"my-index-000001\",\n properties: {\n user: {\n properties: {\n name: {\n type: \"keyword\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_mapping(\n index: \"my-index-000001\",\n body: {\n \"properties\": {\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putMapping([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"properties\" => [\n \"user\" => [\n \"properties\" => [\n \"name\" => [\n \"type\" => \"keyword\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"properties\":{\"user\":{\"properties\":{\"name\":{\"type\":\"keyword\"}}}}}' \"$ELASTICSEARCH_URL/my-index-000001/_mapping\"" + }, + { + "lang": "Java", + "source": "client.indices().putMapping(p -> p\n .index(\"my-index-000001\")\n .properties(\"user\", pr -> pr\n .object(o -> o\n .properties(\"name\", pro -> pro\n .keyword(k -> k)\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -34569,6 +42239,36 @@ ], "x-api": "get_migrate_reindex_status.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_migration/reindex/my-data-stream/_status\n" + }, + { + "lang": "Python", + "source": "resp = client.perform_request(\n \"GET\",\n \"/_migration/reindex/my-data-stream/_status\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transport.request({\n method: \"GET\",\n path: \"/_migration/reindex/my-data-stream/_status\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.perform_request(\n \"GET\",\n \"/_migration/reindex/my-data-stream/_status\",\n {},\n)" + }, + { + "lang": "PHP", + "source": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$request = $requestFactory->createRequest(\n \"GET\",\n \"/_migration/reindex/my-data-stream/_status\",\n);\n$resp = $client->sendRequest($request);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/reindex/my-data-stream/_status\"" + }, + { + "lang": "Java", + "source": "client.indices().getMigrateReindexStatus(g -> g\n .index(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -34599,7 +42299,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -34681,6 +42381,36 @@ ], "x-api": "get_settings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_settings(\n index=\"_all\",\n expand_wildcards=\"all\",\n filter_path=\"*.settings.index.*.slowlog\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getSettings({\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_settings(\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getSettings([\n \"index\" => \"_all\",\n \"expand_wildcards\" => \"all\",\n \"filter_path\" => \"*.settings.index.*.slowlog\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\"" + }, + { + "lang": "Java", + "source": "client.indices().getSettings(g -> g\n .expandWildcards(\"all\")\n .index(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -34713,7 +42443,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target\ndata streams, this argument determines whether wildcard expressions match\nhidden data streams. Supports comma-separated values, such as\n`open,hidden`.", + "description": "Type of index that wildcard patterns can match. If the request can target\ndata streams, this argument determines whether wildcard expressions match\nhidden data streams. Supports comma-separated values, such as\n`open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -34828,6 +42558,36 @@ ], "x-api": "put_settings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /my-index-000001/_settings\n{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_settings(\n index=\"my-index-000001\",\n settings={\n \"index\": {\n \"number_of_replicas\": 2\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putSettings({\n index: \"my-index-000001\",\n settings: {\n index: {\n number_of_replicas: 2,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_settings(\n index: \"my-index-000001\",\n body: {\n \"index\": {\n \"number_of_replicas\": 2\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putSettings([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"index\" => [\n \"number_of_replicas\" => 2,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":{\"number_of_replicas\":2}}' \"$ELASTICSEARCH_URL/my-index-000001/_settings\"" + }, + { + "lang": "Java", + "source": "client.indices().putSettings(p -> p\n .index(\"my-index-000001\")\n .settings(s -> s\n .index(i -> i\n .numberOfReplicas(\"2\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -34869,7 +42629,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -34951,6 +42711,36 @@ ], "x-api": "get_settings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_settings(\n index=\"_all\",\n expand_wildcards=\"all\",\n filter_path=\"*.settings.index.*.slowlog\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getSettings({\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_settings(\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getSettings([\n \"index\" => \"_all\",\n \"expand_wildcards\" => \"all\",\n \"filter_path\" => \"*.settings.index.*.slowlog\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\"" + }, + { + "lang": "Java", + "source": "client.indices().getSettings(g -> g\n .expandWildcards(\"all\")\n .index(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -34994,7 +42784,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target\ndata streams, this argument determines whether wildcard expressions match\nhidden data streams. Supports comma-separated values, such as\n`open,hidden`.", + "description": "Type of index that wildcard patterns can match. If the request can target\ndata streams, this argument determines whether wildcard expressions match\nhidden data streams. Supports comma-separated values, such as\n`open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -35109,6 +42899,36 @@ ], "x-api": "put_settings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /my-index-000001/_settings\n{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.put_settings(\n index=\"my-index-000001\",\n settings={\n \"index\": {\n \"number_of_replicas\": 2\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.putSettings({\n index: \"my-index-000001\",\n settings: {\n index: {\n number_of_replicas: 2,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.put_settings(\n index: \"my-index-000001\",\n body: {\n \"index\": {\n \"number_of_replicas\": 2\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->putSettings([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"index\" => [\n \"number_of_replicas\" => 2,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":{\"number_of_replicas\":2}}' \"$ELASTICSEARCH_URL/my-index-000001/_settings\"" + }, + { + "lang": "Java", + "source": "client.indices().putSettings(p -> p\n .index(\"my-index-000001\")\n .settings(s -> s\n .index(i -> i\n .numberOfReplicas(\"2\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35161,7 +42981,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -35243,6 +43063,36 @@ ], "x-api": "get_settings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_settings(\n index=\"_all\",\n expand_wildcards=\"all\",\n filter_path=\"*.settings.index.*.slowlog\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getSettings({\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_settings(\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getSettings([\n \"index\" => \"_all\",\n \"expand_wildcards\" => \"all\",\n \"filter_path\" => \"*.settings.index.*.slowlog\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\"" + }, + { + "lang": "Java", + "source": "client.indices().getSettings(g -> g\n .expandWildcards(\"all\")\n .index(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35284,7 +43134,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -35366,6 +43216,36 @@ ], "x-api": "get_settings.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_settings(\n index=\"_all\",\n expand_wildcards=\"all\",\n filter_path=\"*.settings.index.*.slowlog\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getSettings({\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_settings(\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getSettings([\n \"index\" => \"_all\",\n \"expand_wildcards\" => \"all\",\n \"filter_path\" => \"*.settings.index.*.slowlog\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\"" + }, + { + "lang": "Java", + "source": "client.indices().getSettings(g -> g\n .expandWildcards(\"all\")\n .index(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35443,6 +43323,36 @@ ], "x-api": "get_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_template/.monitoring-*\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.get_template(\n name=\".monitoring-*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.getTemplate({\n name: \".monitoring-*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.get_template(\n name: \".monitoring-*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->getTemplate([\n \"name\" => \".monitoring-*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_template/.monitoring-*\"" + }, + { + "lang": "Java", + "source": "client.indices().getTemplate(g -> g\n .name(\".monitoring-*\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35493,6 +43403,36 @@ ], "x-api": "migrate_reindex.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _migration/reindex\n{\n \"source\": {\n \"index\": \"my-data-stream\"\n },\n \"mode\": \"upgrade\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.perform_request(\n \"POST\",\n \"/_migration/reindex\",\n headers={\"Content-Type\": \"application/json\"},\n body={\n \"source\": {\n \"index\": \"my-data-stream\"\n },\n \"mode\": \"upgrade\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_migration/reindex\",\n body: {\n source: {\n index: \"my-data-stream\",\n },\n mode: \"upgrade\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.perform_request(\n \"POST\",\n \"/_migration/reindex\",\n {},\n {\n \"source\": {\n \"index\": \"my-data-stream\"\n },\n \"mode\": \"upgrade\"\n },\n { \"Content-Type\": \"application/json\" },\n)" + }, + { + "lang": "PHP", + "source": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$streamFactory = Psr17FactoryDiscovery::findStreamFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_migration/reindex\",\n);\n$request = $request->withHeader(\"Content-Type\", \"application/json\");\n$request = $request->withBody($streamFactory->createStream(\n json_encode([\n \"source\" => [\n \"index\" => \"my-data-stream\",\n ],\n \"mode\" => \"upgrade\",\n ]),\n));\n$resp = $client->sendRequest($request);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-data-stream\"},\"mode\":\"upgrade\"}' \"$ELASTICSEARCH_URL/_migration/reindex\"" + }, + { + "lang": "Java", + "source": "client.indices().migrateReindex(m -> m\n .reindex(r -> r\n .mode(ModeEnum.Upgrade)\n .source(s -> s\n .index(\"my-data-stream\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35563,6 +43503,36 @@ ], "x-api": "migrate_to_data_stream.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _data_stream/_migrate/my-time-series-data\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.migrate_to_data_stream(\n name=\"my-time-series-data\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.migrateToDataStream({\n name: \"my-time-series-data\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.migrate_to_data_stream(\n name: \"my-time-series-data\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->migrateToDataStream([\n \"name\" => \"my-time-series-data\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/_migrate/my-time-series-data\"" + }, + { + "lang": "Java", + "source": "client.indices().migrateToDataStream(m -> m\n .name(\"my-time-series-data\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35625,6 +43595,36 @@ ], "x-api": "modify_data_stream.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _data_stream/_modify\n{\n \"actions\": [\n {\n \"remove_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001\"\n }\n },\n {\n \"add_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001-downsample\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.modify_data_stream(\n actions=[\n {\n \"remove_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001\"\n }\n },\n {\n \"add_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001-downsample\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.modifyDataStream({\n actions: [\n {\n remove_backing_index: {\n data_stream: \"my-data-stream\",\n index: \".ds-my-data-stream-2023.07.26-000001\",\n },\n },\n {\n add_backing_index: {\n data_stream: \"my-data-stream\",\n index: \".ds-my-data-stream-2023.07.26-000001-downsample\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.modify_data_stream(\n body: {\n \"actions\": [\n {\n \"remove_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001\"\n }\n },\n {\n \"add_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001-downsample\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->modifyDataStream([\n \"body\" => [\n \"actions\" => array(\n [\n \"remove_backing_index\" => [\n \"data_stream\" => \"my-data-stream\",\n \"index\" => \".ds-my-data-stream-2023.07.26-000001\",\n ],\n ],\n [\n \"add_backing_index\" => [\n \"data_stream\" => \"my-data-stream\",\n \"index\" => \".ds-my-data-stream-2023.07.26-000001-downsample\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"actions\":[{\"remove_backing_index\":{\"data_stream\":\"my-data-stream\",\"index\":\".ds-my-data-stream-2023.07.26-000001\"}},{\"add_backing_index\":{\"data_stream\":\"my-data-stream\",\"index\":\".ds-my-data-stream-2023.07.26-000001-downsample\"}}]}' \"$ELASTICSEARCH_URL/_data_stream/_modify\"" + }, + { + "lang": "Java", + "source": "client.indices().modifyDataStream(m -> m\n .actions(List.of(Action.of(a -> a\n .removeBackingIndex(r -> r\n .dataStream(\"my-data-stream\")\n .index(\".ds-my-data-stream-2023.07.26-000001\")\n )\n ),Action.of(ac -> ac\n .addBackingIndex(ad -> ad\n .dataStream(\"my-data-stream\")\n .index(\".ds-my-data-stream-2023.07.26-000001-downsample\")\n )\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35666,7 +43666,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -35753,6 +43753,36 @@ ], "x-api": "open.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /.ds-my-data-stream-2099.03.07-000001/_open/\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.open(\n index=\".ds-my-data-stream-2099.03.07-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.open({\n index: \".ds-my-data-stream-2099.03.07-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.open(\n index: \".ds-my-data-stream-2099.03.07-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->open([\n \"index\" => \".ds-my-data-stream-2099.03.07-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/.ds-my-data-stream-2099.03.07-000001/_open/\"" + }, + { + "lang": "Java", + "source": "client.indices().open(o -> o\n .index(\".ds-my-data-stream-2099.03.07-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35810,6 +43840,36 @@ ], "x-api": "promote_data_stream.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_data_stream/_promote/my-data-stream\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.promote_data_stream(\n name=\"my-data-stream\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.promoteDataStream({\n name: \"my-data-stream\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.promote_data_stream(\n name: \"my-data-stream\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->promoteDataStream([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/_promote/my-data-stream\"" + }, + { + "lang": "Java", + "source": "client.indices().promoteDataStream(p -> p\n .name(\"my-data-stream\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35860,7 +43920,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -35914,6 +43974,36 @@ ], "x-api": "recovery.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_recovery?human\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.recovery(\n human=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.recovery({\n human: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.recovery(\n human: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->recovery([\n \"human\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_recovery?human\"" + }, + { + "lang": "Java", + "source": "client.indices().recovery(r -> r);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -35975,7 +44065,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36029,6 +44119,36 @@ ], "x-api": "recovery.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_recovery?human\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.recovery(\n human=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.recovery({\n human: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.recovery(\n human: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->recovery([\n \"human\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_recovery?human\"" + }, + { + "lang": "Java", + "source": "client.indices().recovery(r -> r);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36059,7 +44179,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36099,6 +44219,36 @@ ], "x-api": "refresh.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _refresh\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.refresh()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.refresh();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.refresh" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->refresh();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_refresh\"" + }, + { + "lang": "Java", + "source": "client.indices().refresh(r -> r);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36127,7 +44277,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36167,6 +44317,36 @@ ], "x-api": "refresh.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _refresh\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.refresh()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.refresh();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.refresh" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->refresh();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_refresh\"" + }, + { + "lang": "Java", + "source": "client.indices().refresh(r -> r);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36208,7 +44388,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36248,6 +44428,36 @@ ], "x-api": "refresh.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _refresh\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.refresh()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.refresh();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.refresh" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->refresh();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_refresh\"" + }, + { + "lang": "Java", + "source": "client.indices().refresh(r -> r);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36287,7 +44497,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36327,6 +44537,36 @@ ], "x-api": "refresh.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _refresh\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.refresh()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.refresh();" + }, + { + "lang": "Ruby", + "source": "response = client.indices.refresh" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->refresh();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_refresh\"" + }, + { + "lang": "Java", + "source": "client.indices().refresh(r -> r);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36372,7 +44612,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36428,6 +44668,36 @@ ], "x-api": "reload_search_analyzers.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_reload_search_analyzers\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.reload_search_analyzers(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.reloadSearchAnalyzers({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.reload_search_analyzers(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->reloadSearchAnalyzers([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_reload_search_analyzers\"" + }, + { + "lang": "Java", + "source": "client.indices().reloadSearchAnalyzers(r -> r\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36471,7 +44741,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36527,6 +44797,36 @@ ], "x-api": "reload_search_analyzers.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_reload_search_analyzers\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.reload_search_analyzers(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.reloadSearchAnalyzers({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.reload_search_analyzers(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->reloadSearchAnalyzers([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_reload_search_analyzers\"" + }, + { + "lang": "Java", + "source": "client.indices().reloadSearchAnalyzers(r -> r\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36557,7 +44857,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36631,6 +44931,36 @@ ], "x-api": "resolve_cluster.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.resolve_cluster(\n name=\"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable=False,\n timeout=\"5s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.resolveCluster({\n name: \"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable: \"false\",\n timeout: \"5s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.resolve_cluster(\n name: \"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable: \"false\",\n timeout: \"5s\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->resolveCluster([\n \"name\" => \"not-present,clust*:my-index*,oldcluster:*\",\n \"ignore_unavailable\" => \"false\",\n \"timeout\" => \"5s\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s\"" + }, + { + "lang": "Java", + "source": "client.indices().resolveCluster(r -> r\n .ignoreUnavailable(false)\n .name(List.of(\"not-present\",\"clust*:my-index*\",\"oldcluster:*\"))\n .timeout(t -> t\n .offset(5)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36672,7 +45002,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nNOTE: This option is only supported when specifying an index expression. You will get an error if you specify index\noptions to the `_resolve/cluster` API endpoint that takes no index expression.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36746,6 +45076,36 @@ ], "x-api": "resolve_cluster.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.resolve_cluster(\n name=\"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable=False,\n timeout=\"5s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.resolveCluster({\n name: \"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable: \"false\",\n timeout: \"5s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.resolve_cluster(\n name: \"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable: \"false\",\n timeout: \"5s\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->resolveCluster([\n \"name\" => \"not-present,clust*:my-index*,oldcluster:*\",\n \"ignore_unavailable\" => \"false\",\n \"timeout\" => \"5s\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s\"" + }, + { + "lang": "Java", + "source": "client.indices().resolveCluster(r -> r\n .ignoreUnavailable(false)\n .name(List.of(\"not-present\",\"clust*:my-index*\",\"oldcluster:*\"))\n .timeout(t -> t\n .offset(5)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36777,7 +45137,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36807,7 +45167,7 @@ { "in": "query", "name": "mode", - "description": "Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.", + "description": "Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.\n\nSupported values include: `standard`, `time_series`, `logsdb`, `lookup`\n\n", "deprecated": false, "schema": { "oneOf": [ @@ -36888,6 +45248,36 @@ ], "x-api": "resolve_index.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.resolve_index(\n name=\"f*,remoteCluster1:bar*\",\n expand_wildcards=\"all\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.resolveIndex({\n name: \"f*,remoteCluster1:bar*\",\n expand_wildcards: \"all\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.resolve_index(\n name: \"f*,remoteCluster1:bar*\",\n expand_wildcards: \"all\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->resolveIndex([\n \"name\" => \"f*,remoteCluster1:bar*\",\n \"expand_wildcards\" => \"all\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all\"" + }, + { + "lang": "Java", + "source": "client.indices().resolveIndex(r -> r\n .expandWildcards(\"all\")\n .name(List.of(\"f*\",\"remoteCluster1:bar*\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -36917,7 +45307,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -36947,7 +45337,7 @@ { "in": "query", "name": "mode", - "description": "Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.", + "description": "Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.\n\nSupported values include: `standard`, `time_series`, `logsdb`, `lookup`\n\n", "deprecated": false, "schema": { "oneOf": [ @@ -37028,6 +45418,36 @@ ], "x-api": "resolve_index.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.resolve_index(\n name=\"f*,remoteCluster1:bar*\",\n expand_wildcards=\"all\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.resolveIndex({\n name: \"f*,remoteCluster1:bar*\",\n expand_wildcards: \"all\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.resolve_index(\n name: \"f*,remoteCluster1:bar*\",\n expand_wildcards: \"all\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->resolveIndex([\n \"name\" => \"f*,remoteCluster1:bar*\",\n \"expand_wildcards\" => \"all\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all\"" + }, + { + "lang": "Java", + "source": "client.indices().resolveIndex(r -> r\n .expandWildcards(\"all\")\n .name(List.of(\"f*\",\"remoteCluster1:bar*\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -37222,6 +45642,36 @@ ], "x-api": "rollover.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-data-stream/_rollover\n{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.rollover(\n alias=\"my-data-stream\",\n conditions={\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.rollover({\n alias: \"my-data-stream\",\n conditions: {\n max_age: \"7d\",\n max_docs: 1000,\n max_primary_shard_size: \"50gb\",\n max_primary_shard_docs: \"2000\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.rollover(\n alias: \"my-data-stream\",\n body: {\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->rollover([\n \"alias\" => \"my-data-stream\",\n \"body\" => [\n \"conditions\" => [\n \"max_age\" => \"7d\",\n \"max_docs\" => 1000,\n \"max_primary_shard_size\" => \"50gb\",\n \"max_primary_shard_docs\" => \"2000\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"conditions\":{\"max_age\":\"7d\",\"max_docs\":1000,\"max_primary_shard_size\":\"50gb\",\"max_primary_shard_docs\":\"2000\"}}' \"$ELASTICSEARCH_URL/my-data-stream/_rollover\"" + }, + { + "lang": "Java", + "source": "client.indices().rollover(r -> r\n .alias(\"my-data-stream\")\n .conditions(c -> c\n .maxAge(m -> m\n .time(\"7d\")\n )\n .maxDocs(1000L)\n .maxPrimaryShardSize(\"50gb\")\n .maxPrimaryShardDocs(2000L)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -37427,100 +45877,36 @@ ], "x-api": "rollover.indices", "x-category": "management", - "x-metaTags": [ + "x-codeSamples": [ { - "content": "Elasticsearch", - "name": "product_name" - } - ] - } - }, - "/_segments": { - "get": { - "tags": [ - "indices" - ], - "summary": "Get index segments", - "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the stream's backing indices.", - "operationId": "indices-segments", - "parameters": [ + "lang": "Console", + "source": "POST my-data-stream/_rollover\n{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n }\n}" + }, { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "lang": "Python", + "source": "resp = client.indices.rollover(\n alias=\"my-data-stream\",\n conditions={\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n },\n)" }, { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ExpandWildcards" - }, - "style": "form" + "lang": "JavaScript", + "source": "const response = await client.indices.rollover({\n alias: \"my-data-stream\",\n conditions: {\n max_age: \"7d\",\n max_docs: 1000,\n max_primary_shard_size: \"50gb\",\n max_primary_shard_docs: \"2000\",\n },\n});" }, { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "indices": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices.segments.IndexSegment" - } - }, - "_shards": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.ShardStatistics" - } - ] - } - }, - "required": [ - "indices", - "_shards" - ] - }, - "examples": { - "indicesSegmentsResponseExample1": { - "description": "A response describing information about index segments.", - "value": "{\n \"_shards\": {\n \"total\": 2,\n \"successful\": 2,\n \"failed\": 0\n },\n \"indices\": {\n \"kibana_sample_data_ecommerce\": {\n \"shards\": {\n \"0\": [\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": false,\n \"node\": \"zZg9NuPhQPKO3LMRkMo2iw\"\n },\n \"num_committed_segments\": 4,\n \"num_search_segments\": 4,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 500,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 524718,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_1\": {\n \"generation\": 1,\n \"num_docs\": 500,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 526100,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_2\": {\n \"generation\": 2,\n \"num_docs\": 2000,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1846181,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_3\": {\n \"generation\": 3,\n \"num_docs\": 1675,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1572960,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n }\n }\n },\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"sp27SQiNTQWKpBKoRcnfQQ\"\n },\n \"num_committed_segments\": 5,\n \"num_search_segments\": 5,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 187,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 227245,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_1\": {\n \"generation\": 1,\n \"num_docs\": 253,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 297549,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_2\": {\n \"generation\": 2,\n \"num_docs\": 560,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 580918,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_3\": {\n \"generation\": 3,\n \"num_docs\": 1603,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1506385,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_4\": {\n \"generation\": 4,\n \"num_docs\": 2072,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1913051,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}" - } - } - } - } + "lang": "Ruby", + "source": "response = client.indices.rollover(\n alias: \"my-data-stream\",\n body: {\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->rollover([\n \"alias\" => \"my-data-stream\",\n \"body\" => [\n \"conditions\" => [\n \"max_age\" => \"7d\",\n \"max_docs\" => 1000,\n \"max_primary_shard_size\" => \"50gb\",\n \"max_primary_shard_docs\" => \"2000\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"conditions\":{\"max_age\":\"7d\",\"max_docs\":1000,\"max_primary_shard_size\":\"50gb\",\"max_primary_shard_docs\":\"2000\"}}' \"$ELASTICSEARCH_URL/my-data-stream/_rollover\"" + }, + { + "lang": "Java", + "source": "client.indices().rollover(r -> r\n .alias(\"my-data-stream\")\n .conditions(c -> c\n .maxAge(m -> m\n .time(\"7d\")\n )\n .maxDocs(1000L)\n .maxPrimaryShardSize(\"50gb\")\n .maxPrimaryShardDocs(2000L)\n )\n);\n" } - }, - "x-state": "Generally available", - "x-variations": [ - "
\n GET\n /_segments\n
\n " ], - "x-req-auth": [ - "Index privileges: `monitor`\n" - ], - "x-api": "segments.indices", - "x-category": "management", "x-metaTags": [ { "content": "Elasticsearch", @@ -37529,26 +45915,15 @@ ] } }, - "/{index}/_segments": { + "/_segments": { "get": { "tags": [ "indices" ], "summary": "Get index segments", "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the stream's backing indices.", - "operationId": "indices-segments-1", + "operationId": "indices-segments", "parameters": [ - { - "in": "path", - "name": "index", - "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Indices" - }, - "style": "simple" - }, { "in": "query", "name": "allow_no_indices", @@ -37562,7 +45937,142 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "indices": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices.segments.IndexSegment" + } + }, + "_shards": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ShardStatistics" + } + ] + } + }, + "required": [ + "indices", + "_shards" + ] + }, + "examples": { + "indicesSegmentsResponseExample1": { + "description": "A response describing information about index segments.", + "value": "{\n \"_shards\": {\n \"total\": 2,\n \"successful\": 2,\n \"failed\": 0\n },\n \"indices\": {\n \"kibana_sample_data_ecommerce\": {\n \"shards\": {\n \"0\": [\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": false,\n \"node\": \"zZg9NuPhQPKO3LMRkMo2iw\"\n },\n \"num_committed_segments\": 4,\n \"num_search_segments\": 4,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 500,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 524718,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_1\": {\n \"generation\": 1,\n \"num_docs\": 500,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 526100,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_2\": {\n \"generation\": 2,\n \"num_docs\": 2000,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1846181,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_3\": {\n \"generation\": 3,\n \"num_docs\": 1675,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1572960,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n }\n }\n },\n {\n \"routing\": {\n \"state\": \"STARTED\",\n \"primary\": true,\n \"node\": \"sp27SQiNTQWKpBKoRcnfQQ\"\n },\n \"num_committed_segments\": 5,\n \"num_search_segments\": 5,\n \"segments\": {\n \"_0\": {\n \"generation\": 0,\n \"num_docs\": 187,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 227245,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_1\": {\n \"generation\": 1,\n \"num_docs\": 253,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 297549,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_2\": {\n \"generation\": 2,\n \"num_docs\": 560,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 580918,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_3\": {\n \"generation\": 3,\n \"num_docs\": 1603,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1506385,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n },\n \"_4\": {\n \"generation\": 4,\n \"num_docs\": 2072,\n \"deleted_docs\": 0,\n \"size_in_bytes\": 1913051,\n \"committed\": true,\n \"search\": true,\n \"version\": \"10.3.1\",\n \"compound\": true,\n \"attributes\": {\n \"Lucene90StoredFieldsFormat.mode\": \"BEST_SPEED\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_segments\n
\n " + ], + "x-req-auth": [ + "Index privileges: `monitor`\n" + ], + "x-api": "segments.indices", + "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_segments\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.segments(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.segments({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.segments(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->segments([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_segments\"" + }, + { + "lang": "Java", + "source": "client.indices().segments(s -> s\n .index(\"my-index-000001\")\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/{index}/_segments": { + "get": { + "tags": [ + "indices" + ], + "summary": "Get index segments", + "description": "Get low-level information about the Lucene segments in index shards.\nFor data streams, the API returns information about the stream's backing indices.", + "operationId": "indices-segments-1", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "Comma-separated list of data streams, indices, and aliases used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams and indices, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -37626,6 +46136,36 @@ ], "x-api": "segments.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_segments\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.segments(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.segments({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.segments(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->segments([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_segments\"" + }, + { + "lang": "Java", + "source": "client.indices().segments(s -> s\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -37656,7 +46196,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams,\nthis argument determines whether wildcard expressions match hidden data streams.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams,\nthis argument determines whether wildcard expressions match hidden data streams.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -37676,7 +46216,7 @@ { "in": "query", "name": "status", - "description": "List of shard health statuses used to limit the request.", + "description": "List of shard health statuses used to limit the request.\n\nSupported values include:\n - `green`: The primary shard and all replica shards are assigned.\n - `yellow`: One or more replica shards are unassigned.\n - `red`: The primary shard is unassigned.\n - `all`: Return all shards, regardless of health status.\n\n", "deprecated": false, "schema": { "oneOf": [ @@ -37732,6 +46272,36 @@ ], "x-api": "shard_stores.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_shard_stores?status=green\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.shard_stores(\n status=\"green\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.shardStores({\n status: \"green\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.shard_stores(\n status: \"green\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->shardStores([\n \"status\" => \"green\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_shard_stores?status=green\"" + }, + { + "lang": "Java", + "source": "client.indices().shardStores(s -> s\n .status(\"green\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -37773,7 +46343,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams,\nthis argument determines whether wildcard expressions match hidden data streams.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams,\nthis argument determines whether wildcard expressions match hidden data streams.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -37793,7 +46363,7 @@ { "in": "query", "name": "status", - "description": "List of shard health statuses used to limit the request.", + "description": "List of shard health statuses used to limit the request.\n\nSupported values include:\n - `green`: The primary shard and all replica shards are assigned.\n - `yellow`: One or more replica shards are unassigned.\n - `red`: The primary shard is unassigned.\n - `all`: Return all shards, regardless of health status.\n\n", "deprecated": false, "schema": { "oneOf": [ @@ -37849,6 +46419,36 @@ ], "x-api": "shard_stores.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_shard_stores?status=green\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.shard_stores(\n status=\"green\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.shardStores({\n status: \"green\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.shard_stores(\n status: \"green\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->shardStores([\n \"status\" => \"green\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_shard_stores?status=green\"" + }, + { + "lang": "Java", + "source": "client.indices().shardStores(s -> s\n .status(\"green\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -37993,6 +46593,36 @@ ], "x-api": "shrink.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my_source_index/_shrink/my_target_index\n{\n \"settings\": {\n \"index.routing.allocation.require._name\": null,\n \"index.blocks.write\": null\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.shrink(\n index=\"my_source_index\",\n target=\"my_target_index\",\n settings={\n \"index.routing.allocation.require._name\": None,\n \"index.blocks.write\": None\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.shrink({\n index: \"my_source_index\",\n target: \"my_target_index\",\n settings: {\n \"index.routing.allocation.require._name\": null,\n \"index.blocks.write\": null,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.shrink(\n index: \"my_source_index\",\n target: \"my_target_index\",\n body: {\n \"settings\": {\n \"index.routing.allocation.require._name\": nil,\n \"index.blocks.write\": nil\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->shrink([\n \"index\" => \"my_source_index\",\n \"target\" => \"my_target_index\",\n \"body\" => [\n \"settings\" => [\n \"index.routing.allocation.require._name\" => null,\n \"index.blocks.write\" => null,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.routing.allocation.require._name\":null,\"index.blocks.write\":null}}' \"$ELASTICSEARCH_URL/my_source_index/_shrink/my_target_index\"" + }, + { + "lang": "Java", + "source": "client.indices().shrink(s -> s\n .index(\"my_source_index\")\n .settings(Map.of(\"index.blocks.write\", JsonData.fromJson(\"null\"),\"index.routing.allocation.require._name\", JsonData.fromJson(\"null\")))\n .target(\"my_target_index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -38135,6 +46765,36 @@ ], "x-api": "shrink.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my_source_index/_shrink/my_target_index\n{\n \"settings\": {\n \"index.routing.allocation.require._name\": null,\n \"index.blocks.write\": null\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.shrink(\n index=\"my_source_index\",\n target=\"my_target_index\",\n settings={\n \"index.routing.allocation.require._name\": None,\n \"index.blocks.write\": None\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.shrink({\n index: \"my_source_index\",\n target: \"my_target_index\",\n settings: {\n \"index.routing.allocation.require._name\": null,\n \"index.blocks.write\": null,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.shrink(\n index: \"my_source_index\",\n target: \"my_target_index\",\n body: {\n \"settings\": {\n \"index.routing.allocation.require._name\": nil,\n \"index.blocks.write\": nil\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->shrink([\n \"index\" => \"my_source_index\",\n \"target\" => \"my_target_index\",\n \"body\" => [\n \"settings\" => [\n \"index.routing.allocation.require._name\" => null,\n \"index.blocks.write\" => null,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.routing.allocation.require._name\":null,\"index.blocks.write\":null}}' \"$ELASTICSEARCH_URL/my_source_index/_shrink/my_target_index\"" + }, + { + "lang": "Java", + "source": "client.indices().shrink(s -> s\n .index(\"my_source_index\")\n .settings(Map.of(\"index.blocks.write\", JsonData.fromJson(\"null\"),\"index.routing.allocation.require._name\", JsonData.fromJson(\"null\")))\n .target(\"my_target_index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -38259,6 +46919,36 @@ ], "x-api": "simulate_index_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_index_template/_simulate_index/my-index-000001\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.simulate_index_template(\n name=\"my-index-000001\",\n index_template=None,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.simulateIndexTemplate({\n name: \"my-index-000001\",\n index_template: null,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.simulate_index_template(\n name: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->simulateIndexTemplate([\n \"name\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_index_template/_simulate_index/my-index-000001\"" + }, + { + "lang": "Java", + "source": "client.indices().simulateIndexTemplate(s -> s\n .name(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -38446,6 +47136,36 @@ ], "x-api": "simulate_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_index_template/_simulate\n{\n \"index_patterns\": [\"my-index-*\"],\n \"composed_of\": [\"ct2\"],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.simulate_template(\n index_patterns=[\n \"my-index-*\"\n ],\n composed_of=[\n \"ct2\"\n ],\n priority=10,\n template={\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.simulateTemplate({\n index_patterns: [\"my-index-*\"],\n composed_of: [\"ct2\"],\n priority: 10,\n template: {\n settings: {\n \"index.number_of_replicas\": 1,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.simulate_template(\n body: {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"ct2\"\n ],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->simulateTemplate([\n \"body\" => [\n \"index_patterns\" => array(\n \"my-index-*\",\n ),\n \"composed_of\" => array(\n \"ct2\",\n ),\n \"priority\" => 10,\n \"template\" => [\n \"settings\" => [\n \"index.number_of_replicas\" => 1,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"my-index-*\"],\"composed_of\":[\"ct2\"],\"priority\":10,\"template\":{\"settings\":{\"index.number_of_replicas\":1}}}' \"$ELASTICSEARCH_URL/_index_template/_simulate\"" + }, + { + "lang": "Java", + "source": "client.indices().simulateTemplate(s -> s\n .composedOf(\"ct2\")\n .indexPatterns(\"my-index-*\")\n .priority(10L)\n .template(t -> t\n .settings(se -> se\n .otherSettings(\"index.number_of_replicas\", JsonData.fromJson(\"1\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -38644,6 +47364,36 @@ ], "x-api": "simulate_template.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_index_template/_simulate\n{\n \"index_patterns\": [\"my-index-*\"],\n \"composed_of\": [\"ct2\"],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.simulate_template(\n index_patterns=[\n \"my-index-*\"\n ],\n composed_of=[\n \"ct2\"\n ],\n priority=10,\n template={\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.simulateTemplate({\n index_patterns: [\"my-index-*\"],\n composed_of: [\"ct2\"],\n priority: 10,\n template: {\n settings: {\n \"index.number_of_replicas\": 1,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.simulate_template(\n body: {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"ct2\"\n ],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->simulateTemplate([\n \"body\" => [\n \"index_patterns\" => array(\n \"my-index-*\",\n ),\n \"composed_of\" => array(\n \"ct2\",\n ),\n \"priority\" => 10,\n \"template\" => [\n \"settings\" => [\n \"index.number_of_replicas\" => 1,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"my-index-*\"],\"composed_of\":[\"ct2\"],\"priority\":10,\"template\":{\"settings\":{\"index.number_of_replicas\":1}}}' \"$ELASTICSEARCH_URL/_index_template/_simulate\"" + }, + { + "lang": "Java", + "source": "client.indices().simulateTemplate(s -> s\n .composedOf(\"ct2\")\n .indexPatterns(\"my-index-*\")\n .priority(10L)\n .template(t -> t\n .settings(se -> se\n .otherSettings(\"index.number_of_replicas\", JsonData.fromJson(\"1\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -38788,6 +47538,36 @@ ], "x-api": "split.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_split/split-my-index-000001\n{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.split(\n index=\"my-index-000001\",\n target=\"split-my-index-000001\",\n settings={\n \"index.number_of_shards\": 2\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.split({\n index: \"my-index-000001\",\n target: \"split-my-index-000001\",\n settings: {\n \"index.number_of_shards\": 2,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.split(\n index: \"my-index-000001\",\n target: \"split-my-index-000001\",\n body: {\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->split([\n \"index\" => \"my-index-000001\",\n \"target\" => \"split-my-index-000001\",\n \"body\" => [\n \"settings\" => [\n \"index.number_of_shards\" => 2,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.number_of_shards\":2}}' \"$ELASTICSEARCH_URL/my-index-000001/_split/split-my-index-000001\"" + }, + { + "lang": "Java", + "source": "client.indices().split(s -> s\n .index(\"my-index-000001\")\n .settings(\"index.number_of_shards\", JsonData.fromJson(\"2\"))\n .target(\"split-my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -38930,6 +47710,36 @@ ], "x-api": "split.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_split/split-my-index-000001\n{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.split(\n index=\"my-index-000001\",\n target=\"split-my-index-000001\",\n settings={\n \"index.number_of_shards\": 2\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.split({\n index: \"my-index-000001\",\n target: \"split-my-index-000001\",\n settings: {\n \"index.number_of_shards\": 2,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.split(\n index: \"my-index-000001\",\n target: \"split-my-index-000001\",\n body: {\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->split([\n \"index\" => \"my-index-000001\",\n \"target\" => \"split-my-index-000001\",\n \"body\" => [\n \"settings\" => [\n \"index.number_of_shards\" => 2,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.number_of_shards\":2}}' \"$ELASTICSEARCH_URL/my-index-000001/_split/split-my-index-000001\"" + }, + { + "lang": "Java", + "source": "client.indices().split(s -> s\n .index(\"my-index-000001\")\n .settings(\"index.number_of_shards\", JsonData.fromJson(\"2\"))\n .target(\"split-my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -38960,7 +47770,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -39095,6 +47905,36 @@ ], "x-api": "stats.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _stats/fielddata?human&fields=my_join_field#question\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.stats(\n metric=\"fielddata\",\n human=True,\n fields=\"my_join_field\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.stats({\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.stats(\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->stats([\n \"metric\" => \"fielddata\",\n \"human\" => \"true\",\n \"fields\" => \"my_join_field\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_stats/fielddata?human&fields=my_join_field#question\"" + }, + { + "lang": "Java", + "source": "client.indices().stats(s -> s\n .fields(\"my_join_field\")\n .metric(\"fielddata\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -39115,7 +47955,7 @@ { "in": "path", "name": "metric", - "description": "Limit the information returned the specific metrics", + "description": "Limit the information returned the specific metrics\n\nSupported values include: `_all`, `store`, `indexing`, `get`, `search`, `merge`, `flush`, `refresh`, `query_cache`, `fielddata`, `docs`, `warmer`, `completion`, `segments`, `translog`, `request_cache`, `recovery`, `bulk`, `shard_stats`, `mappings`, `dense_vector`, `sparse_vector`\n\n", "required": true, "deprecated": false, "schema": { @@ -39136,7 +47976,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -39271,6 +48111,36 @@ ], "x-api": "stats.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _stats/fielddata?human&fields=my_join_field#question\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.stats(\n metric=\"fielddata\",\n human=True,\n fields=\"my_join_field\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.stats({\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.stats(\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->stats([\n \"metric\" => \"fielddata\",\n \"human\" => \"true\",\n \"fields\" => \"my_join_field\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_stats/fielddata?human&fields=my_join_field#question\"" + }, + { + "lang": "Java", + "source": "client.indices().stats(s -> s\n .fields(\"my_join_field\")\n .metric(\"fielddata\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -39312,7 +48182,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -39447,6 +48317,36 @@ ], "x-api": "stats.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _stats/fielddata?human&fields=my_join_field#question\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.stats(\n metric=\"fielddata\",\n human=True,\n fields=\"my_join_field\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.stats({\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.stats(\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->stats([\n \"metric\" => \"fielddata\",\n \"human\" => \"true\",\n \"fields\" => \"my_join_field\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_stats/fielddata?human&fields=my_join_field#question\"" + }, + { + "lang": "Java", + "source": "client.indices().stats(s -> s\n .fields(\"my_join_field\")\n .metric(\"fielddata\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -39478,7 +48378,7 @@ { "in": "path", "name": "metric", - "description": "Limit the information returned the specific metrics", + "description": "Limit the information returned the specific metrics\n\nSupported values include: `_all`, `store`, `indexing`, `get`, `search`, `merge`, `flush`, `refresh`, `query_cache`, `fielddata`, `docs`, `warmer`, `completion`, `segments`, `translog`, `request_cache`, `recovery`, `bulk`, `shard_stats`, `mappings`, `dense_vector`, `sparse_vector`\n\n", "required": true, "deprecated": false, "schema": { @@ -39499,7 +48399,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -39634,6 +48534,36 @@ ], "x-api": "stats.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _stats/fielddata?human&fields=my_join_field#question\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.stats(\n metric=\"fielddata\",\n human=True,\n fields=\"my_join_field\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.stats({\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.stats(\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->stats([\n \"metric\" => \"fielddata\",\n \"human\" => \"true\",\n \"fields\" => \"my_join_field\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_stats/fielddata?human&fields=my_join_field#question\"" + }, + { + "lang": "Java", + "source": "client.indices().stats(s -> s\n .fields(\"my_join_field\")\n .metric(\"fielddata\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -39715,6 +48645,36 @@ ], "x-api": "update_aliases.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _aliases\n{\n \"actions\": [\n {\n \"add\": {\n \"index\": \"logs-nginx.access-prod\",\n \"alias\": \"logs\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.indices.update_aliases(\n actions=[\n {\n \"add\": {\n \"index\": \"logs-nginx.access-prod\",\n \"alias\": \"logs\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.updateAliases({\n actions: [\n {\n add: {\n index: \"logs-nginx.access-prod\",\n alias: \"logs\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.update_aliases(\n body: {\n \"actions\": [\n {\n \"add\": {\n \"index\": \"logs-nginx.access-prod\",\n \"alias\": \"logs\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->updateAliases([\n \"body\" => [\n \"actions\" => array(\n [\n \"add\" => [\n \"index\" => \"logs-nginx.access-prod\",\n \"alias\" => \"logs\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"actions\":[{\"add\":{\"index\":\"logs-nginx.access-prod\",\"alias\":\"logs\"}}]}' \"$ELASTICSEARCH_URL/_aliases\"" + }, + { + "lang": "Java", + "source": "client.indices().updateAliases(u -> u\n .actions(a -> a\n .add(ad -> ad\n .alias(\"logs\")\n .index(\"logs-nginx.access-prod\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -39795,7 +48755,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -39915,6 +48875,36 @@ ], "x-api": "validate_query.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_validate/query?q=user.id:kimchy\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.validate_query(\n index=\"my-index-000001\",\n q=\"user.id:kimchy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.validateQuery({\n index: \"my-index-000001\",\n q: \"user.id:kimchy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.validate_query(\n index: \"my-index-000001\",\n q: \"user.id:kimchy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->validateQuery([\n \"index\" => \"my-index-000001\",\n \"q\" => \"user.id:kimchy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_validate/query?q=user.id:kimchy\"" + }, + { + "lang": "Java", + "source": "client.indices().validateQuery(v -> v\n .index(\"my-index-000001\")\n .q(\"user.id:kimchy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -39993,7 +48983,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -40113,6 +49103,36 @@ ], "x-api": "validate_query.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_validate/query?q=user.id:kimchy\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.validate_query(\n index=\"my-index-000001\",\n q=\"user.id:kimchy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.validateQuery({\n index: \"my-index-000001\",\n q: \"user.id:kimchy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.validate_query(\n index: \"my-index-000001\",\n q: \"user.id:kimchy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->validateQuery([\n \"index\" => \"my-index-000001\",\n \"q\" => \"user.id:kimchy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_validate/query?q=user.id:kimchy\"" + }, + { + "lang": "Java", + "source": "client.indices().validateQuery(v -> v\n .index(\"my-index-000001\")\n .q(\"user.id:kimchy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -40204,7 +49224,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -40324,6 +49344,36 @@ ], "x-api": "validate_query.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_validate/query?q=user.id:kimchy\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.validate_query(\n index=\"my-index-000001\",\n q=\"user.id:kimchy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.validateQuery({\n index: \"my-index-000001\",\n q: \"user.id:kimchy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.validate_query(\n index: \"my-index-000001\",\n q: \"user.id:kimchy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->validateQuery([\n \"index\" => \"my-index-000001\",\n \"q\" => \"user.id:kimchy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_validate/query?q=user.id:kimchy\"" + }, + { + "lang": "Java", + "source": "client.indices().validateQuery(v -> v\n .index(\"my-index-000001\")\n .q(\"user.id:kimchy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -40413,7 +49463,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -40533,6 +49583,36 @@ ], "x-api": "validate_query.indices", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_validate/query?q=user.id:kimchy\n" + }, + { + "lang": "Python", + "source": "resp = client.indices.validate_query(\n index=\"my-index-000001\",\n q=\"user.id:kimchy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.indices.validateQuery({\n index: \"my-index-000001\",\n q: \"user.id:kimchy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.indices.validate_query(\n index: \"my-index-000001\",\n q: \"user.id:kimchy\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->indices()->validateQuery([\n \"index\" => \"my-index-000001\",\n \"q\" => \"user.id:kimchy\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_validate/query?q=user.id:kimchy\"" + }, + { + "lang": "Java", + "source": "client.indices().validateQuery(v -> v\n .index(\"my-index-000001\")\n .q(\"user.id:kimchy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -40623,6 +49703,36 @@ ], "x-api": "chat_completion_unified.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _inference/chat_completion/openai-completion/_stream\n{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is Elastic?\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.chat_completion_unified(\n inference_id=\"openai-completion\",\n chat_completion_request={\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is Elastic?\"\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.chatCompletionUnified({\n inference_id: \"openai-completion\",\n chat_completion_request: {\n model: \"gpt-4o\",\n messages: [\n {\n role: \"user\",\n content: \"What is Elastic?\",\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.chat_completion_unified(\n inference_id: \"openai-completion\",\n body: {\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is Elastic?\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->chatCompletionUnified([\n \"inference_id\" => \"openai-completion\",\n \"body\" => [\n \"model\" => \"gpt-4o\",\n \"messages\" => array(\n [\n \"role\" => \"user\",\n \"content\" => \"What is Elastic?\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"model\":\"gpt-4o\",\"messages\":[{\"role\":\"user\",\"content\":\"What is Elastic?\"}]}' \"$ELASTICSEARCH_URL/_inference/chat_completion/openai-completion/_stream\"" + }, + { + "lang": "Java", + "source": "client.inference().chatCompletionUnified(c -> c\n .inferenceId(\"openai-completion\")\n .chatCompletionRequest(ch -> ch\n .messages(m -> m\n .content(co -> co\n .string(\"What is Elastic?\")\n )\n .role(\"user\")\n )\n .model(\"gpt-4o\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -40731,6 +49841,36 @@ ], "x-api": "completion.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _inference/completion/openai_completions\n{\n \"input\": \"What is Elastic?\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.completion(\n inference_id=\"openai_completions\",\n input=\"What is Elastic?\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.completion({\n inference_id: \"openai_completions\",\n input: \"What is Elastic?\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.completion(\n inference_id: \"openai_completions\",\n body: {\n \"input\": \"What is Elastic?\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->completion([\n \"inference_id\" => \"openai_completions\",\n \"body\" => [\n \"input\" => \"What is Elastic?\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"What is Elastic?\"}' \"$ELASTICSEARCH_URL/_inference/completion/openai_completions\"" + }, + { + "lang": "Java", + "source": "client.inference().completion(c -> c\n .inferenceId(\"openai_completions\")\n .input(\"What is Elastic?\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -40789,6 +49929,36 @@ ], "x-api": "get.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _inference/sparse_embedding/my-elser-model\n" + }, + { + "lang": "Python", + "source": "resp = client.inference.get(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.get({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.get(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->get([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "lang": "Java", + "source": "client.inference().get(g -> g\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -40863,6 +50033,36 @@ ], "x-api": "put.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/rerank/my-rerank-model\n{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"my-rerank-model\",\n inference_config={\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"my-rerank-model\",\n inference_config: {\n service: \"cohere\",\n service_settings: {\n model_id: \"rerank-english-v3.0\",\n api_key: \"{{COHERE_API_KEY}}\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"my-rerank-model\",\n body: {\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"my-rerank-model\",\n \"body\" => [\n \"service\" => \"cohere\",\n \"service_settings\" => [\n \"model_id\" => \"rerank-english-v3.0\",\n \"api_key\" => \"{{COHERE_API_KEY}}\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"cohere\",\"service_settings\":{\"model_id\":\"rerank-english-v3.0\",\"api_key\":\"{{COHERE_API_KEY}}\"}}' \"$ELASTICSEARCH_URL/_inference/rerank/my-rerank-model\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"my-rerank-model\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"cohere\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\"rerank-english-v3.0\\\",\\\"api_key\\\":\\\"{{COHERE_API_KEY}}\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41031,6 +50231,36 @@ ], "x-api": "delete.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_inference/sparse_embedding/my-elser-model\n" + }, + { + "lang": "Python", + "source": "resp = client.inference.delete(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.delete({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.delete(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->delete([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "lang": "Java", + "source": "client.inference().delete(d -> d\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41100,6 +50330,36 @@ ], "x-api": "get.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _inference/sparse_embedding/my-elser-model\n" + }, + { + "lang": "Python", + "source": "resp = client.inference.get(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.get({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.get(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->get([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "lang": "Java", + "source": "client.inference().get(g -> g\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41185,6 +50445,36 @@ ], "x-api": "put.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/rerank/my-rerank-model\n{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"my-rerank-model\",\n inference_config={\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"my-rerank-model\",\n inference_config: {\n service: \"cohere\",\n service_settings: {\n model_id: \"rerank-english-v3.0\",\n api_key: \"{{COHERE_API_KEY}}\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"my-rerank-model\",\n body: {\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"my-rerank-model\",\n \"body\" => [\n \"service\" => \"cohere\",\n \"service_settings\" => [\n \"model_id\" => \"rerank-english-v3.0\",\n \"api_key\" => \"{{COHERE_API_KEY}}\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"cohere\",\"service_settings\":{\"model_id\":\"rerank-english-v3.0\",\"api_key\":\"{{COHERE_API_KEY}}\"}}' \"$ELASTICSEARCH_URL/_inference/rerank/my-rerank-model\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"my-rerank-model\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"cohere\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\"rerank-english-v3.0\\\",\\\"api_key\\\":\\\"{{COHERE_API_KEY}}\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41375,6 +50665,36 @@ ], "x-api": "delete.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_inference/sparse_embedding/my-elser-model\n" + }, + { + "lang": "Python", + "source": "resp = client.inference.delete(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.delete({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.delete(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->delete([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "lang": "Java", + "source": "client.inference().delete(d -> d\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41465,6 +50785,32 @@ ], "x-api": "embedding.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _inference/embedding/my-multimodal-endpoint\n{\n \"input\": [\n {\n \"content\": {\n \"type\": \"image\",\n \"format\": \"base64\",\n \"value\": \"data:image/jpg;base64,...\"\n }\n },\n {\n \"content\": {\n \"type\": \"text\",\n \"value\": \"Some text to create an embedding\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.embedding(\n inference_id=\"my-multimodal-endpoint\",\n embedding={\n \"input\": [\n {\n \"content\": {\n \"type\": \"image\",\n \"format\": \"base64\",\n \"value\": \"data:image/jpg;base64,...\"\n }\n },\n {\n \"content\": {\n \"type\": \"text\",\n \"value\": \"Some text to create an embedding\"\n }\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.embedding({\n inference_id: \"my-multimodal-endpoint\",\n embedding: {\n input: [\n {\n content: {\n type: \"image\",\n format: \"base64\",\n value: \"data:image/jpg;base64,...\",\n },\n },\n {\n content: {\n type: \"text\",\n value: \"Some text to create an embedding\",\n },\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.embedding(\n inference_id: \"my-multimodal-endpoint\",\n body: {\n \"input\": [\n {\n \"content\": {\n \"type\": \"image\",\n \"format\": \"base64\",\n \"value\": \"data:image/jpg;base64,...\"\n }\n },\n {\n \"content\": {\n \"type\": \"text\",\n \"value\": \"Some text to create an embedding\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->embedding([\n \"inference_id\" => \"my-multimodal-endpoint\",\n \"body\" => [\n \"input\" => array(\n [\n \"content\" => [\n \"type\" => \"image\",\n \"format\" => \"base64\",\n \"value\" => \"data:image/jpg;base64,...\",\n ],\n ],\n [\n \"content\" => [\n \"type\" => \"text\",\n \"value\" => \"Some text to create an embedding\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":[{\"content\":{\"type\":\"image\",\"format\":\"base64\",\"value\":\"data:image/jpg;base64,...\"}},{\"content\":{\"type\":\"text\",\"value\":\"Some text to create an embedding\"}}]}' \"$ELASTICSEARCH_URL/_inference/embedding/my-multimodal-endpoint\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41510,6 +50856,36 @@ ], "x-api": "get.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _inference/sparse_embedding/my-elser-model\n" + }, + { + "lang": "Python", + "source": "resp = client.inference.get(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.get({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.get(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->get([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "lang": "Java", + "source": "client.inference().get(g -> g\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41623,6 +50999,36 @@ ], "x-api": "put_ai21.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/completion/ai21-completion\n{\n \"service\": \"ai21\",\n \"service_settings\": {\n \"api_key\": \"ai21-api-key\",\n \"model_id\": \"jamba-large\" \n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"ai21-completion\",\n inference_config={\n \"service\": \"ai21\",\n \"service_settings\": {\n \"api_key\": \"ai21-api-key\",\n \"model_id\": \"jamba-large\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"ai21-completion\",\n inference_config: {\n service: \"ai21\",\n service_settings: {\n api_key: \"ai21-api-key\",\n model_id: \"jamba-large\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"ai21-completion\",\n body: {\n \"service\": \"ai21\",\n \"service_settings\": {\n \"api_key\": \"ai21-api-key\",\n \"model_id\": \"jamba-large\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"ai21-completion\",\n \"body\" => [\n \"service\" => \"ai21\",\n \"service_settings\" => [\n \"api_key\" => \"ai21-api-key\",\n \"model_id\" => \"jamba-large\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"ai21\",\"service_settings\":{\"api_key\":\"ai21-api-key\",\"model_id\":\"jamba-large\"}}' \"$ELASTICSEARCH_URL/_inference/completion/ai21-completion\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"ai21-completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"ai21\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"ai21-api-key\\\",\\\"model_id\\\":\\\"jamba-large\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41767,6 +51173,36 @@ ], "x-api": "put_alibabacloud.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/completion/alibabacloud_ai_search_completion\n{\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"host\" : \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-qwen-turbo\",\n \"workspace\" : \"default\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"alibabacloud_ai_search_completion\",\n inference_config={\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-qwen-turbo\",\n \"workspace\": \"default\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"alibabacloud_ai_search_completion\",\n inference_config: {\n service: \"alibabacloud-ai-search\",\n service_settings: {\n host: \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n api_key: \"AlibabaCloud-API-Key\",\n service_id: \"ops-qwen-turbo\",\n workspace: \"default\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"alibabacloud_ai_search_completion\",\n body: {\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-qwen-turbo\",\n \"workspace\": \"default\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"alibabacloud_ai_search_completion\",\n \"body\" => [\n \"service\" => \"alibabacloud-ai-search\",\n \"service_settings\" => [\n \"host\" => \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\" => \"AlibabaCloud-API-Key\",\n \"service_id\" => \"ops-qwen-turbo\",\n \"workspace\" => \"default\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-qwen-turbo\",\"workspace\":\"default\"}}' \"$ELASTICSEARCH_URL/_inference/completion/alibabacloud_ai_search_completion\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"alibabacloud_ai_search_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"alibabacloud-ai-search\")\n .serviceSettings(JsonData.fromJson(\"{\\\"host\\\":\\\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\\\",\\\"api_key\\\":\\\"AlibabaCloud-API-Key\\\",\\\"service_id\\\":\\\"ops-qwen-turbo\\\",\\\"workspace\\\":\\\"default\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -41906,6 +51342,36 @@ ], "x-api": "put_amazonbedrock.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/amazon_bedrock_embeddings\n{\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-embed-text-v2:0\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"amazon_bedrock_embeddings\",\n inference_config={\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-embed-text-v2:0\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"amazon_bedrock_embeddings\",\n inference_config: {\n service: \"amazonbedrock\",\n service_settings: {\n access_key: \"AWS-access-key\",\n secret_key: \"AWS-secret-key\",\n region: \"us-east-1\",\n provider: \"amazontitan\",\n model: \"amazon.titan-embed-text-v2:0\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"amazon_bedrock_embeddings\",\n body: {\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-embed-text-v2:0\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"amazon_bedrock_embeddings\",\n \"body\" => [\n \"service\" => \"amazonbedrock\",\n \"service_settings\" => [\n \"access_key\" => \"AWS-access-key\",\n \"secret_key\" => \"AWS-secret-key\",\n \"region\" => \"us-east-1\",\n \"provider\" => \"amazontitan\",\n \"model\" => \"amazon.titan-embed-text-v2:0\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"amazonbedrock\",\"service_settings\":{\"access_key\":\"AWS-access-key\",\"secret_key\":\"AWS-secret-key\",\"region\":\"us-east-1\",\"provider\":\"amazontitan\",\"model\":\"amazon.titan-embed-text-v2:0\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/amazon_bedrock_embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"amazon_bedrock_embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"amazonbedrock\")\n .serviceSettings(JsonData.fromJson(\"{\\\"access_key\\\":\\\"AWS-access-key\\\",\\\"secret_key\\\":\\\"AWS-secret-key\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"provider\\\":\\\"amazontitan\\\",\\\"model\\\":\\\"amazon.titan-embed-text-v2:0\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -42055,6 +51521,36 @@ ], "x-api": "put_amazonsagemaker.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/amazon_sagemaker_embeddings\n{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\",\n \"dimensions\": 384,\n \"element_type\": \"float\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"amazon_sagemaker_embeddings\",\n inference_config={\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\",\n \"dimensions\": 384,\n \"element_type\": \"float\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"amazon_sagemaker_embeddings\",\n inference_config: {\n service: \"amazon_sagemaker\",\n service_settings: {\n access_key: \"AWS-access-key\",\n secret_key: \"AWS-secret-key\",\n region: \"us-east-1\",\n api: \"elastic\",\n endpoint_name: \"my-endpoint\",\n dimensions: 384,\n element_type: \"float\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"amazon_sagemaker_embeddings\",\n body: {\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\",\n \"dimensions\": 384,\n \"element_type\": \"float\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"amazon_sagemaker_embeddings\",\n \"body\" => [\n \"service\" => \"amazon_sagemaker\",\n \"service_settings\" => [\n \"access_key\" => \"AWS-access-key\",\n \"secret_key\" => \"AWS-secret-key\",\n \"region\" => \"us-east-1\",\n \"api\" => \"elastic\",\n \"endpoint_name\" => \"my-endpoint\",\n \"dimensions\" => 384,\n \"element_type\" => \"float\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"amazon_sagemaker\",\"service_settings\":{\"access_key\":\"AWS-access-key\",\"secret_key\":\"AWS-secret-key\",\"region\":\"us-east-1\",\"api\":\"elastic\",\"endpoint_name\":\"my-endpoint\",\"dimensions\":384,\"element_type\":\"float\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/amazon_sagemaker_embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"amazon_sagemaker_embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"amazon_sagemaker\")\n .serviceSettings(JsonData.fromJson(\"{\\\"access_key\\\":\\\"AWS-access-key\\\",\\\"secret_key\\\":\\\"AWS-secret-key\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"api\\\":\\\"elastic\\\",\\\"endpoint_name\\\":\\\"my-endpoint\\\",\\\"dimensions\\\":384,\\\"element_type\\\":\\\"float\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -42172,6 +51668,36 @@ ], "x-api": "put_anthropic.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/completion/anthropic_completion\n{\n \"service\": \"anthropic\",\n \"service_settings\": {\n \"api_key\": \"Anthropic-Api-Key\",\n \"model_id\": \"Model-ID\"\n },\n \"task_settings\": {\n \"max_tokens\": 1024\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"anthropic_completion\",\n inference_config={\n \"service\": \"anthropic\",\n \"service_settings\": {\n \"api_key\": \"Anthropic-Api-Key\",\n \"model_id\": \"Model-ID\"\n },\n \"task_settings\": {\n \"max_tokens\": 1024\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"anthropic_completion\",\n inference_config: {\n service: \"anthropic\",\n service_settings: {\n api_key: \"Anthropic-Api-Key\",\n model_id: \"Model-ID\",\n },\n task_settings: {\n max_tokens: 1024,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"anthropic_completion\",\n body: {\n \"service\": \"anthropic\",\n \"service_settings\": {\n \"api_key\": \"Anthropic-Api-Key\",\n \"model_id\": \"Model-ID\"\n },\n \"task_settings\": {\n \"max_tokens\": 1024\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"anthropic_completion\",\n \"body\" => [\n \"service\" => \"anthropic\",\n \"service_settings\" => [\n \"api_key\" => \"Anthropic-Api-Key\",\n \"model_id\" => \"Model-ID\",\n ],\n \"task_settings\" => [\n \"max_tokens\" => 1024,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"anthropic\",\"service_settings\":{\"api_key\":\"Anthropic-Api-Key\",\"model_id\":\"Model-ID\"},\"task_settings\":{\"max_tokens\":1024}}' \"$ELASTICSEARCH_URL/_inference/completion/anthropic_completion\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"anthropic_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"anthropic\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Anthropic-Api-Key\\\",\\\"model_id\\\":\\\"Model-ID\\\"}\"))\n .taskSettings(JsonData.fromJson(\"{\\\"max_tokens\\\":1024}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -42311,162 +51837,36 @@ ], "x-api": "put_azureaistudio.inference", "x-category": "ai/ml", - "x-metaTags": [ + "x-codeSamples": [ { - "content": "Elasticsearch, Machine Learning", - "name": "product_name" - } - ] - } - }, - "/_inference/{task_type}/{azureopenai_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create an Azure OpenAI inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `azureopenai` service.\n\nThe list of chat completion models that you can choose from in your Azure OpenAI deployment include:\n\n* [GPT-4 and GPT-4 Turbo models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-4-and-gpt-4-turbo-models)\n* [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-35)\n\nThe list of embeddings models that you can choose from in your deployment can be found in the [Azure models documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings).", - "operationId": "inference-put-azureopenai", - "parameters": [ + "lang": "Console", + "source": "PUT _inference/text_embedding/azure_ai_studio_embeddings\n{\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-Uri\",\n \"provider\": \"openai\",\n \"endpoint_type\": \"token\"\n }\n}" + }, { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types.AzureOpenAITaskType" - }, - "style": "simple" + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"azure_ai_studio_embeddings\",\n inference_config={\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-Uri\",\n \"provider\": \"openai\",\n \"endpoint_type\": \"token\"\n }\n },\n)" }, { - "in": "path", - "name": "azureopenai_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"azure_ai_studio_embeddings\",\n inference_config: {\n service: \"azureaistudio\",\n service_settings: {\n api_key: \"Azure-AI-Studio-API-key\",\n target: \"Target-Uri\",\n provider: \"openai\",\n endpoint_type: \"token\",\n },\n },\n});" }, { - "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait for the inference endpoint to be created.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" - }, - "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `completion` and `chat_completion` task types.", - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - } - ] - }, - "service": { - "description": "The type of service supported for the specified task type. In this case, `azureopenai`.", - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.AzureOpenAIServiceType" - } - ] - }, - "service_settings": { - "description": "Settings used to install the inference model. These settings are specific to the `azureopenai` service.", - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.AzureOpenAIServiceSettings" - } - ] - }, - "task_settings": { - "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.AzureOpenAITaskSettings" - } - ] - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutAzureOpenAiRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/azure_openai_embeddings` to create an inference endpoint that performs a `text_embedding` task. You do not specify a model, as it is defined already in the Azure OpenAI deployment.", - "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" - }, - "PutAzureOpenAiRequestExample2": { - "summary": "A completion task", - "description": "Run `PUT _inference/completion/azure_openai_completion` to create an inference endpoint that performs a `completion` task.", - "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" - }, - "PutAzureOpenAiRequestExample3": { - "summary": "A chat completion task", - "description": "Run `PUT _inference/chat_completion/azure_openai_chat_completion` to create an inference endpoint that performs a `chat_completion` task.", - "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" - } - } - } + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"azure_ai_studio_embeddings\",\n body: {\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-Uri\",\n \"provider\": \"openai\",\n \"endpoint_type\": \"token\"\n }\n }\n)" }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAzureOpenAI" - }, - "examples": { - "PutAzureOpenAiResponseExample1": { - "summary": "A text embedding task", - "description": "A successful response when creating an Azure OpenAI `text_embedding` inference endpoint.", - "value": "{\n \"inference_id\": \"azure_openai_embeddings\",\n \"task_type\": \"text_embedding\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 1140\n },\n \"dimensions\": 1536,\n \"similarity\": \"dot_product\"\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" - }, - "PutAzureOpenAiResponseExample2": { - "summary": "A completion task", - "description": "A successful response when creating an Azure OpenAI `completion` inference endpoint.", - "value": "{\n \"inference_id\": \"azure_openai_completion\",\n \"task_type\": \"completion\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 120\n }\n }\n}" - }, - "PutAzureOpenAiResponseExample3": { - "summary": "A chat completion task", - "description": "A successful response when creating an Azure OpenAI `chat_completion` inference endpoint.", - "value": "{\n \"inference_id\": \"azure_openai_chat_completion\",\n \"task_type\": \"chat_completion\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 120\n }\n }\n}" - } - } - } - } + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"azure_ai_studio_embeddings\",\n \"body\" => [\n \"service\" => \"azureaistudio\",\n \"service_settings\" => [\n \"api_key\" => \"Azure-AI-Studio-API-key\",\n \"target\" => \"Target-Uri\",\n \"provider\" => \"openai\",\n \"endpoint_type\" => \"token\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"azureaistudio\",\"service_settings\":{\"api_key\":\"Azure-AI-Studio-API-key\",\"target\":\"Target-Uri\",\"provider\":\"openai\",\"endpoint_type\":\"token\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/azure_ai_studio_embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"azure_ai_studio_embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"azureaistudio\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Azure-AI-Studio-API-key\\\",\\\"target\\\":\\\"Target-Uri\\\",\\\"provider\\\":\\\"openai\\\",\\\"endpoint_type\\\":\\\"token\\\"}\"))\n )\n);\n" } - }, - "x-state": "Generally available; Added in 8.14.0", - "x-variations": [ - "
\n PUT\n /_inference/{task_type}/{azureopenai_inference_id}\n
\n " - ], - "x-req-auth": [ - "Cluster privileges: `manage_inference`\n" ], - "x-api": "put_azureopenai.inference", - "x-category": "ai/ml", "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -42475,29 +51875,215 @@ ] } }, - "/_inference/{task_type}/{cohere_inference_id}": { + "/_inference/{task_type}/{azureopenai_inference_id}": { "put": { "tags": [ "inference" ], - "summary": "Create a Cohere inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `cohere` service.", - "operationId": "inference-put-cohere", + "summary": "Create an Azure OpenAI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `azureopenai` service.\n\nThe list of chat completion models that you can choose from in your Azure OpenAI deployment include:\n\n* [GPT-4 and GPT-4 Turbo models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-4-and-gpt-4-turbo-models)\n* [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-35)\n\nThe list of embeddings models that you can choose from in your deployment can be found in the [Azure models documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings).", + "operationId": "inference-put-azureopenai", "parameters": [ { "in": "path", "name": "task_type", - "description": "The type of the inference task that the model will perform.", + "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.CohereTaskType" + "$ref": "#/components/schemas/inference._types.AzureOpenAITaskType" }, "style": "simple" }, { "in": "path", - "name": "cohere_inference_id", + "name": "azureopenai_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `completion` and `chat_completion` task types.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] + }, + "service": { + "description": "The type of service supported for the specified task type. In this case, `azureopenai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureOpenAIServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `azureopenai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureOpenAIServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.AzureOpenAITaskSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutAzureOpenAiRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/azure_openai_embeddings` to create an inference endpoint that performs a `text_embedding` task. You do not specify a model, as it is defined already in the Azure OpenAI deployment.", + "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" + }, + "PutAzureOpenAiRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/azure_openai_completion` to create an inference endpoint that performs a `completion` task.", + "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" + }, + "PutAzureOpenAiRequestExample3": { + "summary": "A chat completion task", + "description": "Run `PUT _inference/chat_completion/azure_openai_chat_completion` to create an inference endpoint that performs a `chat_completion` task.", + "value": "{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAzureOpenAI" + }, + "examples": { + "PutAzureOpenAiResponseExample1": { + "summary": "A text embedding task", + "description": "A successful response when creating an Azure OpenAI `text_embedding` inference endpoint.", + "value": "{\n \"inference_id\": \"azure_openai_embeddings\",\n \"task_type\": \"text_embedding\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 1140\n },\n \"dimensions\": 1536,\n \"similarity\": \"dot_product\"\n },\n \"chunking_settings\": {\n \"strategy\": \"sentence\",\n \"max_chunk_size\": 250,\n \"sentence_overlap\": 1\n }\n}" + }, + "PutAzureOpenAiResponseExample2": { + "summary": "A completion task", + "description": "A successful response when creating an Azure OpenAI `completion` inference endpoint.", + "value": "{\n \"inference_id\": \"azure_openai_completion\",\n \"task_type\": \"completion\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 120\n }\n }\n}" + }, + "PutAzureOpenAiResponseExample3": { + "summary": "A chat completion task", + "description": "A successful response when creating an Azure OpenAI `chat_completion` inference endpoint.", + "value": "{\n \"inference_id\": \"azure_openai_chat_completion\",\n \"task_type\": \"chat_completion\",\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\",\n \"rate_limit\": {\n \"requests_per_minute\": 120\n }\n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 8.14.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{azureopenai_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_azureopenai.inference", + "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/azure_openai_embeddings\n{\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"azure_openai_embeddings\",\n inference_config={\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"azure_openai_embeddings\",\n inference_config: {\n service: \"azureopenai\",\n service_settings: {\n api_key: \"Api-Key\",\n resource_name: \"Resource-name\",\n deployment_id: \"Deployment-id\",\n api_version: \"2024-02-01\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"azure_openai_embeddings\",\n body: {\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"azure_openai_embeddings\",\n \"body\" => [\n \"service\" => \"azureopenai\",\n \"service_settings\" => [\n \"api_key\" => \"Api-Key\",\n \"resource_name\" => \"Resource-name\",\n \"deployment_id\" => \"Deployment-id\",\n \"api_version\" => \"2024-02-01\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"azureopenai\",\"service_settings\":{\"api_key\":\"Api-Key\",\"resource_name\":\"Resource-name\",\"deployment_id\":\"Deployment-id\",\"api_version\":\"2024-02-01\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/azure_openai_embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"azure_openai_embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"azureopenai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Api-Key\\\",\\\"resource_name\\\":\\\"Resource-name\\\",\\\"deployment_id\\\":\\\"Deployment-id\\\",\\\"api_version\\\":\\\"2024-02-01\\\"}\"))\n )\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{cohere_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create a Cohere inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `cohere` service.", + "operationId": "inference-put-cohere", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.CohereTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "cohere_inference_id", "description": "The unique identifier of the inference endpoint.", "required": true, "deprecated": false, @@ -42606,6 +52192,36 @@ ], "x-api": "put_cohere.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/cohere-embeddings\n{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-Api-key\",\n \"model_id\": \"embed-english-light-v3.0\",\n \"embedding_type\": \"byte\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"cohere-embeddings\",\n inference_config={\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-Api-key\",\n \"model_id\": \"embed-english-light-v3.0\",\n \"embedding_type\": \"byte\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"cohere-embeddings\",\n inference_config: {\n service: \"cohere\",\n service_settings: {\n api_key: \"Cohere-Api-key\",\n model_id: \"embed-english-light-v3.0\",\n embedding_type: \"byte\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"cohere-embeddings\",\n body: {\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-Api-key\",\n \"model_id\": \"embed-english-light-v3.0\",\n \"embedding_type\": \"byte\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"cohere-embeddings\",\n \"body\" => [\n \"service\" => \"cohere\",\n \"service_settings\" => [\n \"api_key\" => \"Cohere-Api-key\",\n \"model_id\" => \"embed-english-light-v3.0\",\n \"embedding_type\" => \"byte\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"cohere\",\"service_settings\":{\"api_key\":\"Cohere-Api-key\",\"model_id\":\"embed-english-light-v3.0\",\"embedding_type\":\"byte\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/cohere-embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"cohere-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"cohere\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Cohere-Api-key\\\",\\\"model_id\\\":\\\"embed-english-light-v3.0\\\",\\\"embedding_type\\\":\\\"byte\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -42724,6 +52340,36 @@ ], "x-api": "put_contextualai.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/rerank/contextualai-rerank\n{\n \"service\": \"contextualai\",\n \"service_settings\": {\n \"api_key\": \"ContextualAI-Api-key\",\n \"model_id\": \"ctxl-rerank-v2-instruct-multilingual-mini\"\n },\n \"task_settings\": {\n \"instruction\": \"Rerank the following documents based on their relevance to the query.\",\n \"top_k\": 3\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"contextualai-rerank\",\n inference_config={\n \"service\": \"contextualai\",\n \"service_settings\": {\n \"api_key\": \"ContextualAI-Api-key\",\n \"model_id\": \"ctxl-rerank-v2-instruct-multilingual-mini\"\n },\n \"task_settings\": {\n \"instruction\": \"Rerank the following documents based on their relevance to the query.\",\n \"top_k\": 3\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"contextualai-rerank\",\n inference_config: {\n service: \"contextualai\",\n service_settings: {\n api_key: \"ContextualAI-Api-key\",\n model_id: \"ctxl-rerank-v2-instruct-multilingual-mini\",\n },\n task_settings: {\n instruction:\n \"Rerank the following documents based on their relevance to the query.\",\n top_k: 3,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"contextualai-rerank\",\n body: {\n \"service\": \"contextualai\",\n \"service_settings\": {\n \"api_key\": \"ContextualAI-Api-key\",\n \"model_id\": \"ctxl-rerank-v2-instruct-multilingual-mini\"\n },\n \"task_settings\": {\n \"instruction\": \"Rerank the following documents based on their relevance to the query.\",\n \"top_k\": 3\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"contextualai-rerank\",\n \"body\" => [\n \"service\" => \"contextualai\",\n \"service_settings\" => [\n \"api_key\" => \"ContextualAI-Api-key\",\n \"model_id\" => \"ctxl-rerank-v2-instruct-multilingual-mini\",\n ],\n \"task_settings\" => [\n \"instruction\" => \"Rerank the following documents based on their relevance to the query.\",\n \"top_k\" => 3,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"contextualai\",\"service_settings\":{\"api_key\":\"ContextualAI-Api-key\",\"model_id\":\"ctxl-rerank-v2-instruct-multilingual-mini\"},\"task_settings\":{\"instruction\":\"Rerank the following documents based on their relevance to the query.\",\"top_k\":3}}' \"$ELASTICSEARCH_URL/_inference/rerank/contextualai-rerank\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"contextualai-rerank\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"contextualai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"ContextualAI-Api-key\\\",\\\"model_id\\\":\\\"ctxl-rerank-v2-instruct-multilingual-mini\\\"}\"))\n .taskSettings(JsonData.fromJson(\"{\\\"instruction\\\":\\\"Rerank the following documents based on their relevance to the query.\\\",\\\"top_k\\\":3}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -42863,6 +52509,36 @@ ], "x-api": "put_custom.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/custom-embeddings\n{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.openai.com/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n },\n \"request\": \"{\\\"input\\\": ${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\": \"$.data[*].embedding[*]\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"custom-embeddings\",\n inference_config={\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.openai.com/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n },\n \"request\": \"{\\\"input\\\": ${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\": \"$.data[*].embedding[*]\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"custom-embeddings\",\n inference_config: {\n service: \"custom\",\n service_settings: {\n secret_parameters: {\n api_key: \"\",\n },\n url: \"https://api.openai.com/v1/embeddings\",\n headers: {\n Authorization: \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\",\n },\n request: '{\"input\": ${input}, \"model\": \"text-embedding-3-small\"}',\n response: {\n json_parser: {\n text_embeddings: \"$.data[*].embedding[*]\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"custom-embeddings\",\n body: {\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.openai.com/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n },\n \"request\": \"{\\\"input\\\": ${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\": \"$.data[*].embedding[*]\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"custom-embeddings\",\n \"body\" => [\n \"service\" => \"custom\",\n \"service_settings\" => [\n \"secret_parameters\" => [\n \"api_key\" => \"\",\n ],\n \"url\" => \"https://api.openai.com/v1/embeddings\",\n \"headers\" => [\n \"Authorization\" => \"Bearer \\${api_key}\",\n \"Content-Type\" => \"application/json;charset=utf-8\",\n ],\n \"request\" => \"{\\\"input\\\": \\${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\n \"response\" => [\n \"json_parser\" => [\n \"text_embeddings\" => \"$.data[*].embedding[*]\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"custom\",\"service_settings\":{\"secret_parameters\":{\"api_key\":\"\"},\"url\":\"https://api.openai.com/v1/embeddings\",\"headers\":{\"Authorization\":\"Bearer ${api_key}\",\"Content-Type\":\"application/json;charset=utf-8\"},\"request\":\"{\\\"input\\\": ${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\"response\":{\"json_parser\":{\"text_embeddings\":\"$.data[*].embedding[*]\"}}}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/custom-embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"custom-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"custom\")\n .serviceSettings(JsonData.fromJson(\"{\\\"secret_parameters\\\":{\\\"api_key\\\":\\\"\\\"},\\\"url\\\":\\\"https://api.openai.com/v1/embeddings\\\",\\\"headers\\\":{\\\"Authorization\\\":\\\"Bearer ${api_key}\\\",\\\"Content-Type\\\":\\\"application/json;charset=utf-8\\\"},\\\"request\\\":\\\"{\\\\\"input\\\\\": ${input}, \\\\\"model\\\\\": \\\\\"text-embedding-3-small\\\\\"}\\\",\\\"response\\\":{\\\"json_parser\\\":{\\\"text_embeddings\\\":\\\"$.data[*].embedding[*]\\\"}}}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -43126,6 +52802,36 @@ ], "x-api": "put_elasticsearch.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/sparse_embedding/my-elser-model\n{\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": { \n \"enabled\": true,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n },\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\" \n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n inference_config={\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": True,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n },\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n inference_config: {\n service: \"elasticsearch\",\n service_settings: {\n adaptive_allocations: {\n enabled: true,\n min_number_of_allocations: 1,\n max_number_of_allocations: 4,\n },\n num_threads: 1,\n model_id: \".elser_model_2\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n body: {\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n },\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n \"body\" => [\n \"service\" => \"elasticsearch\",\n \"service_settings\" => [\n \"adaptive_allocations\" => [\n \"enabled\" => true,\n \"min_number_of_allocations\" => 1,\n \"max_number_of_allocations\" => 4,\n ],\n \"num_threads\" => 1,\n \"model_id\" => \".elser_model_2\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elasticsearch\",\"service_settings\":{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":1,\"max_number_of_allocations\":4},\"num_threads\":1,\"model_id\":\".elser_model_2\"}}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n .inferenceConfig(i -> i\n .service(\"elasticsearch\")\n .serviceSettings(JsonData.fromJson(\"{\\\"adaptive_allocations\\\":{\\\"enabled\\\":true,\\\"min_number_of_allocations\\\":1,\\\"max_number_of_allocations\\\":4},\\\"num_threads\\\":1,\\\"model_id\\\":\\\".elser_model_2\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -43259,6 +52965,36 @@ ], "x-api": "put_elser.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/sparse_embedding/my-elser-model\n{\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n inference_config={\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n inference_config: {\n service: \"elser\",\n service_settings: {\n num_allocations: 1,\n num_threads: 1,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n body: {\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n \"body\" => [\n \"service\" => \"elser\",\n \"service_settings\" => [\n \"num_allocations\" => 1,\n \"num_threads\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elser\",\"service_settings\":{\"num_allocations\":1,\"num_threads\":1}}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n .inferenceConfig(i -> i\n .service(\"elser\")\n .serviceSettings(JsonData.fromJson(\"{\\\"num_allocations\\\":1,\\\"num_threads\\\":1}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -43380,6 +53116,36 @@ ], "x-api": "put_googleaistudio.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/completion/google_ai_studio_completion\n{\n \"service\": \"googleaistudio\",\n \"service_settings\": {\n \"api_key\": \"api-key\",\n \"model_id\": \"model-id\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"google_ai_studio_completion\",\n inference_config={\n \"service\": \"googleaistudio\",\n \"service_settings\": {\n \"api_key\": \"api-key\",\n \"model_id\": \"model-id\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"google_ai_studio_completion\",\n inference_config: {\n service: \"googleaistudio\",\n service_settings: {\n api_key: \"api-key\",\n model_id: \"model-id\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"google_ai_studio_completion\",\n body: {\n \"service\": \"googleaistudio\",\n \"service_settings\": {\n \"api_key\": \"api-key\",\n \"model_id\": \"model-id\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"google_ai_studio_completion\",\n \"body\" => [\n \"service\" => \"googleaistudio\",\n \"service_settings\" => [\n \"api_key\" => \"api-key\",\n \"model_id\" => \"model-id\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"googleaistudio\",\"service_settings\":{\"api_key\":\"api-key\",\"model_id\":\"model-id\"}}' \"$ELASTICSEARCH_URL/_inference/completion/google_ai_studio_completion\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"google_ai_studio_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"googleaistudio\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"api-key\\\",\\\"model_id\\\":\\\"model-id\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -43614,6 +53380,36 @@ ], "x-api": "put_googlevertexai.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/google_vertex_ai_embeddingss\n{\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"model_id\": \"model-id\",\n \"location\": \"location\",\n \"project_id\": \"project-id\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"google_vertex_ai_embeddingss\",\n inference_config={\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"model_id\": \"model-id\",\n \"location\": \"location\",\n \"project_id\": \"project-id\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"google_vertex_ai_embeddingss\",\n inference_config: {\n service: \"googlevertexai\",\n service_settings: {\n service_account_json: \"service-account-json\",\n model_id: \"model-id\",\n location: \"location\",\n project_id: \"project-id\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"google_vertex_ai_embeddingss\",\n body: {\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"model_id\": \"model-id\",\n \"location\": \"location\",\n \"project_id\": \"project-id\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"google_vertex_ai_embeddingss\",\n \"body\" => [\n \"service\" => \"googlevertexai\",\n \"service_settings\" => [\n \"service_account_json\" => \"service-account-json\",\n \"model_id\" => \"model-id\",\n \"location\" => \"location\",\n \"project_id\" => \"project-id\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"googlevertexai\",\"service_settings\":{\"service_account_json\":\"service-account-json\",\"model_id\":\"model-id\",\"location\":\"location\",\"project_id\":\"project-id\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/google_vertex_ai_embeddingss\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"google_vertex_ai_embeddingss\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"googlevertexai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"service_account_json\\\":\\\"service-account-json\\\",\\\"model_id\\\":\\\"model-id\\\",\\\"location\\\":\\\"location\\\",\\\"project_id\\\":\\\"project-id\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -43723,6 +53519,36 @@ ], "x-api": "put_groq.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/chat_completion/groq-chat-completion\n{\n \"service\": \"groq\",\n \"service_settings\": {\n \"api_key\": \"groq-api-key\",\n \"model_id\": \"llama-3.3-70b-versatile\" \n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"chat_completion\",\n inference_id=\"groq-chat-completion\",\n inference_config={\n \"service\": \"groq\",\n \"service_settings\": {\n \"api_key\": \"groq-api-key\",\n \"model_id\": \"llama-3.3-70b-versatile\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"chat_completion\",\n inference_id: \"groq-chat-completion\",\n inference_config: {\n service: \"groq\",\n service_settings: {\n api_key: \"groq-api-key\",\n model_id: \"llama-3.3-70b-versatile\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"chat_completion\",\n inference_id: \"groq-chat-completion\",\n body: {\n \"service\": \"groq\",\n \"service_settings\": {\n \"api_key\": \"groq-api-key\",\n \"model_id\": \"llama-3.3-70b-versatile\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"chat_completion\",\n \"inference_id\" => \"groq-chat-completion\",\n \"body\" => [\n \"service\" => \"groq\",\n \"service_settings\" => [\n \"api_key\" => \"groq-api-key\",\n \"model_id\" => \"llama-3.3-70b-versatile\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"groq\",\"service_settings\":{\"api_key\":\"groq-api-key\",\"model_id\":\"llama-3.3-70b-versatile\"}}' \"$ELASTICSEARCH_URL/_inference/chat_completion/groq-chat-completion\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"groq-chat-completion\")\n .taskType(TaskType.ChatCompletion)\n .inferenceConfig(i -> i\n .service(\"groq\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"groq-api-key\\\",\\\"model_id\\\":\\\"llama-3.3-70b-versatile\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -43857,6 +53683,36 @@ ], "x-api": "put_hugging_face.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/hugging-face-embeddings\n{\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\", \n \"url\": \"url-endpoint\" \n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"hugging-face-embeddings\",\n inference_config={\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\",\n \"url\": \"url-endpoint\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"hugging-face-embeddings\",\n inference_config: {\n service: \"hugging_face\",\n service_settings: {\n api_key: \"hugging-face-access-token\",\n url: \"url-endpoint\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"hugging-face-embeddings\",\n body: {\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\",\n \"url\": \"url-endpoint\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"hugging-face-embeddings\",\n \"body\" => [\n \"service\" => \"hugging_face\",\n \"service_settings\" => [\n \"api_key\" => \"hugging-face-access-token\",\n \"url\" => \"url-endpoint\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"hugging_face\",\"service_settings\":{\"api_key\":\"hugging-face-access-token\",\"url\":\"url-endpoint\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/hugging-face-embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"hugging-face-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"hugging_face\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"hugging-face-access-token\\\",\\\"url\\\":\\\"url-endpoint\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -44023,6 +53879,36 @@ ], "x-api": "put_jinaai.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/jinaai-embeddings\n{\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"api_key\": \"JinaAi-Api-key\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"jinaai-embeddings\",\n inference_config={\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"api_key\": \"JinaAi-Api-key\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"jinaai-embeddings\",\n inference_config: {\n service: \"jinaai\",\n service_settings: {\n model_id: \"jina-embeddings-v3\",\n api_key: \"JinaAi-Api-key\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"jinaai-embeddings\",\n body: {\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"api_key\": \"JinaAi-Api-key\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"jinaai-embeddings\",\n \"body\" => [\n \"service\" => \"jinaai\",\n \"service_settings\" => [\n \"model_id\" => \"jina-embeddings-v3\",\n \"api_key\" => \"JinaAi-Api-key\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"jinaai\",\"service_settings\":{\"model_id\":\"jina-embeddings-v3\",\"api_key\":\"JinaAi-Api-key\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/jinaai-embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"jinaai-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"jinaai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\"jina-embeddings-v3\\\",\\\"api_key\\\":\\\"JinaAi-Api-key\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -44151,6 +54037,36 @@ ], "x-api": "put_llama.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/llama-text-embedding\n{\n \"service\": \"llama\",\n \"service_settings\": {\n \"url\": \"http://localhost:8321/v1/inference/embeddings\",\n \"dimensions\": 384,\n \"model_id\": \"all-MiniLM-L6-v2\" \n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"llama-text-embedding\",\n inference_config={\n \"service\": \"llama\",\n \"service_settings\": {\n \"url\": \"http://localhost:8321/v1/inference/embeddings\",\n \"dimensions\": 384,\n \"model_id\": \"all-MiniLM-L6-v2\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"llama-text-embedding\",\n inference_config: {\n service: \"llama\",\n service_settings: {\n url: \"http://localhost:8321/v1/inference/embeddings\",\n dimensions: 384,\n model_id: \"all-MiniLM-L6-v2\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"llama-text-embedding\",\n body: {\n \"service\": \"llama\",\n \"service_settings\": {\n \"url\": \"http://localhost:8321/v1/inference/embeddings\",\n \"dimensions\": 384,\n \"model_id\": \"all-MiniLM-L6-v2\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"llama-text-embedding\",\n \"body\" => [\n \"service\" => \"llama\",\n \"service_settings\" => [\n \"url\" => \"http://localhost:8321/v1/inference/embeddings\",\n \"dimensions\" => 384,\n \"model_id\" => \"all-MiniLM-L6-v2\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"llama\",\"service_settings\":{\"url\":\"http://localhost:8321/v1/inference/embeddings\",\"dimensions\":384,\"model_id\":\"all-MiniLM-L6-v2\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/llama-text-embedding\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"llama-text-embedding\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"llama\")\n .serviceSettings(JsonData.fromJson(\"{\\\"url\\\":\\\"http://localhost:8321/v1/inference/embeddings\\\",\\\"dimensions\\\":384,\\\"model_id\\\":\\\"all-MiniLM-L6-v2\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -44271,6 +54187,36 @@ ], "x-api": "put_mistral.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/mistral-embeddings-test\n{\n \"service\": \"mistral\",\n \"service_settings\": {\n \"api_key\": \"Mistral-API-Key\",\n \"model\": \"mistral-embed\" \n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"mistral-embeddings-test\",\n inference_config={\n \"service\": \"mistral\",\n \"service_settings\": {\n \"api_key\": \"Mistral-API-Key\",\n \"model\": \"mistral-embed\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"mistral-embeddings-test\",\n inference_config: {\n service: \"mistral\",\n service_settings: {\n api_key: \"Mistral-API-Key\",\n model: \"mistral-embed\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"mistral-embeddings-test\",\n body: {\n \"service\": \"mistral\",\n \"service_settings\": {\n \"api_key\": \"Mistral-API-Key\",\n \"model\": \"mistral-embed\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"mistral-embeddings-test\",\n \"body\" => [\n \"service\" => \"mistral\",\n \"service_settings\" => [\n \"api_key\" => \"Mistral-API-Key\",\n \"model\" => \"mistral-embed\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"mistral\",\"service_settings\":{\"api_key\":\"Mistral-API-Key\",\"model\":\"mistral-embed\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/mistral-embeddings-test\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"mistral-embeddings-test\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"mistral\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Mistral-API-Key\\\",\\\"model\\\":\\\"mistral-embed\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -44477,6 +54423,36 @@ ], "x-api": "put_nvidia.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/nvidia-text-embedding\n{\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"url\": \"nvidia-embeddings-url\",\n \"api_key\": \"nvidia-embeddings-token\",\n \"model_id\": \"nvidia/llama-3.2-nv-embedqa-1b-v2\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"nvidia-text-embedding\",\n inference_config={\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"url\": \"nvidia-embeddings-url\",\n \"api_key\": \"nvidia-embeddings-token\",\n \"model_id\": \"nvidia/llama-3.2-nv-embedqa-1b-v2\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"nvidia-text-embedding\",\n inference_config: {\n service: \"nvidia\",\n service_settings: {\n url: \"nvidia-embeddings-url\",\n api_key: \"nvidia-embeddings-token\",\n model_id: \"nvidia/llama-3.2-nv-embedqa-1b-v2\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"nvidia-text-embedding\",\n body: {\n \"service\": \"nvidia\",\n \"service_settings\": {\n \"url\": \"nvidia-embeddings-url\",\n \"api_key\": \"nvidia-embeddings-token\",\n \"model_id\": \"nvidia/llama-3.2-nv-embedqa-1b-v2\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"nvidia-text-embedding\",\n \"body\" => [\n \"service\" => \"nvidia\",\n \"service_settings\" => [\n \"url\" => \"nvidia-embeddings-url\",\n \"api_key\" => \"nvidia-embeddings-token\",\n \"model_id\" => \"nvidia/llama-3.2-nv-embedqa-1b-v2\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"nvidia\",\"service_settings\":{\"url\":\"nvidia-embeddings-url\",\"api_key\":\"nvidia-embeddings-token\",\"model_id\":\"nvidia/llama-3.2-nv-embedqa-1b-v2\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/nvidia-text-embedding\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"nvidia-text-embedding\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"nvidia\")\n .serviceSettings(JsonData.fromJson(\"{\\\"url\\\":\\\"nvidia-embeddings-url\\\",\\\"api_key\\\":\\\"nvidia-embeddings-token\\\",\\\"model_id\\\":\\\"nvidia/llama-3.2-nv-embedqa-1b-v2\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -44611,6 +54587,36 @@ ], "x-api": "put_openai.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/openai-embeddings\n{\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"text-embedding-3-small\",\n \"dimensions\": 128\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"openai-embeddings\",\n inference_config={\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"text-embedding-3-small\",\n \"dimensions\": 128\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"openai-embeddings\",\n inference_config: {\n service: \"openai\",\n service_settings: {\n api_key: \"OpenAI-API-Key\",\n model_id: \"text-embedding-3-small\",\n dimensions: 128,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"openai-embeddings\",\n body: {\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"text-embedding-3-small\",\n \"dimensions\": 128\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"openai-embeddings\",\n \"body\" => [\n \"service\" => \"openai\",\n \"service_settings\" => [\n \"api_key\" => \"OpenAI-API-Key\",\n \"model_id\" => \"text-embedding-3-small\",\n \"dimensions\" => 128,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"openai\",\"service_settings\":{\"api_key\":\"OpenAI-API-Key\",\"model_id\":\"text-embedding-3-small\",\"dimensions\":128}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/openai-embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"openai-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"openai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"OpenAI-API-Key\\\",\\\"model_id\\\":\\\"text-embedding-3-small\\\",\\\"dimensions\\\":128}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -44787,140 +54793,36 @@ ], "x-api": "put_openshift_ai.inference", "x-category": "ai/ml", - "x-metaTags": [ + "x-codeSamples": [ { - "content": "Elasticsearch, Machine Learning", - "name": "product_name" - } - ] - } - }, - "/_inference/{task_type}/{voyageai_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create a VoyageAI inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `voyageai` service.\n\nAvoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.", - "operationId": "inference-put-voyageai", - "parameters": [ + "lang": "Console", + "source": "PUT _inference/text_embedding/openshift-ai-text-embedding\n{\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-embeddings-url\",\n \"api_key\": \"openshift-ai-embeddings-token\",\n \"model_id\": \"gritlm-7b\"\n }\n}" + }, { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types.VoyageAITaskType" - }, - "style": "simple" + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"openshift-ai-text-embedding\",\n inference_config={\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-embeddings-url\",\n \"api_key\": \"openshift-ai-embeddings-token\",\n \"model_id\": \"gritlm-7b\"\n }\n },\n)" }, { - "in": "path", - "name": "voyageai_inference_id", - "description": "The unique identifier of the inference endpoint.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"openshift-ai-text-embedding\",\n inference_config: {\n service: \"openshift_ai\",\n service_settings: {\n url: \"openshift-ai-embeddings-url\",\n api_key: \"openshift-ai-embeddings-token\",\n model_id: \"gritlm-7b\",\n },\n },\n});" }, { - "in": "query", - "name": "timeout", - "description": "Specifies the amount of time to wait for the inference endpoint to be created.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chunking_settings": { - "externalDocs": { - "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" - }, - "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank` task type.", - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" - } - ] - }, - "service": { - "description": "The type of service supported for the specified task type. In this case, `voyageai`.", - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.VoyageAIServiceType" - } - ] - }, - "service_settings": { - "description": "Settings used to install the inference model. These settings are specific to the `voyageai` service.", - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.VoyageAIServiceSettings" - } - ] - }, - "task_settings": { - "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", - "allOf": [ - { - "$ref": "#/components/schemas/inference._types.VoyageAITaskSettings" - } - ] - } - }, - "required": [ - "service", - "service_settings" - ] - }, - "examples": { - "PutVoyageAIRequestExample1": { - "summary": "A text embedding task", - "description": "Run `PUT _inference/text_embedding/voyageai-embeddings` to create an inference endpoint that performs a `text_embedding` task. The embeddings created by requests to this endpoint will have 512 dimensions.", - "value": "{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n}" - }, - "PutVoyageAIRequestExample2": { - "summary": "A rerank task", - "description": "Run `PUT _inference/rerank/voyageai-rerank` to create an inference endpoint that performs a `rerank` task.", - "value": "{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"rerank-2\"\n }\n}" - } - } - } + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"openshift-ai-text-embedding\",\n body: {\n \"service\": \"openshift_ai\",\n \"service_settings\": {\n \"url\": \"openshift-ai-embeddings-url\",\n \"api_key\": \"openshift-ai-embeddings-token\",\n \"model_id\": \"gritlm-7b\"\n }\n }\n)" }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoVoyageAI" - } - } - } + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"openshift-ai-text-embedding\",\n \"body\" => [\n \"service\" => \"openshift_ai\",\n \"service_settings\" => [\n \"url\" => \"openshift-ai-embeddings-url\",\n \"api_key\" => \"openshift-ai-embeddings-token\",\n \"model_id\" => \"gritlm-7b\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"openshift_ai\",\"service_settings\":{\"url\":\"openshift-ai-embeddings-url\",\"api_key\":\"openshift-ai-embeddings-token\",\"model_id\":\"gritlm-7b\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/openshift-ai-text-embedding\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"openshift-ai-text-embedding\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"openshift_ai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"url\\\":\\\"openshift-ai-embeddings-url\\\",\\\"api_key\\\":\\\"openshift-ai-embeddings-token\\\",\\\"model_id\\\":\\\"gritlm-7b\\\"}\"))\n )\n);\n" } - }, - "x-state": "Generally available; Added in 8.19.0", - "x-variations": [ - "
\n PUT\n /_inference/{task_type}/{voyageai_inference_id}\n
\n " - ], - "x-req-auth": [ - "Cluster privileges: `manage_inference`\n" ], - "x-api": "put_voyageai.inference", - "x-category": "ai/ml", "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -44929,14 +54831,14 @@ ] } }, - "/_inference/{task_type}/{watsonx_inference_id}": { + "/_inference/{task_type}/{voyageai_inference_id}": { "put": { "tags": [ "inference" ], - "summary": "Create a Watsonx inference endpoint", - "description": "Create an inference endpoint to perform an inference task with the `watsonxai` service.\nYou need an IBM Cloud Databases for Elasticsearch deployment to use the `watsonxai` inference service.\nYou can provision one through the IBM catalog, the Cloud Databases CLI plug-in, the Cloud Databases API, or Terraform.", - "operationId": "inference-put-watsonx", + "summary": "Create a VoyageAI inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `voyageai` service.\n\nAvoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.", + "operationId": "inference-put-voyageai", "parameters": [ { "in": "path", @@ -44945,13 +54847,177 @@ "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/inference._types.WatsonxTaskType" + "$ref": "#/components/schemas/inference._types.VoyageAITaskType" }, "style": "simple" }, { "in": "path", - "name": "watsonx_inference_id", + "name": "voyageai_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" + }, + "description": "The chunking configuration object.\nApplies only to the `text_embedding` task type.\nNot applicable to the `rerank` task type.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + } + ] + }, + "service": { + "description": "The type of service supported for the specified task type. In this case, `voyageai`.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.VoyageAIServiceType" + } + ] + }, + "service_settings": { + "description": "Settings used to install the inference model. These settings are specific to the `voyageai` service.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.VoyageAIServiceSettings" + } + ] + }, + "task_settings": { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.VoyageAITaskSettings" + } + ] + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutVoyageAIRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/voyageai-embeddings` to create an inference endpoint that performs a `text_embedding` task. The embeddings created by requests to this endpoint will have 512 dimensions.", + "value": "{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n}" + }, + "PutVoyageAIRequestExample2": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/voyageai-rerank` to create an inference endpoint that performs a `rerank` task.", + "value": "{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"rerank-2\"\n }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoVoyageAI" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.19.0", + "x-variations": [ + "
\n PUT\n /_inference/{task_type}/{voyageai_inference_id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_inference`\n" + ], + "x-api": "put_voyageai.inference", + "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/openai-embeddings\n{\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"openai-embeddings\",\n inference_config={\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"openai-embeddings\",\n inference_config: {\n service: \"voyageai\",\n service_settings: {\n model_id: \"voyage-3-large\",\n dimensions: 512,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"openai-embeddings\",\n body: {\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"openai-embeddings\",\n \"body\" => [\n \"service\" => \"voyageai\",\n \"service_settings\" => [\n \"model_id\" => \"voyage-3-large\",\n \"dimensions\" => 512,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"voyageai\",\"service_settings\":{\"model_id\":\"voyage-3-large\",\"dimensions\":512}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/openai-embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"openai-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"voyageai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\"voyage-3-large\\\",\\\"dimensions\\\":512}\"))\n )\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{watsonx_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create a Watsonx inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `watsonxai` service.\nYou need an IBM Cloud Databases for Elasticsearch deployment to use the `watsonxai` inference service.\nYou can provision one through the IBM catalog, the Cloud Databases CLI plug-in, the Cloud Databases API, or Terraform.", + "operationId": "inference-put-watsonx", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.WatsonxTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "watsonx_inference_id", "description": "The unique identifier of the inference endpoint.", "required": true, "deprecated": false, @@ -45041,6 +55107,36 @@ ], "x-api": "put_watsonx.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/text_embedding/watsonx-embeddings\n{\n \"service\": \"watsonxai\",\n \"service_settings\": {\n \"api_key\": \"Watsonx-API-Key\", \n \"url\": \"Wastonx-URL\", \n \"model_id\": \"ibm/slate-30m-english-rtrvr\",\n \"project_id\": \"IBM-Cloud-ID\", \n \"api_version\": \"2024-03-14\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"watsonx-embeddings\",\n inference_config={\n \"service\": \"watsonxai\",\n \"service_settings\": {\n \"api_key\": \"Watsonx-API-Key\",\n \"url\": \"Wastonx-URL\",\n \"model_id\": \"ibm/slate-30m-english-rtrvr\",\n \"project_id\": \"IBM-Cloud-ID\",\n \"api_version\": \"2024-03-14\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"watsonx-embeddings\",\n inference_config: {\n service: \"watsonxai\",\n service_settings: {\n api_key: \"Watsonx-API-Key\",\n url: \"Wastonx-URL\",\n model_id: \"ibm/slate-30m-english-rtrvr\",\n project_id: \"IBM-Cloud-ID\",\n api_version: \"2024-03-14\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"watsonx-embeddings\",\n body: {\n \"service\": \"watsonxai\",\n \"service_settings\": {\n \"api_key\": \"Watsonx-API-Key\",\n \"url\": \"Wastonx-URL\",\n \"model_id\": \"ibm/slate-30m-english-rtrvr\",\n \"project_id\": \"IBM-Cloud-ID\",\n \"api_version\": \"2024-03-14\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"watsonx-embeddings\",\n \"body\" => [\n \"service\" => \"watsonxai\",\n \"service_settings\" => [\n \"api_key\" => \"Watsonx-API-Key\",\n \"url\" => \"Wastonx-URL\",\n \"model_id\" => \"ibm/slate-30m-english-rtrvr\",\n \"project_id\" => \"IBM-Cloud-ID\",\n \"api_version\" => \"2024-03-14\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"watsonxai\",\"service_settings\":{\"api_key\":\"Watsonx-API-Key\",\"url\":\"Wastonx-URL\",\"model_id\":\"ibm/slate-30m-english-rtrvr\",\"project_id\":\"IBM-Cloud-ID\",\"api_version\":\"2024-03-14\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/watsonx-embeddings\"" + }, + { + "lang": "Java", + "source": "client.inference().put(p -> p\n .inferenceId(\"watsonx-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"watsonxai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Watsonx-API-Key\\\",\\\"url\\\":\\\"Wastonx-URL\\\",\\\"model_id\\\":\\\"ibm/slate-30m-english-rtrvr\\\",\\\"project_id\\\":\\\"IBM-Cloud-ID\\\",\\\"api_version\\\":\\\"2024-03-14\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -45177,6 +55273,36 @@ ], "x-api": "rerank.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _inference/rerank/cohere_rerank\n{\n \"input\": [\"luke\", \"like\", \"leia\", \"chewy\",\"r2d2\", \"star\", \"wars\"],\n \"query\": \"star wars main character\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.rerank(\n inference_id=\"cohere_rerank\",\n input=[\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\"\n ],\n query=\"star wars main character\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.rerank({\n inference_id: \"cohere_rerank\",\n input: [\"luke\", \"like\", \"leia\", \"chewy\", \"r2d2\", \"star\", \"wars\"],\n query: \"star wars main character\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.rerank(\n inference_id: \"cohere_rerank\",\n body: {\n \"input\": [\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\"\n ],\n \"query\": \"star wars main character\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->rerank([\n \"inference_id\" => \"cohere_rerank\",\n \"body\" => [\n \"input\" => array(\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\",\n ),\n \"query\" => \"star wars main character\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":[\"luke\",\"like\",\"leia\",\"chewy\",\"r2d2\",\"star\",\"wars\"],\"query\":\"star wars main character\"}' \"$ELASTICSEARCH_URL/_inference/rerank/cohere_rerank\"" + }, + { + "lang": "Java", + "source": "client.inference().rerank(r -> r\n .inferenceId(\"cohere_rerank\")\n .input(List.of(\"luke\",\"like\",\"leia\",\"chewy\",\"r2d2\",\"star\",\"wars\"))\n .query(\"star wars main character\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -45284,6 +55410,36 @@ ], "x-api": "sparse_embedding.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _inference/sparse_embedding/my-elser-model\n{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.sparse_embedding(\n inference_id=\"my-elser-model\",\n input=\"The sky above the port was the color of television tuned to a dead channel.\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.sparseEmbedding({\n inference_id: \"my-elser-model\",\n input:\n \"The sky above the port was the color of television tuned to a dead channel.\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.sparse_embedding(\n inference_id: \"my-elser-model\",\n body: {\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->sparseEmbedding([\n \"inference_id\" => \"my-elser-model\",\n \"body\" => [\n \"input\" => \"The sky above the port was the color of television tuned to a dead channel.\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"The sky above the port was the color of television tuned to a dead channel.\"}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "lang": "Java", + "source": "client.inference().sparseEmbedding(s -> s\n .inferenceId(\"my-elser-model\")\n .input(\"The sky above the port was the color of television tuned to a dead channel.\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -45388,6 +55544,36 @@ ], "x-api": "stream_completion.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _inference/completion/openai-completion/_stream\n{\n \"input\": \"What is Elastic?\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.stream_completion(\n inference_id=\"openai-completion\",\n input=\"What is Elastic?\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.streamCompletion({\n inference_id: \"openai-completion\",\n input: \"What is Elastic?\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.stream_completion(\n inference_id: \"openai-completion\",\n body: {\n \"input\": \"What is Elastic?\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->streamCompletion([\n \"inference_id\" => \"openai-completion\",\n \"body\" => [\n \"input\" => \"What is Elastic?\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"What is Elastic?\"}' \"$ELASTICSEARCH_URL/_inference/completion/openai-completion/_stream\"" + }, + { + "lang": "Java", + "source": "client.inference().streamCompletion(s -> s\n .inferenceId(\"openai-completion\")\n .input(\"What is Elastic?\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -45499,6 +55685,36 @@ ], "x-api": "text_embedding.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _inference/text_embedding/my-cohere-endpoint\n{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\": \"ingest\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.text_embedding(\n inference_id=\"my-cohere-endpoint\",\n input=\"The sky above the port was the color of television tuned to a dead channel.\",\n input_type=\"ingest\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.textEmbedding({\n inference_id: \"my-cohere-endpoint\",\n input:\n \"The sky above the port was the color of television tuned to a dead channel.\",\n input_type: \"ingest\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.text_embedding(\n inference_id: \"my-cohere-endpoint\",\n body: {\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\": \"ingest\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->textEmbedding([\n \"inference_id\" => \"my-cohere-endpoint\",\n \"body\" => [\n \"input\" => \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\" => \"ingest\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"The sky above the port was the color of television tuned to a dead channel.\",\"input_type\":\"ingest\"}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-cohere-endpoint\"" + }, + { + "lang": "Java", + "source": "client.inference().textEmbedding(t -> t\n .inferenceId(\"my-cohere-endpoint\")\n .input(\"The sky above the port was the color of television tuned to a dead channel.\")\n .inputType(\"ingest\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -45565,6 +55781,36 @@ ], "x-api": "update.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/my-inference-endpoint/_update\n{\n \"service_settings\": {\n \"api_key\": \"\"\n },\n\"service\": \"example-service\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.update(\n inference_id=\"my-inference-endpoint\",\n inference_config={\n \"service_settings\": {\n \"api_key\": \"\"\n },\n \"service\": \"example-service\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.update({\n inference_id: \"my-inference-endpoint\",\n inference_config: {\n service_settings: {\n api_key: \"\",\n },\n service: \"example-service\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.update(\n inference_id: \"my-inference-endpoint\",\n body: {\n \"service_settings\": {\n \"api_key\": \"\"\n },\n \"service\": \"example-service\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->update([\n \"inference_id\" => \"my-inference-endpoint\",\n \"body\" => [\n \"service_settings\" => [\n \"api_key\" => \"\",\n ],\n \"service\" => \"example-service\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service_settings\":{\"api_key\":\"\"},\"service\":\"example-service\"}' \"$ELASTICSEARCH_URL/_inference/my-inference-endpoint/_update\"" + }, + { + "lang": "Java", + "source": "client.inference().update(u -> u\n .inferenceId(\"my-inference-endpoint\")\n .inferenceConfig(i -> i\n .service(\"example-service\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -45642,6 +55888,36 @@ ], "x-api": "update.inference", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _inference/my-inference-endpoint/_update\n{\n \"service_settings\": {\n \"api_key\": \"\"\n },\n\"service\": \"example-service\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.inference.update(\n inference_id=\"my-inference-endpoint\",\n inference_config={\n \"service_settings\": {\n \"api_key\": \"\"\n },\n \"service\": \"example-service\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.inference.update({\n inference_id: \"my-inference-endpoint\",\n inference_config: {\n service_settings: {\n api_key: \"\",\n },\n service: \"example-service\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.inference.update(\n inference_id: \"my-inference-endpoint\",\n body: {\n \"service_settings\": {\n \"api_key\": \"\"\n },\n \"service\": \"example-service\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->inference()->update([\n \"inference_id\" => \"my-inference-endpoint\",\n \"body\" => [\n \"service_settings\" => [\n \"api_key\" => \"\",\n ],\n \"service\" => \"example-service\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service_settings\":{\"api_key\":\"\"},\"service\":\"example-service\"}' \"$ELASTICSEARCH_URL/_inference/my-inference-endpoint/_update\"" + }, + { + "lang": "Java", + "source": "client.inference().update(u -> u\n .inferenceId(\"my-inference-endpoint\")\n .inferenceConfig(i -> i\n .service(\"example-service\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"\\\"}\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -45734,6 +56010,36 @@ ], "x-api": "info", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /\n" + }, + { + "lang": "Python", + "source": "resp = client.info()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.info();" + }, + { + "lang": "Ruby", + "source": "response = client.info" + }, + { + "lang": "PHP", + "source": "$resp = $client->info();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/\"" + }, + { + "lang": "Java", + "source": "client.info();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46042,6 +56348,36 @@ ], "x-api": "get_ip_location_database.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_ingest/ip_location/database/my-database-id\n" + }, + { + "lang": "Python", + "source": "resp = client.ingest.get_ip_location_database(\n id=\"my-database-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.getIpLocationDatabase({\n id: \"my-database-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.get_ip_location_database(\n id: \"my-database-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->getIpLocationDatabase([\n \"id\" => \"my-database-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-id\"" + }, + { + "lang": "Java", + "source": "client.ingest().getIpLocationDatabase(g -> g\n .id(\"my-database-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46125,6 +56461,36 @@ ], "x-api": "put_ip_location_database.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ingest/ip_location/database/my-database-1\n{\n \"name\": \"GeoIP2-Domain\",\n \"maxmind\": {\n \"account_id\": \"1234567\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ingest.put_ip_location_database(\n id=\"my-database-1\",\n configuration={\n \"name\": \"GeoIP2-Domain\",\n \"maxmind\": {\n \"account_id\": \"1234567\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.putIpLocationDatabase({\n id: \"my-database-1\",\n configuration: {\n name: \"GeoIP2-Domain\",\n maxmind: {\n account_id: \"1234567\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.put_ip_location_database(\n id: \"my-database-1\",\n body: {\n \"name\": \"GeoIP2-Domain\",\n \"maxmind\": {\n \"account_id\": \"1234567\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->putIpLocationDatabase([\n \"id\" => \"my-database-1\",\n \"body\" => [\n \"name\" => \"GeoIP2-Domain\",\n \"maxmind\" => [\n \"account_id\" => \"1234567\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"GeoIP2-Domain\",\"maxmind\":{\"account_id\":\"1234567\"}}' \"$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-1\"" + }, + { + "lang": "Java", + "source": "client.ingest().putIpLocationDatabase(p -> p\n .id(\"my-database-1\")\n .configuration(c -> c\n .maxmind(m -> m\n .accountId(\"1234567\")\n )\n .name(\"GeoIP2-Domain\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46192,6 +56558,36 @@ ], "x-api": "delete_ip_location_database.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_ingest/ip_location/database/my-database-id\n" + }, + { + "lang": "Python", + "source": "resp = client.ingest.delete_ip_location_database(\n id=\"my-database-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.deleteIpLocationDatabase({\n id: \"my-database-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.delete_ip_location_database(\n id: \"my-database-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->deleteIpLocationDatabase([\n \"id\" => \"my-database-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-id\"" + }, + { + "lang": "Java", + "source": "client.ingest().deleteIpLocationDatabase(d -> d\n .id(\"my-database-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46273,6 +56669,36 @@ ], "x-api": "get_pipeline.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_ingest/pipeline/my-pipeline-id\n" + }, + { + "lang": "Python", + "source": "resp = client.ingest.get_pipeline(\n id=\"my-pipeline-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.getPipeline({\n id: \"my-pipeline-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.get_pipeline(\n id: \"my-pipeline-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->getPipeline([\n \"id\" => \"my-pipeline-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id\"" + }, + { + "lang": "Java", + "source": "client.ingest().getPipeline(g -> g\n .id(\"my-pipeline-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46424,6 +56850,36 @@ ], "x-api": "put_pipeline.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ingest/pipeline/my-pipeline-id\n{\n \"description\" : \"My optional pipeline description\",\n \"processors\" : [\n {\n \"set\" : {\n \"description\" : \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ingest.put_pipeline(\n id=\"my-pipeline-id\",\n description=\"My optional pipeline description\",\n processors=[\n {\n \"set\": {\n \"description\": \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.putPipeline({\n id: \"my-pipeline-id\",\n description: \"My optional pipeline description\",\n processors: [\n {\n set: {\n description: \"My optional processor description\",\n field: \"my-keyword-field\",\n value: \"foo\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.put_pipeline(\n id: \"my-pipeline-id\",\n body: {\n \"description\": \"My optional pipeline description\",\n \"processors\": [\n {\n \"set\": {\n \"description\": \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->putPipeline([\n \"id\" => \"my-pipeline-id\",\n \"body\" => [\n \"description\" => \"My optional pipeline description\",\n \"processors\" => array(\n [\n \"set\" => [\n \"description\" => \"My optional processor description\",\n \"field\" => \"my-keyword-field\",\n \"value\" => \"foo\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"My optional pipeline description\",\"processors\":[{\"set\":{\"description\":\"My optional processor description\",\"field\":\"my-keyword-field\",\"value\":\"foo\"}}]}' \"$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id\"" + }, + { + "lang": "Java", + "source": "client.ingest().putPipeline(p -> p\n .description(\"My optional pipeline description\")\n .id(\"my-pipeline-id\")\n .processors(pr -> pr\n .set(s -> s\n .field(\"my-keyword-field\")\n .value(JsonData.fromJson(\"\\\"foo\\\"\"))\n .description(\"My optional processor description\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46494,6 +56950,36 @@ ], "x-api": "delete_pipeline.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_ingest/pipeline/my-pipeline-id\n" + }, + { + "lang": "Python", + "source": "resp = client.ingest.delete_pipeline(\n id=\"my-pipeline-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.deletePipeline({\n id: \"my-pipeline-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.delete_pipeline(\n id: \"my-pipeline-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->deletePipeline([\n \"id\" => \"my-pipeline-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id\"" + }, + { + "lang": "Java", + "source": "client.ingest().deletePipeline(d -> d\n .id(\"my-pipeline-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46552,6 +57038,36 @@ ], "x-api": "geo_ip_stats.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ingest/geoip/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ingest.geo_ip_stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.geoIpStats();" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.geo_ip_stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->geoIpStats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/geoip/stats\"" + }, + { + "lang": "Java", + "source": "client.ingest().geoIpStats();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46644,6 +57160,36 @@ ], "x-api": "get_ip_location_database.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_ingest/ip_location/database/my-database-id\n" + }, + { + "lang": "Python", + "source": "resp = client.ingest.get_ip_location_database(\n id=\"my-database-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.getIpLocationDatabase({\n id: \"my-database-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.get_ip_location_database(\n id: \"my-database-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->getIpLocationDatabase([\n \"id\" => \"my-database-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-id\"" + }, + { + "lang": "Java", + "source": "client.ingest().getIpLocationDatabase(g -> g\n .id(\"my-database-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46714,6 +57260,36 @@ ], "x-api": "get_pipeline.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_ingest/pipeline/my-pipeline-id\n" + }, + { + "lang": "Python", + "source": "resp = client.ingest.get_pipeline(\n id=\"my-pipeline-id\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.getPipeline({\n id: \"my-pipeline-id\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.get_pipeline(\n id: \"my-pipeline-id\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->getPipeline([\n \"id\" => \"my-pipeline-id\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id\"" + }, + { + "lang": "Java", + "source": "client.ingest().getPipeline(g -> g\n .id(\"my-pipeline-id\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46762,6 +57338,36 @@ ], "x-api": "processor_grok.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ingest/processor/grok\n" + }, + { + "lang": "Python", + "source": "resp = client.ingest.processor_grok()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.processorGrok();" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.processor_grok" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->processorGrok();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/processor/grok\"" + }, + { + "lang": "Java", + "source": "client.ingest().processorGrok();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46866,6 +57472,36 @@ ], "x-api": "simulate.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ingest/pipeline/_simulate\n{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ingest.simulate(\n pipeline={\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n docs=[\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.simulate({\n pipeline: {\n description: \"_description\",\n processors: [\n {\n set: {\n field: \"field2\",\n value: \"_value\",\n },\n },\n ],\n },\n docs: [\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.simulate(\n body: {\n \"pipeline\": {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->simulate([\n \"body\" => [\n \"pipeline\" => [\n \"description\" => \"_description\",\n \"processors\" => array(\n [\n \"set\" => [\n \"field\" => \"field2\",\n \"value\" => \"_value\",\n ],\n ],\n ),\n ],\n \"docs\" => array(\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"pipeline\":{\"description\":\"_description\",\"processors\":[{\"set\":{\"field\":\"field2\",\"value\":\"_value\"}}]},\"docs\":[{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"bar\"}},{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/pipeline/_simulate\"" + }, + { + "lang": "Java", + "source": "client.ingest().simulate(s -> s\n .docs(List.of(Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))\n ),Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\"))\n )))\n .pipeline(p -> p\n .description(\"_description\")\n .processors(pr -> pr\n .set(se -> se\n .field(\"field2\")\n .value(JsonData.fromJson(\"\\\"_value\\\"\"))\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -46968,6 +57604,36 @@ ], "x-api": "simulate.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ingest/pipeline/_simulate\n{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ingest.simulate(\n pipeline={\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n docs=[\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.simulate({\n pipeline: {\n description: \"_description\",\n processors: [\n {\n set: {\n field: \"field2\",\n value: \"_value\",\n },\n },\n ],\n },\n docs: [\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.simulate(\n body: {\n \"pipeline\": {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->simulate([\n \"body\" => [\n \"pipeline\" => [\n \"description\" => \"_description\",\n \"processors\" => array(\n [\n \"set\" => [\n \"field\" => \"field2\",\n \"value\" => \"_value\",\n ],\n ],\n ),\n ],\n \"docs\" => array(\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"pipeline\":{\"description\":\"_description\",\"processors\":[{\"set\":{\"field\":\"field2\",\"value\":\"_value\"}}]},\"docs\":[{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"bar\"}},{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/pipeline/_simulate\"" + }, + { + "lang": "Java", + "source": "client.ingest().simulate(s -> s\n .docs(List.of(Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))\n ),Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\"))\n )))\n .pipeline(p -> p\n .description(\"_description\")\n .processors(pr -> pr\n .set(se -> se\n .field(\"field2\")\n .value(JsonData.fromJson(\"\\\"_value\\\"\"))\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47083,6 +57749,36 @@ ], "x-api": "simulate.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ingest/pipeline/_simulate\n{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ingest.simulate(\n pipeline={\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n docs=[\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.simulate({\n pipeline: {\n description: \"_description\",\n processors: [\n {\n set: {\n field: \"field2\",\n value: \"_value\",\n },\n },\n ],\n },\n docs: [\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.simulate(\n body: {\n \"pipeline\": {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->simulate([\n \"body\" => [\n \"pipeline\" => [\n \"description\" => \"_description\",\n \"processors\" => array(\n [\n \"set\" => [\n \"field\" => \"field2\",\n \"value\" => \"_value\",\n ],\n ],\n ),\n ],\n \"docs\" => array(\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"pipeline\":{\"description\":\"_description\",\"processors\":[{\"set\":{\"field\":\"field2\",\"value\":\"_value\"}}]},\"docs\":[{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"bar\"}},{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/pipeline/_simulate\"" + }, + { + "lang": "Java", + "source": "client.ingest().simulate(s -> s\n .docs(List.of(Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))\n ),Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\"))\n )))\n .pipeline(p -> p\n .description(\"_description\")\n .processors(pr -> pr\n .set(se -> se\n .field(\"field2\")\n .value(JsonData.fromJson(\"\\\"_value\\\"\"))\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47196,6 +57892,36 @@ ], "x-api": "simulate.ingest", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ingest/pipeline/_simulate\n{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ingest.simulate(\n pipeline={\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n docs=[\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ingest.simulate({\n pipeline: {\n description: \"_description\",\n processors: [\n {\n set: {\n field: \"field2\",\n value: \"_value\",\n },\n },\n ],\n },\n docs: [\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ingest.simulate(\n body: {\n \"pipeline\": {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ingest()->simulate([\n \"body\" => [\n \"pipeline\" => [\n \"description\" => \"_description\",\n \"processors\" => array(\n [\n \"set\" => [\n \"field\" => \"field2\",\n \"value\" => \"_value\",\n ],\n ],\n ),\n ],\n \"docs\" => array(\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"pipeline\":{\"description\":\"_description\",\"processors\":[{\"set\":{\"field\":\"field2\",\"value\":\"_value\"}}]},\"docs\":[{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"bar\"}},{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/pipeline/_simulate\"" + }, + { + "lang": "Java", + "source": "client.ingest().simulate(s -> s\n .docs(List.of(Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))\n ),Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\"))\n )))\n .pipeline(p -> p\n .description(\"_description\")\n .processors(pr -> pr\n .set(se -> se\n .field(\"field2\")\n .value(JsonData.fromJson(\"\\\"_value\\\"\"))\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47270,6 +57996,36 @@ ], "x-api": "get.license", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_license\n" + }, + { + "lang": "Python", + "source": "resp = client.license.get()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.license.get();" + }, + { + "lang": "Ruby", + "source": "response = client.license.get" + }, + { + "lang": "PHP", + "source": "$resp = $client->license()->get();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license\"" + }, + { + "lang": "Java", + "source": "client.license().get(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47398,6 +58154,36 @@ ], "x-api": "post.license", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _license\n{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.license.post(\n licenses=[\n {\n \"uid\": \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\": \"basic\",\n \"issue_date_in_millis\": 1411948800000,\n \"expiry_date_in_millis\": 1914278399999,\n \"max_nodes\": 1,\n \"issued_to\": \"issuedTo\",\n \"issuer\": \"issuer\",\n \"signature\": \"xx\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.license.post({\n licenses: [\n {\n uid: \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n type: \"basic\",\n issue_date_in_millis: 1411948800000,\n expiry_date_in_millis: 1914278399999,\n max_nodes: 1,\n issued_to: \"issuedTo\",\n issuer: \"issuer\",\n signature: \"xx\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.license.post(\n body: {\n \"licenses\": [\n {\n \"uid\": \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\": \"basic\",\n \"issue_date_in_millis\": 1411948800000,\n \"expiry_date_in_millis\": 1914278399999,\n \"max_nodes\": 1,\n \"issued_to\": \"issuedTo\",\n \"issuer\": \"issuer\",\n \"signature\": \"xx\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->license()->post([\n \"body\" => [\n \"licenses\" => array(\n [\n \"uid\" => \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\" => \"basic\",\n \"issue_date_in_millis\" => 1411948800000,\n \"expiry_date_in_millis\" => 1914278399999,\n \"max_nodes\" => 1,\n \"issued_to\" => \"issuedTo\",\n \"issuer\" => \"issuer\",\n \"signature\" => \"xx\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"licenses\":[{\"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\"type\":\"basic\",\"issue_date_in_millis\":1411948800000,\"expiry_date_in_millis\":1914278399999,\"max_nodes\":1,\"issued_to\":\"issuedTo\",\"issuer\":\"issuer\",\"signature\":\"xx\"}]}' \"$ELASTICSEARCH_URL/_license\"" + }, + { + "lang": "Java", + "source": "client.license().post(p -> p\n .licenses(l -> l\n .expiryDateInMillis(1914278399999L)\n .issueDateInMillis(1411948800000L)\n .issuedTo(\"issuedTo\")\n .issuer(\"issuer\")\n .maxNodes(1L)\n .signature(\"xx\")\n .type(LicenseType.Basic)\n .uid(\"893361dc-9749-4997-93cb-802e3d7fa4xx\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47526,6 +58312,36 @@ ], "x-api": "post.license", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _license\n{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.license.post(\n licenses=[\n {\n \"uid\": \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\": \"basic\",\n \"issue_date_in_millis\": 1411948800000,\n \"expiry_date_in_millis\": 1914278399999,\n \"max_nodes\": 1,\n \"issued_to\": \"issuedTo\",\n \"issuer\": \"issuer\",\n \"signature\": \"xx\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.license.post({\n licenses: [\n {\n uid: \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n type: \"basic\",\n issue_date_in_millis: 1411948800000,\n expiry_date_in_millis: 1914278399999,\n max_nodes: 1,\n issued_to: \"issuedTo\",\n issuer: \"issuer\",\n signature: \"xx\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.license.post(\n body: {\n \"licenses\": [\n {\n \"uid\": \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\": \"basic\",\n \"issue_date_in_millis\": 1411948800000,\n \"expiry_date_in_millis\": 1914278399999,\n \"max_nodes\": 1,\n \"issued_to\": \"issuedTo\",\n \"issuer\": \"issuer\",\n \"signature\": \"xx\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->license()->post([\n \"body\" => [\n \"licenses\" => array(\n [\n \"uid\" => \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\" => \"basic\",\n \"issue_date_in_millis\" => 1411948800000,\n \"expiry_date_in_millis\" => 1914278399999,\n \"max_nodes\" => 1,\n \"issued_to\" => \"issuedTo\",\n \"issuer\" => \"issuer\",\n \"signature\" => \"xx\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"licenses\":[{\"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\"type\":\"basic\",\"issue_date_in_millis\":1411948800000,\"expiry_date_in_millis\":1914278399999,\"max_nodes\":1,\"issued_to\":\"issuedTo\",\"issuer\":\"issuer\",\"signature\":\"xx\"}]}' \"$ELASTICSEARCH_URL/_license\"" + }, + { + "lang": "Java", + "source": "client.license().post(p -> p\n .licenses(l -> l\n .expiryDateInMillis(1914278399999L)\n .issueDateInMillis(1411948800000L)\n .issuedTo(\"issuedTo\")\n .issuer(\"issuer\")\n .maxNodes(1L)\n .signature(\"xx\")\n .type(LicenseType.Basic)\n .uid(\"893361dc-9749-4997-93cb-802e3d7fa4xx\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47587,6 +58403,36 @@ ], "x-api": "delete.license", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_license\n" + }, + { + "lang": "Python", + "source": "resp = client.license.delete()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.license.delete();" + }, + { + "lang": "Ruby", + "source": "response = client.license.delete" + }, + { + "lang": "PHP", + "source": "$resp = $client->license()->delete();" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license\"" + }, + { + "lang": "Java", + "source": "client.license().delete(d -> d);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47637,6 +58483,36 @@ ], "x-api": "get_basic_status.license", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_license/basic_status\n" + }, + { + "lang": "Python", + "source": "resp = client.license.get_basic_status()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.license.getBasicStatus();" + }, + { + "lang": "Ruby", + "source": "response = client.license.get_basic_status" + }, + { + "lang": "PHP", + "source": "$resp = $client->license()->getBasicStatus();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license/basic_status\"" + }, + { + "lang": "Java", + "source": "client.license().getBasicStatus();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47687,6 +58563,36 @@ ], "x-api": "get_trial_status.license", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_license/trial_status\n" + }, + { + "lang": "Python", + "source": "resp = client.license.get_trial_status()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.license.getTrialStatus();" + }, + { + "lang": "Ruby", + "source": "response = client.license.get_trial_status" + }, + { + "lang": "PHP", + "source": "$resp = $client->license()->getTrialStatus();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license/trial_status\"" + }, + { + "lang": "Java", + "source": "client.license().getTrialStatus();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47800,6 +58706,36 @@ ], "x-api": "post_start_basic.license", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_license/start_basic?acknowledge=true\n" + }, + { + "lang": "Python", + "source": "resp = client.license.post_start_basic(\n acknowledge=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.license.postStartBasic({\n acknowledge: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.license.post_start_basic(\n acknowledge: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->license()->postStartBasic([\n \"acknowledge\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license/start_basic?acknowledge=true\"" + }, + { + "lang": "Java", + "source": "client.license().postStartBasic(p -> p\n .acknowledge(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47897,6 +58833,36 @@ ], "x-api": "post_start_trial.license", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_license/start_trial?acknowledge=true\n" + }, + { + "lang": "Python", + "source": "resp = client.license.post_start_trial(\n acknowledge=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.license.postStartTrial({\n acknowledge: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.license.post_start_trial(\n acknowledge: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->license()->postStartTrial([\n \"acknowledge\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license/start_trial?acknowledge=true\"" + }, + { + "lang": "Java", + "source": "client.license().postStartTrial(p -> p\n .acknowledge(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -47961,6 +58927,36 @@ ], "x-api": "get_pipeline.logstash", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _logstash/pipeline/my_pipeline\n" + }, + { + "lang": "Python", + "source": "resp = client.logstash.get_pipeline(\n id=\"my_pipeline\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.logstash.getPipeline({\n id: \"my_pipeline\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.logstash.get_pipeline(\n id: \"my_pipeline\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->logstash()->getPipeline([\n \"id\" => \"my_pipeline\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline\"" + }, + { + "lang": "Java", + "source": "client.logstash().getPipeline(g -> g\n .id(\"my_pipeline\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Logstash", @@ -48027,6 +59023,36 @@ ], "x-api": "put_pipeline.logstash", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _logstash/pipeline/my_pipeline\n{\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": 1\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.logstash.put_pipeline(\n id=\"my_pipeline\",\n pipeline={\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": 1\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.logstash.putPipeline({\n id: \"my_pipeline\",\n pipeline: {\n description: \"Sample pipeline for illustration purposes\",\n last_modified: \"2021-01-02T02:50:51.250Z\",\n pipeline_metadata: {\n type: \"logstash_pipeline\",\n version: 1,\n },\n username: \"elastic\",\n pipeline: \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n pipeline_settings: {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.logstash.put_pipeline(\n id: \"my_pipeline\",\n body: {\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": 1\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->logstash()->putPipeline([\n \"id\" => \"my_pipeline\",\n \"body\" => [\n \"description\" => \"Sample pipeline for illustration purposes\",\n \"last_modified\" => \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\" => [\n \"type\" => \"logstash_pipeline\",\n \"version\" => 1,\n ],\n \"username\" => \"elastic\",\n \"pipeline\" => \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\" => [\n \"pipeline.workers\" => 1,\n \"pipeline.batch.size\" => 125,\n \"pipeline.batch.delay\" => 50,\n \"queue.type\" => \"memory\",\n \"queue.max_bytes\" => \"1gb\",\n \"queue.checkpoint.writes\" => 1024,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Sample pipeline for illustration purposes\",\"last_modified\":\"2021-01-02T02:50:51.250Z\",\"pipeline_metadata\":{\"type\":\"logstash_pipeline\",\"version\":1},\"username\":\"elastic\",\"pipeline\":\"input {}\\\\n filter { grok {} }\\\\n output {}\",\"pipeline_settings\":{\"pipeline.workers\":1,\"pipeline.batch.size\":125,\"pipeline.batch.delay\":50,\"queue.type\":\"memory\",\"queue.max_bytes\":\"1gb\",\"queue.checkpoint.writes\":1024}}' \"$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline\"" + }, + { + "lang": "Java", + "source": "client.logstash().putPipeline(p -> p\n .id(\"my_pipeline\")\n .pipeline(pi -> pi\n .description(\"Sample pipeline for illustration purposes\")\n .lastModified(DateTime.of(\"2021-01-02T02:50:51.250Z\"))\n .pipeline(\"input {}\\n filter { grok {} }\\n output {}\")\n .pipelineMetadata(pip -> pip\n .type(\"logstash_pipeline\")\n .version(\"1\")\n )\n .pipelineSettings(pip -> pip\n .pipelineWorkers(1)\n .pipelineBatchSize(125)\n .pipelineBatchDelay(50)\n .queueType(\"memory\")\n .queueMaxBytes(\"1gb\")\n .queueCheckpointWrites(1024)\n )\n .username(\"elastic\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Logstash", @@ -48076,6 +59102,36 @@ ], "x-api": "delete_pipeline.logstash", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _logstash/pipeline/my_pipeline\n" + }, + { + "lang": "Python", + "source": "resp = client.logstash.delete_pipeline(\n id=\"my_pipeline\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.logstash.deletePipeline({\n id: \"my_pipeline\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.logstash.delete_pipeline(\n id: \"my_pipeline\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->logstash()->deletePipeline([\n \"id\" => \"my_pipeline\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline\"" + }, + { + "lang": "Java", + "source": "client.logstash().deletePipeline(d -> d\n .id(\"my_pipeline\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Logstash", @@ -48127,6 +59183,36 @@ ], "x-api": "get_pipeline.logstash", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _logstash/pipeline/my_pipeline\n" + }, + { + "lang": "Python", + "source": "resp = client.logstash.get_pipeline(\n id=\"my_pipeline\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.logstash.getPipeline({\n id: \"my_pipeline\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.logstash.get_pipeline(\n id: \"my_pipeline\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->logstash()->getPipeline([\n \"id\" => \"my_pipeline\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline\"" + }, + { + "lang": "Java", + "source": "client.logstash().getPipeline(g -> g\n .id(\"my_pipeline\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Logstash", @@ -48308,185 +59394,245 @@ ], "x-api": "mget", "x-category": "document management", - "x-metaTags": [ + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_mget\n{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.mget(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.mget({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"1\",\n },\n {\n _id: \"2\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.mget(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->mget([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"1\",\n ],\n [\n \"_id\" => \"2\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"1\"},{\"_id\":\"2\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mget\"" + }, + { + "lang": "Java", + "source": "client.mget(m -> m\n .docs(List.of(MultiGetOperation.of(mu -> mu\n .id(\"1\")\n ),MultiGetOperation.of(mu -> mu\n .id(\"2\")\n )))\n .index(\"my-index-000001\")\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "document" + ], + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", + "operationId": "mget-1", + "parameters": [ + { + "in": "query", + "name": "preference", + "description": "Specifies the node or shard the operation should be performed on. Random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "refresh", + "description": "If `true`, the request refreshes relevant shards before retrieving documents.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "Custom value used to route operations to a specific shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source", + "description": "True or false to return the `_source` field or not, or a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "stored_fields", + "description": "If `true`, retrieves the document fields stored in the index rather than the document `_source`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Fields" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "The documents you want to retrieve. Required if no index is specified in the request URI.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mget.Operation" + } + }, + "ids": { + "description": "The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Ids" + } + ] + } + } + }, + "examples": { + "MultiGetRequestExample1": { + "summary": "Get documents by ID", + "description": "Run `GET /my-index-000001/_mget`. When you specify an index in the request URI, only the document IDs are required in the request body.\n", + "value": "{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" + }, + "MultiGetRequestExample2": { + "summary": "Filter source fields", + "description": "Run `GET /_mget`. This request sets `_source` to `false` for document 1 to exclude the source entirely. It retrieves `field3` and `field4` from document 2. It retrieves the `user` field from document 3 but filters out the `user.location` field.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": false\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [ \"field3\", \"field4\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [ \"user\" ],\n \"exclude\": [ \"user.location\" ]\n }\n }\n ]\n}" + }, + "MultiGetRequestExample3": { + "summary": "Get stored fields", + "description": "Run `GET /_mget`. This request retrieves `field1` and `field2` from document 1 and `field3` and `field4` from document 2.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [ \"field1\", \"field2\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [ \"field3\", \"field4\" ]\n }\n ]\n}" + }, + "MultiGetRequestExample4": { + "summary": "Document routing", + "description": "Run `GET /_mget?routing=key1`. If routing is used during indexing, you need to specify the routing value to retrieve documents. This request fetches `test/_doc/2` from the shard corresponding to routing key `key1`. It fetches `test/_doc/1` from the shard corresponding to routing key `key2`.\n", + "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ]\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "docs": { + "description": "The response includes a docs array that contains the documents in the order specified in the request.\nThe structure of the returned documents is similar to that returned by the get API.\nIf there is a failure getting a particular document, the error is included in place of the document.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.mget.ResponseItem" + } + } + }, + "required": [ + "docs" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 1.3.0", + "x-variations": [ + "
\n GET\n /_mget\n
\n ", + "
\n POST\n /_mget\n
\n " + ], + "x-req-auth": [ + "Index privileges: `read`\n" + ], + "x-api": "mget", + "x-category": "document management", + "x-codeSamples": [ { - "content": "Elasticsearch", - "name": "product_name" - } - ] - }, - "post": { - "tags": [ - "document" - ], - "summary": "Get multiple documents", - "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.\n\n**Filter source fields**\n\nBy default, the `_source` field is returned for every document (if stored).\nUse the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document.\nYou can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions.\n\n**Get stored fields**\n\nUse the `stored_fields` attribute to specify the set of stored fields you want to retrieve.\nAny requested fields that are not stored are ignored.\nYou can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.", - "operationId": "mget-1", - "parameters": [ - { - "in": "query", - "name": "preference", - "description": "Specifies the node or shard the operation should be performed on. Random by default.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" + "lang": "Console", + "source": "GET /my-index-000001/_mget\n{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" }, { - "in": "query", - "name": "realtime", - "description": "If `true`, the request is real-time as opposed to near-real-time.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "lang": "Python", + "source": "resp = client.mget(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ],\n)" }, { - "in": "query", - "name": "refresh", - "description": "If `true`, the request refreshes relevant shards before retrieving documents.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "lang": "JavaScript", + "source": "const response = await client.mget({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"1\",\n },\n {\n _id: \"2\",\n },\n ],\n});" }, { - "in": "query", - "name": "routing", - "description": "Custom value used to route operations to a specific shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Routing" - }, - "style": "form" + "lang": "Ruby", + "source": "response = client.mget(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n }\n)" }, { - "in": "query", - "name": "_source", - "description": "True or false to return the `_source` field or not, or a list of fields to return.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types.SourceConfigParam" - }, - "style": "form" + "lang": "PHP", + "source": "$resp = $client->mget([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"1\",\n ],\n [\n \"_id\" => \"2\",\n ],\n ),\n ],\n]);" }, { - "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude from the response.\nYou can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"1\"},{\"_id\":\"2\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mget\"" }, { - "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.\nIf this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.\nIf the `_source` parameter is `false`, this parameter is ignored.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, - { - "in": "query", - "name": "stored_fields", - "description": "If `true`, retrieves the document fields stored in the index rather than the document `_source`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" + "lang": "Java", + "source": "client.mget(m -> m\n .docs(List.of(MultiGetOperation.of(mu -> mu\n .id(\"1\")\n ),MultiGetOperation.of(mu -> mu\n .id(\"2\")\n )))\n .index(\"my-index-000001\")\n);\n" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "description": "The documents you want to retrieve. Required if no index is specified in the request URI.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.mget.Operation" - } - }, - "ids": { - "description": "The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.", - "allOf": [ - { - "$ref": "#/components/schemas/_types.Ids" - } - ] - } - } - }, - "examples": { - "MultiGetRequestExample1": { - "summary": "Get documents by ID", - "description": "Run `GET /my-index-000001/_mget`. When you specify an index in the request URI, only the document IDs are required in the request body.\n", - "value": "{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" - }, - "MultiGetRequestExample2": { - "summary": "Filter source fields", - "description": "Run `GET /_mget`. This request sets `_source` to `false` for document 1 to exclude the source entirely. It retrieves `field3` and `field4` from document 2. It retrieves the `user` field from document 3 but filters out the `user.location` field.\n", - "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": false\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [ \"field3\", \"field4\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [ \"user\" ],\n \"exclude\": [ \"user.location\" ]\n }\n }\n ]\n}" - }, - "MultiGetRequestExample3": { - "summary": "Get stored fields", - "description": "Run `GET /_mget`. This request retrieves `field1` and `field2` from document 1 and `field3` and `field4` from document 2.\n", - "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [ \"field1\", \"field2\" ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [ \"field3\", \"field4\" ]\n }\n ]\n}" - }, - "MultiGetRequestExample4": { - "summary": "Document routing", - "description": "Run `GET /_mget?routing=key1`. If routing is used during indexing, you need to specify the routing value to retrieve documents. This request fetches `test/_doc/2` from the shard corresponding to routing key `key1`. It fetches `test/_doc/1` from the shard corresponding to routing key `key2`.\n", - "value": "{\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ]\n}" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "docs": { - "description": "The response includes a docs array that contains the documents in the order specified in the request.\nThe structure of the returned documents is similar to that returned by the get API.\nIf there is a failure getting a particular document, the error is included in place of the document.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.mget.ResponseItem" - } - } - }, - "required": [ - "docs" - ] - } - } - } - } - }, - "x-state": "Generally available; Added in 1.3.0", - "x-variations": [ - "
\n GET\n /_mget\n
\n ", - "
\n POST\n /_mget\n
\n " - ], - "x-req-auth": [ - "Index privileges: `read`\n" - ], - "x-api": "mget", - "x-category": "document management", "x-metaTags": [ { "content": "Elasticsearch", @@ -48679,6 +59825,36 @@ ], "x-api": "mget", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_mget\n{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.mget(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.mget({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"1\",\n },\n {\n _id: \"2\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.mget(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->mget([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"1\",\n ],\n [\n \"_id\" => \"2\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"1\"},{\"_id\":\"2\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mget\"" + }, + { + "lang": "Java", + "source": "client.mget(m -> m\n .docs(List.of(MultiGetOperation.of(mu -> mu\n .id(\"1\")\n ),MultiGetOperation.of(mu -> mu\n .id(\"2\")\n )))\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -48869,6 +60045,36 @@ ], "x-api": "mget", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_mget\n{\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.mget(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.mget({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"1\",\n },\n {\n _id: \"2\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.mget(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->mget([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"1\",\n ],\n [\n \"_id\" => \"2\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"1\"},{\"_id\":\"2\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mget\"" + }, + { + "lang": "Java", + "source": "client.mget(m -> m\n .docs(List.of(MultiGetOperation.of(mu -> mu\n .id(\"1\")\n ),MultiGetOperation.of(mu -> mu\n .id(\"2\")\n )))\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -48983,6 +60189,36 @@ ], "x-api": "deprecations.migration", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_migration/deprecations\n" + }, + { + "lang": "Python", + "source": "resp = client.migration.deprecations()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.migration.deprecations();" + }, + { + "lang": "Ruby", + "source": "response = client.migration.deprecations" + }, + { + "lang": "PHP", + "source": "$resp = $client->migration()->deprecations();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/deprecations\"" + }, + { + "lang": "Java", + "source": "client.migration().deprecations(d -> d);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -49110,6 +60346,36 @@ ], "x-api": "deprecations.migration", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_migration/deprecations\n" + }, + { + "lang": "Python", + "source": "resp = client.migration.deprecations()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.migration.deprecations();" + }, + { + "lang": "Ruby", + "source": "response = client.migration.deprecations" + }, + { + "lang": "PHP", + "source": "$resp = $client->migration()->deprecations();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/deprecations\"" + }, + { + "lang": "Java", + "source": "client.migration().deprecations(d -> d);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -49173,6 +60439,36 @@ ], "x-api": "get_feature_upgrade_status.migration", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_migration/system_features\n" + }, + { + "lang": "Python", + "source": "resp = client.migration.get_feature_upgrade_status()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.migration.getFeatureUpgradeStatus();" + }, + { + "lang": "Ruby", + "source": "response = client.migration.get_feature_upgrade_status" + }, + { + "lang": "PHP", + "source": "$resp = $client->migration()->getFeatureUpgradeStatus();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/system_features\"" + }, + { + "lang": "Java", + "source": "client.migration().getFeatureUpgradeStatus();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -49232,6 +60528,36 @@ ], "x-api": "post_feature_upgrade.migration", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_migration/system_features\n" + }, + { + "lang": "Python", + "source": "resp = client.migration.post_feature_upgrade()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.migration.postFeatureUpgrade();" + }, + { + "lang": "Ruby", + "source": "response = client.migration.post_feature_upgrade" + }, + { + "lang": "PHP", + "source": "$resp = $client->migration()->postFeatureUpgrade();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/system_features\"" + }, + { + "lang": "Java", + "source": "client.migration().postFeatureUpgrade();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -49296,6 +60622,36 @@ ], "x-api": "clear_trained_model_deployment_cache.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/cache/_clear\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.clear_trained_model_deployment_cache(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.clearTrainedModelDeploymentCache({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.clear_trained_model_deployment_cache(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->clearTrainedModelDeploymentCache([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/cache/_clear\"" + }, + { + "lang": "Java", + "source": "client.ml().clearTrainedModelDeploymentCache(c -> c\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -49420,6 +60776,36 @@ ], "x-api": "close_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/anomaly_detectors/low_request_rate/_close\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.close_job(\n job_id=\"low_request_rate\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.closeJob({\n job_id: \"low_request_rate\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.close_job(\n job_id: \"low_request_rate\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->closeJob([\n \"job_id\" => \"low_request_rate\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_close\"" + }, + { + "lang": "Java", + "source": "client.ml().closeJob(c -> c\n .jobId(\"low_request_rate\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -49524,6 +60910,36 @@ ], "x-api": "get_calendars.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/calendars/planned-outages\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_calendars(\n calendar_id=\"planned-outages\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCalendars({\n calendar_id: \"planned-outages\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_calendars(\n calendar_id: \"planned-outages\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCalendars([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "lang": "Java", + "source": "client.ml().getCalendars(g -> g\n .calendarId(\"planned-outages\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -49619,6 +61035,36 @@ ], "x-api": "put_calendar.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ml/calendars/planned-outages\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_calendar(\n calendar_id=\"planned-outages\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putCalendar({\n calendar_id: \"planned-outages\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_calendar(\n calendar_id: \"planned-outages\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putCalendar([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "lang": "Java", + "source": "client.ml().putCalendar(p -> p\n .calendarId(\"planned-outages\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -49721,6 +61167,36 @@ ], "x-api": "get_calendars.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/calendars/planned-outages\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_calendars(\n calendar_id=\"planned-outages\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCalendars({\n calendar_id: \"planned-outages\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_calendars(\n calendar_id: \"planned-outages\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCalendars([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "lang": "Java", + "source": "client.ml().getCalendars(g -> g\n .calendarId(\"planned-outages\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -49775,6 +61251,36 @@ ], "x-api": "delete_calendar.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/calendars/planned-outages\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_calendar(\n calendar_id=\"planned-outages\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteCalendar({\n calendar_id: \"planned-outages\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_calendar(\n calendar_id: \"planned-outages\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteCalendar([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteCalendar(d -> d\n .calendarId(\"planned-outages\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -49838,6 +61344,36 @@ ], "x-api": "delete_calendar_event.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_calendar_event(\n calendar_id=\"planned-outages\",\n event_id=\"LS8LJGEBMTCMA-qz49st\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteCalendarEvent({\n calendar_id: \"planned-outages\",\n event_id: \"LS8LJGEBMTCMA-qz49st\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_calendar_event(\n calendar_id: \"planned-outages\",\n event_id: \"LS8LJGEBMTCMA-qz49st\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteCalendarEvent([\n \"calendar_id\" => \"planned-outages\",\n \"event_id\" => \"LS8LJGEBMTCMA-qz49st\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteCalendarEvent(d -> d\n .calendarId(\"planned-outages\")\n .eventId(\"LS8LJGEBMTCMA-qz49st\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -49924,6 +61460,36 @@ ], "x-api": "put_calendar_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ml/calendars/planned-outages/jobs/total-requests\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_calendar_job(\n calendar_id=\"planned-outages\",\n job_id=\"total-requests\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putCalendarJob({\n calendar_id: \"planned-outages\",\n job_id: \"total-requests\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_calendar_job(\n calendar_id: \"planned-outages\",\n job_id: \"total-requests\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putCalendarJob([\n \"calendar_id\" => \"planned-outages\",\n \"job_id\" => \"total-requests\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/jobs/total-requests\"" + }, + { + "lang": "Java", + "source": "client.ml().putCalendarJob(p -> p\n .calendarId(\"planned-outages\")\n .jobId(\"total-requests\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -50014,6 +61580,36 @@ ], "x-api": "delete_calendar_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/calendars/planned-outages/jobs/total-requests\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_calendar_job(\n calendar_id=\"planned-outages\",\n job_id=\"total-requests\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteCalendarJob({\n calendar_id: \"planned-outages\",\n job_id: \"total-requests\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_calendar_job(\n calendar_id: \"planned-outages\",\n job_id: \"total-requests\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteCalendarJob([\n \"calendar_id\" => \"planned-outages\",\n \"job_id\" => \"total-requests\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/jobs/total-requests\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteCalendarJob(d -> d\n .calendarId(\"planned-outages\")\n .jobId(\"total-requests\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -50120,6 +61716,36 @@ ], "x-api": "get_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/data_frame/analytics/loganalytics\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics\"" + }, + { + "lang": "Java", + "source": "client.ml().getDataFrameAnalytics(g -> g\n .id(\"loganalytics\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -50354,6 +61980,36 @@ ], "x-api": "put_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ml/data_frame/analytics/model-flight-delays-pre\n{\n \"source\": {\n \"index\": [\n \"kibana_sample_data_flights\"\n ],\n \"query\": {\n \"range\": {\n \"DistanceKilometers\": {\n \"gt\": 0\n }\n }\n },\n \"_source\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightDelay\",\n \"FlightDelayType\"\n ]\n }\n },\n \"dest\": {\n \"index\": \"df-flight-delays\",\n \"results_field\": \"ml-results\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"FlightDelayMin\",\n \"training_percent\": 90\n }\n },\n \"analyzed_fields\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightNum\"\n ]\n },\n \"model_memory_limit\": \"100mb\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_data_frame_analytics(\n id=\"model-flight-delays-pre\",\n source={\n \"index\": [\n \"kibana_sample_data_flights\"\n ],\n \"query\": {\n \"range\": {\n \"DistanceKilometers\": {\n \"gt\": 0\n }\n }\n },\n \"_source\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightDelay\",\n \"FlightDelayType\"\n ]\n }\n },\n dest={\n \"index\": \"df-flight-delays\",\n \"results_field\": \"ml-results\"\n },\n analysis={\n \"regression\": {\n \"dependent_variable\": \"FlightDelayMin\",\n \"training_percent\": 90\n }\n },\n analyzed_fields={\n \"includes\": [],\n \"excludes\": [\n \"FlightNum\"\n ]\n },\n model_memory_limit=\"100mb\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putDataFrameAnalytics({\n id: \"model-flight-delays-pre\",\n source: {\n index: [\"kibana_sample_data_flights\"],\n query: {\n range: {\n DistanceKilometers: {\n gt: 0,\n },\n },\n },\n _source: {\n includes: [],\n excludes: [\"FlightDelay\", \"FlightDelayType\"],\n },\n },\n dest: {\n index: \"df-flight-delays\",\n results_field: \"ml-results\",\n },\n analysis: {\n regression: {\n dependent_variable: \"FlightDelayMin\",\n training_percent: 90,\n },\n },\n analyzed_fields: {\n includes: [],\n excludes: [\"FlightNum\"],\n },\n model_memory_limit: \"100mb\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_data_frame_analytics(\n id: \"model-flight-delays-pre\",\n body: {\n \"source\": {\n \"index\": [\n \"kibana_sample_data_flights\"\n ],\n \"query\": {\n \"range\": {\n \"DistanceKilometers\": {\n \"gt\": 0\n }\n }\n },\n \"_source\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightDelay\",\n \"FlightDelayType\"\n ]\n }\n },\n \"dest\": {\n \"index\": \"df-flight-delays\",\n \"results_field\": \"ml-results\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"FlightDelayMin\",\n \"training_percent\": 90\n }\n },\n \"analyzed_fields\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightNum\"\n ]\n },\n \"model_memory_limit\": \"100mb\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putDataFrameAnalytics([\n \"id\" => \"model-flight-delays-pre\",\n \"body\" => [\n \"source\" => [\n \"index\" => array(\n \"kibana_sample_data_flights\",\n ),\n \"query\" => [\n \"range\" => [\n \"DistanceKilometers\" => [\n \"gt\" => 0,\n ],\n ],\n ],\n \"_source\" => [\n \"includes\" => array(\n ),\n \"excludes\" => array(\n \"FlightDelay\",\n \"FlightDelayType\",\n ),\n ],\n ],\n \"dest\" => [\n \"index\" => \"df-flight-delays\",\n \"results_field\" => \"ml-results\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"FlightDelayMin\",\n \"training_percent\" => 90,\n ],\n ],\n \"analyzed_fields\" => [\n \"includes\" => array(\n ),\n \"excludes\" => array(\n \"FlightNum\",\n ),\n ],\n \"model_memory_limit\" => \"100mb\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":[\"kibana_sample_data_flights\"],\"query\":{\"range\":{\"DistanceKilometers\":{\"gt\":0}}},\"_source\":{\"includes\":[],\"excludes\":[\"FlightDelay\",\"FlightDelayType\"]}},\"dest\":{\"index\":\"df-flight-delays\",\"results_field\":\"ml-results\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"FlightDelayMin\",\"training_percent\":90}},\"analyzed_fields\":{\"includes\":[],\"excludes\":[\"FlightNum\"]},\"model_memory_limit\":\"100mb\"}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/model-flight-delays-pre\"" + }, + { + "lang": "Java", + "source": "client.ml().putDataFrameAnalytics(p -> p\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"FlightDelayMin\")\n .trainingPercent(\"90\")\n )\n )\n .analyzedFields(an -> an\n .excludes(\"FlightNum\")\n )\n .dest(d -> d\n .index(\"df-flight-delays\")\n .resultsField(\"ml-results\")\n )\n .id(\"model-flight-delays-pre\")\n .modelMemoryLimit(\"100mb\")\n .source(s -> s\n .index(\"kibana_sample_data_flights\")\n .query(q -> q\n .range(r -> r\n .untyped(u -> u\n .field(\"DistanceKilometers\")\n .gt(JsonData.fromJson(\"0\"))\n )\n )\n )\n .source(so -> so\n .excludes(List.of(\"FlightDelay\",\"FlightDelayType\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -50427,6 +62083,36 @@ ], "x-api": "delete_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/data_frame/analytics/loganalytics\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteDataFrameAnalytics(d -> d\n .id(\"loganalytics\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -50512,6 +62198,36 @@ ], "x-api": "get_datafeeds.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_datafeeds(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getDatafeeds({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_datafeeds(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getDatafeeds([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales\"" + }, + { + "lang": "Java", + "source": "client.ml().getDatafeeds(g -> g\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -50551,7 +62267,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -50828,6 +62544,36 @@ ], "x-api": "put_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ml/datafeeds/datafeed-test-job?pretty\n{\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"job_id\": \"test-job\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_datafeed(\n datafeed_id=\"datafeed-test-job\",\n pretty=True,\n indices=[\n \"kibana_sample_data_logs\"\n ],\n query={\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n job_id=\"test-job\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putDatafeed({\n datafeed_id: \"datafeed-test-job\",\n pretty: \"true\",\n indices: [\"kibana_sample_data_logs\"],\n query: {\n bool: {\n must: [\n {\n match_all: {},\n },\n ],\n },\n },\n job_id: \"test-job\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_datafeed(\n datafeed_id: \"datafeed-test-job\",\n pretty: \"true\",\n body: {\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"job_id\": \"test-job\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putDatafeed([\n \"datafeed_id\" => \"datafeed-test-job\",\n \"pretty\" => \"true\",\n \"body\" => [\n \"indices\" => array(\n \"kibana_sample_data_logs\",\n ),\n \"query\" => [\n \"bool\" => [\n \"must\" => array(\n [\n \"match_all\" => new ArrayObject([]),\n ],\n ),\n ],\n ],\n \"job_id\" => \"test-job\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":[\"kibana_sample_data_logs\"],\"query\":{\"bool\":{\"must\":[{\"match_all\":{}}]}},\"job_id\":\"test-job\"}' \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-test-job?pretty\"" + }, + { + "lang": "Java", + "source": "client.ml().putDatafeed(p -> p\n .datafeedId(\"datafeed-test-job\")\n .indices(\"kibana_sample_data_logs\")\n .jobId(\"test-job\")\n .query(q -> q\n .bool(b -> b\n .must(m -> m\n .matchAll(ma -> ma)\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -50891,6 +62637,36 @@ ], "x-api": "delete_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/datafeeds/datafeed-total-requests\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_datafeed(\n datafeed_id=\"datafeed-total-requests\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteDatafeed({\n datafeed_id: \"datafeed-total-requests\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_datafeed(\n datafeed_id: \"datafeed-total-requests\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteDatafeed([\n \"datafeed_id\" => \"datafeed-total-requests\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-total-requests\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteDatafeed(d -> d\n .datafeedId(\"datafeed-total-requests\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -50999,6 +62775,36 @@ ], "x-api": "delete_expired_data.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/_delete_expired_data?timeout=1h\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_expired_data(\n timeout=\"1h\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteExpiredData({\n timeout: \"1h\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_expired_data(\n timeout: \"1h\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteExpiredData([\n \"timeout\" => \"1h\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/_delete_expired_data?timeout=1h\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteExpiredData(d -> d\n .timeout(t -> t\n .offset(1)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51096,6 +62902,36 @@ ], "x-api": "delete_expired_data.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/_delete_expired_data?timeout=1h\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_expired_data(\n timeout=\"1h\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteExpiredData({\n timeout: \"1h\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_expired_data(\n timeout: \"1h\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteExpiredData([\n \"timeout\" => \"1h\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/_delete_expired_data?timeout=1h\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteExpiredData(d -> d\n .timeout(t -> t\n .offset(1)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51181,6 +63017,36 @@ ], "x-api": "get_filters.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/filters/safe_domains\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_filters(\n filter_id=\"safe_domains\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getFilters({\n filter_id: \"safe_domains\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_filters(\n filter_id: \"safe_domains\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getFilters([\n \"filter_id\" => \"safe_domains\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/filters/safe_domains\"" + }, + { + "lang": "Java", + "source": "client.ml().getFilters(g -> g\n .filterId(\"safe_domains\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51281,6 +63147,36 @@ ], "x-api": "put_filter.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ml/filters/safe_domains\n{\n \"description\": \"A list of safe domains\",\n \"items\": [\"*.google.com\", \"wikipedia.org\"]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_filter(\n filter_id=\"safe_domains\",\n description=\"A list of safe domains\",\n items=[\n \"*.google.com\",\n \"wikipedia.org\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putFilter({\n filter_id: \"safe_domains\",\n description: \"A list of safe domains\",\n items: [\"*.google.com\", \"wikipedia.org\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_filter(\n filter_id: \"safe_domains\",\n body: {\n \"description\": \"A list of safe domains\",\n \"items\": [\n \"*.google.com\",\n \"wikipedia.org\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putFilter([\n \"filter_id\" => \"safe_domains\",\n \"body\" => [\n \"description\" => \"A list of safe domains\",\n \"items\" => array(\n \"*.google.com\",\n \"wikipedia.org\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"A list of safe domains\",\"items\":[\"*.google.com\",\"wikipedia.org\"]}' \"$ELASTICSEARCH_URL/_ml/filters/safe_domains\"" + }, + { + "lang": "Java", + "source": "client.ml().putFilter(p -> p\n .description(\"A list of safe domains\")\n .filterId(\"safe_domains\")\n .items(List.of(\"*.google.com\",\"wikipedia.org\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51335,6 +63231,36 @@ ], "x-api": "delete_filter.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/filters/safe_domains\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_filter(\n filter_id=\"safe_domains\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteFilter({\n filter_id: \"safe_domains\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_filter(\n filter_id: \"safe_domains\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteFilter([\n \"filter_id\" => \"safe_domains\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/filters/safe_domains\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteFilter(d -> d\n .filterId(\"safe_domains\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51471,6 +63397,36 @@ ], "x-api": "forecast.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/anomaly_detectors/low_request_rate/_forecast\n{\n \"duration\": \"10d\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.forecast(\n job_id=\"low_request_rate\",\n duration=\"10d\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.forecast({\n job_id: \"low_request_rate\",\n duration: \"10d\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.forecast(\n job_id: \"low_request_rate\",\n body: {\n \"duration\": \"10d\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->forecast([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"duration\" => \"10d\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"duration\":\"10d\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_forecast\"" + }, + { + "lang": "Java", + "source": "client.ml().forecast(f -> f\n .duration(d -> d\n .time(\"10d\")\n )\n .jobId(\"low_request_rate\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51545,6 +63501,36 @@ ], "x-api": "delete_forecast.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/anomaly_detectors/total-requests/_forecast/_all\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_forecast(\n job_id=\"total-requests\",\n forecast_id=\"_all\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteForecast({\n job_id: \"total-requests\",\n forecast_id: \"_all\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_forecast(\n job_id: \"total-requests\",\n forecast_id: \"_all\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteForecast([\n \"job_id\" => \"total-requests\",\n \"forecast_id\" => \"_all\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests/_forecast/_all\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteForecast(d -> d\n .forecastId(\"_all\")\n .jobId(\"total-requests\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51632,6 +63618,36 @@ ], "x-api": "delete_forecast.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/anomaly_detectors/total-requests/_forecast/_all\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_forecast(\n job_id=\"total-requests\",\n forecast_id=\"_all\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteForecast({\n job_id: \"total-requests\",\n forecast_id: \"_all\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_forecast(\n job_id: \"total-requests\",\n forecast_id: \"_all\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteForecast([\n \"job_id\" => \"total-requests\",\n \"forecast_id\" => \"_all\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests/_forecast/_all\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteForecast(d -> d\n .forecastId(\"_all\")\n .jobId(\"total-requests\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51717,6 +63733,36 @@ ], "x-api": "get_jobs.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/high_sum_total_sales\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_jobs(\n job_id=\"high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getJobs({\n job_id: \"high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_jobs(\n job_id: \"high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getJobs([\n \"job_id\" => \"high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales\"" + }, + { + "lang": "Java", + "source": "client.ml().getJobs(g -> g\n .jobId(\"high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -51756,7 +63802,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -52059,6 +64105,36 @@ ], "x-api": "put_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_ml/anomaly_detectors/job-01\n{\n \"analysis_config\": {\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\"\n }\n ]\n },\n \"data_description\": {\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n \"analysis_limits\": {\n \"model_memory_limit\": \"11MB\"\n },\n \"model_plot_config\": {\n \"enabled\": true,\n \"annotations_enabled\": true\n },\n \"results_index_name\": \"test-job1\",\n \"datafeed_config\": {\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n },\n \"datafeed_id\": \"datafeed-test-job1\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_job(\n job_id=\"job-01\",\n analysis_config={\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\"\n }\n ]\n },\n data_description={\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n analysis_limits={\n \"model_memory_limit\": \"11MB\"\n },\n model_plot_config={\n \"enabled\": True,\n \"annotations_enabled\": True\n },\n results_index_name=\"test-job1\",\n datafeed_config={\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n },\n \"datafeed_id\": \"datafeed-test-job1\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putJob({\n job_id: \"job-01\",\n analysis_config: {\n bucket_span: \"15m\",\n detectors: [\n {\n detector_description: \"Sum of bytes\",\n function: \"sum\",\n field_name: \"bytes\",\n },\n ],\n },\n data_description: {\n time_field: \"timestamp\",\n time_format: \"epoch_ms\",\n },\n analysis_limits: {\n model_memory_limit: \"11MB\",\n },\n model_plot_config: {\n enabled: true,\n annotations_enabled: true,\n },\n results_index_name: \"test-job1\",\n datafeed_config: {\n indices: [\"kibana_sample_data_logs\"],\n query: {\n bool: {\n must: [\n {\n match_all: {},\n },\n ],\n },\n },\n runtime_mappings: {\n hour_of_day: {\n type: \"long\",\n script: {\n source: \"emit(doc['timestamp'].value.getHour());\",\n },\n },\n },\n datafeed_id: \"datafeed-test-job1\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_job(\n job_id: \"job-01\",\n body: {\n \"analysis_config\": {\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\"\n }\n ]\n },\n \"data_description\": {\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n \"analysis_limits\": {\n \"model_memory_limit\": \"11MB\"\n },\n \"model_plot_config\": {\n \"enabled\": true,\n \"annotations_enabled\": true\n },\n \"results_index_name\": \"test-job1\",\n \"datafeed_config\": {\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n },\n \"datafeed_id\": \"datafeed-test-job1\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putJob([\n \"job_id\" => \"job-01\",\n \"body\" => [\n \"analysis_config\" => [\n \"bucket_span\" => \"15m\",\n \"detectors\" => array(\n [\n \"detector_description\" => \"Sum of bytes\",\n \"function\" => \"sum\",\n \"field_name\" => \"bytes\",\n ],\n ),\n ],\n \"data_description\" => [\n \"time_field\" => \"timestamp\",\n \"time_format\" => \"epoch_ms\",\n ],\n \"analysis_limits\" => [\n \"model_memory_limit\" => \"11MB\",\n ],\n \"model_plot_config\" => [\n \"enabled\" => true,\n \"annotations_enabled\" => true,\n ],\n \"results_index_name\" => \"test-job1\",\n \"datafeed_config\" => [\n \"indices\" => array(\n \"kibana_sample_data_logs\",\n ),\n \"query\" => [\n \"bool\" => [\n \"must\" => array(\n [\n \"match_all\" => new ArrayObject([]),\n ],\n ),\n ],\n ],\n \"runtime_mappings\" => [\n \"hour_of_day\" => [\n \"type\" => \"long\",\n \"script\" => [\n \"source\" => \"emit(doc['timestamp'].value.getHour());\",\n ],\n ],\n ],\n \"datafeed_id\" => \"datafeed-test-job1\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analysis_config\":{\"bucket_span\":\"15m\",\"detectors\":[{\"detector_description\":\"Sum of bytes\",\"function\":\"sum\",\"field_name\":\"bytes\"}]},\"data_description\":{\"time_field\":\"timestamp\",\"time_format\":\"epoch_ms\"},\"analysis_limits\":{\"model_memory_limit\":\"11MB\"},\"model_plot_config\":{\"enabled\":true,\"annotations_enabled\":true},\"results_index_name\":\"test-job1\",\"datafeed_config\":{\"indices\":[\"kibana_sample_data_logs\"],\"query\":{\"bool\":{\"must\":[{\"match_all\":{}}]}},\"runtime_mappings\":{\"hour_of_day\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['\"'\"'timestamp'\"'\"'].value.getHour());\"}}},\"datafeed_id\":\"datafeed-test-job1\"}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-01\"" + }, + { + "lang": "Java", + "source": "client.ml().putJob(p -> p\n .analysisConfig(a -> a\n .bucketSpan(b -> b\n .time(\"15m\")\n )\n .detectors(d -> d\n .detectorDescription(\"Sum of bytes\")\n .fieldName(\"bytes\")\n .function(\"sum\")\n )\n )\n .analysisLimits(an -> an\n .modelMemoryLimit(\"11MB\")\n )\n .dataDescription(d -> d\n .timeField(\"timestamp\")\n .timeFormat(\"epoch_ms\")\n )\n .datafeedConfig(d -> d\n .datafeedId(\"datafeed-test-job1\")\n .indices(\"kibana_sample_data_logs\")\n .query(q -> q\n .bool(b -> b\n .must(m -> m\n .matchAll(ma -> ma)\n )\n )\n )\n .runtimeMappings(\"hour_of_day\", r -> r\n .script(s -> s\n .source(so -> so\n .scriptString(\"emit(doc['timestamp'].value.getHour());\")\n )\n )\n .type(RuntimeFieldType.Long)\n )\n )\n .jobId(\"job-01\")\n .modelPlotConfig(m -> m\n .annotationsEnabled(true)\n .enabled(true)\n )\n .resultsIndexName(\"test-job1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -52149,6 +64225,36 @@ ], "x-api": "delete_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/anomaly_detectors/total-requests\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_job(\n job_id=\"total-requests\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteJob({\n job_id: \"total-requests\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_job(\n job_id: \"total-requests\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteJob([\n \"job_id\" => \"total-requests\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteJob(d -> d\n .jobId(\"total-requests\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -52338,6 +64444,36 @@ ], "x-api": "get_model_snapshots.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots\n{\n \"start\": \"1575402236000\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_model_snapshots(\n job_id=\"high_sum_total_sales\",\n start=\"1575402236000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getModelSnapshots({\n job_id: \"high_sum_total_sales\",\n start: 1575402236000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_model_snapshots(\n job_id: \"high_sum_total_sales\",\n body: {\n \"start\": \"1575402236000\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getModelSnapshots([\n \"job_id\" => \"high_sum_total_sales\",\n \"body\" => [\n \"start\" => \"1575402236000\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"start\":\"1575402236000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots\"" + }, + { + "lang": "Java", + "source": "client.ml().getModelSnapshots(g -> g\n .jobId(\"high_sum_total_sales\")\n .start(DateTime.of(\"1575402236000\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -52525,6 +64661,36 @@ ], "x-api": "get_model_snapshots.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots\n{\n \"start\": \"1575402236000\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_model_snapshots(\n job_id=\"high_sum_total_sales\",\n start=\"1575402236000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getModelSnapshots({\n job_id: \"high_sum_total_sales\",\n start: 1575402236000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_model_snapshots(\n job_id: \"high_sum_total_sales\",\n body: {\n \"start\": \"1575402236000\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getModelSnapshots([\n \"job_id\" => \"high_sum_total_sales\",\n \"body\" => [\n \"start\" => \"1575402236000\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"start\":\"1575402236000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots\"" + }, + { + "lang": "Java", + "source": "client.ml().getModelSnapshots(g -> g\n .jobId(\"high_sum_total_sales\")\n .start(DateTime.of(\"1575402236000\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -52590,6 +64756,36 @@ ], "x-api": "delete_model_snapshot.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_model_snapshot(\n job_id=\"farequote\",\n snapshot_id=\"1491948163\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteModelSnapshot({\n job_id: \"farequote\",\n snapshot_id: 1491948163,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_model_snapshot(\n job_id: \"farequote\",\n snapshot_id: \"1491948163\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteModelSnapshot([\n \"job_id\" => \"farequote\",\n \"snapshot_id\" => \"1491948163\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/farequote/model_snapshots/1491948163\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteModelSnapshot(d -> d\n .jobId(\"farequote\")\n .snapshotId(\"1491948163\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -52660,7 +64856,7 @@ { "in": "query", "name": "include", - "description": "A comma delimited string of optional fields to include in the response\nbody.", + "description": "A comma delimited string of optional fields to include in the response\nbody.\n\nSupported values include:\n - `definition`: Includes the model definition.\n - `feature_importance_baseline`: Includes the baseline for feature importance values.\n - `hyperparameters`: Includes the information about hyperparameters used to train the model.\nThis information consists of the value, the absolute and relative\nimportance of the hyperparameter as well as an indicator of whether it was\nspecified by the user or tuned during hyperparameter optimization.\n - `total_feature_importance`: Includes the total feature importance for the training data set. The\nbaseline and total feature importance values are returned in the metadata\nfield in the response body.\n - `definition_status`: Includes the model definition status.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/ml._types.Include" @@ -52735,6 +64931,36 @@ ], "x-api": "get_trained_models.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/trained_models/\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_trained_models()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getTrainedModels();" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_trained_models" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getTrainedModels();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/\"" + }, + { + "lang": "Java", + "source": "client.ml().getTrainedModels(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -52827,7 +65053,7 @@ "type": "object" }, "model_type": { - "description": "The model type.", + "description": "The model type.\n\nSupported values include:\n - `tree_ensemble`: The model definition is an ensemble model of decision trees.\n - `lang_ident`: A special type reserved for language identification models.\n - `pytorch`: The stored definition is a PyTorch (specifically a TorchScript) model.\nCurrently only NLP models are supported.\n\n", "default": "tree_ensemble", "allOf": [ { @@ -52960,6 +65186,36 @@ ], "x-api": "delete_trained_model.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/trained_models/regression-job-one-1574775307356\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_trained_model(\n model_id=\"regression-job-one-1574775307356\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteTrainedModel({\n model_id: \"regression-job-one-1574775307356\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_trained_model(\n model_id: \"regression-job-one-1574775307356\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteTrainedModel([\n \"model_id\" => \"regression-job-one-1574775307356\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/regression-job-one-1574775307356\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteTrainedModel(d -> d\n .modelId(\"regression-job-one-1574775307356\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -53031,6 +65287,36 @@ ], "x-api": "put_trained_model_alias.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_trained_model_alias(\n model_id=\"flight-delay-prediction-1574775339910\",\n model_alias=\"flight_delay_model\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putTrainedModelAlias({\n model_id: \"flight-delay-prediction-1574775339910\",\n model_alias: \"flight_delay_model\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_trained_model_alias(\n model_id: \"flight-delay-prediction-1574775339910\",\n model_alias: \"flight_delay_model\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putTrainedModelAlias([\n \"model_id\" => \"flight-delay-prediction-1574775339910\",\n \"model_alias\" => \"flight_delay_model\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model\"" + }, + { + "lang": "Java", + "source": "client.ml().putTrainedModelAlias(p -> p\n .modelAlias(\"flight_delay_model\")\n .modelId(\"flight-delay-prediction-1574775339910\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -53096,6 +65382,36 @@ ], "x-api": "delete_trained_model_alias.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.delete_trained_model_alias(\n model_id=\"flight-delay-prediction-1574775339910\",\n model_alias=\"flight_delay_model\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.deleteTrainedModelAlias({\n model_id: \"flight-delay-prediction-1574775339910\",\n model_alias: \"flight_delay_model\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.delete_trained_model_alias(\n model_id: \"flight-delay-prediction-1574775339910\",\n model_alias: \"flight_delay_model\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->deleteTrainedModelAlias([\n \"model_id\" => \"flight-delay-prediction-1574775339910\",\n \"model_alias\" => \"flight_delay_model\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model\"" + }, + { + "lang": "Java", + "source": "client.ml().deleteTrainedModelAlias(d -> d\n .modelAlias(\"flight_delay_model\")\n .modelId(\"flight-delay-prediction-1574775339910\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -53187,6 +65503,36 @@ ], "x-api": "estimate_model_memory.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/anomaly_detectors/_estimate_model_memory\n{\n \"analysis_config\": {\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [\n \"source_ip\",\n \"dest_ip\"\n ]\n },\n \"overall_cardinality\": {\n \"status\": 10,\n \"app\": 50\n },\n \"max_bucket_cardinality\": {\n \"source_ip\": 300,\n \"dest_ip\": 30\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.estimate_model_memory(\n analysis_config={\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [\n \"source_ip\",\n \"dest_ip\"\n ]\n },\n overall_cardinality={\n \"status\": 10,\n \"app\": 50\n },\n max_bucket_cardinality={\n \"source_ip\": 300,\n \"dest_ip\": 30\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.estimateModelMemory({\n analysis_config: {\n bucket_span: \"5m\",\n detectors: [\n {\n function: \"sum\",\n field_name: \"bytes\",\n by_field_name: \"status\",\n partition_field_name: \"app\",\n },\n ],\n influencers: [\"source_ip\", \"dest_ip\"],\n },\n overall_cardinality: {\n status: 10,\n app: 50,\n },\n max_bucket_cardinality: {\n source_ip: 300,\n dest_ip: 30,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.estimate_model_memory(\n body: {\n \"analysis_config\": {\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [\n \"source_ip\",\n \"dest_ip\"\n ]\n },\n \"overall_cardinality\": {\n \"status\": 10,\n \"app\": 50\n },\n \"max_bucket_cardinality\": {\n \"source_ip\": 300,\n \"dest_ip\": 30\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->estimateModelMemory([\n \"body\" => [\n \"analysis_config\" => [\n \"bucket_span\" => \"5m\",\n \"detectors\" => array(\n [\n \"function\" => \"sum\",\n \"field_name\" => \"bytes\",\n \"by_field_name\" => \"status\",\n \"partition_field_name\" => \"app\",\n ],\n ),\n \"influencers\" => array(\n \"source_ip\",\n \"dest_ip\",\n ),\n ],\n \"overall_cardinality\" => [\n \"status\" => 10,\n \"app\" => 50,\n ],\n \"max_bucket_cardinality\" => [\n \"source_ip\" => 300,\n \"dest_ip\" => 30,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analysis_config\":{\"bucket_span\":\"5m\",\"detectors\":[{\"function\":\"sum\",\"field_name\":\"bytes\",\"by_field_name\":\"status\",\"partition_field_name\":\"app\"}],\"influencers\":[\"source_ip\",\"dest_ip\"]},\"overall_cardinality\":{\"status\":10,\"app\":50},\"max_bucket_cardinality\":{\"source_ip\":300,\"dest_ip\":30}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/_estimate_model_memory\"" + }, + { + "lang": "Java", + "source": "client.ml().estimateModelMemory(e -> e\n .analysisConfig(a -> a\n .bucketSpan(b -> b\n .time(\"5m\")\n )\n .detectors(d -> d\n .byFieldName(\"status\")\n .fieldName(\"bytes\")\n .function(\"sum\")\n .partitionFieldName(\"app\")\n )\n .influencers(List.of(\"source_ip\",\"dest_ip\"))\n )\n .maxBucketCardinality(Map.of(\"dest_ip\", 30L,\"source_ip\", 300L))\n .overallCardinality(Map.of(\"app\", 50L,\"status\", 10L))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -53334,6 +65680,36 @@ ], "x-api": "evaluate_data_frame.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"predicted_field\": \"ml.animal_class_prediction\",\n \"metrics\": {\n \"multiclass_confusion_matrix\": {}\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.evaluate_data_frame(\n index=\"animal_classification\",\n evaluation={\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"predicted_field\": \"ml.animal_class_prediction\",\n \"metrics\": {\n \"multiclass_confusion_matrix\": {}\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.evaluateDataFrame({\n index: \"animal_classification\",\n evaluation: {\n classification: {\n actual_field: \"animal_class\",\n predicted_field: \"ml.animal_class_prediction\",\n metrics: {\n multiclass_confusion_matrix: {},\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.evaluate_data_frame(\n body: {\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"predicted_field\": \"ml.animal_class_prediction\",\n \"metrics\": {\n \"multiclass_confusion_matrix\": {}\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->evaluateDataFrame([\n \"body\" => [\n \"index\" => \"animal_classification\",\n \"evaluation\" => [\n \"classification\" => [\n \"actual_field\" => \"animal_class\",\n \"predicted_field\" => \"ml.animal_class_prediction\",\n \"metrics\" => [\n \"multiclass_confusion_matrix\" => new ArrayObject([]),\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"animal_classification\",\"evaluation\":{\"classification\":{\"actual_field\":\"animal_class\",\"predicted_field\":\"ml.animal_class_prediction\",\"metrics\":{\"multiclass_confusion_matrix\":{}}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" + }, + { + "lang": "Java", + "source": "client.ml().evaluateDataFrame(e -> e\n .evaluation(ev -> ev\n .classification(c -> c\n .actualField(\"animal_class\")\n .predictedField(\"ml.animal_class_prediction\")\n .metrics(m -> m)\n )\n )\n .index(\"animal_classification\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -53467,6 +65843,36 @@ ], "x-api": "explain_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/_explain\n{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.explain_data_frame_analytics(\n source={\n \"index\": \"houses_sold_last_10_yrs\"\n },\n analysis={\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.explainDataFrameAnalytics({\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.explain_data_frame_analytics(\n body: {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->explainDataFrameAnalytics([\n \"body\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_explain\"" + }, + { + "lang": "Java", + "source": "client.ml().explainDataFrameAnalytics(e -> e\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -53598,6 +66004,36 @@ ], "x-api": "explain_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/_explain\n{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.explain_data_frame_analytics(\n source={\n \"index\": \"houses_sold_last_10_yrs\"\n },\n analysis={\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.explainDataFrameAnalytics({\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.explain_data_frame_analytics(\n body: {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->explainDataFrameAnalytics([\n \"body\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_explain\"" + }, + { + "lang": "Java", + "source": "client.ml().explainDataFrameAnalytics(e -> e\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -53744,6 +66180,36 @@ ], "x-api": "explain_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/_explain\n{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.explain_data_frame_analytics(\n source={\n \"index\": \"houses_sold_last_10_yrs\"\n },\n analysis={\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.explainDataFrameAnalytics({\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.explain_data_frame_analytics(\n body: {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->explainDataFrameAnalytics([\n \"body\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_explain\"" + }, + { + "lang": "Java", + "source": "client.ml().explainDataFrameAnalytics(e -> e\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -53888,6 +66354,36 @@ ], "x-api": "explain_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/_explain\n{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.explain_data_frame_analytics(\n source={\n \"index\": \"houses_sold_last_10_yrs\"\n },\n analysis={\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.explainDataFrameAnalytics({\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.explain_data_frame_analytics(\n body: {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->explainDataFrameAnalytics([\n \"body\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_explain\"" + }, + { + "lang": "Java", + "source": "client.ml().explainDataFrameAnalytics(e -> e\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -54054,6 +66550,36 @@ ], "x-api": "flush_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/anomaly_detectors/low_request_rate/_flush\n{\n \"calc_interim\": true\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.flush_job(\n job_id=\"low_request_rate\",\n calc_interim=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.flushJob({\n job_id: \"low_request_rate\",\n calc_interim: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.flush_job(\n job_id: \"low_request_rate\",\n body: {\n \"calc_interim\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->flushJob([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"calc_interim\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"calc_interim\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_flush\"" + }, + { + "lang": "Java", + "source": "client.ml().flushJob(f -> f\n .calcInterim(true)\n .jobId(\"low_request_rate\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -54292,6 +66818,36 @@ ], "x-api": "get_buckets.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/results/buckets\n{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_buckets(\n job_id=\"low_request_rate\",\n anomaly_score=80,\n start=\"1454530200001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getBuckets({\n job_id: \"low_request_rate\",\n anomaly_score: 80,\n start: 1454530200001,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_buckets(\n job_id: \"low_request_rate\",\n body: {\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getBuckets([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"anomaly_score\" => 80,\n \"start\" => \"1454530200001\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"anomaly_score\":80,\"start\":\"1454530200001\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/buckets\"" + }, + { + "lang": "Java", + "source": "client.ml().getBuckets(g -> g\n .anomalyScore(80.0D)\n .jobId(\"low_request_rate\")\n .start(DateTime.of(\"1454530200001\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -54528,6 +67084,36 @@ ], "x-api": "get_buckets.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/results/buckets\n{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_buckets(\n job_id=\"low_request_rate\",\n anomaly_score=80,\n start=\"1454530200001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getBuckets({\n job_id: \"low_request_rate\",\n anomaly_score: 80,\n start: 1454530200001,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_buckets(\n job_id: \"low_request_rate\",\n body: {\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getBuckets([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"anomaly_score\" => 80,\n \"start\" => \"1454530200001\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"anomaly_score\":80,\"start\":\"1454530200001\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/buckets\"" + }, + { + "lang": "Java", + "source": "client.ml().getBuckets(g -> g\n .anomalyScore(80.0D)\n .jobId(\"low_request_rate\")\n .start(DateTime.of(\"1454530200001\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -54755,6 +67341,36 @@ ], "x-api": "get_buckets.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/results/buckets\n{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_buckets(\n job_id=\"low_request_rate\",\n anomaly_score=80,\n start=\"1454530200001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getBuckets({\n job_id: \"low_request_rate\",\n anomaly_score: 80,\n start: 1454530200001,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_buckets(\n job_id: \"low_request_rate\",\n body: {\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getBuckets([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"anomaly_score\" => 80,\n \"start\" => \"1454530200001\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"anomaly_score\":80,\"start\":\"1454530200001\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/buckets\"" + }, + { + "lang": "Java", + "source": "client.ml().getBuckets(g -> g\n .anomalyScore(80.0D)\n .jobId(\"low_request_rate\")\n .start(DateTime.of(\"1454530200001\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -54980,6 +67596,36 @@ ], "x-api": "get_buckets.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/results/buckets\n{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_buckets(\n job_id=\"low_request_rate\",\n anomaly_score=80,\n start=\"1454530200001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getBuckets({\n job_id: \"low_request_rate\",\n anomaly_score: 80,\n start: 1454530200001,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_buckets(\n job_id: \"low_request_rate\",\n body: {\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getBuckets([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"anomaly_score\" => 80,\n \"start\" => \"1454530200001\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"anomaly_score\":80,\"start\":\"1454530200001\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/buckets\"" + }, + { + "lang": "Java", + "source": "client.ml().getBuckets(g -> g\n .anomalyScore(80.0D)\n .jobId(\"low_request_rate\")\n .start(DateTime.of(\"1454530200001\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55094,6 +67740,36 @@ ], "x-api": "get_calendar_events.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/calendars/planned-outages/events\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_calendar_events(\n calendar_id=\"planned-outages\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCalendarEvents({\n calendar_id: \"planned-outages\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_calendar_events(\n calendar_id: \"planned-outages\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCalendarEvents([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events\"" + }, + { + "lang": "Java", + "source": "client.ml().getCalendarEvents(g -> g\n .calendarId(\"planned-outages\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55180,6 +67856,36 @@ ], "x-api": "post_calendar_events.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/calendars/planned-outages/events\n{\n \"events\" : [\n {\"description\": \"event 1\", \"start_time\": 1513641600000, \"end_time\": 1513728000000},\n {\"description\": \"event 2\", \"start_time\": 1513814400000, \"end_time\": 1513900800000},\n {\"description\": \"event 3\", \"start_time\": 1514160000000, \"end_time\": 1514246400000}\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.post_calendar_events(\n calendar_id=\"planned-outages\",\n events=[\n {\n \"description\": \"event 1\",\n \"start_time\": 1513641600000,\n \"end_time\": 1513728000000\n },\n {\n \"description\": \"event 2\",\n \"start_time\": 1513814400000,\n \"end_time\": 1513900800000\n },\n {\n \"description\": \"event 3\",\n \"start_time\": 1514160000000,\n \"end_time\": 1514246400000\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.postCalendarEvents({\n calendar_id: \"planned-outages\",\n events: [\n {\n description: \"event 1\",\n start_time: 1513641600000,\n end_time: 1513728000000,\n },\n {\n description: \"event 2\",\n start_time: 1513814400000,\n end_time: 1513900800000,\n },\n {\n description: \"event 3\",\n start_time: 1514160000000,\n end_time: 1514246400000,\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.post_calendar_events(\n calendar_id: \"planned-outages\",\n body: {\n \"events\": [\n {\n \"description\": \"event 1\",\n \"start_time\": 1513641600000,\n \"end_time\": 1513728000000\n },\n {\n \"description\": \"event 2\",\n \"start_time\": 1513814400000,\n \"end_time\": 1513900800000\n },\n {\n \"description\": \"event 3\",\n \"start_time\": 1514160000000,\n \"end_time\": 1514246400000\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->postCalendarEvents([\n \"calendar_id\" => \"planned-outages\",\n \"body\" => [\n \"events\" => array(\n [\n \"description\" => \"event 1\",\n \"start_time\" => 1513641600000,\n \"end_time\" => 1513728000000,\n ],\n [\n \"description\" => \"event 2\",\n \"start_time\" => 1513814400000,\n \"end_time\" => 1513900800000,\n ],\n [\n \"description\" => \"event 3\",\n \"start_time\" => 1514160000000,\n \"end_time\" => 1514246400000,\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"events\":[{\"description\":\"event 1\",\"start_time\":1513641600000,\"end_time\":1513728000000},{\"description\":\"event 2\",\"start_time\":1513814400000,\"end_time\":1513900800000},{\"description\":\"event 3\",\"start_time\":1514160000000,\"end_time\":1514246400000}]}' \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events\"" + }, + { + "lang": "Java", + "source": "client.ml().postCalendarEvents(p -> p\n .calendarId(\"planned-outages\")\n .events(List.of(CalendarEvent.of(c -> c\n .description(\"event 1\")\n .endTime(DateTime.ofEpochMilli(1513728000000L))\n .startTime(DateTime.ofEpochMilli(1513641600000L))\n ),CalendarEvent.of(c -> c\n .description(\"event 2\")\n .endTime(DateTime.ofEpochMilli(1513900800000L))\n .startTime(DateTime.ofEpochMilli(1513814400000L))\n ),CalendarEvent.of(c -> c\n .description(\"event 3\")\n .endTime(DateTime.ofEpochMilli(1514246400000L))\n .startTime(DateTime.ofEpochMilli(1514160000000L))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55273,6 +67979,36 @@ ], "x-api": "get_calendars.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/calendars/planned-outages\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_calendars(\n calendar_id=\"planned-outages\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCalendars({\n calendar_id: \"planned-outages\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_calendars(\n calendar_id: \"planned-outages\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCalendars([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "lang": "Java", + "source": "client.ml().getCalendars(g -> g\n .calendarId(\"planned-outages\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55364,6 +68100,36 @@ ], "x-api": "get_calendars.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/calendars/planned-outages\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_calendars(\n calendar_id=\"planned-outages\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCalendars({\n calendar_id: \"planned-outages\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_calendars(\n calendar_id: \"planned-outages\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCalendars([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "lang": "Java", + "source": "client.ml().getCalendars(g -> g\n .calendarId(\"planned-outages\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55495,6 +68261,36 @@ ], "x-api": "get_categories.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/esxi_log/results/categories\n{\n \"page\":{\n \"size\": 1\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_categories(\n job_id=\"esxi_log\",\n page={\n \"size\": 1\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCategories({\n job_id: \"esxi_log\",\n page: {\n size: 1,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_categories(\n job_id: \"esxi_log\",\n body: {\n \"page\": {\n \"size\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCategories([\n \"job_id\" => \"esxi_log\",\n \"body\" => [\n \"page\" => [\n \"size\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"page\":{\"size\":1}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/esxi_log/results/categories\"" + }, + { + "lang": "Java", + "source": "client.ml().getCategories(g -> g\n .jobId(\"esxi_log\")\n .page(p -> p\n .size(1)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55624,6 +68420,36 @@ ], "x-api": "get_categories.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/esxi_log/results/categories\n{\n \"page\":{\n \"size\": 1\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_categories(\n job_id=\"esxi_log\",\n page={\n \"size\": 1\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCategories({\n job_id: \"esxi_log\",\n page: {\n size: 1,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_categories(\n job_id: \"esxi_log\",\n body: {\n \"page\": {\n \"size\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCategories([\n \"job_id\" => \"esxi_log\",\n \"body\" => [\n \"page\" => [\n \"size\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"page\":{\"size\":1}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/esxi_log/results/categories\"" + }, + { + "lang": "Java", + "source": "client.ml().getCategories(g -> g\n .jobId(\"esxi_log\")\n .page(p -> p\n .size(1)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55744,6 +68570,36 @@ ], "x-api": "get_categories.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/esxi_log/results/categories\n{\n \"page\":{\n \"size\": 1\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_categories(\n job_id=\"esxi_log\",\n page={\n \"size\": 1\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCategories({\n job_id: \"esxi_log\",\n page: {\n size: 1,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_categories(\n job_id: \"esxi_log\",\n body: {\n \"page\": {\n \"size\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCategories([\n \"job_id\" => \"esxi_log\",\n \"body\" => [\n \"page\" => [\n \"size\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"page\":{\"size\":1}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/esxi_log/results/categories\"" + }, + { + "lang": "Java", + "source": "client.ml().getCategories(g -> g\n .jobId(\"esxi_log\")\n .page(p -> p\n .size(1)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55862,6 +68718,36 @@ ], "x-api": "get_categories.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/esxi_log/results/categories\n{\n \"page\":{\n \"size\": 1\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_categories(\n job_id=\"esxi_log\",\n page={\n \"size\": 1\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getCategories({\n job_id: \"esxi_log\",\n page: {\n size: 1,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_categories(\n job_id: \"esxi_log\",\n body: {\n \"page\": {\n \"size\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getCategories([\n \"job_id\" => \"esxi_log\",\n \"body\" => [\n \"page\" => [\n \"size\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"page\":{\"size\":1}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/esxi_log/results/categories\"" + }, + { + "lang": "Java", + "source": "client.ml().getCategories(g -> g\n .jobId(\"esxi_log\")\n .page(p -> p\n .size(1)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -55957,6 +68843,36 @@ ], "x-api": "get_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/data_frame/analytics/loganalytics\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics\"" + }, + { + "lang": "Java", + "source": "client.ml().getDataFrameAnalytics(g -> g\n .id(\"loganalytics\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56051,6 +68967,36 @@ ], "x-api": "get_data_frame_analytics_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/data_frame/analytics/weblog-outliers/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_data_frame_analytics_stats(\n id=\"weblog-outliers\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getDataFrameAnalyticsStats({\n id: \"weblog-outliers\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_data_frame_analytics_stats(\n id: \"weblog-outliers\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getDataFrameAnalyticsStats([\n \"id\" => \"weblog-outliers\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/weblog-outliers/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getDataFrameAnalyticsStats(g -> g\n .id(\"weblog-outliers\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56156,6 +69102,36 @@ ], "x-api": "get_data_frame_analytics_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/data_frame/analytics/weblog-outliers/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_data_frame_analytics_stats(\n id=\"weblog-outliers\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getDataFrameAnalyticsStats({\n id: \"weblog-outliers\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_data_frame_analytics_stats(\n id: \"weblog-outliers\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getDataFrameAnalyticsStats([\n \"id\" => \"weblog-outliers\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/weblog-outliers/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getDataFrameAnalyticsStats(g -> g\n .id(\"weblog-outliers\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56231,6 +69207,36 @@ ], "x-api": "get_datafeed_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_datafeed_stats(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getDatafeedStats({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_datafeed_stats(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getDatafeedStats([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getDatafeedStats(g -> g\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56295,6 +69301,36 @@ ], "x-api": "get_datafeed_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_datafeed_stats(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getDatafeedStats({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_datafeed_stats(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getDatafeedStats([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getDatafeedStats(g -> g\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56369,6 +69405,36 @@ ], "x-api": "get_datafeeds.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_datafeeds(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getDatafeeds({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_datafeeds(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getDatafeeds([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales\"" + }, + { + "lang": "Java", + "source": "client.ml().getDatafeeds(g -> g\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56443,6 +69509,36 @@ ], "x-api": "get_filters.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/filters/safe_domains\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_filters(\n filter_id=\"safe_domains\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getFilters({\n filter_id: \"safe_domains\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_filters(\n filter_id: \"safe_domains\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getFilters([\n \"filter_id\" => \"safe_domains\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/filters/safe_domains\"" + }, + { + "lang": "Java", + "source": "client.ml().getFilters(g -> g\n .filterId(\"safe_domains\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56615,6 +69711,36 @@ ], "x-api": "get_influencers.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/high_sum_total_sales/results/influencers\n{\n \"sort\": \"influencer_score\",\n \"desc\": true\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_influencers(\n job_id=\"high_sum_total_sales\",\n sort=\"influencer_score\",\n desc=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getInfluencers({\n job_id: \"high_sum_total_sales\",\n sort: \"influencer_score\",\n desc: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_influencers(\n job_id: \"high_sum_total_sales\",\n body: {\n \"sort\": \"influencer_score\",\n \"desc\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getInfluencers([\n \"job_id\" => \"high_sum_total_sales\",\n \"body\" => [\n \"sort\" => \"influencer_score\",\n \"desc\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":\"influencer_score\",\"desc\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/results/influencers\"" + }, + { + "lang": "Java", + "source": "client.ml().getInfluencers(g -> g\n .jobId(\"high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56785,6 +69911,36 @@ ], "x-api": "get_influencers.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/high_sum_total_sales/results/influencers\n{\n \"sort\": \"influencer_score\",\n \"desc\": true\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_influencers(\n job_id=\"high_sum_total_sales\",\n sort=\"influencer_score\",\n desc=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getInfluencers({\n job_id: \"high_sum_total_sales\",\n sort: \"influencer_score\",\n desc: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_influencers(\n job_id: \"high_sum_total_sales\",\n body: {\n \"sort\": \"influencer_score\",\n \"desc\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getInfluencers([\n \"job_id\" => \"high_sum_total_sales\",\n \"body\" => [\n \"sort\" => \"influencer_score\",\n \"desc\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":\"influencer_score\",\"desc\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/results/influencers\"" + }, + { + "lang": "Java", + "source": "client.ml().getInfluencers(g -> g\n .jobId(\"high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -56826,7 +69982,215 @@ "jobs": { "type": "array", "items": { - "$ref": "#/components/schemas/ml._types.JobStats" + "$ref": "#/components/schemas/ml._types.JobStats" + } + } + }, + "required": [ + "count", + "jobs" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_job_stats.ml", + "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_job_stats(\n job_id=\"low_request_rate\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getJobStats({\n job_id: \"low_request_rate\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_job_stats(\n job_id: \"low_request_rate\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getJobStats([\n \"job_id\" => \"low_request_rate\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getJobStats(g -> g\n .jobId(\"low_request_rate\")\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/anomaly_detectors/{job_id}/_stats": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection job stats", + "operationId": "ml-get-job-stats-1", + "parameters": [ + { + "in": "path", + "name": "job_id", + "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, a comma-separated list of jobs, or a wildcard expression. If\nyou do not specify one of these options, the API returns information for\nall anomaly detection jobs.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If `false`, the API returns a `404` status\ncode when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.JobStats" + } + } + }, + "required": [ + "count", + "jobs" + ] + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n GET\n /_ml/anomaly_detectors/{job_id}/_stats\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_ml`\n" + ], + "x-api": "get_job_stats.ml", + "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_job_stats(\n job_id=\"low_request_rate\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getJobStats({\n job_id: \"low_request_rate\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_job_stats(\n job_id: \"low_request_rate\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getJobStats([\n \"job_id\" => \"low_request_rate\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getJobStats(g -> g\n .jobId(\"low_request_rate\")\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_ml/anomaly_detectors": { + "get": { + "tags": [ + "ml anomaly" + ], + "summary": "Get anomaly detection jobs configuration info", + "description": "You can get information for multiple anomaly detection jobs in a single API\nrequest by using a group name, a comma-separated list of jobs, or a wildcard\nexpression. You can get information for all anomaly detection jobs by using\n`_all`, by specifying `*` as the ``, or by omitting the ``.", + "operationId": "ml-get-jobs-1", + "parameters": [ + { + "in": "query", + "name": "allow_no_match", + "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If this parameter is `false`, the request returns a `404` status\ncode when there are no matches or only partial matches.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "exclude_generated", + "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types.Job" } } }, @@ -56841,161 +70205,43 @@ }, "x-state": "Generally available; Added in 5.5.0", "x-variations": [ - "
\n GET\n /_ml/anomaly_detectors/_stats\n
\n " + "
\n GET\n /_ml/anomaly_detectors\n
\n " ], "x-req-auth": [ "Cluster privileges: `monitor_ml`\n" ], - "x-api": "get_job_stats.ml", + "x-api": "get_jobs.ml", "x-category": "ai/ml", - "x-metaTags": [ + "x-codeSamples": [ { - "content": "Elasticsearch, Machine Learning", - "name": "product_name" - } - ] - } - }, - "/_ml/anomaly_detectors/{job_id}/_stats": { - "get": { - "tags": [ - "ml anomaly" - ], - "summary": "Get anomaly detection job stats", - "operationId": "ml-get-job-stats-1", - "parameters": [ + "lang": "Console", + "source": "GET _ml/anomaly_detectors/high_sum_total_sales\n" + }, { - "in": "path", - "name": "job_id", - "description": "Identifier for the anomaly detection job. It can be a job identifier, a\ngroup name, a comma-separated list of jobs, or a wildcard expression. If\nyou do not specify one of these options, the API returns information for\nall anomaly detection jobs.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Id" - }, - "style": "simple" + "lang": "Python", + "source": "resp = client.ml.get_jobs(\n job_id=\"high_sum_total_sales\",\n)" }, { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nIf `true`, the API returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If `false`, the API returns a `404` status\ncode when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "jobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.JobStats" - } - } - }, - "required": [ - "count", - "jobs" - ] - } - } - } - } - }, - "x-state": "Generally available; Added in 5.5.0", - "x-variations": [ - "
\n GET\n /_ml/anomaly_detectors/{job_id}/_stats\n
\n " - ], - "x-req-auth": [ - "Cluster privileges: `monitor_ml`\n" - ], - "x-api": "get_job_stats.ml", - "x-category": "ai/ml", - "x-metaTags": [ + "lang": "JavaScript", + "source": "const response = await client.ml.getJobs({\n job_id: \"high_sum_total_sales\",\n});" + }, { - "content": "Elasticsearch, Machine Learning", - "name": "product_name" - } - ] - } - }, - "/_ml/anomaly_detectors": { - "get": { - "tags": [ - "ml anomaly" - ], - "summary": "Get anomaly detection jobs configuration info", - "description": "You can get information for multiple anomaly detection jobs in a single API\nrequest by using a group name, a comma-separated list of jobs, or a wildcard\nexpression. You can get information for all anomaly detection jobs by using\n`_all`, by specifying `*` as the ``, or by omitting the ``.", - "operationId": "ml-get-jobs-1", - "parameters": [ + "lang": "Ruby", + "source": "response = client.ml.get_jobs(\n job_id: \"high_sum_total_sales\"\n)" + }, { - "in": "query", - "name": "allow_no_match", - "description": "Specifies what to do when the request:\n\n1. Contains wildcard expressions and there are no jobs that match.\n2. Contains the _all string or no identifiers and there are no matches.\n3. Contains wildcard expressions and there are only partial matches.\n\nThe default value is `true`, which returns an empty `jobs` array when\nthere are no matches and the subset of results when there are partial\nmatches. If this parameter is `false`, the request returns a `404` status\ncode when there are no matches or only partial matches.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "lang": "PHP", + "source": "$resp = $client->ml()->getJobs([\n \"job_id\" => \"high_sum_total_sales\",\n]);" }, { - "in": "query", - "name": "exclude_generated", - "description": "Indicates if certain fields should be removed from the configuration on\nretrieval. This allows the configuration to be in an acceptable format to\nbe retrieved and then added to another cluster.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count": { - "type": "number" - }, - "jobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types.Job" - } - } - }, - "required": [ - "count", - "jobs" - ] - } - } - } + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales\"" + }, + { + "lang": "Java", + "source": "client.ml().getJobs(g -> g\n .jobId(\"high_sum_total_sales\")\n);\n" } - }, - "x-state": "Generally available; Added in 5.5.0", - "x-variations": [ - "
\n GET\n /_ml/anomaly_detectors\n
\n " ], - "x-req-auth": [ - "Cluster privileges: `monitor_ml`\n" - ], - "x-api": "get_jobs.ml", - "x-category": "ai/ml", "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -57082,6 +70328,36 @@ ], "x-api": "get_memory_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/memory/_stats?human\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_memory_stats(\n human=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getMemoryStats({\n human: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_memory_stats(\n human: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getMemoryStats([\n \"human\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/memory/_stats?human\"" + }, + { + "lang": "Java", + "source": "client.ml().getMemoryStats(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -57179,6 +70455,36 @@ ], "x-api": "get_memory_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/memory/_stats?human\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_memory_stats(\n human=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getMemoryStats({\n human: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_memory_stats(\n human: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getMemoryStats([\n \"human\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/memory/_stats?human\"" + }, + { + "lang": "Java", + "source": "client.ml().getMemoryStats(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -57264,6 +70570,36 @@ ], "x-api": "get_model_snapshot_upgrade_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/model_snapshots/_all/_upgrade/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_model_snapshot_upgrade_stats(\n job_id=\"low_request_rate\",\n snapshot_id=\"_all\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getModelSnapshotUpgradeStats({\n job_id: \"low_request_rate\",\n snapshot_id: \"_all\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_model_snapshot_upgrade_stats(\n job_id: \"low_request_rate\",\n snapshot_id: \"_all\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getModelSnapshotUpgradeStats([\n \"job_id\" => \"low_request_rate\",\n \"snapshot_id\" => \"_all\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/_all/_upgrade/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getModelSnapshotUpgradeStats(g -> g\n .jobId(\"low_request_rate\")\n .snapshotId(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -57442,6 +70778,36 @@ ], "x-api": "get_model_snapshots.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots\n{\n \"start\": \"1575402236000\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_model_snapshots(\n job_id=\"high_sum_total_sales\",\n start=\"1575402236000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getModelSnapshots({\n job_id: \"high_sum_total_sales\",\n start: 1575402236000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_model_snapshots(\n job_id: \"high_sum_total_sales\",\n body: {\n \"start\": \"1575402236000\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getModelSnapshots([\n \"job_id\" => \"high_sum_total_sales\",\n \"body\" => [\n \"start\" => \"1575402236000\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"start\":\"1575402236000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots\"" + }, + { + "lang": "Java", + "source": "client.ml().getModelSnapshots(g -> g\n .jobId(\"high_sum_total_sales\")\n .start(DateTime.of(\"1575402236000\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -57618,6 +70984,36 @@ ], "x-api": "get_model_snapshots.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots\n{\n \"start\": \"1575402236000\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_model_snapshots(\n job_id=\"high_sum_total_sales\",\n start=\"1575402236000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getModelSnapshots({\n job_id: \"high_sum_total_sales\",\n start: 1575402236000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_model_snapshots(\n job_id: \"high_sum_total_sales\",\n body: {\n \"start\": \"1575402236000\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getModelSnapshots([\n \"job_id\" => \"high_sum_total_sales\",\n \"body\" => [\n \"start\" => \"1575402236000\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"start\":\"1575402236000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots\"" + }, + { + "lang": "Java", + "source": "client.ml().getModelSnapshots(g -> g\n .jobId(\"high_sum_total_sales\")\n .start(DateTime.of(\"1575402236000\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -57815,6 +71211,36 @@ ], "x-api": "get_overall_buckets.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/job-*/results/overall_buckets\n{\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_overall_buckets(\n job_id=\"job-*\",\n overall_score=80,\n start=\"1403532000000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getOverallBuckets({\n job_id: \"job-*\",\n overall_score: 80,\n start: 1403532000000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_overall_buckets(\n job_id: \"job-*\",\n body: {\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getOverallBuckets([\n \"job_id\" => \"job-*\",\n \"body\" => [\n \"overall_score\" => 80,\n \"start\" => \"1403532000000\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"overall_score\":80,\"start\":\"1403532000000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-*/results/overall_buckets\"" + }, + { + "lang": "Java", + "source": "client.ml().getOverallBuckets(g -> g\n .jobId(\"job-*\")\n .overallScore(80.0D)\n .start(DateTime.of(\"1403532000000\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -58010,6 +71436,36 @@ ], "x-api": "get_overall_buckets.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/job-*/results/overall_buckets\n{\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_overall_buckets(\n job_id=\"job-*\",\n overall_score=80,\n start=\"1403532000000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getOverallBuckets({\n job_id: \"job-*\",\n overall_score: 80,\n start: 1403532000000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_overall_buckets(\n job_id: \"job-*\",\n body: {\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getOverallBuckets([\n \"job_id\" => \"job-*\",\n \"body\" => [\n \"overall_score\" => 80,\n \"start\" => \"1403532000000\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"overall_score\":80,\"start\":\"1403532000000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-*/results/overall_buckets\"" + }, + { + "lang": "Java", + "source": "client.ml().getOverallBuckets(g -> g\n .jobId(\"job-*\")\n .overallScore(80.0D)\n .start(DateTime.of(\"1403532000000\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -58222,6 +71678,36 @@ ], "x-api": "get_records.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/results/records\n{\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_records(\n job_id=\"low_request_rate\",\n sort=\"record_score\",\n desc=True,\n start=\"1454944100000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getRecords({\n job_id: \"low_request_rate\",\n sort: \"record_score\",\n desc: true,\n start: 1454944100000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_records(\n job_id: \"low_request_rate\",\n body: {\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getRecords([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"sort\" => \"record_score\",\n \"desc\" => true,\n \"start\" => \"1454944100000\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":\"record_score\",\"desc\":true,\"start\":\"1454944100000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/records\"" + }, + { + "lang": "Java", + "source": "client.ml().getRecords(g -> g\n .desc(true)\n .jobId(\"low_request_rate\")\n .sort(\"record_score\")\n .start(DateTime.of(\"1454944100000\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -58432,6 +71918,36 @@ ], "x-api": "get_records.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/anomaly_detectors/low_request_rate/results/records\n{\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_records(\n job_id=\"low_request_rate\",\n sort=\"record_score\",\n desc=True,\n start=\"1454944100000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getRecords({\n job_id: \"low_request_rate\",\n sort: \"record_score\",\n desc: true,\n start: 1454944100000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_records(\n job_id: \"low_request_rate\",\n body: {\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getRecords([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"sort\" => \"record_score\",\n \"desc\" => true,\n \"start\" => \"1454944100000\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":\"record_score\",\"desc\":true,\"start\":\"1454944100000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/records\"" + }, + { + "lang": "Java", + "source": "client.ml().getRecords(g -> g\n .desc(true)\n .jobId(\"low_request_rate\")\n .sort(\"record_score\")\n .start(DateTime.of(\"1454944100000\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -58491,7 +72007,7 @@ { "in": "query", "name": "include", - "description": "A comma delimited string of optional fields to include in the response\nbody.", + "description": "A comma delimited string of optional fields to include in the response\nbody.\n\nSupported values include:\n - `definition`: Includes the model definition.\n - `feature_importance_baseline`: Includes the baseline for feature importance values.\n - `hyperparameters`: Includes the information about hyperparameters used to train the model.\nThis information consists of the value, the absolute and relative\nimportance of the hyperparameter as well as an indicator of whether it was\nspecified by the user or tuned during hyperparameter optimization.\n - `total_feature_importance`: Includes the total feature importance for the training data set. The\nbaseline and total feature importance values are returned in the metadata\nfield in the response body.\n - `definition_status`: Includes the model definition status.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/ml._types.Include" @@ -58566,6 +72082,36 @@ ], "x-api": "get_trained_models.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/trained_models/\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_trained_models()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getTrainedModels();" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_trained_models" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getTrainedModels();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/\"" + }, + { + "lang": "Java", + "source": "client.ml().getTrainedModels(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -58663,6 +72209,36 @@ ], "x-api": "get_trained_models_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/trained_models/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_trained_models_stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getTrainedModelsStats();" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_trained_models_stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getTrainedModelsStats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getTrainedModelsStats(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -58749,6 +72325,36 @@ ], "x-api": "get_trained_models_stats.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/trained_models/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.get_trained_models_stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.getTrainedModelsStats();" + }, + { + "lang": "Ruby", + "source": "response = client.ml.get_trained_models_stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->getTrainedModelsStats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/_stats\"" + }, + { + "lang": "Java", + "source": "client.ml().getTrainedModelsStats(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -58855,6 +72461,36 @@ ], "x-api": "infer_trained_model.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/trained_models/lang_ident_model_1/_infer\n{\n \"docs\":[{\"text\": \"The fool doth think he is wise, but the wise man knows himself to be a fool.\"}]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.infer_trained_model(\n model_id=\"lang_ident_model_1\",\n docs=[\n {\n \"text\": \"The fool doth think he is wise, but the wise man knows himself to be a fool.\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.inferTrainedModel({\n model_id: \"lang_ident_model_1\",\n docs: [\n {\n text: \"The fool doth think he is wise, but the wise man knows himself to be a fool.\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.infer_trained_model(\n model_id: \"lang_ident_model_1\",\n body: {\n \"docs\": [\n {\n \"text\": \"The fool doth think he is wise, but the wise man knows himself to be a fool.\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->inferTrainedModel([\n \"model_id\" => \"lang_ident_model_1\",\n \"body\" => [\n \"docs\" => array(\n [\n \"text\" => \"The fool doth think he is wise, but the wise man knows himself to be a fool.\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"text\":\"The fool doth think he is wise, but the wise man knows himself to be a fool.\"}]}' \"$ELASTICSEARCH_URL/_ml/trained_models/lang_ident_model_1/_infer\"" + }, + { + "lang": "Java", + "source": "client.ml().inferTrainedModel(i -> i\n .docs(Map.of(\"text\", JsonData.fromJson(\"\\\"The fool doth think he is wise, but the wise man knows himself to be a fool.\\\"\")))\n .modelId(\"lang_ident_model_1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -58924,6 +72560,36 @@ ], "x-api": "info.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/info\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.info()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.info();" + }, + { + "lang": "Ruby", + "source": "response = client.ml.info" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->info();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/info\"" + }, + { + "lang": "Java", + "source": "client.ml().info();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59033,6 +72699,36 @@ ], "x-api": "open_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ml/anomaly_detectors/job-01/_open\n{\n \"timeout\": \"35m\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.open_job(\n job_id=\"job-01\",\n timeout=\"35m\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.openJob({\n job_id: \"job-01\",\n timeout: \"35m\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.open_job(\n job_id: \"job-01\",\n body: {\n \"timeout\": \"35m\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->openJob([\n \"job_id\" => \"job-01\",\n \"body\" => [\n \"timeout\" => \"35m\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"timeout\":\"35m\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-01/_open\"" + }, + { + "lang": "Java", + "source": "client.ml().openJob(o -> o\n .jobId(\"job-01\")\n .timeout(t -> t\n .time(\"35m\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59293,6 +72989,36 @@ ], "x-api": "preview_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/_preview\n{\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.preview_data_frame_analytics(\n config={\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.previewDataFrameAnalytics({\n config: {\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.preview_data_frame_analytics(\n body: {\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->previewDataFrameAnalytics([\n \"body\" => [\n \"config\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"config\":{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_preview\"" + }, + { + "lang": "Java", + "source": "client.ml().previewDataFrameAnalytics(p -> p\n .config(c -> c\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59369,6 +73095,36 @@ ], "x-api": "preview_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/_preview\n{\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.preview_data_frame_analytics(\n config={\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.previewDataFrameAnalytics({\n config: {\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.preview_data_frame_analytics(\n body: {\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->previewDataFrameAnalytics([\n \"body\" => [\n \"config\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"config\":{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_preview\"" + }, + { + "lang": "Java", + "source": "client.ml().previewDataFrameAnalytics(p -> p\n .config(c -> c\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59460,6 +73216,36 @@ ], "x-api": "preview_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/_preview\n{\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.preview_data_frame_analytics(\n config={\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.previewDataFrameAnalytics({\n config: {\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.preview_data_frame_analytics(\n body: {\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->previewDataFrameAnalytics([\n \"body\" => [\n \"config\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"config\":{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_preview\"" + }, + { + "lang": "Java", + "source": "client.ml().previewDataFrameAnalytics(p -> p\n .config(c -> c\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59549,6 +73335,36 @@ ], "x-api": "preview_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/_preview\n{\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.preview_data_frame_analytics(\n config={\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.previewDataFrameAnalytics({\n config: {\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.preview_data_frame_analytics(\n body: {\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->previewDataFrameAnalytics([\n \"body\" => [\n \"config\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"config\":{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_preview\"" + }, + { + "lang": "Java", + "source": "client.ml().previewDataFrameAnalytics(p -> p\n .config(c -> c\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59651,6 +73467,36 @@ ], "x-api": "preview_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_preview\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.preview_datafeed(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.previewDatafeed({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.preview_datafeed(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->previewDatafeed([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_preview\"" + }, + { + "lang": "Java", + "source": "client.ml().previewDatafeed(p -> p\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59751,6 +73597,36 @@ ], "x-api": "preview_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_preview\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.preview_datafeed(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.previewDatafeed({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.preview_datafeed(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->previewDatafeed([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_preview\"" + }, + { + "lang": "Java", + "source": "client.ml().previewDatafeed(p -> p\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59842,6 +73718,36 @@ ], "x-api": "preview_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_preview\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.preview_datafeed(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.previewDatafeed({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.preview_datafeed(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->previewDatafeed([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_preview\"" + }, + { + "lang": "Java", + "source": "client.ml().previewDatafeed(p -> p\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -59931,6 +73837,36 @@ ], "x-api": "preview_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_preview\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.preview_datafeed(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.previewDatafeed({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.preview_datafeed(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->previewDatafeed([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_preview\"" + }, + { + "lang": "Java", + "source": "client.ml().previewDatafeed(p -> p\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60026,6 +73962,36 @@ ], "x-api": "put_trained_model_definition_part.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0\n{\n \"definition\": \"...\",\n \"total_definition_length\": 265632637,\n \"total_parts\": 64\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_trained_model_definition_part(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n part=\"0\",\n definition=\"...\",\n total_definition_length=265632637,\n total_parts=64,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putTrainedModelDefinitionPart({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n part: 0,\n definition: \"...\",\n total_definition_length: 265632637,\n total_parts: 64,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_trained_model_definition_part(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n part: \"0\",\n body: {\n \"definition\": \"...\",\n \"total_definition_length\": 265632637,\n \"total_parts\": 64\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putTrainedModelDefinitionPart([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n \"part\" => \"0\",\n \"body\" => [\n \"definition\" => \"...\",\n \"total_definition_length\" => 265632637,\n \"total_parts\" => 64,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"definition\":\"...\",\"total_definition_length\":265632637,\"total_parts\":64}' \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0\"" + }, + { + "lang": "Java", + "source": "client.ml().putTrainedModelDefinitionPart(p -> p\n .definition(\"...\")\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n .part(0)\n .totalDefinitionLength(265632637L)\n .totalParts(64)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60120,6 +74086,36 @@ ], "x-api": "put_trained_model_vocabulary.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/vocabulary\n{\n \"vocabulary\": [\n \"[PAD]\",\n \"[unused0]\",\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.put_trained_model_vocabulary(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n vocabulary=[\n \"[PAD]\",\n \"[unused0]\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.putTrainedModelVocabulary({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n vocabulary: [\"[PAD]\", \"[unused0]\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.put_trained_model_vocabulary(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n body: {\n \"vocabulary\": [\n \"[PAD]\",\n \"[unused0]\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->putTrainedModelVocabulary([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n \"body\" => [\n \"vocabulary\" => array(\n \"[PAD]\",\n \"[unused0]\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"vocabulary\":[\"[PAD]\",\"[unused0]\"]}' \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/vocabulary\"" + }, + { + "lang": "Java", + "source": "client.ml().putTrainedModelVocabulary(p -> p\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n .vocabulary(List.of(\"[PAD]\",\"[unused0]\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60190,6 +74186,36 @@ ], "x-api": "reset_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/anomaly_detectors/total-requests/_reset\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.reset_job(\n job_id=\"total-requests\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.resetJob({\n job_id: \"total-requests\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.reset_job(\n job_id: \"total-requests\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->resetJob([\n \"job_id\" => \"total-requests\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests/_reset\"" + }, + { + "lang": "Java", + "source": "client.ml().resetJob(r -> r\n .jobId(\"total-requests\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60295,6 +74321,36 @@ ], "x-api": "revert_model_snapshot.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/anomaly_detectors/low_request_rate/model_snapshots/1637092688/_revert\n{\n \"delete_intervening_results\": true\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.revert_model_snapshot(\n job_id=\"low_request_rate\",\n snapshot_id=\"1637092688\",\n delete_intervening_results=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.revertModelSnapshot({\n job_id: \"low_request_rate\",\n snapshot_id: 1637092688,\n delete_intervening_results: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.revert_model_snapshot(\n job_id: \"low_request_rate\",\n snapshot_id: \"1637092688\",\n body: {\n \"delete_intervening_results\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->revertModelSnapshot([\n \"job_id\" => \"low_request_rate\",\n \"snapshot_id\" => \"1637092688\",\n \"body\" => [\n \"delete_intervening_results\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"delete_intervening_results\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/1637092688/_revert\"" + }, + { + "lang": "Java", + "source": "client.ml().revertModelSnapshot(r -> r\n .deleteInterveningResults(true)\n .jobId(\"low_request_rate\")\n .snapshotId(\"1637092688\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60354,6 +74410,36 @@ ], "x-api": "set_upgrade_mode.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/set_upgrade_mode?enabled=true\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.set_upgrade_mode(\n enabled=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.setUpgradeMode({\n enabled: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.set_upgrade_mode(\n enabled: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->setUpgradeMode([\n \"enabled\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/set_upgrade_mode?enabled=true\"" + }, + { + "lang": "Java", + "source": "client.ml().setUpgradeMode(s -> s\n .enabled(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60460,6 +74546,36 @@ ], "x-api": "start_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/loganalytics/_start\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.start_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.startDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.start_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->startDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_start\"" + }, + { + "lang": "Java", + "source": "client.ml().startDataFrameAnalytics(s -> s\n .id(\"loganalytics\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60600,6 +74716,36 @@ ], "x-api": "start_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/datafeeds/datafeed-low_request_rate/_start\n{\n \"start\": \"2019-04-07T18:22:16Z\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.start_datafeed(\n datafeed_id=\"datafeed-low_request_rate\",\n start=\"2019-04-07T18:22:16Z\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.startDatafeed({\n datafeed_id: \"datafeed-low_request_rate\",\n start: \"2019-04-07T18:22:16Z\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.start_datafeed(\n datafeed_id: \"datafeed-low_request_rate\",\n body: {\n \"start\": \"2019-04-07T18:22:16Z\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->startDatafeed([\n \"datafeed_id\" => \"datafeed-low_request_rate\",\n \"body\" => [\n \"start\" => \"2019-04-07T18:22:16Z\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"start\":\"2019-04-07T18:22:16Z\"}' \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-low_request_rate/_start\"" + }, + { + "lang": "Java", + "source": "client.ml().startDatafeed(s -> s\n .datafeedId(\"datafeed-low_request_rate\")\n .start(DateTime.of(\"2019-04-07T18:22:16Z\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60702,7 +74848,7 @@ { "in": "query", "name": "wait_for", - "description": "Specifies the allocation status to wait for before returning.", + "description": "Specifies the allocation status to wait for before returning.\n\nSupported values include:\n - `started`: The trained model is started on at least one node.\n - `starting`: Trained model deployment is starting but it is not yet deployed on any nodes.\n - `fully_allocated`: Trained model deployment has started on all valid nodes.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/ml._types.DeploymentAllocationState" @@ -60762,6 +74908,36 @@ ], "x-api": "start_trained_model_deployment.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_start?wait_for=started&timeout=1m\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.start_trained_model_deployment(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n wait_for=\"started\",\n timeout=\"1m\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.startTrainedModelDeployment({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n wait_for: \"started\",\n timeout: \"1m\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.start_trained_model_deployment(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n wait_for: \"started\",\n timeout: \"1m\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->startTrainedModelDeployment([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n \"wait_for\" => \"started\",\n \"timeout\" => \"1m\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_start?wait_for=started&timeout=1m\"" + }, + { + "lang": "Java", + "source": "client.ml().startTrainedModelDeployment(s -> s\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n .timeout(t -> t\n .offset(1)\n )\n .waitFor(DeploymentAllocationState.Started)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -60888,6 +75064,36 @@ ], "x-api": "stop_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/loganalytics/_stop\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.stop_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.stopDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.stop_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->stopDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_stop\"" + }, + { + "lang": "Java", + "source": "client.ml().stopDataFrameAnalytics(s -> s\n .id(\"loganalytics\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -61027,6 +75233,36 @@ ], "x-api": "stop_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/datafeeds/datafeed-low_request_rate/_stop\n{\n \"timeout\": \"30s\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.stop_datafeed(\n datafeed_id=\"datafeed-low_request_rate\",\n timeout=\"30s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.stopDatafeed({\n datafeed_id: \"datafeed-low_request_rate\",\n timeout: \"30s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.stop_datafeed(\n datafeed_id: \"datafeed-low_request_rate\",\n body: {\n \"timeout\": \"30s\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->stopDatafeed([\n \"datafeed_id\" => \"datafeed-low_request_rate\",\n \"body\" => [\n \"timeout\" => \"30s\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-low_request_rate/_stop\"" + }, + { + "lang": "Java", + "source": "client.ml().stopDatafeed(s -> s\n .datafeedId(\"datafeed-low_request_rate\")\n .timeout(t -> t\n .time(\"30s\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -61133,6 +75369,36 @@ ], "x-api": "stop_trained_model_deployment.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/trained_models/my_model_for_search/deployment/_stop\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.stop_trained_model_deployment(\n model_id=\"my_model_for_search\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.stopTrainedModelDeployment({\n model_id: \"my_model_for_search\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.stop_trained_model_deployment(\n model_id: \"my_model_for_search\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->stopTrainedModelDeployment([\n \"model_id\" => \"my_model_for_search\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/my_model_for_search/deployment/_stop\"" + }, + { + "lang": "Java", + "source": "client.ml().stopTrainedModelDeployment(s -> s\n .modelId(\"my_model_for_search\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -61297,6 +75563,36 @@ ], "x-api": "update_data_frame_analytics.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/data_frame/analytics/loganalytics/_update\n{\n \"model_memory_limit\": \"200mb\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.update_data_frame_analytics(\n id=\"loganalytics\",\n model_memory_limit=\"200mb\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.updateDataFrameAnalytics({\n id: \"loganalytics\",\n model_memory_limit: \"200mb\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.update_data_frame_analytics(\n id: \"loganalytics\",\n body: {\n \"model_memory_limit\": \"200mb\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->updateDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n \"body\" => [\n \"model_memory_limit\" => \"200mb\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"model_memory_limit\":\"200mb\"}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_update\"" + }, + { + "lang": "Java", + "source": "client.ml().updateDataFrameAnalytics(u -> u\n .id(\"loganalytics\")\n .modelMemoryLimit(\"200mb\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -61338,7 +75634,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument determines\nwhether wildcard expressions match hidden data streams. Supports comma-separated values.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -61605,6 +75901,36 @@ ], "x-api": "update_datafeed.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/datafeeds/datafeed-test-job/_update\n{\n \"query\": {\n \"term\": {\n \"geo.src\": \"US\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.update_datafeed(\n datafeed_id=\"datafeed-test-job\",\n query={\n \"term\": {\n \"geo.src\": \"US\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.updateDatafeed({\n datafeed_id: \"datafeed-test-job\",\n query: {\n term: {\n \"geo.src\": \"US\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.update_datafeed(\n datafeed_id: \"datafeed-test-job\",\n body: {\n \"query\": {\n \"term\": {\n \"geo.src\": \"US\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->updateDatafeed([\n \"datafeed_id\" => \"datafeed-test-job\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"geo.src\" => \"US\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"geo.src\":\"US\"}}}' \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-test-job/_update\"" + }, + { + "lang": "Java", + "source": "client.ml().updateDatafeed(u -> u\n .datafeedId(\"datafeed-test-job\")\n .query(q -> q\n .term(t -> t\n .field(\"geo.src\")\n .value(FieldValue.of(\"US\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -61714,6 +76040,36 @@ ], "x-api": "update_filter.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/filters/safe_domains/_update\n{\n \"description\": \"Updated list of domains\",\n \"add_items\": [\"*.myorg.com\"],\n \"remove_items\": [\"wikipedia.org\"]\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.update_filter(\n filter_id=\"safe_domains\",\n description=\"Updated list of domains\",\n add_items=[\n \"*.myorg.com\"\n ],\n remove_items=[\n \"wikipedia.org\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.updateFilter({\n filter_id: \"safe_domains\",\n description: \"Updated list of domains\",\n add_items: [\"*.myorg.com\"],\n remove_items: [\"wikipedia.org\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.update_filter(\n filter_id: \"safe_domains\",\n body: {\n \"description\": \"Updated list of domains\",\n \"add_items\": [\n \"*.myorg.com\"\n ],\n \"remove_items\": [\n \"wikipedia.org\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->updateFilter([\n \"filter_id\" => \"safe_domains\",\n \"body\" => [\n \"description\" => \"Updated list of domains\",\n \"add_items\" => array(\n \"*.myorg.com\",\n ),\n \"remove_items\" => array(\n \"wikipedia.org\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Updated list of domains\",\"add_items\":[\"*.myorg.com\"],\"remove_items\":[\"wikipedia.org\"]}' \"$ELASTICSEARCH_URL/_ml/filters/safe_domains/_update\"" + }, + { + "lang": "Java", + "source": "client.ml().updateFilter(u -> u\n .addItems(\"*.myorg.com\")\n .description(\"Updated list of domains\")\n .filterId(\"safe_domains\")\n .removeItems(\"wikipedia.org\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -62005,6 +76361,36 @@ ], "x-api": "update_job.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/anomaly_detectors/low_request_rate/_update\n{\n \"description\":\"An updated job\",\n \"detectors\": {\n \"detector_index\": 0,\n \"description\": \"An updated detector description\"\n },\n \"groups\": [\"kibana_sample_data\",\"kibana_sample_web_logs\"],\n \"model_plot_config\": {\n \"enabled\": true\n },\n \"renormalization_window_days\": 30,\n \"background_persist_interval\": \"2h\",\n \"model_snapshot_retention_days\": 7,\n \"results_retention_days\": 60\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.update_job(\n job_id=\"low_request_rate\",\n description=\"An updated job\",\n detectors={\n \"detector_index\": 0,\n \"description\": \"An updated detector description\"\n },\n groups=[\n \"kibana_sample_data\",\n \"kibana_sample_web_logs\"\n ],\n model_plot_config={\n \"enabled\": True\n },\n renormalization_window_days=30,\n background_persist_interval=\"2h\",\n model_snapshot_retention_days=7,\n results_retention_days=60,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.updateJob({\n job_id: \"low_request_rate\",\n description: \"An updated job\",\n detectors: {\n detector_index: 0,\n description: \"An updated detector description\",\n },\n groups: [\"kibana_sample_data\", \"kibana_sample_web_logs\"],\n model_plot_config: {\n enabled: true,\n },\n renormalization_window_days: 30,\n background_persist_interval: \"2h\",\n model_snapshot_retention_days: 7,\n results_retention_days: 60,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.update_job(\n job_id: \"low_request_rate\",\n body: {\n \"description\": \"An updated job\",\n \"detectors\": {\n \"detector_index\": 0,\n \"description\": \"An updated detector description\"\n },\n \"groups\": [\n \"kibana_sample_data\",\n \"kibana_sample_web_logs\"\n ],\n \"model_plot_config\": {\n \"enabled\": true\n },\n \"renormalization_window_days\": 30,\n \"background_persist_interval\": \"2h\",\n \"model_snapshot_retention_days\": 7,\n \"results_retention_days\": 60\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->updateJob([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"description\" => \"An updated job\",\n \"detectors\" => [\n \"detector_index\" => 0,\n \"description\" => \"An updated detector description\",\n ],\n \"groups\" => array(\n \"kibana_sample_data\",\n \"kibana_sample_web_logs\",\n ),\n \"model_plot_config\" => [\n \"enabled\" => true,\n ],\n \"renormalization_window_days\" => 30,\n \"background_persist_interval\" => \"2h\",\n \"model_snapshot_retention_days\" => 7,\n \"results_retention_days\" => 60,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"An updated job\",\"detectors\":{\"detector_index\":0,\"description\":\"An updated detector description\"},\"groups\":[\"kibana_sample_data\",\"kibana_sample_web_logs\"],\"model_plot_config\":{\"enabled\":true},\"renormalization_window_days\":30,\"background_persist_interval\":\"2h\",\"model_snapshot_retention_days\":7,\"results_retention_days\":60}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_update\"" + }, + { + "lang": "Java", + "source": "client.ml().updateJob(u -> u\n .backgroundPersistInterval(b -> b\n .time(\"2h\")\n )\n .description(\"An updated job\")\n .detectors(d -> d\n .detectorIndex(0)\n .description(\"An updated detector description\")\n )\n .groups(List.of(\"kibana_sample_data\",\"kibana_sample_web_logs\"))\n .jobId(\"low_request_rate\")\n .modelPlotConfig(m -> m\n .enabled(true)\n )\n .modelSnapshotRetentionDays(7L)\n .renormalizationWindowDays(30L)\n .resultsRetentionDays(60L)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -62109,6 +76495,36 @@ ], "x-api": "update_model_snapshot.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST\n_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update\n{\n \"description\": \"Snapshot 1\",\n \"retain\": true\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.update_model_snapshot(\n job_id=\"it_ops_new_logs\",\n snapshot_id=\"1491852978\",\n description=\"Snapshot 1\",\n retain=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.updateModelSnapshot({\n job_id: \"it_ops_new_logs\",\n snapshot_id: 1491852978,\n description: \"Snapshot 1\",\n retain: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.update_model_snapshot(\n job_id: \"it_ops_new_logs\",\n snapshot_id: \"1491852978\",\n body: {\n \"description\": \"Snapshot 1\",\n \"retain\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->updateModelSnapshot([\n \"job_id\" => \"it_ops_new_logs\",\n \"snapshot_id\" => \"1491852978\",\n \"body\" => [\n \"description\" => \"Snapshot 1\",\n \"retain\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Snapshot 1\",\"retain\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update\"" + }, + { + "lang": "Java", + "source": "client.ml().updateModelSnapshot(u -> u\n .description(\"Snapshot 1\")\n .jobId(\"it_ops_new_logs\")\n .retain(true)\n .snapshotId(\"1491852978\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -62210,6 +76626,36 @@ ], "x-api": "update_trained_model_deployment.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_update\n{\n \"number_of_allocations\": 4\n}" + }, + { + "lang": "Python", + "source": "resp = client.ml.update_trained_model_deployment(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n number_of_allocations=4,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.updateTrainedModelDeployment({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n number_of_allocations: 4,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.update_trained_model_deployment(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n body: {\n \"number_of_allocations\": 4\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->updateTrainedModelDeployment([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n \"body\" => [\n \"number_of_allocations\" => 4,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"number_of_allocations\":4}' \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_update\"" + }, + { + "lang": "Java", + "source": "client.ml().updateTrainedModelDeployment(u -> u\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n .numberOfAllocations(4)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -62309,6 +76755,36 @@ ], "x-api": "upgrade_job_snapshot.ml", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _ml/anomaly_detectors/low_request_rate/model_snapshots/1828371/_upgrade?timeout=45m&wait_for_completion=true\n" + }, + { + "lang": "Python", + "source": "resp = client.ml.upgrade_job_snapshot(\n job_id=\"low_request_rate\",\n snapshot_id=\"1828371\",\n timeout=\"45m\",\n wait_for_completion=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ml.upgradeJobSnapshot({\n job_id: \"low_request_rate\",\n snapshot_id: 1828371,\n timeout: \"45m\",\n wait_for_completion: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.ml.upgrade_job_snapshot(\n job_id: \"low_request_rate\",\n snapshot_id: \"1828371\",\n timeout: \"45m\",\n wait_for_completion: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->ml()->upgradeJobSnapshot([\n \"job_id\" => \"low_request_rate\",\n \"snapshot_id\" => \"1828371\",\n \"timeout\" => \"45m\",\n \"wait_for_completion\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/1828371/_upgrade?timeout=45m&wait_for_completion=true\"" + }, + { + "lang": "Java", + "source": "client.ml().upgradeJobSnapshot(u -> u\n .jobId(\"low_request_rate\")\n .snapshotId(\"1828371\")\n .timeout(t -> t\n .offset(45)\n )\n .waitForCompletion(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch, Machine Learning", @@ -62349,7 +76825,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "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.", + "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -62449,7 +76925,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -62508,6 +76984,32 @@ ], "x-api": "msearch", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_msearch\n{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"my-index-000002\"}\n{\"query\" : {\"match_all\" : {}}}" + }, + { + "lang": "Python", + "source": "resp = client.msearch(\n index=\"my-index-000001\",\n searches=[\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.msearch({\n index: \"my-index-000001\",\n searches: [\n {},\n {\n query: {\n match: {\n message: \"this is a test\",\n },\n },\n },\n {\n index: \"my-index-000002\",\n },\n {\n query: {\n match_all: {},\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.msearch(\n index: \"my-index-000001\",\n body: [\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->msearch([\n \"index\" => \"my-index-000001\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"query\" => [\n \"match\" => [\n \"message\" => \"this is a test\",\n ],\n ],\n ],\n [\n \"index\" => \"my-index-000002\",\n ],\n [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{}\\n{\"query\":{\"match\":{\"message\":\"this is a test\"}}}\\n{\"index\":\"my-index-000002\"}\\n{\"query\":{\"match_all\":{}}}\\n' \"$ELASTICSEARCH_URL/my-index-000001/_msearch\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -62546,7 +77048,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "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.", + "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -62646,7 +77148,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -62705,6 +77207,32 @@ ], "x-api": "msearch", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_msearch\n{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"my-index-000002\"}\n{\"query\" : {\"match_all\" : {}}}" + }, + { + "lang": "Python", + "source": "resp = client.msearch(\n index=\"my-index-000001\",\n searches=[\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.msearch({\n index: \"my-index-000001\",\n searches: [\n {},\n {\n query: {\n match: {\n message: \"this is a test\",\n },\n },\n },\n {\n index: \"my-index-000002\",\n },\n {\n query: {\n match_all: {},\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.msearch(\n index: \"my-index-000001\",\n body: [\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->msearch([\n \"index\" => \"my-index-000001\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"query\" => [\n \"match\" => [\n \"message\" => \"this is a test\",\n ],\n ],\n ],\n [\n \"index\" => \"my-index-000002\",\n ],\n [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{}\\n{\"query\":{\"match\":{\"message\":\"this is a test\"}}}\\n{\"index\":\"my-index-000002\"}\\n{\"query\":{\"match_all\":{}}}\\n' \"$ELASTICSEARCH_URL/my-index-000001/_msearch\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -62756,7 +77284,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "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.", + "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -62856,7 +77384,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -62915,6 +77443,32 @@ ], "x-api": "msearch", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_msearch\n{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"my-index-000002\"}\n{\"query\" : {\"match_all\" : {}}}" + }, + { + "lang": "Python", + "source": "resp = client.msearch(\n index=\"my-index-000001\",\n searches=[\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.msearch({\n index: \"my-index-000001\",\n searches: [\n {},\n {\n query: {\n match: {\n message: \"this is a test\",\n },\n },\n },\n {\n index: \"my-index-000002\",\n },\n {\n query: {\n match_all: {},\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.msearch(\n index: \"my-index-000001\",\n body: [\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->msearch([\n \"index\" => \"my-index-000001\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"query\" => [\n \"match\" => [\n \"message\" => \"this is a test\",\n ],\n ],\n ],\n [\n \"index\" => \"my-index-000002\",\n ],\n [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{}\\n{\"query\":{\"match\":{\"message\":\"this is a test\"}}}\\n{\"index\":\"my-index-000002\"}\\n{\"query\":{\"match_all\":{}}}\\n' \"$ELASTICSEARCH_URL/my-index-000001/_msearch\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -62964,7 +77518,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "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.", + "description": "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.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -63064,7 +77618,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -63123,6 +77677,32 @@ ], "x-api": "msearch", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index-000001/_msearch\n{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"my-index-000002\"}\n{\"query\" : {\"match_all\" : {}}}" + }, + { + "lang": "Python", + "source": "resp = client.msearch(\n index=\"my-index-000001\",\n searches=[\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.msearch({\n index: \"my-index-000001\",\n searches: [\n {},\n {\n query: {\n match: {\n message: \"this is a test\",\n },\n },\n },\n {\n index: \"my-index-000002\",\n },\n {\n query: {\n match_all: {},\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.msearch(\n index: \"my-index-000001\",\n body: [\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->msearch([\n \"index\" => \"my-index-000001\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"query\" => [\n \"match\" => [\n \"message\" => \"this is a test\",\n ],\n ],\n ],\n [\n \"index\" => \"my-index-000002\",\n ],\n [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{}\\n{\"query\":{\"match\":{\"message\":\"this is a test\"}}}\\n{\"index\":\"my-index-000002\"}\\n{\"query\":{\"match_all\":{}}}\\n' \"$ELASTICSEARCH_URL/my-index-000001/_msearch\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -63167,7 +77747,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.", + "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -63236,6 +77816,32 @@ ], "x-api": "msearch_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index/_msearch/template\n{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + }, + { + "lang": "Python", + "source": "resp = client.msearch_template(\n index=\"my-index\",\n search_templates=[\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.msearchTemplate({\n index: \"my-index\",\n search_templates: [\n {},\n {\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n },\n {},\n {\n id: \"my-other-search-template\",\n params: {\n query_type: \"match_all\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.msearch_template(\n index: \"my-index\",\n body: [\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->msearchTemplate([\n \"index\" => \"my-index\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n new ArrayObject([]),\n [\n \"id\" => \"my-other-search-template\",\n \"params\" => [\n \"query_type\" => \"match_all\",\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{}\\n{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}\\n{}\\n{\"id\":\"my-other-search-template\",\"params\":{\"query_type\":\"match_all\"}}\\n' \"$ELASTICSEARCH_URL/my-index/_msearch/template\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -63278,7 +77884,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.", + "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -63347,6 +77953,32 @@ ], "x-api": "msearch_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index/_msearch/template\n{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + }, + { + "lang": "Python", + "source": "resp = client.msearch_template(\n index=\"my-index\",\n search_templates=[\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.msearchTemplate({\n index: \"my-index\",\n search_templates: [\n {},\n {\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n },\n {},\n {\n id: \"my-other-search-template\",\n params: {\n query_type: \"match_all\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.msearch_template(\n index: \"my-index\",\n body: [\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->msearchTemplate([\n \"index\" => \"my-index\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n new ArrayObject([]),\n [\n \"id\" => \"my-other-search-template\",\n \"params\" => [\n \"query_type\" => \"match_all\",\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{}\\n{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}\\n{}\\n{\"id\":\"my-other-search-template\",\"params\":{\"query_type\":\"match_all\"}}\\n' \"$ELASTICSEARCH_URL/my-index/_msearch/template\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -63402,7 +78034,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.", + "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -63471,6 +78103,32 @@ ], "x-api": "msearch_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index/_msearch/template\n{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + }, + { + "lang": "Python", + "source": "resp = client.msearch_template(\n index=\"my-index\",\n search_templates=[\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.msearchTemplate({\n index: \"my-index\",\n search_templates: [\n {},\n {\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n },\n {},\n {\n id: \"my-other-search-template\",\n params: {\n query_type: \"match_all\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.msearch_template(\n index: \"my-index\",\n body: [\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->msearchTemplate([\n \"index\" => \"my-index\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n new ArrayObject([]),\n [\n \"id\" => \"my-other-search-template\",\n \"params\" => [\n \"query_type\" => \"match_all\",\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{}\\n{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}\\n{}\\n{\"id\":\"my-other-search-template\",\"params\":{\"query_type\":\"match_all\"}}\\n' \"$ELASTICSEARCH_URL/my-index/_msearch/template\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -63524,7 +78182,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.", + "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -63593,6 +78251,32 @@ ], "x-api": "msearch_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index/_msearch/template\n{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + }, + { + "lang": "Python", + "source": "resp = client.msearch_template(\n index=\"my-index\",\n search_templates=[\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.msearchTemplate({\n index: \"my-index\",\n search_templates: [\n {},\n {\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n },\n {},\n {\n id: \"my-other-search-template\",\n params: {\n query_type: \"match_all\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.msearch_template(\n index: \"my-index\",\n body: [\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->msearchTemplate([\n \"index\" => \"my-index\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n new ArrayObject([]),\n [\n \"id\" => \"my-other-search-template\",\n \"params\" => [\n \"query_type\" => \"match_all\",\n ],\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{}\\n{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}\\n{}\\n{\"id\":\"my-other-search-template\",\"params\":{\"query_type\":\"match_all\"}}\\n' \"$ELASTICSEARCH_URL/my-index/_msearch/template\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -63726,7 +78410,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -63809,6 +78493,36 @@ ], "x-api": "mtermvectors", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_mtermvectors\n{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.mtermvectors(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": True\n },\n {\n \"_id\": \"1\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.mtermvectors({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"2\",\n fields: [\"message\"],\n term_statistics: true,\n },\n {\n _id: \"1\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.mtermvectors(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->mtermvectors([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"2\",\n \"fields\" => array(\n \"message\",\n ),\n \"term_statistics\" => true,\n ],\n [\n \"_id\" => \"1\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"2\",\"fields\":[\"message\"],\"term_statistics\":true},{\"_id\":\"1\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mtermvectors\"" + }, + { + "lang": "Java", + "source": "client.mtermvectors(m -> m\n .docs(List.of(MultiTermVectorsOperation.of(mu -> mu\n .id(\"2\")\n .fields(\"message\")\n .termStatistics(true)\n ),MultiTermVectorsOperation.of(mu -> mu\n .id(\"1\")\n )))\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -63940,7 +78654,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -64023,6 +78737,36 @@ ], "x-api": "mtermvectors", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_mtermvectors\n{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.mtermvectors(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": True\n },\n {\n \"_id\": \"1\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.mtermvectors({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"2\",\n fields: [\"message\"],\n term_statistics: true,\n },\n {\n _id: \"1\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.mtermvectors(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->mtermvectors([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"2\",\n \"fields\" => array(\n \"message\",\n ),\n \"term_statistics\" => true,\n ],\n [\n \"_id\" => \"1\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"2\",\"fields\":[\"message\"],\"term_statistics\":true},{\"_id\":\"1\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mtermvectors\"" + }, + { + "lang": "Java", + "source": "client.mtermvectors(m -> m\n .docs(List.of(MultiTermVectorsOperation.of(mu -> mu\n .id(\"2\")\n .fields(\"message\")\n .termStatistics(true)\n ),MultiTermVectorsOperation.of(mu -> mu\n .id(\"1\")\n )))\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -64167,7 +78911,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -64250,6 +78994,36 @@ ], "x-api": "mtermvectors", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_mtermvectors\n{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.mtermvectors(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": True\n },\n {\n \"_id\": \"1\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.mtermvectors({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"2\",\n fields: [\"message\"],\n term_statistics: true,\n },\n {\n _id: \"1\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.mtermvectors(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->mtermvectors([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"2\",\n \"fields\" => array(\n \"message\",\n ),\n \"term_statistics\" => true,\n ],\n [\n \"_id\" => \"1\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"2\",\"fields\":[\"message\"],\"term_statistics\":true},{\"_id\":\"1\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mtermvectors\"" + }, + { + "lang": "Java", + "source": "client.mtermvectors(m -> m\n .docs(List.of(MultiTermVectorsOperation.of(mu -> mu\n .id(\"2\")\n .fields(\"message\")\n .termStatistics(true)\n ),MultiTermVectorsOperation.of(mu -> mu\n .id(\"1\")\n )))\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -64392,7 +79166,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -64475,6 +79249,36 @@ ], "x-api": "mtermvectors", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_mtermvectors\n{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.mtermvectors(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": True\n },\n {\n \"_id\": \"1\"\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.mtermvectors({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"2\",\n fields: [\"message\"],\n term_statistics: true,\n },\n {\n _id: \"1\",\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.mtermvectors(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->mtermvectors([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"2\",\n \"fields\" => array(\n \"message\",\n ),\n \"term_statistics\" => true,\n ],\n [\n \"_id\" => \"1\",\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"2\",\"fields\":[\"message\"],\"term_statistics\":true},{\"_id\":\"1\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mtermvectors\"" + }, + { + "lang": "Java", + "source": "client.mtermvectors(m -> m\n .docs(List.of(MultiTermVectorsOperation.of(mu -> mu\n .id(\"2\")\n .fields(\"message\")\n .termStatistics(true)\n ),MultiTermVectorsOperation.of(mu -> mu\n .id(\"1\")\n )))\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -64688,133 +79492,193 @@ }, "x-state": "Generally available", "x-variations": [ - "
\n GET\n /_nodes/hot_threads\n
\n " + "
\n GET\n /_nodes/hot_threads\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor`,`manage`\n" + ], + "x-api": "hot_threads.nodes", + "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_nodes/hot_threads\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.hot_threads()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.hotThreads();" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.hot_threads" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->hotThreads();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/hot_threads\"" + }, + { + "lang": "Java", + "source": "client.nodes().hotThreads(h -> h);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_nodes/{node_id}/hot_threads": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get the hot threads for nodes", + "description": "Get a breakdown of the hot threads on each selected node in the cluster.\nThe output is plain text with a breakdown of the top hot threads for each node.", + "operationId": "nodes-hot-threads-1", + "parameters": [ + { + "in": "path", + "name": "node_id", + "description": "List of node IDs or names used to limit returned information.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.NodeIds" + }, + "style": "simple" + }, + { + "in": "query", + "name": "ignore_idle_threads", + "description": "If true, known idle threads (e.g. waiting in a socket select, or to get\na task from an empty queue) are filtered out.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "interval", + "description": "The interval to do the second sampling of threads.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "snapshots", + "description": "Number of samples of thread stacktrace.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "threads", + "description": "Specifies the number of hot threads to provide information for.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received\nbefore the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "type", + "description": "The type to sample.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ThreadType" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort", + "description": "The sort order for 'cpu' type", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ThreadType" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "x-state": "Generally available", + "x-variations": [ + "
\n GET\n /_nodes/{node_id}/hot_threads\n
\n " ], "x-req-auth": [ "Cluster privileges: `monitor`,`manage`\n" ], "x-api": "hot_threads.nodes", "x-category": "unknown", - "x-metaTags": [ + "x-codeSamples": [ { - "content": "Elasticsearch", - "name": "product_name" - } - ] - } - }, - "/_nodes/{node_id}/hot_threads": { - "get": { - "tags": [ - "cluster" - ], - "summary": "Get the hot threads for nodes", - "description": "Get a breakdown of the hot threads on each selected node in the cluster.\nThe output is plain text with a breakdown of the top hot threads for each node.", - "operationId": "nodes-hot-threads-1", - "parameters": [ - { - "in": "path", - "name": "node_id", - "description": "List of node IDs or names used to limit returned information.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.NodeIds" - }, - "style": "simple" + "lang": "Console", + "source": "GET /_nodes/hot_threads\n" }, { - "in": "query", - "name": "ignore_idle_threads", - "description": "If true, known idle threads (e.g. waiting in a socket select, or to get\na task from an empty queue) are filtered out.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" + "lang": "Python", + "source": "resp = client.nodes.hot_threads()" }, { - "in": "query", - "name": "interval", - "description": "The interval to do the second sampling of threads.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "lang": "JavaScript", + "source": "const response = await client.nodes.hotThreads();" }, { - "in": "query", - "name": "snapshots", - "description": "Number of samples of thread stacktrace.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "lang": "Ruby", + "source": "response = client.nodes.hot_threads" }, { - "in": "query", - "name": "threads", - "description": "Specifies the number of hot threads to provide information for.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" + "lang": "PHP", + "source": "$resp = $client->nodes()->hotThreads();" }, { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response. If no response is received\nbefore the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "type", - "description": "The type to sample.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ThreadType" - }, - "style": "form" + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/hot_threads\"" }, { - "in": "query", - "name": "sort", - "description": "The sort order for 'cpu' type", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.ThreadType" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } + "lang": "Java", + "source": "client.nodes().hotThreads(h -> h);\n" } - }, - "x-state": "Generally available", - "x-variations": [ - "
\n GET\n /_nodes/{node_id}/hot_threads\n
\n " - ], - "x-req-auth": [ - "Cluster privileges: `monitor`,`manage`\n" ], - "x-api": "hot_threads.nodes", - "x-category": "unknown", "x-metaTags": [ { "content": "Elasticsearch", @@ -64877,6 +79741,36 @@ ], "x-api": "info.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/_all/jvm\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.info(\n node_id=\"_all\",\n metric=\"jvm\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.info({\n node_id: \"_all\",\n metric: \"jvm\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.info(\n node_id: \"_all\",\n metric: \"jvm\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->info([\n \"node_id\" => \"_all\",\n \"metric\" => \"jvm\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/_all/jvm\"" + }, + { + "lang": "Java", + "source": "client.nodes().info(i -> i\n .metric(\"jvm\")\n .nodeId(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -64950,6 +79844,36 @@ ], "x-api": "info.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/_all/jvm\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.info(\n node_id=\"_all\",\n metric=\"jvm\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.info({\n node_id: \"_all\",\n metric: \"jvm\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.info(\n node_id: \"_all\",\n metric: \"jvm\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->info([\n \"node_id\" => \"_all\",\n \"metric\" => \"jvm\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/_all/jvm\"" + }, + { + "lang": "Java", + "source": "client.nodes().info(i -> i\n .metric(\"jvm\")\n .nodeId(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -64970,7 +79894,7 @@ { "in": "path", "name": "metric", - "description": "Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.", + "description": "Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.\n\nSupported values include: `_all`, `_none`, `settings`, `os`, `process`, `jvm`, `thread_pool`, `transport`, `http`, `remote_cluster_server`, `plugins`, `ingest`, `aggregations`, `indices`\n\n", "required": true, "deprecated": false, "schema": { @@ -65023,6 +79947,36 @@ ], "x-api": "info.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/_all/jvm\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.info(\n node_id=\"_all\",\n metric=\"jvm\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.info({\n node_id: \"_all\",\n metric: \"jvm\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.info(\n node_id: \"_all\",\n metric: \"jvm\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->info([\n \"node_id\" => \"_all\",\n \"metric\" => \"jvm\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/_all/jvm\"" + }, + { + "lang": "Java", + "source": "client.nodes().info(i -> i\n .metric(\"jvm\")\n .nodeId(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -65054,7 +80008,7 @@ { "in": "path", "name": "metric", - "description": "Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.", + "description": "Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.\n\nSupported values include: `_all`, `_none`, `settings`, `os`, `process`, `jvm`, `thread_pool`, `transport`, `http`, `remote_cluster_server`, `plugins`, `ingest`, `aggregations`, `indices`\n\n", "required": true, "deprecated": false, "schema": { @@ -65107,6 +80061,36 @@ ], "x-api": "info.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/_all/jvm\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.info(\n node_id=\"_all\",\n metric=\"jvm\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.info({\n node_id: \"_all\",\n metric: \"jvm\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.info(\n node_id: \"_all\",\n metric: \"jvm\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->info([\n \"node_id\" => \"_all\",\n \"metric\" => \"jvm\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/_all/jvm\"" + }, + { + "lang": "Java", + "source": "client.nodes().info(i -> i\n .metric(\"jvm\")\n .nodeId(\"_all\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -65184,6 +80168,36 @@ ], "x-api": "reload_secure_settings.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _nodes/reload_secure_settings\n{\n \"secure_settings_password\": \"keystore-password\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.nodes.reload_secure_settings(\n secure_settings_password=\"keystore-password\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.reloadSecureSettings({\n secure_settings_password: \"keystore-password\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.reload_secure_settings(\n body: {\n \"secure_settings_password\": \"keystore-password\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->reloadSecureSettings([\n \"body\" => [\n \"secure_settings_password\" => \"keystore-password\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"secure_settings_password\":\"keystore-password\"}' \"$ELASTICSEARCH_URL/_nodes/reload_secure_settings\"" + }, + { + "lang": "Java", + "source": "client.nodes().reloadSecureSettings(r -> r\n .secureSettingsPassword(\"keystore-password\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -65272,6 +80286,36 @@ ], "x-api": "reload_secure_settings.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _nodes/reload_secure_settings\n{\n \"secure_settings_password\": \"keystore-password\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.nodes.reload_secure_settings(\n secure_settings_password=\"keystore-password\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.reloadSecureSettings({\n secure_settings_password: \"keystore-password\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.reload_secure_settings(\n body: {\n \"secure_settings_password\": \"keystore-password\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->reloadSecureSettings([\n \"body\" => [\n \"secure_settings_password\" => \"keystore-password\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"secure_settings_password\":\"keystore-password\"}' \"$ELASTICSEARCH_URL/_nodes/reload_secure_settings\"" + }, + { + "lang": "Java", + "source": "client.nodes().reloadSecureSettings(r -> r\n .secureSettingsPassword(\"keystore-password\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -65404,6 +80448,36 @@ ], "x-api": "stats.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/stats/process?filter_path=**.max_file_descriptors\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.stats(\n metric=\"process\",\n filter_path=\"**.max_file_descriptors\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.stats({\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.stats(\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->stats([\n \"metric\" => \"process\",\n \"filter_path\" => \"**.max_file_descriptors\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/stats/process?filter_path=**.max_file_descriptors\"" + }, + { + "lang": "Java", + "source": "client.nodes().stats(s -> s\n .metric(\"process\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -65547,6 +80621,36 @@ ], "x-api": "stats.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/stats/process?filter_path=**.max_file_descriptors\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.stats(\n metric=\"process\",\n filter_path=\"**.max_file_descriptors\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.stats({\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.stats(\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->stats([\n \"metric\" => \"process\",\n \"filter_path\" => \"**.max_file_descriptors\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/stats/process?filter_path=**.max_file_descriptors\"" + }, + { + "lang": "Java", + "source": "client.nodes().stats(s -> s\n .metric(\"process\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -65567,7 +80671,7 @@ { "in": "path", "name": "metric", - "description": "Limits the information returned to the specific metrics.", + "description": "Limits the information returned to the specific metrics.\n\nSupported values include: `_all`, `_none`, `indices`, `os`, `process`, `jvm`, `thread_pool`, `fs`, `transport`, `http`, `breaker`, `script`, `discovery`, `ingest`, `adaptive_selection`, `script_cache`, `indexing_pressure`, `repositories`, `allocations`\n\n", "required": true, "deprecated": false, "schema": { @@ -65690,6 +80794,36 @@ ], "x-api": "stats.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/stats/process?filter_path=**.max_file_descriptors\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.stats(\n metric=\"process\",\n filter_path=\"**.max_file_descriptors\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.stats({\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.stats(\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->stats([\n \"metric\" => \"process\",\n \"filter_path\" => \"**.max_file_descriptors\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/stats/process?filter_path=**.max_file_descriptors\"" + }, + { + "lang": "Java", + "source": "client.nodes().stats(s -> s\n .metric(\"process\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -65721,7 +80855,7 @@ { "in": "path", "name": "metric", - "description": "Limits the information returned to the specific metrics.", + "description": "Limits the information returned to the specific metrics.\n\nSupported values include: `_all`, `_none`, `indices`, `os`, `process`, `jvm`, `thread_pool`, `fs`, `transport`, `http`, `breaker`, `script`, `discovery`, `ingest`, `adaptive_selection`, `script_cache`, `indexing_pressure`, `repositories`, `allocations`\n\n", "required": true, "deprecated": false, "schema": { @@ -65844,6 +80978,36 @@ ], "x-api": "stats.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/stats/process?filter_path=**.max_file_descriptors\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.stats(\n metric=\"process\",\n filter_path=\"**.max_file_descriptors\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.stats({\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.stats(\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->stats([\n \"metric\" => \"process\",\n \"filter_path\" => \"**.max_file_descriptors\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/stats/process?filter_path=**.max_file_descriptors\"" + }, + { + "lang": "Java", + "source": "client.nodes().stats(s -> s\n .metric(\"process\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -65864,7 +81028,7 @@ { "in": "path", "name": "metric", - "description": "Limits the information returned to the specific metrics.", + "description": "Limits the information returned to the specific metrics.\n\nSupported values include: `_all`, `_none`, `indices`, `os`, `process`, `jvm`, `thread_pool`, `fs`, `transport`, `http`, `breaker`, `script`, `discovery`, `ingest`, `adaptive_selection`, `script_cache`, `indexing_pressure`, `repositories`, `allocations`\n\n", "required": true, "deprecated": false, "schema": { @@ -65875,7 +81039,7 @@ { "in": "path", "name": "index_metric", - "description": "Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.", + "description": "Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.\n\nSupported values include: `_all`, `store`, `indexing`, `get`, `search`, `merge`, `flush`, `refresh`, `query_cache`, `fielddata`, `docs`, `warmer`, `completion`, `segments`, `translog`, `request_cache`, `recovery`, `bulk`, `shard_stats`, `mappings`, `dense_vector`, `sparse_vector`\n\n", "required": true, "deprecated": false, "schema": { @@ -65998,6 +81162,36 @@ ], "x-api": "stats.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/stats/process?filter_path=**.max_file_descriptors\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.stats(\n metric=\"process\",\n filter_path=\"**.max_file_descriptors\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.stats({\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.stats(\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->stats([\n \"metric\" => \"process\",\n \"filter_path\" => \"**.max_file_descriptors\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/stats/process?filter_path=**.max_file_descriptors\"" + }, + { + "lang": "Java", + "source": "client.nodes().stats(s -> s\n .metric(\"process\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66029,7 +81223,7 @@ { "in": "path", "name": "metric", - "description": "Limits the information returned to the specific metrics.", + "description": "Limits the information returned to the specific metrics.\n\nSupported values include: `_all`, `_none`, `indices`, `os`, `process`, `jvm`, `thread_pool`, `fs`, `transport`, `http`, `breaker`, `script`, `discovery`, `ingest`, `adaptive_selection`, `script_cache`, `indexing_pressure`, `repositories`, `allocations`\n\n", "required": true, "deprecated": false, "schema": { @@ -66040,7 +81234,7 @@ { "in": "path", "name": "index_metric", - "description": "Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.", + "description": "Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.\n\nSupported values include: `_all`, `store`, `indexing`, `get`, `search`, `merge`, `flush`, `refresh`, `query_cache`, `fielddata`, `docs`, `warmer`, `completion`, `segments`, `translog`, `request_cache`, `recovery`, `bulk`, `shard_stats`, `mappings`, `dense_vector`, `sparse_vector`\n\n", "required": true, "deprecated": false, "schema": { @@ -66163,6 +81357,36 @@ ], "x-api": "stats.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/stats/process?filter_path=**.max_file_descriptors\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.stats(\n metric=\"process\",\n filter_path=\"**.max_file_descriptors\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.stats({\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.stats(\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->stats([\n \"metric\" => \"process\",\n \"filter_path\" => \"**.max_file_descriptors\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/stats/process?filter_path=**.max_file_descriptors\"" + }, + { + "lang": "Java", + "source": "client.nodes().stats(s -> s\n .metric(\"process\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66211,6 +81435,36 @@ ], "x-api": "usage.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/usage\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.usage()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.usage();" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.usage" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->usage();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/usage\"" + }, + { + "lang": "Java", + "source": "client.nodes().usage(u -> u);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66270,6 +81524,36 @@ ], "x-api": "usage.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/usage\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.usage()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.usage();" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.usage" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->usage();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/usage\"" + }, + { + "lang": "Java", + "source": "client.nodes().usage(u -> u);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66289,7 +81573,7 @@ { "in": "path", "name": "metric", - "description": "Limits the information returned to the specific metrics.\nA comma-separated list of the following options: `_all`, `rest_actions`, `aggregations`.", + "description": "Limits the information returned to the specific metrics.\nA comma-separated list of the following options: `_all`, `rest_actions`, `aggregations`.\n\nSupported values include: `_all`, `rest_actions`, `aggregations`\n\n", "required": true, "deprecated": false, "schema": { @@ -66329,6 +81613,36 @@ ], "x-api": "usage.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/usage\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.usage()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.usage();" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.usage" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->usage();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/usage\"" + }, + { + "lang": "Java", + "source": "client.nodes().usage(u -> u);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66359,7 +81673,7 @@ { "in": "path", "name": "metric", - "description": "Limits the information returned to the specific metrics.\nA comma-separated list of the following options: `_all`, `rest_actions`, `aggregations`.", + "description": "Limits the information returned to the specific metrics.\nA comma-separated list of the following options: `_all`, `rest_actions`, `aggregations`.\n\nSupported values include: `_all`, `rest_actions`, `aggregations`\n\n", "required": true, "deprecated": false, "schema": { @@ -66399,6 +81713,36 @@ ], "x-api": "usage.nodes", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _nodes/usage\n" + }, + { + "lang": "Python", + "source": "resp = client.nodes.usage()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.nodes.usage();" + }, + { + "lang": "Ruby", + "source": "response = client.nodes.usage" + }, + { + "lang": "PHP", + "source": "$resp = $client->nodes()->usage();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/usage\"" + }, + { + "lang": "Java", + "source": "client.nodes().usage(u -> u);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66471,7 +81815,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -66566,6 +81910,36 @@ ], "x-api": "open_point_in_time", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true\n" + }, + { + "lang": "Python", + "source": "resp = client.open_point_in_time(\n index=\"my-index-000001\",\n keep_alive=\"1m\",\n allow_partial_search_results=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.openPointInTime({\n index: \"my-index-000001\",\n keep_alive: \"1m\",\n allow_partial_search_results: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.open_point_in_time(\n index: \"my-index-000001\",\n keep_alive: \"1m\",\n allow_partial_search_results: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->openPointInTime([\n \"index\" => \"my-index-000001\",\n \"keep_alive\" => \"1m\",\n \"allow_partial_search_results\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true\"" + }, + { + "lang": "Java", + "source": "client.openPointInTime(o -> o\n .allowPartialSearchResults(true)\n .index(\"my-index-000001\")\n .keepAlive(k -> k\n .offset(1)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66697,6 +82071,32 @@ ], "x-api": "put_script", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _scripts/my-search-template\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.put_script(\n id=\"my-search-template\",\n script={\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.putScript({\n id: \"my-search-template\",\n script: {\n lang: \"mustache\",\n source: {\n query: {\n match: {\n message: \"{{query_string}}\",\n },\n },\n from: \"{{from}}\",\n size: \"{{size}}\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.put_script(\n id: \"my-search-template\",\n body: {\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->putScript([\n \"id\" => \"my-search-template\",\n \"body\" => [\n \"script\" => [\n \"lang\" => \"mustache\",\n \"source\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"{{query_string}}\",\n ],\n ],\n \"from\" => \"{{from}}\",\n \"size\" => \"{{size}}\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"lang\":\"mustache\",\"source\":{\"query\":{\"match\":{\"message\":\"{{query_string}}\"}},\"from\":\"{{from}}\",\"size\":\"{{size}}\"}}}' \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66826,6 +82226,32 @@ ], "x-api": "put_script", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _scripts/my-search-template\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.put_script(\n id=\"my-search-template\",\n script={\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.putScript({\n id: \"my-search-template\",\n script: {\n lang: \"mustache\",\n source: {\n query: {\n match: {\n message: \"{{query_string}}\",\n },\n },\n from: \"{{from}}\",\n size: \"{{size}}\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.put_script(\n id: \"my-search-template\",\n body: {\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->putScript([\n \"id\" => \"my-search-template\",\n \"body\" => [\n \"script\" => [\n \"lang\" => \"mustache\",\n \"source\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"{{query_string}}\",\n ],\n ],\n \"from\" => \"{{from}}\",\n \"size\" => \"{{size}}\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"lang\":\"mustache\",\"source\":{\"query\":{\"match\":{\"message\":\"{{query_string}}\"}},\"from\":\"{{from}}\",\"size\":\"{{size}}\"}}}' \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -66898,6 +82324,36 @@ ], "x-api": "get_rule.query_rules", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _query_rules/my-ruleset/_rule/my-rule1\n" + }, + { + "lang": "Python", + "source": "resp = client.query_rules.get_rule(\n ruleset_id=\"my-ruleset\",\n rule_id=\"my-rule1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.queryRules.getRule({\n ruleset_id: \"my-ruleset\",\n rule_id: \"my-rule1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.query_rules.get_rule(\n ruleset_id: \"my-ruleset\",\n rule_id: \"my-rule1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->queryRules()->getRule([\n \"ruleset_id\" => \"my-ruleset\",\n \"rule_id\" => \"my-rule1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/_rule/my-rule1\"" + }, + { + "lang": "Java", + "source": "client.queryRules().getRule(g -> g\n .ruleId(\"my-rule1\")\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67030,6 +82486,36 @@ ], "x-api": "put_rule.query_rules", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _query_rules/my-ruleset/_test\n{\n \"match_criteria\": {\n \"query_string\": \"puggles\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.query_rules.test(\n ruleset_id=\"my-ruleset\",\n match_criteria={\n \"query_string\": \"puggles\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.queryRules.test({\n ruleset_id: \"my-ruleset\",\n match_criteria: {\n query_string: \"puggles\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.query_rules.test(\n ruleset_id: \"my-ruleset\",\n body: {\n \"match_criteria\": {\n \"query_string\": \"puggles\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->queryRules()->test([\n \"ruleset_id\" => \"my-ruleset\",\n \"body\" => [\n \"match_criteria\" => [\n \"query_string\" => \"puggles\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"match_criteria\":{\"query_string\":\"puggles\"}}' \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/_test\"" + }, + { + "lang": "Java", + "source": "client.queryRules().test(t -> t\n .matchCriteria(\"query_string\", JsonData.fromJson(\"\\\"puggles\\\"\"))\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67094,6 +82580,36 @@ ], "x-api": "delete_rule.query_rules", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _query_rules/my-ruleset/_rule/my-rule1\n" + }, + { + "lang": "Python", + "source": "resp = client.query_rules.delete_rule(\n ruleset_id=\"my-ruleset\",\n rule_id=\"my-rule1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.queryRules.deleteRule({\n ruleset_id: \"my-ruleset\",\n rule_id: \"my-rule1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.query_rules.delete_rule(\n ruleset_id: \"my-ruleset\",\n rule_id: \"my-rule1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->queryRules()->deleteRule([\n \"ruleset_id\" => \"my-ruleset\",\n \"rule_id\" => \"my-rule1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/_rule/my-rule1\"" + }, + { + "lang": "Java", + "source": "client.queryRules().deleteRule(d -> d\n .ruleId(\"my-rule1\")\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67155,6 +82671,36 @@ ], "x-api": "get_ruleset.query_rules", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _query_rules/my-ruleset/\n" + }, + { + "lang": "Python", + "source": "resp = client.query_rules.get_ruleset(\n ruleset_id=\"my-ruleset\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.queryRules.getRuleset({\n ruleset_id: \"my-ruleset\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.query_rules.get_ruleset(\n ruleset_id: \"my-ruleset\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->queryRules()->getRuleset([\n \"ruleset_id\" => \"my-ruleset\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/\"" + }, + { + "lang": "Java", + "source": "client.queryRules().getRuleset(g -> g\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67254,6 +82800,36 @@ ], "x-api": "put_ruleset.query_rules", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _query_rules/my-ruleset\n{\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [ \"pugs\", \"puggles\" ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [ \"us\" ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [ \"rescue dogs\" ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.query_rules.put_ruleset(\n ruleset_id=\"my-ruleset\",\n rules=[\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [\n \"us\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"rescue dogs\"\n ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.queryRules.putRuleset({\n ruleset_id: \"my-ruleset\",\n rules: [\n {\n rule_id: \"my-rule1\",\n type: \"pinned\",\n criteria: [\n {\n type: \"contains\",\n metadata: \"user_query\",\n values: [\"pugs\", \"puggles\"],\n },\n {\n type: \"exact\",\n metadata: \"user_country\",\n values: [\"us\"],\n },\n ],\n actions: {\n ids: [\"id1\", \"id2\"],\n },\n },\n {\n rule_id: \"my-rule2\",\n type: \"pinned\",\n criteria: [\n {\n type: \"fuzzy\",\n metadata: \"user_query\",\n values: [\"rescue dogs\"],\n },\n ],\n actions: {\n docs: [\n {\n _index: \"index1\",\n _id: \"id3\",\n },\n {\n _index: \"index2\",\n _id: \"id4\",\n },\n ],\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.query_rules.put_ruleset(\n ruleset_id: \"my-ruleset\",\n body: {\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [\n \"us\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"rescue dogs\"\n ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->queryRules()->putRuleset([\n \"ruleset_id\" => \"my-ruleset\",\n \"body\" => [\n \"rules\" => array(\n [\n \"rule_id\" => \"my-rule1\",\n \"type\" => \"pinned\",\n \"criteria\" => array(\n [\n \"type\" => \"contains\",\n \"metadata\" => \"user_query\",\n \"values\" => array(\n \"pugs\",\n \"puggles\",\n ),\n ],\n [\n \"type\" => \"exact\",\n \"metadata\" => \"user_country\",\n \"values\" => array(\n \"us\",\n ),\n ],\n ),\n \"actions\" => [\n \"ids\" => array(\n \"id1\",\n \"id2\",\n ),\n ],\n ],\n [\n \"rule_id\" => \"my-rule2\",\n \"type\" => \"pinned\",\n \"criteria\" => array(\n [\n \"type\" => \"fuzzy\",\n \"metadata\" => \"user_query\",\n \"values\" => array(\n \"rescue dogs\",\n ),\n ],\n ),\n \"actions\" => [\n \"docs\" => array(\n [\n \"_index\" => \"index1\",\n \"_id\" => \"id3\",\n ],\n [\n \"_index\" => \"index2\",\n \"_id\" => \"id4\",\n ],\n ),\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"rules\":[{\"rule_id\":\"my-rule1\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"contains\",\"metadata\":\"user_query\",\"values\":[\"pugs\",\"puggles\"]},{\"type\":\"exact\",\"metadata\":\"user_country\",\"values\":[\"us\"]}],\"actions\":{\"ids\":[\"id1\",\"id2\"]}},{\"rule_id\":\"my-rule2\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"fuzzy\",\"metadata\":\"user_query\",\"values\":[\"rescue dogs\"]}],\"actions\":{\"docs\":[{\"_index\":\"index1\",\"_id\":\"id3\"},{\"_index\":\"index2\",\"_id\":\"id4\"}]}}]}' \"$ELASTICSEARCH_URL/_query_rules/my-ruleset\"" + }, + { + "lang": "Java", + "source": "client.queryRules().putRuleset(p -> p\n .rules(List.of(QueryRule.queryRuleOf(q -> q\n .ruleId(\"my-rule1\")\n .type(QueryRuleType.Pinned)\n .criteria(List.of(QueryRuleCriteria.of(qu -> qu\n .type(QueryRuleCriteriaType.Contains)\n .metadata(\"user_query\")\n .values(List.of(JsonData.fromJson(\"\\\"pugs\\\"\"),JsonData.fromJson(\"\\\"puggles\\\"\")))\n ),QueryRuleCriteria.of(qu -> qu\n .type(QueryRuleCriteriaType.Exact)\n .metadata(\"user_country\")\n .values(JsonData.fromJson(\"\\\"us\\\"\"))\n )))\n .actions(a -> a\n .ids(List.of(\"id1\",\"id2\"))\n )\n ),QueryRule.queryRuleOf(q -> q\n .ruleId(\"my-rule2\")\n .type(QueryRuleType.Pinned)\n .criteria(c -> c\n .type(QueryRuleCriteriaType.Fuzzy)\n .metadata(\"user_query\")\n .values(JsonData.fromJson(\"\\\"rescue dogs\\\"\"))\n )\n .actions(a -> a\n .docs(List.of(PinnedDoc.of(pi -> pi\n .id(\"id3\")\n .index(\"index1\")\n ),PinnedDoc.of(pi -> pi\n .id(\"id4\")\n .index(\"index2\")\n )))\n )\n )))\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67307,6 +82883,36 @@ ], "x-api": "delete_ruleset.query_rules", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _query_rules/my-ruleset/\n" + }, + { + "lang": "Python", + "source": "resp = client.query_rules.delete_ruleset(\n ruleset_id=\"my-ruleset\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.queryRules.deleteRuleset({\n ruleset_id: \"my-ruleset\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.query_rules.delete_ruleset(\n ruleset_id: \"my-ruleset\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->queryRules()->deleteRuleset([\n \"ruleset_id\" => \"my-ruleset\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/\"" + }, + { + "lang": "Java", + "source": "client.queryRules().deleteRuleset(d -> d\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67392,6 +82998,36 @@ ], "x-api": "list_rulesets.query_rules", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _query_rules/?from=0&size=3\n" + }, + { + "lang": "Python", + "source": "resp = client.query_rules.list_rulesets(\n from=\"0\",\n size=\"3\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.queryRules.listRulesets({\n from: 0,\n size: 3,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.query_rules.list_rulesets(\n from: \"0\",\n size: \"3\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->queryRules()->listRulesets([\n \"from\" => \"0\",\n \"size\" => \"3\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/?from=0&size=3\"" + }, + { + "lang": "Java", + "source": "client.queryRules().listRulesets(l -> l\n .from(0)\n .size(3)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67491,6 +83127,36 @@ ], "x-api": "test.query_rules", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _query_rules/my-ruleset\n{\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [ \"pugs\", \"puggles\" ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [ \"us\" ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [ \"rescue dogs\" ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.query_rules.put_ruleset(\n ruleset_id=\"my-ruleset\",\n rules=[\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [\n \"us\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"rescue dogs\"\n ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.queryRules.putRuleset({\n ruleset_id: \"my-ruleset\",\n rules: [\n {\n rule_id: \"my-rule1\",\n type: \"pinned\",\n criteria: [\n {\n type: \"contains\",\n metadata: \"user_query\",\n values: [\"pugs\", \"puggles\"],\n },\n {\n type: \"exact\",\n metadata: \"user_country\",\n values: [\"us\"],\n },\n ],\n actions: {\n ids: [\"id1\", \"id2\"],\n },\n },\n {\n rule_id: \"my-rule2\",\n type: \"pinned\",\n criteria: [\n {\n type: \"fuzzy\",\n metadata: \"user_query\",\n values: [\"rescue dogs\"],\n },\n ],\n actions: {\n docs: [\n {\n _index: \"index1\",\n _id: \"id3\",\n },\n {\n _index: \"index2\",\n _id: \"id4\",\n },\n ],\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.query_rules.put_ruleset(\n ruleset_id: \"my-ruleset\",\n body: {\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [\n \"us\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"rescue dogs\"\n ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->queryRules()->putRuleset([\n \"ruleset_id\" => \"my-ruleset\",\n \"body\" => [\n \"rules\" => array(\n [\n \"rule_id\" => \"my-rule1\",\n \"type\" => \"pinned\",\n \"criteria\" => array(\n [\n \"type\" => \"contains\",\n \"metadata\" => \"user_query\",\n \"values\" => array(\n \"pugs\",\n \"puggles\",\n ),\n ],\n [\n \"type\" => \"exact\",\n \"metadata\" => \"user_country\",\n \"values\" => array(\n \"us\",\n ),\n ],\n ),\n \"actions\" => [\n \"ids\" => array(\n \"id1\",\n \"id2\",\n ),\n ],\n ],\n [\n \"rule_id\" => \"my-rule2\",\n \"type\" => \"pinned\",\n \"criteria\" => array(\n [\n \"type\" => \"fuzzy\",\n \"metadata\" => \"user_query\",\n \"values\" => array(\n \"rescue dogs\",\n ),\n ],\n ),\n \"actions\" => [\n \"docs\" => array(\n [\n \"_index\" => \"index1\",\n \"_id\" => \"id3\",\n ],\n [\n \"_index\" => \"index2\",\n \"_id\" => \"id4\",\n ],\n ),\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"rules\":[{\"rule_id\":\"my-rule1\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"contains\",\"metadata\":\"user_query\",\"values\":[\"pugs\",\"puggles\"]},{\"type\":\"exact\",\"metadata\":\"user_country\",\"values\":[\"us\"]}],\"actions\":{\"ids\":[\"id1\",\"id2\"]}},{\"rule_id\":\"my-rule2\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"fuzzy\",\"metadata\":\"user_query\",\"values\":[\"rescue dogs\"]}],\"actions\":{\"docs\":[{\"_index\":\"index1\",\"_id\":\"id3\"},{\"_index\":\"index2\",\"_id\":\"id4\"}]}}]}' \"$ELASTICSEARCH_URL/_query_rules/my-ruleset\"" + }, + { + "lang": "Java", + "source": "client.queryRules().putRuleset(p -> p\n .rules(List.of(QueryRule.queryRuleOf(q -> q\n .ruleId(\"my-rule1\")\n .type(QueryRuleType.Pinned)\n .criteria(List.of(QueryRuleCriteria.of(qu -> qu\n .type(QueryRuleCriteriaType.Contains)\n .metadata(\"user_query\")\n .values(List.of(JsonData.fromJson(\"\\\"pugs\\\"\"),JsonData.fromJson(\"\\\"puggles\\\"\")))\n ),QueryRuleCriteria.of(qu -> qu\n .type(QueryRuleCriteriaType.Exact)\n .metadata(\"user_country\")\n .values(JsonData.fromJson(\"\\\"us\\\"\"))\n )))\n .actions(a -> a\n .ids(List.of(\"id1\",\"id2\"))\n )\n ),QueryRule.queryRuleOf(q -> q\n .ruleId(\"my-rule2\")\n .type(QueryRuleType.Pinned)\n .criteria(c -> c\n .type(QueryRuleCriteriaType.Fuzzy)\n .metadata(\"user_query\")\n .values(JsonData.fromJson(\"\\\"rescue dogs\\\"\"))\n )\n .actions(a -> a\n .docs(List.of(PinnedDoc.of(pi -> pi\n .id(\"id3\")\n .index(\"index1\")\n ),PinnedDoc.of(pi -> pi\n .id(\"id4\")\n .index(\"index2\")\n )))\n )\n )))\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67521,7 +83187,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -67541,7 +83207,7 @@ { "in": "query", "name": "search_type", - "description": "Search operation type", + "description": "Search operation type\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -67631,6 +83297,36 @@ ], "x-api": "rank_eval", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {} } },\n \"ratings\": []\n } ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.rank_eval(\n index=\"my-index-000001\",\n requests=[\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n metric={\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": False\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rankEval({\n index: \"my-index-000001\",\n requests: [\n {\n id: \"JFK query\",\n request: {\n query: {\n match_all: {},\n },\n },\n ratings: [],\n },\n ],\n metric: {\n precision: {\n k: 20,\n relevant_rating_threshold: 1,\n ignore_unlabeled: false,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rank_eval(\n index: \"my-index-000001\",\n body: {\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rankEval([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"requests\" => array(\n [\n \"id\" => \"JFK query\",\n \"request\" => [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n \"ratings\" => array(\n ),\n ],\n ),\n \"metric\" => [\n \"precision\" => [\n \"k\" => 20,\n \"relevant_rating_threshold\" => 1,\n \"ignore_unlabeled\" => false,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"requests\":[{\"id\":\"JFK query\",\"request\":{\"query\":{\"match_all\":{}}},\"ratings\":[]}],\"metric\":{\"precision\":{\"k\":20,\"relevant_rating_threshold\":1,\"ignore_unlabeled\":false}}}' \"$ELASTICSEARCH_URL/my-index-000001/_rank_eval\"" + }, + { + "lang": "Java", + "source": "client.rankEval(r -> r\n .index(\"my-index-000001\")\n .metric(m -> m\n .precision(p -> p\n .ignoreUnlabeled(false)\n .relevantRatingThreshold(1)\n .k(20)\n )\n )\n .requests(re -> re\n .id(\"JFK query\")\n .request(req -> req\n .query(q -> q\n .matchAll(m -> m)\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67659,7 +83355,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -67679,7 +83375,7 @@ { "in": "query", "name": "search_type", - "description": "Search operation type", + "description": "Search operation type\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -67769,6 +83465,36 @@ ], "x-api": "rank_eval", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {} } },\n \"ratings\": []\n } ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.rank_eval(\n index=\"my-index-000001\",\n requests=[\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n metric={\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": False\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rankEval({\n index: \"my-index-000001\",\n requests: [\n {\n id: \"JFK query\",\n request: {\n query: {\n match_all: {},\n },\n },\n ratings: [],\n },\n ],\n metric: {\n precision: {\n k: 20,\n relevant_rating_threshold: 1,\n ignore_unlabeled: false,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rank_eval(\n index: \"my-index-000001\",\n body: {\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rankEval([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"requests\" => array(\n [\n \"id\" => \"JFK query\",\n \"request\" => [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n \"ratings\" => array(\n ),\n ],\n ),\n \"metric\" => [\n \"precision\" => [\n \"k\" => 20,\n \"relevant_rating_threshold\" => 1,\n \"ignore_unlabeled\" => false,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"requests\":[{\"id\":\"JFK query\",\"request\":{\"query\":{\"match_all\":{}}},\"ratings\":[]}],\"metric\":{\"precision\":{\"k\":20,\"relevant_rating_threshold\":1,\"ignore_unlabeled\":false}}}' \"$ELASTICSEARCH_URL/my-index-000001/_rank_eval\"" + }, + { + "lang": "Java", + "source": "client.rankEval(r -> r\n .index(\"my-index-000001\")\n .metric(m -> m\n .precision(p -> p\n .ignoreUnlabeled(false)\n .relevantRatingThreshold(1)\n .k(20)\n )\n )\n .requests(re -> re\n .id(\"JFK query\")\n .request(req -> req\n .query(q -> q\n .matchAll(m -> m)\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67810,7 +83536,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -67830,7 +83556,7 @@ { "in": "query", "name": "search_type", - "description": "Search operation type", + "description": "Search operation type\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -67920,6 +83646,36 @@ ], "x-api": "rank_eval", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {} } },\n \"ratings\": []\n } ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.rank_eval(\n index=\"my-index-000001\",\n requests=[\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n metric={\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": False\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rankEval({\n index: \"my-index-000001\",\n requests: [\n {\n id: \"JFK query\",\n request: {\n query: {\n match_all: {},\n },\n },\n ratings: [],\n },\n ],\n metric: {\n precision: {\n k: 20,\n relevant_rating_threshold: 1,\n ignore_unlabeled: false,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rank_eval(\n index: \"my-index-000001\",\n body: {\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rankEval([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"requests\" => array(\n [\n \"id\" => \"JFK query\",\n \"request\" => [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n \"ratings\" => array(\n ),\n ],\n ),\n \"metric\" => [\n \"precision\" => [\n \"k\" => 20,\n \"relevant_rating_threshold\" => 1,\n \"ignore_unlabeled\" => false,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"requests\":[{\"id\":\"JFK query\",\"request\":{\"query\":{\"match_all\":{}}},\"ratings\":[]}],\"metric\":{\"precision\":{\"k\":20,\"relevant_rating_threshold\":1,\"ignore_unlabeled\":false}}}' \"$ELASTICSEARCH_URL/my-index-000001/_rank_eval\"" + }, + { + "lang": "Java", + "source": "client.rankEval(r -> r\n .index(\"my-index-000001\")\n .metric(m -> m\n .precision(p -> p\n .ignoreUnlabeled(false)\n .relevantRatingThreshold(1)\n .k(20)\n )\n )\n .requests(re -> re\n .id(\"JFK query\")\n .request(req -> req\n .query(q -> q\n .matchAll(m -> m)\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -67959,7 +83715,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -67979,7 +83735,7 @@ { "in": "query", "name": "search_type", - "description": "Search operation type", + "description": "Search operation type\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -68069,6 +83825,36 @@ ], "x-api": "rank_eval", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {} } },\n \"ratings\": []\n } ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.rank_eval(\n index=\"my-index-000001\",\n requests=[\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n metric={\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": False\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rankEval({\n index: \"my-index-000001\",\n requests: [\n {\n id: \"JFK query\",\n request: {\n query: {\n match_all: {},\n },\n },\n ratings: [],\n },\n ],\n metric: {\n precision: {\n k: 20,\n relevant_rating_threshold: 1,\n ignore_unlabeled: false,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rank_eval(\n index: \"my-index-000001\",\n body: {\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rankEval([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"requests\" => array(\n [\n \"id\" => \"JFK query\",\n \"request\" => [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n \"ratings\" => array(\n ),\n ],\n ),\n \"metric\" => [\n \"precision\" => [\n \"k\" => 20,\n \"relevant_rating_threshold\" => 1,\n \"ignore_unlabeled\" => false,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"requests\":[{\"id\":\"JFK query\",\"request\":{\"query\":{\"match_all\":{}}},\"ratings\":[]}],\"metric\":{\"precision\":{\"k\":20,\"relevant_rating_threshold\":1,\"ignore_unlabeled\":false}}}' \"$ELASTICSEARCH_URL/my-index-000001/_rank_eval\"" + }, + { + "lang": "Java", + "source": "client.rankEval(r -> r\n .index(\"my-index-000001\")\n .metric(m -> m\n .precision(p -> p\n .ignoreUnlabeled(false)\n .relevantRatingThreshold(1)\n .k(20)\n )\n )\n .requests(re -> re\n .id(\"JFK query\")\n .request(req -> req\n .query(q -> q\n .matchAll(m -> m)\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -68188,7 +83974,7 @@ "type": "object", "properties": { "conflicts": { - "description": "Indicates whether to continue reindexing even when there are conflicts.", + "description": "Indicates whether to continue reindexing even when there are conflicts.\n\nSupported values include:\n - `abort`: Stop reindexing if there are conflicts.\n - `proceed`: Continue reindexing even if there are conflicts.\n\n", "default": "abort", "allOf": [ { @@ -68416,6 +84202,36 @@ ], "x-api": "reindex", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _reindex\n{\n \"source\": {\n \"index\": [\"my-index-000001\", \"my-index-000002\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000002\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.reindex(\n source={\n \"index\": [\n \"my-index-000001\",\n \"my-index-000002\"\n ]\n },\n dest={\n \"index\": \"my-new-index-000002\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.reindex({\n source: {\n index: [\"my-index-000001\", \"my-index-000002\"],\n },\n dest: {\n index: \"my-new-index-000002\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": [\n \"my-index-000001\",\n \"my-index-000002\"\n ]\n },\n \"dest\": {\n \"index\": \"my-new-index-000002\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => array(\n \"my-index-000001\",\n \"my-index-000002\",\n ),\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000002\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":[\"my-index-000001\",\"my-index-000002\"]},\"dest\":{\"index\":\"my-new-index-000002\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + }, + { + "lang": "Java", + "source": "client.reindex(r -> r\n .dest(d -> d\n .index(\"my-new-index-000002\")\n )\n .source(s -> s\n .index(List.of(\"my-index-000001\",\"my-index-000002\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -68485,6 +84301,36 @@ ], "x-api": "reindex_rethrottle", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\n" + }, + { + "lang": "Python", + "source": "resp = client.reindex_rethrottle(\n task_id=\"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second=\"-1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.reindexRethrottle({\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.reindex_rethrottle(\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->reindexRethrottle([\n \"task_id\" => \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n \"requests_per_second\" => \"-1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\"" + }, + { + "lang": "Java", + "source": "client.reindexRethrottle(r -> r\n .requestsPerSecond(-1.0F)\n .taskId(\"r1A2WoRbTwKZ516z6NEs5A:36619\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -68578,6 +84424,36 @@ ], "x-api": "render_search_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _render/template\n{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.render_search_template(\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.renderSearchTemplate({\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 20,\n size: 10,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.render_search_template(\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->renderSearchTemplate([\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 20,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":20,\"size\":10}}' \"$ELASTICSEARCH_URL/_render/template\"" + }, + { + "lang": "Java", + "source": "client.renderSearchTemplate(r -> r\n .id(\"my-search-template\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"20\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -68669,6 +84545,36 @@ ], "x-api": "render_search_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _render/template\n{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.render_search_template(\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.renderSearchTemplate({\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 20,\n size: 10,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.render_search_template(\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->renderSearchTemplate([\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 20,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":20,\"size\":10}}' \"$ELASTICSEARCH_URL/_render/template\"" + }, + { + "lang": "Java", + "source": "client.renderSearchTemplate(r -> r\n .id(\"my-search-template\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"20\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -68775,6 +84681,36 @@ ], "x-api": "render_search_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _render/template\n{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.render_search_template(\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.renderSearchTemplate({\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 20,\n size: 10,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.render_search_template(\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->renderSearchTemplate([\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 20,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":20,\"size\":10}}' \"$ELASTICSEARCH_URL/_render/template\"" + }, + { + "lang": "Java", + "source": "client.renderSearchTemplate(r -> r\n .id(\"my-search-template\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"20\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -68879,6 +84815,36 @@ ], "x-api": "render_search_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _render/template\n{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.render_search_template(\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.renderSearchTemplate({\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 20,\n size: 10,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.render_search_template(\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->renderSearchTemplate([\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 20,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":20,\"size\":10}}' \"$ELASTICSEARCH_URL/_render/template\"" + }, + { + "lang": "Java", + "source": "client.renderSearchTemplate(r -> r\n .id(\"my-search-template\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"20\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -68947,6 +84913,36 @@ ], "x-api": "get_jobs.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _rollup/job/sensor\n" + }, + { + "lang": "Python", + "source": "resp = client.rollup.get_jobs(\n id=\"sensor\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.getJobs({\n id: \"sensor\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.get_jobs(\n id: \"sensor\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->getJobs([\n \"id\" => \"sensor\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor\"" + }, + { + "lang": "Java", + "source": "client.rollup().getJobs(g -> g\n .id(\"sensor\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69077,6 +85073,36 @@ ], "x-api": "put_job.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\": 1000,\n \"groups\": {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [ \"node\" ]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [ \"min\", \"max\", \"sum\" ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [ \"avg\" ]\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.rollup.put_job(\n id=\"sensor\",\n index_pattern=\"sensor-*\",\n rollup_index=\"sensor_rollup\",\n cron=\"*/30 * * * * ?\",\n page_size=1000,\n groups={\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\n \"node\"\n ]\n }\n },\n metrics=[\n {\n \"field\": \"temperature\",\n \"metrics\": [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\n \"avg\"\n ]\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.putJob({\n id: \"sensor\",\n index_pattern: \"sensor-*\",\n rollup_index: \"sensor_rollup\",\n cron: \"*/30 * * * * ?\",\n page_size: 1000,\n groups: {\n date_histogram: {\n field: \"timestamp\",\n fixed_interval: \"1h\",\n delay: \"7d\",\n },\n terms: {\n fields: [\"node\"],\n },\n },\n metrics: [\n {\n field: \"temperature\",\n metrics: [\"min\", \"max\", \"sum\"],\n },\n {\n field: \"voltage\",\n metrics: [\"avg\"],\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.put_job(\n id: \"sensor\",\n body: {\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\": 1000,\n \"groups\": {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\n \"node\"\n ]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\n \"avg\"\n ]\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->putJob([\n \"id\" => \"sensor\",\n \"body\" => [\n \"index_pattern\" => \"sensor-*\",\n \"rollup_index\" => \"sensor_rollup\",\n \"cron\" => \"*/30 * * * * ?\",\n \"page_size\" => 1000,\n \"groups\" => [\n \"date_histogram\" => [\n \"field\" => \"timestamp\",\n \"fixed_interval\" => \"1h\",\n \"delay\" => \"7d\",\n ],\n \"terms\" => [\n \"fields\" => array(\n \"node\",\n ),\n ],\n ],\n \"metrics\" => array(\n [\n \"field\" => \"temperature\",\n \"metrics\" => array(\n \"min\",\n \"max\",\n \"sum\",\n ),\n ],\n [\n \"field\" => \"voltage\",\n \"metrics\" => array(\n \"avg\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_pattern\":\"sensor-*\",\"rollup_index\":\"sensor_rollup\",\"cron\":\"*/30 * * * * ?\",\"page_size\":1000,\"groups\":{\"date_histogram\":{\"field\":\"timestamp\",\"fixed_interval\":\"1h\",\"delay\":\"7d\"},\"terms\":{\"fields\":[\"node\"]}},\"metrics\":[{\"field\":\"temperature\",\"metrics\":[\"min\",\"max\",\"sum\"]},{\"field\":\"voltage\",\"metrics\":[\"avg\"]}]}' \"$ELASTICSEARCH_URL/_rollup/job/sensor\"" + }, + { + "lang": "Java", + "source": "client.rollup().putJob(p -> p\n .cron(\"*/30 * * * * ?\")\n .groups(g -> g\n .dateHistogram(d -> d\n .delay(de -> de\n .time(\"7d\")\n )\n .field(\"timestamp\")\n .fixedInterval(f -> f\n .time(\"1h\")\n )\n )\n .terms(t -> t\n .fields(\"node\")\n )\n )\n .id(\"sensor\")\n .indexPattern(\"sensor-*\")\n .metrics(List.of(FieldMetric.of(f -> f\n .field(\"temperature\")\n .metrics(List.of(Metric.Min,Metric.Max,Metric.Sum))\n ),FieldMetric.of(f -> f\n .field(\"voltage\")\n .metrics(Metric.Avg)\n )))\n .pageSize(1000)\n .rollupIndex(\"sensor_rollup\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69146,6 +85172,36 @@ ], "x-api": "delete_job.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _rollup/job/sensor\n" + }, + { + "lang": "Python", + "source": "resp = client.rollup.delete_job(\n id=\"sensor\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.deleteJob({\n id: \"sensor\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.delete_job(\n id: \"sensor\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->deleteJob([\n \"id\" => \"sensor\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor\"" + }, + { + "lang": "Java", + "source": "client.rollup().deleteJob(d -> d\n .id(\"sensor\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69201,6 +85257,36 @@ ], "x-api": "get_jobs.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _rollup/job/sensor\n" + }, + { + "lang": "Python", + "source": "resp = client.rollup.get_jobs(\n id=\"sensor\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.getJobs({\n id: \"sensor\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.get_jobs(\n id: \"sensor\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->getJobs([\n \"id\" => \"sensor\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor\"" + }, + { + "lang": "Java", + "source": "client.rollup().getJobs(g -> g\n .id(\"sensor\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69254,60 +85340,120 @@ "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", "x-variations": [ - "
\n GET\n /_rollup/data/{id}\n
\n " + "
\n GET\n /_rollup/data/{id}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `monitor_rollup`\n" + ], + "x-api": "get_rollup_caps.rollup", + "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _rollup/data/sensor-*\n" + }, + { + "lang": "Python", + "source": "resp = client.rollup.get_rollup_caps(\n id=\"sensor-*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.getRollupCaps({\n id: \"sensor-*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.get_rollup_caps(\n id: \"sensor-*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->getRollupCaps([\n \"id\" => \"sensor-*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/data/sensor-*\"" + }, + { + "lang": "Java", + "source": "client.rollup().getRollupCaps(g -> g\n .id(\"sensor-*\")\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_rollup/data": { + "get": { + "tags": [ + "rollup" + ], + "summary": "Get the rollup job capabilities", + "description": "Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.\n\nThis API is useful because a rollup job is often configured to rollup only a subset of fields from the source index.\nFurthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.\nThis API enables you to inspect an index and determine:\n\n1. Does this index have associated rollup data somewhere in the cluster?\n2. If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?", + "operationId": "rollup-get-rollup-caps-1", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupCapabilities" + } + }, + "examples": { + "GetRollupCapabilitiesResponseExample1": { + "description": "A successful response from `GET _rollup/data/sensor-*` for a rollup job that targets the index pattern `sensor-*`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.\n", + "value": "{\n \"sensor-*\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}" + } + } + } + } + } + }, + "deprecated": true, + "x-state": "Technical preview; Added in 6.3.0", + "x-variations": [ + "
\n GET\n /_rollup/data\n
\n " ], "x-req-auth": [ "Cluster privileges: `monitor_rollup`\n" ], "x-api": "get_rollup_caps.rollup", "x-category": "management", - "x-metaTags": [ + "x-codeSamples": [ { - "content": "Elasticsearch", - "name": "product_name" - } - ] - } - }, - "/_rollup/data": { - "get": { - "tags": [ - "rollup" - ], - "summary": "Get the rollup job capabilities", - "description": "Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.\n\nThis API is useful because a rollup job is often configured to rollup only a subset of fields from the source index.\nFurthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.\nThis API enables you to inspect an index and determine:\n\n1. Does this index have associated rollup data somewhere in the cluster?\n2. If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?", - "operationId": "rollup-get-rollup-caps-1", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/rollup.get_rollup_caps.RollupCapabilities" - } - }, - "examples": { - "GetRollupCapabilitiesResponseExample1": { - "description": "A successful response from `GET _rollup/data/sensor-*` for a rollup job that targets the index pattern `sensor-*`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.\n", - "value": "{\n \"sensor-*\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}" - } - } - } - } + "lang": "Console", + "source": "GET _rollup/data/sensor-*\n" + }, + { + "lang": "Python", + "source": "resp = client.rollup.get_rollup_caps(\n id=\"sensor-*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.getRollupCaps({\n id: \"sensor-*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.get_rollup_caps(\n id: \"sensor-*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->getRollupCaps([\n \"id\" => \"sensor-*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/data/sensor-*\"" + }, + { + "lang": "Java", + "source": "client.rollup().getRollupCaps(g -> g\n .id(\"sensor-*\")\n);\n" } - }, - "deprecated": true, - "x-state": "Technical preview; Added in 6.3.0", - "x-variations": [ - "
\n GET\n /_rollup/data\n
\n " - ], - "x-req-auth": [ - "Cluster privileges: `monitor_rollup`\n" ], - "x-api": "get_rollup_caps.rollup", - "x-category": "management", "x-metaTags": [ { "content": "Elasticsearch", @@ -69368,6 +85514,36 @@ ], "x-api": "get_rollup_index_caps.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /sensor_rollup/_rollup/data\n" + }, + { + "lang": "Python", + "source": "resp = client.rollup.get_rollup_index_caps(\n index=\"sensor_rollup\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.getRollupIndexCaps({\n index: \"sensor_rollup\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.get_rollup_index_caps(\n index: \"sensor_rollup\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->getRollupIndexCaps([\n \"index\" => \"sensor_rollup\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/sensor_rollup/_rollup/data\"" + }, + { + "lang": "Java", + "source": "client.rollup().getRollupIndexCaps(g -> g\n .index(\"sensor_rollup\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69527,6 +85703,36 @@ ], "x-api": "rollup_search.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.rollup.rollup_search(\n index=\"sensor_rollup\",\n size=0,\n aggregations={\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.rollupSearch({\n index: \"sensor_rollup\",\n size: 0,\n aggregations: {\n max_temperature: {\n max: {\n field: \"temperature\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.rollup_search(\n index: \"sensor_rollup\",\n body: {\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->rollupSearch([\n \"index\" => \"sensor_rollup\",\n \"body\" => [\n \"size\" => 0,\n \"aggregations\" => [\n \"max_temperature\" => [\n \"max\" => [\n \"field\" => \"temperature\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"size\":0,\"aggregations\":{\"max_temperature\":{\"max\":{\"field\":\"temperature\"}}}}' \"$ELASTICSEARCH_URL/sensor_rollup/_rollup_search\"" + }, + { + "lang": "Java", + "source": "client.rollup().rollupSearch(r -> r\n .aggregations(\"max_temperature\", a -> a\n .max(m -> m\n .field(\"temperature\")\n )\n )\n .index(\"sensor_rollup\")\n .size(0)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69684,6 +85890,36 @@ ], "x-api": "rollup_search.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.rollup.rollup_search(\n index=\"sensor_rollup\",\n size=0,\n aggregations={\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.rollupSearch({\n index: \"sensor_rollup\",\n size: 0,\n aggregations: {\n max_temperature: {\n max: {\n field: \"temperature\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.rollup_search(\n index: \"sensor_rollup\",\n body: {\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->rollupSearch([\n \"index\" => \"sensor_rollup\",\n \"body\" => [\n \"size\" => 0,\n \"aggregations\" => [\n \"max_temperature\" => [\n \"max\" => [\n \"field\" => \"temperature\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"size\":0,\"aggregations\":{\"max_temperature\":{\"max\":{\"field\":\"temperature\"}}}}' \"$ELASTICSEARCH_URL/sensor_rollup/_rollup_search\"" + }, + { + "lang": "Java", + "source": "client.rollup().rollupSearch(r -> r\n .aggregations(\"max_temperature\", a -> a\n .max(m -> m\n .field(\"temperature\")\n )\n )\n .index(\"sensor_rollup\")\n .size(0)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69749,6 +85985,36 @@ ], "x-api": "start_job.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _rollup/job/sensor/_start\n" + }, + { + "lang": "Python", + "source": "resp = client.rollup.start_job(\n id=\"sensor\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.startJob({\n id: \"sensor\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.start_job(\n id: \"sensor\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->startJob([\n \"id\" => \"sensor\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor/_start\"" + }, + { + "lang": "Java", + "source": "client.rollup().startJob(s -> s\n .id(\"sensor\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69828,6 +86094,36 @@ ], "x-api": "stop_job.rollup", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s\n" + }, + { + "lang": "Python", + "source": "resp = client.rollup.stop_job(\n id=\"sensor\",\n wait_for_completion=True,\n timeout=\"10s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.rollup.stopJob({\n id: \"sensor\",\n wait_for_completion: \"true\",\n timeout: \"10s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.rollup.stop_job(\n id: \"sensor\",\n wait_for_completion: \"true\",\n timeout: \"10s\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->rollup()->stopJob([\n \"id\" => \"sensor\",\n \"wait_for_completion\" => \"true\",\n \"timeout\" => \"10s\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s\"" + }, + { + "lang": "Java", + "source": "client.rollup().stopJob(s -> s\n .id(\"sensor\")\n .timeout(t -> t\n .offset(10)\n )\n .waitForCompletion(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69851,7 +86147,7 @@ "type": "object", "properties": { "context": { - "description": "The context that the script should run in.\nNOTE: Result ordering in the field contexts is not guaranteed.", + "description": "The context that the script should run in.\nNOTE: Result ordering in the field contexts is not guaranteed.\n\nSupported values include:\n - `painless_test`: The default context if no other context is specified.\n - `filter`: Treats scripts as if they were run inside a script query.\n - `score`: Treats scripts as if they were run inside a `script_score` function in a `function_score` query.\n - `boolean_field`: The context for boolean fields. The script returns a `true` or `false` response.\n - `date_field`: The context for date fields. `emit` takes a long value and the script returns a sorted list of dates.\n - `double_field`: The context for double numeric fields. The script returns a sorted list of double values.\n - `geo_point_field`: The context for geo-point fields. `emit` takes two double parameters, the latitude and longitude values, and the script returns an object in GeoJSON format containing the coordinates for the geo point.\n - `ip_field`: The context for `ip` fields. The script returns a sorted list of IP addresses.\n - `keyword_field`: The context for keyword fields. The script returns a sorted list of string values.\n - `long_field`: The context for long numeric fields. The script returns a sorted list of long values.\n - `composite_field`: The context for composite runtime fields. The script returns a map of values.\n\n", "default": "painless_test", "allOf": [ { @@ -69942,6 +86238,36 @@ ], "x-api": "scripts_painless_execute", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_scripts/painless/_execute\n{\n \"script\": {\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100.0,\n \"total\": 1000.0\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.scripts_painless_execute(\n script={\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100,\n \"total\": 1000\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.scriptsPainlessExecute({\n script: {\n source: \"params.count / params.total\",\n params: {\n count: 100,\n total: 1000,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.scripts_painless_execute(\n body: {\n \"script\": {\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100,\n \"total\": 1000\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->scriptsPainlessExecute([\n \"body\" => [\n \"script\" => [\n \"source\" => \"params.count / params.total\",\n \"params\" => [\n \"count\" => 100,\n \"total\" => 1000,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"params.count / params.total\",\"params\":{\"count\":100,\"total\":1000}}}' \"$ELASTICSEARCH_URL/_scripts/painless/_execute\"" + }, + { + "lang": "Java", + "source": "client.scriptsPainlessExecute(s -> s\n .script(sc -> sc\n .source(so -> so\n .scriptString(\"params.count / params.total\")\n )\n .params(Map.of(\"total\", JsonData.fromJson(\"1000\"),\"count\", JsonData.fromJson(\"100\")))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -69963,7 +86289,7 @@ "type": "object", "properties": { "context": { - "description": "The context that the script should run in.\nNOTE: Result ordering in the field contexts is not guaranteed.", + "description": "The context that the script should run in.\nNOTE: Result ordering in the field contexts is not guaranteed.\n\nSupported values include:\n - `painless_test`: The default context if no other context is specified.\n - `filter`: Treats scripts as if they were run inside a script query.\n - `score`: Treats scripts as if they were run inside a `script_score` function in a `function_score` query.\n - `boolean_field`: The context for boolean fields. The script returns a `true` or `false` response.\n - `date_field`: The context for date fields. `emit` takes a long value and the script returns a sorted list of dates.\n - `double_field`: The context for double numeric fields. The script returns a sorted list of double values.\n - `geo_point_field`: The context for geo-point fields. `emit` takes two double parameters, the latitude and longitude values, and the script returns an object in GeoJSON format containing the coordinates for the geo point.\n - `ip_field`: The context for `ip` fields. The script returns a sorted list of IP addresses.\n - `keyword_field`: The context for keyword fields. The script returns a sorted list of string values.\n - `long_field`: The context for long numeric fields. The script returns a sorted list of long values.\n - `composite_field`: The context for composite runtime fields. The script returns a map of values.\n\n", "default": "painless_test", "allOf": [ { @@ -70054,6 +86380,36 @@ ], "x-api": "scripts_painless_execute", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_scripts/painless/_execute\n{\n \"script\": {\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100.0,\n \"total\": 1000.0\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.scripts_painless_execute(\n script={\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100,\n \"total\": 1000\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.scriptsPainlessExecute({\n script: {\n source: \"params.count / params.total\",\n params: {\n count: 100,\n total: 1000,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.scripts_painless_execute(\n body: {\n \"script\": {\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100,\n \"total\": 1000\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->scriptsPainlessExecute([\n \"body\" => [\n \"script\" => [\n \"source\" => \"params.count / params.total\",\n \"params\" => [\n \"count\" => 100,\n \"total\" => 1000,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"params.count / params.total\",\"params\":{\"count\":100,\"total\":1000}}}' \"$ELASTICSEARCH_URL/_scripts/painless/_execute\"" + }, + { + "lang": "Java", + "source": "client.scriptsPainlessExecute(s -> s\n .script(sc -> sc\n .source(so -> so\n .scriptString(\"params.count / params.total\")\n )\n .params(Map.of(\"total\", JsonData.fromJson(\"1000\"),\"count\", JsonData.fromJson(\"100\")))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -70168,7 +86524,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -70288,7 +86644,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates how distributed term frequencies are calculated for relevance scoring.", + "description": "Indicates how distributed term frequencies are calculated for relevance scoring.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -70331,7 +86687,7 @@ { "in": "query", "name": "suggest_mode", - "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SuggestMode" @@ -70875,6 +87231,36 @@ ], "x-api": "search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_search?from=40&size=20\n{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search(\n index=\"my-index-000001\",\n from=\"40\",\n size=\"20\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.search({\n index: \"my-index-000001\",\n from: 40,\n size: 20,\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search(\n index: \"my-index-000001\",\n from: \"40\",\n size: \"20\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->search([\n \"index\" => \"my-index-000001\",\n \"from\" => \"40\",\n \"size\" => \"20\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_search?from=40&size=20\"" + }, + { + "lang": "Java", + "source": "client.search(s -> s\n .from(40)\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .size(20)\n,Void.class);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -70987,7 +87373,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -71107,7 +87493,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates how distributed term frequencies are calculated for relevance scoring.", + "description": "Indicates how distributed term frequencies are calculated for relevance scoring.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -71150,7 +87536,7 @@ { "in": "query", "name": "suggest_mode", - "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SuggestMode" @@ -71694,6 +88080,36 @@ ], "x-api": "search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_search?from=40&size=20\n{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search(\n index=\"my-index-000001\",\n from=\"40\",\n size=\"20\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.search({\n index: \"my-index-000001\",\n from: 40,\n size: 20,\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search(\n index: \"my-index-000001\",\n from: \"40\",\n size: \"20\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->search([\n \"index\" => \"my-index-000001\",\n \"from\" => \"40\",\n \"size\" => \"20\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_search?from=40&size=20\"" + }, + { + "lang": "Java", + "source": "client.search(s -> s\n .from(40)\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .size(20)\n,Void.class);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -71819,7 +88235,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -71939,7 +88355,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates how distributed term frequencies are calculated for relevance scoring.", + "description": "Indicates how distributed term frequencies are calculated for relevance scoring.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -71982,7 +88398,7 @@ { "in": "query", "name": "suggest_mode", - "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SuggestMode" @@ -72526,6 +88942,36 @@ ], "x-api": "search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_search?from=40&size=20\n{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search(\n index=\"my-index-000001\",\n from=\"40\",\n size=\"20\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.search({\n index: \"my-index-000001\",\n from: 40,\n size: 20,\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search(\n index: \"my-index-000001\",\n from: \"40\",\n size: \"20\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->search([\n \"index\" => \"my-index-000001\",\n \"from\" => \"40\",\n \"size\" => \"20\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_search?from=40&size=20\"" + }, + { + "lang": "Java", + "source": "client.search(s -> s\n .from(40)\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .size(20)\n,Void.class);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -72649,7 +89095,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -72769,7 +89215,7 @@ { "in": "query", "name": "search_type", - "description": "Indicates how distributed term frequencies are calculated for relevance scoring.", + "description": "Indicates how distributed term frequencies are calculated for relevance scoring.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -72812,7 +89258,7 @@ { "in": "query", "name": "suggest_mode", - "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.", + "description": "The suggest mode.\nThis parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.\n\nSupported values include:\n - `missing`: Only generate suggestions for terms that are not in the shard.\n - `popular`: Only suggest terms that occur in more docs on the shard than the original term.\n - `always`: Suggest any matching suggestions based on terms in the suggest text.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SuggestMode" @@ -73356,6 +89802,36 @@ ], "x-api": "search", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_search?from=40&size=20\n{\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search(\n index=\"my-index-000001\",\n from=\"40\",\n size=\"20\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.search({\n index: \"my-index-000001\",\n from: 40,\n size: 20,\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search(\n index: \"my-index-000001\",\n from: \"40\",\n size: \"20\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->search([\n \"index\" => \"my-index-000001\",\n \"from\" => \"40\",\n \"size\" => \"20\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_search?from=40&size=20\"" + }, + { + "lang": "Java", + "source": "client.search(s -> s\n .from(40)\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .size(20)\n,Void.class);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73411,6 +89887,36 @@ ], "x-api": "get.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _application/search_application/my-app/\n" + }, + { + "lang": "Python", + "source": "resp = client.search_application.get(\n name=\"my-app\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.get({\n name: \"my-app\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.get(\n name: \"my-app\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->get([\n \"name\" => \"my-app\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/search_application/my-app/\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().get(g -> g\n .name(\"my-app\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73497,6 +90003,36 @@ ], "x-api": "put.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _application/search_application/my-app\n{\n \"indices\": [ \"index1\", \"index2\" ],\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \"type\": \"string\"\n },\n \"default_field\": {\n \"type\": \"string\",\n \"enum\": [\n \"title\",\n \"description\"\n ]\n },\n \"additionalProperties\": false\n },\n \"required\": [\n \"query_string\"\n ]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_application.put(\n name=\"my-app\",\n search_application={\n \"indices\": [\n \"index1\",\n \"index2\"\n ],\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \"type\": \"string\"\n },\n \"default_field\": {\n \"type\": \"string\",\n \"enum\": [\n \"title\",\n \"description\"\n ]\n },\n \"additionalProperties\": False\n },\n \"required\": [\n \"query_string\"\n ]\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.put({\n name: \"my-app\",\n search_application: {\n indices: [\"index1\", \"index2\"],\n template: {\n script: {\n source: {\n query: {\n query_string: {\n query: \"{{query_string}}\",\n default_field: \"{{default_field}}\",\n },\n },\n },\n params: {\n query_string: \"*\",\n default_field: \"*\",\n },\n },\n dictionary: {\n properties: {\n query_string: {\n type: \"string\",\n },\n default_field: {\n type: \"string\",\n enum: [\"title\", \"description\"],\n },\n additionalProperties: false,\n },\n required: [\"query_string\"],\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.put(\n name: \"my-app\",\n body: {\n \"indices\": [\n \"index1\",\n \"index2\"\n ],\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \"type\": \"string\"\n },\n \"default_field\": {\n \"type\": \"string\",\n \"enum\": [\n \"title\",\n \"description\"\n ]\n },\n \"additionalProperties\": false\n },\n \"required\": [\n \"query_string\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->put([\n \"name\" => \"my-app\",\n \"body\" => [\n \"indices\" => array(\n \"index1\",\n \"index2\",\n ),\n \"template\" => [\n \"script\" => [\n \"source\" => [\n \"query\" => [\n \"query_string\" => [\n \"query\" => \"{{query_string}}\",\n \"default_field\" => \"{{default_field}}\",\n ],\n ],\n ],\n \"params\" => [\n \"query_string\" => \"*\",\n \"default_field\" => \"*\",\n ],\n ],\n \"dictionary\" => [\n \"properties\" => [\n \"query_string\" => [\n \"type\" => \"string\",\n ],\n \"default_field\" => [\n \"type\" => \"string\",\n \"enum\" => array(\n \"title\",\n \"description\",\n ),\n ],\n \"additionalProperties\" => false,\n ],\n \"required\" => array(\n \"query_string\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":[\"index1\",\"index2\"],\"template\":{\"script\":{\"source\":{\"query\":{\"query_string\":{\"query\":\"{{query_string}}\",\"default_field\":\"{{default_field}}\"}}},\"params\":{\"query_string\":\"*\",\"default_field\":\"*\"}},\"dictionary\":{\"properties\":{\"query_string\":{\"type\":\"string\"},\"default_field\":{\"type\":\"string\",\"enum\":[\"title\",\"description\"]},\"additionalProperties\":false},\"required\":[\"query_string\"]}}}' \"$ELASTICSEARCH_URL/_application/search_application/my-app\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().put(p -> p\n .name(\"my-app\")\n .searchApplication(s -> s\n .indices(List.of(\"index1\",\"index2\"))\n .template(t -> t\n .script(sc -> sc\n .source(so -> so\n .scriptTemplate(scr -> scr\n .query(q -> q\n .queryString(qu -> qu\n .defaultField(\"{{default_field}}\")\n .query(\"{{query_string}}\")\n )\n )\n )\n )\n .params(Map.of(\"default_field\", JsonData.fromJson(\"\\\"*\\\"\"),\"query_string\", JsonData.fromJson(\"\\\"*\\\"\")))\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73546,6 +90082,36 @@ ], "x-api": "delete.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _application/search_application/my-app/\n" + }, + { + "lang": "Python", + "source": "resp = client.search_application.delete(\n name=\"my-app\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.delete({\n name: \"my-app\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.delete(\n name: \"my-app\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->delete([\n \"name\" => \"my-app\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/search_application/my-app/\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().delete(d -> d\n .name(\"my-app\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73605,6 +90171,36 @@ ], "x-api": "get_behavioral_analytics.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _application/analytics/my*\n" + }, + { + "lang": "Python", + "source": "resp = client.search_application.get_behavioral_analytics(\n name=\"my*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.getBehavioralAnalytics({\n name: \"my*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.get_behavioral_analytics(\n name: \"my*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->getBehavioralAnalytics([\n \"name\" => \"my*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/analytics/my*\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().getBehavioralAnalytics(g -> g\n .name(\"my*\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73650,6 +90246,36 @@ ], "x-api": "put_behavioral_analytics.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _application/analytics/my_analytics_collection\n" + }, + { + "lang": "Python", + "source": "resp = client.search_application.put_behavioral_analytics(\n name=\"my_analytics_collection\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.putBehavioralAnalytics({\n name: \"my_analytics_collection\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.put_behavioral_analytics(\n name: \"my_analytics_collection\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->putBehavioralAnalytics([\n \"name\" => \"my_analytics_collection\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().putBehavioralAnalytics(p -> p\n .name(\"my_analytics_collection\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73696,6 +90322,36 @@ ], "x-api": "delete_behavioral_analytics.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _application/analytics/my_analytics_collection/\n" + }, + { + "lang": "Python", + "source": "resp = client.search_application.delete_behavioral_analytics(\n name=\"my_analytics_collection\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.deleteBehavioralAnalytics({\n name: \"my_analytics_collection\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.delete_behavioral_analytics(\n name: \"my_analytics_collection\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->deleteBehavioralAnalytics([\n \"name\" => \"my_analytics_collection\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection/\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().deleteBehavioralAnalytics(d -> d\n .name(\"my_analytics_collection\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73739,6 +90395,36 @@ ], "x-api": "get_behavioral_analytics.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _application/analytics/my*\n" + }, + { + "lang": "Python", + "source": "resp = client.search_application.get_behavioral_analytics(\n name=\"my*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.getBehavioralAnalytics({\n name: \"my*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.get_behavioral_analytics(\n name: \"my*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->getBehavioralAnalytics([\n \"name\" => \"my*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/analytics/my*\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().getBehavioralAnalytics(g -> g\n .name(\"my*\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73829,6 +90515,36 @@ ], "x-api": "list.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _application/search_application?from=0&size=3&q=app*\n" + }, + { + "lang": "Python", + "source": "resp = client.search_application.list(\n from=\"0\",\n size=\"3\",\n q=\"app*\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.list({\n from: 0,\n size: 3,\n q: \"app*\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.list(\n from: \"0\",\n size: \"3\",\n q: \"app*\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->list([\n \"from\" => \"0\",\n \"size\" => \"3\",\n \"q\" => \"app*\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/search_application?from=0&size=3&q=app*\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().list(l -> l\n .from(0)\n .q(\"app*\")\n .size(3)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -73928,6 +90644,36 @@ ], "x-api": "post_behavioral_analytics_event.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _application/analytics/my_analytics_collection/event/search_click\n{\n \"session\": {\n \"id\": \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"\n },\n \"user\": {\n \"id\": \"5f26f01a-bbee-4202-9298-81261067abbd\"\n },\n \"search\":{\n \"query\": \"search term\",\n \"results\": {\n \"items\": [\n {\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n ],\n \"total_results\": 10\n },\n \"sort\": {\n \"name\": \"relevance\"\n },\n \"search_application\": \"website\"\n },\n \"document\":{\n \"id\": \"123\",\n \"index\": \"products\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_application.post_behavioral_analytics_event(\n collection_name=\"my_analytics_collection\",\n event_type=\"search_click\",\n payload={\n \"session\": {\n \"id\": \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"\n },\n \"user\": {\n \"id\": \"5f26f01a-bbee-4202-9298-81261067abbd\"\n },\n \"search\": {\n \"query\": \"search term\",\n \"results\": {\n \"items\": [\n {\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n ],\n \"total_results\": 10\n },\n \"sort\": {\n \"name\": \"relevance\"\n },\n \"search_application\": \"website\"\n },\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.postBehavioralAnalyticsEvent({\n collection_name: \"my_analytics_collection\",\n event_type: \"search_click\",\n payload: {\n session: {\n id: \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\",\n },\n user: {\n id: \"5f26f01a-bbee-4202-9298-81261067abbd\",\n },\n search: {\n query: \"search term\",\n results: {\n items: [\n {\n document: {\n id: \"123\",\n index: \"products\",\n },\n },\n ],\n total_results: 10,\n },\n sort: {\n name: \"relevance\",\n },\n search_application: \"website\",\n },\n document: {\n id: \"123\",\n index: \"products\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.post_behavioral_analytics_event(\n collection_name: \"my_analytics_collection\",\n event_type: \"search_click\",\n body: {\n \"session\": {\n \"id\": \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"\n },\n \"user\": {\n \"id\": \"5f26f01a-bbee-4202-9298-81261067abbd\"\n },\n \"search\": {\n \"query\": \"search term\",\n \"results\": {\n \"items\": [\n {\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n ],\n \"total_results\": 10\n },\n \"sort\": {\n \"name\": \"relevance\"\n },\n \"search_application\": \"website\"\n },\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->postBehavioralAnalyticsEvent([\n \"collection_name\" => \"my_analytics_collection\",\n \"event_type\" => \"search_click\",\n \"body\" => [\n \"session\" => [\n \"id\" => \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\",\n ],\n \"user\" => [\n \"id\" => \"5f26f01a-bbee-4202-9298-81261067abbd\",\n ],\n \"search\" => [\n \"query\" => \"search term\",\n \"results\" => [\n \"items\" => array(\n [\n \"document\" => [\n \"id\" => \"123\",\n \"index\" => \"products\",\n ],\n ],\n ),\n \"total_results\" => 10,\n ],\n \"sort\" => [\n \"name\" => \"relevance\",\n ],\n \"search_application\" => \"website\",\n ],\n \"document\" => [\n \"id\" => \"123\",\n \"index\" => \"products\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"session\":{\"id\":\"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"},\"user\":{\"id\":\"5f26f01a-bbee-4202-9298-81261067abbd\"},\"search\":{\"query\":\"search term\",\"results\":{\"items\":[{\"document\":{\"id\":\"123\",\"index\":\"products\"}}],\"total_results\":10},\"sort\":{\"name\":\"relevance\"},\"search_application\":\"website\"},\"document\":{\"id\":\"123\",\"index\":\"products\"}}' \"$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection/event/search_click\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().postBehavioralAnalyticsEvent(p -> p\n .collectionName(\"my_analytics_collection\")\n .eventType(EventType.SearchClick)\n .payload(JsonData.fromJson(\"{\\\"session\\\":{\\\"id\\\":\\\"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\\\"},\\\"user\\\":{\\\"id\\\":\\\"5f26f01a-bbee-4202-9298-81261067abbd\\\"},\\\"search\\\":{\\\"query\\\":\\\"search term\\\",\\\"results\\\":{\\\"items\\\":[{\\\"document\\\":{\\\"id\\\":\\\"123\\\",\\\"index\\\":\\\"products\\\"}}],\\\"total_results\\\":10},\\\"sort\\\":{\\\"name\\\":\\\"relevance\\\"},\\\"search_application\\\":\\\"website\\\"},\\\"document\\\":{\\\"id\\\":\\\"123\\\",\\\"index\\\":\\\"products\\\"}}\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -74004,6 +90750,36 @@ ], "x-api": "render_query.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _application/search_application/my-app/_render_query\n{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_application.render_query(\n name=\"my-app\",\n params={\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.renderQuery({\n name: \"my-app\",\n params: {\n query_string: \"my first query\",\n text_fields: [\n {\n name: \"title\",\n boost: 5,\n },\n {\n name: \"description\",\n boost: 1,\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.render_query(\n name: \"my-app\",\n body: {\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->renderQuery([\n \"name\" => \"my-app\",\n \"body\" => [\n \"params\" => [\n \"query_string\" => \"my first query\",\n \"text_fields\" => array(\n [\n \"name\" => \"title\",\n \"boost\" => 5,\n ],\n [\n \"name\" => \"description\",\n \"boost\" => 1,\n ],\n ),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"params\":{\"query_string\":\"my first query\",\"text_fields\":[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]}}' \"$ELASTICSEARCH_URL/_application/search_application/my-app/_render_query\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().renderQuery(r -> r\n .name(\"my-app\")\n .params(Map.of(\"text_fields\", JsonData.fromJson(\"[{\\\"name\\\":\\\"title\\\",\\\"boost\\\":5},{\\\"name\\\":\\\"description\\\",\\\"boost\\\":1}]\"),\"query_string\", JsonData.fromJson(\"\\\"my first query\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -74087,6 +90863,36 @@ ], "x-api": "search.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _application/search_application/my-app/_search\n{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\", \"boost\": 1}\n ]\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_application.search(\n name=\"my-app\",\n params={\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.search({\n name: \"my-app\",\n params: {\n query_string: \"my first query\",\n text_fields: [\n {\n name: \"title\",\n boost: 5,\n },\n {\n name: \"description\",\n boost: 1,\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.search(\n name: \"my-app\",\n body: {\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->search([\n \"name\" => \"my-app\",\n \"body\" => [\n \"params\" => [\n \"query_string\" => \"my first query\",\n \"text_fields\" => array(\n [\n \"name\" => \"title\",\n \"boost\" => 5,\n ],\n [\n \"name\" => \"description\",\n \"boost\" => 1,\n ],\n ),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"params\":{\"query_string\":\"my first query\",\"text_fields\":[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]}}' \"$ELASTICSEARCH_URL/_application/search_application/my-app/_search\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().search(s -> s\n .name(\"my-app\")\n .params(Map.of(\"text_fields\", JsonData.fromJson(\"[{\\\"name\\\":\\\"title\\\",\\\"boost\\\":5},{\\\"name\\\":\\\"description\\\",\\\"boost\\\":1}]\"),\"query_string\", JsonData.fromJson(\"\\\"my first query\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -74168,6 +90974,36 @@ ], "x-api": "search.search_application", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _application/search_application/my-app/_search\n{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\", \"boost\": 1}\n ]\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_application.search(\n name=\"my-app\",\n params={\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchApplication.search({\n name: \"my-app\",\n params: {\n query_string: \"my first query\",\n text_fields: [\n {\n name: \"title\",\n boost: 5,\n },\n {\n name: \"description\",\n boost: 1,\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_application.search(\n name: \"my-app\",\n body: {\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchApplication()->search([\n \"name\" => \"my-app\",\n \"body\" => [\n \"params\" => [\n \"query_string\" => \"my first query\",\n \"text_fields\" => array(\n [\n \"name\" => \"title\",\n \"boost\" => 5,\n ],\n [\n \"name\" => \"description\",\n \"boost\" => 1,\n ],\n ),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"params\":{\"query_string\":\"my first query\",\"text_fields\":[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]}}' \"$ELASTICSEARCH_URL/_application/search_application/my-app/_search\"" + }, + { + "lang": "Java", + "source": "client.searchApplication().search(s -> s\n .name(\"my-app\")\n .params(Map.of(\"text_fields\", JsonData.fromJson(\"[{\\\"name\\\":\\\"title\\\",\\\"boost\\\":5},{\\\"name\\\":\\\"description\\\",\\\"boost\\\":1}]\"),\"query_string\", JsonData.fromJson(\"\\\"my first query\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -74464,6 +91300,36 @@ ], "x-api": "search_mvt", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET museums/_mvt/location/13/4207/2692\n{\n \"grid_agg\": \"geotile\",\n \"grid_precision\": 2,\n \"fields\": [\n \"name\",\n \"price\"\n ],\n \"query\": {\n \"term\": {\n \"included\": true\n }\n },\n \"aggs\": {\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_mvt(\n index=\"museums\",\n field=\"location\",\n zoom=\"13\",\n x=\"4207\",\n y=\"2692\",\n grid_agg=\"geotile\",\n grid_precision=2,\n fields=[\n \"name\",\n \"price\"\n ],\n query={\n \"term\": {\n \"included\": True\n }\n },\n aggs={\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchMvt({\n index: \"museums\",\n field: \"location\",\n zoom: 13,\n x: 4207,\n y: 2692,\n grid_agg: \"geotile\",\n grid_precision: 2,\n fields: [\"name\", \"price\"],\n query: {\n term: {\n included: true,\n },\n },\n aggs: {\n min_price: {\n min: {\n field: \"price\",\n },\n },\n max_price: {\n max: {\n field: \"price\",\n },\n },\n avg_price: {\n avg: {\n field: \"price\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_mvt(\n index: \"museums\",\n field: \"location\",\n zoom: \"13\",\n x: \"4207\",\n y: \"2692\",\n body: {\n \"grid_agg\": \"geotile\",\n \"grid_precision\": 2,\n \"fields\": [\n \"name\",\n \"price\"\n ],\n \"query\": {\n \"term\": {\n \"included\": true\n }\n },\n \"aggs\": {\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchMvt([\n \"index\" => \"museums\",\n \"field\" => \"location\",\n \"zoom\" => \"13\",\n \"x\" => \"4207\",\n \"y\" => \"2692\",\n \"body\" => [\n \"grid_agg\" => \"geotile\",\n \"grid_precision\" => 2,\n \"fields\" => array(\n \"name\",\n \"price\",\n ),\n \"query\" => [\n \"term\" => [\n \"included\" => true,\n ],\n ],\n \"aggs\" => [\n \"min_price\" => [\n \"min\" => [\n \"field\" => \"price\",\n ],\n ],\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"price\",\n ],\n ],\n \"avg_price\" => [\n \"avg\" => [\n \"field\" => \"price\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grid_agg\":\"geotile\",\"grid_precision\":2,\"fields\":[\"name\",\"price\"],\"query\":{\"term\":{\"included\":true}},\"aggs\":{\"min_price\":{\"min\":{\"field\":\"price\"}},\"max_price\":{\"max\":{\"field\":\"price\"}},\"avg_price\":{\"avg\":{\"field\":\"price\"}}}}' \"$ELASTICSEARCH_URL/museums/_mvt/location/13/4207/2692\"" + }, + { + "lang": "Java", + "source": "client.searchMvt(s -> s\n .aggs(Map.of(\"max_price\", Aggregation.of(a -> a\n .max(m -> m\n .field(\"price\")\n )\n ),\"min_price\", Aggregation.of(ag -> ag\n .min(m -> m\n .field(\"price\")\n )\n ),\"avg_price\", Aggregation.of(agg -> agg\n .avg(av -> av\n .field(\"price\")\n )\n )))\n .field(\"location\")\n .fields(List.of(\"name\",\"price\"))\n .gridAgg(GridAggregationType.Geotile)\n .gridPrecision(2)\n .index(\"museums\")\n .query(q -> q\n .term(t -> t\n .field(\"included\")\n .value(FieldValue.of(true))\n )\n )\n .x(4207)\n .y(2692)\n .zoom(13)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -74758,6 +91624,36 @@ ], "x-api": "search_mvt", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET museums/_mvt/location/13/4207/2692\n{\n \"grid_agg\": \"geotile\",\n \"grid_precision\": 2,\n \"fields\": [\n \"name\",\n \"price\"\n ],\n \"query\": {\n \"term\": {\n \"included\": true\n }\n },\n \"aggs\": {\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_mvt(\n index=\"museums\",\n field=\"location\",\n zoom=\"13\",\n x=\"4207\",\n y=\"2692\",\n grid_agg=\"geotile\",\n grid_precision=2,\n fields=[\n \"name\",\n \"price\"\n ],\n query={\n \"term\": {\n \"included\": True\n }\n },\n aggs={\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchMvt({\n index: \"museums\",\n field: \"location\",\n zoom: 13,\n x: 4207,\n y: 2692,\n grid_agg: \"geotile\",\n grid_precision: 2,\n fields: [\"name\", \"price\"],\n query: {\n term: {\n included: true,\n },\n },\n aggs: {\n min_price: {\n min: {\n field: \"price\",\n },\n },\n max_price: {\n max: {\n field: \"price\",\n },\n },\n avg_price: {\n avg: {\n field: \"price\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_mvt(\n index: \"museums\",\n field: \"location\",\n zoom: \"13\",\n x: \"4207\",\n y: \"2692\",\n body: {\n \"grid_agg\": \"geotile\",\n \"grid_precision\": 2,\n \"fields\": [\n \"name\",\n \"price\"\n ],\n \"query\": {\n \"term\": {\n \"included\": true\n }\n },\n \"aggs\": {\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchMvt([\n \"index\" => \"museums\",\n \"field\" => \"location\",\n \"zoom\" => \"13\",\n \"x\" => \"4207\",\n \"y\" => \"2692\",\n \"body\" => [\n \"grid_agg\" => \"geotile\",\n \"grid_precision\" => 2,\n \"fields\" => array(\n \"name\",\n \"price\",\n ),\n \"query\" => [\n \"term\" => [\n \"included\" => true,\n ],\n ],\n \"aggs\" => [\n \"min_price\" => [\n \"min\" => [\n \"field\" => \"price\",\n ],\n ],\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"price\",\n ],\n ],\n \"avg_price\" => [\n \"avg\" => [\n \"field\" => \"price\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grid_agg\":\"geotile\",\"grid_precision\":2,\"fields\":[\"name\",\"price\"],\"query\":{\"term\":{\"included\":true}},\"aggs\":{\"min_price\":{\"min\":{\"field\":\"price\"}},\"max_price\":{\"max\":{\"field\":\"price\"}},\"avg_price\":{\"avg\":{\"field\":\"price\"}}}}' \"$ELASTICSEARCH_URL/museums/_mvt/location/13/4207/2692\"" + }, + { + "lang": "Java", + "source": "client.searchMvt(s -> s\n .aggs(Map.of(\"max_price\", Aggregation.of(a -> a\n .max(m -> m\n .field(\"price\")\n )\n ),\"min_price\", Aggregation.of(ag -> ag\n .min(m -> m\n .field(\"price\")\n )\n ),\"avg_price\", Aggregation.of(agg -> agg\n .avg(av -> av\n .field(\"price\")\n )\n )))\n .field(\"location\")\n .fields(List.of(\"name\",\"price\"))\n .gridAgg(GridAggregationType.Geotile)\n .gridPrecision(2)\n .index(\"museums\")\n .query(q -> q\n .term(t -> t\n .field(\"included\")\n .value(FieldValue.of(true))\n )\n )\n .x(4207)\n .y(2692)\n .zoom(13)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -74788,7 +91684,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -74902,6 +91798,36 @@ ], "x-api": "search_shards", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_search_shards\n" + }, + { + "lang": "Python", + "source": "resp = client.search_shards(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchShards({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_shards(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchShards([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_search_shards\"" + }, + { + "lang": "Java", + "source": "client.searchShards(s -> s\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -74930,7 +91856,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -75044,6 +91970,36 @@ ], "x-api": "search_shards", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_search_shards\n" + }, + { + "lang": "Python", + "source": "resp = client.search_shards(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchShards({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_shards(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchShards([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_search_shards\"" + }, + { + "lang": "Java", + "source": "client.searchShards(s -> s\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -75085,7 +92041,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -75199,6 +92155,36 @@ ], "x-api": "search_shards", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_search_shards\n" + }, + { + "lang": "Python", + "source": "resp = client.search_shards(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchShards({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_shards(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchShards([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_search_shards\"" + }, + { + "lang": "Java", + "source": "client.searchShards(s -> s\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -75238,7 +92224,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -75352,6 +92338,36 @@ ], "x-api": "search_shards", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_search_shards\n" + }, + { + "lang": "Python", + "source": "resp = client.search_shards(\n index=\"my-index-000001\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchShards({\n index: \"my-index-000001\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_shards(\n index: \"my-index-000001\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchShards([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_search_shards\"" + }, + { + "lang": "Java", + "source": "client.searchShards(s -> s\n .index(\"my-index-000001\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -75395,7 +92411,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -75475,7 +92491,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.", + "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -75663,6 +92679,36 @@ ], "x-api": "search_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index/_search/template\n{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_template(\n index=\"my-index\",\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchTemplate({\n index: \"my-index\",\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_template(\n index: \"my-index\",\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchTemplate([\n \"index\" => \"my-index\",\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}' \"$ELASTICSEARCH_URL/my-index/_search/template\"" + }, + { + "lang": "Java", + "source": "client.searchTemplate(s -> s\n .id(\"my-search-template\")\n .index(\"my-index\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"0\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -75704,7 +92750,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -75784,7 +92830,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.", + "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -75972,6 +93018,36 @@ ], "x-api": "search_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index/_search/template\n{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_template(\n index=\"my-index\",\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchTemplate({\n index: \"my-index\",\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_template(\n index: \"my-index\",\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchTemplate([\n \"index\" => \"my-index\",\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}' \"$ELASTICSEARCH_URL/my-index/_search/template\"" + }, + { + "lang": "Java", + "source": "client.searchTemplate(s -> s\n .id(\"my-search-template\")\n .index(\"my-index\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"0\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -76026,7 +93102,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -76106,7 +93182,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.", + "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -76294,6 +93370,36 @@ ], "x-api": "search_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index/_search/template\n{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_template(\n index=\"my-index\",\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchTemplate({\n index: \"my-index\",\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_template(\n index: \"my-index\",\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchTemplate([\n \"index\" => \"my-index\",\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}' \"$ELASTICSEARCH_URL/my-index/_search/template\"" + }, + { + "lang": "Java", + "source": "client.searchTemplate(s -> s\n .id(\"my-search-template\")\n .index(\"my-index\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"0\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -76346,7 +93452,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -76426,7 +93532,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation.", + "description": "The type of the search operation.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -76614,6 +93720,36 @@ ], "x-api": "search_template", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET my-index/_search/template\n{\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.search_template(\n index=\"my-index\",\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchTemplate({\n index: \"my-index\",\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.search_template(\n index: \"my-index\",\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchTemplate([\n \"index\" => \"my-index\",\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}' \"$ELASTICSEARCH_URL/my-index/_search/template\"" + }, + { + "lang": "Java", + "source": "client.searchTemplate(s -> s\n .id(\"my-search-template\")\n .index(\"my-index\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"0\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -76684,6 +93820,36 @@ ], "x-api": "cache_stats.searchable_snapshots", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_searchable_snapshots/cache/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.searchable_snapshots.cache_stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchableSnapshots.cacheStats();" + }, + { + "lang": "Ruby", + "source": "response = client.searchable_snapshots.cache_stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchableSnapshots()->cacheStats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_searchable_snapshots/cache/stats\"" + }, + { + "lang": "Java", + "source": "client.searchableSnapshots().cacheStats(c -> c);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -76765,6 +93931,36 @@ ], "x-api": "cache_stats.searchable_snapshots", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_searchable_snapshots/cache/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.searchable_snapshots.cache_stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchableSnapshots.cacheStats();" + }, + { + "lang": "Ruby", + "source": "response = client.searchable_snapshots.cache_stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchableSnapshots()->cacheStats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_searchable_snapshots/cache/stats\"" + }, + { + "lang": "Java", + "source": "client.searchableSnapshots().cacheStats(c -> c);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -76790,7 +93986,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -76840,6 +94036,36 @@ ], "x-api": "clear_cache.searchable_snapshots", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index/_searchable_snapshots/cache/clear\n" + }, + { + "lang": "Python", + "source": "resp = client.searchable_snapshots.clear_cache(\n index=\"my-index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchableSnapshots.clearCache({\n index: \"my-index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.searchable_snapshots.clear_cache(\n index: \"my-index\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchableSnapshots()->clearCache([\n \"index\" => \"my-index\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index/_searchable_snapshots/cache/clear\"" + }, + { + "lang": "Java", + "source": "client.searchableSnapshots().clearCache(c -> c\n .index(\"my-index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -76876,7 +94102,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -76926,6 +94152,36 @@ ], "x-api": "clear_cache.searchable_snapshots", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /my-index/_searchable_snapshots/cache/clear\n" + }, + { + "lang": "Python", + "source": "resp = client.searchable_snapshots.clear_cache(\n index=\"my-index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchableSnapshots.clearCache({\n index: \"my-index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.searchable_snapshots.clear_cache(\n index: \"my-index\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchableSnapshots()->clearCache([\n \"index\" => \"my-index\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index/_searchable_snapshots/cache/clear\"" + }, + { + "lang": "Java", + "source": "client.searchableSnapshots().clearCache(c -> c\n .index(\"my-index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77081,6 +94337,36 @@ ], "x-api": "mount.searchable_snapshots", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true\n{\n \"index\": \"my_docs\",\n \"renamed_index\": \"docs\",\n \"index_settings\": {\n \"index.number_of_replicas\": 0\n },\n \"ignore_index_settings\": [ \"index.refresh_interval\" ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.searchable_snapshots.mount(\n repository=\"my_repository\",\n snapshot=\"my_snapshot\",\n wait_for_completion=True,\n index=\"my_docs\",\n renamed_index=\"docs\",\n index_settings={\n \"index.number_of_replicas\": 0\n },\n ignore_index_settings=[\n \"index.refresh_interval\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchableSnapshots.mount({\n repository: \"my_repository\",\n snapshot: \"my_snapshot\",\n wait_for_completion: \"true\",\n index: \"my_docs\",\n renamed_index: \"docs\",\n index_settings: {\n \"index.number_of_replicas\": 0,\n },\n ignore_index_settings: [\"index.refresh_interval\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.searchable_snapshots.mount(\n repository: \"my_repository\",\n snapshot: \"my_snapshot\",\n wait_for_completion: \"true\",\n body: {\n \"index\": \"my_docs\",\n \"renamed_index\": \"docs\",\n \"index_settings\": {\n \"index.number_of_replicas\": 0\n },\n \"ignore_index_settings\": [\n \"index.refresh_interval\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchableSnapshots()->mount([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"my_snapshot\",\n \"wait_for_completion\" => \"true\",\n \"body\" => [\n \"index\" => \"my_docs\",\n \"renamed_index\" => \"docs\",\n \"index_settings\" => [\n \"index.number_of_replicas\" => 0,\n ],\n \"ignore_index_settings\" => array(\n \"index.refresh_interval\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"my_docs\",\"renamed_index\":\"docs\",\"index_settings\":{\"index.number_of_replicas\":0},\"ignore_index_settings\":[\"index.refresh_interval\"]}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true\"" + }, + { + "lang": "Java", + "source": "client.searchableSnapshots().mount(m -> m\n .ignoreIndexSettings(\"index.refresh_interval\")\n .index(\"my_docs\")\n .indexSettings(\"index.number_of_replicas\", JsonData.fromJson(\"0\"))\n .renamedIndex(\"docs\")\n .repository(\"my_repository\")\n .snapshot(\"my_snapshot\")\n .waitForCompletion(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77142,6 +94428,36 @@ ], "x-api": "stats.searchable_snapshots", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index/_searchable_snapshots/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.searchable_snapshots.stats(\n index=\"my-index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchableSnapshots.stats({\n index: \"my-index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.searchable_snapshots.stats(\n index: \"my-index\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchableSnapshots()->stats([\n \"index\" => \"my-index\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index/_searchable_snapshots/stats\"" + }, + { + "lang": "Java", + "source": "client.searchableSnapshots().stats(s -> s\n .index(\"my-index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77214,6 +94530,36 @@ ], "x-api": "stats.searchable_snapshots", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index/_searchable_snapshots/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.searchable_snapshots.stats(\n index=\"my-index\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.searchableSnapshots.stats({\n index: \"my-index\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.searchable_snapshots.stats(\n index: \"my-index\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->searchableSnapshots()->stats([\n \"index\" => \"my-index\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index/_searchable_snapshots/stats\"" + }, + { + "lang": "Java", + "source": "client.searchableSnapshots().stats(s -> s\n .index(\"my-index\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77241,7 +94587,7 @@ "type": "string" }, "grant_type": { - "description": "The type of grant.", + "description": "The type of grant.\n\nSupported values include:\n - `password`: In this type of grant, you must supply the user ID and password for which you want to create the API key.\n - `access_token`: In this type of grant, you must supply an access token that was created by the Elasticsearch token service.\nIf you are activating a user profile, you can alternatively supply a JWT (either a JWT `access_token` or a JWT `id_token`).\n\n", "allOf": [ { "$ref": "#/components/schemas/security._types.GrantType" @@ -77298,6 +94644,36 @@ ], "x-api": "activate_user_profile.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/_activate\n{\n \"grant_type\": \"password\",\n \"username\" : \"jacknich\",\n \"password\" : \"l0ng-r4nd0m-p@ssw0rd\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.activate_user_profile(\n grant_type=\"password\",\n username=\"jacknich\",\n password=\"l0ng-r4nd0m-p@ssw0rd\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.activateUserProfile({\n grant_type: \"password\",\n username: \"jacknich\",\n password: \"l0ng-r4nd0m-p@ssw0rd\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.activate_user_profile(\n body: {\n \"grant_type\": \"password\",\n \"username\": \"jacknich\",\n \"password\": \"l0ng-r4nd0m-p@ssw0rd\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->activateUserProfile([\n \"body\" => [\n \"grant_type\" => \"password\",\n \"username\" => \"jacknich\",\n \"password\" => \"l0ng-r4nd0m-p@ssw0rd\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grant_type\":\"password\",\"username\":\"jacknich\",\"password\":\"l0ng-r4nd0m-p@ssw0rd\"}' \"$ELASTICSEARCH_URL/_security/profile/_activate\"" + }, + { + "lang": "Java", + "source": "client.security().activateUserProfile(a -> a\n .grantType(GrantType.Password)\n .password(\"l0ng-r4nd0m-p@ssw0rd\")\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77426,6 +94802,36 @@ ], "x-api": "authenticate.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/_authenticate\n" + }, + { + "lang": "Python", + "source": "resp = client.security.authenticate()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.authenticate();" + }, + { + "lang": "Ruby", + "source": "response = client.security.authenticate" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->authenticate();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/_authenticate\"" + }, + { + "lang": "Java", + "source": "client.security().authenticate();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77472,6 +94878,36 @@ ], "x-api": "get_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/role/my_admin_role\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_role(\n name=\"my_admin_role\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getRole({\n name: \"my_admin_role\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_role(\n name: \"my_admin_role\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getRole([\n \"name\" => \"my_admin_role\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" + }, + { + "lang": "Java", + "source": "client.security().getRole(g -> g\n .name(\"my_admin_role\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77601,6 +95037,36 @@ ], "x-api": "bulk_put_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/role\n{\n \"roles\": {\n \"my_admin_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.bulk_put_role(\n roles={\n \"my_admin_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.bulkPutRole({\n roles: {\n my_admin_role: {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index1\", \"index2\"],\n privileges: [\"all\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n },\n my_user_role: {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index1\"],\n privileges: [\"read\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.bulk_put_role(\n body: {\n \"roles\": {\n \"my_admin_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->bulkPutRole([\n \"body\" => [\n \"roles\" => [\n \"my_admin_role\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n \"index2\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n \"my_user_role\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":{\"my_admin_role\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"privileges\":[\"all\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}},\"my_user_role\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\"],\"privileges\":[\"read\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}}}' \"$ELASTICSEARCH_URL/_security/role\"" + }, + { + "lang": "Java", + "source": "client.security().bulkPutRole(b -> b\n .roles(Map.of(\"my_admin_role\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(List.of(\"index1\",\"index2\"))\n .privileges(\"all\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .runAs(\"other_user\")\n ),\"my_user_role\", RoleDescriptor.of(ro -> ro\n .cluster(\"all\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(\"index1\")\n .privileges(\"read\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .runAs(\"other_user\")\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77718,6 +95184,36 @@ ], "x-api": "bulk_delete_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_security/role\n{\n \"names\": [\"my_admin_role\", \"my_user_role\"]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.bulk_delete_role(\n names=[\n \"my_admin_role\",\n \"my_user_role\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.bulkDeleteRole({\n names: [\"my_admin_role\", \"my_user_role\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.bulk_delete_role(\n body: {\n \"names\": [\n \"my_admin_role\",\n \"my_user_role\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->bulkDeleteRole([\n \"body\" => [\n \"names\" => array(\n \"my_admin_role\",\n \"my_user_role\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"names\":[\"my_admin_role\",\"my_user_role\"]}' \"$ELASTICSEARCH_URL/_security/role\"" + }, + { + "lang": "Java", + "source": "client.security().bulkDeleteRole(b -> b\n .names(List.of(\"my_admin_role\",\"my_user_role\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77848,6 +95344,36 @@ ], "x-api": "bulk_update_api_keys.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/api_key/_bulk_update\n{\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\n \"production\"\n ]\n }\n },\n \"expiration\": \"30d\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.bulk_update_api_keys(\n ids=[\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n role_descriptors={\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n metadata={\n \"environment\": {\n \"level\": 2,\n \"trusted\": True,\n \"tags\": [\n \"production\"\n ]\n }\n },\n expiration=\"30d\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.bulkUpdateApiKeys({\n ids: [\"VuaCfGcBCdbkQm-e5aOx\", \"H3_AhoIBA9hmeQJdg7ij\"],\n role_descriptors: {\n \"role-a\": {\n indices: [\n {\n names: [\"*\"],\n privileges: [\"write\"],\n },\n ],\n },\n },\n metadata: {\n environment: {\n level: 2,\n trusted: true,\n tags: [\"production\"],\n },\n },\n expiration: \"30d\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.bulk_update_api_keys(\n body: {\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\n \"production\"\n ]\n }\n },\n \"expiration\": \"30d\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->bulkUpdateApiKeys([\n \"body\" => [\n \"ids\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\",\n ),\n \"role_descriptors\" => [\n \"role-a\" => [\n \"indices\" => array(\n [\n \"names\" => array(\n \"*\",\n ),\n \"privileges\" => array(\n \"write\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"environment\" => [\n \"level\" => 2,\n \"trusted\" => true,\n \"tags\" => array(\n \"production\",\n ),\n ],\n ],\n \"expiration\" => \"30d\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"ids\":[\"VuaCfGcBCdbkQm-e5aOx\",\"H3_AhoIBA9hmeQJdg7ij\"],\"role_descriptors\":{\"role-a\":{\"indices\":[{\"names\":[\"*\"],\"privileges\":[\"write\"]}]}},\"metadata\":{\"environment\":{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}},\"expiration\":\"30d\"}' \"$ELASTICSEARCH_URL/_security/api_key/_bulk_update\"" + }, + { + "lang": "Java", + "source": "client.security().bulkUpdateApiKeys(b -> b\n .expiration(e -> e\n .time(\"30d\")\n )\n .ids(List.of(\"VuaCfGcBCdbkQm-e5aOx\",\"H3_AhoIBA9hmeQJdg7ij\"))\n .metadata(\"environment\", JsonData.fromJson(\"{\\\"level\\\":2,\\\"trusted\\\":true,\\\"tags\\\":[\\\"production\\\"]}\"))\n .roleDescriptors(\"role-a\", r -> r\n .indices(i -> i\n .names(\"*\")\n .privileges(\"write\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -77936,6 +95462,36 @@ ], "x-api": "change_password.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/user/jacknich/_password\n{\n \"password\" : \"new-test-password\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.change_password(\n username=\"jacknich\",\n password=\"new-test-password\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.changePassword({\n username: \"jacknich\",\n password: \"new-test-password\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.change_password(\n username: \"jacknich\",\n body: {\n \"password\": \"new-test-password\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->changePassword([\n \"username\" => \"jacknich\",\n \"body\" => [\n \"password\" => \"new-test-password\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"password\":\"new-test-password\"}' \"$ELASTICSEARCH_URL/_security/user/jacknich/_password\"" + }, + { + "lang": "Java", + "source": "client.security().changePassword(c -> c\n .password(\"new-test-password\")\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78022,6 +95578,36 @@ ], "x-api": "change_password.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/user/jacknich/_password\n{\n \"password\" : \"new-test-password\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.change_password(\n username=\"jacknich\",\n password=\"new-test-password\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.changePassword({\n username: \"jacknich\",\n password: \"new-test-password\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.change_password(\n username: \"jacknich\",\n body: {\n \"password\": \"new-test-password\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->changePassword([\n \"username\" => \"jacknich\",\n \"body\" => [\n \"password\" => \"new-test-password\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"password\":\"new-test-password\"}' \"$ELASTICSEARCH_URL/_security/user/jacknich/_password\"" + }, + { + "lang": "Java", + "source": "client.security().changePassword(c -> c\n .password(\"new-test-password\")\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78099,6 +95685,36 @@ ], "x-api": "change_password.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/user/jacknich/_password\n{\n \"password\" : \"new-test-password\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.change_password(\n username=\"jacknich\",\n password=\"new-test-password\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.changePassword({\n username: \"jacknich\",\n password: \"new-test-password\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.change_password(\n username: \"jacknich\",\n body: {\n \"password\": \"new-test-password\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->changePassword([\n \"username\" => \"jacknich\",\n \"body\" => [\n \"password\" => \"new-test-password\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"password\":\"new-test-password\"}' \"$ELASTICSEARCH_URL/_security/user/jacknich/_password\"" + }, + { + "lang": "Java", + "source": "client.security().changePassword(c -> c\n .password(\"new-test-password\")\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78174,6 +95790,36 @@ ], "x-api": "change_password.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/user/jacknich/_password\n{\n \"password\" : \"new-test-password\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.change_password(\n username=\"jacknich\",\n password=\"new-test-password\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.changePassword({\n username: \"jacknich\",\n password: \"new-test-password\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.change_password(\n username: \"jacknich\",\n body: {\n \"password\": \"new-test-password\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->changePassword([\n \"username\" => \"jacknich\",\n \"body\" => [\n \"password\" => \"new-test-password\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"password\":\"new-test-password\"}' \"$ELASTICSEARCH_URL/_security/user/jacknich/_password\"" + }, + { + "lang": "Java", + "source": "client.security().changePassword(c -> c\n .password(\"new-test-password\")\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78251,6 +95897,36 @@ ], "x-api": "clear_api_key_cache.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache\n" + }, + { + "lang": "Python", + "source": "resp = client.security.clear_api_key_cache(\n ids=\"yVGMr3QByxdh1MSaicYx\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.clearApiKeyCache({\n ids: \"yVGMr3QByxdh1MSaicYx\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.clear_api_key_cache(\n ids: \"yVGMr3QByxdh1MSaicYx\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->clearApiKeyCache([\n \"ids\" => \"yVGMr3QByxdh1MSaicYx\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache\"" + }, + { + "lang": "Java", + "source": "client.security().clearApiKeyCache(c -> c\n .ids(\"yVGMr3QByxdh1MSaicYx\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78328,6 +96004,36 @@ ], "x-api": "clear_cached_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/privilege/myapp/_clear_cache\n" + }, + { + "lang": "Python", + "source": "resp = client.security.clear_cached_privileges(\n application=\"myapp\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.clearCachedPrivileges({\n application: \"myapp\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.clear_cached_privileges(\n application: \"myapp\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->clearCachedPrivileges([\n \"application\" => \"myapp\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/myapp/_clear_cache\"" + }, + { + "lang": "Java", + "source": "client.security().clearCachedPrivileges(c -> c\n .application(\"myapp\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78419,6 +96125,36 @@ ], "x-api": "clear_cached_realms.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/realm/default_file/_clear_cache\n" + }, + { + "lang": "Python", + "source": "resp = client.security.clear_cached_realms(\n realms=\"default_file\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.clearCachedRealms({\n realms: \"default_file\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.clear_cached_realms(\n realms: \"default_file\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->clearCachedRealms([\n \"realms\" => \"default_file\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/realm/default_file/_clear_cache\"" + }, + { + "lang": "Java", + "source": "client.security().clearCachedRealms(c -> c\n .realms(\"default_file\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78496,6 +96232,36 @@ ], "x-api": "clear_cached_roles.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/role/my_admin_role/_clear_cache\n" + }, + { + "lang": "Python", + "source": "resp = client.security.clear_cached_roles(\n name=\"my_admin_role\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.clearCachedRoles({\n name: \"my_admin_role\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.clear_cached_roles(\n name: \"my_admin_role\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->clearCachedRoles([\n \"name\" => \"my_admin_role\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role/my_admin_role/_clear_cache\"" + }, + { + "lang": "Java", + "source": "client.security().clearCachedRoles(c -> c\n .name(\"my_admin_role\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78599,6 +96365,36 @@ ], "x-api": "clear_cached_service_tokens.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/service/elastic/fleet-server/credential/token/token1/_clear_cache\n" + }, + { + "lang": "Python", + "source": "resp = client.security.clear_cached_service_tokens(\n namespace=\"elastic\",\n service=\"fleet-server\",\n name=\"token1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.clearCachedServiceTokens({\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.clear_cached_service_tokens(\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->clearCachedServiceTokens([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n \"name\" => \"token1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token1/_clear_cache\"" + }, + { + "lang": "Java", + "source": "client.security().clearCachedServiceTokens(c -> c\n .name(\"token1\")\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78744,6 +96540,36 @@ ], "x-api": "get_api_key.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/api_key?username=myuser&realm_name=native1\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_api_key(\n username=\"myuser\",\n realm_name=\"native1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getApiKey({\n username: \"myuser\",\n realm_name: \"native1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_api_key(\n username: \"myuser\",\n realm_name: \"native1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getApiKey([\n \"username\" => \"myuser\",\n \"realm_name\" => \"native1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/api_key?username=myuser&realm_name=native1\"" + }, + { + "lang": "Java", + "source": "client.security().getApiKey(g -> g\n .realmName(\"native1\")\n .username(\"myuser\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -78892,6 +96718,36 @@ ], "x-api": "create_api_key.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\", \n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.create_api_key(\n name=\"my-api-key\",\n expiration=\"1d\",\n role_descriptors={\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n metadata={\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": True,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.createApiKey({\n name: \"my-api-key\",\n expiration: \"1d\",\n role_descriptors: {\n \"role-a\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-a*\"],\n privileges: [\"read\"],\n },\n ],\n },\n \"role-b\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-b*\"],\n privileges: [\"all\"],\n },\n ],\n },\n },\n metadata: {\n application: \"my-application\",\n environment: {\n level: 1,\n trusted: true,\n tags: [\"dev\", \"staging\"],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.create_api_key(\n body: {\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->createApiKey([\n \"body\" => [\n \"name\" => \"my-api-key\",\n \"expiration\" => \"1d\",\n \"role_descriptors\" => [\n \"role-a\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-a*\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n ),\n ],\n \"role-b\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-b*\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"application\" => \"my-application\",\n \"environment\" => [\n \"level\" => 1,\n \"trusted\" => true,\n \"tags\" => array(\n \"dev\",\n \"staging\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"my-api-key\",\"expiration\":\"1d\",\"role_descriptors\":{\"role-a\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-a*\"],\"privileges\":[\"read\"]}]},\"role-b\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-b*\"],\"privileges\":[\"all\"]}]}},\"metadata\":{\"application\":\"my-application\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}}}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "lang": "Java", + "source": "client.security().createApiKey(c -> c\n .expiration(e -> e\n .time(\"1d\")\n )\n .metadata(Map.of(\"environment\", JsonData.fromJson(\"{\\\"level\\\":1,\\\"trusted\\\":true,\\\"tags\\\":[\\\"dev\\\",\\\"staging\\\"]}\"),\"application\", JsonData.fromJson(\"\\\"my-application\\\"\")))\n .name(\"my-api-key\")\n .roleDescriptors(Map.of(\"role-b\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-b*\")\n .privileges(\"all\")\n )\n ),\"role-a\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-a*\")\n .privileges(\"read\")\n )\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79040,6 +96896,36 @@ ], "x-api": "create_api_key.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\", \n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.create_api_key(\n name=\"my-api-key\",\n expiration=\"1d\",\n role_descriptors={\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n metadata={\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": True,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.createApiKey({\n name: \"my-api-key\",\n expiration: \"1d\",\n role_descriptors: {\n \"role-a\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-a*\"],\n privileges: [\"read\"],\n },\n ],\n },\n \"role-b\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-b*\"],\n privileges: [\"all\"],\n },\n ],\n },\n },\n metadata: {\n application: \"my-application\",\n environment: {\n level: 1,\n trusted: true,\n tags: [\"dev\", \"staging\"],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.create_api_key(\n body: {\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->createApiKey([\n \"body\" => [\n \"name\" => \"my-api-key\",\n \"expiration\" => \"1d\",\n \"role_descriptors\" => [\n \"role-a\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-a*\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n ),\n ],\n \"role-b\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-b*\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"application\" => \"my-application\",\n \"environment\" => [\n \"level\" => 1,\n \"trusted\" => true,\n \"tags\" => array(\n \"dev\",\n \"staging\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"my-api-key\",\"expiration\":\"1d\",\"role_descriptors\":{\"role-a\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-a*\"],\"privileges\":[\"read\"]}]},\"role-b\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-b*\"],\"privileges\":[\"all\"]}]}},\"metadata\":{\"application\":\"my-application\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}}}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "lang": "Java", + "source": "client.security().createApiKey(c -> c\n .expiration(e -> e\n .time(\"1d\")\n )\n .metadata(Map.of(\"environment\", JsonData.fromJson(\"{\\\"level\\\":1,\\\"trusted\\\":true,\\\"tags\\\":[\\\"dev\\\",\\\"staging\\\"]}\"),\"application\", JsonData.fromJson(\"\\\"my-application\\\"\")))\n .name(\"my-api-key\")\n .roleDescriptors(Map.of(\"role-b\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-b*\")\n .privileges(\"all\")\n )\n ),\"role-a\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-a*\")\n .privileges(\"read\")\n )\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79196,6 +97082,36 @@ ], "x-api": "invalidate_api_key.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_security/api_key\n{\n \"ids\" : [ \"VuaCfGcBCdbkQm-e5aOx\" ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.invalidate_api_key(\n ids=[\n \"VuaCfGcBCdbkQm-e5aOx\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.invalidateApiKey({\n ids: [\"VuaCfGcBCdbkQm-e5aOx\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.invalidate_api_key(\n body: {\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->invalidateApiKey([\n \"body\" => [\n \"ids\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"ids\":[\"VuaCfGcBCdbkQm-e5aOx\"]}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "lang": "Java", + "source": "client.security().invalidateApiKey(i -> i\n .ids(\"VuaCfGcBCdbkQm-e5aOx\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79341,6 +97257,36 @@ ], "x-api": "create_cross_cluster_api_key.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/cross_cluster/api_key\n{\n \"name\": \"my-cross-cluster-api-key\",\n \"expiration\": \"1d\", \n \"access\": {\n \"search\": [ \n {\n \"names\": [\"logs*\"]\n }\n ],\n \"replication\": [ \n {\n \"names\": [\"archive*\"]\n }\n ]\n },\n \"metadata\": {\n \"description\": \"phase one\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.create_cross_cluster_api_key(\n name=\"my-cross-cluster-api-key\",\n expiration=\"1d\",\n access={\n \"search\": [\n {\n \"names\": [\n \"logs*\"\n ]\n }\n ],\n \"replication\": [\n {\n \"names\": [\n \"archive*\"\n ]\n }\n ]\n },\n metadata={\n \"description\": \"phase one\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": True,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.createCrossClusterApiKey({\n name: \"my-cross-cluster-api-key\",\n expiration: \"1d\",\n access: {\n search: [\n {\n names: [\"logs*\"],\n },\n ],\n replication: [\n {\n names: [\"archive*\"],\n },\n ],\n },\n metadata: {\n description: \"phase one\",\n environment: {\n level: 1,\n trusted: true,\n tags: [\"dev\", \"staging\"],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.create_cross_cluster_api_key(\n body: {\n \"name\": \"my-cross-cluster-api-key\",\n \"expiration\": \"1d\",\n \"access\": {\n \"search\": [\n {\n \"names\": [\n \"logs*\"\n ]\n }\n ],\n \"replication\": [\n {\n \"names\": [\n \"archive*\"\n ]\n }\n ]\n },\n \"metadata\": {\n \"description\": \"phase one\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->createCrossClusterApiKey([\n \"body\" => [\n \"name\" => \"my-cross-cluster-api-key\",\n \"expiration\" => \"1d\",\n \"access\" => [\n \"search\" => array(\n [\n \"names\" => array(\n \"logs*\",\n ),\n ],\n ),\n \"replication\" => array(\n [\n \"names\" => array(\n \"archive*\",\n ),\n ],\n ),\n ],\n \"metadata\" => [\n \"description\" => \"phase one\",\n \"environment\" => [\n \"level\" => 1,\n \"trusted\" => true,\n \"tags\" => array(\n \"dev\",\n \"staging\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"my-cross-cluster-api-key\",\"expiration\":\"1d\",\"access\":{\"search\":[{\"names\":[\"logs*\"]}],\"replication\":[{\"names\":[\"archive*\"]}]},\"metadata\":{\"description\":\"phase one\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}}}' \"$ELASTICSEARCH_URL/_security/cross_cluster/api_key\"" + }, + { + "lang": "Java", + "source": "client.security().createCrossClusterApiKey(c -> c\n .access(a -> a\n .replication(r -> r\n .names(\"archive*\")\n )\n .search(s -> s\n .names(\"logs*\")\n )\n )\n .expiration(e -> e\n .time(\"1d\")\n )\n .metadata(Map.of(\"environment\", JsonData.fromJson(\"{\\\"level\\\":1,\\\"trusted\\\":true,\\\"tags\\\":[\\\"dev\\\",\\\"staging\\\"]}\"),\"description\", JsonData.fromJson(\"\\\"phase one\\\"\")))\n .name(\"my-cross-cluster-api-key\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79450,6 +97396,36 @@ ], "x-api": "create_service_token.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/service/elastic/fleet-server/credential/token/token1\n" + }, + { + "lang": "Python", + "source": "resp = client.security.create_service_token(\n namespace=\"elastic\",\n service=\"fleet-server\",\n name=\"token1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.createServiceToken({\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.create_service_token(\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->createServiceToken([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n \"name\" => \"token1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token1\"" + }, + { + "lang": "Java", + "source": "client.security().createServiceToken(c -> c\n .name(\"token1\")\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79557,6 +97533,36 @@ ], "x-api": "create_service_token.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/service/elastic/fleet-server/credential/token/token1\n" + }, + { + "lang": "Python", + "source": "resp = client.security.create_service_token(\n namespace=\"elastic\",\n service=\"fleet-server\",\n name=\"token1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.createServiceToken({\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.create_service_token(\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->createServiceToken([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n \"name\" => \"token1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token1\"" + }, + { + "lang": "Java", + "source": "client.security().createServiceToken(c -> c\n .name(\"token1\")\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79656,6 +97662,36 @@ ], "x-api": "delete_service_token.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_security/service/elastic/fleet-server/credential/token/token42\n" + }, + { + "lang": "Python", + "source": "resp = client.security.delete_service_token(\n namespace=\"elastic\",\n service=\"fleet-server\",\n name=\"token42\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.deleteServiceToken({\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token42\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.delete_service_token(\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token42\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->deleteServiceToken([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n \"name\" => \"token42\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token42\"" + }, + { + "lang": "Java", + "source": "client.security().deleteServiceToken(d -> d\n .name(\"token42\")\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79753,6 +97789,36 @@ ], "x-api": "create_service_token.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/service/elastic/fleet-server/credential/token/token1\n" + }, + { + "lang": "Python", + "source": "resp = client.security.create_service_token(\n namespace=\"elastic\",\n service=\"fleet-server\",\n name=\"token1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.createServiceToken({\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.create_service_token(\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->createServiceToken([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n \"name\" => \"token1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token1\"" + }, + { + "lang": "Java", + "source": "client.security().createServiceToken(c -> c\n .name(\"token1\")\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79854,6 +97920,36 @@ ], "x-api": "delegate_pki.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/delegate_pki\n{\n\"x509_certificate_chain\": [\"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"]\n}" + }, + { + "lang": "Python", + "source": "resp = client.perform_request(\n \"POST\",\n \"/_security/delegate_pki\",\n headers={\"Content-Type\": \"application/json\"},\n body={\n \"x509_certificate_chain\": [\n \"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_security/delegate_pki\",\n body: {\n x509_certificate_chain: [\n \"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\",\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.perform_request(\n \"POST\",\n \"/_security/delegate_pki\",\n {},\n {\n \"x509_certificate_chain\": [\n \"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"\n ]\n },\n { \"Content-Type\": \"application/json\" },\n)" + }, + { + "lang": "PHP", + "source": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$streamFactory = Psr17FactoryDiscovery::findStreamFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_security/delegate_pki\",\n);\n$request = $request->withHeader(\"Content-Type\", \"application/json\");\n$request = $request->withBody($streamFactory->createStream(\n json_encode([\n \"x509_certificate_chain\" => array(\n \"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\",\n ),\n ]),\n));\n$resp = $client->sendRequest($request);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"x509_certificate_chain\":[\"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"]}' \"$ELASTICSEARCH_URL/_security/delegate_pki\"" + }, + { + "lang": "Java", + "source": "client.security().delegatePki(d -> d\n .x509CertificateChain(\"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -79931,6 +98027,36 @@ ], "x-api": "get_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/privilege/myapp/read\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_privileges(\n application=\"myapp\",\n name=\"read\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getPrivileges({\n application: \"myapp\",\n name: \"read\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_privileges(\n application: \"myapp\",\n name: \"read\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getPrivileges([\n \"application\" => \"myapp\",\n \"name\" => \"read\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/myapp/read\"" + }, + { + "lang": "Java", + "source": "client.security().getPrivileges(g -> g\n .application(\"myapp\")\n .name(\"read\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -80016,6 +98142,36 @@ ], "x-api": "delete_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_security/privilege/myapp/read\n" + }, + { + "lang": "Python", + "source": "resp = client.security.delete_privileges(\n application=\"myapp\",\n name=\"read\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.deletePrivileges({\n application: \"myapp\",\n name: \"read\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.delete_privileges(\n application: \"myapp\",\n name: \"read\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->deletePrivileges([\n \"application\" => \"myapp\",\n \"name\" => \"read\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/myapp/read\"" + }, + { + "lang": "Java", + "source": "client.security().deletePrivileges(d -> d\n .application(\"myapp\")\n .name(\"read\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -80075,6 +98231,36 @@ ], "x-api": "get_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/role/my_admin_role\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_role(\n name=\"my_admin_role\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getRole({\n name: \"my_admin_role\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_role(\n name: \"my_admin_role\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getRole([\n \"name\" => \"my_admin_role\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" + }, + { + "lang": "Java", + "source": "client.security().getRole(g -> g\n .name(\"my_admin_role\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -80260,6 +98446,36 @@ ], "x-api": "put_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/role/my_admin_role\n{\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [ \"index1\", \"index2\" ],\n \"privileges\": [\"all\"],\n \"field_security\" : { // optional\n \"grant\" : [ \"title\", \"body\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\" // optional\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [ \"admin\", \"read\" ],\n \"resources\": [ \"*\" ]\n }\n ],\n \"run_as\": [ \"other_user\" ], // optional\n \"metadata\" : { // optional\n \"version\" : 1\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.put_role(\n name=\"my_admin_role\",\n description=\"Grants full access to all management features within the cluster.\",\n cluster=[\n \"all\"\n ],\n indices=[\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n applications=[\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n run_as=[\n \"other_user\"\n ],\n metadata={\n \"version\": 1\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.putRole({\n name: \"my_admin_role\",\n description:\n \"Grants full access to all management features within the cluster.\",\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index1\", \"index2\"],\n privileges: [\"all\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.put_role(\n name: \"my_admin_role\",\n body: {\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->putRole([\n \"name\" => \"my_admin_role\",\n \"body\" => [\n \"description\" => \"Grants full access to all management features within the cluster.\",\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n \"index2\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Grants full access to all management features within the cluster.\",\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"privileges\":[\"all\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}' \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" + }, + { + "lang": "Java", + "source": "client.security().putRole(p -> p\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .cluster(\"all\")\n .description(\"Grants full access to all management features within the cluster.\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(List.of(\"index1\",\"index2\"))\n .privileges(\"all\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .name(\"my_admin_role\")\n .runAs(\"other_user\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -80445,6 +98661,36 @@ ], "x-api": "put_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/role/my_admin_role\n{\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [ \"index1\", \"index2\" ],\n \"privileges\": [\"all\"],\n \"field_security\" : { // optional\n \"grant\" : [ \"title\", \"body\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\" // optional\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [ \"admin\", \"read\" ],\n \"resources\": [ \"*\" ]\n }\n ],\n \"run_as\": [ \"other_user\" ], // optional\n \"metadata\" : { // optional\n \"version\" : 1\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.put_role(\n name=\"my_admin_role\",\n description=\"Grants full access to all management features within the cluster.\",\n cluster=[\n \"all\"\n ],\n indices=[\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n applications=[\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n run_as=[\n \"other_user\"\n ],\n metadata={\n \"version\": 1\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.putRole({\n name: \"my_admin_role\",\n description:\n \"Grants full access to all management features within the cluster.\",\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index1\", \"index2\"],\n privileges: [\"all\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.put_role(\n name: \"my_admin_role\",\n body: {\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->putRole([\n \"name\" => \"my_admin_role\",\n \"body\" => [\n \"description\" => \"Grants full access to all management features within the cluster.\",\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n \"index2\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Grants full access to all management features within the cluster.\",\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"privileges\":[\"all\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}' \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" + }, + { + "lang": "Java", + "source": "client.security().putRole(p -> p\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .cluster(\"all\")\n .description(\"Grants full access to all management features within the cluster.\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(List.of(\"index1\",\"index2\"))\n .privileges(\"all\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .name(\"my_admin_role\")\n .runAs(\"other_user\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -80518,6 +98764,36 @@ ], "x-api": "delete_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_security/role/my_admin_role\n" + }, + { + "lang": "Python", + "source": "resp = client.security.delete_role(\n name=\"my_admin_role\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.deleteRole({\n name: \"my_admin_role\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.delete_role(\n name: \"my_admin_role\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->deleteRole([\n \"name\" => \"my_admin_role\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" + }, + { + "lang": "Java", + "source": "client.security().deleteRole(d -> d\n .name(\"my_admin_role\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -80581,6 +98857,36 @@ ], "x-api": "get_role_mapping.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/role_mapping/mapping1\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_role_mapping(\n name=\"mapping1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getRoleMapping({\n name: \"mapping1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_role_mapping(\n name: \"mapping1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getRoleMapping([\n \"name\" => \"mapping1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role_mapping/mapping1\"" + }, + { + "lang": "Java", + "source": "client.security().getRoleMapping(g -> g\n .name(\"mapping1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -80764,189 +99070,249 @@ ], "x-api": "put_role_mapping.security", "x-category": "security", - "x-metaTags": [ + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/role_mapping/mapping1\n{\n \"roles\": [ \"user\"],\n \"enabled\": true, \n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { \n \"version\" : 1\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.put_role_mapping(\n name=\"mapping1\",\n roles=[\n \"user\"\n ],\n enabled=True,\n rules={\n \"field\": {\n \"username\": \"*\"\n }\n },\n metadata={\n \"version\": 1\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.putRoleMapping({\n name: \"mapping1\",\n roles: [\"user\"],\n enabled: true,\n rules: {\n field: {\n username: \"*\",\n },\n },\n metadata: {\n version: 1,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.put_role_mapping(\n name: \"mapping1\",\n body: {\n \"roles\": [\n \"user\"\n ],\n \"enabled\": true,\n \"rules\": {\n \"field\": {\n \"username\": \"*\"\n }\n },\n \"metadata\": {\n \"version\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping1\",\n \"body\" => [\n \"roles\" => array(\n \"user\",\n ),\n \"enabled\" => true,\n \"rules\" => [\n \"field\" => [\n \"username\" => \"*\",\n ],\n ],\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"user\"],\"enabled\":true,\"rules\":{\"field\":{\"username\":\"*\"}},\"metadata\":{\"version\":1}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping1\"" + }, + { + "lang": "Java", + "source": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .name(\"mapping1\")\n .roles(\"user\")\n .rules(r -> r\n .field(NamedValue.of(\"username\",List.of(FieldValue.of(\"*\"))))\n )\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "security" + ], + "summary": "Create or update role mappings", + "description": "Role mappings define which roles are assigned to each user.\nEach mapping has rules that identify users and a list of roles that are granted to those users.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.\n\nNOTE: This API does not create roles. Rather, it maps users to existing roles.\nRoles can be created by using the create or update roles API or roles files.\n\n**Role templates**\n\nThe most common use for role mappings is to create a mapping from a known value on the user to a fixed role name.\nFor example, all users in the `cn=admin,dc=example,dc=com` LDAP group should be given the superuser role in Elasticsearch.\nThe `roles` field is used for this purpose.\n\nFor more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user.\nThe `role_templates` field is used for this purpose.\n\nNOTE: To use role templates successfully, the relevant scripting feature must be enabled.\nOtherwise, all attempts to create a role mapping with role templates fail.\n\nAll of the user fields that are available in the role mapping rules are also available in the role templates.\nThus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated.\n\nBy default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user.\nIf the format of the template is set to \"json\" then the template is expected to produce a JSON string or an array of JSON strings for the role names.", + "externalDocs": { + "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-role-mapping.html" + }, + "operationId": "security-put-role-mapping-1", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The distinct name that identifies the role mapping.\nThe 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.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Name" + }, + "style": "simple" + }, + { + "in": "query", + "name": "refresh", + "description": "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "description": "Mappings that have `enabled` set to `false` are ignored when role mapping is performed.", + "type": "boolean" + }, + "metadata": { + "description": "Additional metadata that helps define which roles are assigned to each user.\nWithin the metadata object, keys beginning with `_` are reserved for system usage.", + "allOf": [ + { + "$ref": "#/components/schemas/_types.Metadata" + } + ] + }, + "roles": { + "description": "A list of role names that are granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", + "type": "array", + "items": { + "type": "string" + } + }, + "role_templates": { + "description": "A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types.RoleTemplate" + } + }, + "rules": { + "description": "The rules that determine which users should be matched by the mapping.\nA rule is a logical condition that is expressed by using a JSON DSL.", + "allOf": [ + { + "$ref": "#/components/schemas/security._types.RoleMappingRule" + } + ] + }, + "run_as": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "SecurityPutRoleMappingRequestExample1": { + "summary": "Roles for all users", + "description": "Run `POST /_security/role_mapping/mapping1` to assign the `user` role to all users.\n", + "value": "{\n \"roles\": [ \"user\"],\n \"enabled\": true, \n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { \n \"version\" : 1\n }\n}" + }, + "SecurityPutRoleMappingRequestExample2": { + "summary": "Roles for specific users", + "description": "Run `POST /_security/role_mapping/mapping2` to assign the \"user\" and \"admin\" roles to specific users.\n", + "value": "{\n \"roles\": [ \"user\", \"admin\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"username\" : [ \"esadmin01\", \"esadmin02\" ] }\n }\n}" + }, + "SecurityPutRoleMappingRequestExample3": { + "summary": "Roles for specific realms", + "description": "Run `POST /_security/role_mapping/mapping3` to match users who authenticated against a specific realm.\n", + "value": "{\n \"roles\": [ \"ldap-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"realm.name\" : \"ldap1\" }\n }\n}" + }, + "SecurityPutRoleMappingRequestExample4": { + "summary": "Roles for specific groups", + "description": "Run `POST /_security/role_mapping/mapping4` to match any user where either the username is `esadmin` or the user is in the `cn=admin,dc=example,dc=com group`. This example is useful when the group names in your identity management system (such as Active Directory, or a SAML Identity Provider) do not have a one-to-one correspondence with the names of roles in Elasticsearch. The role mapping is the means by which you link a group name with a role name.\n", + "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample5": { + "summary": "Roles for multiple groups", + "description": "Run `POST /_security/role_mapping/mapping5` to use an array syntax for the groups field when there are multiple groups. This pattern matches any of the groups (rather than all of the groups).\n", + "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" + }, + "SecurityPutRoleMappingRequestExample6": { + "summary": "Templated roles for groups", + "description": "Run `POST /_security/role_mapping/mapping6` for rare cases when the names of your groups may be an exact match for the names of your Elasticsearch roles. This can be the case when your SAML Identity Provider includes its own \"group mapping\" feature and can be configured to release Elasticsearch role names in the user's SAML attributes. In these cases it is possible to use a template that treats the group names as role names.\nNOTE: This should only be done if you intend to define roles for all of the provided groups. Mapping a user to a large number of unnecessary or undefined roles is inefficient and can have a negative effect on system performance. If you only need to map a subset of the groups, you should do it by using explicit mappings.\nThe `tojson` mustache function is used to convert the list of group names into a valid JSON array. Because the template produces a JSON array, the `format` must be set to `json`.\n", + "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" + }, + "SecurityPutRoleMappingRequestExample7": { + "summary": "Users in a LDAP sub-tree and realm", + "description": "Run `POST /_security/role_mapping/mapping7` to match users within a particular LDAP sub-tree in a specific realm.\n", + "value": "{\n \"roles\": [ \"ldap-example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n { \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" } },\n { \"field\" : { \"realm.name\" : \"ldap1\" } }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample8": { + "summary": "Complex roles", + "description": "Run `POST /_security/role_mapping/mapping8` to assign rules that are complex and include wildcard matching. For example, this mapping matches any user where all of these conditions are met: the Distinguished Name matches the pattern `*,ou=admin,dc=example,dc=com`, or the `username` is `es-admin`, or the `username` is `es-system`; the user is in the `cn=people,dc=example,dc=com` group; the user does not have a `terminated_date`.\n", + "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [ \"es-admin\", \"es-system\" ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": null\n }\n }\n }\n ]\n }\n}" + }, + "SecurityPutRoleMappingRequestExample9": { + "summary": "Templated roles", + "description": "Run `POST /_security/role_mapping/mapping9` to use templated roles to automatically map every user to their own custom role. In this example every user who authenticates using the `cloud-saml` realm will be automatically mapped to two roles: the `saml_user` role and a role that is their username prefixed with `_user_`. For example, the user `nwong` would be assigned the `saml_user` and `_user_nwong` roles.\n", + "value": "{\n \"rules\": { \"field\": { \"realm.name\": \"cloud-saml\" } },\n \"role_templates\": [\n { \"template\": { \"source\" : \"saml_user\" } }, \n { \"template\": { \"source\" : \"_user_{{username}}\" } }\n ],\n \"enabled\": true\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "role_mapping": { + "allOf": [ + { + "$ref": "#/components/schemas/security._types.CreatedStatus" + } + ] + } + }, + "required": [ + "role_mapping" + ] + }, + "examples": { + "SecurityPutRoleMappingResponseExample1": { + "description": "A successful response from `POST /_security/role_mapping/mapping1`.", + "value": "{\n \"role_mapping\" : {\n \"created\" : true \n }\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 5.5.0", + "x-variations": [ + "
\n PUT\n /_security/role_mapping/{name}\n
\n ", + "
\n POST\n /_security/role_mapping/{name}\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_security`\n" + ], + "x-api": "put_role_mapping.security", + "x-category": "security", + "x-codeSamples": [ { - "content": "Elasticsearch", - "name": "product_name" - } - ] - }, - "post": { - "tags": [ - "security" - ], - "summary": "Create or update role mappings", - "description": "Role mappings define which roles are assigned to each user.\nEach mapping has rules that identify users and a list of roles that are granted to those users.\nThe role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.\n\nNOTE: This API does not create roles. Rather, it maps users to existing roles.\nRoles can be created by using the create or update roles API or roles files.\n\n**Role templates**\n\nThe most common use for role mappings is to create a mapping from a known value on the user to a fixed role name.\nFor example, all users in the `cn=admin,dc=example,dc=com` LDAP group should be given the superuser role in Elasticsearch.\nThe `roles` field is used for this purpose.\n\nFor more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user.\nThe `role_templates` field is used for this purpose.\n\nNOTE: To use role templates successfully, the relevant scripting feature must be enabled.\nOtherwise, all attempts to create a role mapping with role templates fail.\n\nAll of the user fields that are available in the role mapping rules are also available in the role templates.\nThus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated.\n\nBy default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user.\nIf the format of the template is set to \"json\" then the template is expected to produce a JSON string or an array of JSON strings for the role names.", - "externalDocs": { - "url": "https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles", - "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-role-mapping.html" - }, - "operationId": "security-put-role-mapping-1", - "parameters": [ + "lang": "Console", + "source": "POST /_security/role_mapping/mapping1\n{\n \"roles\": [ \"user\"],\n \"enabled\": true, \n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { \n \"version\" : 1\n }\n}" + }, { - "in": "path", - "name": "name", - "description": "The distinct name that identifies the role mapping.\nThe 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.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "simple" + "lang": "Python", + "source": "resp = client.security.put_role_mapping(\n name=\"mapping1\",\n roles=[\n \"user\"\n ],\n enabled=True,\n rules={\n \"field\": {\n \"username\": \"*\"\n }\n },\n metadata={\n \"version\": 1\n },\n)" }, { - "in": "query", - "name": "refresh", - "description": "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.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Refresh" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "description": "Mappings that have `enabled` set to `false` are ignored when role mapping is performed.", - "type": "boolean" - }, - "metadata": { - "description": "Additional metadata that helps define which roles are assigned to each user.\nWithin the metadata object, keys beginning with `_` are reserved for system usage.", - "allOf": [ - { - "$ref": "#/components/schemas/_types.Metadata" - } - ] - }, - "roles": { - "description": "A list of role names that are granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", - "type": "array", - "items": { - "type": "string" - } - }, - "role_templates": { - "description": "A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.\nExactly one of `roles` or `role_templates` must be specified.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types.RoleTemplate" - } - }, - "rules": { - "description": "The rules that determine which users should be matched by the mapping.\nA rule is a logical condition that is expressed by using a JSON DSL.", - "allOf": [ - { - "$ref": "#/components/schemas/security._types.RoleMappingRule" - } - ] - }, - "run_as": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "examples": { - "SecurityPutRoleMappingRequestExample1": { - "summary": "Roles for all users", - "description": "Run `POST /_security/role_mapping/mapping1` to assign the `user` role to all users.\n", - "value": "{\n \"roles\": [ \"user\"],\n \"enabled\": true, \n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { \n \"version\" : 1\n }\n}" - }, - "SecurityPutRoleMappingRequestExample2": { - "summary": "Roles for specific users", - "description": "Run `POST /_security/role_mapping/mapping2` to assign the \"user\" and \"admin\" roles to specific users.\n", - "value": "{\n \"roles\": [ \"user\", \"admin\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"username\" : [ \"esadmin01\", \"esadmin02\" ] }\n }\n}" - }, - "SecurityPutRoleMappingRequestExample3": { - "summary": "Roles for specific realms", - "description": "Run `POST /_security/role_mapping/mapping3` to match users who authenticated against a specific realm.\n", - "value": "{\n \"roles\": [ \"ldap-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"realm.name\" : \"ldap1\" }\n }\n}" - }, - "SecurityPutRoleMappingRequestExample4": { - "summary": "Roles for specific groups", - "description": "Run `POST /_security/role_mapping/mapping4` to match any user where either the username is `esadmin` or the user is in the `cn=admin,dc=example,dc=com group`. This example is useful when the group names in your identity management system (such as Active Directory, or a SAML Identity Provider) do not have a one-to-one correspondence with the names of roles in Elasticsearch. The role mapping is the means by which you link a group name with a role name.\n", - "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n }\n}" - }, - "SecurityPutRoleMappingRequestExample5": { - "summary": "Roles for multiple groups", - "description": "Run `POST /_security/role_mapping/mapping5` to use an array syntax for the groups field when there are multiple groups. This pattern matches any of the groups (rather than all of the groups).\n", - "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" - }, - "SecurityPutRoleMappingRequestExample6": { - "summary": "Templated roles for groups", - "description": "Run `POST /_security/role_mapping/mapping6` for rare cases when the names of your groups may be an exact match for the names of your Elasticsearch roles. This can be the case when your SAML Identity Provider includes its own \"group mapping\" feature and can be configured to release Elasticsearch role names in the user's SAML attributes. In these cases it is possible to use a template that treats the group names as role names.\nNOTE: This should only be done if you intend to define roles for all of the provided groups. Mapping a user to a large number of unnecessary or undefined roles is inefficient and can have a negative effect on system performance. If you only need to map a subset of the groups, you should do it by using explicit mappings.\nThe `tojson` mustache function is used to convert the list of group names into a valid JSON array. Because the template produces a JSON array, the `format` must be set to `json`.\n", - "value": "{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, \n \"format\" : \"json\" \n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}" - }, - "SecurityPutRoleMappingRequestExample7": { - "summary": "Users in a LDAP sub-tree and realm", - "description": "Run `POST /_security/role_mapping/mapping7` to match users within a particular LDAP sub-tree in a specific realm.\n", - "value": "{\n \"roles\": [ \"ldap-example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n { \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" } },\n { \"field\" : { \"realm.name\" : \"ldap1\" } }\n ]\n }\n}" - }, - "SecurityPutRoleMappingRequestExample8": { - "summary": "Complex roles", - "description": "Run `POST /_security/role_mapping/mapping8` to assign rules that are complex and include wildcard matching. For example, this mapping matches any user where all of these conditions are met: the Distinguished Name matches the pattern `*,ou=admin,dc=example,dc=com`, or the `username` is `es-admin`, or the `username` is `es-system`; the user is in the `cn=people,dc=example,dc=com` group; the user does not have a `terminated_date`.\n", - "value": "{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [ \"es-admin\", \"es-system\" ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": null\n }\n }\n }\n ]\n }\n}" - }, - "SecurityPutRoleMappingRequestExample9": { - "summary": "Templated roles", - "description": "Run `POST /_security/role_mapping/mapping9` to use templated roles to automatically map every user to their own custom role. In this example every user who authenticates using the `cloud-saml` realm will be automatically mapped to two roles: the `saml_user` role and a role that is their username prefixed with `_user_`. For example, the user `nwong` would be assigned the `saml_user` and `_user_nwong` roles.\n", - "value": "{\n \"rules\": { \"field\": { \"realm.name\": \"cloud-saml\" } },\n \"role_templates\": [\n { \"template\": { \"source\" : \"saml_user\" } }, \n { \"template\": { \"source\" : \"_user_{{username}}\" } }\n ],\n \"enabled\": true\n}" - } - } - } + "lang": "JavaScript", + "source": "const response = await client.security.putRoleMapping({\n name: \"mapping1\",\n roles: [\"user\"],\n enabled: true,\n rules: {\n field: {\n username: \"*\",\n },\n },\n metadata: {\n version: 1,\n },\n});" }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "created": { - "type": "boolean" - }, - "role_mapping": { - "allOf": [ - { - "$ref": "#/components/schemas/security._types.CreatedStatus" - } - ] - } - }, - "required": [ - "role_mapping" - ] - }, - "examples": { - "SecurityPutRoleMappingResponseExample1": { - "description": "A successful response from `POST /_security/role_mapping/mapping1`.", - "value": "{\n \"role_mapping\" : {\n \"created\" : true \n }\n}" - } - } - } - } + { + "lang": "Ruby", + "source": "response = client.security.put_role_mapping(\n name: \"mapping1\",\n body: {\n \"roles\": [\n \"user\"\n ],\n \"enabled\": true,\n \"rules\": {\n \"field\": {\n \"username\": \"*\"\n }\n },\n \"metadata\": {\n \"version\": 1\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping1\",\n \"body\" => [\n \"roles\" => array(\n \"user\",\n ),\n \"enabled\" => true,\n \"rules\" => [\n \"field\" => [\n \"username\" => \"*\",\n ],\n ],\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"user\"],\"enabled\":true,\"rules\":{\"field\":{\"username\":\"*\"}},\"metadata\":{\"version\":1}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping1\"" + }, + { + "lang": "Java", + "source": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .name(\"mapping1\")\n .roles(\"user\")\n .rules(r -> r\n .field(NamedValue.of(\"username\",List.of(FieldValue.of(\"*\"))))\n )\n);\n" } - }, - "x-state": "Generally available; Added in 5.5.0", - "x-variations": [ - "
\n PUT\n /_security/role_mapping/{name}\n
\n ", - "
\n POST\n /_security/role_mapping/{name}\n
\n " ], - "x-req-auth": [ - "Cluster privileges: `manage_security`\n" - ], - "x-api": "put_role_mapping.security", - "x-category": "security", "x-metaTags": [ { "content": "Elasticsearch", @@ -81024,6 +99390,36 @@ ], "x-api": "delete_role_mapping.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_security/role_mapping/mapping1\n" + }, + { + "lang": "Python", + "source": "resp = client.security.delete_role_mapping(\n name=\"mapping1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.deleteRoleMapping({\n name: \"mapping1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.delete_role_mapping(\n name: \"mapping1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->deleteRoleMapping([\n \"name\" => \"mapping1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role_mapping/mapping1\"" + }, + { + "lang": "Java", + "source": "client.security().deleteRoleMapping(d -> d\n .name(\"mapping1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81104,6 +99500,36 @@ ], "x-api": "get_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/user/jacknich?with_profile_uid=true\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_user(\n username=\"jacknich\",\n with_profile_uid=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getUser({\n username: \"jacknich\",\n with_profile_uid: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_user(\n username: \"jacknich\",\n with_profile_uid: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getUser([\n \"username\" => \"jacknich\",\n \"with_profile_uid\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/jacknich?with_profile_uid=true\"" + }, + { + "lang": "Java", + "source": "client.security().getUser(g -> g\n .username(\"jacknich\")\n .withProfileUid(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81262,6 +99688,36 @@ ], "x-api": "put_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/user/jacknich\n{\n \"password\" : \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\" : [ \"admin\", \"other_role1\" ],\n \"full_name\" : \"Jack Nicholson\",\n \"email\" : \"jacknich@example.com\",\n \"metadata\" : {\n \"intelligence\" : 7\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.put_user(\n username=\"jacknich\",\n password=\"l0ng-r4nd0m-p@ssw0rd\",\n roles=[\n \"admin\",\n \"other_role1\"\n ],\n full_name=\"Jack Nicholson\",\n email=\"jacknich@example.com\",\n metadata={\n \"intelligence\": 7\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.putUser({\n username: \"jacknich\",\n password: \"l0ng-r4nd0m-p@ssw0rd\",\n roles: [\"admin\", \"other_role1\"],\n full_name: \"Jack Nicholson\",\n email: \"jacknich@example.com\",\n metadata: {\n intelligence: 7,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.put_user(\n username: \"jacknich\",\n body: {\n \"password\": \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->putUser([\n \"username\" => \"jacknich\",\n \"body\" => [\n \"password\" => \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\" => array(\n \"admin\",\n \"other_role1\",\n ),\n \"full_name\" => \"Jack Nicholson\",\n \"email\" => \"jacknich@example.com\",\n \"metadata\" => [\n \"intelligence\" => 7,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"password\":\"l0ng-r4nd0m-p@ssw0rd\",\"roles\":[\"admin\",\"other_role1\"],\"full_name\":\"Jack Nicholson\",\"email\":\"jacknich@example.com\",\"metadata\":{\"intelligence\":7}}' \"$ELASTICSEARCH_URL/_security/user/jacknich\"" + }, + { + "lang": "Java", + "source": "client.security().putUser(p -> p\n .email(\"jacknich@example.com\")\n .fullName(\"Jack Nicholson\")\n .metadata(\"intelligence\", JsonData.fromJson(\"7\"))\n .password(\"l0ng-r4nd0m-p@ssw0rd\")\n .roles(List.of(\"admin\",\"other_role1\"))\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81420,6 +99876,36 @@ ], "x-api": "put_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/user/jacknich\n{\n \"password\" : \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\" : [ \"admin\", \"other_role1\" ],\n \"full_name\" : \"Jack Nicholson\",\n \"email\" : \"jacknich@example.com\",\n \"metadata\" : {\n \"intelligence\" : 7\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.put_user(\n username=\"jacknich\",\n password=\"l0ng-r4nd0m-p@ssw0rd\",\n roles=[\n \"admin\",\n \"other_role1\"\n ],\n full_name=\"Jack Nicholson\",\n email=\"jacknich@example.com\",\n metadata={\n \"intelligence\": 7\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.putUser({\n username: \"jacknich\",\n password: \"l0ng-r4nd0m-p@ssw0rd\",\n roles: [\"admin\", \"other_role1\"],\n full_name: \"Jack Nicholson\",\n email: \"jacknich@example.com\",\n metadata: {\n intelligence: 7,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.put_user(\n username: \"jacknich\",\n body: {\n \"password\": \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->putUser([\n \"username\" => \"jacknich\",\n \"body\" => [\n \"password\" => \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\" => array(\n \"admin\",\n \"other_role1\",\n ),\n \"full_name\" => \"Jack Nicholson\",\n \"email\" => \"jacknich@example.com\",\n \"metadata\" => [\n \"intelligence\" => 7,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"password\":\"l0ng-r4nd0m-p@ssw0rd\",\"roles\":[\"admin\",\"other_role1\"],\"full_name\":\"Jack Nicholson\",\"email\":\"jacknich@example.com\",\"metadata\":{\"intelligence\":7}}' \"$ELASTICSEARCH_URL/_security/user/jacknich\"" + }, + { + "lang": "Java", + "source": "client.security().putUser(p -> p\n .email(\"jacknich@example.com\")\n .fullName(\"Jack Nicholson\")\n .metadata(\"intelligence\", JsonData.fromJson(\"7\"))\n .password(\"l0ng-r4nd0m-p@ssw0rd\")\n .roles(List.of(\"admin\",\"other_role1\"))\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81493,6 +99979,36 @@ ], "x-api": "delete_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_security/user/jacknich\n" + }, + { + "lang": "Python", + "source": "resp = client.security.delete_user(\n username=\"jacknich\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.deleteUser({\n username: \"jacknich\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.delete_user(\n username: \"jacknich\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->deleteUser([\n \"username\" => \"jacknich\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/jacknich\"" + }, + { + "lang": "Java", + "source": "client.security().deleteUser(d -> d\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81554,6 +100070,36 @@ ], "x-api": "disable_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_security/user/jacknich/_disable\n" + }, + { + "lang": "Python", + "source": "resp = client.security.disable_user(\n username=\"jacknich\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.disableUser({\n username: \"jacknich\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.disable_user(\n username: \"jacknich\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->disableUser([\n \"username\" => \"jacknich\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/jacknich/_disable\"" + }, + { + "lang": "Java", + "source": "client.security().disableUser(d -> d\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81613,6 +100159,36 @@ ], "x-api": "disable_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_security/user/jacknich/_disable\n" + }, + { + "lang": "Python", + "source": "resp = client.security.disable_user(\n username=\"jacknich\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.disableUser({\n username: \"jacknich\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.disable_user(\n username: \"jacknich\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->disableUser([\n \"username\" => \"jacknich\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/jacknich/_disable\"" + }, + { + "lang": "Java", + "source": "client.security().disableUser(d -> d\n .username(\"jacknich\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81674,6 +100250,36 @@ ], "x-api": "disable_user_profile.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_disable\n" + }, + { + "lang": "Python", + "source": "resp = client.security.disable_user_profile(\n uid=\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.disableUserProfile({\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.disable_user_profile(\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->disableUserProfile([\n \"uid\" => \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_disable\"" + }, + { + "lang": "Java", + "source": "client.security().disableUserProfile(d -> d\n .uid(\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81733,6 +100339,36 @@ ], "x-api": "disable_user_profile.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_disable\n" + }, + { + "lang": "Python", + "source": "resp = client.security.disable_user_profile(\n uid=\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.disableUserProfile({\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.disable_user_profile(\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->disableUserProfile([\n \"uid\" => \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_disable\"" + }, + { + "lang": "Java", + "source": "client.security().disableUserProfile(d -> d\n .uid(\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81794,6 +100430,36 @@ ], "x-api": "enable_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _security/user/logstash_system/_enable\n" + }, + { + "lang": "Python", + "source": "resp = client.security.enable_user(\n username=\"logstash_system\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.enableUser({\n username: \"logstash_system\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.enable_user(\n username: \"logstash_system\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->enableUser([\n \"username\" => \"logstash_system\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/logstash_system/_enable\"" + }, + { + "lang": "Java", + "source": "client.security().enableUser(e -> e\n .username(\"logstash_system\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81853,6 +100519,36 @@ ], "x-api": "enable_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _security/user/logstash_system/_enable\n" + }, + { + "lang": "Python", + "source": "resp = client.security.enable_user(\n username=\"logstash_system\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.enableUser({\n username: \"logstash_system\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.enable_user(\n username: \"logstash_system\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->enableUser([\n \"username\" => \"logstash_system\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/logstash_system/_enable\"" + }, + { + "lang": "Java", + "source": "client.security().enableUser(e -> e\n .username(\"logstash_system\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81914,6 +100610,36 @@ ], "x-api": "enable_user_profile.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_enable\n" + }, + { + "lang": "Python", + "source": "resp = client.security.enable_user_profile(\n uid=\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.enableUserProfile({\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.enable_user_profile(\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->enableUserProfile([\n \"uid\" => \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_enable\"" + }, + { + "lang": "Java", + "source": "client.security().enableUserProfile(e -> e\n .uid(\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -81973,6 +100699,36 @@ ], "x-api": "enable_user_profile.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_enable\n" + }, + { + "lang": "Python", + "source": "resp = client.security.enable_user_profile(\n uid=\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.enableUserProfile({\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.enable_user_profile(\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->enableUserProfile([\n \"uid\" => \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_enable\"" + }, + { + "lang": "Java", + "source": "client.security().enableUserProfile(e -> e\n .uid(\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82030,6 +100786,36 @@ ], "x-api": "enroll_kibana.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/enroll/kibana\n" + }, + { + "lang": "Python", + "source": "resp = client.security.enroll_kibana()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.enrollKibana();" + }, + { + "lang": "Ruby", + "source": "response = client.security.enroll_kibana" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->enrollKibana();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/enroll/kibana\"" + }, + { + "lang": "Java", + "source": "client.security().enrollKibana();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82183,6 +100969,36 @@ ], "x-api": "get_builtin_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/privilege/_builtin\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_builtin_privileges()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getBuiltinPrivileges();" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_builtin_privileges" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getBuiltinPrivileges();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/_builtin\"" + }, + { + "lang": "Java", + "source": "client.security().getBuiltinPrivileges();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82236,6 +101052,36 @@ ], "x-api": "get_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/privilege/myapp/read\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_privileges(\n application=\"myapp\",\n name=\"read\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getPrivileges({\n application: \"myapp\",\n name: \"read\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_privileges(\n application: \"myapp\",\n name: \"read\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getPrivileges([\n \"application\" => \"myapp\",\n \"name\" => \"read\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/myapp/read\"" + }, + { + "lang": "Java", + "source": "client.security().getPrivileges(g -> g\n .application(\"myapp\")\n .name(\"read\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82332,6 +101178,36 @@ ], "x-api": "put_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_security/privilege\n{\n \"myapp\": {\n \"read\": {\n \"actions\": [ \n \"data:read/*\" , \n \"action:login\" ],\n \"metadata\": { \n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.put_privileges(\n privileges={\n \"myapp\": {\n \"read\": {\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.putPrivileges({\n privileges: {\n myapp: {\n read: {\n actions: [\"data:read/*\", \"action:login\"],\n metadata: {\n description: \"Read access to myapp\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.put_privileges(\n body: {\n \"myapp\": {\n \"read\": {\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->putPrivileges([\n \"body\" => [\n \"myapp\" => [\n \"read\" => [\n \"actions\" => array(\n \"data:read/*\",\n \"action:login\",\n ),\n \"metadata\" => [\n \"description\" => \"Read access to myapp\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"myapp\":{\"read\":{\"actions\":[\"data:read/*\",\"action:login\"],\"metadata\":{\"description\":\"Read access to myapp\"}}}}' \"$ELASTICSEARCH_URL/_security/privilege\"" + }, + { + "lang": "Java", + "source": "client.security().putPrivileges(p -> p\n .privileges(\"myapp\", Map.of(\"read\", Actions.of(a -> a\n .actions(List.of(\"data:read/*\",\"action:login\"))\n .metadata(\"description\", JsonData.fromJson(\"\\\"Read access to myapp\\\"\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82428,6 +101304,36 @@ ], "x-api": "put_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_security/privilege\n{\n \"myapp\": {\n \"read\": {\n \"actions\": [ \n \"data:read/*\" , \n \"action:login\" ],\n \"metadata\": { \n \"description\": \"Read access to myapp\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.put_privileges(\n privileges={\n \"myapp\": {\n \"read\": {\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.putPrivileges({\n privileges: {\n myapp: {\n read: {\n actions: [\"data:read/*\", \"action:login\"],\n metadata: {\n description: \"Read access to myapp\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.put_privileges(\n body: {\n \"myapp\": {\n \"read\": {\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->putPrivileges([\n \"body\" => [\n \"myapp\" => [\n \"read\" => [\n \"actions\" => array(\n \"data:read/*\",\n \"action:login\",\n ),\n \"metadata\" => [\n \"description\" => \"Read access to myapp\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"myapp\":{\"read\":{\"actions\":[\"data:read/*\",\"action:login\"],\"metadata\":{\"description\":\"Read access to myapp\"}}}}' \"$ELASTICSEARCH_URL/_security/privilege\"" + }, + { + "lang": "Java", + "source": "client.security().putPrivileges(p -> p\n .privileges(\"myapp\", Map.of(\"read\", Actions.of(a -> a\n .actions(List.of(\"data:read/*\",\"action:login\"))\n .metadata(\"description\", JsonData.fromJson(\"\\\"Read access to myapp\\\"\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82494,6 +101400,36 @@ ], "x-api": "get_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/privilege/myapp/read\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_privileges(\n application=\"myapp\",\n name=\"read\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getPrivileges({\n application: \"myapp\",\n name: \"read\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_privileges(\n application: \"myapp\",\n name: \"read\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getPrivileges([\n \"application\" => \"myapp\",\n \"name\" => \"read\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/myapp/read\"" + }, + { + "lang": "Java", + "source": "client.security().getPrivileges(g -> g\n .application(\"myapp\")\n .name(\"read\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82544,6 +101480,36 @@ ], "x-api": "get_role_mapping.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/role_mapping/mapping1\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_role_mapping(\n name=\"mapping1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getRoleMapping({\n name: \"mapping1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_role_mapping(\n name: \"mapping1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getRoleMapping([\n \"name\" => \"mapping1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role_mapping/mapping1\"" + }, + { + "lang": "Java", + "source": "client.security().getRoleMapping(g -> g\n .name(\"mapping1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82618,6 +101584,36 @@ ], "x-api": "get_service_accounts.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/service/elastic/fleet-server\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_service_accounts(\n namespace=\"elastic\",\n service=\"fleet-server\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getServiceAccounts({\n namespace: \"elastic\",\n service: \"fleet-server\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_service_accounts(\n namespace: \"elastic\",\n service: \"fleet-server\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getServiceAccounts([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server\"" + }, + { + "lang": "Java", + "source": "client.security().getServiceAccounts(g -> g\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82681,6 +101677,36 @@ ], "x-api": "get_service_accounts.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/service/elastic/fleet-server\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_service_accounts(\n namespace=\"elastic\",\n service=\"fleet-server\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getServiceAccounts({\n namespace: \"elastic\",\n service: \"fleet-server\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_service_accounts(\n namespace: \"elastic\",\n service: \"fleet-server\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getServiceAccounts([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server\"" + }, + { + "lang": "Java", + "source": "client.security().getServiceAccounts(g -> g\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82731,6 +101757,36 @@ ], "x-api": "get_service_accounts.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/service/elastic/fleet-server\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_service_accounts(\n namespace=\"elastic\",\n service=\"fleet-server\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getServiceAccounts({\n namespace: \"elastic\",\n service: \"fleet-server\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_service_accounts(\n namespace: \"elastic\",\n service: \"fleet-server\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getServiceAccounts([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server\"" + }, + { + "lang": "Java", + "source": "client.security().getServiceAccounts(g -> g\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82830,6 +101886,36 @@ ], "x-api": "get_service_credentials.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/service/elastic/fleet-server/credential\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_service_credentials(\n namespace=\"elastic\",\n service=\"fleet-server\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getServiceCredentials({\n namespace: \"elastic\",\n service: \"fleet-server\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_service_credentials(\n namespace: \"elastic\",\n service: \"fleet-server\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getServiceCredentials([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential\"" + }, + { + "lang": "Java", + "source": "client.security().getServiceCredentials(g -> g\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -82910,6 +101996,36 @@ ], "x-api": "get_settings.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/settings\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_settings()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getSettings();" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_settings" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getSettings();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/settings\"" + }, + { + "lang": "Java", + "source": "client.security().getSettings(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -83017,6 +102133,36 @@ ], "x-api": "update_settings.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_security/settings\n{\n \"security\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-tokens\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-profile\": {\n \"index.auto_expand_replicas\": \"0-all\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.update_settings(\n security={\n \"index.auto_expand_replicas\": \"0-all\"\n },\n security-tokens={\n \"index.auto_expand_replicas\": \"0-all\"\n },\n security-profile={\n \"index.auto_expand_replicas\": \"0-all\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.updateSettings({\n security: {\n \"index.auto_expand_replicas\": \"0-all\",\n },\n \"security-tokens\": {\n \"index.auto_expand_replicas\": \"0-all\",\n },\n \"security-profile\": {\n \"index.auto_expand_replicas\": \"0-all\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.update_settings(\n body: {\n \"security\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-tokens\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-profile\": {\n \"index.auto_expand_replicas\": \"0-all\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->updateSettings([\n \"body\" => [\n \"security\" => [\n \"index.auto_expand_replicas\" => \"0-all\",\n ],\n \"security-tokens\" => [\n \"index.auto_expand_replicas\" => \"0-all\",\n ],\n \"security-profile\" => [\n \"index.auto_expand_replicas\" => \"0-all\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"security\":{\"index.auto_expand_replicas\":\"0-all\"},\"security-tokens\":{\"index.auto_expand_replicas\":\"0-all\"},\"security-profile\":{\"index.auto_expand_replicas\":\"0-all\"}}' \"$ELASTICSEARCH_URL/_security/settings\"" + }, + { + "lang": "Java", + "source": "client.security().updateSettings(u -> u\n .security(s -> s)\n .securityProfile(s -> s)\n .securityTokens(s -> s)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -83099,7 +102245,7 @@ "type": "object", "properties": { "grant_type": { - "description": "The type of grant.\nSupported grant types are: `password`, `_kerberos`, `client_credentials`, and `refresh_token`.", + "description": "The type of grant.\nSupported grant types are: `password`, `_kerberos`, `client_credentials`, and `refresh_token`.\n\nSupported values include:\n - `password`: This grant type implements the Resource Owner Password Credentials Grant of OAuth2.\nIn this grant, a trusted client exchanges the end user's credentials for an access token and (possibly) a refresh token.\nThe request needs to be made by an authenticated user but happens on behalf of another authenticated user (the one whose credentials are passed as request parameters).\nThis grant type is not suitable or designed for the self-service user creation of tokens.\n - `client_credentials`: This grant type implements the Client Credentials Grant of OAuth2.\nIt is geared for machine to machine communication and is not suitable or designed for the self-service user creation of tokens.\nIt generates only access tokens that cannot be refreshed.\nThe premise is that the entity that uses `client_credentials` has constant access to a set of (client, not end-user) credentials and can authenticate itself at will.\n - `_kerberos`: This grant type is supported internally and implements SPNEGO based Kerberos support.\nThe `_kerberos` grant type may change from version to version.\n - `refresh_token`: This grant type implements the Refresh Token Grant of OAuth2.\nIn this grant a user exchanges a previously issued refresh token for a new access token and a new refresh token.\n\n", "allOf": [ { "$ref": "#/components/schemas/security.get_token.AccessTokenGrantType" @@ -83218,6 +102364,36 @@ ], "x-api": "get_token.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"client_credentials\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.get_token(\n grant_type=\"client_credentials\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getToken({\n grant_type: \"client_credentials\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_token(\n body: {\n \"grant_type\": \"client_credentials\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getToken([\n \"body\" => [\n \"grant_type\" => \"client_credentials\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grant_type\":\"client_credentials\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "lang": "Java", + "source": "client.security().getToken(g -> g\n .grantType(AccessTokenGrantType.ClientCredentials)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -83345,6 +102521,36 @@ ], "x-api": "invalidate_token.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_security/oauth2/token\n{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.invalidate_token(\n token=\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.invalidateToken({\n token:\n \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.invalidate_token(\n body: {\n \"token\": \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->invalidateToken([\n \"body\" => [\n \"token\" => \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"token\":\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "lang": "Java", + "source": "client.security().invalidateToken(i -> i\n .token(\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -83404,6 +102610,36 @@ ], "x-api": "get_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/user/jacknich?with_profile_uid=true\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_user(\n username=\"jacknich\",\n with_profile_uid=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getUser({\n username: \"jacknich\",\n with_profile_uid: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_user(\n username: \"jacknich\",\n with_profile_uid: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getUser([\n \"username\" => \"jacknich\",\n \"with_profile_uid\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/jacknich?with_profile_uid=true\"" + }, + { + "lang": "Java", + "source": "client.security().getUser(g -> g\n .username(\"jacknich\")\n .withProfileUid(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -83495,6 +102731,36 @@ ], "x-api": "get_user_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/user/_privileges\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_user_privileges()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getUserPrivileges();" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_user_privileges" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getUserPrivileges();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/_privileges\"" + }, + { + "lang": "Java", + "source": "client.security().getUserPrivileges();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -83611,6 +102877,36 @@ ], "x-api": "get_user_profile.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\n" + }, + { + "lang": "Python", + "source": "resp = client.security.get_user_profile(\n uid=\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.getUserProfile({\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.get_user_profile(\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->getUserProfile([\n \"uid\" => \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"" + }, + { + "lang": "Java", + "source": "client.security().getUserProfile(g -> g\n .uid(\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -83767,6 +103063,36 @@ ], "x-api": "grant_api_key.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/api_key/grant\n{\n \"grant_type\": \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\",\n \"api_key\" : {\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\"dev\", \"staging\"]\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.grant_api_key(\n grant_type=\"password\",\n username=\"test_admin\",\n password=\"x-pack-test-password\",\n api_key={\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": True,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.grantApiKey({\n grant_type: \"password\",\n username: \"test_admin\",\n password: \"x-pack-test-password\",\n api_key: {\n name: \"my-api-key\",\n expiration: \"1d\",\n role_descriptors: {\n \"role-a\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-a*\"],\n privileges: [\"read\"],\n },\n ],\n },\n \"role-b\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-b*\"],\n privileges: [\"all\"],\n },\n ],\n },\n },\n metadata: {\n application: \"my-application\",\n environment: {\n level: 1,\n trusted: true,\n tags: [\"dev\", \"staging\"],\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.grant_api_key(\n body: {\n \"grant_type\": \"password\",\n \"username\": \"test_admin\",\n \"password\": \"x-pack-test-password\",\n \"api_key\": {\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->grantApiKey([\n \"body\" => [\n \"grant_type\" => \"password\",\n \"username\" => \"test_admin\",\n \"password\" => \"x-pack-test-password\",\n \"api_key\" => [\n \"name\" => \"my-api-key\",\n \"expiration\" => \"1d\",\n \"role_descriptors\" => [\n \"role-a\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-a*\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n ),\n ],\n \"role-b\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-b*\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"application\" => \"my-application\",\n \"environment\" => [\n \"level\" => 1,\n \"trusted\" => true,\n \"tags\" => array(\n \"dev\",\n \"staging\",\n ),\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grant_type\":\"password\",\"username\":\"test_admin\",\"password\":\"x-pack-test-password\",\"api_key\":{\"name\":\"my-api-key\",\"expiration\":\"1d\",\"role_descriptors\":{\"role-a\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-a*\"],\"privileges\":[\"read\"]}]},\"role-b\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-b*\"],\"privileges\":[\"all\"]}]}},\"metadata\":{\"application\":\"my-application\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}}}}' \"$ELASTICSEARCH_URL/_security/api_key/grant\"" + }, + { + "lang": "Java", + "source": "client.security().grantApiKey(g -> g\n .apiKey(a -> a\n .name(\"my-api-key\")\n .expiration(e -> e\n .time(\"1d\")\n )\n .roleDescriptors(Map.of(\"role-b\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-b*\")\n .privileges(\"all\")\n )\n ),\"role-a\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-a*\")\n .privileges(\"read\")\n )\n )))\n .metadata(Map.of(\"environment\", JsonData.fromJson(\"{\\\"level\\\":1,\\\"trusted\\\":true,\\\"tags\\\":[\\\"dev\\\",\\\"staging\\\"]}\"),\"application\", JsonData.fromJson(\"\\\"my-application\\\"\")))\n )\n .grantType(ApiKeyGrantType.Password)\n .password(\"x-pack-test-password\")\n .username(\"test_admin\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -83887,6 +103213,36 @@ ], "x-api": "has_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/user/_has_privileges\n{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.has_privileges(\n cluster=[\n \"monitor\",\n \"manage\"\n ],\n index=[\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n application=[\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.hasPrivileges({\n cluster: [\"monitor\", \"manage\"],\n index: [\n {\n names: [\"suppliers\", \"products\"],\n privileges: [\"read\"],\n },\n {\n names: [\"inventory\"],\n privileges: [\"read\", \"write\"],\n },\n ],\n application: [\n {\n application: \"inventory_manager\",\n privileges: [\"read\", \"data:write/inventory\"],\n resources: [\"product/1852563\"],\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.has_privileges(\n body: {\n \"cluster\": [\n \"monitor\",\n \"manage\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->hasPrivileges([\n \"body\" => [\n \"cluster\" => array(\n \"monitor\",\n \"manage\",\n ),\n \"index\" => array(\n [\n \"names\" => array(\n \"suppliers\",\n \"products\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n [\n \"names\" => array(\n \"inventory\",\n ),\n \"privileges\" => array(\n \"read\",\n \"write\",\n ),\n ],\n ),\n \"application\" => array(\n [\n \"application\" => \"inventory_manager\",\n \"privileges\" => array(\n \"read\",\n \"data:write/inventory\",\n ),\n \"resources\" => array(\n \"product/1852563\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"cluster\":[\"monitor\",\"manage\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"read\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}' \"$ELASTICSEARCH_URL/_security/user/_has_privileges\"" + }, + { + "lang": "Java", + "source": "client.security().hasPrivileges(h -> h\n .application(a -> a\n .application(\"inventory_manager\")\n .privileges(List.of(\"read\",\"data:write/inventory\"))\n .resources(\"product/1852563\")\n )\n .cluster(List.of(\"monitor\",\"manage\"))\n .index(List.of(IndexPrivilegesCheck.of(i -> i\n .names(List.of(\"suppliers\",\"products\"))\n .privileges(\"read\")\n ),IndexPrivilegesCheck.of(i -> i\n .names(\"inventory\")\n .privileges(List.of(\"read\",\"write\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84005,6 +103361,36 @@ ], "x-api": "has_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/user/_has_privileges\n{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.has_privileges(\n cluster=[\n \"monitor\",\n \"manage\"\n ],\n index=[\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n application=[\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.hasPrivileges({\n cluster: [\"monitor\", \"manage\"],\n index: [\n {\n names: [\"suppliers\", \"products\"],\n privileges: [\"read\"],\n },\n {\n names: [\"inventory\"],\n privileges: [\"read\", \"write\"],\n },\n ],\n application: [\n {\n application: \"inventory_manager\",\n privileges: [\"read\", \"data:write/inventory\"],\n resources: [\"product/1852563\"],\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.has_privileges(\n body: {\n \"cluster\": [\n \"monitor\",\n \"manage\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->hasPrivileges([\n \"body\" => [\n \"cluster\" => array(\n \"monitor\",\n \"manage\",\n ),\n \"index\" => array(\n [\n \"names\" => array(\n \"suppliers\",\n \"products\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n [\n \"names\" => array(\n \"inventory\",\n ),\n \"privileges\" => array(\n \"read\",\n \"write\",\n ),\n ],\n ),\n \"application\" => array(\n [\n \"application\" => \"inventory_manager\",\n \"privileges\" => array(\n \"read\",\n \"data:write/inventory\",\n ),\n \"resources\" => array(\n \"product/1852563\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"cluster\":[\"monitor\",\"manage\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"read\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}' \"$ELASTICSEARCH_URL/_security/user/_has_privileges\"" + }, + { + "lang": "Java", + "source": "client.security().hasPrivileges(h -> h\n .application(a -> a\n .application(\"inventory_manager\")\n .privileges(List.of(\"read\",\"data:write/inventory\"))\n .resources(\"product/1852563\")\n )\n .cluster(List.of(\"monitor\",\"manage\"))\n .index(List.of(IndexPrivilegesCheck.of(i -> i\n .names(List.of(\"suppliers\",\"products\"))\n .privileges(\"read\")\n ),IndexPrivilegesCheck.of(i -> i\n .names(\"inventory\")\n .privileges(List.of(\"read\",\"write\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84138,6 +103524,36 @@ ], "x-api": "has_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/user/_has_privileges\n{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.has_privileges(\n cluster=[\n \"monitor\",\n \"manage\"\n ],\n index=[\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n application=[\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.hasPrivileges({\n cluster: [\"monitor\", \"manage\"],\n index: [\n {\n names: [\"suppliers\", \"products\"],\n privileges: [\"read\"],\n },\n {\n names: [\"inventory\"],\n privileges: [\"read\", \"write\"],\n },\n ],\n application: [\n {\n application: \"inventory_manager\",\n privileges: [\"read\", \"data:write/inventory\"],\n resources: [\"product/1852563\"],\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.has_privileges(\n body: {\n \"cluster\": [\n \"monitor\",\n \"manage\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->hasPrivileges([\n \"body\" => [\n \"cluster\" => array(\n \"monitor\",\n \"manage\",\n ),\n \"index\" => array(\n [\n \"names\" => array(\n \"suppliers\",\n \"products\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n [\n \"names\" => array(\n \"inventory\",\n ),\n \"privileges\" => array(\n \"read\",\n \"write\",\n ),\n ],\n ),\n \"application\" => array(\n [\n \"application\" => \"inventory_manager\",\n \"privileges\" => array(\n \"read\",\n \"data:write/inventory\",\n ),\n \"resources\" => array(\n \"product/1852563\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"cluster\":[\"monitor\",\"manage\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"read\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}' \"$ELASTICSEARCH_URL/_security/user/_has_privileges\"" + }, + { + "lang": "Java", + "source": "client.security().hasPrivileges(h -> h\n .application(a -> a\n .application(\"inventory_manager\")\n .privileges(List.of(\"read\",\"data:write/inventory\"))\n .resources(\"product/1852563\")\n )\n .cluster(List.of(\"monitor\",\"manage\"))\n .index(List.of(IndexPrivilegesCheck.of(i -> i\n .names(List.of(\"suppliers\",\"products\"))\n .privileges(\"read\")\n ),IndexPrivilegesCheck.of(i -> i\n .names(\"inventory\")\n .privileges(List.of(\"read\",\"write\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84269,6 +103685,36 @@ ], "x-api": "has_privileges.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/user/_has_privileges\n{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.has_privileges(\n cluster=[\n \"monitor\",\n \"manage\"\n ],\n index=[\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n application=[\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.hasPrivileges({\n cluster: [\"monitor\", \"manage\"],\n index: [\n {\n names: [\"suppliers\", \"products\"],\n privileges: [\"read\"],\n },\n {\n names: [\"inventory\"],\n privileges: [\"read\", \"write\"],\n },\n ],\n application: [\n {\n application: \"inventory_manager\",\n privileges: [\"read\", \"data:write/inventory\"],\n resources: [\"product/1852563\"],\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.has_privileges(\n body: {\n \"cluster\": [\n \"monitor\",\n \"manage\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->hasPrivileges([\n \"body\" => [\n \"cluster\" => array(\n \"monitor\",\n \"manage\",\n ),\n \"index\" => array(\n [\n \"names\" => array(\n \"suppliers\",\n \"products\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n [\n \"names\" => array(\n \"inventory\",\n ),\n \"privileges\" => array(\n \"read\",\n \"write\",\n ),\n ],\n ),\n \"application\" => array(\n [\n \"application\" => \"inventory_manager\",\n \"privileges\" => array(\n \"read\",\n \"data:write/inventory\",\n ),\n \"resources\" => array(\n \"product/1852563\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"cluster\":[\"monitor\",\"manage\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"read\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}' \"$ELASTICSEARCH_URL/_security/user/_has_privileges\"" + }, + { + "lang": "Java", + "source": "client.security().hasPrivileges(h -> h\n .application(a -> a\n .application(\"inventory_manager\")\n .privileges(List.of(\"read\",\"data:write/inventory\"))\n .resources(\"product/1852563\")\n )\n .cluster(List.of(\"monitor\",\"manage\"))\n .index(List.of(IndexPrivilegesCheck.of(i -> i\n .names(List.of(\"suppliers\",\"products\"))\n .privileges(\"read\")\n ),IndexPrivilegesCheck.of(i -> i\n .names(\"inventory\")\n .privileges(List.of(\"read\",\"write\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84374,6 +103820,36 @@ ], "x-api": "has_privileges_user_profile.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/_has_privileges\n{\n \"uids\": [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n \"privileges\": {\n \"cluster\": [ \"monitor\", \"create_snapshot\", \"manage_ml\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"create_doc\"]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.has_privileges_user_profile(\n uids=[\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n privileges={\n \"cluster\": [\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"create_doc\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.hasPrivilegesUserProfile({\n uids: [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\",\n ],\n privileges: {\n cluster: [\"monitor\", \"create_snapshot\", \"manage_ml\"],\n index: [\n {\n names: [\"suppliers\", \"products\"],\n privileges: [\"create_doc\"],\n },\n {\n names: [\"inventory\"],\n privileges: [\"read\", \"write\"],\n },\n ],\n application: [\n {\n application: \"inventory_manager\",\n privileges: [\"read\", \"data:write/inventory\"],\n resources: [\"product/1852563\"],\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.has_privileges_user_profile(\n body: {\n \"uids\": [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n \"privileges\": {\n \"cluster\": [\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"create_doc\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->hasPrivilegesUserProfile([\n \"body\" => [\n \"uids\" => array(\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\",\n ),\n \"privileges\" => [\n \"cluster\" => array(\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\",\n ),\n \"index\" => array(\n [\n \"names\" => array(\n \"suppliers\",\n \"products\",\n ),\n \"privileges\" => array(\n \"create_doc\",\n ),\n ],\n [\n \"names\" => array(\n \"inventory\",\n ),\n \"privileges\" => array(\n \"read\",\n \"write\",\n ),\n ],\n ),\n \"application\" => array(\n [\n \"application\" => \"inventory_manager\",\n \"privileges\" => array(\n \"read\",\n \"data:write/inventory\",\n ),\n \"resources\" => array(\n \"product/1852563\",\n ),\n ],\n ),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"uids\":[\"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\"u_does-not-exist_0\"],\"privileges\":{\"cluster\":[\"monitor\",\"create_snapshot\",\"manage_ml\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"create_doc\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}}' \"$ELASTICSEARCH_URL/_security/profile/_has_privileges\"" + }, + { + "lang": "Java", + "source": "client.security().hasPrivilegesUserProfile(h -> h\n .privileges(p -> p\n .application(a -> a\n .application(\"inventory_manager\")\n .privileges(List.of(\"read\",\"data:write/inventory\"))\n .resources(\"product/1852563\")\n )\n .cluster(List.of(\"monitor\",\"create_snapshot\",\"manage_ml\"))\n .index(List.of(IndexPrivilegesCheck.of(i -> i\n .names(List.of(\"suppliers\",\"products\"))\n .privileges(\"create_doc\")\n ),IndexPrivilegesCheck.of(i -> i\n .names(\"inventory\")\n .privileges(List.of(\"read\",\"write\"))\n )))\n )\n .uids(List.of(\"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\"u_does-not-exist_0\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84477,6 +103953,36 @@ ], "x-api": "has_privileges_user_profile.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/_has_privileges\n{\n \"uids\": [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n \"privileges\": {\n \"cluster\": [ \"monitor\", \"create_snapshot\", \"manage_ml\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"create_doc\"]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.has_privileges_user_profile(\n uids=[\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n privileges={\n \"cluster\": [\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"create_doc\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.hasPrivilegesUserProfile({\n uids: [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\",\n ],\n privileges: {\n cluster: [\"monitor\", \"create_snapshot\", \"manage_ml\"],\n index: [\n {\n names: [\"suppliers\", \"products\"],\n privileges: [\"create_doc\"],\n },\n {\n names: [\"inventory\"],\n privileges: [\"read\", \"write\"],\n },\n ],\n application: [\n {\n application: \"inventory_manager\",\n privileges: [\"read\", \"data:write/inventory\"],\n resources: [\"product/1852563\"],\n },\n ],\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.has_privileges_user_profile(\n body: {\n \"uids\": [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n \"privileges\": {\n \"cluster\": [\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"create_doc\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->hasPrivilegesUserProfile([\n \"body\" => [\n \"uids\" => array(\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\",\n ),\n \"privileges\" => [\n \"cluster\" => array(\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\",\n ),\n \"index\" => array(\n [\n \"names\" => array(\n \"suppliers\",\n \"products\",\n ),\n \"privileges\" => array(\n \"create_doc\",\n ),\n ],\n [\n \"names\" => array(\n \"inventory\",\n ),\n \"privileges\" => array(\n \"read\",\n \"write\",\n ),\n ],\n ),\n \"application\" => array(\n [\n \"application\" => \"inventory_manager\",\n \"privileges\" => array(\n \"read\",\n \"data:write/inventory\",\n ),\n \"resources\" => array(\n \"product/1852563\",\n ),\n ],\n ),\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"uids\":[\"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\"u_does-not-exist_0\"],\"privileges\":{\"cluster\":[\"monitor\",\"create_snapshot\",\"manage_ml\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"create_doc\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}}' \"$ELASTICSEARCH_URL/_security/profile/_has_privileges\"" + }, + { + "lang": "Java", + "source": "client.security().hasPrivilegesUserProfile(h -> h\n .privileges(p -> p\n .application(a -> a\n .application(\"inventory_manager\")\n .privileges(List.of(\"read\",\"data:write/inventory\"))\n .resources(\"product/1852563\")\n )\n .cluster(List.of(\"monitor\",\"create_snapshot\",\"manage_ml\"))\n .index(List.of(IndexPrivilegesCheck.of(i -> i\n .names(List.of(\"suppliers\",\"products\"))\n .privileges(\"create_doc\")\n ),IndexPrivilegesCheck.of(i -> i\n .names(\"inventory\")\n .privileges(List.of(\"read\",\"write\"))\n )))\n )\n .uids(List.of(\"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\"u_does-not-exist_0\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84580,6 +104086,36 @@ ], "x-api": "oidc_authenticate.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/oidc/authenticate\n{\n \"redirect_uri\" : \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.oidc_authenticate(\n redirect_uri=\"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n state=\"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n nonce=\"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n realm=\"oidc1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.oidcAuthenticate({\n redirect_uri:\n \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n state: \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n nonce: \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n realm: \"oidc1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.oidc_authenticate(\n body: {\n \"redirect_uri\": \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\": \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\": \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\": \"oidc1\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->oidcAuthenticate([\n \"body\" => [\n \"redirect_uri\" => \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" => \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" => \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" => \"oidc1\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"redirect_uri\":\"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\"state\":\"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\"nonce\":\"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\"realm\":\"oidc1\"}' \"$ELASTICSEARCH_URL/_security/oidc/authenticate\"" + }, + { + "lang": "Java", + "source": "client.security().oidcAuthenticate(o -> o\n .nonce(\"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\")\n .realm(\"oidc1\")\n .redirectUri(\"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\")\n .state(\"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84658,6 +104194,36 @@ ], "x-api": "oidc_logout.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/oidc/logout\n{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.oidc_logout(\n token=\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n refresh_token=\"vLBPvmAB6KvwvJZr27cS\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.oidcLogout({\n token:\n \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n refresh_token: \"vLBPvmAB6KvwvJZr27cS\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.oidc_logout(\n body: {\n \"token\": \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->oidcLogout([\n \"body\" => [\n \"token\" => \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\" => \"vLBPvmAB6KvwvJZr27cS\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"token\":\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\"refresh_token\":\"vLBPvmAB6KvwvJZr27cS\"}' \"$ELASTICSEARCH_URL/_security/oidc/logout\"" + }, + { + "lang": "Java", + "source": "client.security().oidcLogout(o -> o\n .refreshToken(\"vLBPvmAB6KvwvJZr27cS\")\n .token(\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84768,6 +104334,36 @@ ], "x-api": "oidc_prepare_authentication.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/oidc/prepare\n{\n \"realm\" : \"oidc1\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.oidc_prepare_authentication(\n realm=\"oidc1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.oidcPrepareAuthentication({\n realm: \"oidc1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.oidc_prepare_authentication(\n body: {\n \"realm\": \"oidc1\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->oidcPrepareAuthentication([\n \"body\" => [\n \"realm\" => \"oidc1\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm\":\"oidc1\"}' \"$ELASTICSEARCH_URL/_security/oidc/prepare\"" + }, + { + "lang": "Java", + "source": "client.security().oidcPrepareAuthentication(o -> o\n .realm(\"oidc1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -84966,6 +104562,36 @@ ], "x-api": "query_api_keys.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/_query/api_key?with_limited_by=true\n{\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.query_api_keys(\n with_limited_by=True,\n query={\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.queryApiKeys({\n with_limited_by: \"true\",\n query: {\n ids: {\n values: [\"VuaCfGcBCdbkQm-e5aOx\"],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.query_api_keys(\n with_limited_by: \"true\",\n body: {\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->queryApiKeys([\n \"with_limited_by\" => \"true\",\n \"body\" => [\n \"query\" => [\n \"ids\" => [\n \"values\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"ids\":{\"values\":[\"VuaCfGcBCdbkQm-e5aOx\"]}}}' \"$ELASTICSEARCH_URL/_security/_query/api_key?with_limited_by=true\"" + }, + { + "lang": "Java", + "source": "client.security().queryApiKeys(q -> q\n .query(qu -> qu\n .ids(i -> i\n .values(\"VuaCfGcBCdbkQm-e5aOx\")\n )\n )\n .withLimitedBy(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -85162,6 +104788,36 @@ ], "x-api": "query_api_keys.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_security/_query/api_key?with_limited_by=true\n{\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.query_api_keys(\n with_limited_by=True,\n query={\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.queryApiKeys({\n with_limited_by: \"true\",\n query: {\n ids: {\n values: [\"VuaCfGcBCdbkQm-e5aOx\"],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.query_api_keys(\n with_limited_by: \"true\",\n body: {\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->queryApiKeys([\n \"with_limited_by\" => \"true\",\n \"body\" => [\n \"query\" => [\n \"ids\" => [\n \"values\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"ids\":{\"values\":[\"VuaCfGcBCdbkQm-e5aOx\"]}}}' \"$ELASTICSEARCH_URL/_security/_query/api_key?with_limited_by=true\"" + }, + { + "lang": "Java", + "source": "client.security().queryApiKeys(q -> q\n .query(qu -> qu\n .ids(i -> i\n .values(\"VuaCfGcBCdbkQm-e5aOx\")\n )\n )\n .withLimitedBy(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -85294,6 +104950,36 @@ ], "x-api": "query_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/_query/role\n{\n \"sort\": [\"name\"]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.query_role(\n sort=[\n \"name\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.queryRole({\n sort: [\"name\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.query_role(\n body: {\n \"sort\": [\n \"name\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->queryRole([\n \"body\" => [\n \"sort\" => array(\n \"name\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":[\"name\"]}' \"$ELASTICSEARCH_URL/_security/_query/role\"" + }, + { + "lang": "Java", + "source": "client.security().queryRole(q -> q\n .sort(s -> s\n .field(f -> f\n .field(\"name\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -85424,6 +105110,36 @@ ], "x-api": "query_role.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/_query/role\n{\n \"sort\": [\"name\"]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.query_role(\n sort=[\n \"name\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.queryRole({\n sort: [\"name\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.query_role(\n body: {\n \"sort\": [\n \"name\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->queryRole([\n \"body\" => [\n \"sort\" => array(\n \"name\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":[\"name\"]}' \"$ELASTICSEARCH_URL/_security/_query/role\"" + }, + { + "lang": "Java", + "source": "client.security().queryRole(q -> q\n .sort(s -> s\n .field(f -> f\n .field(\"name\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -85576,6 +105292,36 @@ ], "x-api": "query_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/_query/user?with_profile_uid=true\n{\n \"query\": {\n \"prefix\": {\n \"roles\": \"other\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.query_user(\n with_profile_uid=True,\n query={\n \"prefix\": {\n \"roles\": \"other\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.queryUser({\n with_profile_uid: \"true\",\n query: {\n prefix: {\n roles: \"other\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.query_user(\n with_profile_uid: \"true\",\n body: {\n \"query\": {\n \"prefix\": {\n \"roles\": \"other\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->queryUser([\n \"with_profile_uid\" => \"true\",\n \"body\" => [\n \"query\" => [\n \"prefix\" => [\n \"roles\" => \"other\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"prefix\":{\"roles\":\"other\"}}}' \"$ELASTICSEARCH_URL/_security/_query/user?with_profile_uid=true\"" + }, + { + "lang": "Java", + "source": "client.security().queryUser(q -> q\n .query(qu -> qu\n .prefix(p -> p\n .field(\"roles\")\n .value(\"other\")\n )\n )\n .withProfileUid(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -85726,6 +105472,36 @@ ], "x-api": "query_user.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/_query/user?with_profile_uid=true\n{\n \"query\": {\n \"prefix\": {\n \"roles\": \"other\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.query_user(\n with_profile_uid=True,\n query={\n \"prefix\": {\n \"roles\": \"other\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.queryUser({\n with_profile_uid: \"true\",\n query: {\n prefix: {\n roles: \"other\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.query_user(\n with_profile_uid: \"true\",\n body: {\n \"query\": {\n \"prefix\": {\n \"roles\": \"other\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->queryUser([\n \"with_profile_uid\" => \"true\",\n \"body\" => [\n \"query\" => [\n \"prefix\" => [\n \"roles\" => \"other\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"prefix\":{\"roles\":\"other\"}}}' \"$ELASTICSEARCH_URL/_security/_query/user?with_profile_uid=true\"" + }, + { + "lang": "Java", + "source": "client.security().queryUser(q -> q\n .query(qu -> qu\n .prefix(p -> p\n .field(\"roles\")\n .value(\"other\")\n )\n )\n .withProfileUid(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -85841,6 +105617,36 @@ ], "x-api": "saml_authenticate.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/saml/authenticate\n{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : [\"4fee3b046395c4e751011e97f8900b5273d56685\"]\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.saml_authenticate(\n content=\"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n ids=[\n \"4fee3b046395c4e751011e97f8900b5273d56685\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.samlAuthenticate({\n content:\n \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n ids: [\"4fee3b046395c4e751011e97f8900b5273d56685\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.saml_authenticate(\n body: {\n \"content\": \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\": [\n \"4fee3b046395c4e751011e97f8900b5273d56685\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->samlAuthenticate([\n \"body\" => [\n \"content\" => \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" => array(\n \"4fee3b046395c4e751011e97f8900b5273d56685\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"content\":\"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\"ids\":[\"4fee3b046395c4e751011e97f8900b5273d56685\"]}' \"$ELASTICSEARCH_URL/_security/saml/authenticate\"" + }, + { + "lang": "Java", + "source": "client.security().samlAuthenticate(s -> s\n .content(\"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\")\n .ids(\"4fee3b046395c4e751011e97f8900b5273d56685\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -85923,6 +105729,36 @@ ], "x-api": "saml_complete_logout.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/saml/complete_logout\n{\n \"realm\": \"saml1\",\n \"ids\": [ \"_1c368075e0b3...\" ],\n \"query_string\": \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.saml_complete_logout(\n realm=\"saml1\",\n ids=[\n \"_1c368075e0b3...\"\n ],\n query_string=\"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.samlCompleteLogout({\n realm: \"saml1\",\n ids: [\"_1c368075e0b3...\"],\n query_string:\n \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.saml_complete_logout(\n body: {\n \"realm\": \"saml1\",\n \"ids\": [\n \"_1c368075e0b3...\"\n ],\n \"query_string\": \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->samlCompleteLogout([\n \"body\" => [\n \"realm\" => \"saml1\",\n \"ids\" => array(\n \"_1c368075e0b3...\",\n ),\n \"query_string\" => \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm\":\"saml1\",\"ids\":[\"_1c368075e0b3...\"],\"query_string\":\"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\"}' \"$ELASTICSEARCH_URL/_security/saml/complete_logout\"" + }, + { + "lang": "Java", + "source": "client.security().samlCompleteLogout(s -> s\n .ids(\"_1c368075e0b3...\")\n .queryString(\"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\")\n .realm(\"saml1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86019,6 +105855,36 @@ ], "x-api": "saml_invalidate.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/saml/invalidate\n{\n \"query_string\" : \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" : \"saml1\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.saml_invalidate(\n query_string=\"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n realm=\"saml1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.samlInvalidate({\n query_string:\n \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n realm: \"saml1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.saml_invalidate(\n body: {\n \"query_string\": \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\": \"saml1\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->samlInvalidate([\n \"body\" => [\n \"query_string\" => \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" => \"saml1\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query_string\":\"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\"realm\":\"saml1\"}' \"$ELASTICSEARCH_URL/_security/saml/invalidate\"" + }, + { + "lang": "Java", + "source": "client.security().samlInvalidate(s -> s\n .queryString(\"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\")\n .realm(\"saml1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86101,6 +105967,36 @@ ], "x-api": "saml_logout.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/saml/logout\n{\n \"token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\" : \"mJdXLtmvTUSpoLwMvdBt_w\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.saml_logout(\n token=\"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n refresh_token=\"mJdXLtmvTUSpoLwMvdBt_w\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.samlLogout({\n token: \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n refresh_token: \"mJdXLtmvTUSpoLwMvdBt_w\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.saml_logout(\n body: {\n \"token\": \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\": \"mJdXLtmvTUSpoLwMvdBt_w\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->samlLogout([\n \"body\" => [\n \"token\" => \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\" => \"mJdXLtmvTUSpoLwMvdBt_w\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"token\":\"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\"refresh_token\":\"mJdXLtmvTUSpoLwMvdBt_w\"}' \"$ELASTICSEARCH_URL/_security/saml/logout\"" + }, + { + "lang": "Java", + "source": "client.security().samlLogout(s -> s\n .refreshToken(\"mJdXLtmvTUSpoLwMvdBt_w\")\n .token(\"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86204,6 +106100,36 @@ ], "x-api": "saml_prepare_authentication.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/saml/prepare\n{\n \"realm\" : \"saml1\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.saml_prepare_authentication(\n realm=\"saml1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.samlPrepareAuthentication({\n realm: \"saml1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.saml_prepare_authentication(\n body: {\n \"realm\": \"saml1\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->samlPrepareAuthentication([\n \"body\" => [\n \"realm\" => \"saml1\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm\":\"saml1\"}' \"$ELASTICSEARCH_URL/_security/saml/prepare\"" + }, + { + "lang": "Java", + "source": "client.security().samlPrepareAuthentication(s -> s\n .realm(\"saml1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86266,6 +106192,36 @@ ], "x-api": "saml_service_provider_metadata.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data\n" + }, + { + "lang": "Python", + "source": "resp = client.security.update_user_profile_data(\n uid=\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.updateUserProfileData({\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.update_user_profile_data(\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->updateUserProfileData([\n \"uid\" => \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data\"" + }, + { + "lang": "Java", + "source": "client.security().updateUserProfileData(u -> u\n .uid(\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86406,6 +106362,36 @@ ], "x-api": "suggest_user_profiles.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/_suggest\n{\n \"name\": \"jack\", \n \"hint\": {\n \"uids\": [ \n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\"north\", \"east\"] \n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.suggest_user_profiles(\n name=\"jack\",\n hint={\n \"uids\": [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\n \"north\",\n \"east\"\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.suggestUserProfiles({\n name: \"jack\",\n hint: {\n uids: [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n ],\n labels: {\n direction: [\"north\", \"east\"],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.suggest_user_profiles(\n body: {\n \"name\": \"jack\",\n \"hint\": {\n \"uids\": [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\n \"north\",\n \"east\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->suggestUserProfiles([\n \"body\" => [\n \"name\" => \"jack\",\n \"hint\" => [\n \"uids\" => array(\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n ),\n \"labels\" => [\n \"direction\" => array(\n \"north\",\n \"east\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"jack\",\"hint\":{\"uids\":[\"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"],\"labels\":{\"direction\":[\"north\",\"east\"]}}}' \"$ELASTICSEARCH_URL/_security/profile/_suggest\"" + }, + { + "lang": "Java", + "source": "client.security().suggestUserProfiles(s -> s\n .hint(h -> h\n .uids(List.of(\"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"))\n .labels(\"direction\", List.of(\"north\",\"east\"))\n )\n .name(\"jack\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86544,6 +106530,36 @@ ], "x-api": "suggest_user_profiles.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/_suggest\n{\n \"name\": \"jack\", \n \"hint\": {\n \"uids\": [ \n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\"north\", \"east\"] \n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.suggest_user_profiles(\n name=\"jack\",\n hint={\n \"uids\": [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\n \"north\",\n \"east\"\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.suggestUserProfiles({\n name: \"jack\",\n hint: {\n uids: [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n ],\n labels: {\n direction: [\"north\", \"east\"],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.suggest_user_profiles(\n body: {\n \"name\": \"jack\",\n \"hint\": {\n \"uids\": [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\n \"north\",\n \"east\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->suggestUserProfiles([\n \"body\" => [\n \"name\" => \"jack\",\n \"hint\" => [\n \"uids\" => array(\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n ),\n \"labels\" => [\n \"direction\" => array(\n \"north\",\n \"east\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"jack\",\"hint\":{\"uids\":[\"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"],\"labels\":{\"direction\":[\"north\",\"east\"]}}}' \"$ELASTICSEARCH_URL/_security/profile/_suggest\"" + }, + { + "lang": "Java", + "source": "client.security().suggestUserProfiles(s -> s\n .hint(h -> h\n .uids(List.of(\"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"))\n .labels(\"direction\", List.of(\"north\",\"east\"))\n )\n .name(\"jack\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86656,6 +106672,36 @@ ], "x-api": "update_api_key.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_security/api_key/VuaCfGcBCdbkQm-e5aOx\n{\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\"*\"],\n \"privileges\": [\"write\"]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\"production\"]\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.update_api_key(\n id=\"VuaCfGcBCdbkQm-e5aOx\",\n role_descriptors={\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n metadata={\n \"environment\": {\n \"level\": 2,\n \"trusted\": True,\n \"tags\": [\n \"production\"\n ]\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.updateApiKey({\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n role_descriptors: {\n \"role-a\": {\n indices: [\n {\n names: [\"*\"],\n privileges: [\"write\"],\n },\n ],\n },\n },\n metadata: {\n environment: {\n level: 2,\n trusted: true,\n tags: [\"production\"],\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.update_api_key(\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n body: {\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\n \"production\"\n ]\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->updateApiKey([\n \"id\" => \"VuaCfGcBCdbkQm-e5aOx\",\n \"body\" => [\n \"role_descriptors\" => [\n \"role-a\" => [\n \"indices\" => array(\n [\n \"names\" => array(\n \"*\",\n ),\n \"privileges\" => array(\n \"write\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"environment\" => [\n \"level\" => 2,\n \"trusted\" => true,\n \"tags\" => array(\n \"production\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"role_descriptors\":{\"role-a\":{\"indices\":[{\"names\":[\"*\"],\"privileges\":[\"write\"]}]}},\"metadata\":{\"environment\":{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}}}' \"$ELASTICSEARCH_URL/_security/api_key/VuaCfGcBCdbkQm-e5aOx\"" + }, + { + "lang": "Java", + "source": "client.security().updateApiKey(u -> u\n .id(\"VuaCfGcBCdbkQm-e5aOx\")\n .metadata(\"environment\", JsonData.fromJson(\"{\\\"level\\\":2,\\\"trusted\\\":true,\\\"tags\\\":[\\\"production\\\"]}\"))\n .roleDescriptors(\"role-a\", r -> r\n .indices(i -> i\n .names(\"*\")\n .privileges(\"write\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86774,6 +106820,36 @@ ], "x-api": "update_cross_cluster_api_key.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx\n{\n \"access\": {\n \"replication\": [\n {\n \"names\": [\"archive\"]\n }\n ]\n },\n \"metadata\": {\n \"application\": \"replication\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.update_cross_cluster_api_key(\n id=\"VuaCfGcBCdbkQm-e5aOx\",\n access={\n \"replication\": [\n {\n \"names\": [\n \"archive\"\n ]\n }\n ]\n },\n metadata={\n \"application\": \"replication\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.updateCrossClusterApiKey({\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n access: {\n replication: [\n {\n names: [\"archive\"],\n },\n ],\n },\n metadata: {\n application: \"replication\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.update_cross_cluster_api_key(\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n body: {\n \"access\": {\n \"replication\": [\n {\n \"names\": [\n \"archive\"\n ]\n }\n ]\n },\n \"metadata\": {\n \"application\": \"replication\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->updateCrossClusterApiKey([\n \"id\" => \"VuaCfGcBCdbkQm-e5aOx\",\n \"body\" => [\n \"access\" => [\n \"replication\" => array(\n [\n \"names\" => array(\n \"archive\",\n ),\n ],\n ),\n ],\n \"metadata\" => [\n \"application\" => \"replication\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"access\":{\"replication\":[{\"names\":[\"archive\"]}]},\"metadata\":{\"application\":\"replication\"}}' \"$ELASTICSEARCH_URL/_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx\"" + }, + { + "lang": "Java", + "source": "client.security().updateCrossClusterApiKey(u -> u\n .access(a -> a\n .replication(r -> r\n .names(\"archive\")\n )\n )\n .id(\"VuaCfGcBCdbkQm-e5aOx\")\n .metadata(\"application\", JsonData.fromJson(\"\\\"replication\\\"\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -86893,6 +106969,36 @@ ], "x-api": "update_user_profile_data.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data\n{\n \"labels\": {\n \"direction\": \"east\"\n },\n \"data\": {\n \"app1\": {\n \"theme\": \"default\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.update_user_profile_data(\n uid=\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n labels={\n \"direction\": \"east\"\n },\n data={\n \"app1\": {\n \"theme\": \"default\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.updateUserProfileData({\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n labels: {\n direction: \"east\",\n },\n data: {\n app1: {\n theme: \"default\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.update_user_profile_data(\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n body: {\n \"labels\": {\n \"direction\": \"east\"\n },\n \"data\": {\n \"app1\": {\n \"theme\": \"default\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->updateUserProfileData([\n \"uid\" => \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n \"body\" => [\n \"labels\" => [\n \"direction\" => \"east\",\n ],\n \"data\" => [\n \"app1\" => [\n \"theme\" => \"default\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"labels\":{\"direction\":\"east\"},\"data\":{\"app1\":{\"theme\":\"default\"}}}' \"$ELASTICSEARCH_URL/_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data\"" + }, + { + "lang": "Java", + "source": "client.security().updateUserProfileData(u -> u\n .data(\"app1\", JsonData.fromJson(\"{\\\"theme\\\":\\\"default\\\"}\"))\n .labels(\"direction\", JsonData.fromJson(\"\\\"east\\\"\"))\n .uid(\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -87010,6 +107116,36 @@ ], "x-api": "update_user_profile_data.security", "x-category": "security", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data\n{\n \"labels\": {\n \"direction\": \"east\"\n },\n \"data\": {\n \"app1\": {\n \"theme\": \"default\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.security.update_user_profile_data(\n uid=\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n labels={\n \"direction\": \"east\"\n },\n data={\n \"app1\": {\n \"theme\": \"default\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.security.updateUserProfileData({\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n labels: {\n direction: \"east\",\n },\n data: {\n app1: {\n theme: \"default\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.security.update_user_profile_data(\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n body: {\n \"labels\": {\n \"direction\": \"east\"\n },\n \"data\": {\n \"app1\": {\n \"theme\": \"default\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->security()->updateUserProfileData([\n \"uid\" => \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n \"body\" => [\n \"labels\" => [\n \"direction\" => \"east\",\n ],\n \"data\" => [\n \"app1\" => [\n \"theme\" => \"default\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"labels\":{\"direction\":\"east\"},\"data\":{\"app1\":{\"theme\":\"default\"}}}' \"$ELASTICSEARCH_URL/_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data\"" + }, + { + "lang": "Java", + "source": "client.security().updateUserProfileData(u -> u\n .data(\"app1\", JsonData.fromJson(\"{\\\"theme\\\":\\\"default\\\"}\"))\n .labels(\"direction\", JsonData.fromJson(\"\\\"east\\\"\"))\n .uid(\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -87170,6 +107306,36 @@ ], "x-api": "ingest.simulate", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ingest/_simulate\n{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.simulate.ingest(\n docs=[\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.simulate.ingest({\n docs: [\n {\n _id: \"123\",\n _index: \"my-index\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _id: \"456\",\n _index: \"my-index\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.simulate.ingest(\n body: {\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->simulate()->ingest([\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"123\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_id\" => \"456\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"123\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"bar\"}},{\"_id\":\"456\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" + }, + { + "lang": "Java", + "source": "client.simulate().ingest(i -> i\n .docs(List.of(Document.of(d -> d\n .id(\"123\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))\n ),Document.of(d -> d\n .id(\"456\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -87328,6 +107494,36 @@ ], "x-api": "ingest.simulate", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ingest/_simulate\n{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.simulate.ingest(\n docs=[\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.simulate.ingest({\n docs: [\n {\n _id: \"123\",\n _index: \"my-index\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _id: \"456\",\n _index: \"my-index\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.simulate.ingest(\n body: {\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->simulate()->ingest([\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"123\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_id\" => \"456\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"123\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"bar\"}},{\"_id\":\"456\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" + }, + { + "lang": "Java", + "source": "client.simulate().ingest(i -> i\n .docs(List.of(Document.of(d -> d\n .id(\"123\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))\n ),Document.of(d -> d\n .id(\"456\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -87499,6 +107695,36 @@ ], "x-api": "ingest.simulate", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ingest/_simulate\n{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.simulate.ingest(\n docs=[\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.simulate.ingest({\n docs: [\n {\n _id: \"123\",\n _index: \"my-index\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _id: \"456\",\n _index: \"my-index\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.simulate.ingest(\n body: {\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->simulate()->ingest([\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"123\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_id\" => \"456\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"123\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"bar\"}},{\"_id\":\"456\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" + }, + { + "lang": "Java", + "source": "client.simulate().ingest(i -> i\n .docs(List.of(Document.of(d -> d\n .id(\"123\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))\n ),Document.of(d -> d\n .id(\"456\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -87668,6 +107894,36 @@ ], "x-api": "ingest.simulate", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_ingest/_simulate\n{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.simulate.ingest(\n docs=[\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.simulate.ingest({\n docs: [\n {\n _id: \"123\",\n _index: \"my-index\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _id: \"456\",\n _index: \"my-index\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.simulate.ingest(\n body: {\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->simulate()->ingest([\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"123\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_id\" => \"456\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"123\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"bar\"}},{\"_id\":\"456\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" + }, + { + "lang": "Java", + "source": "client.simulate().ingest(i -> i\n .docs(List.of(Document.of(d -> d\n .id(\"123\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))\n ),Document.of(d -> d\n .id(\"456\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\"))\n )))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -87747,6 +108003,36 @@ ], "x-api": "get_lifecycle.slm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _slm/policy/daily-snapshots?human\n" + }, + { + "lang": "Python", + "source": "resp = client.slm.get_lifecycle(\n policy_id=\"daily-snapshots\",\n human=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.slm.getLifecycle({\n policy_id: \"daily-snapshots\",\n human: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.slm.get_lifecycle(\n policy_id: \"daily-snapshots\",\n human: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->slm()->getLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n \"human\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots?human\"" + }, + { + "lang": "Java", + "source": "client.slm().getLifecycle(g -> g\n .policyId(\"daily-snapshots\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -87876,6 +108162,36 @@ ], "x-api": "put_lifecycle.slm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_slm/policy/daily-snapshots\n{\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.slm.put_lifecycle(\n policy_id=\"daily-snapshots\",\n schedule=\"0 30 1 * * ?\",\n name=\"\",\n repository=\"my_repository\",\n config={\n \"indices\": [\n \"data-*\",\n \"important\"\n ],\n \"ignore_unavailable\": False,\n \"include_global_state\": False\n },\n retention={\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.slm.putLifecycle({\n policy_id: \"daily-snapshots\",\n schedule: \"0 30 1 * * ?\",\n name: \"\",\n repository: \"my_repository\",\n config: {\n indices: [\"data-*\", \"important\"],\n ignore_unavailable: false,\n include_global_state: false,\n },\n retention: {\n expire_after: \"30d\",\n min_count: 5,\n max_count: 50,\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.slm.put_lifecycle(\n policy_id: \"daily-snapshots\",\n body: {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\n \"data-*\",\n \"important\"\n ],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->slm()->putLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n \"body\" => [\n \"schedule\" => \"0 30 1 * * ?\",\n \"name\" => \"\",\n \"repository\" => \"my_repository\",\n \"config\" => [\n \"indices\" => array(\n \"data-*\",\n \"important\",\n ),\n \"ignore_unavailable\" => false,\n \"include_global_state\" => false,\n ],\n \"retention\" => [\n \"expire_after\" => \"30d\",\n \"min_count\" => 5,\n \"max_count\" => 50,\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"schedule\":\"0 30 1 * * ?\",\"name\":\"\",\"repository\":\"my_repository\",\"config\":{\"indices\":[\"data-*\",\"important\"],\"ignore_unavailable\":false,\"include_global_state\":false},\"retention\":{\"expire_after\":\"30d\",\"min_count\":5,\"max_count\":50}}' \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots\"" + }, + { + "lang": "Java", + "source": "client.slm().putLifecycle(p -> p\n .config(c -> c\n .ignoreUnavailable(false)\n .indices(List.of(\"data-*\",\"important\"))\n .includeGlobalState(false)\n )\n .name(\"\")\n .policyId(\"daily-snapshots\")\n .repository(\"my_repository\")\n .retention(r -> r\n .expireAfter(e -> e\n .time(\"30d\")\n )\n .maxCount(50)\n .minCount(5)\n )\n .schedule(\"0 30 1 * * ?\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -87944,6 +108260,36 @@ ], "x-api": "delete_lifecycle.slm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_slm/policy/daily-snapshots\n" + }, + { + "lang": "Python", + "source": "resp = client.slm.delete_lifecycle(\n policy_id=\"daily-snapshots\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.slm.deleteLifecycle({\n policy_id: \"daily-snapshots\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.slm.delete_lifecycle(\n policy_id: \"daily-snapshots\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->slm()->deleteLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots\"" + }, + { + "lang": "Java", + "source": "client.slm().deleteLifecycle(d -> d\n .policyId(\"daily-snapshots\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -88000,23 +108346,210 @@ "application/json": { "schema": { "type": "object", - "properties": { - "snapshot_name": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.Name" - } - ] - } - }, - "required": [ - "snapshot_name" - ] + "properties": { + "snapshot_name": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.Name" + } + ] + } + }, + "required": [ + "snapshot_name" + ] + }, + "examples": { + "ExecuteSnapshotLifecycleResponseExample1": { + "description": "Run `POST /_slm/policy/daily-snapshots/_execute` to take an immediate snapshot according to the `daily-snapshots` policy.\n", + "value": "{\n \"snapshot_name\": \"daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea\"\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 7.4.0", + "x-variations": [ + "
\n PUT\n /_slm/policy/{policy_id}/_execute\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "execute_lifecycle.slm", + "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_slm/policy/daily-snapshots/_execute\n" + }, + { + "lang": "Python", + "source": "resp = client.slm.execute_lifecycle(\n policy_id=\"daily-snapshots\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.slm.executeLifecycle({\n policy_id: \"daily-snapshots\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.slm.execute_lifecycle(\n policy_id: \"daily-snapshots\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->slm()->executeLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots/_execute\"" + }, + { + "lang": "Java", + "source": "client.slm().executeLifecycle(e -> e\n .policyId(\"daily-snapshots\")\n);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/_execute_retention": { + "post": { + "tags": [ + "slm" + ], + "summary": "Run a retention policy", + "description": "Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.\nThe retention policy is normally applied according to its schedule.", + "operationId": "slm-execute-retention", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Generally available; Added in 7.5.0", + "x-variations": [ + "
\n POST\n /_slm/_execute_retention\n
\n " + ], + "x-req-auth": [ + "Cluster privileges: `manage_slm`\n" + ], + "x-api": "execute_retention.slm", + "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _slm/_execute_retention\n" + }, + { + "lang": "Python", + "source": "resp = client.slm.execute_retention()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.slm.executeRetention();" + }, + { + "lang": "Ruby", + "source": "response = client.slm.execute_retention" + }, + { + "lang": "PHP", + "source": "$resp = $client->slm()->executeRetention();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/_execute_retention\"" + }, + { + "lang": "Java", + "source": "client.slm().executeRetention(e -> e);\n" + } + ], + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_slm/policy": { + "get": { + "tags": [ + "slm" + ], + "summary": "Get policy information", + "description": "Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.", + "operationId": "slm-get-lifecycle-1", + "parameters": [ + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/slm._types.SnapshotLifecycle" + } }, "examples": { - "ExecuteSnapshotLifecycleResponseExample1": { - "description": "Run `POST /_slm/policy/daily-snapshots/_execute` to take an immediate snapshot according to the `daily-snapshots` policy.\n", - "value": "{\n \"snapshot_name\": \"daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea\"\n}" + "GetSnapshotLifecycleResponseExample1": { + "description": "A successful response from `GET _slm/policy/daily-snapshots?human`.", + "value": "{\n \"daily-snapshots\": {\n \"version\": 1,\n \"modified_date\": \"2099-05-06T01:30:00.000Z\",\n \"modified_date_millis\": 4081757400000,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"stats\": {\n \"policy\": \"daily-snapshots\",\n \"snapshots_taken\": 0,\n \"snapshots_failed\": 0,\n \"snapshots_deleted\": 0,\n \"snapshot_deletion_failures\": 0\n },\n \"next_execution\": \"2099-05-07T01:30:00.000Z\",\n \"next_execution_millis\": 4081843800000\n }\n}" } } } @@ -88025,140 +108558,43 @@ }, "x-state": "Generally available; Added in 7.4.0", "x-variations": [ - "
\n PUT\n /_slm/policy/{policy_id}/_execute\n
\n " + "
\n GET\n /_slm/policy\n
\n " ], "x-req-auth": [ "Cluster privileges: `manage_slm`\n" ], - "x-api": "execute_lifecycle.slm", + "x-api": "get_lifecycle.slm", "x-category": "management", - "x-metaTags": [ + "x-codeSamples": [ { - "content": "Elasticsearch", - "name": "product_name" - } - ] - } - }, - "/_slm/_execute_retention": { - "post": { - "tags": [ - "slm" - ], - "summary": "Run a retention policy", - "description": "Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.\nThe retention policy is normally applied according to its schedule.", - "operationId": "slm-execute-retention", - "parameters": [ + "lang": "Console", + "source": "GET _slm/policy/daily-snapshots?human\n" + }, { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "lang": "Python", + "source": "resp = client.slm.get_lifecycle(\n policy_id=\"daily-snapshots\",\n human=True,\n)" }, { - "in": "query", - "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" - } - } - } - } - }, - "x-state": "Generally available; Added in 7.5.0", - "x-variations": [ - "
\n POST\n /_slm/_execute_retention\n
\n " - ], - "x-req-auth": [ - "Cluster privileges: `manage_slm`\n" - ], - "x-api": "execute_retention.slm", - "x-category": "management", - "x-metaTags": [ + "lang": "JavaScript", + "source": "const response = await client.slm.getLifecycle({\n policy_id: \"daily-snapshots\",\n human: \"true\",\n});" + }, { - "content": "Elasticsearch", - "name": "product_name" - } - ] - } - }, - "/_slm/policy": { - "get": { - "tags": [ - "slm" - ], - "summary": "Get policy information", - "description": "Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.", - "operationId": "slm-get-lifecycle-1", - "parameters": [ + "lang": "Ruby", + "source": "response = client.slm.get_lifecycle(\n policy_id: \"daily-snapshots\",\n human: \"true\"\n)" + }, { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" + "lang": "PHP", + "source": "$resp = $client->slm()->getLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n \"human\" => \"true\",\n]);" }, { - "in": "query", - "name": "timeout", - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/slm._types.SnapshotLifecycle" - } - }, - "examples": { - "GetSnapshotLifecycleResponseExample1": { - "description": "A successful response from `GET _slm/policy/daily-snapshots?human`.", - "value": "{\n \"daily-snapshots\": {\n \"version\": 1,\n \"modified_date\": \"2099-05-06T01:30:00.000Z\",\n \"modified_date_millis\": 4081757400000,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"stats\": {\n \"policy\": \"daily-snapshots\",\n \"snapshots_taken\": 0,\n \"snapshots_failed\": 0,\n \"snapshots_deleted\": 0,\n \"snapshot_deletion_failures\": 0\n },\n \"next_execution\": \"2099-05-07T01:30:00.000Z\",\n \"next_execution_millis\": 4081843800000\n }\n}" - } - } - } - } + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots?human\"" + }, + { + "lang": "Java", + "source": "client.slm().getLifecycle(g -> g\n .policyId(\"daily-snapshots\")\n);\n" } - }, - "x-state": "Generally available; Added in 7.4.0", - "x-variations": [ - "
\n GET\n /_slm/policy\n
\n " ], - "x-req-auth": [ - "Cluster privileges: `manage_slm`\n" - ], - "x-api": "get_lifecycle.slm", - "x-category": "management", "x-metaTags": [ { "content": "Elasticsearch", @@ -88279,6 +108715,36 @@ ], "x-api": "get_stats.slm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_slm/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.slm.get_stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.slm.getStats();" + }, + { + "lang": "Ruby", + "source": "response = client.slm.get_stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->slm()->getStats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/stats\"" + }, + { + "lang": "Java", + "source": "client.slm().getStats(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -88355,6 +108821,36 @@ ], "x-api": "get_status.slm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _slm/status\n" + }, + { + "lang": "Python", + "source": "resp = client.slm.get_status()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.slm.getStatus();" + }, + { + "lang": "Ruby", + "source": "response = client.slm.get_status" + }, + { + "lang": "PHP", + "source": "$resp = $client->slm()->getStatus();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/status\"" + }, + { + "lang": "Java", + "source": "client.slm().getStatus(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -88420,6 +108916,36 @@ ], "x-api": "start.slm", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _slm/start\n" + }, + { + "lang": "Python", + "source": "resp = client.slm.start()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.slm.start();" + }, + { + "lang": "Ruby", + "source": "response = client.slm.start" + }, + { + "lang": "PHP", + "source": "$resp = $client->slm()->start();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/start\"" + }, + { + "lang": "Java", + "source": "client.slm().start(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -88569,6 +109095,36 @@ ], "x-api": "cleanup_repository.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_snapshot/my_repository/_cleanup\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.cleanup_repository(\n name=\"my_repository\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.cleanupRepository({\n name: \"my_repository\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.cleanup_repository(\n repository: \"my_repository\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->cleanupRepository([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/_cleanup\"" + }, + { + "lang": "Java", + "source": "client.snapshot().cleanupRepository(c -> c\n .name(\"my_repository\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -88676,6 +109232,36 @@ ], "x-api": "clone.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot\n{\n \"indices\": \"index_a,index_b\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.clone(\n repository=\"my_repository\",\n snapshot=\"source_snapshot\",\n target_snapshot=\"target_snapshot\",\n indices=\"index_a,index_b\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.clone({\n repository: \"my_repository\",\n snapshot: \"source_snapshot\",\n target_snapshot: \"target_snapshot\",\n indices: \"index_a,index_b\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.clone(\n repository: \"my_repository\",\n snapshot: \"source_snapshot\",\n target_snapshot: \"target_snapshot\",\n body: {\n \"indices\": \"index_a,index_b\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->clone([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"source_snapshot\",\n \"target_snapshot\" => \"target_snapshot\",\n \"body\" => [\n \"indices\" => \"index_a,index_b\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":\"index_a,index_b\"}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/source_snapshot/_clone/target_snapshot\"" + }, + { + "lang": "Java", + "source": "client.snapshot().clone(c -> c\n .indices(\"index_a,index_b\")\n .repository(\"my_repository\")\n .snapshot(\"source_snapshot\")\n .targetSnapshot(\"target_snapshot\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -88792,7 +109378,7 @@ { "in": "query", "name": "order", - "description": "The sort order.\nValid values are `asc` for ascending and `desc` for descending order.\nThe default behavior is ascending order.", + "description": "The sort order.\nValid values are `asc` for ascending and `desc` for descending order.\nThe default behavior is ascending order.\n\nSupported values include:\n - `asc`: Ascending (smallest to largest)\n - `desc`: Descending (largest to smallest)\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SortOrder" @@ -88847,7 +109433,7 @@ { "in": "query", "name": "state", - "description": "Only return snapshots with a state found in the given comma-separated list of snapshot states.\nThe default is all snapshot states.", + "description": "Only return snapshots with a state found in the given comma-separated list of snapshot states.\nThe default is all snapshot states.\n\nSupported values include:\n - `IN_PROGRESS`: The snapshot process has started.\n - `SUCCESS`: The snapshot process completed successfully.\n - `FAILED`: The snapshot failed.\n - `PARTIAL`: The snapshot was partially successful.\n - `INCOMPATIBLE`: The snapshot is incompatible with the current version of the cluster.\n\n", "deprecated": false, "schema": { "oneOf": [ @@ -88935,6 +109521,36 @@ ], "x-api": "get.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_snapshot/my_repository/snapshot_*?sort=start_time&from_sort_value=1577833200000\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.get(\n repository=\"my_repository\",\n snapshot=\"snapshot_*\",\n sort=\"start_time\",\n from_sort_value=\"1577833200000\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.get({\n repository: \"my_repository\",\n snapshot: \"snapshot_*\",\n sort: \"start_time\",\n from_sort_value: 1577833200000,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.get(\n repository: \"my_repository\",\n snapshot: \"snapshot_*\",\n sort: \"start_time\",\n from_sort_value: \"1577833200000\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->get([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_*\",\n \"sort\" => \"start_time\",\n \"from_sort_value\" => \"1577833200000\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_*?sort=start_time&from_sort_value=1577833200000\"" + }, + { + "lang": "Java", + "source": "client.snapshot().get(g -> g\n .fromSortValue(\"1577833200000\")\n .repository(\"my_repository\")\n .snapshot(\"snapshot_*\")\n .sort(SnapshotSort.StartTime)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -89005,7 +109621,7 @@ "type": "object", "properties": { "expand_wildcards": { - "description": "Determines how wildcard patterns in the `indices` parameter match data streams and indices.\nIt supports comma-separated values such as `open,hidden`.", + "description": "Determines how wildcard patterns in the `indices` parameter match data streams and indices.\nIt supports comma-separated values such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "default": "all", "allOf": [ { @@ -89108,6 +109724,36 @@ ], "x-api": "create.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true\n{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.create(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n wait_for_completion=True,\n indices=\"index_1,index_2\",\n ignore_unavailable=True,\n include_global_state=False,\n metadata={\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.create({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n indices: \"index_1,index_2\",\n ignore_unavailable: true,\n include_global_state: false,\n metadata: {\n taken_by: \"user123\",\n taken_because: \"backup before upgrading\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.create(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n body: {\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->create([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n \"wait_for_completion\" => \"true\",\n \"body\" => [\n \"indices\" => \"index_1,index_2\",\n \"ignore_unavailable\" => true,\n \"include_global_state\" => false,\n \"metadata\" => [\n \"taken_by\" => \"user123\",\n \"taken_because\" => \"backup before upgrading\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":\"index_1,index_2\",\"ignore_unavailable\":true,\"include_global_state\":false,\"metadata\":{\"taken_by\":\"user123\",\"taken_because\":\"backup before upgrading\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2?wait_for_completion=true\"" + }, + { + "lang": "Java", + "source": "client.snapshot().create(c -> c\n .ignoreUnavailable(true)\n .includeGlobalState(false)\n .indices(\"index_1,index_2\")\n .metadata(Map.of(\"taken_by\", JsonData.fromJson(\"\\\"user123\\\"\"),\"taken_because\", JsonData.fromJson(\"\\\"backup before upgrading\\\"\")))\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n .waitForCompletion(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -89178,7 +109824,7 @@ "type": "object", "properties": { "expand_wildcards": { - "description": "Determines how wildcard patterns in the `indices` parameter match data streams and indices.\nIt supports comma-separated values such as `open,hidden`.", + "description": "Determines how wildcard patterns in the `indices` parameter match data streams and indices.\nIt supports comma-separated values such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "default": "all", "allOf": [ { @@ -89281,6 +109927,36 @@ ], "x-api": "create.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true\n{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.create(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n wait_for_completion=True,\n indices=\"index_1,index_2\",\n ignore_unavailable=True,\n include_global_state=False,\n metadata={\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.create({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n indices: \"index_1,index_2\",\n ignore_unavailable: true,\n include_global_state: false,\n metadata: {\n taken_by: \"user123\",\n taken_because: \"backup before upgrading\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.create(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n body: {\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->create([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n \"wait_for_completion\" => \"true\",\n \"body\" => [\n \"indices\" => \"index_1,index_2\",\n \"ignore_unavailable\" => true,\n \"include_global_state\" => false,\n \"metadata\" => [\n \"taken_by\" => \"user123\",\n \"taken_because\" => \"backup before upgrading\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":\"index_1,index_2\",\"ignore_unavailable\":true,\"include_global_state\":false,\"metadata\":{\"taken_by\":\"user123\",\"taken_because\":\"backup before upgrading\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2?wait_for_completion=true\"" + }, + { + "lang": "Java", + "source": "client.snapshot().create(c -> c\n .ignoreUnavailable(true)\n .includeGlobalState(false)\n .indices(\"index_1,index_2\")\n .metadata(Map.of(\"taken_by\", JsonData.fromJson(\"\\\"user123\\\"\"),\"taken_because\", JsonData.fromJson(\"\\\"backup before upgrading\\\"\")))\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n .waitForCompletion(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -89365,6 +110041,36 @@ ], "x-api": "delete.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_snapshot/my_repository/snapshot_2,snapshot_3\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.delete(\n repository=\"my_repository\",\n snapshot=\"snapshot_2,snapshot_3\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.delete({\n repository: \"my_repository\",\n snapshot: \"snapshot_2,snapshot_3\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.delete(\n repository: \"my_repository\",\n snapshot: \"snapshot_2,snapshot_3\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->delete([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2,snapshot_3\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2,snapshot_3\"" + }, + { + "lang": "Java", + "source": "client.snapshot().delete(d -> d\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2,snapshot_3\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -89443,6 +110149,36 @@ ], "x-api": "get_repository.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_snapshot/my_repository\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.get_repository(\n name=\"my_repository\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.getRepository({\n name: \"my_repository\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.get_repository(\n repository: \"my_repository\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->getRepository([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository\"" + }, + { + "lang": "Java", + "source": "client.snapshot().getRepository(g -> g\n .name(\"my_repository\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -89568,6 +110304,36 @@ ], "x-api": "create_repository.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_snapshot/my_repository\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.create_repository(\n name=\"my_repository\",\n repository={\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.createRepository({\n name: \"my_repository\",\n repository: {\n type: \"fs\",\n settings: {\n location: \"my_backup_location\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.create_repository(\n repository: \"my_repository\",\n body: {\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->createRepository([\n \"repository\" => \"my_repository\",\n \"body\" => [\n \"type\" => \"fs\",\n \"settings\" => [\n \"location\" => \"my_backup_location\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"fs\",\"settings\":{\"location\":\"my_backup_location\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_repository\"" + }, + { + "lang": "Java", + "source": "client.snapshot().createRepository(c -> c\n .name(\"my_repository\")\n .repository(r -> r\n .fs(f -> f\n .settings(s -> s\n .location(\"my_backup_location\")\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -89693,6 +110459,36 @@ ], "x-api": "create_repository.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_snapshot/my_repository\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.create_repository(\n name=\"my_repository\",\n repository={\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.createRepository({\n name: \"my_repository\",\n repository: {\n type: \"fs\",\n settings: {\n location: \"my_backup_location\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.create_repository(\n repository: \"my_repository\",\n body: {\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->createRepository([\n \"repository\" => \"my_repository\",\n \"body\" => [\n \"type\" => \"fs\",\n \"settings\" => [\n \"location\" => \"my_backup_location\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"fs\",\"settings\":{\"location\":\"my_backup_location\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_repository\"" + }, + { + "lang": "Java", + "source": "client.snapshot().createRepository(c -> c\n .name(\"my_repository\")\n .repository(r -> r\n .fs(f -> f\n .settings(s -> s\n .location(\"my_backup_location\")\n )\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -89761,6 +110557,36 @@ ], "x-api": "delete_repository.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE /_snapshot/my_repository\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.delete_repository(\n name=\"my_repository\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.deleteRepository({\n name: \"my_repository\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.delete_repository(\n repository: \"my_repository\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->deleteRepository([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository\"" + }, + { + "lang": "Java", + "source": "client.snapshot().deleteRepository(d -> d\n .name(\"my_repository\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -89828,6 +110654,36 @@ ], "x-api": "get_repository.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_snapshot/my_repository\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.get_repository(\n name=\"my_repository\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.getRepository({\n name: \"my_repository\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.get_repository(\n repository: \"my_repository\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->getRepository([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository\"" + }, + { + "lang": "Java", + "source": "client.snapshot().getRepository(g -> g\n .name(\"my_repository\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90141,6 +110997,36 @@ ], "x-api": "repository_analyze.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_snapshot/my_repository/_analyze?blob_count=10&max_blob_size=1mb&timeout=120s\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.repository_analyze(\n name=\"my_repository\",\n blob_count=\"10\",\n max_blob_size=\"1mb\",\n timeout=\"120s\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.repositoryAnalyze({\n name: \"my_repository\",\n blob_count: 10,\n max_blob_size: \"1mb\",\n timeout: \"120s\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.repository_analyze(\n repository: \"my_repository\",\n blob_count: \"10\",\n max_blob_size: \"1mb\",\n timeout: \"120s\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->repositoryAnalyze([\n \"repository\" => \"my_repository\",\n \"blob_count\" => \"10\",\n \"max_blob_size\" => \"1mb\",\n \"timeout\" => \"120s\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/_analyze?blob_count=10&max_blob_size=1mb&timeout=120s\"" + }, + { + "lang": "Java", + "source": "client.snapshot().repositoryAnalyze(r -> r\n .blobCount(10)\n .maxBlobSize(\"1mb\")\n .name(\"my_repository\")\n .timeout(t -> t\n .offset(120)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90271,6 +111157,36 @@ ], "x-api": "repository_verify_integrity.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_snapshot/my_repository/_verify_integrity\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.repository_verify_integrity(\n name=\"my_repository\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.repositoryVerifyIntegrity({\n name: \"my_repository\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.repository_verify_integrity(\n repository: \"my_repository\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->repositoryVerifyIntegrity([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/_verify_integrity\"" + }, + { + "lang": "Java", + "source": "client.snapshot().repositoryVerifyIntegrity(r -> r\n .name(\"my_repository\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90455,6 +111371,36 @@ ], "x-api": "restore.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST /_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true\n{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"rename_pattern\": \"index_(.+)\",\n \"rename_replacement\": \"restored_index_$1\",\n \"include_aliases\": false\n}" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.restore(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n wait_for_completion=True,\n indices=\"index_1,index_2\",\n ignore_unavailable=True,\n include_global_state=False,\n rename_pattern=\"index_(.+)\",\n rename_replacement=\"restored_index_$1\",\n include_aliases=False,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.restore({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n indices: \"index_1,index_2\",\n ignore_unavailable: true,\n include_global_state: false,\n rename_pattern: \"index_(.+)\",\n rename_replacement: \"restored_index_$1\",\n include_aliases: false,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.restore(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n body: {\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"rename_pattern\": \"index_(.+)\",\n \"rename_replacement\": \"restored_index_$1\",\n \"include_aliases\": false\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->restore([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n \"wait_for_completion\" => \"true\",\n \"body\" => [\n \"indices\" => \"index_1,index_2\",\n \"ignore_unavailable\" => true,\n \"include_global_state\" => false,\n \"rename_pattern\" => \"index_(.+)\",\n \"rename_replacement\" => \"restored_index_$1\",\n \"include_aliases\" => false,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":\"index_1,index_2\",\"ignore_unavailable\":true,\"include_global_state\":false,\"rename_pattern\":\"index_(.+)\",\"rename_replacement\":\"restored_index_$1\",\"include_aliases\":false}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true\"" + }, + { + "lang": "Java", + "source": "client.snapshot().restore(r -> r\n .ignoreUnavailable(true)\n .includeAliases(false)\n .includeGlobalState(false)\n .indices(\"index_1,index_2\")\n .renamePattern(\"index_(.+)\")\n .renameReplacement(\"restored_index_$1\")\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n .waitForCompletion(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90537,6 +111483,36 @@ ], "x-api": "status.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _snapshot/my_repository/snapshot_2/_status\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.status(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.status({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.status(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->status([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2/_status\"" + }, + { + "lang": "Java", + "source": "client.snapshot().status(s -> s\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90630,6 +111606,36 @@ ], "x-api": "status.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _snapshot/my_repository/snapshot_2/_status\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.status(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.status({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.status(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->status([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2/_status\"" + }, + { + "lang": "Java", + "source": "client.snapshot().status(s -> s\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90734,6 +111740,36 @@ ], "x-api": "status.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _snapshot/my_repository/snapshot_2/_status\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.status(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.status({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.status(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->status([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2/_status\"" + }, + { + "lang": "Java", + "source": "client.snapshot().status(s -> s\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90820,6 +111856,36 @@ ], "x-api": "verify_repository.snapshot", "x-category": "management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _snapshot/my_unverified_backup/_verify\n" + }, + { + "lang": "Python", + "source": "resp = client.snapshot.verify_repository(\n name=\"my_unverified_backup\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.snapshot.verifyRepository({\n name: \"my_unverified_backup\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.snapshot.verify_repository(\n repository: \"my_unverified_backup\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->snapshot()->verifyRepository([\n \"repository\" => \"my_unverified_backup\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_unverified_backup/_verify\"" + }, + { + "lang": "Java", + "source": "client.snapshot().verifyRepository(v -> v\n .name(\"my_unverified_backup\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90886,6 +111952,36 @@ ], "x-api": "clear_cursor.sql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _sql/close\n{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.sql.clear_cursor(\n cursor=\"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.sql.clearCursor({\n cursor:\n \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.sql.clear_cursor(\n body: {\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->sql()->clearCursor([\n \"body\" => [\n \"cursor\" => \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"cursor\":\"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"}' \"$ELASTICSEARCH_URL/_sql/close\"" + }, + { + "lang": "Java", + "source": "client.sql().clearCursor(c -> c\n .cursor(\"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -90936,6 +112032,36 @@ ], "x-api": "delete_async.sql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _sql/async/delete/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\n" + }, + { + "lang": "Python", + "source": "resp = client.sql.delete_async(\n id=\"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.sql.deleteAsync({\n id: \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.sql.delete_async(\n id: \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->sql()->deleteAsync([\n \"id\" => \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_sql/async/delete/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\"" + }, + { + "lang": "Java", + "source": "client.sql().deleteAsync(d -> d\n .id(\"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -91065,6 +112191,36 @@ ], "x-api": "get_async.sql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _sql/async/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=?wait_for_completion_timeout=2s&format=json\n" + }, + { + "lang": "Python", + "source": "resp = client.sql.get_async(\n id=\"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n wait_for_completion_timeout=\"2s\",\n format=\"json\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.sql.getAsync({\n id: \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n wait_for_completion_timeout: \"2s\",\n format: \"json\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.sql.get_async(\n id: \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n wait_for_completion_timeout: \"2s\",\n format: \"json\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->sql()->getAsync([\n \"id\" => \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n \"wait_for_completion_timeout\" => \"2s\",\n \"format\" => \"json\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_sql/async/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=?wait_for_completion_timeout=2s&format=json\"" + }, + { + "lang": "Java", + "source": "client.sql().getAsync(g -> g\n .format(\"json\")\n .id(\"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\")\n .waitForCompletionTimeout(w -> w\n .offset(2)\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -91160,6 +112316,36 @@ ], "x-api": "get_async_status.sql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _sql/async/status/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\n" + }, + { + "lang": "Python", + "source": "resp = client.sql.get_async_status(\n id=\"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.sql.getAsyncStatus({\n id: \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.sql.get_async_status(\n id: \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->sql()->getAsyncStatus([\n \"id\" => \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_sql/async/status/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\"" + }, + { + "lang": "Java", + "source": "client.sql().getAsyncStatus(g -> g\n .id(\"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -91389,6 +112575,36 @@ ], "x-api": "query.sql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _sql?format=txt\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.sql.query(\n format=\"txt\",\n query=\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.sql.query({\n format: \"txt\",\n query: \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.sql.query(\n format: \"txt\",\n body: {\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->sql()->query([\n \"format\" => \"txt\",\n \"body\" => [\n \"query\" => \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"}' \"$ELASTICSEARCH_URL/_sql?format=txt\"" + }, + { + "lang": "Java", + "source": "client.sql().query(q -> q\n .format(SqlFormat.Txt)\n .query(\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -91616,6 +112832,36 @@ ], "x-api": "query.sql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _sql?format=txt\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.sql.query(\n format=\"txt\",\n query=\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.sql.query({\n format: \"txt\",\n query: \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.sql.query(\n format: \"txt\",\n body: {\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->sql()->query([\n \"format\" => \"txt\",\n \"body\" => [\n \"query\" => \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"}' \"$ELASTICSEARCH_URL/_sql?format=txt\"" + }, + { + "lang": "Java", + "source": "client.sql().query(q -> q\n .format(SqlFormat.Txt)\n .query(\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -91754,6 +113000,36 @@ ], "x-api": "translate.sql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _sql/translate\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n}" + }, + { + "lang": "Python", + "source": "resp = client.sql.translate(\n query=\"SELECT * FROM library ORDER BY page_count DESC\",\n fetch_size=10,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.sql.translate({\n query: \"SELECT * FROM library ORDER BY page_count DESC\",\n fetch_size: 10,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.sql.translate(\n body: {\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->sql()->translate([\n \"body\" => [\n \"query\" => \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\" => 10,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"SELECT * FROM library ORDER BY page_count DESC\",\"fetch_size\":10}' \"$ELASTICSEARCH_URL/_sql/translate\"" + }, + { + "lang": "Java", + "source": "client.sql().translate(t -> t\n .fetchSize(10)\n .query(\"SELECT * FROM library ORDER BY page_count DESC\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -91890,6 +113166,36 @@ ], "x-api": "translate.sql", "x-category": "common", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _sql/translate\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n}" + }, + { + "lang": "Python", + "source": "resp = client.sql.translate(\n query=\"SELECT * FROM library ORDER BY page_count DESC\",\n fetch_size=10,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.sql.translate({\n query: \"SELECT * FROM library ORDER BY page_count DESC\",\n fetch_size: 10,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.sql.translate(\n body: {\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->sql()->translate([\n \"body\" => [\n \"query\" => \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\" => 10,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"SELECT * FROM library ORDER BY page_count DESC\",\"fetch_size\":10}' \"$ELASTICSEARCH_URL/_sql/translate\"" + }, + { + "lang": "Java", + "source": "client.sql().translate(t -> t\n .fetchSize(10)\n .query(\"SELECT * FROM library ORDER BY page_count DESC\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -91940,6 +113246,36 @@ ], "x-api": "certificates.ssl", "x-category": "unknown", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_ssl/certificates\n" + }, + { + "lang": "Python", + "source": "resp = client.ssl.certificates()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.ssl.certificates();" + }, + { + "lang": "Ruby", + "source": "response = client.ssl.certificates" + }, + { + "lang": "PHP", + "source": "$resp = $client->ssl()->certificates();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ssl/certificates\"" + }, + { + "lang": "Java", + "source": "client.ssl().certificates();\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92032,6 +113368,36 @@ ], "x-api": "get_synonym.synonyms", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _synonyms/my-synonyms-set\n" + }, + { + "lang": "Python", + "source": "resp = client.synonyms.get_synonym(\n id=\"my-synonyms-set\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.synonyms.getSynonym({\n id: \"my-synonyms-set\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.synonyms.get_synonym(\n id: \"my-synonyms-set\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->synonyms()->getSynonym([\n \"id\" => \"my-synonyms-set\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set\"" + }, + { + "lang": "Java", + "source": "client.synonyms().getSynonym(g -> g\n .id(\"my-synonyms-set\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92151,6 +113517,36 @@ ], "x-api": "put_synonym.synonyms", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _synonyms/my-synonyms-set\n\n{\n \"synonyms_set\": {\n \"synonyms\" : \"hello, hi, howdy\"\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.synonyms.put_synonym(\n id=\"my-synonyms-set\",\n synonyms_set={\n \"synonyms\": \"hello, hi, howdy\"\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.synonyms.putSynonym({\n id: \"my-synonyms-set\",\n synonyms_set: {\n synonyms: \"hello, hi, howdy\",\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.synonyms.put_synonym(\n id: \"my-synonyms-set\",\n body: {\n \"synonyms_set\": {\n \"synonyms\": \"hello, hi, howdy\"\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->synonyms()->putSynonym([\n \"id\" => \"my-synonyms-set\",\n \"body\" => [\n \"synonyms_set\" => [\n \"synonyms\" => \"hello, hi, howdy\",\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"synonyms_set\":{\"synonyms\":\"hello, hi, howdy\"}}' \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set\"" + }, + { + "lang": "Java", + "source": "client.synonyms().putSynonym(p -> p\n .id(\"my-synonyms-set\")\n .synonymsSet(s -> s\n .synonyms(\"hello, hi, howdy\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92199,6 +113595,36 @@ ], "x-api": "delete_synonym.synonyms", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _synonyms/my-synonyms-set\n" + }, + { + "lang": "Python", + "source": "resp = client.synonyms.delete_synonym(\n id=\"my-synonyms-set\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.synonyms.deleteSynonym({\n id: \"my-synonyms-set\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.synonyms.delete_synonym(\n id: \"my-synonyms-set\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->synonyms()->deleteSynonym([\n \"id\" => \"my-synonyms-set\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set\"" + }, + { + "lang": "Java", + "source": "client.synonyms().deleteSynonym(d -> d\n .id(\"my-synonyms-set\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92266,6 +113692,36 @@ ], "x-api": "get_synonym_rule.synonyms", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _synonyms/my-synonyms-set/test-1\n" + }, + { + "lang": "Python", + "source": "resp = client.synonyms.get_synonym_rule(\n set_id=\"my-synonyms-set\",\n rule_id=\"test-1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.synonyms.getSynonymRule({\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.synonyms.get_synonym_rule(\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->synonyms()->getSynonymRule([\n \"set_id\" => \"my-synonyms-set\",\n \"rule_id\" => \"test-1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1\"" + }, + { + "lang": "Java", + "source": "client.synonyms().getSynonymRule(g -> g\n .ruleId(\"test-1\")\n .setId(\"my-synonyms-set\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92375,6 +113831,36 @@ ], "x-api": "put_synonym_rule.synonyms", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _synonyms/my-synonyms-set/test-1\n{\n \"synonyms\": \"hello, hi, howdy\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.synonyms.put_synonym_rule(\n set_id=\"my-synonyms-set\",\n rule_id=\"test-1\",\n synonyms=\"hello, hi, howdy\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.synonyms.putSynonymRule({\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\",\n synonyms: \"hello, hi, howdy\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.synonyms.put_synonym_rule(\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\",\n body: {\n \"synonyms\": \"hello, hi, howdy\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->synonyms()->putSynonymRule([\n \"set_id\" => \"my-synonyms-set\",\n \"rule_id\" => \"test-1\",\n \"body\" => [\n \"synonyms\" => \"hello, hi, howdy\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"synonyms\":\"hello, hi, howdy\"}' \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1\"" + }, + { + "lang": "Java", + "source": "client.synonyms().putSynonymRule(p -> p\n .ruleId(\"test-1\")\n .setId(\"my-synonyms-set\")\n .synonyms(\"hello, hi, howdy\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92451,6 +113937,36 @@ ], "x-api": "delete_synonym_rule.synonyms", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _synonyms/my-synonyms-set/test-1\n" + }, + { + "lang": "Python", + "source": "resp = client.synonyms.delete_synonym_rule(\n set_id=\"my-synonyms-set\",\n rule_id=\"test-1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.synonyms.deleteSynonymRule({\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.synonyms.delete_synonym_rule(\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->synonyms()->deleteSynonymRule([\n \"set_id\" => \"my-synonyms-set\",\n \"rule_id\" => \"test-1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1\"" + }, + { + "lang": "Java", + "source": "client.synonyms().deleteSynonymRule(d -> d\n .ruleId(\"test-1\")\n .setId(\"my-synonyms-set\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92533,6 +114049,36 @@ ], "x-api": "get_synonyms_sets.synonyms", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _synonyms\n" + }, + { + "lang": "Python", + "source": "resp = client.synonyms.get_synonyms_sets()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.synonyms.getSynonymsSets();" + }, + { + "lang": "Ruby", + "source": "response = client.synonyms.get_synonyms_sets" + }, + { + "lang": "PHP", + "source": "$resp = $client->synonyms()->getSynonymsSets();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms\"" + }, + { + "lang": "Java", + "source": "client.synonyms().getSynonymsSets(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92625,6 +114171,36 @@ ], "x-api": "cancel.tasks", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _tasks//_cancel\n" + }, + { + "lang": "Python", + "source": "resp = client.tasks.cancel(\n task_id=\"\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.tasks.cancel({\n task_id: \"\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.tasks.cancel(\n task_id: \"\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->tasks()->cancel([\n \"task_id\" => \"\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_tasks//_cancel\"" + }, + { + "lang": "Java", + "source": "client.tasks().cancel(c -> c\n .taskId(\"\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92728,6 +114304,36 @@ ], "x-api": "cancel.tasks", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _tasks//_cancel\n" + }, + { + "lang": "Python", + "source": "resp = client.tasks.cancel(\n task_id=\"\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.tasks.cancel({\n task_id: \"\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.tasks.cancel(\n task_id: \"\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->tasks()->cancel([\n \"task_id\" => \"\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_tasks//_cancel\"" + }, + { + "lang": "Java", + "source": "client.tasks().cancel(c -> c\n .taskId(\"\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92836,6 +114442,36 @@ ], "x-api": "get.tasks", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _tasks?detailed=true&actions=*/delete/byquery\n" + }, + { + "lang": "Python", + "source": "resp = client.tasks.list(\n detailed=True,\n actions=\"*/delete/byquery\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.tasks.list({\n detailed: \"true\",\n actions: \"*/delete/byquery\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.tasks.list(\n detailed: \"true\",\n actions: \"*/delete/byquery\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->tasks()->list([\n \"detailed\" => \"true\",\n \"actions\" => \"*/delete/byquery\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_tasks?detailed=true&actions=*/delete/byquery\"" + }, + { + "lang": "Java", + "source": "client.tasks().list(l -> l\n .actions(\"*/delete/byquery\")\n .detailed(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -92886,7 +114522,7 @@ { "in": "query", "name": "group_by", - "description": "A key that is used to group tasks in the response.\nThe task lists can be grouped either by nodes or by parent tasks.", + "description": "A key that is used to group tasks in the response.\nThe task lists can be grouped either by nodes or by parent tasks.\n\nSupported values include:\n - `nodes`: Group tasks by node ID.\n - `parents`: Group tasks by parent task ID.\n - `none`: Do not group tasks.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/tasks._types.GroupBy" @@ -92961,6 +114597,36 @@ ], "x-api": "list.tasks", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _tasks?actions=*search&detailed\n" + }, + { + "lang": "Python", + "source": "resp = client.tasks.list(\n actions=\"*search\",\n detailed=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.tasks.list({\n actions: \"*search\",\n detailed: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.tasks.list(\n actions: \"*search\",\n detailed: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->tasks()->list([\n \"actions\" => \"*search\",\n \"detailed\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_tasks?actions=*search&detailed\"" + }, + { + "lang": "Java", + "source": "client.tasks().list(l -> l\n .actions(\"*search\")\n .detailed(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -93103,6 +114769,36 @@ ], "x-api": "terms_enum", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST stackoverflow/_terms_enum\n{\n \"field\" : \"tags\",\n \"string\" : \"kiba\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.terms_enum(\n index=\"stackoverflow\",\n field=\"tags\",\n string=\"kiba\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.termsEnum({\n index: \"stackoverflow\",\n field: \"tags\",\n string: \"kiba\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.terms_enum(\n index: \"stackoverflow\",\n body: {\n \"field\": \"tags\",\n \"string\": \"kiba\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->termsEnum([\n \"index\" => \"stackoverflow\",\n \"body\" => [\n \"field\" => \"tags\",\n \"string\" => \"kiba\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"field\":\"tags\",\"string\":\"kiba\"}' \"$ELASTICSEARCH_URL/stackoverflow/_terms_enum\"" + }, + { + "lang": "Java", + "source": "client.termsEnum(t -> t\n .field(\"tags\")\n .index(\"stackoverflow\")\n .string(\"kiba\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -93243,6 +114939,36 @@ ], "x-api": "terms_enum", "x-category": "search", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST stackoverflow/_terms_enum\n{\n \"field\" : \"tags\",\n \"string\" : \"kiba\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.terms_enum(\n index=\"stackoverflow\",\n field=\"tags\",\n string=\"kiba\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.termsEnum({\n index: \"stackoverflow\",\n field: \"tags\",\n string: \"kiba\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.terms_enum(\n index: \"stackoverflow\",\n body: {\n \"field\": \"tags\",\n \"string\": \"kiba\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->termsEnum([\n \"index\" => \"stackoverflow\",\n \"body\" => [\n \"field\" => \"tags\",\n \"string\" => \"kiba\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"field\":\"tags\",\"string\":\"kiba\"}' \"$ELASTICSEARCH_URL/stackoverflow/_terms_enum\"" + }, + { + "lang": "Java", + "source": "client.termsEnum(t -> t\n .field(\"tags\")\n .index(\"stackoverflow\")\n .string(\"kiba\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -93389,7 +115115,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -93474,7 +115200,7 @@ ] }, "version_type": { - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -93593,6 +115319,36 @@ ], "x-api": "termvectors", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_termvectors/1\n{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + { + "lang": "Python", + "source": "resp = client.termvectors(\n index=\"my-index-000001\",\n id=\"1\",\n fields=[\n \"text\"\n ],\n offsets=True,\n payloads=True,\n positions=True,\n term_statistics=True,\n field_statistics=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.termvectors({\n index: \"my-index-000001\",\n id: 1,\n fields: [\"text\"],\n offsets: true,\n payloads: true,\n positions: true,\n term_statistics: true,\n field_statistics: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.termvectors(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"fields\": [\n \"text\"\n ],\n \"offsets\": true,\n \"payloads\": true,\n \"positions\": true,\n \"term_statistics\": true,\n \"field_statistics\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->termvectors([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"fields\" => array(\n \"text\",\n ),\n \"offsets\" => true,\n \"payloads\" => true,\n \"positions\" => true,\n \"term_statistics\" => true,\n \"field_statistics\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fields\":[\"text\"],\"offsets\":true,\"payloads\":true,\"positions\":true,\"term_statistics\":true,\"field_statistics\":true}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors/1\"" + }, + { + "lang": "Java", + "source": "client.termvectors(t -> t\n .fieldStatistics(true)\n .fields(\"text\")\n .id(\"1\")\n .index(\"my-index-000001\")\n .offsets(true)\n .payloads(true)\n .positions(true)\n .termStatistics(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -93737,7 +115493,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -93822,7 +115578,7 @@ ] }, "version_type": { - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -93941,6 +115697,36 @@ ], "x-api": "termvectors", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_termvectors/1\n{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + { + "lang": "Python", + "source": "resp = client.termvectors(\n index=\"my-index-000001\",\n id=\"1\",\n fields=[\n \"text\"\n ],\n offsets=True,\n payloads=True,\n positions=True,\n term_statistics=True,\n field_statistics=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.termvectors({\n index: \"my-index-000001\",\n id: 1,\n fields: [\"text\"],\n offsets: true,\n payloads: true,\n positions: true,\n term_statistics: true,\n field_statistics: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.termvectors(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"fields\": [\n \"text\"\n ],\n \"offsets\": true,\n \"payloads\": true,\n \"positions\": true,\n \"term_statistics\": true,\n \"field_statistics\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->termvectors([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"fields\" => array(\n \"text\",\n ),\n \"offsets\" => true,\n \"payloads\" => true,\n \"positions\" => true,\n \"term_statistics\" => true,\n \"field_statistics\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fields\":[\"text\"],\"offsets\":true,\"payloads\":true,\"positions\":true,\"term_statistics\":true,\"field_statistics\":true}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors/1\"" + }, + { + "lang": "Java", + "source": "client.termvectors(t -> t\n .fieldStatistics(true)\n .fields(\"text\")\n .id(\"1\")\n .index(\"my-index-000001\")\n .offsets(true)\n .payloads(true)\n .positions(true)\n .termStatistics(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -94076,7 +115862,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -94161,7 +115947,7 @@ ] }, "version_type": { - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -94280,6 +116066,36 @@ ], "x-api": "termvectors", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_termvectors/1\n{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + { + "lang": "Python", + "source": "resp = client.termvectors(\n index=\"my-index-000001\",\n id=\"1\",\n fields=[\n \"text\"\n ],\n offsets=True,\n payloads=True,\n positions=True,\n term_statistics=True,\n field_statistics=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.termvectors({\n index: \"my-index-000001\",\n id: 1,\n fields: [\"text\"],\n offsets: true,\n payloads: true,\n positions: true,\n term_statistics: true,\n field_statistics: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.termvectors(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"fields\": [\n \"text\"\n ],\n \"offsets\": true,\n \"payloads\": true,\n \"positions\": true,\n \"term_statistics\": true,\n \"field_statistics\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->termvectors([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"fields\" => array(\n \"text\",\n ),\n \"offsets\" => true,\n \"payloads\" => true,\n \"positions\" => true,\n \"term_statistics\" => true,\n \"field_statistics\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fields\":[\"text\"],\"offsets\":true,\"payloads\":true,\"positions\":true,\"term_statistics\":true,\"field_statistics\":true}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors/1\"" + }, + { + "lang": "Java", + "source": "client.termvectors(t -> t\n .fieldStatistics(true)\n .fields(\"text\")\n .id(\"1\")\n .index(\"my-index-000001\")\n .offsets(true)\n .payloads(true)\n .positions(true)\n .termStatistics(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -94413,7 +116229,7 @@ { "in": "query", "name": "version_type", - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.VersionType" @@ -94498,7 +116314,7 @@ ] }, "version_type": { - "description": "The version type.", + "description": "The version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -94617,6 +116433,36 @@ ], "x-api": "termvectors", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /my-index-000001/_termvectors/1\n{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}" + }, + { + "lang": "Python", + "source": "resp = client.termvectors(\n index=\"my-index-000001\",\n id=\"1\",\n fields=[\n \"text\"\n ],\n offsets=True,\n payloads=True,\n positions=True,\n term_statistics=True,\n field_statistics=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.termvectors({\n index: \"my-index-000001\",\n id: 1,\n fields: [\"text\"],\n offsets: true,\n payloads: true,\n positions: true,\n term_statistics: true,\n field_statistics: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.termvectors(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"fields\": [\n \"text\"\n ],\n \"offsets\": true,\n \"payloads\": true,\n \"positions\": true,\n \"term_statistics\": true,\n \"field_statistics\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->termvectors([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"fields\" => array(\n \"text\",\n ),\n \"offsets\" => true,\n \"payloads\" => true,\n \"positions\" => true,\n \"term_statistics\" => true,\n \"field_statistics\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fields\":[\"text\"],\"offsets\":true,\"payloads\":true,\"positions\":true,\"term_statistics\":true,\"field_statistics\":true}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors/1\"" + }, + { + "lang": "Java", + "source": "client.termvectors(t -> t\n .fieldStatistics(true)\n .fields(\"text\")\n .id(\"1\")\n .index(\"my-index-000001\")\n .offsets(true)\n .payloads(true)\n .positions(true)\n .termStatistics(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -94915,6 +116761,36 @@ ], "x-api": "find_field_structure.text_structure", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _text_structure/find_field_structure?index=test-logs&field=message\n" + }, + { + "lang": "Python", + "source": "resp = client.text_structure.find_field_structure(\n index=\"test-logs\",\n field=\"message\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.textStructure.findFieldStructure({\n index: \"test-logs\",\n field: \"message\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.text_structure.find_field_structure(\n index: \"test-logs\",\n field: \"message\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->textStructure()->findFieldStructure([\n \"index\" => \"test-logs\",\n \"field\" => \"message\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_text_structure/find_field_structure?index=test-logs&field=message\"" + }, + { + "lang": "Java", + "source": "client.textStructure().findFieldStructure(f -> f\n .field(\"message\")\n .index(\"test-logs\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -95210,6 +117086,36 @@ ], "x-api": "find_message_structure.text_structure", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _text_structure/find_message_structure\n{\n \"messages\": [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.text_structure.find_message_structure(\n messages=[\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.textStructure.findMessageStructure({\n messages: [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\",\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.text_structure.find_message_structure(\n body: {\n \"messages\": [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->textStructure()->findMessageStructure([\n \"body\" => [\n \"messages\" => array(\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"messages\":[\"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"]}' \"$ELASTICSEARCH_URL/_text_structure/find_message_structure\"" + }, + { + "lang": "Java", + "source": "client.textStructure().findMessageStructure(f -> f\n .messages(List.of(\"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -95503,6 +117409,36 @@ ], "x-api": "find_message_structure.text_structure", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _text_structure/find_message_structure\n{\n \"messages\": [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.text_structure.find_message_structure(\n messages=[\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.textStructure.findMessageStructure({\n messages: [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\",\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.text_structure.find_message_structure(\n body: {\n \"messages\": [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->textStructure()->findMessageStructure([\n \"body\" => [\n \"messages\" => array(\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"messages\":[\"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"]}' \"$ELASTICSEARCH_URL/_text_structure/find_message_structure\"" + }, + { + "lang": "Java", + "source": "client.textStructure().findMessageStructure(f -> f\n .messages(List.of(\"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -95865,6 +117801,32 @@ ], "x-api": "find_structure.text_structure", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _text_structure/find_structure\n{\"name\": \"Leviathan Wakes\", \"author\": \"James S.A. Corey\", \"release_date\": \"2011-06-02\", \"page_count\": 561}\n{\"name\": \"Hyperion\", \"author\": \"Dan Simmons\", \"release_date\": \"1989-05-26\", \"page_count\": 482}\n{\"name\": \"Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1965-06-01\", \"page_count\": 604}\n{\"name\": \"Dune Messiah\", \"author\": \"Frank Herbert\", \"release_date\": \"1969-10-15\", \"page_count\": 331}\n{\"name\": \"Children of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1976-04-21\", \"page_count\": 408}\n{\"name\": \"God Emperor of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1981-05-28\", \"page_count\": 454}\n{\"name\": \"Consider Phlebas\", \"author\": \"Iain M. Banks\", \"release_date\": \"1987-04-23\", \"page_count\": 471}\n{\"name\": \"Pandora's Star\", \"author\": \"Peter F. Hamilton\", \"release_date\": \"2004-03-02\", \"page_count\": 768}\n{\"name\": \"Revelation Space\", \"author\": \"Alastair Reynolds\", \"release_date\": \"2000-03-15\", \"page_count\": 585}\n{\"name\": \"A Fire Upon the Deep\", \"author\": \"Vernor Vinge\", \"release_date\": \"1992-06-01\", \"page_count\": 613}\n{\"name\": \"Ender's Game\", \"author\": \"Orson Scott Card\", \"release_date\": \"1985-06-01\", \"page_count\": 324}\n{\"name\": \"1984\", \"author\": \"George Orwell\", \"release_date\": \"1985-06-01\", \"page_count\": 328}\n{\"name\": \"Fahrenheit 451\", \"author\": \"Ray Bradbury\", \"release_date\": \"1953-10-15\", \"page_count\": 227}\n{\"name\": \"Brave New World\", \"author\": \"Aldous Huxley\", \"release_date\": \"1932-06-01\", \"page_count\": 268}\n{\"name\": \"Foundation\", \"author\": \"Isaac Asimov\", \"release_date\": \"1951-06-01\", \"page_count\": 224}\n{\"name\": \"The Giver\", \"author\": \"Lois Lowry\", \"release_date\": \"1993-04-26\", \"page_count\": 208}\n{\"name\": \"Slaughterhouse-Five\", \"author\": \"Kurt Vonnegut\", \"release_date\": \"1969-06-01\", \"page_count\": 275}\n{\"name\": \"The Hitchhiker's Guide to the Galaxy\", \"author\": \"Douglas Adams\", \"release_date\": \"1979-10-12\", \"page_count\": 180}\n{\"name\": \"Snow Crash\", \"author\": \"Neal Stephenson\", \"release_date\": \"1992-06-01\", \"page_count\": 470}\n{\"name\": \"Neuromancer\", \"author\": \"William Gibson\", \"release_date\": \"1984-07-01\", \"page_count\": 271}\n{\"name\": \"The Handmaid's Tale\", \"author\": \"Margaret Atwood\", \"release_date\": \"1985-06-01\", \"page_count\": 311}\n{\"name\": \"Starship Troopers\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1959-12-01\", \"page_count\": 335}\n{\"name\": \"The Left Hand of Darkness\", \"author\": \"Ursula K. Le Guin\", \"release_date\": \"1969-06-01\", \"page_count\": 304}\n{\"name\": \"The Moon is a Harsh Mistress\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1966-04-01\", \"page_count\": 288}" + }, + { + "lang": "Python", + "source": "resp = client.text_structure.find_structure(\n text_files=[\n {\n \"name\": \"Leviathan Wakes\",\n \"author\": \"James S.A. Corey\",\n \"release_date\": \"2011-06-02\",\n \"page_count\": 561\n },\n {\n \"name\": \"Hyperion\",\n \"author\": \"Dan Simmons\",\n \"release_date\": \"1989-05-26\",\n \"page_count\": 482\n },\n {\n \"name\": \"Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1965-06-01\",\n \"page_count\": 604\n },\n {\n \"name\": \"Dune Messiah\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1969-10-15\",\n \"page_count\": 331\n },\n {\n \"name\": \"Children of Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1976-04-21\",\n \"page_count\": 408\n },\n {\n \"name\": \"God Emperor of Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1981-05-28\",\n \"page_count\": 454\n },\n {\n \"name\": \"Consider Phlebas\",\n \"author\": \"Iain M. Banks\",\n \"release_date\": \"1987-04-23\",\n \"page_count\": 471\n },\n {\n \"name\": \"Pandora's Star\",\n \"author\": \"Peter F. Hamilton\",\n \"release_date\": \"2004-03-02\",\n \"page_count\": 768\n },\n {\n \"name\": \"Revelation Space\",\n \"author\": \"Alastair Reynolds\",\n \"release_date\": \"2000-03-15\",\n \"page_count\": 585\n },\n {\n \"name\": \"A Fire Upon the Deep\",\n \"author\": \"Vernor Vinge\",\n \"release_date\": \"1992-06-01\",\n \"page_count\": 613\n },\n {\n \"name\": \"Ender's Game\",\n \"author\": \"Orson Scott Card\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 324\n },\n {\n \"name\": \"1984\",\n \"author\": \"George Orwell\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 328\n },\n {\n \"name\": \"Fahrenheit 451\",\n \"author\": \"Ray Bradbury\",\n \"release_date\": \"1953-10-15\",\n \"page_count\": 227\n },\n {\n \"name\": \"Brave New World\",\n \"author\": \"Aldous Huxley\",\n \"release_date\": \"1932-06-01\",\n \"page_count\": 268\n },\n {\n \"name\": \"Foundation\",\n \"author\": \"Isaac Asimov\",\n \"release_date\": \"1951-06-01\",\n \"page_count\": 224\n },\n {\n \"name\": \"The Giver\",\n \"author\": \"Lois Lowry\",\n \"release_date\": \"1993-04-26\",\n \"page_count\": 208\n },\n {\n \"name\": \"Slaughterhouse-Five\",\n \"author\": \"Kurt Vonnegut\",\n \"release_date\": \"1969-06-01\",\n \"page_count\": 275\n },\n {\n \"name\": \"The Hitchhiker's Guide to the Galaxy\",\n \"author\": \"Douglas Adams\",\n \"release_date\": \"1979-10-12\",\n \"page_count\": 180\n },\n {\n \"name\": \"Snow Crash\",\n \"author\": \"Neal Stephenson\",\n \"release_date\": \"1992-06-01\",\n \"page_count\": 470\n },\n {\n \"name\": \"Neuromancer\",\n \"author\": \"William Gibson\",\n \"release_date\": \"1984-07-01\",\n \"page_count\": 271\n },\n {\n \"name\": \"The Handmaid's Tale\",\n \"author\": \"Margaret Atwood\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 311\n },\n {\n \"name\": \"Starship Troopers\",\n \"author\": \"Robert A. Heinlein\",\n \"release_date\": \"1959-12-01\",\n \"page_count\": 335\n },\n {\n \"name\": \"The Left Hand of Darkness\",\n \"author\": \"Ursula K. Le Guin\",\n \"release_date\": \"1969-06-01\",\n \"page_count\": 304\n },\n {\n \"name\": \"The Moon is a Harsh Mistress\",\n \"author\": \"Robert A. Heinlein\",\n \"release_date\": \"1966-04-01\",\n \"page_count\": 288\n }\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.textStructure.findStructure({\n text_files: [\n {\n name: \"Leviathan Wakes\",\n author: \"James S.A. Corey\",\n release_date: \"2011-06-02\",\n page_count: 561,\n },\n {\n name: \"Hyperion\",\n author: \"Dan Simmons\",\n release_date: \"1989-05-26\",\n page_count: 482,\n },\n {\n name: \"Dune\",\n author: \"Frank Herbert\",\n release_date: \"1965-06-01\",\n page_count: 604,\n },\n {\n name: \"Dune Messiah\",\n author: \"Frank Herbert\",\n release_date: \"1969-10-15\",\n page_count: 331,\n },\n {\n name: \"Children of Dune\",\n author: \"Frank Herbert\",\n release_date: \"1976-04-21\",\n page_count: 408,\n },\n {\n name: \"God Emperor of Dune\",\n author: \"Frank Herbert\",\n release_date: \"1981-05-28\",\n page_count: 454,\n },\n {\n name: \"Consider Phlebas\",\n author: \"Iain M. Banks\",\n release_date: \"1987-04-23\",\n page_count: 471,\n },\n {\n name: \"Pandora's Star\",\n author: \"Peter F. Hamilton\",\n release_date: \"2004-03-02\",\n page_count: 768,\n },\n {\n name: \"Revelation Space\",\n author: \"Alastair Reynolds\",\n release_date: \"2000-03-15\",\n page_count: 585,\n },\n {\n name: \"A Fire Upon the Deep\",\n author: \"Vernor Vinge\",\n release_date: \"1992-06-01\",\n page_count: 613,\n },\n {\n name: \"Ender's Game\",\n author: \"Orson Scott Card\",\n release_date: \"1985-06-01\",\n page_count: 324,\n },\n {\n name: \"1984\",\n author: \"George Orwell\",\n release_date: \"1985-06-01\",\n page_count: 328,\n },\n {\n name: \"Fahrenheit 451\",\n author: \"Ray Bradbury\",\n release_date: \"1953-10-15\",\n page_count: 227,\n },\n {\n name: \"Brave New World\",\n author: \"Aldous Huxley\",\n release_date: \"1932-06-01\",\n page_count: 268,\n },\n {\n name: \"Foundation\",\n author: \"Isaac Asimov\",\n release_date: \"1951-06-01\",\n page_count: 224,\n },\n {\n name: \"The Giver\",\n author: \"Lois Lowry\",\n release_date: \"1993-04-26\",\n page_count: 208,\n },\n {\n name: \"Slaughterhouse-Five\",\n author: \"Kurt Vonnegut\",\n release_date: \"1969-06-01\",\n page_count: 275,\n },\n {\n name: \"The Hitchhiker's Guide to the Galaxy\",\n author: \"Douglas Adams\",\n release_date: \"1979-10-12\",\n page_count: 180,\n },\n {\n name: \"Snow Crash\",\n author: \"Neal Stephenson\",\n release_date: \"1992-06-01\",\n page_count: 470,\n },\n {\n name: \"Neuromancer\",\n author: \"William Gibson\",\n release_date: \"1984-07-01\",\n page_count: 271,\n },\n {\n name: \"The Handmaid's Tale\",\n author: \"Margaret Atwood\",\n release_date: \"1985-06-01\",\n page_count: 311,\n },\n {\n name: \"Starship Troopers\",\n author: \"Robert A. Heinlein\",\n release_date: \"1959-12-01\",\n page_count: 335,\n },\n {\n name: \"The Left Hand of Darkness\",\n author: \"Ursula K. Le Guin\",\n release_date: \"1969-06-01\",\n page_count: 304,\n },\n {\n name: \"The Moon is a Harsh Mistress\",\n author: \"Robert A. Heinlein\",\n release_date: \"1966-04-01\",\n page_count: 288,\n },\n ],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.text_structure.find_structure(\n body: [\n {\n \"name\": \"Leviathan Wakes\",\n \"author\": \"James S.A. Corey\",\n \"release_date\": \"2011-06-02\",\n \"page_count\": 561\n },\n {\n \"name\": \"Hyperion\",\n \"author\": \"Dan Simmons\",\n \"release_date\": \"1989-05-26\",\n \"page_count\": 482\n },\n {\n \"name\": \"Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1965-06-01\",\n \"page_count\": 604\n },\n {\n \"name\": \"Dune Messiah\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1969-10-15\",\n \"page_count\": 331\n },\n {\n \"name\": \"Children of Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1976-04-21\",\n \"page_count\": 408\n },\n {\n \"name\": \"God Emperor of Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1981-05-28\",\n \"page_count\": 454\n },\n {\n \"name\": \"Consider Phlebas\",\n \"author\": \"Iain M. Banks\",\n \"release_date\": \"1987-04-23\",\n \"page_count\": 471\n },\n {\n \"name\": \"Pandora's Star\",\n \"author\": \"Peter F. Hamilton\",\n \"release_date\": \"2004-03-02\",\n \"page_count\": 768\n },\n {\n \"name\": \"Revelation Space\",\n \"author\": \"Alastair Reynolds\",\n \"release_date\": \"2000-03-15\",\n \"page_count\": 585\n },\n {\n \"name\": \"A Fire Upon the Deep\",\n \"author\": \"Vernor Vinge\",\n \"release_date\": \"1992-06-01\",\n \"page_count\": 613\n },\n {\n \"name\": \"Ender's Game\",\n \"author\": \"Orson Scott Card\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 324\n },\n {\n \"name\": \"1984\",\n \"author\": \"George Orwell\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 328\n },\n {\n \"name\": \"Fahrenheit 451\",\n \"author\": \"Ray Bradbury\",\n \"release_date\": \"1953-10-15\",\n \"page_count\": 227\n },\n {\n \"name\": \"Brave New World\",\n \"author\": \"Aldous Huxley\",\n \"release_date\": \"1932-06-01\",\n \"page_count\": 268\n },\n {\n \"name\": \"Foundation\",\n \"author\": \"Isaac Asimov\",\n \"release_date\": \"1951-06-01\",\n \"page_count\": 224\n },\n {\n \"name\": \"The Giver\",\n \"author\": \"Lois Lowry\",\n \"release_date\": \"1993-04-26\",\n \"page_count\": 208\n },\n {\n \"name\": \"Slaughterhouse-Five\",\n \"author\": \"Kurt Vonnegut\",\n \"release_date\": \"1969-06-01\",\n \"page_count\": 275\n },\n {\n \"name\": \"The Hitchhiker's Guide to the Galaxy\",\n \"author\": \"Douglas Adams\",\n \"release_date\": \"1979-10-12\",\n \"page_count\": 180\n },\n {\n \"name\": \"Snow Crash\",\n \"author\": \"Neal Stephenson\",\n \"release_date\": \"1992-06-01\",\n \"page_count\": 470\n },\n {\n \"name\": \"Neuromancer\",\n \"author\": \"William Gibson\",\n \"release_date\": \"1984-07-01\",\n \"page_count\": 271\n },\n {\n \"name\": \"The Handmaid's Tale\",\n \"author\": \"Margaret Atwood\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 311\n },\n {\n \"name\": \"Starship Troopers\",\n \"author\": \"Robert A. Heinlein\",\n \"release_date\": \"1959-12-01\",\n \"page_count\": 335\n },\n {\n \"name\": \"The Left Hand of Darkness\",\n \"author\": \"Ursula K. Le Guin\",\n \"release_date\": \"1969-06-01\",\n \"page_count\": 304\n },\n {\n \"name\": \"The Moon is a Harsh Mistress\",\n \"author\": \"Robert A. Heinlein\",\n \"release_date\": \"1966-04-01\",\n \"page_count\": 288\n }\n ]\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->textStructure()->findStructure([\n \"body\" => array(\n [\n \"name\" => \"Leviathan Wakes\",\n \"author\" => \"James S.A. Corey\",\n \"release_date\" => \"2011-06-02\",\n \"page_count\" => 561,\n ],\n [\n \"name\" => \"Hyperion\",\n \"author\" => \"Dan Simmons\",\n \"release_date\" => \"1989-05-26\",\n \"page_count\" => 482,\n ],\n [\n \"name\" => \"Dune\",\n \"author\" => \"Frank Herbert\",\n \"release_date\" => \"1965-06-01\",\n \"page_count\" => 604,\n ],\n [\n \"name\" => \"Dune Messiah\",\n \"author\" => \"Frank Herbert\",\n \"release_date\" => \"1969-10-15\",\n \"page_count\" => 331,\n ],\n [\n \"name\" => \"Children of Dune\",\n \"author\" => \"Frank Herbert\",\n \"release_date\" => \"1976-04-21\",\n \"page_count\" => 408,\n ],\n [\n \"name\" => \"God Emperor of Dune\",\n \"author\" => \"Frank Herbert\",\n \"release_date\" => \"1981-05-28\",\n \"page_count\" => 454,\n ],\n [\n \"name\" => \"Consider Phlebas\",\n \"author\" => \"Iain M. Banks\",\n \"release_date\" => \"1987-04-23\",\n \"page_count\" => 471,\n ],\n [\n \"name\" => \"Pandora's Star\",\n \"author\" => \"Peter F. Hamilton\",\n \"release_date\" => \"2004-03-02\",\n \"page_count\" => 768,\n ],\n [\n \"name\" => \"Revelation Space\",\n \"author\" => \"Alastair Reynolds\",\n \"release_date\" => \"2000-03-15\",\n \"page_count\" => 585,\n ],\n [\n \"name\" => \"A Fire Upon the Deep\",\n \"author\" => \"Vernor Vinge\",\n \"release_date\" => \"1992-06-01\",\n \"page_count\" => 613,\n ],\n [\n \"name\" => \"Ender's Game\",\n \"author\" => \"Orson Scott Card\",\n \"release_date\" => \"1985-06-01\",\n \"page_count\" => 324,\n ],\n [\n \"name\" => \"1984\",\n \"author\" => \"George Orwell\",\n \"release_date\" => \"1985-06-01\",\n \"page_count\" => 328,\n ],\n [\n \"name\" => \"Fahrenheit 451\",\n \"author\" => \"Ray Bradbury\",\n \"release_date\" => \"1953-10-15\",\n \"page_count\" => 227,\n ],\n [\n \"name\" => \"Brave New World\",\n \"author\" => \"Aldous Huxley\",\n \"release_date\" => \"1932-06-01\",\n \"page_count\" => 268,\n ],\n [\n \"name\" => \"Foundation\",\n \"author\" => \"Isaac Asimov\",\n \"release_date\" => \"1951-06-01\",\n \"page_count\" => 224,\n ],\n [\n \"name\" => \"The Giver\",\n \"author\" => \"Lois Lowry\",\n \"release_date\" => \"1993-04-26\",\n \"page_count\" => 208,\n ],\n [\n \"name\" => \"Slaughterhouse-Five\",\n \"author\" => \"Kurt Vonnegut\",\n \"release_date\" => \"1969-06-01\",\n \"page_count\" => 275,\n ],\n [\n \"name\" => \"The Hitchhiker's Guide to the Galaxy\",\n \"author\" => \"Douglas Adams\",\n \"release_date\" => \"1979-10-12\",\n \"page_count\" => 180,\n ],\n [\n \"name\" => \"Snow Crash\",\n \"author\" => \"Neal Stephenson\",\n \"release_date\" => \"1992-06-01\",\n \"page_count\" => 470,\n ],\n [\n \"name\" => \"Neuromancer\",\n \"author\" => \"William Gibson\",\n \"release_date\" => \"1984-07-01\",\n \"page_count\" => 271,\n ],\n [\n \"name\" => \"The Handmaid's Tale\",\n \"author\" => \"Margaret Atwood\",\n \"release_date\" => \"1985-06-01\",\n \"page_count\" => 311,\n ],\n [\n \"name\" => \"Starship Troopers\",\n \"author\" => \"Robert A. Heinlein\",\n \"release_date\" => \"1959-12-01\",\n \"page_count\" => 335,\n ],\n [\n \"name\" => \"The Left Hand of Darkness\",\n \"author\" => \"Ursula K. Le Guin\",\n \"release_date\" => \"1969-06-01\",\n \"page_count\" => 304,\n ],\n [\n \"name\" => \"The Moon is a Harsh Mistress\",\n \"author\" => \"Robert A. Heinlein\",\n \"release_date\" => \"1966-04-01\",\n \"page_count\" => 288,\n ],\n ),\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/x-ndjson\" -d $'{\"name\":\"Leviathan Wakes\",\"author\":\"James S.A. Corey\",\"release_date\":\"2011-06-02\",\"page_count\":561}\\n{\"name\":\"Hyperion\",\"author\":\"Dan Simmons\",\"release_date\":\"1989-05-26\",\"page_count\":482}\\n{\"name\":\"Dune\",\"author\":\"Frank Herbert\",\"release_date\":\"1965-06-01\",\"page_count\":604}\\n{\"name\":\"Dune Messiah\",\"author\":\"Frank Herbert\",\"release_date\":\"1969-10-15\",\"page_count\":331}\\n{\"name\":\"Children of Dune\",\"author\":\"Frank Herbert\",\"release_date\":\"1976-04-21\",\"page_count\":408}\\n{\"name\":\"God Emperor of Dune\",\"author\":\"Frank Herbert\",\"release_date\":\"1981-05-28\",\"page_count\":454}\\n{\"name\":\"Consider Phlebas\",\"author\":\"Iain M. Banks\",\"release_date\":\"1987-04-23\",\"page_count\":471}\\n{\"name\":\"Pandora'\"'\"$'s Star\",\"author\":\"Peter F. Hamilton\",\"release_date\":\"2004-03-02\",\"page_count\":768}\\n{\"name\":\"Revelation Space\",\"author\":\"Alastair Reynolds\",\"release_date\":\"2000-03-15\",\"page_count\":585}\\n{\"name\":\"A Fire Upon the Deep\",\"author\":\"Vernor Vinge\",\"release_date\":\"1992-06-01\",\"page_count\":613}\\n{\"name\":\"Ender'\"'\"$'s Game\",\"author\":\"Orson Scott Card\",\"release_date\":\"1985-06-01\",\"page_count\":324}\\n{\"name\":\"1984\",\"author\":\"George Orwell\",\"release_date\":\"1985-06-01\",\"page_count\":328}\\n{\"name\":\"Fahrenheit 451\",\"author\":\"Ray Bradbury\",\"release_date\":\"1953-10-15\",\"page_count\":227}\\n{\"name\":\"Brave New World\",\"author\":\"Aldous Huxley\",\"release_date\":\"1932-06-01\",\"page_count\":268}\\n{\"name\":\"Foundation\",\"author\":\"Isaac Asimov\",\"release_date\":\"1951-06-01\",\"page_count\":224}\\n{\"name\":\"The Giver\",\"author\":\"Lois Lowry\",\"release_date\":\"1993-04-26\",\"page_count\":208}\\n{\"name\":\"Slaughterhouse-Five\",\"author\":\"Kurt Vonnegut\",\"release_date\":\"1969-06-01\",\"page_count\":275}\\n{\"name\":\"The Hitchhiker'\"'\"$'s Guide to the Galaxy\",\"author\":\"Douglas Adams\",\"release_date\":\"1979-10-12\",\"page_count\":180}\\n{\"name\":\"Snow Crash\",\"author\":\"Neal Stephenson\",\"release_date\":\"1992-06-01\",\"page_count\":470}\\n{\"name\":\"Neuromancer\",\"author\":\"William Gibson\",\"release_date\":\"1984-07-01\",\"page_count\":271}\\n{\"name\":\"The Handmaid'\"'\"$'s Tale\",\"author\":\"Margaret Atwood\",\"release_date\":\"1985-06-01\",\"page_count\":311}\\n{\"name\":\"Starship Troopers\",\"author\":\"Robert A. Heinlein\",\"release_date\":\"1959-12-01\",\"page_count\":335}\\n{\"name\":\"The Left Hand of Darkness\",\"author\":\"Ursula K. Le Guin\",\"release_date\":\"1969-06-01\",\"page_count\":304}\\n{\"name\":\"The Moon is a Harsh Mistress\",\"author\":\"Robert A. Heinlein\",\"release_date\":\"1966-04-01\",\"page_count\":288}\\n' \"$ELASTICSEARCH_URL/_text_structure/find_structure\"" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -95970,6 +117932,36 @@ ], "x-api": "test_grok_pattern.text_structure", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _text_structure/test_grok_pattern\n{\n \"grok_pattern\": \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\": [\n \"Hello John Doe\",\n \"this does not match\"\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.text_structure.test_grok_pattern(\n grok_pattern=\"Hello %{WORD:first_name} %{WORD:last_name}\",\n text=[\n \"Hello John Doe\",\n \"this does not match\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.textStructure.testGrokPattern({\n grok_pattern: \"Hello %{WORD:first_name} %{WORD:last_name}\",\n text: [\"Hello John Doe\", \"this does not match\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.text_structure.test_grok_pattern(\n body: {\n \"grok_pattern\": \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\": [\n \"Hello John Doe\",\n \"this does not match\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->textStructure()->testGrokPattern([\n \"body\" => [\n \"grok_pattern\" => \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\" => array(\n \"Hello John Doe\",\n \"this does not match\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grok_pattern\":\"Hello %{WORD:first_name} %{WORD:last_name}\",\"text\":[\"Hello John Doe\",\"this does not match\"]}' \"$ELASTICSEARCH_URL/_text_structure/test_grok_pattern\"" + }, + { + "lang": "Java", + "source": "client.textStructure().testGrokPattern(t -> t\n .grokPattern(\"Hello %{WORD:first_name} %{WORD:last_name}\")\n .text(List.of(\"Hello John Doe\",\"this does not match\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -96073,6 +118065,36 @@ ], "x-api": "test_grok_pattern.text_structure", "x-category": "ai/ml", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _text_structure/test_grok_pattern\n{\n \"grok_pattern\": \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\": [\n \"Hello John Doe\",\n \"this does not match\"\n ]\n}" + }, + { + "lang": "Python", + "source": "resp = client.text_structure.test_grok_pattern(\n grok_pattern=\"Hello %{WORD:first_name} %{WORD:last_name}\",\n text=[\n \"Hello John Doe\",\n \"this does not match\"\n ],\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.textStructure.testGrokPattern({\n grok_pattern: \"Hello %{WORD:first_name} %{WORD:last_name}\",\n text: [\"Hello John Doe\", \"this does not match\"],\n});" + }, + { + "lang": "Ruby", + "source": "response = client.text_structure.test_grok_pattern(\n body: {\n \"grok_pattern\": \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\": [\n \"Hello John Doe\",\n \"this does not match\"\n ]\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->textStructure()->testGrokPattern([\n \"body\" => [\n \"grok_pattern\" => \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\" => array(\n \"Hello John Doe\",\n \"this does not match\",\n ),\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grok_pattern\":\"Hello %{WORD:first_name} %{WORD:last_name}\",\"text\":[\"Hello John Doe\",\"this does not match\"]}' \"$ELASTICSEARCH_URL/_text_structure/test_grok_pattern\"" + }, + { + "lang": "Java", + "source": "client.textStructure().testGrokPattern(t -> t\n .grokPattern(\"Hello %{WORD:first_name} %{WORD:last_name}\")\n .text(List.of(\"Hello John Doe\",\"this does not match\"))\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -96184,6 +118206,36 @@ ], "x-api": "get_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _transform?size=10\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.get_transform(\n size=\"10\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.getTransform({\n size: 10,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.get_transform(\n size: \"10\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->getTransform([\n \"size\" => \"10\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform?size=10\"" + }, + { + "lang": "Java", + "source": "client.transform().getTransform(g -> g\n .size(10)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -96364,6 +118416,36 @@ ], "x-api": "put_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _transform/ecommerce_transform1\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.transform.put_transform(\n transform_id=\"ecommerce_transform1\",\n source={\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n pivot={\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": True\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n description=\"Maximum priced ecommerce data by customer_id in Asia\",\n dest={\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n frequency=\"5m\",\n sync={\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n retention_policy={\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.putTransform({\n transform_id: \"ecommerce_transform1\",\n source: {\n index: \"kibana_sample_data_ecommerce\",\n query: {\n term: {\n \"geoip.continent_name\": {\n value: \"Asia\",\n },\n },\n },\n },\n pivot: {\n group_by: {\n customer_id: {\n terms: {\n field: \"customer_id\",\n missing_bucket: true,\n },\n },\n },\n aggregations: {\n max_price: {\n max: {\n field: \"taxful_total_price\",\n },\n },\n },\n },\n description: \"Maximum priced ecommerce data by customer_id in Asia\",\n dest: {\n index: \"kibana_sample_data_ecommerce_transform1\",\n pipeline: \"add_timestamp_pipeline\",\n },\n frequency: \"5m\",\n sync: {\n time: {\n field: \"order_date\",\n delay: \"60s\",\n },\n },\n retention_policy: {\n time: {\n field: \"order_date\",\n max_age: \"30d\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.put_transform(\n transform_id: \"ecommerce_transform1\",\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->putTransform([\n \"transform_id\" => \"ecommerce_transform1\",\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n \"query\" => [\n \"term\" => [\n \"geoip.continent_name\" => [\n \"value\" => \"Asia\",\n ],\n ],\n ],\n ],\n \"pivot\" => [\n \"group_by\" => [\n \"customer_id\" => [\n \"terms\" => [\n \"field\" => \"customer_id\",\n \"missing_bucket\" => true,\n ],\n ],\n ],\n \"aggregations\" => [\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"taxful_total_price\",\n ],\n ],\n ],\n ],\n \"description\" => \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\" => [\n \"index\" => \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\" => \"add_timestamp_pipeline\",\n ],\n \"frequency\" => \"5m\",\n \"sync\" => [\n \"time\" => [\n \"field\" => \"order_date\",\n \"delay\" => \"60s\",\n ],\n ],\n \"retention_policy\" => [\n \"time\" => [\n \"field\" => \"order_date\",\n \"max_age\" => \"30d\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\",\"query\":{\"term\":{\"geoip.continent_name\":{\"value\":\"Asia\"}}}},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}},\"description\":\"Maximum priced ecommerce data by customer_id in Asia\",\"dest\":{\"index\":\"kibana_sample_data_ecommerce_transform1\",\"pipeline\":\"add_timestamp_pipeline\"},\"frequency\":\"5m\",\"sync\":{\"time\":{\"field\":\"order_date\",\"delay\":\"60s\"}},\"retention_policy\":{\"time\":{\"field\":\"order_date\",\"max_age\":\"30d\"}}}' \"$ELASTICSEARCH_URL/_transform/ecommerce_transform1\"" + }, + { + "lang": "Java", + "source": "client.transform().putTransform(p -> p\n .description(\"Maximum priced ecommerce data by customer_id in Asia\")\n .dest(d -> d\n .index(\"kibana_sample_data_ecommerce_transform1\")\n .pipeline(\"add_timestamp_pipeline\")\n )\n .frequency(f -> f\n .time(\"5m\")\n )\n .pivot(pi -> pi\n .aggregations(\"max_price\", a -> a\n .max(m -> m\n .field(\"taxful_total_price\")\n )\n )\n .groupBy(\"customer_id\", g -> g\n .terms(t -> t\n .field(\"customer_id\")\n .missingBucket(true)\n )\n )\n )\n .retentionPolicy(r -> r\n .time(t -> t\n .field(\"order_date\")\n .maxAge(m -> m\n .time(\"30d\")\n )\n )\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n .query(q -> q\n .term(te -> te\n .field(\"geoip.continent_name\")\n .value(FieldValue.of(\"Asia\"))\n )\n )\n )\n .sync(sy -> sy\n .time(ti -> ti\n .delay(d -> d\n .time(\"60s\")\n )\n .field(\"order_date\")\n )\n )\n .transformId(\"ecommerce_transform1\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -96447,6 +118529,36 @@ ], "x-api": "delete_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _transform/ecommerce_transform\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.delete_transform(\n transform_id=\"ecommerce_transform\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.deleteTransform({\n transform_id: \"ecommerce_transform\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.delete_transform(\n transform_id: \"ecommerce_transform\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->deleteTransform([\n \"transform_id\" => \"ecommerce_transform\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce_transform\"" + }, + { + "lang": "Java", + "source": "client.transform().deleteTransform(d -> d\n .transformId(\"ecommerce_transform\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -96581,6 +118693,36 @@ ], "x-api": "get_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _transform?size=10\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.get_transform(\n size=\"10\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.getTransform({\n size: 10,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.get_transform(\n size: \"10\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->getTransform([\n \"size\" => \"10\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform?size=10\"" + }, + { + "lang": "Java", + "source": "client.transform().getTransform(g -> g\n .size(10)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -96693,6 +118835,36 @@ ], "x-api": "get_transform_stats.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _transform/ecommerce-customer-transform/_stats\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.get_transform_stats(\n transform_id=\"ecommerce-customer-transform\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.getTransformStats({\n transform_id: \"ecommerce-customer-transform\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.get_transform_stats(\n transform_id: \"ecommerce-customer-transform\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->getTransformStats([\n \"transform_id\" => \"ecommerce-customer-transform\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce-customer-transform/_stats\"" + }, + { + "lang": "Java", + "source": "client.transform().getTransformStats(g -> g\n .transformId(\"ecommerce-customer-transform\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -96866,6 +119038,36 @@ ], "x-api": "preview_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.transform.preview_transform(\n source={\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n pivot={\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": True\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.previewTransform({\n source: {\n index: \"kibana_sample_data_ecommerce\",\n },\n pivot: {\n group_by: {\n customer_id: {\n terms: {\n field: \"customer_id\",\n missing_bucket: true,\n },\n },\n },\n aggregations: {\n max_price: {\n max: {\n field: \"taxful_total_price\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.preview_transform(\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->previewTransform([\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n ],\n \"pivot\" => [\n \"group_by\" => [\n \"customer_id\" => [\n \"terms\" => [\n \"field\" => \"customer_id\",\n \"missing_bucket\" => true,\n ],\n ],\n ],\n \"aggregations\" => [\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"taxful_total_price\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\"},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}}}' \"$ELASTICSEARCH_URL/_transform/_preview\"" + }, + { + "lang": "Java", + "source": "client.transform().previewTransform(p -> p\n .pivot(pi -> pi\n .aggregations(\"max_price\", a -> a\n .max(m -> m\n .field(\"taxful_total_price\")\n )\n )\n .groupBy(\"customer_id\", g -> g\n .terms(t -> t\n .field(\"customer_id\")\n .missingBucket(true)\n )\n )\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -97037,6 +119239,36 @@ ], "x-api": "preview_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.transform.preview_transform(\n source={\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n pivot={\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": True\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.previewTransform({\n source: {\n index: \"kibana_sample_data_ecommerce\",\n },\n pivot: {\n group_by: {\n customer_id: {\n terms: {\n field: \"customer_id\",\n missing_bucket: true,\n },\n },\n },\n aggregations: {\n max_price: {\n max: {\n field: \"taxful_total_price\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.preview_transform(\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->previewTransform([\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n ],\n \"pivot\" => [\n \"group_by\" => [\n \"customer_id\" => [\n \"terms\" => [\n \"field\" => \"customer_id\",\n \"missing_bucket\" => true,\n ],\n ],\n ],\n \"aggregations\" => [\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"taxful_total_price\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\"},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}}}' \"$ELASTICSEARCH_URL/_transform/_preview\"" + }, + { + "lang": "Java", + "source": "client.transform().previewTransform(p -> p\n .pivot(pi -> pi\n .aggregations(\"max_price\", a -> a\n .max(m -> m\n .field(\"taxful_total_price\")\n )\n )\n .groupBy(\"customer_id\", g -> g\n .terms(t -> t\n .field(\"customer_id\")\n .missingBucket(true)\n )\n )\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -97199,6 +119431,36 @@ ], "x-api": "preview_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.transform.preview_transform(\n source={\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n pivot={\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": True\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.previewTransform({\n source: {\n index: \"kibana_sample_data_ecommerce\",\n },\n pivot: {\n group_by: {\n customer_id: {\n terms: {\n field: \"customer_id\",\n missing_bucket: true,\n },\n },\n },\n aggregations: {\n max_price: {\n max: {\n field: \"taxful_total_price\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.preview_transform(\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->previewTransform([\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n ],\n \"pivot\" => [\n \"group_by\" => [\n \"customer_id\" => [\n \"terms\" => [\n \"field\" => \"customer_id\",\n \"missing_bucket\" => true,\n ],\n ],\n ],\n \"aggregations\" => [\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"taxful_total_price\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\"},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}}}' \"$ELASTICSEARCH_URL/_transform/_preview\"" + }, + { + "lang": "Java", + "source": "client.transform().previewTransform(p -> p\n .pivot(pi -> pi\n .aggregations(\"max_price\", a -> a\n .max(m -> m\n .field(\"taxful_total_price\")\n )\n )\n .groupBy(\"customer_id\", g -> g\n .terms(t -> t\n .field(\"customer_id\")\n .missingBucket(true)\n )\n )\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -97359,6 +119621,36 @@ ], "x-api": "preview_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.transform.preview_transform(\n source={\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n pivot={\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": True\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.previewTransform({\n source: {\n index: \"kibana_sample_data_ecommerce\",\n },\n pivot: {\n group_by: {\n customer_id: {\n terms: {\n field: \"customer_id\",\n missing_bucket: true,\n },\n },\n },\n aggregations: {\n max_price: {\n max: {\n field: \"taxful_total_price\",\n },\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.preview_transform(\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->previewTransform([\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n ],\n \"pivot\" => [\n \"group_by\" => [\n \"customer_id\" => [\n \"terms\" => [\n \"field\" => \"customer_id\",\n \"missing_bucket\" => true,\n ],\n ],\n ],\n \"aggregations\" => [\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"taxful_total_price\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\"},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}}}' \"$ELASTICSEARCH_URL/_transform/_preview\"" + }, + { + "lang": "Java", + "source": "client.transform().previewTransform(p -> p\n .pivot(pi -> pi\n .aggregations(\"max_price\", a -> a\n .max(m -> m\n .field(\"taxful_total_price\")\n )\n )\n .groupBy(\"customer_id\", g -> g\n .terms(t -> t\n .field(\"customer_id\")\n .missingBucket(true)\n )\n )\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -97435,6 +119727,36 @@ ], "x-api": "reset_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/ecommerce_transform/_reset\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.reset_transform(\n transform_id=\"ecommerce_transform\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.resetTransform({\n transform_id: \"ecommerce_transform\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.reset_transform(\n transform_id: \"ecommerce_transform\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->resetTransform([\n \"transform_id\" => \"ecommerce_transform\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce_transform/_reset\"" + }, + { + "lang": "Java", + "source": "client.transform().resetTransform(r -> r\n .transformId(\"ecommerce_transform\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -97501,6 +119823,36 @@ ], "x-api": "schedule_now_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/ecommerce_transform/_schedule_now\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.schedule_now_transform(\n transform_id=\"ecommerce_transform\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.scheduleNowTransform({\n transform_id: \"ecommerce_transform\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.schedule_now_transform(\n transform_id: \"ecommerce_transform\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->scheduleNowTransform([\n \"transform_id\" => \"ecommerce_transform\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce_transform/_schedule_now\"" + }, + { + "lang": "Java", + "source": "client.transform().scheduleNowTransform(s -> s\n .transformId(\"ecommerce_transform\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -97560,6 +119912,36 @@ ], "x-api": "set_upgrade_mode.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/set_upgrade_mode?enabled=true\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.set_upgrade_mode(\n enabled=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.setUpgradeMode({\n enabled: \"true\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.set_upgrade_mode(\n enabled: \"true\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->setUpgradeMode([\n \"enabled\" => \"true\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/set_upgrade_mode?enabled=true\"" + }, + { + "lang": "Java", + "source": "client.transform().setUpgradeMode(s -> s\n .enabled(true)\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -97637,6 +120019,36 @@ ], "x-api": "start_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/ecommerce-customer-transform/_start\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.start_transform(\n transform_id=\"ecommerce-customer-transform\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.startTransform({\n transform_id: \"ecommerce-customer-transform\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.start_transform(\n transform_id: \"ecommerce-customer-transform\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->startTransform([\n \"transform_id\" => \"ecommerce-customer-transform\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce-customer-transform/_start\"" + }, + { + "lang": "Java", + "source": "client.transform().startTransform(s -> s\n .transformId(\"ecommerce-customer-transform\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -97743,6 +120155,36 @@ ], "x-api": "stop_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/ecommerce_transform/_stop\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.stop_transform(\n transform_id=\"ecommerce_transform\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.stopTransform({\n transform_id: \"ecommerce_transform\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.stop_transform(\n transform_id: \"ecommerce_transform\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->stopTransform([\n \"transform_id\" => \"ecommerce_transform\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce_transform/_stop\"" + }, + { + "lang": "Java", + "source": "client.transform().stopTransform(s -> s\n .transformId(\"ecommerce_transform\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -98004,6 +120446,36 @@ ], "x-api": "update_transform.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/simple-kibana-ecomm-pivot/_update\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.transform.update_transform(\n transform_id=\"simple-kibana-ecomm-pivot\",\n source={\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n description=\"Maximum priced ecommerce data by customer_id in Asia\",\n dest={\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n frequency=\"15m\",\n sync={\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.updateTransform({\n transform_id: \"simple-kibana-ecomm-pivot\",\n source: {\n index: \"kibana_sample_data_ecommerce\",\n query: {\n term: {\n \"geoip.continent_name\": {\n value: \"Asia\",\n },\n },\n },\n },\n description: \"Maximum priced ecommerce data by customer_id in Asia\",\n dest: {\n index: \"kibana_sample_data_ecommerce_transform_v2\",\n pipeline: \"add_timestamp_pipeline\",\n },\n frequency: \"15m\",\n sync: {\n time: {\n field: \"order_date\",\n delay: \"120s\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.transform.update_transform(\n transform_id: \"simple-kibana-ecomm-pivot\",\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->updateTransform([\n \"transform_id\" => \"simple-kibana-ecomm-pivot\",\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n \"query\" => [\n \"term\" => [\n \"geoip.continent_name\" => [\n \"value\" => \"Asia\",\n ],\n ],\n ],\n ],\n \"description\" => \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\" => [\n \"index\" => \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\" => \"add_timestamp_pipeline\",\n ],\n \"frequency\" => \"15m\",\n \"sync\" => [\n \"time\" => [\n \"field\" => \"order_date\",\n \"delay\" => \"120s\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\",\"query\":{\"term\":{\"geoip.continent_name\":{\"value\":\"Asia\"}}}},\"description\":\"Maximum priced ecommerce data by customer_id in Asia\",\"dest\":{\"index\":\"kibana_sample_data_ecommerce_transform_v2\",\"pipeline\":\"add_timestamp_pipeline\"},\"frequency\":\"15m\",\"sync\":{\"time\":{\"field\":\"order_date\",\"delay\":\"120s\"}}}' \"$ELASTICSEARCH_URL/_transform/simple-kibana-ecomm-pivot/_update\"" + }, + { + "lang": "Java", + "source": "client.transform().updateTransform(u -> u\n .description(\"Maximum priced ecommerce data by customer_id in Asia\")\n .dest(d -> d\n .index(\"kibana_sample_data_ecommerce_transform_v2\")\n .pipeline(\"add_timestamp_pipeline\")\n )\n .frequency(f -> f\n .time(\"15m\")\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n .query(q -> q\n .term(t -> t\n .field(\"geoip.continent_name\")\n .value(FieldValue.of(\"Asia\"))\n )\n )\n )\n .sync(sy -> sy\n .time(t -> t\n .delay(d -> d\n .time(\"120s\")\n )\n .field(\"order_date\")\n )\n )\n .transformId(\"simple-kibana-ecomm-pivot\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -98088,6 +120560,36 @@ ], "x-api": "upgrade_transforms.transform", "x-category": "ingest", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _transform/_upgrade\n" + }, + { + "lang": "Python", + "source": "resp = client.transform.upgrade_transforms()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.transform.upgradeTransforms();" + }, + { + "lang": "Ruby", + "source": "response = client.transform.upgrade_transforms" + }, + { + "lang": "PHP", + "source": "$resp = $client->transform()->upgradeTransforms();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/_upgrade\"" + }, + { + "lang": "Java", + "source": "client.transform().upgradeTransforms(u -> u);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -98399,6 +120901,36 @@ ], "x-api": "update", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\" : {\n \"count\" : 4\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script={\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\": {\n \"count\": 4\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: {\n source: \"ctx._source.counter += params.count\",\n lang: \"painless\",\n params: {\n count: 4,\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\": {\n \"count\": 4\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => [\n \"source\" => \"ctx._source.counter += params.count\",\n \"lang\" => \"painless\",\n \"params\" => [\n \"count\" => 4,\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"ctx._source.counter += params.count\",\"lang\":\"painless\",\"params\":{\"count\":4}}}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "lang": "Java", + "source": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source.counter += params.count\")\n )\n .params(\"count\", JsonData.fromJson(\"4\"))\n .lang(\"painless\")\n )\n,Void.class);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -98464,7 +120996,7 @@ { "in": "query", "name": "conflicts", - "description": "The preferred behavior when update by query hits version conflicts: `abort` or `proceed`.", + "description": "The preferred behavior when update by query hits version conflicts: `abort` or `proceed`.\n\nSupported values include:\n - `abort`: Stop reindexing if there are conflicts.\n - `proceed`: Continue reindexing even if there are conflicts.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Conflicts" @@ -98494,7 +121026,7 @@ { "in": "query", "name": "expand_wildcards", - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -98644,7 +121176,7 @@ { "in": "query", "name": "search_type", - "description": "The type of the search operation. Available options include `query_then_fetch` and `dfs_query_then_fetch`.", + "description": "The type of the search operation. Available options include `query_then_fetch` and `dfs_query_then_fetch`.\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.SearchType" @@ -98783,7 +121315,7 @@ ] }, "conflicts": { - "description": "The preferred behavior when update by query hits version conflicts: `abort` or `proceed`.", + "description": "The preferred behavior when update by query hits version conflicts: `abort` or `proceed`.\n\nSupported values include:\n - `abort`: Stop reindexing if there are conflicts.\n - `proceed`: Continue reindexing even if there are conflicts.\n\n", "default": "abort", "allOf": [ { @@ -98940,6 +121472,36 @@ ], "x-api": "update_by_query", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST my-index-000001/_update_by_query?conflicts=proceed\n{\n \"query\": { \n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.update_by_query(\n index=\"my-index-000001\",\n conflicts=\"proceed\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.updateByQuery({\n index: \"my-index-000001\",\n conflicts: \"proceed\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.update_by_query(\n index: \"my-index-000001\",\n conflicts: \"proceed\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->updateByQuery([\n \"index\" => \"my-index-000001\",\n \"conflicts\" => \"proceed\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_update_by_query?conflicts=proceed\"" + }, + { + "lang": "Java", + "source": "client.updateByQuery(u -> u\n .conflicts(Conflicts.Proceed)\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99009,6 +121571,36 @@ ], "x-api": "update_by_query_rethrottle", "x-category": "document management", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\n" + }, + { + "lang": "Python", + "source": "resp = client.update_by_query_rethrottle(\n task_id=\"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second=\"-1\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.updateByQueryRethrottle({\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.update_by_query_rethrottle(\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->updateByQueryRethrottle([\n \"task_id\" => \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n \"requests_per_second\" => \"-1\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\"" + }, + { + "lang": "Java", + "source": "client.updateByQueryRethrottle(u -> u\n .requestsPerSecond(-1.0F)\n .taskId(\"r1A2WoRbTwKZ516z6NEs5A:36619\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99082,6 +121674,36 @@ ], "x-api": "ack_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/watch/my_watch/_ack\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.ack_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.ackWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.ack_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->ackWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_ack\"" + }, + { + "lang": "Java", + "source": "client.watcher().ackWatch(a -> a\n .watchId(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99153,6 +121775,36 @@ ], "x-api": "ack_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/watch/my_watch/_ack\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.ack_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.ackWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.ack_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->ackWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_ack\"" + }, + { + "lang": "Java", + "source": "client.watcher().ackWatch(a -> a\n .watchId(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99237,6 +121889,36 @@ ], "x-api": "ack_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/watch/my_watch/_ack\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.ack_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.ackWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.ack_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->ackWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_ack\"" + }, + { + "lang": "Java", + "source": "client.watcher().ackWatch(a -> a\n .watchId(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99319,6 +122001,36 @@ ], "x-api": "ack_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/watch/my_watch/_ack\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.ack_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.ackWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.ack_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->ackWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_ack\"" + }, + { + "lang": "Java", + "source": "client.watcher().ackWatch(a -> a\n .watchId(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99386,6 +122098,36 @@ ], "x-api": "activate_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _watcher/watch/my_watch/_activate\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.activate_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.activateWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.activate_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->activateWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_activate\"" + }, + { + "lang": "Java", + "source": "client.watcher().activateWatch(a -> a\n .watchId(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99451,6 +122193,36 @@ ], "x-api": "activate_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _watcher/watch/my_watch/_activate\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.activate_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.activateWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.activate_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->activateWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_activate\"" + }, + { + "lang": "Java", + "source": "client.watcher().activateWatch(a -> a\n .watchId(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99518,6 +122290,36 @@ ], "x-api": "deactivate_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _watcher/watch/my_watch/_deactivate\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.deactivate_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.deactivateWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.deactivate_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->deactivateWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_deactivate\"" + }, + { + "lang": "Java", + "source": "client.watcher().deactivateWatch(d -> d\n .watchId(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99583,6 +122385,36 @@ ], "x-api": "deactivate_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _watcher/watch/my_watch/_deactivate\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.deactivate_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.deactivateWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.deactivate_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->deactivateWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_deactivate\"" + }, + { + "lang": "Java", + "source": "client.watcher().deactivateWatch(d -> d\n .watchId(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99685,6 +122517,36 @@ ], "x-api": "get_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _watcher/watch/my_watch\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.get_watch(\n id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.getWatch({\n id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.get_watch(\n id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->getWatch([\n \"id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch\"" + }, + { + "lang": "Java", + "source": "client.watcher().getWatch(g -> g\n .id(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -99891,6 +122753,36 @@ ], "x-api": "put_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _watcher/watch/my-watch\n{\n \"trigger\" : {\n \"schedule\" : { \"cron\" : \"0 0/1 * * * ?\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [\n \"logstash*\"\n ],\n \"body\" : {\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\" : {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"email_admin\" : {\n \"email\" : {\n \"to\" : \"admin@domain.host.com\",\n \"subject\" : \"404 recently encountered\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.watcher.put_watch(\n id=\"my-watch\",\n trigger={\n \"schedule\": {\n \"cron\": \"0 0/1 * * * ?\"\n }\n },\n input={\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logstash*\"\n ],\n \"body\": {\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\": {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n condition={\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n actions={\n \"email_admin\": {\n \"email\": {\n \"to\": \"admin@domain.host.com\",\n \"subject\": \"404 recently encountered\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.putWatch({\n id: \"my-watch\",\n trigger: {\n schedule: {\n cron: \"0 0/1 * * * ?\",\n },\n },\n input: {\n search: {\n request: {\n indices: [\"logstash*\"],\n body: {\n query: {\n bool: {\n must: {\n match: {\n response: 404,\n },\n },\n filter: {\n range: {\n \"@timestamp\": {\n from: \"{{ctx.trigger.scheduled_time}}||-5m\",\n to: \"{{ctx.trigger.triggered_time}}\",\n },\n },\n },\n },\n },\n },\n },\n },\n },\n condition: {\n compare: {\n \"ctx.payload.hits.total\": {\n gt: 0,\n },\n },\n },\n actions: {\n email_admin: {\n email: {\n to: \"admin@domain.host.com\",\n subject: \"404 recently encountered\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.put_watch(\n id: \"my-watch\",\n body: {\n \"trigger\": {\n \"schedule\": {\n \"cron\": \"0 0/1 * * * ?\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logstash*\"\n ],\n \"body\": {\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\": {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": {\n \"email_admin\": {\n \"email\": {\n \"to\": \"admin@domain.host.com\",\n \"subject\": \"404 recently encountered\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->putWatch([\n \"id\" => \"my-watch\",\n \"body\" => [\n \"trigger\" => [\n \"schedule\" => [\n \"cron\" => \"0 0/1 * * * ?\",\n ],\n ],\n \"input\" => [\n \"search\" => [\n \"request\" => [\n \"indices\" => array(\n \"logstash*\",\n ),\n \"body\" => [\n \"query\" => [\n \"bool\" => [\n \"must\" => [\n \"match\" => [\n \"response\" => 404,\n ],\n ],\n \"filter\" => [\n \"range\" => [\n \"@timestamp\" => [\n \"from\" => \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\" => \"{{ctx.trigger.triggered_time}}\",\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n \"condition\" => [\n \"compare\" => [\n \"ctx.payload.hits.total\" => [\n \"gt\" => 0,\n ],\n ],\n ],\n \"actions\" => [\n \"email_admin\" => [\n \"email\" => [\n \"to\" => \"admin@domain.host.com\",\n \"subject\" => \"404 recently encountered\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"trigger\":{\"schedule\":{\"cron\":\"0 0/1 * * * ?\"}},\"input\":{\"search\":{\"request\":{\"indices\":[\"logstash*\"],\"body\":{\"query\":{\"bool\":{\"must\":{\"match\":{\"response\":404}},\"filter\":{\"range\":{\"@timestamp\":{\"from\":\"{{ctx.trigger.scheduled_time}}||-5m\",\"to\":\"{{ctx.trigger.triggered_time}}\"}}}}}}}}},\"condition\":{\"compare\":{\"ctx.payload.hits.total\":{\"gt\":0}}},\"actions\":{\"email_admin\":{\"email\":{\"to\":\"admin@domain.host.com\",\"subject\":\"404 recently encountered\"}}}}' \"$ELASTICSEARCH_URL/_watcher/watch/my-watch\"" + }, + { + "lang": "Java", + "source": "client.watcher().putWatch(p -> p\n .actions(\"email_admin\", a -> a\n .email(e -> e\n .subject(\"404 recently encountered\")\n .to(\"admin@domain.host.com\")\n )\n )\n .condition(c -> c\n .compare(NamedValue.of(\"ctx.payload.hits.total\",Pair.of(ConditionOp.Gt,FieldValue.of(0))))\n )\n .id(\"my-watch\")\n .input(i -> i\n .search(s -> s\n .request(r -> r\n .body(b -> b\n .query(q -> q\n .bool(bo -> bo\n .filter(f -> f\n .range(ra -> ra\n .untyped(u -> u\n .field(\"@timestamp\")\n )\n )\n )\n .must(m -> m\n .match(ma -> ma\n .field(\"response\")\n .query(FieldValue.of(404))\n )\n )\n )\n )\n )\n .indices(\"logstash*\")\n )\n )\n )\n .trigger(t -> t\n .schedule(sc -> sc\n .cron(\"0 0/1 * * * ?\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -100097,6 +122989,36 @@ ], "x-api": "put_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT _watcher/watch/my-watch\n{\n \"trigger\" : {\n \"schedule\" : { \"cron\" : \"0 0/1 * * * ?\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [\n \"logstash*\"\n ],\n \"body\" : {\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\" : {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"email_admin\" : {\n \"email\" : {\n \"to\" : \"admin@domain.host.com\",\n \"subject\" : \"404 recently encountered\"\n }\n }\n }\n}" + }, + { + "lang": "Python", + "source": "resp = client.watcher.put_watch(\n id=\"my-watch\",\n trigger={\n \"schedule\": {\n \"cron\": \"0 0/1 * * * ?\"\n }\n },\n input={\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logstash*\"\n ],\n \"body\": {\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\": {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n condition={\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n actions={\n \"email_admin\": {\n \"email\": {\n \"to\": \"admin@domain.host.com\",\n \"subject\": \"404 recently encountered\"\n }\n }\n },\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.putWatch({\n id: \"my-watch\",\n trigger: {\n schedule: {\n cron: \"0 0/1 * * * ?\",\n },\n },\n input: {\n search: {\n request: {\n indices: [\"logstash*\"],\n body: {\n query: {\n bool: {\n must: {\n match: {\n response: 404,\n },\n },\n filter: {\n range: {\n \"@timestamp\": {\n from: \"{{ctx.trigger.scheduled_time}}||-5m\",\n to: \"{{ctx.trigger.triggered_time}}\",\n },\n },\n },\n },\n },\n },\n },\n },\n },\n condition: {\n compare: {\n \"ctx.payload.hits.total\": {\n gt: 0,\n },\n },\n },\n actions: {\n email_admin: {\n email: {\n to: \"admin@domain.host.com\",\n subject: \"404 recently encountered\",\n },\n },\n },\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.put_watch(\n id: \"my-watch\",\n body: {\n \"trigger\": {\n \"schedule\": {\n \"cron\": \"0 0/1 * * * ?\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logstash*\"\n ],\n \"body\": {\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\": {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": {\n \"email_admin\": {\n \"email\": {\n \"to\": \"admin@domain.host.com\",\n \"subject\": \"404 recently encountered\"\n }\n }\n }\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->putWatch([\n \"id\" => \"my-watch\",\n \"body\" => [\n \"trigger\" => [\n \"schedule\" => [\n \"cron\" => \"0 0/1 * * * ?\",\n ],\n ],\n \"input\" => [\n \"search\" => [\n \"request\" => [\n \"indices\" => array(\n \"logstash*\",\n ),\n \"body\" => [\n \"query\" => [\n \"bool\" => [\n \"must\" => [\n \"match\" => [\n \"response\" => 404,\n ],\n ],\n \"filter\" => [\n \"range\" => [\n \"@timestamp\" => [\n \"from\" => \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\" => \"{{ctx.trigger.triggered_time}}\",\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n \"condition\" => [\n \"compare\" => [\n \"ctx.payload.hits.total\" => [\n \"gt\" => 0,\n ],\n ],\n ],\n \"actions\" => [\n \"email_admin\" => [\n \"email\" => [\n \"to\" => \"admin@domain.host.com\",\n \"subject\" => \"404 recently encountered\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"trigger\":{\"schedule\":{\"cron\":\"0 0/1 * * * ?\"}},\"input\":{\"search\":{\"request\":{\"indices\":[\"logstash*\"],\"body\":{\"query\":{\"bool\":{\"must\":{\"match\":{\"response\":404}},\"filter\":{\"range\":{\"@timestamp\":{\"from\":\"{{ctx.trigger.scheduled_time}}||-5m\",\"to\":\"{{ctx.trigger.triggered_time}}\"}}}}}}}}},\"condition\":{\"compare\":{\"ctx.payload.hits.total\":{\"gt\":0}}},\"actions\":{\"email_admin\":{\"email\":{\"to\":\"admin@domain.host.com\",\"subject\":\"404 recently encountered\"}}}}' \"$ELASTICSEARCH_URL/_watcher/watch/my-watch\"" + }, + { + "lang": "Java", + "source": "client.watcher().putWatch(p -> p\n .actions(\"email_admin\", a -> a\n .email(e -> e\n .subject(\"404 recently encountered\")\n .to(\"admin@domain.host.com\")\n )\n )\n .condition(c -> c\n .compare(NamedValue.of(\"ctx.payload.hits.total\",Pair.of(ConditionOp.Gt,FieldValue.of(0))))\n )\n .id(\"my-watch\")\n .input(i -> i\n .search(s -> s\n .request(r -> r\n .body(b -> b\n .query(q -> q\n .bool(bo -> bo\n .filter(f -> f\n .range(ra -> ra\n .untyped(u -> u\n .field(\"@timestamp\")\n )\n )\n )\n .must(m -> m\n .match(ma -> ma\n .field(\"response\")\n .query(FieldValue.of(404))\n )\n )\n )\n )\n )\n .indices(\"logstash*\")\n )\n )\n )\n .trigger(t -> t\n .schedule(sc -> sc\n .cron(\"0 0/1 * * * ?\")\n )\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -100175,6 +123097,36 @@ ], "x-api": "delete_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "DELETE _watcher/watch/my_watch\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.delete_watch(\n id=\"my_watch\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.deleteWatch({\n id: \"my_watch\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.delete_watch(\n id: \"my_watch\"\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->deleteWatch([\n \"id\" => \"my_watch\",\n]);" + }, + { + "lang": "curl", + "source": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch\"" + }, + { + "lang": "Java", + "source": "client.watcher().deleteWatch(d -> d\n .id(\"my_watch\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -100344,6 +123296,36 @@ ], "x-api": "execute_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/watch/my_watch/_execute\n{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + { + "lang": "Python", + "source": "resp = client.watcher.execute_watch(\n id=\"my_watch\",\n trigger_data={\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n alternative_input={\n \"foo\": \"bar\"\n },\n ignore_condition=True,\n action_modes={\n \"my-action\": \"force_simulate\"\n },\n record_execution=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.executeWatch({\n id: \"my_watch\",\n trigger_data: {\n triggered_time: \"now\",\n scheduled_time: \"now\",\n },\n alternative_input: {\n foo: \"bar\",\n },\n ignore_condition: true,\n action_modes: {\n \"my-action\": \"force_simulate\",\n },\n record_execution: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.execute_watch(\n id: \"my_watch\",\n body: {\n \"trigger_data\": {\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n \"alternative_input\": {\n \"foo\": \"bar\"\n },\n \"ignore_condition\": true,\n \"action_modes\": {\n \"my-action\": \"force_simulate\"\n },\n \"record_execution\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->executeWatch([\n \"id\" => \"my_watch\",\n \"body\" => [\n \"trigger_data\" => [\n \"triggered_time\" => \"now\",\n \"scheduled_time\" => \"now\",\n ],\n \"alternative_input\" => [\n \"foo\" => \"bar\",\n ],\n \"ignore_condition\" => true,\n \"action_modes\" => [\n \"my-action\" => \"force_simulate\",\n ],\n \"record_execution\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"trigger_data\":{\"triggered_time\":\"now\",\"scheduled_time\":\"now\"},\"alternative_input\":{\"foo\":\"bar\"},\"ignore_condition\":true,\"action_modes\":{\"my-action\":\"force_simulate\"},\"record_execution\":true}' \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_execute\"" + }, + { + "lang": "Java", + "source": "client.watcher().executeWatch(e -> e\n .actionModes(\"my-action\", ActionExecutionMode.ForceSimulate)\n .alternativeInput(\"foo\", JsonData.fromJson(\"\\\"bar\\\"\"))\n .id(\"my_watch\")\n .ignoreCondition(true)\n .recordExecution(true)\n .triggerData(t -> t\n .scheduledTime(DateTime.of(\"now\"))\n .triggeredTime(DateTime.of(\"now\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -100511,6 +123493,36 @@ ], "x-api": "execute_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/watch/my_watch/_execute\n{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + { + "lang": "Python", + "source": "resp = client.watcher.execute_watch(\n id=\"my_watch\",\n trigger_data={\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n alternative_input={\n \"foo\": \"bar\"\n },\n ignore_condition=True,\n action_modes={\n \"my-action\": \"force_simulate\"\n },\n record_execution=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.executeWatch({\n id: \"my_watch\",\n trigger_data: {\n triggered_time: \"now\",\n scheduled_time: \"now\",\n },\n alternative_input: {\n foo: \"bar\",\n },\n ignore_condition: true,\n action_modes: {\n \"my-action\": \"force_simulate\",\n },\n record_execution: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.execute_watch(\n id: \"my_watch\",\n body: {\n \"trigger_data\": {\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n \"alternative_input\": {\n \"foo\": \"bar\"\n },\n \"ignore_condition\": true,\n \"action_modes\": {\n \"my-action\": \"force_simulate\"\n },\n \"record_execution\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->executeWatch([\n \"id\" => \"my_watch\",\n \"body\" => [\n \"trigger_data\" => [\n \"triggered_time\" => \"now\",\n \"scheduled_time\" => \"now\",\n ],\n \"alternative_input\" => [\n \"foo\" => \"bar\",\n ],\n \"ignore_condition\" => true,\n \"action_modes\" => [\n \"my-action\" => \"force_simulate\",\n ],\n \"record_execution\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"trigger_data\":{\"triggered_time\":\"now\",\"scheduled_time\":\"now\"},\"alternative_input\":{\"foo\":\"bar\"},\"ignore_condition\":true,\"action_modes\":{\"my-action\":\"force_simulate\"},\"record_execution\":true}' \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_execute\"" + }, + { + "lang": "Java", + "source": "client.watcher().executeWatch(e -> e\n .actionModes(\"my-action\", ActionExecutionMode.ForceSimulate)\n .alternativeInput(\"foo\", JsonData.fromJson(\"\\\"bar\\\"\"))\n .id(\"my_watch\")\n .ignoreCondition(true)\n .recordExecution(true)\n .triggerData(t -> t\n .scheduledTime(DateTime.of(\"now\"))\n .triggeredTime(DateTime.of(\"now\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -100669,6 +123681,36 @@ ], "x-api": "execute_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/watch/my_watch/_execute\n{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + { + "lang": "Python", + "source": "resp = client.watcher.execute_watch(\n id=\"my_watch\",\n trigger_data={\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n alternative_input={\n \"foo\": \"bar\"\n },\n ignore_condition=True,\n action_modes={\n \"my-action\": \"force_simulate\"\n },\n record_execution=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.executeWatch({\n id: \"my_watch\",\n trigger_data: {\n triggered_time: \"now\",\n scheduled_time: \"now\",\n },\n alternative_input: {\n foo: \"bar\",\n },\n ignore_condition: true,\n action_modes: {\n \"my-action\": \"force_simulate\",\n },\n record_execution: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.execute_watch(\n id: \"my_watch\",\n body: {\n \"trigger_data\": {\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n \"alternative_input\": {\n \"foo\": \"bar\"\n },\n \"ignore_condition\": true,\n \"action_modes\": {\n \"my-action\": \"force_simulate\"\n },\n \"record_execution\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->executeWatch([\n \"id\" => \"my_watch\",\n \"body\" => [\n \"trigger_data\" => [\n \"triggered_time\" => \"now\",\n \"scheduled_time\" => \"now\",\n ],\n \"alternative_input\" => [\n \"foo\" => \"bar\",\n ],\n \"ignore_condition\" => true,\n \"action_modes\" => [\n \"my-action\" => \"force_simulate\",\n ],\n \"record_execution\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"trigger_data\":{\"triggered_time\":\"now\",\"scheduled_time\":\"now\"},\"alternative_input\":{\"foo\":\"bar\"},\"ignore_condition\":true,\"action_modes\":{\"my-action\":\"force_simulate\"},\"record_execution\":true}' \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_execute\"" + }, + { + "lang": "Java", + "source": "client.watcher().executeWatch(e -> e\n .actionModes(\"my-action\", ActionExecutionMode.ForceSimulate)\n .alternativeInput(\"foo\", JsonData.fromJson(\"\\\"bar\\\"\"))\n .id(\"my_watch\")\n .ignoreCondition(true)\n .recordExecution(true)\n .triggerData(t -> t\n .scheduledTime(DateTime.of(\"now\"))\n .triggeredTime(DateTime.of(\"now\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -100825,6 +123867,36 @@ ], "x-api": "execute_watch.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/watch/my_watch/_execute\n{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + { + "lang": "Python", + "source": "resp = client.watcher.execute_watch(\n id=\"my_watch\",\n trigger_data={\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n alternative_input={\n \"foo\": \"bar\"\n },\n ignore_condition=True,\n action_modes={\n \"my-action\": \"force_simulate\"\n },\n record_execution=True,\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.executeWatch({\n id: \"my_watch\",\n trigger_data: {\n triggered_time: \"now\",\n scheduled_time: \"now\",\n },\n alternative_input: {\n foo: \"bar\",\n },\n ignore_condition: true,\n action_modes: {\n \"my-action\": \"force_simulate\",\n },\n record_execution: true,\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.execute_watch(\n id: \"my_watch\",\n body: {\n \"trigger_data\": {\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n \"alternative_input\": {\n \"foo\": \"bar\"\n },\n \"ignore_condition\": true,\n \"action_modes\": {\n \"my-action\": \"force_simulate\"\n },\n \"record_execution\": true\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->executeWatch([\n \"id\" => \"my_watch\",\n \"body\" => [\n \"trigger_data\" => [\n \"triggered_time\" => \"now\",\n \"scheduled_time\" => \"now\",\n ],\n \"alternative_input\" => [\n \"foo\" => \"bar\",\n ],\n \"ignore_condition\" => true,\n \"action_modes\" => [\n \"my-action\" => \"force_simulate\",\n ],\n \"record_execution\" => true,\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"trigger_data\":{\"triggered_time\":\"now\",\"scheduled_time\":\"now\"},\"alternative_input\":{\"foo\":\"bar\"},\"ignore_condition\":true,\"action_modes\":{\"my-action\":\"force_simulate\"},\"record_execution\":true}' \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_execute\"" + }, + { + "lang": "Java", + "source": "client.watcher().executeWatch(e -> e\n .actionModes(\"my-action\", ActionExecutionMode.ForceSimulate)\n .alternativeInput(\"foo\", JsonData.fromJson(\"\\\"bar\\\"\"))\n .id(\"my_watch\")\n .ignoreCondition(true)\n .recordExecution(true)\n .triggerData(t -> t\n .scheduledTime(DateTime.of(\"now\"))\n .triggeredTime(DateTime.of(\"now\"))\n )\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -100889,6 +123961,36 @@ ], "x-api": "get_settings.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_watcher/settings\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.get_settings()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.getSettings();" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.get_settings" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->getSettings();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/settings\"" + }, + { + "lang": "Java", + "source": "client.watcher().getSettings(g -> g);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -100977,6 +124079,36 @@ ], "x-api": "update_settings.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_watcher/settings\n{\n \"index.auto_expand_replicas\": \"0-4\"\n}" + }, + { + "lang": "Python", + "source": "resp = client.watcher.update_settings(\n index.auto_expand_replicas=\"0-4\",\n)" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.updateSettings({\n \"index.auto_expand_replicas\": \"0-4\",\n});" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.update_settings(\n body: {\n \"index.auto_expand_replicas\": \"0-4\"\n }\n)" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->updateSettings([\n \"body\" => [\n \"index.auto_expand_replicas\" => \"0-4\",\n ],\n]);" + }, + { + "lang": "curl", + "source": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index.auto_expand_replicas\":\"0-4\"}' \"$ELASTICSEARCH_URL/_watcher/settings\"" + }, + { + "lang": "Java", + "source": "client.watcher().updateSettings(u -> u\n .indexAutoExpandReplicas(\"0-4\")\n);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -101089,6 +124221,36 @@ ], "x-api": "query_watches.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_watcher/_query/watches\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.query_watches()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.queryWatches();" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.query_watches" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->queryWatches();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/_query/watches\"" + }, + { + "lang": "Java", + "source": "client.watcher().queryWatches(q -> q);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -101199,6 +124361,36 @@ ], "x-api": "query_watches.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_watcher/_query/watches\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.query_watches()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.queryWatches();" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.query_watches" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->queryWatches();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/_query/watches\"" + }, + { + "lang": "Java", + "source": "client.watcher().queryWatches(q -> q);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -101254,6 +124446,36 @@ ], "x-api": "start.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/_start\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.start()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.start();" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.start" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->start();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/_start\"" + }, + { + "lang": "Java", + "source": "client.watcher().start(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -101284,7 +124506,7 @@ { "in": "query", "name": "metric", - "description": "Defines which additional metrics are included in the response.", + "description": "Defines which additional metrics are included in the response.\n\nSupported values include: `_all` (or `all`), `queued_watches`, `current_watches`, `pending_watches`\n\n", "deprecated": false, "schema": { "oneOf": [ @@ -101371,6 +124593,36 @@ ], "x-api": "stats.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _watcher/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.stats();" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->stats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/stats\"" + }, + { + "lang": "Java", + "source": "client.watcher().stats(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -101391,7 +124643,7 @@ { "in": "path", "name": "metric", - "description": "Defines which additional metrics are included in the response.", + "description": "Defines which additional metrics are included in the response.\n\nSupported values include: `_all` (or `all`), `queued_watches`, `current_watches`, `pending_watches`\n\n", "required": true, "deprecated": false, "schema": { @@ -101422,7 +124674,7 @@ { "in": "query", "name": "metric", - "description": "Defines which additional metrics are included in the response.", + "description": "Defines which additional metrics are included in the response.\n\nSupported values include: `_all` (or `all`), `queued_watches`, `current_watches`, `pending_watches`\n\n", "deprecated": false, "schema": { "oneOf": [ @@ -101509,6 +124761,36 @@ ], "x-api": "stats.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET _watcher/stats\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.stats()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.stats();" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.stats" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->stats();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/stats\"" + }, + { + "lang": "Java", + "source": "client.watcher().stats(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -101564,6 +124846,36 @@ ], "x-api": "stop.watcher", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "POST _watcher/_stop\n" + }, + { + "lang": "Python", + "source": "resp = client.watcher.stop()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.watcher.stop();" + }, + { + "lang": "Ruby", + "source": "response = client.watcher.stop" + }, + { + "lang": "PHP", + "source": "$resp = $client->watcher()->stop();" + }, + { + "lang": "curl", + "source": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/_stop\"" + }, + { + "lang": "Java", + "source": "client.watcher().stop(s -> s);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -101674,6 +124986,36 @@ ], "x-api": "info.xpack", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_xpack\n" + }, + { + "lang": "Python", + "source": "resp = client.xpack.info()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.xpack.info();" + }, + { + "lang": "Ruby", + "source": "response = client.xpack.info" + }, + { + "lang": "PHP", + "source": "$resp = $client->xpack()->info();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_xpack\"" + }, + { + "lang": "Java", + "source": "client.xpack().info(i -> i);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -101950,6 +125292,36 @@ ], "x-api": "usage.xpack", "x-category": "info", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_xpack/usage\n" + }, + { + "lang": "Python", + "source": "resp = client.xpack.usage()" + }, + { + "lang": "JavaScript", + "source": "const response = await client.xpack.usage();" + }, + { + "lang": "Ruby", + "source": "response = client.xpack.usage" + }, + { + "lang": "PHP", + "source": "$resp = $client->xpack()->usage();" + }, + { + "lang": "curl", + "source": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_xpack/usage\"" + }, + { + "lang": "Java", + "source": "client.xpack().usage(u -> u);\n" + } + ], "x-metaTags": [ { "content": "Elasticsearch", @@ -105601,6 +128973,7 @@ "type": "object", "properties": { "relation": { + "description": "\n\nSupported values include:\n - `eq`: Accurate\n - `gte`: Lower bound, including returned events or sequences\n\n", "allOf": [ { "$ref": "#/components/schemas/_global.search._types.TotalHitsRelation" @@ -109797,7 +133170,7 @@ ] }, "zero_terms_query": { - "description": "Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter.", + "description": "Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter.\n\nSupported values include:\n - `none`: No documents are returned if the analyzer removes all tokens.\n - `all`: Returns all documents, similar to a `match_all` query.\n\n", "default": "none", "allOf": [ { @@ -110076,7 +133449,7 @@ "type": "object", "properties": { "boost_mode": { - "description": "Defines how he newly computed score is combined with the score of the query", + "description": "Defines how he newly computed score is combined with the score of the query\n\nSupported values include:\n - `multiply`: Query score and function score are multiplied\n - `replace`: Only the function score is used.\nThe query score is ignored.\n - `sum`: Query score and function score are added\n - `avg`: Query score and function score are averaged\n - `max`: Max of query score and function score\n - `min`: Min of query score and function score\n\n", "default": "multiply", "allOf": [ { @@ -110108,7 +133481,7 @@ ] }, "score_mode": { - "description": "Specifies how the computed scores are combined", + "description": "Specifies how the computed scores are combined\n\nSupported values include:\n - `multiply`: Scores are multiplied.\n - `sum`: Scores are summed.\n - `avg`: Scores are averaged.\n - `first`: The first function that has a matching filter is applied.\n - `max`: Maximum score is used.\n - `min`: Minimum score is used.\n\n", "default": "multiply", "allOf": [ { @@ -110235,7 +133608,7 @@ "type": "object", "properties": { "multi_value_mode": { - "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.", + "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.\n\nSupported values include:\n - `min`: Distance is the minimum distance.\n - `max`: Distance is the maximum distance.\n - `avg`: Distance is the average distance.\n - `sum`: Distance is the sum of all distances.\n\n", "default": "min", "allOf": [ { @@ -110268,7 +133641,7 @@ "type": "object", "properties": { "multi_value_mode": { - "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.", + "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.\n\nSupported values include:\n - `min`: Distance is the minimum distance.\n - `max`: Distance is the maximum distance.\n - `avg`: Distance is the average distance.\n - `sum`: Distance is the sum of all distances.\n\n", "default": "min", "allOf": [ { @@ -110292,7 +133665,7 @@ "type": "object", "properties": { "multi_value_mode": { - "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.", + "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.\n\nSupported values include:\n - `min`: Distance is the minimum distance.\n - `max`: Distance is the maximum distance.\n - `avg`: Distance is the average distance.\n - `sum`: Distance is the sum of all distances.\n\n", "default": "min", "allOf": [ { @@ -110316,7 +133689,7 @@ "type": "object", "properties": { "multi_value_mode": { - "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.", + "description": "Determines how the distance is calculated when a field used for computing the decay contains multiple values.\n\nSupported values include:\n - `min`: Distance is the minimum distance.\n - `max`: Distance is the maximum distance.\n - `avg`: Distance is the average distance.\n - `sum`: Distance is the sum of all distances.\n\n", "default": "min", "allOf": [ { @@ -110347,7 +133720,7 @@ "type": "number" }, "modifier": { - "description": "Modifier to apply to the field value.", + "description": "Modifier to apply to the field value.\n\nSupported values include:\n - `none`: Do not apply any multiplier to the field value.\n - `log`: Take the common logarithm of the field value.\nBecause this function will return a negative value and cause an error if used on values between 0 and 1, it is recommended to use `log1p` instead.\n - `log1p`: Add 1 to the field value and take the common logarithm.\n - `log2p`: Add 2 to the field value and take the common logarithm.\n - `ln`: Take the natural logarithm of the field value.\nBecause this function will return a negative value and cause an error if used on values between 0 and 1, it is recommended to use `ln1p` instead.\n - `ln1p`: Add 1 to the field value and take the natural logarithm.\n - `ln2p`: Add 2 to the field value and take the natural logarithm.\n - `square`: Square the field value (multiply it by itself).\n - `sqrt`: Take the square root of the field value.\n - `reciprocal`: Reciprocate the field value, same as `1/x` where `x` is the field’s value.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.query_dsl.FieldValueFactorModifier" @@ -110439,7 +133812,7 @@ } }, "lang": { - "description": "Specifies the language the script is written in.", + "description": "Specifies the language the script is written in.\n\nSupported values include:\n - `painless`: Painless scripting language, purpose-built for Elasticsearch.\n - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.\n - `mustache`: Mustache templated, used for templates.\n - `java`: Expert Java API\n\n", "default": "painless", "allOf": [ { @@ -110998,6 +134371,7 @@ "type": "object", "properties": { "type": { + "description": "\n\nSupported values include:\n - `plain`: The `plain` highlighter uses the standard Lucene highlighter\n - `fvh`: The fvh highlighter uses the Lucene Fast Vector highlighter.\n - `unified`: The unified highlighter uses the Lucene Unified Highlighter.\n\n", "allOf": [ { "$ref": "#/components/schemas/_global.search._types.HighlighterType" @@ -111015,7 +134389,7 @@ "type": "number" }, "boundary_scanner": { - "description": "Specifies how to break the highlighted fragments: chars, sentence, or word.\nOnly valid for the unified and fvh highlighters.\nDefaults to `sentence` for the `unified` highlighter. Defaults to `chars` for the `fvh` highlighter.", + "description": "Specifies how to break the highlighted fragments: chars, sentence, or word.\nOnly valid for the unified and fvh highlighters.\nDefaults to `sentence` for the `unified` highlighter. Defaults to `chars` for the `fvh` highlighter.\n\nSupported values include:\n - `chars`: Use the characters specified by `boundary_chars` as highlighting boundaries.\nThe `boundary_max_scan` setting controls how far to scan for boundary characters.\nOnly valid for the `fvh` highlighter.\n - `sentence`: Break highlighted fragments at the next sentence boundary, as determined by Java’s `BreakIterator`.\nYou can specify the locale to use with `boundary_scanner_locale`.\nWhen used with the `unified` highlighter, the `sentence` scanner splits sentences bigger than `fragment_size` at the first word boundary next to fragment_size.\nYou can set `fragment_size` to `0` to never split any sentence.\n - `word`: Break highlighted fragments at the next word boundary, as determined by Java’s `BreakIterator`.\nYou can specify the locale to use with `boundary_scanner_locale`.\n\n", "allOf": [ { "$ref": "#/components/schemas/_global.search._types.BoundaryScanner" @@ -111244,6 +134618,7 @@ "type": "object", "properties": { "order": { + "description": "\n\nSupported values include:\n - `asc`: Ascending (smallest to largest)\n - `desc`: Descending (largest to smallest)\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.SortOrder" @@ -111270,6 +134645,7 @@ ] }, "distance_type": { + "description": "\n\nSupported values include:\n - `arc`: The `arc` calculation is the most accurate.\n - `plane`: The `plane` calculation is faster but less accurate.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.GeoDistanceType" @@ -111280,6 +134656,7 @@ "type": "boolean" }, "order": { + "description": "\n\nSupported values include:\n - `asc`: Ascending (smallest to largest)\n - `desc`: Descending (largest to smallest)\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.SortOrder" @@ -111369,6 +134746,7 @@ "type": "object", "properties": { "order": { + "description": "\n\nSupported values include:\n - `asc`: Ascending (smallest to largest)\n - `desc`: Descending (largest to smallest)\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.SortOrder" @@ -111687,7 +135065,7 @@ "type": "number" }, "score_mode": { - "description": "Determines how scores are combined.", + "description": "Determines how scores are combined.\n\nSupported values include:\n - `avg`: Average the original score and the rescore query score.\n - `max`: Take the max of original score and the rescore query score.\n - `min`: Take the min of the original score and the rescore query score.\n - `multiply`: Multiply the original score by the rescore query score.\nUseful for `function` query rescores.\n - `total`: Add the original score and the rescore query score.\n\n", "default": "total", "allOf": [ { @@ -112725,7 +136103,7 @@ ] }, "validation_method": { - "description": "Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.\nSet to `COERCE` to also try to infer correct latitude or longitude.", + "description": "Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.\nSet to `COERCE` to also try to infer correct latitude or longitude.\n\nSupported values include:\n - `coerce`: Accept geo points with invalid latitude or longitude and additionally try and infer correct coordinates.\n - `ignore_malformed`: Accept geo points with invalid latitude or longitude.\n - `strict`\n\n", "default": "'strict'", "allOf": [ { @@ -112774,7 +136152,7 @@ ] }, "distance_type": { - "description": "How to compute the distance.\nSet to `plane` for a faster calculation that's inaccurate on long distances and close to the poles.", + "description": "How to compute the distance.\nSet to `plane` for a faster calculation that's inaccurate on long distances and close to the poles.\n\nSupported values include:\n - `arc`: The `arc` calculation is the most accurate.\n - `plane`: The `plane` calculation is faster but less accurate.\n\n", "default": "'arc'", "allOf": [ { @@ -112783,7 +136161,7 @@ ] }, "validation_method": { - "description": "Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.\nSet to `COERCE` to also try to infer correct latitude or longitude.", + "description": "Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.\nSet to `COERCE` to also try to infer correct latitude or longitude.\n\nSupported values include:\n - `coerce`: Accept geo points with invalid latitude or longitude and additionally try and infer correct coordinates.\n - `ignore_malformed`: Accept geo points with invalid latitude or longitude.\n - `strict`\n\n", "default": "'strict'", "allOf": [ { @@ -112847,6 +136225,7 @@ "type": "object", "properties": { "validation_method": { + "description": "\n\nSupported values include:\n - `coerce`: Accept geo points with invalid latitude or longitude and additionally try and infer correct coordinates.\n - `ignore_malformed`: Accept geo points with invalid latitude or longitude.\n - `strict`\n\n", "default": "'strict'", "allOf": [ { @@ -113677,7 +137056,7 @@ ] }, "zero_terms_query": { - "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.", + "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.\n\nSupported values include:\n - `all`: Returns all documents, similar to a `match_all` query.\n - `none`: No documents are returned if the `analyzer` removes all tokens.\n\n", "default": "'none'", "allOf": [ { @@ -113812,7 +137191,7 @@ "type": "number" }, "zero_terms_query": { - "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.", + "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.\n\nSupported values include:\n - `all`: Returns all documents, similar to a `match_all` query.\n - `none`: No documents are returned if the `analyzer` removes all tokens.\n\n", "default": "'none'", "allOf": [ { @@ -113854,7 +137233,7 @@ "type": "number" }, "zero_terms_query": { - "description": "Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter.", + "description": "Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a `stop` filter.\n\nSupported values include:\n - `all`: Returns all documents, similar to a `match_all` query.\n - `none`: No documents are returned if the `analyzer` removes all tokens.\n\n", "default": "none", "allOf": [ { @@ -113994,6 +137373,7 @@ ] }, "version_type": { + "description": "\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "default": "'internal'", "allOf": [ { @@ -114070,6 +137450,7 @@ ] }, "version_type": { + "description": "\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "default": "'internal'", "allOf": [ { @@ -114240,7 +137621,7 @@ "type": "number" }, "type": { - "description": "How `the` multi_match query is executed internally.", + "description": "How `the` multi_match query is executed internally.\n\nSupported values include:\n - `best_fields`: Finds documents that match any field, but uses the `_score` from the best field.\n - `most_fields`: Finds documents that match any field and combines the `_score` from each field.\n - `cross_fields`: Treats fields with the same analyzer as though they were one big field.\nLooks for each word in any field.\n - `phrase`: Runs a `match_phrase` query on each field and uses the `_score` from the best field.\n - `phrase_prefix`: Runs a `match_phrase_prefix` query on each field and uses the `_score` from the best field.\n - `bool_prefix`: Creates a `match_bool_prefix` query on each field and combines the `_score` from each field.\n\n", "default": "'best_fields'", "allOf": [ { @@ -114249,7 +137630,7 @@ ] }, "zero_terms_query": { - "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.", + "description": "Indicates whether no documents are returned if the `analyzer` removes all tokens, such as when using a `stop` filter.\n\nSupported values include:\n - `all`: Returns all documents, similar to a `match_all` query.\n - `none`: No documents are returned if the `analyzer` removes all tokens.\n\n", "default": "'none'", "allOf": [ { @@ -114691,7 +138072,7 @@ ] }, "type": { - "description": "Determines how the query matches and scores documents.", + "description": "Determines how the query matches and scores documents.\n\nSupported values include:\n - `best_fields`: Finds documents that match any field, but uses the `_score` from the best field.\n - `most_fields`: Finds documents that match any field and combines the `_score` from each field.\n - `cross_fields`: Treats fields with the same analyzer as though they were one big field.\nLooks for each word in any field.\n - `phrase`: Runs a `match_phrase` query on each field and uses the `_score` from the best field.\n - `phrase_prefix`: Runs a `match_phrase_prefix` query on each field and uses the `_score` from the best field.\n - `bool_prefix`: Creates a `match_bool_prefix` query on each field and combines the `_score` from each field.\n\n", "default": "'best_fields'", "allOf": [ { @@ -114768,7 +138149,7 @@ "type": "object", "properties": { "relation": { - "description": "Indicates how the range query matches values for `range` fields.", + "description": "Indicates how the range query matches values for `range` fields.\n\nSupported values include:\n - `within`: Matches documents with a range field value entirely within the query’s range.\n - `contains`: Matches documents with a range field value that entirely contains the query’s range.\n - `intersects`: Matches documents with a range field value that intersects the query’s range.\n\n", "default": "intersects", "allOf": [ { @@ -114841,7 +138222,7 @@ "type": "object", "properties": { "relation": { - "description": "Indicates how the range query matches values for `range` fields.", + "description": "Indicates how the range query matches values for `range` fields.\n\nSupported values include:\n - `within`: Matches documents with a range field value entirely within the query’s range.\n - `contains`: Matches documents with a range field value that entirely contains the query’s range.\n - `intersects`: Matches documents with a range field value that intersects the query’s range.\n\n", "default": "intersects", "allOf": [ { @@ -114904,7 +138285,7 @@ "type": "object", "properties": { "relation": { - "description": "Indicates how the range query matches values for `range` fields.", + "description": "Indicates how the range query matches values for `range` fields.\n\nSupported values include:\n - `within`: Matches documents with a range field value entirely within the query’s range.\n - `contains`: Matches documents with a range field value that entirely contains the query’s range.\n - `intersects`: Matches documents with a range field value that intersects the query’s range.\n\n", "default": "intersects", "allOf": [ { @@ -114951,7 +138332,7 @@ "type": "object", "properties": { "relation": { - "description": "Indicates how the range query matches values for `range` fields.", + "description": "Indicates how the range query matches values for `range` fields.\n\nSupported values include:\n - `within`: Matches documents with a range field value entirely within the query’s range.\n - `contains`: Matches documents with a range field value that entirely contains the query’s range.\n - `intersects`: Matches documents with a range field value that intersects the query’s range.\n\n", "default": "intersects", "allOf": [ { @@ -116285,7 +139666,7 @@ "type": "string" }, "gap_policy": { - "description": "Policy to apply when gaps are found in the data.", + "description": "Policy to apply when gaps are found in the data.\n\nSupported values include:\n - `skip`: Treats missing data as if the bucket does not exist. It will skip the bucket and\ncontinue calculating using the next available value.\n - `insert_zeros`: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.\n - `keep_values`: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used,\notherwise the empty bucket is skipped.\n\n", "default": "skip", "allOf": [ { @@ -116430,7 +139811,7 @@ "type": "number" }, "gap_policy": { - "description": "The policy to apply when gaps are found in the data.", + "description": "The policy to apply when gaps are found in the data.\n\nSupported values include:\n - `skip`: Treats missing data as if the bucket does not exist. It will skip the bucket and\ncontinue calculating using the next available value.\n - `insert_zeros`: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.\n - `keep_values`: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used,\notherwise the empty bucket is skipped.\n\n", "default": "skip", "allOf": [ { @@ -116585,7 +139966,7 @@ "type": "boolean" }, "execution_hint": { - "description": "Mechanism by which cardinality aggregations is run.", + "description": "Mechanism by which cardinality aggregations is run.\n\nSupported values include:\n - `global_ordinals`: Run the aggregation by using global ordinals of the field and resolving those values after finishing a shard.\n - `segment_ordinals`: Run the aggregation by using segment ordinal values and resolving those values after each segment.\n - `direct`: Run the aggregation by using field values directly.\n - `save_memory_heuristic`: Heuristic-based mode, default in Elasticsearch 8.3 and earlier.\n - `save_time_heuristic`: Heuristic-based mode, default in Elasticsearch 8.4 and later.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.aggregations.CardinalityExecutionMode" @@ -116883,6 +140264,7 @@ ] }, "order": { + "description": "\n\nSupported values include:\n - `asc`: Ascending (smallest to largest)\n - `desc`: Descending (largest to smallest)\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.SortOrder" @@ -117307,7 +140689,7 @@ "type": "object", "properties": { "execution_hint": { - "description": "The type of value used for de-duplication.", + "description": "The type of value used for de-duplication.\n\nSupported values include:\n - `map`: Hold field values directly.\n - `global_ordinals`: Hold ordinals of the field as determined by the Lucene index.\n - `bytes_hash`: Hold hashes of the field values - with potential for hash collisions.\n\n", "default": "global_ordinals", "allOf": [ { @@ -117598,7 +140980,7 @@ "type": "object", "properties": { "distance_type": { - "description": "The distance calculation type.", + "description": "The distance calculation type.\n\nSupported values include:\n - `arc`: The `arc` calculation is the most accurate.\n - `plane`: The `plane` calculation is faster but less accurate.\n\n", "default": "arc", "allOf": [ { @@ -117756,7 +141138,7 @@ "type": "boolean" }, "sort_order": { - "description": "The order in which the line is sorted (ascending or descending).", + "description": "The order in which the line is sorted (ascending or descending).\n\nSupported values include:\n - `asc`: Ascending (smallest to largest)\n - `desc`: Descending (largest to smallest)\n\n", "default": "asc", "allOf": [ { @@ -118654,7 +142036,7 @@ "type": "object", "properties": { "collect_mode": { - "description": "Specifies the strategy for data collection.", + "description": "Specifies the strategy for data collection.\n\nSupported values include:\n - `depth_first`: Expands all branches of the aggregation tree in one depth-first pass, before any pruning occurs.\n - `breadth_first`: Caches the set of documents that fall into the uppermost buckets for subsequent replay.\n\n", "default": "breadth_first", "allOf": [ { @@ -118768,7 +142150,7 @@ "type": "object", "properties": { "method": { - "description": "The specific method to apply.", + "description": "The specific method to apply.\n\nSupported values include:\n - `rescale_0_1`: This method rescales the data such that the minimum number is 0, and the maximum number is 1, with the rest normalized linearly in-between.\n - `rescale_0_100`: This method rescales the data such that the minimum number is 0, and the maximum number is 100, with the rest normalized linearly in-between.\n - `percent_of_sum`: This method normalizes each value so that it represents a percentage of the total sum it attributes to.\n - `mean`: This method normalizes such that each value is normalized by how much it differs from the average.\n - `z-score`: This method normalizes such that each value represents how far it is from the mean relative to the standard deviation.\n - `softmax`: This method normalizes such that each value is exponentiated and relative to the sum of the exponents of the original values.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.aggregations.NormalizeMethod" @@ -119070,7 +142452,7 @@ ] }, "mode": { - "description": "How the rate is calculated.", + "description": "How the rate is calculated.\n\nSupported values include:\n - `sum`: Calculates the sum of all values of the field.\n - `value_count`: Uses the number of values of the field.\n\n", "default": "sum", "allOf": [ { @@ -119620,7 +143002,7 @@ "type": "object", "properties": { "collect_mode": { - "description": "Determines how child aggregations should be calculated: breadth-first or depth-first.", + "description": "Determines how child aggregations should be calculated: breadth-first or depth-first.\n\nSupported values include:\n - `depth_first`: Expands all branches of the aggregation tree in one depth-first pass, before any pruning occurs.\n - `breadth_first`: Caches the set of documents that fall into the uppermost buckets for subsequent replay.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.aggregations.TermsAggregationCollectMode" @@ -119865,7 +143247,7 @@ ] }, "type": { - "description": "The type of test.", + "description": "The type of test.\n\nSupported values include:\n - `paired`: Performs paired t-test.\n - `homoscedastic`: Performs two-sample equal variance test.\n - `heteroscedastic`: Performs two-sample unequal variance test.\n\n", "default": "heteroscedastic", "allOf": [ { @@ -120239,6 +143621,7 @@ ] }, "version_type": { + "description": "\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -122771,7 +146154,7 @@ ] }, "state": { - "description": "The status of the anomaly detection job.", + "description": "The status of the anomaly detection job.\n\nSupported values include:\n - `closing`: The job close action is in progress and has not yet completed. A closing job cannot accept further data.\n - `closed`: The job finished successfully with its model state persisted. The job must be opened before it can accept further data.\n - `opened`: The job is available to receive and process data.\n - `failed`: The job did not finish successfully due to an error.\nThis situation can occur due to invalid input data, a fatal error occurring during the analysis, or an external interaction such as the process being killed by the Linux out of memory (OOM) killer.\nIf the job had irrevocably failed, it must be force closed and then deleted.\nIf the datafeed can be corrected, the job can be closed and then re-opened.\n - `opening`: The job open action is in progress and has not yet completed.\n\n", "allOf": [ { "$ref": "#/components/schemas/ml._types.JobState" @@ -126333,6 +149716,7 @@ ] }, "order": { + "description": "\n\nSupported values include: `asc` (or `ASC`), `desc` (or `DESC`)\n\n", "oneOf": [ { "$ref": "#/components/schemas/indices._types.SegmentSortOrder" @@ -126346,6 +149730,7 @@ ] }, "mode": { + "description": "\n\nSupported values include: `min` (or `MIN`), `max` (or `MAX`)\n\n", "oneOf": [ { "$ref": "#/components/schemas/indices._types.SegmentSortMode" @@ -126359,6 +149744,7 @@ ] }, "missing": { + "description": "\n\nSupported values include: `_last`, `_first`\n\n", "oneOf": [ { "$ref": "#/components/schemas/indices._types.SegmentSortMissing" @@ -126871,7 +150257,7 @@ ] }, "durability": { - "description": "Whether or not to `fsync` and commit the translog after every index, delete, update, or bulk request.", + "description": "Whether or not to `fsync` and commit the translog after every index, delete, update, or bulk request.\n\nSupported values include:\n - `request` (or `REQUEST`): (default) fsync and commit after every request. In the event of hardware failure, all acknowledged writes\nwill already have been committed to disk.\n - `async` (or `ASYNC`): fsync and commit in the background every sync_interval. In the event of a failure, all acknowledged writes\nsince the last automatic commit will be discarded.\n\n", "default": "string", "allOf": [ { @@ -131552,6 +154938,7 @@ ] }, "languageset": { + "description": "\n\nSupported values include: `any`, `common`, `cyrillic`, `english`, `french`, `german`, `hebrew`, `hungarian`, `polish`, `romanian`, `russian`, `spanish`\n\n", "oneOf": [ { "$ref": "#/components/schemas/_types.analysis.PhoneticLanguage" @@ -132929,6 +156316,7 @@ "type": "object", "properties": { "type": { + "description": "\n\nSupported values include:\n - `fs`: Default file system implementation. This will pick the best implementation depending on the operating environment, which\nis currently hybridfs on all supported systems but is subject to change.\n - `niofs`: The NIO FS type stores the shard index on the file system (maps to Lucene NIOFSDirectory) using NIO. It allows multiple\nthreads to read from the same file concurrently. It is not recommended on Windows because of a bug in the SUN Java\nimplementation and disables some optimizations for heap memory usage.\n - `mmapfs`: The MMap FS type stores the shard index on the file system (maps to Lucene MMapDirectory) by mapping a file into\nmemory (mmap). Memory mapping uses up a portion of the virtual memory address space in your process equal to the size\nof the file being mapped. Before using this class, be sure you have allowed plenty of virtual address space.\n - `hybridfs`: The hybridfs type is a hybrid of niofs and mmapfs, which chooses the best file system type for each type of file\nbased on the read access pattern. Currently only the Lucene term dictionary, norms and doc values files are memory\nmapped. All other files are opened using Lucene NIOFSDirectory. Similarly to mmapfs be sure you have allowed\nplenty of virtual address space.\n\n", "allOf": [ { "$ref": "#/components/schemas/indices._types.StorageType" @@ -134708,6 +158096,7 @@ } }, "synthetic_source_keep": { + "description": "\n\nSupported values include:\n - `none`: Synthetic source diverges from the original source (default)\n - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.\nThe synthetic source fragment for such arrays is not guaranteed to match the original source exactly,\ne.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].\nThe exact format may change in the future, in an effort to reduce the storage overhead of this option.\n - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.\nWhen applied to objects, the source of all sub-objects and sub-fields gets captured.\nFurthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.mapping.SyntheticSourceKeepEnum" @@ -135610,7 +158999,7 @@ "type": "number" }, "element_type": { - "description": "The data type used to encode vectors. The supported data types are `float` (default), `byte`, and `bit`.", + "description": "The data type used to encode vectors. The supported data types are `float` (default), `byte`, and `bit`.\n\nSupported values include:\n - `bit`: Indexes a single bit per dimension. Useful for very high-dimensional vectors or models that specifically support\nbit vectors.\n\nNOTE: when using `bit`, the number of dimensions must be a multiple of `8` and must represent the number of bits.\n - `byte`: Indexes a 1-byte integer value per dimension.\n - `float`: Indexes a 4-byte floating-point value per dimension.\n - `bfloat16`: Indexes a 2-byte floating-point value per dimension.\n\n", "default": "float", "allOf": [ { @@ -135632,7 +159021,7 @@ ] }, "similarity": { - "description": "The vector similarity metric to use in kNN search.\n\nDocuments are ranked by their vector field's similarity to the query vector. The `_score` of each document will\nbe derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds\nto a higher ranking.\n\nDefaults to `l2_norm` when `element_type` is `bit` otherwise defaults to `cosine`.\n\n`bit` vectors only support `l2_norm` as their similarity metric.\n\nThis parameter can only be specified when `index` is `true`.", + "description": "The vector similarity metric to use in kNN search.\n\nDocuments are ranked by their vector field's similarity to the query vector. The `_score` of each document will\nbe derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds\nto a higher ranking.\n\nDefaults to `l2_norm` when `element_type` is `bit` otherwise defaults to `cosine`.\n\n`bit` vectors only support `l2_norm` as their similarity metric.\n\nThis parameter can only be specified when `index` is `true`.\n\nSupported values include:\n - `cosine`: Computes the cosine similarity. During indexing Elasticsearch automatically normalizes vectors with `cosine`\nsimilarity to unit length. This allows to internally use `dot_product` for computing similarity, which is more\nefficient. Original un-normalized vectors can be still accessed through scripts.\n\nThe document `_score` is computed as `(1 + cosine(query, vector)) / 2`.\n\nThe `cosine` similarity does not allow vectors with zero magnitude, since cosine is not defined in this case.\n - `dot_product`: Computes the dot product of two unit vectors. This option provides an optimized way to perform cosine similarity.\nThe constraints and computed score are defined by `element_type`.\n\nWhen `element_type` is `float`, all vectors must be unit length, including both document and query vectors.\n\nThe document `_score` is computed as `(1 + dot_product(query, vector)) / 2`.\n\nWhen `element_type` is `byte`, all vectors must have the same length including both document and query vectors or\nresults will be inaccurate.\n\nThe document `_score` is computed as `0.5 + (dot_product(query, vector) / (32768 * dims))` where `dims` is the\nnumber of dimensions per vector.\n - `l2_norm`: Computes similarity based on the `L2` distance (also known as Euclidean distance) between the vectors.\n\nThe document `_score` is computed as `1 / (1 + l2_norm(query, vector)^2)`.\n\nFor `bit` vectors, instead of using `l2_norm`, the `hamming` distance between the vectors is used.\n\nThe `_score` transformation is `(numBits - hamming(a, b)) / numBits`.\n - `max_inner_product`: Computes the maximum inner product of two vectors. This is similar to `dot_product`, but doesn't require vectors\nto be normalized. This means that each vector’s magnitude can significantly effect the score.\n\nThe document `_score` is adjusted to prevent negative values. For `max_inner_product` values `< 0`, the `_score`\nis `1 / (1 + -1 * max_inner_product(query, vector))`. For non-negative `max_inner_product` results the `_score`\nis calculated `max_inner_product(query, vector) + 1`.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.mapping.DenseVectorSimilarity" @@ -135673,7 +159062,7 @@ "type": "number" }, "type": { - "description": "The type of kNN algorithm to use.", + "description": "The type of kNN algorithm to use.\n\nSupported values include:\n - `bbq_flat`: This utilizes a brute-force search algorithm in addition to automatically quantizing to binary vectors.\nOnly supports `element_type` of `float`.\n - `bbq_hnsw`: This utilizes the HNSW algorithm in addition to automatic binary quantization for scalable approximate kNN\nsearch with `element_type` of `float`.\n\nThis can reduce the memory footprint by nearly 32x at the cost of some accuracy.\n - `bbq_disk`: This utilizes the DiskBBQ algorithm, a version of Inverted Vector File (IVF) that uses BBQ to quantize vectors.\nOnly supports `element_type` of `float`.\n\nThis not only significantly reduces memory usage, but also allows for indexing and searching of very large datasets that do not fit in memory.\nUnlike HNSW, this index type loses performance gracefully as the index grows larger than memory.\n - `flat`: This utilizes a brute-force search algorithm for exact kNN search. This supports all `element_type` values.\n - `hnsw`: This utilizes the HNSW algorithm for scalable approximate kNN search. This supports all `element_type` values.\n - `int4_flat`: This utilizes a brute-force search algorithm in addition to automatically half-byte scalar quantization.\nOnly supports `element_type` of `float`.\n - `int4_hnsw`: This utilizes the HNSW algorithm in addition to automatically scalar quantization for scalable approximate kNN\nsearch with `element_type` of `float`.\n\nThis can reduce the memory footprint by 8x at the cost of some accuracy.\n - `int8_flat`: This utilizes a brute-force search algorithm in addition to automatically scalar quantization. Only supports\n`element_type` of `float`.\n - `int8_hnsw`: The default index type for `float` vectors. This utilizes the HNSW algorithm in addition to automatically scalar\nquantization for scalable approximate kNN search with `element_type` of `float`.\n\nThis can reduce the memory footprint by 4x at the cost of some accuracy.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptionsType" @@ -137236,6 +160625,7 @@ } }, "mode": { + "description": "\n\nSupported values include:\n - `disabled`\n - `stored`\n - `synthetic`: Instead of storing source documents on disk exactly as you send them,\n Elasticsearch can reconstruct source content on the fly upon retrieval.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.mapping.SourceFieldMode" @@ -137584,6 +160974,7 @@ "type": "number" }, "status": { + "description": "\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.HealthStatus" @@ -137666,6 +161057,7 @@ } }, "status": { + "description": "\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.HealthStatus" @@ -137707,6 +161099,7 @@ "type": "number" }, "status": { + "description": "\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.HealthStatus" @@ -138828,7 +162221,7 @@ ] }, "status": { - "description": "Health status of the cluster, based on the state of its primary and replica shards.", + "description": "Health status of the cluster, based on the state of its primary and replica shards.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.HealthStatus" @@ -141180,7 +164573,7 @@ "type": "string" }, "status": { - "description": "Health status of the cluster, based on the state of its primary and replica shards.", + "description": "Health status of the cluster, based on the state of its primary and replica shards.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.HealthStatus" @@ -143968,6 +167361,7 @@ "type": "boolean" }, "expand_wildcards": { + "description": "\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -144005,6 +167399,7 @@ ] }, "search_type": { + "description": "\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.SearchType" @@ -144242,7 +167637,7 @@ "type": "object", "properties": { "lang": { - "description": "The language the script is written in.\nFor search templates, use `mustache`.", + "description": "The language the script is written in.\nFor search templates, use `mustache`.\n\nSupported values include:\n - `painless`: Painless scripting language, purpose-built for Elasticsearch.\n - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.\n - `mustache`: Mustache templated, used for templates.\n - `java`: Expert Java API\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.ScriptLanguage" @@ -144346,6 +167741,7 @@ } }, "language": { + "description": "\n\nSupported values include:\n - `painless`: Painless scripting language, purpose-built for Elasticsearch.\n - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.\n - `mustache`: Mustache templated, used for templates.\n - `java`: Expert Java API\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.ScriptLanguage" @@ -146724,7 +170120,7 @@ ] }, "status": { - "description": "Health status of the data stream.\nThis health status is based on the state of the primary and replica shards of the stream’s backing indices.", + "description": "Health status of the data stream.\nThis health status is based on the state of the primary and replica shards of the stream’s backing indices.\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.HealthStatus" @@ -148722,6 +172118,7 @@ ] }, "health": { + "description": "\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "x-state": "Generally available; Added in 8.1.0", "allOf": [ { @@ -155323,7 +178720,7 @@ "type": "string" }, "shape_relation": { - "description": "A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.\nThis option is only used for `geo_match` enrich policy types.", + "description": "A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.\nThis option is only used for `geo_match` enrich policy types.\n\nSupported values include:\n - `intersects`: Return all documents whose `geo_shape` or `geo_point` field intersects the query geometry.\n - `disjoint`: Return all documents whose `geo_shape` or `geo_point` field has nothing in common with the query geometry.\n - `within`: Return all documents whose `geo_shape` or `geo_point` field is within the query geometry.\nLine geometries are not supported.\n - `contains`: Return all documents whose `geo_shape` or `geo_point` field contains the query geometry.\n\n", "default": "INTERSECTS", "allOf": [ { @@ -156037,7 +179434,7 @@ "type": "boolean" }, "add_to_root_conflict_strategy": { - "description": "When set to `replace`, root fields that conflict with fields from the parsed JSON will be overridden.\nWhen set to `merge`, conflicting fields will be merged.\nOnly applicable `if add_to_root` is set to true.", + "description": "When set to `replace`, root fields that conflict with fields from the parsed JSON will be overridden.\nWhen set to `merge`, conflicting fields will be merged.\nOnly applicable `if add_to_root` is set to true.\n\nSupported values include:\n - `replace`: Root fields that conflict with fields from the parsed JSON will be overridden.\n - `merge`: Conflicting fields will be merged.\n\n", "allOf": [ { "$ref": "#/components/schemas/ingest._types.JsonProcessorConflictStrategy" @@ -156515,7 +179912,7 @@ ] }, "lang": { - "description": "Script language.", + "description": "Script language.\n\nSupported values include:\n - `painless`: Painless scripting language, purpose-built for Elasticsearch.\n - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.\n - `mustache`: Mustache templated, used for templates.\n - `java`: Expert Java API\n\n", "default": "painless", "allOf": [ { @@ -156639,7 +180036,7 @@ ] }, "order": { - "description": "The sort order to use.\nAccepts `\"asc\"` or `\"desc\"`.", + "description": "The sort order to use.\nAccepts `\"asc\"` or `\"desc\"`.\n\nSupported values include:\n - `asc`: Ascending (smallest to largest)\n - `desc`: Descending (largest to smallest)\n\n", "default": "asc", "allOf": [ { @@ -157055,6 +180452,7 @@ ] }, "_version_type": { + "description": "\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -157541,6 +180939,7 @@ ] }, "version_type": { + "description": "\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -157601,7 +181000,7 @@ "type": "string" }, "level": { - "description": "The level property describes the significance of the issue.", + "description": "The level property describes the significance of the issue.\n\nSupported values include:\n - `none`\n - `info`\n - `warning`: You can upgrade directly, but you are using deprecated functionality which will not be available or behave differently in the next major version.\n - `critical`: You cannot upgrade without fixing this problem.\n\n", "allOf": [ { "$ref": "#/components/schemas/migration.deprecations.DeprecationLevel" @@ -157930,7 +181329,7 @@ "type": "object", "properties": { "actions": { - "description": "The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined.", + "description": "The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined.\n\nSupported values include:\n - `skip_result`: The result will not be created. Unless you also specify `skip_model_update`, the model will be updated as usual with the corresponding series value.\n - `skip_model_update`: The value for that series will not be used to update the model. Unless you also specify `skip_result`, the results will be created as usual. This action is suitable when certain values are expected to be consistently anomalous and they affect the model in a way that negatively impacts the rest of the results.\n\n", "default": [ "skip_result" ], @@ -160624,7 +184023,7 @@ "type": "boolean" }, "expand_wildcards": { - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.ExpandWildcards" @@ -160801,7 +184200,7 @@ ] }, "state": { - "description": "The status of the anomaly detection job, which can be one of the following values: `closed`, `closing`, `failed`, `opened`, `opening`.", + "description": "The status of the anomaly detection job, which can be one of the following values: `closed`, `closing`, `failed`, `opened`, `opening`.\n\nSupported values include:\n - `closing`: The job close action is in progress and has not yet completed. A closing job cannot accept further data.\n - `closed`: The job finished successfully with its model state persisted. The job must be opened before it can accept further data.\n - `opened`: The job is available to receive and process data.\n - `failed`: The job did not finish successfully due to an error.\nThis situation can occur due to invalid input data, a fatal error occurring during the analysis, or an external interaction such as the process being killed by the Linux out of memory (OOM) killer.\nIf the job had irrevocably failed, it must be force closed and then deleted.\nIf the datafeed can be corrected, the job can be closed and then re-opened.\n - `opening`: The job open action is in progress and has not yet completed.\n\n", "allOf": [ { "$ref": "#/components/schemas/ml._types.JobState" @@ -162240,7 +185639,7 @@ ] }, "model_type": { - "description": "The model type", + "description": "The model type\n\nSupported values include:\n - `tree_ensemble`: The model definition is an ensemble model of decision trees.\n - `lang_ident`: A special type reserved for language identification models.\n - `pytorch`: The stored definition is a PyTorch (specifically a TorchScript) model.\nCurrently only NLP models are supported.\n\n", "allOf": [ { "$ref": "#/components/schemas/ml._types.TrainedModelType" @@ -163350,7 +186749,7 @@ ] }, "state": { - "description": "The overall state of the deployment.", + "description": "The overall state of the deployment.\n\nSupported values include:\n - `started`: The deployment is usable; at least one node has the model allocated.\n - `starting`: The deployment has recently started but is not yet usable; the model is not allocated on any nodes.\n - `stopping`: The deployment is preparing to stop and deallocate the model from the relevant nodes.\n - `failed`: The deployment is on a failed state and must be re-deployed.\n\n", "allOf": [ { "$ref": "#/components/schemas/ml._types.DeploymentAssignmentState" @@ -163403,7 +186802,7 @@ "type": "number" }, "state": { - "description": "The detailed allocation state related to the nodes.", + "description": "The detailed allocation state related to the nodes.\n\nSupported values include:\n - `started`: The trained model is started on at least one node.\n - `starting`: Trained model deployment is starting but it is not yet deployed on any nodes.\n - `fully_allocated`: Trained model deployment has started on all valid nodes.\n\n", "allOf": [ { "$ref": "#/components/schemas/ml._types.DeploymentAllocationState" @@ -163543,7 +186942,7 @@ "type": "string" }, "routing_state": { - "description": "The current routing state.", + "description": "The current routing state.\n\nSupported values include:\n - `failed`: The allocation attempt failed.\n - `started`: The trained model is allocated and ready to accept inference requests.\n - `starting`: The trained model is attempting to allocate on this node; inference requests are not yet accepted.\n - `stopped`: The trained model is fully deallocated from this node.\n - `stopping`: The trained model is being deallocated from this node.\n\n", "allOf": [ { "$ref": "#/components/schemas/ml._types.RoutingState" @@ -164958,7 +188357,7 @@ ] }, "assignment_state": { - "description": "The overall assignment state.", + "description": "The overall assignment state.\n\nSupported values include:\n - `started`: The deployment is usable; at least one node has the model allocated.\n - `starting`: The deployment has recently started but is not yet usable; the model is not allocated on any nodes.\n - `stopping`: The deployment is preparing to stop and deallocate the model from the relevant nodes.\n - `failed`: The deployment is on a failed state and must be re-deployed.\n\n", "allOf": [ { "$ref": "#/components/schemas/ml._types.DeploymentAssignmentState" @@ -165009,7 +188408,7 @@ "type": "string" }, "routing_state": { - "description": "The current routing state.", + "description": "The current routing state.\n\nSupported values include:\n - `failed`: The allocation attempt failed.\n - `started`: The trained model is allocated and ready to accept inference requests.\n - `starting`: The trained model is attempting to allocate on this node; inference requests are not yet accepted.\n - `stopped`: The trained model is fully deallocated from this node.\n - `stopping`: The trained model is being deallocated from this node.\n\n", "allOf": [ { "$ref": "#/components/schemas/ml._types.RoutingState" @@ -165295,7 +188694,7 @@ ] }, "version_type": { - "description": "Specific version type.", + "description": "Specific version type.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -169473,7 +192872,7 @@ ] }, "op_type": { - "description": "If it is `create`, the operation will only index documents that do not already exist (also known as \"put if absent\").\n\nIMPORTANT: To reindex to a data stream destination, this argument must be `create`.", + "description": "If it is `create`, the operation will only index documents that do not already exist (also known as \"put if absent\").\n\nIMPORTANT: To reindex to a data stream destination, this argument must be `create`.\n\nSupported values include:\n - `index`: Overwrite any documents that already exist.\n - `create`: Only index documents that do not already exist.\n\n", "default": "index", "allOf": [ { @@ -169495,7 +192894,7 @@ ] }, "version_type": { - "description": "The versioning to use for the indexing operation.", + "description": "The versioning to use for the indexing operation.\n\nSupported values include:\n - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.\n - `external`: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.\n - `external_gte`: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document.\nNOTE: The `external_gte` version type is meant for special use cases and should be used with care.\nIf used incorrectly, it can result in loss of data.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.VersionType" @@ -171360,7 +194759,7 @@ } }, "lang": { - "description": "Specifies the language the script is written in.", + "description": "Specifies the language the script is written in.\n\nSupported values include:\n - `painless`: Painless scripting language, purpose-built for Elasticsearch.\n - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.\n - `mustache`: Mustache templated, used for templates.\n - `java`: Expert Java API\n\n", "default": "painless", "allOf": [ { @@ -175384,6 +198783,7 @@ "type": "object", "properties": { "stage": { + "description": "\n\nSupported values include:\n - `DONE`: The number of shards in the snapshot that were successfully stored in the repository.\n - `FAILURE`: The number of shards in the snapshot that were not successfully stored in the repository.\n - `FINALIZE`: The number of shards in the snapshot that are in the finalizing stage of being stored in the repository.\n - `INIT`: The number of shards in the snapshot that are in the initializing stage of being stored in the repository.\n - `STARTED`: The number of shards in the snapshot that are in the started stage of being stored in the repository.\n\n", "allOf": [ { "$ref": "#/components/schemas/snapshot._types.ShardsStatsStage" @@ -176539,6 +199939,7 @@ "type": "object", "properties": { "status": { + "description": "\n\nSupported values include:\n - `green` (or `GREEN`): All shards are assigned.\n - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.\n - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.\n - `unknown`\n - `unavailable`\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.HealthStatus" @@ -177268,6 +200669,7 @@ "type": "object", "properties": { "lang": { + "description": "\n\nSupported values include:\n - `painless`: Painless scripting language, purpose-built for Elasticsearch.\n - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.\n - `mustache`: Mustache templated, used for templates.\n - `java`: Expert Java API\n\n", "default": "painless", "allOf": [ { @@ -177392,6 +200794,7 @@ ] }, "search_type": { + "description": "\n\nSupported values include:\n - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.\n - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.\n\n", "allOf": [ { "$ref": "#/components/schemas/_types.SearchType" @@ -177481,6 +200884,7 @@ ] }, "op_type": { + "description": "\n\nSupported values include:\n - `index`: Overwrite any documents that already exist.\n - `create`: Only index documents that do not already exist.\n\n", "default": "index", "allOf": [ {